/* TWEAKLR — full-bleed authentication environment */
:root{
  --auth-ink:#120e0c;
  --auth-espresso:#241710;
  --auth-bronze:#9b704d;
  --auth-copper:#c69a70;
  --auth-ivory:#f4eadc;
  --auth-muted:rgba(244,234,220,.58);
  --auth-font:"Manrope","DM Sans",sans-serif;
}
html:has(#auth-screen),body:has(#auth-screen){width:100%;height:100%;margin:0;overflow:hidden}
body:has(#auth-screen){background:var(--auth-ink)}
#auth-screen.auth-screen{
  position:relative;isolation:isolate;display:flex!important;flex-direction:column;
  width:100%;height:100vh;height:100svh;min-height:0;overflow:hidden;
  padding:clamp(18px,3.1vw,42px) clamp(22px,6vw,96px) clamp(14px,2vw,24px);
  box-sizing:border-box;color:var(--auth-ivory);background:
    radial-gradient(ellipse at 76% 45%,rgba(111,67,39,.17),transparent 35%),
    linear-gradient(116deg,#120e0c 0%,#1b120e 48%,#100d0b 100%);
  font-family:var(--auth-font);color-scheme:dark;
}
#auth-screen *{box-sizing:border-box}
#auth-screen button,#auth-screen input{font:inherit}
#auth-screen button{cursor:pointer}
#auth-screen [hidden],#auth-screen .auth-form[hidden]{display:none!important}
#auth-screen .auth-atmosphere{position:absolute;inset:0;z-index:-1;overflow:hidden;pointer-events:none}
#auth-screen .auth-glow{position:absolute;border-radius:50%;filter:blur(2px);will-change:transform}
#auth-screen .auth-glow-one{
  width:min(72vw,980px);aspect-ratio:1;right:-18%;top:-38%;
  background:radial-gradient(circle,rgba(152,99,59,.2) 0%,rgba(104,64,42,.09) 32%,transparent 69%);
  animation:auth-breathe 13s ease-in-out infinite alternate;
}
#auth-screen .auth-glow-two{
  width:min(52vw,700px);aspect-ratio:1;left:14%;bottom:-55%;
  background:radial-gradient(circle,rgba(128,75,44,.15),transparent 68%);
  animation:auth-breathe 17s ease-in-out infinite alternate-reverse;
}
#auth-screen .auth-orbit{
  position:absolute;border:1px solid rgba(208,165,122,.12);border-radius:50%;
  transform:rotate(-24deg);animation:auth-drift 34s linear infinite;
}
#auth-screen .auth-orbit-one{width:min(68vw,920px);height:min(38vw,510px);right:-14%;top:9%}
#auth-screen .auth-orbit-two{width:min(55vw,760px);height:min(28vw,390px);right:-8%;top:19%;border-color:rgba(208,165,122,.07);animation-duration:48s;animation-direction:reverse}
#auth-screen .auth-orbit-core{
  position:absolute;right:13%;top:28%;width:clamp(150px,20vw,290px);aspect-ratio:1;border-radius:50%;
  border:1px solid rgba(222,177,133,.12);
  box-shadow:inset 0 0 70px rgba(164,106,65,.06),0 0 90px rgba(164,106,65,.06);
}
#auth-screen .auth-orbit-core::before,#auth-screen .auth-orbit-core::after{
  content:"";position:absolute;border-radius:50%;background:#d8ae83;box-shadow:0 0 14px rgba(216,174,131,.65)
}
#auth-screen .auth-orbit-core::before{width:4px;height:4px;top:17%;left:18%}
#auth-screen .auth-orbit-core::after{width:3px;height:3px;bottom:20%;right:12%;opacity:.65}
#auth-screen .auth-grain{
  position:absolute;inset:0;opacity:.045;pointer-events:none;
  background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.92' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E")
}
#auth-screen .auth-topbar,#auth-screen .auth-footer{
  position:relative;z-index:1;display:flex;align-items:center;justify-content:space-between;flex:0 0 auto
}
#auth-screen .auth-wordmark{
  display:inline-flex;align-items:center;gap:11px;color:var(--auth-ivory);text-decoration:none;
  font-size:11px;font-weight:800;letter-spacing:.24em
}
#auth-screen .auth-wordmark-symbol{
  display:grid;place-items:center;width:31px;height:31px;border:1px solid rgba(205,158,115,.56);
  border-radius:50%;color:#d5aa81;font-family:Georgia,serif;font-size:20px;font-weight:400;letter-spacing:-.1em
}
#auth-screen .auth-topline,#auth-screen .auth-footer{
  color:rgba(244,234,220,.36);font-size:8px;font-weight:700;letter-spacing:.2em
}
#auth-screen .auth-layout{
  position:relative;z-index:1;display:grid;grid-template-columns:minmax(0,1.1fr) minmax(340px,.7fr);
  align-items:center;gap:clamp(50px,9vw,150px);width:min(100%,1320px);flex:1 1 auto;min-height:0;margin:0 auto
}
#auth-screen .auth-story{align-self:center;max-width:720px;padding:2vh 0}
#auth-screen .auth-overline,#auth-screen .auth-eyebrow{
  display:flex;align-items:center;gap:12px;margin:0;color:#c69a70;
  font-size:9px;font-weight:800;letter-spacing:.22em
}
#auth-screen .auth-overline-line{display:inline-block;width:32px;height:1px;background:#b9875e}
#auth-screen .auth-story h1{
  margin:30px 0 24px;color:#f3e8d9;font-size:clamp(68px,9.1vw,142px);
  font-weight:500;line-height:.91;letter-spacing:-.095em
}
#auth-screen .auth-story h1 em,#auth-screen .auth-access-heading h2 em{
  color:#c99c72;font-family:Georgia,"Times New Roman",serif;font-weight:400;letter-spacing:-.07em
}
#auth-screen .auth-story-copy{
  margin:0;color:rgba(244,234,220,.56);font-size:clamp(12px,1.12vw,15px);
  font-weight:400;line-height:1.95;letter-spacing:.015em
}
#auth-screen .auth-coordinate{
  display:flex;align-items:center;gap:12px;margin-top:clamp(34px,6vh,76px);
  color:rgba(244,234,220,.34);font-size:8px;font-weight:700;letter-spacing:.18em
}
#auth-screen .auth-coordinate span:first-child{color:#c69a70}
#auth-screen .auth-coordinate i{display:block;width:44px;height:1px;background:rgba(198,154,112,.45)}
#auth-screen .auth-access{
  width:100%;max-width:430px;justify-self:end;align-self:center;padding:8px 0;
  background:transparent;border:0;border-radius:0;box-shadow:none
}
#auth-screen .auth-access-heading{margin:0 0 30px}
#auth-screen .auth-access-heading h2{
  margin:13px 0 8px;color:#f4eadc;font-size:clamp(34px,3.2vw,47px);
  font-weight:500;line-height:1.08;letter-spacing:-.075em
}
#auth-screen .auth-access-heading h2 em{font-size:1.12em}
#auth-screen .auth-subtitle{margin:0;color:rgba(244,234,220,.47);font-size:11px;line-height:1.7}
#auth-screen .auth-form{display:flex;flex-direction:column;gap:18px;margin:0;padding:0}
#auth-screen .auth-signup-heading{margin-bottom:3px}
#auth-screen .auth-signup-heading h2{font-size:clamp(30px,2.8vw,40px)}
#auth-screen .auth-field{position:relative;display:flex;flex-direction:column;gap:8px;margin:0}
#auth-screen .auth-field label{
  color:rgba(244,234,220,.48);font-size:8px;font-weight:800;letter-spacing:.18em
}
#auth-screen .auth-field input{
  width:100%;height:43px;margin:0;padding:0 54px 9px 0;
  border:0;border-bottom:1px solid rgba(244,234,220,.2);border-radius:0;outline:0;
  background:transparent;color:#fff5e9;font-size:13px;font-weight:500;
  box-shadow:none;transition:border-color .2s ease,background .2s ease
}
#auth-screen .auth-field input::placeholder{color:rgba(244,234,220,.27);font-weight:400}
#auth-screen .auth-field input:focus{border-bottom-color:#c99c72;box-shadow:0 1px 0 #c99c72}
#auth-screen .auth-password-toggle{
  position:absolute;right:0;bottom:8px;z-index:2;padding:4px 0;border:0;
  background:transparent;color:#c99c72;font-size:9px;font-weight:800;letter-spacing:.08em
}
#auth-screen .auth-form-meta{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:-7px}
#auth-screen .auth-form-meta span{color:rgba(244,234,220,.32);font-size:9px}
#auth-screen .auth-form-meta button{
  padding:0;border:0;background:transparent;color:#c99c72;font-size:9px;font-weight:700
}
#auth-screen .auth-submit{
  display:flex;align-items:center;justify-content:space-between;width:100%;height:51px;
  margin-top:3px;padding:0 18px;border:1px solid rgba(218,177,136,.62);border-radius:2px;
  background:linear-gradient(105deg,#b7875e 0%,#d0a47a 48%,#ad7953 100%);
  color:#1a110c;font-size:11px;font-weight:800;letter-spacing:.06em;
  box-shadow:0 12px 34px rgba(0,0,0,.18);transition:filter .2s,transform .2s
}
#auth-screen .auth-submit:hover{filter:brightness(1.1);transform:translateY(-2px)}
#auth-screen .auth-submit:disabled{opacity:.58;cursor:not-allowed;transform:none}
#auth-screen .auth-submit-arrow{font-size:17px;font-weight:400}
#auth-screen .auth-message{min-height:15px;margin:-8px 0 -4px;color:#dfb38a;font-size:10px;line-height:1.5}
#auth-screen .auth-confirmation-panel{display:grid;gap:5px;margin-top:2px;padding:12px 13px;border:1px solid rgba(201,156,114,.2);border-radius:13px;background:rgba(201,156,114,.045)}
#auth-screen .auth-confirmation-panel>span{font-size:8px;letter-spacing:.15em;font-weight:800;color:rgba(244,234,220,.48)}
#auth-screen .auth-confirmation-panel>p:not(.auth-message){margin:0;color:rgba(244,234,220,.66);font-size:10px;line-height:1.5}
#auth-screen .auth-confirmation-panel button{justify-self:start;border:0;background:none;padding:2px 0;color:#c49a73;font:inherit;font-size:10px;font-weight:750;cursor:pointer}
#auth-screen .auth-confirmation-panel button:disabled{opacity:.55;cursor:wait}
#auth-screen .auth-confirmation-panel .auth-message{min-height:0;margin:0}

