/* V3 chrome shares the city's violet shadows and warm practicals.
   Scope stops at the controls: source artwork, people and films receive no CSS treatment. */
html[data-v3="true"] {
  color-scheme:dark;
  --ink:#120d21;
  --space-ink:#020407;
  --ink-2:#21152f;
  --ink-3:#30203f;
  --ink-4:#442950;
  --line:#796784;
  --line-soft:#493455;
  --bone:#fcf6ff;
  --bone-dim:#dfcfe7;
  --bone-faint:#c4b2d0;
  --red:#f490c8;
  --gold:#ffcf99;
  --violet:#c6a9ff;
  --pink:#f6a6e4;
  --cyan:#b8c8ff;
  --bloodr:#ffb2b9;
  --paper:#fcf6ff;
  --paper-ink:#21152f;
  --paper-muted:#695a76;
  --brass:#ffcf99;
  --surface:var(--ink-2);
  --muted:var(--bone-faint);
  --accent:var(--pink);
  --brand-q:var(--pink);
  --brand-brass:var(--gold);
  --brand-teal:var(--cyan);
  --v3-focus:var(--violet);
  --panel-wash:linear-gradient(145deg,var(--ink-3),var(--ink-2) 38%,var(--ink));
  --panel-shadow:0 18px 60px color-mix(in srgb,var(--ink) 68%,transparent);
  --panel-edge:inset 0 1px color-mix(in srgb,var(--bone) 13%,transparent);
}

html[data-v3="true"] :is(#phone,.v2-experience,.venue-dialog,.blvd-dialog,.site-content-dialog) {
  background:var(--panel-wash);
  border-color:var(--line);
  box-shadow:var(--panel-edge),var(--panel-shadow);
}
html[data-v3="true"] :is(.phone-head,.panel-head,.venue-dialog-head,.blvd-dialog-head) {
  background:color-mix(in srgb,var(--ink) 72%,transparent);
  border-color:var(--line-soft);
}
html[data-v3="true"] body.v2-world :is(#music-player,#btn-phone) {
  background:var(--ink-2);
  border-color:var(--line);
  box-shadow:var(--panel-edge),0 5px 18px color-mix(in srgb,var(--ink) 42%,transparent);
}
html[data-v3="true"] body.v2-world #btn-phone svg { stroke:var(--violet); }
html[data-v3="true"] body.v2-world #hud-district b {
  color:var(--bone);
  text-shadow:0 1px 4px var(--ink),0 0 12px var(--ink);
}

html[data-v3="true"] :is(button,a,select,input,summary,[tabindex]):focus-visible {
  outline:2px solid var(--v3-focus);
  outline-offset:-3px;
}
html[data-v3="true"] :is(.btn.primary,.btn.gold,.v2-experience-button.is-primary) {
  background:var(--pink);
  border-color:var(--pink);
  color:var(--ink);
  box-shadow:var(--panel-edge);
}
html[data-v3="true"] :is(.btn.primary,.btn.gold,.v2-experience-button.is-primary):hover {
  background:var(--bone);
  border-color:var(--bone);
}
html[data-v3="true"] body.v2-world #world-tools .phone-app-grid button {
  background:linear-gradient(145deg,var(--ink-3),var(--ink-2));
  border-color:var(--line-soft);
  border-radius:10px;
}
html[data-v3="true"] body.v2-world #world-tools .phone-app-grid button:hover {
  border-color:var(--violet);
  background:var(--ink-3);
}
html[data-v3="true"] :is(.phone-nav button.on,.living-album-chapter[aria-current="true"],.living-album-chapter[aria-pressed="true"]) {
  color:var(--bone);
  border-color:var(--violet);
  background:var(--ink-3);
}
html[data-v3="true"] body.v2-world #player-stop {
  background:var(--ink);
  color:var(--bone-dim);
  border-color:var(--line);
}
html[data-v3="true"] body.v2-world #player-collapse { color:var(--violet); }
html[data-v3="true"] :is(select,input,textarea) { accent-color:var(--violet); }

