/* ============================================================================
   SUBSCITY public site - design system
   Obsidian surface + architectural grid + cursor spotlight, glass bento tiles,
   tactile 3D game buttons. Fonts: Unbounded (display), Geist (UI),
   Geist Mono (data: house ids, coordinates, timers, counters).
   ========================================================================== */
:root {
  --bg: #08090E;
  --bg-raise: #0D1018;
  --surface: rgba(15, 18, 28, 0.75);
  --surface-2: rgba(255, 255, 255, 0.025);
  --well: rgba(5, 6, 10, 0.6);
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --txt: #E8EAF0;
  --muted: #8B91A3;
  --dim: #5B6173;

  --gold: #F59E0B;  --gold-hi: #FBBF24;  --gold-lo: #B45309;
  --emerald: #10B981; --emerald-hi: #34D399; --emerald-lo: #047857;
  --crimson: #EF4444; --crimson-hi: #F87171; --crimson-lo: #B91C1C;

  --f-display: 'Unbounded', 'Geist', system-ui, sans-serif;
  --f-body: 'Geist', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --f-mono: 'Geist Mono', 'JetBrains Mono', ui-monospace, 'SF Mono', Consolas, monospace;

  --r-tile: 16px; --r-ctl: 8px; --r-sm: 6px;
  --gap: 24px; --pad: 24px;

  /* driven by the spotlight script (viewport px); parked off-screen until the
     pointer moves so nothing glows on touch devices */
  --mouse-x: -1000px; --mouse-y: -1000px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg); color: var(--txt);
  font: 400 16px/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
