/* Self-hosted Inter (latin subset). Weight 500 in this sheet resolves to 400 —
   no 500 file is shipped, and the difference is invisible at the sizes used. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('./fonts/inter-400-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('./fonts/inter-600-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('./fonts/inter-700-latin.woff2') format('woff2');
}

:root {
  --navy-0: #071224;
  --navy-1: #0a1a30;
  --navy-2: #10294d;
  --gold: #d4b06a;
  --gold-soft: rgba(212, 176, 106, 0.35);
  --gold-faint: rgba(212, 176, 106, 0.12);
  --ink: #f3ede0;
  --ink-muted: rgba(243, 237, 224, 0.75);
  --danger: #e07a6a;
  --ok: #7ec98f;
  --card: linear-gradient(160deg, rgba(255,255,255,0.05), rgba(255,255,255,0.015));
  --border: 1px solid rgba(212, 176, 106, 0.22);
  --title-font: Georgia, 'Times New Roman', serif;
  --body-font: 'Inter', -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--body-font);
  color: var(--ink);
  background: linear-gradient(168deg, var(--navy-1), var(--navy-0));
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  /* clip, not hidden: hidden makes body a scroll container and would stop the
     sticky survey nav from pinning to the viewport. */
  overflow-x: clip;
}

/* ---------- background ---------- */
.bg {
  position: fixed; inset: 0; z-index: -2;
  background-size: cover; background-position: center;
  transform: translateZ(0);
}
.bg-overlay {
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(1000px 600px at 50% -10%, rgba(16, 41, 77, 0.55) 0%, transparent 60%),
    linear-gradient(168deg, rgba(10, 26, 48, 0.88), rgba(7, 18, 36, 0.94));
}

/* Theme 2 — a listing photo sits behind everything, so lift the type off it
   and make the input surfaces read as glass rather than flat panels.
   :not(.on) keeps the gold selected state from being overridden. */
.theme-photo .hero-title,
.theme-photo .step-title,
.theme-photo .done-title,
.theme-photo .host-name { text-shadow: 0 2px 18px rgba(4, 10, 20, 0.8); }
.theme-photo .step-sub,
.theme-photo .step-eyebrow,
.theme-photo .privacy-note,
.theme-photo .q-label,
.theme-photo .host-tagline { text-shadow: 0 1px 12px rgba(4, 10, 20, 0.85); }
/* the value line is the reason a stranger hands over their email — give it a
   tighter, darker halo so it stays crisp over a bright photo */
.theme-photo .hero-note {
  text-shadow: 0 1px 3px rgba(4, 10, 20, 0.95), 0 2px 14px rgba(4, 10, 20, 0.9);
}
.theme-photo .field input,
.theme-photo .field select,
.theme-photo .field textarea,
.theme-photo .choice:not(.on),
.theme-photo .chip:not(.on) {
  background-color: rgba(7, 18, 36, 0.5);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
}
.theme-photo .welcome-foot { border-top-color: rgba(212, 176, 106, 0.42); }

/* The agent dashboard is a working surface, not a showpiece — keep it on solid
   navy even while the visitor-facing theme is showing a listing photo. */
.admin-view #bg { display: none; }
.admin-view .bg-overlay {
  background: linear-gradient(168deg, rgba(10, 26, 48, 0.97), rgba(7, 18, 36, 1));
}
.admin-view .card,
.admin-view .field input,
.admin-view .field select { backdrop-filter: none; -webkit-backdrop-filter: none; }

/* ---------- app shell ---------- */
.app {
  max-width: 680px;
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) 22px calc(28px + env(safe-area-inset-bottom));
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.screen { display: none; flex: 1; flex-direction: column; animation: fadeUp 0.35s ease; }
.screen.on { display: flex; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .screen { animation: none; }
}

/* ---------- welcome ----------
   Three zones: brand pinned top, hero centred in what's left, host card
   anchored to the bottom rule. Keeps the content spread across the screen
   instead of clustering it in the middle of a tall empty phone. */
