/* Progress : la ligne de métro. Papier de signalétique en prévol, bleu de quai en vol, jaune réservé à la ligne. */
:root {
  --navy: #0F1546;
  --yellow: #FFCD00;
  --ground: #F4F5F8;
  --surface: #FFFFFF;
  --ink: #0F1546;
  --ink-2: #474E72;
  --ink-3: #636A8E;
  --rule: rgba(15, 21, 70, .11);
  --rule-strong: rgba(15, 21, 70, .22);
  --chip: rgba(15, 21, 70, .06);
  --line: #FFCD00;
  --past: #C9CCDB;
  --dot-fill: #FFFFFF;
  --switch-on: #0F1546;
  --late: #8F5300;
  --early: #0F1546;
  --danger: #B3261E;
  --font: "Barlow", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --t: 280ms;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --gutter: max(24px, env(safe-area-inset-left, 0px));
  --gutter-r: max(24px, env(safe-area-inset-right, 0px));
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0A0E33;
    --surface: #141A4A;
    --ink: #F4F5F8;
    --ink-2: #B7BCD8;
    --ink-3: #8F95BA;
    --rule: rgba(244, 245, 248, .1);
    --rule-strong: rgba(244, 245, 248, .22);
    --chip: rgba(244, 245, 248, .08);
    --past: #333B6E;
    --dot-fill: #0A0E33;
    --switch-on: #FFCD00;
    --late: #FFCD00;
    --early: #F4F5F8;
    --danger: #FF9C94;
    color-scheme: dark;
  }
}
body[data-screen="flying"], body[data-screen="break"] {
  --ground: #0F1546;
  --surface: #19215C;
  --ink: #F4F5F8;
  --ink-2: #AEB4D6;
  --ink-3: #8C92B8;
  --rule: rgba(244, 245, 248, .12);
  --rule-strong: rgba(244, 245, 248, .24);
  --chip: rgba(244, 245, 248, .08);
  --past: #3A4274;
  --dot-fill: #F4F5F8;
  --late: #FFCD00;
  --early: #F4F5F8;
  --danger: #FF9C94;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--ground); -webkit-text-size-adjust: 100%; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  font-feature-settings: "tnum" 1, "lnum" 1;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  scrollbar-color: var(--rule-strong) transparent;
  transition: background-color var(--t) var(--ease), color var(--t) var(--ease);
}
::selection { background: var(--yellow); color: var(--navy); }
input { caret-color: var(--ink); }
button, input, output { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 8px; }
.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ic.fill { fill: currentColor; stroke: none; }
.ic.dots { stroke-width: 3.4; }
kbd {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 6px;
  background: var(--chip); color: var(--ink-2);
  font-family: var(--font); font-size: 12px; font-weight: 600; line-height: 1;
}
@media (hover: none) { kbd:not(.inline) { display: none; } }

