/* ============================================================
  Kde je Medveď — editorial / minimalistic redesign
   Type:  Newsreader (serif headings) + Hanken Grotesk (UI)
   Accent: single forest green, locked across the whole page
   Themes: light + dark via [data-theme] CSS variables
   ============================================================ */

:root {
  --bg: #f6f6f3;
  --surface: #ffffff;
  --surface-2: #fbfbf9;
  --surface-hover: #f4f4f1;

  --ink: #1a1a17;
  --ink-2: #24251f;
  --ink-3: #2f3029;

  --line: #e7e7e1;
  --line-strong: #d9d9d2;

  --accent: #1f4b30;
  --accent-hover: #173a25;
  --accent-ink: #ffffff;
  --accent-soft: rgba(53, 107, 66, 0.11);
  --bark: #7a4a24;
  --bark-hover: #623a1b;
  --bark-soft: rgba(122, 74, 36, 0.1);
  --moss: #7f9651;

  --shadow-sm: 0 1px 2px rgba(26, 26, 23, 0.05);
  --shadow: 0 4px 16px rgba(26, 26, 23, 0.07);
  --shadow-lg: 0 14px 40px rgba(26, 26, 23, 0.1);

  --radius: 16px;
  --radius-sm: 10px;
  --radius-pill: 999px;

  --font-serif: "Newsreader", Georgia, "Times New Roman", serif;
  --font-sans: "Hanken Grotesk", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;

  --maxw: 1180px;

  --topographic-bg: url("/assets/topographic-bg.png");
  --topographic-opacity: 0.3;
  --topographic-filter: brightness(1.02) contrast(1.06);
}

[data-theme="dark"] {
  --bg: #121310;
  --surface: #1a1b17;
  --surface-2: #1f201b;
  --surface-hover: #24251f;

  --ink: #f1f0e8;
  --ink-2: #b2b1a6;
  --ink-3: #7f7e74;

  --line: #2b2c26;
  --line-strong: #3a3b33;

  --accent: #85c69a;
  --accent-hover: #9bd5ad;
  --accent-ink: #11211a;
  --accent-soft: rgba(133, 198, 154, 0.14);
  --bark: #d0a06a;
  --bark-hover: #e0b77f;
  --bark-soft: rgba(208, 160, 106, 0.13);
  --moss: #9dad6f;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 44px rgba(0, 0, 0, 0.55);

  --topographic-opacity: 0.45;
  --topographic-filter: brightness(0.82) contrast(1.12);
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}

body {
  position: relative;
  isolation: isolate;
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: -12vh -10vw;
  z-index: -1;
  pointer-events: none;
  background-image: var(--topographic-bg);
  background-position: center top;
  background-repeat: repeat-y;
  background-size: max(1680px, 118vw) auto;
  opacity: var(--topographic-opacity);
  filter: var(--topographic-filter);
}

@media (max-width: 620px) {
  body::before {
    inset: 0;
    background-position: center top;
    background-repeat: no-repeat;
    background-size: cover;
  }
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

h1,
h2,
h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0;
}

.muted {
  color: var(--ink-3);
  font-size: 0.82rem;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  justify-content: stretch;
  gap: 16px;
  height: 68px;
  padding: 0 clamp(16px, 4vw, 36px);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  min-width: 0;
  max-width: 100%;
  gap: 8px;
  color: var(--ink);
}
.brand:hover {
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;
  transform: translateY(-2px);
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 0;
  object-fit: contain;
}

[data-theme="dark"] .brand-mark img {
  content: url("/assets/mascot/bear-head-mark-dark.png?v=20260713-2");
}

.brand-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: var(--font-serif);
  font-size: 1.22rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  white-space: nowrap;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-self: center;
  gap: 20px;
}

.main-nav a {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-2);
  text-decoration: none;
  transition: color 0.16s ease;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}

.main-nav a:hover {
  color: var(--ink);
  background: var(--surface-hover);
}

.main-nav a.active {
  color: var(--accent);
  background: var(--accent-soft);
}

.header-actions {
  display: flex;
  align-items: center;
  justify-self: end;
  min-width: 0;
  gap: 10px;
}

.site-header > .legal-back {
  grid-column: 3;
  justify-self: end;
}

.updated {
  font-size: 0.78rem;
  color: var(--ink-3);
  white-space: nowrap;
}

@media (max-width: 820px) {
  .updated {
    display: none;
  }
}

.icon-btn,
.btn {
  font-family: inherit;
  cursor: pointer;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.1s ease,
    color 0.16s ease;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-pill);
  font-size: 18px;
}
.icon-btn:hover {
  background: var(--surface-hover);
  border-color: var(--ink-3);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 600;
  background: var(--accent);
  color: var(--accent-ink);
  border-color: transparent;
}
.btn:hover {
  background: var(--accent-hover);
}
.btn:active {
  transform: translateY(1px);
}
.btn i {
  font-size: 17px;
}
.btn.loading {
  pointer-events: none;
  opacity: 0.75;
}
.btn.loading i {
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

:where(button, a, input):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Layout ---------- */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(28px, 5vw, 56px) clamp(16px, 4vw, 36px) 24px;
}

.masthead {
  max-width: 760px;
  margin-bottom: clamp(28px, 4vw, 44px);
}

.mascot-masthead {
  max-width: none;
  display: grid;
  grid-template-columns: minmax(0, 760px) minmax(210px, 340px);
  align-items: center;
  gap: clamp(24px, 5vw, 64px);
  padding: clamp(22px, 4vw, 48px) clamp(20px, 4vw, 52px);
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.masthead-copy {
  min-width: 0;
}

.mascot-hero {
  justify-self: end;
  width: min(100%, 340px);
}

.mascot-hero img {
  display: block;
  width: 100%;
  height: auto;
  background: #fff;
  border: 1px solid color-mix(in srgb, var(--bark) 16%, var(--line));
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}

.mascot-hero-cutout img {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  filter: drop-shadow(0 18px 28px rgba(26, 26, 23, 0.12));
}

[data-theme="dark"] .mascot-hero-cutout img {
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.5));
}

