/* Nobody's Courtyard v2 — a mobile-game HUD in Base blue and Zcash gold: candy buttons with a
   bottom bevel, glossy blue panels, Lilita One headings. Deliberately NOT the cream-paper, hard
   diagonal shadow register used on BarrelsRH. */
:root {
  --blue: #0052FF;
  --blue-hi: #3D7BFF;
  --blue-lo: #003BCC;
  --navy: #071A45;
  --navy-2: #0D2766;
  --gold: #F4B728;
  --gold-hi: #FFD868;
  --gold-lo: #C98A0C;
  --pink: #F29AAB;
  --cream: #FFF7E6;
  --white: #FFFFFF;
  --ink: #0B1330;
  --muted: #5B6B94;
  --pos: #1E8A4C;
  --neg: #D2394A;
  --sky: #DDEAFF;
  --f-game: 'Lilita One', 'Nunito', system-ui, sans-serif;
  --f-body: 'Nunito', system-ui, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, monospace;
  --bevel: 0 5px 0 var(--navy);
  --lift: 0 14px 28px rgba(7, 26, 69, .28);
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { color-scheme: light; } }
:root[data-theme="dark"] { color-scheme: light; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--sky); color: var(--ink); font: 700 16px/1.4 var(--f-body); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
kbd { font: 700 10px var(--f-mono); background: rgba(255,255,255,.2); border-radius: 4px; padding: 0 4px; }

#stage { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }

/* ── projected labels & bubbles ── */
#labels { position: fixed; inset: 0; pointer-events: none; }
.slabel { position: absolute; transform: translate(-50%, -100%); display: flex; align-items: center; gap: 8px; padding: 6px 12px 7px 8px; border-radius: 12px;
  background: var(--navy); color: var(--white); font: 400 15px/1 var(--f-game); letter-spacing: .02em; white-space: nowrap; box-shadow: 0 4px 0 rgba(7,26,69,.35); opacity: .88; transition: transform .18s, opacity .18s; }