::selection { background: rgba(245, 158, 11, .35); color: #fff; }
a { color: inherit; }
button { font-family: inherit; }
.mono { font-family: var(--f-mono); font-feature-settings: 'zero' 0; }
.hidden { display: none !important; }

/* ── icons (SVG sprite, Lucide-style strokes) ─────────────────────────────── */
.i { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor;
  stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.i.fill { fill: currentColor; stroke: none; }
.i.lg { width: 20px; height: 20px; }

/* ── cursor-reactive backdrop ─────────────────────────────────────────────── */
.bg-layer { position: fixed; inset: 0; pointer-events: none; z-index: -1; }
.bg-grid {
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 56px 56px; background-position: -1px -1px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 55%, transparent 100%);
          mask-image: linear-gradient(180deg, #000 0%, #000 55%, transparent 100%);
}
/* the same grid, lit gold, revealed only in a soft circle under the cursor */
.bg-grid-lit {
  background-image:
    linear-gradient(rgba(245,158,11,.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245,158,11,.22) 1px, transparent 1px);
  background-size: 56px 56px; background-position: -1px -1px;
  -webkit-mask-image: radial-gradient(320px circle at var(--mouse-x) var(--mouse-y), #000, transparent 70%);
          mask-image: radial-gradient(320px circle at var(--mouse-x) var(--mouse-y), #000, transparent 70%);
}
.bg-spot { background: radial-gradient(600px circle at var(--mouse-x) var(--mouse-y), rgba(245,158,11,.08), transparent 40%); }
/* faint horizon glow so the top of the page doesn't read as flat black */
.bg-horizon { background:
  radial-gradient(900px 420px at 50% -120px, rgba(245,158,11,.10), transparent 70%),
  radial-gradient(700px 380px at 85% 10%, rgba(16,185,129,.05), transparent 70%); }

/* ── top bar ──────────────────────────────────────────────────────────────── */
.topbar { position: sticky; top: 0; z-index: 30;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 9, 14, .72); backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%); }
.topbar-inner { max-width: 1280px; margin: 0 auto; padding: 12px var(--pad);
  display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.wordmark { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.wordmark .logo { width: 26px; height: 26px; border-radius: 6px; flex: none;
  background: #fff url('./favicon.ico') center / cover no-repeat;
  box-shadow: 0 0 0 1px rgba(255,255,255,.12), 0 0 18px -4px rgba(245,158,11,.6); }
.wordmark b { font: 700 16px/1 var(--f-display); letter-spacing: .06em; }
.wordmark .ver { font: 500 10.5px/1 var(--f-mono); color: var(--dim); letter-spacing: .06em;
  padding: 3px 6px; border: 1px solid var(--line); border-radius: 4px; }
.topnav { display: flex; align-items: center; gap: 4px; }
.topnav a { display: inline-flex; align-items: center; gap: 7px; text-decoration: none;
  color: var(--muted); font-size: 14.5px; font-weight: 500; padding: 8px 12px; border-radius: var(--r-sm);
  transition: color .15s, background .15s; }
.topnav a:hover { color: var(--txt); background: rgba(255,255,255,.05); }

/* ── page shell ───────────────────────────────────────────────────────────── */
.shell { max-width: 1280px; margin: 0 auto; padding: 0 var(--pad) 96px; }

/* ── hero ─────────────────────────────────────────────────────────────────── */
.hero { text-align: center; padding: 88px 0 56px; display: flex; flex-direction: column; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center;
  font: 500 12.5px/1 var(--f-mono); letter-spacing: .08em; color: var(--muted);
  padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line-2);
  background: rgba(15,18,28,.6); backdrop-filter: blur(8px); }
.pill b { color: var(--txt); font-weight: 600; }
.pill .sep { color: var(--dim); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--emerald); flex: none;
  box-shadow: 0 0 0 0 rgba(16,185,129,.6); animation: livePing 2s ease-out infinite; }
@keyframes livePing { 0% { box-shadow: 0 0 0 0 rgba(16,185,129,.55); } 80%, 100% { box-shadow: 0 0 0 7px rgba(16,185,129,0); } }
.hero-title { margin: 30px 0 0; font: 800 clamp(44px, 10.5vw, 132px)/.95 var(--f-display); letter-spacing: -0.04em;
  background: linear-gradient(180deg, #FFFFFF 20%, #9AA0B0 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { margin: 26px auto 0; max-width: 32em; color: var(--muted);
  font-size: clamp(17px, 1.9vw, 21px); line-height: 1.6; text-wrap: balance; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; margin-top: 36px; }
.hero-meta { margin-top: 24px; font: 500 12px/1 var(--f-mono); letter-spacing: .12em; color: var(--dim); }
/* optional looping city feed - stays hidden unless the video actually loads */
.hero-feed { position: relative; width: 100%; max-width: 920px; margin: 48px 0 0; aspect-ratio: 16 / 7;
  border-radius: var(--r-tile); overflow: hidden; border: 1px solid var(--line-2); background: var(--bg-raise); }
.hero-feed video { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .9; }
.hero-feed::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent 55%, rgba(8,9,14,.75)); }
.feed-tag { position: absolute; z-index: 1; top: 14px; font: 500 10.5px/1 var(--f-mono); letter-spacing: .1em;
  color: var(--txt); padding: 6px 9px; border-radius: 4px; background: rgba(8,9,14,.6); border: 1px solid var(--line-2); }
.feed-tag.l { left: 14px; } .feed-tag.r { right: 14px; color: var(--muted); }

/* ── tactile 3D game buttons ──────────────────────────────────────────────── */
.btn-3d { --face: var(--gold); --face-hi: var(--gold-hi); --lip: var(--gold-lo); --ink: #1C1204; --glow: rgba(245,158,11,.35);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 22px; border-radius: 8px; cursor: pointer; text-decoration: none; user-select: none;
  font: 600 15px/1 var(--f-display); letter-spacing: -0.01em; color: var(--ink);
  background: linear-gradient(180deg, var(--face-hi) 0%, var(--face) 55%);
  border: 1px solid rgba(0,0,0,.28); border-top-color: rgba(255,255,255,.35);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 4px 0 var(--lip), 0 14px 28px -10px var(--glow);
  transform: translateY(0); transition: transform .09s ease, box-shadow .09s ease, filter .15s ease; }
.btn-3d:hover { filter: brightness(1.06); }
.btn-3d:active { transform: translateY(4px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 0 0 var(--lip), 0 6px 14px -8px var(--glow); }
.btn-3d:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
.btn-3d:disabled { cursor: default; filter: saturate(.4) brightness(.8); transform: translateY(2px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 2px 0 var(--lip); }
.btn-3d .tag { display: inline-flex; align-items: center; gap: 5px; font: 600 11px/1 var(--f-mono); letter-spacing: .08em; padding: 4px 6px; border-radius: 4px;
  background: rgba(0,0,0,.16); color: inherit; opacity: .8; }
.btn-3d.emerald { --face: var(--emerald); --face-hi: var(--emerald-hi); --lip: var(--emerald-lo); --ink: #02140D; --glow: rgba(16,185,129,.3); }
.btn-3d.crimson { --face: var(--crimson); --face-hi: var(--crimson-hi); --lip: var(--crimson-lo); --ink: #fff; --glow: rgba(239,68,68,.3); }
.btn-3d.crimson { text-shadow: 0 1px 0 rgba(0,0,0,.2); }
.btn-3d.lg { padding: 20px 28px; font-size: 16.5px; }
.btn-3d.sm { padding: 10px 14px; font-size: 13px; gap: 7px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 3px 0 var(--lip), 0 8px 18px -10px var(--glow); }
.btn-3d.sm:active { transform: translateY(3px); }
.btn-3d.block { width: 100%; }

.btn-ghost { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 18px; border-radius: 8px; cursor: pointer;
  font: 500 15px/1 var(--f-body); color: var(--txt);
  background: rgba(255,255,255,.03); border: 1px solid var(--line-2);
  transition: background .15s, border-color .15s, color .15s; }
.btn-ghost:hover { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.24); }
.btn-ghost.sm { padding: 9px 13px; font-size: 13.5px; border-radius: var(--r-sm); }
.btn-link { background: none; border: 0; cursor: pointer; color: var(--muted);
  font: 500 14px/1 var(--f-body); padding: 10px 4px; transition: color .15s; }
.btn-link:hover { color: var(--txt); }
.btn-icon { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: var(--r-sm);
  background: transparent; border: 1px solid var(--line); color: var(--muted); cursor: pointer;
  transition: color .15s, border-color .15s, background .15s; }
.btn-icon:hover { color: var(--txt); border-color: var(--line-2); background: rgba(255,255,255,.05); }
.btn-icon.danger:hover { color: var(--crimson-hi); border-color: rgba(239,68,68,.4); background: rgba(239,68,68,.08); }

/* ── glass bento tiles (border + wash glow under the cursor) ──────────────── */
.tile { position: relative; border-radius: var(--r-tile); padding: var(--pad);
  border: 1px solid var(--line);
  background:
    radial-gradient(600px circle at var(--tx, -999px) var(--ty, -999px), rgba(245,158,11,.045), transparent 40%),
    var(--surface);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 24px 48px -24px rgba(0,0,0,.6); }
.tile::before { content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: radial-gradient(380px circle at var(--tx, -999px) var(--ty, -999px), rgba(245,158,11,.55), rgba(245,158,11,.08) 35%, transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; }

.tile-head { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: -4px 0 18px; min-height: 32px; }
.tile-title { display: flex; align-items: center; gap: 10px; min-width: 0;
  font: 600 14px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--txt); }
.tile-title .i { color: var(--muted); }
.tile-sub { color: var(--muted); font-size: 15px; margin: -8px 0 18px; }

/* monospace status badge, e.g. [ LIVE MAP ] */
.badge { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  font: 500 11.5px/1 var(--f-mono); letter-spacing: .07em; text-transform: uppercase;
  color: var(--muted); padding: 6px 9px; border-radius: 4px; border: 1px solid var(--line-2); background: rgba(255,255,255,.02); }
.badge.gold { color: var(--gold-hi); border-color: rgba(245,158,11,.35); background: rgba(245,158,11,.08); }
.badge.emerald { color: var(--emerald-hi); border-color: rgba(16,185,129,.35); background: rgba(16,185,129,.08); }
.badge.crimson { color: var(--crimson-hi); border-color: rgba(239,68,68,.35); background: rgba(239,68,68,.08); }
.badge .live-dot { width: 6px; height: 6px; }

/* ── auth (sign-in) card ──────────────────────────────────────────────────── */
.auth { max-width: 460px; margin: 0 auto; }
body.is-home .auth { display: none; }
.auth h2 { font: 700 30px/1.15 var(--f-display); letter-spacing: -0.035em; margin: 0 0 8px; }
.auth p.sub { color: var(--muted); margin: 0 0 22px; font-size: 16px; line-height: 1.6; }
.auth p.sub strong { color: var(--txt); font-family: var(--f-mono); font-weight: 500; font-size: 13.5px; }
.stepper { display: flex; gap: 6px; flex: 1; max-width: 120px; }
.step-dot { flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,.1); transition: background .3s, box-shadow .3s; }
.step-dot.done { background: var(--emerald); }
.step-dot.active { background: var(--gold); box-shadow: 0 0 10px rgba(245,158,11,.6); }
.auth section { animation: rise .45s cubic-bezier(.2,.7,.2,1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.field-label { display: block; margin: 18px 0 8px;
  font: 500 12px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.input, .auth input[type=email], .auth input[type=text] {
  width: 100%; background: var(--well); border: 1px solid var(--line-2); color: var(--txt);
  border-radius: var(--r-ctl); padding: 15px 16px; font: 400 16.5px/1.2 var(--f-body); outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s; }
.input::placeholder, .auth input::placeholder { color: var(--dim); }
.input:focus, .auth input:focus { border-color: rgba(245,158,11,.6); box-shadow: 0 0 0 3px rgba(245,158,11,.14); background: rgba(5,6,10,.85); }
.auth input#code { font: 600 30px/1 var(--f-mono); letter-spacing: .5em; text-align: center; padding: 16px 0 16px .5em; }
.auth .btn-3d.block { margin-top: 24px; }
.auth .btn-link { display: flex; align-items: center; gap: 6px; margin: 12px auto 0; }
.auth-foot { margin: 22px 0 0; padding-top: 16px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font: 500 11.5px/1.4 var(--f-mono); letter-spacing: .08em; color: var(--dim); text-transform: uppercase; }

/* ── bento grid ───────────────────────────────────────────────────────────── */
.section-label { display: flex; align-items: center; gap: 14px; margin: 0 0 18px;
  font: 500 12.5px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.section-label::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); }
.bento + .section-label, .bento + .notify, .notify + .section-label { margin-top: 48px; }
.span-5 { grid-column: span 5; } .span-7 { grid-column: span 7; } .span-12 { grid-column: span 12; }
.home-greeting { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 0 0 24px; }
.home-greeting h2 { margin: 0; font: 800 clamp(30px, 4.6vw, 48px)/1.05 var(--f-display); letter-spacing: -0.04em; }
.home-greeting p { margin: 10px 0 0; color: var(--muted); font-size: 17px; }

/* ── plot / customizer tile ───────────────────────────────────────────────── */
.plot { display: flex; flex-direction: column; }
.house-id { font: 700 22px/1 var(--f-mono); color: var(--gold-hi); letter-spacing: -0.02em;
  padding: 7px 11px; border-radius: var(--r-sm); background: rgba(245,158,11,.1); border: 1px solid rgba(245,158,11,.35);
  text-shadow: 0 0 16px rgba(245,158,11,.55); box-shadow: 0 0 24px -8px rgba(245,158,11,.5); }
.plot-coords { font: 500 12.5px/1 var(--f-mono); color: var(--muted); letter-spacing: .06em; white-space: nowrap; }
.viewer-frame { position: relative; border-radius: 12px; padding: 1px;
  background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.03)); }
#viewer { position: relative; width: 100%; height: 320px; border-radius: 11px; overflow: hidden; touch-action: none;
  background:
    radial-gradient(110% 80% at 50% 0%, rgba(245,158,11,.10), transparent 60%),
    linear-gradient(180deg, #121624 0%, #090B12 100%);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.6), inset 0 0 60px rgba(0,0,0,.5); }
#viewer canvas { display: block; }
.viewer-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin: 12px 0 0; padding: 10px 12px; border-radius: var(--r-ctl); background: var(--surface-2); border: 1px solid var(--line);
  font-size: 14.5px; color: var(--muted); }
.viewer-bar .how { display: flex; align-items: center; gap: 8px; }
.viewer-bar .keys { font: 500 11.5px/1 var(--f-mono); letter-spacing: .08em; color: var(--dim); }

.customizer { margin-top: 20px; display: flex; flex-direction: column; gap: 16px; }
.cust-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cust-row .k { font: 500 12px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
#sel-label { margin: 0; font: 500 15.5px/1 var(--f-body); color: var(--muted); transition: color .2s; }
#sel-label.active { color: var(--gold-hi); }
.sel-group { display: flex; flex-direction: column; gap: 6px; }

.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(30px, 1fr)); gap: 10px; }
.swatch { aspect-ratio: 1; width: 100%; max-width: 36px; border-radius: 9px; padding: 0; cursor: pointer;
  background: var(--c); border: 1px solid rgba(255,255,255,.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), inset 0 -2px 0 rgba(0,0,0,.2);
  transition: transform .12s, box-shadow .12s; }
.swatch:hover { transform: translateY(-2px); }
.swatch.active { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--gold), inset 0 1px 0 rgba(255,255,255,.25); }
/* native colour input styled as a "custom" swatch */
.custom-color { display: inline-flex; align-items: center; gap: 8px; font: 500 12px/1 var(--f-mono);
  letter-spacing: .08em; color: var(--muted); text-transform: uppercase; }
input[type=color] { -webkit-appearance: none; appearance: none; width: 36px; height: 36px; padding: 3px; cursor: pointer;
  border-radius: 9px; border: 1px dashed var(--line-2); background: var(--well); }
input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
input[type=color]::-webkit-color-swatch { border: 0; border-radius: 6px; }
input[type=color]::-moz-color-swatch { border: 0; border-radius: 6px; }
input[type=color]:disabled { opacity: .35; cursor: not-allowed; }

.switch { position: relative; display: inline-block; width: 40px; height: 22px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; inset: 0; cursor: pointer; background: rgba(255,255,255,.1);
  border: 1px solid var(--line-2); border-radius: 22px; transition: .2s; }
.switch .slider::before { content: ''; position: absolute; width: 16px; height: 16px; left: 2px; top: 2px;
  background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.4); }
