/* pocasi.bua.cz – styly podle designu „Počasí webu“ (Onest, sklo, animované pozadí) */
:root {
  --text: #fff;
  --text-2: rgba(255,255,255,.78);
  --text-3: rgba(255,255,255,.72);
  --glass: rgba(12,22,40,.26);
  --glass-border: rgba(255,255,255,.14);
  --line: rgba(255,255,255,.12);
  --precip: #8fd3ff;
  --pop: #a8d8ff;
  --sun: #ffd66b;
  --gap: 16px;
  --card-pad: 18px 20px;
  --ease: .22s ease;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: #1f2c3b; }
body {
  font-family: 'Onest', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: #cfe3ff; }
button { font: inherit; color: inherit; }
input::placeholder { color: rgba(255,255,255,.65); }
[hidden] { display: none !important; }
.nowrap { white-space: nowrap; }

.ic {
  font-family: 'Material Symbols Rounded';
  font-weight: normal; font-style: normal;
  font-size: 20px; line-height: 1;
  display: inline-block; width: 1em; overflow: hidden;
  white-space: nowrap; direction: ltr;
  font-variation-settings: 'FILL' 0;
  letter-spacing: normal; text-transform: none; /* prostrkání by rozbilo ligatury ikon */
  flex: none; user-select: none;
}
.ic.fill { font-variation-settings: 'FILL' 1; }

/* ---------- pozadí ---------- */
.bg { position: fixed; inset: 0; z-index: 0; background: linear-gradient(180deg,#1f2c3b 0%,#324456 55%,#495c6f 100%); transition: background 1.2s ease; }
.bg-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }

.wrap {
  position: relative; z-index: 1;
  max-width: 1180px; margin: 0 auto;
  padding: 16px clamp(14px,3vw,32px) 120px;
  padding-left: max(clamp(14px,3vw,32px), env(safe-area-inset-left));
  padding-right: max(clamp(14px,3vw,32px), env(safe-area-inset-right));
  padding-top: max(16px, env(safe-area-inset-top));
  display: flex; flex-direction: column; gap: var(--gap);
}
main { display: flex; flex-direction: column; gap: var(--gap); }

/* ---------- mini lišta ---------- */
.mini {
  position: fixed; top: 0; left: 0; right: 0; z-index: 25;
  display: flex; justify-content: center;
  padding: calc(10px + env(safe-area-inset-top)) 12px 10px;
  pointer-events: none; opacity: 0; transform: translateY(-12px);
  transition: opacity .25s ease, transform .25s ease;
}
.mini.on { opacity: 1; transform: none; }
.mini.on .mini-pill { pointer-events: auto; }
.mini-pill {
  pointer-events: none; cursor: pointer;
  display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 18px;
  border-radius: 999px; background: rgba(12,22,40,.6);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,.16); box-shadow: 0 8px 30px rgba(0,0,0,.25);
  font-size: 15px; white-space: nowrap; max-width: 100%;
}
.mini-city { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.mini-temp { font-size: 17px; }

/* ---------- hlavička ---------- */
.top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; position: relative; z-index: 20; }
.logo { font-weight: 600; font-size: 19px; letter-spacing: -.01em; display: flex; align-items: baseline; text-decoration: none; color: #fff; }
.logo-dom { color: var(--text-3); font-weight: 400; }
.search { flex: 1 1 260px; max-width: 420px; margin-left: auto; position: relative; }
.search-box {
  display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px;
  border-radius: 14px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.18);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}
.search-box:focus-within { background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.3); }
.search-box input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; color: #fff; font: inherit; font-size: 15px; }
.search-box input::-webkit-search-cancel-button { filter: invert(1); }
.search-list {
  position: absolute; top: 50px; left: 0; right: 0; z-index: 30;
  background: rgba(18,26,42,.94); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border); border-radius: 16px; padding: 6px;
  max-height: 360px; overflow: auto; box-shadow: 0 20px 50px rgba(0,0,0,.35);
}
.s-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.s-item:hover, .s-item.act { background: rgba(255,255,255,.1); }
.s-item .ic { color: rgba(255,255,255,.75); }
.s-txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.s-name { font-size: 15px; }
.s-reg { font-size: 12px; color: var(--text-3); }
.s-temp { margin-left: auto; font-size: 15px; display: flex; align-items: center; gap: 6px; }
.s-empty { padding: 12px; font-size: 14px; color: rgba(255,255,255,.75); }