#auth-screen .auth-switch{
  margin:1px 0 0;padding:0;color:rgba(244,234,220,.44);font-size:10px;line-height:1.7
}
#auth-screen .auth-switch button{
  margin-left:4px;padding:0;border:0;background:transparent;color:#d4a77c;font-size:10px;font-weight:800
}
#auth-screen .auth-switch button span{margin-left:3px}
#auth-screen button:focus-visible,#auth-screen a:focus-visible{outline:2px solid #d0a47a;outline-offset:4px}
#auth-screen .auth-footer{width:100%;padding-top:12px}
#auth-screen .auth-footer-center{color:rgba(244,234,220,.25)}
@keyframes auth-breathe{from{transform:translate3d(0,0,0) scale(.96)}to{transform:translate3d(-2%,3%,0) scale(1.06)}}
@keyframes auth-drift{from{transform:rotate(-24deg) translateX(0)}to{transform:rotate(-24deg) translateX(2.5%)}}
@media(max-width:900px){
  #auth-screen.auth-screen{padding-left:34px;padding-right:34px}
  #auth-screen .auth-layout{grid-template-columns:minmax(0,1fr) minmax(300px,.86fr);gap:35px}
  #auth-screen .auth-story h1{font-size:clamp(58px,8vw,90px)}
  #auth-screen .auth-access{max-width:380px}
}
@media(max-width:680px){
  #auth-screen.auth-screen{padding:17px 22px 13px}
  #auth-screen .auth-topline{font-size:7px;letter-spacing:.14em}
  #auth-screen .auth-wordmark{font-size:10px}
  #auth-screen .auth-wordmark-symbol{width:28px;height:28px}
  #auth-screen .auth-layout{display:flex;flex-direction:column;align-items:stretch;justify-content:center;gap:clamp(15px,3.5vh,28px);width:100%;padding:10px 0}
  #auth-screen .auth-story{width:100%;max-width:460px;margin:0 auto;padding:0}
  #auth-screen .auth-overline{font-size:7px;letter-spacing:.16em}
  #auth-screen .auth-overline-line{width:23px}
  #auth-screen .auth-story h1{margin:12px 0 8px;font-size:clamp(43px,12vw,65px);line-height:.91;letter-spacing:-.09em}
  #auth-screen .auth-story-copy{font-size:10px;line-height:1.55}
  #auth-screen .auth-coordinate{display:none}
  #auth-screen .auth-access{width:100%;max-width:460px;margin:0 auto;padding:0}
  #auth-screen .auth-access-heading{margin-bottom:18px}
  #auth-screen .auth-access-heading h2{margin:7px 0 5px;font-size:32px}
  #auth-screen .auth-eyebrow{font-size:7px;letter-spacing:.18em}
  #auth-screen .auth-subtitle{font-size:10px}
  #auth-screen .auth-form{gap:12px}
  #auth-screen .auth-field{gap:5px}
  #auth-screen .auth-field label{font-size:7px}
  #auth-screen .auth-field input{height:37px;padding-bottom:7px;font-size:12px}
  #auth-screen .auth-form-meta{margin-top:-4px}
  #auth-screen .auth-submit{height:46px;margin-top:0}
  #auth-screen .auth-message{min-height:12px;font-size:9px}
  #auth-screen .auth-switch,#auth-screen .auth-switch button{font-size:9px}
  #auth-screen .auth-footer{padding-top:8px;font-size:6px;letter-spacing:.12em}
  #auth-screen .auth-footer-center{display:none}
  #auth-screen .auth-orbit-one{width:130vw;height:70vw;right:-65%;top:2%}
  #auth-screen .auth-orbit-two{width:110vw;height:60vw;right:-50%;top:10%}
  #auth-screen .auth-orbit-core{width:43vw;right:-5%;top:14%;opacity:.55}
}
@media(max-width:380px){
  #auth-screen.auth-screen{padding-left:17px;padding-right:17px}
  #auth-screen .auth-layout{gap:13px}
  #auth-screen .auth-story h1{font-size:43px}
  #auth-screen .auth-story-copy{font-size:9px}
  #auth-screen .auth-access-heading{margin-bottom:13px}
  #auth-screen .auth-access-heading h2{font-size:29px}
  #auth-screen .auth-form{gap:9px}
  #auth-screen .auth-field input{height:34px}
  #auth-screen .auth-submit{height:43px}
}
@media(max-height:700px) and (max-width:680px){
  #auth-screen.auth-screen{padding-top:10px;padding-bottom:8px}
  #auth-screen .auth-layout{gap:10px}
  #auth-screen .auth-story h1{margin:8px 0 5px;font-size:39px}
  #auth-screen .auth-story-copy{font-size:9px;line-height:1.4}
  #auth-screen .auth-access-heading{margin-bottom:9px}
  #auth-screen .auth-access-heading h2{font-size:26px}
  #auth-screen .auth-form{gap:7px}
  #auth-screen .auth-field input{height:31px}
  #auth-screen .auth-submit{height:39px}
  #auth-screen .auth-footer{padding-top:3px}
}
@media(prefers-reduced-motion:reduce){
  #auth-screen *,#auth-screen *::before,#auth-screen *::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
}