.switch input:checked + .slider { background: var(--gold); border-color: var(--gold-lo); }
.switch input:checked + .slider::before { transform: translateX(18px); }
.switch input:focus-visible + .slider { outline: 2px solid #fff; outline-offset: 2px; }
.toggle-text { font-size: 15.5px; color: var(--txt); }

.actions { display: grid; grid-template-columns: 1fr auto; gap: 12px; margin-top: 4px; }

/* ── city radar tile ──────────────────────────────────────────────────────── */
.radar { display: flex; flex-direction: column; }
.radar-frame { position: relative; flex: 1; min-height: 440px; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--line-2); background: #0A1410; }
#citymap { position: absolute; inset: 0; }
/* canvas is taken out of flow so it can never grow its own container (resize feedback loop) */
.citymap-canvas { position: absolute; inset: 0; display: block; cursor: grab; touch-action: none; }
.vote-map, .poll-pickmap { position: relative; }
.citymap-canvas:active { cursor: grabbing; }
.map-empty { color: var(--muted); font-size: 13px; text-align: center; padding: 48px 12px; }
/* blueprint overlay: corner brackets + faint crosshair, never blocks the map */
.radar-hud { position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(rgba(255,255,255,.07), rgba(255,255,255,.07)) 50% 0 / 1px 100% no-repeat,
    linear-gradient(rgba(255,255,255,.07), rgba(255,255,255,.07)) 0 50% / 100% 1px no-repeat;
  box-shadow: inset 0 0 80px rgba(0,0,0,.45); }
.radar-hud .corner { position: absolute; width: 18px; height: 18px; border: 2px solid rgba(245,158,11,.75); }
.radar-hud .tl { top: 10px; left: 10px; border-right: 0; border-bottom: 0; }
.radar-hud .tr { top: 10px; right: 10px; border-left: 0; border-bottom: 0; }
.radar-hud .bl { bottom: 10px; left: 10px; border-right: 0; border-top: 0; }
.radar-hud .br { bottom: 10px; right: 10px; border-left: 0; border-top: 0; }
.radar-pills { position: absolute; left: 14px; right: 14px; bottom: 14px; display: flex; gap: 8px; flex-wrap: wrap;
  justify-content: space-between; pointer-events: none; }
.radar-pills .grp { display: flex; gap: 6px; flex-wrap: wrap; }
.hud-pill { display: inline-flex; align-items: center; gap: 6px; font: 500 11.5px/1 var(--f-mono); letter-spacing: .08em;
  color: var(--txt); padding: 6px 8px; border-radius: 4px; background: rgba(8,9,14,.78);
  border: 1px solid var(--line-2); backdrop-filter: blur(6px); text-transform: uppercase; }
.hud-pill .sw { width: 8px; height: 8px; border-radius: 2px; }

/* ── notify banner ────────────────────────────────────────────────────────── */
.notify { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 18px var(--pad); }
.notify-ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; flex: none;
  color: var(--gold-hi); background: rgba(245,158,11,.1); border: 1px solid rgba(245,158,11,.3); }
