:root {
  color-scheme: light;
  --text: #12151a;
  --secondary: rgba(18, 21, 26, 0.58);
  --tertiary: rgba(18, 21, 26, 0.38);
  --blue: #0a84ff;
  --green: #34c759;
  --orange: #ff9f0a;
  --red: #ff453a;
  --glass: rgba(249, 251, 255, 0.70);
  --glass-strong: rgba(250, 252, 255, 0.88);
  --glass-border: rgba(255, 255, 255, 0.76);
  --hairline: rgba(23, 30, 39, 0.11);
  --shadow: 0 10px 34px rgba(28, 38, 52, 0.18), 0 2px 8px rgba(28, 38, 52, 0.08);
  --timeline-history: rgba(10, 132, 255, 0.78);
  --timeline-forecast: rgba(255, 159, 10, 0.82);
  --panel-radius: 24px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", Inter, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body { color: var(--text); background: #dbe2ea; -webkit-font-smoothing: antialiased; }
button, input, output { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

.app-shell, #map { position: fixed; inset: 0; }
#map { background: #dfe6ed; }
.maplibregl-map { font: inherit; }
.maplibregl-ctrl-top-left, .maplibregl-ctrl-top-right { display: none; }
.maplibregl-ctrl-bottom-right { right: auto; left: max(8px, env(safe-area-inset-left)); }
.radar-image { transition: opacity 0.18s linear; }
.maplibregl-ctrl-attrib {
  position: fixed !important;
  z-index: 930 !important;
  left: max(18px, env(safe-area-inset-left)) !important;
  right: auto !important;
  bottom: max(16px, env(safe-area-inset-bottom)) !important;
  padding: 3px 7px !important;
  border-radius: 8px;
  background: rgba(248, 250, 253, 0.72) !important;
  color: rgba(18, 21, 26, 0.48) !important;
  backdrop-filter: blur(15px) saturate(150%);
  -webkit-backdrop-filter: blur(15px) saturate(150%);
  font-size: 9px !important;
}
.maplibregl-ctrl-attrib a { color: rgba(10, 84, 170, 0.78) !important; }


.liquid-glass {
  position: relative;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.58), rgba(238, 244, 251, 0.34)),
    var(--glass);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(28px) saturate(180%) contrast(104%);
  -webkit-backdrop-filter: blur(28px) saturate(180%) contrast(104%);
  isolation: isolate;
}
.liquid-glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.64), transparent 42%, rgba(255, 255, 255, 0.16));
  opacity: 0.58;
  z-index: -1;
}

.map-control {
  user-select: none;
  -webkit-user-select: none;
  overscroll-behavior: contain;
}

