/* Mission Comic: the graphic-novel home page (served at /index-comic.html while it is behind its flag) */

:root {
  --ink: #050608; --ink2: #0b0c10; --bone: #ece4d3; --bone2: rgba(236, 228, 211, .72); --bone3: rgba(236, 228, 211, .4);
  --accent: #ff6b2c; --cyan: #59d8ff; --gold: #f2c14e; --line: rgba(236, 228, 211, .16);
  --mono: var(--type-data); --display: var(--type-display); --cond: var(--type-body);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--ink); color: var(--bone); }
html { overflow-x: hidden; }
body {
  font-family: var(--type-body); -webkit-font-smoothing: antialiased; overflow-x: hidden;
  background:
    radial-gradient(ellipse 60% 55% at 50% 47%, #151821 0%, #0c0e13 45%, rgba(5, 6, 8, 0) 80%),
    radial-gradient(ellipse 120% 90% at 50% 120%, #10131c 0%, rgba(5, 6, 8, 0) 60%),
    var(--ink);
  background-attachment: fixed;
}
#track { width: 1px; height: 600vh; pointer-events: none; }
#gl { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; display: block; z-index: 1; touch-action: pan-y; -webkit-tap-highlight-color: transparent; }
#grain {
  position: fixed; inset: -50%; z-index: 2; pointer-events: none; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 1.3 -.15'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1.1s steps(6) infinite;
}
@keyframes grain { 0% { transform: translate(0, 0) } 20% { transform: translate(-4%, 3%) } 40% { transform: translate(3%, -5%) } 60% { transform: translate(-6%, -2%) } 80% { transform: translate(5%, 4%) } 100% { transform: translate(0, 0) } }
.tier-phone #grain { mix-blend-mode: normal; opacity: .045; }
.calm #grain, .rec #grain { animation: none; }
/* vignette over everything (cinema frame) */
#vignette { position: fixed; inset: 0; z-index: 3; pointer-events: none; background: radial-gradient(ellipse 85% 80% at 50% 50%, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, .55) 100%); }

#hotspots { position: fixed; inset: 0; z-index: 5; pointer-events: none; }
.hot { position: absolute; left: 0; top: 0; display: block; pointer-events: auto; background: transparent; border: 0; padding: 0; margin: 0; cursor: pointer; outline: none; -webkit-tap-highlight-color: transparent; touch-action: pan-y; }
.hot:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------------- HUD ---------------- */
#hud-top { position: fixed; left: 0; right: 0; top: 0; z-index: 8; height: 62px; display: flex; align-items: center; gap: 8px; padding: 0 14px 0 18px;
  background: linear-gradient(180deg, rgba(5, 6, 8, .94), rgba(5, 6, 8, .82) 64%, rgba(5, 6, 8, 0)); }
.brand { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; min-width: 44px; min-height: 44px; color: var(--bone); text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px rgba(236, 228, 211, .45); background: #14151c; }
.brand span { display: none; font-family: var(--type-section); font-weight: 800; font-size: 17px; letter-spacing: .16em; white-space: nowrap; }
.file { display: none; flex: 0 0 auto; text-align: center; font-family: var(--type-data); font-weight: 500; font-size: 12px; letter-spacing: .24em; color: var(--bone3); white-space: nowrap; }
#shards { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; min-height: 44px; background: rgba(9, 10, 13, .7); color: var(--bone); border: 1px solid var(--line); border-radius: 999px;
  padding: 0 12px 0 10px; font-family: var(--type-data); font-size: 12px; letter-spacing: .08em; cursor: pointer; }
#shards svg { width: 15px; height: 15px; fill: var(--gold); filter: drop-shadow(0 0 6px rgba(242, 193, 78, .7)); }
#shards.pulse { animation: pulse .7s ease-out; }
@keyframes pulse { 0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(242, 193, 78, .7) } 35% { transform: scale(1.14); box-shadow: 0 0 0 8px rgba(242, 193, 78, .0) } 100% { transform: scale(1) } }
#score { position: fixed; top: 66px; right: 22px; z-index: 8; font-family: var(--type-data); font-size: 12px; letter-spacing: .16em; color: #ffb02e; opacity: 0; transition: opacity .3s;
  border: 1px solid rgba(255, 176, 46, .45); padding: 5px 10px; background: rgba(9, 10, 13, .7); }
#score.show { opacity: 1; }
#score.pulse { animation: pulse .5s ease-out; }

#hud-bottom { position: fixed; left: 0; right: 0; bottom: 0; z-index: 8; height: 60px; display: flex; align-items: center; justify-content: center; gap: 18px; padding: 0 16px 6px;
  background: linear-gradient(0deg, rgba(5, 6, 8, .85), rgba(5, 6, 8, 0)); }
#hud-bottom button { width: 44px; height: 44px; background: rgba(9, 10, 13, .6); color: var(--bone); border: 1px solid var(--line); font: var(--type-button-weight) 22px/1 var(--type-button); cursor: pointer; }
#hud-bottom button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
#hud-bottom button:disabled { opacity: .25; cursor: default; }
.prog { display: flex; flex-direction: column; align-items: center; gap: 7px; min-width: 250px; }
#ticks { display: flex; gap: 5px; }
#ticks i { width: 26px; height: 2px; background: rgba(236, 228, 211, .2); transition: background .3s; }
#ticks i.on { background: var(--accent); }
#page-label { font-family: var(--type-section); font-size: 12px; letter-spacing: .2em; color: var(--bone2); white-space: nowrap; }

#hint { position: fixed; right: 22px; bottom: 14px; transform: none; z-index: 8; font-family: var(--type-caption); font-size: 12px; letter-spacing: .26em; color: var(--bone);
  background: rgba(9, 10, 13, .72); border: 1px solid var(--line); padding: 9px 14px 9px 16px; white-space: nowrap; transition: opacity .5s, transform .5s; display: flex; gap: 10px; align-items: center; }
#hint b { color: var(--accent); font-weight: 500; display: inline-block; animation: nudge 1.4s ease-in-out infinite; }
#hint.gone { opacity: 0; transform: translateY(10px); pointer-events: none; }
@keyframes nudge { 50% { transform: translateY(4px) } }
.rec #hint b, .calm #hint b { animation: none; }
#toast { position: fixed; left: 50%; top: 74px; transform: translate(-50%, -8px); z-index: 9; font-family: var(--type-caption); font-size: 12px; letter-spacing: .18em; color: var(--bone);
  background: rgba(9, 10, 13, .9); border: 1px solid rgba(242, 193, 78, .5); border-left: 3px solid var(--gold); padding: 9px 14px; opacity: 0; transition: opacity .3s, transform .3s; pointer-events: none; white-space: nowrap; max-width: calc(100vw - 32px); overflow: hidden; text-overflow: ellipsis; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#tilt { position: fixed; right: 16px; bottom: 74px; z-index: 8; font-family: var(--type-data); font-size: 12px; letter-spacing: .18em; color: var(--bone); background: rgba(9, 10, 13, .7); border: 1px solid var(--line); padding: 7px 10px; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 20; background: var(--accent); color: #07080b; padding: 10px 14px; font-family: var(--type-button); font-size: 12px; text-decoration: none; }
.skip:focus { top: 12px; }

#loader { position: fixed; inset: 0; z-index: 30; display: grid; place-content: center; gap: 14px; background: var(--ink); transition: opacity .7s .1s, visibility 0s .8s; text-align: center; }
#loader.done { opacity: 0; visibility: hidden; }
.ld-mark { font-family: var(--type-display); font-weight: 900; font-size: 34px; letter-spacing: .14em; }
.ld-sub { font-family: var(--type-eyebrow); font-size: 12px; letter-spacing: .3em; color: var(--bone3); }
.ld-bar { width: 180px; height: 2px; background: rgba(236, 228, 211, .14); overflow: hidden; margin: 0 auto; }
.ld-bar i { display: block; height: 100%; width: 40%; background: var(--accent); animation: load 1.2s ease-in-out infinite; }
.calm .ld-bar i { animation: none; width: 100%; }
@keyframes load { 0% { transform: translateX(-100%) } 100% { transform: translateX(260%) } }

