/* Hřiby kolem Úsobí. A printed field atlas underneath, a dark spruce instrument panel on top.
   Spruce glass panels, bone text, pore-ochre accent; the forecast ink (lichen to oxblood) owns the map. */
:root {
  --spruce: #18231e;
  --panel: rgba(24, 35, 30, 0.84);
  --panel-strong: rgba(24, 35, 30, 0.96);
  --panel-line: rgba(238, 232, 218, 0.11);
  --panel-line-2: rgba(238, 232, 218, 0.2);
  --bone: #eee8da;
  --bone-2: rgba(238, 232, 218, 0.74);
  --bone-3: rgba(238, 232, 218, 0.52);
  --bone-4: rgba(238, 232, 218, 0.1);
  --pore: #e2a93f;
  --cap: #8a4a25;
  --rain: #7fb0d8;
  --gps: #2f7bea;
  --restricted: #c2307a;
  --paper: #eceee8;
  --ink: #222d28;

  --safe-t: env(safe-area-inset-top, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --gutter: 12px;
  --gap: 8px;

  --serif: "Alegreya", Georgia, "Times New Roman", serif;
  --sans: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --cond: "Barlow Semi Condensed", "Barlow", system-ui, sans-serif;
  --blur: saturate(140%) blur(14px);
  --shadow: 0 6px 22px rgba(18, 26, 22, 0.28), 0 1px 2px rgba(18, 26, 22, 0.3);
}

* { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%; overflow: hidden;
  background: var(--paper); color: var(--bone);
  font: 400 15px/1.4 var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--pore); outline-offset: 2px; }

#map { position: fixed; inset: 0; background: var(--paper); z-index: 0; }
.maplibregl-map { font: inherit; }
.maplibregl-canvas:focus-visible { outline: none; }

/* Glass panel recipe */
.brand, .round, .pop, .chip, .legend, .timeline, .toast, .sheet, .boot {
  background: var(--panel);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--panel-line);
  box-shadow: var(--shadow);
}

/* ---------- Top bar ---------- */
.topbar {
  position: fixed; z-index: 1000;
  top: calc(var(--safe-t) + 10px);
  left: calc(var(--safe-l) + var(--gutter));
  right: calc(var(--safe-r) + var(--gutter));
  display: flex; justify-content: space-between; align-items: flex-start; gap: var(--gap);
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }

.brand {
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 15px 0 7px; border-radius: 999px;
  min-width: 0; flex: 0 1 auto; overflow: hidden;
}
.brand-glyph { width: 30px; height: 30px; flex: none; }
.brand-name { font: 700 21px/1 var(--serif); letter-spacing: 0.005em; padding-bottom: 1px; }
.brand-place {
  font: 500 15px/1 var(--sans); color: var(--bone-2);
  padding-left: 9px; border-left: 1px solid var(--panel-line-2);
  white-space: nowrap;
}

.tools { display: flex; gap: var(--gap); flex: none; position: relative; }
.round {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; padding: 0;
  color: var(--bone);
  transition: background-color .15s, color .15s, border-color .15s;
}
.round svg { width: 22px; height: 22px; }
.round:hover { background: var(--panel-strong); }
.round[aria-expanded="true"] { border-color: var(--bone-2); background: var(--panel-strong); }
.round-s { width: 44px; height: 44px; box-shadow: none; background: var(--bone-4); -webkit-backdrop-filter: none; backdrop-filter: none; }

/* GPS states */
#btn-gps .gps-core { fill: none; stroke: currentColor; stroke-width: 1.6; }
#btn-gps[data-state="seeking"] { color: #8ab8ff; }
#btn-gps[data-state="seeking"] .gps-core { animation: seek 1.1s ease-in-out infinite; }
#btn-gps[data-state="free"] { color: #8ab8ff; }
#btn-gps[data-state="follow"] { color: #fff; background: var(--gps); border-color: rgba(255,255,255,.4); }
#btn-gps[data-state="follow"] .gps-core { fill: #fff; stroke: none; }
@keyframes seek { 50% { opacity: .25; } }

