:root {
  --bg: #000; --s1: #0d0d0f; --s2: #151518; --hair: #222;
  --t: #ededed; --t2: #9a9aa2;
  --modra: #4ea1ff; --jantar: #ffb020; --sede: #6b6b73; --cerv: #ff5a5f; --zel: #3ccf7a;
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; }
[hidden] { display: none !important; }
html, body { height: 100%; background: #000; color: var(--t); overflow: hidden; -webkit-text-size-adjust: 100%; }
body {
  font: 15px/1.35 -apple-system, "SF Pro Text", system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  overscroll-behavior: none;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; touch-action: manipulation; }
ul { list-style: none; padding: 0; }
small { font-size: 12px; color: var(--t2); font-weight: 400; }
em { font-style: normal; color: var(--t2); }

/* ---------- kostra ---------- */
#app {
  position: fixed; inset: 0; display: flex; flex-direction: column;
  padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right);
  transition: transform 2s ease;
}

/* horní lišta */
#horni {
  display: grid; align-items: center; gap: 2px 14px;
  grid-template-columns: 1fr auto; grid-template-areas: "hod stavy" "pcs pcs";
  padding: calc(env(safe-area-inset-top) + 2px) 16px 6px;
  border-bottom: 1px solid var(--hair);
}
@media (orientation: landscape) {
  #horni { grid-template-columns: auto 1fr auto; grid-template-areas: "hod pcs stavy"; padding-top: 2px; padding-bottom: 2px; }
}
#hodiny { grid-area: hod; display: flex; align-items: baseline; gap: 10px; min-height: 44px; padding: 0 4px; text-align: left; align-self: center; }
#cas { font-size: 32px; font-weight: 600; letter-spacing: -.5px; line-height: 44px; }
#datum { font-size: 13px; color: var(--t2); white-space: nowrap; }
#pcs { grid-area: pcs; display: flex; gap: 16px; min-width: 0; overflow: hidden; padding: 0 4px; }
@media (orientation: landscape) { #pcs { justify-content: center; } }
.pc { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; min-width: 0; max-width: 120px; }
.pc span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc.off { color: var(--t2); }
#stavy { grid-area: stavy; display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
#odznak {
  display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 14px; border-radius: 22px;
  background: rgba(255,176,32,.14); border: 1px solid var(--jantar); color: var(--jantar); font-weight: 700; font-size: 17px;
  animation: odznak 1.4s ease-in-out infinite;
}
@keyframes odznak { 50% { background: rgba(255,176,32,.32); } }
#spojeni {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; padding: 6px 10px; margin: 2px 0 2px;
  border-radius: 10px; background: rgba(255,90,95,.12); color: var(--cerv); font-size: 13px; font-weight: 600;
}

/* pruhy pod horní lištou */
#pruhy:empty, #pruhy { display: block; }
#zvukBanner {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 40; white-space: nowrap;
  bottom: calc(env(safe-area-inset-bottom) + 58px); min-height: 44px; padding: 0 22px; border-radius: 22px;
  border: 1px solid var(--jantar); background: #1f1700; color: var(--jantar); font-weight: 600;
}
#authBanner { margin: 8px 16px 0; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--cerv); background: rgba(255,90,95,.1); color: var(--cerv); font-weight: 600; }

/* panely */
#panely {
  flex: 1; min-height: 0; display: flex; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
#panely::-webkit-scrollbar { display: none; }
.panel {
  flex: 0 0 100%; min-width: 0; scroll-snap-align: start; scroll-snap-stop: always;
  overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  padding: 14px 16px 22px;
}
.panel > div { min-width: 0; }
.prazdno { color: var(--t2); text-align: center; padding: 28px 0; }
.prazdno.mal { padding: 14px 0; text-align: left; }