.btn-glass {
  height: 44px; padding: 0 14px; display: flex; align-items: center; gap: 6px;
  border-radius: 14px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.14);
  color: #fff; font-size: 14px; cursor: pointer;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  transition: background var(--ease);
}
.btn-glass:hover { background: rgba(255,255,255,.22); }
.btn-glass.busy .ic { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.account { position: relative; }
.menu {
  position: absolute; right: 0; top: 52px; z-index: 30; min-width: 230px;
  background: rgba(18,26,42,.94); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border); border-radius: 16px; padding: 6px; box-shadow: 0 20px 50px rgba(0,0,0,.35);
}
.menu-email { padding: 10px 12px; font-size: 13px; color: var(--text-2); border-bottom: 1px solid var(--line); margin-bottom: 4px; word-break: break-all; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; background: transparent; border-radius: 10px; cursor: pointer; font-size: 14px; text-align: left; }
.menu-item:hover { background: rgba(255,255,255,.1); }
.menu-item.danger { color: #ffb4b6; }

/* ---------- oblíbená ---------- */
.favs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; min-height: 34px; }
.favs::-webkit-scrollbar { display: none; }
.fav {
  flex: none; height: 34px; padding: 0 14px; display: flex; align-items: center; gap: 8px;
  border-radius: 999px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.12);
  font-size: 14px; cursor: pointer; transition: background var(--ease);
}
.fav:hover { background: rgba(255,255,255,.2); }
.fav.on { background: rgba(255,255,255,.3); }
.fav .ic { font-size: 15px; }
.fav-t { color: rgba(255,255,255,.8); }
.fav-hint { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); height: 34px; }
.fav-hint .ic { font-size: 16px; }

/* ---------- hero ---------- */
.hero { display: flex; flex-wrap: wrap; gap: 28px 56px; align-items: flex-end; padding: 56px 0 28px; }
.hero-l { flex: 1 1 340px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 15px; color: rgba(255,255,255,.85); min-height: 20px; }
.geo-tag { display: flex; align-items: center; gap: 4px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: #fff; }
.geo-tag .ic { font-size: 15px; }
.hero-title { display: flex; align-items: center; gap: 8px; position: relative; z-index: 2; }
.hero-title h1 { margin: 0; font-size: clamp(26px,3.4vw,34px); font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.fav-btn { width: 34px; height: 34px; flex: none; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background var(--ease); }
.fav-btn:hover { background: rgba(255,255,255,.22); }
.fav-btn .ic { font-size: 19px; }
.fav-btn[aria-pressed="true"] .ic { font-variation-settings: 'FILL' 1; color: #ffe08a; }
/* velké číslo nesmí zachytávat kliknutí (jeho rámeček přesahuje nahoru přes hvězdičku);
   proporcionální číslice, aby „11°“ nemělo mezi jedničkami díru */
.hero-temp { font-size: clamp(180px,20vw,256px); font-weight: 100; line-height: .84; letter-spacing: -.06em; margin: 10px 0 6px -.05em; min-height: .84em; pointer-events: none; font-variant-numeric: proportional-nums; }
.hero-cond { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 20px; min-height: 30px; }
.hero-cond .ic { font-size: 30px; }
.hero-label { font-weight: 500; }
.hero-r { flex: 1 1 320px; max-width: 440px; display: flex; flex-direction: column; gap: 20px; }
.hero-sum { margin: 0; font-size: clamp(18px,2vw,22px); line-height: 1.4; text-wrap: pretty; }
.hero-src { font-size: 12px; color: var(--text-3); margin-top: -12px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; column-gap: 24px; border-top: 1px solid rgba(255,255,255,.22); }
.fact { padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.22); display: flex; flex-direction: column; gap: 2px; }
.fact-k { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); }
.fact-v { font-size: 22px; }

/* ---------- výstrahy ---------- */
.warnings { display: flex; flex-direction: column; gap: 8px; }
.warnings:empty { display: none; }
.warn {
  cursor: pointer; display: flex; flex-direction: column; gap: 8px; padding: 12px 16px; border-radius: 16px;
  background: var(--glass); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border: 1px solid var(--glass-border);
}
.warn-h { display: flex; align-items: center; gap: 6px 10px; font-size: 14px; flex-wrap: wrap; }
.warn-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.warn-t { font-weight: 600; }
.warn-m { color: rgba(255,255,255,.8); }
.warn-h .ic { margin-left: auto; }
.warn-b { font-size: 14px; line-height: 1.5; padding-left: 18px; text-wrap: pretty; }
.warn-b p { margin: 0 0 6px; }

/* ---------- karty ---------- */
.card {
  background: var(--glass);
  backdrop-filter: blur(24px) saturate(140%); -webkit-backdrop-filter: blur(24px) saturate(140%);
  border: 1px solid var(--glass-border); border-radius: 22px;
  padding: var(--card-pad); display: flex; flex-direction: column; gap: 12px; min-width: 0;
}
.card-h {
  margin: 0; display: flex; align-items: center; gap: 6px;
  font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); font-weight: 500;
}
.card-h .ic { font-size: 16px; }
.card-h-note { margin-left: auto; letter-spacing: .04em; font-size: 11px; opacity: .8; }
.grid { display: flex; flex-wrap: wrap; gap: var(--gap); }
.big-val { font-size: 34px; font-weight: 300; }
.big-val small, .mid-val small { font-size: 15px; font-weight: 400; }
.mid-val { font-size: 22px; }
.mid-val small { font-size: 13px; }
.lbl { font-size: 13px; color: var(--text-2); }
.sub { font-size: 15px; margin-top: -8px; }
.txt { font-size: 15px; line-height: 1.45; text-wrap: pretty; }
.txt.foot { margin-top: auto; }
.txt-sm { font-size: 14px; }
.center { text-align: center; }

