/* ------------------------------------------------------------------ tokens */
:root {
  --bg: #0a0a0a;
  --bg-2: #111110;
  --surface: #151514;
  --line: rgba(242, 240, 235, .09);
  --line-2: rgba(242, 240, 235, .16);
  --ink: #f2f0eb;
  --ink-2: #c9c6bf;
  --muted: #8c8a85;
  --faint: #55544f;
  --go: #a9d8b8;
  --marginal: #e8c47a;
  --hold: #e2806a;
  --na: #26251f;
  --accent: #e9a77b;
  --sans: "Geist", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --pad: 20px;
  --tabbar: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 15px;
  line-height: 1.5; font-weight: 400; letter-spacing: -.005em; -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--tabbar) + var(--safe-b) + 24px);
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent); color: #000; }

/* ------------------------------------------------------------------ type */
.label {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted); font-weight: 400;
}
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.ink2 { color: var(--ink-2); }
.small { font-size: 13px; }
.tiny { font-size: 11.5px; }
h1, h2, h3 { font-weight: 400; letter-spacing: -.02em; margin: 0; }
.display { font-size: clamp(34px, 9vw, 52px); line-height: 1.02; letter-spacing: -.035em; font-weight: 300; }
.title { font-size: 24px; line-height: 1.15; letter-spacing: -.025em; font-weight: 400; }
.numeral { font-family: var(--mono); font-weight: 200; letter-spacing: -.06em; line-height: .9; }
.lead { font-size: 17px; line-height: 1.45; color: var(--ink-2); font-weight: 300; }

/* ------------------------------------------------------------------ layout */
.wrap { max-width: 640px; margin: 0 auto; padding: 0 var(--pad); }
.top {
  position: sticky; top: 0; z-index: 20; padding-top: var(--safe-t);
  background: linear-gradient(var(--bg) 70%, rgba(10,10,10,0));
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.top .back { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); }
.top .icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); }
section { padding: 28px 0; border-top: 1px solid var(--line); }
section.flush { border-top: 0; padding-top: 4px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.row { display: flex; align-items: center; gap: 12px; }
.between { justify-content: space-between; }
.stack > * + * { margin-top: 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.grid2 > * { background: var(--bg); padding: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.grid3 > * { background: var(--bg); padding: 14px; }
.kv .label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kv .v { font-size: 19px; letter-spacing: -.02em; margin-top: 4px; }
.kv .v small { font-size: 12px; color: var(--muted); letter-spacing: 0; }

/* ------------------------------------------------------------------ tab bar */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  padding-bottom: var(--safe-b); background: rgba(10, 10, 10, .82);
  backdrop-filter: saturate(140%) blur(20px); -webkit-backdrop-filter: saturate(140%) blur(20px);
  border-top: 1px solid var(--line);
}
.tabbar .in { max-width: 640px; margin: 0 auto; height: var(--tabbar); display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: center; }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--faint); font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; }
.tabbar a.on { color: var(--ink); }
.tabbar a svg { width: 22px; height: 22px; }
.tabbar .plus { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; color: var(--ink); background: var(--surface); }
.tabbar a.on .plus { border-color: var(--accent); color: var(--accent); }

/* ------------------------------------------------------------------ hero */
.hero { position: relative; padding: 8px 0 28px; }
.hero .glow {
  position: absolute; inset: -40px -40px auto -40px; height: 380px; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 55% at 70% 30%, var(--hero-c, rgba(169,216,184,.18)), transparent 70%);
  filter: blur(10px);
}
.hero.go { --hero-c: rgba(169, 216, 184, .20); }
.hero.marginal { --hero-c: rgba(232, 196, 122, .20); }
.hero.hold { --hero-c: rgba(226, 128, 106, .22); }
.score-wrap { display: flex; align-items: center; gap: 22px; margin: 18px 0 8px; }
.ring { position: relative; width: 148px; height: 148px; flex: none; }
.ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.ring .track { stroke: var(--line-2); }
.ring .val { stroke: var(--c, var(--go)); stroke-linecap: round; transition: stroke-dashoffset .9s cubic-bezier(.2,.7,.2,1); }
.ring .dots { stroke: var(--line); stroke-dasharray: 1 5; }
.ring .num { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring .num b { font-family: var(--mono); font-weight: 200; font-size: 58px; letter-spacing: -.07em; line-height: 1; }
.ring .num span { display: block; font-family: var(--mono); font-size: 9.5px; letter-spacing: .18em; color: var(--muted); text-transform: uppercase; margin-top: 6px; }
.verdict .word { font-size: 30px; letter-spacing: -.03em; font-weight: 300; line-height: 1.05; }
.verdict .chance { margin-top: 10px; }
.verdict .chance b { font-family: var(--mono); font-weight: 300; font-size: 22px; letter-spacing: -.04em; }
.st-go { color: var(--go); } .st-marginal { color: var(--marginal); } .st-hold { color: var(--hold); } .st-na { color: var(--muted); }
.bg-go { background: var(--go); } .bg-marginal { background: var(--marginal); } .bg-hold { background: var(--hold); } .bg-na { background: var(--na); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line-2); font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--go); box-shadow: 0 0 0 0 rgba(169,216,184,.6); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(169,216,184,.5); } 70% { box-shadow: 0 0 0 8px rgba(169,216,184,0); } 100% { box-shadow: 0 0 0 0 rgba(169,216,184,0); } }

