/* =====================================================================
   Kitelyx – design system
   Dark "ocean" theme, map-first layout, glass panels, rounded cards.
   ===================================================================== */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../vendor/fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../vendor/fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --ink: #06111c;
  --panel: rgba(9, 20, 33, 0.9);
  --panel-solid: #0b1a2b;
  --card: rgba(255, 255, 255, 0.045);
  --card-2: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.09);
  --text: #eaf2fb;
  --muted: #8da2b8;
  --accent: #22d3ee;
  --accent-2: #3b82f6;
  --hot: #ff7a3d;
  --gold: #fbbf24;
  --good: #34d399;
  --bad: #f87171;
  --grad: linear-gradient(135deg, #22d3ee 0%, #3b82f6 100%);
  --grad-hot: linear-gradient(135deg, #ff9f43 0%, #ff6b3d 100%);
  --grad-good: linear-gradient(135deg, #34d399 0%, #10b981 100%);
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.38);
  --radius: 18px;
  --safe-top: max(env(safe-area-inset-top, 0px), var(--safe-area-inset-top, 0px));
  --safe-bottom: max(env(safe-area-inset-bottom, 0px), var(--safe-area-inset-bottom, 0px));
  --peek-h: 200px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--ink);
  color: var(--text);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--accent); }
button { font-family: inherit; }
h2 { margin: 0 0 4px; font-size: 1.15rem; font-weight: 750; letter-spacing: -0.01em; }
h3 { margin: 22px 0 10px; font-size: 0.95rem; font-weight: 700; letter-spacing: -0.01em; }
.hint, .muted { color: var(--muted); }
.hint { font-size: 0.84rem; line-height: 1.45; margin: 4px 0 10px; }
.small { font-size: 0.8rem; }
.loading { color: var(--muted); padding: 10px 0; }
.error { color: var(--bad); }
.good-text { color: var(--good); }
.bad-text { color: var(--bad); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; }

.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* ---------- Map (full screen) ---------- */
.map { position: fixed; inset: 0; z-index: 0; background: #0a1826; }

/* ---------- Top bar ---------- */
.topbar {
  position: fixed; z-index: 1000;
  top: calc(12px + var(--safe-top)); left: 16px; right: 16px;
  display: flex; align-items: center; gap: 10px;
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.brand {
  display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 16px 0 8px;
  background: var(--panel); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border); border-radius: 999px; box-shadow: var(--shadow);
  font-weight: 800; letter-spacing: -0.02em; font-size: 1.05rem;
}
.brand img { border-radius: 10px; }
.search { position: relative; flex: 1; min-width: 0; max-width: 520px; display: flex; align-items: center; }
.search-ic { position: absolute; left: 16px; z-index: 1; color: var(--muted); pointer-events: none; }
.search input {
  width: 100%; height: 48px; padding: 0 16px 0 48px;
  background: var(--panel); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  color: var(--text); font: inherit; font-size: 0.98rem;
  border: 1px solid var(--border); border-radius: 999px; outline: none; box-shadow: var(--shadow);
}
.search input::placeholder { color: var(--muted); }
.search input:focus { border-color: rgba(34, 211, 238, 0.55); box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.15), var(--shadow); }
.search-results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; margin: 0; padding: 6px; list-style: none;
  background: var(--panel-solid); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow);
  max-height: 60vh; overflow-y: auto;
}
.search-results li { padding: 10px 12px; border-radius: 10px; cursor: pointer; font-size: 0.92rem; }
.search-results li:hover { background: var(--card-2); }
.search-results li.muted { cursor: default; }
.top-actions { display: flex; gap: 8px; margin-left: auto; }
.round-btn {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 48px; height: 48px; padding: 0 12px; border-radius: 999px; cursor: pointer;
  background: var(--panel); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  color: var(--text); border: 1px solid var(--border); box-shadow: var(--shadow);
  font-weight: 700; font-size: 0.85rem; transition: background .15s, border-color .15s;
}
.round-btn[hidden] { display: none; }
.round-btn:hover, .round-btn.active { background: var(--panel-solid); border-color: rgba(34, 211, 238, 0.5); }
.round-btn.active { color: var(--accent); }
.lang-btn .ic { width: 20px; height: 20px; }
.account-btn.signed-in .ic { display: none; }
.account-initial {
  width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--grad); color: #04121f; font-weight: 800; font-size: 0.95rem;
}
.account-initial[hidden] { display: none; }
.account-btn.signed-in { padding: 0 8px; }

/* ---------- Panel / bottom sheet ---------- */
.sheet {
  position: fixed; z-index: 900;
  top: calc(var(--safe-top) + 12px + 48px + 14px); left: 16px; bottom: 16px; width: 410px;
  display: flex; flex-direction: column;
  background: var(--panel); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border); border-radius: 24px; box-shadow: var(--shadow);
  overflow: hidden;
}
.sheet-handle { display: none; }
.sheet-body { flex: 1; overflow-y: auto; padding: 18px 18px 12px; overscroll-behavior: contain; }
.sheet-body::-webkit-scrollbar { width: 8px; }
.sheet-body::-webkit-scrollbar-thumb { background: var(--card-2); border-radius: 8px; }

.tabbar {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--border); padding: 6px 8px calc(6px + var(--safe-bottom));
  background: rgba(6, 15, 26, 0.6);
}
.tab {
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 4px;
  background: none; border: none; border-radius: 14px; cursor: pointer;
  color: var(--muted); font-size: 0.72rem; font-weight: 650;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--accent); background: rgba(34, 211, 238, 0.1); }
.tab-ic { position: relative; display: flex; }
.map-tab { display: none; }
@media (max-width: 899px) { .map-tab { display: flex; } }
.lvl-badge {
  position: absolute; right: -10px; top: -6px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--gold); color: #1d1400; font-size: 10.5px; font-weight: 800; line-height: 18px; text-align: center;
}

