/* ============================================================
   MeteoLab SK — „Ranná obloha nad Tatrami"
   Palette: ink #0E2233 · azure #1467C8 · cyan #2FB6E8
            paper #F2F7FC · amber #F59E0B
   Type:    Sora (display) · Inter (body)
   ============================================================ */

:root {
  --ink: #0e2233;
  --ink-soft: #4a6076;
  --paper: #f2f7fc;
  --card: #ffffff;
  --azure: #1467c8;
  --azure-deep: #0d4a94;
  --cyan: #2fb6e8;
  --amber: #f59e0b;
  --line: #dbe6f0;
  --shadow: 0 8px 30px rgba(14, 34, 51, .14);
  --radius: 18px;
  --font-display: 'Sora', sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* Globálne skrytie — platí pre všetky stránky (index, mestá, agro) */
.is-hidden { display: none !important; }

html, body { height: 100%; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ---------- Top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 12px;
  padding: 10px clamp(14px, 3vw, 28px);
  background: linear-gradient(180deg, #ffffff 0%, #f6fafd 100%);
  border-bottom: 1px solid var(--line);
  z-index: 1200;
  flex-wrap: wrap;
}

.brand { display: flex; align-items: center; gap: 12px; }

.brand-mark {
  width: 38px; height: 38px; border-radius: 12px; flex: 0 0 auto;
  background:
    radial-gradient(circle at 30% 30%, var(--cyan) 0 34%, transparent 35%),
    linear-gradient(135deg, var(--azure) 0%, var(--azure-deep) 100%);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.25);
}

.brand-text h1 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.1;
}
.brand-text h1 em { font-style: normal; color: var(--azure); }
.brand-text p { font-size: .72rem; color: var(--ink-soft); }

.layer-switch {
  display: flex; gap: 6px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px;
}

.layer-btn {
  font-family: var(--font-display);
  font-size: .8rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: transparent;
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.layer-btn:hover { color: var(--ink); }
.layer-btn.is-active { background: var(--azure); color: #fff; }
.layer-btn:focus-visible, .tab:focus-visible, .panel-close:focus-visible, .info-btn:focus-visible {
  outline: 3px solid var(--cyan); outline-offset: 2px;
}

/* Tlačidlo a modál „O dátach" */
.info-btn {
  font-family: var(--font-display);
  font-size: .74rem;
  font-weight: 600;
  color: var(--azure);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
}
.info-btn:hover { background: var(--paper); }

.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(14, 34, 51, .5);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(3px);
}
.modal-backdrop.is-hidden { display: none; }
.modal {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 640px;
  width: 100%;
  max-height: 86dvh;
  overflow-y: auto;
  padding: 22px 26px 26px;
  position: relative;
}
.modal h2 { font-family: var(--font-display); font-size: 1.25rem; letter-spacing: -.02em; margin-bottom: 4px; padding-right: 44px; }
.modal h3 { font-family: var(--font-display); font-size: .88rem; margin-top: 16px; margin-bottom: 4px; }
.modal p { font-size: .8rem; line-height: 1.55; color: var(--ink-soft); }
.modal p b { color: var(--ink); }
.modal a { color: var(--azure); }
.modal .panel-close { position: absolute; top: 14px; right: 14px; margin: 0; }
.modal-note {
  background: #fdf3e3;
  border: 1px solid #f3ddb0;
  border-radius: 10px;
  padding: 10px 12px;
  margin-top: 6px;
}

/* Čas aktualizácie dát */
.updated { font-size: .64rem; color: var(--ink-soft); margin: 4px 0 8px; }

/* ---------- Map ---------- */
/* ---------- Výber kraja ---------- */
.kraj-bar {
  display: flex;
  gap: 6px;
  padding: 8px clamp(14px, 3vw, 28px);
  background: #fff;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  z-index: 1150;
  flex: 0 0 auto;
}
.kraj-bar::-webkit-scrollbar { display: none; }
.kraj-chip {
  font-family: var(--font-display);
  font-size: .72rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 13px;
  cursor: pointer;
  white-space: nowrap;
  flex: 0 0 auto;
  touch-action: manipulation;
  transition: background .15s, color .15s, border-color .15s;
}
.kraj-chip:hover { color: var(--ink); border-color: var(--azure); }
.kraj-chip.is-active { background: var(--azure); border-color: var(--azure); color: #fff; }
.kraj-chip:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }

.app { position: relative; flex: 1; min-height: 0; }

#map { position: absolute; inset: 0; background: #dfe9f2; }

.map-hint {
  position: absolute;
  top: 14px; right: 14px;
  background: rgba(14, 34, 51, .85);
  color: #fff;
  font-size: .8rem;
  padding: 8px 16px;
  border-radius: 999px;
  z-index: 1000;
  pointer-events: none;
  animation: hintFloatY 2.6s ease-in-out infinite;
  max-width: min(44vw, 420px);
  text-align: center;
  backdrop-filter: blur(4px);
}
.map-hint.is-hidden { display: none; }
@keyframes hintFloat { 0%,100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(4px); } }
@keyframes hintFloatY { 0%,100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

.map-bottom { display: contents; }

.legend {
  position: absolute;
  left: 12px; bottom: 12px;
  z-index: 1000;
  background: rgba(255,255,255,.92);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: .7rem;
  color: var(--ink-soft);
  box-shadow: var(--shadow);
  max-width: 260px;
  backdrop-filter: blur(4px);
}
.legend b { color: var(--ink); font-size: .74rem; }
.legend .lg-src { margin-top: 5px; font-size: .6rem; opacity: .75; }

/* Prepínač veličiny heatmapy */
.heat-ctrl {
  position: absolute;
  top: 14px; right: 12px;
  z-index: 1000;
  background: rgba(255,255,255,.94);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 7px 10px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  font-size: .68rem;
  max-width: min(92vw, 380px);
  backdrop-filter: blur(4px);
}
.heat-ctrl.is-hidden { display: none; }
.heat-ctrl b { font-family: var(--font-display); font-size: .68rem; margin-right: 2px; }
.heat-btn {
  font-family: var(--font-display);
  font-size: .66rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
  cursor: pointer;
}
.heat-btn.is-active { background: var(--azure); border-color: var(--azure); color: #fff; }
.heat-btn:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }
.heat-btn.is-hidden { display: none; }

/* Ovládanie animácie radaru */
.radar-ctrl input[type=range] {
  flex: 1 1 90px;
  min-width: 70px;
  accent-color: var(--azure);
  height: 26px;
  touch-action: manipulation;
}
.radar-time {
  font-family: var(--font-display);
  font-size: .7rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  min-width: 74px;
  text-align: center;
}
.radar-time .fut { color: var(--amber); }
.legend .grad {
  height: 8px;
  border-radius: 999px;
  margin-top: 5px;
  background: linear-gradient(90deg,
    #a5d8f5 0%, #4aa8e8 22%, #2e7dd1 40%, #f0e641 60%, #f59e0b 75%, #e0402a 88%, #8f1e9b 100%);
}

/* Riadky so zdrojmi */
.src {
  font-size: .62rem;
  color: var(--ink-soft);
  margin-top: 10px;
  line-height: 1.5;
}
#srcNow { padding: 0 20px; margin-top: 6px; }
.src a { color: var(--azure); }
.legend .lg-row { display: flex; align-items: center; gap: 6px; margin-top: 4px; flex-wrap: wrap; }
.legend .dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; flex: 0 0 auto; }

/* City markers */
.city-marker {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .78rem;
  color: #fff;
  background: linear-gradient(160deg, var(--azure) 0%, var(--azure-deep) 100%);
  border-radius: 999px;
  padding: 4px 9px;
  border: 2px solid #fff;
  box-shadow: 0 3px 10px rgba(14,34,51,.35);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transform: translate(-50%, -50%);
  cursor: pointer;
}
.city-marker small { font-weight: 500; font-size: .62rem; opacity: .85; }
.city-marker.aq { border-color: #fff; color: #10222f; }
.city-marker.mini { font-size: .7rem; padding: 3px 8px; background: linear-gradient(160deg, #2fb6e8 0%, #1467c8 100%); }
.city-marker.mini small { font-size: .58rem; }
.leaflet-marker-icon:hover .city-marker { transform: translate(-50%, -50%) scale(1.08); transition: transform .12s; }

/* Tlačidlo „moja poloha" */
.locate-btn {
  width: 34px; height: 34px;
  background: #fff;
  border: 2px solid rgba(0,0,0,.2);
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  line-height: 1;
  touch-action: manipulation;
}
.locate-btn:hover { background: var(--paper); }
.locate-btn.is-busy { animation: locatePulse 1s ease-in-out infinite; }
@keyframes locatePulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }

/* ---------- Detail panel ---------- */
.panel {
  position: absolute;
  z-index: 1100;
  background: var(--card);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overscroll-behavior: contain;
  transition: transform .35s cubic-bezier(.2,.9,.25,1);
  /* desktop: side panel */
  top: 0; right: 0; bottom: 0;
  width: min(440px, 92vw);
  border-left: 1px solid var(--line);
  transform: translateX(105%);
}
.panel.is-open { transform: translateX(0); }

/* pevná hlavička panelu — zatváracie tlačidlo je VŽDY viditeľné */
.panel-top {
  flex: 0 0 auto;
  border-bottom: 1px solid var(--line);
  background: var(--card);
}
.panel-grip { display: none; }
.panel-titlebar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 14px 10px 20px;
}
.panel-titlebar h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.15;
}
.coords { font-size: .7rem; color: var(--ink-soft); margin-top: 2px; }

.panel-close {
  flex: 0 0 auto;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink-soft);
  font-size: 1rem;
  cursor: pointer;
  touch-action: manipulation;
}
.panel-close:hover { background: var(--line); color: var(--ink); }