#app { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.screen {
  flex: 1; width: 100%;
  display: flex; flex-direction: column;
  padding: env(safe-area-inset-top, 0px) var(--gutter-r) env(safe-area-inset-bottom, 0px) var(--gutter);
  animation: enter 480ms var(--ease) both;
}
@keyframes enter { from { opacity: .001; transform: translateY(8px); } }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.brand { font-size: 17px; font-weight: 700; letter-spacing: .01em; color: var(--ink); white-space: nowrap; }
.sat { margin-left: 2px; }
.bar-link { font-size: 15px; font-weight: 600; color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.bar-link:hover { color: var(--ink); }

/* ---------- Rail de ligne partagé : prévol et débrief ---------- */
.station { position: relative; display: grid; align-items: center; column-gap: 12px; min-height: 56px; }
.st-time { font-size: 17px; font-weight: 600; color: var(--ink-2); text-align: right; font-variant-numeric: tabular-nums; }
.st-rail { position: relative; align-self: stretch; }
.st-rail::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 6px; margin-left: -3px; background: var(--line); }
.dot, .term { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.dot { border-radius: 50%; background: var(--dot-fill); border: 5px solid var(--line); transition: width var(--t) var(--ease), height var(--t) var(--ease), background-color var(--t) var(--ease), border-color var(--t) var(--ease); }
.dot.p1 { width: 24px; height: 24px; }
.dot.p2 { width: 15px; height: 15px; border-width: 4px; }
.dot.ghost { width: 15px; height: 15px; border: 2px dashed var(--ink-3); background: var(--ground); }
.term { width: 24px; height: 24px; border-radius: 5px; background: var(--line); }
.terminus-row .st-rail::before { bottom: 50%; }

/* ---------- Prévol ---------- */
.pre, .land { max-width: 1240px; margin: 0 auto; }
.pre-grid, .land-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 72px; align-items: start;
  padding-block: clamp(8px, 2vh, 24px) 64px;
}
.clock { font-size: clamp(72px, 8vw, 112px); font-weight: 200; letter-spacing: -.04em; line-height: .9; font-variant-numeric: tabular-nums; }
.clock .sec { font-size: .28em; font-weight: 400; letter-spacing: 0; color: var(--ink-3); margin-left: .18em; vertical-align: .16em; }
.eta-line { margin-top: 14px; font-size: 21px; color: var(--ink-2); max-width: 40ch; }
.eta-line b { color: var(--ink); font-weight: 700; }
.eta-pace { margin-top: 8px; font-size: 15px; color: var(--ink-3); max-width: 60ch; }
.route { margin-top: 14px; }
.stations { list-style: none; margin: 0; padding: 0; }
.task, .add-row, .pre .terminus-row { grid-template-columns: 56px 40px minmax(0, 1fr) auto 36px 32px; }
.t-meta { display: flex; align-items: center; gap: 8px; }
.add-row .add-input { grid-column: 3 / -1; }
.pre .terminus-row .term-label { grid-column: 3 / -1; }
.stations .task:first-child .st-rail::before,
.route.empty .add-row .st-rail::before { top: 50%; }
.task::after, .add-row::after { content: ""; position: absolute; left: 120px; right: 0; bottom: 0; height: 1px; background: var(--rule); }
.task { background: var(--ground); transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease); }
.task.dragging { z-index: 3; transition: box-shadow var(--t) var(--ease); box-shadow: 0 10px 28px -10px rgba(15, 21, 70, .35); border-radius: 12px; background: var(--surface); }
.task.arrive { animation: arrive var(--t) var(--ease); }
@keyframes arrive { from { opacity: .001; transform: translateY(6px); } }
.st-main { display: flex; flex-direction: column; min-width: 0; padding-block: 6px; }
.st-main input, .add-input {
  width: 100%; border: 0; background: transparent; outline: none; padding: 2px 0; border-radius: 0;
}
.t-title { font-size: 19px; font-weight: 600; color: var(--ink); }
.t-dw { font-size: 15px; color: var(--ink-2); }
.t-dw::placeholder, .add-input::placeholder { color: var(--ink-3); opacity: 1; }
.task:not(.has-dw):not(:focus-within):not(.dw-open) .t-dw { display: none; }
.t-dw-add { display: inline-flex; align-items: center; gap: 3px; height: 30px; padding: 0 9px 0 6px; border-radius: 8px; box-shadow: inset 0 0 0 1px var(--rule-strong); font-size: 13px; font-weight: 600; color: var(--ink-2); white-space: nowrap; transition: background-color var(--t) var(--ease); }
.t-dw-add:hover { background: var(--chip); color: var(--ink); }
.t-dw-add .ic { width: 14px; height: 14px; }
.task.has-dw .t-dw-add, .task.dw-open .t-dw-add { display: none; }
.pause-row { grid-template-columns: 56px 40px minmax(0, 1fr); min-height: 22px; }
.pause-row .st-time { font-size: 13px; font-weight: 500; color: var(--ink-3); }
.dwell { position: absolute; left: 50%; top: 2px; bottom: 2px; width: 10px; margin-left: -5px; border-radius: 5px; background: var(--ground); box-shadow: inset 0 0 0 3px var(--line); }
.pause-label { font-size: 13px; color: var(--ink-3); }
.st-main input:focus-visible, .add-input:focus-visible { box-shadow: inset 0 -2px 0 var(--ink); }
.add-input { font-size: 19px; font-weight: 500; min-height: 56px; }
.t-min {
  display: inline-flex; align-items: baseline; gap: 3px; padding: 6px 10px; border-radius: 8px;
  background: var(--chip); cursor: ew-resize; user-select: none;
  transition: background-color var(--t) var(--ease), color var(--t) var(--ease);
}
.t-min input { width: 3ch; border: 0; padding: 0; background: transparent; text-align: right; font-size: 17px; font-weight: 600; outline: none; font-variant-numeric: tabular-nums; cursor: text; }
.t-min span { font-size: 14px; color: var(--ink-2); }
.t-min:focus-within { box-shadow: inset 0 0 0 2px var(--ink); }
.t-min.scrub { background: var(--yellow); color: var(--navy); }
.t-min.scrub span { color: var(--navy); }
.t-prio { min-width: 36px; padding: 5px 8px; border-radius: 7px; font-size: 13px; font-weight: 700; letter-spacing: .03em; transition: background-color var(--t) var(--ease), color var(--t) var(--ease); }
.t-prio.p1 { background: var(--ink); color: var(--ground); }
.t-prio.p2 { box-shadow: inset 0 0 0 1px var(--rule-strong); color: var(--ink-2); }
.t-del, .t-grip, .icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: var(--ink-3); transition: opacity var(--t) var(--ease), background-color var(--t) var(--ease), color var(--t) var(--ease); }
.t-del:hover, .icon-btn:hover { background: var(--chip); color: var(--ink); }
.t-grip { width: 32px; cursor: grab; touch-action: none; }
.task.dragging .t-grip { cursor: grabbing; }
@media (hover: hover) {
  .t-del, .t-grip { opacity: 0; }
  .task:hover .t-del, .task:hover .t-grip, .task:focus-within .t-del, .task:focus-within .t-grip { opacity: 1; }
}
.pre .terminus-row .st-time { color: var(--ink); font-weight: 700; }
.term-label { font-size: 19px; font-weight: 700; }
.hint { margin-top: 18px; font-size: 14px; color: var(--ink-3); max-width: 72ch; }
.hint kbd { vertical-align: 1px; }

