/* Golden Key applications — tokens taken from the portal design screens */
:root {
  --bg: #F8F7F3;
  --surface: #FFFFFF;
  --field: #FBF7EE;
  --field-border: #EEE3CB;
  --border: #E6E4DE;
  --fg: #111827;
  --muted: #5F6673;
  --faint: #9AA0AA;
  --gold: #DA9D2C;
  --gold-hover: #C98C1E;
  --gold-ink: #C2740B;
  --gold-soft: #FBF3E2;
  --gold-line: #F0DDB0;
  --on-gold: #FFFFFF;
  --navy: #111827;
  --on-navy: #FFFFFF;
  --start: #DA9D2C;
  --on-start: #FFFFFF;
  --track: #E3E5EA;
  --side: #47371A;
  --side-line: rgba(255, 255, 255, 0.14);
  --side-icon: #F7EBD0;
  --side-active: #6B5321;
  --chip: #EEF0F3;
  --chip-fg: #374151;
  --hero-1: #05070D;
  --hero-2: #0B1A3A;
  --ok: #15803D;
  --ok-soft: #E7F6EC;
  --warn: #B45309;
  --warn-soft: #FDF0DC;
  --bad: #B91C1C;
  --bad-soft: #FDE8E8;
  --info: #1D4ED8;
  --info-soft: #E6EEFD;
  --shadow: 0 1px 2px rgba(17, 24, 39, 0.04), 0 1px 3px rgba(17, 24, 39, 0.05);
  --font: 'Inter', -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111725; --surface: #1E2433; --field: #1A2030; --field-border: #323A4C; --border: #2C3343; --fg: #F5F6F8; --muted: #A2A9B6; --faint: #6E7686;
    --gold: #D9A646; --gold-hover: #E4B45A; --gold-ink: #E8B04B; --gold-soft: #2E2715; --gold-line: #5C4A22; --on-gold: #1A1305;
    --navy: #2E3546; --on-navy: #F5F6F8; --start: #7A5E28; --on-start: #F7E7C2; --track: #3A4254;
    --side: #111725; --side-line: #222A3A; --side-icon: #B9C0CC; --side-active: #222A3A; --chip: #2A3142; --chip-fg: #CBD2DC;
    --ok: #4ADE80; --ok-soft: #14301F; --warn: #F5B451; --warn-soft: #3A2A10; --bad: #F87171; --bad-soft: #3A1717; --info: #8AB4FF; --info-soft: #15233F;
    --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111725; --surface: #1E2433; --field: #1A2030; --field-border: #323A4C; --border: #2C3343; --fg: #F5F6F8; --muted: #A2A9B6; --faint: #6E7686;
  --gold: #D9A646; --gold-hover: #E4B45A; --gold-ink: #E8B04B; --gold-soft: #2E2715; --gold-line: #5C4A22; --on-gold: #1A1305;
  --navy: #2E3546; --on-navy: #F5F6F8; --start: #7A5E28; --on-start: #F7E7C2; --track: #3A4254;
  --side: #111725; --side-line: #222A3A; --side-icon: #B9C0CC; --side-active: #222A3A; --chip: #2A3142; --chip-fg: #CBD2DC;
  --ok: #4ADE80; --ok-soft: #14301F; --warn: #F5B451; --warn-soft: #3A2A10; --bad: #F87171; --bad-soft: #3A1717; --info: #8AB4FF; --info-soft: #15233F;
  --shadow: none; color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; text-wrap: balance; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--gold-ink); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.tabular { font-variant-numeric: tabular-nums; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 10px; padding: 11px 20px; font-weight: 500; cursor: pointer; transition: background .15s, border-color .15s, transform .05s; text-decoration: none; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-gold { background: var(--gold); color: var(--on-gold); }
.btn-gold:hover:not([disabled]) { background: var(--gold-hover); }
.btn-ghost { background: var(--surface); border-color: var(--border); color: var(--fg); }
.btn-ghost:hover:not([disabled]) { border-color: var(--faint); }
.btn-navy { background: var(--navy); color: var(--on-navy); }
.btn-start { background: var(--start); color: var(--on-start); }
.btn-quiet { background: transparent; color: var(--muted); padding: 8px 10px; }
.btn-quiet:hover { color: var(--fg); }
.btn-sm { padding: 7px 14px; font-size: 14px; border-radius: 8px; }
.btn-lg { padding: 13px 24px; font-size: 16px; }
.btn-block { width: 100%; }
.pill-back { display: inline-flex; align-items: center; gap: 10px; background: var(--navy); color: var(--on-navy); border: 0; border-radius: 999px; padding: 10px 22px 10px 18px; font-size: 14px; font-weight: 500; cursor: pointer; box-shadow: 0 2px 6px rgba(17,24,39,.18); }

/* ---------- shell ---------- */
.logo { display: block; object-fit: contain; }
.shell { display: flex; min-height: 100vh; min-height: 100dvh; }
.side { position: fixed; inset: 0 auto 0 0; width: 70px; background: var(--side); border-right: 1px solid var(--side-line); display: flex; flex-direction: column; align-items: center; padding: calc(22px + env(safe-area-inset-top, 0px)) 0 calc(20px + env(safe-area-inset-bottom, 0px)); padding-left: env(safe-area-inset-left, 0px); z-index: 20; }
.side .logo { width: 40px; height: 40px; }
.side hr { width: 40px; border: 0; border-top: 1px solid var(--side-line); margin: 22px 0 22px; }
.side-nav { display: flex; flex-direction: column; gap: 22px; align-items: center; }
.side-btn { position: relative; width: 40px; height: 40px; border-radius: 999px; border: 0; background: transparent; color: var(--side-icon); display: grid; place-items: center; cursor: pointer; }
.side-btn:hover { background: var(--side-active); }
.side-btn.active { background: var(--side-active); }
.side-label { display: none; }
.side-btn .badge { position: absolute; top: 0; right: 0; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: #EF4444; color: #fff; font-size: 10px; font-weight: 600; display: grid; place-items: center; }
.side-spacer { flex: 1; }
.main { flex: 1; min-width: 0; margin-left: 70px; padding: 30px max(16px, env(safe-area-inset-right, 0px)) 60px max(16px, 7vw); }
.main-inner { max-width: 1090px; }
@media (max-width: 640px) {
  .side { inset: auto 0 0 0; width: 100%; height: calc(72px + env(safe-area-inset-bottom, 0px)); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: center; gap: 4px; padding: 6px max(12px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px)); border-right: 0; border-top: 1px solid var(--border); background: var(--surface); box-shadow: 0 -4px 18px rgba(17, 24, 39, .05); }
  .side hr, .side-spacer { display: none; }
  .side-nav { display: contents; }
  .side-btn { width: 100%; height: 56px; border-radius: 12px; display: flex; flex-direction: column; justify-content: center; gap: 4px; color: var(--muted); }
  .side-btn.active { background: var(--gold-soft); color: var(--gold-ink); }
  .side .logo { width: 26px; height: 26px; }
  .side-label { display: block; font-size: 11px; font-weight: 500; line-height: 14px; }
  .main { margin-left: 0; padding: max(20px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) calc(104px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
  .main-inner:has(> .hello) > .pill-back { display: none; }
}

/* ---------- hub ---------- */
.hello { margin: 34px 0 0; font-size: 30px; font-weight: 700; }
.hello-sub { color: var(--muted); font-size: 17px; margin: 10px 0 0; }
.section-h { display: flex; align-items: center; gap: 10px; font-size: 24px; font-weight: 700; margin: 46px 0 18px; }
.section-h svg { color: var(--gold); }
.cards { display: grid; gap: 16px; max-width: 536px; }
.opp-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 24px 24px 24px 24px; display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 16px; align-items: center; box-shadow: var(--shadow); }
.opp-ico { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--gold-soft); border: 1px solid var(--gold-line); color: var(--gold-ink); }
.chip { display: inline-block; font-size: 11px; font-weight: 500; padding: 1px 8px; border-radius: 6px; background: var(--chip); color: var(--chip-fg); }
.opp-title { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; margin: 4px 0 2px; }
.meta { display: flex; align-items: center; gap: 5px; font-size: 13px; color: var(--muted); }
.meta.gold { color: var(--gold-ink); }
.bar { height: 7px; border-radius: 999px; background: var(--track); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--gold); border-radius: inherit; transition: width .3s; }
.prog { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; margin-top: 14px; font-size: 13px; font-weight: 600; }
.unlock-row { grid-column: 2 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
.unlock-row input { flex: 1 1 180px; min-width: 0; text-transform: uppercase; letter-spacing: .08em; }
.err { color: var(--bad); font-size: 13px; margin-top: 6px; }
.empty { color: var(--muted); font-size: 14px; background: var(--surface); border: 1px dashed var(--border); border-radius: 12px; padding: 18px 20px; max-width: 536px; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.st-draft { background: var(--chip); color: var(--chip-fg); }
.st-submitted { background: var(--info-soft); color: var(--info); }
.st-shortlisted { background: var(--warn-soft); color: var(--warn); }
.st-awarded { background: var(--ok-soft); color: var(--ok); }
.st-declined { background: var(--bad-soft); color: var(--bad); }
@media (max-width: 520px) {
  .opp-card { grid-template-columns: 40px minmax(0, 1fr); }
  .opp-card > .opp-cta { grid-column: 1 / -1; }
  .opp-card > .opp-cta .btn { width: 100%; }
  .unlock-row { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .hello { margin-top: 4px; font-size: 26px; line-height: 1.25; overflow-wrap: anywhere; }
  .hello-sub { font-size: 15px; line-height: 1.5; margin-top: 8px; }
  .section-h { gap: 8px; font-size: 20px; line-height: 1.3; margin: 28px 0 14px; }
  .section-h svg { width: 22px; height: 22px; flex-shrink: 0; }
  .cards { max-width: none; gap: 14px; }
  .opp-card { grid-template-columns: 40px minmax(0, 1fr); padding: 16px; gap: 12px; }
  .opp-ico { width: 40px; height: 40px; }
  .opp-title { font-size: 16px; line-height: 1.4; overflow-wrap: anywhere; }
  .meta { font-size: 12px; flex-wrap: wrap; }
  .meta svg { flex-shrink: 0; }
  .opp-card > .opp-cta { grid-column: 1 / -1; }
  .opp-card > .opp-cta .btn { width: 100%; min-height: 44px; }
}

/* ---------- opportunity page ---------- */
.opp-page { max-width: 704px; margin: 0 auto; }
.eyebrow { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--gold-line); color: var(--gold-ink); border-radius: 999px; padding: 4px 12px; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.opp-head { text-align: center; margin-top: 32px; display: grid; gap: 14px; justify-items: center; }
.opp-head h1 { font-size: 34px; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 30px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 22px 20px; }
.stat small, .card-label { display: block; font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.stat b { display: block; font-size: 20px; margin-top: 4px; }
.about { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 26px 24px; margin-top: 32px; }
.about p { margin: 10px 0 0; line-height: 1.65; font-size: 16px; }
.opp-actions { display: flex; justify-content: center; margin-top: 28px; }
@media (max-width: 520px) { .stats { grid-template-columns: 1fr; } .opp-head h1 { font-size: 27px; } }

/* ---------- form steps ---------- */
.step-wrap { max-width: 576px; margin: 48px auto 0; }
.step-bar { height: 8px; }
.step-title { text-align: center; font-size: 30px; font-weight: 700; line-height: 1.2; margin: 50px auto 30px; max-width: 520px; }
.step-body { max-width: 512px; margin: 0 auto; display: grid; gap: 22px; }
.field { display: grid; gap: 8px; }
.field label { font-size: 14px; color: var(--muted); }
.input, .select, .textarea { width: 100%; border: 1px solid var(--border); background: var(--surface); border-radius: 10px; padding: 12px 16px; font-size: 16px; transition: border-color .15s, box-shadow .15s; }
.input.filled, .select.filled { background: var(--field); border-color: var(--field-border); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); background: var(--surface); }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 55%, calc(100% - 15px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
.textarea { min-height: 146px; resize: vertical; line-height: 1.55; }
.wc { display: flex; justify-content: space-between; font-size: 12px; color: var(--faint); margin-top: -12px; }
.wc .low { color: var(--warn); }
.drop { display: flex; align-items: center; gap: 12px; border: 2px dashed var(--gold-line); background: var(--gold-soft); border-radius: 10px; padding: 16px; cursor: pointer; position: relative; transition: border-color .15s; }
.drop.over, .drop:hover { border-color: var(--gold); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop .clip { width: 40px; height: 40px; border-radius: 9px; background: var(--surface); border: 1px solid var(--border); display: grid; place-items: center; color: var(--gold); flex: none; }
.drop b { display: block; font-weight: 500; font-size: 14px; }
.drop small { color: var(--gold-ink); font-size: 12px; }
.file-chip { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; border: 1px solid var(--field-border); background: var(--field); border-radius: 10px; padding: 12px 14px; }
.file-chip .name { font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-chip .clip { width: 40px; height: 40px; border-radius: 9px; background: var(--surface); border: 1px solid var(--border); display: grid; place-items: center; color: var(--ok); }
.step-nav { display: flex; justify-content: center; gap: 16px; margin-top: 2px; }
.step-nav .btn { width: 160px; padding: 12px 0; font-size: 16px; }
.form-error { text-align: center; color: var(--bad); font-size: 14px; min-height: 0; }
.saving { text-align: center; font-size: 12px; color: var(--faint); min-height: 18px; }

/* ---------- submitted ---------- */
.done { max-width: 1088px; display: grid; gap: 32px; }
.hero { border-radius: 14px; padding: 40px 24px 42px; text-align: center; color: #fff; background: radial-gradient(120% 140% at 100% 100%, var(--hero-2) 0%, var(--hero-1) 55%); box-shadow: 0 8px 18px rgba(5, 7, 13, .25); display: grid; justify-items: center; gap: 14px; }
.hero .eyebrow { color: #E5E7EB; border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.04); }
.hero .eyebrow svg { color: var(--gold); }
.hero h1 { font-size: 38px; }
.hero p { margin: 0; max-width: 590px; color: #D1D5DB; font-size: 17px; line-height: 1.5; }
.hero p b { color: #fff; }
.hero .ref { font-family: var(--mono); font-size: 12px; color: #9CA3AF; }
.next { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 24px; }
.next ol { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 22px; }
.next li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 16px; align-items: center; }
.step-num { position: relative; width: 40px; height: 40px; border-radius: 999px; background: var(--gold-soft); color: var(--gold); display: grid; place-items: center; }
.step-num span { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 999px; background: var(--navy); color: var(--on-navy); font-size: 11px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--surface); }
.next li b { display: block; font-weight: 600; font-size: 16px; }
.next li small { color: var(--muted); font-size: 14px; }
.done-foot { text-align: center; display: grid; gap: 28px; justify-items: center; }
.done-foot .btn { width: 228px; }
.done-foot p { margin: 0; font-size: 13px; color: var(--muted); }

/* ---------- auth ---------- */
.auth { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; min-height: 100dvh; }
.auth-left { background: radial-gradient(90% 70% at 100% 0%, #FBEFD9 0%, transparent 60%), radial-gradient(70% 60% at 0% 100%, #FAF0DE 0%, transparent 60%), #FAF8F2; display: grid; place-items: center; padding: 40px max(16px, env(safe-area-inset-right, 0px)) 40px max(16px, env(safe-area-inset-left, 0px)); }
:root[data-theme="dark"] .auth-left { background: radial-gradient(90% 70% at 100% 0%, #2A2416 0%, transparent 60%), var(--bg); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .auth-left { background: radial-gradient(90% 70% at 100% 0%, #2A2416 0%, transparent 60%), var(--bg); } }
.auth-box { width: 100%; max-width: 448px; display: grid; gap: 12px; text-align: center; }
.auth-box .logo { width: 50px; height: 50px; margin: 0 auto 14px; }
.auth-box h1 { font-size: 30px; font-weight: 700; }
.auth-box .sub { color: var(--muted); font-size: 14px; margin: 0 0 24px; }
.auth-box .btn { padding: 13px; font-size: 16px; border-radius: 10px; }
.auth-box .field { text-align: left; }
.signin-form { width: 100%; gap: 20px; }
.signin-form .field label { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.signin-form .input { padding: 11px 16px; }
.auth-signin .auth-box .btn { min-height: 48px; padding: 11px 16px; }
.auth-signin .btn-gold { background: #D89C2A; box-shadow: 0 2px 5px rgba(168, 115, 12, .14); }
.auth-signin .btn-gold:hover:not([disabled]) { background: var(--gold-hover); }
.auth-signin .auth-create { font-size: 13px; font-weight: 400; }
.auth-divider { display: flex; align-items: center; gap: 10px; margin: 12px 0; color: var(--muted); font-size: 12px; }
.auth-divider::before, .auth-divider::after { content: ''; height: 1px; flex: 1; background: var(--border); opacity: .6; }
.auth-divider span { padding: 0 6px; background: var(--surface); }
.auth-signin .orbit {
  --orbit-target-left: 71%; --orbit-target-top: 51%;
  --orbit-grad-left: 40%; --orbit-grad-top: 68%;
  --orbit-brief-left: 49%; --orbit-brief-top: 23%;
  --orbit-award-left: 19%; --orbit-award-top: 43%;
}
.auth-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.otp { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin: 4px 0 8px; }
.otp input { text-align: center; font: 600 22px var(--mono); padding: 12px 0; border: 1px solid var(--border); background: var(--surface); border-radius: 10px; width: 100%; }
.otp input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.dev-code { background: var(--gold-soft); border: 1px dashed var(--gold); border-radius: 10px; padding: 10px 12px; font-size: 13px; color: var(--fg); text-align: left; }
.dev-code b { font-family: var(--mono); letter-spacing: .2em; font-size: 15px; }
.link-btn { background: none; border: 0; color: var(--gold-ink); cursor: pointer; font-weight: 500; padding: 4px; }
.auth-foot { margin-top: 18px; font-size: 13px; color: var(--faint); }
.auth-right { position: relative; overflow: hidden; background: radial-gradient(55% 50% at 50% 50%, rgba(214, 186, 92, .28) 0%, rgba(214,186,92,.07) 40%, transparent 70%), linear-gradient(160deg, #111827 0%, #0B1020 55%, #070A14 100%); }
.orbit { position: absolute; inset: 0; }
.orbit .ray { position: absolute; left: 50%; top: 50%; width: 1px; height: 46%; background: linear-gradient(to bottom, rgba(255,255,255,.12), transparent); transform-origin: top center; }
.orbit .core { position: absolute; left: 50%; top: 50%; width: 148px; height: 148px; transform: translate(-50%, -50%) rotate(45deg); background: #1B2130; border-radius: 26px; box-shadow: 0 20px 40px rgba(0,0,0,.45); display: grid; place-items: center; }
.orbit .core i { transform: rotate(-45deg); width: 80px; height: 80px; border-radius: 10px; background: linear-gradient(160deg, #C9A44A, #7C8A3A); display: grid; place-items: center; color: #F5F2E6; }
.orbit .tile { position: absolute; width: 96px; height: 96px; background: rgba(27, 33, 48, .92); border: 1px solid rgba(255,255,255,.07); border-radius: 14px; display: grid; place-items: center; box-shadow: 0 14px 30px rgba(0,0,0,.35); animation: float 7s ease-in-out infinite; }
.orbit .tile i { width: 48px; height: 48px; border-radius: 10px; display: grid; place-items: center; }
.orbit .note { position: absolute; background: rgba(17, 22, 34, .9); border: 1px solid rgba(255,255,255,.1); border-radius: 12px; display: flex; align-items: center; gap: 14px; padding: 16px 18px; animation: float 8s ease-in-out infinite; }
.orbit .note .lines { display: grid; gap: 8px; }
.orbit .note .lines b { display: block; height: 8px; border-radius: 4px; background: rgba(255,255,255,.18); }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }
@media (prefers-reduced-motion: reduce) { .orbit .tile, .orbit .note { animation: none; } }
@media (max-width: 900px) { .auth { grid-template-columns: 1fr; } .auth-right { display: none; } }

/* ---------- misc ---------- */
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--navy); color: var(--on-navy); padding: 11px 18px; border-radius: 10px; font-size: 14px; box-shadow: 0 10px 24px rgba(0,0,0,.25); z-index: 100; max-width: calc(100% - 32px); }
.toast.bad { background: var(--bad); color: #fff; }
@media (max-width: 640px) {
  .toast { bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
}
.loading { display: grid; place-items: center; min-height: 60vh; color: var(--muted); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 22px; }
.profile { max-width: 512px; margin-top: 34px; display: grid; gap: 18px; }

/* ---------- signup ---------- */
.signup-form { gap: 18px; width: 100%; max-width: 360px; }
.signup-form .field label { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--fg); }
.signup-form .input { padding: 10px 14px; font-size: 15px; }
.phone-wrap { display: flex; align-items: stretch; border: 1px solid var(--border); background: var(--surface); border-radius: 10px; transition: border-color .15s, box-shadow .15s; }
.phone-wrap:focus-within { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.phone-wrap .input { border: 0; box-shadow: none !important; background: transparent; flex: 1; min-width: 0; padding-left: 10px; }
.phone-cc { display: inline-flex; align-items: center; gap: 6px; padding: 0 6px 0 10px; width: 142px; flex: 0 0 142px; border-right: 1px solid var(--border); }
.phone-cc select { width: 100%; min-width: 0; border: 0; background: transparent; color: var(--fg); padding: 12px 0; font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; }
.country-flag { width: 24px; height: 18px; object-fit: contain; flex: none; }
.country-flag[hidden] { display: none; }
.country-hint { margin: 6px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.optional { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--muted); }
.field-error { font-size: 12px; line-height: 1.45; color: var(--danger, #b42318); text-align: left; margin-top: 5px; }
.field-error:empty { display: none; }
.input[aria-invalid="true"] { border-color: #b42318; }
.phone-wrap:has([aria-invalid="true"]) { border-color: #b42318; }
.terms { display: flex; gap: 10px; align-items: flex-start; text-align: left; font-size: 12.5px; line-height: 1.5; color: var(--muted); cursor: pointer; }
.terms input { margin: 2px 0 0; width: 16px; height: 16px; accent-color: var(--gold); flex: none; cursor: pointer; }
.terms a { font-weight: 600; text-decoration: none; }
.terms a:hover { text-decoration: underline; }
#f-otp .terms { margin: 6px 0 4px; }
.auth-alt { margin: 8px 0 0; font-size: 14px; color: var(--muted); }
.auth-box:has(.signup-form) { justify-items: center; }