/* phone / single-page */
/* the bands the book must stay clear of (main.js reads these): --bt top bar, --hb page controls, --sh mission strip, --bb bottom band in total, --bs side column */
html.mode-single { --bt: 60px; --hb: 74px; --sh: 60px; --bb: 140px; --bs: 0px; }
.mode-single #hud-top { height: var(--bt); padding: 0 10px; gap: 6px; }
.mode-single #hud-bottom { height: var(--hb); gap: 12px; padding: 0 14px 26px; }
.mode-single #hud-bottom button { width: 44px; height: 44px; }
.mode-single .prog { min-width: 0; flex: 1; }
.mode-single #ticks { gap: 3px; }
.mode-single #ticks i { width: 10px; }
.mode-single #page-label { font-size: 12px; letter-spacing: .14em; }
/* the first-visit hint is one thin line just above the progress readout (the page dots and the page count stay visible, never over the page); it vanishes on the first touch */
html.mode-single { --hc: 50px; }
.mode-single #hint { right: auto; left: 50%; transform: translateX(-50%); bottom: calc(var(--hc) + 16px); z-index: 9; font-size: 12px; line-height: 12px; letter-spacing: .1em; padding: 0 6px; gap: 6px; background: rgba(5, 6, 8, .96); border: 0; max-width: calc(100vw - 150px); box-sizing: border-box; overflow: hidden; }
/* short portrait phones (360x640): a slimmer control band gives the page more height */
@media (max-height: 700px) and (orientation: portrait) {
  html.mode-single { --hb: 64px; --sh: 52px; --bb: 122px; --hc: 40px; }
  .mode-single #hud-bottom { padding-bottom: 16px; }
}
/* landscape phones: the controls move to the right edge, the mission strip steps aside, the page takes the full height */
@media (max-height: 520px) and (orientation: landscape) {
  html.mode-single { --bt: 48px; --hb: 0px; --sh: 0px; --bb: 6px; --bs: 76px; }
  .mode-single #hud-top { padding: 0 8px; }
  html.mode-single .mission-strip, .mode-single #hint { display: none; }
  .mode-single #hud-bottom { left: auto; top: var(--bt); height: auto; width: var(--bs); flex-direction: column; justify-content: center; gap: 14px; padding: 0 8px 8px; background: none; }
  .mode-single .prog { display: none; }
  .mode-single #tilt { bottom: 14px; right: 90px; }
}
@media (max-width: 1100px) { .mode-spread #hint { display: none; } }
.mode-single #hint.gone { transform: translate(-50%, 10px); }
.mode-single #toast { top: 66px; font-size: 12px; letter-spacing: .12em; }
.mode-single #score { top: 66px; right: 14px; }
.mode-single #tilt { bottom: var(--bb); }

/* calm / reduced motion: no scroll track, tap to turn; the page below the book still scrolls */
.calm #track { height: 100vh; }
.at-crews #loader { display: none; }

/* past the last page: the book has left, so the comic's controls step aside */
#hud-bottom, #tilt { transition: opacity .25s; }
.past-book #hud-bottom, .past-book #hint, .past-book #score, .past-book #tilt, .past-book #hotspots { opacity: 0; visibility: hidden; pointer-events: none; }
html.crew-dlg-open, html.menu-open, html.game-open { overflow: hidden; }
.past-book #hud-top { background: rgba(5, 6, 8, .94); border-bottom: 1px solid var(--line); }

/* ---------------- THE EIGHT CREWS ---------------- */
#crews { position: relative; z-index: 4; background: transparent; padding: clamp(72px, 11vw, 150px) clamp(16px, 4vw, 56px) clamp(64px, 9vw, 120px); color: var(--bone); }
.crews-anchor { position: absolute; top: 0; left: 0; width: 1px; height: 1px; }
.crews-wrap { max-width: 1480px; margin: 0 auto; }
.crews-head { position: relative; padding-top: 22px; margin-bottom: clamp(28px, 4vw, 52px); border-top: 1px solid var(--line); }
.crews-head::before { content: ""; position: absolute; left: 0; top: -2px; width: 72px; height: 3px; background: var(--accent); }
.crews-kicker { margin: 0 0 14px; font: var(--type-eyebrow-weight) 12px/1.2 var(--type-eyebrow); letter-spacing: .28em; color: var(--accent); }
.crews-title { margin: 0; font: var(--type-display-weight) clamp(48px, 10vw, 128px)/.88 var(--type-display); letter-spacing: .01em; color: var(--bone); text-shadow: 0 2px 0 var(--ink), 0 10px 40px rgba(0, 0, 0, .7); }
.crews-intro { margin: 18px 0 0; max-width: 620px; font: var(--type-body-weight) clamp(18px, 2vw, 22px)/1.35 var(--type-body); color: var(--bone2); text-shadow: 0 1px 14px var(--ink); }

.crews-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 14px; }
.crews-item { display: flex; min-width: 0; }
.crews-grid > li > a { color: var(--accent); font: var(--type-data-weight) 14px var(--type-data); letter-spacing: .1em; }
@media (min-width: 600px) { .crews-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; } }
@media (min-width: 1200px) { .crews-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; } }