/* záložky: dole (na výšku) / levá lišta (na šířku) */
#telo { flex: 1; min-height: 0; display: flex; flex-direction: column; }
#zalozky { display: flex; border-top: 1px solid var(--hair); padding-bottom: env(safe-area-inset-bottom); }
.zalozka {
  flex: 1; min-width: 0; min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--t2); font-size: 10.5px; font-weight: 600; position: relative; letter-spacing: .01em;
}
.zalozka .zi, .zalozka .zi svg { width: 22px; height: 22px; display: block; }
.zn { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.1; }
.zalozka.akt { color: var(--t); }
.zalozka.akt .zi { color: var(--modra); }
.zalozka.akt::before { content: ''; position: absolute; top: -1px; left: 22%; right: 22%; height: 2px; background: var(--modra); }
@media (orientation: landscape) {
  #telo { flex-direction: row; }
  #zalozky { order: -1; flex-direction: column; width: 68px; flex: none; border-top: 0; border-right: 1px solid var(--hair); padding-bottom: env(safe-area-inset-bottom); }
  .zalozka { min-height: 44px; gap: 2px; }
  .zalozka.akt::before { top: 18%; bottom: 18%; left: auto; right: -1px; width: 2px; height: auto; }
  #panely { min-width: 0; }
  .panel { padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
}

/* ---------- společné prvky ---------- */
.tecka { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--sede); display: inline-block; }
.tecka.zel { background: var(--zel); } .tecka.modra { background: var(--modra); } .tecka.jantar { background: var(--jantar); }
.tecka.cerv { background: var(--cerv); } .tecka.sede { background: var(--sede); }
.tecka.pulz { animation: pulz 2.6s ease-in-out infinite; }
@keyframes pulz { 0%,100% { box-shadow: 0 0 0 0 rgba(78,161,255,.55); opacity: 1; } 50% { box-shadow: 0 0 0 5px rgba(78,161,255,0); opacity: .75; } }

