/* ───────────── Design tokens ───────────── */
:root {
  --accent: #1db954;
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --surface-3: #e6e9ee;
  --text: #101319;
  --muted: #667085;
  --line: #e3e6eb;
  --ok: #12a05c;
  --warn: #d97706;
  --err: #dc2f2f;
  --info: #2563eb;
  --shadow: 0 1px 2px rgb(16 19 25 / .05), 0 4px 16px rgb(16 19 25 / .05);
  --shadow-lg: 0 10px 40px rgb(16 19 25 / .18);
  --radius: 14px;
  --radius-sm: 9px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sidebar: 236px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c0e11; --surface: #15181c; --surface-2: #1d2126; --surface-3: #2a2f36;
    --text: #eef0f3; --muted: #98a2b3; --line: #262b32;
    --ok: #34c77b; --warn: #f5a524; --err: #f2605c; --info: #6ea0ff;
    --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 4px 16px rgb(0 0 0 / .3);
    --shadow-lg: 0 10px 40px rgb(0 0 0 / .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0c0e11; --surface: #15181c; --surface-2: #1d2126; --surface-3: #2a2f36;
  --text: #eef0f3; --muted: #98a2b3; --line: #262b32;
  --ok: #34c77b; --warn: #f5a524; --err: #f2605c; --info: #6ea0ff;
  --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 4px 16px rgb(0 0 0 / .3);
  --shadow-lg: 0 10px 40px rgb(0 0 0 / .6);
  color-scheme: dark;
}

/* ───────────── Base ───────────── */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 22px; } h2 { font-size: 17px; } h3 { font-size: 15px; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: var(--mono); font-size: 12px; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 10px; }
.between { justify-content: space-between; }
.hidden { display: none !important; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon.sm { width: 14px; height: 14px; }
.icon.lg { width: 22px; height: 22px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ───────────── App shell ───────────── */
.app { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; padding: 18px 12px; display: flex; flex-direction: column; gap: 4px;
  background: var(--surface); border-right: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 16px; font-weight: 700; font-size: 16px; letter-spacing: -.02em; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--accent); display: grid; place-items: center; color: #fff; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: var(--muted); font-weight: 550;
  transition: background .12s, color .12s;
}
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.active { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.nav .badge { margin-left: auto; }
.nav .short { display: none; }
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding: 10px; font-size: 12px; color: var(--muted); }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 12px 28px;
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
}
.topbar h1 { font-size: 18px; }
.content { padding: 24px 28px 60px; width: 100%; max-width: 1280px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head p { color: var(--muted); margin-top: 2px; }

.loc-switch { display: flex; gap: 6px; overflow-x: auto; padding: 2px; }
.loc-btn {
  display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); cursor: pointer; font-weight: 550; white-space: nowrap;
}
.loc-btn .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--accent)); }
.loc-btn.off .dot { background: var(--err); }
.loc-btn.active { border-color: var(--c, var(--accent)); box-shadow: inset 0 0 0 1px var(--c, var(--accent)); }