.screen-welcome { text-align: center; position: relative; }
.welcome-top { flex: none; padding-top: 26px; }
.welcome-hero {
  flex: 1;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  gap: 32px;
}
.welcome-foot {
  flex: none;
  border-top: 1px solid rgba(212, 176, 106, 0.20);
  padding-top: 20px;
}
.eyebrow-logo {
  display: inline-block; width: 168px; height: auto;
}
.hero-title {
  font-family: var(--title-font);
  font-size: clamp(40px, 9vw, 62px);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.hero-cta { display: flex; flex-direction: column; align-items: center; gap: 18px; width: 100%; }
.hero-note {
  font-size: 14px; line-height: 1.5; max-width: 320px;
  /* 600, not 500: only 400/600/700 are shipped, so 500 would fall back to 400
     and look unchanged. Full --ink brightness so it holds up over a photo. */
  font-weight: 600;
  color: var(--ink); letter-spacing: 0.01em;
}
.screen-welcome .btn-big { width: min(340px, 100%); }

.host-card {
  display: flex; align-items: center; justify-content: center; gap: 15px;
}
.host-photo {
  width: 60px; height: 60px; border-radius: 50%; object-fit: cover;
  border: 2px solid rgba(243, 237, 224, 0.85);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}
.host-info { text-align: left; }
.host-name {
  font-family: var(--title-font);
  font-size: 21px; font-weight: 700; color: var(--ink); line-height: 1.2;
}
.host-tagline {
  margin-top: 4px; font-size: 11px; letter-spacing: 0.17em;
  text-transform: uppercase; color: rgba(243, 237, 224, 0.82);
}
.done-host { justify-content: center; margin-top: 36px; }

.privacy-note {
  margin: 2px 0 0; font-size: 12.5px; color: rgba(243, 237, 224, 0.82);
  letter-spacing: 0.02em;
}

/* Narrow phones (iPhone SE) */
@media (max-width: 350px) {
  .eyebrow-logo { width: 150px; }
  .hero-note { font-size: 13px; }
}

/* Short viewports (split-screen tablet, small phones): tighten the zones so
   the host card stays on screen without scrolling */
@media (max-height: 700px) {
  .welcome-top { padding-top: 10px; }
  .eyebrow-logo { width: 140px; }
  .welcome-hero { gap: 22px; }
  .hero-title { font-size: clamp(30px, 7vw, 44px); }
  .hero-cta { gap: 14px; }
  .welcome-foot { padding-top: 14px; }
}

.gear-btn {
  position: absolute; top: 6px; right: 0;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid transparent; background: none;
  color: rgba(243, 237, 224, 0.1); font-size: 19px;
  cursor: pointer; transition: color 0.2s ease;
}
.gear-btn:hover { color: var(--gold); }

/* ---------- buttons ---------- */
.btn-primary {
  font-family: var(--body-font);
  background: linear-gradient(135deg, #e9d09a, var(--gold) 60%, #b98f47);
  color: var(--navy-1);
  border: none; border-radius: 14px;
  font-weight: 700; font-size: 16px;
  padding: 15px 34px; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 6px 24px rgba(212, 176, 106, 0.25);
}
.btn-primary:active { transform: scale(0.97); }
.btn-primary:disabled { opacity: 0.45; cursor: default; box-shadow: none; }
.btn-big { font-size: 18px; padding: 18px 46px; border-radius: 16px; }

.btn-ghost {
  font-family: var(--body-font);
  background: none; border: var(--border); border-radius: 12px;
  color: var(--ink-muted); font-weight: 600; font-size: 14px;
  padding: 11px 20px; cursor: pointer; transition: all 0.2s ease;
}
.btn-ghost:hover { color: var(--gold); border-color: var(--gold-soft); }
.btn-danger { color: var(--danger); border-color: rgba(224, 122, 106, 0.35); }

/* ---------- survey ---------- */
.step-head { margin: 8px 0 26px; }
.step-eyebrow {
  font-size: 11.5px; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--gold); font-weight: 600; margin-bottom: 10px;
}
.step-title {
  font-family: var(--title-font);
  font-size: clamp(26px, 6vw, 36px);
  line-height: 1.18; font-weight: 700;
}
.step-sub { margin-top: 10px; font-size: 15px; color: var(--ink-muted); line-height: 1.5; }

.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-muted); margin-bottom: 7px; letter-spacing: 0.02em; }
.field label .req { color: var(--gold); }
.field input, .field select, .field textarea {
  width: 100%;
  font-family: var(--body-font);
  font-size: 16px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(243, 237, 224, 0.16);
  border-radius: 12px;
  padding: 14px 16px;
  outline: none;
  transition: border-color 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23d4b06a' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 42px;
}
.field select option { background: var(--navy-1); color: var(--ink); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--gold); }
.field input.invalid, .field select.invalid { border-color: var(--danger); }
.field-err { font-size: 12.5px; color: var(--danger); margin-top: 6px; display: none; }
.field-err.show { display: block; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 480px) { .grid-2 { grid-template-columns: 1fr; gap: 0; } }