.status-card {
  position: fixed;
  z-index: 900;
  top: max(12px, env(safe-area-inset-top));
  left: max(12px, env(safe-area-inset-left));
  width: fit-content;
  padding: 12px 14px 11px;
  border-radius: 22px;
}
.frame-kind {
  color: var(--secondary);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.frame-kind.is-forecast { color: #d66d00; }
.frame-time-row { display: flex; align-items: center; gap: 7px; min-height: 35px; }
.frame-time {
  font-size: 29px;
  line-height: 1;
  font-weight: 760;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
}
.frame-date {
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--secondary);
  font-size: 11px;
  line-height: 1.35;
}
.status-line {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--hairline);
  color: var(--secondary);
  font-size: 10px;
  white-space: nowrap;
}
.status-line span:last-child { overflow: hidden; text-overflow: ellipsis; }
.status-dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8e8e93;
  box-shadow: 0 0 0 3px rgba(142, 142, 147, 0.12);
}
.status-dot.is-ok { background: var(--green); box-shadow: 0 0 0 3px rgba(52, 199, 89, 0.13); }
.status-dot.is-error { background: var(--red); box-shadow: 0 0 0 3px rgba(255, 69, 58, 0.13); }
.loading-spinner {
  display: none;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(10, 132, 255, 0.20);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.loading-spinner.is-visible { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.map-tools {
  position: fixed;
  z-index: 920;
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  display: flex;
  align-items: center;
  gap: 8px;
}
.glass-icon-button {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  color: #11151b;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.16s ease, filter 0.16s ease;
}
.glass-icon-button:hover { filter: brightness(1.025); }
.glass-icon-button:focus-visible { outline: 3px solid rgba(10, 132, 255, 0.35); outline-offset: 2px; }
.glass-icon-button:active { transform: scale(0.93); }
.glass-icon-button svg { width: 19px; height: 19px; fill: currentColor; }

.timeline-panel {
  position: fixed;
  z-index: 910;
  left: max(12px, env(safe-area-inset-left));
  right: max(12px, env(safe-area-inset-right));
  bottom: max(12px, env(safe-area-inset-bottom));
  min-height: 119px;
  padding: 14px;
  border-radius: 25px;
  touch-action: none;
}
.timeline-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.timeline-title { min-width: 0; }
.timeline-title strong { display: block; font-size: 16px; line-height: 1.2; letter-spacing: -0.015em; }
.timeline-title span { display: block; margin-top: 2px; color: var(--secondary); font-size: 11px; }
.timeline-current-time { display: none; }
.play-button {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--blue);
  box-shadow: 0 5px 16px rgba(10, 132, 255, 0.28);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.16s ease, opacity 0.16s ease;
}
.play-button:active { transform: scale(0.93); }
.play-button:disabled { opacity: 0.45; cursor: default; }
.play-button svg { width: 18px; height: 18px; fill: currentColor; }
.play-button .pause-icon { display: none; }
.play-button.is-playing .play-icon { display: none; }
.play-button.is-playing .pause-icon { display: block; }
.timeline-wrap { margin-top: 13px; }
#timeline {
  --history-ratio: 78%;
  width: 100%;
  height: 20px;
  margin: 0;
  padding: 0;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  touch-action: none;
}
#timeline::-webkit-slider-runnable-track {
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg,
    var(--timeline-history) 0 var(--history-ratio),
    var(--timeline-forecast) var(--history-ratio) 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.34);
}
#timeline::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  margin-top: -7px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid rgba(25, 32, 42, 0.10);
  box-shadow: 0 2px 8px rgba(24, 32, 44, 0.28);
}
#timeline::-moz-range-track {
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg,
    var(--timeline-history) 0 var(--history-ratio),
    var(--timeline-forecast) var(--history-ratio) 100%);
}
#timeline::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid rgba(25, 32, 42, 0.10);
  box-shadow: 0 2px 8px rgba(24, 32, 44, 0.28);
}
.timeline-labels {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  margin-top: 1px;
  color: var(--secondary);
  font-size: 10px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.timeline-labels span:nth-child(2) { text-align: center; }
.timeline-labels span:nth-child(3) { text-align: right; }
.timeline-now { font-size: 9px; font-weight: 760; letter-spacing: 0.08em; }

.settings-backdrop {
  position: fixed;
  z-index: 1050;
  inset: 0;
  background: rgba(13, 18, 25, 0.20);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}
.settings-backdrop[hidden], .settings-sheet[hidden] { display: none; }
.settings-backdrop.is-open { opacity: 1; pointer-events: auto; }
.settings-sheet {
  position: fixed;
  z-index: 1080;
  top: 50%;
  left: 50%;
  width: min(430px, calc(100vw - 24px));
  max-height: min(690px, calc(100vh - 32px));
  padding: 9px 12px 14px;
  border-radius: 28px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, calc(-50% + 14px)) scale(0.97);
  transition: opacity 0.18s ease, transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
  overflow: auto;
  touch-action: pan-y;
}
.settings-sheet.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}
.sheet-handle { display: none; width: 36px; height: 5px; margin: 2px auto 7px; border-radius: 999px; background: rgba(20, 25, 32, 0.18); }
.settings-header { display: flex; align-items: center; justify-content: space-between; padding: 5px 5px 10px; }
.settings-header h2 { margin: 0; font-size: 20px; letter-spacing: -0.025em; }
.close-button {
  border: 0;
  padding: 7px 8px;
  border-radius: 10px;
  color: var(--blue);
  background: transparent;
  font-weight: 650;
  cursor: pointer;
}
.settings-section {
  margin-top: 10px;
  padding: 6px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.66);
}
.settings-section h3 {
  margin: 9px 0 6px;
  color: var(--secondary);
  font-size: 12px;
  line-height: 1;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.setting-row, .about-row {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--hairline);
}
.settings-section h3 + .setting-row,
.settings-section h3 + .about-row { border-top: 0; }
.setting-row > span:first-child { min-width: 0; }
.setting-row strong { display: block; font-size: 14px; font-weight: 520; }
.setting-row small { display: block; margin-top: 2px; color: var(--secondary); font-size: 11px; }
.setting-range { min-height: 39px; border: 0; font-size: 14px; }
.setting-range output { color: var(--secondary); font-variant-numeric: tabular-nums; }
.settings-section > input[type="range"] { width: 100%; margin: 2px 0 12px; accent-color: var(--blue); }
.location-settings { padding-bottom: 10px; }
.location-current {
  padding: 8px 0 12px;
}
.location-current strong,
.location-current small {
  display: block;
}
.location-current strong {
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 620;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.location-current small {
  margin-top: 2px;
  color: var(--secondary);
  font-size: 11px;
  line-height: 1.4;
}
.location-search { position: relative; }
.location-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.location-input-wrap > svg {
  position: absolute;
  z-index: 1;
  left: 13px;
  width: 18px;
  height: 18px;
  fill: var(--secondary);
  pointer-events: none;
}
#locationInput {
  width: 100%;
  height: 45px;
  padding: 0 42px 0 40px;
  border: 1px solid rgba(23, 30, 39, 0.10);
  border-radius: 14px;
  outline: 0;
  color: var(--text);
  background: rgba(255, 255, 255, 0.74);
  font-size: 16px;
  line-height: 1;
  appearance: none;
  -webkit-appearance: none;
}
#locationInput::-webkit-search-cancel-button { margin-right: -27px; }
#locationInput:focus {
  border-color: rgba(10, 132, 255, 0.72);
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.16);
}
.location-search-spinner {
  position: absolute;
  right: 13px;
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(10, 132, 255, 0.20);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  pointer-events: none;
}
.location-search-spinner.is-visible { display: block; }
.location-results {
  max-height: 228px;
  margin-top: 7px;
  border: 1px solid rgba(23, 30, 39, 0.10);
  border-radius: 14px;
  overflow-x: hidden;
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 8px 24px rgba(28, 38, 52, 0.10);
}
.location-results[hidden] { display: none; }
.location-result {
  width: 100%;
  min-height: 52px;
  padding: 9px 12px;
  border: 0;
  border-top: 1px solid var(--hairline);
  display: block;
  color: var(--text);
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.location-result:first-child { border-top: 0; }
.location-result:hover,
.location-result:focus-visible {
  outline: 0;
  background: rgba(10, 132, 255, 0.10);
}
.location-result strong,
.location-result small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.location-result strong { font-size: 13px; font-weight: 650; line-height: 1.35; }
.location-result small { margin-top: 2px; color: var(--secondary); font-size: 11px; line-height: 1.3; }
.location-help {
  min-height: 15px;
  margin: 6px 2px 0;
  color: var(--secondary);
  font-size: 10px;
  line-height: 1.45;
}
.location-help.is-error { color: #d92d20; }
.location-gps-button {
  width: 100%;
  min-height: 49px;
  margin-top: 5px;
  padding: 8px 4px;
  border: 0;
  border-top: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.location-gps-button > svg {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  fill: var(--blue);
}
.location-gps-button strong,
.location-gps-button small { display: block; }
.location-gps-button strong { font-size: 13px; font-weight: 590; }
.location-gps-button small { margin-top: 2px; color: var(--secondary); font-size: 10px; }
.location-gps-button:hover strong { color: var(--blue); }
.location-gps-button:focus-visible { outline: 3px solid rgba(10, 132, 255, 0.28); outline-offset: -2px; border-radius: 12px; }
.location-attribution {
  margin: 0;
  color: var(--tertiary);
  font-size: 9px;
  line-height: 1.35;
  text-align: right;
}
.ios-switch { position: relative; flex: 0 0 auto; width: 51px; height: 31px; }
.ios-switch input { position: absolute; opacity: 0; pointer-events: none; }
.ios-switch span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(120, 120, 128, 0.28);
  transition: background 0.18s ease;
  cursor: pointer;
}
.ios-switch span::after {
  content: "";
  position: absolute;
  width: 27px;
  height: 27px;
  top: 2px;
  left: 2px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.20);
  transition: transform 0.18s ease;
}
.ios-switch input:checked + span { background: var(--green); }
.ios-switch input:checked + span::after { transform: translateX(20px); }
.ios-switch input:focus-visible + span { outline: 3px solid rgba(10, 132, 255, 0.32); outline-offset: 2px; }
.legend-section img { display: block; width: fit-content; max-width: fit-content; height: auto; margin: 8px auto 12px; border-radius: 8px; }
.about-row { color: inherit; text-decoration: none; font-size: 14px; }
.about-row span { color: var(--text); }
.about-row strong { max-width: 66%; color: var(--secondary); font-weight: 500; text-align: right; overflow-wrap: anywhere; }
a.about-row strong { color: var(--blue); }
.about-note { padding: 11px 0 8px; border-top: 1px solid var(--hairline); color: var(--secondary); font-size: 10px; line-height: 1.45; }

.toast {
  position: fixed;
  z-index: 1200;
  left: 50%;
  bottom: calc(max(12px, env(safe-area-inset-bottom)) + 133px);
  max-width: calc(100vw - 30px);
  padding: 10px 14px;
  border-radius: 999px;
  transform: translate(-50%, 10px);
  opacity: 0;
  pointer-events: none;
  color: var(--text);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

.user-position { filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.30)); }
.user-position div {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--blue);
  border: 3px solid #fff;
  box-shadow: 0 0 0 8px rgba(10, 132, 255, 0.17);
}

