/* isonode radio — an instrument, not a dashboard (docs/design/IDENTITY.md).
   No boxes: controls are markings — hairlines, ticks, scales, needles, small glyphs.
   No inline styles anywhere (CSP style-src 'self'); the station's colours arrive as --a / --b from script.
   Words are written in sentence case in the HTML. */
@font-face { font-family: "Michroma"; src: url(assets/fonts/Michroma-Regular.b623011637.ttf) format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Oxanium"; src: url(assets/fonts/Oxanium-wght.2ce01d946e.ttf) format("truetype"); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Martian Mono"; src: url(assets/fonts/MartianMono-wdth-wght.c3467843ec.ttf) format("truetype"); font-weight: 100 800; font-stretch: 75% 112.5%; font-style: normal; font-display: swap; }

:root {
  --a: #6fc9d6;            /* station primary: what is live (selected ISO, playhead, needle) */
  --b: #e2b27a;            /* station secondary: the shared signal only */
  --ink: #fff0dc;          /* warm white */
  --dim: #b9ad9a;          /* quiet text: 9.4:1 on the ground */
  --edge: #8f8576;         /* tall ticks, glyph strokes: 5.6:1 */
  --rail: #6f675b;         /* hairlines, fine ticks: 3.6:1 */
  --ground: #060504;       /* warm black */
  --halo: 0 0 2px #000, 0 0 6px rgba(0, 0, 0, .9); /* keeps text readable over the moving picture */
  --pad: 34px;
  --display: "Michroma", ui-sans-serif, system-ui, sans-serif;
  --text: "Oxanium", ui-sans-serif, system-ui, sans-serif;
  --figures: "Martian Mono", ui-monospace, "SF Mono", Menlo, monospace;
  /* focus = bracket marks: four corner ticks drawn as eight short strokes */
  --tick: linear-gradient(var(--ink), var(--ink));
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%; background: var(--ground); color: var(--ink);
  font: 400 14px/1.3 var(--text); letter-spacing: .03em;
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
}
body { overflow: hidden; overscroll-behavior: none; -webkit-tap-highlight-color: transparent; }
p, h1, h2, ul { margin: 0; padding: 0; font-weight: inherit; }
ul { list-style: none; }
button, input { font: inherit; letter-spacing: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; touch-action: manipulation; }
button:disabled { cursor: default; }
b { font-weight: inherit; }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }
/* numbers that change: tabular, so nothing jitters */
#bpm, #hour, #room, #vol-text, .meta b, .fig { font-family: var(--figures); font-stretch: 80%; font-weight: 350; font-variant-numeric: tabular-nums; letter-spacing: 0; }

/* focus is always visible: bracket marks (corner ticks) and an underline — never a ring, never removed.
   (The transparent outline becomes a real one in forced-colours mode.) */
:focus-visible {
  outline: 2px solid transparent; outline-offset: 2px;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px;
  background-image: var(--tick), var(--tick), var(--tick), var(--tick), var(--tick), var(--tick), var(--tick), var(--tick);
  background-repeat: no-repeat;
  background-size: 11px 2px, 2px 11px, 11px 2px, 2px 11px, 11px 2px, 2px 11px, 11px 2px, 2px 11px;
  background-position: left top, left top, right top, right top, left bottom, left bottom, right bottom, right bottom;
}

/* ---------- the scene (the hero) ---------- */
.stage { position: fixed; inset: 0; cursor: pointer; background: var(--ground); }
.scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: .38; transition: opacity 1.2s ease; }
[data-playing="1"] .scene { opacity: 1; }
[data-playing="1"] .stage { cursor: default; } /* on air the scene is not a control */
.stage::after { /* the floor sinks into black under the legend */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 48%;
  background: linear-gradient(to bottom, rgba(6, 5, 4, 0), rgba(6, 5, 4, .9)); pointer-events: none;
}
.out { display: none; }