.nadpis { font-size: 13px; font-weight: 600; color: var(--t2); margin: 0 2px 8px; letter-spacing: .02em; }
.nadpis small { margin-left: 6px; }
.m-l { display: block; font-size: 12px; color: var(--t2); }
.karta { background: var(--s1); border: 1px solid var(--hair); border-radius: 14px; padding: 14px; margin-bottom: 12px; }
.bar { height: 6px; background: #1d1d21; border-radius: 3px; overflow: hidden; }
.bar i { display: block; height: 100%; background: #c9ccd6; border-radius: 3px; }
.bar i.jantar { background: var(--jantar); } .bar i.cerv { background: var(--cerv); }

.tl {
  min-height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid #2c2c31; background: var(--s2);
  font-weight: 600; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; text-align: center;
}
.tl.cerv { color: var(--cerv); border-color: rgba(255,90,95,.45); }
.tl.nebezpeci { background: var(--cerv); border-color: var(--cerv); color: #1a0000; }
.tl.ok { background: var(--t); color: #000; border-color: var(--t); }
.tl.mini { min-height: 44px; padding: 0 16px; }
.tl:disabled { opacity: .5; }

/* ---------- Velín ---------- */
.dnes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--hair); border: 1px solid var(--hair); border-radius: 14px; overflow: hidden; margin-bottom: 16px; }
.dnes-b { background: var(--s1); padding: 10px 12px; min-width: 0; }
.dnes-b b { display: block; font-size: 22px; font-weight: 600; letter-spacing: -.3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.velin-sl { display: grid; gap: 18px; }
@media (orientation: landscape) { .velin-sl { grid-template-columns: 1.2fr 1fr; align-items: start; gap: 16px; } }
.skup { margin-bottom: 14px; }
.skup-h { display: flex; align-items: center; gap: 8px; margin: 0 2px 8px; }
.skup-h b { font-size: 15px; }
.skup-h span { margin-left: auto; font-size: 13px; color: var(--t2); }
.off-r { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 12px; border: 1px solid var(--hair); border-radius: 12px; color: var(--t2); margin-bottom: 14px; }
.off-r b { color: var(--t2); font-weight: 600; white-space: nowrap; }
.off-r span { margin-left: auto; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sess-l { background: var(--s1); border: 1px solid var(--hair); border-radius: 14px; overflow: hidden; }
.sess, .ud { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-bottom: 1px solid var(--hair); min-height: 56px; }
.sess:last-child, .ud:last-child { border-bottom: 0; }
.sess-t, .ud-t { flex: 1; min-width: 0; }
.sess-t b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sess-t span { display: block; font-size: 13px; color: var(--t2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sess-d { font-size: 13px; white-space: nowrap; color: var(--t2); flex: none; }
.st-ceka { background: rgba(255,176,32,.07); }
.st-ceka .sess-d { color: var(--jantar); font-weight: 600; }
.st-pracuje .sess-d { color: var(--modra); }
.st-chyba .sess-d { color: var(--cerv); }
.ud { min-height: 48px; align-items: flex-start; }
.ud .tecka { margin-top: 5px; }
.ud-1 { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ud-2 { font-size: 13px; color: var(--t2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Počítače ---------- */
.pk-sl { display: grid; gap: 12px; }
@media (orientation: landscape) { .pk-sl { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }
.pk { margin: 0; }
.pk-h { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.pk.off .pk-h { margin: 0; }
.pk-n { flex: 1; min-width: 0; }
.pk-n b { display: block; font-size: 20px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-n span { font-size: 13px; color: var(--t2); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-s { text-align: right; flex: none; }
.pk-s small { display: block; margin-top: 2px; }
.pill { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; }
.mery { display: grid; gap: 11px; }
.mer-h { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 5px; font-size: 14px; min-width: 0; }
.mer-h span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.mer-h b { font-weight: 600; white-space: nowrap; }
.podnadpis { font-size: 13px; font-weight: 600; color: var(--t2); margin: 16px 2px 6px; }
.podnadpis small { margin-left: 6px; }
.procesy { border: 1px solid var(--hair); border-radius: 12px; overflow: hidden; }
.proc { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 12px; border-bottom: 1px solid var(--hair); text-align: left; font-size: 14px; }
.proc:last-child { border-bottom: 0; }
.proc-n { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.proc-c, .proc-r { flex: none; text-align: right; color: var(--t2); font-size: 13px; }
.proc-c { width: 56px; color: var(--t); } .proc-r { width: 70px; }
.edge { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; padding: 6px 6px 6px 12px; border-radius: 12px; background: rgba(255,176,32,.09); border: 1px solid rgba(255,176,32,.4); color: var(--jantar); font-size: 14px; }
.edge span { min-width: 0; }
.akce-r { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.akce-r .tl { padding: 0 6px; font-size: 14px; }

/* ---------- Statistiky ---------- */
.stat-hl { margin-bottom: 14px; display: grid; gap: 10px; }
.seg { display: flex; background: var(--s2); border: 1px solid var(--hair); border-radius: 12px; padding: 3px; }
.seg button { flex: 1; min-height: 44px; border-radius: 9px; font-weight: 600; color: var(--t2); }
.seg button.akt { background: #2a2a30; color: var(--t); }
.seg.mini button { min-height: 44px; padding: 0 12px; flex: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 0 16px; border-radius: 22px; border: 1px solid var(--hair); color: var(--t2); font-weight: 600; font-size: 14px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip.akt { background: var(--t); color: #000; border-color: var(--t); }
@media (orientation: landscape) { .stat-hl { grid-template-columns: 1fr 1.4fr; align-items: center; } }
.stat-sl > .karta { break-inside: avoid; }
@media (orientation: landscape) { .stat-sl { column-count: 2; column-gap: 12px; } }
.hero > b { display: block; font-size: 48px; font-weight: 700; letter-spacing: -1.2px; line-height: 1.05; margin: 2px 0 4px; }
@media (orientation: landscape) { .hero > b { font-size: 40px; } }
.pozn { font-size: 12px; color: var(--t2); line-height: 1.4; }
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0 12px; padding-top: 12px; border-top: 1px solid var(--hair); }
.trio > div { min-width: 0; }
.trio b { display: block; font-size: 18px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rb { margin-bottom: 13px; }
.rb:last-child { margin-bottom: 0; }
.rb-h { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 5px; }
.rb-n { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.rb-h b { font-weight: 600; white-space: nowrap; }
.rb-p { font-size: 12px; color: var(--t2); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.karta > .mer { margin-bottom: 12px; } .karta > .mer:last-child { margin-bottom: 0; }
.hod { display: flex; align-items: flex-end; gap: 3px; height: 70px; }
.hod i { flex: 1; background: #34343b; border-radius: 2px 2px 0 0; min-height: 2px; }
.hod i.ted { background: var(--modra); }
.hod-o { display: flex; justify-content: space-between; font-size: 11px; color: var(--t2); margin-top: 5px; }

/* ---------- Povolení (celá obrazovka) ---------- */
.ov {
  position: fixed; inset: 0; z-index: 100; background: #000; display: flex; flex-direction: column; gap: 10px;
  padding: calc(env(safe-area-inset-top) + 14px) max(16px, env(safe-area-inset-right)) calc(env(safe-area-inset-bottom) + 14px) max(16px, env(safe-area-inset-left));
}
.ov::after { content: ''; position: absolute; inset: 0; border: 3px solid var(--jantar); pointer-events: none; animation: ovpulz 1.6s ease-in-out infinite; }
@keyframes ovpulz { 50% { opacity: .25; } }
.ov-kdo { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ov-pc { font-size: 13px; font-weight: 700; color: var(--jantar); }
.ov-dalsi { font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 12px; background: var(--s2); border: 1px solid #2c2c31; }
.ov-sess { font-size: 24px; font-weight: 700; letter-spacing: -.3px; line-height: 1.15; margin-top: 4px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ov-proj { font-size: 14px; color: var(--t2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-sred { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.ov-nastroj { display: flex; align-items: baseline; gap: 10px; font-size: 14px; color: var(--t2); }
.ov-nastroj b { font-size: 20px; color: var(--t); font-weight: 700; }
.ov-popis {
  flex: 0 1 auto; min-height: 56px; max-height: calc(8 * 1.45em + 26px); overflow: auto; -webkit-overflow-scrolling: touch;
  background: var(--s1); border: 1px solid var(--hair); border-radius: 12px; padding: 12px;
  font: 14px/1.45 ui-monospace, "SF Mono", Menlo, Consolas, monospace; color: var(--t); white-space: pre-wrap; word-break: break-word;
  -webkit-user-select: text; user-select: text;
}
.ov-cas { height: 6px; background: #1d1d21; border-radius: 3px; overflow: hidden; }
.ov-cas div { height: 100%; width: 100%; background: var(--jantar); }
.ov-cas div.malo { background: var(--cerv); }
.ov-zbyva { font-size: 13px; color: var(--t2); text-align: right; margin-top: -4px; }
.ov-tl { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ov-tl button { min-height: 104px; border-radius: 18px; font-size: 26px; font-weight: 700; }
.ov-tl button:disabled { opacity: .45; }
#ovDeny { border: 2px solid var(--cerv); color: var(--cerv); background: transparent; }
#ovAllow { background: var(--zel); color: #00170a; }
@media (orientation: landscape) {
  .ov { gap: 6px; padding-top: calc(env(safe-area-inset-top) + 8px); padding-bottom: calc(env(safe-area-inset-bottom) + 8px); }
  .ov-sess { font-size: 20px; -webkit-line-clamp: 1; margin-top: 0; }
  .ov-sred { gap: 6px; }
  .ov-tl button { min-height: 72px; font-size: 22px; }
  .ov-popis { max-height: calc(8 * 1.45em + 26px); }
}
.ov-hotovo { position: absolute; inset: 0; z-index: 2; background: #000; display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 700; text-align: center; padding: 20px; }

/* ---------- Záblesk a ztmavení ---------- */
#zablesk { position: fixed; inset: 0; z-index: 50; pointer-events: none; opacity: 0; --c: 255,176,32; box-shadow: inset 0 0 0 8px rgba(var(--c), .95), inset 0 0 90px rgba(var(--c), .5); background: rgba(var(--c), .08); }
#zablesk.blik { animation: zablesk 1s ease-out 2; }
@keyframes zablesk { 0% { opacity: 1; } 100% { opacity: 0; } }
#zhasnuti { position: fixed; inset: 0; z-index: 60; background: #000; opacity: 0; pointer-events: none; transition: opacity 1.5s ease; }
#zhasnuti.chyta { pointer-events: auto; }

/* ---------- Sheet, toast ---------- */
#zaves { position: fixed; inset: 0; z-index: 69; background: rgba(0,0,0,.65); opacity: 0; pointer-events: none; transition: opacity .2s; }
#zaves.otevreno { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; margin: 0 auto; max-width: 560px;
  transform: translateY(110%); transition: transform .25s ease; visibility: hidden;
  background: var(--s2); border: 1px solid #2a2a2e; border-bottom: 0; border-radius: 18px 18px 0 0;
  padding: 18px max(16px, env(safe-area-inset-right)) calc(16px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  max-height: 94vh; overflow-y: auto;
}
.sheet.otevreno { transform: none; visibility: visible; }
.sheet h2 { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.sheet p { color: var(--t2); margin-bottom: 16px; }
.sh-tl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.sh-tl.tri { grid-template-columns: 1fr 1fr 1fr; margin-top: 14px; }
.nr { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; border-bottom: 1px solid var(--hair); font-size: 16px; }
.nr .seg { flex: none; }
.sw { position: relative; width: 56px; height: 44px; flex: none; }
.sw i { position: absolute; left: 0; top: 7px; width: 56px; height: 30px; border-radius: 15px; background: #2c2c31; transition: background .2s; }
.sw i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #d8d8de; transition: transform .2s; }
.sw[aria-checked="true"] i { background: var(--zel); }
.sw[aria-checked="true"] i::after { transform: translateX(26px); background: #fff; }
@media (orientation: landscape) { .sheet h2 { font-size: 18px; } .nr { min-height: 50px; } }

#toast {
  position: fixed; left: 50%; top: calc(env(safe-area-inset-top) + 64px); z-index: 120; max-width: min(92vw, 520px);
  transform: translate(-50%, -16px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
  padding: 12px 16px; border-radius: 12px; background: #1b1b1f; border: 1px solid #2c2c31; border-left: 4px solid var(--t2); font-weight: 600;
}
#toast.vidno { opacity: 1; transform: translate(-50%, 0); }
#toast.ok { border-left-color: var(--zel); } #toast.chyba { border-left-color: var(--cerv); }
@media (orientation: landscape) { #toast { top: 54px; } }

@media (prefers-reduced-motion: reduce) {
  .tecka.pulz, #odznak { animation: none; }
}

/* ======================= v2 ======================= */
.cv { color: var(--cerv); } .jt { color: var(--jantar); }
.seg button:disabled { opacity: .4; } .seg button.akt:disabled { opacity: 1; }
#toast.varovani { border-left-color: var(--jantar); }
.tw-b { display: inline-block; padding: 2px 6px; border-radius: 5px; background: var(--cerv); color: #1a0000; font-size: 10px; font-weight: 800; letter-spacing: .04em; }

/* chip focus timeru v horní liště */
#fokusChip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 22px; border: 1px solid var(--modra); color: var(--modra); font-weight: 700; font-size: 16px; }
#fokusChip i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: pulz 2.6s ease-in-out infinite; }
#fokusChip.pauza { border-color: var(--jantar); color: var(--jantar); } #fokusChip.pauza i { animation: none; }

/* pruh ve Velínu */
.pruh { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.pr { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1px solid var(--hair); border-radius: 22px; background: var(--s1); font-size: 13px; font-weight: 600; white-space: nowrap; }
.pr.cv { border-color: rgba(255,90,95,.5); background: rgba(255,90,95,.08); }
.pr.jt { border-color: rgba(255,176,32,.5); background: rgba(255,176,32,.08); }

/* OBS řádek v Počítačích */
.obs-r { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 14px; padding: 10px 12px; border: 1px solid var(--hair); border-radius: 12px; font-size: 13px; color: var(--t2); }
.obs-r b { color: var(--t); font-weight: 600; } .obs-r .cv b { color: inherit; }

/* ---------- Deck ---------- */
#p-deck { padding: 8px 12px 12px; }
.dk-wrap { display: flex; flex-direction: column; gap: 8px; }
.dk-hl { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.dk-hl .seg { flex: 1 1 100%; }
.dk-stav { flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; font-size: 12.5px; color: var(--t2); min-width: 0; padding: 0 2px; }
.dk-stav b { color: var(--t); font-weight: 600; } .dk-stav em { color: var(--t2); }
.sr-live { padding: 2px 7px; border-radius: 6px; background: var(--cerv); color: #1a0000; font-size: 11px; font-weight: 800; letter-spacing: .04em; }
.sr-off { color: var(--t2); font-weight: 600; } .sr-tw { color: var(--t); }
.dk-mr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.dk {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 0; padding: 8px 6px;
  aspect-ratio: 1 / 1; border-radius: 14px; border: 1px solid #26262b; background: var(--s1); text-align: center; overflow: hidden;
  transition: transform .08s ease, background .2s, border-color .2s; -webkit-touch-callout: none;
}
.dk:active:not(:disabled) { transform: scale(.93); background: var(--s2); }
.dk-ik { position: relative; width: 30px; height: 30px; color: var(--ak, #c9ccd6); display: grid; place-items: center; }
.dk-ik .ik { width: 30px; height: 30px; }
.dk-n { max-width: 100%; font-size: 14px; font-weight: 600; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dk-p { max-width: 100%; font-size: 11px; color: var(--t2); line-height: 1.1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-height: 1.1em; }
.dk.akt { border-color: var(--modra); box-shadow: inset 0 0 0 1px var(--modra); background: rgba(78,161,255,.1); }
.dk.akt .dk-ik { color: var(--modra); }
.dk-zivo { position: absolute; top: 6px; right: 6px; padding: 1px 5px; border-radius: 5px; background: var(--cerv); color: #1a0000; font-size: 9px; font-weight: 800; letter-spacing: .04em; }
.dk.live { border-color: var(--cerv); background: rgba(255,90,95,.14); }
.dk.live .dk-ik, .dk.live .dk-p { color: var(--cerv); } .dk.live .dk-p { font-weight: 700; }
.dk.mute { border-color: rgba(255,90,95,.55); background: rgba(255,90,95,.08); }
.dk.mute .dk-ik, .dk.mute .dk-p { color: var(--cerv); } .dk.mute .dk-p { font-weight: 700; }
.dk.vyp { opacity: .45; }
.dk.cek { pointer-events: none; } .dk.cek .dk-ik .ik { opacity: .2; }
.dk-sp { position: absolute; width: 26px; height: 26px; border-radius: 50%; border: 3px solid rgba(255,255,255,.18); border-top-color: var(--t); animation: tocit .8s linear infinite; }
@keyframes tocit { to { transform: rotate(360deg); } }
.dk.ok { border-color: var(--zel); background: rgba(60,207,122,.24); } .dk.ok .dk-ik, .dk.ok .dk-p { color: var(--zel); }
.dk.chyba { border-color: var(--cerv); background: rgba(255,90,95,.26); } .dk.chyba .dk-ik, .dk.chyba .dk-p { color: var(--cerv); }
.dk.potvrd { border-color: var(--jantar); background: rgba(255,176,32,.17); } .dk.potvrd .dk-ik, .dk.potvrd .dk-p { color: var(--jantar); } .dk.potvrd .dk-p { font-weight: 700; }
@media (orientation: landscape) {
  #p-deck { padding: 6px 12px calc(8px + env(safe-area-inset-bottom)); }
  .dk-hl { flex-wrap: nowrap; gap: 14px; }
  .dk-hl .seg { flex: none; width: 230px; }
  .dk-stav { flex: 1 1 0; flex-wrap: nowrap; overflow: hidden; white-space: nowrap; gap: 2px 10px; }
  .dk-mr { grid-template-columns: repeat(5, minmax(0, 1fr)); grid-auto-rows: max(66px, calc((100dvh - 50px - 6px - 8px - env(safe-area-inset-bottom) - 44px - 8px - 16px) / 3)); }
  .dk { aspect-ratio: auto; gap: 2px; padding: 6px 4px; }
  .dk-ik, .dk-ik .ik { width: 26px; height: 26px; }
}

/* ---------- Servery ---------- */
.sv { margin-bottom: 18px; }
.sv-h { display: flex; align-items: center; gap: 10px; margin: 0 2px 8px; }
.sv-h b { font-size: 17px; font-weight: 600; }
.sv-h span { margin-left: auto; font-size: 13px; color: var(--t2); }
.sv-g { display: grid; gap: 12px; align-items: start; }
@media (orientation: landscape) { .sv-g { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, .8fr); } }
.sv .karta { margin: 0; padding: 12px; }
.sv-off { color: var(--cerv); font-weight: 600; }
.sv-kh { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 8px; font-size: 15px; }
.sv-kh b { font-weight: 600; } .sv-kh span { font-size: 12px; color: var(--t2); white-space: nowrap; }
.sv-l { border-top: 1px solid var(--hair); }
.sv-r { display: flex; align-items: center; gap: 9px; min-height: 36px; border-bottom: 1px solid var(--hair); font-size: 13px; }
.sv-r b { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 0 1 auto; }
.sv-r span { margin-left: auto; flex: 1 1 0; min-width: 0; text-align: right; color: var(--t2); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sv-r.cv b, .sv-r.cv span { color: var(--cerv); } .sv-r.jt b, .sv-r.jt span { color: var(--jantar); }
.sv-r:last-child { border-bottom: 0; }
.sv-vic { display: flex; width: 100%; min-height: 44px; align-items: center; justify-content: center; margin-top: 4px; border-radius: 10px; color: var(--t2); font-size: 13px; font-weight: 600; background: var(--s2); }
.sv-l + .sv-vic, .sv-kh + .sv-vic { margin-top: 6px; }
.web-l { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1px; background: var(--hair); border: 1px solid var(--hair); border-radius: 14px; overflow: hidden; }
@media (orientation: landscape) { .web-l { grid-template-columns: repeat(2, minmax(0, 1fr)); } .web-l .web:last-child:nth-child(odd) { grid-column: 1 / -1; } }
.web { display: flex; align-items: center; gap: 9px; min-height: 52px; padding: 6px 12px; background: var(--s1); }
.web.dole { background: #1a0d0e; }
.web-t { flex: 1; min-width: 0; }
.web-t b { display: block; font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.web-t span { display: block; font-size: 12px; color: var(--t2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.web.dole .web-t span { color: var(--cerv); }
.web-m, .web-c, .web-k { flex: none; text-align: right; font-size: 12px; color: var(--t2); white-space: nowrap; }
.web-m { width: 52px; } .web-c { width: 62px; } .web-k { width: 26px; }
.web-c.cv, .web-k.cv { color: var(--cerv); font-weight: 700; } .web-c.jt { color: var(--jantar); font-weight: 700; }
.nadpis small.cv { color: var(--cerv); }

/* ---------- Den ---------- */
.den-sl { display: grid; gap: 16px; }
@media (orientation: landscape) { .den-sl { grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); align-items: start; gap: 18px; } }
.den-hod { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 12px; }
.den-hod b { font-size: 58px; font-weight: 600; letter-spacing: -1.6px; line-height: 1; }
.den-hod span { font-size: 16px; color: var(--t2); }
@media (orientation: landscape) { .den-hod { margin-bottom: 8px; } .den-hod b { font-size: 44px; } .den-hod span { font-size: 14px; } }
.fok { --rk: 172px; margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.fok-kr { position: relative; width: var(--rk); height: var(--rk); flex: none; }
.fok-kr svg { width: 100%; height: 100%; display: block; }
.fok-pozadi { fill: none; stroke: #1d1d21; stroke-width: 8; }
.fok-prog { fill: none; stroke: var(--modra); stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.fok.pauza .fok-prog { stroke: var(--jantar); } .fok.idle .fok-prog { stroke: #3a3a42; }
.fok-st { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.fok-st b { font-size: 38px; font-weight: 600; letter-spacing: -1px; line-height: 1.05; }
.fok-st span { font-size: 12px; color: var(--t2); }
.fok-ov { display: grid; gap: 10px; width: 100%; max-width: 340px; min-width: 0; }
.fok-pres button { padding: 0 4px; font-size: 14px; }
.fok-krok { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fok-krok button { width: 56px; min-height: 44px; border-radius: 12px; border: 1px solid #2c2c31; background: var(--s2); font-size: 22px; font-weight: 600; }
.fok-krok b { font-size: 18px; font-weight: 600; }
.fok-tl { display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px; }
@media (orientation: landscape) {
  .fok { --rk: 128px; flex-direction: row; gap: 14px; padding: 12px; }
  .fok-st b { font-size: 28px; }
  .fok-ov { max-width: none; flex: 1; }
}
.uk { display: flex; align-items: center; gap: 2px; min-height: 52px; padding: 0 12px 0 0; border-bottom: 1px solid var(--hair); }
.uk:last-child { border-bottom: 0; }
.uk-k { width: 50px; height: 50px; flex: none; display: grid; place-items: center; }
.uk-k i { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #4a4a52; display: grid; place-items: center; color: transparent; transition: background .15s, border-color .15s; }
.uk-k:active i { transform: scale(.9); }
.uk.hot .uk-k i { background: var(--zel); border-color: var(--zel); color: #00170a; }
.uk-t { flex: 1; min-width: 0; padding: 6px 0; }
.uk-t b { font-weight: 500; font-size: 15px; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.uk-t span { display: block; font-size: 12px; color: var(--t2); }
.uk.hot .uk-t b { color: var(--t2); text-decoration: line-through; }
.uk.pozde .uk-t span { color: var(--cerv); font-weight: 600; }
.kal-d { padding: 8px 12px 4px; font-size: 12px; font-weight: 600; color: var(--t2); background: var(--s2); border-bottom: 1px solid var(--hair); }
.kal { display: flex; gap: 12px; padding: 9px 12px; min-height: 48px; border-bottom: 1px solid var(--hair); }
.kal:last-child { border-bottom: 0; }
.kal-c { width: 86px; flex: none; font-size: 13px; font-weight: 600; color: var(--modra); padding-top: 1px; }
.kal-t { min-width: 0; flex: 1; }
.kal-t b { display: block; font-weight: 500; font-size: 15px; line-height: 1.25; }
.kal-t span { display: block; font-size: 12px; color: var(--t2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kal.bylo { opacity: .45; }
.den-p > section { margin-bottom: 16px; }
.tw-r { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 12px; margin-bottom: 14px; border: 1px solid var(--hair); border-radius: 12px; font-size: 14px; }
.tw-r.live { border-color: rgba(255,90,95,.45); }
.tw-r span:last-child { margin-left: auto; min-width: 0; flex: 1; text-align: right; font-size: 12px; color: var(--t2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.den-ch { font-size: 12px; color: var(--jantar); }