/* skrolovateľný obsah panelu */
.panel-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.now-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 8px;
  padding: 12px 20px 4px;
}
.now-cell {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  text-align: center;
}
.now-cell .v { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }
.now-cell .l { font-size: .64rem; color: var(--ink-soft); margin-top: 2px; }
.now-cell.hero { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 14px; }
.now-cell.hero .v { font-size: 2rem; }
.now-cell.hero .ico { font-size: 2rem; }
.now-cell.hero .desc { font-size: .8rem; color: var(--ink-soft); text-align: left; }

/* Tabs — lepia sa na vrch skrolovateľnej časti */
.tabs {
  display: flex;
  gap: 4px;
  padding: 10px 20px 0;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
  position: sticky;
  top: 0;
  background: var(--card);
  z-index: 4;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  font-family: var(--font-display);
  font-size: .76rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: none;
  border: 0;
  border-bottom: 3px solid transparent;
  padding: 8px 10px;
  cursor: pointer;
  white-space: nowrap;
}
.tab.is-active { color: var(--azure); border-bottom-color: var(--azure); }

.tab-body { padding: 14px 20px 24px; }
.tab-body.is-hidden { display: none; }
.tab-note { font-size: .74rem; color: var(--ink-soft); line-height: 1.5; margin-bottom: 10px; }

.chart-wrap { position: relative; height: 230px; }

/* Confidence badge (signature element companion) */
.confidence {
  margin-top: 12px;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: .78rem;
  line-height: 1.45;
  border: 1px solid var(--line);
  background: var(--paper);
}
.confidence b { font-family: var(--font-display); }
.confidence .bar {
  height: 8px; border-radius: 999px; background: var(--line);
  margin-top: 6px; overflow: hidden;
}
.confidence .bar i {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), var(--azure));
}