.notify-text { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 3px; }
.notify-text strong { font: 600 16px/1.35 var(--f-display); letter-spacing: -0.02em; }
.notify-text span { font-size: 14.5px; color: var(--muted); }
.notify-actions { display: flex; align-items: center; gap: 10px; }

/* ── community row ────────────────────────────────────────────────────────── */
.community .vote { grid-column: span 7; }
.community .chat { grid-column: span 5; }
.community .history { grid-column: span 12; }
/* re-flow when sections are empty (no active poll / no videos yet) */
.community:has(#vote-panel.hidden) .history { grid-column: span 7; }
.community:has(#history-panel.hidden):has(#vote-panel.hidden) .chat { grid-column: 3 / span 8; }

/* street-naming poll */
.vote-title-wrap { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.vote-headline { font: 700 22px/1.2 var(--f-display); letter-spacing: -0.035em; text-transform: none; color: var(--txt); }
.vote-timer { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  font: 500 13.5px/1 var(--f-mono); color: var(--gold-hi); letter-spacing: .04em;
  padding: 8px 11px; border-radius: var(--r-sm); background: rgba(245,158,11,.08); border: 1px solid rgba(245,158,11,.3); }
.vote-timer.closed { color: var(--muted); background: transparent; border-color: var(--line-2); }
.vote { display: flex; flex-direction: column; }
.vote-body { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.vote-map-col { display: flex; flex-direction: column; }
.vote-map { flex: 1; min-height: 260px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line-2); background: #0A1410; }
.vote-hint { color: var(--muted); font-size: 14.5px; margin: 0 0 12px; }
.vote-options { display: flex; flex-direction: column; gap: 8px; counter-reset: opt; }
.vote-opt { counter-increment: opt; position: relative; display: flex; align-items: center; gap: 12px; width: 100%;
  text-align: left; cursor: pointer; padding: 12px 14px; border-radius: var(--r-ctl);
  font: 500 16px/1.25 var(--f-body); color: var(--txt);
  background: var(--surface-2); border: 1px solid var(--line-2);
  transition: background .15s, border-color .15s, transform .08s; }
.vote-opt::before { content: counter(opt, upper-alpha); display: grid; place-items: center; flex: none;
  width: 26px; height: 26px; border-radius: 5px; font: 600 12px/1 var(--f-mono);
  color: var(--muted); border: 1px solid var(--line-2); transition: color .15s, border-color .15s; }
.vote-opt:hover { background: rgba(245,158,11,.07); border-color: rgba(245,158,11,.45); }
.vote-opt:hover::before { color: var(--gold-hi); border-color: rgba(245,158,11,.5); }
.vote-opt:active { transform: translateY(1px); }
.vote-empty { color: var(--muted); font-size: 13px; padding: 14px; text-align: center;
  border: 1px dashed var(--line-2); border-radius: var(--r-ctl); }
.vote-results { display: flex; flex-direction: column; gap: 14px; }
.vres { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 7px 12px; }
.vres-lbl { display: flex; align-items: center; gap: 8px; font-size: 15.5px; font-weight: 500; }
.vres-pct { grid-row: 1 / 3; grid-column: 2; font: 600 17px/1 var(--f-mono); min-width: 48px; text-align: right; }
.vres-bar { height: 8px; border-radius: 2px; background: rgba(255,255,255,.06); overflow: hidden; }
.vres-fill { height: 100%; border-radius: 2px; background: linear-gradient(90deg, var(--gold-lo), var(--gold));
  transition: width .6s cubic-bezier(.2,.7,.2,1); }
.vres.mine .vres-lbl { color: var(--gold-hi); }
.vres.mine .vres-fill { background: linear-gradient(90deg, var(--emerald-lo), var(--emerald)); }
.vres-total { font: 500 12px/1 var(--f-mono); color: var(--dim); letter-spacing: .08em; text-transform: uppercase; margin-top: 2px; }
.vote-err { color: var(--crimson-hi); font-size: 12.5px; min-height: 16px; margin-top: 10px; }
.vote-winner { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 11px 14px; border-radius: var(--r-ctl);
  font-size: 13.5px; font-weight: 500; color: var(--txt);
  background: rgba(16,185,129,.08); border: 1px solid rgba(16,185,129,.35); }
.vote-winner .i { color: var(--emerald-hi); }

/* city chat - compact feed */
.chat { display: flex; flex-direction: column; min-height: 460px; }
.chat-messages { flex: 1; min-height: 280px; max-height: 420px; overflow-y: auto; display: flex; flex-direction: column;
  margin: 0 calc(var(--pad) * -1); padding: 4px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: rgba(5,6,10,.35); scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.12) transparent; }
.chat-messages::-webkit-scrollbar { width: 6px; }
.chat-messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 6px; }
.chat-msg { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 7px var(--pad);
  animation: msgIn .25s ease both; transition: background .12s; }
.chat-msg:hover { background: rgba(255,255,255,.025); }
@keyframes msgIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.cm-tag { display: flex; align-items: baseline; gap: 8px; padding-right: 40px; }
.cm-name { font-weight: 600; font-size: 15px; color: var(--txt); }
.cm-house { font: 500 12px/1 var(--f-mono); color: var(--muted); padding: 2px 5px; border-radius: 3px; background: rgba(255,255,255,.05); }
.cm-time { font: 400 11.5px/1 var(--f-mono); color: var(--dim); }
.chat-msg.me .cm-name { color: var(--gold-hi); }
.chat-msg.me .cm-house { color: var(--gold-hi); background: rgba(245,158,11,.1); }
.cm-body { font-size: 15.5px; line-height: 1.5; color: #C9CDD8; word-break: break-word; }
.chat-empty { color: var(--muted); font-size: 13px; text-align: center; margin: auto; }
.cm-report { position: absolute; top: 6px; right: calc(var(--pad) - 6px); display: grid; place-items: center;
  width: 26px; height: 26px; border-radius: 5px; border: 0; background: none; color: var(--dim); cursor: pointer;
  opacity: 0; transition: opacity .12s, color .12s, background .12s; }
.chat-msg:hover .cm-report, .cm-report:focus-visible { opacity: 1; }
.cm-report:hover { color: var(--crimson-hi); background: rgba(239,68,68,.1); }
.cm-mod { display: flex; gap: 4px; margin-top: 4px; opacity: .5; transition: opacity .12s; }
.chat-msg:hover .cm-mod { opacity: 1; }
.cm-mod-btn { display: inline-flex; align-items: center; gap: 5px; padding: 3px 7px; border-radius: 4px; cursor: pointer;
  font: 500 10.5px/1.4 var(--f-mono); letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted); background: rgba(239,68,68,.06); border: 1px solid rgba(239,68,68,.22); transition: color .12s, background .12s; }
.cm-mod-btn .i { width: 12px; height: 12px; }
.cm-mod-btn:hover { color: var(--crimson-hi); background: rgba(239,68,68,.16); }
.chat-input-row { display: flex; gap: 8px; margin-top: 16px; padding: 4px; border-radius: 10px;
  background: var(--well); border: 1px solid var(--line-2); transition: border-color .15s, box-shadow .15s; }
.chat-input-row:focus-within { border-color: rgba(245,158,11,.5); box-shadow: 0 0 0 3px rgba(245,158,11,.12); }
.chat-input-row input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; color: var(--txt);
  font: 400 16px/1.2 var(--f-body); padding: 11px 10px; }
.chat-input-row input::placeholder { color: var(--dim); }
.chat-err { color: var(--muted); font-size: 13.5px; min-height: 16px; margin-top: 10px; }

/* Subscity History - episode carousel */
.history { overflow: hidden; }
.carousel-nav { display: flex; gap: 6px; }
.history-grid { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 300px); gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 2px; padding: 2px 2px 14px;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.12) transparent; }
.history-grid::-webkit-scrollbar { height: 6px; }
.history-grid::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 6px; }
.hist-card { scroll-snap-align: start; display: flex; flex-direction: column; text-decoration: none; color: var(--txt);
  border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2);
  transition: border-color .15s, transform .15s; }
