/* styles.css — base layout + 3 aesthetic themes */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }
body {
  font-family: var(--font-body);
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background 0.4s, color 0.3s;
}
button { font-family: inherit; cursor: pointer; }
input { font-family: inherit; }

/* ─── BASE TOKENS (overridden by themes) ─────────────────────────────────── */
:root {
  --font-body: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, "Hiragino Sans", "Yu Gothic UI", "Noto Sans CJK SC", "PingFang SC", sans-serif;
  --font-display: var(--font-body);
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  --bg: #0a0a0c;
  --bg-elev: #14141a;
  --bg-elev-2: #1c1c24;
  --fg: #f0eee6;
  --fg-mute: rgba(240, 238, 230, 0.55);
  --fg-faint: rgba(240, 238, 230, 0.28);
  --line: rgba(255, 255, 255, 0.08);
  --accent: #ff6a00;
  --accent-soft: rgba(255, 106, 0, 0.18);
  --good: #6ee07a;
  --warn: #ffb84a;
  --bad: #ff5b6b;

  /* Gauge */
  --gauge-face-c: #1a1a22;
  --gauge-face-e: #0a0a10;
  --gauge-rim: rgba(255, 255, 255, 0.18);
  --gauge-rim-inner: rgba(255, 255, 255, 0.04);
  --gauge-tick: rgba(255, 255, 255, 0.45);
  --gauge-track: rgba(255, 255, 255, 0.08);
  --gauge-needle: #ff6a00;
  --gauge-hub: #0a0a10;
  --gauge-score: #f0eee6;
  --gauge-sub: rgba(240, 238, 230, 0.5);
  --gauge-num: rgba(240, 238, 230, 0.7);
  --gauge-danger: #ff5b6b;
  --gauge-warn: #ffb84a;
}

/* ─── THEME: TRACK (dark racing) ──────────────────────────────────────────── */
[data-aesthetic="track"][data-theme="dark"] {
  --font-body: "Inter", -apple-system, "Helvetica Neue", "Hiragino Sans", "Yu Gothic UI", sans-serif;
  --font-display: "Barlow Condensed", "Helvetica Neue", Impact, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --bg: #08080b;
  --bg-elev: #12121a;
  --bg-elev-2: #1a1a26;
  --fg: #f4f1e8;
  --fg-mute: rgba(244, 241, 232, 0.6);
  --fg-faint: rgba(244, 241, 232, 0.28);
  --line: rgba(255, 255, 255, 0.07);
  --accent: #ff5500;
  --accent-soft: rgba(255, 85, 0, 0.18);
  --good: #c8ff3d;
  --warn: #ffae3a;
  --bad: #ff3355;
  --gauge-face-c: #1a1a24;
  --gauge-face-e: #050508;
  --gauge-rim: rgba(255, 255, 255, 0.2);
  --gauge-tick: rgba(244, 241, 232, 0.55);
  --gauge-needle: #ff5500;
  --gauge-hub: #050508;
  --gauge-score: #ffffff;
  --radius: 4px;
  --radius-lg: 6px;
}
[data-aesthetic="track"][data-theme="light"] {
  --font-body: "Inter", -apple-system, sans-serif;
  --font-display: "Barlow Condensed", Impact, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --bg: #ebe7e0;
  --bg-elev: #f4f1eb;
  --bg-elev-2: #ffffff;
  --fg: #14141a;
  --fg-mute: rgba(20, 20, 26, 0.55);
  --fg-faint: rgba(20, 20, 26, 0.28);
  --line: rgba(0, 0, 0, 0.08);
  --accent: #d94400;
  --accent-soft: rgba(217, 68, 0, 0.12);
  --good: #5a8e1a;
  --warn: #c97600;
  --bad: #c8253a;
  --gauge-face-c: #ffffff;
  --gauge-face-e: #e8e3d8;
  --gauge-rim: rgba(0, 0, 0, 0.15);
  --gauge-tick: rgba(20, 20, 26, 0.55);
  --gauge-track: rgba(0, 0, 0, 0.1);
  --gauge-needle: #d94400;
  --gauge-hub: #14141a;
  --gauge-score: #14141a;
  --gauge-sub: rgba(20, 20, 26, 0.5);
  --gauge-num: rgba(20, 20, 26, 0.7);
  --radius: 4px;
  --radius-lg: 6px;
}