body.dark-map {
  --glass: rgba(30, 34, 41, 0.72);
  --glass-strong: rgba(30, 34, 41, 0.88);
  --glass-border: rgba(255, 255, 255, 0.19);
  --hairline: rgba(255, 255, 255, 0.12);
  --text: #f6f7f9;
  --secondary: rgba(246, 247, 249, 0.62);
  --tertiary: rgba(246, 247, 249, 0.42);
}
body.dark-map .liquid-glass {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.025)),
    var(--glass);
}
body.dark-map .glass-icon-button { color: #fff; }
body.dark-map .settings-section { background: rgba(22, 25, 31, 0.58); border-color: rgba(255, 255, 255, 0.10); }
body.dark-map #locationInput,
body.dark-map .location-results { background: rgba(16, 19, 24, 0.78); border-color: rgba(255, 255, 255, 0.11); }
body.dark-map .location-result:hover,
body.dark-map .location-result:focus-visible { background: rgba(10, 132, 255, 0.18); }
body.dark-map .maplibregl-ctrl-attrib { background: rgba(22, 25, 31, 0.72) !important; color: rgba(255,255,255,.55) !important; }
body.dark-map .maplibregl-ctrl-attrib a { color: rgba(153, 202, 255, 0.82) !important; }


@media (min-width: 721px) {
  .timeline-panel {
    max-width: 720px;
    margin: 0 auto;
  }

  .status-card {
  display: none !important;
}

  .timeline-current-time {
    display: grid;
    min-width: 118px;
    margin-left: auto;
    padding: 0 12px;
    border-right: 1px solid var(--hairline);
    text-align: right;
  }

  .timeline-current-time span {
    color: var(--secondary);
    font-size: 11px;
    font-weight: 650;
    line-height: 1.2;
  }

  .timeline-current-time span.is-forecast { color: #d66d00; }
  .timeline-current-time strong {
    font-size: 24px;
    line-height: 1.15;
    letter-spacing: -0.04em;
    font-variant-numeric: tabular-nums;
  }
}

@media (max-width: 720px) {
  .status-card { width: fit-content; padding: 10px 12px 9px; border-radius: 20px; margin-top: 35px;}
  .frame-time { font-size: 27px; }
  .frame-date { font-size: 10px; }
  .status-line { margin-top: 7px; padding-top: 7px; font-size: 9px; }
  .map-tools { gap: 6px;margin-top: 35px; }
  .glass-icon-button { width: 41px; height: 41px; }
  .glass-icon-button svg { width: 18px; height: 18px; }
  .timeline-panel { padding: 13px 14px 11px; border-radius: 23px; }
  .timeline-title strong { font-size: 15px; }
  .maplibregl-ctrl-attrib { left: max(15px, env(safe-area-inset-left)) !important; bottom: max(13px, env(safe-area-inset-bottom)) !important; }
}

@media (max-width: 460px) {
  .status-card { width: fit-content; margin-top: 35px;}
  .frame-kind { font-size: 11px; }
  .frame-time { font-size: 25px; }
  .map-tools { gap: 5px;margin-top: 35px; }
  .glass-icon-button { width: 38px; height: 38px; }
  .glass-icon-button svg { width: 17px; height: 17px; }
  .timeline-panel { left: 9px; right: 9px; bottom: max(9px, env(safe-area-inset-bottom)); }
  .timeline-title span { font-size: 10px; }
  .settings-sheet {
    top: auto;
    left: 8px;
    right: 8px;
    bottom: max(8px, env(safe-area-inset-bottom));
    width: auto;
    max-height: min(82vh, 720px);
    border-radius: 28px;
    transform: translateY(18px) scale(0.985);
  }
  .settings-sheet.is-open { transform: translateY(0) scale(1); }
  .sheet-handle { display: block; }
  .toast { bottom: calc(max(9px, env(safe-area-inset-bottom)) + 128px); }
}

@media (max-width: 370px) {
  .status-card { width: 140px; }
  .frame-date { display: none; }
  .map-tools { display: grid; grid-template-columns: repeat(2, 38px); }
  .timeline-title span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .liquid-glass { background: rgba(249, 251, 255, 0.94); }
  body.dark-map .liquid-glass { background: rgba(30, 34, 41, 0.94); }
}

/* Web 2.1: stav automatického hledání polohy */
.glass-icon-button.is-locating svg {
  animation: locate-pulse 0.9s ease-in-out infinite alternate;
}
@keyframes locate-pulse {
  from { opacity: 0.45; transform: scale(0.90); }
  to { opacity: 1; transform: scale(1.05); }
}
@media (prefers-reduced-motion: reduce) {
  .glass-icon-button.is-locating svg { animation: none; opacity: 0.65; }
}

.info-button {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 1200;

  width: 44px;
  height: 44px;
  padding: 0;

  display: grid;
  place-items: center;

  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.45);

  color: #1c1c1e;
  font-size: 20px;
  font-weight: 700;
  font-family: Georgia, serif;

  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.info-button:hover {
  transform: scale(1.04);
}

.info-button:active {
  transform: scale(0.96);
}

.info-dialog[hidden] {
  display: none;
}

.info-dialog {
  position: fixed;
  inset: 0;
  z-index: 2000;

  display: grid;
  place-items: center;
  padding: 20px;
  pointer-events: none;
}
.info-dialog.is-open { pointer-events: auto; }

.info-dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  opacity: 0;
  transition: opacity 0.18s ease;
}
.info-dialog.is-open .info-dialog-backdrop { opacity: 1; }

.info-card {
  position: relative;
  z-index: 1;
  background: white;

  width: min(100%, 360px);
  padding: 28px 22px 22px;

  border-radius: 28px;
  text-align: center;
  color: #1c1c1e;

  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  opacity: 0;
  transform: translateY(14px) scale(0.965);
  transition: opacity 0.18s ease, transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.info-dialog.is-open .info-card { opacity: 1; transform: translateY(0) scale(1); }

.info-card h2 {
  margin: 10px 0 22px;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.info-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto;

  display: grid;
  place-items: center;

  border-radius: 16px;
  background: rgba(0, 122, 255, 0.14);
  color: #007aff;

  font-family: Georgia, serif;
  font-size: 28px;
  font-weight: 700;
}

.info-close {
  position: absolute;
  top: 12px;
  right: 14px;

  width: 34px;
  height: 34px;
  padding: 0;

  border: 0;
  border-radius: 50%;
  background: rgba(120, 120, 128, 0.14);

  color: #3a3a3c;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}

.info-details {
  display: grid;
  gap: 10px;
  text-align: left;
}

.info-details > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;

  padding: 13px 14px;
  border-radius: 15px;
  background: rgba(120, 120, 128, 0.09);
}

.info-details span {
  color: #6e6e73;
  font-size: 14px;
}

.info-details strong,
.info-details a {
  color: #1c1c1e;
  font-size: 14px;
  font-weight: 600;
  text-align: right;
  text-decoration: none;
}

.info-details a:hover {
  text-decoration: underline;
}

/* Pokud tlačítko koliduje se spodní timeline */
@media (max-width: 720px) {
  .info-button {
    bottom: calc(150px + env(safe-area-inset-bottom));
  }
}

body.info-dialog-open {
  overflow: hidden;
}

div.status-line, div.frame-date {display: none;}

/* Výstrahy ČHMÚ */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.timeline-dock {
  position: fixed;
  z-index: 910;
  left: 50%;
  bottom: max(12px, env(safe-area-inset-bottom));
  width: min(calc(100% - 24px), 780px);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  pointer-events: none;
}

.timeline-dock > * {
  pointer-events: auto;
}

.timeline-dock .timeline-panel {
  position: relative;
  z-index: auto;
  left: auto;
  right: auto;
  bottom: auto;
  width: 100%;
  max-width: 720px;
  margin: 0;
  flex: 1 1 720px;
}

.warning-button[hidden],
.warning-dialog[hidden] {
  display: none;
}

.warning-button {
  position: relative;
  flex: 0 0 auto;
  width: 50px;
  height: 50px;
  padding: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: #fff;
  transition: transform 0.16s ease, filter 0.16s ease;
}

.warning-button:hover {
  filter: brightness(1.035);
}

.warning-button:active {
  transform: scale(0.93);
}

.warning-button:focus-visible {
  outline: 3px solid rgba(255, 69, 58, 0.34);
  outline-offset: 3px;
}

.warning-symbol {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--red);
  box-shadow: 0 5px 16px rgba(255, 69, 58, 0.35);
  font-size: 24px;
  line-height: 1;
  font-weight: 800;
}

.warning-count {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #b42318;
  color: #fff;
  font-size: 10px;
  line-height: 1;
  font-weight: 800;
  box-shadow: 0 3px 9px rgba(0, 0, 0, 0.2);
}

.warning-dialog {
  position: fixed;
  inset: 0;
  z-index: 2200;
  display: grid;
  place-items: center;
  padding: max(18px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  pointer-events: none;
}
.warning-dialog.is-open { pointer-events: auto; }

.warning-dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 12, 17, 0.34);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  opacity: 0;
  transition: opacity 0.18s ease;
}
.warning-dialog.is-open .warning-dialog-backdrop { opacity: 1; }

