/* LoudVector's family look (as in its transit apps): navy ink, violet-grey greys, Outfit,
   violet for actions and the |title⟩ brackets, a navy dark theme. On top of that, two weather
   hues: amber for sun and warmth, blue for rain. */
:root {
  color-scheme: light dark;
  --violet: #5b3df5;
  --on-violet: #ffffff;
  --bg: #f5f4fa;
  --surface: #ffffff;
  --surface-2: #eeecf6;
  --ink: #16132e;
  --muted: #5e5a78;
  --line: #e8e6f1;
  --sun: #e08a00;
  --moon: #5b3df5;
  --rain: #1f6fd6;
  --rain-soft: #dbe8fb;
  --bob-body: #5b3df5; --bob-line: #16132e; --bob-eye: #16132e; --bob-band: #ffffff;
  --bob-flag: #f0a020; --bob-sea: #d3e3fa; --bob-deep: #9fc1f2; --bob-blush: #8c76ff;
  --snow: #6a86b8;
  --cold: #4a8fe0;
  --warm: #f0a020;
  /* Temperatures, the same in every forecast (public/app.js TEMP_STOPS): -10, 0, 8, 15, 21, 27
     and 33 °C, from frost through mild to heat. */
  --tc0: #7b6be0;
  --tc1: #3f7fe0;
  --tc2: #2aa9c0;
  --tc3: #45b465;
  --tc4: #dcb726;
  --tc5: #ee8522;
  --tc6: #dc412c;
  --alert-bg: #1f6fd6;
  --alert-ink: #ffffff;
  --radius: 16px;
  --gutter: 16px;
  --shadow: 0 1px 2px rgb(22 19 46 / 0.06), 0 2px 10px rgb(22 19 46 / 0.05);
  --font: Outfit, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --violet: #9c8cff;
    --on-violet: #16132e;
    --bg: #16132e;
    --surface: #1e1a3c;
    --surface-2: #2a2550;
    --ink: #f3f2fa;
    --muted: #ada9cb;
    --line: #2e2950;
    --sun: #ffbf47;
    --moon: #b9adff;
    --rain: #6aaeff;
    --rain-soft: #243a63;
    --bob-body: #9c8cff; --bob-line: #f3f2fa; --bob-eye: #16132e; --bob-band: #f3f2fa;
    --bob-flag: #ffbf47; --bob-sea: #2c4677; --bob-deep: #5d7fbd; --bob-blush: #5b3df5;
    --snow: #a9bde3;
    --cold: #6aaeff;
    --warm: #ffbf47;
    --tc0: #a597ff;
    --tc1: #6aaeff;
    --tc2: #4fd0dc;
    --tc3: #6fd68a;
    --tc4: #ffd54a;
    --tc5: #ffa24a;
    --tc6: #ff6a55;
    --alert-bg: #2f6fd0;
    --alert-ink: #ffffff;
    --shadow: none;
  }
}

@font-face { font-family: Outfit; src: url("fonts/Outfit-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: Outfit; src: url("fonts/Outfit-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: Outfit; src: url("fonts/Outfit-SemiBold.ttf") format("truetype"); font-weight: 600 900; font-display: swap; }

* { box-sizing: border-box; }
html { background: var(--bg); color: var(--ink); font: 16px/1.4 var(--font); -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; min-height: 100svh; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--violet); }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

/* ---------- Top bar ---------- */
/* The bar's background runs the full width; its title and buttons line up with the 640 px
   column the page sits in (so on a wide screen they aren't off at the far edges). */
