/* Badezeit — "Halle": photo of the Amalienbad hall on top (sauna: line drawing of the benches),
   calm controls below, the list on a light ground with fine rules. */

@font-face {
  font-family: "Figtree";
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/figtree-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Figtree";
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/figtree-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Archivo";
  font-weight: 700 800;
  font-stretch: 112% 125%;
  font-display: swap;
  src: url("fonts/archivo-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  font-weight: 700 800;
  font-stretch: 112% 125%;
  font-display: swap;
  src: url("fonts/archivo-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #FFFFFF;
  --ink: #0B2B45;
  --muted: #46606F;
  --line: #D3E2E7;
  --field-line: #7896A5;
  --soft: #EAF4F7;
  --accent: #0B3C68;
  --on-accent: #FFFFFF;
  --track: #E1ECF0;
  --seg: #0B3C68;
  --seg-dim: #6F93B0;
  --mark: #D62839;
  --tick: rgba(11, 43, 69, .28);
  --ok: #1E6B3C;
  --warn: #7A4300;
  --illo-bg: #F3E1C8;
  --illo-stroke: #6B3A10;
  --illo-fill: #E6C193;
  --shade: rgba(0, 0, 0, 0);
  --display: "Archivo", "Arial Black", system-ui, sans-serif;
  --body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
  --radius: 10px;
  --gutter: 16px;
  --hero-h: 188px;
  --brand-size: 1.5rem;
  color-scheme: light;
}

:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0D1D26;
  --ink: #E4F1F4;
  --muted: #A3BCC6;
  --line: #223D4A;
  --field-line: #4F7385;
  --soft: #16303C;
  --accent: #9FD3F0;
  --on-accent: #0D1D26;
  --track: #1B3643;
  --seg: #7CC4E8;
  --seg-dim: #3D7596;
  --mark: #FF6B6B;
  --tick: rgba(228, 241, 244, .3);
  --ok: #6FD99C;
  --warn: #F2B25C;
  --shade: rgba(6, 18, 26, .45);
}

/* Sauna: warm wood tones instead of pool blue. */
body.mode-sauna {
  --bg: #FFFCF8;
  --ink: #2E1A08;
  --muted: #65462A;
  --line: #EADBC8;
  --field-line: #A08060;
  --soft: #F6EADB;
  --accent: #7A4516;
  --on-accent: #FFFFFF;
  --track: #F1E4D3;
  --seg: #7A4516;
  --seg-dim: #B08660;
  --mark: #B3261E;
  --tick: rgba(46, 26, 8, .28);
  --ok: #14502B;
  --warn: #7A3A00;
}
:root[data-theme="dark"] body.mode-sauna {
  --bg: #1E150E;
  --ink: #F6E8D6;
  --muted: #D2B998;
  --line: #3A2A1C;
  --field-line: #8C6E50;
  --soft: #2E2116;
  --accent: #F0C48C;
  --on-accent: #1E150E;
  --track: #33251A;
  --seg: #E7B071;
  --seg-dim: #8C6238;
  --mark: #FF6B6B;
  --tick: rgba(246, 232, 214, .3);
  --ok: #6FD99C;
  --warn: #F2B25C;
  --illo-bg: #2A1D12;
  --illo-stroke: #E0B27A;
  --illo-fill: #4A3220;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
}

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

.ico {
  width: 1.15em; height: 1.15em; flex-shrink: 0;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

.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;
}

.skip {
  position: absolute; left: var(--gutter); top: -100px; z-index: 10;
  background: var(--bg); color: var(--ink); padding: 8px 12px; border-radius: var(--radius);
}
.skip:focus { top: calc(env(safe-area-inset-top, 0px) + 8px); }

/* ---------- Head: picture and controls ---------- */

.top { background: var(--bg); border-bottom: 1px solid var(--line); }

.hero { position: relative; height: calc(var(--hero-h) + env(safe-area-inset-top, 0px)); overflow: hidden; background: var(--illo-bg); }
.hero picture, .hero img { display: block; width: 100%; height: 100%; }
.hero img { object-fit: cover; object-position: 50% 38%; }
.hero::after { content: ""; position: absolute; inset: 0; background: var(--shade); pointer-events: none; }
.hero-sauna { display: none; width: 100%; height: 100%; }
.hero-sauna svg { display: block; width: 100%; height: 100%; }
body.mode-sauna .hero picture { display: none; }
body.mode-sauna .hero-sauna { display: block; }
body.mode-sauna .hero::after { background: none; }

.brand {
  position: absolute; z-index: 1; left: var(--gutter); top: calc(env(safe-area-inset-top, 0px) + 14px);
  height: calc(var(--brand-size) + 11px); padding: 6px 10px 5px; background: var(--bg); border-radius: 8px;
}
.brand-name {
  font-family: var(--display); font-weight: 800; font-stretch: 125%;
  font-size: var(--brand-size); line-height: 1; margin: 0; color: var(--accent);
}
/* Light/dark switch, a plate like the name on the other side. */
.theme-toggle {
  position: absolute; z-index: 1; right: var(--gutter); top: calc(env(safe-area-inset-top, 0px) + 14px);
  display: inline-flex; align-items: center; justify-content: center;
  width: calc(var(--brand-size) + 11px); height: calc(var(--brand-size) + 11px); padding: 0;
  border: 0; border-radius: 8px; background: var(--bg); color: var(--accent); cursor: pointer;
}
.theme-toggle .ico { width: 20px; height: 20px; }
.theme-toggle[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
/* First version: a quiet note next to the name, not a badge. */
.beta {
  font-family: var(--body); font-stretch: 100%; font-weight: 700; font-size: .75rem; letter-spacing: .02em;
  color: var(--muted); vertical-align: .55em;
}

.controls { display: grid; gap: 10px; padding: 14px var(--gutter) 12px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }

/* Radio groups styled as segmented controls; native inputs keep keyboard and screen reader behaviour. */
.mode input, .when input { position: absolute; opacity: 0; pointer-events: none; }
.mode {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 3px;
  background: var(--soft); border-radius: 12px;
}
.mode label {
  display: flex; align-items: center; justify-content: center; min-height: 42px; cursor: pointer;
  gap: 8px; font-weight: 700; font-size: 1rem; color: var(--ink); border-radius: 9px; user-select: none;
}
.mode input:checked + label { background: var(--accent); color: var(--on-accent); }
.when { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.when label {
  display: flex; align-items: center; justify-content: center; text-align: center; line-height: 1.15;
  min-height: 44px; padding: 0 4px; cursor: pointer; user-select: none;
  font-weight: 600; font-size: .875rem; color: var(--ink);
  background: var(--soft); border: 2px solid transparent; border-radius: var(--radius);
}
.when input:checked + label { border-color: var(--ink); background: var(--bg); font-weight: 700; }
.mode input:focus-visible + label, .when input:focus-visible + label { outline: 3px solid var(--accent); outline-offset: 2px; }

/* The day needs room for "Donnerstag, 24.09.2026"; the time field has a fixed width. */
.custom-time { display: grid; grid-template-columns: minmax(0, 1fr) 6.25rem; grid-auto-flow: column; grid-template-rows: auto auto; gap: 2px 8px; }
.custom-time select { padding: 0 6px 0 10px; }
@media (max-width: 359px) {
  .custom-time { grid-template-columns: minmax(0, 1fr); grid-auto-flow: row; grid-template-rows: none; }
}
.custom-time label { color: var(--muted); font-size: .9rem; }
.custom-time select, .custom-time input { width: 100%; }

select, input[type="time"], input[type="text"] {
  font: inherit; color: var(--ink); background: var(--bg);
  border: 1px solid var(--field-line); border-radius: var(--radius);
  min-height: 44px; padding: 0 12px;
}
/* The open list is drawn by the system; give it the design's colours so it never mixes a dark list with dark text. */
select option { color: var(--ink); background: var(--bg); }

.where-label { display: block; font-size: .9rem; color: var(--muted); margin-bottom: 4px; }
.where-row { display: flex; gap: 6px; }
.combo { position: relative; flex: 1; min-width: 0; }
.combo input { width: 100%; }
.combo-list {
  position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + 4px);
  margin: 0; padding: 4px 0; list-style: none;
  background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 8px 20px rgba(11, 43, 69, .18);
  max-height: 280px; overflow-y: auto;
}
.combo-list li { padding: 10px 12px; cursor: pointer; min-height: 44px; }
.combo-list li small { display: block; color: var(--muted); }
.combo-list li[aria-selected="true"], .combo-list li:hover { background: var(--soft); }
.gps {
  display: inline-flex; align-items: center; gap: 6px;
  font: inherit; font-weight: 600; min-height: 44px; padding: 0 12px; cursor: pointer; white-space: nowrap;
  background: var(--bg); color: var(--ink); border: 1px solid var(--field-line); border-radius: var(--radius);
}
.where-status { margin: 4px 0 0; min-height: 1.3em; font-size: .9rem; color: var(--muted); }
.where-status button {
  font: inherit; color: var(--accent); background: none; border: 0; padding: 0 0 0 6px; cursor: pointer;
  text-decoration: underline; min-height: 24px;
}

/* ---------- Results ---------- */

.results { --pad-x: var(--gutter); padding: 16px var(--pad-x) 24px; outline: none; }
.results-head { margin-bottom: 4px; }
.when-headline {
  font-family: var(--display); font-weight: 800; font-stretch: 112%;
  font-size: 1.625rem; line-height: 1.1; margin: 0; color: var(--ink); text-wrap: balance;
}
.summary { margin: 2px 0 0; color: var(--muted); min-height: 1.45em; }
.stale { margin: 6px 0 0; color: var(--warn); font-weight: 600; }
/* One-time note about something new: quiet box with its own close button. */
.news {
  display: flex; align-items: flex-start; gap: 4px; margin: 12px 0 0; padding: 10px 0 10px 14px;
  background: var(--soft); border-radius: var(--radius); font-size: .92rem;
}
.news-text { margin: 0; padding-top: 2px; flex: 1; }
.news-text a { color: var(--accent); font-weight: 700; white-space: nowrap; }
.news-close {
  flex-shrink: 0; width: 44px; height: 44px; margin: -10px 0 -10px; display: grid; place-items: center;
  padding: 0; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer;
}
.news-close .ico { width: 18px; height: 18px; }

/* Shared time axis for all lanes: 6:00 to 22:00. */
/* Stays at the top edge while scrolling, so every lane keeps its scale. The shadows extend the ground to the page edges and under the status bar. */
.axis {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 2;
  height: 26px; margin: 8px 0 0; font-size: .75rem; line-height: 26px; color: var(--muted);
  background: var(--bg); border-bottom: 1px solid var(--line);
  box-shadow: calc(-1 * var(--pad-x)) 0 0 var(--bg), var(--pad-x) 0 0 var(--bg), 0 calc(-1 * env(safe-area-inset-top, 0px)) 0 var(--bg);
}
.axis span { position: absolute; transform: translateX(-50%); }
.axis span:nth-child(1) { left: 0; transform: none; }
.axis span:nth-child(2) { left: 25%; }
.axis span:nth-child(3) { left: 50%; }
.axis span:nth-child(4) { left: 75%; }
.axis span:nth-child(5) { left: 100%; transform: translateX(-100%); }

.list { min-height: 50vh; }
.loading { color: var(--muted); padding: 24px 0; }
.error { padding: 16px 0; }
.error button {
  font: inherit; font-weight: 700; min-height: 44px; padding: 0 16px; margin-top: 8px; cursor: pointer;
  background: var(--accent); color: var(--on-accent); border: 0; border-radius: var(--radius);
}

.group-title { font-family: var(--body); font-size: .95rem; font-weight: 700; color: var(--muted); margin: 20px 0 0; }
.group-title:first-child { margin-top: 8px; }
.group-list { list-style: none; margin: 0; padding: 0; }
.venue { position: relative; border-bottom: 1px solid var(--line); }
/* Lines separate baths; after the last one of a group the heading or the footer does that. */
.venue:last-child { border-bottom: 0; }

.venue-btn {
  display: flex; flex-direction: column; gap: 5px; width: 100%; text-align: left; font: inherit; color: inherit;
  background: none; border: 0; padding: 12px 0 14px; cursor: pointer;
}
/* Only with a real pointer: on touch screens :hover sticks to the last tapped row. */
@media (hover: hover) {
  .venue-btn:hover .venue-name { text-decoration: underline; text-underline-offset: 3px; }
}
.venue-btn > span { display: block; }
.venue-btn > .venue-top, .venue-btn > .venue-status, .venue-btn > .venue-when, .venue-btn > .venue-note { display: flex; }
.venue-btn > .tag, .venue-btn > .live { display: inline-flex; align-self: flex-start; }
.venue-top { justify-content: space-between; align-items: baseline; gap: 2px 12px; flex-wrap: wrap; padding-right: 36px; }
/* Star on the name line, right edge; 44 px to tap, the icon itself flush with the content edge. */
.pin-btn {
  position: absolute; top: 2px; right: -12px; width: 44px; height: 44px;
  display: grid; place-items: center; padding: 0; border: 0; border-radius: 8px;
  background: none; color: var(--muted); cursor: pointer;
}
.pin-btn .ico { width: 20px; height: 20px; }
.pin-btn[aria-pressed="true"] { color: var(--accent); }
.pin-btn[aria-pressed="true"] .ico { fill: currentColor; }
@media (hover: hover) { .pin-btn:hover { color: var(--accent); } }
.venue-name { font-weight: 700; font-size: 1.06rem; }
/* Arrow after the name: the row opens the week. Next to the name, so lanes keep the full width of the hour axis. */
.venue-name::after {
  content: ""; display: inline-block; width: .42em; height: .42em; margin-left: .45em; vertical-align: .12em;
  border-right: 2.5px solid var(--accent); border-top: 2.5px solid var(--accent); transform: rotate(45deg);
}
/* Tap feedback: the row lights up, widened to the sides so the text keeps its inset. */
.venue-btn:active { background: var(--soft); box-shadow: -8px 0 0 var(--soft), 8px 0 0 var(--soft); }
.venue-dist { color: var(--muted); font-size: .82rem; white-space: nowrap; }
/* Distance to the chosen place: the second thing people compare after the time. */
.venue-dist.is-km { display: inline-flex; align-items: center; gap: 4px; color: var(--ink); font-size: .95rem; font-weight: 700; }
.venue-dist.is-km .ico { color: var(--accent); }
.venue-status { align-items: baseline; gap: 8px; }
.status-pre { font-size: .875rem; font-weight: 600; color: var(--muted); }
.is-closed .status-pre, .is-late .status-pre { font-size: 1rem; color: var(--ink); }
.is-late .status-pre { color: var(--warn); }
.time-tile {
  font-family: var(--display); font-weight: 800; font-stretch: 125%;
  font-size: 1.5rem; line-height: 1; color: var(--accent);
}
.venue-sub { color: var(--muted); font-size: .875rem; }
.venue-when { flex-wrap: wrap; align-items: baseline; column-gap: 10px; row-gap: 2px; }
/* Inline text (not flex), so the row aligns on the text baseline; the icon's ink starts flush with the text above. */
.venue-btn > .venue-when > .venue-remaining { display: block; color: var(--ink); font-size: .9rem; font-weight: 700; }
.venue-remaining .ico { color: var(--accent); vertical-align: -.2em; margin: 0 5px 0 -.31em; }
.tag, .live { font-size: .8rem; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--soft); }
.live { align-items: center; gap: 5px; }
.tag { color: var(--accent); }
.live.cat-1 { color: var(--ok); }
.live.cat-2, .live.cat-3 { color: var(--warn); }
.venue-note { align-items: flex-start; gap: 6px; font-size: .875rem; color: var(--warn); }
.venue-note .ico { margin-top: .1em; }

/* The day as a lane: opening windows filled, chosen time as the red marker, notches at 10, 14 and 18. */
.lane { position: relative; height: 6px; margin-top: 6px; border-radius: 3px; background: var(--track); }
.lane::before {
  content: ""; position: absolute; left: 0; right: 0; top: -3px; bottom: -3px;
  background: linear-gradient(90deg, transparent calc(25% - 1px), var(--tick) calc(25% - 1px) 25%, transparent 25% calc(50% - 1px),
    var(--tick) calc(50% - 1px) 50%, transparent 50% calc(75% - 1px), var(--tick) calc(75% - 1px) 75%, transparent 75%);
}
.lane-seg { position: absolute; top: 0; bottom: 0; border-radius: 3px; background: var(--seg); }
.lane-seg.is-restricted { background: var(--seg-dim); }
/* Ring in the ground colour: the marker stays visible on top of a filled segment. */
.lane-mark { position: absolute; top: -4px; bottom: -4px; width: 3px; margin-left: -1px; background: var(--mark); border-radius: 2px; box-shadow: 0 0 0 2px var(--bg); }

/* ---------- Detail dialog ---------- */

.detail {
  width: min(640px, 100vw); max-width: 100vw; max-height: 100dvh; margin: auto;
  padding: 0; border: 0; border-radius: 12px; background: var(--bg); color: var(--ink);
}
.detail::backdrop { background: rgba(8, 30, 44, .55); }
.detail-inner { padding: 16px 18px 24px; position: relative; }
.detail-close {
  float: right; font: inherit; font-weight: 700; min-height: 44px; padding: 0 12px; margin: -6px -6px 8px 12px; cursor: pointer;
  background: var(--soft); color: var(--ink); border: 0; border-radius: var(--radius);
}
.detail h2 { font-family: var(--display); font-weight: 800; font-stretch: 112%; font-size: 1.5rem; line-height: 1.15; margin: 0 0 4px; color: var(--accent); }
.detail h3 { font-size: 1.02rem; margin: 18px 0 6px; }
.detail .meta { margin: 0; color: var(--muted); }
.detail .links { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 10px 0 0; }
.detail a { color: var(--accent); font-weight: 700; }
.detail .links a { display: inline-flex; align-items: center; gap: 6px; min-height: 24px; }
.week { width: 100%; border-collapse: collapse; font-size: .95rem; margin-bottom: 12px; }
/* The sync stamp is a footnote to the whole dialog, not part of the notes under the table. */
.detail .meta.synced { margin-top: 16px; }
.week th, .week td { text-align: left; padding: 7px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.week th { font-weight: 700; white-space: nowrap; width: 8.5em; padding-left: 12px; }
.week tr.is-chosen th, .week tr.is-chosen td { background: var(--soft); font-weight: 700; }
.week tr.is-chosen th { box-shadow: inset 4px 0 0 var(--accent); }
.week .muted { color: var(--muted); }
.notice { margin: 6px 0; padding: 8px 10px; border-left: 4px solid var(--warn); background: var(--soft); }

@media (max-width: 640px) {
  .detail { width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .detail-inner { padding-top: calc(env(safe-area-inset-top, 0px) + 12px); }
}

/* Moving notice on the old preview address: small centred box, not full screen. */
.moved {
  width: min(440px, calc(100vw - 32px)); margin: auto; padding: 18px 18px 20px; position: relative;
  border: 0; border-radius: 12px; background: var(--bg); color: var(--ink);
}
.moved::backdrop { background: rgba(8, 30, 44, .55); }
.moved h2 { font-family: var(--display); font-weight: 800; font-stretch: 112%; font-size: 1.35rem; line-height: 1.2; margin: 0 40px 10px 0; color: var(--accent); }
.moved p { margin: 0 0 10px; }
.moved-close { position: absolute; top: 8px; right: 8px; margin: 0; }
.moved-go {
  display: inline-flex; align-items: center; min-height: 44px; margin-top: 6px; padding: 0 16px;
  background: var(--accent); color: var(--bg); font-weight: 700; text-decoration: none; border-radius: var(--radius);
}

/* ---------- Footer ---------- */

.foot {
  padding: 16px var(--gutter) calc(env(safe-area-inset-bottom, 0px) + 20px);
  background: var(--soft); color: var(--muted); font-size: .85rem;
}
.foot p { margin: 2px 0; max-width: 70ch; }
.legal-links { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 8px; }
.legal-links a { color: var(--ink); min-height: 24px; display: inline-flex; align-items: center; }
.foot-version a { color: var(--ink); margin-left: 12px; white-space: nowrap; }

/* ---------- Legal pages ---------- */

/* Footer at the bottom of the screen, also on short pages. */
body.legal-page { display: flex; flex-direction: column; }
body.legal-page .legal { flex: 1 0 auto; }
/* Same head as the app, with a lower picture so the text starts early. */
body.legal-page { --hero-h: 120px; }
@media (min-width: 960px) { body.legal-page { --hero-h: 180px; } }
.sub-top { border-bottom: 1px solid var(--line); }
a.brand { display: block; text-decoration: none; }
.legal { max-width: 70ch; padding: 20px var(--gutter) 48px; outline: none; }
.legal h1 { font-family: var(--display); font-weight: 800; font-stretch: 112%; font-size: 1.8rem; margin: 0 0 12px; color: var(--accent); }
.legal h2 { font-size: 1.1rem; margin: 24px 0 6px; }
.legal a { color: var(--accent); }

/* Short phone screens (browser bars take space): a lower picture keeps the first result on the first screen. */
@media (max-width: 959px) and (max-height: 760px) {
  :root { --hero-h: 120px; }
}

/* ---------- Wide screens: head column left, list right ---------- */

@media (min-width: 960px) {
  :root { --hero-h: 240px; --brand-size: 1.75rem; }
  body { grid-template-columns: minmax(340px, 420px) minmax(0, 1fr); grid-template-rows: 1fr auto; }
  .top {
    grid-column: 1; grid-row: 1 / span 2; position: sticky; top: 0; align-self: start; min-height: 100vh;
    border-bottom: 0; border-right: 1px solid var(--line);
  }
  .results { --pad-x: 32px; grid-column: 2; grid-row: 1; padding: 24px var(--pad-x); max-width: 980px; }
  .foot { grid-column: 2; grid-row: 2; }
  .when-headline { font-size: 1.9rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .lane-mark { transition: left .2s ease; }
  .detail[open] { animation: rise .18s ease-out; }
  /* Only movement, no fade: text in the dialog keeps full contrast at every moment. */
  @keyframes rise { from { transform: translateY(12px); } to { transform: none; } }
}
