/* Opatrně – web s mapou dopravní situace
   Vizuální systém: světlé plochy, tmavě modrý text, jedna akční modrá, červená jen pro nebezpečí a logo.
   Písmo Overpass (vychází z Highway Gothic, písma dopravních značek). Patička je tmavá „tabule“ s bílou přerušovanou
   čárou jako vodorovné značení – jediný dekorativní prvek. Barvy kategorií odpovídají ndic.CATEGORIES. */
@font-face { font-family: "Overpass"; src: url("../fonts/Overpass-latin-ext.woff2") format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+20A0-20C0, U+2113; }
@font-face { font-family: "Overpass"; src: url("../fonts/Overpass-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --ink: #0e1f3a;              /* nadpisy, silný text */
  --text: #2c3647;
  --muted: #68748a;
  --faint: #9aa4b5;
  --blue: #0582f7;             /* azurová: odkazy, tlačítka, aktivní stavy, tabule loga */
  --blue-d: #0468c4;
  --blue-soft: #e6f4fc;
  --azure: #3b9cff;            /* světlejší azurová do přechodů */
  --red: #de0602;              /* nehoda, logo */
  --red-soft: #fdecec;
  --green: #22a85b;
  --green-soft: #e6f6ec;
  --navy: #0a4fa0;             /* hluboká azurová – patička, tabule loga */
  --bg: #f3f8fc;
  --bg-2: #e8f1f8;
  --line: #dde8f1;
  --line-2: #c6d8e6;
  --r: 14px;
  --r-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(14, 31, 58, .05), 0 4px 14px -6px rgba(14, 31, 58, .12);
  --shadow: 0 2px 6px rgba(14, 31, 58, .06), 0 24px 48px -20px rgba(14, 31, 58, .25);
  --font: "Overpass", system-ui, -apple-system, "Segoe UI", sans-serif;
  --header: 62px;
}
.c-nehoda, .tag-nehoda, .chip-nehoda, .ev-nehoda { --c: #de0602; }
.c-uzavirka, .tag-uzavirka, .chip-uzavirka, .ev-uzavirka { --c: #ef5b66; }
.c-kolona, .tag-kolona, .chip-kolona, .ev-kolona { --c: #ff8a1f; }
.c-prekazka, .tag-prekazka, .chip-prekazka, .ev-prekazka { --c: #f2ae00; }
.c-podminky, .tag-podminky, .chip-podminky, .ev-podminky { --c: #3fa2f6; }
.c-omezeni, .tag-omezeni, .chip-omezeni, .ev-omezeni { --c: #7b93b8; }
.c-prace, .tag-prace, .chip-prace, .ev-prace { --c: #1fb5a8; }
.c-akce, .tag-akce, .chip-akce, .ev-akce { --c: #4cc46a; }
.c-ostatni, .tag-ostatni, .chip-ostatni, .ev-ostatni { --c: #a3abb6; }

/* ---------- základ ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 16px/1.55 var(--font); color: var(--text); background: #fff; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { color: var(--ink); line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .45em; font-weight: 800; }
h1 { font-size: clamp(1.75rem, 3.2vw, 2.4rem); }
h2 { font-size: clamp(1.35rem, 2.2vw, 1.7rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
a { color: var(--blue); }
img, svg { vertical-align: middle; }
.wrap { width: min(1220px, 100% - 40px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 40px); }
.center { text-align: center; }
.small { font-size: .88rem; color: var(--muted); }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 2000; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid rgba(29, 95, 214, .45); outline-offset: 2px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 700 1rem/1 var(--font); padding: 13px 20px 11px;
  border-radius: var(--r-sm); border: 1.5px solid transparent; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-d); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-sm { padding: 9px 14px 7px; font-size: .9rem; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.more { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; text-decoration: none; color: var(--blue); }
.more svg { transition: transform .15s; }
.more:hover svg { transform: translateX(3px); }
.eyebrow { font-weight: 800; font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; color: var(--blue); margin: 0 0 10px; }
.lead { font-size: 1.12rem; line-height: 1.6; color: var(--muted); max-width: 42em; }
.empty { background: var(--bg); border-radius: var(--r-sm); padding: 22px; text-align: center; font-weight: 600; color: var(--muted); }

/* označení silnice jako na směrové tabuli: dálnice červená, ostatní modrá */
.road { display: inline-block; font: 800 .74rem/1 var(--font); padding: 5px 7px 3px; border-radius: 4px; background: var(--blue); color: #fff;
  text-decoration: none; white-space: nowrap; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .55); letter-spacing: .01em; }
.road-d { background: var(--red); }
.road[href]:hover { filter: brightness(1.1); }
button.road { border: 0; font: inherit; cursor: pointer; }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; padding: 3px 10px 2px 8px; border-radius: 999px;
  background: color-mix(in srgb, var(--c, #7c8591) 12%, #fff); color: color-mix(in srgb, var(--c, #7c8591) 75%, #000); white-space: nowrap; }
.tag i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }

/* ---------- hlavička ---------- */
.site-header { position: sticky; top: 0; z-index: 1000; background: rgba(255, 255, 255, .92); backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); border-top: 3px solid var(--blue); }
.header-inner { display: flex; align-items: center; gap: 20px; height: var(--header); }
.nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav a { position: relative; color: var(--text); text-decoration: none; font-weight: 600; font-size: .95rem; padding: 9px 12px 7px; border-radius: 8px; white-space: nowrap; }
.nav a:hover { color: var(--ink); background: var(--bg); }
.nav a[aria-current="page"] { color: var(--blue); }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; background: var(--blue); border-radius: 2px; }
.nav-toggle { display: none; background: none; border: 0; color: var(--ink); padding: 8px; cursor: pointer; margin-left: auto; }
/* živý stav dat v hlavičce */
.live { display: inline-flex; align-items: center; gap: 7px; font-size: .8rem; font-weight: 700; color: var(--muted); white-space: nowrap; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(34, 168, 91, .5); animation: live 2.4s infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 7px rgba(34, 168, 91, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 168, 91, 0); } }
.header-live { margin-left: 8px; padding: 6px 12px 4px; border-radius: 999px; background: var(--bg); }

/* logo: nápis „Opatrně“ v modré, značka zákaz vjezdu je písmeno O (sedí na účaří, velikost písmene) */
.logo { display: inline-flex; align-items: center; font: 800 1.85rem/1 var(--font); letter-spacing: -.04em; color: var(--blue); text-decoration: none; }
.logo .sign { width: 1.2em; height: 1.2em; margin: 0 .01em .1em -.02em; flex-shrink: 0; filter: drop-shadow(0 1px 2px rgba(10, 79, 160, .25)); }
.wordmark { padding-top: .1em; }
.logo-light { color: #fff; }
.logo-light .sign { filter: none; }
/* panenky se občas rozhlédnou a mrknou */
.sign-look .sign-eyes { animation: look 9s ease-in-out infinite; }
.sign-look .sign-blink { animation: blink 9s ease-in-out infinite; transform-origin: 50% 50%; transform-box: view-box; }
.logo:hover .sign-eyes { animation-duration: 2.4s; }
@keyframes look {
  0%, 26%, 100% { transform: translateX(0); }
  32%, 46% { transform: translateX(3.2px); }
  52%, 66% { transform: translateX(-3.2px); }
  72% { transform: translateX(0); }
}
@keyframes blink {
  0%, 84%, 89%, 100% { transform: scaleY(1); }
  86.5% { transform: scaleY(.12); }
}

.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 14px 0 0; margin: 0; font-size: .86rem; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin-right: 6px; color: var(--faint); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--blue); }
.crumbs li:last-child span { display: inline-block; max-width: 46ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }

/* ---------- hlavička podstránky (světlá) ---------- */
.page-head { padding: 22px 0 22px; }
.page-head-band { background: linear-gradient(180deg, var(--blue-soft), #fff); border-bottom: 1px solid var(--line); }
.page-head-band .page-head { padding: 26px 0 26px; }
.page-head h1 { margin-bottom: .25em; }
.page-head .lead { margin: 0; font-size: 1.04rem; }
.page-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.page-hero { padding: 30px 0 26px; }
.page-hero h1 { font-size: clamp(1.9rem, 3.8vw, 2.7rem); }
.page-hero .lead { margin-bottom: 0; }
.page-hero-legal .lead { font-size: 1rem; }

/* ---------- mapová aplikace ---------- */
.mapapp { position: relative; display: grid; grid-template-columns: 400px minmax(0, 1fr); height: clamp(480px, calc(72vh - var(--header) / 2), 760px);
  border-bottom: 1px solid var(--line); background: #fff; }
.mapapp-compact { height: clamp(460px, 62vh, 680px); min-height: 0; }
.panel { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); background: #fff; }
.panel-head { padding: 16px 18px 14px; border-bottom: 1px solid var(--line); display: grid; gap: 12px; }
.panel-title { position: relative; padding-left: 14px; }
.panel-title::before { content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 4px; border-radius: 2px;
  background: linear-gradient(180deg, var(--red) 0 45%, var(--blue) 55%); }
.panel-title h1 { font-size: 1.3rem; margin: 0 0 2px; letter-spacing: -.02em; }
.panel-title p { margin: 0; font-size: .86rem; color: var(--muted); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--bg-2); border-radius: 10px; padding: 3px; }
.seg-btn { border: 0; background: none; font: 700 .86rem/1 var(--font); color: var(--muted); padding: 9px 10px 7px; border-radius: 8px; cursor: pointer; text-decoration: none; text-align: center; white-space: nowrap; }
.seg-btn:hover { color: var(--ink); }
.seg-btn.on { background: var(--blue); color: #fff; box-shadow: var(--shadow-sm); }
/* filtr typů: mřížka přepínačů s ikonou a počtem; vypnuté jsou šedé */
.chips { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.chip { display: flex; align-items: center; gap: 7px; min-width: 0; border: 1px solid var(--line); background: #fff; border-radius: 9px; padding: 6px 8px 5px 6px;
  font: 600 .8rem/1.15 var(--font); color: var(--muted); cursor: pointer; text-decoration: none; text-align: left; transition: border-color .15s, background .15s; }
.chip .pin { flex-shrink: 0; box-shadow: none; border-width: 1.5px; filter: grayscale(1); opacity: .45; }
.chip span.chip-l { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip b { font-weight: 700; color: var(--faint); font-size: .76rem; font-variant-numeric: tabular-nums; }
.chip.on { border-color: color-mix(in srgb, var(--c, var(--ink)) 50%, #fff); color: var(--ink); background: color-mix(in srgb, var(--c, #7c8591) 8%, #fff); }
.chip.on .pin { filter: none; opacity: 1; }
.chip.on b { color: var(--text); }
.chip:hover { border-color: var(--c, var(--ink)); }
.search { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 0 12px; color: var(--muted); background: var(--bg); }
.search:focus-within { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px rgba(29, 95, 214, .12); }
.search input { flex: 1; border: 0; outline: 0; font: 500 .95rem var(--font); padding: 11px 0 9px; color: var(--ink); background: none; min-width: 0; }
.panel-count { margin: 0; padding: 9px 18px 7px; font-size: .8rem; color: var(--blue-d); font-weight: 700; border-bottom: 1px solid var(--line); background: var(--blue-soft); }
.panel .evlist { flex: 1; overflow-y: auto; overscroll-behavior: contain; }

/* seznam událostí: řádky (panel) a karty (pod mapou) */
.evlist { list-style: none; margin: 0; padding: 0; }
.ev a, .ev button { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; width: 100%; padding: 12px 18px 11px;
  border: 0; border-bottom: 1px solid var(--line); background: #fff; text-align: left; font: inherit; color: var(--text); text-decoration: none; cursor: pointer; }
.ev a:hover, .ev button:hover { background: var(--bg); }
.ev .pin { margin-top: 1px; }
.ev-main { display: grid; gap: 3px; min-width: 0; }
.ev-top { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.ev-kind { font-size: .74rem; font-weight: 700; color: color-mix(in srgb, var(--c) 78%, #000); text-transform: uppercase; letter-spacing: .05em; }
.ev-title { font-weight: 700; color: var(--ink); line-height: 1.3; font-size: .96rem; overflow-wrap: anywhere; }
.ev-time { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; font-size: .8rem; color: var(--muted); }
.ev-time svg { width: 14px; height: 14px; }
.ev-where { color: var(--muted); }
.ev-ended .ev-title { color: var(--muted); }
.ev-more { padding: 14px 18px; font-size: .86rem; color: var(--muted); text-align: center; }
.evlist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 10px; }
.evlist-grid .ev a { border: 1px solid var(--line); border-radius: var(--r-sm); height: 100%; padding: 14px 16px 12px; }
.evlist-grid .ev a:hover { box-shadow: var(--shadow-sm); background: #fff; border-color: var(--line-2); }
/* hustý seznam (všechny události): dva sloupce řádků, bez karet */
.evlist-dense { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; border-top: 1px solid var(--line); }
.evlist-dense .ev a { padding: 11px 4px 10px; }
.evlist-dense .ev .pin { --s: 30px; }
.evlist-dense .ev-title { font-size: .94rem; }
.evlist-collapsed > li:nth-child(n + 13) { display: none; }

/* isolation: Leaflet má ovládací prvky na z-index 1000 – vlastní vrstva je drží pod lepící hlavičkou */
.map-wrap { position: relative; min-width: 0; isolation: isolate; }
#map, .event-map { width: 100%; height: 100%; background: #e8ecef; }
.map-locate { position: absolute; z-index: 800; right: 10px; bottom: 30px; width: 44px; height: 44px; border-radius: 10px; border: 0;
  background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(0, 0, 0, .25); cursor: pointer; display: grid; place-items: center; }
.map-locate:hover { color: var(--blue); }
.noscript { position: absolute; inset: 40% 20px auto; text-align: center; background: #fff; padding: 16px; border-radius: var(--r-sm); }
.mobile-switch { display: none; }
.leaflet-bar { border: 0 !important; box-shadow: 0 1px 4px rgba(0, 0, 0, .25) !important; border-radius: 10px !important; overflow: hidden; }
.leaflet-bar a { width: 36px !important; height: 36px !important; line-height: 36px !important; color: var(--ink) !important; font-family: var(--font) !important; }
.leaflet-control-attribution { font: 11px/1.4 var(--font) !important; background: rgba(255, 255, 255, .8) !important; color: var(--muted) !important; }

/* ---------- značky: kolečko s piktogramem (seznamy), kapka (mapa) ---------- */
.pin-wrap { background: none; border: 0; }
.pin { display: inline-grid; place-items: center; flex-shrink: 0; width: 100%; height: 100%; border-radius: 50%; background: var(--c); border: 2px solid #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 3px 8px -2px rgba(0, 0, 0, .25); }
.pin svg { width: 72%; height: 72%; display: block; }
.pin-uzavirka { background: none; border: 0; }
.pin-uzavirka svg { width: 100%; height: 100%; filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, .3)); }
.pin-plan { border-style: dashed; opacity: .85; }
.pin-ended { filter: grayscale(1); opacity: .6; }
.evlist .pin, .stat .pin, .type-list .pin, .chip .pin { width: var(--s, 34px); height: var(--s, 34px); }
.chip .pin { --s: 24px; }
.mpin-wrap { background: none; border: 0; }
/* velikost = přiblížení mapy (--z) × váha typu (--k): nehoda plná velikost, ostatní menší, ať nehoda dominuje */
.mpin { position: absolute; inset: 0; display: block; transform-origin: 50% 100%; transform: scale(calc(var(--z, 1) * var(--k, .74))); }
.mpin-nehoda { --k: 1; }
.mpin::before { content: ""; position: absolute; left: 7%; top: 5.5%; width: 86%; aspect-ratio: 1; box-sizing: border-box;
  background: var(--c); border: 4px solid #fff; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  box-shadow: -2px 3px 6px rgba(14, 31, 58, .32); }
.mpin::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 30%; height: 8%; transform: translateX(-50%);
  border-radius: 50%; background: rgba(14, 31, 58, .26); filter: blur(1.5px); z-index: -1; }
.mpin i { position: absolute; left: 50%; top: 44%; width: 58%; aspect-ratio: 1; transform: translate(-50%, -50%); display: grid; place-items: center; }
.mpin i svg { width: 100%; height: 100%; display: block; }
.mpin-uzavirka::before { background: #fff; border-color: var(--c); }
.mpin-uzavirka i { width: 66%; opacity: .9; }
.mpin-plan::before { border-style: dashed; }
.mpin-plan { opacity: .9; }
.mpin-ended { filter: grayscale(1); opacity: .65; }
.z-near .mpin { --z: .75; }
.z-mid .mpin { --z: .56; }
.z-far .mpin { --z: .44; }
/* aktuální nehoda: pulzující kruh kolem hlavičky */
.mpin b { position: absolute; left: 7%; top: 5.5%; width: 86%; aspect-ratio: 1; border-radius: 50%; background: var(--c); z-index: -1; animation: pulse 2s ease-out infinite; }
@keyframes pulse { 0% { transform: scale(.9); opacity: .55; } 100% { transform: scale(1.9); opacity: 0; } }
.road-hit { cursor: pointer; }
/* úsek události v detailu: konec jako terčík, popisky začátku a konce */
.seg-end span { display: block; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 5px solid var(--c); box-shadow: 0 1px 4px rgba(14, 31, 58, .35); box-sizing: border-box; }
.leaflet-tooltip.seg-label { background: var(--ink); color: #fff; border: 0; border-radius: 6px; font: 700 .78rem/1 var(--font); padding: 6px 8px 4px; box-shadow: 0 2px 6px rgba(14, 31, 58, .25); }
.leaflet-tooltip.seg-label::before { border-right-color: var(--ink); }

/* bublina události na mapě */
.leaflet-container { font: 15px/1.5 var(--font); }
.leaflet-popup-content-wrapper { border-radius: 14px; box-shadow: var(--shadow); padding: 0; overflow: hidden; }
.leaflet-popup-content { margin: 0; }
.pop-ev .leaflet-popup-content { width: auto !important; min-width: 290px; max-width: 340px; }
.pop-ev a.leaflet-popup-close-button { top: 10px; right: 10px; width: 26px; height: 26px; border-radius: 50%; color: #fff;
  background: rgba(0, 0, 0, .22); font: 700 18px/26px var(--font); text-align: center; }
.pop-ev a.leaflet-popup-close-button:hover { background: rgba(0, 0, 0, .38); color: #fff; }
.pop-head { display: flex; align-items: center; gap: 10px; padding: 12px 46px 11px 14px; background: var(--c); color: #fff; }
.pop-head.pop-ended { background: #6b7384; }
.pop-head-road { background: var(--blue); }
.pop-head .pin { width: 36px; height: 36px; box-shadow: none; border-color: rgba(255, 255, 255, .9); filter: none; opacity: 1; }
.pop-head .pin-uzavirka { background: #fff; padding: 1px; }
.pop-head > span:nth-child(2) { display: grid; line-height: 1.2; flex: 1; min-width: 0; }
.pop-head b { font-weight: 800; font-size: 1rem; }
.pop-head small { font-size: .76rem; opacity: .92; font-weight: 600; }
.pop-head .road { box-shadow: inset 0 0 0 1.5px #fff; }
.pop-head button.road-d:hover { box-shadow: inset 0 0 0 1.5px #fff, 0 0 0 3px rgba(255, 255, 255, .35); }
.road-big { font-size: 1rem; padding: 6px 9px 4px; border-radius: 7px; box-shadow: inset 0 0 0 2px #fff; }
.pop-body { padding: 12px 16px 14px; }
.pop-title { font-weight: 800; color: var(--ink); font-size: 1.04rem; line-height: 1.3; margin: 0 0 8px; letter-spacing: -.01em; }
.pop-row { display: flex; gap: 7px; align-items: flex-start; margin: 0 0 4px; font-size: .88rem; color: var(--text); line-height: 1.45; }
.pop-row svg { flex-shrink: 0; margin-top: 1px; color: var(--muted); }
.pop-delay { color: #b35c00; font-weight: 700; }
.pop-desc { margin: 10px 0 0; padding: 10px 12px 8px; background: var(--bg); border-radius: 10px; font-size: .86rem; line-height: 1.5; color: var(--text); max-height: 150px; overflow-y: auto; }
.pop-loading { color: var(--muted); font-style: italic; }
.leaflet-container a.pop-more { display: inline-flex; gap: 6px; margin-top: 12px; font-weight: 700; font-size: .9rem; color: var(--blue); text-decoration: none; }
.pop-more span { transition: transform .12s; }
.leaflet-container a.pop-more:hover span { transform: translateX(3px); }
.mapy-logo { display: block; line-height: 0; margin: 0 0 6px 6px; }
.mapy-logo img { width: 80px; height: auto; }

/* ---------- sekce pod mapou ---------- */
.section { padding: 56px 0; }
.section-tint { background: linear-gradient(180deg, var(--blue-soft), var(--bg)); border-block: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin: 0 0 22px; }
.section-head h2 { margin-bottom: .15em; }
.section-head p { margin: 0; color: var(--muted); }

/* právě teď: dlaždice s počty */
.stats { list-style: none; margin: 0 0 22px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.stat { display: flex; align-items: center; gap: 12px; padding: 12px 16px 10px 12px; border-radius: var(--r-sm); background: var(--blue-soft); border: 1px solid var(--line); text-decoration: none; color: var(--ink);
  transition: border-color .15s, box-shadow .15s; }
.stat:hover { border-color: var(--line-2); box-shadow: var(--shadow-sm); }
.stat .pin { --s: 36px; }
.stat > span { display: block; min-width: 0; }
.stat b { display: block; font-size: 1.45rem; font-weight: 800; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--ink); }
.stat span span { display: block; font-size: .8rem; color: var(--muted); font-weight: 600; margin-top: 2px; }
.stat-nehoda { border-color: color-mix(in srgb, var(--red) 40%, #fff); background: var(--red-soft); }
.stat-nehoda b { color: var(--red); }

.split-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.split-2 h2 { margin-bottom: .2em; }
.regions { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.region-card { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 12px 14px 10px 16px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: .96rem; transition: box-shadow .15s, border-color .15s; }
.region-card:hover { box-shadow: var(--shadow-sm); border-color: var(--line-2); }
.region-card b { font-size: .84rem; font-weight: 800; background: var(--blue-soft); color: var(--blue-d); border-radius: 6px; padding: 3px 9px 1px; font-variant-numeric: tabular-nums; }
.motorways { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; margin-top: 16px; }
.mw { display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 8px 10px 7px 8px; text-decoration: none; color: var(--ink); font-weight: 800; font-variant-numeric: tabular-nums; background: #fff; }
.mw:hover { border-color: var(--line-2); box-shadow: var(--shadow-sm); }
.mw .road { font-size: .82rem; padding: 6px 8px 4px; }
.road-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.road-chip { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 999px; padding: 6px 13px 4px;
  text-decoration: none; color: var(--ink); font-weight: 600; font-size: .92rem; background: #fff; }
.road-chip:has(.road) { padding: 4px; border-radius: 8px; }
.road-chip:hover { border-color: var(--ink); }
.type-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.type-list a { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 9px 16px 8px 10px; border: 1px solid var(--line); background: #fff;
  border-radius: var(--r-sm); text-decoration: none; color: var(--ink); font-weight: 600; }
.type-list a:hover { border-color: var(--line-2); box-shadow: var(--shadow-sm); }
.type-list .pin { --s: 30px; }
.type-list > li > a > .i { width: 30px; height: 30px; padding: 5px; border-radius: 50%; background: #6b7384; color: #fff; }
.type-list b { font-weight: 800; font-variant-numeric: tabular-nums; }

.guides { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.guide-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 22px;
  text-decoration: none; color: var(--text); transition: box-shadow .2s, border-color .2s; }
.guide-card:hover { box-shadow: var(--shadow); border-color: transparent; }
.guide-card h2, .guide-card h3 { font-size: 1.12rem; margin: 14px 0 8px; letter-spacing: -.01em; }
.guide-card p { font-size: .93rem; flex: 1; color: var(--muted); }
.g-ico { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(180deg, var(--azure), var(--blue)); color: #fff; }

.about { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: start; }
.about .sign { margin-top: 2px; }

/* filtry a stránkování seznamu */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 20px; }
.filters .seg { display: inline-grid; }
.filters .chips { display: flex; flex-wrap: wrap; }
.filters .chip { padding-right: 12px; border-radius: 999px; }
.filters .chip:not(:has(.pin)) { padding: 8px 12px 6px; }
.list-h { display: flex; align-items: center; gap: 12px; font-size: 1.4rem; margin-bottom: 16px; }
.list-h span { font-size: .9rem; font-weight: 700; background: var(--bg); padding: 4px 11px 2px; border-radius: 999px; color: var(--muted); }
.pager { display: flex; justify-content: center; align-items: center; gap: 18px; margin: 28px 0 0; font-weight: 600; }
.pager a { text-decoration: none; border: 1px solid var(--line); border-radius: 8px; padding: 8px 14px 6px; color: var(--ink); }
.pager a:hover { border-color: var(--ink); }
.related { margin-top: 48px; display: grid; gap: 12px; }
.related h2 { font-size: 1.2rem; margin: 14px 0 2px; }

/* ---------- detail události ---------- */
.event { padding: 18px 0 30px; }
.event-head { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 16px; }
.event-head > .pin { width: 56px; height: 56px; margin-top: 4px; }
.event-head h1 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); max-width: 28em; margin: 0; }
.event-tags { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 0 8px; }
.event-kind { font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: color-mix(in srgb, var(--c) 78%, #000); }
.state { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; padding: 4px 10px 2px; border-radius: 999px; }
.state-live { background: var(--green-soft); color: #1b7a47; }
.state-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.state-plan { background: var(--blue-soft); color: var(--blue); }
.state-ended { background: var(--bg-2); color: var(--muted); }
.event-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 36px; align-items: start; margin-top: 14px; }
.event-map-col { position: sticky; top: calc(var(--header) + 20px); display: grid; gap: 10px; isolation: isolate; }
.event-map { height: 440px; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); }
.facts { display: grid; grid-template-columns: 120px 1fr; margin: 0 0 22px; border-top: 1px solid var(--line); }
.facts dt, .facts dd { padding: 10px 0 8px; border-bottom: 1px solid var(--line); margin: 0; }
.facts dt { font-weight: 600; color: var(--muted); font-size: .9rem; }
.facts dd { color: var(--ink); font-weight: 700; }
.event-desc { background: var(--bg); border-radius: var(--r-sm); padding: 18px 22px 16px; margin-bottom: 22px; }
.event-desc h2 { font-size: 1rem; margin: 0 0 6px; letter-spacing: 0; }
.event-desc p { margin: 0; white-space: pre-line; }
.note-inline { display: flex; gap: 8px; align-items: center; background: #fff7e0; border-radius: var(--r-sm); padding: 10px 14px 8px; font-weight: 600; }
.timeline-box { border: 1px solid var(--line); border-radius: var(--r); padding: 20px 22px 8px; margin-bottom: 22px; }
.timeline-box h2 { display: flex; align-items: center; gap: 8px; font-size: 1.12rem; margin: 0 0 16px; letter-spacing: -.01em; }
.timeline { list-style: none; margin: 0 0 12px; padding: 0 0 0 22px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline > li { position: relative; padding: 0 0 16px; }
.timeline > li::before { content: ""; position: absolute; left: -22px; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--faint); }
.timeline > .tl-new::before { border-color: var(--green); }
.timeline > .tl-update::before, .timeline > .tl-reopened::before { border-color: var(--blue); }
.timeline > .tl-ended::before { border-color: var(--muted); background: var(--muted); }
.timeline time { display: block; font-size: .8rem; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.timeline b { color: var(--ink); }
.timeline ul { margin: 4px 0 0; padding-left: 18px; font-size: .92rem; }
.timeline details { margin-top: 6px; font-size: .9rem; }
.timeline summary { cursor: pointer; color: var(--blue); font-weight: 600; }
.timeline details p { margin: 6px 0 0; background: var(--bg); border-radius: 8px; padding: 10px 12px 8px; }
.nearby { margin: 44px 0 24px; }
.nearby h2 { font-size: 1.4rem; }

/* ---------- články a textové stránky ---------- */
.page-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: start; padding-bottom: 48px; }
.prose { max-width: 72ch; font-size: 1.04rem; line-height: 1.65; }
.page-single, .legal { margin-bottom: 48px; }
.prose h2 { font-size: 1.45rem; margin-top: 1.7em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .4em; }
.prose details { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 0 18px; margin-bottom: 10px; }
.prose details[open] { box-shadow: var(--shadow-sm); }
.prose summary { cursor: pointer; font-weight: 700; color: var(--ink); padding: 14px 0 12px; }
.prose details p { margin: 0 0 14px; }
.note { background: var(--blue-soft); border-left: 4px solid var(--blue); border-radius: 0 var(--r-sm) var(--r-sm) 0; padding: 14px 20px 12px; margin: 1.4em 0; }
.note p:last-child { margin: 0; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 1.4em; }
.table { width: 100%; border-collapse: collapse; font-size: .96rem; font-variant-numeric: tabular-nums; }
.table th, .table td { text-align: left; padding: 11px 12px 9px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { background: var(--bg); font-weight: 700; color: var(--ink); }
.contact-card { font-style: normal; background: var(--bg); border-radius: var(--r-sm); padding: 20px 24px; line-height: 1.8; }

.side { position: sticky; top: calc(var(--header) + 24px); display: grid; gap: 16px; }
.side-card { display: block; background: linear-gradient(180deg, #0666cc, var(--navy)); color: #dcebf7; border-radius: var(--r); padding: 24px; text-decoration: none; position: relative; overflow: hidden; }
.side-card::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .8) 0 22px, transparent 22px 40px); }
.side-card .side-title { color: #fff; margin-top: 12px; }
.side-card p { font-size: .95rem; }
.side-card .more { color: #fff; }
.side-title { font-weight: 800; font-size: 1.06rem; color: var(--ink); margin: 0 0 8px; }
.side-links { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 20px 22px; display: grid; }
.side-links a { display: flex; justify-content: space-between; align-items: center; padding: 10px 0 8px; border-top: 1px solid var(--line); text-decoration: none; font-weight: 600; color: var(--ink); font-size: .95rem; }
.side-links a:hover { color: var(--blue); }

.notfound { padding: 60px 0 90px; }
.notfound .lead { margin: 0 auto 26px; }
.notfound h1 { margin-top: 18px; }

/* ---------- patička ---------- */
.site-footer { position: relative; background: linear-gradient(180deg, #0666cc 0%, var(--navy) 100%); color: #cfe4f5; padding: 60px 0 26px; margin-top: 0; }
.site-footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .85) 0 38px, transparent 38px 70px); }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 40px; }
.footer-brand p { margin: 16px 0 12px; max-width: 26em; font-size: .94rem; }
.footer-brand .small { color: #a9cbe6; }
.footer-h { font-size: .76rem; font-weight: 800; color: #fff; margin: 0 0 12px; letter-spacing: .1em; text-transform: uppercase; }
.footer-h:not(:first-child) { margin-top: 26px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; font-size: .93rem; }
.site-footer ul.cols-2 { grid-template-columns: 1fr 1fr; column-gap: 14px; }
.site-footer ul.cols-3 { grid-template-columns: repeat(3, 1fr); column-gap: 10px; }
.site-footer a:not(.btn), .site-footer .linklike { color: #cfe4f5; text-decoration: none; }
.site-footer a:not(.btn):hover, .site-footer .linklike:hover { color: #fff; }
.footer-legal { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; border-top: 1px solid rgba(255, 255, 255, .18); margin-top: 44px; padding-top: 20px; font-size: .86rem; }

/* ---------- cookies ---------- */
.cookie { position: fixed; left: 20px; bottom: 20px; z-index: 1500; width: min(500px, calc(100% - 40px)); background: #fff; border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow); padding: 20px; animation: rise .3s ease; }
@keyframes rise { from { transform: translateY(16px); opacity: 0; } }
.cookie-main { display: flex; gap: 14px; }
.cookie-icon { flex-shrink: 0; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); }
.cookie h2 { font-size: 1.06rem; margin: 0 0 4px; letter-spacing: -.01em; }
.cookie p { font-size: .9rem; margin: 0 0 10px; }
.cookie-prefs { display: grid; gap: 8px; margin: 8px 0 4px; }
.toggle { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; background: var(--bg); border-radius: var(--r-sm); padding: 10px 12px; cursor: pointer; }
.toggle input { width: 18px; height: 18px; accent-color: var(--blue); margin-top: 3px; }
.cookie-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* ---------- responzivita ---------- */
@media (max-width: 1180px) {
  .nav a { padding: 9px 8px 7px; font-size: .92rem; }
  .header-live { display: none; }
}
@media (max-width: 1100px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .page-body { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; grid-template-columns: 1fr 1fr; }
  .mapapp { grid-template-columns: 350px minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  :root { --header: 56px; }
  .logo { font-size: 1.6rem; }
  .nav-toggle { display: block; }
  .nav { position: fixed; inset: var(--header) 0 auto 0; flex-direction: column; align-items: stretch; background: #fff; padding: 10px 16px 16px; margin: 0;
    border-bottom: 1px solid var(--line); box-shadow: 0 20px 30px rgba(14, 31, 58, .12); display: none; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px 10px; font-size: 1rem; }
  .nav a[aria-current="page"]::after { display: none; }
  .nav a[aria-current="page"] { background: var(--blue-soft); }
  /* mobil: nahoře titulek a filtry, pod nimi mapa; přepínačem se místo mapy ukáže seznam */
  .mapapp, .mapapp-compact { display: flex; flex-direction: column; height: auto; min-height: 0; max-height: none; }
  .panel { border-right: 0; }
  .panel-head { padding: 12px 16px; gap: 10px; }
  .panel-title h1 { font-size: 1.2rem; }
  .panel-title p { display: none; }
  .panel .evlist, .panel-count { display: none; }
  .chips { display: flex; flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 2px; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex-shrink: 0; }
  .map-wrap { height: 55vh; min-height: 340px; max-height: 520px; }
  .mapapp-compact .map-wrap { height: 56vh; }
  .mapapp.show-list .map-wrap { display: none; }
  .mapapp.show-list .panel .evlist { display: block; max-height: 70vh; }
  .mapapp.show-list .panel-count { display: block; }
  .mobile-switch { display: flex; position: absolute; z-index: 900; left: 50%; bottom: 18px; transform: translateX(-50%); background: var(--navy);
    border-radius: 12px; padding: 4px; box-shadow: var(--shadow); }
  .mapapp.show-list .mobile-switch { position: sticky; bottom: 14px; align-self: center; transform: none; margin: 10px 0; }
  .mobile-switch button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: #dcebf7; font: 700 .92rem/1 var(--font);
    padding: 10px 16px 8px; border-radius: 9px; cursor: pointer; }
  .mobile-switch button.on { background: #fff; color: var(--ink); }
  .filters .chips { margin: 0; padding: 0; flex-wrap: wrap; }
  .split-2, .event-grid { grid-template-columns: 1fr; gap: 36px; }
  .event-map-col { position: static; }
  .event-map { height: 300px; }
  .section { padding: 40px 0; }
  .side { grid-template-columns: 1fr; }
  .crumbs li:last-child span { max-width: 28ch; }
  .page-head { padding: 16px 0 16px; }
}
@media (max-width: 560px) {
  .wrap { width: calc(100% - 32px); }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .evlist-grid, .evlist-dense { grid-template-columns: 1fr; }
  .about { grid-template-columns: 1fr; }
  .event-head > .pin { width: 44px; height: 44px; }
  .facts { grid-template-columns: 90px 1fr; }
  .seg-btn { padding: 9px 8px 7px; font-size: .82rem; }
  .stats { gap: 8px; }
  .stat { padding: 10px 12px 8px 10px; gap: 10px; }
  .stat .pin { --s: 30px; }
  .stat b { font-size: 1.25rem; }
  .cookie { left: 10px; bottom: 10px; width: calc(100% - 20px); padding: 16px; }
  .cookie p { font-size: .86rem; }
  .cookie-icon { display: none; }
  .cookie-actions .btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