/* COCOA BROWN + WARM BLACK PALETTE */
:root{
  --auth-ink:#0d0907;
  --auth-espresso:#1b100b;
  --auth-bronze:#8b6548;
  --auth-copper:#b98a61;
  --auth-ivory:#f2e7d9;
  --auth-muted:rgba(242,231,217,.58);
}
#auth-screen.auth-screen{
  color:var(--auth-ivory);
  background:
    radial-gradient(ellipse at 76% 45%,rgba(91,57,36,.25),transparent 38%),
    radial-gradient(ellipse at 18% 90%,rgba(73,50,36,.18),transparent 42%),
    linear-gradient(116deg,#0d0907 0%,#1b100b 48%,#100b08 100%);
}
#auth-screen .auth-glow-one{
  background:radial-gradient(circle,rgba(125,83,54,.22) 0%,rgba(73,50,36,.12) 34%,transparent 70%);
}
#auth-screen .auth-glow-two{
  background:radial-gradient(circle,rgba(73,50,36,.2),transparent 68%);
}
#auth-screen .auth-orbit{border-color:rgba(185,138,97,.14)}
#auth-screen .auth-orbit-two{border-color:rgba(185,138,97,.08)}
#auth-screen .auth-orbit-core{
  border-color:rgba(185,138,97,.16);
  box-shadow:inset 0 0 70px rgba(73,50,36,.1),0 0 90px rgba(73,50,36,.08);
}
#auth-screen .auth-orbit-core::before,#auth-screen .auth-orbit-core::after{
  background:#c49a73;box-shadow:0 0 14px rgba(196,154,115,.6);
}
#auth-screen .auth-wordmark-symbol{
  border-color:rgba(185,138,97,.62);color:#c49a73;
}
#auth-screen .auth-topline,#auth-screen .auth-footer{color:rgba(242,231,217,.38)}
#auth-screen .auth-overline,#auth-screen .auth-eyebrow{color:#b98a61}
#auth-screen .auth-overline-line{background:#8b6548}
#auth-screen .auth-story h1{color:#f2e7d9}
#auth-screen .auth-story h1 em,#auth-screen .auth-access-heading h2 em{color:#c49a73}
#auth-screen .auth-story-copy{color:rgba(242,231,217,.58)}
#auth-screen .auth-coordinate{color:rgba(242,231,217,.36)}
#auth-screen .auth-coordinate span:first-child{color:#b98a61}
#auth-screen .auth-coordinate i{background:rgba(185,138,97,.48)}
#auth-screen .auth-access-heading h2{color:#f2e7d9}
#auth-screen .auth-subtitle{color:rgba(242,231,217,.5)}
#auth-screen .auth-field label{color:rgba(242,231,217,.52)}
#auth-screen .auth-field input{
  border-bottom-color:rgba(242,231,217,.22);color:#fff8ef;
}
#auth-screen .auth-field input::placeholder{color:rgba(242,231,217,.3)}
#auth-screen .auth-field input:focus{border-bottom-color:#c49a73;box-shadow:0 1px 0 #c49a73}
#auth-screen .auth-password-toggle,#auth-screen .auth-form-meta button{color:#c49a73}
#auth-screen .auth-form-meta span{color:rgba(242,231,217,.36)}
#auth-screen .auth-submit{
  border-color:rgba(196,154,115,.7);
  background:linear-gradient(105deg,#765238 0%,#a77a55 48%,#805b3e 100%);
  color:#fff3e5;
  box-shadow:0 12px 34px rgba(0,0,0,.26);
}
#auth-screen .auth-message{color:#d5ad87}
#auth-screen .auth-switch{color:rgba(242,231,217,.48)}
#auth-screen .auth-switch button{color:#c49a73}
#auth-screen button:focus-visible,#auth-screen a:focus-visible{outline-color:#c49a73}
#auth-screen .auth-footer-center{color:rgba(242,231,217,.28)}