.pre-side { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 28px; padding-top: 8px; }
.field { display: flex; flex-direction: column; gap: 10px; }
.field-label { font-size: 15px; font-weight: 700; }
.field-help { font-size: 14px; color: var(--ink-3); }
.text-input {
  height: 54px; width: 100%; padding: 0 16px; border-radius: 12px;
  border: 1px solid var(--rule-strong); background: var(--surface);
  font-size: 18px; font-weight: 500; outline: none;
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.text-input::placeholder { color: var(--ink-3); opacity: 1; }
.text-input:focus-visible { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.settings { border-top: 1px solid var(--rule); }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 58px; border-bottom: 1px solid var(--rule); font-size: 16px; font-weight: 500; }
.set-row.sub { padding-left: 16px; color: var(--ink-2); font-weight: 400; }
#brkEveryRow { flex-direction: column; align-items: stretch; gap: 10px; padding-block: 12px 14px; }
#brkEveryRow .segmented { display: grid; grid-template-columns: repeat(3, 1fr); }
.switch { position: relative; width: 50px; height: 30px; flex: none; border-radius: 15px; background: var(--rule-strong); transition: background-color var(--t) var(--ease); }
.switch i { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #FFFFFF; box-shadow: 0 1px 3px rgba(15, 21, 70, .3); transition: transform var(--t) var(--ease); }
.switch[aria-checked="true"] { background: var(--switch-on); }
.switch[aria-checked="true"] i { transform: translateX(20px); }
.stepper { display: flex; align-items: center; gap: 6px; }
.stepper button { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--chip); color: var(--ink); }
.stepper .ic { width: 16px; height: 16px; }
.stepper output { min-width: 64px; text-align: center; font-weight: 600; color: var(--ink); }
.segmented { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: var(--chip); }
.segmented button { padding: 6px 11px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--ink-2); white-space: nowrap; transition: background-color var(--t) var(--ease), color var(--t) var(--ease); }
.segmented button[aria-checked="true"] { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(15, 21, 70, .14); }
.btn-launch {
  display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; height: 64px; border-radius: 16px;
  background: var(--yellow); color: var(--navy); font-size: 21px; font-weight: 700;
  transition: transform 160ms var(--ease), opacity var(--t) var(--ease);
}
.btn-launch .ic { width: 22px; height: 22px; }
.btn-launch kbd { background: rgba(15, 21, 70, .12); color: var(--navy); }
.btn-launch[aria-disabled="true"] { opacity: .5; }
.btn-launch:active { transform: scale(.985); }
.btn-launch:focus-visible { outline-color: var(--ink); }
.launch-hint { margin-top: 10px; font-size: 14px; color: var(--ink-3); text-align: center; }
.nudge { animation: nudge 360ms var(--ease); }
@keyframes nudge { 20% { transform: translateX(-6px); } 45% { transform: translateX(5px); } 70% { transform: translateX(-3px); } }