/* choice cards (single-select) */
.choices { display: flex; flex-direction: column; gap: 12px; }
.choice {
  font-family: var(--body-font);
  text-align: left;
  background: var(--card);
  border: var(--border);
  border-radius: 14px;
  color: var(--ink);
  font-size: 16px; font-weight: 600;
  padding: 17px 20px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}
.choice:active { transform: scale(0.99); }
.choice.on {
  border-color: var(--gold);
  background: var(--gold-faint);
  color: var(--gold);
}
.choice small { display: block; font-weight: 500; font-size: 13px; color: var(--ink-muted); margin-top: 3px; }

/* chips (multi-select) */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  font-family: var(--body-font);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(243, 237, 224, 0.18);
  border-radius: 999px;
  color: var(--ink); font-size: 14.5px; font-weight: 600;
  /* min-height rather than padding maths: 44px holds whatever the font's
     metrics do, and step 3 is almost entirely chips. */
  min-height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 20px; cursor: pointer;
  transition: all 0.15s ease;
}
.chip.on { border-color: var(--gold); background: var(--gold-faint); color: var(--gold); }

/* stars */
.stars { display: flex; gap: 8px; }
.star {
  background: none; border: none; cursor: pointer;
  font-size: 38px; line-height: 1;
  color: rgba(243, 237, 224, 0.22);
  transition: transform 0.12s ease, color 0.12s ease;
  padding: 4px;
}
.star.on { color: var(--gold); }
.star:active { transform: scale(1.15); }

.q-block { margin-bottom: 30px; }
.q-label { font-size: 15.5px; font-weight: 600; margin-bottom: 13px; line-height: 1.4; }
.q-err { font-size: 12.5px; color: var(--danger); margin-top: 11px; display: none; }
.q-block.invalid .q-err { display: block; }
.q-block.invalid .chip { border-color: rgba(224, 122, 106, 0.5); }
.q-other-input { margin-top: 12px; display: none; }
.q-other-input.show { display: block; }

/* ---------- nav arrows ----------
   Pinned to the bottom of the viewport: step 3 is taller than a phone screen,
   and the submit arrow must never be the thing a visitor has to scroll to
   find. On steps that already fit, sticky changes nothing. */
.survey-nav {
  display: flex; justify-content: space-between; align-items: center;
  position: sticky;
  bottom: 0;
  z-index: 20;
  margin: auto -22px calc(-28px - env(safe-area-inset-bottom));
  padding: 18px 22px calc(18px + env(safe-area-inset-bottom));
  background: linear-gradient(
    to bottom,
    rgba(7, 18, 36, 0) 0%,
    rgba(7, 18, 36, 0.86) 22%,
    rgba(7, 18, 36, 0.98) 55%,
    rgba(7, 18, 36, 1) 100%
  );
}
.nav-arrow {
  width: 56px; height: 56px; border-radius: 50%;
  border: var(--border);
  background: var(--card);
  color: var(--ink); font-size: 22px;
  cursor: pointer; transition: all 0.15s ease;
  display: grid; place-items: center;
}
.nav-arrow:hover { border-color: var(--gold); color: var(--gold); }
.nav-arrow:active { transform: scale(0.94); }
.nav-arrow.primary {
  background: linear-gradient(135deg, #e9d09a, var(--gold) 60%, #b98f47);
  color: var(--navy-1); border: none;
  box-shadow: 0 6px 24px rgba(212, 176, 106, 0.25);
}
.nav-arrow[hidden] { visibility: hidden; display: grid; }

.progress-dots { display: flex; gap: 8px; }
.pdot { width: 8px; height: 8px; border-radius: 50%; background: rgba(243, 237, 224, 0.18); transition: background 0.2s ease; }
.pdot.on { background: var(--gold); }

/* ---------- confirmation ---------- */
.screen-done { justify-content: center; text-align: center; }
.done-check {
  width: 84px; height: 84px; margin: 0 auto 26px;
  border-radius: 50%; border: 2px solid var(--gold);
  display: grid; place-items: center;
  font-size: 38px; color: var(--gold);
  animation: pop 0.45s cubic-bezier(0.2, 1.4, 0.4, 1);
}
@keyframes pop { from { transform: scale(0.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.done-title { font-family: var(--title-font); font-size: clamp(30px, 7vw, 44px); font-weight: 700; margin-bottom: 14px; }
.done-sub { color: var(--ink-muted); font-size: 16px; line-height: 1.55; max-width: 380px; margin: 0 auto; }

/* ---------- PIN pad ---------- */
.screen-pin { justify-content: center; align-items: center; text-align: center; }
.pin-title { font-family: var(--title-font); font-size: 26px; font-weight: 700; margin-bottom: 6px; }
.pin-sub { font-size: 13.5px; color: var(--ink-muted); margin-bottom: 26px; }
.pin-dots { display: flex; gap: 14px; justify-content: center; margin-bottom: 30px; }
.pin-dot {
  width: 16px; height: 16px; border-radius: 50%;
  border: 1.5px solid rgba(243, 237, 224, 0.35); transition: all 0.15s ease;
}
.pin-dot.full { background: var(--gold); border-color: var(--gold); }
.pin-pad { display: grid; grid-template-columns: repeat(3, 76px); gap: 14px; justify-content: center; }
.pin-key {
  width: 76px; height: 76px; border-radius: 50%;
  border: var(--border); background: var(--card);
  color: var(--ink); font-size: 26px; font-weight: 600;
  font-family: var(--body-font);
  cursor: pointer; transition: all 0.12s ease;
}
.pin-key:active { transform: scale(0.93); background: var(--gold-faint); }
.pin-key.aux { font-size: 16px; color: var(--ink-muted); border-color: transparent; background: none; }
.pin-shake { animation: shake 0.4s ease; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-9px); } 50% { transform: translateX(9px); } 75% { transform: translateX(-5px); }
}

/* ---------- dashboard ---------- */
.dash { flex: 1; display: flex; flex-direction: column; }
.dash-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  padding: 6px 0 14px;
  border-bottom: 1px solid rgba(212, 176, 106, 0.18);
  margin-bottom: 8px;
}
.dash-brand { font-family: var(--title-font); font-size: 20px; font-weight: 700; }
.dash-brand small { display: block; font-family: var(--body-font); font-size: 10.5px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-muted); margin-top: 2px; }
.dash-tabs { display: flex; gap: 4px; width: 100%; overflow-x: auto; padding: 8px 0; }
.dash-tab {
  font-family: var(--body-font);
  padding: 9px 18px; border-radius: 999px;
  border: 1px solid transparent; background: none;
  color: var(--ink-muted); font-size: 13.5px; font-weight: 600;
  cursor: pointer; transition: all 0.2s ease; white-space: nowrap;
  position: relative;
}
.dash-tab.on { color: var(--gold); border-color: var(--gold-soft); background: var(--gold-faint); }
.tab-badge {
  display: inline-block; min-width: 18px; height: 18px; margin-left: 6px;
  border-radius: 999px; background: var(--gold); color: var(--navy-1);
  font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
  padding: 0 5px;
}