/* MOBILE KEYBOARD: keep auth fields inside the visible, scrollable viewport */
@media (max-width:680px){
  html:has(#auth-screen),body:has(#auth-screen){
    height:auto;
    min-height:100%;
    overflow-x:hidden;
    overflow-y:auto;
  }
  #auth-screen.auth-screen{
    height:100vh;
    min-height:100vh;
    overflow-x:hidden;
    overflow-y:auto;
    overscroll-behavior-y:contain;
    -webkit-overflow-scrolling:touch;
    justify-content:flex-start;
  }
  @supports (height:100dvh){
    #auth-screen.auth-screen{
      height:100dvh;
      min-height:100dvh;
    }
  }
  #auth-screen .auth-layout{
    flex:0 0 auto;
    min-height:min-content;
    justify-content:flex-start;
    padding-top:clamp(12px,3vh,28px);
    padding-bottom:clamp(18px,4vh,36px);
  }
  #auth-screen .auth-access{flex:0 0 auto}
  #auth-screen .auth-footer{flex:0 0 auto}
  /* Prioritize the active form while the Android/iOS keyboard is open. */
  #auth-screen:has(.auth-field input:focus) .auth-story,
  #auth-screen:has(.auth-field input:focus) .auth-footer{
    display:none!important;
  }
  #auth-screen:has(.auth-field input:focus) .auth-layout{
    flex:1 0 auto;
    justify-content:flex-start;
    padding-top:12px;
    padding-bottom:24px;
  }
  #auth-screen:has(.auth-field input:focus) .auth-access-heading{
    margin-bottom:12px;
  }
}
@media (max-width:680px) and (max-height:520px){
  #auth-screen.auth-screen{padding-top:8px;padding-bottom:6px}
  #auth-screen .auth-topbar{min-height:24px}
  #auth-screen:has(.auth-field input:focus) .auth-access-heading{margin-bottom:8px}
  #auth-screen:has(.auth-field input:focus) .auth-form{gap:8px}
  #auth-screen:has(.auth-field input:focus) .auth-field input{height:34px}
  #auth-screen:has(.auth-field input:focus) .auth-submit{height:40px}
}