/* Daily list */
.daily-list { display: flex; flex-direction: column; gap: 6px; }
.day-row {
  display: grid;
  grid-template-columns: 74px 34px 1fr auto;
  align-items: center;
  gap: 10px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: .8rem;
}
.day-row .dname { font-family: var(--font-display); font-weight: 600; font-size: .76rem; }
.day-row .dname small { display: block; font-weight: 400; color: var(--ink-soft); font-size: .62rem; }
.day-row .ico { font-size: 1.2rem; text-align: center; }
.day-row .range { display: flex; align-items: center; gap: 8px; }
.day-row .range .track { flex: 1; height: 6px; border-radius: 999px; background: var(--line); position: relative; min-width: 40px; }
.day-row .range .fill { position: absolute; top: 0; bottom: 0; border-radius: 999px; background: linear-gradient(90deg, var(--cyan), var(--amber)); }
.day-row .tmin { color: var(--ink-soft); min-width: 30px; text-align: right; }
.day-row .tmax { font-weight: 600; min-width: 30px; }
.day-row .rain { font-size: .7rem; color: var(--azure); white-space: nowrap; }

/* Air quality */
.aq-now { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.aq-chip {
  flex: 1 1 100px;
  border-radius: 12px;
  padding: 10px 12px;
  color: #10222f;
  border: 1px solid rgba(0,0,0,.06);
}
.aq-chip .v { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; }
.aq-chip .l { font-size: .64rem; opacity: .8; }
.aq-chip .tag { font-size: .68rem; font-weight: 600; margin-top: 2px; }
.aq-chip.neutral { background: #eef4fa; }
.aq-chip.warm { background: #fdf3e3; }

/* Loading */
.panel-loading {
  position: absolute; inset: 0;
  background: rgba(255,255,255,.9);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 12px; z-index: 10;
  font-size: .8rem; color: var(--ink-soft);
}
.panel-loading.is-hidden { display: none; }
.spinner {
  width: 34px; height: 34px;
  border: 4px solid var(--line);
  border-top-color: var(--azure);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Footer ---------- */
.foot {
  padding: 6px 16px;
  font-size: .64rem;
  color: var(--ink-soft);
  background: #fff;
  border-top: 1px solid var(--line);
  text-align: center;
  z-index: 1200;
}
.foot a { color: var(--azure); }

/* ---------- Mobile: bottom sheet a UX vyladenie ---------- */
.kraj-select-row { display: none; }

@media (max-width: 760px) {
  .topbar { padding: 8px 10px; gap: 8px; }
  .brand-text p { display: none; }
  .brand-mark { width: 32px; height: 32px; }
  .brand-text h1 { font-size: 1.02rem; }
  .layer-btn { padding: 9px 11px; font-size: .74rem; }
  .info-btn { padding: 9px 10px; font-size: .68rem; }

  /* na mobile pills krajov nahrádza natívny výber */
  .kraj-bar { display: none; }
  .kraj-select-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    flex: 0 0 auto;
  }
  .kraj-select-row label {
    font-family: var(--font-display);
    font-size: .74rem;
    font-weight: 600;
    color: var(--ink-soft);
    flex: 0 0 auto;
  }
  .kraj-select-row select {
    flex: 1;
    font-family: var(--font-body);
    font-size: 16px; /* zabráni auto-zoomu na iOS */
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 12px;
    min-height: 42px;
  }

  /* bottom sheet */
  .panel {
    top: auto; left: 0; right: 0; bottom: 0;
    width: 100%;
    max-height: 80dvh;
    border-left: 0;
    border-top: 1px solid var(--line);
    border-radius: 20px 20px 0 0;
    transform: translateY(105%);
    box-shadow: 0 -10px 40px rgba(14,34,51,.25);
  }
  .panel.is-open { transform: translateY(0); }
  .panel.is-dragging { transition: none; }

  .panel-top { border-radius: 20px 20px 0 0; touch-action: none; }
  .panel-grip {
    display: flex;
    justify-content: center;
    padding: 10px 0 0;
  }
  .panel-grip span { width: 44px; height: 5px; border-radius: 999px; background: var(--line); }
  .panel-titlebar { padding: 6px 12px 10px 16px; }
  .panel-titlebar h2 { font-size: 1.12rem; }
  .panel-close { width: 42px; height: 42px; }

  .panel-scroll { padding-bottom: calc(12px + env(safe-area-inset-bottom, 0)); }

  .tab { padding: 11px 11px; font-size: .74rem; }
  .tab-body { padding: 12px 14px 20px; }
  .now-grid { padding: 10px 14px 2px; grid-template-columns: repeat(3, 1fr); }
  .chart-wrap { height: 185px; }
  .now-cell { padding: 9px 5px; }
  .now-cell .v { font-size: .92rem; }
  .now-cell.hero .v { font-size: 1.65rem; }
  #srcNow { padding: 0 14px; }

  .day-row { grid-template-columns: 60px 28px 1fr; grid-auto-rows: auto; gap: 6px 8px; padding: 8px 10px; }
  .day-row .rain { grid-column: 2 / -1; text-align: right; }

  /* legenda a prepínač heatmapy: jeden stĺpec dole, nikdy sa neprekryjú */
  .map-bottom {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    position: absolute;
    left: 10px; right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0));
    z-index: 1000;
    pointer-events: none;
  }
  .legend, .heat-ctrl {
    position: static;
    max-width: none;
    pointer-events: auto;
  }
  .legend { order: 1; }
  .heat-ctrl { order: 2; justify-content: center; }
  .heat-btn { padding: 9px 11px; font-size: .7rem; }
  .map-hint { font-size: .72rem; }

  /* pätička: na mobile len krátky riadok */
  .foot { padding: 5px 10px max(5px, env(safe-area-inset-bottom, 0)); }
  .foot .full-src { display: none; }
  .foot .short-src { display: inline; }

  .modal { padding: 18px 16px 22px; max-height: 90dvh; }
}
.foot .short-src { display: none; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .map-hint { animation: none; }
  .panel { transition: none; }
  .spinner { animation-duration: 1.6s; }
}

/* ---------- Meteo správy ---------- */
.news-btn { border-color: var(--azure); }

.news-ticker {
  position: absolute;
  top: 14px; left: 56px; /* napravo od zoom ovládania */
  z-index: 1001;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: min(42vw, 460px);
  background: rgba(14, 34, 51, .88);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 8px 14px 8px 8px;
  font-family: var(--font-body);
  font-size: .78rem;
  cursor: pointer;
  backdrop-filter: blur(4px);
  box-shadow: 0 4px 16px rgba(14,34,51,.3);
  touch-action: manipulation;
}
.news-ticker.is-hidden { display: none; }
.nt-live {
  font-family: var(--font-display);
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .06em;
  background: #e0402a;
  border-radius: 999px;
  padding: 4px 8px;
  flex: 0 0 auto;
  animation: livePulse 2s ease-in-out infinite;
}
@keyframes livePulse { 0%,100% { opacity: 1; } 50% { opacity: .65; } }
.nt-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: opacity .3s;
}
.nt-text.is-fading { opacity: 0; }