/* Phones: bottom sheet */
@media (max-width: 899px) {
  .brand { display: none; }
  .topbar { left: 12px; right: 12px; gap: 8px; }
  .round-btn { min-width: 44px; height: 44px; padding: 0 10px; }
  .search input { height: 44px; }
  .lang-btn span { display: none; }
  /* Pages (Spots, Progress, Settings, Account, Spot detail) cover the whole screen below the top bar */
  .sheet {
    top: 0; left: 0; right: 0; bottom: 0; width: auto; height: auto;
    padding-top: calc(var(--safe-top) + 12px + 44px + 10px);
    border: none; border-radius: 0; box-shadow: none;
    background: var(--ink); backdrop-filter: none; -webkit-backdrop-filter: none;
  }
  .sheet-handle { display: none; }
  .sheet-body { padding-top: 6px; }
  /* Map tab: only the tab bar stays visible */
  .sheet[data-state="map"] { top: auto; padding-top: 0; background: transparent; }
  .sheet[data-state="map"] .sheet-body { display: none; }
  .tabbar { grid-template-columns: repeat(5, minmax(0, 1fr)); background: var(--panel-solid); }
  .sheet[data-state="map"] .tabbar { border-top-color: var(--border); }

  /* Give the search field room: installing stays available under Settings */
  #install-btn { display: none; }
  .top-actions { gap: 6px; }
  .search-ic { left: 14px; z-index: 1; }
  .search input { padding: 0 12px 0 42px; text-overflow: ellipsis; }
  /* iOS zooms into inputs with text smaller than 16px */
  .search input, select, input[type="text"], input[type="email"], input[type="password"], input[type="search"],
  .modal-card input:not([type="checkbox"]):not([type="radio"]) { font-size: 16px; }
  .sheet-body { padding-left: 16px; padding-right: 16px; }
}

/* Small phones (e.g. iPhone SE, older Androids) */
@media (max-width: 374px) {
  .topbar { left: 8px; right: 8px; gap: 6px; }
  .round-btn { min-width: 40px; height: 40px; padding: 0 8px; }
  .search input { height: 40px; }
  .top-actions { gap: 4px; }
  .now-card { gap: 12px; padding: 14px; }
  .now-speed { font-size: 2.8rem; }
  .now-main { min-width: 80px; }
  .compass { width: 92px; height: 92px; }
  .stats-grid b { font-size: 1.1rem; }
  .lang-list.soon { grid-template-columns: repeat(2, 1fr); }
}

/* Phones in landscape: little height, so the sheet uses more of it */
@media (max-width: 899px) and (max-height: 500px) {
  .tabbar { padding-top: 2px; padding-bottom: calc(2px + var(--safe-bottom)); }
  .tab { flex-direction: row; justify-content: center; gap: 6px; padding: 5px 4px; }
  .tab-ic { margin-right: 10px; }
  .sheet-body > section { max-width: 640px; margin: 0 auto; }
  .leaflet-container .leaflet-bottom { bottom: calc(44px + var(--safe-bottom)); }
}

/* Taps react immediately and do not trigger double-tap zoom */
button, a, label, select, .tab, .spot-list li, .logbook li { touch-action: manipulation; }