.slabel::after { content: ''; position: absolute; left: 50%; bottom: -7px; margin-left: -7px; border: 7px solid transparent; border-bottom: 0; border-top-color: var(--navy); }
.slabel i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--white); flex: none; }
.slabel small { display: block; font: 700 10px/1.2 var(--f-body); color: #A9BCF2; letter-spacing: 0; margin-top: 2px; }
.slabel.near { opacity: 1; transform: translate(-50%, -100%) scale(1.12); background: var(--gold); color: var(--navy); }
.slabel.near::after { border-top-color: var(--gold); }
.slabel.near small { color: var(--navy-2); }
.bubble { position: absolute; transform: translate(-50%, -100%); background: var(--white); color: var(--ink); border: 3px solid var(--navy); border-radius: 16px; padding: 6px 12px;
  font: 800 14px/1.2 var(--f-body); white-space: nowrap; animation: pop .25s cubic-bezier(.2,1.4,.4,1); }
.bubble::after { content: ''; position: absolute; left: 50%; bottom: -10px; margin-left: -8px; border: 8px solid transparent; border-bottom: 0; border-top-color: var(--navy); }
.bubble.me { background: var(--gold); }

/* ── HUD ── */
.hud { position: fixed; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: max(14px, env(safe-area-inset-top)) 16px 0; pointer-events: none; }
.hud > * { pointer-events: auto; }
.who { display: flex; align-items: center; }
.avatar { width: 64px; height: 64px; border-radius: 50%; background: conic-gradient(var(--gold) 0 75%, var(--gold-lo) 75%); padding: 5px; box-shadow: var(--bevel), var(--lift); position: relative; z-index: 1; border: 3px solid var(--navy); }
.avatar img { width: 100%; height: 100%; border-radius: 50%; display: block; }
.plate { margin-left: -14px; padding: 7px 16px 8px 24px; background: linear-gradient(var(--blue-hi), var(--blue)); border: 3px solid var(--navy); border-radius: 0 16px 16px 0; box-shadow: var(--bevel); color: var(--white); }
.plate b { display: block; font: 400 20px/1 var(--f-game); letter-spacing: .04em; text-shadow: 0 2px 0 var(--navy); }
.plate span { display: flex; align-items: center; gap: 6px; font: 800 12px/1 var(--f-body); margin-top: 4px; color: #D6E2FF; }
.plate .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 2px var(--navy); }
.badge { font: 900 10px/1 var(--f-body); letter-spacing: .06em; font-style: normal; background: var(--navy); color: var(--gold); padding: 4px 7px; border-radius: 6px; }
.badge.sample { background: var(--pink); color: var(--navy); }
.badge.live { background: #1E8A4C; color: #EAFFF2; }
.bank { display: flex; align-items: center; gap: 10px; }
.pill { display: flex; flex-direction: column; justify-content: center; min-height: 48px; padding: 6px 14px; border-radius: 16px; background: var(--navy); color: var(--white); border: 3px solid var(--navy); box-shadow: 0 5px 0 rgba(7,26,69,.45); }
.pill small { font: 800 11px/1 var(--f-body); color: #9FB2E6; }
.pill b { font-size: 16px; margin-top: 3px; }
.pill.coin { flex-direction: row; align-items: center; gap: 10px; cursor: pointer; padding-left: 8px; background: linear-gradient(var(--navy-2), var(--navy)); }
.pill.coin:hover { transform: translateY(-2px); }
.pill.coin:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(7,26,69,.45); }
.pill.coin u { text-decoration: none; color: var(--gold); font-size: 12px; }
.pill.coin i { font-style: normal; color: var(--gold-hi); }
.coin-txt { display: flex; flex-direction: column; align-items: flex-start; }
.coin-ico { width: 32px; height: 32px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, var(--gold-hi), var(--gold) 55%, var(--gold-lo)); border: 3px solid var(--navy); position: relative; animation: spin 3.2s ease-in-out infinite; }
.coin-ico::after { content: 'Z'; position: absolute; inset: 0; display: grid; place-items: center; font: 400 15px var(--f-game); color: var(--navy); }
@keyframes spin { 0%, 70% { transform: rotateY(0); } 85% { transform: rotateY(180deg); } 100% { transform: rotateY(360deg); } }
.coin-ico.ding { animation: ding .5s ease-out; }
@keyframes ding { 40% { transform: scale(1.35) rotate(-12deg); } }

/* candy buttons */
.candy { font: 400 16px/1 var(--f-game); letter-spacing: .03em; border: 3px solid var(--navy); border-radius: 16px; padding: 12px 18px; min-height: 48px; cursor: pointer; color: var(--white);
  text-shadow: 0 2px 0 rgba(7,26,69,.6); box-shadow: inset 0 -5px 0 rgba(0,0,0,.18), inset 0 3px 0 rgba(255,255,255,.35), var(--bevel); transition: transform .08s; }
.candy.blue { background: linear-gradient(var(--blue-hi), var(--blue)); }
.candy.gold { background: linear-gradient(var(--gold-hi), var(--gold)); color: var(--navy); text-shadow: 0 1px 0 rgba(255,255,255,.5); }
.candy.ghost { background: var(--white); color: var(--navy); text-shadow: none; }
.x-btn { background: var(--navy); color: var(--white); display: grid; place-items: center; width: 52px; padding: 0; font-size: 22px; text-decoration: none; }
@media (max-width: 720px) { .x-btn { width: 44px; min-height: 44px; font-size: 18px; } }
.candy:hover:not(:disabled) { transform: translateY(-2px); }
.candy:active:not(:disabled) { transform: translateY(4px); box-shadow: inset 0 -2px 0 rgba(0,0,0,.18), 0 1px 0 var(--navy); }
.candy:disabled { filter: grayscale(.55) brightness(1.05); opacity: .7; cursor: not-allowed; }

/* ── panel ── */
.panel-host { position: fixed; top: 96px; right: 16px; bottom: 16px; width: min(440px, calc(100vw - 32px)); pointer-events: none; display: flex; align-items: flex-start; }
.panel-host.on { pointer-events: auto; }
.panel { width: 100%; max-height: 100%; overflow: auto; overscroll-behavior: contain; border-radius: 26px; border: 3px solid var(--navy);
  background: linear-gradient(180deg, var(--blue-hi) 0, var(--blue) 120px, var(--blue-lo) 100%); box-shadow: 0 8px 0 var(--navy), var(--lift); color: var(--white);
  animation: pop .28s cubic-bezier(.2,1.3,.4,1); position: relative; }
.panel::-webkit-scrollbar { width: 10px; } .panel::-webkit-scrollbar-thumb { background: var(--navy-2); border-radius: 8px; }
@keyframes pop { from { transform: translateY(16px) scale(.94); opacity: 0; } }
.panel header { display: flex; gap: 12px; align-items: center; padding: 16px 16px 12px; position: sticky; top: 0; z-index: 2; background: linear-gradient(var(--blue-hi), rgba(61,123,255,.92)); border-radius: 23px 23px 0 0; }
.panel h2 { margin: 0; font: 400 26px/1 var(--f-game); letter-spacing: .02em; text-shadow: 0 3px 0 var(--navy); }
.panel header p { margin: 4px 0 0; color: #D6E2FF; font-size: 13px; font-weight: 800; }
.picto { width: 48px; height: 48px; flex: none; border-radius: 14px; background: linear-gradient(var(--gold-hi), var(--gold)); border: 3px solid var(--navy); display: grid; place-items: center; box-shadow: 0 3px 0 var(--navy); }
.picto svg { width: 26px; height: 26px; fill: none; stroke: var(--navy); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.x { margin-left: auto; width: 44px; height: 44px; border-radius: 50%; border: 3px solid var(--navy); background: linear-gradient(#FF8FA3, #E8506C); color: var(--white); font: 400 22px/1 var(--f-game); cursor: pointer; box-shadow: 0 3px 0 var(--navy); text-shadow: 0 2px 0 rgba(7,26,69,.5); }
.x:active { transform: translateY(3px); box-shadow: none; }
.body { padding: 4px 16px 18px; display: grid; gap: 12px; }
.lede { margin: 0; font-size: 15px; color: #E7EEFF; }
.lede b { color: var(--gold-hi); }
.hero { display: grid; gap: 2px; padding: 14px 16px; border-radius: 18px; background: var(--white); color: var(--ink); border: 3px solid var(--navy); box-shadow: 0 4px 0 var(--navy); position: relative; overflow: hidden; }
.hero.gold { background: linear-gradient(135deg, var(--gold-hi), var(--gold) 60%); }
.hero.gold::after { content: ''; position: absolute; right: -22px; top: -22px; width: 110px; height: 110px; border-radius: 50%; border: 10px solid rgba(255,255,255,.35); }
.hero .label { font-size: 13px; font-weight: 900; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.hero.gold .label, .hero.gold .sub { color: var(--navy-2); }
.hero .big { font: 700 clamp(28px, 7vw, 38px)/1.05 var(--f-mono); letter-spacing: -.02em; word-break: break-all; }
.hero .unit { font: 400 16px var(--f-game); color: var(--navy); }
.hero .sub { font-size: 14px; color: var(--muted); }
.big2 { font: 700 22px var(--f-mono); }
.pos { color: var(--pos); }
.bump { animation: bump .35s ease-out; }
@keyframes bump { 40% { transform: scale(1.08); color: var(--pos); } }
dl { margin: 0; display: grid; gap: 10px; }
.grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
dl > div { border-radius: 14px; padding: 10px 12px; background: rgba(7,26,69,.35); border: 2px solid rgba(255,255,255,.14); min-width: 0; }
dt { font-size: 12px; font-weight: 800; color: #B9C9F5; }
dd { margin: 3px 0 0; font: 700 17px var(--f-mono); overflow-wrap: anywhere; color: var(--white); }
dl small { font-size: 12px; color: #B9C9F5; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
.actions .btn { font: 400 16px/1.1 var(--f-game); letter-spacing: .03em; border: 3px solid var(--navy); border-radius: 16px; padding: 12px 10px; min-height: 52px; cursor: pointer;
  box-shadow: inset 0 -5px 0 rgba(0,0,0,.18), inset 0 3px 0 rgba(255,255,255,.35), var(--bevel); }
.actions .btn.blue { background: linear-gradient(#FFFFFF, #DCE6FF); color: var(--navy); }
.actions .btn.gold { background: linear-gradient(var(--gold-hi), var(--gold)); color: var(--navy); }
.actions .btn:active:not(:disabled) { transform: translateY(4px); box-shadow: inset 0 -2px 0 rgba(0,0,0,.18), 0 1px 0 var(--navy); }
.actions .btn:disabled { filter: grayscale(.6); opacity: .65; cursor: not-allowed; }
.note, .privacy { margin: 0; font-size: 14px; color: #D6E2FF; }
.sample, .notlive { margin: 0; font-size: 13px; font-weight: 900; border-radius: 12px; padding: 8px 12px; }
.sample { background: var(--pink); color: var(--navy); border: 2px solid var(--navy); }
.notlive { background: repeating-linear-gradient(-45deg, rgba(7,26,69,.55) 0 10px, rgba(7,26,69,.35) 10px 20px); color: var(--gold-hi); border: 2px dashed rgba(255,255,255,.35); }
.privacy { border-left: 4px solid var(--gold); padding-left: 10px; }
.note a { color: var(--gold-hi); font-weight: 900; }
details { border-top: 2px dashed rgba(255,255,255,.25); padding-top: 10px; }
summary { cursor: pointer; font: 400 16px var(--f-game); letter-spacing: .02em; min-height: 32px; color: var(--gold-hi); }
details p { font-size: 14px; color: #D6E2FF; font-weight: 700; }
.flow { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 8px; }
.flow li { counter-increment: s; display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: start; background: rgba(7,26,69,.35); border-radius: 14px; padding: 10px; }
.flow li::before { content: counter(s); width: 34px; height: 34px; border-radius: 50%; background: var(--gold); color: var(--navy); border: 3px solid var(--navy); display: grid; place-items: center; font: 400 17px var(--f-game); }
.flow b { color: var(--gold-hi); }
.seg { display: inline-flex; background: rgba(7,26,69,.45); border-radius: 14px; padding: 4px; gap: 4px; width: max-content; }
.seg button { border: 0; background: transparent; color: #D6E2FF; padding: 8px 16px; min-height: 40px; cursor: pointer; font: 400 16px var(--f-game); border-radius: 10px; }
.seg button.on { background: var(--gold); color: var(--navy); box-shadow: 0 3px 0 var(--navy); }
.field { display: grid; gap: 6px; font-size: 13px; font-weight: 900; color: #D6E2FF; }
.input { display: flex; align-items: center; border: 3px solid var(--navy); border-radius: 14px; background: var(--white); padding: 0 12px; box-shadow: inset 0 3px 0 rgba(7,26,69,.12); }
.input i { font-style: normal; font: 700 20px var(--f-mono); color: var(--navy); }
.input input { border: 0; outline: 0; font: 700 22px var(--f-mono); padding: 10px 8px; width: 100%; background: transparent; color: var(--navy); }
.tape { display: grid; gap: 5px; }
.tick { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; padding: 7px 10px; border-radius: 10px; background: rgba(7,26,69,.4); animation: slide .3s ease-out; }
@keyframes slide { from { transform: translateX(-12px); opacity: 0; } }
.tick span:last-child { color: var(--gold-hi); }
.tick.buy span:first-child { color: #7CF0A8; }
.tick.sell span:first-child { color: #FF9BA8; }

.chart { border-radius: 16px; background: var(--white); color: var(--ink); padding: 10px 12px; border: 3px solid var(--navy); box-shadow: 0 4px 0 var(--navy); }
.chart-head, .chart-foot { display: flex; justify-content: space-between; font-size: 12px; font-weight: 800; color: var(--muted); gap: 8px; }
.chart svg { width: 100%; height: 150px; display: block; margin: 6px 0; touch-action: none; }
.chart .line { fill: none; stroke: var(--blue); stroke-width: 3; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.chart .area { fill: rgba(0, 82, 255, .12); }
.chart .cursor { stroke: var(--navy); stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.chart .dot { fill: var(--gold); stroke: var(--navy); stroke-width: 2.5; vector-effect: non-scaling-stroke; }

/* ── bottom menu, places ── */
.menu { position: fixed; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; gap: 6px; padding: 6px; background: var(--navy); border-radius: 18px; box-shadow: 0 6px 0 rgba(7,26,69,.35), var(--lift); }
.tab { display: inline-flex; align-items: center; gap: 8px; border: 0; background: var(--navy-2); color: var(--white); border-radius: 13px; padding: 10px 14px; min-height: 44px; font: 400 15px var(--f-game); letter-spacing: .02em; cursor: pointer; white-space: nowrap; }
.tab:hover { background: #17367F; }
.tab .ico { color: var(--gold); font-size: 18px; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sw { width: 34px; height: 20px; border-radius: 12px; background: #2A3F78; position: relative; transition: .2s; }
.sw::after { content: ''; position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--white); transition: .2s; }
.toggle input:checked + .sw { background: var(--pink); }
.toggle input:checked + .sw::after { left: 17px; }
.toggle input:focus-visible + .sw { outline: 2px solid var(--gold); outline-offset: 2px; }
.places { position: fixed; left: 50%; transform: translateX(-50%); bottom: 84px; background: var(--navy); border-radius: 20px; padding: 12px; width: min(340px, calc(100vw - 32px)); box-shadow: var(--lift); color: var(--white); animation: pop .2s; }
.places p { margin: 2px 4px 8px; font: 400 18px var(--f-game); color: var(--gold); }
.places button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; border-radius: 12px; background: var(--navy-2); color: var(--white); padding: 9px 12px; margin-top: 6px; cursor: pointer; font: 400 16px var(--f-game); min-height: 48px; }
.places button:hover { background: var(--blue); }
.places button i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--white); flex: none; }
.places button small { display: block; font: 800 12px var(--f-body); color: #A9BCF2; }

/* ── minimap ── */
.mapbox { position: fixed; right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); width: 180px; height: 180px; }
#minimap { width: 180px; height: 180px; border-radius: 50%; border: 4px solid var(--navy); box-shadow: 0 6px 0 rgba(7,26,69,.35), var(--lift); background: #cdbb8f; cursor: crosshair; display: block; }
.zoom { position: absolute; left: -22px; top: 50%; transform: translateY(-50%); display: grid; gap: 6px; }
.zoom button { width: 40px; height: 40px; border-radius: 50%; border: 3px solid var(--navy); background: linear-gradient(var(--white), #DCE6FF); color: var(--navy); font: 400 22px/1 var(--f-game); cursor: pointer; box-shadow: 0 3px 0 var(--navy); }
.zoom button:active { transform: translateY(3px); box-shadow: none; }
.panel-host.on ~ .mapbox { opacity: 0; pointer-events: none; }

/* ── action pad ── */
.actions-pad { position: fixed; left: 16px; bottom: max(16px, env(safe-area-inset-bottom)); display: flex; align-items: flex-end; gap: 8px; }
.act { width: 64px; height: 64px; border-radius: 50%; border: 3px solid var(--navy); background: linear-gradient(var(--blue-hi), var(--blue)); color: var(--white); cursor: pointer; display: grid; place-items: center; align-content: center; gap: 0;
  box-shadow: inset 0 -5px 0 rgba(0,0,0,.2), inset 0 3px 0 rgba(255,255,255,.3), var(--bevel); padding: 0; }
.act span { font-size: 22px; line-height: 1; font-family: var(--f-game); }
.act small { font: 800 9px/1 var(--f-body); margin-top: 3px; display: flex; gap: 3px; align-items: center; }
.act.big { width: 78px; height: 78px; background: linear-gradient(var(--gold-hi), var(--gold)); color: var(--navy); }
.act.big span { font-size: 30px; }
.act.on, .act:active { transform: translateY(4px); box-shadow: inset 0 -2px 0 rgba(0,0,0,.2), 0 1px 0 var(--navy); }

.hint { position: fixed; left: 50%; bottom: 92px; transform: translateX(-50%); margin: 0; background: rgba(7,26,69,.85); color: var(--white); padding: 8px 16px; border-radius: 12px; font-size: 13px; font-weight: 800; transition: opacity .6s; white-space: nowrap; pointer-events: none; }
.hint.gone { opacity: 0; }
.stick { position: fixed; width: 116px; height: 116px; margin: -58px 0 0 -58px; border-radius: 50%; border: 4px solid rgba(7,26,69,.7); background: rgba(0,82,255,.18); display: none; pointer-events: none; }
.stick.on { display: block; }
.stick .knob { position: absolute; left: 50%; top: 50%; width: 50px; height: 50px; margin: -25px; border-radius: 50%; background: linear-gradient(var(--gold-hi), var(--gold)); border: 3px solid var(--navy); box-shadow: 0 3px 0 var(--navy); }
.toast { position: fixed; left: 50%; top: 100px; transform: translate(-50%, -20px); background: var(--navy); color: var(--white); padding: 12px 18px; border-radius: 16px; font-weight: 800; opacity: 0; transition: .25s; pointer-events: none; max-width: calc(100vw - 32px); text-align: center; box-shadow: var(--lift); border: 3px solid var(--gold); z-index: 5; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

.loader { position: fixed; inset: 0; display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, var(--blue-hi), var(--blue) 45%, var(--blue-lo)); z-index: 10; transition: opacity .5s; color: var(--white); }
.loader.gone { opacity: 0; pointer-events: none; }
.loader-card { text-align: center; }
.loader-face { width: 140px; height: 140px; margin: 0 auto; border-radius: 50%; padding: 8px; background: conic-gradient(var(--gold) 0 75%, var(--gold-lo) 75%); border: 4px solid var(--navy); box-shadow: 0 8px 0 var(--navy); animation: bob 1.4s ease-in-out infinite; }
.loader-face img { width: 100%; height: 100%; border-radius: 50%; display: block; }
@keyframes bob { 50% { transform: translateY(-8px); } }
.loader-title { font: 400 34px var(--f-game); margin: 22px 0 12px; text-shadow: 0 4px 0 var(--navy); letter-spacing: .02em; }
.loader-bar { width: 220px; height: 16px; margin: 0 auto; border-radius: 10px; background: var(--navy); border: 3px solid var(--navy); overflow: hidden; }
.loader-bar i { display: block; height: 100%; width: 8%; background: linear-gradient(var(--gold-hi), var(--gold)); border-radius: 8px; transition: width .3s; }
.loader-sub { color: #D6E2FF; margin: 12px 0 0; }
.nojs { position: fixed; inset: 0; display: grid; place-items: center; padding: 16px; text-align: center; }

/* ── data view ── */
body.dataview #stage, body.dataview #labels, body.dataview .hint, body.dataview .mapbox, body.dataview .actions-pad { display: none; }
body.dataview { overflow: auto; background: linear-gradient(var(--blue), var(--blue-lo)); }
body.dataview .panel-host { position: static; width: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(420px, 100%), 1fr)); gap: 20px; padding: 110px 16px 100px; height: 100%; overflow: auto; align-items: start; }
body.dataview .panel-host .panel { max-height: none; background: linear-gradient(180deg, var(--blue-hi), var(--blue-lo)); }

/* ── desktop: the action pad is for touch; keys do the job ── */
@media (hover: hover) and (pointer: fine) {
  .actions-pad { opacity: .92; }
  .act { width: 56px; height: 56px; }
  .act.big { width: 64px; height: 64px; }
}

/* ── phones ── */
@media (max-width: 720px) {
  .hud { flex-direction: column; align-items: stretch; gap: 8px; padding: max(10px, env(safe-area-inset-top)) 10px 0; }
  .avatar { width: 52px; height: 52px; padding: 4px; }
  .plate b { font-size: 17px; }
  .bank { gap: 6px; }
  .pill { min-height: 44px; padding: 5px 10px; }
  .pill.price { flex: 0 0 auto; }
  .pill.coin { flex: 1; min-width: 0; }
  .pill b { font-size: 13px; }
  .coin-ico { width: 26px; height: 26px; }
  #hud-connect { padding: 10px 12px; font-size: 14px; }
  .panel-host { top: auto; left: 0; right: 0; bottom: 0; width: 100%; height: 50vh; padding: 0 8px 8px; }
  .panel { border-radius: 24px 24px 18px 18px; }
  .panel h2 { font-size: 22px; }
  dd { font-size: 15px; }
  .actions { grid-template-columns: 1fr; }
  .menu { bottom: auto; top: 128px; left: 10px; transform: none; padding: 4px; border-radius: 14px; }
  .tab { padding: 6px 10px; min-height: 40px; font-size: 13px; }
  .tab .ico { display: none; }
  .places { bottom: auto; top: 180px; left: 10px; transform: none; }
  .mapbox { width: 116px; height: 116px; right: 10px; bottom: max(12px, env(safe-area-inset-bottom)); }
  #minimap { width: 116px; height: 116px; }
  .zoom { left: auto; right: 6px; top: -98px; transform: none; }
  .zoom button { width: 40px; height: 40px; }
  .actions-pad { left: auto; right: 138px; bottom: max(12px, env(safe-area-inset-bottom)); flex-direction: column-reverse; align-items: center; gap: 6px; }
  .act { width: 52px; height: 52px; }
  .act.big { width: 64px; height: 64px; }
  .act small kbd { display: none; }
  .panel-host.on ~ .actions-pad, .panel-host.on ~ .menu { display: none; }
  .hint { top: 186px; white-space: normal; text-align: center; width: max-content; max-width: calc(100vw - 32px); }
  .hint { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ── ?cinema: the promo film captures the world and the mailbox panel, nothing else ── */
body.cinema .hud, body.cinema .menu, body.cinema .mapbox, body.cinema .actions-pad, body.cinema .hint, body.cinema #labels, body.cinema .toast, body.cinema .loader { display: none !important; }
body.cinema .panel-host { top: 120px; right: 110px; bottom: auto; width: 460px; transform: scale(1.35); transform-origin: top right; }
body.cinema .panel .x { visibility: hidden; }
body.cinema .panel, body.cinema .panel * { animation: none !important; }