/* The new palette does not change the established compact layout or add a persistent panel. */
.atmosphere-setting { flex-wrap:wrap;gap:10px; }
.atmosphere-setting .seg { display:flex;flex-wrap:wrap;min-width:0;max-width:100%; }
.atmosphere-setting .seg button { min-height:40px;flex:1 1 auto;padding:8px 10px; }
.atmosphere-note { margin:0;line-height:1.5; }
.atmosphere-location { min-width:0;padding:12px;border:1px solid var(--line-soft);border-radius:10px;background:var(--ink-2); }
.atmosphere-location summary { cursor:pointer;min-height:30px;color:var(--bone);font-weight:600; }
.atmosphere-location p { overflow-wrap:anywhere;line-height:1.5;margin:10px 0; }
.atmosphere-location .actions { flex-wrap:wrap; }
#atmosphere-search { margin:16px 0 10px;min-width:0; }
#atmosphere-search label { display:block;margin-bottom:7px; }
.atmosphere-search-row { display:flex;gap:8px;min-width:0; }
.atmosphere-search-row input { min-width:0;width:100%;flex:1;padding:10px;color:var(--bone);background:var(--ink);border:1px solid var(--line);border-radius:6px;font:inherit; }
.atmosphere-search-row button { flex-shrink:0; }
.atmosphere-results { display:grid;gap:6px;max-height:210px;overflow-y:auto;overscroll-behavior:contain; }
.atmosphere-results button { text-align:left;white-space:normal; }
.atmosphere-attribution { font-size:11px; }
.atmosphere-attribution a { color:var(--bone-dim);text-underline-offset:3px; }
@media (prefers-contrast:more) {
  html[data-v3="true"] { --line:var(--bone-dim); --line-soft:var(--bone-faint); }
}
@media (forced-colors:active) {
  html[data-v3="true"] :is(#phone,.v2-experience,#music-player,#btn-phone,button) {
    box-shadow:none;
    border-color:CanvasText;
  }
}

/* Keep the globe and real landing visible; only the small status and skip remain. */
html[data-v3="true"] #loading.arrival-live {
  background:transparent;
  grid-template-rows:1fr auto;
  padding:24px 24px max(28px,env(safe-area-inset-bottom));
  touch-action:none;
}
html[data-v3="true"] #loading.arrival-live .load-in {
  align-self:end;
  gap:10px;
  padding:16px 22px;
  background:radial-gradient(ellipse,var(--ink),transparent 72%);
  pointer-events:none;
}
html[data-v3="true"] #loading.arrival-live .load-in::before { display:none; }
html[data-v3="true"] #loading.arrival-live .load-in b { font-size:20px;letter-spacing:.2em; }
html[data-v3="true"] #loading.arrival-live .load-bar { width:100px;opacity:.65; }
html[data-v3="true"] #loading.arrival-live .load-bar i { background:var(--gold); }
html[data-v3="true"] #loading.arrival-live:not([data-phase="loading"]) .load-bar { visibility:hidden; }
html[data-v3="true"] #loading.arrival-live .load-in span { color:var(--bone);text-shadow:0 1px 8px var(--ink); }
html[data-v3="true"] #arrival-skip {
  position:absolute;top:max(18px,env(safe-area-inset-top));right:max(18px,env(safe-area-inset-right));
  min-height:44px;padding:10px 16px;border:1px solid var(--line);border-radius:24px;
  font:12px/1.3 var(--f-body);letter-spacing:.03em;color:var(--bone);background:var(--ink);
  cursor:pointer;opacity:.85;
}
html[data-v3="true"] #arrival-skip[hidden] { display:none; }
html[data-v3="true"] #arrival-skip:focus-visible { outline:2px solid var(--gold);outline-offset:3px;opacity:1; }
html[data-v3="true"] #arrival-skip:disabled { cursor:default;opacity:.6; }
@media (max-height:500px) {
  html[data-v3="true"] #loading.arrival-live { padding-bottom:10px; }
  html[data-v3="true"] #loading.arrival-live .load-in { padding:8px 16px;gap:5px; }
  html[data-v3="true"] #loading.arrival-live .load-in b { font-size:16px; }
}

