:root { --glass: rgba(255,255,255,.14); --line: rgba(255,255,255,.3); --sa-l: env(safe-area-inset-left); --sa-r: env(safe-area-inset-right); --sa-t: env(safe-area-inset-top); --sa-b: env(safe-area-inset-bottom); }
html, body { margin: 0; height: 100%; background: #000; overflow: hidden; color: #fff;
  font-family: -apple-system, system-ui, "Segoe UI", sans-serif; -webkit-user-select: none; user-select: none;
  -webkit-tap-highlight-color: transparent; }
#c { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; touch-action: none; }
.glass { background: var(--glass); -webkit-backdrop-filter: blur(22px) saturate(1.5); backdrop-filter: blur(22px) saturate(1.5);
  border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 10px 40px rgba(0,0,0,.2); }
#lens { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 1; }

/* ================= hlavní obrazovka ================= */
#hud { position: fixed; inset: 0; z-index: 2; pointer-events: none; text-shadow: 0 1px 10px rgba(0,0,0,.35); }
#hud > * { pointer-events: auto; }
#now { position: absolute; left: calc(32px + var(--sa-l)); top: calc(24px + var(--sa-t)); pointer-events: none; transition: opacity .4s; }
#now.stale { opacity: .55; }
#now .place { font-size: 19px; font-weight: 500; letter-spacing: .3px; opacity: .92; }
#now .row { display: flex; align-items: center; gap: 6px; }
#now-temp { font-size: clamp(84px, 11vw, 132px); font-weight: 200; line-height: 1; letter-spacing: -3px; font-variant-numeric: tabular-nums; }
#now-icon { width: clamp(84px, 10vw, 120px); height: auto; filter: drop-shadow(0 2px 10px rgba(0,0,0,.25)); }
#now-cond { font-size: 22px; font-weight: 500; margin-top: 2px; }
#now-mm { font-size: 16px; opacity: .95; margin-top: 4px; }
#now-mm b { font-weight: 600; }
#now-sub { font-size: 15px; opacity: .88; margin-top: 4px; }
#now-sub .dim { opacity: .75; }
#gear { position: absolute; right: calc(16px + var(--sa-r)); top: calc(16px + var(--sa-t)); width: 48px; height: 48px; color: #fff;
  display: grid; place-items: center; padding: 0; cursor: pointer; }

#fcwrap { position: absolute; left: calc(20px + var(--sa-l)); right: calc(20px + var(--sa-r)); bottom: calc(18px + var(--sa-b)); }
#fc { display: grid; grid-template-columns: repeat(var(--n, 5), 1fr); padding: 10px 6px 12px; position: relative; touch-action: none;
  background: rgba(20,26,36,.22); }
#fc .day { all: unset; text-align: center; padding: 6px 4px; border-radius: 14px; cursor: pointer; position: relative; min-width: 0; }
#fc .day + .day::before { content: ''; position: absolute; left: 0; top: 14%; bottom: 14%; width: 1px; background: rgba(255,255,255,.18); }
#fc .day:active { background: rgba(255,255,255,.12); }
#fc .dn { font-size: 17px; font-weight: 600; }
#fc .dd { font-size: 12.5px; opacity: .75; margin-top: 1px; }
#fc img { width: 72px; height: 72px; display: block; margin: 2px auto 0; pointer-events: none; }
#fc .tt { font-size: 20px; font-variant-numeric: tabular-nums; }
#fc .tt b { font-weight: 600; }
#fc .tt span { opacity: .7; margin-left: 8px; }
#fc .tx { font-size: 13px; opacity: .9; margin-top: 3px; line-height: 1.2; min-height: 2.4em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#fc .pr { font-size: 12.5px; color: #9cc9ff; margin-top: 2px; }
#fc .grip { position: absolute; left: 50%; top: 5px; width: 38px; height: 4px; margin-left: -19px; border-radius: 2px; background: rgba(255,255,255,.4); }
#mg-btn { flex: none; margin-left: auto; height: 30px; padding: 0 12px; color: #fff; font-size: 13px; border-radius: 15px; cursor: pointer; }
#fc-err { position: absolute; left: 0; top: -34px; font-size: 13px; background: rgba(160,40,40,.5); padding: 5px 10px; border-radius: 10px; }
@media (max-width: 700px) { #fc img { width: 52px; height: 52px; } #fc .tt { font-size: 16px; } #fc .tt span { margin-left: 4px; } #fc .tx { display: none; } }

/* meteogram – list vyjíždějící zdola */
#sheet { position: fixed; left: calc(12px + var(--sa-l)); right: calc(12px + var(--sa-r)); bottom: calc(12px + var(--sa-b)); z-index: 6;
  padding: 6px 14px 12px; background: rgba(16,22,32,.55); transform: translateY(110%); transition: transform .35s cubic-bezier(.2,.8,.2,1); touch-action: none; }