/* ─── THEME: TOURING (warm cream magazine) ───────────────────────────────── */
[data-aesthetic="touring"][data-theme="light"] {
  --font-body: "Newsreader", Georgia, "Hiragino Mincho ProN", "Yu Mincho", serif;
  --font-display: "Newsreader", Georgia, serif;
  --font-mono: "iA Writer Mono", "JetBrains Mono", ui-monospace, monospace;
  --bg: #f1ebde;
  --bg-elev: #faf5e9;
  --bg-elev-2: #ffffff;
  --fg: #2a2519;
  --fg-mute: rgba(42, 37, 25, 0.6);
  --fg-faint: rgba(42, 37, 25, 0.32);
  --line: rgba(42, 37, 25, 0.12);
  --accent: #1a3a5c;
  --accent-soft: rgba(26, 58, 92, 0.1);
  --good: #4a7a3a;
  --warn: #b88030;
  --bad: #a8302a;
  --gauge-face-c: #ffffff;
  --gauge-face-e: #ebe2cc;
  --gauge-rim: rgba(42, 37, 25, 0.18);
  --gauge-rim-inner: rgba(42, 37, 25, 0.06);
  --gauge-tick: rgba(42, 37, 25, 0.55);
  --gauge-track: rgba(42, 37, 25, 0.1);
  --gauge-needle: #1a3a5c;
  --gauge-hub: #2a2519;
  --gauge-score: #2a2519;
  --gauge-sub: rgba(42, 37, 25, 0.5);
  --gauge-num: rgba(42, 37, 25, 0.65);
  --gauge-danger: #a8302a;
  --gauge-warn: #b88030;
  --radius: 10px;
  --radius-lg: 18px;
}
[data-aesthetic="touring"][data-theme="dark"] {
  --font-body: "Newsreader", Georgia, "Hiragino Mincho ProN", serif;
  --font-display: "Newsreader", Georgia, serif;
  --font-mono: "iA Writer Mono", "JetBrains Mono", ui-monospace, monospace;
  --bg: #1c1812;
  --bg-elev: #251e15;
  --bg-elev-2: #2e2619;
  --fg: #f1ebde;
  --fg-mute: rgba(241, 235, 222, 0.6);
  --fg-faint: rgba(241, 235, 222, 0.3);
  --line: rgba(241, 235, 222, 0.1);
  --accent: #d4a559;
  --accent-soft: rgba(212, 165, 89, 0.16);
  --good: #b9d4a6;
  --warn: #e6b66a;
  --bad: #db7e7e;
  --gauge-face-c: #2a2218;
  --gauge-face-e: #15110b;
  --gauge-tick: rgba(241, 235, 222, 0.55);
  --gauge-needle: #d4a559;
  --gauge-hub: #15110b;
  --gauge-score: #f1ebde;
  --radius: 10px;
  --radius-lg: 18px;
}

