:root {
  --bg: #f4f7fa; --fg: #14202b; --muted: #5b6b7a; --card: #ffffff; --line: #d8e0e8;
  --accent: #0b3a5b; --clear: #2e7d4f; --light: #7aa7c7; --scraped: #2f6fa3; --heavy: #1b3f73; --snow: #6c5ba8;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0e151c; --fg: #e3eaf0; --muted: #93a3b2; --card: #17212b; --line: #2a3742; --accent: #8cc4ec; }
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 16px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  padding: env(safe-area-inset-top) 16px env(safe-area-inset-bottom);
}
main { max-width: 32rem; margin: 0 auto; padding: 16px 0 32px; }
header { display: flex; justify-content: space-between; align-items: baseline; }
h1 { font-size: 1.5rem; margin: 0 0 16px; }
h2 { font-size: 1.05rem; margin: 0 0 12px; }
section { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 16px; }
button { font: inherit; cursor: pointer; }
button:disabled { opacity: .6; }
button.primary { width: 100%; padding: 14px; border: 0; border-radius: 10px; background: var(--accent); color: var(--bg); font-weight: 600; }
button.link { background: none; border: 0; color: var(--muted); padding: 0; }
.labels { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.labels .label { padding: 14px 8px; border-radius: 10px; border: 2px solid var(--line); background: var(--bg); color: var(--fg); font-weight: 600; }
.labels .label:last-child { grid-column: span 2; }
.label.chosen { color: #fff; border-color: transparent; }
.label.chosen.clear, .tag.clear { background: var(--clear); }
.label.chosen.light-frost, .tag.light-frost { background: var(--light); color: #0e151c; }
.label.chosen.scraped, .tag.scraped { background: var(--scraped); }
.label.chosen.heavy-ice, .tag.heavy-ice { background: var(--heavy); }
.label.chosen.snow, .tag.snow { background: var(--snow); }
.tag { color: #fff; border-radius: 6px; padding: 1px 6px; font-size: .85rem; white-space: nowrap; }
input { width: 100%; font: inherit; padding: 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); margin-bottom: 12px; }
label { display: block; margin-bottom: 4px; color: var(--muted); }
.forecast { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin: 0; }
.forecast dt { color: var(--muted); }
.forecast dd { margin: 0; font-variant-numeric: tabular-nums; }
.history { width: 100%; border-collapse: collapse; font-size: .9rem; font-variant-numeric: tabular-nums; }
.history th, .history td { text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.history th { color: var(--muted); font-weight: 500; }
a { color: var(--accent); }
.hint, small { color: var(--muted); font-size: .8rem; }
.message { color: #c0392b; min-height: 1.4em; }
.message.ok { color: var(--clear); }
.verdict { font-size: 1.15rem; font-weight: 700; margin: 0 0 4px; }
.verdict.likely, .verdict.snow, .rule.likely, .rule.snow { color: #c0392b; }
.verdict.possible, .rule.possible { color: #c77c02; }
.verdict.unlikely, .rule.unlikely { color: var(--clear); }
.rule { font-weight: 600; font-size: .85rem; }
#push .link { display: block; margin: 12px auto 0; }
