:root {
  --bg: #fff8ee;
  --surface: #ffffff;
  --text: #2b1d16;
  --muted: #7a6a60;
  --accent: #b3261e;
  --accent-text: #ffffff;
  --banner: #fde7c8;
  --border: #ead9c6;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1512;
    --surface: #271e1a;
    --text: #f4e9e1;
    --muted: #b8a89c;
    --accent: #ffb4a2;
    --accent-text: #2b1d16;
    --banner: #4a3424;
    --border: #3d302a;
  }
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
#app { max-width: 640px; margin: 0 auto; padding: 0 16px 48px; }
.top { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; }
.brand { font-weight: 700; color: var(--accent); text-decoration: none; font-size: 1.25rem; }
h1 { font-size: 2.5rem; margin: 24px 0 4px; color: var(--accent); }
h2 { font-size: 1.1rem; margin: 0 0 8px; }
h3 { font-size: 1rem; margin: 0; }
.tagline { font-size: 1.2rem; margin: 0 0 16px; }
.description { padding-left: 20px; margin: 0 0 24px; }
.landing .button { display: block; margin-bottom: 12px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 16px; margin: 16px 0; }
.banner { background: var(--banner); border-radius: 12px; padding: 12px; margin: 12px 0; }
.summary, .profile { font-weight: 600; }
.start { font-size: 1.5rem; font-weight: 700; margin: 16px 0 8px; }
.row { display: flex; justify-content: space-between; gap: 12px; }
small { color: var(--muted); display: block; }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; font-weight: 600; }
input, select { font: inherit; padding: 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); color: var(--text); width: 100%; }
details { margin-bottom: 12px; }
.hint { margin-top: -8px; color: var(--muted); font-size: 0.9rem; }
.hint summary { cursor: pointer; width: fit-content; }
.button { display: inline-block; text-align: center; font: inherit; font-weight: 600; padding: 12px 20px; border-radius: 999px; border: 1px solid var(--accent); color: var(--accent); background: transparent; text-decoration: none; cursor: pointer; width: 100%; margin-top: 8px; }
.button.primary { background: var(--accent); color: var(--accent-text); }
.link { background: none; border: 0; color: var(--accent); font: inherit; cursor: pointer; text-decoration: underline; padding: 8px 0; }
.toggle { display: flex; border: 1px solid var(--accent); border-radius: 999px; overflow: hidden; }
.toggle button { flex: 1; font: inherit; padding: 10px; border: 0; background: transparent; color: var(--accent); cursor: pointer; }
.toggle button.selected { background: var(--accent); color: var(--accent-text); }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.timeline li.wait { color: var(--muted); }
.timeline .when { font-variant-numeric: tabular-nums; font-weight: 700; width: 4.5rem; flex: none; white-space: nowrap; text-align: center; }
.timeline .when.range { background: linear-gradient(var(--muted), var(--muted)) 50% 0 / 2px 100% no-repeat; }
.timeline .what { flex: 1; min-width: 0; }
.timeline p { margin: 4px 0 0; }
.video { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 12px; margin-top: 8px; }
footer { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 24px; }
.chart-body { display: flex; gap: 8px; height: 120px; }
.chart-axis { display: flex; flex-direction: column; justify-content: space-between; }
.chart-plot { flex: 1; min-width: 0; height: 100%; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.chart-line { fill: none; stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.chart-times { display: flex; justify-content: space-between; margin-top: 4px; }