.hud { position: fixed; inset: 0; pointer-events: none; text-shadow: var(--halo); }
.hud button, .hud input, .hud a, .hud label { pointer-events: auto; }

/* ---------- identity (top left): unframed ---------- */
.tl { position: absolute; left: var(--pad); top: 26px; max-width: 60%; }
.brand { color: var(--dim); font-size: 15px; font-variant-caps: all-small-caps; letter-spacing: .06em; width: fit-content; }
.iso {
  margin-top: 8px; font: 400 42px/1.1 var(--display); letter-spacing: .18em; color: var(--ink);
  white-space: nowrap; text-shadow: 0 0 1px var(--a), var(--halo); width: fit-content;
}

/* ---------- state group (top right): three short lines, no frame; words plus a mark ---------- */
.tr { position: absolute; right: var(--pad); top: 28px; text-align: right; color: var(--dim); }
.tr p { width: fit-content; margin-left: auto; }
.state { display: flex; align-items: center; justify-content: flex-end; gap: 8px; color: var(--ink); min-height: 18px; font-weight: 500; }
.dot { width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--dim); flex: none; }
[data-state="on-air"] .dot { background: var(--ink); border-color: var(--ink); }
[data-state="switching"] .dot { border-color: var(--ink); border-style: dashed; }      /* the chosen ISO is on its way */
[data-state="off-air"] .dot, [data-state="killed"] .dot, [data-state="out-of-tune"] .dot { border-radius: 0; border-color: var(--ink); } /* a square = not on air */
.listeners { color: var(--dim); white-space: nowrap; font-weight: 400; }
.keys { margin-top: 7px; }
.nums { margin-top: 4px; }
.nums b { color: var(--a); }

/* ---------- the tune-in mark: one button. Silent: a thin ring with a play mark and the word, in the
   centre. On air: a small legend under the state group. ---------- */
.tune {
  position: absolute; left: 50%; top: 18%; transform: translate(-50%, -50%);
  display: inline-flex; flex-direction: column; align-items: center; gap: 14px;
  min-width: 150px; min-height: 130px; padding: 8px 14px; color: var(--ink); white-space: nowrap;
}
.tune-ring {
  width: 74px; height: 74px; border-radius: 50%; border: 1px solid var(--ink);
  display: grid; place-items: center; animation: breathe 6s ease-in-out infinite;
}
.tune-mark { width: 0; height: 0; margin-left: 5px; border-style: solid; border-width: 9px 0 9px 15px; border-color: transparent transparent transparent var(--ink); }
.tune-word { font: 400 15px/1 var(--display); letter-spacing: .18em; }
.tune:not(:disabled):hover .tune-ring { border-color: var(--a); box-shadow: 0 0 0 5px rgba(255, 240, 220, .08); }
.tune:disabled { opacity: .55; }
@keyframes breathe { 0%, 100% { transform: scale(1); opacity: .85; } 50% { transform: scale(1.07); opacity: 1; } }
[data-playing="1"] .tune {
  left: auto; right: var(--pad); top: 96px; transform: none; flex-direction: row; gap: 9px;
  min-width: 44px; min-height: 44px; padding: 0 0 0 12px; color: var(--dim);
}
[data-playing="1"] .tune-ring { width: 9px; height: 9px; border-radius: 0; border: 1px solid var(--dim); animation: none; }
[data-playing="1"] .tune-mark { display: none; }
[data-playing="1"] .tune-word { font: 400 13px/1 var(--text); letter-spacing: .03em; text-decoration: underline; text-decoration-color: var(--rail); text-underline-offset: 5px; }
[data-playing="1"] .tune:hover { color: var(--ink); }
[data-playing="1"] .tune:hover .tune-ring { border-color: var(--ink); box-shadow: none; }
[data-state="boot"] .tune, [data-state="killed"] .tune { opacity: 0; pointer-events: none; }