/* Popover menus: anchored to the whole tool group so they never run off the left edge */
.pop-anchor { position: static; }
.pop {
  position: absolute; right: 0; top: 52px;
  width: min(300px, calc(100vw - 2 * var(--gutter) - var(--safe-l) - var(--safe-r)));
  border-radius: 16px; padding: 6px;
  background: var(--panel-strong);
  max-height: calc(100dvh - var(--safe-t) - var(--dock-h, 220px) - 90px); overflow: auto; overscroll-behavior: contain;
}
.pop-head { margin: 9px 10px 4px; font: 500 13px/1.2 var(--sans); color: var(--bone-3); }
.opt {
  width: 100%; display: flex; align-items: center; gap: 12px;
  min-height: 54px; padding: 7px 10px; border: 0; border-radius: 11px;
  background: transparent; text-align: left;
}
.opt:hover { background: var(--bone-4); }
.opt[aria-checked="true"] { background: rgba(238, 232, 218, 0.13); }
.opt-text { display: flex; flex-direction: column; min-width: 0; }
.opt-text b { font: 600 15.5px/1.2 var(--sans); }
.opt-text small { font-size: 12.5px; color: var(--bone-3); line-height: 1.25; margin-top: 2px; }
.opt-swatch, .opt-thumb {
  flex: none; width: 36px; height: 36px; border-radius: 9px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.14);
}
.opt[aria-checked="true"] .opt-swatch, .opt[aria-checked="true"] .opt-thumb { box-shadow: 0 0 0 2px var(--bone); }
.thumb-mapa {
  background:
    radial-gradient(ellipse 60% 45% at 68% 38%, #b6602d 0 34%, #e2ab52 35% 52%, transparent 54%),
    radial-gradient(ellipse 40% 32% at 26% 74%, #c97a38 0 40%, transparent 42%),
    linear-gradient(115deg, transparent 48%, #a6c2d2 49% 54%, transparent 55%),
    linear-gradient(160deg, #eceee8 40%, #cfd3cc);
}
.thumb-topo {
  background:
    repeating-radial-gradient(circle at 35% 65%, transparent 0 4px, rgba(170, 110, 60, .55) 4.5px 5px),
    linear-gradient(160deg, #d5e6bf, #f3efd6 60%, #e2d9b6);
}
.thumb-orto {
  background:
    radial-gradient(circle at 30% 30%, #4f6b3a 0 22%, transparent 24%),
    radial-gradient(circle at 72% 62%, #39502b 0 26%, transparent 28%),
    linear-gradient(35deg, #a99a72 0 30%, #6f7d4b 31% 58%, #b7ae86 59%);
}
.opt-check { min-height: 48px; }
.check {
  flex: none; width: 22px; height: 22px; margin: 0 7px; border-radius: 6px;
  border: 1.8px solid var(--bone-3); display: grid; place-items: center;
}
.opt[aria-checked="true"] .check { background: var(--bone); border-color: var(--bone); }
.opt[aria-checked="true"] .check::after {
  content: ""; width: 10px; height: 5px; margin-top: -3px;
  border-left: 2.2px solid var(--spruce); border-bottom: 2.2px solid var(--spruce);
  transform: rotate(-45deg);
}

/* Toast */
.toast {
  position: fixed; z-index: 1300; left: 50%; transform: translateX(-50%);
  top: calc(var(--safe-t) + 64px);
  width: max-content; max-width: min(440px, calc(100vw - 2 * var(--gutter)));
  padding: 11px 16px; border-radius: 13px;
  background: var(--panel-strong); font-size: 14.5px; line-height: 1.35;
}
.toast[data-kind="warn"] { border-color: rgba(226, 169, 63, .55); }

/* ---------- Bottom dock ---------- */
.dock {
  position: fixed; z-index: 1000;
  left: calc(var(--safe-l) + var(--gutter));
  right: calc(var(--safe-r) + var(--gutter));
  bottom: calc(var(--safe-b) + 10px);
  display: flex; flex-direction: column; gap: var(--gap);
  pointer-events: none;
  margin: 0 auto; max-width: 940px;
}
.dock > * { pointer-events: auto; }
.dock-row {
  display: flex; align-items: flex-end; justify-content: space-between; gap: var(--gap);
  pointer-events: none;
}
.dock-row > * { pointer-events: auto; }
.dock-left { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }

.chip {
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 8px 0 12px; border-radius: 999px;
  font: 600 15px/1 var(--cond); letter-spacing: .01em; white-space: nowrap;
}
.chip svg { width: 20px; height: 20px; color: var(--bone-2); flex: none; }
.chip:hover { background: var(--panel-strong); }
.chip .count {
  display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px;
  font: 700 13.5px/1 var(--cond); color: var(--spruce); background: var(--bone);
  border-radius: 999px; font-variant-numeric: tabular-nums;
}

/* MapLibre scale moved into the dock */
.scale-slot { padding-left: 4px; min-height: 0; }
.scale-slot .maplibregl-ctrl-scale {
  margin: 0; background: rgba(236, 238, 232, .78); color: var(--ink);
  border: 1.5px solid rgba(34, 45, 40, .7); border-top: 0;
  font: 600 11px/1.35 var(--cond); padding: 0 5px; box-shadow: none;
}

/* Legend */
.legend {
  display: flex; flex-direction: column; align-items: stretch; gap: 4px;
  padding: 7px 10px 6px; border-radius: 14px; text-align: left;
  width: 236px; flex: none; min-height: 44px;
}
.legend-title { font: 500 12.5px/1.15 var(--sans); color: var(--bone-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.legend-bar-wrap { display: flex; gap: 5px; align-items: stretch; height: 12px; }
.legend-cleared { flex: none; width: 18px; border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.25); }
.legend-bar { position: relative; flex: 1; border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.25); }
.legend-ticks { position: relative; height: 13px; margin-left: 23px; }
.legend[data-layer="canopy"] .legend-ticks { margin-left: 0; }
.legend-ticks .tick {
  position: absolute; top: 0; transform: translateX(-50%);
  font: 600 11.5px/1.1 var(--cond); color: var(--bone-2); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.legend-ticks .tick.first { transform: none; }
.legend-ticks .tick.last { transform: translateX(-100%); }

/* Timeline panel */
.timeline {
  border-radius: 20px; padding: 9px 12px 4px;
  display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 8px;
  grid-template-areas: "ro ro" "ch ch" "le le" "pl st" "at at";
}
.readout { grid-area: ro; }
.chart-wrap { grid-area: ch; }
.lens { grid-area: le; }
.play { grid-area: pl; align-self: center; }
.strip { grid-area: st; }
.attrib-slot { grid-area: at; }
.readout {
  display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; column-gap: 12px; row-gap: 2px;
  min-height: 22px; padding: 0 2px;
  font: 500 13px/1.3 var(--sans); color: var(--bone-3);
}
.readout .rd-date { font: 700 17px/1.2 var(--serif); color: var(--bone); white-space: nowrap; }
.readout .rd-date em { font: 500 13px/1 var(--sans); font-style: normal; color: var(--bone-3); margin-left: 7px; }
.readout .rd-stats { display: inline-flex; gap: 14px; }
.readout .rd-stat { display: inline-flex; align-items: baseline; gap: 5px; white-space: nowrap; }
.readout .rd-stat b { font: 600 15px/1 var(--cond); color: var(--bone); font-variant-numeric: tabular-nums; }
.readout .key { display: inline-block; width: 14px; height: 0; align-self: center; position: relative; top: -1px; }
.key-fruit { border-top: 2.5px solid var(--pore); }
.key-normal { border-top: 2px dashed var(--bone-2); }
.key-rain { height: 9px !important; width: 6px !important; background: var(--rain); border-radius: 1px; top: 0 !important; }
.readout.peek .rd-date { color: var(--pore); }
.readout .v-fruit { color: var(--pore) !important; }
.readout .v-rain { color: #a9cdea !important; }

.chart-wrap { position: relative; margin-top: 6px; touch-action: none; cursor: crosshair; }
.chart { display: block; width: 100%; height: 62px; overflow: visible; }
.lens { display: block; width: 100%; height: 18px; overflow: visible; }

.play {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--panel-line-2); background: var(--bone-4);
  display: grid; place-items: center; padding: 0; color: var(--bone);
}
.play svg { width: 20px; height: 20px; grid-area: 1 / 1; }
.play .ic-pause { display: none; }
.play[aria-pressed="true"] { background: var(--bone); color: var(--spruce); }
.play[aria-pressed="true"] .ic-pause { display: block; }
.play[aria-pressed="true"] .ic-play { display: none; }

.strip {
  flex: 1; min-width: 0;
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px;
  touch-action: none; user-select: none; -webkit-user-select: none;
}
.strip.scrolls {
  grid-auto-columns: 46px; overflow-x: auto; scroll-snap-type: x mandatory;
  touch-action: pan-x; scrollbar-width: none;
}
.strip.scrolls::-webkit-scrollbar { display: none; }
.day {
  position: relative; scroll-snap-align: center; min-width: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  min-height: 52px; padding: 4px 0 8px; border: 0; border-radius: 11px;
  background: transparent; color: var(--bone-2);
}
.day:hover { background: var(--bone-4); }
.day .wd { font: 500 12px/1.1 var(--sans); color: var(--bone-3); }
.day .dn { font: 600 19px/1.05 var(--cond); font-variant-numeric: tabular-nums; white-space: nowrap; }
.day .dn small { font: 500 11px/1 var(--cond); margin-left: 2px; color: var(--bone-3); }
.day .meter {
  position: absolute; left: 22%; right: 22%; bottom: 5px; height: 3px; border-radius: 2px;
  background: rgba(238, 232, 218, .12); overflow: hidden;
}
.day .meter i { display: block; height: 100%; background: var(--pore); opacity: .55; border-radius: 2px; }
.day[aria-checked="true"] { background: rgba(238, 232, 218, .14); color: var(--bone); }
.day[aria-checked="true"] .wd { color: var(--bone-2); }
.day[aria-checked="true"] .meter i { opacity: 1; }
.day[aria-checked="true"]::before {
  content: ""; position: absolute; top: -1px; left: 50%; width: 18px; height: 3px; margin-left: -9px;
  border-radius: 0 0 3px 3px; background: var(--pore);
}

.attrib-slot { min-height: 14px; margin-top: 3px; text-align: right; overflow: hidden; }
.attrib-slot .maplibregl-ctrl-attrib {
  background: transparent !important; margin: 0; padding: 0 2px;
  font: 400 10px/1.4 var(--sans); color: var(--bone-3);
}
.attrib-slot .maplibregl-ctrl-attrib-inner { display: inline; }
.attrib-slot .maplibregl-ctrl-attrib a { color: var(--bone-2); text-decoration: none; }
.attrib-slot .maplibregl-ctrl-attrib a:hover { text-decoration: underline; }
.attrib-slot .maplibregl-ctrl-attrib-button { display: none; }

/* ---------- Sheets ---------- */
.scrim { position: fixed; inset: 0; z-index: 1150; background: rgba(18, 26, 22, .3); }
.sheet {
  position: fixed; z-index: 1200;
  left: 0; right: 0; bottom: 0;
  max-height: min(76dvh, 660px); overflow: auto; overscroll-behavior: contain;
  border-radius: 22px 22px 0 0; border-bottom: 0;
  background: var(--panel-strong);
  padding: 6px calc(var(--safe-r) + 16px) calc(var(--safe-b) + 18px) calc(var(--safe-l) + 16px);
}
.sheet::before {
  content: ""; display: block; width: 38px; height: 4px; border-radius: 2px;
  background: var(--bone-3); margin: 4px auto 8px;
}
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 2px 0 10px; }
.sheet-head .round { flex: none; }
.sheet h2 { margin: 2px 0 0; font: 700 24px/1.12 var(--serif); }
.sheet-sub { margin: 4px 0 0; color: var(--bone-3); font-size: 13.5px; }

.spots { list-style: none; margin: 0; padding: 0; }
.spot {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6px 10px;
  padding: 9px 2px; border-top: 1px solid var(--panel-line);
}
.spot:first-child { border-top: 0; }
.spot-go {
  display: grid; grid-template-columns: 30px 1fr; align-items: center; gap: 12px; min-width: 0;
  border: 0; background: none; padding: 2px 0; text-align: left; min-height: 44px; border-radius: 10px;
}
.spot-go:hover .spot-name { text-decoration: underline; text-underline-offset: 3px; }
.badge {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  font: 700 14px/1 var(--cond); color: var(--spruce); background: var(--bone);
}
.spot-name { font: 700 17px/1.15 var(--serif); }
.spot-meta { display: block; color: var(--bone-3); font-size: 13px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.spot-meta b { color: var(--bone-2); font-weight: 500; }
.spot-actions { display: flex; gap: 6px; }
.btn-s {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 44px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--panel-line-2); background: var(--bone-4);
  font: 600 14px/1 var(--cond); text-decoration: none; color: var(--bone);
  white-space: nowrap;
}
.btn-s:hover { background: rgba(238, 232, 218, .18); }
.btn-s.primary { background: var(--bone); color: var(--spruce); border-color: var(--bone); }

.info { font-size: 14.5px; line-height: 1.5; color: var(--bone-2); max-width: 64ch; }
.info h3 { margin: 18px 0 6px; font: 700 17px/1.2 var(--serif); color: var(--bone); }
.info p { margin: 0 0 8px; }
.info ul { margin: 0; padding: 0; list-style: none; }
.info li { display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: start; padding: 5px 0; }
.info .sw { width: 26px; height: 16px; border-radius: 4px; margin-top: 3px; }
.info .sw-hatch {
  background: repeating-linear-gradient(-45deg, rgba(194,48,122,.1) 0 3px, #e0559c 3px 4.5px);
  box-shadow: inset 0 0 0 1.5px #e0559c;
}
.info .sw-badge { width: 22px; height: 22px; border-radius: 50%; background: var(--bone); color: var(--spruce); display: grid; place-items: center; font: 700 12px/1 var(--cond); margin-top: 0; }
.info .sw-me { width: 16px; height: 16px; border-radius: 50%; background: var(--gps); box-shadow: 0 0 0 3px #fff; margin: 3px 0 0 4px; }
.info .sw-circle { width: 22px; height: 22px; border-radius: 50%; border: 1.5px dashed var(--bone-2); margin-top: 0; }
.info kbd {
  font: 600 12px/1 var(--cond); padding: 2px 6px; border-radius: 5px;
  border: 1px solid var(--panel-line-2); background: var(--bone-4); color: var(--bone);
}
.info .fine { font-size: 12.5px; color: var(--bone-3); }

/* ---------- Boot ---------- */
.boot {
  position: fixed; z-index: 1400; left: 50%; top: 45%; transform: translate(-50%, -50%);
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px; border-radius: 999px; font: 500 15px/1.2 var(--sans);
  background: var(--panel-strong);
}
.boot-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--pore); animation: seek 1s ease-in-out infinite; }
.boot.error { border-radius: 16px; flex-direction: column; align-items: flex-start; max-width: min(380px, 90vw); }
.boot.error .boot-dot { display: none; }

/* ---------- MapLibre controls ---------- */
.maplibregl-ctrl-top-right { top: calc(var(--safe-t) + 64px); right: calc(var(--safe-r) + var(--gutter) - 10px); }
.maplibregl-ctrl-group { background: var(--panel-strong); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.maplibregl-ctrl-group button { width: 40px; height: 40px; }
.maplibregl-ctrl-group button + button { border-top: 1px solid var(--panel-line); }
.maplibregl-ctrl-group button .maplibregl-ctrl-icon { filter: invert(1) brightness(1.6); opacity: .9; }
.maplibregl-ctrl-group button:not(:disabled):hover { background: rgba(238,232,218,.08); }

/* ---------- Tap popup ---------- */
.pick { z-index: 900; }
.pick .maplibregl-popup-content {
  background: var(--panel-strong); color: var(--bone);
  border-radius: 16px; border: 1px solid var(--panel-line-2);
  box-shadow: 0 12px 32px rgba(18, 26, 22, .4);
  padding: 12px 14px 12px; width: min(276px, calc(100vw - 32px));
  font: 400 14px/1.35 var(--sans);
}
.pick.maplibregl-popup-anchor-bottom .maplibregl-popup-tip,
.pick.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip,
.pick.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip { border-top-color: var(--panel-strong); }
.pick.maplibregl-popup-anchor-top .maplibregl-popup-tip,
.pick.maplibregl-popup-anchor-top-left .maplibregl-popup-tip,
.pick.maplibregl-popup-anchor-top-right .maplibregl-popup-tip { border-bottom-color: var(--panel-strong); }
.pick.maplibregl-popup-anchor-left .maplibregl-popup-tip { border-right-color: var(--panel-strong); }
.pick.maplibregl-popup-anchor-right .maplibregl-popup-tip { border-left-color: var(--panel-strong); }
.pick .maplibregl-popup-close-button {
  width: 44px; height: 44px; font: 400 24px/1 var(--sans); color: var(--bone-3);
  top: 0; right: 0; border-radius: 0 16px 0 12px;
}
.pick .maplibregl-popup-close-button:hover { color: var(--bone); background: rgba(238,232,218,.06); }
.pk-kicker { display: flex; align-items: center; gap: 7px; font: 600 13.5px/1.2 var(--cond); color: var(--bone-2); margin: 0 34px 8px 0; }
.pk-kicker .badge { width: 22px; height: 22px; font-size: 12.5px; flex: none; }
.pk-main { display: flex; align-items: center; gap: 11px; margin-right: 30px; }
.pk-sw { flex: none; width: 32px; height: 32px; border-radius: 9px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.3); }
.pk-sw-none { box-shadow: inset 0 0 0 1.5px rgba(238,232,218,.32); }
.pk-word { font: 700 20px/1.1 var(--serif); }
.pk-sub { color: var(--bone-3); font-size: 12.5px; margin-top: 1px; }
.pk-val { margin-left: auto; font: 600 23px/1 var(--cond); font-variant-numeric: tabular-nums; padding-left: 6px; }
.pk-rows { margin: 11px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; font-size: 13.5px; }
.pk-rows dt { color: var(--bone-3); }
.pk-rows dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.pk-warn {
  margin: 10px 0 0; padding: 8px 10px; border-radius: 10px;
  background: rgba(194, 48, 122, .16); border: 1px solid rgba(224, 85, 156, .6);
  font-size: 13px; line-height: 1.35; color: #ffd9ea;
}
.pk-warn b { color: #fff; font-weight: 600; }
.pk-coord { margin: 10px 0 0; font: 500 13px/1.3 var(--cond); color: var(--bone-3); font-variant-numeric: tabular-nums; }
.pk-coord button {
  border: 0; background: none; padding: 4px 0; color: var(--bone-2); font: inherit;
  text-decoration: underline dotted; text-underline-offset: 3px;
}
.pk-actions { display: flex; gap: 8px; margin-top: 8px; }
.pk-actions .btn-s { flex: 1; padding: 0 10px; }
.maplibregl-popup .btn-s { color: var(--bone); }
.maplibregl-popup .btn-s.primary { color: var(--spruce); }

/* ---------- Markers ---------- */
.me { width: 0; height: 0; pointer-events: none; }
.me-dot {
  position: absolute; left: -9px; top: -9px; width: 18px; height: 18px;
  border-radius: 50%; background: var(--gps); box-shadow: 0 0 0 3px #fff, 0 2px 8px rgba(0,0,0,.45);
}
.me-cone {
  position: absolute; left: -13px; top: -34px; width: 0; height: 0;
  border-left: 13px solid transparent; border-right: 13px solid transparent; border-bottom: 34px solid rgba(47,123,234,.32);
  transform-origin: 50% 100%;
}
.hs {
  width: 44px; height: 44px; padding: 0; border: 0; background: none;
  display: grid; place-items: center; cursor: pointer;
}
.hs span {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  font: 700 14px/1 var(--cond); color: var(--bone); background: var(--spruce);
  box-shadow: 0 0 0 2px var(--bone), 0 3px 10px rgba(18,26,22,.45);
  transition: transform .15s;
}
.hs:hover span { transform: scale(1.1); }
.hs.dim span { background: rgba(236,238,232,.9); color: var(--ink); box-shadow: 0 0 0 1.5px var(--ink), 0 2px 6px rgba(18,26,22,.3); }
.town {
  display: flex; align-items: center; gap: 6px; white-space: nowrap; pointer-events: none;
  font: 700 15px/1 var(--serif); color: var(--ink);
  text-shadow: 0 0 2px var(--paper), 0 0 4px var(--paper), 0 0 7px var(--paper);
}
.town i { width: 11px; height: 11px; border-radius: 2px; transform: rotate(45deg); background: var(--ink); box-shadow: 0 0 0 2px var(--paper); flex: none; }
[data-base="letecka"] .town { color: #fff; text-shadow: 0 0 3px #000, 0 0 7px rgba(0,0,0,.8); }
[data-base="letecka"] .town i { background: #fff; box-shadow: 0 0 0 2px rgba(0,0,0,.6); }

/* ---------- Wider screens ---------- */
@media (min-width: 900px) {
  :root { --gutter: 16px; }
  .sheet {
    left: calc(var(--safe-l) + var(--gutter)); right: auto; bottom: auto;
    top: calc(var(--safe-t) + 66px);
    width: 410px; max-height: calc(100dvh - 120px - var(--dock-h, 220px));
    border-radius: 18px; border-bottom: 1px solid var(--panel-line);
    padding: 6px 18px 16px;
  }
  .sheet::before { display: none; }
  .scrim { display: none; }
  .dock { bottom: calc(var(--safe-b) + 14px); }
  .chart { height: 70px; }
  .lens { height: 24px; }
  .legend { width: 270px; }
}

/* ---------- Phones ---------- */
@media (max-width: 480px) {
  .readout .rd-stat .lbl { display: none; }
  .readout .rd-stats { gap: 11px; }
}
@media (max-width: 420px) {
  :root { --gutter: 10px; --gap: 6px; }
  .brand { padding-right: 13px; gap: 7px; }
  .brand-place { font-size: 14px; padding-left: 8px; }
  .chip { padding: 0 7px 0 11px; gap: 6px; }
  .chip .chip-label { display: none; }
  .legend { flex: 1 1 auto; width: auto; min-width: 0; }
  .timeline { padding: 8px 10px 3px; border-radius: 18px; }
  .readout { column-gap: 8px; }
  .readout .rd-date { font-size: 16px; }
  .readout .rd-stat b { font-size: 14.5px; }
  .day .dn small { display: none; }
}
@media (max-width: 480px) {
  .spot { grid-template-columns: 1fr; gap: 4px; padding: 10px 2px 12px; }
  .spot-actions { padding-left: 42px; }
  .spot-actions .btn-s { flex: 1; max-width: 160px; }
}
/* Narrow phones: the play button joins the read-out row so all seven days get >= 44 px. */
@media (max-width: 400px) {
  .timeline { grid-template-areas: "pl ro" "ch ch" "le le" "st st" "at at"; column-gap: 10px; }
  .readout .rd-date em { display: none; }
  .readout { align-self: center; }
  .strip { gap: 0; margin: 0 -4px; }
  .day { border: 2px solid transparent; background-clip: padding-box; border-radius: 12px; }
}
/* Galaxy Z Fold cover screen and other very narrow phones (~344 px) */
@media (max-width: 360px) {
  .brand-place { display: none; }
  .readout .rd-date em { display: none; }
  .day .wd { font-size: 11.5px; }
  .day .dn { font-size: 18px; }
  .play { width: 44px; }
}
@media (max-height: 560px) and (orientation: landscape) {
  .chart { height: 40px; }
  .readout .rd-stat .lbl { display: none; }
}
@media (max-height: 430px) and (orientation: landscape) {
  .chart-wrap, .lens { display: none; }
  .strip { margin-top: 4px; }
  .day { min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