.warning-card {
  position: relative;
  z-index: 1;
  width: min(100%, 620px);
  max-height: min(82dvh, 760px);
  border-radius: 28px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: var(--text);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.76), rgba(244, 248, 253, 0.58)),
    var(--glass-strong);
  opacity: 0;
  transform: translateY(16px) scale(0.97);
  transition: opacity 0.18s ease, transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.warning-dialog.is-open .warning-card { opacity: 1; transform: translateY(0) scale(1); }

.warning-header {
  position: relative;
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  align-items: center;
  gap: 13px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--hairline);
}

.warning-header-icon {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: rgba(255, 69, 58, 0.14);
  color: #d92d20;
  font-size: 28px;
  line-height: 1;
  font-weight: 800;
}

.warning-header p {
  margin: 0 0 2px;
  color: #d92d20;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.warning-header h2 {
  margin: 0;
  font-size: 21px;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.warning-header span {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--secondary);
  font-size: 12px;
}

.warning-close {
  align-self: start;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(120, 120, 128, 0.14);
  color: var(--text);
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}

.warning-close:focus-visible {
  outline: 3px solid rgba(255, 69, 58, 0.28);
  outline-offset: 2px;
}

.warning-list {
  min-height: 0;
  padding: 14px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.warning-item {
  padding: 17px 17px 16px;
  border: 1px solid rgba(23, 30, 39, 0.09);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 4px 15px rgba(28, 38, 52, 0.07);
}

.warning-item h3::before {
    content: "⚠️";
    margin-right: 8px;
}

.warning-item + .warning-item {
  margin-top: 12px;
}

.warning-item.severity-severe {
  border-left-color: #ff8a1f;
}

.warning-item.severity-extreme {
  border-left-color: #d92d20;
}



.warning-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.warning-item h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.22;
  letter-spacing: -0.02em;
}