/* ---------- feedback line (push, saved file) ---------- */
.note {
  position: absolute; left: 50%; top: 26.5%; transform: translateX(-50%); max-width: 92%;
  text-align: center; color: var(--b); font-size: 13px; min-height: 1.3em;
}
.note:not(:empty)::before { content: "▴ "; }
.note.plain { color: var(--ink); }
.note.plain::before { content: ""; }

/* ---------- the track line = a ruler (read-only: a display, presses do nothing) ---------- */
.track { position: absolute; left: var(--pad); right: var(--pad); bottom: 132px; pointer-events: auto; cursor: default; -webkit-user-select: none; user-select: none; }
.secs { position: relative; height: 34px; }
.secs-row { position: absolute; left: 0; right: 0; bottom: 0; height: 9px; display: flex; border-bottom: 1px solid var(--rail); }
.sec { flex: 1 1 0; min-width: 3px; position: relative; border-left: 1px solid var(--edge); border-bottom: 1px solid transparent; margin-bottom: -1px; }
.sec:last-child { border-right: 1px solid var(--edge); }
.sec.done { border-bottom-color: var(--a); }                    /* the part already played */
.sec-label { position: absolute; left: 5px; bottom: 12px; font-size: 13px; color: var(--dim); white-space: nowrap; }
.sec:last-child .sec-label { left: auto; right: 4px; }
.sec.now { border-left-color: var(--ink); }
.sec.now .sec-label { color: var(--ink); font-weight: 600; }
.head { /* the playhead: a hairline with a small flag */
  position: absolute; left: 0; bottom: -5px; width: 1px; height: 22px; background: var(--a);
}
.head::before { content: ""; position: absolute; left: 1px; top: 0; border-style: solid; border-width: 4px 0 4px 7px; border-color: transparent transparent transparent var(--a); }
.meta { display: flex; justify-content: space-between; gap: 12px; margin-top: 9px; color: var(--dim); font-size: 13px; white-space: nowrap; }
.meta b { color: var(--ink); }
.nxt.mix { color: var(--b); }

/* ---------- the deck: every group sits on the bottom rule ---------- */
.deck { position: absolute; left: var(--pad); right: var(--pad); bottom: 34px; display: flex; align-items: flex-end; gap: 44px; }

/* ISO dial = a tuner scale: a hairline with fine ticks, a taller tick where a station sits, the names
   under their ticks, and a needle that travels to the chosen one */
