/* Пульт — оформление. Цвета из профиля автора: кремовый #FAF7F0, горчичный #D9A63A, рыжий #E8913A, тёмный #20160E. */
:root {
  --bg: #FAF7F0;
  --surface: #FFFFFF;
  --surface-2: #F3ECDF;
  --ink: #20160E;
  --ink-2: #5E4E3E;
  --muted: #8C7B67;
  --line: #E9DFCD;
  --accent: #E8913A;
  --accent-ink: #FFFFFF;
  --accent-soft: #FBE7D2;
  --mustard: #D9A63A;
  --mustard-soft: #F6EBCF;
  --good: #3F8A57;
  --good-soft: #E1F0E4;
  --bad: #C2553D;
  --bad-soft: #F7E1DB;
  --info: #4D72A8;
  --info-soft: #E2EAF5;
  --shadow: 0 1px 2px rgba(32, 22, 14, .06), 0 6px 18px rgba(32, 22, 14, .06);
  --radius: 16px;
  --tab-h: 62px;
  --safe-top: max(env(safe-area-inset-top, 0px), var(--tg-safe-area-inset-top, 0px));
  --safe-bottom: max(env(safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px));
  --content-top: var(--tg-content-safe-area-inset-top, 0px);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #15110C;
  --surface: #211A13;
  --surface-2: #2A2219;
  --ink: #F5EDE0;
  --ink-2: #D2C3AE;
  --muted: #A3927C;
  --line: #3A2F23;
  --accent: #F09A48;
  --accent-ink: #1A120A;
  --accent-soft: #3E2A17;
  --mustard: #E0B04A;
  --mustard-soft: #3A2F17;
  --good: #67B37F;
  --good-soft: #1E3325;
  --bad: #E07A62;
  --bad-soft: #3B221C;
  --info: #7FA2D6;
  --info-soft: #1D2838;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 18px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body {
  font: 15px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
img { max-width: 100%; display: block; }
a { color: var(--accent); }
.hidden, [hidden] { display: none !important; }

/* ---------- каркас ---------- */
#app { min-height: 100vh; padding-top: calc(var(--safe-top) + var(--content-top)); padding-bottom: calc(var(--tab-h) + var(--safe-bottom) + 76px); } /* +место под кнопку «Агент» */
.screen { padding: 8px 16px 24px; max-width: 720px; margin: 0 auto; }
.topbar { display: flex; align-items: center; gap: 10px; padding: 10px 0 6px; }
.topbar h1 { font-size: 26px; line-height: 1.1; margin: 0; letter-spacing: -.02em; flex: 1; }
.topbar .sub { color: var(--muted); font-size: 13px; }
.brand { font-family: "Comfortaa", "Segoe UI", sans-serif; font-weight: 700; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  height: calc(var(--tab-h) + var(--safe-bottom)); padding-bottom: var(--safe-bottom);
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.tab { text-decoration: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: 11px; font-weight: 600; position: relative; }
.tab svg { width: 24px; height: 24px; }
.tab.on { color: var(--accent); }
.tab .dot { position: absolute; top: 8px; left: calc(50% + 8px); min-width: 16px; height: 16px; border-radius: 8px; background: var(--bad); color: #fff; font-size: 10px; line-height: 16px; padding: 0 4px; }

.fab {
  position: fixed; right: 16px; bottom: calc(var(--tab-h) + var(--safe-bottom) + 14px); z-index: 31;
  height: 52px; padding: 0 18px 0 14px; border-radius: 26px; display: flex; align-items: center; gap: 8px;
  background: var(--ink); color: var(--bg); font-weight: 700; box-shadow: 0 6px 20px rgba(32, 22, 14, .25);
}
.fab svg { width: 22px; height: 22px; }
.fab .busy { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .3; } }

/* ---------- элементы ---------- */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; margin: 10px 0; }
.card.flat { box-shadow: none; border: 1px solid var(--line); }
.card h3, .section-title { margin: 0 0 8px; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.section-title { margin: 22px 2px 6px; display: flex; justify-content: space-between; align-items: baseline; }
.section-title a { text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 600; text-decoration: none; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.btn { height: 44px; padding: 0 16px; border-radius: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--surface-2); color: var(--ink); }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.dark { background: var(--ink); color: var(--bg); }
.btn.ghost { background: transparent; border: 1px solid var(--line); }
.btn.good { background: var(--good-soft); color: var(--good); }
.btn.bad { background: var(--bad-soft); color: var(--bad); }
.btn.sm { height: 34px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn svg { width: 18px; height: 18px; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

.chip { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border-radius: 12px; font-size: 12px; font-weight: 700; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.chip.accent { background: var(--accent-soft); color: var(--accent); }
.chip.mustard { background: var(--mustard-soft); color: #9A7015; }
:root[data-theme="dark"] .chip.mustard { color: var(--mustard); }
.chip.good { background: var(--good-soft); color: var(--good); }
.chip.bad { background: var(--bad-soft); color: var(--bad); }
.chip.info { background: var(--info-soft); color: var(--info); }

.chips { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 8px; scrollbar-width: none; margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
.chips::-webkit-scrollbar { display: none; }
.chips .chip { height: 32px; padding: 0 13px; font-size: 13px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.chips .chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--surface-2); border-radius: 12px; padding: 3px; margin: 6px 0 10px; }
.seg button { height: 34px; border-radius: 9px; font-size: 14px; font-weight: 700; color: var(--muted); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

/* ---------- сетка роликов ---------- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin: 0 -12px; }
@media (min-width: 560px) { .grid { grid-template-columns: repeat(4, 1fr); margin: 0; gap: 8px; } }
.tile, .thumb { isolation: isolate; }
.tile { position: relative; aspect-ratio: 9 / 16; border-radius: 10px; overflow: hidden; background: var(--surface-2); cursor: pointer; }
.tile img { width: 100%; height: 100%; object-fit: cover; }
.tile .shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.72) 0%, rgba(0,0,0,0) 45%, rgba(0,0,0,0) 75%, rgba(0,0,0,.35) 100%); }
.tile .views { position: absolute; left: 8px; bottom: 26px; color: #fff; font-weight: 800; font-size: 17px; display: flex; align-items: center; gap: 4px; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.tile .views svg { width: 15px; height: 15px; }
.tile .cap { position: absolute; left: 8px; right: 8px; bottom: 7px; color: rgba(255,255,255,.9); font-size: 11px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .badge { position: absolute; top: 6px; left: 6px; }
.tile .badge-r { position: absolute; top: 6px; right: 6px; }
.tile .noimg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 12px; font-weight: 700; color: var(--ink-2); font-size: 13px; background: linear-gradient(160deg, var(--mustard-soft), var(--accent-soft)); }

/* ---------- списки ---------- */
.list-item { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.list-item:last-child { border-bottom: 0; }
.thumb { width: 54px; aspect-ratio: 9/16; border-radius: 8px; overflow: hidden; background: var(--surface-2); flex: none; position: relative; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--muted); text-align: center; padding: 4px; background: linear-gradient(160deg, var(--mustard-soft), var(--accent-soft)); }

/* день в календаре */
.day { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); margin: 10px 0; overflow: hidden; }
.day-head { display: flex; align-items: baseline; gap: 8px; padding: 10px 14px 4px; }
.day-head b { font-size: 16px; }
.day-head.today b { color: var(--accent); }
.slot { display: flex; gap: 12px; align-items: center; padding: 8px 14px; cursor: pointer; }
.slot + .slot { border-top: 1px dashed var(--line); }
.slot .time { width: 44px; font-weight: 800; font-size: 14px; color: var(--ink-2); flex: none; }
.slot.empty .grow { color: var(--bad); font-weight: 700; }
.slot .thumb { width: 40px; }
.slot > svg { width: 20px; height: 20px; flex: none; color: var(--muted); }
.hint-link { display: flex; align-items: center; gap: 8px; margin: 14px 2px 0; color: var(--ink-2); text-decoration: none; font-size: 14px; }
.hint-link svg { width: 18px; height: 18px; color: var(--accent); flex: none; }
details.more { margin-top: 14px; }
details.more > summary { cursor: pointer; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); list-style: none; padding: 6px 0; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::after { content: " ▾"; }
details.more[open] > summary::after { content: " ▴"; }

/* ---------- цифры ---------- */
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.kpi { background: var(--surface); border-radius: 14px; padding: 10px 12px; box-shadow: var(--shadow); }
.kpi .v { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.kpi .l { font-size: 12px; color: var(--muted); font-weight: 600; }
.kpi .d { font-size: 12px; font-weight: 700; margin-top: 2px; }
.up { color: var(--good); } .down { color: var(--bad); }
.chart { width: 100%; height: 150px; display: block; }
.legend { display: flex; gap: 12px; font-size: 12px; color: var(--muted); margin-top: 4px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 4px; }
.table-wrap { overflow-x: auto; margin: 0 -14px; padding: 0 14px; }
table.t { border-collapse: collapse; width: 100%; font-size: 13px; }
table.t th { text-align: right; font-weight: 700; color: var(--muted); font-size: 11px; padding: 6px 6px; white-space: nowrap; }
table.t td { text-align: right; padding: 8px 6px; border-top: 1px solid var(--line); white-space: nowrap; font-variant-numeric: tabular-nums; }
table.t th:first-child, table.t td:first-child { text-align: left; white-space: normal; min-width: 130px; }
.bar { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }

/* ---------- лист (детали) ---------- */
.sheet-bg { position: fixed; inset: 0; background: rgba(20, 14, 8, .45); z-index: 40; opacity: 0; transition: opacity .2s; }
.sheet-bg.show { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; max-height: calc(100vh - var(--safe-top) - 24px);
  background: var(--bg); border-radius: 22px 22px 0 0; overflow-y: auto; transform: translateY(100%); transition: transform .25s ease;
  padding: 0 16px calc(24px + var(--safe-bottom)); max-width: 720px; margin: 0 auto; overscroll-behavior: contain;
}
.sheet.show { transform: translateY(0); }
.sheet .grab { position: sticky; top: 0; padding: 8px 0 6px; background: var(--bg); z-index: 2; display: flex; align-items: center; }
.sheet .grab::before { content: ""; width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto; }
.sheet .close { position: absolute; right: 0; top: 4px; width: 32px; height: 32px; border-radius: 16px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; }
.sheet .close svg { width: 16px; height: 16px; }
.sheet h2 { font-size: 22px; line-height: 1.2; margin: 4px 0 6px; letter-spacing: -.01em; }

.player { position: relative; width: min(100%, 300px); aspect-ratio: 9/16; margin: 6px auto 10px; border-radius: 16px; overflow: hidden; background: #000; box-shadow: var(--shadow); }
.player img, .player video { width: 100%; height: 100%; object-fit: cover; }
.player .play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.player .play span { width: 64px; height: 64px; border-radius: 32px; background: rgba(255,255,255,.9); display: flex; align-items: center; justify-content: center; }
.player .play svg { width: 28px; height: 28px; color: #20160E; margin-left: 4px; }
.player .wait { position: absolute; left: 0; right: 0; bottom: 12px; text-align: center; color: #fff; font-size: 13px; text-shadow: 0 1px 3px #000; }

.caption-box { white-space: pre-wrap; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; font-size: 14px; line-height: 1.45; }
textarea.input, input.input { width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 12px; outline: none; resize: vertical; }
textarea.input:focus, input.input:focus { border-color: var(--accent); }
.field-label { font-size: 12px; font-weight: 700; color: var(--muted); margin: 12px 0 4px; text-transform: uppercase; letter-spacing: .05em; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 6px 10px; font-size: 14px; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; }
.timeline { border-left: 2px solid var(--line); margin-left: 6px; padding-left: 14px; }
.timeline .pt { position: relative; padding: 4px 0 10px; font-size: 14px; }
.timeline .pt::before { content: ""; position: absolute; left: -20px; top: 9px; width: 10px; height: 10px; border-radius: 5px; background: var(--accent); }

/* markdown */
.md { font-size: 15px; line-height: 1.5; }
.md h1 { font-size: 20px; margin: 6px 0 8px; } .md h2 { font-size: 17px; margin: 18px 0 6px; } .md h3 { font-size: 15px; margin: 14px 0 4px; }
.md ul, .md ol { padding-left: 20px; margin: 6px 0; } .md li { margin: 3px 0; }
.md pre { white-space: pre-wrap; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px; font: 13px/1.4 ui-monospace, Consolas, monospace; }
.md code { background: var(--surface-2); border-radius: 4px; padding: 0 4px; font-size: 13px; }
.md p { margin: 6px 0; }
.md table { border-collapse: collapse; font-size: 13px; display: block; overflow-x: auto; }
.md td, .md th { border: 1px solid var(--line); padding: 4px 6px; }

/* ---------- чат ---------- */
.chat { display: flex; flex-direction: column; min-height: 60vh; }
.chat-head { display: flex; gap: 8px; align-items: center; margin: 2px 0 8px; }
.who-switch { display: flex; background: var(--surface-2); border-radius: 10px; padding: 3px; }
.who-switch button { height: 30px; padding: 0 10px; border-radius: 8px; font-size: 13px; font-weight: 700; color: var(--muted); }
.who-switch button.on { background: var(--surface); color: var(--ink); }
.msgs { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 6px 0 12px; }
.msg { max-width: 86%; padding: 9px 12px; border-radius: 16px; white-space: pre-wrap; font-size: 15px; line-height: 1.42; word-wrap: break-word; }
.msg.me { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 5px; }
.msg.agent { align-self: flex-start; background: var(--surface); box-shadow: var(--shadow); border-bottom-left-radius: 5px; white-space: normal; }
.msg.error { align-self: flex-start; background: var(--bad-soft); color: var(--bad); }
.msg .at { display: block; font-size: 11px; opacity: .6; margin-top: 3px; }
.msg.typing { color: var(--muted); font-style: italic; }
.composer { position: sticky; bottom: 0; background: var(--bg); padding: 8px 0 4px; display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { flex: 1; min-height: 44px; max-height: 160px; border-radius: 22px; padding: 11px 16px; }
.composer .send { width: 44px; height: 44px; border-radius: 22px; background: var(--accent); color: var(--accent-ink); display: flex; align-items: center; justify-content: center; flex: none; }
.composer .send svg { width: 20px; height: 20px; }
.ctx { font-size: 12px; color: var(--muted); background: var(--surface-2); border-radius: 10px; padding: 6px 10px; margin-bottom: 6px; }
.quick { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 8px; }
.quick button { height: 30px; padding: 0 10px; border-radius: 15px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; }

/* ---------- идеи ---------- */
.idea { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; margin: 10px 0; cursor: pointer; }
.idea .t { font-size: 17px; font-weight: 800; line-height: 1.25; margin: 6px 0 4px; }
.idea .open { font-style: italic; color: var(--ink-2); border-left: 3px solid var(--accent); padding-left: 10px; margin: 8px 0; }
.idea .why { font-size: 13px; color: var(--muted); }
.theses { counter-reset: t; list-style: none; padding: 0; margin: 6px 0; }
.theses li { counter-increment: t; position: relative; padding: 6px 0 6px 34px; border-bottom: 1px solid var(--line); }
.theses li:last-child { border-bottom: 0; }
.theses li::before { content: counter(t); position: absolute; left: 0; top: 6px; width: 24px; height: 24px; border-radius: 12px; background: var(--mustard-soft); color: #9A7015; font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.rec-cta { position: sticky; bottom: calc(var(--safe-bottom) + 6px); margin-top: 14px; }
.rec-cta .btn { height: 54px; font-size: 17px; border-radius: 16px; box-shadow: 0 8px 22px rgba(232, 145, 58, .35); }
.rec-dot { width: 14px; height: 14px; border-radius: 7px; background: currentColor; display: inline-block; }

/* ---------- запись ---------- */
.rec { position: fixed; inset: 0; z-index: 60; background: #000; color: #fff; display: flex; flex-direction: column; }
.rec video.cam { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.rec video.cam.nomirror { transform: none; }
.rec .prompter {
  position: absolute; left: 0; right: 0; top: 0; padding: calc(var(--safe-top) + var(--content-top) + 46px) 18px 18px;
  background: linear-gradient(to bottom, rgba(0,0,0,.78) 0%, rgba(0,0,0,.6) 70%, rgba(0,0,0,0) 100%);
  max-height: 46%; overflow: hidden; text-align: center;
}
.rec .prompter .line { font-weight: 700; line-height: 1.25; text-shadow: 0 2px 6px rgba(0,0,0,.6); }
.rec .prompter .next { margin-top: 10px; opacity: .45; font-size: .75em; font-weight: 600; }
.rec .prompter .counter { font-size: 12px; opacity: .6; margin-bottom: 6px; letter-spacing: .08em; }
.rec .prompter.scroll { text-align: left; }
.rec .prompter.scroll .text { white-space: pre-wrap; font-weight: 600; line-height: 1.45; will-change: transform; }
.rec .top { position: absolute; top: calc(var(--safe-top) + var(--content-top) + 6px); left: 12px; right: 12px; display: flex; justify-content: space-between; align-items: center; z-index: 3; }
.rec .pill { height: 32px; padding: 0 12px; border-radius: 16px; background: rgba(0,0,0,.45); backdrop-filter: blur(6px); display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: #fff; }
.rec .pill.red { background: #D93B30; }
.rec .bottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 16px calc(var(--safe-bottom) + 18px); background: linear-gradient(to top, rgba(0,0,0,.7), rgba(0,0,0,0)); z-index: 3; }
.rec .controls { display: flex; align-items: center; justify-content: space-around; }
.rec .shutter { width: 76px; height: 76px; border-radius: 38px; border: 4px solid #fff; display: flex; align-items: center; justify-content: center; }
.rec .shutter i { width: 58px; height: 58px; border-radius: 29px; background: #E8413A; transition: all .2s; }
.rec .shutter.on i { width: 30px; height: 30px; border-radius: 8px; }
.rec .side { width: 64px; height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; font-weight: 700; color: #fff; }
.rec .side svg { width: 26px; height: 26px; }
.rec .modes { display: flex; justify-content: center; gap: 6px; margin-bottom: 14px; }
.rec .modes button { height: 30px; padding: 0 12px; border-radius: 15px; font-size: 13px; font-weight: 700; color: rgba(255,255,255,.75); background: rgba(0,0,0,.35); }
.rec .modes button.on { background: #fff; color: #000; }
.rec .countdown { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 120px; font-weight: 800; text-shadow: 0 4px 20px rgba(0,0,0,.5); z-index: 4; pointer-events: none; }
.rec .panel { position: absolute; left: 12px; right: 12px; bottom: calc(var(--safe-bottom) + 120px); background: rgba(20,20,20,.88); backdrop-filter: blur(10px); border-radius: 18px; padding: 14px; z-index: 5; }
.rec .panel label { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; padding: 6px 0; }
.rec .panel input[type=range] { flex: 1; accent-color: #E8913A; }
.rec .review { position: absolute; inset: 0; background: #000; z-index: 6; display: flex; flex-direction: column; }
.rec .review video { flex: 1; width: 100%; object-fit: contain; background: #000; min-height: 0; }
.rec .review .actions { padding: 14px 16px calc(var(--safe-bottom) + 16px); display: grid; gap: 10px; }
.rec .progress { height: 8px; border-radius: 4px; background: rgba(255,255,255,.2); overflow: hidden; }
.rec .progress i { display: block; height: 100%; background: #E8913A; width: 0; transition: width .2s; }
.rec .msgbox { position: absolute; inset: auto 16px 40% 16px; text-align: center; background: rgba(0,0,0,.6); padding: 16px; border-radius: 16px; z-index: 4; }

/* ---------- мелкое ---------- */
.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.empty b { display: block; color: var(--ink); font-size: 16px; margin-bottom: 4px; }
.toast { position: fixed; left: 50%; bottom: calc(var(--tab-h) + var(--safe-bottom) + 80px); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-weight: 600; z-index: 80; box-shadow: var(--shadow); max-width: 90vw; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 14px; margin: 8px 0; font-size: 14px; }
.alert.warn { background: var(--mustard-soft); }
.alert.bad { background: var(--bad-soft); }
.alert.info { background: var(--info-soft); }
.alert .ic { font-size: 18px; line-height: 1; }
.wait-item { padding: 12px 0; border-bottom: 1px solid var(--line); }
.wait-item:last-child { border-bottom: 0; }
.wait-item p { margin: 0 0 8px; font-size: 14px; }
.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--surface), var(--surface-2)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 12px; }
@keyframes sk { to { background-position: -200% 0; } }
.hello { font-size: 15px; color: var(--ink-2); margin: 0 0 4px; }
.pub { display: flex; gap: 12px; align-items: center; }
.pub .thumb { width: 64px; }
.pub .t { font-weight: 700; line-height: 1.25; }
.stat-line { display: flex; gap: 12px; font-size: 13px; color: var(--ink-2); margin-top: 4px; flex-wrap: wrap; }
.stat-line b { color: var(--ink); }
