/* Автопостинг — «аппаратная выпуска».
   Холодная светлая база, чернильный текст, один сигнальный цвет (эфирная лампа) для того, что выходит следующим.
   Шрифты: Geologica — заголовки, Onest — текст, JetBrains Mono — время, таймкоды, цифры. */
:root {
  --bg: #eceef1;         /* фон аппаратной */
  --card: #ffffff;       /* панели */
  --bg2: #f5f6f8;        /* поля, вложенные блоки */
  --card2: #eff1f4;      /* тихие подложки */
  --line: #dadee4;
  --line2: #e8ebef;
  --text: #15181d;
  --muted: #535a65;
  --dim: #8c939e;
  --accent: #2a57d6;     /* выбор, ссылки, фокус */
  --tally: #e2371f;      /* эфирная лампа: только «следующий выход» и живой статус */
  --ok: #1d8656;
  --warn: #b0700f;
  --err: #c9321f;
  --info: #2a57d6;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(21,24,29,.05), 0 8px 24px rgba(21,24,29,.07);
  --f-display: "Geologica", "Onest", system-ui, sans-serif;
  --f-body: "Onest", "Segoe UI", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --yt: #e8322a; --tg: #2a9fdc;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1113; --card: #171a1e; --bg2: #1c2025; --card2: #20252b; --line: #2b3037; --line2: #23282e;
    --text: #eceef1; --muted: #a8afb9; --dim: #6d747f; --accent: #7494ff; --tally: #ff4b34;
    --ok: #3fbf84; --warn: #e3a342; --err: #ff6a55; --info: #7494ff;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px rgba(0,0,0,.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1113; --card: #171a1e; --bg2: #1c2025; --card2: #20252b; --line: #2b3037; --line2: #23282e;
  --text: #eceef1; --muted: #a8afb9; --dim: #6d747f; --accent: #7494ff; --tally: #ff4b34;
  --ok: #3fbf84; --warn: #e3a342; --err: #ff6a55; --info: #7494ff;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px rgba(0,0,0,.35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 14px/1.5 var(--f-body); -webkit-font-smoothing: antialiased; font-feature-settings: "ss01"; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1 { font: 600 26px/1.15 var(--f-display); margin: 0; letter-spacing: -.02em; }
h2 { font: 600 16px/1.3 var(--f-display); margin: 0 0 12px; letter-spacing: -.01em; }
h3 { font: 500 11px/1.4 var(--f-mono); margin: 0 0 8px; color: var(--dim); text-transform: uppercase; letter-spacing: .08em; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.small { font-size: 12.5px; }
.mono, .tc { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.mono { font-size: 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.i { flex: none; vertical-align: -3px; }

/* ---------- каркас ---------- */
.app { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.side { padding: 22px 14px 18px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 2px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 10px 26px; font: 600 16px var(--f-display); letter-spacing: -.01em; }
.brand .logo { width: 10px; height: 10px; border-radius: 50%; background: var(--tally); box-shadow: 0 0 0 4px color-mix(in srgb, var(--tally) 18%, transparent); }
.nav { display: flex; flex-direction: column; gap: 1px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 7px; color: var(--muted); font-weight: 500; text-decoration: none; }
.nav a:hover { color: var(--text); background: color-mix(in srgb, var(--card) 60%, transparent); }
.nav a.active { color: var(--text); background: var(--card); box-shadow: 0 1px 2px rgba(21,24,29,.06); }
.nav a.active .i { color: var(--text); }
.nav .i { color: var(--dim); }
.side .foot { margin-top: auto; display: flex; flex-direction: column; gap: 14px; }
.onair { background: var(--card); border-radius: var(--radius); padding: 12px 12px 11px; box-shadow: 0 1px 2px rgba(21,24,29,.05); }
.onair .lbl { display: flex; align-items: center; gap: 7px; font: 500 10.5px var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.onair .tc { font-size: 22px; font-weight: 500; letter-spacing: -.02em; margin: 6px 0 2px; }
.onair .who { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.onair.idle .tc { color: var(--dim); }
.side .meta { display: flex; justify-content: space-between; align-items: center; padding: 0 6px; font-size: 12px; color: var(--dim); }
.side .meta a { color: var(--dim); display: inline-flex; gap: 6px; align-items: center; }
.side .meta a:hover { color: var(--text); text-decoration: none; }
.lamp { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); flex: none; display: inline-block; }
.lamp.live { background: var(--tally); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tally) 20%, transparent); animation: lamp 2.4s ease-in-out infinite; }
.lamp.ok { background: var(--ok); }
.lamp.err { background: var(--err); }
@keyframes lamp { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--tally) 6%, transparent); } }

.main { padding: 26px 32px 64px 12px; min-width: 0; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.head .muted { margin-top: 6px; max-width: 640px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.tight { gap: 6px; }
.spacer { flex: 1; }
.grow { flex: 1 1 0; min-width: 0; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { background: var(--card); border-radius: var(--radius); padding: 18px 20px; min-width: 0; box-shadow: 0 1px 2px rgba(21,24,29,.05); }
.card.pad0 { padding: 0; overflow: hidden; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack.s8 { gap: 8px; }
.sep { height: 1px; background: var(--line2); margin: 16px 0; }
.kpi .v { font: 500 24px/1.1 var(--f-mono); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.kpi .l { color: var(--muted); font-size: 12px; margin-top: 4px; }

/* ---------- контролы ---------- */
button, .btn {
  font: 500 13.5px/1 var(--f-body); border: 1px solid var(--line); background: var(--card); color: var(--text);
  padding: 8px 13px; border-radius: 7px; cursor: pointer; display: inline-flex; gap: 7px; align-items: center;
  text-decoration: none; white-space: nowrap; transition: background .12s, border-color .12s;
}
button:hover, .btn:hover { border-color: var(--dim); text-decoration: none; }
button.primary, .btn.primary { background: var(--text); border-color: var(--text); color: var(--card); }
button.primary:hover, .btn.primary:hover { background: color-mix(in srgb, var(--text) 86%, var(--accent)); }
button.danger { color: var(--err); }
button.ghost { background: transparent; border-color: transparent; color: var(--muted); }
button.ghost:hover { color: var(--text); background: var(--card2); }
button.sm, .btn.sm { padding: 6px 10px; font-size: 12.5px; border-radius: 6px; gap: 6px; }
button:disabled { opacity: .45; cursor: default; }
button.loading { position: relative; color: transparent !important; }
button.loading .i { opacity: 0; }
button.loading::after { content: ""; position: absolute; left: 50%; top: 50%; width: 13px; height: 13px; margin: -6.5px; border: 1.5px solid var(--muted); border-top-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
input, select, textarea {
  font: 14px/1.4 var(--f-body); color: var(--text); background: var(--bg2); border: 1px solid var(--line2); border-radius: 7px;
  padding: 8px 10px; width: 100%; min-width: 0; transition: border-color .12s, background .12s;
}
input:hover, select:hover, textarea:hover { border-color: var(--line); }
textarea { resize: vertical; min-height: 96px; line-height: 1.55; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); background: var(--card); }
input[type=checkbox], input[type=radio] { width: 15px; height: 15px; accent-color: var(--text); margin: 0; flex: none; }
input[type=datetime-local] { font-family: var(--f-mono); font-size: 13px; }
label.f { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--muted); font-weight: 500; }
label.f .hint { font-weight: 400; color: var(--dim); font-size: 12px; line-height: 1.45; }
label.cb { display: inline-flex; gap: 9px; align-items: flex-start; cursor: pointer; line-height: 1.4; }
label.cb input { margin-top: 2px; }
.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px 18px; }
.fields .wide { grid-column: 1 / -1; }
.fields h3 { margin-top: 14px !important; padding-top: 14px; border-top: 1px solid var(--line2); }
.fields > .wide:first-child h3 { border-top: 0; padding-top: 0; margin-top: 0 !important; }

/* ---------- статусы ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; font: 500 12px/1.3 var(--f-body); color: var(--muted); white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--dim); flex: none; }
.badge.ok { color: var(--ok); } .badge.ok::before { background: var(--ok); }
.badge.warn { color: var(--warn); } .badge.warn::before { background: var(--warn); }
.badge.err { color: var(--err); } .badge.err::before { background: var(--err); }
.badge.info { color: var(--info); } .badge.info::before { background: var(--info); }
.badge.acc { color: var(--text); } .badge.acc::before { background: var(--text); }
.badge.plain::before { display: none; }
.badge.box { padding: 2px 7px; border-radius: 5px; background: var(--card2); }
.badge.box::before { display: none; }
.pf { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 5px; font: 600 10px/1 var(--f-mono); color: #fff; flex: none; letter-spacing: 0; }
.pf.youtube { background: var(--yt); }
.pf.instagram { background: linear-gradient(135deg, #f7a53a, #e1306c 55%, #8a3ab9); }
.pf.tiktok, .pf.tiktok_browser { background: #121212; color: #fff; box-shadow: inset -2px 0 0 #25f4ee, inset 2px 0 0 #fe2c55; }
.pf.telegram { background: var(--tg); }
.pf.demo { background: var(--card2); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px 6px 7px; border-radius: 7px; border: 1px solid var(--line); background: var(--card); cursor: pointer; font-size: 13px; user-select: none; }
.chip:hover { border-color: var(--dim); }
.chip.on { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }

/* ---------- таблицы и списки ---------- */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font: 500 11px var(--f-mono); color: var(--dim); text-transform: uppercase; letter-spacing: .07em; padding: 10px 14px; border-bottom: 1px solid var(--line2); }
td { padding: 10px 14px; border-bottom: 1px solid var(--line2); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
.list .it { display: flex; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line2); }
.list .it:first-child { padding-top: 2px; }
.list .it:last-child { border-bottom: 0; padding-bottom: 2px; }
.list .it .grow { flex: 1; min-width: 0; }
.ell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empty { color: var(--muted); padding: 28px 8px; text-align: center; }

/* ---------- вкладки ---------- */
.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; border-radius: 0; color: var(--muted); padding: 10px 0; margin-bottom: -1px; font-size: 14px; }
.tabs button:hover { color: var(--text); }
.tabs button.on { color: var(--text); border-bottom-color: var(--text); }

/* ---------- обзор: эфирная сетка ---------- */
.next { display: grid; grid-template-columns: 88px minmax(0, 1fr) auto; gap: 22px; align-items: center; }
.next .cov-mini { width: 88px; aspect-ratio: 9/16; border-radius: 6px; background: var(--card2) center/cover no-repeat; }
.next .when { display: flex; align-items: center; gap: 9px; font: 500 11px var(--f-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--tally); }
.next .tc { font-size: 44px; line-height: 1; letter-spacing: -.04em; font-weight: 500; margin: 10px 0 12px; }
.next .ttl { font: 600 17px/1.3 var(--f-display); }
.rundown { width: 100%; }
.rundown .day { font: 500 11px var(--f-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--dim); padding: 18px 0 6px; border-bottom: 1px solid var(--line2); }
.rundown .day:first-child { padding-top: 0; }
.rundown .r { display: grid; grid-template-columns: 62px 22px minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line2); }
.rundown .r:last-child { border-bottom: 0; }
.rundown .r .tc { font-size: 15px; font-weight: 500; }
.rundown .r.first .tc { color: var(--tally); }
.rundown .r.done { color: var(--muted); }
.rundown .r.done .tc { color: var(--dim); }
.statline { display: flex; flex-direction: column; gap: 0; }
.statline .s { display: flex; justify-content: space-between; align-items: baseline; padding: 11px 0; border-bottom: 1px solid var(--line2); }
.statline .s:last-child { border-bottom: 0; }
.statline .s b { font: 500 20px var(--f-mono); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.statline .s span { color: var(--muted); font-size: 13px; }

.dash { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; }
@media (max-width: 1100px) { .dash { grid-template-columns: 1fr; } }

/* ---------- видео ---------- */
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(172px, 1fr)); gap: 18px 14px; }
.vcard { cursor: pointer; min-width: 0; }
.vcard .thumb { aspect-ratio: 9/14; border-radius: var(--radius); background: var(--card2) center/cover no-repeat; position: relative; transition: transform .15s; box-shadow: 0 1px 2px rgba(21,24,29,.08); }
.vcard:hover .thumb { transform: translateY(-2px); }
.vcard .thumb .st { position: absolute; left: 8px; top: 8px; background: color-mix(in srgb, var(--card) 92%, transparent); padding: 3px 8px; border-radius: 5px; }
.vcard .thumb .dur { position: absolute; right: 8px; bottom: 8px; background: rgba(12,14,17,.72); color: #fff; border-radius: 4px; padding: 2px 6px; font: 500 11px var(--f-mono); }
.vcard .b { padding: 10px 2px 0; }
.vcard .b .t { font-weight: 600; }
.drop { border: 1.5px dashed var(--line); border-radius: var(--radius); padding: 30px; text-align: center; color: var(--muted); transition: .15s; cursor: pointer; background: var(--bg2); }
.drop b { color: var(--text); font-weight: 600; }
.drop.over { border-color: var(--text); background: var(--card); color: var(--text); }
.progress { height: 3px; background: var(--card2); border-radius: 99px; overflow: hidden; }
.progress > div { height: 100%; background: var(--text); width: 0; transition: width .2s; }

/* ---------- редактор ---------- */
.editor { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 22px; align-items: start; }
.player { width: 100%; aspect-ratio: 9/16; background: #0b0c0e; border-radius: var(--radius); display: block; }
.frames { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4px; }
.frames img { width: 100%; aspect-ratio: 9/16; object-fit: cover; border-radius: 4px; cursor: pointer; outline: 2px solid transparent; outline-offset: 1px; opacity: .85; transition: opacity .12s; }
.frames img:hover { opacity: 1; }
.frames img.on { outline-color: var(--text); opacity: 1; }
.covers { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.cov { position: relative; border-radius: 6px; cursor: pointer; background: var(--card2); outline: 2px solid transparent; outline-offset: 2px; }
.cov img { width: 100%; aspect-ratio: 9/16; object-fit: cover; display: block; border-radius: 6px; }
.cov.on { outline-color: var(--text); }
.cov .k { position: absolute; left: 6px; top: 6px; background: color-mix(in srgb, var(--card) 90%, transparent); padding: 2px 6px; border-radius: 4px; font-size: 11px; }
.cov .x { position: absolute; right: 5px; top: 5px; opacity: 0; padding: 4px; }
.cov:hover .x { opacity: 1; }
.post { background: var(--card); border-radius: var(--radius); box-shadow: 0 1px 2px rgba(21,24,29,.05); }
.post .ph { display: flex; align-items: center; gap: 10px; padding: 13px 18px; border-bottom: 1px solid var(--line2); flex-wrap: wrap; }
.post .ph b { font-weight: 600; }
.post .pb { padding: 16px 18px 18px; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px; }
.post .pb > div + div { border-left: 1px solid var(--line2); padding-left: 24px; }
.variants { display: flex; gap: 6px; flex-wrap: wrap; }
.variants button.primary { background: var(--text); }
.counter { font: 11.5px var(--f-mono); color: var(--dim); text-align: right; }
.counter.over { color: var(--err); }
.checks { display: flex; flex-direction: column; gap: 6px; }
.ck { display: flex; gap: 9px; font-size: 13px; align-items: flex-start; line-height: 1.45; }
.ck .d { width: 6px; height: 6px; border-radius: 50%; margin-top: 7px; flex: none; }
.ck.error .d { background: var(--err); } .ck.warn .d { background: var(--warn); } .ck.info .d { background: var(--dim); }
.ck.error { color: var(--err); }
.slots { display: flex; flex-wrap: wrap; gap: 6px; }
.slot { padding: 7px 10px; border-radius: 6px; border: 1px solid var(--line); background: var(--card); cursor: pointer; font: 12px/1.3 var(--f-body); text-align: left; display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.slot:hover { border-color: var(--text); }
.slot b { font: 500 12.5px var(--f-mono); }
.slot span { font: 11.5px var(--f-mono); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 13px; }
.kv > :nth-child(odd) { color: var(--muted); }
.kv > :nth-child(even) { font-variant-numeric: tabular-nums; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- календарь ---------- */
.calwrap { max-height: calc(100vh - 180px); overflow: auto; border-radius: var(--radius); background: var(--card); box-shadow: 0 1px 2px rgba(21,24,29,.05); }
.cal { display: grid; grid-template-columns: 58px repeat(7, minmax(0, 1fr)); }
.cal .ch { padding: 10px 8px; text-align: left; font: 500 12px var(--f-mono); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); border-bottom: 1px solid var(--line); background: var(--card); position: sticky; top: 0; z-index: 2; border-left: 1px solid var(--line2); }
.cal .ch:first-child { border-left: 0; }
.cal .ch.today { color: var(--tally); }
.cal .hr { font: 11px var(--f-mono); color: var(--dim); text-align: right; padding: 3px 8px 0 0; border-top: 1px solid var(--line2); }
.cal .cell { border-top: 1px solid var(--line2); border-left: 1px solid var(--line2); min-height: 36px; padding: 3px; position: relative; }
.cal .cell.drag { background: color-mix(in srgb, var(--text) 10%, transparent) !important; }
.cal .cell.past { background-image: repeating-linear-gradient(135deg, transparent 0 7px, color-mix(in srgb, var(--line) 40%, transparent) 7px 8px); }
.ev { font-size: 11.5px; border-radius: 5px; padding: 4px 6px; margin-bottom: 2px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line), inset 3px 0 0 var(--text); cursor: grab; display: flex; gap: 6px; align-items: center; overflow: hidden; }
.ev .pf { width: 15px; height: 15px; font-size: 8px; border-radius: 3px; }
.ev .ell { font-family: var(--f-mono); font-size: 11px; }
.ev.published, .ev.imported { opacity: .55; cursor: pointer; box-shadow: inset 0 0 0 1px var(--line2), inset 3px 0 0 var(--ok); background: var(--bg2); }
.ev.failed { box-shadow: inset 0 0 0 1px var(--line), inset 3px 0 0 var(--err); }
.ev.processing, .ev.publishing { box-shadow: inset 0 0 0 1px var(--line), inset 3px 0 0 var(--tally); }

/* ---------- аналитика ---------- */
.heat { display: grid; grid-template-columns: 26px repeat(24, minmax(0, 1fr)); gap: 2px; font: 10.5px var(--f-mono); }
.heat .hc { aspect-ratio: 1.25; border-radius: 2px; cursor: default; }
.heat .hl { color: var(--dim); text-align: left; }
.heat .dl { color: var(--muted); display: flex; align-items: center; }
.bars .b { display: grid; grid-template-columns: 140px 1fr 70px; gap: 12px; align-items: center; font-size: 13px; padding: 4px 0; }
.bars .track { height: 10px; position: relative; }
.bars .track .mid { position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--line); }
.bars .fill { position: absolute; top: 0; height: 100%; border-radius: 2px; }
.bars .small { font-family: var(--f-mono); }
.series { width: 100%; height: 140px; display: block; }
.series + .row { margin-top: 10px; }

/* ---------- модалки, тосты, баннеры ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(15,17,20,.42); display: grid; place-items: center; z-index: 50; padding: 20px; animation: fade .15s; }
.modal { background: var(--card); border-radius: 12px; width: min(760px, 100%); max-height: 90vh; overflow: auto; box-shadow: 0 24px 60px rgba(15,17,20,.25); }
.modal .mh { display: flex; align-items: center; padding: 18px 22px 14px; gap: 10px; position: sticky; top: 0; background: var(--card); z-index: 1; }
.modal .mb { padding: 4px 22px 20px; }
.modal .mf { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 22px; border-top: 1px solid var(--line2); position: sticky; bottom: 0; background: var(--card); }
@keyframes fade { from { opacity: 0; } }
#toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 99; }
.toast { background: var(--text); color: var(--card); padding: 11px 16px 11px 14px; border-radius: 8px; box-shadow: var(--shadow); max-width: 420px; animation: fade .2s; display: flex; gap: 10px; align-items: baseline; font-size: 13.5px; }
.toast::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--info); flex: none; transform: translateY(-1px); }
.toast.ok::before { background: #3fbf84; } .toast.err::before { background: #ff6a55; } .toast.warn::before { background: #e3a342; }
.banner { border-radius: var(--radius); padding: 13px 16px; display: flex; gap: 12px; align-items: center; background: var(--card); box-shadow: inset 3px 0 0 var(--dim), 0 1px 2px rgba(21,24,29,.05); }
.banner.err { box-shadow: inset 3px 0 0 var(--err), 0 1px 2px rgba(21,24,29,.05); }
.banner.warn { box-shadow: inset 3px 0 0 var(--warn), 0 1px 2px rgba(21,24,29,.05); }
.banner.ok { box-shadow: inset 3px 0 0 var(--ok), 0 1px 2px rgba(21,24,29,.05); }
.banner.info { box-shadow: inset 3px 0 0 var(--info), 0 1px 2px rgba(21,24,29,.05); }
.card .banner, .post .banner, .modal .banner { background: var(--bg2); }
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login .card { width: min(360px, 100%); padding: 30px 28px; }
.login .brand { padding: 0 0 18px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: var(--card2); flex: none; }
.acc-card { display: flex; flex-direction: column; gap: 14px; }
.plat-btn { display: flex; gap: 14px; align-items: center; padding: 13px 14px; border-radius: 8px; border: 1px solid var(--line2); background: var(--card); cursor: pointer; text-align: left; width: 100%; font-weight: 400; white-space: normal; line-height: 1.45; }
.plat-btn:hover { border-color: var(--text); }
.plat-btn b { font-weight: 600; }
.plat-btn .pf { width: 30px; height: 30px; font-size: 11px; border-radius: 7px; }
details summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.copy { cursor: pointer; }

@media (max-width: 1100px) {
  .editor { grid-template-columns: 1fr; }
  .editor .player { max-width: 300px; margin: 0 auto; }
  .post .pb { grid-template-columns: 1fr; }
  .post .pb > div + div { border-left: 0; padding-left: 0; border-top: 1px solid var(--line2); padding-top: 16px; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3 { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; bottom: 0; top: auto; height: auto; width: 100%; flex-direction: row; z-index: 20; padding: 6px; background: var(--card); border-top: 1px solid var(--line); overflow-x: auto; }
  .brand, .side .foot { display: none; }
  .nav { flex-direction: row; gap: 2px; }
  .nav a { padding: 9px 11px; }
  .nav a .lbl { display: none; }
  .main { padding: 18px 16px 90px; }
  .g2, .g4 { grid-template-columns: 1fr; }
  .frames { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .bars .b { grid-template-columns: 96px 1fr 58px; }
  .next { grid-template-columns: 64px minmax(0, 1fr); }
  .next .cov-mini { width: 64px; }
  .next .tc { font-size: 34px; }
  .rundown .r { grid-template-columns: 52px 22px minmax(0, 1fr) auto; }
  .rundown .r > :nth-child(5) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