.dial-nav { flex: 1 1 auto; min-width: 0; }
.dial-scroll { position: relative; padding-top: 16px; scrollbar-width: none; }
.dial-scroll::-webkit-scrollbar { display: none; }
/* where the scale goes on beyond its place, its edge fades out (no frame, no scrollbar) */
.dial-scroll[data-more="right"] { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 34px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 34px), transparent); }
.dial-scroll[data-more="left"] { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 34px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 34px), transparent); }
.dial-scroll[data-more="both"] { -webkit-mask-image: linear-gradient(to right, transparent, #000 34px, #000 calc(100% - 34px), transparent); mask-image: linear-gradient(to right, transparent, #000 34px, #000 calc(100% - 34px), transparent); }
.dial {
  display: flex; flex-wrap: wrap; align-items: stretch; gap: 0 10px; max-width: 520px;
  background: repeating-linear-gradient(to right, var(--rail) 0 1px, transparent 1px 9px) left top / 100% 5px no-repeat,
              linear-gradient(var(--rail), var(--rail)) left top / 100% 1px no-repeat;
}
.dial li { display: flex; }
.iso-btn {
  position: relative; min-height: 46px; min-width: 62px; padding: 20px 8px 6px; color: var(--dim);
  font-size: 14px; font-weight: 500; letter-spacing: .08em; white-space: nowrap; text-align: center;
}
.iso-btn::before { content: ""; position: absolute; left: 50%; top: 0; width: 1px; height: 14px; background: var(--dim); } /* the station's tick */
.iso-btn:hover { color: var(--ink); }
.iso-btn:hover::before { background: var(--ink); }
.iso-btn[aria-current="true"] { color: var(--ink); font-weight: 700; }
.iso-btn[aria-current="true"]::after { /* the selected ISO is underlined (and carries aria-current, and the needle) */
  content: ""; position: absolute; left: 8px; right: 8px; bottom: 2px; height: 2px; background: var(--a);
}
.needle { /* rests on the selected station; moved by script to its tick */
  position: absolute; left: 0; top: 0; width: 1px; height: 30px; margin-left: 0; background: var(--a);
  transition: left .45s cubic-bezier(.2, .8, .2, 1), top .45s ease; pointer-events: none; z-index: 1;
}
.needle::before { content: ""; position: absolute; left: -4px; top: 0; border-style: solid; border-width: 7px 4.5px 0 4.5px; border-color: var(--a) transparent transparent transparent; }

/* push = a centre-zero meter: "calmer" and "harder" at its ends (words with a chevron), a needle for the
   room value, the number under the zero mark */
.push { display: flex; align-items: flex-end; gap: 6px; flex: none; }
.btn {
  min-height: 46px; min-width: 76px; padding: 14px 8px 8px; color: var(--ink); font-size: 15px; font-weight: 500;
  white-space: nowrap; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 5px;
  transition: opacity .3s ease, color .15s ease;
}
.chev { font-family: var(--figures); color: var(--b); font-size: 15px; }
.btn:not(:disabled):hover { text-decoration-color: var(--b); }
.btn:not(:disabled):active, .btn.sent { color: var(--b); }
.btn:disabled { opacity: .5; }
.meter { width: 148px; padding-bottom: 2px; }
.meter-scale {
  display: block; position: relative; height: 14px;
  background: linear-gradient(var(--ink), var(--ink)) center bottom / 1px 14px no-repeat,                        /* zero mark */
              repeating-linear-gradient(to right, var(--rail) 0 1px, transparent 1px 12.25px) left bottom / 100% 5px no-repeat,
              linear-gradient(var(--rail), var(--rail)) left bottom / 100% 1px no-repeat;
}
.meter-needle { position: absolute; left: 50%; bottom: 0; width: 1px; height: 19px; background: var(--b); transition: left .6s cubic-bezier(.2, .8, .2, 1); }
.meter-needle::before { content: ""; position: absolute; left: -4px; top: -1px; border-style: solid; border-width: 6px 4.5px 0 4.5px; border-color: var(--b) transparent transparent transparent; }
.meter-needle.kick { transition: none; transform: translateY(-3px) scaleY(1.25); transform-origin: bottom; }
.room { margin-top: 6px; text-align: center; color: var(--dim); font-size: 13px; white-space: nowrap; }
.room b { color: var(--b); font-size: 14px; margin-right: 8px; }

/* volume = a fader line with a notch; mute = a speaker glyph at its start, struck through when muted */
.side { display: flex; align-items: flex-end; gap: 40px; color: var(--dim); flex: none; }
.sound { display: flex; align-items: center; gap: 4px; }
.mute { display: inline-grid; place-items: center; width: 46px; height: 46px; color: var(--ink); }
.spk { width: 24px; height: 24px; background: url(assets/speaker.svg) center / contain no-repeat; opacity: .9; }
.mute:hover .spk { opacity: 1; }
.mute[aria-pressed="true"] .spk { background-image: url(assets/speaker-off.svg); }
.vol { display: flex; align-items: center; gap: 12px; min-height: 46px; cursor: pointer; }
.vol-name { font-size: 13px; }
.vol-text { min-width: 3ch; text-align: right; color: var(--ink); font-size: 13px; }
.vol input { -webkit-appearance: none; appearance: none; width: 150px; height: 46px; margin: 0; background-color: transparent; cursor: pointer; touch-action: pan-y; }
.vol input::-webkit-slider-runnable-track { height: 1px; background: linear-gradient(to right, var(--a) var(--vol, 70%), var(--rail) var(--vol, 70%)); }
.vol input::-moz-range-track { height: 1px; background: var(--rail); }
.vol input::-moz-range-progress { height: 1px; background: var(--a); }
.vol input::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 3px; height: 21px; margin-top: -10px; border: 0; border-radius: 0; background: var(--ink); }
.vol input::-moz-range-thumb { width: 3px; height: 21px; border: 0; border-radius: 0; background: var(--ink); }
.vol input:hover::-webkit-slider-thumb { height: 25px; margin-top: -12px; }
.vol input:hover::-moz-range-thumb { height: 25px; }
[data-muted="1"] .vol input::-webkit-slider-runnable-track { background: var(--rail); }
[data-muted="1"] .vol input::-moz-range-progress { background: var(--rail); }

/* MIDI: quiet text links */
.midi { display: flex; align-items: center; color: var(--dim); }
.midi-tag { font-size: 13px; white-space: nowrap; padding-right: 4px; }
.midi-tag::before { content: "↓ "; font-family: var(--figures); color: var(--edge); }
.mbtn {
  min-height: 46px; min-width: 50px; padding: 0 8px; color: var(--ink); font-size: 14px;
  text-decoration: underline; text-decoration-color: var(--rail); text-underline-offset: 5px;
}
.mbtn:not(:disabled):hover { text-decoration-color: var(--ink); }
.mbtn:disabled { opacity: .5; }

.legal { position: absolute; right: var(--pad); bottom: 6px; padding: 5px 0 5px 12px; color: var(--dim); font-size: 13px; text-decoration-color: var(--rail); text-underline-offset: 4px; }
.legal:hover { color: var(--ink); }

.preview { color: var(--b); }

/* a long tuner scale (more than five stations, e.g. the preview build with all of them) takes its own row */
@media (min-width: 761px) and (min-height: 521px) {
  [data-dial="many"] .deck { flex-wrap: wrap; gap: 6px 36px; bottom: 38px; }
  [data-dial="many"] .dial-nav { flex: 1 1 100%; }
  [data-dial="many"] .dial { max-width: 900px; }
  [data-dial="many"] .push { margin-right: auto; }
  [data-dial="many"] .track { bottom: 204px; }
}

/* ---------- narrower screens ---------- */
/* ten sections do not fit their words on a narrow ruler: only the current section keeps its name */
@media (max-width: 1000px) {
  .sec:not(.now) .sec-label { display: none; }
}
/* narrower desktop: the deck wraps into two rows */
@media (max-width: 1240px) and (min-width: 761px) and (min-height: 521px) {
  .deck { flex-wrap: wrap; gap: 6px 36px; bottom: 38px; }
  .dial-nav { flex: 1 1 100%; }
  .push { margin-right: auto; }
  .track { bottom: 204px; }
}

/* phone: one column — scale, meter, fader, links */
@media (max-width: 760px) {
  :root { --pad: 18px; }
  .tl { top: 18px; max-width: calc(100% - 2 * var(--pad)); }
  .brand { font-size: 13px; }
  .iso { font-size: 27px; letter-spacing: .16em; margin-top: 52px; } /* under the state lines: a long name needs the whole width */
  .tr { top: 20px; font-size: 13px; max-width: 64%; white-space: nowrap; }
  .tune { top: 204px; }
  [data-playing="1"] .tune { top: 88px; }
  .note { top: 31%; font-size: 12px; width: 92%; }
  .track { bottom: 290px; }
  .meta { flex-wrap: wrap; gap: 3px 12px; }
  .nxt { margin-left: auto; }
  .deck { flex-direction: column; align-items: stretch; gap: 6px; bottom: 44px; }
  .dial { max-width: none; gap: 0 4px; }
  .iso-btn { min-width: 58px; padding: 20px 6px 6px; }
  .push { justify-content: space-between; }
  .btn { min-height: 48px; min-width: 84px; }
  .meter { flex: 0 1 148px; }
  .side { flex-direction: column; align-items: stretch; gap: 0; }
  .sound { gap: 6px; }
  .vol { flex: 1 1 auto; min-width: 0; }
  .vol-name { display: none; } /* the slider keeps its name for assistive technology through the label */
  .vol input { flex: 1 1 auto; width: 60px; min-width: 60px; height: 48px; }
  .midi { justify-content: flex-end; }
  .midi-tag { margin-right: auto; }
  .mbtn { min-width: 64px; }
  .legal { bottom: 0; min-width: 44px; height: 44px; padding: 0 0 0 12px; display: flex; align-items: center; justify-content: flex-end; }
}
/* phone with a long scale: the names wrap into a second row of the scale */
@media (max-width: 559px) {
  [data-dial="many"] .track { bottom: 338px; }
  [data-dial="many"] .iso-btn { min-width: 46px; flex: 1 1 auto; padding: 20px 4px 6px; font-size: 13px; letter-spacing: .05em; }
  [data-dial="many"] .dial li { flex: 1 1 auto; }
}
@media (max-width: 380px) {
  .iso { font-size: 24px; }
  .btn { min-width: 78px; }
}
/* a wide but small window (a phone on its side, a desktop window zoomed to 200 %):
   scale + meter on one row, fader + links on the next */
@media (max-width: 760px) and (min-width: 560px) {
  .deck { flex-direction: row; flex-wrap: wrap; align-items: flex-end; gap: 2px 24px; }
  .dial-nav { flex: 1 1 auto; }
  .push { flex: none; }
  .side { flex: 1 1 100%; flex-direction: row; align-items: center; justify-content: space-between; gap: 20px; }
  .sound { flex: 1 1 auto; min-width: 0; }
  .midi { flex: none; }
  .midi-tag { margin-right: 0; }
  .track { bottom: 176px; }
  .btn { min-width: 64px; }
  .meter { flex: 0 1 108px; width: 108px; }
  .iso { margin-top: 8px; }
  [data-playing="1"] .tune { top: 92px; }
  /* the scale shares its row with the meter: a long scale scrolls inside itself */
  .dial-nav { flex: 1 1 200px; }
  .dial-scroll { overflow-x: auto; overflow-y: hidden; }
  .dial { flex-wrap: nowrap; width: max-content; min-width: 100%; max-width: none; }
}
/* a wide but short window (a phone on its side, a desktop window zoomed in): scale + meter on one row,
   fader + links on the next; a long scale scrolls inside itself with the chosen station kept in view */
@media (min-width: 761px) and (max-height: 520px) {
  .deck { flex-wrap: wrap; align-items: flex-end; gap: 2px 30px; bottom: 34px; }
  .dial-nav { flex: 1 1 200px; }
  .dial-scroll { overflow-x: auto; overflow-y: hidden; }
  .dial { flex-wrap: nowrap; width: max-content; min-width: 100%; max-width: none; }
  .push { flex: none; }
  .side { flex: 1 1 100%; justify-content: space-between; }
  .track { bottom: 184px; }
  .deck { bottom: 44px; }
  .legal { bottom: 0; height: 44px; min-width: 44px; padding: 0 0 0 12px; display: flex; align-items: center; } /* a touch target on a phone held sideways */
}
/* short screens: fixed places for the tune mark and the feedback line, clear of the ruler */
@media (max-height: 520px) {
  .tune { top: 128px; min-height: 48px; flex-direction: row; gap: 12px; padding: 0 14px; }
  .tune-ring { width: 40px; height: 40px; }
  .tune-mark { border-width: 6px 0 6px 10px; margin-left: 3px; }
  [data-playing="1"] .tune { top: 97px; min-height: 44px; }
  [data-playing="1"] .tune-ring { width: 9px; height: 9px; }
  .note { top: 150px; }
  .iso { font-size: 24px; }
}
/* very short and wide (a small phone on its side): the tune mark sits in the top band, between the
   identity and the state group, so the ruler keeps its place */
@media (max-height: 400px) and (min-width: 700px) {
  .tune { top: 58px; }
}
@media (max-height: 380px) {
  .tr { top: 12px; }
  .keys { margin-top: 3px; }
  .nums { margin-top: 2px; }
  [data-playing="1"] .tune { top: 77px; }
}
@media (max-width: 559px) and (max-height: 700px) {
  .tune { top: 196px; min-height: 112px; gap: 10px; }
  .tune-ring { width: 60px; height: 60px; }
  .note { top: 39%; }
}

/* ---------- user preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  .scene, .tune, .btn, .needle, .meter-needle { transition: none; }
  .tune-ring { animation: none; }
}
@media (prefers-contrast: more) {
  :root { --dim: #fff0dc; --edge: #fff0dc; --rail: #d9ccb8; --ink: #fff; }
  .scene { opacity: .22; }
  [data-playing="1"] .scene { opacity: .6; }
  .stage::after { background: linear-gradient(to bottom, rgba(0, 0, 0, .2), #000 70%); }
  .nums b, .room b, .note, .nxt.mix, .chev { color: #fff; }
  .mute, .mbtn, .btn, .iso-btn { text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: currentColor; }
  .secs-row { border-bottom-width: 2px; }
  .sec { border-left-width: 2px; }
}
@media (forced-colors: active) {
  :focus-visible { outline: 2px solid CanvasText; }
  .spk { forced-color-adjust: none; }
}

/* ---------- notice: the standalone page and the in-page sheet share the text styles ---------- */
.doc { overflow: auto; }
.doc-main { max-width: 640px; margin: 0 auto; padding: 36px 22px 64px; }
.doc h1 { font: 400 26px/1.2 var(--display); letter-spacing: .18em; color: var(--ink); margin: 10px 0 26px; }
.doc-text { font: 400 16px/1.6 var(--text); letter-spacing: .01em; text-shadow: none; }
.doc-text h2, .doc-text h3 { font-size: 15px; font-weight: 600; font-variant-caps: all-small-caps; letter-spacing: .06em; color: var(--a); margin: 26px 0 6px; }
.doc-text p { margin: 0 0 10px; }
.doc-text ul { list-style: disc; margin: 0 0 10px 20px; }
.doc-text li { margin: 0 0 6px; }
.doc-text kbd { font: 400 13px var(--figures); font-stretch: 80%; border-bottom: 1px solid var(--edge); padding: 0 3px; white-space: nowrap; }
.doc-text a { color: var(--ink); text-underline-offset: 3px; }

.notice { /* a sheet with a single top rule */
  width: min(680px, calc(100vw - 24px)); max-height: min(82vh, 740px); padding: 0; color: var(--ink);
  background: var(--ground); border: 0; border-top: 1px solid var(--ink); overflow: hidden;
}
.notice[open] { display: flex; flex-direction: column; }
.notice::backdrop { background: rgba(0, 0, 0, .78); }
.notice-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 6px 12px 0 24px; flex: none; }
.notice-title { font: 500 15px var(--text); font-variant-caps: all-small-caps; letter-spacing: .06em; color: var(--dim); }
.notice-close { min-height: 44px; min-width: 76px; padding: 0 10px; color: var(--ink); font: 500 14px var(--text); text-decoration: underline; text-decoration-color: var(--rail); text-underline-offset: 5px; }
.notice-close:hover { text-decoration-color: var(--ink); }
.notice-body { padding: 0 24px 26px; overflow: auto; overscroll-behavior: contain; }
