/* Hyperdrum site. One stylesheet for every page.
   Palette mirrors game/lib/ui/theme.dart (P), fonts mirror F. No external requests. */

@font-face { font-family: "Dela"; src: url("fonts/DelaGothicOne-sub.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Dot"; src: url("fonts/DotGothic16-sub.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Chakra"; src: url("fonts/ChakraPetch-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Chakra"; src: url("fonts/ChakraPetch-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --night: #0B0826; --deep: #050314; --indigo: #1E1460; --panel: #120C3A; --panel-hi: #2C2478;
  --line: #3A2C8A; --bevel: #5E4FD0; --volt: #3D7BFF; --ice: #8FD3FF; --violet: #9B5CFF;
  --orchid: #F0A8FF; --amber: #FFB347; --ember: #FF8A1E; --cream: #FFF1D6; --coral: #FF5470;
  --lilac: #C8C2FF; --muted: #8A80D0; --good: #C8A8FF;
  --beat: .75s; /* 80 BPM */
  --gut: clamp(16px, 4.5vw, 72px);
  --edge: 18px;
  --pad: calc(max(16px, var(--gut)) + var(--edge));
  --max: 1320px;
  --chroma: -3px 0 0 rgba(255,84,112,.6), 3px 0 0 rgba(61,213,255,.6);
  --display: "Dela", "Chakra", system-ui, sans-serif;
  --led: "Dot", ui-monospace, monospace;
  --body: "Chakra", system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--deep); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--lilac); background-color: var(--night);
  font: 500 17px/1.55 var(--body);
  overflow-x: hidden;
  background-image:
    radial-gradient(ellipse 80% 50% at 70% 0%, rgba(61,123,255,.18), transparent 70%),
    radial-gradient(ellipse 60% 40% at 0% 60%, rgba(155,92,255,.12), transparent 70%),
    linear-gradient(var(--night), var(--deep));
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ice); }
a:focus-visible, summary:focus-visible, button:focus-visible { outline: 3px solid var(--amber); outline-offset: 4px; border-radius: 4px; }
h1, h2, h3 { margin: 0; font-weight: 400; color: var(--cream); }
p { margin: 0 0 1em; }

.led { font-family: var(--led); letter-spacing: .12em; }
.dim { color: var(--lilac); opacity: .8; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: -999px; top: 8px; background: var(--amber); color: var(--deep); padding: 12px 16px; z-index: 99; font-weight: 700; }
.skip:focus { left: 26px; }

/* scanlines: only on screens, never over body text */
.scan { position: relative; }
.scan::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; z-index: 3;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.08) 0 1px, transparent 1px 3px);
  opacity: 1;
}

/* ---- rush / drag edge glow (page motif) ---- */
.edge { position: fixed; top: 0; bottom: 0; width: var(--edge); z-index: 40; pointer-events: none; }
.edge--rush { left: 0; background: linear-gradient(90deg, rgba(255,179,71,.55), transparent); box-shadow: inset 2px 0 0 var(--amber); }
.edge--drag { right: 0; background: linear-gradient(270deg, rgba(143,211,255,.5), transparent); box-shadow: inset -2px 0 0 var(--ice); }
.edge span {
  position: absolute; top: 50%; font: 11px var(--led); letter-spacing: .4em;
  writing-mode: vertical-rl; transform: translateY(-50%);
}
.edge--rush span { left: 4px; color: var(--amber); transform: translateY(-50%) rotate(180deg); }
.edge--drag span { right: 4px; color: var(--ice); }
@media (prefers-reduced-motion: no-preference) {
  .edge--rush { animation: pulse calc(var(--beat) * 2) steps(1) infinite; }
  .edge--drag { animation: pulse calc(var(--beat) * 2) steps(1) infinite calc(var(--beat)); }
}
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: .35; } }

/* ---- header ---- */
.top {
  position: relative; z-index: 10; display: flex; align-items: center; gap: 12px 28px; flex-wrap: wrap;
  max-width: var(--max); margin: 0 auto; padding: 18px var(--pad);
}
.brand { display: flex; flex-direction: column; text-decoration: none; margin-right: auto; padding: 4px 0; }
.brand__kana { font: 12px/1 var(--led); color: var(--orchid); letter-spacing: .42em; margin-bottom: 6px; text-shadow: 0 0 8px rgba(155,92,255,.8); }
.logo {
  font: italic 400 clamp(20px, 2.4vw, 28px)/1 var(--display); text-transform: uppercase; letter-spacing: -.01em;
  color: var(--cream); padding-right: .12em;
  background: linear-gradient(180deg, #fff 0%, var(--cream) 38%, var(--amber) 62%, var(--ember) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(-2px 0 0 rgba(255,84,112,.75)) drop-shadow(2px 0 0 rgba(61,213,255,.7)) drop-shadow(0 0 14px rgba(255,179,71,.4));
}
.top__nav { display: flex; gap: 4px 22px; flex-wrap: wrap; }
.top__nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 2px;
  color: var(--lilac); text-decoration: none; font-weight: 700; font-size: 15px; letter-spacing: .04em;
}
.top__nav a:hover { color: var(--cream); }
.top__nav a[aria-current="page"] { color: var(--amber); box-shadow: inset 0 -2px 0 var(--amber); }
.lang {
  display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; padding: 0 12px;
  font: 15px var(--led); letter-spacing: .12em; border: 1px solid var(--line); border-radius: 999px;
  color: var(--ice); text-decoration: none; background: rgba(18,12,58,.7);
}
.lang:hover { border-color: var(--ice); }

