:root {
  color-scheme: light dark;
  --blue: #0a7afc;
  --blue-soft: rgba(10, 122, 252, .12);
  --bg: #ffffff;
  --tile: #f2f6fc;
  --line: #dbe4f0;
  --text: #0f1a2b;
  --muted: #5b6b82;
  --sky1: #081226; --sky2: #0f2147;
}
@media (prefers-color-scheme: dark) {
  :root {
    --blue: #4a9bff; --blue-soft: rgba(74, 155, 255, .16);
    --bg: #0d1526; --tile: #15213a; --line: #243455; --text: #eaf1fb; --muted: #94a5bf;
    --sky1: #050b19; --sky2: #0b1a3a;
  }
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.38 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-text-size-adjust: 100%; padding-bottom: 58px; }
main { max-width: 600px; margin: 0 auto; padding: 12px 12px 8px; }
h1 { margin: 0; font-size: 16.5px; font-weight: 760; letter-spacing: -.01em; }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.top { display: flex; align-items: center; gap: 8px; }
.ic-brand { color: var(--blue); width: 22px; height: 22px; }
.asof { margin-left: auto; font-size: 11.5px; color: var(--muted); white-space: nowrap; }

/* zoom levels */
.levels { display: flex; gap: 5px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; }
.levels::-webkit-scrollbar { display: none; }
.levels button { border: 1px solid var(--line); background: transparent; color: inherit; font: inherit; font-size: 12.5px; font-weight: 650; padding: 5px 10px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.levels button[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }

/* the map */
.stage { position: relative; margin-top: 8px; border-radius: 16px; overflow: hidden; background: radial-gradient(circle at 50% 50%, var(--sky2), var(--sky1) 72%); aspect-ratio: 1 / 1; max-height: 52vh; width: 100%; touch-action: none; user-select: none; -webkit-user-select: none; }
#map { width: 100%; height: 100%; display: block; cursor: grab; }
#map.drag { cursor: grabbing; }
#map text { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; pointer-events: none; }
#map .hit { cursor: pointer; }
#map .hit:hover { filter: brightness(1.25); }
#map .sel { stroke: #fff; stroke-width: var(--sw, 2); }
.zoom { position: absolute; right: 8px; bottom: 8px; display: flex; flex-direction: column; gap: 6px; }
.zoom button { width: 34px; height: 34px; border-radius: 10px; border: 1px solid rgba(255,255,255,.25); background: rgba(8,18,38,.7); color: #fff; display: grid; place-items: center; cursor: pointer; }
.hint { position: absolute; left: 10px; bottom: 10px; font-size: 11.5px; color: rgba(255,255,255,.72); background: rgba(8,18,38,.55); padding: 3px 8px; border-radius: 8px; transition: opacity .6s; pointer-events: none; }

/* explanation card */
.card { margin-top: 10px; background: var(--tile); border-radius: 14px; padding: 12px 13px; min-height: 120px; }
.card .eyebrow { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--blue); }
.card h2 { margin: 2px 0 6px; font-size: 17px; font-weight: 780; letter-spacing: -.01em; }
.card p { margin: 0 0 8px; font-size: 14px; }
.card p:last-child { margin-bottom: 0; }
.card code, .words code { font: 12.5px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--blue-soft); padding: 1px 5px; border-radius: 5px; word-break: break-all; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 2px; }
.chip { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 5px 9px; font-size: 12px; color: var(--muted); font-weight: 600; }
.chip b { display: block; font-size: 16px; color: var(--text); font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.nav { display: flex; gap: 8px; margin-top: 10px; }
.nav button { flex: 1; border: 1px solid var(--line); background: var(--bg); color: inherit; font: inherit; font-size: 13.5px; font-weight: 700; padding: 7px 10px; border-radius: 10px; cursor: pointer; }
.nav button.go { background: var(--blue); border-color: var(--blue); color: #fff; }
.nav button:disabled { opacity: .4; cursor: default; }
.uri { display: flex; flex-wrap: wrap; gap: 2px; font: 12.5px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; margin: 6px 0 8px; }
.uri button { border: 0; border-radius: 6px; padding: 1px 4px; font: inherit; cursor: pointer; color: #fff; }

/* glossary */
.q { display: flex; align-items: center; gap: 8px; margin-top: 12px; border: 1.5px solid var(--line); border-radius: 12px; padding: 0 12px; background: var(--bg); }
.q:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.q .ic { color: var(--muted); }
.q input { flex: 1; border: 0; outline: 0; background: transparent; color: inherit; font: inherit; padding: 10px 0; min-width: 0; }
.words { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.words li { background: var(--tile); border-radius: 12px; padding: 10px 12px; }
.words h3 { margin: 0 0 3px; font-size: 14.5px; font-weight: 760; display: flex; align-items: baseline; gap: 8px; }
.words h3 span { font-size: 11.5px; color: var(--muted); font-weight: 650; }
.words p { margin: 0; font-size: 13.5px; }
.words button { margin-top: 6px; border: 0; background: none; color: var(--blue); font: inherit; font-size: 13px; font-weight: 700; padding: 0; cursor: pointer; }
.empty { color: var(--muted); font-size: 13.5px; padding: 10px 2px; }

/* numbers */
.big { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 12px; }
.kpi { background: var(--tile); border-radius: 12px; padding: 10px; }
.kpi b { display: block; font-size: 22px; font-weight: 820; color: var(--blue); letter-spacing: -.015em; font-variant-numeric: tabular-nums; }
.kpi span { font-size: 12px; color: var(--muted); font-weight: 600; }
.block { background: var(--tile); border-radius: 12px; padding: 11px 12px; margin-top: 10px; }
.block h3 { margin: 0 0 8px; font-size: 14px; font-weight: 760; }
.bar { display: grid; grid-template-columns: 34% 1fr auto; gap: 8px; align-items: center; font-size: 12.5px; margin: 5px 0; }
.bar .l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-weight: 600; }
.bar .t { height: 10px; border-radius: 6px; background: var(--blue-soft); overflow: hidden; }
.bar .t i { display: block; height: 100%; background: var(--blue); border-radius: 6px; transform-origin: left; animation: grow .9s cubic-bezier(.2,.8,.2,1) both; }
.bar .v { font-weight: 750; font-variant-numeric: tabular-nums; }
.note { font-size: 12px; color: var(--muted); margin: 6px 0 0; }
@keyframes grow { from { transform: scaleX(0); } }

/* bottom tabs */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; display: flex; background: var(--bg); border-top: 1px solid var(--line); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); gap: 6px; z-index: 5; }
.tabs button { flex: 1; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 13.5px; font-weight: 700; padding: 8px 6px; border-radius: 10px; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--blue-soft); color: var(--blue); }