.masthead h1 {
  font-size: clamp(2rem, 5vw, 3.1rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
}

.lede {
  margin: 14px 0 0;
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  color: var(--ink-2);
  max-width: 60ch;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: clamp(20px, 3vw, 28px);
}

.hero-actions .btn,
.hero-secondary-btn {
  min-height: 46px;
  padding-inline: 20px;
  justify-content: center;
}

.hero-secondary-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 700;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.1s ease;
}

.hero-secondary-btn:hover {
  color: var(--ink);
  background: var(--surface-hover);
  border-color: var(--ink-3);
  text-decoration: none;
}

.hero-secondary-btn:active {
  transform: translateY(1px);
}

.hero-secondary-btn i {
  color: var(--accent);
  font-size: 17px;
}

/* ---------- Stats (airy, hairline-divided — no boxes) ---------- */
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: clamp(26px, 4vw, 40px);
}

.stat {
  padding-right: clamp(24px, 4vw, 44px);
  margin-right: clamp(24px, 4vw, 44px);
  border-right: 1px solid var(--line);
}
.stat:last-child {
  border-right: 0;
  margin-right: 0;
  padding-right: 0;
}

.stat-num {
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}

.stat-label {
  display: block;
  margin-top: 7px;
  font-size: 0.82rem;
  color: var(--ink-3);
}

/* Compact, quiet stat strip — the map is the focus, not the numbers. */
.home-insights {
  display: grid;
  justify-items: start;
  gap: 14px;
  margin-top: clamp(20px, 3vw, 32px);
  padding-top: clamp(15px, 2.2vw, 22px);
  border-top: 1px solid var(--line);
}

.home-insights .stats {
  margin-top: 0;
  min-width: 0;
}

@media (max-width: 520px) {
  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-actions .btn,
  .hero-secondary-btn {
    width: 100%;
  }

  .home-insights .stat {
    padding-right: clamp(14px, 4vw, 22px);
    margin-right: clamp(14px, 4vw, 22px);
  }

  .home-insights .stat-num {
    font-size: 1.4rem;
  }
}

/* ---------- Stats page ---------- */
.stats-page {
  max-width: var(--maxw);
  margin: 0 auto;
}

.stats-page .masthead:not(.mascot-masthead) {
  max-width: 840px;
}

.charts-section {
  display: grid;
  gap: clamp(18px, 3vw, 28px);
}

.charts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 28px);
}

.chart-container {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: clamp(14px, 2vw, 18px);
}

.chart-wrapper {
  position: relative;
  height: clamp(260px, 36vw, 380px);
}

.chart-empty {
  display: grid;
  place-items: center;
  height: 100%;
  color: var(--ink-3);
  font-size: 0.9rem;
  text-align: center;
  padding: 18px;
}

.stats-status {
  margin-top: 12px;
  font-size: 0.86rem;
  color: var(--ink-3);
}

.stats-status.error {
  color: #b4452e;
}

[data-theme="dark"] .stats-status.error {
  color: #f0a08c;
}

/* ---------- Section heads ---------- */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.section-head h2 {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 1.4rem;
}
.section-head h2 i {
  font-size: 1.15rem;
  color: var(--accent);
}

.src {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-3);
  border: 1px solid var(--line);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

/* ---------- Map ---------- */
.map-section {
  margin-bottom: clamp(34px, 5vw, 52px);
}

.map-tools {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin: -2px 0 14px;
  padding: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.date-filters {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.date-control {
  display: grid;
  gap: 5px;
  color: var(--ink-3);
  font-size: 0.75rem;
  font-weight: 600;
}

.date-control span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.date-control i,
.layer-picker i,
.ghost-btn i {
  font-size: 1rem;
}

.date-control input {
  width: 152px;
  height: 38px;
  padding: 0 10px;
  font: inherit;
  font-size: 0.86rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color-scheme: light;
}

[data-theme="dark"] .date-control input {
  color-scheme: dark;
}

.date-control input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 12px;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.ghost-btn:hover {
  color: var(--ink);
  background: var(--surface-hover);
  border-color: var(--ink-3);
}

.layer-picker {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  padding: 0;
  margin: 0;
  border: 0;
}

.layer-picker legend {
  width: 100%;
  margin-bottom: -1px;
  color: var(--ink-3);
  font-size: 0.75rem;
  font-weight: 600;
}

.layer-picker label {
  min-width: 0;
}

.layer-picker label span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 11px;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.layer-picker input:checked + span {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: transparent;
}

.layer-picker input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.layer-picker label span:hover {
  border-color: var(--ink-3);
}

#map {
  height: 480px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: var(--surface-2);
  z-index: 0;
}

.map-location-control,
.map-center-control {
  position: relative;
}

.map-location-button,
.map-center-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  color: #222;
  background: #fff;
  border: 2px solid rgb(0 0 0 / 20%);
  border-radius: 4px;
  background-clip: padding-box;
  box-shadow: 0 1px 5px rgb(0 0 0 / 20%);
  cursor: pointer;
}

.map-location-button:hover,
.map-location-button:focus-visible,
.map-center-button:hover,
.map-center-button:focus-visible {
  color: var(--accent);
  background: #f4f4f4;
}

.map-location-button:focus-visible,
.map-center-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.map-location-button:disabled {
  cursor: wait;
}

.map-location-button i,
.map-center-button i {
  font-size: 19px;
}

.map-location-button.is-loading i {
  animation: spin 0.8s linear infinite;
}

