/* Rover homepage — hologram experience.
   Base layout/CSS adapted from the approved mock
   (rover-preview-ghost.html): HUD columns, neurons canvas,
   #000 bg, cyan #40e0ff, system font stack, hero screen-blend
   + radial mask, breathe/flicker animations. */
* { margin:0; padding:0; box-sizing:border-box; }
html,body { height:100%; background:#000; font-family:-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif; color:#cfeeff; }
body { overflow:hidden; }
button { font:inherit; background:none; border:none; color:inherit; cursor:pointer; }
img { max-width:100%; }

#neurons { position:fixed; inset:0; z-index:1; }
.wrap { position:relative; z-index:2; height:100dvh; max-width:520px; margin:0 auto; display:flex; flex-direction:column; align-items:center; padding:0 6px; }

/* ---- wordmark ---- */
.wordmark { margin-top:14px; text-align:center; flex:none; }
.wordmark .name { font-size:21px; letter-spacing:.42em; text-indent:.42em; color:#8be9ff; text-shadow:0 0 14px rgba(64,224,255,.65); font-weight:600; }
.wordmark .sub { margin-top:4px; font-size:9px; letter-spacing:.3em; text-indent:.3em; color:rgba(160,220,245,.55); }

/* ---- stage / hero ---- */
.stage { position:relative; width:100%; display:flex; align-items:center; justify-content:center; flex:none; min-height:300px; }
.hero-wrap { position:relative; width:94vw; max-width:470px; display:flex; align-items:center; justify-content:center; }
.hero-media { width:100%; display:block; mix-blend-mode:screen;
  -webkit-mask-image:radial-gradient(ellipse 72% 72% at 50% 50%, #000 62%, transparent 98%);
          mask-image:radial-gradient(ellipse 72% 72% at 50% 50%, #000 62%, transparent 98%);
  animation:breathe 6s ease-in-out infinite; transition:filter .8s ease, opacity .8s ease; }
.hero-media.hidden { display:none; }
@keyframes breathe { 0%,100%{ transform:scale(1);} 50%{ transform:scale(1.028);} }

/* asleep: hero + HUD panels dimmed */
body.asleep .hero-media { filter:brightness(.5) saturate(.75); }

/* ---- aliveness (2026-12-02): sleep breathing, Z wisps, talking bob,
   perk glow, gaze/idle transforms on the wrap, hero swap dip ---- */
.hero-wrap { transition:opacity .23s ease; transform-origin:50% 62%; will-change:transform; }
.hero-wrap.fading { opacity:.12; }
body.asleep .hero-media { animation:sleepbreathe 8s ease-in-out infinite; }
body.asleep #sleepVideo { animation:none; } /* the loop breathes for real — no fake whole-frame scale on top */
@keyframes sleepbreathe { 0%,100%{ transform:scale(1) translateY(0);} 50%{ transform:scale(1.018) translateY(2px);} }
.zzz { position:absolute; top:31%; left:58%; z-index:4; pointer-events:none; opacity:0; transition:opacity 1.2s ease;
  font-weight:700; color:#8be9ff; text-shadow:0 0 12px rgba(64,224,255,.85); }
body.asleep .zzz { opacity:1; }
body.waking .zzz { opacity:0; transition:opacity .3s ease; }
.zzz span { position:absolute; left:0; top:0; opacity:0; animation:zfloat 4.8s ease-in-out infinite; }
.zzz span:nth-child(1) { font-size:14px; animation-delay:0s; }
.zzz span:nth-child(2) { font-size:19px; animation-delay:1.6s; margin-left:13px; }
.zzz span:nth-child(3) { font-size:26px; animation-delay:3.2s; margin-left:28px; }
@keyframes zfloat { 0%{ transform:translateY(8px) rotate(-7deg); opacity:0; } 22%{ opacity:.9; } 68%{ opacity:.5; } 100%{ transform:translateY(-36px) rotate(9deg); opacity:0; } }
body.talking .hero-media { animation:talkbob .36s ease-in-out infinite alternate; }
@keyframes talkbob { from{ transform:translateY(0) rotate(0deg);} to{ transform:translateY(-4px) rotate(.5deg);} }
body.perk .hero-media { filter:brightness(1.3) saturate(1.1); }
/* Waiting on a reply: the head's thinking glow — the ONLY thinking
   signal, and it lives outside the transcript (Roof: no "thinking"
   narration bubbles in the chat, ever). */
body.thinking .hero-media { filter:brightness(1.16) drop-shadow(0 0 16px rgba(64,224,255,.5)); }
@media (prefers-reduced-motion: reduce) {
  .hero-media, .zzz span { animation:none !important; }
  .hud-row::after, .hud-panel.cityhud::after { animation:none !important; display:none; }
}
body.asleep .hud-panel { opacity:.78; } /* dim him, not the data: numbers stay readable asleep */
body.asleep .dot { animation:none; opacity:.4; }

/* ---- HUD cards (2026-12-03, Roof: "Separate Rover's HUDs so people
   know to click on them"): the two side panels are now transparent
   stacks; every row is its OWN glass card — visible gap, its own
   border and glow, a chevron on the edge facing Rover, a press
   state, and a one-time glow sweep on first load. The city button
   underneath was always its own card; it gets the same chevron and
   sweep so all seven doors read the same way. ---- */
.hud-panel { background:rgba(10,34,50,.74); -webkit-backdrop-filter:blur(8px); backdrop-filter:blur(8px);
  border:1px solid rgba(64,224,255,.58); border-radius:14px;
  box-shadow:0 0 26px rgba(64,224,255,.24), inset 0 0 22px rgba(64,224,255,.11);
  transition:opacity .8s ease, background .15s ease; animation:flicker 7s linear infinite; }
/* Wake swell: when he wakes, the cards flare once so the eye lands on them. */
.hud-panel.cityhud.awake { animation:hudwake 1.8s ease-out 1, flicker 9s linear infinite; animation-delay:.15s, 1.4s; }
.hud-panel.side.awake .hud-row { animation:hudwake 1.8s ease-out 1, flicker 7s linear infinite; }
.hud-panel.side.right.awake .hud-row { animation-delay:0s, 2.3s; }
@keyframes hudwake { 0%{ box-shadow:0 0 6px rgba(64,224,255,.08), inset 0 0 10px rgba(64,224,255,.04); border-color:rgba(64,224,255,.30); }
  30%{ box-shadow:0 0 42px rgba(64,224,255,.60), inset 0 0 30px rgba(64,224,255,.24); border-color:rgba(170,242,255,.95); }
  100%{ box-shadow:0 0 26px rgba(64,224,255,.24), inset 0 0 22px rgba(64,224,255,.11); border-color:rgba(64,224,255,.58); } }
.hud-panel.side { position:absolute; top:50%; transform:translateY(-50%); width:27vw; max-width:132px; min-width:0;
  display:flex; flex-direction:column; gap:9px; z-index:3; padding:0; text-align:left;
  background:transparent; border:none; box-shadow:none; overflow:visible; animation:none;
  -webkit-backdrop-filter:none; backdrop-filter:none; }
.hud-panel.side.left { left:4px; }
.hud-panel.side.right { right:4px; text-align:right; }
@keyframes flicker { 0%,96%,100%{opacity:1;} 97%{opacity:.82;} 98%{opacity:.95;} }
body.asleep .hud-panel { animation:none; }
body.asleep .hud-row { animation:none; }
.hud-row { position:relative; overflow:hidden; display:flex; flex-direction:row; align-items:center; gap:5px;
  width:100%; min-height:48px; padding:8px 10px; text-align:left; cursor:pointer;
  background:rgba(10,34,50,.74); -webkit-backdrop-filter:blur(8px); backdrop-filter:blur(8px);
  border:1px solid rgba(64,224,255,.58); border-radius:12px;
  box-shadow:0 0 18px rgba(64,224,255,.22), inset 0 0 16px rgba(64,224,255,.10);
  transition:background .15s ease, border-color .15s ease, box-shadow .15s ease, transform .12s ease;
  animation:flicker 7s linear infinite; }
.hud-panel.side.left .hud-row:nth-child(2) { animation-delay:.6s; }
.hud-panel.side.left .hud-row:nth-child(3) { animation-delay:1.2s; }
.hud-panel.side.right .hud-row { animation-delay:2.3s; }
.hud-panel.side.right .hud-row:nth-child(2) { animation-delay:2.9s; }
.hud-panel.side.right .hud-row:nth-child(3) { animation-delay:3.5s; }
.hud-row .txt { display:flex; flex-direction:column; justify-content:center; flex:1 1 auto; min-width:0; }
.hud-panel.side.right .hud-row .txt { align-items:flex-end; text-align:right; }
.hud-row .chev { flex:none; font-size:15px; font-weight:700; line-height:1; color:rgba(150,242,255,.9); text-shadow:0 0 9px rgba(64,224,255,.8); }
.hud-row:hover { background:rgba(18,58,82,.88); border-color:rgba(150,242,255,.92);
  box-shadow:0 0 26px rgba(64,224,255,.38), inset 0 0 18px rgba(64,224,255,.16); }
.hud-row:active { transform:scale(.96); background:rgba(24,72,100,.92); border-color:rgba(190,250,255,1);
  box-shadow:0 0 30px rgba(64,224,255,.5), inset 0 0 20px rgba(64,224,255,.2); }
/* Roofs Scanned is a readout, not a door (Roof, 2026-12-03): no
   chevron, and no hover-brighten or press — nothing on the card
   promises a tap destination. Glass, glow and sweep unchanged. */
.hud-row.static { cursor:default; }
.hud-row.static:hover, .hud-row.static:active { transform:none; background:rgba(10,34,50,.74);
  border-color:rgba(64,224,255,.58);
  box-shadow:0 0 18px rgba(64,224,255,.22), inset 0 0 16px rgba(64,224,255,.10); }
.hud-row .lab { display:block; font-size:8.5px; letter-spacing:.17em; color:rgba(168,240,255,.88); text-transform:uppercase; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:100%; }
.hud-row .val { display:block; margin-top:2px; font-size:16px; line-height:1.15; font-weight:700; color:#f2fcff; text-shadow:0 0 12px rgba(64,224,255,.65); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:100%; }
.hud-row .val.small { font-size:12.5px; font-weight:600; color:#d8f6ff; white-space:normal; overflow:visible; text-overflow:clip; }
/* How We Grade card: "Grades 1 · 2 · 3" must hold ONE line at phone
   width (Roof, 2026-12-03). It sat at the fit edge in the shared
   .val.small size and the 3 dropped to a line of its own on real
   phone fonts. Scoped to this card only: a touch smaller, tightened,
   and never allowed to wrap. */
#hudGrade .val.small { font-size:11px; letter-spacing:-.02em; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.hud-row:focus-visible, .hud-panel.cityhud:focus-visible, .talkbar button:focus-visible, .talkbar input:focus-visible { outline:2px solid #40e0ff; outline-offset:2px; }
/* One-time glow sweep across the seven cards on first load — runs
   once, staggered left group, right group, city card; never loops. */
.hud-row::after, .hud-panel.cityhud::after { content:''; position:absolute; inset:0; border-radius:inherit; pointer-events:none;
  background:linear-gradient(115deg, transparent 32%, rgba(150,242,255,.22) 50%, transparent 68%);
  transform:translateX(-130%); animation:hudsweep 1.15s ease-in-out 1 both; }
.hud-panel.side.left .hud-row:nth-child(1)::after { animation-delay:.7s; }
.hud-panel.side.left .hud-row:nth-child(2)::after { animation-delay:.9s; }
.hud-panel.side.left .hud-row:nth-child(3)::after { animation-delay:1.1s; }
.hud-panel.side.right .hud-row:nth-child(1)::after { animation-delay:1.3s; }
.hud-panel.side.right .hud-row:nth-child(2)::after { animation-delay:1.5s; }
.hud-panel.side.right .hud-row:nth-child(3)::after { animation-delay:1.7s; }
.hud-panel.cityhud::after { animation-delay:1.95s; }
@keyframes hudsweep { to { transform:translateX(130%); } }

/* ---- state line + city HUD ---- */
.state { margin-top:2px; font-size:10px; letter-spacing:.24em; text-indent:.24em; color:rgba(160,220,245,.75); display:flex; align-items:center; gap:7px; flex:none; text-align:center; }
.dot { width:7px; height:7px; border-radius:50%; background:#40e0ff; box-shadow:0 0 10px #40e0ff; animation:pulse 2.2s ease-in-out infinite; flex:none; }
@keyframes pulse { 0%,100%{opacity:1;} 50%{opacity:.35;} }
.hud-panel.cityhud { position:relative; overflow:hidden; margin-top:10px; width:calc(100% - 16px); max-width:420px; min-height:48px;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px;
  padding:9px 14px 10px; text-align:center; animation:flicker 9s linear infinite; animation-delay:1.4s; flex:none;
  transition:opacity .8s ease, background .15s ease, transform .12s ease; cursor:pointer; }
.hud-panel.cityhud:hover { background:rgba(18,58,82,.88); border-color:rgba(150,242,255,.92); }
.hud-panel.cityhud:active { background:rgba(24,72,100,.92); transform:scale(.98); }
.hud-panel.cityhud .chev { position:absolute; right:14px; top:50%; transform:translateY(-50%);
  font-size:16px; font-weight:700; line-height:1; color:rgba(150,242,255,.9); text-shadow:0 0 9px rgba(64,224,255,.8); }
body.asleep .hud-panel.cityhud { animation:none; }
.cityhud .lab { display:block; font-size:8.5px; letter-spacing:.18em; color:rgba(168,240,255,.88); text-transform:uppercase; }
.cityhud .val { display:block; margin-top:0; font-size:13.5px; font-weight:600; color:#d8f6ff; }

/* ---- transcript ---- */
#transcript { flex:1 1 auto; width:100%; max-width:470px; min-height:0; overflow-y:auto; display:flex; flex-direction:column; gap:8px; padding:10px 4px 4px; scrollbar-width:thin; scrollbar-color:rgba(64,224,255,.4) transparent; }
#transcript:empty { flex:none; }
.bubble { max-width:86%; padding:9px 13px; border-radius:14px; font-size:14px; line-height:1.45; white-space:pre-wrap; word-break:break-word; }
.bubble.rover { align-self:flex-start; background:rgba(10,40,58,.72); border:1px solid rgba(64,224,255,.45); color:#dff6ff; border-bottom-left-radius:4px; box-shadow:0 0 12px rgba(64,224,255,.10); }
.bubble.visitor { align-self:flex-end; background:rgba(64,224,255,.16); border:1px solid rgba(64,224,255,.30); color:#eaf9ff; border-bottom-right-radius:4px; }
.bubble.error { align-self:flex-start; background:rgba(58,16,16,.72); border:1px solid rgba(255,120,120,.5); color:#ffd9d9; }

/* ---- lead cards (chat + feed share the look) ---- */
.lead-block { align-self:stretch; display:flex; flex-direction:column; gap:8px; }
.lead-card { display:flex; gap:10px; background:rgba(8,32,46,.78); border:1px solid rgba(64,224,255,.35); border-radius:12px; padding:9px; box-shadow:0 0 12px rgba(64,224,255,.08); }
.lead-card.gone { opacity:.38; filter:grayscale(.7); }
.lead-card img.photo { width:96px; height:96px; object-fit:cover; border-radius:8px; flex:none; background:#06202e; }
.lead-card .lc-body { flex:1; min-width:0; }
.lead-card .lc-street { font-size:14px; font-weight:600; color:#eaf9ff; }
.lead-card .lc-loc { font-size:12px; color:rgba(190,235,255,.7); }
.lead-card .lc-tags { display:flex; flex-wrap:wrap; gap:5px; margin-top:5px; }
.chip { font-size:10.5px; letter-spacing:.04em; padding:2px 8px; border-radius:999px; border:1px solid rgba(64,224,255,.45); color:#aee9ff; }
.chip.grade { background:rgba(64,224,255,.18); color:#eaf9ff; font-weight:600; }
.lead-card .lc-sum { font-size:12.5px; color:#cfeeff; margin-top:5px; line-height:1.4; }
.lead-card .lc-foot { display:flex; align-items:center; gap:10px; margin-top:7px; }
.lead-card .lc-price { font-size:15px; font-weight:700; color:#8be9ff; }
.lead-card label.pick { display:flex; align-items:center; gap:5px; font-size:12px; color:#bfeaff; cursor:pointer; }
.lead-card input[type=checkbox] { accent-color:#40e0ff; width:16px; height:16px; }
.btn-holo { font-size:13px; font-weight:600; color:#03222e; background:#40e0ff; border-radius:999px; padding:7px 14px; box-shadow:0 0 12px rgba(64,224,255,.45); }
.btn-holo:disabled { opacity:.5; box-shadow:none; }
.btn-ghost { font-size:12.5px; font-weight:600; color:#aee9ff; border:1px solid rgba(64,224,255,.5); border-radius:999px; padding:6px 12px; margin-left:auto; }
.buy-bar { display:flex; flex-wrap:wrap; gap:8px; align-items:center; background:rgba(10,30,44,.85); border:1px solid rgba(64,224,255,.4); border-radius:12px; padding:9px; }
.buy-bar input[type=email] { flex:1 1 150px; background:rgba(0,0,0,.45); border:1px solid rgba(64,224,255,.35); border-radius:999px; padding:8px 13px; color:#eaf9ff; font-size:13px; }
.buy-bar .bb-total { font-size:13px; color:#bfeaff; white-space:nowrap; }
.buy-bar .bb-err { flex-basis:100%; font-size:12.5px; color:#ff9c9c; min-height:0; }
.buy-bar .bb-err:empty { display:none; }

/* ---- sample + scan blocks ---- */
.sample-block { align-self:stretch; display:flex; flex-direction:column; gap:8px; }
.sample-block img { width:100%; border-radius:10px; border:1px solid rgba(64,224,255,.35); cursor:zoom-in; }
.scan-card { align-self:stretch; background:rgba(8,32,46,.78); border:1px solid rgba(64,224,255,.4); border-radius:12px; padding:12px; }
.scan-card .sc-addr { font-size:15px; font-weight:600; color:#eaf9ff; }
.scan-card .sc-grade { margin-top:4px; font-size:13px; color:#8be9ff; font-weight:600; }
.scan-card ul { margin:8px 0 0 17px; font-size:13px; line-height:1.5; color:#cfeeff; }
.scan-card .sc-locked { margin-top:8px; font-size:13px; color:#ffe1a8; }
.scan-card a.sc-report { display:inline-block; margin-top:9px; font-size:13px; font-weight:600; color:#03222e; background:#40e0ff; border-radius:999px; padding:7px 14px; text-decoration:none; }

/* ---- talk bar ---- */
.talkbar { margin:12px 8px 16px; width:calc(100% - 16px); max-width:470px; display:flex; align-items:center; gap:8px; flex:none;
  border:1px solid rgba(64,224,255,.35); border-radius:999px; padding:7px 8px 7px 16px;
  background:rgba(10,30,44,.55); box-shadow:0 0 18px rgba(64,224,255,.12) inset, 0 0 14px rgba(64,224,255,.10); }
.talkbar input { flex:1; min-width:0; background:transparent; border:none; font-size:14px; color:#eaf9ff; }
.talkbar input::placeholder { color:rgba(190,235,255,.55); }
.talkbar input:focus { outline:none; }
.talkbar .btn { font-size:13px; font-weight:600; color:#03222e; background:#40e0ff; border-radius:999px; padding:8px 15px; box-shadow:0 0 14px rgba(64,224,255,.55); white-space:nowrap; }
.talkbar .btn.rec { background:#ff5d5d; color:#2e0303; }
.talkbar .btn.send { background:rgba(64,224,255,.22); color:#aee9ff; box-shadow:none; border:1px solid rgba(64,224,255,.5); }
.talkbar .btn.voice-toggle { background:transparent; color:rgba(174,233,255,.55); box-shadow:none; border:1px solid rgba(64,224,255,.3); padding:8px 10px; }
.talkbar .btn.voice-toggle[aria-pressed="true"] { color:#03222e; background:#40e0ff; }

/* ---- feed overlay ---- */
#feedView { position:fixed; inset:0; z-index:50; background:rgba(0,4,8,.97); display:none; flex-direction:column; }
#feedView.open { display:flex; }
#feedView .fv-in { width:100%; max-width:640px; margin:0 auto; display:flex; flex-direction:column; height:100%; padding:14px 12px 0; }
#feedView .fv-head { display:flex; align-items:center; gap:10px; flex:none; }
#feedView .fv-title { font-size:16px; letter-spacing:.28em; color:#8be9ff; font-weight:600; flex:1; text-align:center; }
#feedView select { margin-top:12px; flex:none; width:100%; background:rgba(10,30,44,.8); color:#eaf9ff; border:1px solid rgba(64,224,255,.4); border-radius:10px; padding:10px; font-size:14px; }
#feedView .gtabs { display:flex; gap:6px; margin-top:10px; flex:none; flex-wrap:wrap; }
#feedView .gtab { font-size:12.5px; color:#aee9ff; border:1px solid rgba(64,224,255,.4); border-radius:999px; padding:6px 12px; }
#feedView .gtab.on { background:#40e0ff; color:#03222e; font-weight:700; }
#feedView .fv-count { margin-top:9px; font-size:12.5px; color:rgba(190,235,255,.7); flex:none; }
#feedGrid { flex:1; overflow-y:auto; display:flex; flex-direction:column; gap:9px; padding:10px 0 14px; min-height:0; }
#feedView .fv-bar { flex:none; margin:0 -12px; padding:10px 12px calc(10px + env(safe-area-inset-bottom)); background:rgba(4,18,28,.97); border-top:1px solid rgba(64,224,255,.35); }

/* ---- lightbox ---- */
#lightbox { position:fixed; inset:0; z-index:60; background:rgba(0,0,0,.96); display:none; align-items:center; justify-content:center; }
#lightbox.open { display:flex; }
#lightbox img { max-width:100vw; max-height:100dvh; object-fit:contain; }

@media (min-width:700px) {
  .hud-panel.side { width:132px; }
  .stage { min-height:340px; }
}
@media (max-width:420px) {
  .hud-panel.side { width:30vw; max-width:118px; }
  .hud-row { padding-left:8px; padding-right:8px; }
  .hud-row .lab { font-size:8px; letter-spacing:.11em; }
  .hud-row .chev { font-size:13px; }
  .hud-row .val { font-size:15px; }
}
@media (max-height:700px) {
  .stage { min-height:230px; }
  .hud-row { min-height:44px; padding-top:6px; padding-bottom:6px; }
  .wordmark { margin-top:8px; }
}

/* ---- chat mode (2026-12-02, Roof: "Can't see chat — switch to his
   head when chatting"): when a conversation starts, the HUD panels
   fade out, the stage collapses, and the transcript takes the freed
   screen. The Explore button (or tapping his head) restores the
   home state exactly. Home geometry is restated below as explicit
   lengths equal to the current rendered sizes (square media at
   width min(94vw,470px)) so every geometry change transitions
   smoothly in both directions; the media are always absolutely
   positioned at 0,0 for the same reason — visually identical at
   home.
   The chat head itself (Roof, later 2026-12-02: "holographic dog
   like this as the chat rover — no background, no hud") is a
   DEDICATED bare-head hologram (the rover-head-blink loop: head +
   cap + bandana on plain black, rover-head.webp as its poster)
   that replaces ALL full-body media in
   chat mode — no dog house, no projector ring, no body. The first
   chat build cropped the full-body loop and the house showed
   behind him; Roof rejected that. ---- */
.stage { height:min(94vw, 470px); transition:height .45s ease; }
.hero-wrap { height:min(94vw, 470px); transition:opacity .23s ease, width .45s ease, height .45s ease; }
.hero-media { position:absolute; left:0; top:0;
  transition:filter .8s ease, opacity .8s ease, width .45s ease, left .45s ease, top .45s ease; }
.hud-panel.side { transition:opacity .4s ease, visibility .4s ease, background .15s ease; }

.chatbar { display:none; flex:none; width:100%; justify-content:center; padding:9px 0 3px; }
body.chat .chatbar { display:flex; }
.btn-explore { font-size:14px; font-weight:700; letter-spacing:.06em; color:#03222e; background:#40e0ff;
  border-radius:999px; padding:9px 28px; box-shadow:0 0 16px rgba(64,224,255,.55); }
.btn-explore:hover, .btn-explore:active { background:#8be9ff; }
.btn-explore:focus-visible { outline:2px solid #40e0ff; outline-offset:2px; }

body.chat .wordmark { margin-top:10px; }
body.chat .wordmark .name { font-size:17px; }
body.chat .state, body.chat .hud-panel.cityhud { display:none; }
body.chat .stage { height:238px; min-height:0; }
body.chat .hud-panel.side { opacity:0; visibility:hidden; pointer-events:none; }
body.chat .hero-wrap { width:238px; height:238px; overflow:hidden; cursor:pointer;
  -webkit-mask-image:linear-gradient(to bottom, #000 86%, transparent 99%);
          mask-image:linear-gradient(to bottom, #000 86%, transparent 99%); }
/* The bare chat head: hidden at home; in chat mode it is the ONLY
   hero media shown — every full-body medium (sleep still, ghost
   still, wake clip, alive loop) is display:none, so no house,
   ring, or body can appear behind him. It keeps the shared
   .hero-media life: the breathe animation, the talking bob under
   body.talking, the perk glow, and the wrap's gaze/idle lean. */
.chat-head { display:none; }
body.chat .hero-media:not(.chat-head) { display:none; }
body.chat .chat-head { display:block; width:238px; max-width:none; left:50%; margin-left:-119px; top:-2px; }
body.chat .zzz { display:none; }
body.chat #transcript { padding-top:6px; }

/* ---- lead map overlay (2026-12-02, Roof: the Lead Feed HUD opens a
   pinpoint map "like the map Shakespeare has"): a full-screen view
   mirroring the Brain's Living Map level 1 — an SVG US map in the
   same 49x35 projection with glowing cyan pins, one per feed city,
   counts live from /api/lead-feed/cities, coordinates from the baked
   rover-map-data.js table (never geocoded per visitor, never faked:
   a city with no stored coordinates is listed below with a dim dot
   and no pin). Tap a pin or a city row → that city's leads load in
   the feed view; the feed view's Map button comes back here. ---- */
#mapView { position:fixed; inset:0; z-index:50; background:rgba(0,4,8,.97); display:none; flex-direction:column; }
#mapView.open { display:flex; }
#mapView .fv-in { width:100%; max-width:640px; margin:0 auto; display:flex; flex-direction:column; height:100%; padding:14px 12px 0; }
#mapView .fv-head { display:flex; align-items:center; gap:10px; flex:none; }
#mapView .fv-title { font-size:16px; letter-spacing:.28em; color:#8be9ff; font-weight:600; flex:1; text-align:center; }
#mapView .fv-count { margin-top:9px; font-size:12.5px; color:rgba(190,235,255,.7); flex:none; }
#gradeView { position:fixed; inset:0; z-index:50; background:rgba(0,4,8,.97); display:none; flex-direction:column; }
#gradeView.open { display:flex; }
#gradeView .fv-in { width:100%; max-width:640px; margin:0 auto; display:flex; flex-direction:column; height:100%; padding:14px 12px 0; }
#gradeView .fv-head { display:flex; align-items:center; gap:10px; flex:none; }
#gradeView .fv-title { font-size:16px; letter-spacing:.28em; color:#8be9ff; font-weight:600; flex:1; text-align:center; }
#gradeView .gv-body { overflow-y:auto; flex:1 1 auto; min-height:0; padding:14px 2px calc(18px + env(safe-area-inset-bottom)); scrollbar-width:thin; }
.gv-intro, .gv-close { font-size:14px; line-height:1.55; color:rgba(220,245,255,.88); margin:0; }
.gv-close { margin-top:20px; }
.gv-grade { margin-top:22px; }
.gv-grade h2 { font-size:16px; color:#f2fcff; display:flex; align-items:center; gap:9px; margin:0 0 6px; }
.gv-badge { font-size:11.5px; font-weight:700; letter-spacing:.06em; padding:4px 9px; border-radius:999px;
  border:1px solid rgba(64,224,255,.55); color:#8be9ff; background:rgba(10,34,50,.8); white-space:nowrap; }
.gv-grade p { font-size:13.5px; line-height:1.55; color:rgba(220,245,255,.85); margin:0 0 10px; }
.gv-grade figure { margin:0 0 14px; }
.gv-grade img { width:100%; border-radius:10px; border:1px solid rgba(64,224,255,.35); display:block; }
.gv-grade figcaption { font-size:12.5px; line-height:1.5; color:rgba(190,235,255,.75); margin-top:6px; }
#rvmap { position:relative; width:100%; aspect-ratio:49/35; margin:8px auto 0; flex:none; }
#rvmap svg { position:absolute; inset:0; width:100%; height:100%; display:block; }
#rvmap path { fill:rgba(14,60,100,.42); stroke:rgba(64,224,255,.55); stroke-width:.12; stroke-linejoin:round; }
.rvpin { position:absolute; width:13px; height:13px; margin:-6.5px 0 0 -6.5px; border-radius:50%;
  background:radial-gradient(circle,#dffaff 0 22%,#40e0ff 48%,rgba(64,224,255,.12) 78%);
  box-shadow:0 0 10px rgba(64,224,255,.9); cursor:pointer; z-index:2; }
.rvpin::after { content:''; position:absolute; inset:-7px; border-radius:50%;
  border:1px solid rgba(64,224,255,.6); animation:rvpinping 2.6s ease-out infinite; }
@keyframes rvpinping { 0%{ transform:scale(.45); opacity:.9; } 70%{ transform:scale(1.3); opacity:0; } 100%{ transform:scale(1.3); opacity:0; } }
.rvpin:active { background:radial-gradient(circle,#fff 0 25%,#7df9ff 52%,rgba(64,224,255,.2) 80%);
  box-shadow:0 0 17px rgba(125,249,255,1); }
.rvlab { position:absolute; left:50%; transform:translateX(-50%); top:12px; font-size:9.5px;
  letter-spacing:.03em; color:#dff6ff; white-space:nowrap; pointer-events:none;
  text-shadow:0 0 6px rgba(64,224,255,.9), 0 1px 3px #000; }
.rvlab.above { top:auto; bottom:12px; }
#mapList { overflow-y:auto; flex:1 1 auto; min-height:0; display:flex; flex-direction:column;
  gap:5px; padding:2px 1px calc(10px + env(safe-area-inset-bottom)); scrollbar-width:thin; margin-top:8px; }
.maprow { display:flex; align-items:center; gap:8px; padding:9px 12px; min-height:43px; width:100%;
  border:1px solid rgba(64,224,255,.14); border-radius:11px; cursor:pointer; text-align:left;
  background:rgba(6,26,44,.62); font-size:14px; color:#cfeeff; }
.maprow:active { border-color:#40e0ff; box-shadow:0 0 10px rgba(64,224,255,.35); }
.maprow .pdot { width:8px; height:8px; border-radius:50%; background:#40e0ff;
  box-shadow:0 0 7px rgba(64,224,255,.9); flex:0 0 auto; }
.maprow.nopin .pdot { background:#5b7a8c; box-shadow:none; }
.maprow .mst { color:rgba(190,235,255,.6); font-size:12px; }
.maprow .mcount { margin-left:auto; color:#40e0ff; font-weight:600; }