/* ---------- Vol ---------- */
.vol { padding-left: max(56px, env(safe-area-inset-left, 0px)); padding-right: max(56px, env(safe-area-inset-right, 0px)); }
.vol-status { display: flex; align-items: center; gap: 28px; font-size: 17px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.vol-status b { color: var(--ink); font-weight: 600; }
.delta { font-weight: 700; }
.delta.late, .gap.late { color: var(--late); }
.delta.early, .gap.early { color: var(--early); }
.delta.on-time, .gap.on-time { color: var(--ink-2); font-weight: 500; }
.icon-btn { color: var(--ink-2); }
.vol-focus { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 48px; align-items: start; padding-top: clamp(28px, 9vh, 104px); }
.vol-task { min-width: 0; }
.vol-task.arrive { animation: arrive 480ms var(--ease); }
.vol-title { font-size: clamp(38px, 5.3vw, 78px); font-weight: 700; letter-spacing: -.03em; line-height: 1.04; text-wrap: balance; overflow-wrap: anywhere; max-width: 16ch; }
.vol-dw { margin-top: 16px; font-size: 21px; color: var(--ink-2); max-width: 42ch; }
.vol-clock { text-align: right; }
.vol-timer { font-size: clamp(104px, 15.5vw, 224px); font-weight: 200; letter-spacing: -.045em; line-height: .84; font-variant-numeric: tabular-nums; transition: color var(--t) var(--ease), opacity var(--t) var(--ease); }
.vol-timer.over { color: var(--yellow); }
.is-paused .vol-timer { opacity: .38; }
.is-break.is-ready .vol-timer { color: var(--ink-3); }
.vol-next { margin-top: 22px; font-size: 18px; color: var(--ink-2); }

.line { position: relative; height: 196px; margin: clamp(28px, 7vh, 88px) 72px 0; }
.line-track { position: absolute; left: 0; right: 0; top: 110px; height: 10px; border-radius: 5px; background: var(--line); }
.line-past { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px 0 0 5px; background: var(--past); }
.line-run { position: absolute; top: 0; bottom: 0; background: var(--ink); }
.line-stops { position: absolute; inset: 0; }
.stop { position: absolute; top: 0; bottom: 0; left: calc(var(--x, 0) * 100%); width: 0; transition: left var(--t) var(--ease); }
.stop .dot, .stop .term { top: 115px; }
.stop .dot.p1 { width: 28px; height: 28px; border-width: 6px; }
.stop .dot.p2 { width: 18px; height: 18px; border-width: 4px; }
.stop.done .dot { border-color: var(--past); background: var(--ink-3); }
.stop.current .dot { width: 44px; height: 44px; border-width: 8px; background: var(--dot-fill); }
.stop.current.upcoming .dot { border-style: solid; background: var(--ground); }
.stop .term { width: 32px; height: 32px; border-radius: 6px; }
.stop-name, .stop-time { position: absolute; left: 0; transform: translateX(-50%); white-space: nowrap; transition: opacity var(--t) var(--ease), color var(--t) var(--ease); }
.stop-name { bottom: 108px; width: max-content; max-width: 200px; white-space: normal; text-align: center; line-height: 1.15; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: 18px; font-weight: 600; color: var(--ink); }
.stop-time { top: 140px; font-size: 16px; font-weight: 500; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.stop.done .stop-name, .stop.done .stop-time { color: var(--ink-3); }
.stop.current .stop-name, .stop.current .stop-time, .stop.terminus .stop-time { color: var(--yellow); font-weight: 700; }
.stop.terminus .stop-name { font-weight: 700; }
.stop.current .stop-name { bottom: 114px; font-size: 20px; }
.stop.current .stop-time { top: 148px; }
.stop.row2 .stop-name { bottom: 156px; -webkit-line-clamp: 1; }
.stop.row2 .stop-time { top: 164px; }
.line-pause { position: absolute; top: 0; bottom: 0; min-width: 8px; border-radius: 5px; background: var(--ground); box-shadow: inset 0 0 0 3px var(--line); }
.stop.crowded .stop-name, .stop.crowded .stop-time { opacity: 0; }
.stop.edge-l .stop-name, .stop.edge-l .stop-time { transform: translateX(-24px); }
.stop.edge-r .stop-name, .stop.edge-r .stop-time { transform: translateX(calc(-100% + 24px)); }
.line-now { position: absolute; top: 115px; left: calc(var(--x, 0) * 100%); width: 16px; height: 16px; border-radius: 50%; transform: translate(-50%, -50%); background: var(--ink); border: 3px solid var(--navy); transition: left 1s linear; }
.is-break .line-now { background: var(--yellow); }

.vol-foot { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 22px 30px; margin-top: 28px; border-top: 1px solid var(--rule); }
.vol-reward { font-size: 17px; color: var(--ink-2); min-width: 0; }
.vol-reward b { color: var(--ink); font-weight: 700; }
.vol-reward .muted { color: var(--ink-3); }
.vol-reward.won b { color: var(--yellow); }
.vol-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 18px;
  border-radius: 24px; box-shadow: inset 0 0 0 1px var(--rule-strong); color: var(--ink);
  font-size: 16px; font-weight: 600; white-space: nowrap;
  transition: background-color var(--t) var(--ease), transform 160ms var(--ease), opacity 600ms var(--ease);
}
.btn:hover { background: var(--chip); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--yellow); color: var(--navy); box-shadow: none; }
.btn.primary:hover { background: #FFD633; }
.btn.primary kbd { background: rgba(15, 21, 70, .12); color: var(--navy); }
.vol-actions kbd { display: none; }
body.keys .vol-actions kbd { display: inline-flex; }
@media (hover: none) { body.keys .vol-actions kbd { display: none; } }
.vol-bar .icon-btn, .brand { transition: opacity 600ms var(--ease); }
body.idle { cursor: none; }
body.idle .vol-actions .btn:not(.primary), body.idle .vol-bar .icon-btn, body.idle .vol-bar .brand { opacity: .16; }

/* ---------- Feuilles et toast ---------- */
.sheet-layer { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; padding: 16px max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.scrim { position: absolute; inset: 0; background: rgba(6, 9, 32, .55); animation: fade var(--t) var(--ease); }
.sheet { position: relative; width: min(560px, 100%); padding: 20px; border-radius: 20px; background: var(--surface); color: var(--ink); box-shadow: 0 24px 60px -16px rgba(0, 0, 0, .5); animation: rise var(--t) var(--ease); }
.sheet-layer.closing .scrim { animation: fade var(--t) var(--ease) reverse forwards; }
.sheet-layer.closing .sheet { animation: rise var(--t) var(--ease) reverse forwards; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }
.sheet-title { display: block; margin-bottom: 12px; font-size: 15px; font-weight: 700; color: var(--ink-2); }
.note-row { display: flex; gap: 10px; }
.note-row .btn { height: 54px; padding: 0 22px; }
.sheet-hint { margin-top: 12px; font-size: 14px; color: var(--ink-3); }
.menu { display: flex; flex-direction: column; gap: 4px; }
.menu-item { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 12px; text-align: left; font-size: 17px; font-weight: 600; transition: background-color var(--t) var(--ease); }
.menu-item:hover { background: var(--chip); }
.menu-item small { font-size: 14px; font-weight: 400; color: var(--ink-2); }
.menu-item.danger { color: var(--danger); }
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 60;
  display: flex; align-items: center; gap: 16px; max-width: calc(100vw - 32px); padding: 12px 20px; border-radius: 999px;
  background: var(--ink); color: var(--ground); font-size: 15px; font-weight: 500;
  box-shadow: 0 12px 30px -10px rgba(6, 9, 32, .45);
  opacity: 0; pointer-events: none; transform: translate(-50%, 16px);
  transition: opacity var(--t) var(--ease), transform var(--t) var(--ease);
}
.toast.show { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
/* En vol, le bas de l'écran porte les actions : le message recouvre brièvement la barre du haut. */
body[data-screen="flying"] .toast, body[data-screen="break"] .toast { top: calc(14px + env(safe-area-inset-top, 0px)); bottom: auto; transform: translate(-50%, -16px); }
body[data-screen="flying"] .toast.show, body[data-screen="break"] .toast.show { transform: translate(-50%, 0); }
.toast button { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Atterrissage ---------- */
.land-title { font-size: clamp(52px, 7vw, 96px); font-weight: 700; letter-spacing: -.035em; line-height: .95; }
.land-sub { margin-top: 18px; font-size: 20px; color: var(--ink-2); max-width: 52ch; }
.gap { font-weight: 700; }
.debrief { margin-top: 44px; }
.db-row { grid-template-columns: 56px 40px minmax(0, 1fr) 72px 72px 80px; min-height: 58px; font-size: 17px; }
.db-row > span:nth-child(n + 4) { text-align: right; font-variant-numeric: tabular-nums; }
.db-head { display: grid; column-gap: 12px; align-items: end; min-height: 36px; padding-bottom: 8px; font-size: 14px; font-weight: 600; color: var(--ink-3); border-bottom: 1px solid var(--rule); }
.db-head > span:first-child { text-align: right; }
.db-head + .station .st-rail::before { top: 50%; }
.debrief .station:not(.terminus-row)::after { content: ""; position: absolute; left: 120px; right: 0; bottom: 0; height: 1px; background: var(--rule); }
.db-title { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.db-title small { font-size: 14px; font-weight: 500; color: var(--ink-3); }
.terminus-row .db-title small { display: block; font-size: 13px; }
.db-row.skipped .st-rail .dot { background: var(--ground); border-color: var(--past); }
.db-row.skipped .db-title { color: var(--ink-2); }
.debrief .terminus-row { font-weight: 700; }
.debrief .terminus-row .st-time { color: var(--ink); font-weight: 700; }
.insight { margin-top: 24px; padding-left: 120px; font-size: 17px; color: var(--ink-2); max-width: 66ch; }

.land-side { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 32px; padding-top: 8px; }
.reward-panel { display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; min-height: 220px; padding: 28px; border-radius: 20px; }
.reward-panel.won { background: var(--yellow); color: var(--navy); }
.reward-panel.locked { box-shadow: inset 0 0 0 1px var(--rule-strong); color: var(--ink-2); }
.rp-reward { font-size: clamp(34px, 3.6vw, 48px); font-weight: 700; letter-spacing: -.02em; line-height: 1.04; overflow-wrap: anywhere; }
.reward-panel.locked .rp-reward { color: var(--ink); }
.rp-sub { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 500; }
.reward-panel.won .rp-sub { color: var(--navy); }
.reward-panel.reveal { animation: flood 900ms var(--ease) 240ms both; }
@keyframes flood { from { clip-path: inset(100% 0 0 0 round 20px); } to { clip-path: inset(0 0 0 0 round 20px); } }
.parking h2 { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.park-list { list-style: none; margin: 0 0 10px; padding: 0; }
.park { display: flex; align-items: center; gap: 12px; min-height: 52px; border-bottom: 1px solid var(--rule); cursor: pointer; }
.park input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check { display: grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--rule-strong); color: transparent; transition: background-color var(--t) var(--ease), color var(--t) var(--ease); }
.check .ic { width: 15px; height: 15px; stroke-width: 2.6; }
.park input:checked + .check { background: var(--ink); color: var(--ground); box-shadow: none; }
.park input:focus-visible + .check { outline: 2px solid var(--ink); outline-offset: 3px; }
.park-text { font-size: 16px; overflow-wrap: anywhere; }
.land-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.land-actions .btn.primary { flex: 1; }

/* ---------- Adaptation ---------- */
@media (max-width: 960px) {
  .pre-grid, .land-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .pre-side, .land-side { position: static; }
  .pre-grid { padding-bottom: 150px; }
  .launch { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 20px max(24px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(24px, env(safe-area-inset-left, 0px)); background: linear-gradient(to bottom, transparent, var(--ground) 28%); }
}
@media (max-width: 720px) {
  .vol { padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
  .vol-bar .brand { display: none; }
  .vol-status { gap: 16px; font-size: 15px; width: 100%; justify-content: space-between; }
  .vol-focus { grid-template-columns: minmax(0, 1fr); gap: 20px; padding-top: 24px; align-content: start; }
  .vol-clock { text-align: left; }
  .vol-timer { font-size: clamp(88px, 27vw, 140px); }
  .vol-dw { font-size: 18px; }
  .vol-next { font-size: 16px; margin-top: 12px; }
  .line { height: 164px; margin: 24px 28px 0; }
  .line-track { top: 80px; }
  .stop .dot, .stop .term, .line-now { top: 85px; }
  .stop .dot.p1 { width: 22px; height: 22px; border-width: 5px; }
  .stop .dot.p2 { width: 14px; height: 14px; border-width: 4px; }
  .stop.current .dot { width: 34px; height: 34px; border-width: 7px; }
  .stop .term { width: 24px; height: 24px; }
  .stop-name { bottom: 98px; font-size: 15px; max-width: 120px; }
  .stop.current .stop-name { bottom: 102px; font-size: 16px; }
  .stop.row2 .stop-name { bottom: 128px; }
  .stop-time, .stop.current .stop-time { top: 104px; font-size: 14px; }
  .stop.row2 .stop-time { top: 124px; }
  .vol-foot { flex-direction: column; align-items: stretch; gap: 16px; }
  .vol-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .vol-actions .btn { padding: 0 10px; font-size: 15px; gap: 6px; }
  .vol-actions .btn .ic { width: 17px; height: 17px; }
  .vol-actions .btn.primary { grid-column: 1 / -1; order: -1; height: 56px; font-size: 18px; }
  .is-break .vol-actions { grid-template-columns: minmax(0, 1fr); }
  .task, .add-row, .pre .terminus-row { grid-template-columns: 46px 30px minmax(0, 1fr) 32px; column-gap: 8px; }
  .task .st-time { grid-row: 1 / span 2; }
  .task .st-rail { grid-row: 1 / span 2; }
  .task .st-main { grid-column: 3; grid-row: 1; padding-bottom: 2px; }
  .task .t-meta { grid-column: 3; grid-row: 2; padding-bottom: 12px; }
  .task .t-del { grid-column: 4; grid-row: 1 / span 2; }
  .pause-row { grid-template-columns: 46px 30px minmax(0, 1fr); column-gap: 8px; }
  .t-grip { display: none; }
  .task::after, .add-row::after, .debrief .station:not(.terminus-row)::after { left: 92px; }
  .insight { padding-left: 0; }
  .st-time { font-size: 15px; }
  .t-title, .add-input, .term-label { font-size: 17px; }
  .t-min { padding: 5px 7px; }
  .db-row { grid-template-columns: 46px 30px minmax(0, 1fr) 54px 58px 60px; column-gap: 8px; font-size: 15px; }
  .db-head { font-size: 12px; }
}
@media (max-width: 380px) {
  .t-prio { min-width: 30px; padding: 4px 6px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; transition-duration: 1ms !important; }
}