.map-location-message {
  position: absolute;
  top: 0;
  left: 42px;
  width: max-content;
  max-width: min(280px, calc(100vw - 110px));
  padding: 8px 10px;
  color: var(--ink);
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-4px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.map-location-message.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.map-location-message.is-success {
  border-color: #16a34a;
}

.map-location-message.is-error {
  border-color: #d97706;
}

.user-location-accuracy {
  fill: #2563eb;
  fill-opacity: 0.12;
  stroke: #2563eb;
  stroke-opacity: 0.5;
  stroke-width: 1.5;
}

.user-location-marker {
  fill: #2563eb;
  fill-opacity: 1;
  stroke: #fff;
  stroke-width: 3;
  filter: drop-shadow(0 1px 3px rgb(0 0 0 / 45%));
}

/* Minimal map markers instead of emoji */
.leaflet-div-icon {
  background: transparent;
  border: 0;
}
.pin {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 2.5px solid var(--surface);
  box-shadow: 0 0 0 1px var(--line-strong), 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s ease;
}
.pin:hover {
  transform: scale(1.35);
}
/* Značka schváleného varovania zo správ — hranatá a odlíšená farbou */
.pin.pin-news {
  background: var(--bark);
  border-radius: 3px;
}

/* Legenda mapy */
.map-legend {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 12px;
  font-size: 0.8rem;
  color: var(--ink-3);
}
.map-legend .lg {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.map-legend .lg-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--surface);
  box-shadow: 0 0 0 1px var(--line-strong);
}
.map-legend .lg-dot.news {
  background: var(--bark);
  border-radius: 3px;
}

.leaflet-container {
  font-family: var(--font-sans);
  background: var(--surface-2);
}
.leaflet-popup-content-wrapper {
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
}
.leaflet-popup-content {
  margin: 13px 15px;
}
.popup-loc {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.02rem;
  margin: 0 0 3px;
}
.popup-meta {
  font-size: 0.76rem;
  color: var(--ink-3);
  margin: 0 0 7px;
}
.popup-note {
  font-size: 0.86rem;
  color: var(--ink-2);
  margin: 0 0 8px;
}
.popup-link {
  font-size: 0.78rem;
  font-weight: 600;
}
.source-links {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  align-items: center;
}
.source-links .popup-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

/* ---------- Columns ---------- */
.columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 3vw, 34px);
}

@media (max-width: 880px) {
  .columns {
    grid-template-columns: 1fr;
  }
  #map {
    height: 380px;
  }

  .charts-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .map-tools,
  .date-filters,
  .layer-picker {
    align-items: stretch;
    width: 100%;
  }

  .date-control {
    flex: 1 1 150px;
  }

  .date-control input {
    width: 100%;
  }

  .layer-picker label {
    flex: 1 1 130px;
  }

  .layer-picker label span {
    width: 100%;
  }
}

/* ---------- Search ---------- */
.search-wrap {
  position: relative;
  margin-bottom: 16px;
}
.search-wrap i {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-3);
  font-size: 17px;
  pointer-events: none;
}
.search-wrap input {
  width: 100%;
  height: 42px;
  padding: 0 14px 0 40px;
  font-family: inherit;
  font-size: 0.92rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
}
.search-wrap input::placeholder {
  color: var(--ink-3);
}
.search-wrap input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* ---------- Lists & cards ---------- */
.list {
  --list-fade: 48px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 660px;
  overflow-y: auto;
  padding-right: 4px;
  padding-bottom: var(--list-fade);
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
  -webkit-mask-image: linear-gradient(
    to bottom,
    #000 0,
    #000 calc(100% - var(--list-fade)),
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    #000 0,
    #000 calc(100% - var(--list-fade)),
    transparent 100%
  );
}
.list::-webkit-scrollbar {
  width: 8px;
}
.list::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 8px;
}

.list-load-more {
  display: none;
}

.card {
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.12s ease,
    box-shadow 0.16s ease;
}

@media (prefers-reduced-motion: no-preference) {
  .card.reveal {
    animation: rise 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: calc(var(--i, 0) * 32ms);
  }
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.card.sighting {
  cursor: pointer;
}
.card.sighting:hover {
  border-color: var(--accent);
  background: var(--surface-2);
  box-shadow: var(--shadow-sm);
}

.card-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.3;
  margin: 0 0 6px;
  color: var(--ink);
}
.card-title a {
  color: inherit;
}
.card-title a:hover {
  color: var(--accent);
  text-decoration: none;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  font-size: 0.76rem;
  color: var(--ink-3);
  margin-bottom: 7px;
}
.meta-date {
  color: var(--ink-2);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.meta-source {
  color: var(--accent);
  font-weight: 600;
}
.meta-place {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--bark);
  font-weight: 600;
}
.meta-place i {
  font-size: 0.95em;
}

/* Varovanie s mapovou lokalitou je klikateľné (vycentruje mapu). */
.card.news.has-place {
  cursor: pointer;
}
.card.news.has-place:hover {
  border-color: var(--bark);
  background: var(--surface-2);
  box-shadow: var(--shadow-sm);
}

.card-note {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 9px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
}
.card-link i {
  font-size: 14px;
}
.source-links .card-link {
  margin-top: 9px;
}

/* ---------- Skeleton loading ---------- */
.skeleton {
  height: 84px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: linear-gradient(
    100deg,
    var(--surface) 30%,
    var(--surface-hover) 50%,
    var(--surface) 70%
  );
  background-size: 220% 100%;
}
@media (prefers-reduced-motion: no-preference) {
  .skeleton {
    animation: shimmer 1.4s ease-in-out infinite;
  }
}
@keyframes shimmer {
  from {
    background-position: 180% 0;
  }
  to {
    background-position: -80% 0;
  }
}