/* The arcade fills the available view; controls occupy its edges, not the course. */
html[data-v3="true"] #panel .venue-dialog.suli-run-dialog[open] {
  width:100vw; max-width:100vw; height:100dvh; max-height:100dvh; margin:0;
  padding:0; border:0; border-radius:0; overflow:hidden;
}
.suli-run-dialog > header { height:52px; min-height:52px; padding:4px 14px; box-sizing:border-box; }
.suli-run-dialog > header h3 { font-size:22px; }
.suli-run-dialog > header button { width:40px; min-height:40px; }
.suli-run-dialog .venue-dialog-body { padding:0; overflow:hidden; flex:1; min-height:0; }
.suli-run-shell { width:100%; max-width:none; padding:0; min-width:0; }
.suli-run-shell > .actions { margin:0; padding:6px 12px; min-height:42px; box-sizing:border-box; }
.suli-run-shell > .actions .note { display:none; }
.suli-run-stage { height:min(78dvh,850px); min-height:320px; aspect-ratio:auto; border:0; border-radius:0; isolation:isolate; }
.suli-run-dialog .suli-run-stage { height:calc(100dvh - 94px); min-height:0; }
.suli-run-ui { position:absolute; inset:0; color:var(--bone); pointer-events:none; }
.suli-run-ui [hidden] { display:none!important; }
.suli-run-ui button { pointer-events:auto; touch-action:manipulation; }
.run-hud { position:absolute; inset:14px 16px auto; display:flex; align-items:flex-start; gap:20px; font-family:var(--f-mono); text-shadow:0 2px 6px var(--ink); }
.run-hud > div:first-child { display:grid; grid-template-columns:auto auto; gap:3px 12px; align-items:baseline; }
.run-hud small { grid-column:1/-1; font-size:10px; letter-spacing:.14em; }
.run-hud [data-score] { font-family:var(--f-display); font-size:38px; line-height:1; }
.run-hud [data-distance] { font-size:12px; color:var(--bone-dim); }
.run-collection { margin-left:auto; text-align:right; display:grid; gap:5px; font-size:14px; }
.run-collection b { color:var(--gold); }
.run-collection span { font-size:10px; color:var(--cyan); }
.run-pause { width:42px; height:42px; border:1px solid var(--line); border-radius:50%; color:var(--bone); background:color-mix(in srgb,var(--ink) 65%,transparent); font:600 15px var(--f-mono); }
.run-intro { position:absolute; inset:auto auto 26px 24px; width:320px; max-width:calc(100% - 48px); margin:0; box-sizing:border-box; text-align:center; padding:22px 26px; border:1px solid var(--line-soft); border-radius:18px; background:linear-gradient(160deg,color-mix(in srgb,var(--ink-2) 94%,transparent),color-mix(in srgb,var(--ink) 92%,transparent)); box-shadow:0 10px 50px color-mix(in srgb,var(--ink) 65%,transparent); }
.run-kicker { color:var(--gold); font:10px var(--f-mono); letter-spacing:.24em; }
.run-intro h2 { font:900 clamp(34px,5vw,62px)/1 var(--f-display); margin:8px 0; letter-spacing:.02em; }
.run-intro p { font-size:14px; margin:8px 0 16px; color:var(--bone-dim); }
.run-intro .btn { min-height:46px; padding:10px 30px; }
.run-instructions { margin-top:16px; font:11px/1.6 var(--f-mono); color:var(--bone-faint); }
.run-instructions span { display:block; }
.run-instructions span:last-child { display:none; }
.run-notice { position:absolute; top:100px; left:16px; right:16px; text-align:center; font:700 17px var(--f-display); letter-spacing:.12em; color:var(--gold); text-shadow:0 2px 10px var(--ink); }
.run-touch { display:none; position:absolute; bottom:max(16px,env(safe-area-inset-bottom)); left:16px; right:16px; justify-content:space-between; }
.run-touch button { min-width:70px; height:46px; padding:8px 14px; background:color-mix(in srgb,var(--ink) 60%,transparent); color:var(--bone); border:1px solid var(--line); border-radius:24px; font:700 16px var(--f-display); }
.suli-run-stage .game-over { z-index:5; overflow:auto; background:color-mix(in srgb,var(--ink) 88%,transparent); }
@media (pointer:coarse), (max-width:650px) {
  .run-touch { display:flex; }
  .run-instructions span:first-child { display:none; }
  .run-instructions span:last-child { display:block; }
  .run-hud { inset:12px 12px auto; gap:10px; }
  .run-hud [data-score] { font-size:32px; }
  .run-intro { inset:auto 12px 14px; width:auto; max-width:none; padding:16px; }
  .run-intro h2 { font-size:40px; }
  .run-intro p { font-size:13px; }
  .run-instructions { margin-top:10px; font-size:10px; }
  .suli-run-stage { height:75dvh; }
  .suli-run-stage .game-over { padding:16px; gap:8px; }
  .suli-run-stage .game-over .go-stats { gap:14px; }
  .suli-run-stage .game-over .actions { flex-wrap:wrap; justify-content:center; }
}
@media (max-height:500px) and (orientation:landscape) {
  .run-intro { left:auto; right:18px; bottom:14px; width:min(46vw,430px); padding:14px; }
  .run-intro h2 { font-size:34px; }
  .run-intro p { margin:6px 0 10px; }
  .run-instructions { font-size:9px; margin-top:8px; }
  .suli-run-dialog > header { height:42px; min-height:42px; }
  .suli-run-shell > .actions { min-height:36px; padding:3px 10px; }
  .suli-run-dialog .suli-run-stage { height:calc(100dvh - 78px); }
}