.crew { --crew: var(--accent); position: relative; width: 100%; display: grid; gap: 0; align-content: start; grid-template-rows: auto auto 1fr auto;
  grid-template-areas: "cover" "mosaic" "info" "actions";
  background: #0b0c10; border: 1px solid var(--line); box-shadow: 0 0 0 3px var(--ink), 0 0 0 4px rgba(236, 228, 211, .08), 0 18px 40px rgba(0, 0, 0, .55); }
.crew::before { content: ""; position: absolute; left: -1px; right: -1px; top: -1px; height: 4px; background: var(--crew); z-index: 2; }
.crew-cover { grid-area: cover; position: relative; display: flex; width: 100%; padding: 14px 14px 0; background: none; border: 0; margin: 0; cursor: pointer; color: inherit; font: inherit; text-align: left; }
.crew-frame { display: block; flex: 1 1 auto; min-width: 0; width: 100%; position: relative; aspect-ratio: 1 / 1; background: #050608; border: 1px solid rgba(236, 228, 211, .22); box-shadow: inset 0 0 0 3px #050608, inset 0 0 0 4px rgba(236, 228, 211, .1); overflow: hidden; }
.crew-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.crew-no { position: absolute; left: 22px; top: 22px; z-index: 1; font: var(--type-data-weight) 12px/1 var(--type-data); letter-spacing: .2em; color: var(--bone); background: rgba(5, 6, 8, .8); padding: 5px 7px; border-left: 2px solid var(--crew); }
.crew-open { position: absolute; right: 22px; bottom: 8px; z-index: 1; font: var(--type-data-weight) 12px/1 var(--type-data); letter-spacing: .2em; color: var(--bone); background: rgba(5, 6, 8, .8); padding: 6px 8px; opacity: 0; transition: opacity .2s; }
.crew-cover:focus-visible .crew-open, .crew-cover:hover .crew-open { opacity: 1; }
.crew-mosaic { grid-area: mosaic; display: grid; grid-template-columns: repeat(var(--n, 4), 1fr); gap: 1px; margin: 10px 14px 0; background: rgba(236, 228, 211, .16); border: 1px solid rgba(236, 228, 211, .16); }
.crew-mosaic img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: #050608; }
.crew-info { grid-area: info; padding: 16px 14px 6px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.crew-tag { margin: 0; font: var(--type-eyebrow-weight) 12px/1.2 var(--type-eyebrow); letter-spacing: .26em; color: var(--crew); }
.crew-name { margin: 0; font: var(--type-section-weight) clamp(26px, 2.4vw, 34px)/.95 var(--type-section); letter-spacing: .015em; color: var(--bone); overflow-wrap: anywhere; }
.crew-desc { margin: 0; font: var(--type-body-weight) 18px/1.3 var(--type-body); color: var(--bone2); }
.crew-minted { margin: auto 0 0; padding-top: 6px; font: var(--type-data-weight) 12px/1.2 var(--type-data); letter-spacing: .2em; color: var(--bone3); }
.crew-minted[hidden] { display: none; }
.crew-actions { grid-area: actions; display: flex; flex-direction: column; gap: 8px; padding: 12px 14px 14px; }
.crew-btn { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 12px; text-align: center; text-decoration: none; font: var(--type-button-weight) 15px/1.1 var(--type-button); letter-spacing: .12em; border: 1px solid var(--line); color: var(--bone); background: transparent; -webkit-tap-highlight-color: transparent; }
.crew-view { background: var(--accent); border-color: var(--accent); color: #07080b; }
.crew-vault { border-color: rgba(236, 228, 211, .45); }

.crew-cover:focus-visible, .crew-btn:focus-visible, .crew-dlg-close:focus-visible, .crews-back:focus-visible, .crews-grid > li > a:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.crew-view:hover, .crew-view:focus-visible { background: #ff8450; }
.crew-vault:hover, .crew-vault:focus-visible { border-color: var(--cyan); color: var(--cyan); }
@media (hover: hover) and (pointer: fine) {
  html:not(.calm) .crew { transition: transform .22s ease, box-shadow .22s ease; }
  html:not(.calm) .crew:hover { transform: translateY(-4px); box-shadow: 0 0 0 3px var(--ink), 0 0 0 4px var(--crew), 0 24px 48px rgba(0, 0, 0, .6); }
}
@media (prefers-reduced-motion: reduce) { html .crew, html .crew:hover { transition: none; transform: none; } }

/* phone: cover left, words right, buttons side by side */
@media (max-width: 599px) {
  .crew { grid-template-columns: 38% 1fr; grid-template-rows: auto auto auto; grid-template-areas: "cover info" "mosaic mosaic" "actions actions"; }
  .crew-cover { padding: 12px 0 0 12px; }
  .crew-frame { aspect-ratio: auto; min-height: 120px; }
  .crew-no, .crew-open { display: none; }
  .crew-info { padding: 12px 12px 4px; gap: 6px; }
  .crew-name { font-size: 26px; }
  .crew-desc { font-size: 17px; }
  .crew-mosaic { margin: 10px 12px 0; }
  .crew-actions { flex-direction: row; padding: 10px 12px 12px; }
  .crew-btn { flex: 1 1 0; min-width: 0; padding: 8px 6px; font-size: 12px; letter-spacing: .06em; }
}

.crews-back { display: inline-flex; align-items: center; min-height: 44px; margin-top: clamp(32px, 5vw, 56px); padding: 8px 16px; background: rgba(9, 10, 13, .85); color: var(--bone); border: 1px solid var(--line); font: var(--type-button-weight) 12px var(--type-button); letter-spacing: .2em; cursor: pointer; }
.crews-back[hidden] { display: none; }
.crews-back:hover { border-color: var(--accent); color: var(--accent); }
.no-webgl .crews-back { display: none; }
.no-webgl #crews { padding-top: 24px; }

/* the crew file dialog */
.crew-dialog { --crew: var(--accent); padding: 0; border: 1px solid rgba(236, 228, 211, .3); background: #0b0c10; color: var(--bone); width: min(920px, calc(100vw - 24px)); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); overflow: auto; overscroll-behavior: contain;
  box-shadow: 0 0 0 3px var(--ink), 0 30px 80px rgba(0, 0, 0, .8); border-top: 4px solid var(--crew); }
.crew-dialog[open] { display: block; }
.crew-dialog::backdrop { background: rgba(3, 4, 6, .82); }
.crew-dlg-inner { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.crew-dlg-close { position: absolute; right: 10px; top: 10px; z-index: 2; min-width: 44px; min-height: 44px; padding: 8px 14px; background: rgba(5, 6, 8, .9); color: var(--bone); border: 1px solid rgba(236, 228, 211, .4); font: var(--type-button-weight) 12px var(--type-button); letter-spacing: .2em; cursor: pointer; }
.crew-dlg-close:hover { border-color: var(--accent); color: var(--accent); }
.crew-dlg-art { padding: 16px; }
.crew-dlg-art .crew-mosaic { margin: 10px 0 0; }
.crew-dlg-body { padding: 8px 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.crew-dlg-body .crew-name { font-size: clamp(34px, 6vw, 52px); }
.crew-dlg-body .crew-desc { font-size: 21px; }
.crew-dlg-body .crew-actions { padding: 12px 0 0; }
@media (min-width: 700px) {
  .crew-dlg-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .crew-dlg-art { padding: 22px 0 22px 22px; }
  .crew-dlg-body { padding: 64px 24px 24px; justify-content: center; }
}

/* ---------------- the fly-past: ink wipe, world buttons, labels, and the crew side panel / bottom sheet ---------------- */
#fly-ink { position: fixed; inset: 0; z-index: 34; pointer-events: none; opacity: 0; --w: 0;
  background:
    radial-gradient(circle at 18% 62%, var(--ink) calc(var(--w) * 88% - 6%), rgba(5, 6, 8, 0) calc(var(--w) * 88%)),
    radial-gradient(circle at 74% 30%, var(--ink) calc(var(--w) * 92% - 6%), rgba(5, 6, 8, 0) calc(var(--w) * 92%)),
    radial-gradient(circle at 46% 86%, var(--ink) calc(var(--w) * 84% - 6%), rgba(5, 6, 8, 0) calc(var(--w) * 84%)),
    radial-gradient(circle at 88% 78%, var(--ink) calc(var(--w) * 86% - 6%), rgba(5, 6, 8, 0) calc(var(--w) * 86%)),
    radial-gradient(circle at 36% 14%, var(--ink) calc(var(--w) * 90% - 6%), rgba(5, 6, 8, 0) calc(var(--w) * 90%)); }
#fly-ink.on { opacity: 1; }
#fly-ink.full { background: var(--ink); }
.calm #fly-ink { display: none; }

#fly-worlds { position: fixed; inset: 0; z-index: 6; pointer-events: none; visibility: hidden; --fx: 50vw; --fb: 78px; }
#fly-worlds.on { visibility: visible; }
#fly-worlds::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; z-index: -1; height: calc(var(--fb) + 64px); pointer-events: none; background: linear-gradient(to bottom, rgba(5, 6, 8, 0), rgba(5, 6, 8, .78) 70%, rgba(5, 6, 8, .86)); }
#fly-worlds.compact::after { display: none; }
.world-hot { position: absolute; left: 0; top: 0; width: 48px; height: 48px; padding: 0; margin: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; outline: none; visibility: hidden; pointer-events: none; touch-action: pan-y; -webkit-tap-highlight-color: transparent; }
.hot-on .world-hot { visibility: visible; pointer-events: auto; }
.world-hot:hover, .world-hot.sel { box-shadow: 0 0 0 2px var(--crew), 0 0 22px var(--crew); }
.world-hot:focus-visible { box-shadow: 0 0 0 3px var(--cyan); }
.world-label { position: absolute; left: 0; top: 0; width: max-content; display: flex; flex-direction: column; gap: 3px; padding: 5px 8px 5px 9px; background: rgba(5, 6, 8, .72); border-left: 3px solid var(--crew); color: var(--bone);
  opacity: 0; visibility: hidden; pointer-events: none; cursor: pointer; text-shadow: 0 1px 8px #000; }
.labels-on .world-label { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity .35s ease; }
.world-label b { font: var(--type-section-weight) clamp(15px, 1.5vw, 19px)/1.02 var(--type-section); letter-spacing: .04em; overflow-wrap: anywhere; }
.world-label i { font: var(--type-section-weight) 12px/1.15 var(--type-section); letter-spacing: .14em; font-style: normal; color: var(--bone2); }
.world-label i[hidden], .world-label.short i { display: none; }
.world-label.sel { background: rgba(5, 6, 8, .9); }
.fly-cap { position: absolute; left: var(--fx); bottom: calc(var(--fb) + 48px); transform: translateX(-50%); margin: 0; width: max-content; max-width: 92vw; text-align: center; font: var(--type-caption-weight) 12px/1.2 var(--type-caption); letter-spacing: .24em; color: var(--bone2); text-shadow: 0 1px 10px #000; opacity: 0; transition: opacity .3s; }
.fly-all { position: absolute; left: var(--fx); bottom: var(--fb); transform: translateX(-50%); display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 18px; background: rgba(9, 10, 13, .82); color: var(--bone); border: 1px solid var(--bone3); text-decoration: none; font: var(--type-button-weight) 13px/1.1 var(--type-button); letter-spacing: .16em; white-space: nowrap; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .3s; -webkit-tap-highlight-color: transparent; }
.hot-on .fly-all { opacity: 1; visibility: visible; pointer-events: auto; }
.hot-on .fly-cap { opacity: 1; }
.fly-all:hover, .fly-all:focus-visible { border-color: var(--accent); color: var(--accent); }
.fly-all:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
#fly-worlds.compact .fly-cap, #fly-worlds.compact .fly-all { opacity: 0; visibility: hidden; pointer-events: none; }
html.flying .mission-strip, html.flying #hint, html.flying #score { opacity: 0; visibility: hidden; pointer-events: none; }
.mode-single .fly-cap { font-size: 12px; letter-spacing: .18em; }

/* calm: the worlds are a still page of their own after the book, fading in */
#fly-still { position: fixed; inset: 0; z-index: 5; pointer-events: none; opacity: 0; visibility: hidden; background: var(--ink); }

/* the crew card opened from a world: a side panel on a wide screen, a bottom sheet on a phone; the world stays visible */
.crew-dialog--panel { position: fixed; inset: 70px 12px 12px auto; margin: 0; z-index: 12; width: min(380px, 36vw); max-width: none; height: auto; max-height: calc(100dvh - 82px); box-shadow: 0 0 0 2px var(--ink), 0 20px 60px rgba(0, 0, 0, .75); }
.crew-dialog--panel .crew-dlg-inner { grid-template-columns: minmax(0, 1fr); }
.crew-dialog--panel .crew-dlg-art { padding: 14px 14px 0; }
.crew-dialog--panel .crew-dlg-art .crew-frame { aspect-ratio: 4 / 3; }
.crew-dialog--panel .crew-dlg-body { padding: 12px 16px 16px; justify-content: flex-start; }
.crew-dialog--panel .crew-dlg-body .crew-name { font-size: clamp(30px, 3vw, 40px); }
.crew-dialog--panel .crew-dlg-body .crew-desc { font-size: 19px; }
@media (max-width: 699px), (max-aspect-ratio: 1 / 1) {
  .crew-dialog--panel { inset: auto 0 0 0; width: 100%; max-height: min(54dvh, 440px); border-left: 0; border-right: 0; border-bottom: 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
  .crew-dialog--panel .crew-dlg-inner { grid-template-columns: 34% minmax(0, 1fr); }
  .crew-dialog--panel .crew-dlg-art { display: contents; }
  .crew-dialog--panel .crew-dlg-art > .crew-frame { grid-column: 1; grid-row: 1; align-self: start; margin: 14px 0 0 12px; width: auto; aspect-ratio: 1 / 1; }
  .crew-dialog--panel .crew-dlg-art > .crew-mosaic { grid-column: 1 / -1; grid-row: 2; margin: 4px 12px 14px; }
  .crew-dialog--panel .crew-dlg-body { grid-column: 2; grid-row: 1; padding: 12px 12px 8px; gap: 6px; }
  .crew-dialog--panel .crew-dlg-close { padding: 8px 8px; letter-spacing: .08em; }
  .crew-dialog--panel .crew-dlg-body .crew-tag { padding-right: 68px; }
  .crew-dialog--panel .crew-dlg-body .crew-name { font-size: 28px; padding-right: 68px; }
  .crew-dialog--panel .crew-dlg-body .crew-desc { font-size: 17px; }
  .crew-dialog--panel .crew-dlg-body .crew-actions { flex-direction: row; padding-top: 8px; }
  .crew-dialog--panel .crew-btn { flex: 1 1 0; min-width: 0; padding: 8px 4px; font-size: 12px; letter-spacing: .05em; }
}

/* screen-reader / no-WebGL version of the issue */
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.no-webgl #gl, .no-webgl #hud-bottom, .no-webgl #hint, .no-webgl #track, .no-webgl #loader, .no-webgl #hotspots, .no-webgl .file, .no-webgl #shards, .no-webgl .mission-select, .no-webgl .mission-strip { display: none !important; }
.no-webgl #story { position: static !important; width: auto; height: auto; clip: auto; white-space: normal; overflow: visible; max-width: 760px; margin: 0 auto; padding: 88px 16px 80px; }
#story h1, #story h2 { font-family: var(--type-display); font-weight: 900; letter-spacing: .02em; line-height: .95; }
#story h1 { font-size: 64px; } #story h2 { font-size: 40px; margin-top: 48px; }
#story p { font-size: 20px; line-height: 1.35; color: var(--bone2); }
#story img { width: 100%; height: auto; display: block; margin: 12px 0; }
#story a { color: var(--accent); font-family: var(--type-data); letter-spacing: .1em; }
#story ul { padding-left: 18px; font-size: 18px; line-height: 1.8; }
@media (max-width: 600px) { #story h1 { font-size: 44px; } #story h2 { font-size: 32px; } }

/* ---------------- NAVIGATION: top bar, radio pill ---------------- */
.nav-btn { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; min-width: 44px; min-height: 44px; padding: 0 10px; background: rgba(9, 10, 13, .7); color: var(--bone);
  border: 1px solid var(--line); font: var(--type-button-weight) 12px/1 var(--type-button); letter-spacing: .1em; text-decoration: none; white-space: nowrap; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.nav-btn:hover { border-color: var(--bone2); }
.nav-btn:active { background: rgba(236, 228, 211, .12); }
#nav-crews { background: transparent; border-color: var(--bone2); color: var(--bone); }
#nav-crews:hover { background: rgba(236, 228, 211, .12); border-color: var(--bone); }
#nav-menu { gap: 7px; padding: 0 16px; background: var(--accent); border-color: var(--accent); color: #07080b; font-size: 15px; letter-spacing: .12em; }
#nav-menu::before { content: "\25B6"; font-size: 13px; line-height: 1; }
#nav-menu:hover { background: #ff8247; border-color: #ff8247; }
#nav-menu[aria-expanded="true"] { background: #07080b; color: var(--accent); }
.nav-links { display: block; flex: 1 1 auto; min-width: 0; }
.nav-list { display: flex; align-items: center; gap: 0; list-style: none; margin: 0; padding: 0; overflow-x: auto; scrollbar-width: none; }
.nav-list::-webkit-scrollbar { display: none; }
.nav-list li { display: block; }
.nav-link { position: relative; display: flex; align-items: center; min-height: 44px; padding: 0 10px; color: var(--bone2); text-decoration: none; white-space: nowrap;
  font: var(--type-button-weight) 15px/1 var(--type-button); letter-spacing: .14em; -webkit-tap-highlight-color: transparent; }
.nav-link::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 7px; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.nav-link:hover, .nav-link:active { color: var(--bone); }
.nav-link:hover::after, .nav-link:focus-visible::after { transform: scaleX(1); }
html:not(.calm) .nav-link::after { transition: transform .2s ease; }
.n-full { display: none; }

#nav-radio { display: flex; align-items: center; margin-left: auto; flex: 0 0 auto; border: 1px solid var(--line); background: rgba(9, 10, 13, .7); }
.radio-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; margin: 0; background: transparent; color: var(--bone); border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.radio-btn svg { width: 20px; height: 20px; fill: currentColor; }
.radio-btn:hover { color: var(--accent); }
.radio-btn:active { background: rgba(236, 228, 211, .12); }
.radio-play .i-pause { display: none; }
.is-playing .radio-play .i-pause { display: block; }
.is-playing .radio-play .i-play { display: none; }
.is-playing .radio-play { color: var(--accent); }
.is-loading .radio-play { color: var(--accent); animation: radio-wait 1.6s ease-in-out infinite; }
@keyframes radio-wait { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .is-loading .radio-play { animation: none; } }
.radio-title { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: var(--type-body-weight) 12px/1 var(--type-body); letter-spacing: .14em; color: var(--bone2); }
#nav-radio .radio-title, #nav-radio .radio-next { display: none; }

/* a keyboard ring on everything the new navigation adds */
.brand:focus-visible, .nav-btn:focus-visible, .nav-link:focus-visible, .radio-btn:focus-visible, #shards:focus-visible, .tile:focus-visible, .chip:focus-visible, .row:focus-visible,
.sheet-close:focus-visible, .footer-calm-btn:focus-visible, .q-opt:focus-visible, .calm-row input:focus-visible, .radio-vol:focus-visible, .footer-logos a:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

@media (min-width: 600px) { .brand span { display: inline; font-size: 15px; letter-spacing: .13em; } .nav-btn { padding: 0 14px; letter-spacing: .14em; font-size: 12px; } #shards { font-size: 12px; } }
@media (max-width: 374px) { #hud-top { gap: 4px; padding: 0 8px; } .nav-btn { padding: 0 8px; letter-spacing: .06em; } #shards { padding: 0 8px 0 7px; gap: 4px; letter-spacing: .04em; } }

@media (min-width: 900px) {
  #hud-top { gap: 8px; padding: 0 16px 0 18px; }
  .brand span { display: none; }
  .nav-list { justify-content: flex-start; }
  #nav-radio { margin-left: 0; }
  #nav-radio .radio-next { display: inline-flex; }
  .nav-btn { font-size: 12px; }
}
@media (min-width: 1100px) { .nav-link { padding: 0 12px; } .nav-link::after { left: 12px; right: 12px; } }
@media (min-width: 1200px) { .brand span { display: inline; font-size: 17px; letter-spacing: .16em; } }
@media (min-width: 1280px) { .n-full { display: inline; } .n-short { display: none; } .nav-link { font-size: 16px; } }
@media (min-width: 1700px) { #nav-radio .radio-title { display: block; width: 170px; flex: 0 0 170px; padding: 0 4px 0 6px; } .file { display: block; } }

/* ---------------- the ink fade (COLLECTIONS / SKIP TO THE CREWS) ---------------- */
#ink { position: fixed; inset: 0; z-index: 36; background: var(--ink); opacity: 0; pointer-events: none; transition: opacity .125s var(--polish-out); }
#ink.on { opacity: 1; }
.calm #ink { display: none; }

/* ---------------- MISSION TILES (cover, menu sheet, end of page) ---------------- */
.tile { --tc: var(--accent); --art-h: clamp(54px, 9.5vh, 100px); position: relative; display: grid; grid-template-rows: auto auto auto 1fr; align-content: start; min-width: 0; padding-bottom: 12px;
  color: var(--bone); text-decoration: none; background: #0b0c10; border: 1px solid var(--line); -webkit-tap-highlight-color: transparent;
  box-shadow: 0 0 0 3px var(--ink), 0 0 0 4px rgba(236, 228, 211, .08), 0 14px 30px rgba(0, 0, 0, .5); }
.tile::before { content: ""; position: absolute; left: -1px; right: -1px; top: -1px; height: 3px; background: var(--tc); z-index: 2; }
.tile[data-k="galaxy"], .tile[data-k="training"] { --tc: var(--cyan); }
.tile[data-k="festival"] { --tc: #ff4fb8; }
.tile[data-k="game"] { --tc: #ffb02e; }
.tile[data-k="dossier"] { --tc: var(--bone); }
.tile[data-k="planets"], .tile-skip { --tc: var(--gold); }
.tile-skip { background: #12100a; border-color: rgba(242, 193, 78, .4); }
.tile-art { position: relative; display: block; height: var(--art-h); margin: 9px 9px 0; overflow: hidden; background: #050608; border: 1px solid rgba(236, 228, 211, .22); box-shadow: inset 0 0 0 3px #050608, inset 0 0 0 4px rgba(236, 228, 211, .1); }
.tile-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tile-kick { padding: 10px 12px 0; font: var(--type-eyebrow-weight) 12px/1.2 var(--type-eyebrow); letter-spacing: .22em; color: var(--tc); }
.tile-label { padding: 4px 12px 0; font: var(--type-section-weight) clamp(20px, 1.7vw, 26px)/.98 var(--type-section); letter-spacing: .02em; color: var(--bone); overflow-wrap: anywhere; }
.tile-sub { padding: 5px 12px 0; font: var(--type-body-weight) 16px/1.2 var(--type-body); color: var(--bone2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile:hover, .tile:focus-visible { border-color: var(--tc); background: #10121a; }
.tile:active { background: #161922; }
.tile:hover .tile-label, .tile:focus-visible .tile-label { color: var(--tc); }
.tile-skip:hover, .tile-skip:focus-visible { background: #1a160b; }
@media (hover: hover) and (pointer: fine) {
  html:not(.calm) .tile { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
  html:not(.calm) .tile:hover { transform: translateY(-3px); box-shadow: 0 0 0 3px var(--ink), 0 0 0 4px var(--tc), 0 20px 40px rgba(0, 0, 0, .6); }
  html:not(.calm) .tile:active { transform: translateY(0); }
}

/* spread mode: MISSION SELECT in the empty left half beside the cover */
.mission-select { position: fixed; z-index: 7; left: clamp(18px, 2.4vw, 44px); top: 70px; bottom: 66px; width: calc(50vw - clamp(18px, 2.4vw, 44px) - 48px); max-width: 700px;
  display: flex; flex-direction: column; justify-content: center; opacity: 0; visibility: hidden; pointer-events: none; }
html:not(.calm) .mission-select { transition: opacity .25s ease, visibility 0s .25s; }
.mode-spread.on-cover:not(.past-book):not(.no-webgl) .mission-select { opacity: 1; visibility: visible; pointer-events: auto; }
html:not(.calm).mode-spread.on-cover .mission-select { transition: opacity .3s ease .1s; }
.ms-kick { margin: 0 0 8px; font: var(--type-eyebrow-weight) 12px/1.2 var(--type-eyebrow); letter-spacing: .28em; color: var(--accent); }
.ms-title { margin: 0 0 clamp(12px, 2.4vh, 22px); font: var(--type-section-weight) clamp(30px, 5.2vh, 54px)/.9 var(--type-section); letter-spacing: .01em; color: var(--bone); text-shadow: 0 2px 0 var(--ink), 0 8px 30px rgba(0, 0, 0, .7); }
.ms-grid { display: grid; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); gap: 14px; }
.mission-select .tile { --art-h: clamp(48px, 8.8vh, 100px); }
.mission-select .tile-label { font-size: clamp(17px, 1.5vw, 24px); }
@media (max-height: 860px) { .mission-select .tile-sub { -webkit-line-clamp: 1; } .mission-select .tile { padding-bottom: 9px; } .ms-grid { gap: 11px; } }

/* single mode: a scrolling strip of thumb chips in its own band above the page controls */
.mission-strip { position: fixed; left: 0; right: 0; bottom: var(--hb, 74px); height: var(--sh, 60px); z-index: 7; display: none; align-items: center;
  background: linear-gradient(0deg, rgba(5, 6, 8, .9), rgba(5, 6, 8, .6)); border-top: 1px solid var(--line); }
.mode-single .mission-strip { display: flex; }
.strip-list { display: flex; align-items: center; gap: 8px; width: 100%; height: 100%; margin: 0; padding: 0 30px 0 14px; list-style: none; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; touch-action: pan-x; }
.strip-list::-webkit-scrollbar { display: none; }
.strip-list li { flex: 0 0 auto; scroll-snap-align: start; }
.mission-strip { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 26px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 26px), transparent); }
.chip { display: flex; align-items: center; gap: 9px; height: 48px; padding: 0 13px 0 4px; color: var(--bone); text-decoration: none; white-space: nowrap; background: #0b0c10; border: 1px solid var(--line); -webkit-tap-highlight-color: transparent; }
.chip-art { display: block; width: 40px; height: 40px; flex: 0 0 auto; overflow: hidden; border: 1px solid rgba(236, 228, 211, .25); background: #050608; }
.chip-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.chip-label { font: var(--type-button-weight) 12px/1 var(--type-button); letter-spacing: .12em; }
.chip-skip { border-color: rgba(242, 193, 78, .55); color: var(--gold); background: #12100a; }
.chip:hover { border-color: var(--bone2); }
.chip:active { background: #161922; }
.past-book .mission-strip, .no-webgl .mission-strip { display: none; }

/* ---------------- the menu sheet ---------------- */
.sheet { position: fixed; inset: 0; z-index: 40; display: flex; justify-content: flex-end; }
.sheet[hidden] { display: none; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(3, 4, 6, .78); }
.sheet-panel { position: relative; display: flex; flex-direction: column; width: min(100%, 460px); height: 100%; background: #0b0c10; border-top: 4px solid var(--accent); border-left: 1px solid rgba(236, 228, 211, .22); box-shadow: -24px 0 70px rgba(0, 0, 0, .65); }
@supports (height: 100dvh) { .sheet-panel { height: 100dvh; } }
html:not(.calm) .sheet:not([hidden]) .sheet-panel { animation: sheet-in .22s ease-out; }
html:not(.calm) .sheet:not([hidden]) .sheet-backdrop { animation: sheet-fade .22s ease-out; }
@keyframes sheet-in { from { transform: translateX(28px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes sheet-fade { from { opacity: 0; } to { opacity: 1; } }
.sheet-head { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px 12px 18px; border-bottom: 1px solid var(--line); }
.sheet-headtext { min-width: 0; }
.sheet-kick { margin: 0 0 4px; font: var(--type-eyebrow-weight) 12px/1.2 var(--type-eyebrow); letter-spacing: .26em; color: var(--accent); }
.sheet-title { margin: 0; font: var(--type-section-weight) 32px/.9 var(--type-section); letter-spacing: .02em; color: var(--bone); }
.sheet-close { flex: 0 0 auto; min-width: 44px; min-height: 44px; padding: 0 14px; background: rgba(5, 6, 8, .9); color: var(--bone); border: 1px solid rgba(236, 228, 211, .4); font: var(--type-button-weight) 12px/1 var(--type-button); letter-spacing: .2em; cursor: pointer; }
.sheet-close:hover { border-color: var(--accent); color: var(--accent); }
.sheet-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 14px 16px 64px; }
.sheet-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.row { --tc: var(--accent); position: relative; display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 76px; padding: 6px 12px 6px 6px;
  color: var(--bone); text-decoration: none; background: #0d0e13; border: 1px solid var(--line); border-left: 3px solid var(--tc); -webkit-tap-highlight-color: transparent; }
.row[data-k="galaxy"], .row[data-k="training"] { --tc: var(--cyan); }
.row[data-k="festival"] { --tc: #ff4fb8; }
.row[data-k="game"] { --tc: #ffb02e; }
.row[data-k="dossier"] { --tc: var(--bone); }
.row[data-k="planets"], .row[data-jump] { --tc: var(--gold); }
.row-art { display: block; width: 64px; height: 64px; overflow: hidden; border: 1px solid rgba(236, 228, 211, .25); background: #050608; }
.row-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.row-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.row-kick { font: var(--type-eyebrow-weight) 12px/1.2 var(--type-eyebrow); letter-spacing: .22em; color: var(--tc); }
.row-label { font: var(--type-section-weight) 22px/.98 var(--type-section); letter-spacing: .02em; overflow-wrap: anywhere; }
.row-sub { font: var(--type-body-weight) 15px/1.15 var(--type-body); color: var(--bone2); }
.row-go { font: var(--type-body-weight) 26px/1 var(--type-body); color: var(--tc); padding-left: 2px; }
.row:hover, .row:focus-visible { background: #12141b; border-color: var(--tc); }
.row:active { background: #181b24; }
.sheet-sec { margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--line); }
.sheet-h { margin: 0 0 10px; font: var(--type-eyebrow-weight) 12px/1.2 var(--type-eyebrow); letter-spacing: .26em; color: var(--bone3); }
.radio-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.radio-row .radio-btn { border: 1px solid var(--line); background: rgba(9, 10, 13, .7); }
.radio-row .radio-title { font-size: 12px; }
.radio-vol { flex: 1 1 100%; width: 100%; min-height: 44px; margin: 0; accent-color: var(--accent); background: transparent; }
.calm-row { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 4px 0; font: var(--type-body-weight) 17px/1.2 var(--type-body); color: var(--bone); cursor: pointer; }
.calm-row input { width: 24px; height: 24px; margin: 0; flex: 0 0 auto; accent-color: var(--accent); }
.sheet-gfx { margin-top: 14px; }
.q-title { margin: 0 0 8px; font: var(--type-eyebrow-weight) 12px/1.2 var(--type-eyebrow); letter-spacing: .26em; color: var(--bone3); text-transform: uppercase; }
.q-seg { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.q-opt { min-height: 44px; padding: 0 4px; background: rgba(9, 10, 13, .7); color: var(--bone2); border: 1px solid var(--line); font: var(--type-button-weight) 12px/1 var(--type-button); letter-spacing: .06em; cursor: pointer; }
.q-opt:hover { border-color: var(--bone2); color: var(--bone); }
.q-opt[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #07080b; }
.q-note { margin-top: 8px; font: var(--type-body-weight) 15px/1.25 var(--type-body); color: var(--bone3); }
.sheet-foot { margin: 26px 0 0; font: var(--type-caption-weight) 12px/1.4 var(--type-caption); letter-spacing: .2em; color: var(--bone3); text-align: center; }

/* ---------------- YOUR NEXT MISSION ---------------- */
#next-mission { position: relative; z-index: 4; min-height: 60vh; padding: clamp(64px, 9vw, 120px) clamp(16px, 4vw, 56px) clamp(56px, 8vw, 96px); color: var(--bone); }
.nm-wrap { max-width: 1480px; margin: 0 auto; }
.nm-head { position: relative; padding-top: 22px; margin-bottom: clamp(24px, 3.5vw, 44px); border-top: 1px solid var(--line); }
.nm-head::before { content: ""; position: absolute; left: 0; top: -2px; width: 72px; height: 3px; background: var(--accent); }
.nm-kick { margin: 0 0 14px; font: var(--type-eyebrow-weight) 12px/1.2 var(--type-eyebrow); letter-spacing: .28em; color: var(--accent); }
.nm-title { margin: 0; font: var(--type-display-weight) clamp(44px, 8vw, 108px)/.88 var(--type-display); letter-spacing: .01em; color: var(--bone); text-shadow: 0 2px 0 var(--ink), 0 10px 40px rgba(0, 0, 0, .7); }
.nm-intro { margin: 16px 0 0; max-width: 620px; font: var(--type-body-weight) clamp(18px, 2vw, 22px)/1.35 var(--type-body); color: var(--bone2); text-shadow: 0 1px 14px var(--ink); }
.nm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 18px; }
#next-mission .tile { --art-h: clamp(120px, 13vw, 190px); padding-bottom: 16px; }
#next-mission .tile-kick { padding: 14px 16px 0; font-size: 12px; }
#next-mission .tile-label { padding: 5px 16px 0; font-size: clamp(26px, 2.4vw, 34px); }
#next-mission .tile-sub { padding: 7px 16px 0; font-size: 18px; }
@media (max-width: 599px) {
  .nm-grid { gap: 14px; }
  #next-mission .tile { --art-h: auto; grid-template-columns: 112px minmax(0, 1fr); grid-template-rows: auto auto 1fr; grid-template-areas: "art kick" "art label" "art sub"; align-content: stretch; padding-bottom: 12px; }
  #next-mission .tile-art { grid-area: art; align-self: stretch; height: auto; min-height: 104px; margin: 9px 0 0 9px; }
  #next-mission .tile-kick { grid-area: kick; padding: 12px 12px 0; }
  #next-mission .tile-label { grid-area: label; padding: 4px 12px 0; font-size: 26px; }
  #next-mission .tile-sub { grid-area: sub; padding: 5px 12px 0; font-size: 17px; }
}

/* ---------------- footer ---------------- */
#footer { position: relative; z-index: 4; text-align: center; padding: 44px 16px 72px; border-top: 1px solid var(--line); background: rgba(5, 6, 8, .92); }
.footer-logos { display: flex; align-items: center; justify-content: center; gap: 20px; }
.footer-logos img { display: block; height: 34px; width: auto; max-width: 40vw; object-fit: contain; }
.footer-tag, .footer-copy { margin: 16px 0 0; font: var(--type-eyebrow-weight) 12px/1.6 var(--type-eyebrow); letter-spacing: .2em; color: var(--bone3); overflow-wrap: anywhere; }
.footer-calm { margin: 14px 0 0; }
.footer-calm-btn { min-height: 44px; max-width: 100%; padding: 8px 14px; background: transparent; color: var(--bone2); border: 1px solid var(--line); font: var(--type-button-weight) 12px/1.3 var(--type-button); letter-spacing: .08em; cursor: pointer; }
.footer-calm-btn:hover { border-color: var(--accent); color: var(--accent); }
.footer-copy { margin-top: 12px; }
.no-webgl #next-mission { min-height: 0; }

/* The same captured cover is in the HTML response: no module/image round trip before paint. */
#cover-poster { position:absolute; inset:0; display:block; pointer-events:none; }
#cover-poster img { width:100%; height:100%; object-fit:contain; display:block; }
#loader .ld-mark, #loader .ld-sub, #loader .ld-bar { position:relative; display:none; }
#loader { pointer-events:none; transition:opacity .25s, visibility 0s .25s; }
.calm #loader { transition:none; }

/* Comic radio: visible song picker, one scrollable modal sheet. */
#nav-radio { flex: 0 1 410px; min-width: 250px; }
#nav-radio .radio-next { display: inline-flex; }
#nav-radio .radio-title { display:block; width:auto; flex:1 1 100px; padding:0 6px; }
.radio-title { border:0; background:transparent; text-align:left; cursor:pointer; font-size: 12px; min-height:44px; letter-spacing:.03em; }
.radio-title span { display:inline-block; }
html:not(.calm) .radio-title.is-long span { animation:song-marquee 12s linear infinite; }
@keyframes song-marquee { 0%,20% { transform:translateX(0); } 70%,90% { transform:translateX(calc(-100% + 70px)); } }
.radio-songs { width:80px; flex-shrink:0; font:var(--type-button-weight) 12px/1 var(--type-button); color:var(--accent); }
.radio-btn { flex-shrink:0; }
.radio-sheet { color:var(--bone); background:#101218; border:2px solid var(--accent); padding:16px; width:min(520px,calc(100% - 32px)); max-height:80dvh; box-sizing:border-box; }
.radio-sheet::backdrop { background:rgba(0,0,0,.72); }
.radio-sheet[open] { display:flex; flex-direction:column; }
.songs-head { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.songs-head h2 { margin:0; font:var(--type-section-weight) 26px/1 var(--type-section); }
.songs-status,.song-collection,.songs-volume { font:var(--type-data-weight) 12px/1.5 var(--type-data); }
.songs-list { overflow:auto; overscroll-behavior:contain; min-height:0; }
.song-row { display:flex; flex-direction:column; justify-content:center; width:100%; min-height:60px; padding:10px 12px; border:0; border-bottom:1px solid var(--line); background:transparent; color:var(--bone); text-align:left; cursor:pointer; }
.song-name { font:var(--type-body-weight) 17px/1.3 var(--type-body); }
.song-collection { color:var(--bone2); }
.song-row[aria-current="true"] { color:var(--accent); background:#27201c; box-shadow:inset 3px 0 var(--accent); }
.song-row:focus-visible,.radio-title:focus-visible { outline:2px solid var(--accent); outline-offset:-2px; }
.songs-volume { display:flex; align-items:center; gap:16px; }
.songs-volume .radio-vol { flex:1; width:auto; }
@media (max-width:899px) {
 html.mode-single { --bt:148px; }
 #hud-top { flex-wrap:wrap; align-content:center; height:148px; padding-top:4px; padding-bottom:4px; row-gap:2px; }
 .mode-single #hud-top { height:var(--bt); }
 .brand { order:-2; }
 #nav-menu { order:-1; }
 #shards { margin-left:auto; }
 #nav-radio { order:10; flex:1 1 100%; margin:0; }
 #nav-links { order:11; flex:1 1 100%; }
 .nav-list { gap:4px; padding-right:28px; -webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 36px),transparent); mask-image:linear-gradient(90deg,#000 calc(100% - 36px),transparent); }
 #nav-links .nav-link { padding:0 14px; font-size:14px; border:1px solid var(--line); background:rgba(9,10,13,.7); }
 #nav-links .nav-link::after { display:none; }
 .radio-sheet { margin:auto 0 0; width:100%; max-height:75dvh; padding-bottom:max(16px,env(safe-area-inset-bottom)); }
 .mode-single #score, .mode-single #toast { top:154px; }
}
@media (min-width:600px) and (max-width:899px) { #nav-links .nav-link { padding:0 9px; letter-spacing:.08em; } }
@media (prefers-reduced-motion:reduce) { .radio-title.is-long span { animation:none !important; } }
#score { pointer-events:none; }
@media (min-width:900px) and (max-width:1599px) {
 #hud-top .brand span { display:none; }
 #hud-top .n-full { display:none; }
 #hud-top .n-short { display:inline; }
 #hud-top .nav-link { padding:0 8px; font-size: 14px; }
}

/* Scroll-led reading: no opening tiles or reserved tile band. */
html.mode-single { --sh: 0px; } /* retain the numeric responsive reading/HUD bands */
.calm #track { height: auto; }
#fly-ink, #fly-still { display: none !important; }
.flying #gl { touch-action: pan-y; }
#fly-orbit { position:fixed; z-index:5; inset:62px 0 100px; display:none; touch-action:pan-y; }
.flying #fly-orbit { display:block; }
#fly-orbit .orbit-note { position:absolute; bottom:8px; left:50%; transform:translateX(-50%); padding:8px 12px; background:rgba(5,6,8,.7); color:var(--bone); font:var(--type-caption-weight) 12px/1.4 var(--type-caption); text-align:center; pointer-events:none; }
#fly-orbit .turret-hit { position:absolute; width:44px; height:44px; border:1px solid rgba(255,150,100,.55); border-radius:50%; background:transparent; color:var(--bone); cursor:pointer; touch-action:pan-y; }
#fly-orbit .turret-hit:focus-visible { outline:2px solid var(--cyan); }
#fly-orbit.worlds { display:none; }
#next-mission { min-height:0; }

/* Shared control rhythm; local ink colours and fitted layout stay with the comic. */
.crew-btn, .crews-back, .crew-dlg-close, .sheet-close, .nav-btn, .nav-link, .chip-label, .q-opt, .radio-songs, .footer-calm-btn { font-family: var(--type-button); font-weight: var(--type-button-weight); line-height: var(--type-button-leading); letter-spacing: var(--type-button-tracking); }

/* Chapter 06: framed collection art lifts from the final page. */
html:not(.no-webgl) body #crews, #crews { padding: 122px 16px 28px; }
.crews-head { margin-bottom: 18px; padding-top: 12px; }
.crews-kicker { margin-bottom: 8px; }
.crews-title { font-size: clamp(38px, 6vw, 72px); }
.crews-intro { margin-top: 10px; font-size: 16px; }
.crews-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
#crews .crew { display: block; width: 100%; background: transparent; border: 0; box-shadow: none; }
#crews .crew-cover { display: flex; flex-direction: column; height: clamp(112px,calc((100dvh - 340px)/4),156px); padding: 8px; background: #080b12; border: 1px solid #c5bba7; box-shadow: 0 8px 20px #0005; }
#crews .crew-frame { width: 100%; height: 70%; flex: 0 0 70%; min-height: 0; border: 0; background: transparent; box-shadow: none; aspect-ratio: auto; }
#crews .crew-no, #crews .crew-open { display: none; }
.crew-card-caption { display: flex; flex-direction: column; justify-content: center; text-align: center; width: 100%; flex: 1; position: relative; }
.crew-card-name { font: var(--type-section-weight) 14px/1.05 var(--type-section); }
#crews .crew-minted { padding-top: 3px; margin: 0; font-size: 12px; letter-spacing: 0; }
#crews.crews-3d .crew-cover { background: transparent; border-color: transparent; box-shadow: none; }
#crews.crews-3d .crew-frame { visibility: hidden; }
#crews .crews-back { margin-top: 16px; }
@media(min-width:900px) {
  #crews { padding: 86px 40px 40px; }
  .crews-grid { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 20px; }
  #crews .crew-cover { height: min(30dvh,280px); }
  .crew-card-name { font-size: 20px; }
}

.past-book #hud-bottom, .past-book #hotspots { visibility: hidden; pointer-events: none; }

#crews-grid { background: transparent; border: 1px solid #b8ae9633; border-radius: 2px; padding: 8px; }

/* T290: one restrained interaction curve, readable secondary ink, native sheets. */
:root { --polish-out:cubic-bezier(.16,1,.3,1); --bone3:#aca99f; }
:where(a,button,input,select,summary,[tabindex]):focus-visible { outline:3px solid var(--cyan); outline-offset:3px; }
:where(button,.nav-btn,.tile,.crew-cover,.crew-btn,.row):active { filter:brightness(.86); }
.tile,.row,.nav-btn,.sheet-panel,#toast,#hint,#loader { transition-timing-function:var(--polish-out); }
.tile-art img { transform:translate(var(--tile-x,0px),var(--tile-y,0px)) scale(1.035); transition:transform .35s var(--polish-out); }
.crew-cover > .crew-mosaic { position:absolute; bottom:62px; left:12px; right:12px; height:54px; display:flex; gap:6px; }
.crew-cover > .crew-mosaic img { width:calc((100% - 12px)/3); height:100%; object-fit:contain; background:#080a10; border:1px solid #aca99f; }
.crew-dialog--panel::backdrop { background:rgba(5,6,8,.25); }
#comic-loading { position:fixed; left:50%; bottom:calc(env(safe-area-inset-bottom) + 68px); transform:translateX(-50%); z-index:31; width:min(280px,80vw); padding:10px 14px; background:#080a10; border:1px solid #aca99f; color:#ece4d3; font:var(--type-caption-weight) 14px/1.4 var(--type-caption); text-align:center; }
#comic-loading progress { display:block; width:100%; height:4px; margin-top:8px; accent-color:var(--cyan); }
#comic-loading[hidden],.at-crews #comic-loading { display:none; }
.skip { z-index:40; }
.reading-story #story { position:relative; z-index:12; width:auto; height:auto; clip:auto; clip-path:none; white-space:normal; max-width:760px; margin:auto; padding:84px 24px; background:#080a10; }
.reading-story #story img { max-width:100%; }
.reading-story #links { scroll-margin-top:80px; }
.reading-story #track { display:none; }
.calm :where(.tile,.tile-art img,.row,.nav-btn,.sheet-panel,#toast,#hint,#loader) { transition:none; animation:none; }
@media(prefers-reduced-motion:reduce) {
  #grain,#hint b,#shards.pulse,#score.pulse { animation:none!important; }
  .tile-art img { transform:none; }
  :where(.tile,.row,.nav-btn,.sheet-panel,#toast,#hint,#loader) { transition:none!important; }
}

@media(max-width:899px) { .crew-cover > .crew-mosaic { bottom:34px; height:32px; gap:4px; left:10px; right:10px; } }

.file-sheet { position:fixed; margin:auto auto 82px; width:min(440px,calc(100% - 32px)); max-height:50dvh; overflow:auto; padding:18px; background:#080a10; border:1px solid #59d8ff; color:var(--bone); }
.file-sheet::backdrop { background:transparent; }
.file-sheet h2 { font:var(--type-section-weight) 26px/1.1 var(--type-section); margin:0 0 8px; }
.file-sheet p { font:var(--type-body-weight) 18px/1.4 var(--type-body); }
.file-sheet button { min-height:44px; width:100%; font:var(--type-button-weight) 16px/1.3 var(--type-button); color:var(--bone); background:#10141d; border:1px solid var(--cyan); }
@media(min-width:900px) and (max-width:1199px) {
  #hud-top .nav-link { padding:0 5px; font-size:13px; letter-spacing:.04em; }
  #hud-top #nav-radio { min-width:132px; flex:0 0 132px; }
  #hud-top #nav-radio .radio-title,#hud-top #nav-radio .radio-songs,#hud-top #nav-radio .radio-next { display:none; }
  #hud-top .brand span { display:none; }
}

/* Keep lifted specimens above a reserved two-line collection caption. */
#crews .crew-frame { height:calc(100% - 70px); flex:0 0 calc(100% - 70px); }
#crews .crew-card-caption { min-height:70px; flex:0 0 70px; }
#crews .crew-cover > .crew-mosaic { bottom:82px; margin:0; }
@media(max-width:899px) {
  #crews .crew-frame { height:calc(100% - 50px); flex:0 0 calc(100% - 50px); }
  #crews .crew-card-caption { min-height:50px; flex:0 0 50px; }
  #crews .crew-cover > .crew-mosaic { bottom:62px; margin:0; }
}

/* Story visuals have no CSS clock: HOLD really holds, including DOM labels.
   Loading indicators remain available before the comic is ready. */
.motion-core #grain, .motion-core #hint b, .motion-core #shards, .motion-core #score { animation:none!important; }
.motion-core :is(#hud-top,#hud-bottom,#hint,#toast,#fly-worlds,#fly-orbit,#crews),
.motion-core :is(#hud-top,#hud-bottom,#hint,#toast,#fly-worlds,#fly-orbit,#crews) *:not(#nav-radio):not(#nav-radio *) { transition:none!important; animation:none!important; }

/* Pooled tap feedback; its lifetime is sampled by main, never a CSS animation. */
.tap-hit-marker { position:fixed; left:0; top:0; width:32px; height:32px; border:2px solid #f8dfba; border-radius:50%; box-sizing:border-box; pointer-events:none; z-index:40; background:radial-gradient(circle,#fff4dc 0 2px,rgba(255,171,99,.35) 3px,transparent 12px); box-shadow:0 0 12px rgba(255,171,99,.45); }
.tap-hit-marker[hidden], #fly-orbit .turret-hit[hidden] { display:none; }

/* Short landscape uses the full illustrated viewport. The accessible reading
   view remains opt-in through the existing story link/focus path. */
@media (orientation:landscape) and (max-height:500px) and (max-width:1000px) {
  html.mode-single { --bt:56px; }
  #hud-top, .mode-single #hud-top { height:56px; flex-wrap:nowrap; padding:0 10px; align-content:normal; row-gap:0; }
  #hud-top #nav-radio, #hud-top .file { display:none; }
  #hud-top #nav-links { order:11; flex:1 1 0; }
  #hud-top .nav-list { padding-right:24px; }
  .mode-single #score, .mode-single #toast { top:62px; }
  #hud-top #shards { margin-left:0; }
  #hint { display:none; }
}

/* Short landscape screens have room beside the cover, not over its title. */
@media (orientation:landscape) and (max-height:560px) {
  #comic-loading { box-sizing:border-box; left:auto; right:calc(env(safe-area-inset-right) + 12px); bottom:50%; transform:translateY(50%); width:clamp(120px,calc((100vw - 280px)/2 - 24px),240px); }
}

/* Artwork, contact strip and caption each own their vertical band. */
#crews .crew-frame { height:calc(100% - 124px); flex:1 1 auto; }
#crews .crew-cover > .crew-mosaic { position:static; flex:0 0 44px; height:44px; margin:6px 0 4px; }
#crews .crew-cover { min-height:200px; }
@media(max-width:899px) {
  #crews .crew-cover { min-height:160px; }
  #crews .crew-frame { height:calc(100% - 94px); }
  #crews .crew-cover > .crew-mosaic { flex-basis:32px; height:32px; margin:4px 0; }
}
/* reopened mid-comic (main.js RESUME): one small way back to the cover */
#resume-chip { position: fixed; top: calc(var(--bt, 60px) + 10px); right: 12px; z-index: 9; min-height: 44px; padding: 0 16px; border-radius: 22px;
  font-family: var(--type-caption); font-size: 13px; letter-spacing: .1em; color: var(--bone); background: rgba(5,6,8,.86); border: 1px solid rgba(240,232,220,.35);
  cursor: pointer; transition: opacity .4s; z-index: 10; }
#resume-chip:focus-visible { outline: 2px solid var(--bone); outline-offset: 2px; }
#resume-chip.gone { opacity: 0; pointer-events: none; visibility: hidden; transition: opacity .4s, visibility 0s .4s; }
#toast.show ~ #resume-chip { opacity: 0; pointer-events: none; }
.past-book #resume-chip { display: none; }

/* Chapter 06 frames (owner 2026-10-17, phone): the art is the card. A square frame the cover fills, the crew colour
   as one clean inner frame with a faint glow, a blurred dark copy of the same art in any letterbox (never plain black),
   and no crew-colour rule across the card top (it crossed the art whenever the 3D copy drifted off its card). */
#crews .crew::before { content: none; }
#crews .crew-cover { height: auto; min-height: 0; }
#crews .crew-frame { flex: 0 0 auto; width: 100%; height: auto; aspect-ratio: 1 / 1; max-height: min(46svh, 340px); background: #07080c; isolation: isolate;
  box-shadow: 0 0 14px -4px var(--crew); }
#crews .crew-frame::before { content: ""; position: absolute; inset: -24px; background: #07080c var(--art, none) center / cover no-repeat; filter: blur(16px) brightness(.45); }
#crews .crew-frame img { z-index: 1; object-fit: contain; }
#crews .crew-frame::after { content: ""; position: absolute; inset: 0; z-index: 2; border: 2px solid var(--crew); box-shadow: inset 0 0 10px -2px var(--crew); pointer-events: none; }
/* short landscape phones: four across, so each square stays inside the screen height */
@media (orientation: landscape) and (max-height: 560px) { .crews-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Comic discovery chips (COLLECTIONS + star shards). Owner 2026-10-18 ("look how these blend together"): stacked in the
   Cadet Bar's title column under MISSION FILE 01, a ‹ BACK link made that column taller than the 52px bar, so BACK sat on
   the title and the chips (and HOME/LOG/GAMES) slid onto the music bar. Wide screens: one row beside the title.
   Narrower screens: their own row directly BELOW both bars (--sn-h), inside the 148px top band (--bt) the single-page
   comic already keeps clear. Short landscape keeps its docked slot (rule further down). The motion loop is unchanged. */
html.sn-on #hud-top{position:static!important;display:flex!important;align-items:center;justify-content:center;gap:8px;flex-wrap:nowrap;height:44px!important;min-height:0;padding:0!important;width:auto;background:none;border:0;opacity:1;pointer-events:auto}
html.sn-on #hud-top a,html.sn-on #hud-top #shards{display:inline-flex;align-items:center;justify-content:center;min-height:44px;height:44px;padding:0 6px;margin:0;font:600 12px var(--type-button);letter-spacing:.02em;border:0;background:none;color:#f1eee8;white-space:nowrap}
html.sn-on #hud-top #shards svg{width:14px;height:14px}
@media (min-width:900px){html.sn-on .sn-mid:has(#hud-top){flex-direction:row;gap:8px}
 /* the HITS counter, toasts and the resume chip (top 66/74/70px) would sit under the shared bars here; keep them just below, as on phones */
 html.sn-on #score,html.sn-on #toast{top:calc(env(safe-area-inset-top,0px) + var(--sn-h) + 6px)}
 html.sn-on #resume-chip{top:calc(env(safe-area-inset-top,0px) + var(--sn-h) + 10px)}}
/* the plain-HTML fallback (html.no-webgl) and the keyboard reading view (html.reading-story: Skip link or a focused story
   link), every width: every jump (COLLECTIONS, 'Skip to the site links', a shared /#crews link) and every focused link, with
   its 6px focus ring, lands below the bars, not under them; narrow screens also clear the chips' row (below) */
html.sn-on:is(.no-webgl,.reading-story){scroll-padding-top:calc(env(safe-area-inset-top,0px) + var(--sn-h) + 8px)}
html.sn-on:is(.no-webgl,.reading-story) #links{scroll-margin-top:16px}
@media (max-width:899px) and (orientation:portrait),(max-width:899px) and (min-height:501px){
 html.sn-on #hud-top{position:fixed!important;top:calc(env(safe-area-inset-top,0px) + var(--sn-h))!important;left:0;right:0;pointer-events:none}
 html.sn-on #hud-top>*{pointer-events:auto}
 /* whenever page content scrolls under this row - past the book, the plain-HTML fallback (html.no-webgl) and the keyboard
    reading view (html.reading-story) - it gets the bars' backing (an outside line, so the 44px chips keep their box) and
    takes its own taps, so a tap beside the chips never reaches a link hidden under it */
 html.sn-on:is(.past-book,.no-webgl,.reading-story) #hud-top{background:rgba(5,6,8,.94);box-shadow:0 1px 0 var(--line);pointer-events:auto}
 /* the COLLECTIONS jump (comic running) lands the chapter heading below the row, the same 22px clear of it as before */
 html.sn-on:not(.no-webgl) body #crews{padding-top:calc(env(safe-area-inset-top,0px) + var(--sn-h) + 66px)}
 /* plain-HTML fallback and reading view: the story starts below the row (the headline keeps the gap it had below the bars),
    and jumps and focused links land below it */
 html.sn-on:is(.no-webgl,.reading-story) #story{padding-top:calc(env(safe-area-inset-top,0px) + var(--sn-h) + 32px)}
 html.sn-on:is(.no-webgl,.reading-story){scroll-padding-top:calc(env(safe-area-inset-top,0px) + var(--sn-h) + 52px)}
}

html.sn-on #loader{z-index:1900}
@media(max-height:500px) and (orientation:landscape){html.sn-on #hud-top{display:none!important}html.sn-on #hint{display:none!important}}

@media(max-height:500px) and (orientation:landscape){html.sn-on #hud-top{position:fixed!important;display:flex!important;left:auto!important;right:96px!important;top:env(safe-area-inset-top,0px)!important;width:148px;height:48px!important;padding:0!important;z-index:2003}html.sn-on body:has(#hud-top) .sn-mb{right:254px}html.sn-on #hud-top a{font-size:12px}html.sn-on #hud-top #shards{font-size:12px}}

@media (orientation:landscape) and (max-height:500px){#toast:has(small){display:none!important}}

/* Keep loading and sheet entry still under OS reduced motion, even before Calm
   initializes or when an explicit saved setting differs from the OS preference. */
@media (prefers-reduced-motion:reduce) {
  .ld-bar i, html .sheet:not([hidden]) .sheet-panel,
  html .sheet:not([hidden]) .sheet-backdrop { animation:none!important; }
  .tile-art img { transition:none!important; }
}

/* Readable comic status and navigation without changing the painted pages. */
#page-label,.mode-single #page-label{font-size:14px;color:var(--bone);letter-spacing:.10em}
#hint,.mode-single #hint{font-size:14px;line-height:1.3;letter-spacing:.06em;white-space:normal;text-align:center}
#toast,.mode-single #toast{font-size:14px;line-height:1.3;letter-spacing:.08em;white-space:normal;box-sizing:border-box;text-align:center}
#hud-top a,#hud-top button,#score,#tilt{font-size:14px}
html.sn-on #hud-top a,html.sn-on #hud-top #shards{font-size:14px}
@media(max-height:500px) and (orientation:landscape) and (min-width:701px){
 html.sn-on body:has(#hud-top) .sn-bar{grid-template-columns:100px 120px minmax(0,1fr) auto}
 html.sn-on body:has(#hud-top) .sn-mb{left:244px!important;right:316px!important}
 html.sn-on #hud-top{right:156px!important}
}
@media(max-height:500px) and (orientation:landscape) and (max-width:700px){
 html.sn-on #hud-top{top:calc(var(--sn-h) + env(safe-area-inset-top,0px))!important;right:8px!important}
}
/* The first-shard help toast sets its typography inline. */
html.sn-on #toast,html.sn-on #toast small{font-size:14px!important}
/* Keep the introductory shard help above the phone's scroll hint. */
@media(orientation:portrait){html.sn-on #toast:has(small){bottom:calc(env(safe-area-inset-bottom,0px) + 116px)!important}}