/* ─── THEME: HUD (geometric tech) ────────────────────────────────────────── */
[data-aesthetic="hud"][data-theme="light"] {
  --font-body: "IBM Plex Sans", "Hiragino Sans", "Yu Gothic UI", sans-serif;
  --font-display: "IBM Plex Sans", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --bg: #f0f3f1;
  --bg-elev: #ffffff;
  --bg-elev-2: #f7faf9;
  --fg: #0a1418;
  --fg-mute: rgba(10, 20, 24, 0.6);
  --fg-faint: rgba(10, 20, 24, 0.3);
  --line: rgba(10, 20, 24, 0.1);
  --accent: #0aa676;
  --accent-soft: rgba(10, 166, 118, 0.12);
  --good: #0aa676;
  --warn: #d4892c;
  --bad: #d23c52;
  --gauge-face-c: #ffffff;
  --gauge-face-e: #e8eee9;
  --gauge-rim: rgba(10, 20, 24, 0.14);
  --gauge-tick: rgba(10, 20, 24, 0.55);
  --gauge-track: rgba(10, 20, 24, 0.08);
  --gauge-needle: #0aa676;
  --gauge-hub: #0a1418;
  --gauge-score: #0a1418;
  --gauge-sub: rgba(10, 20, 24, 0.55);
  --gauge-num: rgba(10, 20, 24, 0.7);
  --radius: 2px;
  --radius-lg: 4px;
}
[data-aesthetic="hud"][data-theme="dark"] {
  --font-body: "IBM Plex Sans", sans-serif;
  --font-display: "IBM Plex Sans", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --bg: #050a0c;
  --bg-elev: #0c1418;
  --bg-elev-2: #142024;
  --fg: #e0f0ec;
  --fg-mute: rgba(224, 240, 236, 0.55);
  --fg-faint: rgba(224, 240, 236, 0.28);
  --line: rgba(0, 230, 200, 0.12);
  --accent: #2eeec0;
  --accent-soft: rgba(46, 238, 192, 0.15);
  --good: #2eeec0;
  --warn: #ffd24d;
  --bad: #ff5b85;
  --gauge-face-c: #0a1418;
  --gauge-face-e: #040608;
  --gauge-rim: rgba(46, 238, 192, 0.3);
  --gauge-rim-inner: rgba(46, 238, 192, 0.08);
  --gauge-tick: rgba(224, 240, 236, 0.45);
  --gauge-needle: #2eeec0;
  --gauge-hub: #04080a;
  --gauge-score: #e0f0ec;
  --radius: 2px;
  --radius-lg: 4px;
}

/* ─── LAYOUT ──────────────────────────────────────────────────────────────── */
.app {
  min-height: 100vh;
  padding: clamp(16px, 3vw, 32px);
  max-width: 1280px;
  margin: 0 auto;
  position: relative;
}
.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  row-gap: 12px;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.brand-title {
  font-family: var(--font-display);
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 700;
  letter-spacing: 0.02em;
  margin: 0;
  text-transform: uppercase;
}
[data-aesthetic="touring"] .brand-title {
  text-transform: none;
  font-style: italic;
  letter-spacing: -0.01em;
}
.brand-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-mute);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
[data-aesthetic="touring"] .brand-sub {
  font-family: var(--font-mono);
  text-transform: uppercase;
  font-style: normal;
}

.loc-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg);
  letter-spacing: 0.04em;
}
.loc-chip button {
  background: transparent;
  border: 0;
  color: var(--fg-mute);
  padding: 0;
  font-family: inherit;
  font-size: 11px;
  text-decoration: underline;
}
.loc-chip button:hover { color: var(--accent); }

.lang-switch {
  display: inline-flex;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 3px;
}
.lang-switch button {
  background: transparent;
  border: 0;
  padding: 6px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--fg-mute);
  border-radius: calc(var(--radius-lg) - 3px);
  text-transform: uppercase;
}
.lang-switch button.active {
  background: var(--accent);
  color: #fff;
}
[data-aesthetic="touring"] .lang-switch button.active { color: #fff; }

.topbar-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  color: var(--fg-mute);
  padding: 0;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }

/* score panel layout */
.score-stack { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 880px) { .score-stack { gap: 28px; } }

.score-panel {
  position: relative;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 3vw, 32px);
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 760px) {
  .score-panel { grid-template-columns: auto 1fr; gap: 36px; }
}
.score-panel .label-block { display: flex; flex-direction: column; gap: 6px; }
.score-panel .period {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-mute);
}
.score-panel .verdict {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}
[data-aesthetic="touring"] .score-panel .verdict {
  font-style: italic;
  font-weight: 500;
}
.score-panel .state-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  width: fit-content;
  border: 1px solid var(--accent);
}
.score-panel .sun-time {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-mute);
  letter-spacing: 0.06em;
}

