:root {
  --bg: #0e1116;
  --panel: #171b22;
  --panel-2: #1f252e;
  --line: #2a313c;
  --text: #e7ebf0;
  --muted: #8b96a5;
  --accent: #ffb020;
  --accent-ink: #1a1200;
  --live: #ff3b3b;
  --ok: #34c759;
  --warn: #ffb020;
  --bad: #ff453a;
  --radius: 14px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font: 16px/1.45 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  min-height: 100vh;
  padding: env(safe-area-inset-top) 16px calc(24px + env(safe-area-inset-bottom));
  -webkit-tap-highlight-color: transparent;
}
main { max-width: 720px; margin: 0 auto; }
header.top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 0 14px;
}
.brand { font-weight: 800; letter-spacing: .12em; font-size: 15px; }
.brand b { color: var(--accent); }
.brand small { display: block; font-weight: 500; letter-spacing: .02em; color: var(--muted); font-size: 12px; }
a { color: var(--accent); }

.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; margin-bottom: 14px;
}
.card h2 { margin: 0 0 12px; font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; }

label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 6px; }
label:first-of-type { margin-top: 0; }
input, select {
  width: 100%; font: inherit; color: var(--text); background: var(--panel-2);
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; min-height: 48px;
}
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
input.code { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: 22px; letter-spacing: .12em; text-transform: uppercase; text-align: center; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; min-width: 0; }

button {
  font: inherit; font-weight: 700; border: 0; border-radius: 12px; cursor: pointer;
  padding: 14px 18px; min-height: 52px; background: var(--panel-2); color: var(--text);
  border: 1px solid var(--line);
}
button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
button.danger { background: var(--live); color: #fff; border-color: var(--live); }
button.block { width: 100%; margin-top: 16px; }
button:disabled { opacity: .45; cursor: default; }
button.small { min-height: 36px; padding: 6px 12px; font-size: 13px; }

.pill {
  display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 6px 12px;
  background: var(--panel-2); border: 1px solid var(--line); font-size: 13px; font-weight: 600; white-space: nowrap;
}
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: none; }
.dot.ok { background: var(--ok); }
.dot.warn { background: var(--warn); }
.dot.bad { background: var(--bad); }
.dot.live { background: var(--live); box-shadow: 0 0 0 0 rgba(255,59,59,.7); animation: pulse 1.6s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(255,59,59,0); } 100% { box-shadow: 0 0 0 0 rgba(255,59,59,0); } }