/* Venue sheets have older high-specificity height rules; the runner owns this viewport. */
html[data-v3="true"] #panel .suli-run-dialog > header { height:42px; min-height:42px; padding:2px 12px; background:var(--ink); color:var(--bone); }
html[data-v3="true"] #panel .suli-run-dialog > header h3 { font-size:20px; }
html[data-v3="true"] #panel .suli-run-dialog > header button { width:34px; height:34px; min-height:34px; padding:4px; }
html[data-v3="true"] #panel .suli-run-dialog .venue-dialog-body { display:flex; padding:0; min-height:0; overflow:hidden; }
html[data-v3="true"] #panel .suli-run-shell { display:flex; flex-direction:column; flex:1; min-height:0; }
html[data-v3="true"] #panel .suli-run-shell > .actions { flex:none; height:40px; min-height:40px; padding:3px 12px; }
html[data-v3="true"] #panel .suli-run-shell > .actions button { min-height:32px; height:32px; padding:3px 12px; font-size:12px; }
html[data-v3="true"] #panel .suli-run-stage { flex:1; height:auto; min-height:0; }
html[data-v3="true"] #panel .suli-run-dialog .venue-dialog-body > div { display:flex; flex:1; min-width:0; min-height:0; overflow:hidden; }

/* REIGN CIRCUIT: compact instrument readouts frame the course, never its center. */
.suli-run-ui { color:var(--run-white); background:linear-gradient(180deg,color-mix(in srgb,var(--run-ink) 65%,transparent),transparent 24%,transparent 76%,color-mix(in srgb,var(--run-ink) 48%,transparent)); }
.suli-run-ui .run-hud { flex-wrap:wrap; row-gap:8px; }
.suli-run-ui .run-hud small { color:var(--run-cyan); font-size:9px; }
.suli-run-ui .run-hud [data-score] { font-family:var(--f-mono); font-size:32px; font-weight:500; letter-spacing:-.04em; }
.suli-run-ui .run-hud [data-distance] { color:var(--run-white); }
.suli-run-ui .run-integrity { grid-column:1/-1; display:flex; gap:4px; margin-top:3px; }
.suli-run-ui .run-integrity i { width:23px; height:4px; background:var(--run-cyan); transform:skewX(-20deg); }
.suli-run-ui .run-integrity[data-health="2"] i:nth-child(3),.suli-run-ui .run-integrity[data-health="1"] i:nth-child(n+2),.suli-run-ui .run-integrity[data-health="0"] i { opacity:.2; }
.suli-run-ui .run-integrity[data-health="1"] i:first-child { background:var(--run-hot); }
.suli-run-ui .run-collection b { color:var(--run-white); }
.suli-run-ui .run-collection span { color:var(--run-cyan); }
.suli-run-ui .run-objective { flex:0 0 100%; display:flex; gap:12px; font-size:10px; color:var(--run-white); opacity:.8; }
.suli-run-ui .run-objective [data-mission-progress] { color:var(--run-cyan); }
.suli-run-ui .run-pause { border-radius:10px; width:38px; height:38px; border-color:color-mix(in srgb,var(--run-cyan) 28%,transparent); background:color-mix(in srgb,var(--run-ink) 65%,transparent); }
.suli-run-ui .run-intro { border-radius:2px 24px 2px 24px; text-align:left; border-color:color-mix(in srgb,var(--run-cyan) 42%,transparent); background:linear-gradient(130deg,color-mix(in srgb,var(--run-ink) 96%,transparent),color-mix(in srgb,var(--run-ink) 85%,transparent)); border-left:3px solid var(--run-cyan); }
.suli-run-ui .run-kicker { color:var(--run-cyan); }
.suli-run-ui .run-intro h2 { font-style:italic; }
html[data-v3="true"] .suli-run-ui .run-intro .btn.primary { background:var(--run-cyan); border-color:var(--run-cyan); color:var(--run-ink); width:100%; border-radius:3px 12px 3px 12px; }
.suli-run-ui .run-notice { top:114px; font-size:14px; color:var(--run-cyan); pointer-events:none; }
.suli-run-ui .run-drive { position:absolute; bottom:max(18px,env(safe-area-inset-bottom)); left:50%; transform:translateX(-50%); width:158px; text-align:center; }
.suli-run-ui .run-drive button { position:relative; overflow:hidden; width:100%; min-height:46px; padding:8px 12px 12px; display:flex; align-items:center; justify-content:space-between; gap:8px; border:1px solid color-mix(in srgb,var(--run-cyan) 35%,transparent); border-radius:4px 13px 4px 13px; background:color-mix(in srgb,var(--run-ink) 82%,transparent); color:var(--run-white); font:10px var(--f-mono); }
.suli-run-ui .run-drive button:disabled { opacity:.8; cursor:default; }
.suli-run-ui .run-drive button[data-ready="true"] { border-color:var(--run-charge); color:var(--run-charge); box-shadow:0 0 18px color-mix(in srgb,var(--run-charge) 20%,transparent); }
.suli-run-ui .run-drive button[data-active="true"] { border-color:var(--run-violet); }
.suli-run-ui .run-drive button i { position:absolute; bottom:0; left:0; width:100%; height:3px; transform-origin:left; background:var(--run-cyan); transition:transform .1s linear; }
.suli-run-ui .run-drive button[data-ready="true"] i { background:var(--run-charge); }
.suli-run-ui .run-drive small { display:block; position:absolute; bottom:calc(100% + 7px); width:100%; font:8px var(--f-mono); color:var(--run-charge); }
.suli-run-ui .run-touch button { border-radius:12px 3px 12px 3px; min-width:68px; border-color:color-mix(in srgb,var(--run-cyan) 38%,transparent); background:color-mix(in srgb,var(--run-ink) 80%,transparent); color:var(--run-white); }
@media (max-width:420px) { .suli-run-ui .run-drive { width:140px; } .suli-run-ui .run-touch { left:10px; right:10px; } .suli-run-ui .run-touch button { min-width:60px; padding:8px 10px; } }
@media (max-height:500px) and (orientation:landscape) { .suli-run-ui .run-hud { inset:8px 14px auto; row-gap:5px; } .suli-run-ui .run-hud [data-score] { font-size:26px; } .suli-run-ui .run-notice { top:84px; font-size:12px; } .suli-run-ui .run-drive { bottom:10px; } }
@media (prefers-reduced-motion:reduce) { .suli-run-ui .run-drive button i { transition:none; } }