.hist-card:hover { border-color: rgba(245,158,11,.45); transform: translateY(-2px); }
.hist-card:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.hist-thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #000; }
.hist-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .45s cubic-bezier(.2,.7,.2,1), opacity .2s; opacity: .9; }
.hist-card:hover .hist-thumb img { transform: scale(1.06); opacity: 1; }
.hist-ep { position: absolute; top: 10px; left: 10px; font: 600 11.5px/1 var(--f-mono); letter-spacing: .08em;
  color: #1C1204; background: var(--gold); padding: 5px 7px; border-radius: 4px; }
.hist-play { position: absolute; right: 10px; bottom: 10px; display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 50%; color: #fff; background: rgba(8,9,14,.7);
  border: 1px solid rgba(255,255,255,.25); backdrop-filter: blur(6px); transition: background .15s, transform .15s; }
.hist-play .i { width: 13px; height: 13px; margin-left: 2px; }
.hist-card:hover .hist-play { background: var(--crimson); border-color: transparent; transform: scale(1.08); }
.hist-title { font-size: 15px; font-weight: 500; padding: 12px 14px 14px; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ── home footer (subscribe / sign out) ───────────────────────────────────── */
.home-foot { margin-top: 48px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding-top: 24px; border-top: 1px solid var(--line); }
.home-foot .grp { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ── admin drawer (only ever un-hidden for is_admin accounts) ─────────────── */
.admin-drawer { margin-top: 48px; border-radius: var(--r-tile); border: 1px solid rgba(239,68,68,.25);
  background: rgba(20, 10, 14, .6); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.admin-drawer > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 16px var(--pad); user-select: none; }
.admin-drawer > summary::-webkit-details-marker { display: none; }
.admin-drawer > summary .tile-title .i { color: var(--crimson-hi); }
.admin-drawer > summary .chev { transition: transform .2s; color: var(--muted); }
.admin-drawer[open] > summary .chev { transform: rotate(180deg); }
.admin-drawer[open] > summary { border-bottom: 1px solid var(--line); }
.admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: var(--pad); }
.admin-card { border: 1px solid var(--line); border-radius: 12px; padding: 18px; background: rgba(5,6,10,.45);
  display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.admin-card.wide { grid-column: 1 / -1; }
.admin-head-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.admin-subhead { display: flex; align-items: center; gap: 8px; font: 600 11.5px/1 var(--f-mono); letter-spacing: .1em;
  text-transform: uppercase; color: var(--txt); }
.admin-subhead .i { color: var(--muted); }
.admin-reports { display: flex; flex-direction: column; gap: 10px; max-height: 340px; overflow-y: auto; }
.admin-empty { color: var(--muted); font-size: 13px; text-align: center; padding: 18px; }
.admin-report { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: rgba(255,255,255,.02); }
.ar-meta { font: 400 11.5px/1.4 var(--f-mono); color: var(--muted); }
.ar-body { font-size: 13.5px; margin: 6px 0; word-break: break-word; }
.ar-reason { font-size: 12.5px; color: var(--gold-hi); margin-bottom: 6px; }
.ar-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.admin-btn, .admin-refresh { display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  padding: 7px 11px; border-radius: var(--r-sm); font: 500 12px/1 var(--f-body); color: var(--txt);
  background: rgba(255,255,255,.04); border: 1px solid var(--line-2); transition: background .15s, border-color .15s; }
.admin-btn:hover, .admin-refresh:hover { background: rgba(255,255,255,.09); }
.admin-btn:disabled { opacity: .55; cursor: default; }
.admin-btn .i, .admin-refresh .i { width: 13px; height: 13px; }
.ar-mute { color: var(--gold-hi); border-color: rgba(245,158,11,.35); }
.ar-ban { color: var(--crimson-hi); border-color: rgba(239,68,68,.35); }
.ar-unmute { color: var(--emerald-hi); border-color: rgba(16,185,129,.35); }
.ar-done { color: var(--muted); }
.admin-poll { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.admin-poll > * { max-width: 100%; }
#poll-creator { width: 100%; display: flex; flex-direction: column; gap: 8px; }
#poll-creator.hidden { display: none !important; }
.poll-pickmap { width: 100%; height: 280px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line-2); background: #0A1410; }
.poll-pickhint { color: var(--muted); font-size: 12px; margin: 0; }
#poll-title, #poll-opts, #vid-url, #vid-title { width: 100%; background: var(--well); border: 1px solid var(--line-2); color: var(--txt);
  border-radius: var(--r-ctl); padding: 10px 12px; font: 400 14px/1.4 var(--f-body); outline: none; }
#poll-title:focus, #poll-opts:focus, #vid-url:focus, #vid-title:focus { border-color: rgba(245,158,11,.6); }
#poll-opts { resize: vertical; }
.poll-actions { display: flex; align-items: center; gap: 10px; width: 100%; flex-wrap: wrap; }
.poll-msg { font-size: 12px; color: var(--muted); }
.vid-list { width: 100%; display: flex; flex-direction: column; gap: 6px; max-height: 240px; overflow-y: auto; }
.vid-row { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted);
  background: rgba(255,255,255,.03); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 6px 6px 6px 10px; }
.vid-row b { color: var(--txt); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.vid-del { display: grid; place-items: center; width: 24px; height: 24px; background: none; border: 0; border-radius: 4px;
  color: var(--muted); cursor: pointer; }
.vid-del:hover { color: var(--crimson-hi); background: rgba(239,68,68,.1); }
.vid-del .i { width: 13px; height: 13px; }
/* analytics */
.an-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; width: 100%; }
.an-tile { background: rgba(255,255,255,.025); border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.an-tile .n { font: 600 20px/1.1 var(--f-mono); color: var(--gold-hi); letter-spacing: -0.02em; }
.an-tile .l { font: 500 10px/1.3 var(--f-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-top: 6px; }
.an-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; width: 100%; }
.an-chart-label { font: 500 10.5px/1 var(--f-mono); color: var(--muted); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 8px; }
.an-chart { width: 100%; height: 72px; display: block; border-radius: 6px; background: rgba(255,255,255,.025); border: 1px solid var(--line); }
.an-locales { display: flex; flex-wrap: wrap; gap: 6px; }
.an-locale-chip { font: 400 11px/1 var(--f-mono); color: var(--txt); background: rgba(255,255,255,.03);
  border: 1px solid var(--line-2); border-radius: 4px; padding: 5px 7px; white-space: nowrap; }
.an-locale-chip b { color: var(--gold-hi); font-weight: 600; }
.an-users-head { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.an-table-wrap { width: 100%; max-height: 280px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.an-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.an-table th { position: sticky; top: 0; text-align: left; background: #120D12; color: var(--muted);
  font: 500 10.5px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; padding: 9px 10px; border-bottom: 1px solid var(--line-2); }
.an-table td { padding: 7px 10px; border-bottom: 1px solid var(--line); color: var(--txt); white-space: nowrap; }
.an-table tr:last-child td { border-bottom: none; }
.an-table td.an-yes { color: var(--emerald-hi); } .an-table td.an-no { color: var(--dim); }

/* ── status toast ─────────────────────────────────────────────────────────── */
.status { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 40;
  transform: translateX(-50%); max-width: min(560px, calc(100vw - 32px)); width: max-content;
  padding: 11px 16px 11px 14px; border-radius: 10px; display: flex; align-items: center; gap: 10px;
  font-size: 15px; font-weight: 500; color: var(--txt);
  background: rgba(15,18,28,.92); border: 1px solid var(--line-2); backdrop-filter: blur(12px);
  box-shadow: 0 18px 40px -12px rgba(0,0,0,.7); animation: toastIn .25s cubic-bezier(.2,.7,.2,1) both; }
.status:empty { display: none; }
.status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--muted); }
.status.ok::before { background: var(--emerald); box-shadow: 0 0 10px var(--emerald); }
.status.err { border-color: rgba(239,68,68,.4); }
.status.err::before { background: var(--crimson); box-shadow: 0 0 10px var(--crimson); }
.status.busy::before { background: var(--gold); animation: blink 1s ease-in-out infinite; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes blink { 50% { opacity: .3; } }

.site-foot { margin-top: 72px; text-align: center; font: 500 12px/1.6 var(--f-mono); letter-spacing: .14em;
  text-transform: uppercase; color: var(--dim); }

/* ── responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .community .vote, .community .chat, .community .history,
  .community:has(#vote-panel.hidden) .history { grid-column: span 12; }
  .community:has(#history-panel.hidden):has(#vote-panel.hidden) .chat { grid-column: span 12; }
}
@media (max-width: 960px) {
  .span-5, .span-7 { grid-column: span 12; }
  .radar-frame { min-height: 380px; }
  .admin-grid { grid-template-columns: 1fr; }
  .an-row { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  :root { --gap: 16px; --pad: 16px; }
  .topnav a span { display: none; }
  .hero { padding: 56px 0 40px; }
  .hero-actions { flex-direction: column; align-self: stretch; }
  .hero-actions .btn-3d { width: 100%; }
  .vote-body { grid-template-columns: 1fr; }
  #viewer { height: 280px; }
  .radar-frame { min-height: 340px; }
  .chat-messages { max-height: 360px; }
  .actions { grid-template-columns: 1fr 1fr; }
  .pill { font-size: 10.5px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}

/* ============================================================================
   v2 flourishes: isometric hero diorama, live stats, radar controls,
   locked game launchers, scroll reveals
   ========================================================================== */
/* hero title sheen - a slow gold glint travelling across the letters */
.hero-title { position: relative; }
.hero-title::after { content: attr(data-text); position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent 35%, rgba(251,191,36,.9) 50%, transparent 65%) -150% 0 / 60% 100% no-repeat;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: glint 7s cubic-bezier(.6,0,.3,1) 1.2s infinite; }
@keyframes glint { 0% { background-position: -150% 0; } 35%, 100% { background-position: 250% 0; } }

/* isometric low-poly city diorama (generated by fx.js) */
.diorama { position: relative; width: 100%; max-width: 1040px; margin: 56px auto 0; aspect-ratio: 1040 / 420;
  perspective: 1400px; }
.diorama svg { width: 100%; height: 100%; display: block; overflow: visible;
  transform: rotateX(calc(var(--py, 0) * -5deg)) rotateY(calc(var(--px, 0) * 7deg));
  transition: transform .25s ease-out; }
.diorama::after { content: ''; position: absolute; inset: auto 0 -2px 0; height: 38%; pointer-events: none;
  background: linear-gradient(180deg, transparent, var(--bg)); }
.dio-b { animation: dioRise .9s cubic-bezier(.2,.9,.25,1.15) both; }
@keyframes dioRise { from { opacity: 0; transform: translateY(-46px); } to { opacity: 1; transform: none; } }
.dio-pin { animation: pinFloat 2.6s ease-in-out infinite; }
@keyframes pinFloat { 50% { transform: translateY(-5px); } }
.dio-callout { font: 600 11px var(--f-mono); letter-spacing: .06em; fill: #1C1204; }

/* live city stats band */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 8px auto 72px; max-width: 1040px;
  border: 1px solid var(--line); border-radius: var(--r-tile); overflow: hidden;
  background: rgba(15,18,28,.55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.stat { padding: 22px 24px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.stat:first-child { border-left: 0; }
.stat .n { font: 700 clamp(22px, 2.6vw, 30px)/1 var(--f-display); letter-spacing: -0.04em; color: var(--txt);
  font-variant-numeric: tabular-nums; }
.stat .n.gold { color: var(--gold-hi); }
.stat .l { display: flex; align-items: center; gap: 7px; font: 500 12px/1 var(--f-mono); letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted); }
.stat .l .i { width: 14px; height: 14px; }
body.is-home .diorama { display: none; }
body.is-home .hero { padding: 64px 0 40px; }
body.is-home .stats { margin-bottom: 56px; }

/* locked game launchers (signed-out visitors) */
.when-open { display: none; }
body.is-home .when-open { display: inline; }
body.is-home .when-locked { display: none; }
.when-locked { display: inline-flex; align-items: center; gap: 5px; }
.when-locked .i { width: 12px; height: 12px; }
.topnav .lock { width: 13px; height: 13px; opacity: .6; }
body.is-home .topnav .lock { display: none; }
.auth.nudge { animation: nudge .6s cubic-bezier(.3,1.6,.5,1); border-color: rgba(245,158,11,.6); }
@keyframes nudge { 30% { transform: scale(1.015); } }

/* radar: zoom controls + live coordinates */
.radar-ctl { position: absolute; top: 14px; right: 14px; display: flex; flex-direction: column; gap: 6px; pointer-events: auto; }
.radar-ctl button { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 7px; cursor: pointer;
  color: var(--txt); background: rgba(8,9,14,.82); border: 1px solid var(--line-2); backdrop-filter: blur(6px);
  transition: background .15s, border-color .15s, color .15s; }
.radar-ctl button:hover { color: var(--gold-hi); border-color: rgba(245,158,11,.5); background: rgba(8,9,14,.95); }
.radar-coords { position: absolute; top: 14px; left: 14px; pointer-events: none; min-width: 150px; }
.radar-coords:empty { display: none; }
.radar-meta { font: 500 12px/1 var(--f-mono); color: var(--dim); letter-spacing: .06em; white-space: nowrap; }

/* scroll reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 760px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .diorama { aspect-ratio: 1040 / 520; margin-top: 40px; }
  .radar-meta { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
  .hero-title::after { display: none; }
}

/* ============================================================================
   merged features: invite banner, turntable, Walls/Roof zones, postcard share,
   map search, funnel analytics, video link actions
   ========================================================================== */
.invite-banner { margin: 0 0 18px; padding: 11px 14px; border-radius: var(--r-ctl);
  font: 500 12.5px/1.5 var(--f-mono); letter-spacing: .04em; color: var(--txt);
  background: rgba(245,158,11,.08); border: 1px solid rgba(245,158,11,.35); }
.invite-banner strong { color: var(--gold-hi); }
.viewer-frame { position: relative; }
.viewer-spin { position: absolute; top: 12px; right: 12px; z-index: 2; cursor: pointer;
  font: 500 11px/1 var(--f-mono); letter-spacing: .08em; color: var(--muted);
  padding: 7px 9px; border-radius: 5px; background: rgba(8,9,14,.75); border: 1px solid var(--line-2);
  backdrop-filter: blur(6px); transition: color .15s, border-color .15s; }
.viewer-spin.on, .viewer-spin:hover { color: var(--gold-hi); border-color: rgba(245,158,11,.45); }
.zone-btns { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.share-btn { width: 100%; margin-top: 2px; }
.map-tools { display: flex; align-items: center; gap: 10px; }
.map-search { width: 104px; background: var(--well); border: 1px solid var(--line-2); color: var(--txt);
  border-radius: var(--r-sm); padding: 9px 11px; font: 500 13px/1 var(--f-mono); outline: none;
  transition: border-color .15s, box-shadow .15s; }
.map-search::placeholder { color: var(--dim); }
.map-search:focus { border-color: rgba(245,158,11,.6); box-shadow: 0 0 0 3px rgba(245,158,11,.14); }
.an-days { background: var(--well); color: var(--txt); border: 1px solid var(--line-2); border-radius: var(--r-sm);
  font: 500 12px/1 var(--f-mono); padding: 6px 8px; }
.an-funnel { width: 100%; display: flex; flex-direction: column; gap: 7px; }
.an-fstep { display: grid; grid-template-columns: 110px 1fr 76px; align-items: center; gap: 10px; font: 500 12px/1 var(--f-mono); }
.an-fstep .lbl { color: var(--muted); }
.an-fstep .bar { height: 10px; border-radius: 2px; background: rgba(255,255,255,.05); overflow: hidden; }
.an-fstep .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-lo), var(--gold)); }
.an-fstep .val { text-align: right; color: var(--txt); font-weight: 600; }
.an-fstep .val small { color: var(--dim); font-weight: 400; margin-left: 4px; }
.an-note { font: 400 12px/1.5 var(--f-mono); color: var(--muted); width: 100%; }
.an-note code, .an-chart-label code { color: var(--gold-hi); }
.vid-act { cursor: pointer; padding: 4px 7px; border-radius: 4px; font: 500 11px/1.3 var(--f-mono); color: var(--muted);
  background: rgba(255,255,255,.03); border: 1px solid var(--line-2); white-space: nowrap; transition: color .15s, border-color .15s; }
.vid-act:hover { color: var(--gold-hi); border-color: rgba(245,158,11,.45); }
@media (max-width: 640px) {
  .map-tools { width: 100%; }
  .map-search { flex: 1; width: auto; }
  .radar .tile-head { flex-wrap: wrap; }
}