/* hodinová */
.hourly-card { padding: 16px 18px; gap: 0; }
.hourly-sum { font-size: 15px; line-height: 1.4; padding-bottom: 12px; border-bottom: 1px solid var(--glass-border); text-wrap: pretty; }
.hourly-wrap { position: relative; margin-top: 14px; }
.hourly {
  display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity; cursor: grab; user-select: none; min-height: 106px;
}
.hourly::-webkit-scrollbar { display: none; }
.hourly.drag { cursor: grabbing; scroll-snap-type: none; }
.hourly.mask-r { -webkit-mask-image: linear-gradient(90deg,#000 calc(100% - 40px),transparent 100%); mask-image: linear-gradient(90deg,#000 calc(100% - 40px),transparent 100%); }
.hourly.mask-l { -webkit-mask-image: linear-gradient(90deg,transparent 0,#000 40px); mask-image: linear-gradient(90deg,transparent 0,#000 40px); }
.hourly.mask-l.mask-r { -webkit-mask-image: linear-gradient(90deg,transparent 0,#000 40px,#000 calc(100% - 40px),transparent 100%); mask-image: linear-gradient(90deg,transparent 0,#000 40px,#000 calc(100% - 40px),transparent 100%); }
.hr { flex: 0 0 58px; scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 14px; }
.hr .ic { font-size: 26px; }
.hr-now { font-weight: 600; }
.hr-pop { font-size: 11px; color: var(--pop); height: 13px; }
.hr-t { font-size: 17px; font-weight: 500; }
.hr-day { flex: 0 0 auto; align-self: stretch; display: flex; align-items: center; padding: 0 4px; }
.hr-day span { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); border-left: 1px solid var(--line); padding-left: 4px; }
.hr-arrow {
  position: absolute; top: 50%; margin-top: -18px; width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.2); background: rgba(12,22,40,.7);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 2;
  transition: opacity .2s ease, background .2s ease; opacity: 0; pointer-events: none;
}
.hr-arrow:hover { background: rgba(12,22,40,.9); }
.hr-arrow.on { opacity: 1; pointer-events: auto; }
.hr-arrow.left { left: -6px; }
.hr-arrow.right { right: -6px; }
.hr-arrow .ic { font-size: 22px; }

/* dlaždice – šířky (desktop) */
.t-daily { flex: 1 1 340px; gap: 6px; }
.t-radar { flex: 2 1 540px; }
.t-chart { flex: 2 1 540px; gap: 14px; }
.t-precip { flex: 1 1 260px; gap: 10px; }
.t-wind { flex: 1 1 250px; }
.t-tile { flex: 1 1 250px; gap: 10px; }
.t-air { flex: 1 1 260px; }
.t-astro { flex: 2 1 520px; flex-direction: row; flex-wrap: wrap; gap: 24px; }
.t-month { flex: 1 1 100%; gap: 16px; }

/* 10 dní */
.daily { display: flex; flex-direction: column; }
.d-row { display: grid; grid-template-columns: 52px 28px 34px 32px minmax(0,1fr) 32px; align-items: center; gap: 8px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 16px; }
.d-day { display: flex; flex-direction: column; line-height: 1.15; }
.d-day b { font-weight: 500; }
.d-day small { font-size: 11px; color: var(--text-3); }
.d-row .ic { font-size: 24px; }
.d-pop { font-size: 12px; color: var(--pop); }
.d-lo { text-align: right; color: rgba(255,255,255,.75); }
.d-hi { font-weight: 500; }
.tbar { position: relative; height: 5px; border-radius: 3px; background: rgba(255,255,255,.14); }
.tbar i { position: absolute; top: 0; bottom: 0; border-radius: 3px; background: linear-gradient(90deg,#8fd3ff,#ffd66b 60%,#ff9b5c); }
.tbar b { position: absolute; top: 50%; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px rgba(0,0,0,.3); }

/* radar */
.radar-map {
  position: relative; flex: 1 1 auto; min-height: 340px;
  border-radius: 14px; overflow: hidden; border: 1px solid rgba(255,255,255,.12);
  background: #1a2940;
}
.radar-map .maplibregl-canvas { outline: none; }
.radar-label, .radar-legend { position: absolute; z-index: 3; border-radius: 999px; background: rgba(0,0,0,.4); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); pointer-events: none; }
.radar-label { left: 12px; top: 12px; padding: 5px 11px; font-size: 13px; }
.radar-legend { right: 12px; bottom: 12px; display: flex; align-items: center; gap: 8px; padding: 5px 10px; font-size: 11px; }
.radar-grad { width: 80px; height: 6px; border-radius: 3px; background: linear-gradient(90deg,#5fd0ff,#39d67a,#f7e04a,#ff8a3d,#e8405a,#b04ad8); }
.radar-ctl { display: flex; align-items: center; gap: 12px; }
.play { width: 40px; height: 40px; flex: none; border-radius: 50%; border: 0; background: #fff; color: #14202f; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.play .ic { font-size: 24px; }
.radar-ctl input[type=range] { flex: 1; min-width: 0; accent-color: #fff; }
.radar-rel { font-size: 13px; width: 64px; text-align: right; }
.radar-map .maplibregl-ctrl-attrib, .radar-map .maplibregl-ctrl-attrib.maplibregl-compact { font-size: 10px; background: rgba(12,22,40,.6); color: rgba(255,255,255,.75); }
.radar-map .maplibregl-ctrl-attrib a { color: rgba(255,255,255,.85); }
.radar-map .maplibregl-ctrl-attrib-button { filter: invert(1); background-color: transparent; }
.radar-map .maplibregl-compact-show .maplibregl-ctrl-attrib-button { filter: none; }
.radar-map .maplibregl-cooperative-gesture-screen { font-size: 15px; }
.radar-pin { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid #14202f; box-shadow: 0 0 0 2px #fff, 0 2px 10px rgba(0,0,0,.5); }
.radar-msg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 16px; font-size: 14px; color: var(--text-2); z-index: 2; }

/* graf */
.chart-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.seg { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: rgba(255,255,255,.1); }
.seg button { height: 30px; padding: 0 14px; border-radius: 999px; border: 0; background: transparent; color: #fff; font-size: 13px; font-weight: 500; cursor: pointer; transition: background var(--ease), color var(--ease); }
.seg button.on { background: #fff; color: #14202f; }
.chart-big { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.chart-big > span:first-child { font-size: 30px; font-weight: 300; }
.chart-note { font-size: 14px; color: rgba(255,255,255,.85); }
.chart { position: relative; height: 180px; }
.chart svg { display: block; width: 100%; height: 180px; overflow: visible; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 100%; padding: 0 1%; border-bottom: 1px solid rgba(255,255,255,.2); }
.bars i { flex: 1; min-height: 2px; border-radius: 3px 3px 0 0; background: var(--precip); }
.chart-ticks { position: relative; height: 16px; }
.chart-ticks span { position: absolute; transform: translateX(-50%); font-size: 12px; color: rgba(255,255,255,.8); white-space: nowrap; }

/* srážky */
.nowcast { margin-top: auto; display: flex; flex-direction: column; gap: 6px; }
.nowcast-bars { display: flex; align-items: flex-end; gap: 3px; height: 44px; border-bottom: 1px solid rgba(255,255,255,.2); }
.nowcast-bars i { flex: 1; min-height: 2px; border-radius: 2px 2px 0 0; background: var(--precip); transition: height .4s ease; }
.nowcast-axis { display: flex; justify-content: space-between; font-size: 11px; color: rgba(255,255,255,.8); }

/* vítr */
.wind-body { display: flex; align-items: center; gap: 16px; }
.wind-nums { flex: 1; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.wind-gust { border-top: 1px solid rgba(255,255,255,.16); padding-top: 10px; }
.compass { position: relative; width: 124px; height: 124px; flex: none; align-self: center; border-radius: 50%; border: 1px solid rgba(255,255,255,.28); font-size: 12px; font-weight: 600; }
.compass > span { position: absolute; }
.c-n { top: 6px; left: 50%; transform: translateX(-50%); }
.c-e { right: 8px; top: 50%; transform: translateY(-50%); }
.c-s { bottom: 6px; left: 50%; transform: translateX(-50%); }
.c-w { left: 8px; top: 50%; transform: translateY(-50%); }
.needle { position: absolute; inset: 0; transition: transform .8s ease; }
.needle i { position: absolute; left: 50%; }
.n-line { top: 30px; bottom: 24px; width: 2px; margin-left: -1px; background: #fff; border-radius: 1px; }
.n-head { top: 22px; margin-left: -6px; width: 0; height: 0; border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 11px solid #fff; }
.n-tail { bottom: 20px; margin-left: -4px; width: 8px; height: 8px; border-radius: 50%; border: 2px solid #fff; }
.needle.calm { opacity: .25; }

/* tlak */
.gauge { position: relative; width: min(140px,100%); aspect-ratio: 1; margin: 0 auto; }
.gauge svg { display: block; width: 100%; height: 100%; }
.gauge-in { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
.gauge-val { font-size: 26px; }
.gauge-unit { font-size: 12px; }

/* vlhkost, UV */
.bar { height: 6px; border-radius: 3px; background: rgba(255,255,255,.14); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--precip); border-radius: 3px; transition: width .6s ease; }
.uv-label { font-size: 18px; }
.uv-bar { position: relative; height: 6px; border-radius: 3px; background: linear-gradient(90deg,#5ed27a,#f1dd4b,#ff9b3d,#ee4d4d,#b35ad8); }
.uv-bar i { position: absolute; top: 50%; left: 0; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px rgba(0,0,0,.3); transition: left .6s ease; }

/* ovzduší */
.aq-label { font-size: 28px; }
.aq-sub { font-size: 13px; color: rgba(255,255,255,.82); }
.aq-segs { display: flex; gap: 3px; }
.aq-segs i { flex: 1; height: 6px; border-radius: 3px; }
.aq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
.aq-grid .v { font-size: 17px; }
.aq-grid .v small { font-size: 12px; }

/* slunce a měsíc */
.astro-sun { flex: 1 1 240px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.astro-moon { flex: 1 1 220px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.astro-div { width: 1px; align-self: stretch; background: var(--glass-border); }
.sun-svg { width: 100%; max-height: 130px; overflow: visible; }
.astro-row { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.astro-row .right { text-align: right; }
.astro-t { font-size: 20px; }
.astro-t.sm { font-size: 18px; }
.astro-len { text-align: center; align-self: flex-end; font-size: 13px; }
.moon-row { display: flex; align-items: center; gap: 18px; }
.moon { width: 80px; height: 80px; flex: none; filter: drop-shadow(0 0 20px rgba(233,236,242,.3)); }
.moon-txt { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.moon-phase { font-size: 18px; font-weight: 500; }
.moon-times { display: flex; gap: 24px; font-size: 14px; margin-top: auto; }

/* měsíční přehled */
.month-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.month-nav { display: flex; align-items: center; gap: 6px; }
.round { width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background var(--ease), opacity var(--ease); }
.round:hover { background: rgba(255,255,255,.22); }
.round:disabled { opacity: .35; cursor: default; }
.round .ic { font-size: 22px; }
.month-name { font-size: 17px; font-weight: 500; min-width: 130px; text-align: center; }
.month-stats { display: grid; grid-template-columns: repeat(auto-fit,minmax(150px,1fr)); gap: 12px; }
.mstat { display: flex; flex-direction: column; gap: 2px; }
.mstat-k { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); }
.mstat-v { font-size: 24px; font-weight: 300; }
.mstat-n { font-size: 13px; color: rgba(255,255,255,.8); }
.cal { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 6px; }
.cal-wd { font-size: 12px; color: rgba(255,255,255,.8); text-align: center; padding: 2px 0; }
.cell { min-height: 86px; border-radius: 12px; padding: 7px 8px; display: flex; flex-direction: column; gap: 2px; min-width: 0; border: 1px solid transparent; }
.cell-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 2px; }
.cell-n { font-size: 13px; font-weight: 600; }
.cell .ic { font-size: 18px; width: auto; }
.cell-hi { margin-top: auto; font-size: 15px; }
.cell-lo { font-size: 12px; color: rgba(255,255,255,.75); }
.cell.past { background: rgba(255,255,255,.07); }
.cell.today { background: rgba(255,255,255,.2); border: 1.5px solid #fff; }
.cell.fc { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.22); }
.cell.norm { border: 1px dashed rgba(255,255,255,.28); }
.cell.norm .cell-hi { color: rgba(255,255,255,.78); }
.cell.empty { background: transparent; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 12px; }
.cal-legend span { display: flex; align-items: center; gap: 6px; }
.lg { width: 12px; height: 12px; border-radius: 4px; }
.lg.past { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.2); }
.lg.today { background: rgba(255,255,255,.2); border: 1.5px solid #fff; }
.lg.fc { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.3); }
.lg.norm { border: 1px dashed rgba(255,255,255,.45); }

/* patička */
.foot-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; font-size: 13px; color: rgba(255,255,255,.82); padding: 4px; }
.foot-src { display: flex; flex-direction: column; gap: 4px; }
.foot-small { font-size: 12px; color: var(--text-3); }
.foot-small a { color: var(--text-2); }
.foot-right { display: flex; gap: 14px; align-items: flex-start; }
.link-btn { background: none; border: 0; padding: 8px 0; color: rgba(255,255,255,.82); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 13px; }

/* skeleton a chyby */
.skel { display: block; border-radius: 10px; background: rgba(255,255,255,.06); animation: pulse 1.6s ease-in-out infinite; }
.skel-temp { width: 2.2em; height: .84em; border-radius: 24px; }
.skel-line { height: 1em; margin: 6px 0; }
.skel-line.short { width: 60%; }
.skel-block { height: 100%; min-height: 60px; }
@keyframes pulse { 50% { opacity: .5; } }
.err { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; font-size: 15px; }
.err button { display: flex; align-items: center; gap: 6px; }

/* dialogy */
.dlg { border: 0; padding: 0; background: transparent; color: #fff; max-width: min(420px, calc(100vw - 24px)); width: 100%; }
.dlg::backdrop { background: rgba(5,10,20,.55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.dlg-in {
  position: relative; display: flex; flex-direction: column; gap: 14px; padding: 24px;
  border-radius: 22px; background: rgba(18,26,42,.96); border: 1px solid var(--glass-border); box-shadow: 0 20px 50px rgba(0,0,0,.45);
}
.dlg h2 { margin: 0; font-size: 22px; font-weight: 500; }
.dlg-p { margin: -6px 0 0; font-size: 14px; color: var(--text-2); line-height: 1.45; }
.dlg-x { position: absolute; right: 12px; top: 12px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(255,255,255,.1); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.dlg-tabs { align-self: flex-start; }
.fld { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-2); }
.fld input { height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.08); color: #fff; font: inherit; font-size: 15px; outline: none; }
.fld input:focus { border-color: rgba(255,255,255,.5); background: rgba(255,255,255,.12); }
.captcha { min-height: 78px; }
.dlg-err { font-size: 14px; color: #ffb4b6; min-height: 0; }
.dlg-err:empty { display: none; }
.dlg-note { margin: 0; font-size: 12px; color: var(--text-3); line-height: 1.4; }
.btn-primary { height: 46px; border-radius: 14px; border: 0; background: #fff; color: #14202f; font-weight: 600; font-size: 15px; cursor: pointer; padding: 0 18px; }
.btn-primary:disabled { opacity: .6; cursor: default; }
.btn-primary.danger { background: #e5484d; color: #fff; }

/* souhlas s cookies */
.consent {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 40;
  max-width: 560px; margin: 0 auto; padding: 14px 16px; border-radius: 18px;
  background: rgba(12,20,34,.92); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border); box-shadow: 0 12px 40px rgba(0,0,0,.35);
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; font-size: 14px; line-height: 1.4;
}
.consent p { margin: 0; flex: 1 1 260px; }
.consent-btns { display: flex; gap: 8px; }
.consent .btn-glass, .consent .btn-primary { height: 40px; }

/* ---------- interaktivní graf ---------- */
.seg-scroll { overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.seg-scroll::-webkit-scrollbar { display: none; }
.seg-scroll button { flex: none; }
.chart { touch-action: pan-y; cursor: crosshair; }
.chart-plot { position: absolute; inset: 0; }
.chart-y { position: absolute; inset: 0; pointer-events: none; }
.chart-y span { position: absolute; left: 0; transform: translateY(-100%); font-size: 11px; color: rgba(255,255,255,.7); padding-bottom: 2px; text-shadow: 0 1px 3px rgba(12,22,40,.9); }
.chart-hover { position: absolute; inset: 0; pointer-events: none; }
.ch-line { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(255,255,255,.55); }
.ch-dot { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px rgba(12,22,40,.5); }
.ch-dot.alt { background: #8fd3ff; width: 8px; height: 8px; margin: -4px 0 0 -4px; }
.ch-tip {
  position: absolute; top: -6px; transform: translate(-50%,-100%); white-space: nowrap;
  padding: 6px 10px; border-radius: 10px; background: rgba(12,20,34,.92); border: 1px solid rgba(255,255,255,.16);
  font-size: 12px; line-height: 1.35; box-shadow: 0 8px 24px rgba(0,0,0,.3); z-index: 3;
}
.ch-tip b { font-size: 14px; font-weight: 600; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--text-2); }
.chart-legend span { display: flex; align-items: center; gap: 6px; }
.chart-legend i { width: 16px; height: 0; border-top: 2px solid #fff; }
.chart-legend i.dash { border-top-style: dashed; border-color: #8fd3ff; }
.chart-legend i.bar { height: 8px; border: 0; border-radius: 2px; background: var(--precip); width: 10px; }

/* ---------- 10 dní: rozbalení ---------- */
.d-row { cursor: pointer; border-radius: 0; transition: background var(--ease); }
.d-row:hover { background: rgba(255,255,255,.05); }
.d-more { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px 14px; padding: 4px 0 12px 60px; font-size: 13px; }
.d-more .lbl { font-size: 11px; }
.d-more div > div:last-child { font-size: 14px; }

/* ---------- společné: klíč–hodnota ---------- */
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
.kv-3 { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.kv .v { font-size: 18px; }
.kv .v small { font-size: 12px; color: var(--text-2); }
.dim { color: var(--text-3); }
.txt-sm.foot, .foot { margin-top: auto; }

/* slunce a měsíc – doplňky */
.astro-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px 12px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14px; }
.astro-grid .v { font-size: 16px; }
.astro-grid div:nth-child(3n) { text-align: right; }
.astro-grid div:nth-child(3n+2) { text-align: center; }
.moon-times { flex-wrap: wrap; gap: 10px 24px; }
.moon-phases { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.mph { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; text-align: center; }
.mph svg { width: 28px; height: 28px; }
.mph b { font-weight: 500; font-size: 13px; }

/* oblačnost */
.t-cloud { flex: 1 1 260px; }
.layers { display: flex; flex-direction: column; gap: 6px; }
.layer { display: grid; grid-template-columns: 62px 1fr 40px; align-items: center; gap: 8px; font-size: 13px; }
.layer .bar i { background: rgba(255,255,255,.75); }
.layer span:last-child { text-align: right; }

/* pyl */
.t-pollen { flex: 1 1 260px; }
.pollen { display: flex; flex-direction: column; gap: 8px; }
.pl { display: grid; grid-template-columns: 70px 1fr auto; align-items: center; gap: 10px; font-size: 14px; }
.pl-bar { display: flex; gap: 3px; }
.pl-bar i { flex: 1; height: 6px; border-radius: 3px; background: rgba(255,255,255,.14); }
.pl-lv { font-size: 12px; color: var(--text-2); min-width: 64px; text-align: right; }
.pl-days { display: flex; gap: 4px; }
.pl-days i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.14); }

/* měření ČHMÚ */
.t-station { flex: 1 1 340px; }
.soil { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 6px; margin-top: 6px; }
.soil div { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border-radius: 10px; background: rgba(255,255,255,.07); font-size: 15px; }
.soil small { font-size: 11px; color: var(--text-3); }

/* vodní tok */
.t-hydro { flex: 2 1 540px; }
.hydro-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.hydro-name { font-size: 20px; font-weight: 500; }
.badge { flex: none; padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: rgba(255,255,255,.14); }
.spark { position: relative; height: 110px; margin-bottom: 18px; }
#stationSpark { height: 80px; }
.spark svg { display: block; width: 100%; height: 100%; overflow: visible; }
.spark-lbl { position: absolute; font-size: 11px; color: var(--text-3); }

/* ---------- tablet 640–1023 px ---------- */
@media (max-width: 1023px) {
  .hero { gap: 24px 32px; padding: 40px 0 20px; }
  .hero-l { flex: 1 1 300px; }
  .hero-r { flex: 1 1 280px; }
  .hero-temp { font-size: clamp(140px,22vw,190px); }
  .t-radar { flex: 1 1 380px; }
  .t-precip { flex: 1 1 240px; }
  .t-wind, .t-tile { flex: 1 1 300px; }
  /* 10 dní a radar vedle sebe, radar dorovná výšku seznamu */
  .t-radar { flex: 1 1 340px; }
  .t-air { flex: 1 1 300px; }
  .t-hydro { flex: 1 1 340px; }
  .cell { min-height: 72px; }
}

/* ---------- telefon < 640 px ---------- */
@media (max-width: 639px) {
  :root { --gap: 12px; --card-pad: 16px; }
  .search { flex: 1 1 100%; max-width: none; order: 3; }
  #geoBtn { margin-left: auto; }
  .btn-glass { padding: 0 12px; }
  .wide-only { display: none; }
  .hero { gap: 22px; padding: 20px 0 8px; }
  .hero-l, .hero-r { flex: 1 1 100%; max-width: none; }
  .hero-r { gap: 14px; }
  .hero-temp { font-size: clamp(112px,34vw,150px); }
  .hr { flex-basis: 52px; }
  .chart-ticks .tick-odd { display: none; }
  .t-cloud, .t-pollen, .t-station, .t-hydro { flex: 1 1 100%; }
  .d-more { padding-left: 0; grid-template-columns: 1fr 1fr; }
  .astro-grid { grid-template-columns: 1fr 1fr; font-size: 13px; }
  .astro-grid div:nth-child(n) { text-align: left; }
  .moon-phases { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .moon-times { gap: 10px 20px; }
  /* záložky grafu přes celou šířku, aby nic neuteklo mimo obrazovku */
  .chart-head { flex-direction: column; align-items: stretch; }
  .chart-head .seg { width: 100%; }
  .chart-head .seg button { flex: 1 1 auto; padding: 0 6px; font-size: 12.5px; }
  .hydro-head { flex-direction: column; gap: 8px; }
  .dlg-in { padding: 20px 16px; }
  .captcha { transform-origin: left top; }
  .top { gap: 10px; }
  .hr-arrow { display: none; }
  .t-daily, .t-radar, .t-chart, .t-precip, .t-air, .t-astro { flex: 1 1 100%; }
  .t-wind, .t-tile { flex: 1 1 140px; }
  .radar-map { flex: none; min-height: 0; aspect-ratio: 1 / 1; }
  .wind-body { flex-direction: column; align-items: stretch; }
  .compass { width: 104px; height: 104px; }
  .n-line { top: 26px; bottom: 20px; }
  .n-head { top: 18px; }
  .n-tail { bottom: 16px; }
  .astro-div { display: none; }
  .cal { gap: 4px; }
  .cell { min-height: 56px; border-radius: 9px; padding: 5px; }
  .cell-hi { font-size: 13px; }
  .cell .ic { font-size: 15px; }
  .month-name { min-width: 110px; }
}

/* ---------- dotyková zařízení (telefony, tablety) ---------- */
button, a, [role="button"], .s-item, .fav, .d-row { -webkit-tap-highlight-color: transparent; }
button:active, .fav:active, [role="button"]:active { transform: scale(.97); }
.radar-ctl input[type=range] {
  -webkit-appearance: none; appearance: none; height: 28px; background: transparent; cursor: pointer;
}
.radar-ctl input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: rgba(255,255,255,.25); }
.radar-ctl input[type=range]::-moz-range-track { height: 6px; border-radius: 3px; background: rgba(255,255,255,.25); }
.radar-ctl input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -7px; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.radar-ctl input[type=range]::-moz-range-thumb { width: 20px; height: 20px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.radar-ctl input[type=range]:focus-visible { outline: 2px solid rgba(255,255,255,.6); outline-offset: 2px; border-radius: 6px; }

@media (pointer: coarse) {
  /* iOS jinak při klepnutí do políčka s písmem < 16 px přiblíží celou stránku */
  .search-box input, .fld input { font-size: 16px; }
  /* dotykové plochy alespoň ~40 px */
  .fav-btn { width: 40px; height: 40px; }
  .fav { height: 38px; }
  .seg button { height: 36px; }
  .round { width: 42px; height: 42px; }
  .play { width: 44px; height: 44px; }
  .radar-ctl input[type=range] { height: 40px; }
  .radar-ctl input[type=range]::-webkit-slider-thumb { width: 26px; height: 26px; margin-top: -10px; }
  .radar-ctl input[type=range]::-moz-range-thumb { width: 26px; height: 26px; }
  .d-row { padding: 11px 0; }
  .chart { cursor: default; }
  /* hover na dotyku „přilne“ – vypneme ho */
  .d-row:hover { background: transparent; }
  .round:hover { background: rgba(255,255,255,.12); }
  .fav-btn:hover { background: rgba(255,255,255,.12); }
  .btn-glass:hover { background: rgba(255,255,255,.14); }
  .fav:hover { background: rgba(255,255,255,.12); }
  .fav.on, .fav.on:hover { background: rgba(255,255,255,.3); }
}

/* méně náročné sklo na telefonech a tabletech (rozmazání se přepočítává s každým snímkem animace) */
@media (max-width: 1023px), (pointer: coarse) {
  .card, .warn { backdrop-filter: blur(16px) saturate(130%); -webkit-backdrop-filter: blur(16px) saturate(130%); background: rgba(12,22,40,.32); }
}

@media (max-width: 359px) {
  .captcha { transform: scale(.86); height: 68px; min-height: 0; }
  .hero-cond { font-size: 18px; }
  .chart-head .seg button { padding: 0 3px; font-size: 12px; }
  .cell { padding: 4px 3px; }
  .cell .ic { display: none; }
  .cell-hi { font-size: 12px; }
  .cell-lo { font-size: 11px; }
  .soil div { font-size: 13px; }
}

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