@font-face {
  font-family: "Instrument Serif";
  src: url("./fonts/InstrumentSerif-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Serif";
  src: url("./fonts/InstrumentSerif-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: Inter;
  src: url("./fonts/Inter-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Inter;
  src: url("./fonts/Inter-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("./fonts/IBMPlexMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("./fonts/IBMPlexMono-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}


:root {
  color-scheme: dark;
  --bg: #0e0f11;
  --surface: #16181b;
  --surface-2: #1d2024;
  --inset: #0b0c0e;
  --line: #2a2e34;
  --line-strong: #3b4048;
  --text: #eceef0;
  --muted: #a2a9b2;
  --dim: #6f7680;
  --accent: #ff6b3d;
  --accent-ink: #160b06;
  --accent-soft: rgba(255, 107, 61, 0.14);
  --danger: #ff6b6b;
  --danger-soft: rgba(255, 107, 107, 0.1);
  --radius: 14px;
  --radius-sm: 10px;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  font-family: Inter, -apple-system, "Segoe UI", sans-serif;
  -webkit-text-size-adjust: 100%;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--text);
  background:
    radial-gradient(120% 60% at 50% -10%, rgba(255, 107, 61, 0.06), transparent 60%),
    var(--bg);
  font-size: 16px;
  line-height: 1.45;
  padding:
    env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }

.mono { font-family: var(--mono); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

p, h1, h2 { margin: 0; }

/* ---------- Top bar ---------- */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 640px;
  margin: 0 auto;
  padding: 14px 16px 6px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.mark { width: 30px; height: 30px; flex: none; }
.wordmark { font-weight: 500; font-size: 16px; letter-spacing: -0.01em; white-space: nowrap; }
.dev-badge {
  display: inline-flex;
  align-items: center;
  flex: none;
  margin-left: 2px;
  padding: 2px 8px 2px 9px;
  border-radius: 999px;
  background: #ff6b3d;
  color: #140c09;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.4;
}
body.is-dev {
  box-shadow: inset 0 3px 0 #ff6b3d;
}
.access { display: flex; align-items: center; gap: 6px; min-width: 0; }
.access-state {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.led {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--line-strong);
  flex: none;
}
.led-on { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ---------- Layout ---------- */
main {
  max-width: 640px;
  margin: 0 auto;
  padding: 8px 12px 24px;
}

.panel {
  background: linear-gradient(180deg, var(--surface-2), var(--surface) 120px);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 20px 40px -24px rgba(0, 0, 0, 0.8);
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.panel-head h1 {
  flex: 1;
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.015em;
  min-width: 0;
}
.ch {
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--accent);
  border: 1px solid rgba(255, 107, 61, 0.45);
  border-radius: 6px;
  padding: 2px 6px;
}
.meter-deco { display: flex; align-items: flex-end; gap: 3px; height: 16px; }
.meter-deco i { width: 3px; border-radius: 1px; background: var(--line-strong); }
.meter-deco i:nth-child(1) { height: 6px; }
.meter-deco i:nth-child(2) { height: 11px; }
.meter-deco i:nth-child(3) { height: 16px; background: var(--dim); }
.meter-deco i:nth-child(4) { height: 9px; }
.meter-deco i:nth-child(5) { height: 13px; background: var(--accent); }

.slot-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0;
  margin-bottom: 8px;
}

/* ---------- Controls ---------- */
button, .button, input, label, a { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }

input[type="url"], input[type="password"], input[type="text"] {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 12px 14px;
  font: inherit;
  font-size: 16px;
  color: var(--text);
  background: var(--inset);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input::placeholder { color: var(--dim); }
input[type="url"]:focus, input[type="password"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  min-width: 44px;
  padding: 0 16px;
  font: inherit;
  font-weight: 500;
  font-size: 15px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.08s ease;
}
button:hover, .button:hover { border-color: var(--dim); }
button:active, .button:active { transform: translateY(1px); }
button:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.primary {
  width: 100%;
  min-height: 54px;
  margin-top: 18px;
  font-size: 16px;
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
  border-radius: 12px;
  letter-spacing: 0.005em;
}
.primary:hover { background: #ff7d55; border-color: #ff7d55; }
.primary:focus-visible { outline-color: var(--text); }
.secondary { background: var(--surface-2); }
.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.ghost:hover { color: var(--text); border-color: var(--line-strong); }
.small { min-height: 44px; padding: 0 10px; font-size: 13px; white-space: nowrap; }

.row { display: flex; gap: 8px; align-items: stretch; }
.row > input { flex: 1; }

.check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
}
.check input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }

.error-text { color: var(--danger); font-size: 14px; margin-top: 8px; }
.error-text:empty { display: none; }

/* ---------- Access slot ---------- */
.auth {
  padding: 14px;
  margin-bottom: 14px;
  background: var(--inset);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}
.auth > label[for="token-input"] { display: block; font-size: 14px; color: var(--muted); margin-bottom: 8px; }

/* ---------- Input tracks ---------- */
.track {
  padding: 12px;
  background: rgba(11, 12, 14, 0.55);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.track.armed { border-color: rgba(255, 107, 61, 0.55); background: rgba(255, 107, 61, 0.045); }
.track-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.track-hint { font-size: 12.5px; color: var(--muted); text-align: right; }

.arm {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 10px 0 8px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  cursor: pointer;
}
.arm input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.arm-led { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); transition: background 0.2s ease, box-shadow 0.2s ease; }
.arm:has(input:checked) { color: var(--text); border-color: rgba(255, 107, 61, 0.55); }
.arm:has(input:checked) .arm-led { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.arm:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

.or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 4px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
}
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.drop {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 14px;
  font-weight: 500;
  font-size: 15px;
  color: var(--text);
  background: var(--inset);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.drop:hover { border-color: var(--dim); }
.file-input:focus-visible + .file-picked, label[for="file-input"]:has(+ .file-input:focus-visible) .drop { outline: 2px solid var(--accent); outline-offset: 2px; }
.drop-icon {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  font-size: 14px;
}

.file-picked {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 10px 6px 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.file-picked-text { flex: 1; min-width: 0; }
.file-name { font-weight: 500; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.file-state { font-size: 13px; color: var(--muted); margin-top: 2px; }
.file-picked-bad { border-color: rgba(255, 107, 107, 0.6); }
.file-picked-bad .file-state { color: var(--danger); }

/* ---------- Segmented controls ---------- */
.output { display: grid; gap: 16px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.seg-group { border: 0; margin: 0; padding: 0; min-width: 0; }
.seg {
  display: grid;
  gap: 4px;
  padding: 4px;
  background: var(--inset);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.seg-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.seg-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.seg label { position: relative; display: block; cursor: pointer; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 6px 2px;
  border-radius: 9px;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.seg b { font-family: var(--mono); font-weight: 500; font-size: 14px; letter-spacing: 0.02em; color: var(--muted); }
.seg small { font-size: 11px; color: var(--dim); margin-top: 1px; white-space: nowrap; }
.seg label:hover span { background: rgba(255, 255, 255, 0.03); }
.seg input:checked + span {
  background: var(--surface-2);
  border-color: var(--line-strong);
  box-shadow: inset 0 -2px 0 var(--accent);
}
.seg input:checked + span b { color: var(--text); }
.seg input:checked + span small { color: var(--muted); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
.seg input:disabled + span { opacity: 0.5; }

/* ---------- Job panel ---------- */
.clock { font-size: 13px; color: var(--muted); letter-spacing: 0.04em; font-variant-numeric: tabular-nums; }
.title-line {
  font-size: 17px;
  font-weight: 500;
  line-height: 1.35;
  word-break: break-word;
  margin-bottom: 4px;
}
.lede { color: var(--muted); font-size: 14px; }
.lede:empty { display: none; }

.stages {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 18px 0 12px;
  padding: 0;
  counter-reset: stage;
}
.stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding-top: 2px;
  counter-increment: stage;
}
.stage::before {
  content: "";
  position: absolute;
  top: 8px;
  left: calc(-50% + 12px);
  right: calc(50% + 12px);
  height: 2px;
  border-radius: 2px;
  background: var(--line);
}
.stage:first-child::before { display: none; }
.stage-led {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  background: var(--inset);
  display: grid;
  place-items: center;
}
.stage-name { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); }
.stage.done .stage-led { border-color: var(--text); background: var(--text); }
.stage.done .stage-led::after { content: ""; width: 6px; height: 3px; border: solid var(--bg); border-width: 0 0 2px 2px; transform: translateY(-1px) rotate(-45deg); }
.stage.done .stage-name { color: var(--muted); }
.stage.done + .stage::before, .stage.done::before { background: var(--muted); }
.stage.run .stage-led { border-color: var(--accent); background: var(--accent-soft); }
.stage.run .stage-led::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: pulse 1.2s ease-in-out infinite; }
.stage.run .stage-name { color: var(--text); }
.stage.ready .stage-led { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.stage.ready .stage-led::after { content: ""; width: 6px; height: 3px; border: solid var(--accent-ink); border-width: 0 0 2px 2px; transform: translateY(-1px) rotate(-45deg); }
.stage.ready .stage-name { color: var(--accent); }
.stage.fail .stage-led { border-color: var(--danger); background: var(--danger-soft); }
.stage.fail .stage-led::after { content: "×"; color: var(--danger); font: 700 12px/1 var(--mono); }
.stage.fail .stage-name { color: var(--danger); }

@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.35; transform: scale(0.7); } }

.status-line { font-size: 12.5px; letter-spacing: 0.04em; color: var(--muted); text-align: center; }
.status-line:empty { display: none; }
.detail { font-size: 12.5px; color: var(--muted); text-align: center; margin-top: 4px; font-variant-numeric: tabular-nums; }
.detail:empty { display: none; }

progress {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 6px;
  margin-top: 12px;
  border: 0;
  border-radius: 6px;
  background: var(--inset);
  overflow: hidden;
}
progress::-webkit-progress-bar { background: var(--inset); border-radius: 6px; }
progress::-webkit-progress-value { background: var(--accent); border-radius: 6px; }
progress::-moz-progress-bar { background: var(--accent); }
progress:not([value]) { display: none; }

.scan {
  position: relative;
  height: 6px;
  margin-top: 12px;
  border-radius: 6px;
  background: var(--inset);
  overflow: hidden;
}
.scan i {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 30%;
  border-radius: 6px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: scan 1.6s ease-in-out infinite;
}
@keyframes scan { 0% { left: -30%; } 100% { left: 100%; } }

.error-box {
  margin-top: 14px;
  padding: 12px 14px;
  font-size: 14.5px;
  color: #ffd3d3;
  background: var(--danger-soft);
  border: 1px solid rgba(255, 107, 107, 0.45);
  border-radius: var(--radius-sm);
}
.error-box:empty { display: none; }
.notice {
  margin-top: 14px;
  padding: 12px 14px;
  font-size: 14px;
  color: var(--muted);
  background: var(--inset);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

/* ---------- Player ---------- */
.player {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  margin-top: 18px;
  padding: 14px;
  background: var(--inset);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.player audio { display: none; }
.player audio[controls] { display: block; grid-column: 1 / -1; width: 100%; }
.player.native .play, .player.native .transport { display: none; }
.play {
  flex: none;
  width: 52px;
  height: 52px;
  padding: 0;
  border-radius: 50%;
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
}
.play:hover { background: #ff7d55; }
.play svg { width: 24px; height: 24px; }
.play .i-pause { display: none; }
.player.playing .play .i-pause { display: block; }
.player.playing .play .i-play { display: none; }
.transport { min-width: 0; }
.np { display: flex; align-items: center; gap: 8px; min-width: 0; margin-bottom: 6px; }
.np-title { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge {
  flex: none;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  padding: 1px 5px;
}
.seek-wrap { position: relative; height: 28px; --p: 0%; }
.ticks {
  position: absolute;
  inset: 7px 0;
  background: linear-gradient(90deg, var(--accent) var(--p), var(--line-strong) var(--p));
  -webkit-mask: repeating-linear-gradient(90deg, #000 0 3px, transparent 3px 5px);
  mask: repeating-linear-gradient(90deg, #000 0 3px, transparent 3px 5px);
  border-radius: 2px;
}
#seek {
  -webkit-appearance: none;
  appearance: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 28px;
  margin: 0;
  background: transparent;
  cursor: pointer;
}
#seek::-webkit-slider-runnable-track { height: 28px; background: transparent; }
#seek::-moz-range-track { height: 28px; background: transparent; }
#seek::-webkit-slider-thumb { -webkit-appearance: none; width: 4px; height: 28px; border-radius: 2px; background: var(--text); border: 0; }
#seek::-moz-range-thumb { width: 4px; height: 28px; border-radius: 2px; background: var(--text); border: 0; }
#seek:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.times { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 4px; font-variant-numeric: tabular-nums; }
#preview-note { grid-column: 1 / -1; text-align: left; margin: 0; }

.download-slot:empty { display: none; }
.download-slot { margin-top: 12px; }
.download-slot .button {
  width: 100%;
  min-height: 54px;
  flex-direction: column;
  gap: 1px;
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
  border-radius: 12px;
  font-size: 16px;
}
.download-slot .button:hover { background: #ff7d55; }
.download-slot .button:focus-visible { outline-color: var(--text); }
.download-slot .button small {
  font: 400 11.5px/1.2 var(--mono);
  opacity: 0.75;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 8px;
}

.actions { display: flex; gap: 8px; margin-top: 10px; }
.actions button { flex: 1; }
.actions:not(:has(button:not([hidden]))) { display: none; }
.keep-open { margin-top: 14px; font-size: 13px; color: var(--dim); text-align: center; }

.foot {
  max-width: 640px;
  margin: 0 auto;
  padding: 16px 16px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.foot-note {
  margin: 0;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
}
.ta {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ta-mark {
  width: 44px;
  height: 55px;
  flex: none;
  overflow: visible;
  display: block;
}
.ta-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  margin: 0;
  line-height: 1.05;
}
.ta-powered {
  font-size: 11.5px;
  font-weight: 400;
  color: #8b95a3;
  letter-spacing: 0.01em;
}
.ta-name {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.03em;
  color: #f4f7fa;
}
.ta-ground { animation: ta-breathe 3.8s ease-in-out infinite; }
.ta-halo { transform-origin: 32px 24px; animation: ta-halo 3.8s ease-in-out infinite; }
.ta-shimmer {
  fill: none;
  stroke: #f7fcff;
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-dasharray: 6 88;
  opacity: 0.5;
  animation: ta-orbit 9.5s linear infinite;
}
@keyframes ta-orbit { to { stroke-dashoffset: -94; } }
@keyframes ta-breathe {
  0%, 100% { opacity: 0.28; }
  50% { opacity: 0.62; }
}
@keyframes ta-halo {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.12); opacity: 1; }
}

/* ---------- Larger screens ---------- */
@media (min-width: 720px) {
  .top { padding: 28px 24px 10px; }
  main { padding: 12px 24px 28px; }
  .foot { padding: 20px 24px 36px; }
  .ta-mark { width: 48px; height: 60px; }
  .ta-name { font-size: 22px; }
  .ta-powered { font-size: 12px; }
  .panel { padding: 24px; border-radius: 22px; }
  .panel-head h1 { font-size: 22px; }
  .stage-name { font-size: 12px; }
}

@media (max-width: 360px) {
  .seg small { display: none; }
  .track-hint { font-size: 11.5px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .scan i { left: 0; width: 100%; opacity: 0.4; }
}

@media (forced-colors: active) {
  .seg input:checked + span, .stage.run .stage-led, .stage.done .stage-led { border: 2px solid CanvasText; }
  .ticks { forced-color-adjust: none; }
}