/* factor bars */
.factors {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
  margin-top: 8px;
}
@media (min-width: 600px) {
  .factors { grid-template-columns: repeat(2, 1fr); }
}
.factor-row {
  display: grid;
  grid-template-columns: 80px 1fr 56px;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
}
.factor-row .f-label { color: var(--fg-mute); text-transform: uppercase; font-size: 10px; }
.factor-row .f-value { text-align: right; color: var(--fg); font-size: 11px; tabular-nums: tabular-nums; }
.factor-bar {
  position: relative;
  height: 6px;
  background: var(--line);
  border-radius: 0;
  overflow: hidden;
}
[data-aesthetic="touring"] .factor-bar { border-radius: 6px; }
[data-aesthetic="hud"] .factor-bar { background: var(--bg-elev-2); }
.factor-bar > span {
  position: absolute;
  inset: 0;
  width: var(--w);
  background: var(--c, var(--accent));
  transition: width 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* Cards (clothing / tips / forecast) */
.section { margin-top: 28px; }
.section-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-mute);
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 1px;
  background: var(--fg-mute);
}
[data-aesthetic="touring"] .section-title {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 18px;
  text-transform: none;
  letter-spacing: -0.01em;
  color: var(--fg);
}
[data-aesthetic="touring"] .section-title::before { display: none; }

.gear-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}
.gear-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.gear-card .gear-kind {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-mute);
}
.gear-card .gear-name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}
[data-aesthetic="touring"] .gear-card .gear-name { font-weight: 500; font-size: 17px; }
.gear-card .gear-icon {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft);
  border-radius: var(--radius);
  color: var(--accent);
}

.tip-list { display: flex; flex-direction: column; gap: 8px; }
.tip {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  font-size: 13px;
  line-height: 1.5;
}
.tip-dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 6px;
}
.tip-dot.warn { background: var(--warn); }
.tip-dot.bad { background: var(--bad); }
.tip-dot.good { background: var(--good); }

/* 7-day forecast */
.forecast-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
}
.fc-day {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition: transform 0.12s, border-color 0.15s, background 0.15s;
}
.fc-day:hover { border-color: var(--fg-mute); }
.fc-day:active { transform: translateY(1px); }
.fc-day.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent) inset;
  background: var(--accent-soft);
}
.fc-day .fc-date {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg-mute);
  display: flex;
  justify-content: space-between;
}
.fc-day .fc-score {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
[data-aesthetic="touring"] .fc-day .fc-score { font-style: italic; }
.fc-day .fc-temp {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-mute);
}
.fc-day .fc-rain {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--fg-mute);
  display: flex; align-items: center; gap: 4px;
}
.fc-day.today {
  border-color: var(--accent);
}
.fc-day.today::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent);
}
.fc-score-bar {
  height: 3px;
  background: var(--line);
  border-radius: 0;
  overflow: hidden;
  position: relative;
  margin-top: auto;
}
.fc-score-bar > span {
  position: absolute; inset: 0;
  width: var(--w);
  background: var(--c, var(--accent));
}

/* hourly chart */
.chart-wrap {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px;
  overflow-x: auto;
}
.chart-wrap svg { display: block; min-width: 600px; }
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-mute);
  letter-spacing: 0.04em;
}
.chart-legend .lg-item { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend .lg-swatch {
  width: 18px;
  height: 3px;
  border-radius: 2px;
  display: inline-block;
}
.chart-legend .lg-swatch.lg-temp { background: var(--accent); }
.chart-legend .lg-swatch.lg-wind {
  background: repeating-linear-gradient(90deg, var(--good) 0 4px, transparent 4px 7px);
  height: 2px;
}
.chart-legend .lg-swatch.lg-pop { background: var(--accent); opacity: 0.35; height: 8px; }

/* Welcome modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: color-mix(in oklab, var(--bg) 70%, transparent);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}
.modal {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 40px);
  max-width: 520px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
}
.modal h2 {
  font-family: var(--font-display);
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 700;
  margin: 0;
  line-height: 1.1;
  letter-spacing: -0.01em;
}
[data-aesthetic="touring"] .modal h2 { font-style: italic; font-weight: 500; }
.modal p { color: var(--fg-mute); margin: 0; line-height: 1.5; font-size: 14px; }
.modal-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.btn-primary {
  background: var(--accent);
  color: #fff;
  border: 0;
  padding: 14px 18px;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.15s, filter 0.15s;
}
.btn-primary:hover { filter: brightness(1.1); }
.btn-primary:active { transform: translateY(1px); }
.btn-secondary {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--line);
  padding: 14px 18px;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
[data-aesthetic="touring"] .btn-primary, [data-aesthetic="touring"] .btn-secondary {
  text-transform: none;
  font-style: italic;
  letter-spacing: 0;
}

.search-input {
  width: 100%;
  background: var(--bg-elev-2);
  border: 1px solid var(--line);
  color: var(--fg);
  padding: 12px 14px;
  font-size: 14px;
  border-radius: var(--radius);
  font-family: inherit;
  outline: none;
}
.search-input:focus { border-color: var(--accent); }

.search-results {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 240px;
  overflow-y: auto;
}
.search-results li {
  padding: 10px 12px;
  background: var(--bg-elev-2);
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 13px;
  cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
}
.search-results li:hover { border-color: var(--accent); }
.search-results li .sub { color: var(--fg-mute); font-size: 11px; font-family: var(--font-mono); }

.popular { display: flex; flex-wrap: wrap; gap: 6px; }
.popular button {
  background: var(--bg-elev-2);
  border: 1px solid var(--line);
  color: var(--fg);
  padding: 6px 12px;
  border-radius: var(--radius);
  font-size: 12px;
}
.popular button:hover { border-color: var(--accent); color: var(--accent); }

/* Status info row */
.meta-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding: 12px;
  background: var(--bg-elev-2);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-mute);
  letter-spacing: 0.04em;
}
.meta-row span strong { color: var(--fg); font-weight: 500; }

.footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-faint);
  text-align: center;
}

/* Loading skeleton */
.skeleton {
  background: linear-gradient(90deg, var(--bg-elev) 0%, var(--bg-elev-2) 50%, var(--bg-elev) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.6s linear infinite;
  border-radius: var(--radius);
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Race-stripe deco removed per feedback */

/* Mobile: center score panel content */
@media (max-width: 759px) {
  .app { padding: 16px 14px 24px; }
  .topbar { justify-content: center; text-align: center; }
  .brand { width: 100%; justify-content: center; flex-wrap: wrap; }
  .score-panel {
    justify-items: center;
    text-align: center;
    padding: 22px 18px;
  }
  .score-panel .label-block {
    align-items: center;
    width: 100%;
  }
  .score-panel .verdict { text-wrap: balance; }
  .score-panel .factors {
    grid-template-columns: 1fr;
    width: 100%;
  }
  .factor-row { grid-template-columns: 72px 1fr 72px; }
  .meta-row { justify-content: center; }
  .section-title { justify-content: center; }
  [data-aesthetic="touring"] .section-title { text-align: center; }
  .footer { padding: 24px 0; }
}

/* Subtle paper texture for Touring */
[data-aesthetic="touring"] .app {
  background-image:
    radial-gradient(circle at 20% 30%, rgba(212,165,89,0.04) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(26,58,92,0.03) 0%, transparent 50%);
}

/* HUD grid background */
[data-aesthetic="hud"] body {
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 60px 60px;
  background-attachment: fixed;
}

/* Loading / error states */
.center-msg {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 60vh;
  text-align: center;
}
.spinner {
  width: 32px;
  height: 32px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.icon {
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: -0.15em;
}

/* Sun/moon strip */
.day-arc {
  position: relative;
  height: 64px;
  background: var(--bg-elev-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 10px 14px;
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-mute);
  display: flex;
  align-items: center;
  justify-content: space-between;
  letter-spacing: 0.06em;
}
.day-arc-vis {
  flex: 1;
  height: 32px;
  margin: 0 12px;
  background: linear-gradient(90deg,
    var(--bg-elev-2) 0%,
    var(--accent-soft) 25%,
    var(--accent-soft) 75%,
    var(--bg-elev-2) 100%);
  position: relative;
  border-radius: 2px;
}
.day-arc-marker {
  position: absolute;
  top: -4px;
  width: 2px;
  height: 40px;
  background: var(--accent);
  left: var(--p);
  box-shadow: 0 0 8px var(--accent);
}
.day-arc-marker::after {
  content: "•";
  position: absolute;
  top: -10px;
  left: -3px;
  color: var(--accent);
}