.channels { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.channel {
  text-align: left; padding: 14px; min-height: 76px; display: flex; flex-direction: column; justify-content: space-between;
}
.channel .name { font-size: 18px; letter-spacing: .06em; }
.channel .meta { font-size: 12px; color: var(--muted); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.channel.active { outline: 2px solid var(--accent); }

.big-status { display: flex; align-items: center; gap: 14px; }
.big-status .dot { width: 14px; height: 14px; }
.big-status .title { font-size: 22px; font-weight: 800; letter-spacing: .04em; }
.big-status .sub { color: var(--muted); font-size: 14px; }

.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-top: 4px; }
.stat { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.stat .k { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.stat .v { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 2px; }

input[type=range] { padding: 0; min-height: 44px; background: transparent; border: 0; accent-color: var(--accent); }
.volume { display: flex; align-items: center; gap: 12px; }
.volume output { width: 60px; white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }

.meter { height: 14px; background: var(--panel-2); border-radius: 7px; overflow: hidden; border: 1px solid var(--line); margin-top: 6px; position: relative; }
.meter i { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, var(--ok) 0 70%, var(--warn) 70% 88%, var(--bad) 88%); transition: width 60ms linear; }
.meter + .meter { margin-top: 4px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.table-wrap { overflow-x: auto; }

.note { color: var(--muted); font-size: 13px; }
.error { color: var(--bad); font-weight: 600; margin-top: 10px; min-height: 1em; }
.hidden { display: none !important; }
.code-display { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: 26px; font-weight: 800; letter-spacing: .14em; color: var(--accent); }
.check { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 14px; color: var(--text); }
.check input { width: 20px; height: 20px; min-height: 0; }

/* QR kód */
.qr-row { display: flex; gap: 16px; align-items: center; margin-top: 16px; }
.qr { width: 160px; height: 160px; flex: none; background: #fff; border-radius: 10px; padding: 6px; }
.qr-row .row { flex: 1; }
.qr-row .row > * { flex: none; }
@media (max-width: 520px) { .qr-row { flex-direction: column; align-items: stretch; } .qr { align-self: center; } }
.qr-overlay {
  position: fixed; inset: 0; z-index: 50; background: #fff; color: #000; cursor: zoom-out;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; padding: 24px;
}
.qr-overlay img { width: min(80vh, 90vw); height: min(80vh, 90vw); }
.qr-overlay-text { font-size: clamp(18px, 3vw, 32px); text-align: center; letter-spacing: .04em; }
.qr-overlay-text span { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-weight: 800; letter-spacing: .14em; }

/* rychlé připojení z odkazu/QR */
.quick-code { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: 24px; font-weight: 800; letter-spacing: .14em; color: var(--accent); text-align: center; margin: 4px 0 2px; }
button.huge { font-size: 22px; min-height: 76px; }
.linklike { background: none; border: 0; color: var(--muted); text-decoration: underline; font-weight: 500; font-size: 14px; min-height: 0; padding: 12px 0 0; width: 100%; }

/* přehrávač souborů */
.file-panel { margin-top: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); }
.file-panel input[type=file] { padding: 10px; min-height: 0; background: var(--panel); }
.file-panel audio { width: 100%; margin-top: 12px; }
.playlist { list-style: none; margin: 10px 0 0; padding: 0; max-height: 260px; overflow-y: auto; border-radius: 10px; }
.playlist li {
  display: flex; gap: 10px; align-items: center; padding: 10px 12px; cursor: pointer; border-bottom: 1px solid var(--line);
  background: var(--panel); font-size: 14px; overflow-wrap: anywhere;
}
.playlist li:hover { background: #262d38; }
.playlist li.active { color: var(--accent); font-weight: 700; }
.playlist li .n { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 1.6em; }
.playlist li .d { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }

/* úprava zvuku */
.fx label { display: flex; justify-content: space-between; }
.fx output { color: var(--text); font-variant-numeric: tabular-nums; font-weight: 600; }
.fx input[type=range] { min-height: 32px; }

/* posluchači */
td .sub { display: block; color: var(--muted); font-size: 12px; }
td.actions { white-space: nowrap; text-align: right; }
td.actions button { margin-left: 4px; }
button.warn { background: transparent; color: var(--bad); border-color: var(--bad); }
.blocked { list-style: none; padding: 0; margin: 0; }
.blocked li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }

/* schvalování */
.pending-box { border: 1px solid var(--accent); border-radius: 12px; padding: 12px 14px; margin-bottom: 18px; background: rgba(255,176,32,.07); }
.blocked li .who { min-width: 0; }
.blocked li .who .sub { display: block; color: var(--muted); font-size: 12px; }
.blocked li .btns { display: flex; gap: 6px; flex: none; }
details summary { cursor: pointer; }

/* ================================================================
   Vysílač – široké rozvržení (dashboard)
   ================================================================ */
body.dash main { max-width: 1760px; padding-top: 18px; }
body.dash .card { margin-bottom: 16px; }
body.dash .card h2 { margin-bottom: 14px; }

.livebar {
  position: sticky; top: 0; z-index: 20;
  margin: 0 -16px; padding: 0 16px;
  background: rgba(14, 17, 22, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.livebar-inner {
  max-width: 1760px; margin: 0 auto; min-height: 76px;
  display: grid; grid-template-columns: auto minmax(220px, 1fr) minmax(180px, 320px) auto auto;
  align-items: center; gap: 24px;
}
.live-status { display: flex; align-items: center; gap: 14px; min-width: 0; }
.live-status .dot { width: 14px; height: 14px; }
.live-status .title { font-size: 20px; font-weight: 800; letter-spacing: .04em; white-space: nowrap; }
.live-status .sub { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-meters { display: grid; gap: 5px; }
.meter-row { display: grid; grid-template-columns: 14px 1fr; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); font-weight: 700; }
.meter-row .meter { margin: 0; height: 10px; }
.big-btn { min-height: 48px; padding: 10px 26px; font-size: 16px; white-space: nowrap; }
.livebar-error:empty { display: none; }
.livebar-error { max-width: 1760px; margin: 0 auto; padding: 0 0 10px; }

.dash-grid {
  display: grid; gap: 16px; align-items: start;
  grid-template-columns: minmax(320px, 1fr) minmax(480px, 1.55fr) minmax(300px, 380px);
  grid-template-areas: "audio listeners access";
}
.col-audio { grid-area: audio; }
.col-listeners { grid-area: listeners; }
.col-access { grid-area: access; }
.col { min-width: 0; }

.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h2 { margin: 0 !important; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.checks { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.checks .check { margin-top: 10px; }

.fx { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 22px; }
.fx label { margin-top: 6px; }

details.help { margin-top: 14px; }
details.help summary { color: var(--muted); font-size: 13px; cursor: pointer; }
details.help p { color: var(--muted); font-size: 13px; margin: 8px 0 0; }

.qr-box { display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: 6px; }
.qr-box .qr { width: 220px; height: 220px; padding: 8px; }
.qr-box .note { margin: 10px 0 0; }
.code-row { display: flex; gap: 8px; }
.code-row input { flex: 1; min-width: 0; font-size: 20px; }
.code-row button { flex: none; }
.share { overflow-wrap: anywhere; }

/* střední šířka: zvuk + přístup vedle sebe, posluchači přes celou šířku nahoře */
@media (max-width: 1320px) {
  .dash-grid { grid-template-columns: 1fr minmax(300px, 380px); grid-template-areas: "listeners listeners" "audio access"; }
}
/* tablet / telefon: jeden sloupec */
@media (max-width: 860px) {
  .dash-grid { grid-template-columns: 1fr; grid-template-areas: "listeners" "audio" "access"; }
  .livebar-inner { grid-template-columns: 1fr auto; gap: 10px 14px; padding: 10px 0; }
  .livebar .brand, .livebar .pill { display: none; }
  .live-meters { grid-column: 1 / -1; order: 3; }
  .live-status .title { font-size: 17px; }
  .big-btn { padding: 10px 16px; }
  .fx { grid-template-columns: 1fr; }
}

/* ================================================================
   Přijímač – na širší obrazovce dva sloupce
   ================================================================ */
@media (min-width: 900px) {
  body:not(.dash) main { max-width: 1100px; }
  #listenView:not(.hidden) { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; align-items: start; }
  #listenView > .card:first-child { grid-column: 1 / -1; }
  #joinCard, #quickCard { max-width: 520px; margin-left: auto; margin-right: auto; }
}

/* výzva ke kliknutí na Spustit po přerušení */
button.attention { animation: attention 1.2s ease-in-out infinite; }
@keyframes attention { 50% { box-shadow: 0 0 0 6px rgba(255, 176, 32, .35); } }

/* playlist: přetahování, mazání, úložiště */
.playlist li .grip { color: var(--muted); cursor: grab; font-size: 12px; letter-spacing: -2px; }
.playlist li .t { flex: 1; min-width: 0; }
.playlist li .d { margin-left: 0; }
.playlist li .del { background: none; border: 0; color: var(--muted); min-height: 0; padding: 2px 6px; font-size: 14px; cursor: pointer; }
.playlist li .del:hover { color: var(--bad); }
.playlist li.dragging { opacity: .4; }
.playlist li.drop-target { box-shadow: inset 0 2px 0 var(--accent); }
.file-panel.dropping { outline: 2px dashed var(--accent); outline-offset: 4px; }
.pl-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 6px; min-height: 24px; }
.linkbtn { background: none; border: 0; color: var(--muted); text-decoration: underline; min-height: 0; padding: 4px 0; font-weight: 500; }
.linkbtn:hover { color: var(--bad); }
button.unlock {
  display: block; width: 100%; max-width: 1760px; margin: 0 auto 10px; min-height: 52px;
  background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-size: 16px;
  animation: attention 1.2s ease-in-out infinite;
}
button.unlock.hidden { display: none; }

/* posluchači: pípnutí / ztlumení / přejmenování */
.nm-btn { background: none; border: 0; padding: 0; min-height: 0; color: var(--text); font-weight: 400; cursor: pointer; text-align: left; }
.nm-btn:hover b { text-decoration: underline; }
.nm-btn { color: var(--muted); font-size: 12px; }
.nm-btn b { color: var(--text); font-size: 15px; }
button.icon { min-width: 40px; padding: 6px 8px; }
button.icon.on { background: rgba(255, 176, 32, .15); border-color: var(--accent); }
button.pinged { background: var(--accent); border-color: var(--accent); }
tr.muted-row td { opacity: .75; }
tr.muted-row td.actions { opacity: 1; }

/* přijímač: ztlumeno vysílačem + identifikace */
.bmute { margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: rgba(255, 176, 32, .12); border: 1px solid var(--accent); color: var(--accent); font-weight: 600; font-size: 14px; }
.identify {
  position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  text-align: center; padding: 24px; color: #1a1200; cursor: pointer; animation: identify-flash .5s steps(1) infinite;
}
.identify.hidden { display: none; }
@keyframes identify-flash { 0% { background: #ffb020; } 50% { background: #fff; } }
.identify-bell { font-size: 88px; line-height: 1; }
.identify-title { font-size: 28px; font-weight: 800; }
.identify-name { font-size: 20px; font-weight: 600; }
.identify-hint { font-size: 14px; opacity: .7; }

.brand { white-space: nowrap; }
.brand .amp { color: var(--accent); }
td .sub.route, td .sub.q { white-space: nowrap; }
td.actions { width: 1%; }

/* ŽIVĚ – červená kontrolka bliká */
.dot.live {
  background: var(--live);
  animation: live-blink 1s ease-in-out infinite;
}
@keyframes live-blink {
  0%, 45% { opacity: 1; box-shadow: 0 0 6px 2px rgba(255, 59, 59, .85), 0 0 18px 4px rgba(255, 59, 59, .45); }
  55%, 100% { opacity: .15; box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) { .dot.live { animation-duration: 2s; } }

/* LED měřáky */
canvas.vu { display: block; width: 100%; height: 12px; }
.meter-row canvas.vu { height: 11px; }
canvas.vu-rx { height: 18px; margin-top: 8px; }
.spectrum-wrap { margin: 2px 0 14px; padding: 12px 12px 8px; background: #0a0d11; border: 1px solid var(--line); border-radius: 12px; }
canvas.spectrum { display: block; width: 100%; height: 150px; }
.spectrum-axis { display: flex; justify-content: space-between; margin-top: 6px; font-size: 10px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* stereo VU od středu: L doleva, R doprava */
.livebar-inner { grid-template-columns: auto minmax(220px, 1fr) minmax(360px, 640px) auto auto; }
.live-meters.stereo { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 4px 8px; }
.live-meters.stereo canvas.vu { height: 16px; }
.vu-mid { display: flex; gap: 10px; font-size: 11px; font-weight: 800; color: var(--muted); }
.vu-scale { position: relative; height: 11px; font-size: 9px; color: var(--muted); font-variant-numeric: tabular-nums; }
.vu-scale span { position: absolute; top: 0; }
.vu-scale.l span { transform: translateX(-50%); }
.vu-scale.r span { transform: translateX(50%); }
.vu-scale.l span:first-child { transform: none; }
.vu-scale.r span:first-child { transform: none; }
.vu-scale-mid { font-size: 9px; color: var(--muted); text-align: center; }
@media (max-width: 860px) { .live-meters.stereo canvas.vu { height: 12px; } .vu-scale, .vu-scale-mid { display: none; } }
canvas.spectrum { height: 170px; }

/* ================================================================
   Detaily vzhledu
   ================================================================ */
/* posuvníky */
input[type=range] { -webkit-appearance: none; appearance: none; height: 28px; min-height: 28px; background: transparent; padding: 0; border: 0; cursor: pointer; }
input[type=range]:focus { outline: none; }
input[type=range]::-webkit-slider-runnable-track {
  height: 6px; border-radius: 3px;
  background: linear-gradient(90deg, #343c48 var(--a, 0%), var(--accent) var(--a, 0%), var(--accent) var(--b, 0%), #343c48 var(--b, 0%));
}
input[type=range].bipolar::-webkit-slider-runnable-track {
  background:
    linear-gradient(90deg, transparent calc(50% - 1px), #8b96a5 calc(50% - 1px), #8b96a5 calc(50% + 1px), transparent calc(50% + 1px)),
    linear-gradient(90deg, #343c48 var(--a, 0%), var(--accent) var(--a, 0%), var(--accent) var(--b, 0%), #343c48 var(--b, 0%));
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 18px; height: 18px; margin-top: -6px; border-radius: 50%;
  background: #fff; border: 3px solid var(--accent); box-shadow: 0 1px 6px rgba(0, 0, 0, .5); transition: transform .1s;
}
input[type=range]:hover::-webkit-slider-thumb { transform: scale(1.15); }
input[type=range]::-moz-range-track { height: 6px; border-radius: 3px; background: #343c48; }
input[type=range]::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--accent); }
input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); }

/* přepínače místo zaškrtávátek */
.check { cursor: pointer; user-select: none; }
.check input[type=checkbox] {
  -webkit-appearance: none; appearance: none; flex: none; position: relative; cursor: pointer;
  width: 38px; height: 22px; min-height: 0; padding: 0; margin: 0; border: 0; border-radius: 11px;
  background: #3a4350; transition: background .15s;
}
.check input[type=checkbox]::before {
  content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .4); transition: transform .15s;
}
.check input[type=checkbox]:checked { background: var(--accent); }
.check input[type=checkbox]:checked::before { transform: translateX(16px); }
.check input[type=checkbox]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* přehrávač */
.file-panel { margin-top: 16px; }
.transport { background: linear-gradient(180deg, #1c222b, #141920); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px 12px; }
.np-label { font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 700; }
.np-title { font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.transport .seek { width: 100%; margin-top: 6px; }
.times { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; margin-top: -2px; }
.tbtns { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 6px; }
.tbtn { width: 44px; height: 44px; min-height: 0; padding: 0; border-radius: 50%; font-size: 16px; line-height: 1; }
.tbtn.play { width: 58px; height: 58px; font-size: 20px; background: var(--accent); color: var(--accent-ink); border-color: var(--accent); box-shadow: 0 4px 16px rgba(255, 176, 32, .25); }
.tbtn.play.playing { font-size: 16px; letter-spacing: -2px; }
.playlist { margin-top: 12px; }
.playlist li.active { background: rgba(255, 176, 32, .08); box-shadow: inset 3px 0 0 var(--accent); }
.file-panel .dropzone {
  display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 10px 0 0; padding: 14px;
  border: 2px dashed #3a4350; border-radius: 12px; cursor: pointer; text-align: center; transition: border-color .15s, background .15s;
}
.file-panel .dropzone:hover, .file-panel.dropping .dropzone { border-color: var(--accent); background: rgba(255, 176, 32, .06); }
.dz-main { font-weight: 700; color: var(--text); font-size: 15px; }
.dz-sub { font-size: 12px; color: var(--muted); }
.file-panel.dropping { outline: none; }
.card-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.card-foot details.help { margin: 0; }
.card-foot details.help[open] { flex-basis: 100%; }

/* horní lišta: doba vysílání, právě hraje */
.title-row { display: flex; align-items: center; gap: 10px; }
.onair { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: 13px; font-weight: 700; color: #fff; background: var(--live); padding: 2px 8px; border-radius: 6px; letter-spacing: .06em; }
.np-live { font-size: 12px; color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 420px; margin-top: 1px; }

/* karta přístupu */
.divider { height: 1px; background: var(--line); margin: 20px 0 4px; }
.subhead { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 14px 0 2px; font-weight: 700; }

/* přijímač: iOS uspal zvuk → velké tlačítko přes celou obrazovku */
.tap-resume {
  position: fixed; inset: 0; z-index: 90; width: 100%; height: 100%; border: 0; border-radius: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px;
  background: rgba(14, 17, 22, .94); color: var(--text); cursor: pointer;
}
.tap-resume.hidden { display: none; }
.tr-icon { font-size: 72px; width: 150px; height: 150px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--accent); animation: attention 1.2s ease-in-out infinite; }
.tr-title { font-size: 26px; font-weight: 800; }
.tr-sub { font-size: 15px; color: var(--muted); font-weight: 500; }

/* přijímač: volba režimu Živě / Na pozadí */
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.seg { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 10px 12px; min-height: 0; font-weight: 500; }
.seg b { font-size: 15px; }
.seg small { font-size: 11px; color: var(--muted); line-height: 1.3; }
.seg.active { border-color: var(--accent); background: rgba(255, 176, 32, .1); }
.seg.active b { color: var(--accent); }

/* povinné jméno posluchače */
.req { color: var(--accent); font-weight: 700; }
.known-name { margin: 16px 0 2px; padding: 12px 14px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); font-size: 15px; text-align: center; }
.known-name b { color: var(--accent); }
.linkinline { background: none; border: 0; padding: 0; min-height: 0; color: var(--muted); text-decoration: underline; font: inherit; font-size: 14px; cursor: pointer; }

/* iPhone: tipy k přehrávání na pozadí */
.ios-hint, .bg-tip { margin-top: 12px; padding: 12px 14px; border-radius: 10px; font-size: 13px; line-height: 1.45; background: rgba(255, 176, 32, .08); border: 1px solid rgba(255, 176, 32, .45); color: var(--text); }
.ios-hint b, .bg-tip b { color: var(--accent); }
.btn-safari { display: block; width: fit-content; margin-top: 10px; padding: 8px 14px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-weight: 700; text-decoration: none; }
.bg-tip .small { display: block; margin-top: 8px; }

td .sub.adapt { color: var(--warn); font-weight: 600; white-space: nowrap; }

/* zvonění */
.identify-stop { margin-top: 18px; min-width: 220px; min-height: 64px; font-size: 22px; font-weight: 800; background: #1a1200; color: #fff; border: 0; border-radius: 16px; }
button.icon.ringing { background: var(--accent); border-color: var(--accent); animation: attention 1s ease-in-out infinite; }

/* ================================================================
   Mixážní pult
   ================================================================ */
.mixer { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; margin-bottom: 4px; }
.strip {
  flex: 0 0 104px; display: flex; flex-direction: column; gap: 6px; padding: 8px;
  background: linear-gradient(180deg, #1c222b, #141920); border: 1px solid var(--line); border-radius: 12px;
}
.strip.is-solo { border-color: #ffd23f; }
.strip.is-mute .strip-body { opacity: .45; }
.strip.has-err { border-color: rgba(255, 69, 58, .6); }
.strip-top { display: flex; justify-content: space-between; align-items: center; }
.strip-no { font-weight: 800; color: var(--accent); font-size: 13px; }
.strip-del { background: none; border: 0; min-height: 0; padding: 0 2px; color: var(--muted); font-size: 13px; }
.strip-del:hover { color: var(--bad); }
.strip select { min-height: 30px; padding: 4px 6px; font-size: 11px; border-radius: 7px; }
.strip select.invisible { visibility: hidden; }
.strip-body { display: flex; justify-content: center; gap: 10px; height: 170px; }
.strip-vu { width: 18px; height: 100%; }
input[type=range].fader { writing-mode: vertical-lr; direction: rtl; width: 28px; height: 100%; min-height: 0; }
input[type=range].fader::-webkit-slider-runnable-track {
  width: 6px; height: 100%;
  background: linear-gradient(0deg, #343c48 var(--a, 0%), var(--accent) var(--a, 0%), var(--accent) var(--b, 0%), #343c48 var(--b, 0%));
}
input[type=range].fader::-webkit-slider-thumb { width: 26px; height: 14px; border-radius: 4px; margin-top: 0; margin-left: -10px; background: #d9dee6; border: 2px solid #0e1116; box-shadow: 0 2px 6px rgba(0,0,0,.6), inset 0 -2px 0 rgba(0,0,0,.25); }
.strip-db { text-align: center; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.strip-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.sb { min-height: 28px; padding: 0; font-size: 12px; font-weight: 800; border-radius: 6px; }
.sb.m.on { background: var(--live); border-color: var(--live); color: #fff; }
.sb.s.on { background: #ffd23f; border-color: #ffd23f; color: #1a1200; }
.sb.d.on { background: var(--accent); border-color: var(--accent); }
.strip-name { font-size: 11px; color: var(--muted); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.strip-err { min-height: 0; padding: 4px; font-size: 10px; font-weight: 600; color: var(--bad); background: rgba(255, 69, 58, .08); border-color: rgba(255, 69, 58, .4); border-radius: 6px; }
.duck-state { font-size: 12px; font-weight: 700; color: var(--accent-ink); background: var(--accent); padding: 2px 8px; border-radius: 6px; margin-left: auto; margin-right: 8px; }

/* kanály v místnosti */
.room-channels { list-style: none; margin: 0; padding: 0; }
.room-channels li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.room-channels li b { letter-spacing: .05em; }
.room-channels li .cnt { color: var(--muted); font-size: 12px; margin-right: auto; }
.room-channels li.me b { color: var(--accent); }
.room-channels .tag { font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; }

/* návod k povolení mikrofonu */
.perm-help { margin-bottom: 12px; padding: 12px 14px; border-radius: 10px; background: rgba(255, 69, 58, .08); border: 1px solid rgba(255, 69, 58, .5); font-size: 13px; line-height: 1.5; }
.perm-help ol { margin: 6px 0; padding-left: 20px; }
.perm-help small { display: block; color: var(--muted); margin-bottom: 8px; }

/* popisek kanálu pultu (jako proužek na mixu) */
.strip-label {
  min-height: 0; padding: 5px 6px; font-size: 13px; font-weight: 800; text-align: center; letter-spacing: .03em;
  background: #0a0d11; border: 1px solid var(--line); border-radius: 6px; color: var(--accent);
}
.strip-label::placeholder { color: #4a5360; font-weight: 600; }
.strip-label:focus { outline: 1px solid var(--accent); }

/* aktuální čas v horní liště */
.clock {
  font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: 13px; font-weight: 700; letter-spacing: .06em;
  color: #7cc4ff; background: rgba(64, 156, 255, .12); border: 1px solid rgba(64, 156, 255, .55); padding: 1px 8px; border-radius: 6px;
}
.livebar-inner { grid-template-columns: auto minmax(360px, 1fr) minmax(320px, 600px) auto auto; }
@media (max-width: 860px) { .livebar-inner { grid-template-columns: 1fr auto; } }

/* ================================================================
   Fader jako na skutečném pultu: šedá hmatka s rýhami a černou ryskou
   ================================================================ */
input[type=range].fader { width: 36px; }
input[type=range].fader::-webkit-slider-runnable-track {
  width: 5px; height: 100%; border-radius: 3px;
  /* 0 dB značka (fader -60…+10 dB → 0 dB je v 85,7 %) + vyplnění + prořez v panelu */
  background:
    linear-gradient(0deg, transparent calc(85.7% - 1px), #e7ebf0 calc(85.7% - 1px), #e7ebf0 calc(85.7% + 1px), transparent calc(85.7% + 1px)),
    linear-gradient(0deg, #05070a var(--a, 0%), var(--accent) var(--a, 0%), var(--accent) var(--b, 0%), #05070a var(--b, 0%));
  box-shadow: inset 0 0 0 1px #000, 0 0 0 1px rgba(255, 255, 255, .06);
}
input[type=range].fader::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 34px; height: 24px; margin-left: -14.5px; border: 0; border-radius: 3px 3px 4px 4px;
  background:
    /* černá ryska */
    linear-gradient(180deg, transparent calc(50% - 1.5px), #0b0d10 calc(50% - 1.5px), #0b0d10 calc(50% + 1.5px), transparent calc(50% + 1.5px)),
    /* rýhy pro prsty */
    repeating-linear-gradient(180deg, rgba(255, 255, 255, .45) 0 1px, rgba(0, 0, 0, .22) 1px 2px, transparent 2px 4px),
    /* šedé tělo se světlem nahoře a stínem dole (zaoblený profil) */
    linear-gradient(180deg, #e3e6ea 0%, #bfc4ca 30%, #a9afb7 50%, #bfc4ca 70%, #8e959e 100%);
  box-shadow: 0 4px 7px rgba(0, 0, 0, .65), 0 1px 0 rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .7), inset 0 -2px 0 rgba(0, 0, 0, .25), inset 1px 0 0 rgba(255, 255, 255, .25), inset -1px 0 0 rgba(0, 0, 0, .2);
  transition: filter .1s;
}
input[type=range].fader:hover::-webkit-slider-thumb { transform: none; filter: brightness(1.08); }
input[type=range].fader:active::-webkit-slider-thumb { filter: brightness(.95); }
input[type=range].fader::-moz-range-thumb {
  width: 34px; height: 24px; border: 0; border-radius: 3px;
  background:
    linear-gradient(180deg, transparent calc(50% - 1.5px), #0b0d10 calc(50% - 1.5px), #0b0d10 calc(50% + 1.5px), transparent calc(50% + 1.5px)),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, .45) 0 1px, rgba(0, 0, 0, .22) 1px 2px, transparent 2px 4px),
    linear-gradient(180deg, #e3e6ea 0%, #bfc4ca 30%, #a9afb7 50%, #bfc4ca 70%, #8e959e 100%);
  box-shadow: 0 4px 7px rgba(0, 0, 0, .65);
}
.strip { flex-basis: 110px; }