#sheet.open { transform: none; }
.sh-head { display: flex; align-items: center; justify-content: space-between; height: 34px; position: relative; }
.sh-head b { font-size: 16px; font-weight: 600; }
.sh-head .grip { position: absolute; left: 50%; top: 2px; width: 38px; height: 4px; margin-left: -19px; border-radius: 2px; background: rgba(255,255,255,.4); }
#sheet-body { overflow-x: auto; }
svg.mg { width: 100%; height: auto; display: block; }
svg.mg text { fill: #fff; font-family: inherit; }
svg.mg .ax { font-size: 11px; fill-opacity: .7; }
svg.mg .dl { font-size: 13px; font-weight: 600; }
svg.mg .tv { font-size: 12px; font-weight: 600; fill: #ffd29c; }
svg.mg .tv.lo { fill: #b9d6ff; }
.legend { font-size: 12px; opacity: .8; margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.legend span { display: inline-block; width: 14px; height: 3px; border-radius: 2px; margin-right: -6px; }
.legend .lt { background: #ffb35c; } .legend .lf { background: rgba(160,200,255,.7); } .legend .lp { background: #5aa7ff; height: 8px; } .legend .lc { background: rgba(235,240,250,.7); height: 8px; }

/* modály */
.modal { position: fixed; inset: 0; z-index: 8; display: grid; place-items: center; background: rgba(0,0,0,0); transition: background .25s;
  padding: calc(16px + var(--sa-t)) 16px calc(16px + var(--sa-b)); }
.modal.open { background: rgba(0,0,0,.3); }
.modal .card { position: relative; width: min(920px, 100%); max-height: 100%; overflow: auto; padding: 18px 20px 16px; background: rgba(18,24,34,.6);
  opacity: 0; transform: scale(.96); transition: opacity .25s, transform .25s; }
.modal.open .card { opacity: 1; transform: none; }
.x { position: absolute; right: 12px; top: 12px; width: 34px; height: 34px; border-radius: 17px; border: 0; background: rgba(255,255,255,.15); color: #fff; font-size: 16px; cursor: pointer; z-index: 1; }
.sh-head .x { position: static; }
.modal h2 { margin: 2px 0 10px; font-size: 22px; font-weight: 600; }
.dh { display: flex; align-items: center; gap: 10px; padding-right: 40px; }
.dh .dt { flex: 1; text-align: center; }
.dh .big { font-size: 22px; font-weight: 600; }
.dh .sm { font-size: 15px; opacity: .85; }
.nav { width: 40px; height: 40px; border-radius: 20px; border: 1px solid var(--line); background: rgba(255,255,255,.12); color: #fff; font-size: 24px; line-height: 1; cursor: pointer; }
.nav:disabled { opacity: .25; }
.dsum { display: flex; align-items: center; gap: 18px; margin: 10px 0 4px; flex-wrap: wrap; }
.dsum img { width: 104px; height: 104px; }
.dtemps { font-size: 40px; font-weight: 300; font-variant-numeric: tabular-nums; }
.dtemps b { font-weight: 500; } .dtemps span { opacity: .65; margin-left: 12px; font-size: .8em; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(180px, 1fr)); gap: 6px 22px; font-size: 15px; flex: 1; }
.stats i { display: block; font-style: normal; font-size: 12px; opacity: .65; text-transform: uppercase; letter-spacing: .5px; }
.dchart { margin: 8px 0 2px; }
.hours { display: flex; overflow-x: auto; gap: 2px; padding-bottom: 6px; -webkit-overflow-scrolling: touch; }
.hr { flex: 0 0 52px; text-align: center; font-size: 13px; display: flex; flex-direction: column; align-items: center; gap: 1px; }
.hr img { width: 34px; height: 34px; }
.hr b { font-size: 15px; font-weight: 600; }
.hr .pp { color: #9cc9ff; min-height: 1.2em; font-size: 12px; }
.hr .ww { opacity: .8; font-size: 12px; } .hr .ww em { display: inline-block; font-style: normal; margin-left: 2px; }
.foot { font-size: 12px; opacity: .6; margin-top: 6px; }

/* nastavení */
/* ---- Nastavení: záložky, skupiny řádků ---- */
#set-modal .card { width: min(1080px, 100%); height: min(700px, 100%); padding: 0; display: flex; overflow: hidden; }
#set-body { flex: 1; min-height: 0; display: flex; }
#set-body .set-layout { flex: 1; min-height: 0; display: grid; grid-template-columns: 248px 1fr; }
#set-body .side { display: flex; flex-direction: column; gap: 4px; padding: 20px 12px 14px; background: rgba(0,0,0,.18); border-right: 1px solid rgba(255,255,255,.08); overflow: auto; }
#set-body .side h2 { margin: 0 10px 14px; font-size: 22px; }
#set-body .side button { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 0; border-radius: 12px; background: none; color: rgba(255,255,255,.8);
  font: inherit; font-size: 15.5px; font-weight: 550; text-align: left; cursor: pointer; transition: background .15s, color .15s; }
#set-body .side button svg { flex: 0 0 22px; width: 22px; height: 22px; opacity: .8; }
#set-body .side button span { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
#set-body .side button small { font-size: 12px; font-weight: 400; color: rgba(255,255,255,.5); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#set-body .side button:hover { background: rgba(255,255,255,.06); }
#set-body .side button.on { background: rgba(255,255,255,.15); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); }
#set-body .side button.on svg { opacity: 1; color: #9fe3d8; }
#set-body .side .foot { margin: auto 10px 0; padding-top: 14px; line-height: 1.4; }
#set-body .set-main { min-height: 0; overflow: auto; padding: 20px 22px 22px; -webkit-overflow-scrolling: touch; }
#set-body .pane-h { margin: 2px 50px 16px 4px; font-size: 20px; font-weight: 650; }
#set-body .set-pane { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px 16px; align-items: start; }
#set-body .set-pane > .presets3, #set-body .set-pane > .gfx-stats, #set-body .set-pane > p.hint { grid-column: 1 / -1; }
#set-body .set-pane .grp { margin: 0; }
#set-body .set-pane .grp.full { grid-column: 1 / -1; }   /* skupiny s dlouhými segmentovými přepínači přes celou šířku */
#set-body .seg { flex-wrap: wrap; }
#set-body .seg button { flex: 1 1 auto; white-space: nowrap; }
@media (max-width: 760px) {
  #set-modal .card { height: 100%; }
  #set-body .set-layout { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  #set-body .side { flex-direction: row; overflow-x: auto; padding: 12px 54px 10px 12px; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.08); }
  #set-body .side h2, #set-body .side .foot, #set-body .side small { display: none; }
  #set-body .side button { flex: 0 0 auto; padding: 8px 12px; font-size: 14px; }
  #set-body .set-main { padding: 14px 14px 18px; }
  #set-body .set-pane { grid-template-columns: 1fr; }
}
#set-body .grp { margin: 0 0 16px; }
#set-body .grp h4 { margin: 0 6px 7px; font-size: 13.5px; font-weight: 600; color: rgba(255,255,255,.6); }
#set-body .grp-in { border-radius: 14px; background: rgba(255,255,255,.07); box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); overflow: hidden; }
#set-body .grp .hint { margin: 7px 6px 0; }
#set-body .row { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 10px 14px; margin: 0; width: 100%; box-sizing: border-box;
  border: 0; background: none; color: #fff; font: inherit; font-size: 15.5px; text-align: left; }
#set-body .row + .row { border-top: 1px solid rgba(255,255,255,.08); }
#set-body .row.col { flex-direction: column; align-items: stretch; gap: 9px; }
#set-body .rl { flex: 1; display: flex; flex-direction: column; gap: 2px; }
#set-body .rl small { font-size: 12.5px; color: rgba(255,255,255,.55); line-height: 1.35; }
#set-body .row.sw i { order: 2; }
#set-body .row.link { cursor: pointer; }
#set-body .row.link b { font-size: 22px; font-weight: 400; opacity: .5; }
#set-body .row.link:active { background: rgba(255,255,255,.06); }
#set-body select { width: 100%; font-size: 15px; padding: 9px 10px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.1); color: #fff; }
#set-body select option { color: #000; }
#set-body .seg { background: rgba(0,0,0,.22); }
#set-body .seg button { font-size: 13.5px; padding: 8px 4px; }
#set-body .presets3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 14px; }
#set-body .presets3 button { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; text-align: left; padding: 12px 12px 11px; border-radius: 14px; cursor: pointer;
  border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.07); color: #fff; font: inherit; transition: border-color .2s, background .2s; }
#set-body .presets3 b { font-size: 16px; }
#set-body .presets3 small { font-size: 12px; color: rgba(255,255,255,.6); line-height: 1.35; }
#set-body .presets3 button.on { border-color: #ffd27a; background: rgba(255,210,122,.13); box-shadow: 0 0 0 1px #ffd27a inset; }
#set-body .gfx-stats { display: flex; gap: 8px; flex-wrap: wrap; margin: 2px 2px 4px; }
#set-body .gfx-stats span { font-size: 13px; color: rgba(255,255,255,.65); padding: 6px 11px; border-radius: 20px; background: rgba(255,255,255,.07); }
#set-body .gfx-stats b { color: #fff; font-weight: 650; font-variant-numeric: tabular-nums; }
#set-body .foot { margin: 6px 6px 0; }
@media (max-width: 520px) { #set-body .presets3 { grid-template-columns: 1fr; } }
.seg { display: flex; background: rgba(255,255,255,.1); border-radius: 12px; padding: 3px; gap: 3px; }
.seg button { flex: 1; border: 0; background: none; color: #fff; padding: 8px 6px; border-radius: 9px; font-size: 14px; cursor: pointer; }
.seg button.on { background: rgba(255,255,255,.3); font-weight: 600; }
.sw { display: flex; align-items: center; gap: 10px; margin: 10px 0; font-size: 15px; cursor: pointer; }
.sw input { display: none; }
.sw i { flex: 0 0 44px; height: 26px; border-radius: 13px; background: rgba(255,255,255,.2); position: relative; transition: background .2s; }
.sw i::after { content: ''; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 10px; background: #fff; transition: transform .2s; }
.sw input:checked + i { background: #34c759; } .sw input:checked + i::after { transform: translateX(18px); }
.hint { font-size: 12.5px; opacity: .65; margin-top: 8px; line-height: 1.4; }
.wide { width: 100%; margin-top: 14px; padding: 11px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.14); color: #fff; font-size: 15px; cursor: pointer; }
#toggle { display: none !important; }

[hidden] { display: none !important; }   /* jinak .modal {display:grid} přebije atribut hidden a neviditelný modál chytá dotyky */
:root { --tmax: #ff6b5e; --tmin: #6fb4ff; }
#fc .tt b, .dtemps b, #now-mm b.mx { color: var(--tmax); }
#fc .tt span, .dtemps span, #now-mm b.mn { color: var(--tmin); opacity: 1; }
#fc .tt, .dtemps { text-shadow: 0 1px 6px rgba(0,0,0,.45); }

/* ---- větší písmo v pásu předpovědi ---- */
#fc { padding: 12px 6px 14px; }
#fc .dn { font-size: 21px; }
#fc .dd { font-size: 14.5px; }
#fc img { width: 84px; height: 84px; margin: 0 auto -2px; }
#fc .tt { font-size: 34px; line-height: 1.1; letter-spacing: -.3px; }
#fc .tt span { margin-left: 12px; }
#fc .tx { font-size: 17px; font-weight: 500; min-height: 0; margin-top: 4px; }
#fc .pr { font-size: 15px; margin-top: 3px; }
#fc .pr:empty, #fc .pr.no { display: none; }
@media (max-width: 700px) { #fc img { width: 56px; height: 56px; } #fc .tt { font-size: 18px; } }

/* ---- velký detail dne ---- */
#day-modal .card { width: min(1240px, 100%); max-height: 100%; padding: 16px 22px 14px; overflow: hidden; }   /* bez posouvání: graf se zmenší (fitDay) */

.dtop { display: flex; align-items: flex-start; gap: 12px; }
.dtop .x { position: static; flex: 0 0 44px; width: 44px; height: 44px; border-radius: 22px; font-size: 19px; margin-top: 2px; }
.dtabs { flex: 1; min-width: 0; display: flex; gap: 6px; overflow-x: auto; padding: 0 0 8px; -webkit-overflow-scrolling: touch; }
.dtabs button { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 74px; padding: 6px 6px 7px; border-radius: 14px;
  border: 1px solid transparent; background: rgba(255,255,255,.07); color: #fff; font-size: 13px; cursor: pointer; }
.dtabs button b { font-size: 15px; } .dtabs button span { opacity: .85; }
.dtabs button img { width: 34px; height: 34px; }
.dtabs button em { font-style: normal; font-weight: 600; }
.dtabs button.on { background: rgba(255,255,255,.26); border-color: rgba(255,255,255,.5); }
.mx { color: var(--tmax); } .mn { color: var(--tmin); }
.dh { margin-top: 6px; padding-right: 0; }
.dh .big { font-size: 28px; }
.dsum { gap: 26px; margin: 8px 0 10px; align-items: center; }
.dsum img { width: 140px; height: 140px; }
.dcond { font-size: 26px; font-weight: 600; }
.dtemps { font-size: 54px; line-height: 1.1; }
.dfeel { font-size: 16px; opacity: .8; }
.stats { grid-template-columns: repeat(3, minmax(160px, 1fr)); gap: 12px 26px; }
.stats .st b { display: block; font-size: 21px; font-weight: 600; }
.stats .st i { font-size: 13px; }
.stats .st em { display: block; font-style: normal; font-size: 14.5px; opacity: .78; }
.ctabs { display: flex; gap: 4px; background: rgba(255,255,255,.1); border-radius: 13px; padding: 3px; flex: none; flex-wrap: wrap; }
.ctabs button { flex: 1; border: 0; background: none; color: #fff; padding: 9px 8px; border-radius: 10px; font-size: 16px; cursor: pointer; white-space: nowrap; }
.ctabs button.on { background: rgba(255,255,255,.3); font-weight: 600; }
.dchart { flex: none; margin: 8px 0 6px; }
.dchart svg.mg .ax { font-size: 14px; } .dchart svg.mg .tv { font-size: 14px; }
.hours { flex: none; gap: 4px; }
.hr { flex: 0 0 66px; font-size: 15px; padding: 6px 0; border-radius: 12px; background: rgba(255,255,255,.05); gap: 2px; }
.hr .hh { font-weight: 600; opacity: .85; }
.hr img { width: 44px; height: 44px; }
.hr b { font-size: 19px; }
.hr .pp { font-size: 13.5px; }
.hr .ww { font-size: 14px; }
.foot { font-size: 13.5px; padding-top: 6px; }
@media (max-width: 900px) { .stats { grid-template-columns: repeat(2, minmax(140px, 1fr)); } .dsum img { width: 100px; height: 100px; } }

/* meteogram – větší popisky */
#sheet .sh-head b { font-size: 19px; }
#sheet svg.mg .ax { font-size: 13px; } #sheet svg.mg .dl { font-size: 15px; } #sheet svg.mg .tv { font-size: 14px; }
.legend { font-size: 14px; }

/* ================= ruční nastavení scény ================= */
#panel { position: fixed; z-index: 7; right: calc(14px + var(--sa-r)); top: calc(96px + var(--sa-t)); max-height: calc(100vh - 110px - var(--sa-t) - var(--sa-b));
  width: min(420px, calc(100vw - 28px)); display: flex; flex-direction: column; padding: 0; overflow: hidden;
  background: rgba(16,22,32,.55); font-size: 15px; border-radius: 24px; transition: transform .3s cubic-bezier(.2,.8,.2,1), opacity .3s; }
#panel.hide { transform: translateX(110%); opacity: 0; pointer-events: none; }
.pn-head { display: flex; align-items: center; gap: 10px; padding: 14px 14px 6px 20px; }
.pn-head b { font-size: 22px; font-weight: 600; flex: 1; }
.pn-head .x { position: static; width: 38px; height: 38px; border-radius: 19px; }
.live-pill { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; border-radius: 17px; border: 1px solid var(--line);
  background: rgba(255,255,255,.1); color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; }
.live-pill i { width: 9px; height: 9px; border-radius: 5px; background: rgba(255,255,255,.45); }
.live-pill.on { background: rgba(52,199,89,.25); border-color: rgba(52,199,89,.7); }
.live-pill.on i { background: #34c759; box-shadow: 0 0 0 0 rgba(52,199,89,.7); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(52,199,89,0); } 100% { box-shadow: 0 0 0 0 rgba(52,199,89,0); } }
#wx { margin: 0 20px 10px; font-size: 13px; line-height: 1.4; color: #b6f0c0; }
#wx.off { color: inherit; opacity: .55; }
.pn-tabs { display: flex; gap: 4px; margin: 0 14px; padding: 4px; background: rgba(255,255,255,.08); border-radius: 16px; flex: none; }
.pn-tabs button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 2px 7px; border: 0; border-radius: 12px;
  background: none; color: rgba(255,255,255,.7); font-size: 12.5px; cursor: pointer; }
.pn-tabs svg { width: 24px; height: 24px; }
.pn-tabs button.on { background: rgba(255,255,255,.22); color: #fff; font-weight: 600; }
.pn-body { flex: 0 1 auto; min-height: 0; overflow-y: auto; padding: 8px 20px 20px; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.pn-body section { display: none; }
.pn-body section.on { display: block; animation: fadein .2s; }
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } }
.pn-body h4 { margin: 18px 0 4px; font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .8px; opacity: .6; }
.sl { display: grid; grid-template-columns: 1fr auto; align-items: baseline; margin: 12px 0 2px; }
.sl span { font-size: 15px; }
.sl output { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.sl input[type=range] { grid-column: 1 / -1; width: 100%; margin: 8px 0 0; -webkit-appearance: none; appearance: none; height: 30px; background: none; }
.sl input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: rgba(255,255,255,.22); }
.sl input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 13px; margin-top: -10px; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.sl input[type=range]::-moz-range-track { height: 6px; border-radius: 3px; background: rgba(255,255,255,.22); }
.sl input[type=range]::-moz-range-thumb { width: 26px; height: 26px; border-radius: 13px; border: 0; background: #fff; }
#panel .sw { margin: 12px 0; }
/* Počasí: podskupiny a kompaktní posuvníky (popisek · posuvník · hodnota na jednom řádku) */
#panel .wx-seg { margin: 14px 0 6px; }
#panel .wx-seg button { font-size: 13.5px; padding: 8px 4px; }
#panel .wx-g { display: none; }
#panel .wx-g.on { display: block; animation: fadein .2s; }
#panel .wx-g .sl { grid-template-columns: 118px 1fr 58px; align-items: center; gap: 10px; margin: 6px 0; }
#panel .wx-g .sl span { font-size: 14px; line-height: 1.2; }
#panel .wx-g .sl output { order: 3; text-align: right; font-size: 14px; }
#panel .wx-g .sl input[type=range] { grid-column: auto; order: 2; margin: 0; }
#panel section[data-sec="wx"] .presets.grid { grid-template-columns: repeat(5, 1fr); gap: 5px; }
#panel section[data-sec="wx"] .presets button { min-height: 38px; font-size: 12.5px; padding: 4px 2px 6px; }
#panel section[data-sec="wx"] .presets button img { width: 30px; height: 30px; margin: -2px 0 -3px; }
#panel .an-go { grid-template-columns: repeat(4, 1fr); }
.presets { display: grid; gap: 8px; margin: 12px 0 4px; }
.presets.chips { grid-template-columns: repeat(4, 1fr); }
.presets.grid { grid-template-columns: repeat(3, 1fr); }
.presets button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 44px; padding: 6px 4px 8px;
  border-radius: 14px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.08); color: #fff; font-size: 13.5px; cursor: pointer; }
.presets button img { width: 40px; height: 40px; margin: -4px 0 -4px; }
.presets button:active { background: rgba(255,255,255,.25); }
.presets button.on { background: rgba(255,255,255,.28); border-color: rgba(255,255,255,.6); font-weight: 600; }
.presets.views { grid-template-columns: repeat(3, 1fr); }
.presets.views button { min-height: 48px; font-size: 14.5px; }
.compass { position: relative; width: 150px; height: 150px; margin: 10px auto 4px; border-radius: 50%; border: 2px solid rgba(255,255,255,.3);
  background: radial-gradient(circle, rgba(255,255,255,.1), rgba(255,255,255,.02)); touch-action: none; cursor: pointer; }
.compass span { position: absolute; font-size: 13px; font-weight: 600; opacity: .75; }
.compass .n { top: 6px; left: 50%; transform: translateX(-50%); } .compass .s { bottom: 6px; left: 50%; transform: translateX(-50%); }
.compass .e { right: 9px; top: 50%; transform: translateY(-50%); } .compass .w { left: 9px; top: 50%; transform: translateY(-50%); }
#cmp-arrow { position: absolute; left: 50%; top: 18px; bottom: 18px; width: 0; transition: transform .2s; }
#cmp-arrow::before { content: ''; position: absolute; left: -3px; top: 10px; bottom: 0; width: 6px; border-radius: 3px; background: linear-gradient(#8fe0c0, rgba(143,224,192,.2)); }
#cmp-arrow::after { content: ''; position: absolute; left: -11px; top: 0; border: 11px solid transparent; border-top: 0; border-bottom: 18px solid #8fe0c0; }
.moonview { display: flex; align-items: center; gap: 16px; margin: 8px 0; }
#moon-prev { width: 88px; height: 88px; flex: none; }
#moon-txt { display: flex; flex-direction: column; gap: 2px; font-size: 14px; opacity: .85; }
#moon-txt b { font-size: 17px; opacity: 1; }
#fps { opacity: .5; font-size: 11.5px; margin-top: 18px; line-height: 1.4; }
@media (max-width: 600px) {
  #panel { left: 0; right: 0; top: auto; bottom: 0; width: auto; max-height: 82vh; border-radius: 24px 24px 0 0; padding-bottom: var(--sa-b); }
  #panel.hide { transform: translateY(105%); }
}
body.noscene { background: linear-gradient(180deg, #4d7db8 0%, #8fb2d6 45%, #5f7a4e 62%, #3d5534 100%); }
#fc .day { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; }
#fc .day > * { width: 100%; }
#fc .day img { width: 84px; }
.presets.grid button img { width: 52px; height: 52px; margin: -8px 0 -6px; }
.presets.chips button img { width: 44px; height: 44px; margin: -6px 0 -4px; }

/* výstrahy ČHMÚ – lišta nad předpovědí */
:root { --lvl2: #ffe14d; --lvl3: #ff9a1f; --lvl4: #e5202a; }
.fc-top { display: flex; align-items: flex-end; gap: 10px; margin-bottom: 10px; }
#warn { display: flex; align-items: center; gap: 12px; min-width: 0; max-width: min(720px, 100%); flex: 0 1 auto; height: 60px; padding: 0 18px 0 8px;
  border: 0; border-radius: 18px; color: #1d1600; text-shadow: none; cursor: pointer; box-shadow: 0 6px 18px rgba(0,0,0,.28); font: inherit; text-align: left; }
#warn.lvl-2 { background: var(--lvl2); } #warn.lvl-3 { background: var(--lvl3); } #warn.lvl-4 { background: var(--lvl4); color: #fff; }
#warn .w-ic { flex: none; width: 46px; height: 46px; border-radius: 13px; background: rgba(0,0,0,.14); display: grid; place-items: center; }
#warn .w-ic img { width: 44px; height: 44px; }
#warn .w-txt { display: flex; flex-direction: column; min-width: 0; }
#warn .w-txt b { font-size: 19px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#warn .w-txt span { font-size: 14.5px; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#warn .w-more { flex: none; font-size: 13px; font-weight: 700; padding: 3px 9px; border-radius: 10px; background: rgba(0,0,0,.14); }
#warn .w-go { flex: none; font-size: 28px; line-height: 1; opacity: .7; }
/* detail výstrah */
#warn-modal .card { width: min(820px, 100%); }
.w-head { display: flex; align-items: center; gap: 14px; padding-right: 44px; margin-bottom: 14px; }
.w-head img { width: 64px; height: 64px; }
.w-head h2 { margin: 0; font-size: 26px; }
.w-sub { font-size: 15px; opacity: .8; }
.w-card { border-radius: 18px; padding: 14px 16px; margin-bottom: 12px; background: rgba(255,255,255,.07); border-left: 6px solid var(--lvl2); }
.w-card.lvl-3 { border-left-color: var(--lvl3); } .w-card.lvl-4 { border-left-color: var(--lvl4); }
.w-card-head { display: flex; align-items: center; gap: 12px; }
.w-card-head .w-ic img { width: 56px; height: 56px; }
.w-card h3 { margin: 0 0 3px; font-size: 21px; }
.w-meta { font-size: 14.5px; opacity: .9; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.w-chip { font-size: 12.5px; font-weight: 700; padding: 2px 8px; border-radius: 8px; background: var(--lvl2); color: #1d1600; }
.w-card.lvl-3 .w-chip { background: var(--lvl3); } .w-card.lvl-4 .w-chip { background: var(--lvl4); color: #fff; }
.w-card p, .w-sit { font-size: 16px; line-height: 1.5; margin: 10px 0 0; }
.w-headline { font-weight: 600; }
.w-instr { opacity: .92; }
.w-floods { margin: 8px 0 0; padding-left: 20px; font-size: 15px; }
.w-src { font-size: 13px; opacity: .6; margin: 12px 0 0; }

/* čitelnost aktuálního stavu nad 3D scénou: měkký tmavý závoj za textem + výraznější stín písma */
/* rozmazaný tmavý „polštář“ pod celým blokem – rovnoměrně kryje všechny řádky, okraje plynule mizí */
#now { isolation: isolate; }
#now::before { content: ''; position: absolute; z-index: -1; left: -26px; top: -14px; right: -46px; bottom: -18px; border-radius: 48px;
  background: rgba(6,11,20,.46); filter: blur(26px); -webkit-filter: blur(26px); }
#now .place, #now-cond, #now-mm, #now-sub { text-shadow: 0 1px 2px rgba(0,0,0,.55), 0 0 14px rgba(0,0,0,.45); }
#now-temp { text-shadow: 0 2px 4px rgba(0,0,0,.35), 0 0 30px rgba(0,0,0,.35); }
#now-icon { filter: drop-shadow(0 2px 6px rgba(0,0,0,.4)); }
/* tmavší pozadí za otevřenými okny */
.modal.open { background: rgba(0,0,0,.5); }
.modal .card { background: rgba(14,19,28,.72); }

/* ---- vpravo nahoře: Slunce, Měsíc, nastavení – stejná velká skleněná tlačítka ---- */
#tr-bar { position: absolute; right: calc(172px + var(--sa-r)); top: calc(16px + var(--sa-t)); display: flex; gap: 14px; }
.tr-btn, #gear { height: 66px; border-radius: 20px; color: #fff; cursor: pointer; font: inherit;
  background: rgba(16,24,38,.34); border: 1px solid rgba(255,255,255,.2); box-shadow: 0 6px 22px rgba(0,0,0,.22); }
.tr-btn { display: flex; align-items: center; gap: 10px; padding: 0 16px 0 10px; min-width: 132px; }
.tr-btn:active, #gear:active { transform: scale(.97); background: rgba(255,255,255,.24); }
#gear { width: 66px; top: calc(16px + var(--sa-t)); }
#gear svg { width: 28px; height: 28px; }
.tb-rows { display: grid; grid-template-columns: 30px auto; align-items: center; column-gap: 6px; row-gap: 1px; }
.tb-rows img { width: 34px; height: 34px; margin: -6px -3px; }
.tb-rows i { font-style: normal; font-size: 17px; opacity: .8; text-align: center; }
.tb-rows b { font-size: 19px; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; min-width: 3.1em; }
.tb-moon { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.tb-moon span { font-size: 12.5px; opacity: .85; font-variant-numeric: tabular-nums; }
.moonic { display: block; }
/* ---- detail ---- */
#sun-modal .card, #moon-modal .card { width: min(1160px, 100%); max-height: calc(100vh - 24px); overflow-y: auto; }
#sun-modal .dh, #moon-modal .dh { padding-right: 46px; }
.astro-chart { margin: 10px 0 4px; }
.astro-mg .ax { font-size: 14px; }
.astro-mg .tv { font-size: 15px; font-weight: 600; }
.legend .lm { background: #dfe6f5; }
.astro-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 28px; margin-top: 10px; }
.astro-cols section { background: rgba(255,255,255,.06); border-radius: 18px; padding: 12px 16px 14px; }
.astro-cols h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 20px; }
.astro-cols h3 img { width: 40px; height: 40px; margin: -6px -4px; }
.arow { display: grid; grid-template-columns: 130px 1fr; align-items: baseline; padding: 7px 0; border-top: 1px solid rgba(255,255,255,.08); }
.arow i { font-style: normal; font-size: 14px; opacity: .7; }
.arow b { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.arow em { grid-column: 2; font-style: normal; font-size: 14px; opacity: .75; }
.mphase { display: flex; align-items: center; gap: 16px; margin: 4px 0 8px; }
.mphase b { display: block; font-size: 22px; }
.mphase span { display: block; font-size: 15px; opacity: .8; }
.phases { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 10px; }
.phases div { display: flex; flex-direction: column; align-items: center; gap: 3px; background: rgba(255,255,255,.06); border-radius: 12px; padding: 8px 4px; text-align: center; }
.phases b { font-size: 13.5px; } .phases span { font-size: 13px; opacity: .8; }
@media (max-width: 760px) { .astro-cols { grid-template-columns: 1fr; } #astro .ar span { display: none; } }

/* piktogramy ČHMÚ: černé na žluté/oranžové liště, bílé na červené a v tmavém detailu */
#warn .w-ic { background: rgba(255,255,255,.35); }
#warn .w-ic img { width: 34px; height: 34px; }
#warn.lvl-4 .w-ic img, .w-card .w-ic img { filter: invert(1); }
#warn.lvl-4 .w-ic { background: rgba(0,0,0,.18); }
.w-card-head .w-ic { flex: none; width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; background: rgba(255,255,255,.1); }
.w-card-head .w-ic img { width: 38px; height: 38px; }

/* ---- úvodní obrazovka při načítání ---- */
#loader { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; color: #fff;
  background: radial-gradient(ellipse at 50% 38%, #24477a 0%, #13264a 45%, #0b1226 100%); transition: opacity .8s ease, visibility .8s; }
#loader.out { opacity: 0; visibility: hidden; }
.ld-in { display: flex; flex-direction: column; align-items: center; gap: 14px; transform: translateY(-4vh); }
.ld-icon { width: 128px; height: 128px; border-radius: 30px; box-shadow: 0 12px 40px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.12); animation: ldfloat 3s ease-in-out infinite; }
@keyframes ldfloat { 50% { transform: translateY(-6px); box-shadow: 0 18px 50px rgba(0,0,0,.4), 0 0 40px rgba(255,210,120,.25), 0 0 0 1px rgba(255,255,255,.12); } }
.ld-kicker { font-size: 15px; font-weight: 500; letter-spacing: 3px; text-transform: uppercase; color: #ffd27a; opacity: .9; margin-top: 10px; }
.ld-title { font-size: 40px; font-weight: 700; letter-spacing: .2px; line-height: 1.05; margin-top: -8px; text-shadow: 0 4px 24px rgba(0,0,0,.35); }
.ld-sub { font-size: 16px; opacity: .65; margin: -6px 0 10px; }
.ld-hills { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 26vh; pointer-events: none; }
@media (max-width: 500px) { .ld-title { font-size: 32px; } .ld-sub { font-size: 14px; } }
.ld-bar { width: 240px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.15); overflow: hidden; }
.ld-bar i { display: block; height: 100%; width: 3%; border-radius: 3px; background: linear-gradient(90deg, #ffd27a, #ffb14a); transition: width .5s ease; }
#ld-text { font-size: 15px; opacity: .75; min-height: 1.3em; }
#loader.err #ld-text { color: #ffb3a8; opacity: 1; max-width: 80vw; text-align: center; }

/* detail Slunce / Měsíce */
.legend .sw-day, .legend .sw-gold, .legend .sw-civ, .legend .sw-night { width: 14px; height: 10px; margin-right: 0; border-radius: 3px; }
.sw-day { background: rgba(90,150,230,.7); } .sw-gold { background: rgba(240,150,90,.75); } .sw-civ { background: rgba(120,90,170,.75); } .sw-night { background: rgba(8,12,30,.9); border: 1px solid rgba(255,255,255,.2); }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 14px 0 6px; }
.tile { background: rgba(255,255,255,.07); border-radius: 18px; padding: 12px 16px; display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; }
.tile img { grid-row: span 3; width: 64px; height: 64px; margin: -6px -4px; }
.tile i { font-style: normal; font-size: 14px; opacity: .7; }
.tile b { font-size: 28px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.15; }
.tile em { font-style: normal; font-size: 14.5px; opacity: .78; }
.tiles.small { grid-template-columns: repeat(3, minmax(120px, 1fr)); margin: 0; flex: 1; }
.tiles.small .tile { grid-template-columns: 1fr; }
.arows { margin-top: 4px; }
.arows .arow { grid-template-columns: 190px 1fr; }
.mhero { display: flex; align-items: center; gap: 22px; margin: 10px 0 4px; flex-wrap: wrap; }
.mhero > div:not(.tiles) b { display: block; font-size: 30px; }
.mhero > div:not(.tiles) span { display: block; font-size: 16px; opacity: .82; }
.ph-h { font-size: 15px; text-transform: uppercase; letter-spacing: .8px; opacity: .65; margin: 14px 0 6px; }
.phases div { padding: 10px 4px 12px; gap: 4px; }
.phases b { font-size: 15.5px; } .phases span { font-size: 14px; }
@media (max-width: 760px) { .tiles { grid-template-columns: 1fr; } #tr-bar { gap: 8px; } .tr-btn { min-width: 0; padding: 0 10px 0 6px; } }

.tile b.sm { font-size: 21px; }

/* ---- podržení prstu: kroužek a menu ---- */
.lp-ring { position: fixed; z-index: 60; width: 96px; height: 96px; margin: -48px 0 0 -48px; border-radius: 50%; pointer-events: none; opacity: 0;
  display: grid; place-items: center; color: #fff; font-size: 14px; font-weight: 600; text-shadow: 0 1px 4px rgba(0,0,0,.6);
  background: conic-gradient(rgba(255,210,58,.85) var(--p, 0%), rgba(255,255,255,.18) 0); transform: scale(.6);
  -webkit-mask: radial-gradient(circle, transparent 37px, #000 38px); mask: radial-gradient(circle, transparent 37px, #000 38px); }
.lp-ring span { position: absolute; }
@property --p { syntax: '<percentage>'; inherits: false; initial-value: 0%; }
.lp-ring.on { opacity: 1; transform: scale(1); transition: opacity .15s, transform .15s, --p .9s linear; --p: 100%; }
.lp-ring.done { background: rgba(255,210,58,.6); }
.lp-menu { position: fixed; inset: 0; z-index: 55; display: grid; place-items: center; background: rgba(0,0,0,.5); opacity: 0; transition: opacity .2s; }
.lp-menu.open { opacity: 1; }
.lp-menu[hidden] { display: none !important; }
.lp-box { width: min(420px, 92vw); padding: 16px; border-radius: 28px; background: rgba(14,19,28,.8); }
.lp-box button { display: flex; align-items: center; width: 100%; min-height: 64px; border: 0; border-radius: 18px; background: rgba(255,255,255,.08); color: #fff;
  font: inherit; font-size: 20px; padding: 0 18px; cursor: pointer; }
.lp-box button + button { margin-top: 10px; }
.lp-box button b { width: 44px; color: #ffd23a; font-size: 22px; }
.lp-box button:active { background: rgba(255,255,255,.18); }
.lp-box button.sure { background: rgba(255,210,58,.22); color: #ffd23a; }
.lp-box .lp-cancel { justify-content: center; background: none; color: rgba(255,255,255,.7); min-height: 52px; }

/* ================= Meteostanice (celá obrazovka) ================= */
#now { pointer-events: auto; cursor: pointer; }
#st-btn { gap: 8px; padding: 0 16px 0 14px; min-width: 0; }
#st-btn svg { color: #9fe3d8; }
.st-btn-l { font-size: 17px; font-weight: 600; }
#station { position: fixed; inset: 0; z-index: 30; display: grid; grid-template-columns: 268px 1fr; color: #eef3fa;
  background: radial-gradient(120% 90% at 70% 0%, rgba(38,64,104,.92) 0%, rgba(12,22,40,.96) 55%, rgba(6,12,24,.98) 100%);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); opacity: 0; transform: translateY(14px); transition: opacity .28s ease, transform .28s ease;
  padding: var(--sa-t) var(--sa-r) 0 var(--sa-l); }
#station.open { opacity: 1; transform: none; }
body.station-open #hud { visibility: hidden; }
#st-rail { overflow-y: auto; padding: 18px 10px 18px 14px; display: flex; flex-direction: column; gap: 4px; border-right: 1px solid rgba(255,255,255,.07); }
#st-rail button { display: flex; align-items: center; gap: 10px; text-align: left; border: 0; background: none; color: inherit; font: inherit;
  padding: 7px 10px 7px 4px; border-radius: 16px; min-height: 62px; cursor: pointer; }
#st-rail button img { width: 46px; height: 46px; flex: none; }
#st-rail button b { display: block; font-size: 16px; font-weight: 600; }
#st-rail button em { display: block; font-style: normal; font-size: 14px; color: #9fb0c8; font-variant-numeric: tabular-nums; margin-top: 1px; }
#st-rail button.on { background: rgba(255,255,255,.1); box-shadow: inset 3px 0 0 #9fe3d8; }
#st-rail button:active { background: rgba(255,255,255,.16); }
#station main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
#st-hd { display: flex; align-items: center; padding: 18px 22px 8px 30px; gap: 16px; }
#st-head { flex: 1; display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; min-width: 0; }
#st-head h2 { margin: 0; font-size: 30px; font-weight: 600; letter-spacing: -.3px; }
#st-head .st-srcname { font-size: 15px; color: #9fb0c8; }
.st-live { font-size: 13px; color: #9fb0c8; display: inline-flex; align-items: center; gap: 6px; }
.st-live::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #e5a03a; }
.st-live.on::before { background: #4ee28a; box-shadow: 0 0 0 4px rgba(78,226,138,.18); }
#st-close { flex: none; width: 56px; height: 56px; border-radius: 18px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.08); color: #fff; font-size: 22px; cursor: pointer; }
#st-err { margin: 0 30px; padding: 10px 14px; border-radius: 12px; background: rgba(229,32,42,.2); color: #ffc9c4; }
#st-body { flex: 1; overflow-y: auto; padding: 4px 30px 16px; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
/* záložky uvnitř stránky stanice (obsah se nevejde na jednu obrazovku → dělí se, neposouvá se) */
.st-subtabs { display: flex; gap: 4px; padding: 4px; margin: 0 0 14px; border-radius: 16px; background: rgba(255,255,255,.06);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.07); width: max-content; max-width: 100%; overflow-x: auto; }
.st-subtabs button { border: 0; background: none; color: #b9c6d8; font: inherit; font-size: 16px; font-weight: 500; padding: 0 20px; min-height: 42px; border-radius: 12px; cursor: pointer; white-space: nowrap; transition: background .2s, color .2s; }
.st-subtabs button.on { background: rgba(159,227,216,.18); color: #fff; font-weight: 650; box-shadow: inset 0 0 0 1px rgba(159,227,216,.45); }
.st-subtabs button:active { background: rgba(255,255,255,.12); }
.st-empty { padding: 40px 0; text-align: center; color: #9fb0c8; font-size: 16px; }

/* mřížka stránky: 6 sloupců, buňky bez prázdných míst (dense) */
.st-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; grid-auto-flow: row dense; align-items: stretch; }
.st-cell { position: relative; min-width: 0; padding: 16px 18px; border-radius: 22px; background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.06); }
.st-cell[data-go] { cursor: pointer; } .st-cell[data-go]:active { background: rgba(255,255,255,.09); }
.span1 { grid-column: span 1; } .span2 { grid-column: span 2; } .span3 { grid-column: span 3; } .span4 { grid-column: span 4; } .span6 { grid-column: span 6; }
.row2 { grid-row: span 2; }
.st-ch { display: flex; align-items: center; gap: 12px; margin: -2px 0 8px; flex-wrap: wrap; min-height: 42px; }
.st-ch h3 { flex: 1; margin: 0; font-size: 17px; font-weight: 600; color: #dfe7f2; min-width: 12ch; }
.mut { color: #8fa0b8; font-size: 14px; }
.st-link { border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.07); color: #dfe9ff; font: inherit; font-size: 15px; padding: 0 16px; min-height: 42px; border-radius: 13px; cursor: pointer; }
.st-empty { padding: 30px 0; text-align: center; color: #9fb0c8; font-size: 16px; display: grid; place-items: center; }

/* přístroje */
.st-instcell { display: grid; place-items: center; padding: 10px; }
.st-inst { width: 100%; max-width: 380px; max-height: 420px; height: auto; overflow: visible; }
.st-inst .ti { font-size: 15px; fill: #c9d4e4; font-variant-numeric: tabular-nums; }
.st-inst .tl { font-size: 13px; fill: #8fa0b8; }
.st-inst .cd { font-size: 22px; font-weight: 700; fill: #dfe7f2; }
.st-inst .cv { font-size: 34px; font-weight: 300; fill: #fff; font-variant-numeric: tabular-nums; }
.st-inst .cu { font-size: 15px; fill: #9fb0c8; }
.st-mini { width: 54px; height: 54px; }
.st-mini .mc { font-size: 10px; fill: #9fb0c8; font-weight: 600; }
.st-bigcell { display: flex; flex-direction: column; justify-content: center; }
.st-big { display: flex; align-items: baseline; gap: 10px; }
.st-big b { font-size: 84px; font-weight: 200; line-height: .95; letter-spacing: -2px; font-variant-numeric: tabular-nums; }
.st-big span { font-size: 22px; color: #9fb0c8; }
.st-sub { font-size: 17px; color: #c3cfdf; margin: 8px 0 0; line-height: 1.4; }
.st-sub.sm { font-size: 14.5px; color: #9fb0c8; }
.st-kv { min-width: 0; }
.st-kv + .st-kv { margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.07); }
.st-kv i { display: block; font-style: normal; font-size: 14px; color: #9fb0c8; }
.st-kv b { display: block; font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; margin-top: 2px; line-height: 1.15; }
.st-kv em { display: block; font-style: normal; font-size: 14px; color: #a9b7ca; margin-top: 2px; }
.span1 > .st-kv b { font-size: 26px; }
.st-note { font-size: 14px; color: #8fa0b8; margin: 10px 0 0; max-width: 80ch; line-height: 1.45; }
.st-rangebar { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; margin: 12px 0 4px; font-size: 14.5px; color: #a9b7ca; font-variant-numeric: tabular-nums; max-width: 460px; }
.st-rangebar div { position: relative; height: 8px; }
.st-rangebar i { position: absolute; inset: 0; border-radius: 4px; opacity: .85; }
.st-rangebar b { position: absolute; top: 50%; width: 16px; height: 16px; border-radius: 50%; transform: translate(-50%, -50%); border: 3px solid #0d1a2e; }
.st-bft { display: flex; gap: 4px; margin: 14px 0 0; max-width: 420px; }
.st-bft i { flex: 1; height: 12px; border-radius: 3px; background: rgba(255,255,255,.1); }
.st-bft i.on { background: hsl(calc(170 - var(--k) * 14), 70%, 55%); }
.st-dets { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.st-det { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; background: rgba(255,255,255,.06); font-size: 14.5px; color: #9fb0c8; }
.st-det i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.25); }
.st-det.on { background: rgba(74,157,255,.2); color: #d6e8ff; } .st-det.on i { background: #4a9dff; box-shadow: 0 0 0 4px rgba(74,157,255,.25); }
.st-table { width: 100%; border-collapse: collapse; font-size: 16px; font-variant-numeric: tabular-nums; }
.st-table th { text-align: left; font-weight: 500; font-size: 13.5px; color: #9fb0c8; padding: 0 8px 6px 0; }
.st-table td { padding: 8px 8px 8px 0; border-top: 1px solid rgba(255,255,255,.07); }
.st-table td:first-child { color: #a9b7ca; }
.st-pill { padding: 5px 12px; border-radius: 999px; font-size: 14px; font-weight: 600; color: #0b1628; }
.st-events { display: flex; flex-direction: column; gap: 6px; }
.st-events div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; border-radius: 10px; font-size: 15px; font-variant-numeric: tabular-nums;
  background: linear-gradient(90deg, rgba(74,157,255,.32) var(--w), rgba(255,255,255,.04) var(--w)); }

/* grafy (SVG v pixelech slotu) */
.st-seg { display: inline-flex; background: rgba(255,255,255,.07); border-radius: 14px; padding: 3px; }
.st-seg button { border: 0; background: none; color: #c3cfdf; font: inherit; font-size: 15px; padding: 0 14px; min-height: 40px; border-radius: 11px; cursor: pointer; white-space: nowrap; }
.st-seg button.on { background: rgba(255,255,255,.18); color: #fff; font-weight: 600; }
.st-chartslot, .st-tlslot, .st-radslot, .st-rmapslot { width: 100%; }
.st-chartwrap { position: relative; touch-action: pan-y; }
.st-chart { display: block; overflow: visible; user-select: none; -webkit-user-select: none; }
.st-chart .g { stroke: rgba(255,255,255,.08); }
.st-chart .g.v { stroke-dasharray: 2 6; }
.st-chart .g.v.day { stroke: rgba(255,255,255,.22); stroke-dasharray: none; }
.st-chart .z { stroke: rgba(255,255,255,.4); }
.st-chart .night { fill: rgba(40,60,110,.22); }
.st-chart .ax { font-size: 13.5px; fill: #8fa0b8; font-variant-numeric: tabular-nums; }
.st-chart .ax.b { fill: #c3cfdf; font-weight: 600; }
.st-chart .lv { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.st-chart .tl-t { font-size: 13px; font-weight: 600; fill: #fff; }
.st-chart .tl-t.dk { fill: #13203a; }
.st-chart .cur { stroke: rgba(255,255,255,.75); stroke-width: 1.5; }
.st-leg { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 6px; font-size: 14px; color: #a9b7ca; }
.st-leg span { display: inline-flex; align-items: center; gap: 7px; }
.st-leg i { width: 16px; height: 6px; border-radius: 3px; }
.st-leg i.dash { background-size: 6px 6px !important; -webkit-mask: repeating-linear-gradient(90deg, #000 0 4px, transparent 4px 7px); mask: repeating-linear-gradient(90deg, #000 0 4px, transparent 4px 7px); }
.st-tlslot .st-leg { margin: 8px 0 0 40px; }
.st-tip { position: absolute; top: 4px; padding: 8px 12px; border-radius: 12px; background: rgba(8,14,26,.95); border: 1px solid rgba(255,255,255,.18); pointer-events: none; font-size: 14px; white-space: nowrap; box-shadow: 0 8px 24px rgba(0,0,0,.4); z-index: 2; }
.st-tip em { display: block; font-style: normal; color: #9fb0c8; margin-bottom: 3px; }
.st-tip span { display: flex; align-items: center; gap: 6px; line-height: 1.5; }
.st-tip span b { margin-left: auto; padding-left: 14px; font-variant-numeric: tabular-nums; }
.st-tip i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.st-spark { display: block; width: 100%; height: 34px; }

/* přehled */
.st-now { --tc: #9fe3d8; overflow: hidden; isolation: isolate; padding: 18px 22px 16px; border-radius: 26px;
  background: linear-gradient(150deg, rgba(255,255,255,.17) 0%, rgba(255,255,255,.06) 38%, rgba(255,255,255,.025) 100%);
  border: 1px solid rgba(255,255,255,.2); -webkit-backdrop-filter: blur(22px) saturate(170%); backdrop-filter: blur(22px) saturate(170%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), inset 0 -1px 0 rgba(0,0,0,.25), 0 18px 40px -18px rgba(0,0,0,.6); }
.st-now::before { content: ""; position: absolute; z-index: -1; inset: -40% 30% 20% -25%; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--tc) 38%, transparent), transparent); opacity: .55; }
.st-now::after { content: ""; position: absolute; z-index: -1; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(115deg, rgba(255,255,255,.16) 0%, rgba(255,255,255,0) 22%, rgba(255,255,255,0) 70%, rgba(255,255,255,.06) 100%); }
.st-now-top { display: flex; align-items: center; gap: 6px; }
.st-now-ico { width: clamp(110px, 11vw, 150px); height: auto; aspect-ratio: 1; margin: -16px -4px -16px -18px; flex: none; filter: drop-shadow(0 8px 18px rgba(0,0,0,.35)); }
.st-now-t { flex: 1; min-width: 0; }
.st-now-t > b { display: block; font-size: clamp(64px, 6.8vw, 96px); font-weight: 200; line-height: .95; letter-spacing: -3px; font-variant-numeric: tabular-nums; text-shadow: 0 2px 24px color-mix(in srgb, var(--tc) 35%, transparent); }
.st-now-t > span { display: block; font-size: clamp(19px, 1.8vw, 24px); font-weight: 600; margin-top: 4px; }
.st-now-t > em { display: block; font-style: normal; font-size: 14.5px; color: #b6c3d4; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-now-desc { margin: 12px 0 0; font-size: clamp(16px, 1.45vw, 18.5px); line-height: 1.5; color: #e3eaf4; text-wrap: pretty; }
.st-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.st-chip { display: inline-flex; align-items: baseline; gap: 7px; padding: 6px 12px; border-radius: 12px; white-space: nowrap;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); box-shadow: inset 0 1px 0 rgba(255,255,255,.12); }
.st-chip i { font-style: normal; font-size: 13.5px; color: #a9b7ca; }
.st-chip b { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.st-now .st-rangebar { max-width: none; margin: 14px 0 0; }
.st-radnow.vert { flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px; }
.st-radnow.vert img { width: 84px; height: 84px; margin: -8px 0 -6px -10px; }
.st-radnow.vert b { font-size: clamp(20px, 1.75vw, 26px); text-wrap: balance; }
.st-radnow.vert span { text-wrap: pretty; }
.st-story { background: linear-gradient(100deg, rgba(159,227,216,.13), rgba(255,255,255,.04) 60%); border-color: rgba(159,227,216,.22); padding: 18px 22px; }
.st-story p { margin: 0; font-size: 22px; line-height: 1.5; color: #f1f6fc; max-width: 80ch; }
.st-story p b { color: #fff; }
.st-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: stretch; }
.st-tile { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto 1fr auto; column-gap: 10px; text-align: left; align-items: start;
  min-height: 132px; padding: 14px 16px; border-radius: 20px; border: 1px solid rgba(255,255,255,.07); background: rgba(255,255,255,.05); color: inherit; font: inherit; cursor: pointer; }
.st-tile:active { background: rgba(255,255,255,.1); }
.st-tile i { grid-column: 1; grid-row: 1; font-style: normal; font-size: 14px; color: #9fb0c8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-tile b { grid-column: 1; grid-row: 2; font-size: 30px; font-weight: 500; font-variant-numeric: tabular-nums; line-height: 1.15; margin-top: 2px; white-space: nowrap; }
.st-tile.wide b { grid-column: 1 / 3; }
.st-tile b small { font-size: 15px; font-weight: 500; color: #9fb0c8; }
.st-tile em { grid-column: 1 / 3; grid-row: 3; font-style: normal; font-size: 13.5px; color: #a9b7ca; margin-top: 2px; line-height: 1.3; }
.st-tile .viz { grid-column: 2; grid-row: 1 / 3; display: flex; align-items: center; justify-content: flex-end; }
.st-tile .viz .st-mini, .st-tile .viz > svg { width: 64px !important; height: 64px !important; }
.st-tile .spk { grid-column: 1 / 3; grid-row: 4; display: block; height: 40px; margin-top: 8px; }
.st-tile .spk > span[data-spark] { display: block; width: 100%; height: 40px; }
.st-tile .spk .st-spark { display: block; width: 100%; height: 40px; }
.st-tile .spk .st-uvbar { margin-top: 18px; width: 100%; }
.st-tiles > .st-tile { align-self: stretch; vertical-align: top; margin: 0; }
.st-uvbar { display: block; }
.st-uvbar { position: relative; width: 84px; height: 10px; border-radius: 5px; margin-top: 18px; background: linear-gradient(90deg, #5cc76a 0 21%, #f2d23c 21% 46%, #f59a2c 46% 63%, #e5484d 63% 88%, #a35ee8 88%); }
.st-uvbar i { position: absolute; top: 50%; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid #0d1a2e; transform: translate(-50%, -50%); }
.st-dot { width: 22px; height: 22px; border-radius: 50%; margin-top: 10px; box-shadow: 0 0 0 6px rgba(255,255,255,.06); }

/* radar */
.st-radnow { display: flex; align-items: center; gap: 12px; }
.st-radnow img { width: 112px; height: 112px; margin: -10px -4px -10px -12px; flex: none; }
.st-radnow b { display: block; font-size: 28px; font-weight: 600; line-height: 1.15; }
.st-radnow span { display: block; font-size: 17px; color: #c3cfdf; margin-top: 4px; line-height: 1.4; }
.st-radnow em { display: block; font-style: normal; font-size: 13.5px; color: #8fa0b8; margin-top: 6px; }
.st-radnow.rain { background: linear-gradient(120deg, rgba(40,110,220,.32), rgba(255,255,255,.04)); border-color: rgba(90,160,255,.3); }
.st-radnow.soon { background: linear-gradient(120deg, rgba(240,170,40,.24), rgba(255,255,255,.04)); border-color: rgba(255,200,90,.3); }
.st-storm { display: block; margin-top: 8px; padding: 7px 12px; border-radius: 12px; background: rgba(245,165,36,.18); color: #ffd99a; font-size: 15.5px; font-weight: 600; }
.st-rbars .ax { font-size: 13px; }
.st-rmap { position: relative; border-radius: 16px; overflow: hidden; touch-action: none; }
.st-rmap canvas { display: block; }
.st-rmap-ctl { position: absolute; left: 10px; right: 10px; bottom: 10px; display: flex; align-items: center; gap: 12px; padding: 8px 12px 8px 8px; border-radius: 16px; background: rgba(8,14,26,.82); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.st-rplay { width: 48px; height: 48px; flex: none; border-radius: 13px; border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 17px; cursor: pointer; }
.st-rtrack { flex: 1; display: flex; gap: 3px; height: 48px; align-items: center; cursor: pointer; }
.st-rtrack i { flex: 1; height: 14px; border-radius: 3px; background: rgba(255,255,255,.22); }
.st-rtrack i.fct { background: rgba(255,200,90,.3); }
.st-rtrack i.on { height: 28px; background: #fff; }
.st-rtrack i.fct.on { background: #ffc24d; }
.st-rtime { flex: none; min-width: 150px; font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.st-rtime em { display: block; font-style: normal; font-size: 13px; font-weight: 500; color: #9fb0c8; }
.st-rtime em.fct { color: #ffc24d; }
.st-rzoom { position: absolute; top: 10px; left: 10px; display: flex; gap: 4px; padding: 3px; border-radius: 13px; background: rgba(8,14,26,.75); }
.st-rzoom button { border: 0; background: none; color: #c3cfdf; font: inherit; font-size: 14.5px; min-height: 40px; padding: 0 12px; border-radius: 10px; cursor: pointer; }
.st-rzoom button.on { background: rgba(255,255,255,.2); color: #fff; font-weight: 600; }
.st-dbzleg { display: grid; grid-template-columns: repeat(13, 1fr); gap: 2px; margin-top: 10px; max-width: 520px; font-size: 13px; color: #9fb0c8; }
.st-dbzleg i { height: 10px; border-radius: 2px; }
.st-dbzleg span { grid-row: 2; } .st-dbzleg span:nth-of-type(1) { grid-column: 1 / 5; } .st-dbzleg span:nth-of-type(2) { grid-column: 6 / 9; text-align: center; } .st-dbzleg span:nth-of-type(3) { grid-column: 10 / 14; text-align: right; }
.st-fcttab .st-table td, .st-fcttab .st-table th { text-align: center; } .st-fcttab .st-table td:first-child, .st-fcttab .st-table th:first-child { text-align: left; }

/* počasí, oblačnost */
.st-wwnow { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.st-wwnow img { width: 130px; height: 130px; margin: -18px 0 -8px; }
.st-wwnow b { font-size: 21px; font-weight: 600; }
.st-wwnow em { font-style: normal; font-size: 14px; color: #9fb0c8; margin-top: 4px; }
.st-layers { display: flex; align-items: center; gap: 16px; }
.st-layers b { display: block; font-size: 40px; font-weight: 300; }
.st-layers span { display: block; font-size: 18px; font-weight: 600; }
.st-layers em { display: block; font-style: normal; font-size: 14.5px; color: #a9b7ca; }
.st-ceilo-slot { min-height: 300px; }
.st-ceilo-plot { display: grid; grid-template-columns: 46px 1fr; grid-template-rows: 300px 24px; }
.st-ceilo-y, .st-ceilo-x { position: relative; font-size: 13.5px; color: #8fa0b8; }
.st-ceilo-y span { position: absolute; right: 8px; transform: translateY(50%); }
.st-ceilo-x { grid-column: 2; }
.st-ceilo-x span { position: absolute; top: 4px; transform: translateX(-50%); }
.st-ceilo-img { position: relative; border-radius: 10px; overflow: hidden; }
.st-ceilo-img img, .st-ceilo-ov { position: absolute; inset: 0; width: 100%; height: 100%; }
.st-ceilo-leg { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: #9fb0c8; margin: 8px 0 0 46px; flex-wrap: wrap; }
.st-ceilo-leg i { width: 160px; height: 10px; border-radius: 5px; background: linear-gradient(90deg, rgb(8,12,40), rgb(20,60,170), rgb(20,170,190), rgb(90,200,80), rgb(250,220,40), rgb(240,110,30), #fff); }
.st-ceilo-leg .dot { width: 9px; height: 9px; border-radius: 50%; background: #fff; border: 1px solid #000; margin-left: 14px; }

/* teploměry, slunce, ovzduší */
.st-sens { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin-bottom: 12px; }
.st-sens div { padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.05); }
.st-sens i { display: block; font-style: normal; font-size: 13.5px; color: #9fb0c8; }
.st-sens b { display: block; font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.st-sens em { display: block; font-style: normal; font-size: 13px; color: #8fa0b8; }
.st-pm { display: grid; grid-template-columns: 64px 1fr 110px; gap: 12px; align-items: center; margin: 10px 0; font-size: 15px; }
.st-pm i { font-style: normal; color: #a9b7ca; }
.st-pm div { position: relative; height: 12px; border-radius: 6px; background: rgba(255,255,255,.08); }
.st-pm b { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; }
.st-pm s { position: absolute; top: -4px; bottom: -4px; width: 2px; background: rgba(255,255,255,.6); }
.st-pm span { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; } .st-pm small { color: #9fb0c8; font-weight: 400; }
.st-counts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; height: 170px; align-items: end; }
.st-counts div { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; text-align: center; }
.st-counts b { width: 70%; border-radius: 6px 6px 2px 2px; background: linear-gradient(#8ee08a, rgba(142,224,138,.35)); }
.st-counts span { font-size: 14px; font-weight: 600; margin-top: 6px; font-variant-numeric: tabular-nums; }
.st-counts i { font-style: normal; font-size: 12.5px; color: #8fa0b8; }

/* voda */
.st-wrow { display: grid; grid-template-columns: minmax(150px, 190px) 1fr; gap: 18px; align-items: center; margin-bottom: 10px; }
.st-tank { max-width: 190px; }

/* stav čidel */
.st-srcs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 10px; }
.st-src { display: grid; grid-template-columns: 14px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.04); }
.st-src i { width: 12px; height: 12px; border-radius: 50%; background: #e5202a; }
.st-src.ok i { background: #4ee28a; } .st-src.warn i { background: #e5a03a; }
.st-src b { display: block; font-size: 16px; font-weight: 500; } .st-src em { display: block; font-style: normal; font-size: 13px; color: #8fa0b8; } .st-src > span { font-size: 14px; color: #9fb0c8; }

@media (max-width: 1180px) {
  .st-srcs { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1100px) and (min-width: 901px) {
  .st-now.span4 { grid-column: span 6; } .st-radnow.vert { grid-column: span 6; flex-direction: row; align-items: center; }
}
@media (max-width: 900px) {
  #station { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  #st-rail { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.07); padding: 8px; }
  #st-rail button { flex: none; min-height: 52px; } #st-rail button em { display: none; }
  .st-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .span3, .span4, .span6, .st-tiles { grid-column: span 2; } .span2 { grid-column: span 2; } .row2 { grid-row: auto; }
  .st-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .st-srcs { grid-template-columns: 1fr; }
  .st-radnow.vert { flex-direction: row; align-items: center; }
  .st-inst { max-height: 300px; }
  .st-instcell:has(+ .st-bigcell), .st-instcell + .st-bigcell { grid-column: span 1; }
  #st-body { padding: 6px 16px 30px; } #st-hd { padding: 12px 12px 6px 16px; }
}
@media (prefers-reduced-motion: reduce) { #station { transition: none; transform: none; } }

/* menu stanice: skupiny */
.st-rgrp { margin: 14px 0 2px 8px; font-size: 13px; font-weight: 600; color: #7f92ad; letter-spacing: .2px; }
.st-rgrp:first-child { margin-top: 0; }
#st-rail button { min-height: 54px; padding: 5px 10px 5px 4px; }
#st-rail button img { width: 40px; height: 40px; }
@media (max-width: 900px) { .st-rgrp { display: none; } }

/* vítr: ortofoto s částicemi */
.st-ortho { padding: 0; overflow: hidden; display: grid; place-items: center; min-height: 360px; background: #2d4a1e; }
.st-ortho > * { grid-area: 1 / 1; }
.st-ortho-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(.85) brightness(.82); }
.st-particles { position: absolute; inset: 0; pointer-events: none; }
.st-particles canvas { width: 100%; height: 100%; display: block; }
.st-ortho .st-inst { position: relative; width: 82%; max-width: 400px; filter: drop-shadow(0 1px 3px rgba(0,0,0,.6)); }
.st-ortho-leg { position: absolute; left: 10px; bottom: 10px; display: flex; flex-wrap: wrap; gap: 6px 12px; padding: 6px 10px; border-radius: 10px;
  background: rgba(6,12,24,.62); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); font-size: 13.5px; font-weight: 600; }
.st-ortho-leg span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.st-ortho-leg i { width: 10px; height: 10px; border-radius: 5px; }

/* půda */
.st-moist { display: grid; grid-template-columns: 70px 1fr auto; gap: 10px; align-items: center; margin: 8px 0; }
.st-moist i { font-style: normal; font-size: 14px; color: #9fb0c8; }
.st-moist em { font-style: normal; font-size: 14px; color: #c3cfdf; white-space: nowrap; }
.st-mbar { height: 10px; border-radius: 5px; background: rgba(255,255,255,.08); overflow: hidden; }
.st-mbar b { display: block; height: 100%; border-radius: 5px; }
.st-ceilo-wrap { position: absolute; inset: 0; }

/* Slunce: teď, kompas, pás fází, tabulka soumraků */
.sun-now { display: grid; grid-template-columns: 200px 1fr; gap: 18px; align-items: center; margin: 8px 0 4px; padding: 12px 16px; border-radius: 20px;
  background: linear-gradient(120deg, rgba(255,194,77,.14), rgba(255,255,255,.04) 60%); border: 1px solid rgba(255,214,130,.22); }
.sun-cmp { width: 200px; height: 200px; display: block; }
.sun-cmp .cl { font-size: 15px; font-weight: 700; fill: #dfe7f2; }
.sun-vals { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; }
.sun-v i { display: block; font-style: normal; font-size: 14px; opacity: .7; }
.sun-v b { display: block; font-size: 52px; font-weight: 300; line-height: 1.05; font-variant-numeric: tabular-nums; letter-spacing: -1px; color: #ffd98a; }
.sun-v em { display: block; font-style: normal; font-size: 15px; opacity: .8; }
.sun-ph { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.1); }
.sun-ph span { width: 14px; height: 14px; border-radius: 4px; align-self: center; border: 1px solid rgba(255,255,255,.25); }
.sun-ph b { font-size: 19px; font-weight: 600; }
.sun-ph em { font-style: normal; font-size: 15px; opacity: .8; }
.sun-bar { position: relative; height: 16px; border-radius: 8px; overflow: hidden; margin: 6px 12px 0 48px; background: #0a0e22; }
.sun-bar i { position: absolute; top: 0; bottom: 0; }
.sun-bar b { position: absolute; top: -2px; bottom: -2px; width: 3px; margin-left: -1.5px; background: #fff; border-radius: 2px; }
.sun-bart { position: relative; height: 18px; margin: 2px 12px 8px 48px; font-size: 12px; opacity: .6; }
.sun-bart span { position: absolute; transform: translateX(-50%); }
#sun-body .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sun-tab { width: 100%; border-collapse: collapse; margin-top: 12px; font-variant-numeric: tabular-nums; }
.sun-tab th { text-align: left; font-size: 14px; font-weight: 600; opacity: .7; padding: 4px 8px; }
.sun-tab td { padding: 8px; border-top: 1px solid rgba(255,255,255,.08); font-size: 19px; font-weight: 600; white-space: nowrap; }
.sun-tab td:first-child { font-size: 16px; white-space: normal; }
.sun-tab td em { display: block; font-style: normal; font-weight: 400; font-size: 13.5px; opacity: .7; margin-left: 24px; }
.sun-sw { display: inline-block; width: 14px; height: 14px; border-radius: 4px; margin-right: 10px; vertical-align: -1px; border: 1px solid rgba(255,255,255,.25); }
@media (max-width: 760px) { .sun-now { grid-template-columns: 1fr; justify-items: center; } #sun-body .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sun-v b { font-size: 40px; } }
/* Slunce: vše na jednu obrazovku (iPad na šířku) */
#sun-modal .dh .big { font-size: 24px; }
.sun-grid { display: grid; grid-template-columns: minmax(330px, 400px) 1fr; gap: 10px 16px; margin-top: 8px; align-items: start; }
.sun-grid .sun-now { grid-column: 1; grid-row: 1; margin: 0; grid-template-columns: 132px 1fr; gap: 12px; padding: 10px 12px; align-self: stretch; }
.sun-grid .sun-cmp { width: 132px; height: 132px; }
.sun-grid .sun-vals { grid-template-columns: 1fr; gap: 6px; }
.sun-grid .sun-v b { font-size: 38px; }
.sun-grid .sun-v b.sm { font-size: 26px; font-weight: 500; }
.sun-grid .sun-v em, .sun-grid .sun-ph em { font-size: 14px; }
.sun-grid .sun-ph { grid-column: 1 / -1; padding-top: 8px; }
.sun-grid .sun-ph b { font-size: 16.5px; }
.sun-grid .astro-chart { grid-column: 2; grid-row: 1; margin: 0; }
.sun-grid .sun-tiles { grid-column: 1; grid-row: 2; grid-template-columns: 1fr 1fr !important; gap: 8px; margin: 0; }
.sun-tiles .tile { padding: 8px 10px; border-radius: 14px; column-gap: 8px; }
.sun-tiles .tile img { width: 40px; height: 40px; margin: -4px -2px; }
.sun-tiles .tile b { font-size: 21px; }
.sun-tiles .tile i, .sun-tiles .tile em { font-size: 12.5px; }
.sun-grid .sun-tab { grid-column: 2; grid-row: 2; margin: 0; }
.sun-grid .sun-tab td { padding: 4px 8px; font-size: 16.5px; }
.sun-grid .sun-tab td:first-child { font-size: 14.5px; }
.sun-grid .sun-tab td em { font-size: 12px; }
.sun-grid .sun-tab th { padding: 0 8px 2px; font-size: 13px; }
@media (max-width: 900px) {
  .sun-grid { grid-template-columns: 1fr; }
  .sun-grid > * { grid-column: 1 !important; grid-row: auto !important; }
  .sun-grid .sun-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
}
.sun-mg .ax { font-size: 19px; } .sun-mg .tv { font-size: 20px; }

@media (max-width: 1100px) and (min-width: 901px) { .st-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .st-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.st-chart .cur, .st-chart .night, .st-chart .tl-band, .st-chart text { pointer-events: none; }

/* ---- stanice bez posouvání na iPadu Pro 11" a 13" (na šířku): kompaktnější rozvržení podle výšky ---- */
@media (min-width: 901px) and (max-height: 1100px) {
  /* Přehled: dlaždice v 6 sloupcích (2 řady), malé kroužky/kompas vynechat, zůstane hodnota a průběh */
  .st-tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
  .st-tile .viz { display: none; }
  .st-tile { padding: 12px 14px; }
  .st-tile b { font-size: 26px; }
  .st-tile .spk, .st-tile .spk > span[data-spark], .st-tile .spk .st-spark { height: 30px; }
  .st-story { padding: 12px 18px; } .st-story p { font-size: 19px; line-height: 1.4; }
  #st-rail { padding-top: 12px; padding-bottom: 12px; gap: 2px; }
  #st-rail button { min-height: 48px; padding: 3px 8px 3px 4px; }
  #st-rail button img { width: 36px; height: 36px; }
  .st-rgrp { margin: 8px 0 0 8px; }
}
@media (min-width: 901px) and (max-height: 900px) {
  #st-hd { padding: 10px 18px 4px 26px; }
  #st-head h2 { font-size: 26px; }
  #st-close { width: 48px; height: 48px; border-radius: 15px; }
  .st-subtabs { margin-bottom: 10px; } .st-subtabs button { min-height: 38px; font-size: 15px; padding: 0 16px; }
  #st-body { padding: 2px 24px 12px; }
  .st-grid { gap: 10px; }
  .st-cell { padding: 12px 15px; border-radius: 18px; }
  .st-big b { font-size: 64px; }
  .st-kv b { font-size: 21px; } .span1 > .st-kv b { font-size: 22px; } .st-kv + .st-kv { margin-top: 8px; padding-top: 8px; }
  .st-now { padding: 14px 18px 12px; }
  .st-now-ico { width: 100px; }
  .st-now-t > b { font-size: 68px; }
  .st-now-desc { font-size: 15.5px; margin-top: 8px; line-height: 1.4; }
  .st-now .st-rangebar { margin-top: 8px; }
  .st-story p { font-size: 17px; }
  .st-tile b { font-size: 23px; } .st-tile em { font-size: 12.5px; }
  .st-inst { max-height: 330px; }
  .st-ortho { min-height: 300px; }
  #st-rail button { min-height: 42px; }
  #st-rail button b { font-size: 15px; } #st-rail button em { font-size: 13px; }
  #st-rail button img { width: 32px; height: 32px; }
}
.st-center { align-items: center; text-align: center; } .st-center .st-big { justify-content: center; }
.st-instsm .st-inst { max-height: 230px; }
@media (min-width: 901px) and (max-height: 900px) {
  .st-inst { max-height: 290px; } .st-instsm .st-inst { max-height: 200px; }
  .st-ortho { min-height: 260px; } .st-ortho .st-inst { max-height: 260px; }
}

/* tlačítko ručního nastavení scény vedle ozubeného kolečka */
#scene-btn { position: absolute; right: calc(96px + var(--sa-r)); top: calc(16px + var(--sa-t)); width: 66px; height: 66px; border-radius: 20px; color: #fff; cursor: pointer;
  display: grid; place-items: center; padding: 0; background: rgba(16,24,38,.34); border: 1px solid rgba(255,255,255,.2); box-shadow: 0 6px 22px rgba(0,0,0,.22); }
#scene-btn:active { transform: scale(.97); background: rgba(255,255,255,.24); }
#scene-btn.on { background: rgba(159,227,216,.22); border-color: rgba(159,227,216,.55); }
/* scéna nastavená ručně (neukazuje živá data): jantarový rámeček + štítek pod ikonou */
#scene-btn.manual { border-color: rgba(255,184,77,.75); box-shadow: 0 0 0 1px rgba(255,184,77,.35), 0 6px 22px rgba(0,0,0,.22); }
#scene-btn.manual::after, #scene-btn.live::after { content: attr(data-badge); position: absolute; left: 50%; bottom: -9px; transform: translateX(-50%);
  padding: 1px 7px; border-radius: 9px; background: #ffb84d; color: #2a1a00; font: 700 11px/16px system-ui, -apple-system, sans-serif;
  white-space: nowrap; box-shadow: 0 2px 6px rgba(0,0,0,.3); pointer-events: none; }
#scene-btn.live::after { background: #4fd18b; color: #062814; }

/* skrytý pás předpovědi (víc místa pro 3D): zůstane varování a tlačítko „předpověď“ */
#fc-show { display: none; flex: none; margin-left: auto; height: 40px; padding: 0 18px; color: #fff; font: inherit; font-size: 15px; font-weight: 600; border-radius: 20px; cursor: pointer; }
body.fc-off #fc, body.fc-off #mg-btn { display: none; }
body.fc-off #fc-show { display: block; }
body.fc-off .fc-top { margin-bottom: 0; }

/* ---- iPhone (úzký displej): horní lišta v jednom řádku menších tlačítek, souhrn počasí pod ní, menší písmo; na šířku totéž zmenšené ---- */
@media (max-width: 600px), (max-height: 500px) {
  #tr-bar { left: calc(10px + var(--sa-l)); right: auto; top: calc(8px + var(--sa-t)); gap: 6px; }
  .tr-btn, #gear, #scene-btn { height: 48px; border-radius: 14px; }
  .tr-btn { padding: 0 8px 0 4px; gap: 4px; min-width: 0; }
  #st-btn { padding: 0 10px; } #st-btn svg { width: 24px; height: 24px; } .st-btn-l { display: none; }
  #scene-btn { width: 48px; right: calc(64px + var(--sa-r)); top: calc(8px + var(--sa-t)); } #scene-btn svg { width: 22px; height: 22px; }
  #gear { width: 48px; right: calc(10px + var(--sa-r)); top: calc(8px + var(--sa-t)); } #gear svg { width: 22px; height: 22px; }
  .tb-rows { grid-template-columns: 18px auto; column-gap: 3px; row-gap: 0; }
  .tb-rows img { width: 22px; height: 22px; margin: -3px -2px; }
  .tb-rows i { font-size: 12px; }
  .tb-rows b { font-size: 13.5px; min-width: 2.9em; }
  .tb-moon svg, .tb-moon img, .tb-moon canvas { width: 24px !important; height: 24px !important; }
  .tb-moon span { font-size: 10px; }
  #now { left: calc(20px + var(--sa-l)); right: calc(14px + var(--sa-r)); top: calc(72px + var(--sa-t)); }
  #now::before { left: -14px; top: -8px; right: -8px; bottom: -10px; border-radius: 30px; }
  #now .place { font-size: 15px; }
  #now-temp { font-size: 64px; letter-spacing: -2px; }
  #now-icon { width: 66px; }
  #now-cond { font-size: 17px; }
  #now-mm { font-size: 13.5px; margin-top: 2px; }
  #now-sub { font-size: 12.5px; margin-top: 2px; }
  #fcwrap { left: calc(10px + var(--sa-l)); right: calc(10px + var(--sa-r)); bottom: calc(10px + var(--sa-b)); }
  #warn { height: 50px; padding: 0 12px 0 6px; gap: 8px; border-radius: 15px; }
  #warn .w-ic { width: 38px; height: 38px; } #warn .w-ic img { width: 36px; height: 36px; }
  #warn .w-txt b { font-size: 16px; } #warn .w-txt span { font-size: 12.5px; }
  #mg-btn, #fc-show { font-size: 13px; }
}
@media (max-width: 600px) {
  .sun-grid .sun-tiles { grid-template-columns: 1fr 1fr !important; }
  .modal { padding-left: 8px; padding-right: 8px; } .modal .card { padding: 14px 12px 12px; border-radius: 22px; }
  .sun-grid .sun-v b { font-size: 30px; }
  .sun-now { padding: 10px; }
}
@media (max-width: 600px) {
  .mhero { gap: 12px; } .mhero > svg { width: 110px; height: 110px; } .mhero > div:not(.tiles) b { font-size: 24px; } .mhero > div:not(.tiles) span { font-size: 14px; }
  .tiles.small { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; flex-basis: 100%; }
  .tiles.small .tile { padding: 8px 10px; border-radius: 14px; } .tiles.small .tile b { font-size: 20px; } .tiles.small .tile em { font-size: 12px; }
  .phases { gap: 4px; } .phases b { font-size: 12px; } .phases span { font-size: 11.5px; } .phases svg { width: 36px; height: 36px; }
  .ctabs button { font-size: 13.5px; padding: 8px 4px; }
}
/* iPhone na šířku: lišta vpravo nahoře, souhrn vlevo nahoře, nízký pás předpovědi */
@media (max-height: 500px) and (min-width: 601px) {
  #tr-bar { left: auto; right: calc(118px + var(--sa-r)); }
  #now { top: calc(8px + var(--sa-t)); right: auto; }
  #now-temp { font-size: 52px; } #now-icon { width: 52px; } #now .place { font-size: 13px; } #now-cond { font-size: 15px; }
  #now-sub { display: none; }
  #fc img, #fc .day img { width: 40px; height: 40px; } #fc .tt { font-size: 17px; } #fc .tx { display: none; }
  #fc { padding-top: 6px; padding-bottom: 6px; } .fc-top { margin-bottom: 6px; }
}

/* Sdílet: odkaz na aktuální nastavení scény */
#share-out { margin: 0 20px 10px; font-size: 12.5px; opacity: .9; }
#share-out .share-row { display: flex; gap: 8px; margin-top: 5px; }
#share-url { flex: 1; min-width: 0; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: rgba(0,0,0,.25); color: #fff; font: inherit; font-size: 12px; padding: 0 10px; }

/* meteogram: odečítání hodnot (prst / myš) */
.mg-wrap { position: relative; touch-action: pan-y; cursor: crosshair; user-select: none; -webkit-user-select: none; }
.mg-cur { position: absolute; width: 0; border-left: 1px solid rgba(255,255,255,.7); pointer-events: none; }
.mg-cur i { position: absolute; left: -5px; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%; background: #ffb35c; box-shadow: 0 0 0 2px rgba(0,0,0,.35); }
.mg-tip { position: absolute; min-width: 190px; padding: 10px 12px; border-radius: 14px; pointer-events: none; color: #fff;
  background: rgba(16,24,38,.82); border: 1px solid rgba(255,255,255,.18); box-shadow: 0 8px 24px rgba(0,0,0,.35);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); font-size: 13px; line-height: 1.35; }
.mg-tip .mt-h { opacity: .8; margin-bottom: 4px; }
.mg-tip .mt-main { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.mg-tip .mt-main img { width: 44px; height: 44px; }
.mg-tip .mt-t { font-size: 24px; font-weight: 700; }
.mg-tip .mt-x { opacity: .85; }
.mg-tip .mt-row { display: flex; justify-content: space-between; gap: 14px; }
.mg-tip .mt-row span { opacity: .7; }
.mg-tip .mt-row small { opacity: .7; font-weight: 400; }
.mg .gu { fill: #ffcf8a; }
.legend .lgu { color: #ffcf8a; font-style: normal; }

/* webkamery, studna (js/cams.js) – body ve scéně a okno se snímkem */
#pins { position: fixed; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
#pins .pin { position: absolute; left: 0; top: 0; pointer-events: auto; display: flex; align-items: center; gap: 4px; height: 32px; padding: 0 10px 0 8px;
  border-radius: 16px; border: 1px solid rgba(255,255,255,.35); background: rgba(14,19,28,.62); color: #fff; font: 600 14px/1 system-ui, sans-serif;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: 0 2px 10px rgba(0,0,0,.35); cursor: pointer; will-change: transform; }
#pins .pin svg { width: 18px; height: 18px; }
#pins .pin.cam svg { color: #8fd3ff; }
#pins .pin.water svg { color: #4fb3ff; }
#pins .pin::after { content: ''; position: absolute; left: 50%; bottom: -6px; width: 2px; height: 6px; margin-left: -1px; background: rgba(255,255,255,.5); }
#pins .pin:active { transform: scale(.95); }
#cam-modal .card { width: min(1100px, 100%); }
#cam-modal h2 small { font-size: 15px; font-weight: 400; opacity: .7; margin-left: 6px; }
#cam-modal .cm-img { position: relative; border-radius: 12px; overflow: hidden; background: #000; }
#cam-modal .cm-img img { display: block; width: 100%; height: auto; max-height: 72vh; object-fit: contain; }
#cam-modal .cm-t { position: absolute; right: 8px; bottom: 8px; padding: 3px 8px; border-radius: 8px; background: rgba(0,0,0,.55); font-size: 13px; }
#cam-modal .cm-tabs { margin-top: 10px; display: flex; gap: 6px; }
#cam-modal .cm-tabs button { flex: 1; }
#cam-modal .cm-tanks { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
#cam-modal .cm-tank { display: flex; gap: 14px; align-items: stretch; padding: 12px; border-radius: 12px; background: rgba(255,255,255,.06); }
#cam-modal .cm-bar { position: relative; width: 34px; min-height: 120px; border-radius: 8px; border: 1px solid rgba(255,255,255,.3); overflow: hidden; }
#cam-modal .cm-bar i { position: absolute; left: 0; right: 0; bottom: 0; }
#cam-modal .cm-tank h3 { margin: 0 0 2px; font-size: 16px; }
#cam-modal .cm-tank p { margin: 2px 0; font-size: 14px; }
#cam-modal .cm-tank .big { font-size: 30px; font-weight: 600; }
#cam-modal .cm-tank .mut { opacity: .6; font-size: 12px; }
#cam-modal .cm-tabs button { padding: 8px 0; border-radius: 10px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06); color: #fff; font: 600 15px system-ui, sans-serif; }
#cam-modal .cm-tabs button.on { background: rgba(143,211,255,.3); border-color: rgba(143,211,255,.6); }
#pins .pin { transition: opacity .3s; }
#pins .pin.occ { opacity: 0; pointer-events: none; }