.news-modal { max-width: 720px; }
.news-sub { font-size: .76rem; color: var(--ink-soft); margin: 2px 0 14px; }

.news-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}
.news-card {
  border-radius: 14px;
  border: 1px solid var(--line);
  padding: 14px 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #fff;
  position: relative;
  overflow: hidden;
}
.news-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
}
.news-card.cat-hot::before   { background: linear-gradient(90deg, #f59e0b, #e0402a); }
.news-card.cat-cold::before  { background: linear-gradient(90deg, #2fb6e8, #1467c8); }
.news-card.cat-storm::before { background: linear-gradient(90deg, #4a5fd0, #8a63d2); }
.news-card.cat-air::before   { background: linear-gradient(90deg, #8d6e63, #c96f1e); }
.news-card.cat-uv::before    { background: linear-gradient(90deg, #f0e641, #f59e0b); }
.news-card.cat-trend::before { background: linear-gradient(90deg, #50ccaa, #1467c8); }
.news-card.cat-mount::before { background: linear-gradient(90deg, #546a7b, #0e2233); }

.nc-head { display: flex; align-items: flex-start; gap: 10px; }
.nc-emoji { font-size: 1.6rem; line-height: 1; flex: 0 0 auto; }
.nc-head h3 {
  font-family: var(--font-display);
  font-size: .92rem;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.25;
}
.news-card p { font-size: .78rem; color: var(--ink-soft); line-height: 1.5; }
.nc-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  font-size: .64rem;
  color: var(--ink-soft);
  flex-wrap: wrap;
}
.nc-foot a { color: var(--azure); }
.nc-share {
  margin-left: auto;
  font-family: var(--font-display);
  font-size: .66rem;
  font-weight: 600;
  color: var(--azure);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 11px;
  cursor: pointer;
  touch-action: manipulation;
}
.nc-share:hover { border-color: var(--azure); }

.toast {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%);
  background: rgba(14, 34, 51, .92);
  color: #fff;
  font-size: .78rem;
  padding: 10px 18px;
  border-radius: 999px;
  z-index: 3000;
  box-shadow: 0 6px 20px rgba(14,34,51,.35);
}
.toast.is-hidden { display: none; }

@media (max-width: 760px) {
  .news-ticker {
    top: 10px; left: 50%; transform: translateX(-50%);
    font-size: .72rem; max-width: 94vw;
  }
  .map-hint {
    top: 52px; left: 50%; right: auto;
    transform: translateX(-50%);
    animation: hintFloat 2.6s ease-in-out infinite;
    max-width: min(92vw, 420px);
  }
  .news-cards { grid-template-columns: 1fr; }
  .news-btn { display: none; } /* na mobile otvára správy ticker */
}

/* ---------- Lovec bleskov ---------- */
.bolt-marker {
  font-size: 1.5rem;
  filter: drop-shadow(0 0 6px rgba(245, 158, 11, .9));
  transform: translate(-50%, -50%);
  animation: boltPulse 1.2s ease-in-out infinite;
  pointer-events: none;
}
@keyframes boltPulse {
  0%,100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.35); }
}
@media (max-width: 480px) {
  .layer-btn .lbl { display: none; }
  .layer-btn { padding: 9px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .bolt-marker { animation: none; }
  .nt-live { animation: none; }
}

/* Chips mestských podstránok */
.kraj-chip.city-chip {
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 4px;
  background: linear-gradient(135deg, #eef6ff 0%, #e2f0ff 100%);
  border-color: #bcd8f5; color: var(--azure-deep);
}
.kraj-chip.city-chip small { font-weight: 500; font-size: .58rem; opacity: .75; }
.kraj-chip.city-chip:hover { border-color: var(--azure); background: #e2f0ff; }

/* Chip agro modulu */
.kraj-chip.agri-chip {
  text-decoration: none;
  background: linear-gradient(135deg, #eefaef 0%, #ddf3de 100%);
  border-color: #b8dcba; color: #1b5e20;
}
.kraj-chip.agri-chip:hover { border-color: #2e7d32; background: #ddf3de; }

/* Odkaz Agro v hlavnom menu vrstiev */
.layer-btn.agri-link {
  text-decoration: none;
  display: inline-flex; align-items: center;
  color: #1b5e20; background: #eefaef;
}
.layer-btn.agri-link:hover { color: #fff; background: #2e7d32; }

/* ---------- Vyhľadávanie obcí ---------- */
.search-wrap { position: relative; flex: 0 1 260px; min-width: 170px; }
.search-wrap input {
  width: 100%; font-family: var(--font-body); font-size: 16px;
  color: var(--ink); background: var(--paper);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 9px 44px 9px 15px; min-height: 40px; box-sizing: border-box;
  transition: border-color .15s, box-shadow .15s;
}
.search-wrap input:focus {
  outline: none; border-color: var(--azure);
  box-shadow: 0 0 0 3px rgba(47, 182, 232, .25);
}
.search-go {
  position: absolute; top: 4px; right: 4px;
  width: 32px; height: 32px; border-radius: 50%;
  border: 0; background: var(--azure); color: #fff;
  font-size: .85rem; cursor: pointer; touch-action: manipulation;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.search-go:hover { background: var(--azure-deep); }
.search-go:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }
.search-drop {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); z-index: 3000; overflow: hidden; max-height: 320px; overflow-y: auto;
}
.search-item {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 10px 13px; border: 0; background: none; cursor: pointer;
  font-family: var(--font-body); font-size: .8rem; color: var(--ink); text-align: left;
}
.search-item:hover, .search-item.is-active { background: #e8f2fb; }
.search-item b { color: var(--azure-deep); }
.search-empty, .search-loading {
  padding: 12px 14px; font-size: .74rem; color: var(--ink-soft);
  display: flex; align-items: center; gap: 8px;
}
.search-loading .mini-spin {
  width: 14px; height: 14px; border: 2px solid var(--line);
  border-top-color: var(--azure); border-radius: 50%;
  animation: spin .8s linear infinite; flex: 0 0 auto;
}
.search-item small { color: var(--ink-soft); font-size: .66rem; }
.search-item .rm { margin-left: auto; color: var(--ink-soft); font-size: .8rem; padding: 2px 6px; }
.search-item .rm:hover { color: #c62828; }
.search-head { font-family: var(--font-display); font-size: .62rem; font-weight: 700; color: var(--ink-soft); padding: 8px 13px 2px; }

.panel-actions { display: flex; gap: 6px; flex: 0 0 auto; }
#favBtn.is-fav { color: #f59e0b; border-color: #f0c541; background: #fdf3e3; }

/* Klíma fakty */
.clim-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.clim-fact { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; }
.clim-fact b { font-family: var(--font-display); font-size: .92rem; display: block; }
.clim-fact span { font-size: .64rem; color: var(--ink-soft); }

@media (max-width: 760px) {
  .search-wrap { flex: 1 1 100%; order: 5; }
  .clim-facts { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   🌓 TMAVÝ REŽIM — prepína sa atribútom data-theme="dark"
   (automaticky podľa systému, ručne tlačidlom 🌓, uložené)
   ============================================================ */
[data-theme="dark"] {
  --ink: #e7eef6;
  --ink-soft: #9db0c2;
  --paper: #0f1a24;
  --card: #152230;
  --azure: #2f7fd4;
  --azure-deep: #7db6f5;
  --line: #26384a;
  --shadow: 0 8px 30px rgba(0, 0, 0, .55);
}
[data-theme="dark"] body { background: var(--paper); }

/* podkladová mapa: nočný vzhľad len pre základné dlaždice (radar/satelit ostávajú) */
[data-theme="dark"] .base-tiles {
  filter: brightness(.7) invert(1) contrast(2.7) hue-rotate(195deg) saturate(.35) brightness(.85);
}
[data-theme="dark"] #map, [data-theme="dark"] #cityMap, [data-theme="dark"] #agriMap { background: #0b131b; }

/* hlavičky a lišty */
[data-theme="dark"] .topbar,
[data-theme="dark"] .city-top,
[data-theme="dark"] .agri-top { background: linear-gradient(180deg, #16232f 0%, #121d28 100%); }
[data-theme="dark"] .kraj-bar,
[data-theme="dark"] .kraj-select-row,
[data-theme="dark"] .param-bar,
[data-theme="dark"] .foot { background: var(--card); }
[data-theme="dark"] .info-btn,
[data-theme="dark"] .radar-toggle,
[data-theme="dark"] .back-link { background: var(--card) !important; color: var(--azure-deep) !important; border-color: var(--line) !important; }
[data-theme="dark"] .layer-btn.agri-link { background: #14301b; color: #9ae0a5; }
[data-theme="dark"] .kraj-chip.city-chip { background: #14263a; border-color: #2a4562; color: var(--azure-deep); }

/* plávajúce prvky mapy */
[data-theme="dark"] .legend,
[data-theme="dark"] .heat-ctrl,
[data-theme="dark"] .draw-tools { background: rgba(21, 34, 48, .94); border-color: var(--line); }
[data-theme="dark"] .cast-label { background: rgba(21, 34, 48, .92); color: var(--ink); border-color: rgba(255,255,255,.25); }
[data-theme="dark"] .cast-label small { color: var(--ink-soft); }
[data-theme="dark"] .demo-label { background: rgba(21,34,48,.95); color: #9ae0a5; }
[data-theme="dark"] .locate-btn { background: var(--card); color: var(--ink); border-color: rgba(255,255,255,.25); }

/* panely, karty, modály */
[data-theme="dark"] .search-drop,
[data-theme="dark"] .news-card,
[data-theme="dark"] .acard,
[data-theme="dark"] .src-card { background: var(--card); }
[data-theme="dark"] .search-item:hover, [data-theme="dark"] .search-item.is-active { background: #1d3450; }
[data-theme="dark"] .aq-chip.neutral { background: #1a2a3a; }
[data-theme="dark"] .aq-chip.warm,
[data-theme="dark"] .modal-note,
[data-theme="dark"] .agri-note,
[data-theme="dark"] .assist.hot { background: #2e2513; border-color: #4a3c1c; }
[data-theme="dark"] .assist.rain { background: #14263a; border-color: #2a4562; }
[data-theme="dark"] .assist, [data-theme="dark"] .city-note { background: var(--paper); }
[data-theme="dark"] .casti-table tr:hover td { background: #1a2a3a; }
[data-theme="dark"] .casti-table tr.is-sel td { background: #1d3450; }
[data-theme="dark"] .strip i { background: #223141; }
[data-theme="dark"] .aq-chip[style*="background: #eef4fa"] { background: #1a2a3a !important; }

/* farebné AQ/peľové chipy so svetlým pozadím: stmav text ne-, ony maju vlastne farby - ok */
[data-theme="dark"] .aq-chip { color: #10222f; }
[data-theme="dark"] .aq-chip.neutral, [data-theme="dark"] .aq-chip.warm { color: var(--ink); }

/* tlačidlá a form prvky */
[data-theme="dark"] .btn { background: var(--paper); color: var(--ink); }
[data-theme="dark"] .btn.primary { background: #2e7d32; color: #fff; }
[data-theme="dark"] .form-grid input, [data-theme="dark"] .form-grid select,
[data-theme="dark"] .kraj-select-row select, [data-theme="dark"] .search-wrap input {
  background: var(--paper); color: var(--ink); border-color: var(--line);
}
[data-theme="dark"] .conf-vysoká { background: #14301b; color: #9ae0a5; }
[data-theme="dark"] .conf-stredná { background: #2e2513; color: #f0c541; }
[data-theme="dark"] .conf-nízka { background: #331a10; color: #ff9c7a; }
[data-theme="dark"] .st.vhodné { background: #14301b; color: #9ae0a5; }
[data-theme="dark"] .st.prijateľné { background: #2e2513; color: #f0c541; }
[data-theme="dark"] .st.nevhodné { background: #331a10; color: #ff9c7a; }
[data-theme="dark"] .clim-fact, [data-theme="dark"] .now-cell, [data-theme="dark"] .confidence,
[data-theme="dark"] .day-row, [data-theme="dark"] .field-item, [data-theme="dark"] .irr-list,
[data-theme="dark"] .acard details .why { background: var(--paper); }

/* Horské markery a šípka vetra */
.city-marker.mount { background: linear-gradient(160deg, #546a7b 0%, #22313f 100%); }
.wind-arrow { font-weight: 700; color: var(--azure); }
[data-theme="dark"] .wind-arrow { color: var(--azure-deep); }


/* ---------- Horná lišta: skupina akcií vpravo + kompaktný prepínač témy ---------- */
.top-actions {
  display: flex; align-items: center; gap: 8px;
  margin-left: auto; flex: 0 0 auto;
}
.theme-btn {
  width: 40px; height: 40px; padding: 0 !important;
  border-radius: 50% !important;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1rem !important; line-height: 1; flex: 0 0 auto;
}

/* Notebook (do ~1360 px): vrstvy len ako ikonky s tooltipom, užšie vyhľadávanie
   → všetko sa zmestí do jedného riadka bez zalomenia */
@media (max-width: 1360px) {
  .layer-btn .lbl { display: none; }
  .layer-btn { padding: 9px 13px; font-size: .95rem; }
  .search-wrap { flex: 0 1 200px; min-width: 130px; }
  .brand-text p { display: none; }
}
/* Stredné šírky: skráť aj Správy / O dátach na ikonky */
@media (max-width: 900px) {
  .info-btn .lbl { display: none; }
  .info-btn { padding: 9px 12px; }
}
/* Mobil: vyhľadávanie na celý druhý riadok (existujúce pravidlo order:5),
   akcie ostávajú pri logu v prvom riadku */
@media (max-width: 760px) {
  .top-actions { gap: 6px; }
  .theme-btn { width: 36px; height: 36px; }
}

/* Odkaz Dovolenka v menu vrstiev */
.layer-btn.holiday-link {
  text-decoration: none; display: inline-flex; align-items: center;
  color: #8a5a00; background: #fdf3e3;
}
.layer-btn.holiday-link:hover { color: #fff; background: #f59e0b; }
[data-theme="dark"] .layer-btn.holiday-link { background: #2e2513; color: #f0c541; }

/* ---------- ☔ Dážď o X min + hodinový pás 24 h ---------- */
.rain-soon {
  font-size: .76rem; border-radius: 10px; padding: 8px 11px; margin: 10px 0 2px;
  border: 1px solid var(--line); line-height: 1.45;
}
.rain-soon.is-rain { background: #e8f2fb; border-color: #c9dff2; }
.rain-soon.is-dry { background: #eefaef; border-color: #cde8cf; color: var(--ink-soft); }
[data-theme="dark"] .rain-soon.is-rain { background: #14263a; border-color: #2a4562; }
[data-theme="dark"] .rain-soon.is-dry { background: #14301b; border-color: #1f4527; }

.hour-strip {
  display: flex; gap: 4px; overflow-x: auto; padding: 8px 2px 10px; margin-top: 6px;
  scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: thin;
}
.hcell {
  flex: 0 0 52px; scroll-snap-align: start; text-align: center;
  background: var(--paper); border: 1px solid var(--line); border-radius: 10px;
  padding: 7px 4px; display: flex; flex-direction: column; gap: 2px;
}
.hcell.is-now { border-color: var(--azure); background: #e8f2fb; }
[data-theme="dark"] .hcell.is-now { background: #14263a; }
.hcell .hh { font-family: var(--font-display); font-size: .58rem; font-weight: 700; color: var(--ink-soft); }
.hcell .hi { font-size: 1.05rem; line-height: 1.2; }
.hcell .ht { font-family: var(--font-display); font-size: .74rem; font-weight: 700; }
.hcell .hp { font-size: .56rem; color: var(--azure); min-height: 12px; }

/* ---------- 📡 Offline banner ---------- */
.net-banner {
  position: fixed; top: 10px; left: 50%; transform: translateX(-50%);
  z-index: 6000; background: #22313f; color: #fff;
  font-size: .74rem; font-family: var(--font-display); font-weight: 600;
  border-radius: 999px; padding: 9px 16px; box-shadow: var(--shadow);
  max-width: 92vw; text-align: center;
}

/* ============================================================
   ☁️ Kumulík — chatbot v pravom dolnom rohu
   ============================================================ */
#botFab {
  position: fixed; right: 14px; bottom: 14px; z-index: 4500;
  width: 56px; height: 56px; border-radius: 50%;
  border: 0; cursor: pointer; font-size: 1.7rem;
  background: linear-gradient(135deg, var(--azure), var(--cyan));
  box-shadow: 0 8px 24px rgba(20, 103, 200, .45);
  display: flex; align-items: center; justify-content: center;
  transition: transform .15s, box-shadow .15s;
  animation: botBob 3.2s ease-in-out infinite;
}
#botFab:hover { transform: scale(1.08); box-shadow: 0 10px 30px rgba(20, 103, 200, .55); }
#botFab.is-open { animation: none; }
@keyframes botBob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { #botFab { animation: none; } }

#botWin {
  position: fixed; right: 14px; bottom: 80px; z-index: 4500;
  width: min(370px, calc(100vw - 22px));
  height: min(520px, calc(100dvh - 110px));
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 18px 50px rgba(14, 34, 51, .35);
  display: flex; flex-direction: column; overflow: hidden;
}
.bot-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(20,103,200,.10), rgba(47,182,232,.10));
}
.bot-ava { font-size: 1.6rem; }
.bot-head b { font-family: var(--font-display); font-size: .92rem; display: block; }
.bot-head small { font-size: .62rem; color: var(--ink-soft); }
.bot-close {
  margin-left: auto; border: 1px solid var(--line); background: var(--card);
  border-radius: 50%; width: 32px; height: 32px; cursor: pointer; color: var(--ink-soft);
}
.bot-msgs { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.bot-msg {
  max-width: 86%; padding: 9px 12px; border-radius: 14px;
  font-size: .78rem; line-height: 1.5; word-wrap: break-word;
}
.bot-msg.bot { background: var(--paper); border: 1px solid var(--line); align-self: flex-start; border-bottom-left-radius: 4px; }
.bot-msg.me { background: var(--azure); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.bot-msg .bot-act {
  display: inline-block; margin-top: 7px; margin-right: 5px;
  font-family: var(--font-display); font-size: .68rem; font-weight: 600;
  border: 1px solid var(--azure); color: var(--azure); background: var(--card);
  border-radius: 999px; padding: 6px 11px; cursor: pointer; touch-action: manipulation;
}
.bot-msg .bot-act:hover { background: var(--azure); color: #fff; }
.bot-dots { display: inline-flex; gap: 4px; padding: 2px 0; }
.bot-dots i {
  width: 7px; height: 7px; border-radius: 50%; background: var(--ink-soft);
  animation: botDot 1.1s ease-in-out infinite;
}
.bot-dots i:nth-child(2) { animation-delay: .18s; }
.bot-dots i:nth-child(3) { animation-delay: .36s; }
@keyframes botDot { 0%,100% { opacity: .25; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }

.bot-chips { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 12px 8px; }
.bot-chips button {
  font-family: var(--font-display); font-size: .64rem; font-weight: 600;
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px;
  background: var(--paper); color: var(--ink); cursor: pointer; touch-action: manipulation;
}
.bot-chips button:hover { border-color: var(--azure); color: var(--azure); }

.bot-input { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); }
.bot-input input {
  flex: 1; min-width: 0; font-family: var(--font-body); font-size: 16px;
  color: var(--ink); background: var(--paper);
  border: 1px solid var(--line); border-radius: 999px; padding: 10px 14px; min-height: 42px;
}
.bot-input input:focus { outline: none; border-color: var(--azure); box-shadow: 0 0 0 3px rgba(47,182,232,.22); }
.bot-input button {
  width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--azure); color: #fff; font-size: .95rem; flex: 0 0 auto;
}

/* mobil: okno cez celú šírku, FAB nižšie neprekáža legende (tá je vľavo) */
@media (max-width: 560px) {
  #botWin { right: 8px; left: 8px; width: auto; bottom: 76px; height: min(560px, calc(100dvh - 96px)); }
}
[data-theme="dark"] #botWin { box-shadow: 0 18px 50px rgba(0, 0, 0, .6); }

/* ---------- 💬 Viditeľnosť chatbota: bublinka, pulz, teaser ---------- */
#botFab { position: fixed; }
#botFab .fab-bubble { font-size: 1.65rem; line-height: 1; }
#botFab .fab-wind {
  position: absolute; right: -3px; bottom: -3px;
  font-size: .95rem; line-height: 1;
  background: var(--card); border: 2px solid var(--azure);
  border-radius: 50%; width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(14,34,51,.3);
}
#botFab.is-pulsing::after {
  content: ''; position: absolute; inset: -4px; border-radius: 50%;
  border: 3px solid var(--cyan); opacity: 0;
  animation: botPulse 2.4s ease-out infinite;
}
@keyframes botPulse {
  0% { transform: scale(.9); opacity: .8; }
  70%, 100% { transform: scale(1.45); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { #botFab.is-pulsing::after { animation: none; display: none; } }

#botTeaser {
  position: fixed; right: 80px; bottom: 20px; z-index: 4500;
  display: flex; align-items: center; gap: 9px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; border-bottom-right-radius: 4px;
  padding: 11px 13px; box-shadow: 0 10px 30px rgba(14,34,51,.28);
  font-size: .76rem; line-height: 1.4; color: var(--ink);
  cursor: pointer; max-width: min(250px, calc(100vw - 100px));
  animation: teaserIn .4s ease-out;
}
#botTeaser::after {
  content: ''; position: absolute; right: -7px; bottom: 12px;
  width: 12px; height: 12px; background: var(--card);
  border-right: 1px solid var(--line); border-top: 1px solid var(--line);
  transform: rotate(45deg);
}
#botTeaser .tz-ava { font-size: 1.4rem; }
#botTeaser .tz-x {
  border: 0; background: none; color: var(--ink-soft);
  font-size: .8rem; cursor: pointer; padding: 2px 4px; align-self: flex-start;
}
@keyframes teaserIn {
  from { opacity: 0; transform: translateY(8px) scale(.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) { #botTeaser { animation: none; } }
[data-theme="dark"] #botTeaser { box-shadow: 0 10px 30px rgba(0,0,0,.55); }

/* ---------- 📰 Živé miestne správy v paneli ---------- */
.local-news {
  margin-top: 10px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--paper); padding: 10px 12px 8px;
}
.local-news .ln-head {
  font-family: var(--font-display); font-size: .7rem; font-weight: 700;
  margin-bottom: 6px; display: flex; align-items: center; gap: 6px;
}
.local-news .ln-head::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: #e53935; animation: liveBlink 1.6s ease-in-out infinite;
}
@keyframes liveBlink { 0%,100% { opacity: 1; } 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .local-news .ln-head::before { animation: none; } }
.local-news .ln-row {
  display: flex; gap: 8px; font-size: .74rem; line-height: 1.45;
  padding: 4px 0; border-top: 1px dashed var(--line);
}
.local-news .ln-row:first-of-type { border-top: 0; }
.local-news .ln-note { font-size: .58rem; color: var(--ink-soft); margin-top: 6px; }

/* Odkaz Trasa v menu vrstiev */
.layer-btn.route-link {
  text-decoration: none; display: inline-flex; align-items: center;
  color: #4a2f8f; background: #efe9fb;
}
.layer-btn.route-link:hover { color: #fff; background: #6a3fb5; }
[data-theme="dark"] .layer-btn.route-link { background: #241a3d; color: #c4aef2; }

/* ============================================================
   📱 Mobilná spodná navigácia + sheet „Viac"
   (moderný vzor: 5 cieľov s ikonou a POPISKOM v dosahu palca;
   sekundárne funkcie v bottom sheete namiesto hamburgeru)
   ============================================================ */
.bottom-nav { display: none; }
.more-sheet, .more-backdrop { display: none; }

@media (max-width: 760px) {
  /* pill menu a horné akcie na mobile schovaj — nahrádza ich spodná lišta */
  .layer-switch { display: none; }
  .top-actions { display: none; }

  .bottom-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 4400;
    background: var(--card); border-top: 1px solid var(--line);
    padding: 4px 4px calc(4px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -6px 20px rgba(14, 34, 51, .12);
  }
  .bottom-nav button {
    flex: 1; min-height: 52px; border: 0; background: none; cursor: pointer;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    color: var(--ink-soft); border-radius: 12px; padding: 4px 2px;
    -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  }
  .bottom-nav .bn-ico { font-size: 1.25rem; line-height: 1; }
  .bottom-nav .bn-lbl { font-family: var(--font-display); font-size: .58rem; font-weight: 700; }
  .bottom-nav button.is-active { color: var(--azure); background: rgba(20, 103, 200, .10); }
  [data-theme="dark"] .bottom-nav button.is-active { background: rgba(125, 182, 245, .14); }

  /* prvky nad lištou: FAB, chat, legenda, atribúcia */
  #botFab { bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
  #botWin { bottom: calc(136px + env(safe-area-inset-bottom, 0px)); height: min(520px, calc(100dvh - 156px)); }
  #botTeaser { bottom: calc(78px + env(safe-area-inset-bottom, 0px)); }
  .legend { bottom: calc(70px + env(safe-area-inset-bottom, 0px)); max-width: calc(100vw - 90px); }
  .heat-ctrl { bottom: calc(70px + env(safe-area-inset-bottom, 0px)); }
  .leaflet-bottom { bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
  .panel { padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px)); }
}

.more-backdrop {
  position: fixed; inset: 0; z-index: 4600;
  background: rgba(10, 22, 34, .45); backdrop-filter: blur(2px);
}
.more-backdrop:not(.is-hidden) { display: block; }
.more-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 4700;
  background: var(--card); border-radius: 20px 20px 0 0;
  border: 1px solid var(--line); border-bottom: 0;
  padding: 8px 16px calc(18px + env(safe-area-inset-bottom, 0px));
  max-height: 78dvh; overflow-y: auto;
  box-shadow: 0 -14px 44px rgba(10, 22, 34, .3);
  animation: sheetUp .28s cubic-bezier(.2, .9, .3, 1);
}
.more-sheet:not(.is-hidden) { display: block; }
@keyframes sheetUp { from { transform: translateY(60%); opacity: .4; } to { transform: translateY(0); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .more-sheet { animation: none; } }
.ms-handle { width: 40px; height: 4px; border-radius: 3px; background: var(--line); margin: 4px auto 10px; }
.ms-title { font-family: var(--font-display); font-weight: 800; font-size: 1rem; margin-bottom: 4px; }
.ms-sec {
  font-family: var(--font-display); font-size: .62rem; font-weight: 700;
  color: var(--ink-soft); text-transform: uppercase; letter-spacing: .05em;
  margin: 12px 0 7px;
}
.ms-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ms-grid button {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--paper);
  padding: 12px 6px 10px; cursor: pointer; min-height: 68px;
  font-family: var(--font-display); font-size: .66rem; font-weight: 600; color: var(--ink);
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.ms-grid button span { font-size: 1.45rem; line-height: 1; }
.ms-grid button:active { background: rgba(20, 103, 200, .10); border-color: var(--azure); }


/* ---------- Konzistentná medzera ikonka–text vo všetkých menu ----------
   Flex kontajnery ignorujú obyčajné medzery v HTML, preto medzeru
   rieši gap — rovnaká všade, nič nie je natlačené na sebe. */
.layer-btn, .info-btn, .radar-toggle, .kraj-chip, .back-link {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.layer-btn .lbl, .info-btn .lbl { white-space: nowrap; }