footer { margin-top: 12px; text-align: center; font-size: 12px; }
footer a { color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .bar .t i { animation: none; } }

/* showcase: always the night sky */
:root, :root { --bg: #070e1f; --tile: rgba(255,255,255,.055); --line: rgba(160,190,240,.18); --text: #eaf1fb; --muted: #97a9c6; --blue: #5aa8ff; --blue-soft: rgba(90,168,255,.16); }
html, body { background: radial-gradient(120% 80% at 50% 0%, #0f2350 0%, #070e1f 55%) fixed; }
.stage { border: 1px solid rgba(150,190,255,.18); box-shadow: 0 0 0 1px rgba(0,0,0,.4) inset, 0 18px 50px -20px rgba(40,110,255,.55); }
.card { border: 1px solid rgba(150,190,255,.14); backdrop-filter: blur(8px); box-shadow: 0 10px 30px -18px rgba(90,168,255,.6); animation: rise .45s cubic-bezier(.2,.8,.2,1); }
.card h2 { background: linear-gradient(90deg, #fff, #9fd0ff 60%, #c9a8ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.chip { background: rgba(255,255,255,.04); }
.chip b { background: linear-gradient(90deg, #7fd3ff, #c9a8ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.kpi b { background: linear-gradient(90deg, #7fd3ff, #c9a8ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bar .t i { background: linear-gradient(90deg, #4a9bff, #b884ff); box-shadow: 0 0 10px rgba(120,150,255,.6); }
.nav button.go, .levels button[aria-pressed="true"] { background: linear-gradient(90deg, #2f86ff, #8b5cff); border-color: transparent; box-shadow: 0 6px 18px -8px rgba(110,120,255,.9); }
.tabs { background: rgba(7,14,31,.86); backdrop-filter: blur(10px); }
h1 { background: linear-gradient(90deg, #fff, #9fd0ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
#map .tw { animation: tw 4s ease-in-out infinite; }
#map .halo { transform-box: fill-box; transform-origin: center; animation: breathe 3.2s ease-in-out infinite; }
#map .spin { transform-box: fill-box; transform-origin: center; animation: spin 20s linear infinite; }
#map .flowline { animation: flow 1.6s linear infinite; }
#map .pop { transform-box: fill-box; transform-origin: center; animation: pop .7s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes tw { 0%, 100% { opacity: .15; } 50% { opacity: .9; } }
@keyframes breathe { 0%, 100% { transform: scale(1); opacity: .14; } 50% { transform: scale(1.12); opacity: .3; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes flow { to { stroke-dashoffset: -50; } }
@keyframes pop { from { transform: scale(0); opacity: 0; } }
@keyframes rise { from { transform: translateY(6px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { #map .tw, #map .halo, #map .spin, #map .flowline, #map .pop, .card { animation: none; } }
/* logos, "You" pin, shooting stars (2026-12-05) */
#map .ping { transform-box: fill-box; transform-origin: center; animation: ping 2.4s cubic-bezier(.2,.7,.3,1) infinite; }
#map .bob { animation: bob 2.6s ease-in-out infinite; }
#map .shoot { stroke-dasharray: 90 900; stroke-dashoffset: 90; animation: shoot 1.4s ease-out forwards; }
@keyframes ping { from { transform: scale(1); opacity: .85; } to { transform: scale(1.9); opacity: 0; } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes shoot { 0% { stroke-dashoffset: 90; opacity: 0; } 15% { opacity: 1; } 100% { stroke-dashoffset: -520; opacity: 0; } }
.logos { display: flex; flex-wrap: wrap; gap: 8px 10px; margin: 8px 0 4px; }
.logos span { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 650; color: var(--text); background: rgba(255,255,255,.05); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px 3px 3px; }
.logos img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
@media (prefers-reduced-motion: reduce) { #map .ping, #map .bob, #map .shoot { animation: none; } #map .ping { opacity: 0; } }
/* autoplaying walkthroughs (2026-12-05) */
.cap { position: absolute; left: 10px; top: 10px; right: 10px; display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 750; color: #fff; background: rgba(8,18,38,.72); backdrop-filter: blur(8px); border: 1px solid rgba(150,190,255,.22); border-radius: 12px; padding: 7px 10px; opacity: 0; transform: translateY(-8px); transition: opacity .45s, transform .45s cubic-bezier(.2,.8,.2,1); pointer-events: none; box-shadow: 0 8px 24px -12px rgba(90,168,255,.8); }
.cap.on { opacity: 1; transform: none; }
.cap span { flex: none; font-size: 11.5px; font-weight: 800; padding: 2px 7px; border-radius: 999px; background: linear-gradient(90deg, #2f86ff, #8b5cff); }
.prog { display: flex; gap: 4px; margin: 8px 0 8px; }
.prog i { flex: 1; height: 4px; border-radius: 2px; background: rgba(255,255,255,.14); overflow: hidden; }
.prog i b { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #4a9bff, #b884ff); box-shadow: 0 0 8px rgba(140,150,255,.9); }
.prog i.done b { width: 100%; }
.player { display: flex; gap: 8px; margin-top: 10px; }
.player button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 44px; height: 40px; border: 1px solid var(--line); background: rgba(255,255,255,.05); color: inherit; font: inherit; font-size: 14px; font-weight: 750; border-radius: 12px; cursor: pointer; padding: 0 12px; }
.player button.go { flex: 1; background: linear-gradient(90deg, #2f86ff, #8b5cff); border-color: transparent; color: #fff; box-shadow: 0 6px 18px -8px rgba(110,120,255,.9); }
.player button:disabled { opacity: .35; cursor: default; }
.player .ic path[fill] { stroke: none; }
.chips .chip.flow, .chips .chip.tour { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: var(--text); font: inherit; font-size: 12.5px; font-weight: 700; }
.chips .chip.flow .ic, .chips .chip.tour .ic { width: 13px; height: 13px; }
.chips .chip.tour { background: linear-gradient(90deg, #2f86ff, #8b5cff); border-color: transparent; color: #fff; }
#map .hit { transition: opacity .6s; }
#map .ripple { transform-box: fill-box; transform-origin: center; animation: ripple .9s ease-out forwards; }
@keyframes ripple { from { transform: scale(.6); opacity: .95; } to { transform: scale(4.2); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { #map .ripple { animation: none; opacity: 0; } .cap { transition: none; } }
/* glossary v2: sections, icon tiles, logos (2026-12-05) */
.words { gap: 9px; }
.words li { display: flex; gap: 12px; align-items: flex-start; border: 1px solid rgba(150,190,255,.12); background: linear-gradient(135deg, color-mix(in srgb, var(--c, #4a9bff) 14%, transparent), rgba(255,255,255,.03) 60%); box-shadow: 0 10px 26px -20px var(--c, #4a9bff); animation: rise .4s cubic-bezier(.2,.8,.2,1) both; }
.words li > div { min-width: 0; flex: 1; }
.words li.sec { display: block; background: none; border: 0; box-shadow: none; padding: 10px 2px 0; font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #9fd0ff; animation: none; }
.words li.sec:first-child { padding-top: 2px; }
.wi { flex: none; width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: radial-gradient(circle at 30% 25%, rgba(255,255,255,.45), transparent 55%), var(--c, #4a9bff); box-shadow: 0 0 0 1px rgba(255,255,255,.18) inset, 0 6px 18px -6px var(--c, #4a9bff); }
.wi svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.wi.logo { background: #fff; overflow: hidden; box-shadow: 0 0 0 1px rgba(255,255,255,.3) inset, 0 6px 18px -6px #4a9bff; }
.wi.logo img { width: 100%; height: 100%; object-fit: cover; }
.wi.logo.bsky svg { width: 26px; height: 24px; stroke: none; }
.words button { display: inline-flex; align-items: center; gap: 4px; color: #9fd0ff; }
.words button .ic { width: 14px; height: 14px; }
#map .live { animation: tw 1.4s ease-in-out infinite; }
/* lighter opening card + story tiles (2026-12-05) */
.card p.lead { font-size: 15px; line-height: 1.42; }
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0 4px; }
.trio button { display: flex; flex-direction: column; align-items: center; gap: 5px; text-align: center; border: 1px solid rgba(150,190,255,.16); background: linear-gradient(160deg, color-mix(in srgb, var(--c) 22%, transparent), rgba(255,255,255,.03)); color: var(--text); font: inherit; border-radius: 14px; padding: 10px 6px 9px; cursor: pointer; }
.trio button b { font-size: 13.5px; font-weight: 800; }
.trio button small { font-size: 11.5px; color: var(--muted); line-height: 1.25; }
.trio .wi { width: 36px; height: 36px; border-radius: 11px; --c: inherit; background: radial-gradient(circle at 30% 25%, rgba(255,255,255,.45), transparent 55%), var(--c); }
.ftiles { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
.ftile { display: flex; align-items: center; gap: 8px; text-align: left; border: 1px solid color-mix(in srgb, var(--a, #4a9bff) 35%, transparent); color: var(--text); font: inherit; cursor: pointer; border-radius: 11px; padding: 6px 8px; min-width: 0;
  background: color-mix(in srgb, var(--a, #4a9bff) 12%, transparent); transition: background .2s; }
.ftile:hover, .ftile:focus-visible { background: color-mix(in srgb, var(--a, #4a9bff) 24%, transparent); }
.ftile .wi { flex: none; width: 26px; height: 26px; border-radius: 8px; background: var(--a, #4a9bff); }
.ftile .wi svg { width: 15px; height: 15px; }
.ftile b { font-size: 12.5px; font-weight: 750; line-height: 1.2; flex: 1; min-width: 0; }
.ftile small { display: none; }
.ftile .fgo { display: none; }
.ftile .ic { width: 12px; height: 12px; }
.ftile .fplay path { stroke: none; fill: currentColor; }
.ftile.tour { grid-column: 1 / -1; padding: 7px 10px; border-color: transparent; background: linear-gradient(100deg, #2f86ff, #8b5cff); color: #fff; }
.ftile.tour b { font-size: 13.5px; }
.ftile.tour small { display: block; margin-left: auto; font-size: 11.5px; opacity: .85; }
.ftile .fplay { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: #6a5cff; }
/* Spaces map (2026-12-05) */
#smap { width: 100%; height: 100%; display: block; }
#smap text { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; pointer-events: none; }
#smap .hit { cursor: pointer; transition: opacity .6s, filter .6s; }
#smap .tw { animation: tw 4s ease-in-out infinite; }
#smap .halo { transform-box: fill-box; transform-origin: center; animation: breathe 3.2s ease-in-out infinite; }
#smap .spin { transform-box: fill-box; transform-origin: center; animation: spin 20s linear infinite; }
#smap .flowline { animation: flow 1.6s linear infinite; }
#smap .bob { animation: bob 3.2s ease-in-out infinite; }
#smap .ping { transform-box: fill-box; transform-origin: center; animation: ping 2.4s cubic-bezier(.2,.7,.3,1) infinite; }
#smap .ripple { transform-box: fill-box; transform-origin: center; animation: ripple .9s ease-out forwards; }
#smap .drift { animation: drift 14s ease-in-out infinite alternate; }
@keyframes drift { from { transform: translate(-30px, 10px); } to { transform: translate(40px, -20px); } }
.uses { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.uses.one { grid-template-columns: 1fr; }
.use { display: flex; gap: 10px; align-items: flex-start; border: 1px solid rgba(150,190,255,.13); border-radius: 14px; padding: 10px; background: linear-gradient(150deg, color-mix(in srgb, var(--c) 18%, transparent), rgba(255,255,255,.03) 70%); }
.use .wi { width: 36px; height: 36px; border-radius: 11px; }
.use .wi svg { width: 19px; height: 19px; }
.use b { display: block; font-size: 13.5px; font-weight: 800; margin-bottom: 2px; }
.use small { display: block; font-size: 12px; line-height: 1.35; color: var(--muted); }
.tabs button { font-size: 13px; padding: 8px 4px; }
@media (prefers-reduced-motion: reduce) { #smap .tw, #smap .halo, #smap .spin, #smap .flowline, #smap .bob, #smap .ping, #smap .drift { animation: none; } }
.card .hw { display: inline; font: inherit; font-weight: 800; color: #fff; cursor: pointer; padding: 0 6px 1px; margin: 0 1px; border-radius: 7px; border: 0; border-bottom: 2px solid var(--c); background: color-mix(in srgb, var(--c) 26%, transparent); }
.card .hw:hover, .card .hw:focus-visible { background: color-mix(in srgb, var(--c) 45%, transparent); }
.mstats { position: absolute; left: 10px; top: 10px; display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: rgba(8,18,38,.6); backdrop-filter: blur(6px); border: 1px solid rgba(150,190,255,.16); pointer-events: none; transition: opacity .4s; }
.mstats span { display: flex; flex-direction: column; padding: 2px 8px; font-size: 10.5px; font-weight: 650; color: var(--muted); line-height: 1.15; }
.mstats span + span { border-left: 1px solid rgba(150,190,255,.16); }
.mstats b { font-size: 14.5px; font-weight: 850; font-variant-numeric: tabular-nums; background: linear-gradient(90deg, #7fd3ff, #c9a8ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cap.on ~ .mstats { opacity: 0; }
.card p.note { font-size: 12.5px; color: var(--muted); margin-top: 12px; }

/* Map first (owner 2026-12-05, "map too small in Mu"): the map fills the tile, the texts are a bottom sheet over it */
html, body { height: 100%; }
body { padding-bottom: 0; overflow: hidden; }
main { height: calc(100dvh - 54px - env(safe-area-inset-bottom)); display: flex; flex-direction: column; padding-bottom: 6px; }
.pane { flex: 1; min-height: 0; overflow: auto; }
.pane[hidden] { display: none; }
#p-map, #p-spaces { position: relative; display: flex; flex-direction: column; overflow: hidden; }
.stage, #sstage { flex: 1; min-height: 0; aspect-ratio: auto; max-height: none; }
main:has(#p-map:not([hidden])) footer, main:has(#p-spaces:not([hidden])) footer { display: none; }
.sheet { position: absolute; left: 6px; right: 6px; bottom: 6px; z-index: 6; display: flex; flex-direction: column; max-height: 64%; border-radius: 18px; background: rgba(9,18,40,.94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(150,190,255,.22); box-shadow: 0 -12px 34px -12px rgba(0,0,0,.7); transition: max-height .35s cubic-bezier(.2,.8,.2,1); }
.sheet .grab { flex: none; width: 100%; height: 20px; border: 0; background: transparent; cursor: pointer; padding: 0; }
.sheet .grab i { display: block; width: 42px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.38); margin: 8px auto 0; }
.sheet .card { margin: 0; min-height: 0; overflow: auto; background: transparent; border: 0; box-shadow: none; backdrop-filter: none; padding: 2px 14px 12px; animation: none; }
.sheet.min { max-height: 72px; cursor: pointer; }
.sheet.min .card { overflow: hidden; }
.sheet.min .card > :not(.eyebrow):not(h2) { visibility: hidden; }
.zoom { bottom: 84px; }
.hint { bottom: 84px; }
#p-map[hidden], #p-spaces[hidden] { display: none; }
.sheet.min { max-height: 50px; }
.sheet.min .card > .eyebrow:first-child { display: none; }
.sheet.min .card h2 { font-size: 15px; margin: 0; }
.sheet.min .card h2::after { content: "  ·  tap to read"; font-size: 12px; font-weight: 600; -webkit-text-fill-color: rgba(201,214,238,.7); }
.zoom, .hint { bottom: 62px; }
/* a story playing: compact sheet, the step title is already on the map */
body.playing #sheet .card h2, #ssheet:has(.prog) .card h2 { display: none; }
#sheet .card:has(.prog) .eyebrow, #ssheet .card:has(.prog) .eyebrow { font-size: 10.5px; }
.sheet .card:has(.prog) p { font-size: 13.5px; margin: 6px 0 8px; }
.sheet .card .player { gap: 6px; }
.sheet .card .player button { height: 38px; min-width: 38px; }

/* Story player (owner 2026-12-05: fixed map, fewer controls, bigger text on a phone) */
.levels, .zoom, .hint, .sheet .grab { display: none !important; }
.stage, #sstage { touch-action: manipulation; margin-top: 6px; }
.sheet { max-height: 58%; }
.sheet .card { padding: 12px 14px 14px; }
.sheet .card p, .sheet .card p.lead { font-size: 16px; line-height: 1.45; }
.sheet .card h2 { font-size: 19px; }
.sheet .card .eyebrow { font-size: 12px; }
.sheet .card .player { margin-top: 10px; gap: 8px; }
.sheet .card .player button { height: 50px; min-width: 50px; font-size: 16px; border-radius: 14px; }
.sheet .card .player button .ic { width: 20px; height: 20px; }
.sheet .card:has(.prog) p { font-size: 16px; }
.cap { font-size: 16px; padding: 9px 12px; }
.bigplay { width: 100%; display: grid; grid-template-columns: 52px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; text-align: left; border: 0; border-radius: 18px; padding: 12px 14px; cursor: pointer; color: #fff; font: inherit; background: linear-gradient(100deg, #2f86ff, #8b5cff 70%, #ff5d8f); box-shadow: 0 10px 26px -12px rgba(110,120,255,.9); }
.bigplay > span { grid-row: 1 / 3; width: 52px; height: 52px; border-radius: 50%; background: #fff; color: #6a5cff; display: grid; place-items: center; }
.bigplay > span .ic { width: 22px; height: 22px; }
.bigplay > span path { stroke: none; fill: currentColor; }
.bigplay b { font-size: 20px; font-weight: 850; }
.bigplay small { font-size: 12.5px; opacity: .9; font-weight: 600; }
.chapters { display: flex; gap: 7px; overflow-x: auto; margin-top: 10px; padding-bottom: 2px; scrollbar-width: none; }
.chapters::-webkit-scrollbar { display: none; }
.chap { flex: none; display: flex; align-items: center; gap: 7px; height: 42px; padding: 0 14px 0 10px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--a) 50%, transparent); background: color-mix(in srgb, var(--a) 18%, transparent); color: #fff; font: inherit; font-size: 14.5px; font-weight: 750; cursor: pointer; white-space: nowrap; }
.chap svg { width: 20px; height: 20px; fill: none; stroke: var(--a); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tabs button { font-size: 15px; padding: 10px 6px; }
.sheet { max-height: 42%; }
#sstats { display: none; }
.zback { position: absolute; left: 10px; top: 10px; z-index: 4; display: inline-flex; align-items: center; gap: 4px; height: 44px; padding: 0 16px 0 10px; border-radius: 999px; border: 1px solid rgba(150,190,255,.3); background: rgba(9,18,40,.86); backdrop-filter: blur(8px); color: #fff; font: inherit; font-size: 16px; font-weight: 800; cursor: pointer; box-shadow: 0 6px 18px -8px rgba(0,0,0,.7); }
.zback[hidden], body.playing .zback { display: none; }
.zback .ic { width: 20px; height: 20px; }

/* QA 2026-12-05: chapter chips wrap instead of running off the edge; a card that scrolls fades at the bottom */
.chapters { flex-wrap: wrap; overflow: visible; gap: 6px; }
.chap { height: 36px; font-size: 14px; padding: 0 11px 0 8px; gap: 6px; }
.chap svg { width: 18px; height: 18px; }
.sheet .card.more { -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 34px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 34px), transparent); }
/* phones (owner 2026-12-05: on the phone the map is too small, the buttons take too much space) */
@media (max-width: 430px) {
  .top h1 { font-size: 16px; white-space: nowrap; overflow: visible; }
  .asof { font-size: 11px; }
  .chapters { gap: 5px; margin-top: 2px; }
  .chap { height: 30px; font-size: 12.5px; padding: 0 9px 0 7px; gap: 5px; }
  .chap svg { width: 15px; height: 15px; }
  .sheet .card { padding: 2px 10px 8px; }
}
/* wide screens (owner 2026-12-05: wider on desktop, bskycheck.com guides): up to 1200 px, the story card is a panel right of the map */
@media (min-width: 820px) {
  main { max-width: 1200px; }
  #sheet { left: auto; right: 8px; top: 8px; bottom: auto; width: 330px; max-height: calc(100% - 16px); }
  #p-map .cap { right: 350px; }
}
/* language selector (owner 2026-12-05) */
.lang { flex: none; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--text, #fff); background: rgba(255,255,255,.07); border: 1px solid rgba(150,190,255,.28); border-radius: 9px; padding: 4px 6px; cursor: pointer; }
.lang option { color: #000; }
@media (max-width: 430px) { .asof { display: none; } .lang { margin-left: auto; font-size: 12px; padding: 3px 4px; } }
/* translated titles must not push the page wider than the phone (QA 2026-12-05, Japanese) */
.top h1 { min-width: 0; flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabs button { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
@media (max-width: 430px) { .top h1 { overflow: hidden; } }
@media (max-width: 430px) { .tabs button { font-size: 13.5px; padding: 10px 2px; } }