/* ---------- States ---------- */
.empty,
.error-box {
  text-align: center;
  padding: 34px 16px;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
}
.empty {
  color: var(--ink-3);
}
.empty i {
  display: block;
  font-size: 28px;
  margin-bottom: 8px;
  color: var(--line-strong);
}
.error-box {
  color: #b4452e;
  background: rgba(180, 69, 46, 0.07);
  border: 1px solid rgba(180, 69, 46, 0.22);
}
[data-theme="dark"] .error-box {
  color: #f0a08c;
}

/* ---------- Crawlable map guide / FAQ ---------- */
.map-context {
  max-width: 82ch;
  margin: -2px 0 18px;
  color: var(--ink-3);
  font-size: 0.88rem;
}

.seo-content {
  margin-top: clamp(42px, 7vw, 76px);
  padding-top: clamp(32px, 5vw, 54px);
  border-top: 1px solid var(--line-strong);
}

.section-kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.seo-content h2,
.knowledge-article h2 {
  font-size: clamp(1.55rem, 3.4vw, 2.15rem);
  line-height: 1.14;
}

.seo-content-intro {
  max-width: 820px;
}

.answer-lead {
  margin: 14px 0 0;
  color: var(--ink-2);
  font-size: clamp(1.02rem, 2vw, 1.17rem);
  line-height: 1.68;
}

.answer-lead strong {
  color: var(--ink);
}

.explain-grid,
.source-grid,
.scenario-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.explain-grid article,
.source-grid article,
.scenario-grid article {
  padding: clamp(20px, 3vw, 26px);
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

.explain-grid article > i,
.source-grid article > i {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 16px;
  color: var(--accent);
  font-size: 1.35rem;
  background: var(--accent-soft);
  border-radius: 50%;
}

.explain-grid h3,
.source-grid h3,
.scenario-grid h3,
.method-steps h3 {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.25;
}

.explain-grid p,
.source-grid p,
.scenario-grid p,
.method-steps p {
  margin: 8px 0 0;
  color: var(--ink-2);
  font-size: 0.91rem;
}

.map-reading-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: clamp(28px, 6vw, 70px);
  align-items: start;
  margin-top: clamp(44px, 7vw, 74px);
}

.reading-steps {
  padding-left: 1.2rem;
  margin: 18px 0 20px;
  color: var(--ink-2);
}

.reading-steps li + li {
  margin-top: 10px;
}

.reading-steps strong {
  color: var(--ink);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
}

.safety-callout,
.emergency-box,
.limitations {
  padding: clamp(24px, 4vw, 34px);
  background: linear-gradient(135deg, var(--accent-soft), var(--bark-soft));
  border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--line));
  border-radius: var(--radius);
}

.safety-official-source {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 18px;
  margin-bottom: 22px;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line));
}

.safety-source-icon {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  border-radius: 50%;
  font-size: 1.3rem;
}

.safety-source-label,
.safety-source-name {
  display: block;
}

.safety-source-label {
  margin-bottom: 2px;
  color: var(--ink-3);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.safety-source-name {
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.35;
}

.safety-callout .safety-description {
  margin: 12px 0 22px;
  color: var(--ink-2);
}

.safety-actions {
  display: grid;
  gap: 12px;
}

.safety-btn {
  width: 100%;
  min-height: 46px;
  justify-content: center;
  text-align: center;
}

.safety-summary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 32px;
  font-size: 0.86rem;
  font-weight: 700;
  text-align: center;
}

.faq {
  max-width: 900px;
  margin-top: clamp(48px, 7vw, 80px);
}

.location-directory {
  max-width: 900px;
  margin-top: clamp(48px, 7vw, 80px);
}

.location-directory > p:not(.section-kicker) {
  max-width: 76ch;
  color: var(--ink-2);
  line-height: 1.7;
}

.location-links a {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  padding: 9px 13px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  text-decoration: none;
}

.location-links a:hover,
.location-links a:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
}

.location-record-list {
  max-height: none;
  overflow: visible;
  padding-bottom: 0;
  -webkit-mask-image: none;
  mask-image: none;
}

.faq-list {
  margin-top: 20px;
  border-top: 1px solid var(--line-strong);
}

.faq details {
  border-bottom: 1px solid var(--line-strong);
}

.faq summary {
  position: relative;
  padding: 19px 42px 19px 0;
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  position: absolute;
  right: 6px;
  top: 16px;
  color: var(--accent);
  font-size: 1.45rem;
  font-weight: 400;
}

.faq details[open] summary::after {
  content: "−";
}

.faq details p {
  max-width: 76ch;
  margin: -4px 42px 20px 0;
  color: var(--ink-2);
}

/* ---------- Knowledge / methodology pages ---------- */
.knowledge-page {
  max-width: 1040px;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: clamp(26px, 4vw, 42px);
  color: var(--ink-3);
  font-size: 0.82rem;
}

.breadcrumbs a {
  font-weight: 600;
}

.knowledge-article {
  max-width: 900px;
}

.knowledge-hero {
  max-width: 800px;
  padding-bottom: clamp(34px, 6vw, 56px);
  border-bottom: 1px solid var(--line-strong);
}

.knowledge-hero > .section-kicker {
  margin-bottom: clamp(18px, 3vw, 32px);
}