/* ------------------------------------------------------------------ timeline */
.tl { position: relative; }
.tl .bars { display: flex; gap: 2px; height: 44px; align-items: stretch; }
.tl .bars i { flex: 1; border-radius: 2px; opacity: .95; transition: opacity .15s, transform .15s; }
.tl .bars i.fc { opacity: .55; background-image: repeating-linear-gradient(135deg, rgba(0,0,0,.25) 0 2px, transparent 2px 5px); }
.tl .bars i.sel { transform: scaleY(1.12); opacity: 1; box-shadow: 0 0 0 1px var(--ink); }
.tl .ticks { display: flex; justify-content: space-between; margin-top: 8px; font-family: var(--mono); font-size: 10px; color: var(--faint); letter-spacing: .06em; }
.tl .now { position: absolute; top: -6px; bottom: 18px; width: 1px; background: var(--ink); }
.tl .now::after { content: "NOW"; position: absolute; top: -14px; left: 50%; transform: translateX(-50%); font-family: var(--mono); font-size: 9px; letter-spacing: .16em; color: var(--ink); }
.tl .mark { position: absolute; top: -6px; bottom: 18px; width: 1px; background: var(--accent); }
.tl .mark::after { content: attr(data-l); position: absolute; top: -14px; left: 50%; transform: translateX(-50%); font-family: var(--mono); font-size: 9px; letter-spacing: .12em; color: var(--accent); white-space: nowrap; }
.tl-read { margin-top: 12px; min-height: 40px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; font-size: 13px; color: var(--ink-2); display: flex; gap: 12px; align-items: center; }
.tl-read b { font-family: var(--mono); font-weight: 400; color: var(--ink); }
.mini { display: flex; gap: 1px; height: 20px; align-items: stretch; }
.mini i { flex: 1; border-radius: 1px; }
.legend { display: flex; gap: 14px; margin-top: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 10px; letter-spacing: .1em; color: var(--muted); text-transform: uppercase; }
.legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }

/* ------------------------------------------------------------------ lists */
.list { border-top: 1px solid var(--line); }
.list > a, .list > .item { display: block; padding: 16px 0; border-bottom: 1px solid var(--line); }
.day-row { display: grid; grid-template-columns: 56px 1fr 52px; gap: 14px; align-items: center; }
.day-row .d b { display: block; font-size: 15px; font-weight: 500; letter-spacing: -.01em; }
.day-row .d span { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.day-row .s { text-align: right; }
.day-row .s b { font-family: var(--mono); font-weight: 300; font-size: 26px; letter-spacing: -.06em; line-height: 1; display: block; }
.day-row .s span { font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.day-row .meta { display: flex; gap: 10px; margin-top: 7px; font-family: var(--mono); font-size: 10.5px; color: var(--muted); letter-spacing: .04em; }
.list > a:active { background: var(--bg-2); }
.list > a.row { display: flex; }
.day-row .meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.event { display: grid; grid-template-columns: 22px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: start; }
.event svg { width: 18px; height: 18px; margin-top: 2px; color: var(--muted); }
.event.storm svg { color: var(--hold); } .event.rain svg { color: #8fb3d9; } .event.wind svg { color: var(--marginal); }
.concern { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.concern .pts { font-family: var(--mono); color: var(--hold); font-size: 13px; }

/* ------------------------------------------------------------------ wind */
.winds { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.wind-card { border: 1px solid var(--line); border-radius: 18px; padding: 16px; }
.dial { width: 100%; max-width: 150px; aspect-ratio: 1; display: block; margin: 10px auto 12px; }
.dial .c { stroke: var(--line-2); fill: none; }
.dial .tick { stroke: var(--faint); }
.dial text { fill: var(--muted); font-family: var(--mono); font-size: 8px; letter-spacing: .1em; }
.dial .arrow { stroke: var(--ink); fill: var(--ink); }
.wind-card .big { font-family: var(--mono); font-weight: 200; font-size: 34px; letter-spacing: -.06em; line-height: 1; }
.wind-card .ft { font-size: 13px; color: var(--ink-2); margin-top: 6px; }
.wind-card .ft b { font-weight: 500; color: var(--ink); }

/* ------------------------------------------------------------------ tables */
.tbl-wrap { overflow-x: auto; margin: 0 calc(-1 * var(--pad)); padding: 0 var(--pad); -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { font-family: var(--mono); font-weight: 400; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); text-align: left; padding: 0 10px 10px 0; white-space: nowrap; }
td { padding: 11px 10px 11px 0; border-top: 1px solid var(--line); white-space: nowrap; color: var(--ink-2); }
td.num, th.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
td b { color: var(--ink); font-weight: 500; }
tr.flag-storm td:first-child { box-shadow: inset 2px 0 0 var(--hold); padding-left: 8px; }
tr.flag-rain td:first-child { box-shadow: inset 2px 0 0 #8fb3d9; padding-left: 8px; }
.raw { font-family: var(--mono); font-size: 11px; color: var(--faint); white-space: normal; word-break: break-word; }

/* ------------------------------------------------------------------ heatmap */
.heat { display: grid; grid-template-columns: 30px repeat(14, 1fr); gap: 2px; font-family: var(--mono); font-size: 9.5px; }
.heat div { aspect-ratio: 1; border-radius: 3px; display: grid; place-items: center; color: rgba(0,0,0,.65); }
.heat .l { aspect-ratio: auto; color: var(--muted); place-items: center start; }
.heat .h { aspect-ratio: auto; color: var(--faint); }

/* ------------------------------------------------------------------ forms */
.field { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); }
.field .label { display: block; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; background: transparent; border: 0; outline: 0; color: var(--ink); font: inherit; font-size: 20px;
  letter-spacing: -.02em; padding: 0; font-weight: 300; -webkit-appearance: none; appearance: none;
}
.field textarea { font-size: 16px; min-height: 96px; resize: vertical; line-height: 1.5; }
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.field select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: right 6px center, right 0 center; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 24px; }
.field select option { background: var(--surface); color: var(--ink); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips input { display: none; }
.chips label { padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 14px; color: var(--ink-2); cursor: pointer; }
.chips input:checked + label { border-color: var(--ink); color: var(--bg); background: var(--ink); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 52px; padding: 0 24px; border-radius: 999px; border: 0; background: var(--ink); color: var(--bg); font-weight: 500; font-size: 15px; letter-spacing: -.01em; cursor: pointer; }
.btn.block { width: 100%; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-2); }
.btn.sm { height: 38px; padding: 0 16px; font-size: 13px; }
.btn.danger { background: transparent; color: var(--hold); border: 1px solid rgba(226,128,106,.4); }
.btn:active { transform: scale(.98); }
.seg { display: grid; grid-auto-flow: column; gap: 8px; }
.flash { padding: 12px 16px; border-radius: 12px; border: 1px solid rgba(169,216,184,.3); color: var(--go); font-size: 14px; margin-bottom: 16px; }
details summary { cursor: pointer; list-style: none; }
details summary::-webkit-details-marker { display: none; }
details summary .chev { transition: transform .2s; display: inline-block; }
details[open] summary .chev { transform: rotate(90deg); }
.bar { height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 2px; }

/* ------------------------------------------------------------------ desktop */
@media (min-width: 900px) {
  :root { --pad: 32px; }
  .wrap { max-width: 720px; }
  .tabbar .in { max-width: 720px; }
  .ring { width: 176px; height: 176px; }
  .ring .num b { font-size: 70px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---- scan a logbook page */
.scan-actions { display: grid; gap: 12px; margin-top: 28px; }
.scan-tips { margin: 24px 0 0; padding-left: 18px; line-height: 1.7; }
.scan-err { margin: 20px 0 0; padding: 14px 16px; border-radius: 14px; border: 1px solid rgba(232,196,122,.35); color: var(--ink-2); font-size: 14px; }
.scan-err code { color: var(--ink); }
.scan-reading { text-align: center; padding: 64px 0; }
.scan-reading p { margin: 6px 0 0; }
.spin { width: 36px; height: 36px; margin: 0 auto 18px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--ink); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.scan-row { margin: 22px 0 0; padding: 0; border: 1px solid var(--line); border-radius: 16px; min-width: 0; }
.scan-row.off .scan-body { display: none; }
.scan-row.off { opacity: .6; }
.scan-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; }
.scan-head input { width: 20px; height: 20px; accent-color: var(--go); }
.scan-body { padding: 0 16px 4px; border-top: 1px solid var(--line); }
.field.unsure .label { color: var(--marginal); }
.field.unsure input, .field.unsure select, .field.unsure textarea { border-bottom: 1px solid var(--marginal); }
.unsure-key { color: var(--marginal); }
.btn:disabled { opacity: .45; }

/* ---- ‹ day › switcher */
.daynav { display: flex; align-items: center; gap: 10px; min-height: 40px; }
.dn-mid { flex: 1; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dn-prev { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-2); color: var(--ink-2); }
.dn-prev.off { border-color: transparent; }
.dn-next { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 10px 0 16px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--ink); font-size: 14px; }
.dn-next b { font-family: var(--mono); font-weight: 400; font-size: 13px; }
.dn-prev:active, .dn-next:active { background: var(--bg-2); transform: scale(.97); }
main.swiping { transition: transform .18s ease-out, opacity .18s; }

/* ---- sky view */
:root { --sp-1: #3d6b55; --sp-2: #9fcfb0; --sp-3: #e8c47a; --sp-4: #e2806a; }
.sky-time { position: sticky; top: 0; z-index: 1100; background: var(--bg); padding: 14px 0 10px; margin-top: 8px; border-bottom: 1px solid var(--line); }
.sky-time input[type=range] { width: 100%; margin-top: 10px; accent-color: var(--ink); }
.sky-now { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.sky-now .kv { padding: 12px; border: 1px solid var(--line); border-radius: 14px; }
.sky-now .v { font-size: 22px; font-weight: 300; margin: 6px 0 2px; }
.sky-now .v small { font-size: 12px; color: var(--muted); }
.cl3 { display: grid; gap: 2px; margin-top: 6px; font-size: 12px; color: var(--muted); }
.cl3 b { color: var(--ink); font-weight: 400; font-family: var(--mono); font-size: 13px; display: inline-block; min-width: 38px; }
.sky-sec { margin-top: 30px; }
.sky-alts { margin-bottom: 12px; }
.sky-alts label { padding: 7px 11px; font-size: 13px; }
.sky-map-wrap { border-radius: 16px; overflow: hidden; border: 1px solid var(--line); }
#map { height: 360px; background: #111; position: relative; z-index: 0; isolation: isolate; } /* keeps Leaflet's 400+ z-index panes from covering the header and tab bar */
.sky-flow { pointer-events: none; }
.leaflet-container { font-family: var(--mono); }
.leaflet-control-attribution { background: rgba(0,0,0,.55) !important; color: #aaa !important; font-size: 9px; }
.leaflet-control-attribution a { color: #ccc !important; }
.leaflet-bar a { background: rgba(20,20,19,.9); color: var(--ink); border-color: var(--line-2); }
.sky-tip { background: rgba(10,10,10,.8); color: #fff; border: 0; box-shadow: none; font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; }
.sky-tip::before { display: none; }
.sky-drift { display: grid; gap: 8px; margin-top: 14px; }
.sky-drift > div:not(.tiny) { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.sky-drift b { font-weight: 500; text-align: right; }
.sky-svg { width: 100%; height: auto; display: block; }
.sky-svg .ax { font-family: var(--mono); font-size: 10px; fill: var(--muted); }
.sky-svg .lv { font-family: var(--mono); font-size: 11px; fill: var(--muted); }
.sky-svg .lv .b { fill: var(--ink); }
.sky-svg.th .hit { cursor: pointer; }
.sky-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; }
.sky-legend span { display: inline-flex; align-items: center; gap: 6px; }
.sky-legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.sky-legend i.cl { background: rgba(255,255,255,.5); }
.sky-btn { margin-top: 4px; }

/* ---- map inside the day card */
.skymap { margin-top: 26px; }
.skymap-head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.sky-alts { display: flex; flex-wrap: nowrap; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 !important; }
.sky-alts::-webkit-scrollbar { display: none; }
.sky-alts label { flex: none; padding: 6px 12px; font-size: 13px; }
.sky-map-wrap { position: relative; z-index: 0; isolation: isolate; } /* map + its labels stay under the header and tab bar */
#map { height: 300px; }
.sky-flow { position: absolute; inset: 0; z-index: 450; pointer-events: none; }
.map-read { position: absolute; left: 10px; top: 10px; z-index: 460; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap;
  padding: 7px 11px; border-radius: 10px; background: rgba(10,10,10,.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  font-size: 13px; color: var(--ink-2); max-width: calc(100% - 20px); }
.map-read b { color: var(--ink); font-weight: 500; }
.skymap-foot { margin-top: 10px; }
.skymap-foot b { color: var(--ink); font-weight: 400; }

.sky-flow { transition: opacity .25s ease; will-change: opacity; }
#map { touch-action: none; }

/* ---- facts card (replaces the day score) */
.hero .glow { --hero-c: rgba(242, 240, 235, .06); }
.facts { display: grid; gap: 0; margin: 6px 0 24px; }
.fact { display: grid; grid-template-columns: 84px 1fr; gap: 12px; align-items: start; padding: 13px 0; border-bottom: 1px solid var(--line); }
.fact:first-child { padding-top: 4px; }
.fact .label { padding-top: 3px; }
.fv-text { font-size: 16px; line-height: 1.35; color: var(--ink); font-weight: 400; }
.storm-strip { display: flex; gap: 2px; height: 14px; margin: 2px 0 4px; }
.storm-strip i { flex: 1; border-radius: 2px; background: rgba(242, 240, 235, .12); }
.storm-strip i.sv-low { background: rgba(232, 196, 122, .45); }
.storm-strip i.sv-watch { background: var(--marginal); }
.storm-strip i.sv-risk { background: var(--hold); }
.storm-ticks { display: flex; justify-content: space-between; margin-bottom: 6px; }
/* bar: fine is neutral now, so colour only means something to watch */
.tl .bars i.bg-go, .mini i.bg-go, .legend i.bg-go { background: rgba(242, 240, 235, .30); }
.legend i.fc-key { opacity: .55; background-image: repeating-linear-gradient(135deg, rgba(0,0,0,.35) 0 2px, transparent 2px 4px); }
.day-row.nos { grid-template-columns: 56px 1fr; }

.map-home { display: grid !important; place-items: center; width: 34px; height: 34px; margin-bottom: 8px !important;
  background: rgba(20,20,19,.9); color: var(--ink) !important; border: 1px solid var(--line-2) !important; border-radius: 8px;
  opacity: 0; transform: scale(.85); pointer-events: none; transition: opacity .2s ease, transform .2s ease; }
.map-home.show { opacity: 1; transform: none; pointer-events: auto; }
.map-home:active { transform: scale(.94); }
.fv-2 { margin-top: 6px; color: var(--ink-2); font-size: 15px; }

/* ---- day headline: big day name top left, arrows top right */
.daynav { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; min-height: 0; margin-top: 4px; }
.dn-title { min-width: 0; }
.dn-day { margin: 0; font-size: 42px; line-height: 1.02; font-weight: 300; letter-spacing: -.035em; color: var(--ink); }
.dn-sub { margin-top: 8px; font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.dn-arrows { flex: none; display: flex; gap: 8px; padding-top: 6px; }
.dn-btn { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-2); color: var(--ink); }
.dn-btn.off { border-color: var(--line); opacity: .35; }
.dn-btn:active { background: var(--bg-2); transform: scale(.95); }

/* ------------------------------------------------------------------ settings */
.set-sec .label { display: block; }
.set-lead { margin: 10px 0 4px; color: var(--ink-2); font-size: 14px; line-height: 1.55; }
.c-hold { color: var(--hold); font-weight: 500; } .c-marg { color: var(--marginal); font-weight: 500; } .c-go { color: var(--go); font-weight: 500; }
.lim { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); }
.lim-txt b { display: block; font-weight: 500; font-size: 16px; }
.lim-txt span { display: block; color: var(--muted); font-size: 13px; line-height: 1.4; margin-top: 2px; }
.lim-stat { grid-column: 1 / -1; font-size: 12.5px; color: var(--faint); font-family: var(--mono); letter-spacing: -.01em; min-height: 1em; }
.step { display: flex; align-items: center; gap: 2px; }
.step button { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-2); background: transparent; font-size: 20px; line-height: 1; cursor: pointer; color: var(--ink); }
.step button:active { background: var(--surface); }
.step label { display: flex; align-items: baseline; justify-content: center; gap: 3px; width: 72px; }
.step.wide label { width: 96px; border-bottom: 1px solid var(--line-2); padding-bottom: 4px; }
.step input { width: 1.25em; background: transparent; border: 0; color: var(--ink); font: 300 26px/1 var(--sans); letter-spacing: -.03em; font-variant-numeric: tabular-nums; text-align: right; padding: 0; -moz-appearance: textfield; }
.step.wide input { width: 100%; text-align: center; }
.step input::-webkit-outer-spin-button, .step input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.step input:focus { outline: none; }
.step i { font-style: normal; font-size: 12px; color: var(--muted); }
.lim-sum { margin: 20px 0 0; font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.sum-bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; gap: 2px; }
.sum-bar i { min-width: 0; } .sum-bar i.bg-go { background: rgba(242, 240, 235, .30); }
.sum-key { display: flex; justify-content: space-between; margin-top: 8px; color: var(--muted); }
.sum-key b { color: var(--ink); font-weight: 500; }
.set-save { position: sticky; bottom: calc(var(--tabbar) + var(--safe-b) + 12px); z-index: 25; padding: 12px 0 0; }
.set-save .btn { box-shadow: 0 8px 30px rgba(0,0,0,.6); }
.set-row { display: flex; gap: 12px; align-items: baseline; margin-top: 12px; font-size: 14px; line-height: 1.55; }
.set-row b { font-weight: 500; }
.set-row code { font-family: var(--mono); font-size: 12.5px; color: var(--ink); background: var(--surface); padding: 1px 6px; border-radius: 6px; }
.dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); transform: translateY(-1px); }
.dot.on { background: var(--go); }
.set-sec .set-more summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
.set-more summary::-webkit-details-marker { display: none; }
.set-more summary::after { content: "+"; font-size: 16px; line-height: 1; color: var(--muted); }
.set-more[open] summary::after { content: "−"; }

/* timeline scrubbing: horizontal drags go to the bar, vertical ones still scroll the page */
.tl .bars { touch-action: pan-y; cursor: ew-resize; user-select: none; -webkit-user-select: none; padding: 8px 0; margin: -8px 0; box-sizing: content-box; }
.tl .bars i { transition: opacity .15s, transform .08s; }
.tl-tip { position: absolute; left: 0; top: -36px; padding: 5px 10px; border-radius: 8px; background: var(--ink); color: var(--bg); font: 500 12px/1 var(--mono); white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .12s; z-index: 5; }
.tl.scrub .tl-tip { opacity: 1; }
.tl.scrub .now::after, .tl.scrub .mark::after { opacity: 0; }

/* ------------------------------------------------------------------ sign-in */
.auth-wrap { min-height: 72vh; display: flex; flex-direction: column; justify-content: center; max-width: 420px; margin: 0 auto; }
.dot-mark { color: var(--ink); }
.or { display: flex; align-items: center; gap: 12px; margin: 26px 0 18px; color: var(--faint); font-size: 12px; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.sso { display: grid; gap: 10px; }
.prose h3 { font-size: 15px; font-weight: 500; margin: 26px 0 6px; }
.prose p { color: var(--ink-2); font-size: 15px; line-height: 1.6; margin: 0 0 10px; }
.prose a { color: var(--ink); text-decoration: underline; }
[data-locked] .step button { visibility: hidden; }
[data-locked] .step input { pointer-events: none; }