/* ───────────── Components ───────────── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 18px; }
.card + .card { margin-top: 14px; }
.grid { display: grid; gap: 14px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.auto { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px;
  border-radius: 10px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 600;
  transition: background .12s, border-color .12s, transform .05s; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.06); background: var(--accent); }
.btn.danger { color: var(--err); }
.btn.danger.solid { background: var(--err); border-color: var(--err); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.btn.icon-only { width: 34px; padding: 0; }
.btn.icon-only.sm { width: 30px; }
.btn[disabled] { opacity: .5; pointer-events: none; }

.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: var(--surface-2); color: var(--muted); white-space: nowrap;
}
.pill.ok { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.pill.warn { background: color-mix(in srgb, var(--warn) 17%, transparent); color: var(--warn); }
.pill.err { background: color-mix(in srgb, var(--err) 15%, transparent); color: var(--err); }
.pill.info { background: color-mix(in srgb, var(--info) 15%, transparent); color: var(--info); }
.pill.accent { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill .dot.pulse { animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.badge { min-width: 20px; padding: 0 6px; height: 20px; border-radius: 10px; font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; background: var(--err); color: #fff; }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 8px; background: var(--surface-2); font-size: 12.5px; font-weight: 550; }
.chip.err { background: color-mix(in srgb, var(--err) 14%, transparent); color: var(--err); }
.chip.warn { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.chip.on { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.chip.off { opacity: .55; }

input[type=text], input[type=search], input[type=email], input[type=number], input[type=time], input[type=date],
input[type=datetime-local], select, textarea {
  width: 100%; height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface);
  transition: border-color .12s, box-shadow .12s;
}
textarea { height: auto; padding: 8px 12px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
input[type=number] { width: 80px; }
label.field { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: 12.5px; color: var(--muted); }
label.field > :not(span):not(.hint) { color: var(--text); font-weight: 400; }
.hint { font-weight: 400; font-size: 12px; color: var(--muted); }

.switch { position: relative; width: 38px; height: 22px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--surface-3); cursor: pointer; transition: background .15s; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .3); transition: transform .15s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.seg { display: inline-flex; padding: 3px; background: var(--surface-2); border-radius: 10px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 5px 12px; border-radius: 8px; cursor: pointer; font-weight: 600; color: var(--muted); }
.seg button.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgb(0 0 0 / .12); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 10px 14px; cursor: pointer; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button.active { color: var(--accent); border-color: var(--accent); }

input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 3px; background: var(--surface-3); outline-offset: 4px; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); border: 3px solid var(--surface); box-shadow: 0 1px 4px rgb(0 0 0 / .3); cursor: pointer; }
input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); border: 3px solid var(--surface); cursor: pointer; }

.vol { display: flex; align-items: center; gap: 10px; min-width: 0; }
.vol-bar { flex: 1; height: 6px; border-radius: 3px; background: var(--surface-3); position: relative; min-width: 50px; }
.vol-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: var(--accent); }
.vol-bar b { position: absolute; top: -3px; width: 2px; height: 12px; background: var(--text); opacity: .55; border-radius: 1px; }
.vol-bar.muted i { background: var(--surface-3); }
.vol-num { width: 28px; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }

.progress { height: 4px; border-radius: 2px; background: var(--surface-3); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--accent); transition: width 1s linear; }

.alert { display: flex; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); align-items: flex-start; }
.alert.warn { background: color-mix(in srgb, var(--warn) 14%, transparent); }
.alert.err { background: color-mix(in srgb, var(--err) 12%, transparent); }
.alert.info { background: color-mix(in srgb, var(--info) 12%, transparent); }
.alert .icon { margin-top: 2px; }

.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty .icon { width: 36px; height: 36px; opacity: .5; margin-bottom: 8px; }
.empty h3 { color: var(--text); margin-bottom: 4px; }

table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.tbl-wrap { overflow-x: auto; }
.tbl td.nw { white-space: nowrap; }

/* Modal & Toast */
.overlay { position: fixed; inset: 0; z-index: 100; background: rgb(8 10 14 / .5); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 20px; animation: fade .12s; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(720px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg); animation: pop .16s; }
.modal.wide { width: min(1040px, 100%); }
.modal.narrow { width: min(460px, 100%); }
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-body { padding: 20px 22px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--line); background: var(--surface); border-radius: 0 0 18px 18px; }
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { padding: 11px 16px; border-radius: 12px; background: var(--text); color: var(--bg); box-shadow: var(--shadow-lg); font-weight: 550; animation: pop .16s; max-width: 380px; }
.toast.err { background: var(--err); color: #fff; }
.toast.ok { background: var(--ok); color: #fff; }

/* ───────────── Live ───────────── */
.statusbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.stat { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.stat .k { color: var(--muted); font-size: 12px; }
.stat .v { font-weight: 650; }

.zone { overflow: hidden; }
.zone.error { border-color: color-mix(in srgb, var(--err) 50%, var(--line)); }
.zone.warn { border-color: color-mix(in srgb, var(--warn) 50%, var(--line)); }
.zone-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.zone-body { display: grid; grid-template-columns: minmax(280px, 380px) 1fr; }
.now { padding: 18px; display: flex; flex-direction: column; gap: 14px; border-right: 1px solid var(--line); }
.cover { width: 100%; aspect-ratio: 1; max-height: 220px; border-radius: 12px; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 70%, #000), color-mix(in srgb, var(--accent) 25%, var(--surface-3))); display: grid; place-items: center; color: rgb(255 255 255 / .85); overflow: hidden; }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover .icon { width: 56px; height: 56px; stroke-width: 1.5; }
.track-title { font-size: 18px; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; }
.zone-side { padding: 18px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.spk-list { display: flex; flex-direction: column; }
.spk { display: grid; grid-template-columns: minmax(120px, 190px) 1fr auto; gap: 14px; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.spk:last-child { border-bottom: 0; }
.spk.off { opacity: .55; }
.spk .name { display: flex; align-items: center; gap: 8px; font-weight: 600; min-width: 0; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; }
.dot.off { background: var(--err); } .dot.warn { background: var(--warn); }
.section-label { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }

/* ───────────── Profile editor ───────────── */
.zone-edit { border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 14px; background: color-mix(in srgb, var(--surface-2) 40%, var(--surface)); }
.picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; }
.pick { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; background: var(--surface); user-select: none; }
.pick:hover { border-color: var(--muted); }
.pick.sel { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.pick.dis { opacity: .4; pointer-events: none; }
.pick input { accent-color: var(--accent); }
.pick small { margin-left: auto; color: var(--muted); font-size: 11px; }
.vrow { display: grid; grid-template-columns: minmax(110px, 1fr) 2fr 44px; gap: 12px; align-items: center; padding: 5px 0; }

/* ───────────── Calendar ───────────── */
.cal { display: grid; grid-template-columns: 52px repeat(7, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cal-head { display: contents; }
.cal-head > div { padding: 10px 6px; text-align: center; font-weight: 650; border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 3; }
.cal-head > div.today { color: var(--accent); }
.cal-body { grid-column: 1 / -1; display: grid; grid-template-columns: 52px repeat(7, 1fr); position: relative; height: 1008px; }
.cal-hours { position: relative; }
.cal-hours span { position: absolute; right: 8px; transform: translateY(-50%); font-size: 11px; color: var(--muted); }
.cal-col { position: relative; border-left: 1px solid var(--line); cursor: cell;
  background-image: linear-gradient(var(--line) 1px, transparent 1px); background-size: 100% 42px; }
.cal-col.today { background-color: color-mix(in srgb, var(--accent) 5%, transparent); }
.cal-block { position: absolute; left: 3px; right: 3px; border-radius: 8px; padding: 4px 7px; overflow: hidden; cursor: pointer; font-size: 12px; line-height: 1.3;
  background: color-mix(in srgb, var(--c) 20%, var(--surface)); border-left: 3px solid var(--c); color: var(--text); transition: filter .1s; }
.cal-block:hover { filter: brightness(.96); z-index: 2; }
.cal-block.disabled { opacity: .45; background-image: repeating-linear-gradient(45deg, transparent 0 6px, rgb(128 128 128 / .12) 6px 12px); }
.cal-block b { display: block; font-weight: 650; }
.cal-block .t { color: var(--muted); font-size: 11px; }
.cal-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--err); z-index: 4; pointer-events: none; }
.cal-now::before { content: ""; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--err); }
.agenda { display: none; }
.days { display: flex; gap: 6px; flex-wrap: wrap; }
.day { width: 42px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 650; }
.day.on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ───────────── Timeline & logs ───────────── */
.timeline { position: relative; }
.tl-row { display: grid; grid-template-columns: 170px 1fr; align-items: center; gap: 10px; padding: 5px 0; }
.tl-track { position: relative; height: 26px; background: var(--surface-2); border-radius: 7px; overflow: hidden; }
.tl-seg { position: absolute; top: 3px; bottom: 3px; border-radius: 5px; background: var(--c, var(--accent)); min-width: 3px; opacity: .92; }
.tl-seg.failed { background: var(--err); } .tl-seg.partial { background: var(--warn); }
.tl-axis { display: grid; grid-template-columns: 170px 1fr; gap: 10px; }
.tl-axis > div:last-child { position: relative; height: 18px; }
.tl-axis span { position: absolute; font-size: 11px; color: var(--muted); transform: translateX(-50%); }
.tl-now { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--err); z-index: 2; }

.log { font-family: var(--mono); font-size: 12px; background: #0b0d10; color: #d6dae0; border-radius: 12px; padding: 12px 14px; height: 520px; overflow: auto; line-height: 1.55; }
.log div { white-space: pre-wrap; word-break: break-word; }
.log .WARNING, .log .WARN { color: #f5b455; } .log .ERROR, .log .CRITICAL { color: #ff7b72; } .log .ts { color: #6b7380; }
.dup { color: var(--warn); font-weight: 700; }
.lvl-INFO { color: var(--info); } .lvl-WARN { color: var(--warn); } .lvl-ERROR { color: var(--err); }

/* ───────────── Login ───────────── */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login .card { width: min(400px, 100%); padding: 28px; }
.code-input { text-align: center; letter-spacing: .5em; font-size: 22px; font-weight: 700; height: 52px !important; }

/* ───────────── Responsive ───────────── */
@media (max-width: 1000px) {
  .zone-body { grid-template-columns: 1fr; }
  .now { border-right: 0; border-bottom: 1px solid var(--line); }
  .cover { aspect-ratio: 16 / 9; max-height: 220px; }
  .grid.cols-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 800px) {
  .app { grid-template-columns: 1fr; padding-bottom: 66px; }
  .sidebar { position: fixed; z-index: 50; top: auto; bottom: 0; left: 0; right: 0; height: auto; flex-direction: row; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--line); overflow-x: auto; }
  .brand, .sidebar-foot { display: none; }
  .nav { display: flex; gap: 2px; width: 100%; justify-content: space-between; }
  .nav a { flex: 1; flex-direction: column; gap: 2px; padding: 6px 2px; font-size: 10px; min-width: 0; justify-content: center; text-align: center; }
  .nav .full { display: none; } .nav .short { display: inline; }
  .cover { aspect-ratio: 16 / 9; max-height: 200px; }
  .topbar { padding: 10px 14px; }
  .content { padding: 16px 14px 40px; }
  .grid.cols-2, .grid.cols-3 { grid-template-columns: 1fr; }
  .cal, .cal-hint { display: none; }
  .agenda { display: flex; flex-direction: column; gap: 12px; }
  .spk { grid-template-columns: 1fr auto; } .spk .vol { grid-column: 1 / -1; order: 3; }
  .tl-row, .tl-axis { grid-template-columns: 90px 1fr; }
  .modal { max-height: 100vh; border-radius: 16px; }
  .overlay { padding: 8px; align-items: end; }
}