.knowledge-hero h1 {
  font-size: clamp(2.25rem, 6vw, 4rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.review-note {
  margin: 16px 0 0;
  color: var(--ink-3);
  font-size: 0.82rem;
}

.knowledge-article > section,
.knowledge-article > aside {
  margin-top: clamp(42px, 7vw, 72px);
}

.knowledge-article > section > p:not(.section-kicker) {
  max-width: 78ch;
  color: var(--ink-2);
  font-size: 1rem;
  line-height: 1.72;
}

.emergency-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: center;
}

.emergency-box h2 {
  max-width: 650px;
}

.emergency-box p:not(.section-kicker) {
  max-width: 65ch;
  margin: 10px 0 0;
  color: var(--ink-2);
}

.emergency-number {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  color: #fff;
  background: #a83928;
  border-radius: 50%;
  font-size: 2rem;
  font-weight: 700;
  box-shadow: var(--shadow);
}

.emergency-number:hover {
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

.check-list,
.limitations ul,
.sources ul {
  padding: 0;
  margin: 20px 0 0;
  list-style: none;
}

.check-list li,
.limitations li {
  position: relative;
  padding: 13px 0 13px 34px;
  color: var(--ink-2);
  border-bottom: 1px solid var(--line);
}

.check-list li::before,
.limitations li::before {
  content: "✓";
  position: absolute;
  left: 3px;
  top: 12px;
  color: var(--accent);
  font-weight: 800;
}

.scenario-number {
  display: block;
  margin-bottom: 14px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
}

.dont-list {
  padding: clamp(24px, 4vw, 34px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.dont-list > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 24px;
  margin-top: 20px;
}

.dont-list p {
  display: flex;
  gap: 9px;
  margin: 0;
  color: var(--ink-2);
}

.dont-list i {
  flex: 0 0 auto;
  margin-top: 3px;
  color: #a83928;
  font-weight: 700;
}

.notice {
  padding-left: 16px;
  border-left: 3px solid var(--moss);
}

.source-actions,
.api-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.sources li + li {
  margin-top: 10px;
}

.sources a,
.api-links a {
  font-weight: 650;
}

.method-steps {
  display: grid;
  gap: 0;
  padding: 0;
  margin: 24px 0 0;
  list-style: none;
}

.method-steps li {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 18px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.method-steps li > span {
  display: grid;
  place-items: center;
  align-self: start;
  width: 44px;
  height: 44px;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 50%;
  font-weight: 800;
}

.accuracy-table {
  margin-top: 22px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
}

.accuracy-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.38fr) 1fr;
}

.accuracy-row + .accuracy-row {
  border-top: 1px solid var(--line);
}

.accuracy-row > * {
  padding: 16px 18px;
}

.accuracy-row > * + * {
  color: var(--ink-2);
  border-left: 1px solid var(--line);
}

.accuracy-head {
  color: var(--ink-3);
  background: var(--surface-2);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.limitations li::before {
  content: "—";
}

.editorial-policy {
  padding-top: clamp(28px, 5vw, 42px);
  border-top: 1px solid var(--line-strong);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: clamp(28px, 5vw, 52px);
  padding: 26px clamp(16px, 4vw, 36px);
}
.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  max-width: var(--maxw);
  margin: 0 auto;
}
.site-footer p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--ink-3);
  line-height: 1.6;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
}

/* ---------- Report CTA ---------- */
.report-cta {
  margin-top: clamp(34px, 5vw, 52px);
  padding: clamp(22px, 4vw, 34px);
  padding-right: clamp(170px, 19vw, 240px);
  min-height: clamp(168px, 18vw, 210px);
  position: relative;
  background: linear-gradient(135deg, var(--accent-soft), var(--bark-soft));
  border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--line));
  border-radius: var(--radius);
  overflow: hidden;
}

.report-cta-inner {
  position: static;
}

.report-cta-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 16px;
  max-width: 56ch;
  min-height: clamp(112px, 13vw, 142px);
}

.report-cta-text h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(1.3rem, 3vw, 1.6rem);
}

.report-cta-text h2 i {
  color: var(--accent);
  font-size: 1.3em;
}

.report-cta-text p {
  margin: 8px 0 0;
  color: var(--ink-2);
  max-width: 52ch;
}

.report-cta-content .btn {
  align-self: flex-start;
}

.mascot-cta-image {
  display: block;
  position: absolute;
  right: clamp(-56px, -4.2vw, -28px);
  bottom: clamp(-46px, -3.8vw, -24px);
  z-index: 0;
  width: clamp(154px, 17vw, 210px);
  height: auto;
  object-fit: contain;
  object-position: center bottom;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  filter: drop-shadow(0 10px 16px rgba(26, 26, 23, 0.1));
}

[data-theme="dark"] .mascot-cta-image {
  filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.42));
}

/* ---------- Notify / subscribe section ---------- */
.notify-section {
  margin-top: clamp(20px, 3vw, 28px);
  padding: clamp(26px, 4vw, 42px);
  overflow: hidden;
  background: linear-gradient(
      135deg,
      color-mix(in srgb, var(--accent-soft) 42%, transparent),
      transparent 48%
    ),
    var(--surface);
  border: 1px solid color-mix(in srgb, var(--bark) 14%, var(--line));
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.notify-inner {
  display: grid;
  grid-template-columns: minmax(260px, 0.78fr) minmax(420px, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}

.notify-text h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(1.3rem, 3vw, 1.6rem);
  line-height: 1.12;
}

.notify-text h2 i {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 42px;
  height: 42px;
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  border-radius: 50%;
  color: var(--accent);
  font-size: 1.16em;
}

.notify-text p {
  margin: 14px 0 0;
  color: var(--ink-2);
  max-width: 42ch;
  font-size: 1.02rem;
  line-height: 1.68;
}

.notify-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  min-width: 0;
}

.notify-field {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}

.notify-field input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  transition: border-color 0.16s, box-shadow 0.16s;
}

.notify-field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.notify-field input::placeholder {
  color: var(--ink-3);
}

[data-theme="dark"] .notify-field input {
  color-scheme: dark;
}

.notify-type {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.notify-radio {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 650;
  color: var(--ink-2);
  text-align: center;
  padding: 9px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  transition: border-color 0.16s, background 0.16s, color 0.16s;
}

.notify-radio:hover {
  background: var(--surface-hover);
  border-color: var(--ink-3);
}

.notify-radio input {
  flex: 0 0 auto;
  accent-color: var(--accent);
}

.notify-radio:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--ink);
}