/* ---------- Leaflet controls ---------- */
.leaflet-top { top: calc(var(--safe-top) + 12px + 48px + 14px); }
.leaflet-left { left: 440px; }
.leaflet-bar, .leaflet-control-layers {
  border: 1px solid var(--border) !important; border-radius: 14px !important; overflow: hidden;
  box-shadow: var(--shadow) !important; background: var(--panel) !important;
}
.leaflet-bar a { background: transparent !important; color: var(--text) !important; border-bottom-color: var(--border) !important; width: 40px !important; height: 40px !important; line-height: 40px !important; }
.leaflet-control-layers-toggle { width: 44px !important; height: 44px !important; filter: invert(1) brightness(1.2); }
.leaflet-control-layers-expanded { color: var(--text); padding: 10px 14px !important; font: 600 0.9rem "Inter", sans-serif; }
.leaflet-control-attribution { background: rgba(6, 17, 28, 0.65) !important; color: #b8c7d6 !important; border-radius: 8px 0 0 0; font-size: 10px !important; }
.leaflet-control-attribution a { color: #d6e4f2 !important; }
.maptiler-logo { display: block; line-height: 0; margin: 0 0 6px 8px !important; }
@media (max-width: 899px) {
  .leaflet-left { left: 0; }
  .leaflet-control-zoom { display: none; }
  .leaflet-top { top: calc(var(--safe-top) + 12px + 44px + 10px); }
  .leaflet-bottom { bottom: calc(62px + var(--safe-bottom)); }
}

/* ---------- Map markers ---------- */
.spot-marker { position: relative; width: 40px; height: 40px; }
.spot-marker .ring {
  position: absolute; inset: 5px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font: 800 12px "Inter", system-ui, sans-serif; letter-spacing: -0.02em;
  border: 2px solid rgba(255, 255, 255, 0.95); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
.spot-marker .arrow { position: absolute; inset: 0; }
.spot-marker .arrow::before {
  content: ""; position: absolute; left: 50%; top: -4px; transform: translateX(-50%);
  border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 10px solid #ffffff;
  filter: drop-shadow(0 0 1.5px rgba(0, 0, 0, 0.9));
}
.spot-marker.fav .ring { border-color: var(--gold); border-width: 3px; }
.spot-marker .star { position: absolute; right: -2px; top: -5px; font-size: 14px; color: var(--gold); text-shadow: 0 0 3px #000; }
.spot-marker .stamp {
  position: absolute; left: -3px; bottom: -3px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--hot); color: #fff; font-size: 10px; font-weight: 800; line-height: 16px; text-align: center; border: 1.5px solid #fff;
}
.spot-marker.wrong-dir .ring { opacity: 0.5; }
.spot-marker.windspot .ring { border-style: dashed; }

/* ---------- Generic UI ---------- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; margin: 12px 0; }
.card[hidden] { display: none; }
.card-title { font-weight: 700; font-size: 0.92rem; margin-bottom: 8px; }
.view-title { font-size: 1.35rem; margin: 2px 0 6px; }
.section-head { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }

.primary-btn, .ghost-btn, .back-btn, .danger-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: 650 0.92rem "Inter", system-ui, sans-serif; border-radius: 12px; padding: 10px 16px; cursor: pointer;
  transition: transform .08s, filter .15s, background .15s;
}
.primary-btn[hidden], .ghost-btn[hidden] { display: none; }
.primary-btn { background: var(--grad); color: #04121f; border: none; box-shadow: 0 6px 18px rgba(34, 211, 238, 0.25); }
.primary-btn:hover { filter: brightness(1.08); }
.primary-btn:active, .ghost-btn:active { transform: scale(0.97); }
.primary-btn:disabled { opacity: 0.6; cursor: wait; }
.ghost-btn { background: var(--card); color: var(--text); border: 1px solid var(--border); }
.ghost-btn:hover { background: var(--card-2); }
.back-btn { background: none; color: var(--muted); border: none; padding: 6px 8px 6px 2px; margin: 0 0 6px; }
.back-btn:hover { color: var(--text); }
.back-btn .ic { width: 20px; height: 20px; }
.danger-btn { background: rgba(248, 113, 113, 0.14); color: var(--bad); border: 1px solid rgba(248, 113, 113, 0.35); margin-top: 8px; }
.file-btn { cursor: pointer; }

select, input[type="text"], input[type="email"], input[type="password"], .modal-card input:not([type="checkbox"]):not([type="radio"]) {
  width: 100%; padding: 11px 12px; border-radius: 12px; font: inherit; font-size: 0.95rem;
  background: rgba(0, 0, 0, 0.25); color: var(--text); border: 1px solid var(--border); outline: none;
}
select:focus, input:focus { border-color: rgba(34, 211, 238, 0.55); }
option { background: var(--panel-solid); color: var(--text); }
input[type="range"] { width: 100%; accent-color: var(--accent); margin-top: 8px; }
input[type="checkbox"] { accent-color: var(--accent); width: 18px; height: 18px; }
.field { display: block; margin: 12px 0; font-size: 0.9rem; }
.field output { float: right; font-weight: 700; color: var(--accent); }
.field.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.field.row select { width: auto; min-width: 110px; }
.check { display: flex; gap: 10px; align-items: center; font-size: 0.92rem; cursor: pointer; margin: 6px 0; }

/* ---------- Legend + spot list ---------- */
.legend { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 14px; }
.legend span { display: inline-flex; align-items: center; gap: 5px; font-size: 0.72rem; color: var(--muted); background: var(--card); border: 1px solid var(--border); border-radius: 999px; padding: 3px 9px; }
.legend i { width: 8px; height: 8px; border-radius: 50%; }

.spot-list { list-style: none; margin: 0; padding: 0; }
.spot-list li[data-id] {
  display: flex; align-items: center; gap: 12px; padding: 12px; margin-bottom: 8px;
  background: var(--card); border: 1px solid var(--border); border-radius: 16px; cursor: pointer;
  transition: background .15s, transform .08s;
}
.spot-list li[data-id]:hover { background: var(--card-2); }
.spot-list li[data-id]:active { transform: scale(0.99); }
.spot-info { flex: 1; min-width: 0; }
.all-spots { display: block; margin: 6px 0 14px; padding: 10px 0; font-weight: 650; font-size: 0.9rem; text-decoration: none; }
.spot-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -0.01em; }
.spot-meta { font-size: 0.78rem; color: var(--muted); margin-top: 2px; }
.spot-dir { display: flex; flex-direction: column; align-items: center; color: var(--muted); }
.spot-dir small { font-size: 0.68rem; font-weight: 600; }
.pill {
  display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 32px; padding: 0 8px;
  border-radius: 11px; color: #fff; font-weight: 800; font-size: 0.95rem; letter-spacing: -0.02em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
table.daily .pill { min-width: 32px; height: 24px; font-size: 0.82rem; border-radius: 8px; }
#fav-section h2 { margin: 4px 0 8px; }
#fav-section .spot-list { margin-bottom: 18px; }
.fav-empty { border: 1px dashed var(--border); border-radius: 14px; padding: 10px 12px; }

.alerts-box { background: linear-gradient(135deg, rgba(251, 191, 36, 0.12), rgba(255, 122, 61, 0.08)); border: 1px solid rgba(251, 191, 36, 0.3); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 16px; }
.alerts-box h2 { font-size: 0.98rem; }
.alerts-box .hint { margin: 4px 0 0; }
.alert-list { margin: 6px 0 0; padding-left: 18px; font-size: 0.86rem; }
.alert-list li { padding: 3px 0; cursor: pointer; }
.alert-list li:hover { color: var(--accent); }

/* ---------- Detail ---------- */
.detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.detail-title { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; margin: 0; }
.detail-sub { color: var(--muted); font-size: 0.85rem; margin-top: 2px; }
.coords { display: block; font-size: 0.72rem; margin-top: 2px; opacity: 0.8; }
.fav-btn {
  width: 44px; height: 44px; border-radius: 50%; font-size: 1.4rem; line-height: 1; flex-shrink: 0;
  background: var(--card); color: var(--muted); border: 1px solid var(--border); cursor: pointer;
}
.head-btns { display: flex; gap: 8px; flex-shrink: 0; }
#share-btn { display: grid; place-items: center; }
.fav-btn.on { color: var(--gold); border-color: rgba(251, 191, 36, 0.5); background: rgba(251, 191, 36, 0.1); }

.now-card {
  display: flex; gap: 18px; align-items: center; margin-top: 14px; padding: 18px;
  border-radius: 22px; border: 1px solid var(--border);
  background: linear-gradient(135deg, var(--c), rgba(255, 255, 255, 0.03) 75%);
  background: linear-gradient(135deg, color-mix(in srgb, var(--c) 55%, transparent), rgba(255, 255, 255, 0.03) 80%);
}
.now-main { text-align: center; min-width: 96px; }
.now-speed { font-size: 3.4rem; font-weight: 850; line-height: 1; letter-spacing: -0.04em; color: #fff; }
.now-speed small { font-size: 0.95rem; font-weight: 700; margin-left: 3px; opacity: 0.85; }
.now-label { display: inline-block; margin-top: 8px; padding: 3px 10px; border-radius: 999px; background: rgba(0, 0, 0, 0.28); font-weight: 700; font-size: 0.8rem; }
.now-details { font-size: 0.9rem; display: grid; gap: 5px; }
.now-details b { font-weight: 750; }
.wind-arrow { vertical-align: middle; }

.session-box {
  display: flex; flex-direction: column; gap: 8px; margin-top: 12px; padding: 14px;
  border-radius: var(--radius); border: 1px solid rgba(255, 122, 61, 0.3);
  background: linear-gradient(135deg, rgba(255, 122, 61, 0.12), rgba(251, 191, 36, 0.06));
}
.session-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.session-actions .primary-btn { flex: 1; }
.log-btn { background: var(--grad-hot); color: #fff; box-shadow: 0 6px 18px rgba(255, 122, 61, 0.3); }
.checkin-btn { background: var(--grad-good); color: #03140d; box-shadow: 0 6px 18px rgba(52, 211, 153, 0.25); }

.dir-box { display: flex; gap: 14px; align-items: center; margin-top: 12px; padding: 12px 14px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.dir-box p { margin: 4px 0; }
.compass { width: 108px; height: 108px; flex-shrink: 0; }
.compass .sector { fill: rgba(255, 255, 255, 0.035); stroke: var(--border); stroke-width: 1; }
.compass .good { fill: rgba(52, 211, 153, 0.32); stroke: var(--good); stroke-width: 1; }
.compass .clabel { fill: var(--muted); font-size: 8px; font-family: "Inter", sans-serif; font-weight: 600; }
.compass .cwind { stroke: #fff; stroke-width: 3; }
.compass .cwind-head { fill: #fff; }

table.daily { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
table.daily th { text-align: left; color: var(--muted); font-weight: 600; font-size: 0.75rem; padding: 4px; }
table.daily td { padding: 7px 4px; border-top: 1px solid var(--border); white-space: nowrap; }
.kite-hours { display: inline-block; width: 40px; height: 6px; background: rgba(255, 255, 255, 0.1); border-radius: 3px; vertical-align: middle; overflow: hidden; }
.kite-hours div { height: 100%; background: var(--grad-good); }

.chart-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 6px 2px; }
.chart { width: 100%; min-width: 320px; height: auto; display: block; }
.obs-box { margin-top: 10px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; }
.obs-head { font-weight: 700; font-size: 0.9rem; margin-bottom: 6px; }
.obs-head::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #34d399; margin-right: 7px; box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.2); }
.obs-main { display: flex; align-items: center; gap: 14px; }
.obs-speed { font-size: 2rem; font-weight: 800; line-height: 1; letter-spacing: -0.03em; }
.obs-speed small { font-size: 0.8rem; margin-left: 2px; }
.obs-cmp { margin-top: 8px; }
.obs-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 5px; }
.obs-list li { display: flex; align-items: center; gap: 8px; }
.obs-list .pill { min-width: 30px; height: 22px; font-size: 0.78rem; border-radius: 7px; }
.obs-box .tiny { font-size: 0.7rem; margin: 8px 0 0; }
.model-line { margin: 8px 2px 0; line-height: 1.45; }
.compare-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 8px 2px; font-size: 0.8rem; }
.compare-legend i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.agree-row { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.agree { flex: 0 0 auto; padding: 5px 9px; border-radius: 10px; font-size: 0.75rem; background: var(--card); border: 1px solid var(--border); display: flex; flex-direction: column; }
.agree span { color: var(--muted); }
.agree-high b { color: #34d399; } .agree-mid b { color: #fbbf24; } .agree-low b { color: #f87171; }
.chart .grid { stroke: rgba(255, 255, 255, 0.08); stroke-width: 0.5; }
.chart .axis { fill: var(--muted); font-size: 9px; font-family: "Inter", sans-serif; }
.chart .day-sep { stroke: rgba(255, 255, 255, 0.18); stroke-width: 0.5; stroke-dasharray: 2 2; }
.chart .gust-line { fill: none; stroke: #e2e8f0; stroke-width: 1; opacity: 0.65; }
.chart .now-line { stroke: var(--hot); stroke-width: 1.5; }
.chart .min-line { stroke: var(--good); stroke-width: 0.8; stroke-dasharray: 4 3; }

.verify { font-size: 0.85rem; padding: 10px 12px; border-radius: 12px; background: var(--card); margin: 12px 0 0; }
.verify.ok { background: rgba(52, 211, 153, 0.14); color: var(--good); }
.verify.warn { background: rgba(251, 191, 36, 0.12); }

/* ---------- Progress (gamification) ---------- */
.level-card {
  display: flex; align-items: center; gap: 14px; margin: 12px 0; padding: 16px;
  border-radius: 22px; color: #fff; background: linear-gradient(135deg, #0891b2 0%, #2563eb 55%, #7c3aed 100%);
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.3);
}
.level-num {
  width: 58px; height: 58px; flex-shrink: 0; border-radius: 50%;
  background: var(--gold); color: #1d1400; font-size: 1.6rem; font-weight: 900;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.25);
}
.level-info { flex: 1; min-width: 0; }
.level-title { font-weight: 800; font-size: 1.12rem; letter-spacing: -0.01em; }
.level-card .muted { color: rgba(255, 255, 255, 0.8); }
.xp-bar { height: 10px; border-radius: 5px; background: rgba(255, 255, 255, 0.25); overflow: hidden; margin: 7px 0 5px; }
.xp-bar div { height: 100%; background: linear-gradient(90deg, var(--gold), var(--hot)); border-radius: 5px; transition: width .6s; }
.xp-bar.small { height: 7px; background: rgba(255, 255, 255, 0.1); }
.streak { display: flex; flex-direction: column; align-items: center; font-size: 1.4rem; line-height: 1.1; }
.streak b { font-size: 1.1rem; }
.streak small { font-size: 0.7rem; color: rgba(255, 255, 255, 0.8); }

.challenge-card { background: var(--card); border: 1px solid var(--border); border-left: 4px solid var(--hot); border-radius: var(--radius); padding: 12px 14px; font-size: 0.9rem; }
.challenge-card.done { border-left-color: var(--good); }
.challenge-head { display: flex; justify-content: space-between; align-items: center; font-weight: 700; margin-bottom: 4px; }
.xp-chip { background: rgba(251, 191, 36, 0.16); color: var(--gold); border-radius: 999px; padding: 2px 8px; font-size: 0.74rem; font-weight: 750; white-space: nowrap; }
.xp-chip.none { background: var(--card-2); color: var(--muted); }

.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0; }
.stats-grid div { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 10px 6px; text-align: center; }
.stats-grid b { display: block; font-size: 1.3rem; font-weight: 800; letter-spacing: -0.02em; }
.stats-grid span { font-size: 0.7rem; color: var(--muted); }

.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.badge { text-align: center; padding: 10px 6px; border-radius: 14px; border: 1px solid var(--border); background: var(--card); opacity: 0.38; filter: grayscale(1); }
.badge.on { opacity: 1; filter: none; border-color: rgba(251, 191, 36, 0.5); background: rgba(251, 191, 36, 0.08); }
.badge-icon { font-size: 1.7rem; }
.badge-name { font-size: 0.78rem; font-weight: 750; margin-top: 2px; }
.badge-desc { font-size: 0.67rem; color: var(--muted); }

.logbook { list-style: none; margin: 0; padding: 0; }
.logbook li { display: flex; align-items: center; gap: 8px; padding: 10px 12px; margin-bottom: 6px; background: var(--card); border: 1px solid var(--border); border-radius: 14px; cursor: pointer; }
.logbook li:hover { background: var(--card-2); }
.log-main { flex: 1; min-width: 0; }
.del-btn { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 0.95rem; padding: 4px; }
.del-btn:hover { color: var(--bad); }
.how-xp { margin-top: 14px; font-size: 0.9rem; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 10px 14px; }
.how-xp summary { cursor: pointer; font-weight: 650; }
.how-xp ul { padding-left: 18px; color: var(--muted); }

.legal-box a { display: block; padding: 8px 0; font-weight: 600; text-decoration: none; }
.legal-box a + a { border-top: 1px solid var(--border); }
.legal-box .hint { margin: 6px 0 0; }

/* ---------- Account ---------- */
.acc-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.acc-user { margin: 4px 0; word-break: break-all; }
.acc-danger { margin-top: 14px; font-size: 0.85rem; color: var(--muted); }
.acc-danger summary { cursor: pointer; }
#account-box .field input { margin-top: 6px; }

/* ---------- Modal (log session, language) ---------- */
.modal { position: fixed; inset: 0; z-index: 3000; background: rgba(2, 8, 15, 0.6); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-card { background: var(--panel-solid); color: var(--text); border: 1px solid var(--border); border-radius: 22px; padding: 20px; width: 100%; max-width: 420px; max-height: 88vh; overflow-y: auto; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5); }
.modal-card h3 { margin-top: 0; font-size: 1.1rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.modal-actions .back-btn { margin: 0; padding: 10px 14px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.modal-head h3 { margin: 0; }
.icon-close { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border); background: var(--card); color: var(--text); font-size: 1.3rem; line-height: 1; cursor: pointer; }

.lang-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.lang-item { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--border); color: var(--text); cursor: pointer; text-align: left; font-family: inherit; }
.lang-item:hover:not(:disabled) { background: var(--card-2); }
.lang-item.active { border-color: var(--accent); background: rgba(34, 211, 238, 0.12); }
.lang-item:disabled { opacity: 0.4; cursor: default; }
.lang-name { font-weight: 700; font-size: 0.92rem; }
.lang-sub { font-size: 0.7rem; color: var(--muted); font-weight: 600; }
.lang-soon-title { margin: 16px 0 8px; font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; }
.lang-list.soon { grid-template-columns: repeat(3, 1fr); }
.lang-list.soon .lang-item { padding: 8px 10px; }

/* ---------- Quick guide (first visit) ---------- */
.help { text-align: center; padding: 6px 4px 0; }
.help-icon { font-size: 3rem; line-height: 1; margin: 6px 0 12px; }
.help-icon img { border-radius: 20px; display: inline-block; }
.help h3 { font-size: 1.3rem; margin: 0 0 10px; }
.help p { color: var(--muted); line-height: 1.55; margin: 0 0 18px; min-height: 6.2em; }
.help-dots { display: flex; justify-content: center; gap: 6px; margin-bottom: 18px; }
.help-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--card-2); transition: width .2s; }
.help-dots i.on { width: 20px; border-radius: 4px; background: var(--accent); }
.help-actions { display: flex; justify-content: space-between; align-items: center; }
.help-actions .back-btn { margin: 0; }
.help-actions .primary-btn { min-width: 130px; }

/* ---------- Toasts + confetti ---------- */
.toasts { position: fixed; left: 50%; top: calc(var(--safe-top) + 76px); transform: translateX(-50%); z-index: 4000; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: 92vw; }
.toast { background: var(--panel-solid); color: var(--text); border: 1px solid var(--border); padding: 11px 18px; border-radius: 999px; box-shadow: var(--shadow); font-size: 0.93rem; font-weight: 550; animation: toast-in .35s ease-out; transition: opacity .4s, transform .4s; }
.toast.xp { background: linear-gradient(90deg, var(--gold), var(--hot)); color: #1d1400; border: none; }
.toast.award { background: var(--grad-good); color: #03140d; border: none; }
.toast.level { background: linear-gradient(135deg, #7c3aed, #2563eb); color: #fff; border: none; }
.toast.hide { opacity: 0; transform: translateY(-10px); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-16px) scale(.94); } }

.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 3500; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 8px; height: 14px; border-radius: 2px; animation-name: confetti-fall; animation-timing-function: linear; animation-fill-mode: forwards; }
@keyframes confetti-fall { to { top: 105%; transform: rotate(720deg) translateX(40px); } }

/* ---------- Regional / OpenStreetMap spots ---------- */
.spot-marker.small { transform: scale(0.8); }
.spot-marker.small .ring { font-size: 11px; border-width: 1.5px; }
.count-chip { margin-left: auto; font-size: 0.72rem; font-weight: 700; color: var(--muted); background: var(--card); border: 1px solid var(--border); border-radius: 999px; padding: 2px 8px; }
#area-section .spot-list { margin-bottom: 18px; }

/* ---------- Badge tiers + favourites storage ---------- */
.tier-head { display: flex; align-items: center; gap: 8px; margin: 16px 0 8px; font-weight: 750; font-size: 0.92rem; }
.tier-head:first-of-type { margin-top: 4px; }
.badge-prog { height: 5px; margin: 6px 8px 2px; border-radius: 3px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.badge-prog div { height: 100%; background: linear-gradient(90deg, var(--gold), var(--hot)); }
.badge-count { font-size: 0.66rem; color: var(--muted); font-weight: 650; }
.badge:not(.on):has(.badge-prog) { opacity: 0.6; }
.store-chip { margin-left: auto; font-size: 0.7rem; font-weight: 650; color: var(--muted); background: var(--card); border: 1px solid var(--border); border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.store-chip.synced { color: var(--accent); border-color: rgba(34, 211, 238, 0.35); }

/* account: password + Google sign-in */
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.acc-pw-form { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.acc-or { display: flex; align-items: center; gap: 10px; margin: 12px 0 10px; color: var(--muted); font-size: 0.8rem; }
.acc-or::before, .acc-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.google-btn { width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 11px 14px; border-radius: 12px; border: 1px solid #dadce0; background: #fff; color: #1f1f1f; font: inherit; font-weight: 600; cursor: pointer; }
.google-btn:hover { background: #f4f6f8; }
.acc-wide { width: 100%; margin-top: 10px; justify-content: center; text-align: center; }

/* rules / wind-spot note in the detail view */
.spot-note { margin: 10px 0 4px; padding: 9px 12px; border-radius: 10px; font-size: 13px; line-height: 1.4;
  background: rgba(251, 191, 36, 0.12); border: 1px solid rgba(251, 191, 36, 0.45); }
.spot-note.wind { background: rgba(229, 83, 61, 0.12); border-color: rgba(229, 83, 61, 0.5); }

/* spot suggestions */
.sg-radio { display: flex; align-items: center; gap: 10px; margin: 8px 0; font-weight: 400; }
.sg-radio input { width: 18px; height: 18px; margin: 0; flex: none; accent-color: #2fb36f; }
.sg-dirs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.sg-dir { min-width: 42px; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line, #334); background: transparent; color: inherit; cursor: pointer; }
.sg-dir.on { background: #2fb36f; border-color: #2fb36f; color: #fff; }
.sg-item { padding: 10px 0; border-top: 1px solid rgba(255,255,255,0.08); }
.sg-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 6px; }
#modal-card textarea { display: block; width: 100%; box-sizing: border-box; margin-top: 6px; padding: 10px 12px; font: inherit; font-size: 16px;
  color: inherit; background: rgba(0,0,0,0.25); border: 1px solid rgba(255,255,255,0.12); border-radius: 12px; resize: vertical; }
/* feedback (admin view) */
.fb-text { white-space: pre-wrap; margin-bottom: 4px; }
.fb-errors { margin-top: 18px; }
.fb-stack { white-space: pre-wrap; font-size: 0.72rem; max-height: 200px; overflow: auto; background: rgba(0,0,0,0.25); padding: 8px; border-radius: 8px; }

/* ---------- Spot info tags (js/spot-info.js) ---------- */
.si-card { margin: 12px 0; padding: 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--border); }
.si-card.si-empty { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.si-sec + .si-sec { margin-top: 14px; }
.si-h { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 7px; }
.si-lvl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.si-lvl div { border-radius: 10px; padding: 7px 4px; text-align: center; font-size: 12.5px; font-weight: 650; background: var(--card); color: #56697d; border: 1px solid var(--border); }
.si-lvl i { display: block; font-style: normal; font-size: 15px; }
.si-lvl .on.b { background: rgba(52, 211, 153, .16); color: #34d399; border-color: rgba(52, 211, 153, .5); }
.si-lvl .on.i { background: rgba(59, 130, 246, .18); color: #60a5fa; border-color: rgba(59, 130, 246, .55); }
.si-lvl .on.p { background: rgba(255, 255, 255, .14); color: #fff; border-color: rgba(255, 255, 255, .5); }
.si-lvltxt { margin-top: 6px; font-size: 13px; color: var(--muted); }
.si-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.si-tag { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; background: var(--card-2); border: 1px solid var(--border); white-space: nowrap; }
.si-tag.warn { background: rgba(248, 113, 113, .12); border-color: rgba(248, 113, 113, .4); color: #fecaca; }
.si-launch { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 8px; }
.si-launch > div { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 7px 4px; text-align: center; font-size: 11.5px; color: var(--muted); line-height: 1.3; }
.si-launch b { display: block; color: var(--text); font-size: 13.5px; margin: 2px 0; }
.si-bars { display: flex; gap: 3px; justify-content: center; margin-top: 4px; }
.si-bars span { width: 13px; height: 5px; border-radius: 3px; background: #24384d; }
.si-bars span.on { background: var(--good); }
.si-how { font-size: 13.5px; line-height: 1.45; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 9px 11px; }
.si-foot { margin-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.si-card .small-btn { padding: 6px 10px; font-size: 12.5px; border-radius: 10px; cursor: pointer; }
.si-checks { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; }
.si-check { display: flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }

/* ---------- Community (js/community.js) ---------- */
.com-card { margin-bottom: 14px; }
.com-me { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.com-me > div { flex: 1; min-width: 0; }
.com-av { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: #fff; font-weight: 750; flex-shrink: 0; font-size: 14px; }
.com-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 12px; }
.com-tabs button, .com-chips button { border: 1px solid var(--border); background: var(--card); color: var(--text); border-radius: 10px; padding: 8px 6px; font: inherit; font-size: 13px; cursor: pointer; }
.com-tabs button.on, .com-chips button.on { background: var(--grad); color: #04121f; border-color: transparent; font-weight: 650; }
.com-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.com-chips button { border-radius: 999px; padding: 6px 12px; }
.com-board, .com-list { list-style: none; margin: 0 0 10px; padding: 0; }
.com-board li, .com-list li { display: flex; align-items: center; gap: 9px; padding: 8px 4px; border-top: 1px solid var(--border); }
.com-board li.me { background: rgba(34, 211, 238, .08); border-radius: 10px; }
.com-rank { width: 28px; text-align: center; font-weight: 700; color: var(--muted); flex-shrink: 0; }
.com-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.com-name small { display: block; color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.com-xp { white-space: nowrap; font-size: 13px; }
.com-list li .small-btn + .small-btn { margin-left: 4px; }
.com-sub { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 14px 0 6px; }
.com-search { display: flex; gap: 6px; margin-bottom: 6px; }
.com-search input { flex: 1; min-width: 0; }
.com-here { margin: 6px 0; }
.com-consent { max-height: 46vh; overflow: auto; background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; line-height: 1.45; }
.com-consent ul { margin: 6px 0; padding-left: 18px; }
.primary-btn.small-btn, .ghost-btn.small-btn { padding: 6px 11px; font-size: 0.8rem; border-radius: 10px; box-shadow: none; }
.spot-marker .com-badge { position: absolute; left: -10px; bottom: -8px; background: #fbbf24; color: #1a1300; font-size: 10px; font-weight: 800; border-radius: 9px; padding: 1px 4px; line-height: 1.3; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.tab > span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#com-tab-badge { background: #fbbf24; color: #1a1300; }
#com-tab-badge[hidden] { display: none; }
@media (max-width: 899px) {
  .tabbar { padding-left: 4px; padding-right: 4px; }
  .tab { font-size: 0.66rem; padding-left: 0; padding-right: 0; letter-spacing: -0.01em; }
}
@media (max-width: 400px) { .tab { font-size: 0.6rem; letter-spacing: -0.02em; } }

/* ---------- Premium lock (js/premium.js) ---------- */
.prem-lock { position: relative; border-radius: 12px; overflow: hidden; }
.prem-blur { filter: blur(5px); opacity: .7; pointer-events: none; user-select: none; }
.prem-unlock { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); white-space: nowrap;
  border: none; border-radius: 999px; padding: 10px 16px; font: 700 0.85rem "Inter", system-ui, sans-serif; cursor: pointer;
  background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #1a1300; box-shadow: 0 6px 18px rgba(251, 191, 36, .35); }
.prem-badge { font-size: 10px; font-weight: 800; color: #fbbf24; border: 1px solid rgba(251, 191, 36, .5); border-radius: 999px; padding: 1px 6px; margin-left: 6px; vertical-align: 1px; text-transform: none; letter-spacing: 0; }
.prem-list { padding-left: 18px; line-height: 1.6; }
.si-rules { font-size: 0.86rem; line-height: 1.45; background: rgba(251, 191, 36, .08); border: 1px solid rgba(251, 191, 36, .25); border-radius: 10px; padding: 8px 10px; }

/* kite level (self-assessment) */
.level-opts { display: grid; gap: 8px; margin: 10px 0; }
.level-opt { width: 100%; }
.level-ack { font-size: 13px; color: var(--muted); margin: 8px 0 14px; line-height: 1.45; }
.level-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.si-self { margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.si-mylvl { margin-top: 6px; font-size: 13px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font: inherit; text-decoration: underline; }
.help .level-opts { text-align: left; }
.help .level-ack { text-align: left; font-size: 12px; }

/* spot view, wind first (design A) */
.now-card { flex-wrap: wrap; }
.range-badge { flex-basis: 100%; padding: 7px 12px; border-radius: 12px; background: rgba(0, 0, 0, 0.22); font-size: 0.82rem; font-weight: 650; color: var(--text); }
.range-badge.in::before { content: "✓ "; }
.next-hours { margin-top: 12px; padding: 12px 14px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--border); }
.nh-head { font-size: 0.85rem; font-weight: 700; margin-bottom: 8px; }
.nh-bars { display: flex; gap: 5px; align-items: flex-end; }
.nh-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; }
.nh-col span { font-size: 0.72rem; font-weight: 650; }
.nh-col i { display: block; width: 100%; border-radius: 4px; }
.nh-col em { font-style: normal; font-size: 0.7rem; color: var(--muted); }
.nh-col.off i { opacity: 0.35; }

/* "Vor Ort": kite schools and accommodation */
.nearby { margin-top: 6px; }
.nb-h { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); margin: 10px 0 6px; }
.nb-list { list-style: none; margin: 0; padding: 0; border-radius: var(--radius); background: var(--card); border: 1px solid var(--border); overflow: hidden; }
.nb-list li + li { border-top: 1px solid var(--border); }
.nb-list a { display: flex; align-items: center; gap: 10px; padding: 11px 14px; color: var(--text); text-decoration: none; min-height: 24px; }
.nb-list a:hover { background: var(--card-2); }
.nb-ico { color: var(--accent); display: flex; }
.nb-name { flex: 1; min-width: 0; font-size: 0.92rem; }
.nb-km { font-size: 0.8rem; color: var(--muted); white-space: nowrap; }
.nb-partner { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; font-size: 0.7rem; font-weight: 700; background: rgba(251, 191, 36, 0.16); color: var(--gold); }

/* =====================================================================
   Light theme (design B) – Settings → Darstellung. Better readable in bright sun on the beach.
   ===================================================================== */
:root[data-theme="light"] {
  --ink: #eef2f6;
  --panel: rgba(255, 255, 255, 0.95);
  --panel-solid: #ffffff;
  --card: #ffffff;
  --card-2: #f0f3f7;
  --border: #d9e0e8;
  --text: #0b1220;
  --muted: #4a5a70;
  --accent: #0b6fd6;
  --accent-2: #2563eb;
  --gold: #a86b00;
  --good: #0f8a4f;
  --bad: #c62828;
  --shadow: 0 10px 28px rgba(15, 30, 50, 0.14);
  color-scheme: light;
}
:root[data-theme="light"] body { background: var(--ink); color: var(--text); }
:root[data-theme="light"] .map { background: #dfe7ee; }
:root[data-theme="light"] .now-speed { color: var(--text); }
:root[data-theme="light"] .now-card { background: linear-gradient(135deg, color-mix(in srgb, var(--c) 35%, #fff), #fff 80%); }
:root[data-theme="light"] .now-label,
:root[data-theme="light"] .range-badge { background: rgba(255, 255, 255, 0.7); color: var(--text); }
:root[data-theme="light"] .si-lvl .on.p { background: #1f2937; color: #fff; border-color: #1f2937; }
:root[data-theme="light"] .spot-note { color: #3d2b00; background: #fff6dc; border-color: #f0d48a; }
:root[data-theme="light"] .ghost-btn,
:root[data-theme="light"] .fav-btn { background: #fff; color: var(--text); border-color: var(--border); }
:root[data-theme="light"] .leaflet-control-layers,
:root[data-theme="light"] .leaflet-bar a { background: #fff; color: var(--text); }

/* map markers as wind pills (design C) */
.spot-marker2 { position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.pill-m {
  display: inline-flex; align-items: center; gap: 2px; height: 26px; padding: 0 8px 0 5px; border-radius: 999px;
  color: #06111c; font: 800 12.5px "Inter", system-ui, sans-serif; letter-spacing: -0.02em; white-space: nowrap;
  border: 1.5px solid rgba(255, 255, 255, 0.9); box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
}
.pill-m.nodata { width: 12px; height: 12px; padding: 0; border-radius: 50%; background: #9aa9b8; }
.spot-marker2.small .pill-m { height: 22px; font-size: 11px; padding: 0 6px 0 4px; }
.spot-marker2.fav .pill-m { border: 2.5px solid var(--gold); }
.spot-marker2.wrong-dir .pill-m { opacity: 0.55; }
.spot-marker2.windspot .pill-m { border-style: dashed; }
.spot-marker2 .star { position: absolute; right: -6px; top: -9px; font-size: 13px; color: var(--gold); text-shadow: 0 0 3px #000; }
.spot-marker2 .stamp {
  position: absolute; left: -6px; bottom: -6px; width: 15px; height: 15px; border-radius: 50%;
  background: var(--hot); color: #fff; font-size: 9px; font-weight: 800; line-height: 15px; text-align: center; border: 1.5px solid #fff;
}
.spot-marker2 .com-badge { position: absolute; right: -10px; bottom: -12px; background: #fbbf24; color: #1a1300; font-size: 10px; font-weight: 800; border-radius: 9px; padding: 1px 4px; line-height: 1.3; box-shadow: 0 1px 4px rgba(0,0,0,.4); }

/* map filter chips (design C) */
.map-chips { position: fixed; z-index: 999; top: calc(12px + var(--safe-top) + 44px + 10px); left: 16px; display: flex; gap: 6px; }
.map-chip {
  height: 34px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--border); background: var(--panel); color: var(--text);
  font: 600 13px "Inter", system-ui, sans-serif; box-shadow: var(--shadow); cursor: pointer; backdrop-filter: blur(10px);
}
.map-chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #04222a; }
:root[data-theme="light"] .map-chip[aria-pressed="true"] { color: #fff; }
@media (min-width: 900px) { .map-chips { left: auto; right: 70px; } }
@media (max-width: 899px) { .map-chips { left: 12px; } body:has(#sidebar[data-state="page"]) .map-chips, body:has(#sidebar[data-state="full"]) .map-chips { display: none; } }

/* ---------- wind streamlines (map overlay) ---------- */
.wind-canvas { position: absolute; left: 0; top: 0; pointer-events: none; }
.wind-ctl { background: var(--panel-solid); color: var(--text); border: 1px solid var(--border); border-radius: 12px; padding: 8px 12px; min-width: 210px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .35); font-size: 13px; }
.wind-ctl-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.wind-ctl input[type="range"] { width: 100%; margin: 6px 0 4px; accent-color: #2fb36f; }
.wind-legend { display: flex; gap: 8px; flex-wrap: wrap; font-size: 11px; opacity: .85; }
.wind-legend i { display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-right: 4px; vertical-align: middle; }
@media (max-width: 899px) { .wind-ctl { min-width: 0; max-width: calc(100vw - 24px); } }

/* ---------- Garmin watch pairing ---------- */
.watch-code { font: 700 32px/1.1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 6px; text-align: center;
  padding: 12px; margin: 4px 0 8px; border: 1px dashed var(--border); border-radius: 12px; background: var(--card-2); user-select: all; }

.watch-stats { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 12px; color: var(--muted); }
.track-mini { width: 40px; height: 40px; flex: none; color: var(--accent); background: var(--card-2); border-radius: 8px; }