.warning-severity {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255, 204, 0, 0.15);
  color: #795b00;
  font-size: 10px;
  line-height: 1.15;
  font-weight: 750;
  text-align: center;
}

.severity-severe .warning-severity {
  background: rgba(255, 138, 31, 0.14);
  color: #a74600;
}

.severity-extreme .warning-severity {
  background: rgba(217, 45, 32, 0.13);
  color: #b42318;
}

.warning-validity {
  margin-top: 10px;
  color: var(--secondary);
  font-size: 12px;
  line-height: 1.45;
}

.warning-headline {
  margin: 13px 0 0;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 700;
}

.warning-text,
.warning-instruction,
.warning-area {
  margin: 11px 0 0;
  color: rgba(18, 21, 26, 0.82);
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-line;
}

.warning-instruction {
  padding-top: 11px;
  border-top: 1px solid rgba(23, 30, 39, 0.08);
}

.warning-instruction strong,
.warning-area strong {
  color: var(--text);
}

.warning-area {
  color: var(--secondary);
  font-size: 12px;
}

.warning-footer {
  flex: 0 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px 14px;
  border-top: 1px solid var(--hairline);
  color: var(--tertiary);
  font-size: 10px;
  line-height: 1.35;
}

body.warning-dialog-open {
  overflow: hidden;
}