.notify-area {
  grid-column: 1 / -1;
}

.notify-area input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  transition: border-color 0.16s, box-shadow 0.16s;
}

.notify-area input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.notify-area input::placeholder {
  color: var(--ink-3);
}

[data-theme="dark"] .notify-area input {
  color-scheme: dark;
}

.notify-btn {
  grid-column: 2;
  grid-row: 1;
  align-self: stretch;
  height: 48px;
  padding-inline: 20px;
  white-space: nowrap;
}

.notify-form .form-message {
  grid-column: 1 / -1;
  margin-top: 0;
}

@media (max-width: 720px) {
  .mascot-masthead {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .mascot-hero {
    display: none;
  }

  .report-cta-inner {
    display: block;
  }

  .report-cta-content {
    align-items: flex-start;
  }

  .report-cta {
    padding-right: clamp(22px, 4vw, 34px);
    padding-bottom: 108px;
    min-height: 0;
  }

  .mascot-cta-image {
    right: -30px;
    bottom: -48px;
    width: 150px;
  }

  .notify-inner {
    grid-template-columns: 1fr;
  }

  .notify-form {
    grid-template-columns: 1fr;
  }

  .notify-btn {
    grid-column: 1 / -1;
    grid-row: auto;
    justify-content: center;
  }
}

/* ---------- Report form page ---------- */
.report-container {
  max-width: 660px;
  margin: 0 auto;
}

.report-header {
  margin-bottom: clamp(20px, 3vw, 32px);
}

.report-back {
  text-decoration: none;
}
.report-back:hover {
  text-decoration: none;
}

.report-container h1 {
  font-size: clamp(2rem, 5vw, 2.8rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
}

.report-form {
  margin-top: clamp(28px, 4vw, 40px);
}

.form-field {
  margin-bottom: 1.4rem;
}

.form-field label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 7px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink);
}

.form-field label i {
  color: var(--accent);
  font-size: 1.1em;
}

.form-field.required label::after {
  content: '*';
  color: #b91c1c;
  margin-left: 2px;
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  font-family: inherit;
  font-size: 0.94rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  transition: border-color 0.16s, box-shadow 0.16s;
}

.form-field textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.55;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: var(--ink-3);
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

[data-theme="dark"] .form-field input,
[data-theme="dark"] .form-field textarea {
  color-scheme: dark;
}

.field-hint {
  display: block;
  margin-top: 5px;
  font-size: 0.78rem;
  color: var(--ink-3);
}

/* --- Výber miesta na mape (formulár hlásenia) --- */
.map-search {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

.map-search input {
  flex: 1 1 200px;
  min-width: 0;
  padding: 0.7rem 0.9rem;
  font-family: inherit;
  font-size: 0.94rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  transition: border-color 0.16s, box-shadow 0.16s;
}

.map-search input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.btn-map-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0.7rem 0.95rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.16s, background 0.16s, opacity 0.16s;
}

.btn-map-action:hover {
  border-color: var(--accent);
}

.btn-map-action i {
  color: var(--accent);
  font-size: 1.1em;
}

.btn-map-action.loading {
  pointer-events: none;
  opacity: 0.7;
}

.pick-map {
  height: 340px;
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  overflow: hidden;
  z-index: 0;
}

.pin-pick {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--surface);
  box-shadow: 0 0 0 1px var(--line-strong), 0 2px 8px rgba(0, 0, 0, 0.4);
  cursor: grab;
}

.location-status {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 10px;
  padding: 0.65rem 0.85rem;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--ink-2);
  background: var(--surface-2, var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.location-status i {
  margin-top: 1px;
  color: var(--accent);
  font-size: 1.1em;
  flex-shrink: 0;
}

.location-status.ok {
  border-color: #16a34a;
  color: #15803d;
}
.location-status.ok i {
  color: #16a34a;
}
[data-theme="dark"] .location-status.ok {
  color: #4ade80;
}

.location-status.warn {
  border-color: #d97706;
  color: #b45309;
}
.location-status.warn i {
  color: #d97706;
}
[data-theme="dark"] .location-status.warn {
  color: #fbbf24;
}

.btn-confirm-location {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 0.7rem 1.4rem;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--accent);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.16s, color 0.16s, opacity 0.16s;
}

.btn-confirm-location i {
  font-size: 1.15em;
  color: var(--accent);
}

.btn-confirm-location:hover:not(:disabled) {
  background: var(--accent-soft);
}

.btn-confirm-location:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-confirm-location.confirmed {
  color: var(--accent-ink);
  background: #16a34a;
  border-color: #16a34a;
}
.btn-confirm-location.confirmed i {
  color: var(--accent-ink);
}

.spin {
  display: inline-block;
  animation: spin 0.8s linear infinite;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.form-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 2rem 0 1.4rem;
  color: var(--ink-3);
  font-size: 0.82rem;
  font-weight: 600;
}

.form-divider::before,
.form-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

.btn-submit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 0.5rem;
  padding: 0.85rem 2rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent-ink);
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: opacity 0.16s, transform 0.1s;
}

.btn-submit:hover {
  opacity: 0.9;
}

.btn-submit:active {
  transform: translateY(1px);
}

.btn-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-submit i {
  font-size: 1.15em;
}

.form-message {
  margin-top: 1.2rem;
  padding: 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
}

.form-message:empty {
  display: none;
}

