/* Speedometer and weather: buttons under the top-right tools, their panels */
.right-col { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; margin-left: auto; pointer-events: none; }
.right-col > * { pointer-events: auto; }
.right-col .tools { margin-left: 0; }
.side-stack { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; pointer-events: none; }
.side-stack > * { pointer-events: auto; }
.speed-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; line-height: 1; }
.speed-btn b { font-size: 17px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.speed-btn small { font-size: 8.5px; color: var(--muted); margin-top: 2px; }
.speed-btn.live b { color: var(--text); }
.speed-btn.on, .wx-chip.on { box-shadow: 0 0 0 2px var(--accent), var(--shadow); }
.wx-chip { display: inline-flex; align-items: center; gap: 3px; height: 32px; padding: 0 9px 0 6px; border: 0; border-radius: 99px; background: var(--surface); box-shadow: var(--shadow); cursor: pointer; font-size: 13px; color: var(--text); }
.wx-chip[hidden] { display: none; }
.wx-chip .wx-ic { font-size: 16px; }
.wx-chip b { font-variant-numeric: tabular-nums; }

/* speedometer panel */
.gauge { padding: 4px 14px 18px; }
.g-hero { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; padding: 6px 0 12px; border-bottom: 1px solid var(--border); }
.g-now { display: flex; align-items: baseline; gap: 6px; min-width: 120px; }
.g-now b { font-size: 52px; line-height: 1; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.g-now span { color: var(--muted); }
.g-stats { flex: 1; display: grid; grid-template-columns: repeat(auto-fit, minmax(76px, 1fr)); gap: 6px 10px; min-width: 200px; }
.g-stats div { display: flex; flex-direction: column; }
.g-stats span, .g-k { font-size: .75em; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.g-stats b { font-variant-numeric: tabular-nums; font-size: 1.05em; }
.g-chart-wrap { position: relative; padding: 10px 0 8px; border-bottom: 1px solid var(--border); }
.g-chart-head { display: flex; justify-content: space-between; align-items: center; font-size: .8em; color: var(--muted); margin-bottom: 4px; }
.g-chart { width: 100%; height: 140px; display: block; touch-action: pan-y; cursor: crosshair; }
.g-readout { position: absolute; top: 34px; background: var(--text); color: var(--bg); font-size: .78em; padding: 3px 8px; border-radius: 6px; pointer-events: none; white-space: nowrap; font-variant-numeric: tabular-nums; }
.g-grid { display: grid; grid-template-columns: 1fr 130px; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.g-row { display: flex; flex-direction: column; padding: 5px 0; border-bottom: 1px dashed var(--border); }
.g-row:last-child { border-bottom: 0; }
.g-v { font-variant-numeric: tabular-nums; }
.g-v.mono { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: .95em; }
.g-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.g-dot.ok { background: var(--ok); } .g-dot.warn { background: var(--warn); } .g-dot.bad { background: var(--bad); }
.g-compass { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.g-rose { width: 120px; height: 120px; }
.g-rose #g-rose-dial { transition: transform .25s linear; }
.g-ring { fill: none; stroke: var(--border); stroke-width: 1; }
.g-tick { stroke: var(--faint); stroke-width: 1; }
.g-card { font-size: 11px; text-anchor: middle; dominant-baseline: middle; fill: var(--muted); font-weight: 600; }
.g-card.n { fill: var(--accent); }
.g-needle { fill: var(--accent); }
.g-sky-wrap { padding: 10px 0; border-bottom: 1px solid var(--border); }
.g-sky { width: 100%; max-width: 260px; display: block; margin: 6px auto; }
.g-sat { fill: none; stroke: var(--faint); stroke-width: 1.2; }
.g-sat.used { fill: var(--accent); stroke: var(--surface); stroke-width: .8; }
.g-sat-l { font-size: 4.5px; text-anchor: middle; fill: var(--muted); }
.g-const { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; }
.g-coords { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0 0; }

/* weather panel */
.weather { padding: 4px 14px 18px; }
.wx-now { display: flex; align-items: center; gap: 14px; padding: 6px 0 10px; }
.wx-big { display: flex; align-items: center; gap: 6px; }
.wx-big .wx-ic { font-size: 44px; line-height: 1; }
.wx-big b { font-size: 46px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.wx-desc { font-weight: 600; font-size: 1.05em; }
.wx-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.wx-facts div { display: flex; flex-direction: column; background: var(--surface-2); border-radius: 10px; padding: 7px 10px; }
.wx-facts span { font-size: .75em; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.wx-sec { padding: 8px 0; border-bottom: 1px solid var(--border); }
.wx-sec:last-of-type { border-bottom: 0; }
.wx-sec h3 { font-size: .8em; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; margin: 6px 0; font-weight: 600; }
.wx-sun-row { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .92em; }
.wx-hours { display: flex; overflow-x: auto; gap: 2px; padding-bottom: 6px; scroll-snap-type: x proximity; }
.wx-h { flex: 0 0 52px; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; border-radius: 10px; font-size: .82em; scroll-snap-align: start; }
.wx-h .wx-ic { font-size: 20px; }
.wx-h b { font-size: 1.1em; font-variant-numeric: tabular-nums; }
.wx-h.sun { background: var(--surface-2); flex-basis: 64px; }
.wx-daysep { flex: 0 0 auto; writing-mode: vertical-rl; transform: rotate(180deg); font-size: .72em; color: var(--muted); border-left: 1px solid var(--border); padding: 0 2px; text-transform: uppercase; }
.wx-pp { color: var(--faint); font-size: .9em; min-height: 1.2em; }
.wx-pp.hi { color: var(--early); font-weight: 600; }
.wx-days { display: flex; flex-direction: column; }
.wx-d { display: grid; grid-template-columns: minmax(64px, 1fr) 28px 40px 32px minmax(60px, 2fr) 32px; gap: 6px; align-items: center; padding: 5px 0; font-variant-numeric: tabular-nums; }
.wx-d .wx-ic { font-size: 18px; text-align: center; }
.wx-lo { color: var(--muted); text-align: right; }
.wx-bar { position: relative; height: 5px; background: var(--surface-2); border-radius: 3px; }
.wx-bar i { position: absolute; top: 0; bottom: 0; border-radius: 3px; background: linear-gradient(90deg, var(--early), var(--warn)); }
.wx-src { font-size: .75em; padding-top: 10px; }

@media (max-width: 720px) {
  .speed-btn b { font-size: 16px; }
  .g-grid { grid-template-columns: 1fr 120px; }
  .g-rose { width: 110px; height: 110px; }
}

/* track recording */
.speed-btn.rec { box-shadow: 0 0 0 2px var(--bad), var(--shadow); }
.g-rec { padding: 8px 0 10px; border-bottom: 1px solid var(--border); }
.g-rec-state { font-size: .85em; margin-top: 6px; }
.g-rec h3 { font-size: .8em; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; margin: 10px 0 4px; }
.g-track { padding: 6px 0; border-top: 1px dashed var(--border); }
.g-track-top { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; font-size: .9em; }
.g-track-acts { display: flex; gap: 6px; margin-top: 4px; }