/* Space precedes the single textured Earth; there is no substitute planet. */
html[data-v3="true"] #loading:not(.arrival-live) {
  overflow:hidden;background:var(--space-ink);
  grid-template-rows:1fr auto;padding:24px 24px max(28px,env(safe-area-inset-bottom));
}
html[data-v3="true"] #loading:not(.arrival-live) .load-in { position:relative;align-self:end;gap:10px;z-index:1; }
html[data-v3="true"] #loading .load-in::before { display:none; }
.arrival-boot { position:absolute;inset:0;pointer-events:none;background-image:radial-gradient(circle at 12% 22%,var(--bone) 0 .7px,transparent 1.2px),radial-gradient(circle at 81% 72%,var(--gold) 0 .8px,transparent 1.4px);background-size:149px 197px,237px 281px; }
html[data-v3="true"] #loading.arrival-live .arrival-boot,
html[data-v3="true"] #loading.load-error .arrival-boot { display:none; }
@media(max-height:500px) { html[data-v3="true"] #loading:not(.arrival-live) { padding-bottom:10px; } }

/* Sports share the venue palette; game controls stay at the edges of the view. */
html[data-v3="true"] #panel .venue-dialog.arcade-sports-dialog[open] {
  width:min(900px,calc(100vw - 24px)); max-width:calc(100vw - 24px);
  max-height:calc(100dvh - 24px); padding:0; overflow:hidden;
}
.arcade-sports-dialog > header { flex:0 0 auto; padding:8px 16px; min-height:48px; }
.arcade-sports-dialog > header h3 { margin:0; font-size:24px; }
.arcade-sports-dialog > header button { width:36px; height:36px; min-height:36px; padding:2px; }
.arcade-sports-dialog .venue-dialog-body { min-height:0; min-width:0; overflow:auto; padding:0; overscroll-behavior:contain; }
.arcade-lobby { padding:24px; min-width:0; color:var(--bone); }
.arcade-lobby h2 { font-size:clamp(26px,5vw,44px); margin:0; line-height:1.1; }
.arcade-lobby h3 { font-size:26px; margin:10px 0; }
.arcade-lobby h4 { font-size:20px; margin:20px 0 10px; }
.arcade-lobby p { line-height:1.5; }
.sports-lobby-intro { margin-bottom:20px; }
.sports-game-choices { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.sports-game-choice { min-width:0; display:flex; flex-direction:column; align-items:flex-start; gap:8px; text-align:left; padding:18px 12px; border:1px solid var(--muted); }
.sports-game-choice b { font-family:var(--f-display); font-size:22px; }
.sports-game-choice span { font-family:var(--f-mono); font-size:12px; }
.sports-game-choice[aria-pressed="true"] { border-color:var(--gold); background:var(--surface); box-shadow:inset 0 -3px var(--gold); }
.sports-description { min-height:3em; font-size:15px; }
.sports-actions { display:flex; flex-wrap:wrap; gap:10px; margin:12px 0; min-width:0; }
.arcade-lobby button { min-height:44px; white-space:normal; }
.arcade-lobby .sports-primary { background:var(--bone); color:var(--ink); border-color:var(--bone); }
.sports-consent { display:flex; align-items:flex-start; gap:12px; margin:20px 0; font-size:14px; line-height:1.5; }
.sports-consent input { flex:0 0 auto; width:20px; height:20px; margin-top:2px; accent-color:var(--gold); }
.sports-note { font-size:13px; color:var(--muted); }
.sports-error { border-left:3px solid var(--gold); padding:10px 14px; background:var(--surface); }
.sports-person { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px; padding:10px 0; border-bottom:1px solid var(--surface); }
.sports-person > span { overflow-wrap:anywhere; flex:1; min-width:100px; }
.sports-players { padding:0; list-style:none; }
.sports-players li { padding:8px 0; overflow-wrap:anywhere; }
html[data-v3="true"] #panel .venue-dialog.arcade-game-active[open] { width:100vw; max-width:100vw; height:100dvh; max-height:100dvh; margin:0; border:0; border-radius:0; }
.arcade-game-active > header { height:40px; min-height:40px; padding:2px 10px; }
.arcade-game-active > header h3 { font-size:18px; }
.arcade-game-active .venue-dialog-body { display:flex; flex:1; overflow:hidden; }
.arcade-lobby.sports-in-game { flex:1; display:flex; min-height:0; padding:0; }
.sports-game-host { position:relative; flex:1; display:flex; min-width:0; min-height:0; overflow:hidden; }
.arcade-sport { position:relative; width:100%; height:100%; flex:1; min-width:0; min-height:0; overflow:hidden; isolation:isolate; background:var(--ink); }
.arcade-sport-viewport { position:absolute; inset:0; }
.arcade-sport-viewport canvas { display:block; width:100%; height:100%; touch-action:none; }
.arcade-sport-hud { position:absolute; left:max(14px,env(safe-area-inset-left)); right:max(14px,env(safe-area-inset-right)); top:12px; display:flex; align-items:flex-start; gap:12px; pointer-events:none; text-shadow:0 2px 5px var(--ink); }
.arcade-sport-title { font-family:var(--f-display); font-size:20px; }
.arcade-sport-score { font-family:var(--f-mono); font-size:20px; font-variant-numeric:tabular-nums; white-space:pre-line; }
.arcade-sport-status { font-size:13px; flex:1; min-width:0; }
.arcade-sport-exit { pointer-events:auto; margin-left:auto; min-height:40px; font-size:12px; background:var(--ink); padding:8px 12px; }
.arcade-sport-controls { position:absolute; inset:0; pointer-events:none; }
.arcade-sport-controls button,.arcade-sport-controls input,.arcade-sport-controls label { pointer-events:auto; touch-action:none; }
.arcade-sport-pad { position:absolute; left:max(18px,env(safe-area-inset-left)); bottom:max(25px,env(safe-area-inset-bottom)); display:grid; grid-template-columns:repeat(3,44px); grid-template-rows:repeat(2,44px); gap:4px; }
.arcade-sport-pad button { padding:0; min-height:44px; background:var(--ink); border-color:var(--muted); }
.arcade-sport-pad button:first-child { grid-column:2; }
.arcade-sport-pad button:nth-child(2) { grid-column:1; }
.arcade-sport-action { position:absolute; right:max(18px,env(safe-area-inset-right)); bottom:max(28px,env(safe-area-inset-bottom)); width:94px; height:70px; border-radius:24px; color:var(--ink); background:var(--bone); font-family:var(--f-display); font-size:24px; }
.arcade-sport-defend { position:absolute; right:max(22px,env(safe-area-inset-right)); bottom:112px; font-size:14px; min-height:44px; background:var(--ink); }
.arcade-sport-power { position:absolute; right:24px; bottom:192px; width:80px; height:9px; accent-color:var(--gold); }
.arcade-sport-release-mark { position:absolute; right:24px; bottom:190px; width:80px; height:13px; pointer-events:none; background:linear-gradient(90deg,transparent 44.58%,var(--bone) 44.58%,var(--bone) 47.08%,transparent 47.08%); }
.arcade-sport-release-mark[hidden] { display:none; }
.arcade-sport-slider { position:absolute; bottom:40px; left:50%; width:min(24vw,190px); transform:translateX(-50%); display:grid; gap:5px; font-size:12px; text-shadow:0 2px 4px var(--ink); }
.arcade-sport-slider + .arcade-sport-slider { bottom:106px; }
.arcade-sport-slider input { width:100%; margin:0; min-height:30px; accent-color:var(--gold); }
.arcade-sport-hint { position:absolute; left:20%; right:20%; bottom:6px; margin:0; text-align:center; font-size:11px; pointer-events:none; text-shadow:0 2px 4px var(--ink); }
.arcade-sport-overlay { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:14px; padding:24px; text-align:center; background:color-mix(in srgb,var(--ink) 88%,transparent); }
.arcade-sport-overlay[hidden] { display:none; }
.arcade-sport-overlay h2 { font-family:var(--f-display); font-size:clamp(28px,5vw,52px); margin:0; }
.arcade-sport-overlay p { max-width:440px; line-height:1.5; }
.arcade-sport-start { min-height:48px; min-width:150px; padding:12px 24px; color:var(--ink); background:var(--bone); }
@media(max-width:600px) {
  .arcade-lobby { padding:18px 14px; }
  .sports-game-choices { gap:6px; }
  .sports-game-choice { padding:14px 8px; }
  .sports-game-choice b { font-size:17px; }
  .sports-game-choice span { font-size:10px; }
  .arcade-sport-hud { gap:8px; top:8px; }
  .arcade-sport-title { display:none; }
  .arcade-sport-score { font-size:16px; }
  .arcade-sport-status { font-size:11px; }
  .arcade-sport-pad { grid-template-columns:repeat(3,38px); grid-template-rows:repeat(2,44px); left:12px; }
  .arcade-sport-action { right:12px; width:80px; height:66px; font-size:20px; }
  .arcade-sport-slider { bottom:140px; width:140px; }
  .arcade-sport-slider + .arcade-sport-slider { bottom:205px; }
  .arcade-sport-hint { left:8px; right:8px; font-size:10px; }
}
@media(max-height:500px) {
  .arcade-sport-hud { top:6px; }
  .arcade-sport-hint { display:none; }
  .arcade-sport-pad { bottom:10px; }
  .arcade-sport-action { bottom:12px; height:58px; }
  .arcade-sport-defend { bottom:78px; }
  .arcade-sport-power { bottom:137px; }
  .arcade-sport-release-mark { bottom:135px; }
  .arcade-sport-slider { bottom:22px; width:150px; }
  .arcade-sport-slider + .arcade-sport-slider { bottom:80px; }
}

.arcade-sport [hidden] { display:none!important; }
.arcade-sport-scorecard { position:absolute; top:62px; left:50%; transform:translateX(-50%); width:min(580px,calc(100% - 24px)); display:grid; grid-template-columns:repeat(10,minmax(0,1fr)); gap:1px; background:var(--line); border:1px solid var(--line); border-radius:6px; overflow:hidden; pointer-events:none; }
.arcade-sport-frame { display:grid; grid-template-rows:14px 18px 18px; gap:2px; text-align:center; font:11px var(--f-mono); background:color-mix(in srgb,var(--ink) 88%,transparent); padding:4px 1px; }
.arcade-sport-frame small { font-size:9px; color:var(--muted); }
.arcade-sport-frame strong { color:var(--gold); }
@media(max-height:500px) { .arcade-sport-scorecard { top:46px; width:min(500px,55%); } .arcade-sport-frame { grid-template-rows:10px 13px 13px; gap:0; padding:2px 0; font-size:10px; } }

.arcade-sport-pad { display:block; width:108px; height:108px; border:1px solid var(--line); border-radius:50%; background:color-mix(in srgb,var(--ink) 62%,transparent); touch-action:none; pointer-events:auto; }
.arcade-sport-thumb { position:absolute; left:50%; top:50%; width:40px; height:40px; border-radius:50%; background:color-mix(in srgb,var(--bone) 65%,transparent); transform:translate(-50%,-50%); pointer-events:none; }
@media(max-height:500px) { .arcade-sport-pad { width:92px; height:92px; } }
@media(max-width:600px) {
  .arcade-sport-hud { display:grid; grid-template-columns:minmax(0,1fr) auto; }
  .arcade-sport-score { grid-column:1; grid-row:1; min-width:0; font-size:13px; overflow-wrap:anywhere; }
  .arcade-sport-exit { grid-column:2; grid-row:1; width:92px; margin:0; font-size:10px; }
  .arcade-sport-status { grid-column:1/-1; grid-row:2; font-size:11px; }
}

/* Sports controls sit over the existing venue; the hall owns the only canvas. */
.venue-inline-sport-host { position:absolute; inset:0; z-index:12; pointer-events:none; }
.venue-inline-sport-host[hidden],.venue-sport-cancel[hidden] { display:none!important; }
.venue-inline-sport-host .sports-game-host { width:100%; height:100%; }
.arcade-sport.is-embedded { background:transparent; pointer-events:none; isolation:auto; }
.arcade-sport.is-embedded .arcade-sport-viewport { display:none; }
.arcade-sport.is-embedded .arcade-sport-hud { top:68px; padding:8px 10px; border-radius:12px; background:color-mix(in srgb,var(--ink) 68%,transparent); }
.arcade-sport.is-embedded .arcade-sport-hint { background:color-mix(in srgb,var(--ink) 66%,transparent); border-radius:8px; padding:7px 10px; width:fit-content; max-width:calc(100% - 40px); margin:0 auto; }
.arcade-sport.is-embedded .arcade-sport-overlay { inset:auto; left:50%; top:50%; transform:translate(-50%,-50%); width:min(320px,calc(100% - 40px)); box-sizing:border-box; border:1px solid var(--line); border-radius:18px; padding:18px; background:color-mix(in srgb,var(--ink) 80%,transparent); pointer-events:auto; }
.arcade-sport.is-embedded .arcade-sport-overlay p { margin:0; }
.arcade-sport.is-embedded .arcade-sport-scorecard { top:128px; }
.venue-sport-active > .scene-menu,.venue-sport-active > .movement-pace,.venue-sport-active > .venue-controls,
.venue-sport-routing > .scene-menu,.venue-sport-routing > .movement-pace,.venue-sport-routing > .venue-controls { display:none!important; }
.venue-sport-active > .scene-feedback { display:none; }
.venue-sport-cancel { position:absolute; z-index:14; right:18px; bottom:24px; padding:10px 16px; border:1px solid var(--line); border-radius:12px; background:var(--ink); color:var(--bone); }
@media(max-width:520px) {
  .arcade-sport.is-embedded .arcade-sport-hud { top:64px; left:8px; right:8px; padding:7px; }
  .arcade-sport.is-embedded .arcade-sport-scorecard { top:146px; }
  .arcade-sport.is-embedded .arcade-sport-hint { display:none; }
}
@media(max-height:500px) {
  .arcade-sport.is-embedded .arcade-sport-hud { top:52px; }
  .arcade-sport.is-embedded .arcade-sport-scorecard { top:102px; }
}

.arcade-sport.is-embedded .arcade-sport-hud { width:fit-content; max-width:calc(100% - 28px); right:auto; box-sizing:border-box; align-items:center; gap:10px; }
.arcade-sport.is-embedded .arcade-sport-title { display:none; }
.arcade-sport.is-embedded .arcade-sport-score { font-size:15px; }
.arcade-sport.is-embedded .arcade-sport-status { font-size:11px; max-width:180px; }
@media(max-width:520px) { .arcade-sport.is-embedded .arcade-sport-hud { width:calc(100% - 16px); max-width:none; } .arcade-sport.is-embedded .arcade-sport-score { font-size:12px; } }

@media(max-width:520px) {
  .arcade-sport.is-embedded[data-game="bowling"] .arcade-sport-slider { left:12px; bottom:30px; width:104px; transform:none; }
  .arcade-sport.is-embedded[data-game="bowling"] .arcade-sport-slider + .arcade-sport-slider { bottom:96px; }
}

@media(max-width:520px) {
  .arcade-sport.is-embedded[data-game="basketball"] .arcade-sport-hud { column-gap:8px; row-gap:3px; }
  .arcade-sport.is-embedded[data-game="basketball"] .arcade-sport-score { line-height:1.25; }
  .arcade-sport.is-embedded[data-game="basketball"] .arcade-sport-status { grid-column:1; grid-row:2; line-height:1.2; }
  .arcade-sport.is-embedded[data-game="basketball"] .arcade-sport-exit { grid-row:1/3; min-height:44px; padding:6px 10px; }
}

/* Stop Playing restores venue navigation; duplicating it above the score hides the rim. */
.venue-panel:has(.venue-sport-active .arcade-sport[data-game="basketball"]) .panel-head { display:none; }
.arcade-sport.is-embedded[data-game="basketball"] .arcade-sport-hud { top:max(8px,env(safe-area-inset-top)); }

/* Always reachable when a slow network, blocked script or lost renderer holds the arrival. */
html[data-v3="true"] #loading .launch-browse {
  position:absolute;left:max(12px,env(safe-area-inset-left));top:max(12px,env(safe-area-inset-top));
  z-index:2;display:inline-flex;align-items:center;min-height:44px;padding:0 12px;
  color:var(--bone);font:13px var(--f-body);text-decoration:underline;text-underline-offset:4px;
  background:var(--ink);border-radius:22px;
}
html[data-v3="true"] .launch-noscript { position:fixed;inset:0;z-index:9999;display:grid;align-content:center;padding:8vw;background:var(--ink);color:var(--bone); }
html[data-v3="true"] .launch-noscript a { color:var(--gold);padding:12px 0; }
