:root {
  --bg: #eef2f7;
  --card: #ffffff;
  --text: #1c2433;
  --muted: #6b7686;
  --line: #e3e8ef;
  --line-strong: #cfd7e2;
  --head1: #16233f;
  --head2: #24406e;
  --accent: #2f7bd9;
  --accent-soft: #e6f0fc;
  --night: rgba(40, 60, 110, 0.06);
  --rain: #3b82f6;
  --snow: #7aa7d8;
  --weekend: #c0392b;
  --cloud-fill: #e9edf3;
  --cloud-stroke: #9aa6b6;
  --cloud-dark: #b7c0cc;
  --shadow: 0 1px 2px rgba(20, 35, 60, 0.06), 0 4px 14px rgba(20, 35, 60, 0.06);
  --colw: 54px;
  --lblw: 84px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1522; --card: #182133; --text: #e5eaf2; --muted: #98a3b5; --line: #263149; --line-strong: #33405c;
    --head1: #0a1020; --head2: #172a4d; --accent: #5aa0f2; --accent-soft: #1c2d4a; --night: rgba(0, 0, 0, 0.18);
    --cloud-fill: #cfd6e0; --cloud-stroke: #8d99aa; --cloud-dark: #9aa5b4; --weekend: #ff7b6b;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1522; --card: #182133; --text: #e5eaf2; --muted: #98a3b5; --line: #263149; --line-strong: #33405c;
  --head1: #0a1020; --head2: #172a4d; --accent: #5aa0f2; --accent-soft: #1c2d4a; --night: rgba(0, 0, 0, 0.18);
  --cloud-fill: #cfd6e0; --cloud-stroke: #8d99aa; --cloud-dark: #9aa5b4; --weekend: #ff7b6b; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--accent); }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.card { background: var(--card); border-radius: 12px; box-shadow: var(--shadow); }
.loading { padding: 28px; color: var(--muted); }
.err { padding: 16px; color: #b3261e; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h2 { font-size: 18px; }

/* ---------- hlavička ---------- */
.top { background: linear-gradient(135deg, var(--head1), var(--head2)); color: #fff; padding-bottom: 10px; }
.top-in { display: flex; align-items: center; gap: 18px; padding-top: 12px; padding-bottom: 6px; }
.logo { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-weight: 700; font-size: 20px; letter-spacing: .2px; flex: none; }
.logo-txt { display: flex; flex-direction: column; line-height: 1.05; }
.logo-txt small { font-size: 11px; font-weight: 500; opacity: .75; letter-spacing: .3px; }
.search-form { display: flex; flex: 1; min-width: 0; margin: 0; }
.lang {
  flex: none; color: #fff; text-decoration: none; font-size: 13px; font-weight: 600; border: 1px solid rgba(255,255,255,.35);
  border-radius: 8px; padding: 0 12px; height: 40px; display: inline-flex; align-items: center; gap: 6px; margin-left: auto;
}
.lang:hover { background: rgba(255,255,255,.12); }
.lang::before { content: ""; width: 16px; height: 16px; background: currentColor; opacity: .85;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27%3E%3Cpath d=%27M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm6.9 6h-2.9a15.7 15.7 0 0 0-1.4-3.6A8 8 0 0 1 18.9 8ZM12 4c.8 1.2 1.5 2.5 1.9 4h-3.8c.4-1.5 1.1-2.8 1.9-4ZM4.3 14a8 8 0 0 1 0-4h3.4a16.5 16.5 0 0 0 0 4H4.3Zm.8 2h2.9c.3 1.3.8 2.5 1.4 3.6A8 8 0 0 1 5.1 16ZM8 8H5.1a8 8 0 0 1 4.3-3.6C8.8 5.5 8.3 6.7 8 8Zm4 12c-.8-1.2-1.5-2.5-1.9-4h3.8c-.4 1.5-1.1 2.8-1.9 4Zm2.3-6H9.7a14.7 14.7 0 0 1 0-4h4.6a14.7 14.7 0 0 1 0 4Zm.3 5.6c.6-1.1 1.1-2.3 1.4-3.6h2.9a8 8 0 0 1-4.3 3.6Zm1.7-5.6a16.5 16.5 0 0 0 0-4h3.4a8 8 0 0 1 0 4h-3.4Z%27/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27%3E%3Cpath d=%27M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm6.9 6h-2.9a15.7 15.7 0 0 0-1.4-3.6A8 8 0 0 1 18.9 8ZM12 4c.8 1.2 1.5 2.5 1.9 4h-3.8c.4-1.5 1.1-2.8 1.9-4ZM4.3 14a8 8 0 0 1 0-4h3.4a16.5 16.5 0 0 0 0 4H4.3Zm.8 2h2.9c.3 1.3.8 2.5 1.4 3.6A8 8 0 0 1 5.1 16ZM8 8H5.1a8 8 0 0 1 4.3-3.6C8.8 5.5 8.3 6.7 8 8Zm4 12c-.8-1.2-1.5-2.5-1.9-4h3.8c-.4 1.5-1.1 2.8-1.9 4Zm2.3-6H9.7a14.7 14.7 0 0 1 0-4h4.6a14.7 14.7 0 0 1 0 4Zm.3 5.6c.6-1.1 1.1-2.3 1.4-3.6h2.9a8 8 0 0 1-4.3 3.6Zm1.7-5.6a16.5 16.5 0 0 0 0-4h3.4a8 8 0 0 1 0 4h-3.4Z%27/%3E%3C/svg%3E") center / contain no-repeat; }
.home-lead { margin: 0 0 2px; font-size: 13px; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: .4px; }

/* ---------- souhrn, o modelech, odkazy na města ---------- */
.summary, .about-models, .seo-links { padding: 16px 18px; margin-bottom: 18px; }
.summary:empty { display: none; }
.summary h2, .about-models h2, .seo-links h2 { margin-bottom: 8px; }
.summary p, .about-models p { margin: 6px 0; }
.sum-list { margin: 6px 0; padding-left: 18px; }
.sum-list li { margin: 4px 0; }
.sum-alert { color: #a3301a; font-weight: 600; }
.about-models ul { margin: 6px 0; padding-left: 18px; }
.about-models li { margin: 3px 0; }
.seo-group h3 { font-size: 14px; margin: 12px 0 4px; color: var(--muted); }
.seo-links p { margin: 4px 0; line-height: 1.9; }
.seo-links a { white-space: nowrap; margin-right: 8px; }
.seo-links small { color: var(--muted); }
.search { position: relative; flex: 1; min-width: 0; max-width: 560px; display: flex; }
.search input {
  flex: 1; min-width: 0; height: 40px; border: 0; border-radius: 8px 0 0 8px; padding: 0 14px;
  font-size: 15px; background: #fff; color: #1c2433; outline: none;
}
.search input:focus { box-shadow: inset 0 0 0 2px var(--accent); }
.geo { width: 44px; border: 0; border-radius: 0 8px 8px 0; background: #e8eef7; color: #24406e; cursor: pointer; }
.geo:hover { background: #d8e3f3; }
.suggest {
  position: absolute; top: 44px; left: 0; right: 0; z-index: 20; margin: 0; padding: 4px 0; list-style: none;
  background: var(--card); color: var(--text); border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.2); max-height: 60vh; overflow: auto;
}
.suggest li { padding: 8px 14px; cursor: pointer; }
.suggest li small { color: var(--muted); display: block; }
.suggest li[aria-selected="true"], .suggest li:hover { background: var(--accent-soft); }
.recent { display: flex; gap: 6px; flex-wrap: wrap; min-height: 4px; }
.chip {
  border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: #fff; border-radius: 999px;
  font-size: 13px; display: inline-flex; align-items: center; overflow: hidden;
}
.chip:hover { background: rgba(255,255,255,.16); }
.chip-go { color: inherit; text-decoration: none; padding: 4px 4px 4px 11px; font-weight: 600; white-space: nowrap; }
.chip.fav .chip-go { padding-right: 11px; }
.chip-x { border: 0; background: transparent; color: rgba(255,255,255,.6); font-size: 15px; line-height: 1; padding: 4px 9px 4px 5px; cursor: pointer; }
.chip-x:hover { color: #fff; }
.chip.cur { background: #fff; border-color: #fff; }
.chip.cur .chip-go { color: var(--head1); cursor: default; }
.chip.cur .chip-x { color: #8090a8; }

/* ---------- místo + aktuálně ---------- */
.place { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin: 18px 0 10px; }
.place h1 { font-size: 26px; }
.fav { border: 1px solid var(--line-strong); background: var(--card); color: #e0a800; font-size: 20px; border-radius: 8px; width: 40px; height: 40px; cursor: pointer; }
.fav[aria-pressed="true"] { background: #fff6d6; }

.now { display: grid; grid-template-columns: minmax(260px, 1fr) 1.4fr; gap: 0; overflow: hidden; }
.now-main { display: flex; align-items: center; gap: 16px; padding: 18px 20px; }
.now-main .ico { width: 92px; height: 92px; flex: none; }
.now-temp { font-size: 52px; font-weight: 300; line-height: 1; }
.now-desc { font-size: 17px; margin-top: 4px; }
.now-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px 18px; padding: 18px 20px; border-left: 1px solid var(--line); align-content: center; }
.now-meta div span { display: block; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.now-meta div b { font-weight: 600; font-size: 16px; }
.now-chmu { grid-column: 1 / -1; border-top: 1px solid var(--line); padding: 12px 20px; font-size: 14px; background: var(--accent-soft); }
.now-chmu b { color: var(--accent); }

/* ---------- záložky ---------- */
.tabs { display: flex; gap: 4px; margin: 20px 0 0; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  border: 0; background: transparent; padding: 11px 16px; font-size: 15px; font-weight: 600; color: var(--muted);
  border-radius: 10px 10px 0 0; cursor: pointer; white-space: nowrap;
}
.tabs button[aria-selected="true"] { background: var(--card); color: var(--text); box-shadow: 0 -2px 0 var(--accent) inset; }
.panel { border-top-left-radius: 0; padding: 16px 0 10px; margin-bottom: 24px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 0 16px 12px; flex-wrap: wrap; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; background: transparent; padding: 6px 12px; font-size: 13px; cursor: pointer; color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.note { color: var(--muted); font-size: 12.5px; padding: 8px 16px 0; margin: 0; }

/* ---------- hodinová tabulka ---------- */
.hscroll { overflow-x: auto; position: relative; scrollbar-width: thin; }
.hgrid { display: grid; grid-auto-rows: auto; position: relative; width: max-content; }
.hrow { display: contents; }
.lbl {
  position: sticky; left: 0; z-index: 3; background: var(--card); font-size: 11.5px; color: var(--muted);
  padding: 0 8px 0 16px; display: flex; align-items: center; border-right: 1px solid var(--line); line-height: 1.15;
}
.c { text-align: center; font-size: 13px; padding: 3px 0; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; }
.c.night { background: var(--night); }
.c.dstart { box-shadow: inset 1px 0 0 var(--line-strong); }
.c.filled { opacity: .78; }
.c.now-col { background: var(--accent-soft); }
.dayhdr {
  font-size: 13px; font-weight: 600; padding: 6px 10px; border-bottom: 1px solid var(--line); text-align: left;
  box-shadow: inset 1px 0 0 var(--line-strong); white-space: nowrap;
}
.dayhdr .dl { position: sticky; left: calc(var(--lblw) + 8px); }
.dayhdr .we { color: var(--weekend); }
.hh { font-size: 14px; font-weight: 600; padding-top: 6px; }
.hh sup { font-size: 9px; font-weight: 500; color: var(--muted); margin-left: 1px; }
.c .ico { width: 36px; height: 36px; }
.tchart { grid-column: 2 / -1; height: 120px; position: relative; }
.tchart svg { display: block; }
.feels { color: var(--muted); font-size: 12px; }
.pbar { width: 22px; background: var(--rain); border-radius: 3px 3px 0 0; opacity: .85; }
.pbar.snow { background: var(--snow); }
.pcell { justify-content: flex-end; height: 50px; gap: 2px; }
.pval { font-size: 11.5px; color: var(--rain); min-height: 14px; }
.pval.zero { color: var(--muted); opacity: .5; }
.wind { border-radius: 6px; padding: 2px 4px; min-width: 40px; font-weight: 600; }
.warrow { width: 14px; height: 14px; display: block; margin: 0 auto 1px; }
.gust { font-size: 11px; color: var(--muted); }
.small { font-size: 12px; color: var(--muted); }

/* ---------- 10 dní ---------- */
.days { display: grid; grid-template-columns: repeat(10, minmax(96px, 1fr)); overflow-x: auto; padding: 0 8px; }
.day {
  text-align: center; padding: 10px 6px 12px; border-left: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.day:first-child { border-left: 0; }
.day .dn { font-weight: 700; }
.day .dn.we { color: var(--weekend); }
.day .dd { font-size: 12px; color: var(--muted); }
.day .ico { width: 48px; height: 48px; }
.day .desc { font-size: 12px; color: var(--muted); min-height: 32px; line-height: 1.2; }
.range { position: relative; width: 8px; height: 90px; margin: 4px 0; }
.range i { position: absolute; left: 0; right: 0; border-radius: 4px; background: linear-gradient(to top, #6aa6ee, #f5a04a); }
.tmax { font-size: 18px; font-weight: 700; }
.tmin { font-size: 14px; color: var(--muted); }
.day .rr { font-size: 12px; color: var(--rain); }
.day .ww { font-size: 12px; color: var(--muted); }
.srcbadge { font-size: 10px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 4px; padding: 0 4px; }

/* ---------- měsíc ---------- */
.month-chart { padding: 0 16px 10px; overflow-x: auto; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; padding: 0 16px; }
.cal .wd { text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; padding: 4px 0; }
.cal .wd.we { color: var(--weekend); }
.cell {
  border: 1px solid var(--line); border-radius: 10px; padding: 6px 6px 8px; min-height: 112px; display: flex; flex-direction: column;
  align-items: center; gap: 1px; position: relative; background: var(--card);
}
.cell.empty { background: transparent; border-style: dashed; opacity: .45; }
.cell.today { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.cell .dnum { align-self: stretch; display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; }
.cell .dnum small { font-weight: 500; color: var(--muted); }
.cell.we .dnum span { color: var(--weekend); }
.cell .ico { width: 40px; height: 40px; }
.cell .t { font-size: 15px; }
.cell .t b { font-weight: 700; }
.cell .t span { color: var(--muted); font-size: 13px; }
.cell .r { font-size: 11.5px; color: var(--rain); }
.cell .sp { font-size: 10.5px; color: var(--muted); }
.cell.src-om { background: linear-gradient(var(--card), var(--card)) padding-box; }
.cell.src-ens { background: repeating-linear-gradient(135deg, transparent 0 6px, var(--night) 6px 7px), var(--card); }
.cell.src-ens .ico { opacity: .75; }
.cell::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: 3px; height: 3px; border-radius: 2px; }
.cell.src-yr::after { background: var(--accent); }
.cell.src-om::after { background: #8e6ad8; }
.cell.src-ens::after { background: #b9c2cf; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 12px 16px 0; font-size: 12.5px; color: var(--muted); }
.lg { display: inline-block; width: 18px; height: 4px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }
.lg-yr { background: var(--accent); } .lg-om { background: #8e6ad8; } .lg-ens { background: #b9c2cf; }

/* ---------- ČHMÚ ---------- */
#chmu { padding: 0 16px; }
.chmu-h { margin: 4px 0 10px; }
.chmu-h small { color: var(--muted); font-weight: 400; font-size: 13px; }
.chmu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; margin-bottom: 18px; }
.tx { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.tx h3 { font-size: 16px; margin-bottom: 2px; }
.tx .meta { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.tx .intro { font-weight: 600; margin: 0 0 6px; }
.tx p { margin: 0 0 6px; font-size: 14px; }
.tx p b { color: var(--muted); font-weight: 600; }
.tx.situ { background: var(--accent-soft); border-color: transparent; }

/* ---------- srážkový graf a shoda modelů ---------- */
.pchart { height: auto; }
.agree { font-size: 11.5px; font-weight: 600; border-radius: 6px; padding: 2px 0; width: calc(100% - 6px); cursor: help; }
.ag-3 { background: rgba(46, 157, 87, .18); color: #1f7a42; }
.ag-2 { background: rgba(217, 164, 0, .2); color: #8a6a00; }
.ag-1 { background: rgba(208, 69, 43, .18); color: #a3301a; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ag-3 { color: #7fd8a0; }
  :root:not([data-theme="light"]) .ag-2 { color: #f1cf62; }
  :root:not([data-theme="light"]) .ag-1 { color: #ff9a85; }
}
.mlegend { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 10px 16px 0; font-size: 12px; color: var(--muted); align-items: center; }
.mlegend:empty { display: none; }
.mlegend i { display: inline-block; width: 12px; height: 4px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }
.mlegend .agree { display: inline-block; width: auto; padding: 1px 6px; margin-right: 4px; }
.mbars { display: block; margin: 2px auto 0; }
.day .agree { width: auto; padding: 1px 6px; font-size: 11px; }
.day .mlabel { font-size: 10.5px; color: var(--muted); }

/* ---------- vysvětlivky ---------- */
.about { padding: 8px 16px 0; }
.about summary { cursor: pointer; font-size: 12.5px; color: var(--accent); padding: 4px 0; }
.about .note { padding: 4px 0 0; }
@media (max-width: 760px) { .about { padding: 6px 12px 0; } .about .note { padding: 4px 0 0; } }

/* ---------- výstrahy ČHMÚ ---------- */
.alerts { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.alerts:empty { display: none; }
.alert { --al: #f2c200; --al-bg: #fff8d9; --al-fg: #5c4700; border-radius: 10px; background: var(--al-bg); color: var(--al-fg); border-left: 6px solid var(--al); box-shadow: var(--shadow); }
.alert.lvl-3 { --al: #f08a00; --al-bg: #ffecd6; --al-fg: #6a3400; }
.alert.lvl-4 { --al: #d62828; --al-bg: #fde2e2; --al-fg: #6b0f0f; }
.alert.sucho { --al: #b08a5a; --al-bg: #f5ede3; --al-fg: #5a4127; box-shadow: none; }
.alert summary { cursor: pointer; padding: 10px 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; list-style: none; }
.alert summary::-webkit-details-marker { display: none; }
.alert summary { position: relative; padding-right: 34px !important; }
.alert summary::after { content: "▾"; position: absolute; right: 12px; top: 10px; opacity: .6; }
.alert[open] summary::after { content: "▴"; }
.al-badge { background: var(--al); color: #fff; font-size: 12px; font-weight: 700; border-radius: 4px; padding: 1px 7px; text-transform: uppercase; letter-spacing: .3px; }
.alert.lvl-2 .al-badge { color: #3d2f00; }
.al-time { font-size: 13px; opacity: .85; }
.al-body { padding: 0 14px 12px 14px; font-size: 14px; }
.al-body p { margin: 0 0 6px; white-space: pre-line; }
.al-body .small { color: inherit; opacity: .8; }
.al-body a { color: inherit; }
.alerts-ok { font-size: 13px; color: var(--muted); padding: 2px 2px 0; }
.alerts-ok::before { content: "✓ "; color: #2e9d57; font-weight: 700; }
.c.al-2 { box-shadow: inset 0 -4px 0 #f2c200; }
.c.al-3 { box-shadow: inset 0 -4px 0 #f08a00; }
.c.al-4 { box-shadow: inset 0 -4px 0 #d62828; }
.alrow { height: 12px; padding: 0; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .alert { --al-bg: #3a3112; --al-fg: #fbe9a6; }
  :root:not([data-theme="light"]) .alert.lvl-3 { --al-bg: #40280c; --al-fg: #ffd2a1; }
  :root:not([data-theme="light"]) .alert.lvl-4 { --al-bg: #451414; --al-fg: #ffc2c2; }
  :root:not([data-theme="light"]) .alert.sucho { --al-bg: #33291d; --al-fg: #e8d4bb; }
}

.foot { color: var(--muted); font-size: 12.5px; padding-bottom: 30px; }

/* ---------- mobil ---------- */
/* ---------- 10 dní: obaly (na desktopu průhledné) ---------- */
.day > .d-date, .day > .d-ico, .day > .d-desc, .day > .d-temp, .day > .d-rain, .day > .d-models { display: contents; }

/* ---------- skok na den, nápověda posunu, vysvětlivky pro dotyk ---------- */
.daynav { display: flex; gap: 6px; flex-wrap: wrap; }
.daynav button {
  border: 1px solid var(--line-strong); background: var(--card); color: var(--text); border-radius: 999px;
  font-size: 13px; padding: 4px 11px; cursor: pointer; min-height: 32px;
}
.daynav button:hover { background: var(--accent-soft); }
.scrollhint { display: none; }
.hscroll-wrap { position: relative; }
.hscroll-wrap::after {
  content: ""; position: absolute; top: 0; right: 0; bottom: 8px; width: 18px; pointer-events: none;
  background: linear-gradient(to right, transparent, var(--card)); opacity: .9;
}
.tip {
  position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 50;
  width: min(420px, calc(100vw - 24px)); background: var(--card); color: var(--text); border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,.28); padding: 12px 40px 12px 14px; font-size: 13.5px; white-space: pre-line; line-height: 1.45;
}
.tip[hidden] { display: none; }
.tip button { position: absolute; top: 6px; right: 6px; border: 0; background: transparent; font-size: 20px; color: var(--muted); width: 32px; height: 32px; cursor: pointer; }
.tap { cursor: pointer; }
.short { display: none; }

/* ---------- mobil ---------- */
@media (max-width: 760px) {
  :root { --colw: 46px; --lblw: 56px; }
  body { font-size: 14.5px; }
  .wrap { padding: 0 12px; }
  .top { padding-bottom: 8px; padding-top: env(safe-area-inset-top); }
  .top-in { gap: 10px; padding-top: 10px; }
  .logo-txt { display: none; }
  .summary, .about-models, .seo-links { padding: 12px 14px; font-size: 14px; }
  .search input { font-size: 16px; height: 42px; } /* 16 px = iOS při psaní nezoomuje */
  .geo { width: 46px; }
  .lang { height: 42px; padding: 0 9px; gap: 4px; }
  .recent { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-top: 2px; }
  .recent::-webkit-scrollbar { display: none; }
  .chip { flex: none; padding: 5px 11px; }

  .place { margin: 12px 0 8px; }
  .place h1 { font-size: 21px; }
  .place .muted { font-size: 13px; }
  .fav { width: 38px; height: 38px; }

  .alert summary { padding: 9px 12px; gap: 3px 8px; }
  .al-time { flex-basis: 100%; font-size: 12.5px; }
  .al-body { padding: 0 12px 10px; font-size: 13.5px; }

  .now { grid-template-columns: 1fr; }
  .now-main { padding: 12px 14px 8px; gap: 12px; }
  .now-main .ico { width: 64px; height: 64px; }
  .now-temp { font-size: 42px; }
  .now-desc { font-size: 15px; }
  .now-meta { border-left: 0; border-top: 1px solid var(--line); grid-template-columns: repeat(3, 1fr); gap: 8px 10px; padding: 10px 14px; }
  .now-meta div span { font-size: 10.5px; letter-spacing: .2px; }
  .now-meta div b { font-size: 14px; }
  .now-meta .small { font-size: 11px; }
  .now-chmu { padding: 10px 14px; font-size: 13px; cursor: pointer; }
  .now-chmu .chmu-txt { display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .now-chmu.open .chmu-txt { display: block; }

  .tabs { position: sticky; top: 0; z-index: 15; background: var(--bg); margin: 14px -12px 0; padding: 6px 12px 0; gap: 2px; }
  .tabs button { padding: 10px 12px; font-size: 14px; flex: 1 0 auto; }
  .long { display: none; }
  .short { display: inline; }
  .panel { border-radius: 0 0 12px 12px; padding-top: 12px; }
  .panel-head { padding: 0 12px 10px; }
  .panel-head h2 { font-size: 16px; flex-basis: 100%; }
  .seg button { padding: 7px 12px; font-size: 13px; }
  .scrollhint { display: block; font-size: 11.5px; color: var(--muted); padding: 0 12px 6px; }

  .lbl { padding: 2px 4px 2px 8px; font-size: 10px; line-height: 1.1; }
  .c { padding: 4px 0; font-size: 12.5px; }
  .hh { font-size: 13px; }
  .c .ico { width: 32px; height: 32px; }
  .dayhdr { font-size: 12.5px; padding: 6px 8px; }
  .agree { font-size: 11px; }

  /* 10 dní jako svislý seznam */
  .days { grid-template-columns: 1fr; overflow: visible; padding: 0 12px; }
  .day {
    display: grid; grid-template-columns: 50px 46px 1fr auto; grid-template-areas: "date ico desc temp" "date ico rain temp" "models models models models";
    align-items: center; text-align: left; gap: 0 8px; padding: 10px 0; border-left: 0; border-top: 1px solid var(--line);
  }
  .day:first-child { border-top: 0; }
  .day > .d-date, .day > .d-ico, .day > .d-desc, .day > .d-temp, .day > .d-rain, .day > .d-models { display: block; }
  .d-date { grid-area: date; }
  .d-ico { grid-area: ico; }
  .d-desc { grid-area: desc; }
  .d-rain { grid-area: rain; }
  .d-temp { grid-area: temp; text-align: right; }
  .d-models { grid-area: models; display: flex !important; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
  .day .ico { width: 44px; height: 44px; }
  .day .desc { min-height: 0; font-size: 13px; color: var(--text); }
  .day .rr, .day .ww { display: inline; font-size: 12px; }
  .day .ww::before { content: " · "; color: var(--muted); }
  .day .range { display: none; }
  .tmax { font-size: 19px; }
  .tmin { font-size: 14px; }
  .day .mbars { margin: 0; }
  .day .srcbadge { display: none; }

  .month-chart { padding: 0 12px 8px; }
  .cal { gap: 3px; padding: 0 6px; }
  .cal .wd { font-size: 11px; }
  .cell { min-height: 84px; padding: 4px 1px 8px; border-radius: 8px; }
  .cell .dnum { font-size: 12px; padding: 0 2px; }
  .cell .ico { width: 28px; height: 28px; }
  .cell .t { font-size: 12.5px; line-height: 1.2; text-align: center; }
  .cell .t span { font-size: 11px; display: block; }
  .cell .r { font-size: 10.5px; }
  .cell .sp, .cell .dnum small { display: none; }
  .legend, .mlegend { padding-left: 12px; padding-right: 12px; }
  .mlegend span[style*="margin-left:auto"] { margin-left: 0 !important; }
  .note { padding: 8px 12px 0; }

  #chmu { padding: 0 12px; }
  .chmu-grid { grid-template-columns: 1fr; }
  .tx { padding: 10px 12px; }
}
@media (max-width: 360px) {
  :root { --colw: 44px; --lblw: 50px; }
  .now-meta { grid-template-columns: repeat(2, 1fr); }
  .tabs button { padding: 9px 9px; font-size: 13.5px; }
  .day { grid-template-columns: 44px 40px 1fr auto; }
}