.form-message.success {
  background: rgba(34, 197, 94, 0.1);
  color: #15803d;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.form-message.error {
  background: rgba(239, 68, 68, 0.1);
  color: #b91c1c;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

[data-theme="dark"] .form-message.success {
  color: #4ade80;
}

[data-theme="dark"] .form-message.error {
  color: #f87171;
}

.notify-privacy {
  margin: 0;
  color: var(--ink-3);
  font-size: 0.76rem;
  line-height: 1.45;
}

.notify-privacy a {
  color: inherit;
  font-weight: 650;
}

/* ---------- Legal pages ---------- */
.legal-page {
  max-width: 900px;
}

.legal-content {
  max-width: 760px;
}

.legal-kicker {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.legal-content h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
}

.legal-updated {
  margin: 12px 0 34px;
  color: var(--ink-3);
  font-size: 0.9rem;
}

.legal-content section {
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.legal-content h2 {
  margin-bottom: 10px;
  font-size: 1.35rem;
}

.legal-content p {
  margin: 0 0 12px;
  color: var(--ink-2);
}

.legal-content p:last-child {
  margin-bottom: 0;
}

.legal-content ul {
  margin: 10px 0 0;
  padding-left: 22px;
  color: var(--ink-2);
}

.legal-content li + li {
  margin-top: 8px;
}

.legal-content a {
  color: var(--accent);
}

.legal-settings-button {
  margin-top: 8px;
}

.legal-back {
  text-decoration: none;
}

/* ---------- Privacy consent ---------- */
.privacy-banner[hidden] {
  display: none;
}

.privacy-banner {
  position: fixed;
  z-index: 10000;
  right: 18px;
  bottom: 18px;
  left: 18px;
  color: var(--ink);
}

.privacy-banner__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(100%, 980px);
  margin: 0 auto;
  padding: 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  box-shadow: 0 18px 55px rgb(15 23 18 / 20%);
  backdrop-filter: blur(16px);
}

.privacy-banner__copy {
  max-width: 650px;
}

.privacy-banner h2 {
  margin: 0 0 5px;
  font-family: var(--font-sans);
  font-size: 1rem;
  letter-spacing: 0;
}

.privacy-banner p {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.86rem;
  line-height: 1.55;
}

.privacy-banner a {
  color: inherit;
  font-weight: 650;
}

.privacy-banner__actions {
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
}

.privacy-choice {
  flex: 1 1 0;
  min-width: 155px;
  min-height: 42px;
  padding: 9px 15px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
}

.privacy-choice--secondary {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--surface);
}

.privacy-choice--primary {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}