.sync-pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 600; color: var(--ink-muted);
  border: var(--border); border-radius: 999px; padding: 6px 13px;
}
.sync-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.sync-pill.pending .dot { background: var(--gold); animation: pulse 1.4s ease infinite; }
.sync-pill.offline .dot { background: var(--danger); }
@keyframes pulse { 50% { opacity: 0.35; } }

.card {
  background: var(--card);
  border: var(--border);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 14px;
}
.card-title { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; }

.lead-row { padding: 15px 0; border-bottom: 1px solid rgba(243, 237, 224, 0.08); }
.lead-row:last-child { border-bottom: none; }
.lead-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lead-name { font-weight: 700; font-size: 15.5px; display: flex; align-items: center; gap: 8px; }
.new-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); flex: none; }
.lead-row.read .new-dot { display: none; }
.lead-row.read .lead-name { color: var(--ink-muted); font-weight: 600; }
.badge {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px; border: 1px solid;
}
.badge-yes { color: #9fb8e8; border-color: rgba(159, 184, 232, 0.4); }
.badge-no { color: var(--gold); border-color: var(--gold-soft); }
.badge-browsing { color: #b8a9e0; border-color: rgba(184, 169, 224, 0.4); }
.badge-neighbor { color: var(--ok); border-color: rgba(126, 201, 143, 0.4); }
.lead-stars { color: var(--gold); font-size: 13px; letter-spacing: 2px; }
.lead-meta { font-size: 13px; color: var(--ink-muted); margin-top: 5px; display: flex; gap: 14px; flex-wrap: wrap; }
.lead-meta a { color: var(--ink-muted); }
.lead-detail { margin-top: 10px; font-size: 13.5px; line-height: 1.65; color: var(--ink-muted); display: none; }
.lead-row.open .lead-detail { display: block; }
.lead-detail b { color: var(--ink); font-weight: 600; }
.lead-actions { display: flex; gap: 8px; margin-top: 10px; }
.icon-btn {
  background: none; border: var(--border); border-radius: 9px;
  color: var(--ink-muted); font-size: 13px; font-weight: 600;
  font-family: var(--body-font);
  padding: 6px 12px; cursor: pointer; transition: all 0.15s ease;
}
.icon-btn:hover { color: var(--gold); border-color: var(--gold-soft); }
.icon-btn.danger:hover { color: var(--danger); border-color: rgba(224, 122, 106, 0.4); }

/* wraps so the buttons drop to their own line rather than squeezing the
   address to an ellipsis — a listing with a photo carries five of them */
.prop-row { display: flex; align-items: center; gap: 13px; padding: 12px 0; border-bottom: 1px solid rgba(243, 237, 224, 0.08); flex-wrap: wrap; }
.prop-row:last-child { border-bottom: none; }
.prop-thumb {
  width: 58px; height: 44px; border-radius: 9px; object-fit: cover; flex: none;
  background: var(--navy-2); border: 1px solid rgba(243, 237, 224, 0.12);
}
.prop-thumb.empty { display: grid; place-items: center; font-size: 18px; color: var(--ink-muted); }
.prop-main { flex: 1 1 150px; min-width: 0; }
.prop-addr { font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prop-sub { font-size: 12px; color: var(--ink-muted); margin-top: 2px; }
.prop-sub .today { color: var(--gold); font-weight: 700; }
.prop-sub .backdrop { color: var(--ok); font-weight: 700; letter-spacing: 0.04em; }
.prop-actions { display: flex; gap: 6px; flex: none; flex-wrap: wrap; justify-content: flex-end; margin-left: auto; }

.empty-hint { padding: 18px 0; text-align: center; font-size: 13.5px; color: var(--ink-muted); }
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-bottom: 14px; }
.stat-card { background: var(--card); border: var(--border); border-radius: 14px; padding: 16px; text-align: center; }
.stat-num { font-family: var(--title-font); font-size: 30px; font-weight: 700; color: var(--gold); }
.stat-lbl { font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted); margin-top: 4px; }

.settings-note { font-size: 12.5px; color: var(--ink-muted); line-height: 1.55; margin-top: 8px; }

/* Miniature of the visitor welcome screen, so the overlay slider can be
   judged by eye. Mirrors the real hero: logo top, title, button, value line. */
.bg-preview {
  position: relative; width: 172px; height: 300px;
  margin: 4px auto 0; border-radius: 18px; overflow: hidden;
  border: 1px solid rgba(243, 237, 224, 0.18);
  background: linear-gradient(168deg, var(--navy-1), var(--navy-0));
  box-shadow: 0 12px 30px -14px rgba(0, 0, 0, 0.8);
}
.bgp-photo { position: absolute; inset: 0; background-size: cover; background-position: center; }
.bgp-scrim { position: absolute; inset: 0; }
.bgp-ui {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 11px; padding: 40px 14px 18px; text-align: center;
}
.bgp-logo { position: absolute; top: 15px; left: 50%; transform: translateX(-50%); width: 74px; height: auto; }
.bgp-title {
  font-family: var(--title-font); font-size: 15px; line-height: 1.12;
  font-weight: 700; color: var(--ink); text-shadow: 0 2px 10px rgba(4, 10, 20, 0.8);
  white-space: nowrap; /* keep the two-line break the real hero has */
}
.bgp-btn {
  background: linear-gradient(135deg, #e9d09a, var(--gold) 60%, #b98f47);
  color: var(--navy-1); font-size: 10px; font-weight: 700;
  padding: 8px 20px; border-radius: 9px;
}
.bgp-note {
  font-size: 8.5px; color: rgba(243, 237, 224, 0.85); line-height: 1.4;
  text-shadow: 0 1px 8px rgba(4, 10, 20, 0.85);
}
.file-btn input { display: none; }
.seg { display: inline-flex; gap: 4px; border: var(--border); border-radius: 999px; padding: 3px; }
.seg-btn {
  font-family: var(--body-font);
  border: none; background: none; border-radius: 999px;
  color: var(--ink-muted); font-size: 12.5px; font-weight: 600;
  padding: 6px 14px; cursor: pointer;
}
.seg-btn.on { background: var(--gold-faint); color: var(--gold); }
input[type="range"] { accent-color: var(--gold); }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(26px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(20px);
  background: var(--navy-2); border: var(--border); border-radius: 12px;
  color: var(--ink); font-size: 14px; font-weight: 600;
  padding: 13px 22px; opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  max-width: min(90vw, 420px); text-align: center;
  z-index: 50;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- desktop ---------- */
@media (min-width: 900px) {
  .app { max-width: 760px; }
  .dash-header { flex-wrap: nowrap; }
  .dash-tabs { width: auto; flex: 1; padding: 0 16px; }
}