body.dark-map .warning-card {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.025)),
    var(--glass-strong);
}

body.dark-map .warning-item {
  border-color: rgba(255, 255, 255, 0.09);
  background: rgba(22, 25, 31, 0.62);
}

body.dark-map .warning-text,
body.dark-map .warning-instruction {
  color: rgba(246, 247, 249, 0.82);
}

body.dark-map .warning-instruction {
  border-top-color: rgba(255, 255, 255, 0.09);
}

body.dark-map .warning-count {
  border-color: rgba(30, 34, 41, 0.95);
}

@media (max-width: 720px) {
  .timeline-dock {
    width: calc(100% - 18px);
    bottom: max(9px, env(safe-area-inset-bottom));
    gap: 8px;
  }

  .timeline-dock .timeline-panel {
    left: auto;
    right: auto;
    bottom: auto;
  }

  .warning-button {
    width: 46px;
    height: 46px;
  }

  .warning-symbol {
    width: 32px;
    height: 32px;
    font-size: 22px;
  }
}

@media (max-width: 460px) {
  .warning-card {
    max-height: calc(100dvh - 18px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    border-radius: 25px;
  }

  .warning-header {
    grid-template-columns: minmax(0, 1fr) 40px;
    gap: 10px;
    padding: 17px 15px 14px;
  }

  .warning-header-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
  }

  .warning-header h2 {
    font-size: 19px;
  }

  .warning-list {
    padding: 10px;
  }

  .warning-item {
    padding: 15px 14px 14px;
  }

  .warning-item-head {
    display: block;
  }

  .warning-severity {
    display: inline-block;
    margin-top: 8px;
  }

  .warning-footer {
    display: block;
  }

  .warning-footer span {
    display: block;
  }

  .warning-footer span + span {
    margin-top: 3px;
  }
}

@media (max-width: 370px) {
  .timeline-dock {
    gap: 6px;
  }

  .warning-button {
    width: 42px;
    height: 42px;
  }

  .warning-symbol {
    width: 29px;
    height: 29px;
    font-size: 20px;
  }
}