:root { --column: 640px; }
.bar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 4px;
  min-height: 56px;
  padding: env(safe-area-inset-top)
    max(var(--gutter), env(safe-area-inset-right), calc((100% - var(--column)) / 2 + var(--gutter) - 8px)) 0
    max(var(--gutter), env(safe-area-inset-left), calc((100% - var(--column)) / 2 + var(--gutter)));
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.title { margin: 0 auto 0 0; font-size: 1.375rem; font-weight: 500; letter-spacing: 0.02em; }
.ket { color: var(--violet); font-weight: 400; }
.title .ket:first-child { margin-right: 0.06em; }
.title .ket + .ket { margin-left: 0.04em; }
.title .tagline { margin-left: 0.5em; font-size: 0.875rem; font-weight: 400; letter-spacing: 0; color: var(--muted); white-space: nowrap; }
@media (max-width: 359px) { .title .tagline { display: none; } } /* no room beside the buttons on the smallest phones */
.bar-title { margin: 0 auto 0 0; min-width: 0; font-size: 1.125rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn {
  display: inline-grid; place-items: center; flex: none;
  width: 44px; height: 44px; padding: 0; border: 0; border-radius: 22px;
  background: transparent; color: var(--ink);
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn svg { width: 24px; height: 24px; }
.icon-btn.spin svg { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.text-btn {
  min-height: 40px; padding: 0 14px; border: 0; border-radius: 20px;
  background: var(--surface-2); color: var(--ink); font-weight: 500;
}

svg.ui { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Page ---------- */
.page {
  width: 100%; max-width: var(--column); margin: 0 auto;
  padding: 4px max(var(--gutter), env(safe-area-inset-right)) calc(24px + env(safe-area-inset-bottom)) max(var(--gutter), env(safe-area-inset-left));
}
.loading { color: var(--muted); text-align: center; padding: 48px 0; }
.stale { margin: 0 0 10px; color: var(--muted); font-size: 0.8125rem; text-align: center; }
/* Open-Meteo's free limits reached on this connection: what happened and how to help (limitNote). */
.limit-note { margin: 0 0 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--muted); font-size: 0.875rem; }
.limit-note p { margin: 0 0 8px; }
.limit-note .limit-title { color: var(--ink); font-size: 1rem; font-weight: 600; }
.limit-note .kofi { display: inline-flex; align-items: center; min-height: 36px; color: var(--violet); font-weight: 600; text-decoration: none; }

/* ---------- Rain alert ---------- */
.alert {
  margin: 0 0 12px; padding: 14px 16px 12px;
  border-radius: var(--radius); background: var(--alert-bg); color: var(--alert-ink);
}
.alert-main { display: flex; gap: 12px; align-items: flex-start; color: inherit; text-decoration: none; }
/* "Got it", under the text (36 px icon + 12 px gap in). */
.alert-ok {
  display: block; min-height: 36px; margin: 10px 0 0 48px; padding: 0 16px;
  border: 1.5px solid rgb(255 255 255 / 0.7); border-radius: 18px;
  background: transparent; color: inherit; font: inherit; font-weight: 500; font-size: 0.9375rem;
}
.alert-ok:hover { background: rgb(255 255 255 / 0.14); }
.alert-ok:focus-visible { outline-color: #ffffff; }
.alert svg { flex: none; width: 36px; height: 36px; --wx-cloud: transparent; }
.alert .wx { --sun: #ffd27a; --rain: #ffffff; --snow: #ffffff; color: #ffffff; }
.alert strong { display: block; font-size: 1.0625rem; font-weight: 600; }
.alert p { margin: 2px 0 0; opacity: 0.92; font-size: 0.9375rem; }
.alert.new { animation: drop-in 0.35s ease-out; }
@keyframes drop-in { from { transform: translateY(-6px); opacity: 0; } }
/* Beach news (a beach alert still among the device's notifications), in the beach violet. */
.alert.news { background: var(--violet); color: var(--on-violet); }
.alert.news svg { padding: 4px; color: currentColor; }
@media (prefers-reduced-motion: reduce) { .alert, .icon-btn.spin svg { animation: none; } }

/* ---------- Place cards ---------- */
.places { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.card {
  display: grid; grid-template-columns: 48px 1fr auto; gap: 2px 12px; align-items: center;
  width: 100%; padding: 14px 16px; border: 0; border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow); color: var(--ink);
  text-align: left; text-decoration: none;
}
a.card:hover { background: color-mix(in srgb, var(--surface) 92%, var(--violet)); }
.card .wx { grid-row: 1 / span 2; width: 48px; height: 48px; }
.card .name { min-width: 0; font-size: 1.0625rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .name .here-mark { width: 14px; height: 14px; margin-right: 4px; vertical-align: -1px; color: var(--violet); }
.card .sub { min-width: 0; color: var(--muted); font-size: 0.875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .temp { grid-row: 1; grid-column: 3; justify-self: end; font-size: 1.75rem; font-weight: 500; line-height: 1; font-variant-numeric: tabular-nums; }
.card .hilo { grid-row: 2; grid-column: 3; justify-self: end; color: var(--muted); font-size: 0.8125rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.card .outlook {
  grid-column: 2 / span 2; margin-top: 6px;
  display: flex; align-items: center; gap: 6px;
  font-size: 0.875rem; color: var(--muted);
}
.card .outlook.wet { color: var(--rain); font-weight: 500; }
.card .outlook svg { flex: none; width: 16px; height: 16px; }
/* The time there, for places whose clocks differ from the phone's. */
.card .local-clock {
  display: inline-flex; flex: none; align-items: center; gap: 4px; margin-left: auto; padding-left: 8px;
  color: var(--muted); font-weight: 400; white-space: nowrap; font-variant-numeric: tabular-nums;
}
.card .local-clock svg { width: 14px; height: 14px; flex: none; }
.card .hilo:has(.local-clock) { display: inline-flex; align-items: center; gap: 4px; justify-self: end; }
/* What to wear, in short. */
.card .wear-line {
  grid-column: 2 / span 2; display: flex; align-items: center; gap: 6px; min-width: 0; margin-top: 2px;
  color: var(--muted); font-size: 0.8125rem;
}
.card .wear-line svg { flex: none; width: 16px; height: 16px; }

/* Direct card controls: subtle remove button on the left, long-press drag handle on the right. */
.places li[data-id] { position: relative; }
.places li[data-id].dragging { z-index: 2; }
.places li[data-id] > .card { padding-left: 38px; padding-right: 38px; }
.places li[data-id].dragging > .card { box-shadow: 0 10px 28px rgb(0 0 0 / 0.22); cursor: grabbing; }
.card-remove, .drag-handle {
  position: absolute; top: 50%; z-index: 2; transform: translateY(-50%);
  display: grid; place-items: center; width: 30px; height: 40px; border: 0; border-radius: 8px;
  background: transparent; color: var(--muted); opacity: 0.36; transition: opacity 0.15s ease, color 0.15s ease;
}
.card-remove { left: 4px; cursor: pointer; }
.card-remove svg { width: 17px; height: 17px; }
.card-remove:hover, .card-remove:focus-visible { opacity: 1; color: #c0362c; }
@media (prefers-color-scheme: dark) { .card-remove:hover, .card-remove:focus-visible { color: #ff8a80; } }
.drag-handle { right: 4px; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.drag-handle svg { width: 18px; height: 18px; }
.places li[data-id]:hover .drag-handle, .drag-handle:hover { opacity: 0.72; }
.places li[data-id].dragging .drag-handle { opacity: 1; cursor: grabbing; color: var(--violet); }
.sorting li { position: relative; transition: transform 0.15s ease; }
.sorting li.dragging { transition: none; }
@media (prefers-reduced-motion: reduce) { .sorting li { transition: none; } }

.add-card {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 56px; margin-top: 10px; border: 1.5px dashed var(--line); border-radius: var(--radius);
  background: transparent; color: var(--violet); font-weight: 500; text-decoration: none;
}
.add-card svg { width: 20px; height: 20px; }

.offer {
  display: grid; gap: 10px; margin: 0 0 12px; padding: 16px;
  border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow);
}
.offer h2 { margin: 0; font-size: 1.0625rem; font-weight: 600; }
.offer p { margin: 0; color: var(--muted); font-size: 0.9375rem; }
.offer .row { display: flex; flex-wrap: wrap; gap: 8px; }
.primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border: 0; border-radius: 22px;
  background: var(--violet); color: var(--on-violet); font-weight: 500; text-decoration: none;
}
.primary svg { width: 18px; height: 18px; }
.ghost { min-height: 44px; padding: 0 16px; border: 0; border-radius: 22px; background: transparent; color: var(--muted); font-weight: 500; }
.note { margin: 0; color: var(--muted); font-size: 0.875rem; }
.note.warn { color: #b3261e; }
.note.center { margin-top: 8px; text-align: center; }
.note.pad { padding: 12px; }
/* Notifications full (app.js pushNote): friendly, not an error, with the chocolate link. */
.push-full { display: grid; justify-items: start; gap: 6px; }
.push-full p { margin: 0; }
.push-full .kofi { display: inline-flex; align-items: center; min-height: 36px; color: var(--violet); font-weight: 600; text-decoration: none; }
.gap { height: 16px; }
@media (prefers-color-scheme: dark) { .note.warn { color: #ff8a80; } }

.welcome { padding: 32px 8px 8px; text-align: center; }
.welcome .wx { width: 88px; height: 88px; }
.welcome h2 { margin: 8px 0 4px; font-size: 1.375rem; font-weight: 600; }
.welcome p { margin: 0 auto 20px; max-width: 30ch; color: var(--muted); }

/* ---------- Search ---------- */
.search { position: relative; margin: 4px 0 12px; }
.search svg { position: absolute; left: 14px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); color: var(--muted); }
.search input {
  width: 100%; min-height: 50px; padding: 0 16px 0 44px;
  border: 1.5px solid var(--line); border-radius: 25px; background: var(--surface); font-size: 1.0625rem;
}
.search input:focus { outline: none; border-color: var(--violet); }
.results { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.results button {
  display: grid; gap: 0 12px; grid-template-columns: 28px 1fr auto; align-items: center;
  width: 100%; min-height: 56px; padding: 8px 12px; border: 0; border-radius: 12px;
  background: transparent; text-align: left;
}
.results button:hover { background: var(--surface); }
.results .flag { font-size: 1.25rem; text-align: center; }
.results .where { display: block; color: var(--muted); font-size: 0.875rem; }
.results .added { color: var(--muted); font-size: 0.8125rem; }

/* ---------- Detail ---------- */
.hero { display: grid; grid-template-columns: auto 1fr; gap: 0 16px; align-items: center; padding: 8px 4px 16px; }
.hero .wx { width: 96px; height: 96px; grid-row: 1 / span 7; }
.hero .now { font-size: 3.5rem; font-weight: 500; line-height: 1; font-variant-numeric: tabular-nums; }
.hero .now small.unit { font-size: 1.125rem; font-weight: 400; margin-left: 4px; color: var(--muted); vertical-align: baseline; }
.hero .sport-mark { width: 96px; height: 96px; grid-row: 1 / span 7; display: flex; align-items: center; justify-content: center; }
.hero .sport-mark svg { width: 88px; height: 88px; }
.hero .desc { font-size: 1.125rem; font-weight: 500; }
.hero .more { color: var(--muted); font-size: 0.9375rem; grid-column: 2; }
.hero .outlook { grid-column: 2; display: flex; align-items: center; gap: 6px; margin-top: 4px; color: var(--muted); font-size: 0.9375rem; }
.hero .outlook + .outlook { margin-top: 2px; }
.hero .outlook.wet { color: var(--rain); font-weight: 500; }
.hero .outlook.good { color: var(--sport, var(--violet)); font-weight: 500; }
.hero .outlook.good svg { color: var(--sport, var(--violet)); }
.hero .outlook svg { flex: none; width: 16px; height: 16px; }
.hero .where-sub { grid-column: 2; margin-top: 6px; color: var(--muted); font-size: 0.875rem; }
.hero .local-time { grid-column: 2; color: var(--muted); font-size: 0.875rem; font-variant-numeric: tabular-nums; }

/* Beach Hero: wind on one line, larger icon and fonts with room to expand to the right */
.beach-hero { gap: 2px 20px; }
.beach-hero .sport-mark { width: 120px; height: 120px; grid-row: 1 / span 7; }
.beach-hero .sport-mark svg { width: 112px; height: 112px; }
.beach-hero .now { font-size: clamp(1.75rem, 5vw, 2.5rem); font-weight: 500; line-height: 1.15; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.beach-hero .now .val { font-size: 1.15em; font-weight: 600; }
.beach-hero .now .unit { font-size: 0.7em; font-weight: 400; color: var(--muted); }
.beach-hero .now .dir { font-size: 0.85em; font-weight: 600; }
.beach-hero .now .side { font-size: 0.85em; font-weight: 500; color: var(--muted); }
.beach-hero .more { font-size: 1rem; }
.beach-hero .outlook { font-size: 1.0625rem; }
.beach-hero .outlook svg { width: 18px; height: 18px; }
.beach-hero .where-sub { font-size: 0.9375rem; }
.beach-hero .local-time { font-size: 0.9375rem; }
@media (min-width: 600px) {
  .beach-hero { gap: 4px 24px; }
  .beach-hero .sport-mark { width: 136px; height: 136px; }
  .beach-hero .sport-mark svg { width: 128px; height: 128px; }
}
/* What to wear: the main layer, then anything to bring. */
.wear-list { margin: -6px 0 0; padding: 0 0 0 20px; }
.wear-list li { margin: 3px 0; }

.panel { margin: 0 0 12px; padding: 14px 16px 16px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.panel h2 { margin: 0 0 10px; color: var(--muted); font-size: 0.8125rem; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; }
.panel .lead { margin: -4px 0 12px; font-weight: 500; }
.panel .lead.wet { color: var(--rain); }

.nowcast { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; align-items: end; height: 64px; }
.nowcast i { display: block; min-height: 3px; border-radius: 4px 4px 2px 2px; background: var(--line); }
.nowcast i.wet { background: var(--rain); }
.nowcast i.maybe { background: color-mix(in srgb, var(--rain) 40%, var(--surface)); }
.panel .source { margin: 10px 0 0; color: var(--muted); font-size: 0.75rem; }
/* The latest wind at the nearest station, above a beach's hour-by-hour strip. */
.wind-now { margin: -2px 0 12px; font-size: 0.875rem; }
.wind-now .src { color: var(--muted); }
.nowcast-axis { display: flex; justify-content: space-between; margin-top: 6px; color: var(--muted); font-size: 0.75rem; font-variant-numeric: tabular-nums; }

/* The hour-by-hour strips scroll sideways: a finger swipes them, so phones hide the scrollbar;
   with a mouse there's a thin one, and the strip can be dragged too (app.js). */
.hours { display: flex; gap: 4px; margin: 0 -16px; padding: 0 16px 6px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.hours.dragging { scroll-snap-type: none; cursor: grabbing; }
@media (hover: hover) and (pointer: fine) { .hours { cursor: grab; -webkit-user-select: none; user-select: none; } }
@media (hover: none) {
  .hours { padding-bottom: 2px; scrollbar-width: none; }
  .hours::-webkit-scrollbar { display: none; }
}
.hour { flex: none; display: grid; justify-items: center; gap: 4px; width: 52px; padding: 6px 0; border-radius: 12px; scroll-snap-align: start; font-variant-numeric: tabular-nums; }
.hour.first { background: var(--surface-2); }
.hour .h { color: var(--muted); font-size: 0.8125rem; }
.hour .wx { width: 30px; height: 30px; }
.hour .t { font-weight: 600; }
.hour .p { min-height: 1.1em; color: var(--rain); font-size: 0.75rem; font-weight: 500; }
.hour .mm { min-height: 1.1em; margin-top: -4px; color: var(--rain); font-size: 0.6875rem; white-space: nowrap; }

.days { display: grid; margin: 0; padding: 0; list-style: none; }
.day {
  display: grid; grid-template-columns: 4.6em 28px 3em 2.6em 1fr 2.6em; gap: 8px; align-items: center;
  min-height: 46px; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums;
}
.day:first-child { border-top: 0; }
.day .d { font-weight: 500; }
.day .wx { width: 28px; height: 28px; }
.day .p { color: var(--rain); font-size: 0.8125rem; font-weight: 500; }
.day .lo { color: var(--muted); text-align: right; }
.day .hi { font-weight: 600; }
.range { position: relative; height: 6px; border-radius: 3px; background: var(--surface-2); }
.range i { position: absolute; top: 0; bottom: 0; border-radius: 3px; background: linear-gradient(90deg, var(--cold), var(--warm)); } /* the day's own colours come inline */

.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 0 0 12px; }
.fact { padding: 12px 14px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.fact dt { color: var(--muted); font-size: 0.8125rem; }
.fact dd { margin: 2px 0 0; font-size: 1.25rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.fact dd small { color: var(--muted); font-size: 0.875rem; font-weight: 400; }
.fact .arrow { display: inline-block; width: 16px; height: 16px; margin-left: 4px; vertical-align: -2px; color: var(--muted); }

/* ---------- Settings ---------- */
.group { margin: 0 0 12px; padding: 4px 16px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; border-top: 1px solid var(--line); }
.setting:first-child { border-top: 0; }
.setting .label small { display: block; color: var(--muted); font-size: 0.8125rem; }
.seg { display: inline-flex; padding: 3px; border-radius: 20px; background: var(--surface-2); }
/* The language switch's six choices wrap onto a second line on a narrow screen. */
.setting.stack .seg { flex-wrap: wrap; align-self: flex-start; }
.seg button { min-width: 52px; min-height: 34px; padding: 0 12px; border: 0; border-radius: 17px; background: transparent; color: var(--muted); font-weight: 500; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
@media (prefers-color-scheme: dark) { .seg button[aria-pressed="true"] { background: var(--violet); color: var(--on-violet); } }
.switch { position: relative; flex: none; width: 52px; height: 32px; border: 0; border-radius: 16px; background: var(--line); }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / 0.25); transition: transform 0.15s; }
.switch[aria-checked="true"] { background: var(--violet); }
.switch[aria-checked="true"]::after { transform: translateX(20px); }
.prose { color: var(--muted); font-size: 0.9375rem; }
.prose h2 { margin: 20px 0 6px; color: var(--ink); font-size: 1rem; font-weight: 600; }
.prose p { margin: 0 0 10px; }

/* ---------- Footer ---------- */
.foot { display: grid; justify-items: center; gap: 2px; margin-top: 28px; text-align: center; }
.foot a { display: inline-flex; align-items: center; min-height: 32px; padding: 0 8px; font-size: 0.8125rem; }
.foot .kofi { color: var(--muted); }
.foot .feedback { min-height: 36px; margin: 4px 0 2px; padding: 0 14px; border-radius: 18px; background: var(--surface-2); color: var(--ink); font-weight: 500; text-decoration: none; }
.foot .feedback:hover { background: color-mix(in srgb, var(--surface-2) 80%, var(--violet)); }
.foot .credit { margin: 0; color: var(--muted); font-size: 0.75rem; }
.foot .credit a { min-height: 0; padding: 0; font-size: inherit; color: inherit; }
.built-by { gap: 6px; color: var(--violet); font-weight: 500; text-decoration: none; }
.built-by:hover { text-decoration: underline; }
.built-by .lv-mark { width: 18px; height: 18px; flex: none; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 10;
  display: flex; align-items: center; gap: 12px;
  max-width: calc(100% - 32px); padding: 8px 8px 8px 16px; border-radius: 24px;
  background: var(--ink); color: var(--bg); transform: translateX(-50%); box-shadow: 0 4px 16px rgb(0 0 0 / 0.2);
}
.toast button { min-height: 36px; padding: 0 14px; border: 0; border-radius: 18px; background: transparent; color: var(--bg); font-weight: 600; text-decoration: underline; }

/* ---------- Weather icons ---------- */
svg.wx { fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.hero svg.wx, .welcome svg.wx { stroke-width: 1.2; }
.wx .sun { stroke: var(--sun); }
.wx .moon { stroke: var(--moon); }
.wx .cloud { stroke: currentColor; fill: var(--wx-cloud, var(--surface)); }
.wx .rain { stroke: var(--rain); }
.wx .snow { stroke: var(--snow); stroke-width: 2.4; }
.wx .bolt { stroke: var(--sun); }
.wx .fog { stroke: currentColor; opacity: 0.7; }
.hours .wx, .days .wx { color: var(--muted); }
.page > .welcome .wx, .hero .wx { --wx-cloud: var(--bg); }

/* Notifications row: a switch the browser can't use is shown but greyed out. */
.switch:disabled { opacity: 0.4; cursor: default; }
.group .note.pad { padding: 0 0 12px; }

/* stats.html: the running accuracy test */
.stat-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0 0 12px; }
.stat { display: grid; align-content: start; gap: 6px; padding: 12px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); color: var(--muted); font-size: 0.8125rem; line-height: 1.3; }
.stat .big { color: var(--ink); font-size: 1.75rem; font-weight: 500; line-height: 1; font-variant-numeric: tabular-nums; }
.scores { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 0.9375rem; }
.scores th, .scores td { padding: 8px 4px; border-top: 1px solid var(--line); text-align: right; }
.scores thead th { border-top: 0; color: var(--muted); font-size: 0.75rem; font-weight: 500; }
.scores tbody th { text-align: left; font-weight: 500; }
.scores .muted { color: var(--muted); }
.chart { display: block; width: 100%; height: auto; font-size: 9px; fill: var(--muted); }
.chart .gridline { stroke: var(--line); }
.chart polyline { fill: none; stroke-width: 2; }
.chart .s-alert { stroke: var(--rain); fill: var(--rain); }
.chart polyline.s-alert, .chart polyline.s-radar, .chart polyline.s-persist { fill: none; }
.chart .s-radar { stroke: var(--violet); fill: var(--violet); }
.chart .s-persist { stroke: var(--muted); fill: var(--muted); stroke-dasharray: 3 3; }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 8px 0 0; color: var(--muted); font-size: 0.75rem; }
.legend .key { display: inline-block; width: 14px; height: 3px; border-radius: 2px; }
.legend .key.s-alert { background: var(--rain); }
.legend .key.s-radar { background: var(--violet); }
.legend .key.s-persist { background: var(--muted); }

/* "Rain alerts for <place>" on a place's page, and the bell on its card */
.group.watch { margin: 0 0 12px; }
.card .name .watch-mark { width: 14px; height: 14px; margin-left: 6px; vertical-align: -1px; color: var(--violet); }

/* Radar map on a place's page */
.radar-map { position: relative; }
/* One finger scrolls the page as usual; two pinch the map (public/app.js). */
.radar-map svg {
  display: block; width: 100%; height: auto; border-radius: 12px;
  touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: grab;
}
.radar-map svg.moving { cursor: grabbing; }
.map-btn.centre { margin-top: 4px; color: var(--violet); }
.map-hint { margin: 6px 0 0; color: var(--muted); font-size: 0.75rem; text-align: center; }
.map-hint .by-touch { display: none; }
@media (pointer: coarse) {
  .map-hint .by-touch { display: inline; }
  .map-hint .by-mouse { display: none; }
}
.radar-map.placeholder { aspect-ratio: 180 / 150; border-radius: 12px; background: var(--surface-2); }
.radar-zoom { position: absolute; top: 8px; right: 8px; display: grid; gap: 6px; }
.map-btn {
  display: grid; place-items: center; width: 36px; height: 36px; padding: 0;
  border: 0; border-radius: 10px; background: color-mix(in srgb, var(--surface) 90%, transparent);
  box-shadow: 0 1px 4px rgb(0 0 0 / 0.18); color: var(--ink);
}
.map-btn svg { width: 20px; height: 20px; }
.map-btn:hover { background: var(--surface); }
.map-btn:disabled { opacity: 0.4; cursor: default; }
.radar .sea { fill: #dde6f2; }
.radar .land { fill: #f6f5f0; }
.radar .lake { fill: #dde6f2; }
.radar .coastline { fill: none; stroke: #7b809c; stroke-width: 1; vector-effect: non-scaling-stroke; opacity: 0.8; }
.radar .border { fill: none; stroke: #7b809c; stroke-width: 1; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; opacity: 0.7; }
/* US states' borders (and Canada's provinces', Mexico's states'): fainter than countries'. */
.border.state { fill: none; stroke: #7b809c; stroke-width: 0.75; stroke-dasharray: 2 3; vector-effect: non-scaling-stroke; opacity: 0.5; }
.radar .spot { fill: var(--violet); stroke: #fff; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.radar .spot-ring { fill: none; stroke: var(--violet); stroke-width: 1.5; vector-effect: non-scaling-stroke; opacity: 0.6; }
.radar-controls { display: flex; align-items: center; gap: 2px; margin-top: 8px; }
.radar-controls .icon-btn:disabled { opacity: 0.3; cursor: default; }
.radar-slider { flex: 1; min-width: 0; accent-color: var(--violet); }
.radar-time { margin: 10px 0 0; text-align: center; font-weight: 500; font-variant-numeric: tabular-nums; }
.radar-legend { display: flex; align-items: center; gap: 3px; margin-top: 10px; color: var(--muted); font-size: 0.75rem; }
.radar-legend i { flex: 1; height: 8px; border-radius: 2px; }
.radar-legend span:first-child { margin-right: 4px; }
.radar-legend span:last-child { margin-left: 4px; }
@media (prefers-color-scheme: dark) {
  .radar .sea, .radar .lake { fill: #1b1840; }
  .radar .land { fill: #2b2752; }
  .radar .coastline { stroke: #8e88b8; }
  .radar .border { stroke: #8e88b8; }
}

.section-title { margin: 24px 4px 4px; color: var(--muted); font-size: 0.8125rem; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; }
.panel .note.weak { margin-top: 8px; font-size: 0.8125rem; }

/* ---------- Beach alerts ---------- */
.beach-link { margin-top: 10px; padding: 0 16px; text-align: center; }
.beach-link svg { flex: none; }
.welcome-mark { display: inline-grid; place-items: center; width: 72px; height: 72px; border-radius: 36px; background: var(--surface-2); color: var(--violet); }
.welcome-mark svg { width: 40px; height: 40px; }
.list-head { margin: 18px 4px 6px; color: var(--muted); font-size: 0.8125rem; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; }
.list-head:first-child { margin-top: 4px; }
.page > .note { margin: 0 4px 8px; }
.results button:disabled { cursor: default; }

.beach-card .sport-mark { grid-row: 1 / span 2; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 24px; background: var(--surface-2); color: var(--violet); }
.beach-card .sport-mark svg { width: 28px; height: 28px; }
/* WindBob: Bob the buoy in the card's round window, in the beach's mood (public/bob.js). */
.beach-card .sport-mark.bob { overflow: hidden; }
.beach-card .sport-mark .bob { width: 48px; height: 48px; }
.bob .o { fill: var(--bob-line); stroke: var(--bob-line); stroke-width: 10; stroke-linejoin: round; }
.bob .b { fill: var(--bob-body); }
.bob .w { fill: var(--bob-band); }
.bob .f { fill: var(--bob-flag); stroke: var(--bob-line); stroke-width: 3.5; stroke-linejoin: round; }
.bob .e { fill: var(--bob-eye); }
.bob .g { fill: #fff; }
.bob .gl { fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; }
.bob .k { fill: var(--bob-blush); }
.bob .s { fill: var(--bob-sea); }
.bob .sun { fill: var(--bob-flag); stroke: var(--bob-line); stroke-width: 3; }
.bob .sp { fill: var(--bob-band); stroke: var(--bob-line); stroke-width: 2.6; }
.bob .ln, .bob .el, .bob .dp { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.bob .ln { stroke: var(--bob-line); stroke-width: 3.6; }
.bob .ln.mast { stroke-width: 4.4; }
.bob .ln.thin { stroke-width: 3; }
.bob .el { stroke: var(--bob-eye); stroke-width: 3.4; }
.bob .el.z { stroke: var(--bob-line); }
.bob .dp { stroke: var(--bob-deep); stroke-width: 3; }
.beach-card .tag { grid-row: 1; grid-column: 3; justify-self: end; padding: 2px 10px; border-radius: 12px; background: var(--surface-2); color: var(--muted); font-size: 0.8125rem; font-weight: 500; }
/* The area and the way the beach faces run on under the sports, which only share the name's line.
   On that line the name comes first: a long list of sports is cut short ("Kite · Windsurf · Su…"),
   the name only when it can't fit beside a few letters of them. */
.beach-card { grid-template-columns: 48px minmax(0, max-content) minmax(3.5em, 1fr); }
.beach-card .tag { min-width: 0; max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.beach-card .sub { grid-column: 2 / span 2; }
.beach-card .outlook.good, .beach-days .good { color: var(--violet); font-weight: 500; }
.beach-card .outlook + .outlook { margin-top: 2px; } /* a line per sport */
/* Each sport's line starts with its icon, level with the first line when the text wraps. */
.beach-card .outlook.good { align-items: flex-start; }
.beach-card .outlook.good svg { margin-top: 2px; }
.card .name .watch-mark { width: 14px; height: 14px; margin-left: 6px; vertical-align: -1px; color: var(--violet); }

.beach-days { display: grid; margin: 0; padding: 0; list-style: none; font-variant-numeric: tabular-nums; }
.beach-days li { display: grid; grid-template-columns: 6.5em 1fr; gap: 8px; align-items: center; min-height: 40px; border-top: 1px solid var(--line); color: var(--muted); }
.beach-days li:first-child { border-top: 0; }
.beach-days .d { color: var(--ink); font-weight: 500; }

/* Hour by hour: daylight hours, those that suit you in violet. */
.bhours { gap: 3px; }
/* The beach strip's rows have set heights, so the names down its left side (.blegend) line up. */
.bhour, .blegend { display: grid; grid-template-rows: 18px 18px 20px 16px 16px 16px 18px 16px 16px auto; align-items: center; gap: 2px; line-height: 1.2; }
.bhour { flex: none; justify-items: center; width: 56px; padding: 4px 0 8px; border-radius: 12px; font-variant-numeric: tabular-nums; font-size: 0.8125rem; }
.bstrip { display: flex; margin: 0 -16px; }
.bstrip.lake .bhour, .bstrip.lake .blegend { grid-template-rows: 18px 18px 20px 16px 16px 18px auto; }
.bstrip .hours { flex: 1; min-width: 0; margin: 0; padding: 0 16px 6px 4px; }
.blegend { flex: none; justify-items: start; padding: 22px 6px 8px 16px; border-right: 1px solid var(--line); color: var(--muted); font-size: 0.6875rem; font-weight: 500; }
.blegend span { max-width: 5.6em; line-height: 1; } /* a long name ("Mar de fondo") on two lines */
.bhour .swell { width: 16px; height: 16px; color: var(--rain); }
.bhour .sw.away .swell { color: var(--muted); opacity: 0.6; }
.bhour .h { color: var(--muted); }
.bhour .arrow { width: 18px; height: 18px; color: var(--ink); }
.bhour .kn { font-size: 1.125rem; font-weight: 600; line-height: 1.1; }
.bhour .g { color: var(--muted); font-size: 0.75rem; }
.bhour .g::before { content: "G "; }
.bhour .side { min-height: 16px; display: grid; align-items: center; padding: 0 6px; border-radius: 8px; font-size: 0.6875rem; font-weight: 500; white-space: nowrap; }
.bhour .side.onshore, .bhour .side.side-on, .bhour .side.side { color: var(--ink); background: var(--surface-2); }
.bhour .side.side-off, .bhour .side.offshore { color: #b3261e; background: color-mix(in srgb, #b3261e 12%, var(--surface)); }
.bhour .wv { font-weight: 500; }
.bhour .wv.away { color: var(--muted); font-weight: 400; }
.bhour .pd { color: var(--muted); font-size: 0.75rem; }
@media (prefers-color-scheme: dark) {
  .bhour .side.side-off, .bhour .side.offshore { color: #ff8a80; background: color-mix(in srgb, #ff8a80 14%, var(--surface)); }
}

/* The rule: steppers, side chips. */
.setting.stack { flex-direction: column; align-items: stretch; gap: 8px; padding: 12px 0; }
.setting.link { color: var(--ink); text-decoration: none; }
.setting.link svg { flex: none; width: 20px; height: 20px; color: var(--muted); }
/* The bell after a name with alerts on: in Settings' "Alerts on", and the front page's beach link */
.setting .label .watch-mark, .beach-link .watch-mark { width: 14px; height: 14px; margin-left: 5px; vertical-align: -1px; color: var(--violet); }
.alerts-on { scroll-margin-top: 72px; }
.alerts-on .note { margin: 4px 0 12px; }
.toast a { padding: 0 14px; color: var(--bg); font-weight: 600; text-decoration: underline; white-space: nowrap; }
.stepper { display: inline-flex; flex: none; align-items: center; gap: 2px; padding: 2px; border-radius: 22px; background: var(--surface-2); }
.stepper .icon-btn { width: 36px; height: 36px; }
.stepper .icon-btn svg { width: 18px; height: 18px; }
.stepper output { min-width: 3.6em; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { min-height: 36px; padding: 0 12px; border: 1.5px solid var(--line); border-radius: 18px; background: transparent; color: var(--muted); font-weight: 500; font-size: 0.875rem; }
.chip[aria-pressed="true"] { border-color: var(--violet); background: var(--violet); color: var(--on-violet); }

/* Which way it faces. */
.faces-row { display: grid; grid-template-columns: 136px 1fr; gap: 16px; align-items: center; }
.faces .lead { margin: 0 0 6px; }
.faces.unset { outline: 2px solid var(--violet); }
.faces-slider { width: 100%; margin: 4px 0 8px; accent-color: var(--violet); }
.dial { display: block; width: 136px; height: 136px; }
.dial text { fill: var(--muted); font-size: 11px; text-anchor: middle; }
.dial .sea { fill: var(--rain-soft); }
.dial .land { fill: color-mix(in srgb, var(--warm) 22%, var(--surface)); }
.dial .shore { stroke: var(--warm); stroke-width: 2; }
.dial .sea-label { fill: var(--rain); font-size: 12px; font-weight: 600; }
.dial .arc { fill: var(--line); }
.dial .arc.on { fill: var(--violet); }
@media (max-width: 380px) { .faces-row { grid-template-columns: 1fr; justify-items: center; } }
/* This beach: its name, where it is (tap the map to move it) and another beach from it */
.panel.faces h3.sub { margin: 18px 0 8px; font-size: 0.95rem; font-weight: 600; }
.name-row { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; }
.name-row label { font-weight: 600; }
.name-row input, .coords-row input { width: 100%; min-width: 0; font: inherit; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: inherit; }
.pos-map svg { display: block; width: 100%; height: auto; border-radius: 12px; cursor: crosshair; touch-action: manipulation; }
/* The coverage map on Add a beach: radar areas over the land, the beaches as dots (coverHtml). */
.cover { margin: 4px 0 6px; }
.cover svg { display: block; width: 100%; height: auto; border-radius: 12px; }
.cover .cov-radar { fill: rgba(15, 157, 110, 0.22); stroke: #0f9d6e; stroke-width: 1; vector-effect: non-scaling-stroke; }
.cover { position: relative; }
.cover .cover-map { touch-action: pan-y; user-select: none; cursor: grab; }
.cover .cov-spot path { fill: none; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.cover .cov-case { stroke: #fff; stroke-width: 10px; }
.cover .cov-case.on { stroke: var(--violet); stroke-width: 18px; }
.cover .cov-dot { stroke: #1d1a3a; stroke-width: 7px; }
.cover .cov-dot.mine { stroke: var(--violet); }
.cover .cov-dot.on { stroke: #fff; stroke-width: 8px; }
.cover .cov-hit { stroke: transparent; stroke-width: 22px; pointer-events: stroke; }
.cover g[data-action] { cursor: pointer; }
.cover-key .key i { width: 12px; height: 12px; border-radius: 3px; }
.cover-key .key i.k-radar { background: rgba(15, 157, 110, 0.22); border: 1px solid #0f9d6e; }
.cover-key .key i.k-land { background: #f6f5f0; border: 1px solid #c9c7d6; }
.cover-key .key i.k-dot, .cover-key .key i.k-mine { border-radius: 50%; width: 9px; height: 9px; background: #1d1a3a; }
.cover-key .key i.k-mine { background: var(--violet); }
.cover-pick { display: flex; align-items: center; gap: 10px; margin: 10px 0 4px; padding: 10px 12px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.cover-pick > span:nth-child(2) { flex: 1; min-width: 0; }
.cover-pick .where { display: block; color: var(--muted); font-size: 0.8125rem; }
.cover-hint { margin: 8px 0 4px; }
@media (prefers-color-scheme: dark) {
  .cover .cov-dot { stroke: #f3f2fa; }
  .cover .cov-case { stroke: #17142b; }
  .cover .cov-dot.on { stroke: #17142b; }
  .cover-key .key i.k-dot { background: #f3f2fa; }
  .cover-key .key i.k-land { background: #2b2752; border-color: #4a4570; }
}
.pos-actions { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 4px 0 8px; }
.pos-actions .text-btn { display: inline-flex; align-items: center; gap: 6px; }
.coords-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.copy-row { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.copy-row .ghost { display: inline-flex; align-items: center; gap: 6px; }

.row.center { display: flex; justify-content: center; margin: 8px 0; }
.ghost.danger { display: inline-flex; align-items: center; gap: 6px; color: #b3261e; }
.ghost.danger svg { width: 18px; height: 18px; }
@media (prefers-color-scheme: dark) { .ghost.danger { color: #ff8a80; } }

/* Several sports at one beach. */
.beach-days .ws { display: grid; gap: 2px; padding: 6px 0; }
#beach-settings { scroll-margin-top: 72px; }
details.beach-config-details, details.tides-details, details.sea-details, details.charts-details, details.sources-details, details.fold-details { margin: 0 0 12px; padding: 0; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
details.beach-config-details summary.beach-config-summary, details.tides-details summary.tides-summary, details.sea-details summary.sea-summary, details.charts-details summary.charts-summary, details.sources-details summary.sources-summary, details.fold-details summary.fold-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; cursor: pointer; user-select: none; list-style: none; }
details.beach-config-details summary.beach-config-summary::-webkit-details-marker, details.tides-details summary.tides-summary::-webkit-details-marker, details.sea-details summary.sea-summary::-webkit-details-marker, details.charts-details summary.charts-summary::-webkit-details-marker, details.sources-details summary.sources-summary::-webkit-details-marker, details.fold-details summary.fold-summary::-webkit-details-marker { display: none; }
details.beach-config-details summary.beach-config-summary::after, details.tides-details summary.tides-summary::after, details.sea-details summary.sea-summary::after, details.charts-details summary.charts-summary::after, details.sources-details summary.sources-summary::after, details.fold-details summary.fold-summary::after { content: ""; display: inline-block; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform 0.2s ease; margin-left: 8px; flex: none; }
details.beach-config-details[open] summary.beach-config-summary::after, details.tides-details[open] summary.tides-summary::after, details.sea-details[open] summary.sea-summary::after, details.charts-details[open] summary.charts-summary::after, details.sources-details[open] summary.sources-summary::after, details.fold-details[open] summary.fold-summary::after { transform: rotate(-135deg); }
details.beach-config-details[open] summary.beach-config-summary, details.tides-details[open] summary.tides-summary, details.sea-details[open] summary.sea-summary, details.charts-details[open] summary.charts-summary, details.sources-details[open] summary.sources-summary, details.fold-details[open] summary.fold-summary { border-bottom: 1px solid var(--line); }
details.beach-config-details summary .summary-head, details.tides-details summary .summary-head, details.sea-details summary .summary-head, details.charts-details summary .summary-head, details.sources-details summary .summary-head, details.fold-details summary .summary-head { font-weight: 600; font-size: 0.9375rem; color: var(--ink); }
details.beach-config-details summary .summary-sub, details.tides-details summary .summary-sub, details.sea-details summary .summary-sub, details.charts-details summary .summary-sub, details.sources-details summary .summary-sub, details.fold-details summary .summary-sub { font-size: 0.8125rem; color: var(--muted); text-align: right; }
.beach-config-body, .tides-body, .sea-body, .charts-body, .sources-body, .fold-body { padding: 14px 16px 16px; }
.fold-body .group { margin-bottom: 12px; background: var(--bg); box-shadow: none; }
.fold-body .group:last-child { margin-bottom: 0; }
.fold-body .list-head:first-child { margin-top: 0; }
.sources-body > .note:first-child { margin-top: 0; }
.beach-config-body > h2.list-head:first-child { display: none; }
button.h2-note { padding: 0; border: 0; background: none; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
/* A beach's sports: a tab each, the open one joined to what's under it. */
.sport-tabs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin: 0 -16px; padding: 8px 8px 0; border-bottom: 1px solid var(--line); }
.sport-tabs button { display: grid; justify-items: center; gap: 1px; min-width: 0; padding: 8px 2px 6px; border: 0; border-bottom: 3px solid transparent; border-radius: 10px 10px 0 0; background: none; color: var(--muted); font-size: 0.8125rem; font-weight: 500; }
.sport-tabs button svg { width: 24px; height: 24px; }
.sport-tabs button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.sport-tabs button small { font-size: 0.6875rem; font-weight: 400; }
.sport-tabs .on svg, .sport-tabs .on small { color: var(--sport); }
.sport-tabs .on small { font-weight: 600; }
.sport-tabs [aria-selected="true"] { border-bottom-color: var(--sport); background: var(--surface-2); color: var(--ink); }
@media (max-width: 400px) { .sport-tabs button { font-size: 0.6875rem; } }
.name-input { width: 140px; min-height: 36px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); font: inherit; font-size: 0.875rem; }
#sport-panel .usual-note { margin: 8px 0 12px; }
.group-head { display: flex; align-items: center; gap: 8px; margin: 12px 0 4px; font-size: 1rem; font-weight: 600; }
.group-head svg { width: 22px; height: 22px; color: var(--violet); }
.chip.with-icon { display: inline-flex; align-items: center; gap: 6px; }
.chip.with-icon svg { width: 18px; height: 18px; }
.reset-faces { margin-top: 8px; }

/* A colour per sport, so hours and windows for several sports can show side by side. */
:root { --kite: #5b3df5; --windsurf: #0b8a7a; --surf: #d4561c; --sail: #be185d; --other: #0284c7; }
@media (prefers-color-scheme: dark) { :root { --kite: #9c8cff; --windsurf: #3cc9b4; --surf: #ff9566; --sail: #ff8fb8; --other: #38bdf8; } }
.kite { --sport: var(--kite); }
.windsurf { --sport: var(--windsurf); }
.surf { --sport: var(--surf); }
.sail { --sport: var(--sail); }
.other { --sport: var(--other); }
.beach-days .good, .beach-card .outlook.good { color: var(--sport, var(--violet)); }
.beach-days .ws .good::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 4px; background: currentColor; vertical-align: 1px; }
.beach-card .sport-mark, .group-head svg { color: var(--sport, var(--violet)); }
.chip.with-icon[aria-pressed="true"] { border-color: var(--sport); background: var(--sport); }
/* Per hour, one bar per sport: coloured when the hour suits it, so runs of good hours read as
   bands across the strip and several sports stack. */
.bhour .bands { display: grid; justify-self: stretch; margin: 4px -2px 0; }
.bhour .bands i { display: block; height: 7px; margin: 2.5px 0; border-radius: 3.5px; background: var(--surface-2); }
/* The bars' names down the strip's left side, one to each 12px bar, in its colour. */
.blegend .band-names { display: grid; align-self: start; max-width: none; margin-top: 4px; }
.blegend .band-names i { height: 12px; line-height: 12px; color: var(--sport); font-style: normal; font-size: 0.6875rem; font-weight: 600; white-space: nowrap; }
.bhour .bands i.on { background: var(--sport); }
.legend-row { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 10px 0 0; color: var(--muted); font-size: 0.75rem; }
.legend-row .key { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-weight: 500; }
.legend-row .key i { width: 16px; height: 7px; border-radius: 3.5px; background: var(--sport); }
/* Warmth and sun (Settings): bands for the hours that feel warm enough and that want sun cream,
   in the beach and place strips, with their own key. */
:root { --c-warm: #d99400; --c-uv: #0284c7; }
@media (prefers-color-scheme: dark) { :root { --c-warm: #ffc94d; --c-uv: #7dd3fc; } }
.c-warm { --sport: var(--c-warm); }
.c-uv { --sport: var(--c-uv); }
.legend-row.comfort { margin-top: 6px; }
.legend-row.comfort a { color: var(--violet); font-weight: 500; }
.hour .bands { display: grid; gap: 3px; justify-self: stretch; margin: 2px 4px 0; }
.hour .bands i { display: block; height: 6px; border-radius: 3px; background: var(--surface-2); }
.hour .bands i.on { background: var(--sport); }
/* Your usual settings: on a beach, a setting that's just for it, and the way back to yours. */
.setting .label small.own { color: var(--violet); }
.own button, .own-all { padding: 0; border: 0; background: none; color: var(--violet); font: inherit; font-weight: 500; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.group .note.own { margin: 0 0 10px; color: var(--violet); }
.group .note.usual-note { margin: 0 0 4px; }
.note.usual-note a { color: var(--violet); }
.note.list-note { margin: -2px 4px 10px; }
/* Days 4 to 7: a rough outlook. */
.beach-days li.divider { display: block; min-height: 0; padding: 10px 0 4px; border-top: 1px dashed var(--line); color: var(--muted); font-size: 0.75rem; }
.beach-days li.divider + li { border-top: 0; }
.beach-days li.rough .d { color: var(--muted); }
.beach-days li.rough .good { font-weight: 400; }

/* ---------- Wide screens ----------
   A computer gets the room: cards in a grid, and a place's or beach's page in two columns.
   The blocks are the same as on a phone (where they stack in this order); here they're placed
   by name. Settings and the search pages stay narrower, for reading. */
@media (min-width: 960px) {
  #app { --column: 1120px; }
  #app[data-view="settings"], #app[data-view="add"], #app[data-view="beach-add"] { --column: 760px; }

  .places { grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); }

  .place-page, .beach-page { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 16px; align-items: start; }
  .place-page {
    grid-template-areas:
      "top top"
      "hero radar"
      "extras radar"
      "rain radar"
      "wear radar"
      "hours hours"
      "days facts"
      "days maps"
      "foot foot";
    grid-template-rows: auto auto auto auto 1fr;
  }
  .pp-top { grid-area: top; }
  .pp-hero { grid-area: hero; }
  .pp-extras { grid-area: extras; }
  .pp-rain { grid-area: rain; }
  .pp-wear { grid-area: wear; }
  .pp-radar { grid-area: radar; }
  .pp-hours { grid-area: hours; }
  .pp-days { grid-area: days; }
  .pp-facts { grid-area: facts; }
  .pp-maps { grid-area: maps; }
  .pp-foot { grid-area: foot; }

  /* Left: the days, then the settings and the beach itself. Right: the maps, the sea and the tides. */
  .beach-page {
    grid-template-areas:
      "top top"
      "hero hero"
      "strip strip"
      "days look"
      "settings look"
      "foot foot";
    grid-template-rows: auto auto auto auto 1fr auto;
  }
  .bp-top { grid-area: top; }
  .bp-hero { grid-area: hero; }
  .bp-strip { grid-area: strip; }
  .bp-days { grid-area: days; }
  .bp-look { grid-area: look; }
  .bp-settings { grid-area: settings; }
  .bp-foot { grid-area: foot; }
}
/* ---------- Swell and water on a beach's page ---------- */
.sea-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; font-variant-numeric: tabular-nums; }
.sea-table th, .sea-table td { padding: 7px 4px; border-top: 1px solid var(--line); text-align: left; vertical-align: top; }
.sea-table thead th { padding-top: 0; border-top: 0; color: var(--muted); font-size: 0.75rem; font-weight: 500; }
.sea-table tbody th { font-weight: 600; white-space: nowrap; }
.sea-table td small { display: block; color: var(--muted); font-size: 0.75rem; }
.sea-table .away { color: var(--muted); }
.sea-table tr.rough { opacity: 0.72; }
.water { margin: 12px 0 0; }
.water small { display: block; margin-top: 2px; color: var(--muted); font-size: 0.75rem; }

/* A beach's "See it elsewhere" links. */
.sources .links { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.sources .links .text-btn { display: inline-flex; align-items: center; text-decoration: none; font-size: 0.875rem; }
.sources .note { margin: -4px 0 10px; }

/* ---------- Wind map on a beach's page ---------- */
.wind-map svg { display: block; width: 100%; height: auto; border-radius: 12px; }
.windmap .wm-arrows path:not(.head) { stroke-width: 2.4px; stroke-linecap: round; vector-effect: non-scaling-stroke; fill: none; }
.windmap .wm-arrows { filter: drop-shadow(0 0 1px #fff) drop-shadow(0 0 1px #fff); }
/* The swell's crest lines (app.js swellLines): white with a dark edge, to show over pale and deep water. */
.windmap .wm-swell path { fill: none; stroke: #fff; stroke-width: 1.7px; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.windmap .wm-swell { filter: drop-shadow(0 0 1px rgb(16 27 44 / 0.75)); }
.wind-legend.swell-key svg { width: 22px; height: 13px; flex: none; fill: none; stroke: #2f9bc4; stroke-width: 1.8; stroke-linecap: round; }
.wind-slider { flex: 1; min-width: 0; accent-color: var(--violet); }
.wind-time { font-size: 0.9375rem; }
.wind-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 10px; color: var(--muted); font-size: 0.75rem; }
.wind-legend .lab { color: var(--ink); font-weight: 500; }
.wind-legend .key { display: inline-flex; align-items: center; gap: 4px; }
.wind-legend .key i { width: 14px; height: 6px; border-radius: 3px; }
.wind-legend.waves .key i { height: 10px; border-radius: 2px; }
@media (prefers-color-scheme: dark) {
  .windmap .wm-arrows { filter: drop-shadow(0 0 1.2px rgb(0 0 0 / 0.9)); }
}

/* ---------- Tides on a beach's page ---------- */
.tide-chart { display: block; width: 100%; height: auto; margin: 0 0 8px; overflow: visible; }
.tide-chart .area { fill: var(--rain-soft); }
.tide-chart .line { fill: none; stroke: var(--rain); stroke-width: 1.6; }
.tide-chart .night { fill: var(--surface-2); }
.tide-chart .grid { stroke: var(--line); stroke-width: 0.6; }
.tide-chart .zero { stroke: var(--muted); stroke-width: 0.6; stroke-dasharray: 3 2; }
.tide-chart .midnight { stroke: var(--muted); stroke-width: 0.6; opacity: 0.5; }
.tide-chart text { fill: var(--muted); font-size: 8.5px; font-family: var(--font); }
.tide-chart .axis { text-anchor: end; }
.tide-chart .day { fill: var(--ink); font-weight: 600; }
.tide-chart .ev { text-anchor: middle; fill: var(--ink); font-size: 8px; font-variant-numeric: tabular-nums; }
.tide-chart .hw { fill: var(--rain); }
.tide-chart .lw { fill: var(--muted); }
.tide-chart .now { stroke: var(--violet); stroke-width: 1.2; }
.tide-chart .now-label { text-anchor: middle; fill: var(--violet); font-weight: 600; }
.tide-days { display: grid; margin: 0; padding: 0; list-style: none; font-variant-numeric: tabular-nums; font-size: 0.875rem; }
.tide-days li { display: grid; grid-template-columns: 6.5em 1fr; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); }
.tide-days li:first-child { border-top: 0; }
.tide-days .d { font-weight: 500; }
.tide-days .evs { display: flex; flex-wrap: wrap; gap: 2px 12px; }
.tide-days .hw { color: var(--rain); font-weight: 500; }
.tide-days small { color: var(--muted); font-weight: 400; }
.bhour .tide-mark { min-height: 1.2em; color: var(--rain); font-size: 0.6875rem; font-weight: 600; }
.tide-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.sources .raw { margin: 10px 0 0; color: var(--muted); font-size: 0.8125rem; }
.pos-actions .ui, .copy-row .ui { width: 18px; height: 18px; flex: none; }
/* + and − on the beach page's maps */
.wind-map, .pos-map { position: relative; }
.map-zoom { position: absolute; top: 8px; right: 8px; display: flex; flex-direction: column; gap: 6px; }
.map-zoom .icon-btn { width: 34px; height: 34px; background: var(--surface); border-radius: 10px; box-shadow: 0 1px 3px rgb(0 0 0 / 0.18); }
.map-zoom .icon-btn[disabled] { opacity: 0.4; }
/* The strip after the first three days: every 3 hours, paler, with a line where it starts */
.bhour.rough, .hour.rough { opacity: 0.72; }
.bhour.rough-start, .hour.rough-start { border-left: 1.5px dashed var(--muted); padding-left: 6px; }
/* A day of an hour-by-hour strip (app.js dayGroup): its name sticks to the strip's left edge
   while any of its hours are in view, and the next day's name pushes it off. */
.hday { flex: none; display: flex; flex-direction: column; }
.hday .hrow { display: flex; gap: 4px; }
.bhours .hday .hrow { gap: 3px; }
.bhours > .hday + .hday { margin-left: 7px; }
.hday > .dl { position: sticky; left: 0; align-self: flex-start; height: 18px; line-height: 18px; padding: 0 8px; color: var(--ink); font-size: 0.75rem; font-weight: 600; white-space: nowrap; }
/* A quieter note after a panel heading */
.h2-note { font-size: 0.85em; font-weight: 400; color: var(--muted); text-transform: none; letter-spacing: normal; }
/* Adding a beach or a place: the country picker (onto a second line when it doesn't fit), and the
   UK's nations under it */
.country-pick { margin: 12px 0 4px; }
.country-pick .seg { flex-wrap: wrap; }
.country-pick .seg button { min-width: 0; }
.list-head.sub { margin: 12px 4px 6px; text-transform: none; letter-spacing: normal; color: var(--ink); font-weight: 600; font-size: 0.875rem; }
/* Settings: the contents, each section's place under the top bar, and the data list */
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 8px; padding-top: 22px; border-top: 1px solid var(--line); }
.toc a { padding: 7px 12px; border-radius: 16px; background: var(--surface-2); color: var(--ink); text-decoration: none; font-size: 0.875rem; font-weight: 500; }
.prose [id^="s-"] { scroll-margin-top: 72px; }
.prose h3 { margin: 16px 0 4px; font-size: 0.95rem; }
.data-list { padding-left: 18px; }
.data-list li { margin: 0 0 10px; }
/* The UKHO's required credit: Arial, at least 12 px, on two lines, in black or white */
.admiralty-credit { display: block; margin-top: 6px; font: 12px/1.4 Arial, Helvetica, sans-serif; color: var(--ink); }
/* The demo: a strip across the top of every page, and its front page */
.demo-banner { padding: 8px 16px; background: var(--violet); color: var(--on-violet); font-size: 0.8125rem; text-align: center; }
.demo-banner a { color: inherit; font-weight: 600; }
.demo-intro { margin-top: 12px; }
.demo-part { display: flex; align-items: center; gap: 8px; margin: 24px 4px 0; font-size: 1.125rem; font-weight: 600; }
.demo-part svg { flex: none; width: 22px; height: 22px; color: var(--violet); }
.demo-part.beaches { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); }
.demo-part + .list-head { margin-top: 8px; }

/* ---------- Official warnings (src/warnings.js) ---------- */
.warnings h2 { margin-bottom: 4px; }
.warn { --warn: #e0b000; margin: 8px 0 0; padding: 8px 10px; border-left: 4px solid var(--warn); border-radius: 8px; background: color-mix(in srgb, var(--warn) 12%, var(--surface)); }
.warn.lvl-3 { --warn: #f07c00; }
.warn.lvl-4 { --warn: #d32f2f; }
.warn summary { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; list-style: none; }
.warn summary::-webkit-details-marker { display: none; }
.warn summary small { color: var(--muted); white-space: nowrap; }
.warn-mark svg { width: 20px; height: 20px; color: var(--warn); }
.warn-body p { margin: 6px 0 0; white-space: pre-line; overflow-wrap: anywhere; }
.warn-body .warn-words { font-weight: 500; }

/* The home page with both lists (Settings, "Home page"): the other list's heading goes to its page. */
.home-head a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 2px; }
.home-head a:hover { color: var(--ink); }
.home-head svg { width: 14px; height: 14px; }

/* The one-time forecast comparison (compare.html): tables of numbers that scroll sideways on a phone. */
.compare .lede { color: var(--ink); font-size: 1rem; }
.compare strong { color: var(--ink); font-weight: 600; }
.compare ul { margin: 0 0 10px; padding-left: 1.2em; }
.compare li + li { margin-top: 6px; }
.compare .scroll { overflow-x: auto; margin: 0 -16px 12px; padding: 0 16px; }
.compare table { min-width: 100%; border-collapse: collapse; font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
.compare th, .compare td { padding: 6px 12px 6px 0; border-top: 1px solid var(--line); text-align: left; vertical-align: top; white-space: nowrap; }
.compare tr:first-child > * { border-top: 0; }
.compare th { color: var(--ink); font-weight: 600; }
.compare td:first-child { min-width: 9em; color: var(--ink); white-space: normal; }

/* Weather maps (app.js mapsPanel): DWD's chart, white like the paper it imitates, in dark mode too. */
.maps .map-section + .map-section, .charts-body .map-section + .map-section { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.maps .map-subhead, .charts-body .map-subhead { margin: 0 0 6px; font-size: 0.875rem; font-weight: 600; color: var(--ink); }
.maps .chart-img, .charts-body .chart-img { display: block; margin: 4px 0 8px; border-radius: 12px; overflow: hidden; background: #fff; }
.maps .chart-img img, .charts-body .chart-img img { display: block; width: 100%; height: auto; }
.maps .links, .charts-body .links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.maps .links .text-btn, .charts-body .links .text-btn { display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 8px; background: var(--surface-2); color: var(--ink); text-decoration: none; font-size: 0.8125rem; font-weight: 500; }
.maps .links .text-btn:hover, .charts-body .links .text-btn:hover { background: color-mix(in srgb, var(--surface-2) 80%, var(--violet)); }
.maps .map-links .note, .charts-body .map-links .note { margin: 10px 0 0; }
.maps .raw { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }

/* The moving wind map (public/flow.js): dark, like a night sky, in both themes; the land canvas
   with the streaks' canvas over it. One finger scrolls the page, two move and zoom the map. */
.flow-box { min-height: 120px; margin: 4px 0 6px; }
.flow-wrap { position: relative; border-radius: 12px; overflow: hidden; background: #101b2c; }
.flow-wrap canvas { display: block; width: 100%; }
.flow-wrap canvas + canvas { position: absolute; inset: 0; touch-action: pan-y; cursor: grab; }
.maps .flow-note { margin: 8px 0 12px; }
.maps .flow-mode { margin: 2px 0 8px; max-width: 100%; }
@media (max-width: 420px) { .flow-mode button { min-width: 0; padding: 0 9px; font-size: 0.8125rem; } }
.k-high { color: #93c5fd; }
.k-low { color: #fda4af; }

/* The waves map's streaks (public/flow.js) in the key: white for the swell, pale yellow for wind waves. */
.wind-legend .key i.streak { width: 18px; height: 10px; border-radius: 3px; background: linear-gradient(#ffffff, #ffffff) no-repeat center / 12px 2px, #3a63c0; }
.wind-legend .key i.streak.wind { background: linear-gradient(#ffde8c, #ffde8c) no-repeat center / 12px 2px, #3a63c0; }
/* What swell and wind waves are, under the waves map's key. */
.maps .waves-note { margin-top: 10px; }

/* The map panel's heading: which of its two maps is on show (Local vs Wide area). */
.map-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -4px 0 10px; }
.map-head h2 { margin: 0; }
.map-head .seg { flex: none; }
@media (max-width: 359px) { .map-head .seg button { min-width: 0; padding: 0 8px; font-size: 0.8125rem; } }

/* Folded explanatory text under "About this". */
.about { margin-top: 8px; }
.about summary { display: inline-flex; align-items: center; min-height: 32px; color: var(--muted); font-size: 0.75rem; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; list-style: none; }
.about summary::-webkit-details-marker { display: none; }
.panel .about .source { margin-top: 2px; }

/* SkyBob aviation styles */
.card .sky-line {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  font-size: 0.8125rem;
  color: var(--muted);
}
.card .sky-apt { font-weight: 600; color: var(--ink); }
.flt-cat {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #fff;
}
.flt-vfr { background: #1e8e3e; }
.flt-mvfr { background: #1a73e8; }
.flt-ifr { background: #d93025; }
.flt-lifr { background: #a142f4; }

.sky-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
  margin: 0 0 14px;
}
.sky-grid dt { font-size: 0.75rem; color: var(--muted); }
.sky-grid dd { margin: 2px 0 0; font-size: 0.9375rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.sky-warn { display: inline-block; margin-left: 4px; color: #c5221f; font-size: 0.75rem; font-weight: 600; }
@media (prefers-color-scheme: dark) { .sky-warn { color: #ff8a80; } }

.sky-sub { margin: 12px 0 8px; font-size: 0.875rem; font-weight: 600; }
.sky-airports { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.sky-airports li { padding-top: 8px; border-top: 1px solid rgb(128 128 128 / 0.16); }
.sky-airports li:first-child { padding-top: 0; border-top: 0; }
.sky-apt-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sky-apt-name { color: var(--muted); font-size: 0.85rem; }
.sky-apt-dist { margin-left: auto; color: var(--muted); font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.sky-apt-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; font-size: 0.8125rem; color: var(--muted); }
.sky-raw { margin-top: 4px; font-size: 0.75rem; color: var(--muted); }
.sky-raw summary { cursor: pointer; }
.sky-raw code, .sky-hazards code {
  display: block;
  margin-top: 4px;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgb(128 128 128 / 0.1);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
  white-space: pre-wrap;
  word-break: break-word;
}
.sky-hazards { margin-top: 14px; }
.sky-hazards h3 { margin: 0 0 6px; font-size: 0.875rem; color: #c5221f; }
@media (prefers-color-scheme: dark) { .sky-hazards h3 { color: #ff8a80; } }
.sky-hazards ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 0.8125rem; }

.sky-radius-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.sky-radius-lab { font-size: 0.8125rem; color: var(--muted); }
.sky-icao-badge {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  padding: 2px 6px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--violet) 14%, transparent);
  color: var(--violet);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
  font-weight: 700;
}

.sky-hero { display: grid; gap: 10px; }
.sky-hero-top { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; }
.sky-hero-cat { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.sky-hero-ratio { font-size: 0.9375rem; font-weight: 600; }
.sky-pills { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.sky-pill {
  padding: 4px 8px;
  border-radius: 8px;
  background: rgb(128 128 128 / 0.1);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}
.sky-pill b { color: var(--muted); font-weight: 500; margin-right: 3px; }
.sky-pill.warn { background: rgb(217 48 37 / 0.14); color: #c5221f; }
@media (prefers-color-scheme: dark) { .sky-pill.warn { color: #ff8a80; } }

.sky-route-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--violet) 10%, transparent);
  font-size: 0.875rem;
}
.sky-route-input input {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 10px;
  padding: 8px 10px;
  border: 1px solid rgb(128 128 128 / 0.28);
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.875rem;
}
.sky-route-results { margin-bottom: 12px; }
.sky-map-wrap { margin: 12px 0; }
.sky-map {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  background: rgb(128 128 128 / 0.06);
  color: var(--ink);
}
.sky-map-dot { cursor: pointer; }
.sky-apt-card {
  margin-top: 8px;
  padding: 10px;
  border-radius: 8px;
  background: rgb(128 128 128 / 0.07);
}
.sky-airports-fold { margin-top: 10px; }
.sky-table-wrap { overflow-x: auto; margin-bottom: 10px; }
.sky-table { width: 100%; border-collapse: collapse; font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
.sky-table th, .sky-table td { text-align: left; padding: 5px 6px; border-bottom: 1px solid rgb(128 128 128 / 0.15); white-space: nowrap; }
.sky-table th { color: var(--muted); font-weight: 500; font-size: 0.75rem; }

.sky-rows {
  grid-column: 1 / -1;
  display: grid;
  gap: 3px;
  font-size: 0.8125rem;
  line-height: 1.35;
  color: var(--muted);
}
.sky-loc-row strong { color: var(--ink); font-weight: 600; }
.sky-map-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.sky-map-bar .note { margin: 0; }
.sky-radar-btn {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid rgb(128 128 128 / 0.25);
}
.sky-radar-btn[aria-pressed="true"] {
  background: rgb(91 61 245 / 0.14);
  border-color: rgb(91 61 245 / 0.45);
  color: var(--violet);
}
.sky-map-btns { display: flex; align-items: center; gap: 4px; flex: none; }
.sky-map { cursor: grab; touch-action: none; user-select: none; }

.sky-land path {
  fill: color-mix(in srgb, var(--surface) 75%, #dce3ec);
  stroke: rgb(100 116 139 / 0.45);
}
@media (prefers-color-scheme: dark) {
  .sky-land path {
    fill: rgb(255 255 255 / 0.08);
    stroke: rgb(148 163 184 / 0.35);
  }
}

.sky-loc-row { display: grid; gap: 1px; }
.sky-loc-name { color: var(--ink); font-weight: 600; }
.sky-loc-data { color: var(--muted); }
.card .sub.sky-route-sub { white-space: normal; }
.card.sky-route-card { grid-template-columns: 88px 1fr auto; }
.sky-bobs {
  grid-row: 1 / span 2;
  display: flex;
  align-items: center;
  gap: 2px;
  width: 88px;
}
.sky-bobs .wx { width: 36px; height: 36px; flex: none; }
.sky-bobs-arrow { font-size: 0.875rem; font-weight: 700; color: var(--muted); line-height: 1; }
.sky-hero .sky-bobs { width: auto; gap: 4px; }
.sky-hero .sky-bobs .wx { width: 46px; height: 46px; }
.sky-hero .sky-bobs-arrow { font-size: 1.125rem; }
.sky-profile-svg {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 6px;
  border-radius: 10px;
  background: rgb(128 128 128 / 0.06);
}
.sky-profile-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 0 0 8px;
  font-size: 0.75rem;
  color: var(--muted);
}
.sky-profile-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.sky-profile-legend .leg-line {
  display: inline-block;
  width: 14px;
  height: 0;
  border-top: 2px dashed currentColor;
}
.sky-profile-legend .leg-line.cruise { color: #5B3DF5; }
.sky-profile-legend .leg-line.freeze { color: #1a73e8; }
.sky-profile-legend .leg-box {
  display: inline-block;
  width: 11px;
  height: 8px;
  border-radius: 2px;
}
.sky-profile-legend .leg-box.cloud { background: #94a3b8; opacity: 0.65; }
.sky-profile-legend .leg-box.terrain { background: rgb(92 128 56 / 0.5); border: 1px solid rgb(74 108 42 / 0.85); }
.sky-map-stage {
  position: relative;
}
.sky-map-btns.floating {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sky-map-btns.floating .icon-btn {
  width: 34px;
  height: 34px;
  font-size: 1rem;
  border: 0;
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.18);
}
.sky-map-scale-wrap {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  pointer-events: none;
  z-index: 2;
}
.sky-scale-bar {
  display: inline-block;
  height: 5px;
  border: 1.5px solid var(--ink);
  border-top: 0;
  opacity: 0.75;
}
.sky-add-picked {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}
.sky-add-btn {
  align-self: flex-start;
  padding: 9px 16px;
  border-radius: 10px;
  font-weight: 600;
}
.sky-scale-lbl {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--ink);
  opacity: 0.8;
  text-shadow: 0 1px 2px rgb(255 255 255 / 0.8);
}
@media (prefers-color-scheme: dark) {
  .sky-scale-lbl { text-shadow: 0 1px 2px rgb(0 0 0 / 0.8); }
}
.sky-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgb(15 15 24 / 0.55);
  backdrop-filter: blur(4px);
}
.sky-modal {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  color: var(--ink);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 12px 40px rgb(0 0 0 / 0.28);
  display: grid;
  gap: 12px;
}
.sky-modal h2 {
  margin: 0;
  font-size: 1.125rem;
}
.sky-modal p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--muted);
}
.sky-modal .primary {
  width: 100%;
  margin-top: 4px;
}
.sky-model-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  margin: 8px 0 4px;
  padding-bottom: 4px;
}
.sky-model-card {
  flex: 0 0 88%;
  scroll-snap-align: start;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgb(128 128 128 / 0.06);
}
.sky-model-card .sky-sub { margin-top: 0; }