/* ---- Play button: one switch, <html data-play="soon|live"> ---- */
html[data-play="soon"] .if-live, html[data-play="live"] .if-soon { display: none; }
html[data-play="soon"] a[data-soon] { cursor: default; pointer-events: none; }
.play {
  display: inline-flex; align-items: center; gap: 14px; text-decoration: none; white-space: nowrap;
  padding: 12px 28px 12px 22px; border-radius: 999px; color: var(--deep); min-height: 56px;
  background: radial-gradient(circle at 30% 25%, #FFD592, var(--amber) 45%, var(--ember));
  box-shadow: 0 0 0 2px rgba(255,241,214,.35) inset, 0 8px 0 #9a4a06, 0 0 36px rgba(255,138,30,.45);
  transition: transform .08s;
}
.play:hover { transform: translateY(-2px); }
.play:active { transform: translateY(4px); box-shadow: 0 0 0 2px rgba(255,241,214,.35) inset, 0 4px 0 #9a4a06; }
.play__tri { flex: none; width: 0; height: 0; border-left: 16px solid var(--deep); border-top: 10px solid transparent; border-bottom: 10px solid transparent; }
.play__txt { display: flex; flex-direction: column; line-height: 1.05; }
.play__small { font: 700 12px var(--body); letter-spacing: .08em; text-transform: uppercase; }
.play__big { font: 400 22px var(--display); letter-spacing: 0; }
html[data-play="soon"] .play { filter: saturate(.85); }
html[data-play="soon"] .play:hover, html[data-play="soon"] .play:active { transform: none; }
.play-status { margin: 18px 0 0; font: 14px/1.4 var(--led); letter-spacing: .08em; color: var(--lilac); }
.play-status::before { content: "\25CF  "; color: var(--amber); }

/* ---- hero ---- */
.hero {
  position: relative; max-width: var(--max); margin: 0 auto; padding: 32px var(--pad) 56px;
  display: grid; grid-template-columns: minmax(0, 60fr) minmax(0, 40fr); gap: 40px; align-items: center;
}
.kicker { color: var(--amber); font-size: 14px; margin-bottom: 20px; text-shadow: 0 0 10px rgba(255,179,71,.55); }
.kicker .dim { color: var(--lilac); text-shadow: none; }
.hero__title {
  font-family: var(--display); font-size: clamp(38px, 3.9vw, 60px); line-height: 1.04; letter-spacing: -.02em;
  margin-bottom: 24px;
}
.hero__title em { font-style: normal; color: var(--orchid); text-shadow: 0 0 22px rgba(240,168,255,.4); display: block; }
.hero__lede { font-size: clamp(17px, 1.4vw, 20px); max-width: 34em; color: var(--lilac); }
.chips { list-style: none; padding: 0; margin: 0 0 28px; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  font: 13px var(--led); letter-spacing: .12em; text-transform: uppercase; color: var(--ice);
  border: 1px solid var(--line); background: rgba(18,12,58,.7); padding: 6px 12px; border-radius: 999px;
}

/* hero stage: the meter ring */
.hero__stage { position: relative; display: flex; flex-direction: column; align-items: center; border-radius: 24px; padding: 8px 8px 0; }
.ring { position: relative; width: min(500px, 100%); aspect-ratio: 1; display: grid; place-items: center; container-type: inline-size; }
.ring__svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.ring__track { fill: none; stroke: rgba(94,79,208,.35); stroke-width: 3; }
.ring__seg {
  fill: none; stroke: var(--orchid); stroke-width: 7; stroke-linecap: butt;
  stroke-dasharray: 184 8.7; /* 2 * pi * 92 / 3: three taps left before the switch */
  filter: drop-shadow(0 0 8px var(--orchid)) drop-shadow(0 0 20px rgba(240,168,255,.6));
}
.ring::before {
  content: ""; position: absolute; inset: 9%; border-radius: 50%;
  background: radial-gradient(circle, rgba(155,92,255,.28), rgba(30,20,96,.25) 55%, transparent 72%);
}
.ring__num {
  position: relative; font: 400 300px/1 var(--display); font-size: 76cqw; color: var(--orchid);
  text-shadow: -7px 0 0 rgba(255,84,112,.7), 7px 0 0 rgba(61,213,255,.7), 0 0 50px rgba(240,168,255,.65);
  transform: translate(2%, 1%);
}
.ring__ghost {
  position: absolute; left: 6%; top: 6%; font: 400 130px/1 var(--display); font-size: 30cqw; color: transparent;
  -webkit-text-stroke: 2px rgba(143,211,255,.55); text-shadow: 0 0 24px rgba(143,211,255,.25);
}
.ring__tag {
  position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%); white-space: nowrap;
  background: var(--deep); border: 1px solid var(--line); padding: 6px 14px; border-radius: 4px;
  color: var(--orchid); font-size: 14px;
}
.hud {
  width: min(500px, 100%); margin-top: 26px; padding: 14px 0 6px; border-top: 1px dashed var(--line);
  display: flex; justify-content: space-between; align-items: flex-end; gap: 16px;
}
.callout { text-align: right; display: flex; flex-direction: column; gap: 2px; }
.callout__rating { font: 400 clamp(28px, 3.2vw, 46px)/1 var(--display); color: var(--cream); letter-spacing: .02em; text-shadow: var(--chroma), 0 0 18px rgba(255,241,214,.6); }
.callout__kana { color: var(--orchid); font-size: 14px; letter-spacing: .3em; }
.callout__ms { color: var(--amber); font-size: 15px; text-shadow: 0 0 10px rgba(255,179,71,.6); }
.combo { display: flex; flex-direction: column; }
.combo__n { font: 400 64px/1 var(--display); color: var(--ice); text-shadow: 0 0 20px rgba(143,211,255,.6); }
.combo__l { color: var(--ice); font-size: 13px; }

/* beat strip */
.strip { border-block: 1px solid var(--line); background: linear-gradient(90deg, rgba(143,211,255,.06), rgba(240,168,255,.08)); overflow: hidden; }
.strip__inner { max-width: var(--max); margin: 0 auto; padding: 26px var(--pad) 22px; display: flex; align-items: stretch; }
.beat { flex: 1; position: relative; display: flex; justify-content: space-around; align-items: center; height: 54px; border-left: 2px solid var(--bevel); }
.beat b { position: absolute; left: 6px; top: -18px; font-size: 11px; font-weight: 400; color: var(--lilac); }
.beat i { display: block; }
.beat.m2 i { width: 26px; height: 8px; background: var(--ice); box-shadow: 0 0 10px var(--ice); border-radius: 2px; }
.beat.m3 i { width: 0; height: 0; border-left: 12px solid transparent; border-right: 12px solid transparent; border-bottom: 20px solid var(--orchid); filter: drop-shadow(0 0 6px var(--orchid)); }
.switch {
  flex: 0 0 auto; align-self: center; margin: 0 14px; padding: 6px 12px; font-size: 12px; color: var(--deep);
  background: var(--amber); border-radius: 3px; display: flex; flex-direction: column; align-items: center; line-height: 1.2;
  box-shadow: 0 0 18px rgba(255,179,71,.6);
}
.switch span { font-size: 15px; }

/* ---- sections, shared ---- */
section { position: relative; }
.sec { max-width: var(--max); margin: 0 auto; padding: clamp(64px, 9vw, 128px) var(--pad) 0; }
.sec-title { font-family: var(--display); font-size: clamp(32px, 4.4vw, 64px); line-height: 1.04; letter-spacing: -.015em; margin-bottom: 26px; }
.sec-title .o { color: var(--orchid); text-shadow: 0 0 22px rgba(240,168,255,.4); }
.sec-title--small { font-size: 28px; }

/* station sign: a track line across the section top, a plate on it */
.sign { --c: var(--ice); position: relative; display: flex; margin: 0 0 30px; }
.sign::before {
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 4px; margin-top: -2px; border-radius: 2px;
  background: var(--c); opacity: .75;
  box-shadow: 0 0 12px var(--c);
}
.sign__plate {
  position: relative; display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px 14px;
  padding: 8px 16px; margin-left: 24px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 0 0 4px var(--night);
}
.sign__no { font: 13px var(--led); letter-spacing: .12em; color: var(--c); background: var(--deep); border: 1px solid var(--line); padding: 3px 8px; border-radius: 4px; }
.sign__name { font: 700 15px var(--body); text-transform: uppercase; letter-spacing: .08em; color: var(--cream); }
.sign__kana { font: 14px var(--led); letter-spacing: .14em; color: var(--lilac); }
.sign--ice { --c: var(--ice); } .sign--orchid { --c: var(--orchid); } .sign--amber { --c: var(--amber); }

/* ---- HOW TO PLAY ---- */
.steps { list-style: none; padding: 0; margin: 34px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.steps li { position: relative; padding: 30px 22px 22px; border: 2px solid var(--line); border-radius: 12px; background: rgba(30,20,96,.45); }
.step__no { position: absolute; top: -13px; left: 18px; font: 14px/1 var(--led); color: var(--deep); background: var(--amber); padding: 5px 8px; border-radius: 4px; letter-spacing: .1em; }
.steps h3 { font: 700 19px/1.2 var(--body); color: var(--cream); margin: 14px 0 6px; text-transform: uppercase; letter-spacing: .04em; }
.steps p { font-size: 16px; margin: 0; }
.glyph { display: block; height: 30px; }
.glyph::before { content: ""; display: inline-block; }
.g2::before { width: 46px; height: 10px; margin-top: 10px; background: var(--ice); box-shadow: 0 0 12px var(--ice); border-radius: 2px; }
.g3::before { width: 0; height: 0; border-left: 16px solid transparent; border-right: 16px solid transparent; border-bottom: 28px solid var(--orchid); filter: drop-shadow(0 0 8px var(--orchid)); }
.g4::before { width: 26px; height: 26px; border: 4px solid var(--amber); box-shadow: 0 0 12px var(--amber); }

.screens { list-style: none; padding: 0; margin: 48px auto 0; max-width: 960px; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 28px; }
.screens li:first-child { grid-column: 1 / -1; }
.screens figure { margin: 0; }
.screens figcaption { margin-top: 14px; font: 14px var(--led); letter-spacing: .1em; color: var(--lilac); text-align: center; }
.crt {
  position: relative; border-radius: 18px; padding: 12px;
  background: linear-gradient(160deg, var(--panel-hi), var(--panel) 40%, #0a0628);
  box-shadow: 0 0 0 1px var(--bevel), 0 0 80px rgba(61,123,255,.25), 0 40px 80px rgba(0,0,0,.6);
}
.crt img { border-radius: 10px; width: 100%; }
.crt::after {
  content: ""; position: absolute; inset: 12px; border-radius: 10px; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.08) 0 1px, transparent 1px 3px), radial-gradient(ellipse at center, transparent 62%, rgba(0,0,0,.4));
}

/* ---- THE THREE ---- */
.meters { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr 1.9fr 1fr; border-top: 1px solid var(--line); }
.meter { position: relative; padding: 26px 22px 30px; border-right: 1px solid var(--line); }
.meter:last-child { border-right: 0; }
.meter p:last-child { font-size: 15px; margin: 0; }
.meter__n {
  display: block; font: 400 clamp(110px, 12vw, 180px)/.9 var(--display); color: var(--c); margin-bottom: 14px;
  text-shadow: var(--chroma), 0 0 30px var(--g);
}
.meter__name { color: var(--c); font-size: 13px; margin-bottom: 8px; }
.meter__shape { position: absolute; top: 30px; right: 22px; }
.m1 { --c: var(--cream); --g: rgba(255,241,214,.45); } .m2 { --c: var(--ice); --g: rgba(143,211,255,.45); }
.m3 { --c: var(--orchid); --g: rgba(240,168,255,.45); } .m4 { --c: var(--amber); --g: rgba(255,179,71,.45); }
.m1 .meter__shape { width: 16px; height: 16px; border-radius: 50%; background: var(--c); box-shadow: 0 0 12px var(--c); }
.m2 .meter__shape { width: 30px; height: 9px; background: var(--c); box-shadow: 0 0 12px var(--c); }
.m3 .meter__shape { width: 0; height: 0; border-left: 18px solid transparent; border-right: 18px solid transparent; border-bottom: 30px solid var(--c); filter: drop-shadow(0 0 8px var(--c)); }
.m4 .meter__shape { width: 20px; height: 20px; border: 4px solid var(--c); box-shadow: 0 0 12px var(--c); }
.meter.m3 {
  background: radial-gradient(ellipse at 30% 30%, rgba(240,168,255,.16), transparent 70%), rgba(30,20,96,.35);
  border-inline: 1px solid rgba(240,168,255,.5); margin-top: -40px; padding-top: 40px;
  box-shadow: 0 0 60px rgba(155,92,255,.25);
}
.meter.m3 .meter__n {
  font-size: clamp(180px, 22vw, 330px); line-height: .82;
  text-shadow: -6px 0 0 rgba(255,84,112,.7), 6px 0 0 rgba(61,213,255,.7), 0 0 50px rgba(240,168,255,.6);
}
.meter.m3 p:last-child { font-size: 18px; color: var(--cream); max-width: 24em; }
.three__foot { margin-top: 36px; max-width: 40em; font-size: 18px; }

/* ---- JUDGING ---- */
.judged { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 64px; align-items: center; }
.judged .sign { grid-column: 1 / -1; }
.judged__copy > p { max-width: 32em; }
.edgedemo { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 26px 0 8px; max-width: 520px; }
.edgedemo figure {
  margin: 0; position: relative; aspect-ratio: 16 / 10; border-radius: 14px; background: var(--deep);
  display: flex; flex-direction: column; justify-content: space-between; padding: 14px 18px;
  border: 1px solid var(--line);
}
.edgedemo .rush { box-shadow: inset 0 0 0 2px var(--amber), inset 0 0 28px 8px rgba(255,138,30,.7); }
.edgedemo .drag { box-shadow: inset 0 0 0 2px var(--ice), inset 0 0 28px 8px rgba(61,123,255,.75); }
.edgedemo .led { font-size: 22px; }
.edgedemo .rush .led { color: var(--amber); } .edgedemo .drag .led { color: var(--ice); }
.edgedemo figcaption { font-size: 15px; line-height: 1.35; color: var(--cream); }
.edgedemo .rush b { color: var(--amber); } .edgedemo .drag b { color: var(--ice); }
.ladder { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-direction: column; gap: 4px; }
.ladder li { display: flex; align-items: baseline; gap: 14px; }
.ladder span { font: 400 clamp(26px, 3vw, 40px)/1.05 var(--display); color: var(--rc); text-shadow: 0 0 18px var(--rg); }
.ladder i { font: normal 13px var(--led); letter-spacing: .25em; color: var(--lilac); }
.r-perfect { --rc: var(--cream); --rg: rgba(255,241,214,.45); color: var(--cream); }
.r-great { --rc: var(--ice); --rg: rgba(143,211,255,.45); color: var(--ice); }
.r-good { --rc: var(--good); --rg: rgba(200,168,255,.45); color: var(--good); }
.r-miss { --rc: var(--muted); --rg: transparent; color: var(--muted); }
.ladder li:nth-child(2) { padding-left: .6em; } .ladder li:nth-child(3) { padding-left: 1.2em; } .ladder li:nth-child(4) { padding-left: 1.8em; }

.panel {
  margin: 0; background-color: #07041c; border: 2px solid var(--line); border-radius: 14px; padding: 18px 22px 20px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04), inset 0 0 50px rgba(0,0,0,.7), 0 0 0 6px var(--panel), 0 30px 80px rgba(0,0,0,.5);
  background-image: radial-gradient(rgba(143,211,255,.07) 1px, transparent 1.4px); background-size: 6px 6px;
}
.panel__bar { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 12px; color: var(--lilac); border-bottom: 1px dashed var(--line); padding-bottom: 12px; }
.log { list-style: none; padding: 0; margin: 8px 0 18px; }
.log li { display: grid; grid-template-columns: 34px 1fr auto; align-items: baseline; padding: 7px 0; border-bottom: 1px solid rgba(58,44,138,.5); font-size: clamp(18px, 2vw, 26px); }
.log .h { color: var(--lilac); font-size: .65em; }
.log li > span:nth-child(2) { text-shadow: 0 0 12px currentColor; }
.log .ms { color: var(--lilac); min-width: 5ch; text-align: right; }
.log .ms::after { content: " ms"; font-size: .6em; color: var(--lilac); }
.log .rush { color: var(--amber); text-shadow: 0 0 10px rgba(255,179,71,.7); }
.log .drag { color: var(--ice); text-shadow: 0 0 10px rgba(143,211,255,.7); }
.dial { display: flex; align-items: center; gap: 12px; margin: 8px 0 14px; }
.dial__l { color: var(--amber); font-size: 12px; } .dial__r { color: var(--ice); font-size: 12px; }
.dial__track {
  flex: 1; position: relative; height: 26px; border-radius: 4px;
  background: linear-gradient(90deg, rgba(255,179,71,.45), rgba(255,179,71,.05) 42%, rgba(255,241,214,.12) 50%, rgba(143,211,255,.05) 58%, rgba(143,211,255,.45));
  border: 1px solid var(--line);
}
.dial__track b { position: absolute; left: 50%; top: -4px; bottom: -4px; width: 2px; background: var(--cream); box-shadow: 0 0 8px var(--cream); }
.dial__track i { position: absolute; top: 6px; width: 3px; height: 14px; background: var(--lilac); left: calc(50% + var(--x) * .5%); border-radius: 1px; opacity: .9; }
.panel figcaption { font-size: 13px; color: var(--ice); }

/* ---- NIGHT LINE ---- */
.line { display: grid; grid-template-columns: minmax(0, 52fr) minmax(0, 48fr); gap: 24px 56px; align-items: center; }
.line .sign { grid-column: 1 / -1; }
.mapbox {
  margin: 0; padding: 18px 12px 12px; border-radius: 18px; background: rgba(5,3,20,.6); border: 1px solid var(--line);
  box-shadow: inset 0 0 60px rgba(0,0,0,.5);
}
.map { display: block; width: 100%; height: auto; }
.map polyline { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.map__dim { stroke: #2a2068; stroke-width: 6; }
.map__ice { stroke: var(--ice); stroke-width: 6; }
.map__orchid { stroke: var(--orchid); stroke-width: 6; }
.map .st circle { fill: var(--night); stroke: #3c3190; stroke-width: 4; }
.map .st text { fill: #8f86d6; font: 700 16px var(--body); text-anchor: middle; }
.map .st text.kana, .map .st text.sm { font: 13px var(--led); letter-spacing: .1em; }
.map .st--lit circle { fill: var(--ice); stroke: var(--ice); }
.map .st--lit text { fill: var(--ice); }
.map .st--here circle { fill: var(--night); stroke: var(--ice); stroke-width: 5; }
.map .st--here .ring2 { fill: rgba(143,211,255,.14); stroke: rgba(143,211,255,.35); stroke-width: 2; }
.map .st--here text { fill: var(--amber); font-size: 18px; }
.map .st--here text.kana { fill: var(--amber); font-size: 14px; }
.map .st--tres circle { fill: var(--orchid); stroke: var(--orchid); }
.map .st--tres text { fill: var(--orchid); }
@media (prefers-reduced-motion: no-preference) {
  .map .st--here .ring2 { animation: here calc(var(--beat) * 2) ease-out infinite; transform-box: fill-box; transform-origin: center; }
}
@keyframes here { 0% { transform: scale(.8); opacity: 1; } 100% { transform: scale(1.5); opacity: 0; } }
.line__copy > p { max-width: 30em; }
.line .sec-title { font-size: clamp(32px, 2.9vw, 44px); }
.plate {
  display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; align-items: center; gap: 8px 18px;
  margin: 22px 0 30px; padding: 16px 20px; border-radius: 10px;
  background: linear-gradient(180deg, var(--panel-hi), var(--panel)); border: 1px solid var(--bevel);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 6px 0 #0a0628;
}
.plate__id { color: var(--cream); font-size: 15px; }
.lamps { display: flex; gap: 8px; }
.lamps i { width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff6e0, var(--amber) 55%, var(--ember)); box-shadow: 0 0 12px var(--amber); }
.stamp {
  grid-row: span 2; font: 400 56px/1 var(--display); color: var(--amber); padding: 0 12px; border: 3px solid var(--amber); border-radius: 8px;
  transform: rotate(-8deg); text-shadow: var(--chroma), 0 0 16px rgba(255,179,71,.7); box-shadow: 0 0 16px rgba(255,179,71,.35), inset 0 0 12px rgba(255,179,71,.25);
}
.plate__lamps { grid-column: 1 / 3; list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px; color: var(--lilac); }
.plate__lamps li::before { content: "\25CF  "; color: var(--amber); }
.mini { font: 700 15px var(--body); text-transform: uppercase; letter-spacing: .12em; color: var(--ice); margin-bottom: 8px; }

/* ---- NIGHT RUN ---- */
.run { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 56px; align-items: center; }
.run .sign { grid-column: 1 / -1; }
.coin {
  margin: 0; padding: 36px 20px 34px; text-align: center;
  border: 2px solid var(--line); border-radius: 18px; background-color: #07041c;
  background-image: radial-gradient(rgba(255,179,71,.06) 1px, transparent 1.4px); background-size: 6px 6px;
  box-shadow: inset 0 0 60px rgba(0,0,0,.8), 0 0 0 6px var(--panel);
}
.coin p { margin: 0; }
.coin__q {
  font: italic 400 clamp(28px, 3.6vw, 46px)/1.1 var(--display); color: var(--cream);
  text-shadow: -3px 0 0 rgba(155,92,255,.85), 3px 0 0 rgba(61,123,255,.55), 0 0 18px rgba(155,92,255,.6);
}
.coin__count {
  position: relative; height: 1em; overflow: hidden;
  font: 400 clamp(110px, 14vw, 200px)/1 var(--display); color: var(--amber);
  text-shadow: var(--chroma), 0 0 40px rgba(255,138,30,.6);
}
.coin__count span { display: block; }
.coin__btn {
  display: inline-block; margin-top: 14px; padding: 12px 28px; border-radius: 10px;
  font: 400 clamp(18px, 2vw, 24px)/1 var(--display); letter-spacing: .04em; color: var(--deep);
  background: linear-gradient(#ffd08a, var(--amber) 45%, var(--ember)); border: 2px solid #ffe2b0;
  box-shadow: 0 5px 0 #8a4200, 0 0 30px rgba(255,138,30,.4);
}
@media (prefers-reduced-motion: no-preference) {
  .coin__count span { animation: count 3s steps(3) infinite; }
}
@keyframes count { from { transform: translateY(0); } to { transform: translateY(-3em); } }
.run__copy > p { max-width: 30em; font-size: 18px; }

/* ---- PRACTICE: high-score table ---- */
.hiscore { width: 100%; max-width: 960px; margin: 34px 0 0; border-collapse: collapse; font-family: var(--led); }
.hiscore th { font: 400 13px/1 var(--led); letter-spacing: .3em; text-transform: uppercase; color: var(--lilac); text-align: left; padding: 0 10px 12px; border-bottom: 2px dashed var(--line); }
.hiscore td { padding: 18px 10px; vertical-align: top; border-bottom: 1px dashed rgba(58,44,138,.6); }
.hiscore .r { text-align: right; }
.hiscore .rank { font-size: 20px; text-transform: uppercase; width: 4.5em; }
.hiscore td b { display: block; font: 400 20px/1.25 var(--led); letter-spacing: .1em; text-transform: uppercase; text-shadow: 0 0 10px currentColor; font-weight: 400; }
.hiscore td span { display: block; margin-top: 6px; font: 500 16px/1.5 var(--body); color: var(--lilac); max-width: 52ch; }
.hiscore .score { font-size: 18px; letter-spacing: .12em; white-space: nowrap; text-shadow: 0 0 10px currentColor; }
.c-cream { color: var(--cream); } .c-ice { color: var(--ice); } .c-orchid { color: var(--orchid); }
.c-amber { color: var(--amber); } .c-lilac { color: var(--lilac); }

/* ---- FREE TO PLAY ---- */
.free { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px 60px; align-items: start; }
.free .sign, .free .before { grid-column: 1 / -1; }
.before { margin-top: 28px; }
.free__copy > p { max-width: 30em; }
.free .sec-title { font-size: clamp(32px, 3.6vw, 52px); }
.coindoor {
  position: relative; padding: 64px 26px 24px; border-radius: 14px;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.025) 0 2px, transparent 2px 6px),
    linear-gradient(180deg, #2a2468, #15104a 60%, #0d0936);
  border: 2px solid #4a3fb0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.15), inset 0 0 0 6px rgba(5,3,20,.35), 0 10px 0 #08061c, 0 30px 60px rgba(0,0,0,.5);
}
.coindoor::before { /* lit coin slot */
  content: ""; position: absolute; top: 20px; left: 50%; width: 12px; height: 32px; margin-left: -6px; border-radius: 3px;
  background: #2a1300; box-shadow: inset 0 0 0 2px var(--amber), 0 0 0 5px #08061c, 0 0 18px 4px rgba(255,138,30,.55);
}
.coindoor dl { margin: 0; border-top: 1px dashed var(--line); }
.coindoor dl div { display: flex; justify-content: space-between; align-items: baseline; gap: 8px 16px; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.coindoor dt { font: 14px var(--led); letter-spacing: .12em; color: var(--amber); }
.coindoor dd { margin: 0; font: 15px var(--led); letter-spacing: .08em; color: var(--cream); text-align: right; text-transform: uppercase; }
.coindoor__note { margin: 18px 0 0; color: var(--cream); font-size: 16px; }
.tips { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tips li { padding: 16px 18px; border-left: 4px solid var(--violet); background: rgba(30,20,96,.4); border-radius: 0 10px 10px 0; color: var(--cream); }
.tips b { display: block; font: 400 13px var(--led); letter-spacing: .14em; color: var(--amber); margin-bottom: 4px; }

/* ---- TERMINUS: START orb ---- */
.terminus { display: flex; flex-direction: column; align-items: center; text-align: center; padding-bottom: clamp(72px, 10vw, 140px); }
.terminus .sign { align-self: stretch; }
.orb-link { display: inline-flex; flex-direction: column; align-items: center; gap: 10px; text-decoration: none; color: var(--cream); margin-top: 22px; border-radius: 16px; }
.orb {
  --s: clamp(120px, 34vw, 168px); position: relative; width: var(--s); height: var(--s); border-radius: 50%;
  display: grid; place-items: center; margin-bottom: 14px;
  background: radial-gradient(circle at 34% 28%, #FFE2A8 0, var(--amber) 32%, var(--ember) 72%, #A4500A 100%);
  box-shadow: 0 10px 0 #6B3000, 0 14px 30px rgba(0,0,0,.55), 0 0 40px rgba(255,138,30,.55), inset 0 -10px 18px rgba(120,50,0,.45);
  transition: transform .08s, box-shadow .08s;
}
.orb::before { content: ""; position: absolute; inset: -10px; border-radius: 50%; border: 2px solid rgba(255,179,71,.7); pointer-events: none; opacity: .6; }
@media (prefers-reduced-motion: no-preference) {
  .orb::before { animation: beatring var(--beat) ease-out infinite; }
}
@keyframes beatring { from { transform: scale(.9); opacity: 1; } to { transform: scale(1.25); opacity: 0; } }
.orb-link:hover .orb { transform: translateY(2px); }
.orb-link:active .orb { transform: translateY(8px); box-shadow: 0 2px 0 #6B3000, 0 0 40px rgba(255,138,30,.55), inset 0 -6px 12px rgba(120,50,0,.45); }
html[data-play="soon"] a[data-soon] .orb { filter: saturate(.85); transform: none; }
.orb__face { font: 400 clamp(22px, 5vw, 30px) var(--display); color: #2A1000; letter-spacing: .02em; text-shadow: 0 1px 0 rgba(255,226,168,.6); }
.orb__call { font: 16px var(--led); letter-spacing: .3em; color: var(--amber); text-shadow: 0 0 12px rgba(255,138,30,.6); }
.orb__line { font: 700 clamp(22px, 3vw, 34px)/1.2 var(--body); color: var(--cream); }
.terminus .play-status { display: inline-block; }

/* ---- FOOTER ---- */
.foot { border-top: 1px solid var(--line); background: var(--deep); padding: 0 var(--pad) 34px; overflow: hidden; }
.foot__big {
  font: 400 clamp(56px, 19vw, 300px)/1 var(--display); text-align: center; color: transparent; letter-spacing: .04em;
  -webkit-text-stroke: 1.5px var(--line); margin: 10px 0 0; white-space: nowrap; user-select: none;
}
.foot__big span { -webkit-text-stroke: 0; color: var(--orchid); text-shadow: var(--chroma), 0 0 40px rgba(240,168,255,.5); }
.foot__row, .foot__jump, .foot__legal { max-width: calc(var(--max) - 2 * var(--gut)); margin: 0 auto; }
.foot__row { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; padding: 20px 0 8px; border-top: 1px solid var(--line); }
.foot__row .brand { margin: 0; }
.foot nav { display: flex; gap: 0 22px; flex-wrap: wrap; }
.foot nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--lilac); font-weight: 700; text-decoration: none; }
.foot nav a:hover { color: var(--cream); text-decoration: underline; }
.foot__jump { display: flex; flex-wrap: wrap; align-items: center; gap: 0 18px; padding: 4px 0 8px; border-top: 1px dashed var(--line); }
.foot__jump p { margin: 0; font: 13px var(--led); letter-spacing: .14em; color: var(--amber); }
.foot__jump nav a { font-weight: 500; font-size: 15px; }
.foot__legal { font-size: 14px; color: var(--lilac); padding-top: 10px; }
.foot__legal a { display: inline-block; padding: 10px 0; }

/* ---- LEGAL / SUPPORT PAGES ---- */
.doc { max-width: var(--max); margin: 0 auto; padding: 24px var(--pad) clamp(64px, 8vw, 112px); }
.doc__head { margin-bottom: 34px; }
.doc__head h1 {
  font: 400 clamp(32px, 5vw, 56px)/1.08 var(--display); color: var(--cream); letter-spacing: -.01em;
  text-shadow: 0 0 22px rgba(240,168,255,.35); margin: 0 0 14px; overflow-wrap: anywhere;
}
.doc__date { font: 14px var(--led); letter-spacing: .14em; color: var(--lilac); margin: 0; }
.doc__grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; align-items: start; }
.toc-rail { position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow: auto; padding: 14px 0; border-top: 3px solid var(--ice); }
.toc-rail p, .toc summary { font: 13px var(--led); letter-spacing: .16em; color: var(--amber); margin: 0 0 6px; }
.toc-rail ol, .toc ol { list-style: none; margin: 0; padding: 0; }
.toc-rail a, .toc a {
  display: block; padding: 7px 0; font: 13px/1.35 var(--led); letter-spacing: .06em; color: var(--lilac); text-decoration: none;
}
.toc-rail a:hover, .toc a:hover { color: var(--cream); text-decoration: underline; }
.toc { display: none; margin: 0 0 28px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.toc summary { cursor: pointer; padding: 12px 16px; min-height: 44px; margin: 0; }
.toc ol { padding: 0 16px 12px; }
.prose { max-width: 68ch; color: var(--cream); font-size: 17px; line-height: 1.65; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.1em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin-bottom: .4em; }
.prose li::marker { color: var(--amber); }
.prose a { color: var(--ice); text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.prose strong { color: var(--cream); font-weight: 700; }
.prose section { margin-top: 2.6em; }
.prose section:first-child { margin-top: 0; }
.doc__intro > p:last-child { margin-bottom: 2.6em; }
.doc-h { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; scroll-margin-top: 20px; }
.doc-h .sec-no {
  flex: none; font: 13px/1 var(--led); letter-spacing: .1em; color: var(--amber); padding: 5px 7px;
  border: 1px solid var(--line); border-radius: 4px; background: var(--deep);
}
.prose h2 { font: 700 24px/1.25 var(--body); color: var(--cream); scroll-margin-top: 20px; }
.prose h3 { font: 700 19px/1.3 var(--body); color: var(--orchid); margin: 1.8em 0 .5em; scroll-margin-top: 20px; }
.prose h3:first-of-type { margin-top: .6em; }
.shortbox {
  max-width: 68ch; margin: 0 0 2.6em; padding: 20px 24px 6px; border-radius: 10px;
  background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--ice);
}
.shortbox h2 { font: 400 14px var(--led); letter-spacing: .16em; color: var(--ice); text-transform: uppercase; margin: 0 0 12px; }
.shortbox p { font-size: 18px; }
.btns { display: flex; flex-wrap: wrap; gap: 12px; margin: 4px 0 18px; }
.btn {
  display: inline-flex; align-items: center; min-height: 48px; padding: 10px 22px; border-radius: 999px;
  font: 700 16px var(--body); letter-spacing: .04em; text-decoration: none !important;
}
.btn--amber { color: var(--deep) !important; background: radial-gradient(circle at 30% 25%, #FFD592, var(--amber) 45%, var(--ember)); box-shadow: 0 5px 0 #9a4a06; }
.btn--line { color: var(--ice) !important; border: 1px solid var(--ice); background: rgba(5,3,20,.5); }

/* ---- 404 ---- */
.lost { max-width: 900px; margin: 0 auto; padding: 32px var(--pad) clamp(64px, 8vw, 112px); text-align: center; }
.lost__screen {
  padding: clamp(28px, 5vw, 56px) 16px; border-radius: 18px; border: 2px solid var(--line);
  background:
    radial-gradient(70% 120% at 50% 110%, rgba(255,179,71,.18), transparent 60%),
    radial-gradient(90% 140% at 50% -20%, rgba(155,92,255,.45), transparent 65%),
    #07041c;
  box-shadow: inset 0 0 60px rgba(0,0,0,.8), 0 0 0 6px var(--panel);
}
.lost__screen p { margin: 0; }
.marquee__kana { font: 400 clamp(13px, 2vw, 16px)/1 var(--led); letter-spacing: .6em; color: var(--orchid); text-shadow: 0 0 10px var(--violet); margin-bottom: 12px; }
.marquee__logo { display: inline-block; font-size: clamp(30px, 7.4vw, 78px); padding: 0 .2em; }
.lost__code { font: 400 clamp(90px, 18vw, 180px)/1 var(--display); color: var(--orchid); text-shadow: var(--chroma), 0 0 40px rgba(240,168,255,.5); margin-top: 18px !important; }
.lost__wrong { font: clamp(20px, 3vw, 28px) var(--led); letter-spacing: .2em; color: var(--amber); text-shadow: 0 0 12px rgba(255,138,30,.6); }
.lost__lines { margin: 28px 0 10px; color: var(--cream); font-size: 19px; }
.lost__lines p { margin: 0 0 .3em; }
.lost .orb-link { margin-top: 10px; }
.lost__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 22px; margin-top: 18px; }
.lost__links a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }

/* ---- responsive ---- */
@media (max-width: 1080px) {
  .top__nav { order: 3; width: 100%; gap: 0 18px; }
  .top__nav a { font: 13px var(--led); letter-spacing: .1em; text-transform: uppercase; }
  .hero { grid-template-columns: 1fr; padding-top: 12px; gap: 40px; }
  .hero__stage { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 28px; justify-content: center; }
  .ring { width: min(60vw, 240px); }
  .ring__tag { font-size: 12px; padding: 4px 10px; }
  .hud { width: auto; flex-direction: column; align-items: flex-start; border-top: 0; border-left: 1px dashed var(--line); padding: 0 0 0 20px; margin: 0; }
  .callout { text-align: left; }
  .judged, .line, .free, .run { grid-template-columns: 1fr; gap: 24px; }
  .run .coin { max-width: 640px; }
  .meters { grid-template-columns: 1fr 1fr; }
  .meter.m3 { grid-column: 1 / -1; grid-row: 2; margin-top: 0; border: 1px solid rgba(240,168,255,.5); }
  .meter.m4 { grid-row: 3; grid-column: 1 / -1; border-top: 1px solid var(--line); border-right: 0; }
  .meter.m4 p:last-child { max-width: 24em; }
  .meter:nth-child(2) { border-right: 0; }
  .steps { grid-template-columns: 1fr; gap: 26px; }
  .doc__grid { grid-template-columns: 1fr; gap: 0; }
  .toc-rail { display: none; }
  .toc { display: block; }
}
@media (min-width: 1080px) {
  .prose { font-size: 18px; }
}
@media (max-width: 600px) {
  :root { --edge: 8px; }
  body { font-size: 16px; }
  .edge span { display: none; }
  .top { padding-block: 12px; gap: 6px 12px; }
  .hero { gap: 32px; padding-bottom: 40px; }
  .hero__title { font-size: clamp(34px, 10vw, 44px); margin-bottom: 16px; }
  .kicker { font-size: 12px; margin-bottom: 14px; }
  .hero__lede { font-size: 16px; margin-bottom: 16px; }
  .chips { margin-bottom: 20px; gap: 6px; }
  .chips li { font-size: 12px; padding: 4px 10px; }
  .play-status { margin-top: 14px; }
  .hero__stage { grid-template-columns: 1fr; justify-items: center; gap: 18px; }
  .hud { flex-direction: row; justify-content: space-between; align-items: flex-end; width: min(100%, 320px); border-left: 0; border-top: 1px dashed var(--line); padding: 12px 0 0; }
  .callout { text-align: right; }
  .callout__rating { font-size: 26px; }
  .combo__n { font-size: 40px; }
  .strip__inner { padding-block: 24px 16px; }
  .beat { height: 40px; }
  .beat.m2 i { width: 14px; height: 6px; }
  .beat.m3 i { border-left-width: 7px; border-right-width: 7px; border-bottom-width: 12px; }
  .switch { margin: 0 6px; padding: 4px 6px; font-size: 9px; letter-spacing: .06em; }
  .switch span { font-size: 12px; }
  .sign__plate { margin-left: 10px; padding: 6px 10px; gap: 4px 10px; }
  .sign__name { font-size: 13px; }
  .sign__kana { font-size: 12px; }
  .meter { padding: 18px 14px 22px; }
  .meter__n { font-size: 96px; }
  .meter.m3 .meter__n { font-size: 180px; }
  .meter__shape { top: 22px; right: 14px; transform: scale(.8); }
  .panel { padding: 14px 14px 16px; }
  .panel__bar { font-size: 11px; }
  .map .st text { font-size: 26px; }
  .map .st text.kana, .map .st text.sm { font-size: 20px; }
  .map .st--here text { font-size: 28px; }
  .map .st--here text.kana { font-size: 20px; }
  .plate { grid-template-columns: auto 1fr; }
  .stamp { grid-row: 1 / span 2; grid-column: 2; justify-self: end; font-size: 44px; }
  .hiscore thead { display: none; }
  .hiscore, .hiscore tbody { display: block; }
  .hiscore tr { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; padding: 16px 0; border-bottom: 1px dashed rgba(58,44,138,.6); }
  .hiscore td { padding: 0; border: 0; }
  .hiscore .rank { width: auto; font-size: 16px; }
  .hiscore .score { grid-column: 2; grid-row: 1; text-align: right; font-size: 15px; }
  .hiscore td:nth-child(2) { grid-column: 1 / -1; grid-row: 2; margin-top: 6px; }
  .hiscore td b { font-size: 17px; }
  .tips { grid-template-columns: 1fr; }
  .coindoor { padding: 60px 16px 20px; }
  .foot nav { gap: 0 18px; }
  .doc-h { align-items: flex-start; }
  .prose h2 { font-size: 21px; }
}
@media (max-width: 420px) {
  .top__nav { gap: 0 14px; }
  .top__nav a { font-size: 12px; letter-spacing: .06em; }
  .top__nav:has(> a:nth-child(4):last-child) { justify-content: space-between; gap: 0 10px; }
  .edgedemo { grid-template-columns: 1fr; }
  .edgedemo figure { aspect-ratio: auto; min-height: 96px; gap: 10px; }
  .play { padding: 10px 22px 10px 18px; }
}
@media (max-width: 400px) {
  .sign__kana { display: none; }
}

/* motion: everything above already sits behind no-preference; this is the hard stop */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---- print ---- */
@media print {
  :root { --edge: 0px; }
  html, body { background: #fff !important; color: #000 !important; }
  body { background-image: none !important; }
  .edge, .top__nav, .lang, .skip, .toc, .toc-rail, .foot__big, .foot nav, .foot__jump, .scan::after { display: none !important; }
  * { text-shadow: none !important; box-shadow: none !important; filter: none !important; }
  .logo { -webkit-text-fill-color: #000; background: none; color: #000; }
  h1, h2, h3, .prose, .prose strong, .doc__head h1, .shortbox p, .doc__date, .foot__legal { color: #000 !important; }
  .prose a { color: #000 !important; }
  .doc__grid { display: block; }
  .shortbox { background: #fff; border: 1px solid #000; }
  .doc-h .sec-no { color: #000; background: #fff; border-color: #000; }
  .foot { background: #fff; border-top: 1px solid #000; }
}