.privacy-choice:hover,
.privacy-choice:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.footer-privacy-button {
  padding: 0;
  border: 0;
  color: inherit;
  background: none;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

@media (max-width: 720px) {
  .privacy-banner {
    right: 10px;
    bottom: 10px;
    left: 10px;
  }

  .privacy-banner__inner,
  .privacy-banner__actions {
    align-items: stretch;
    flex-direction: column;
  }

  .privacy-banner__inner {
    gap: 16px;
  }

  .privacy-banner__actions {
    gap: 8px;
  }

  .privacy-choice {
    width: 100%;
  }
}

.legal-back:hover {
  text-decoration: none;
}

@media (max-width: 520px) {
  .map-tools {
    padding: 10px;
  }
  .date-control,
  .ghost-btn {
    flex: 1 1 100%;
  }
  .ghost-btn {
    width: 100%;
  }
  .masthead h1 {
    font-size: clamp(1.65rem, 7.5vw, 2rem);
    overflow-wrap: break-word;
  }
  .updated {
    display: none;
  }
  .footer-inner {
    display: block;
  }

  .stats {
    gap: 16px 0;
  }

  .stat {
    width: 100%;
    padding-right: 0;
    margin-right: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding-bottom: 14px;
  }

  .stat:last-child {
    border-bottom: 0;
    padding-bottom: 0;
  }

  /* Hero štatistiky zostávajú na mobile v jednom kompaktnom riadku. */
  .home-insights .stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    gap: 0;
  }

  .home-insights .stat {
    width: auto;
    min-width: 0;
    margin: 0;
    padding: 0 6px;
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  .home-insights .stat:first-child {
    padding-left: 0;
  }

  .home-insights .stat:last-child {
    padding-right: 0;
    border-right: 0;
  }

  .home-insights .stat-num {
    font-size: 1.1rem;
  }

  .home-insights .stat-label {
    margin-top: 4px;
    font-size: clamp(0.58rem, 2.7vw, 0.7rem);
    line-height: 1.15;
    white-space: nowrap;
  }

  .chart-container {
    padding: 12px;
  }

  .chart-wrapper {
    height: 250px;
  }

  .footer-links {
    justify-content: flex-start;
    margin-top: 14px;
    white-space: normal;
  }
  .legal-back span {
    display: none;
  }
  .legal-back {
    flex: 0 0 42px;
    width: 42px;
    padding: 0;
    justify-content: center;
  }
}

/* ============================================================
   Responsive — tablety a mobily
   Pravidlá: bezpečné tap-targety (>=44px), žiadny horizontálny
   pretok, na iOS nezoomovať pri fokuse (font >=16px), mobilná
   spodná navigácia namiesto pretekajúceho menu v hlavičke.
   ============================================================ */

/* Žiadny vodorovný pretok na žiadnom zariadení.
   `clip` (nie `hidden`) — nevytvára scroll-kontajner, takže
   nepokazí position: sticky hlavičku. */
html,
body {
  max-width: 100%;
  overflow-x: clip;
}

img,
svg,
canvas,
.leaflet-container {
  max-width: 100%;
}

/* ---------- Tablet (max 1024px) ---------- */
@media (max-width: 1024px) {
  .report-cta-inner,
  .notify-inner {
    gap: clamp(18px, 3vw, 28px);
  }

}

/* ---------- Tablet / menšie (max 880px) ---------- */
@media (max-width: 880px) {
  main {
    padding-left: clamp(16px, 4vw, 28px);
    padding-right: clamp(16px, 4vw, 28px);
  }

  .explain-grid,
  .source-grid,
  .scenario-grid {
    grid-template-columns: 1fr;
  }

  .map-reading-grid {
    grid-template-columns: 1fr;
  }

  .notify-inner {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .list {
    max-height: 520px;
  }
}

/* ---------- Mobil (max 620px): spodná navigácia + tap-targety ---------- */
@media (max-width: 620px) {
  /* Hlavička: len brand + akcie, menu ide naspodok.
     Pozn.: backdrop-filter na hlavičke musí ísť preč — inak by
     vytvoril containing block pre fixed .main-nav a spodná lišta
     by sa „prilepila" k hlavičke namiesto k spodku obrazovky. */
  .site-header {
    display: flex;
    justify-content: space-between;
    height: 60px;
    gap: 10px;
    background: var(--surface);
    backdrop-filter: none;
  }

  /* Mobilná spodná navigácia (app-like tab bar) */
  .main-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    justify-self: stretch;
    width: 100%;
    gap: 0;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: saturate(180%) blur(12px);
    border-top: 1px solid var(--line);
    box-shadow: 0 -2px 12px rgba(26, 26, 23, 0.06);
  }

  .main-nav a {
    flex: 1;
    text-align: center;
    padding: 11px 4px;
    font-size: 0.82rem;
    border-radius: var(--radius-sm);
  }

  /* Obsah nech sa neschová za spodnú lištu */
  body:has(.main-nav) {
    padding-bottom: calc(60px + env(safe-area-inset-bottom));
  }

  /* iOS pri fokuse na input s fontom <16px stránku zoomne — zabráň tomu */
  input,
  textarea,
  select {
    font-size: 16px;
  }

  /* CTA a odberové tlačidlá: plná šírka + pohodlný tap-target */
  .report-cta-inner .btn,
  .notify-btn,
  .report-back {
    width: 100%;
    height: 46px;
    justify-content: center;
  }

  .report-cta-text h2,
  .notify-text h2 {
    font-size: 1.35rem;
  }

  .notify-section {
    padding: 22px;
  }

  .notify-type {
    grid-template-columns: 1fr;
  }

  /* Pohodlnejšie tap-targety pre ikonové a bežné tlačidlá */
  .icon-btn {
    width: 42px;
    height: 42px;
  }

  /* Dve karty naraz bez vnoreného scrollovania; ďalšie pridá tlačidlo. */
  .list {
    max-height: none;
    overflow: visible;
    padding-right: 0;
    padding-bottom: 0;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .list-load-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 46px;
    margin-top: 4px;
    padding: 9px 16px;
    color: var(--accent);
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    font: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.16s ease, border-color 0.16s ease, transform 0.1s ease;
  }

  .list-load-more:hover,
  .list-load-more:focus-visible {
    background: var(--surface-hover);
    border-color: var(--accent);
  }

  .list-load-more:active {
    transform: translateY(1px);
  }

  .list-load-more-count {
    display: inline-grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    padding-inline: 6px;
    color: var(--ink-2);
    background: var(--accent-soft);
    border-radius: var(--radius-pill);
    font-size: 0.72rem;
    font-variant-numeric: tabular-nums;
  }

  /* Mapa: viac výšky pomerom k obrazovke */
  #map {
    height: 60vh;
    min-height: 320px;
  }

  /* Vyhľadávanie a dátumové polia vyšší tap-target */
  .search-wrap input {
    height: 46px;
  }

  .date-control input,
  .ghost-btn,
  .layer-picker label span {
    height: 42px;
  }

  /* Sekcie nadpisy o niečo menšie */
  .section-head h2 {
    font-size: 1.25rem;
  }

  /* Úvod mapy: nadpis, súhrn a vysvetlenie majú na mobile vlastné riadky. */
  .map-section > .section-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    justify-content: start;
    gap: 6px;
    margin-bottom: 12px;
  }

  .map-section > .section-head h2 {
    width: 100%;
    font-size: clamp(1.2rem, 5.5vw, 1.35rem);
    line-height: 1.2;
  }

  .map-section > .section-head .muted {
    display: block;
    padding-left: 30px;
    color: var(--ink-2);
    font-size: 0.78rem;
    line-height: 1.35;
    white-space: normal;
  }

  .map-section > .map-context {
    max-width: none;
    margin: 0 0 16px;
    color: var(--ink-2);
    font-size: 0.86rem;
    line-height: 1.5;
  }

  /* Legenda pod mapou nech sa zalomí pekne */
  .map-legend {
    gap: 10px 16px;
    font-size: 0.78rem;
  }

  .emergency-box {
    grid-template-columns: 1fr;
  }

  .emergency-number {
    width: 82px;
    height: 82px;
    font-size: 1.75rem;
  }

  .dont-list > div {
    grid-template-columns: 1fr;
  }

  .accuracy-row {
    grid-template-columns: 1fr;
  }

  .accuracy-row > * {
    padding: 12px 14px;
  }

  .accuracy-row > * + * {
    padding-top: 0;
    border-left: 0;
  }

  .accuracy-head {
    display: none;
  }

  .source-actions .btn,
  .source-actions .ghost-btn {
    width: 100%;
    min-height: 46px;
    justify-content: center;
    text-align: center;
  }

  .footer-inner {
    flex-direction: column;
  }

  .footer-links {
    justify-content: flex-start;
    white-space: normal;
  }
}

/* ---------- Malý mobil (max 400px) ---------- */
@media (max-width: 400px) {
  .main-nav a {
    font-size: 0.78rem;
    padding: 11px 2px;
  }

  main {
    padding-top: clamp(20px, 5vw, 28px);
  }
}

/* ---------- Veľmi úzky mobil (max 360px) ---------- */
@media (max-width: 360px) {
  .site-header {
    padding-inline: 12px;
  }

  .brand {
    gap: 6px;
  }

  .brand-mark {
    flex-basis: 36px;
    width: 36px;
    height: 36px;
  }

  .brand-name {
    display: block;
    font-size: 1.05rem;
  }
}
