/* «Пульт» — вид «Театр теней» (выбран владельцем 20.10.2026).
   Ночь: тёмная тёплая сцена, лампочки — мягкие пятна света. День: освещённый экран театра теней. */

:root {
  --stage-top: #3a2a1c;
  --stage: #1a130e;
  --stage-deep: #120d0a;
  --ink: #f1e6d2;
  --ink-soft: #cdb894;
  --ink-mute: #9c876b;
  --lantern: #f2c14e;
  --lantern-ink: #2a1c0e;
  --lantern-text: #f2c14e;
  --lit-on: #6fcf5a;
  --lit-on-core: #c7f59b;
  --lit-wait: #ff5f3d;
  --lit-wait-core: #ffc4b0;
  --lit-off: #3a2d22;
  --lit-off-core: #5a4a3a;
  --veil: rgba(255, 236, 200, 0.07);
  --veil-2: rgba(255, 236, 200, 0.12);
  --line: rgba(242, 193, 78, 0.16);
  --danger-bg: rgba(255, 95, 61, 0.14);
  --danger-line: rgba(255, 95, 61, 0.5);
  --ok-ink: #132a0c;
  --code-bg: rgba(0, 0, 0, 0.35);
  --sheet: #231a13;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  --serif: 'Lora', Georgia, 'Times New Roman', serif;
  --sans: 'PT Sans', -apple-system, 'Segoe UI', Roboto, sans-serif;
  --r-lg: 22px;
  --r-md: 16px;
  --r-pill: 999px;
  --tap: 46px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bot: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

/* День — светлая тема того же характера (свет за экраном театра теней) */
:root[data-theme='light'] {
  --stage-top: #fbf3e2;
  --stage: #f3e9d6;
  --stage-deep: #eadcc2;
  --ink: #2a1c0e;
  --ink-soft: #5b4630;
  --ink-mute: #8a7356;
  --lantern: #d39a22;
  --lantern-ink: #2a1c0e;
  --lantern-text: #8a5a00;
  --step-ink: #2a7a20;
  --lit-on: #2f9e2a;
  --lit-on-core: #9be08a;
  --lit-wait: #e0401e;
  --lit-wait-core: #ffb39d;
  --lit-off: #cdbb9e;
  --lit-off-core: #e3d5bd;
  --veil: rgba(90, 60, 20, 0.06);
  --veil-2: rgba(90, 60, 20, 0.1);
  --line: rgba(120, 80, 20, 0.18);
  --danger-bg: rgba(224, 64, 30, 0.08);
  --danger-line: rgba(224, 64, 30, 0.45);
  --ok-ink: #ffffff;
  --code-bg: rgba(90, 60, 20, 0.1);
  --sheet: #fbf4e6;
  --shadow: 0 20px 50px rgba(90, 60, 20, 0.22);
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme='dark']) {
    --stage-top: #fbf3e2;
    --stage: #f3e9d6;
    --stage-deep: #eadcc2;
    --ink: #2a1c0e;
    --ink-soft: #5b4630;
    --ink-mute: #8a7356;
    --lantern: #d39a22;
    --lantern-ink: #2a1c0e;
    --lantern-text: #8a5a00;
    --step-ink: #2a7a20;
    --lit-on: #2f9e2a;
    --lit-on-core: #9be08a;
    --lit-wait: #e0401e;
    --lit-wait-core: #ffb39d;
    --lit-off: #cdbb9e;
    --lit-off-core: #e3d5bd;
    --veil: rgba(90, 60, 20, 0.06);
    --veil-2: rgba(90, 60, 20, 0.1);
    --line: rgba(120, 80, 20, 0.18);
    --danger-bg: rgba(224, 64, 30, 0.08);
    --danger-line: rgba(224, 64, 30, 0.45);
    --ok-ink: #ffffff;
    --code-bg: rgba(90, 60, 20, 0.1);
    --sheet: #fbf4e6;
    --shadow: 0 20px 50px rgba(90, 60, 20, 0.22);
    color-scheme: light;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html {
  -webkit-text-size-adjust: 100%;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  scrollbar-width: none;
}
html::-webkit-scrollbar { display: none; }
img, svg { -webkit-user-drag: none; user-drag: none; }
input, textarea, .msg-text, .msg-text * { -webkit-user-select: text; user-select: text; }
body {
  min-height: 100dvh;
  background: radial-gradient(130% 70% at 50% 0%, var(--stage-top) 0%, var(--stage) 55%, var(--stage-deep) 100%) fixed, var(--stage);
  color: var(--ink);
  font: 400 16px/1.45 var(--sans);
  overscroll-behavior-y: none;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--lantern);
  outline-offset: 2px;
}
a { color: var(--lantern-text); }
:where(.msg-text p, .msg-text li, .card p) { hyphens: auto; -webkit-hyphens: auto; text-wrap: pretty; }
h1, h2, h3, button, .tab, .chip { hyphens: manual; -webkit-hyphens: manual; }

.app { max-width: 560px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; }
.screen { flex: 1; display: flex; flex-direction: column; padding-top: var(--safe-top); min-height: 100dvh; }
.chat-screen { height: 100dvh; min-height: 0; flex: none; }
.scroll { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.scroll::-webkit-scrollbar { display: none; }

/* ───── Лампочки ───── */
.glow { flex: none; width: 40px; height: 40px; border-radius: 50%; display: block; }
.glow.working { background: radial-gradient(circle, var(--lit-on-core) 0%, var(--lit-on) 38%, transparent 70%); animation: breathe 2.4s ease-in-out infinite; }
.glow.waiting { background: radial-gradient(circle, var(--lit-wait-core) 0%, var(--lit-wait) 38%, transparent 70%); }
.glow.queued { background: radial-gradient(circle, #ffe7a3 0%, var(--lantern) 34%, transparent 66%); opacity: 0.75; }
.glow.idle, .glow.error, .glow.offline { background: radial-gradient(circle, var(--lit-off-core) 0%, var(--lit-off) 40%, transparent 70%); }
.glow.error { box-shadow: inset 0 0 0 2px var(--danger-line); }
.glow.sm { width: 22px; height: 22px; }
@keyframes breathe { 50% { transform: scale(0.86); opacity: 0.8; } }
@media (prefers-reduced-motion: reduce) { .glow.working { animation: none; } }

/* ───── Сцена (шапка списка) ───── */
.stage { padding: 18px 20px 14px; text-align: center; position: relative; }
.stage .theme-btn { position: absolute; top: 14px; right: 14px; }
.theme-btn { width: var(--tap); height: var(--tap); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--veil-2); color: var(--lantern-text); flex: none; }
.theme-btn svg { width: 22px; height: 22px; }
.theme-btn:active { transform: scale(0.94); }
.title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-right: 14px; }
.stage h1 { font: 600 34px/1.1 var(--serif); letter-spacing: 0.01em; }
.stage .sub { color: var(--ink-soft); font-size: 15px; margin-top: 6px; min-height: 22px; }
.hosts { display: flex; justify-content: center; gap: 26px; margin-top: 16px; flex-wrap: wrap; }
.host-bulb { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-soft); min-width: 72px; }
.bulb { width: 46px; height: 46px; border-radius: 50%; }
.bulb.lit { background: radial-gradient(circle, #ffe7a3 0%, var(--lantern) 45%, transparent 72%); }
.bulb.busy { background: radial-gradient(circle, var(--lit-on-core) 0%, var(--lit-on) 45%, transparent 72%); }
.bulb.off { background: radial-gradient(circle, var(--lit-off-core) 0%, var(--lit-off) 60%, transparent 75%); }

/* ───── Список чатов ───── */
.list { padding: 4px 12px 12px; display: flex; flex-direction: column; gap: 2px; }
.row { display: flex; gap: 14px; align-items: center; padding: 12px 10px; border-radius: var(--r-md); text-align: left; width: 100%; min-height: 64px; }
.row:active { background: var(--veil); }
.row.hot { background: rgba(242, 193, 78, 0.09); }
.row .t { flex: 1; min-width: 0; display: block; }
.row .t > span { display: block; }
.row .side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; align-self: flex-start; padding-top: 2px; }

/* Лампочка с подписью (владелец 20.10): зелёная мигает — работает, красная мигает — ждёт вас, красная — не работает */
.status { display: inline-flex; align-items: center; gap: 6px; font: 700 12.5px/1 var(--sans); white-space: nowrap; padding: 5px 9px 5px 7px; border-radius: 999px; background: var(--veil); }
.status .lamp { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.status.on { color: var(--step-ink, var(--lit-on)); }
.status.on .lamp { background: var(--lit-on); box-shadow: 0 0 8px var(--lit-on); animation: blink 1.1s ease-in-out infinite; }
.status.ask { color: var(--lit-wait); }
.status.ask .lamp { background: var(--lit-wait); box-shadow: 0 0 8px var(--lit-wait); animation: blink 0.8s ease-in-out infinite; }
.status.queue { color: var(--lantern-text); }
.status.queue .lamp { background: var(--lantern); }
.status.stopping { color: var(--lantern-text); }
.status.stopping .lamp { background: var(--lantern); animation: blink 0.6s ease-in-out infinite; }
.status.off { color: var(--lit-wait); opacity: 0.85; }
.status.off .lamp { background: var(--lit-wait); }
@keyframes blink { 50% { opacity: 0.2; box-shadow: none; } }
@media (prefers-reduced-motion: reduce) { .status .lamp { animation: none !important; } }
.head-status { flex: none; }
.row .top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.row .name { font: 600 18px/1.25 var(--serif); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .time { font-size: 13px; color: var(--ink-mute); flex: none; }
.row .line { font-size: 14px; color: var(--ink-soft); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .where { font-size: 12.5px; color: var(--ink-mute); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.section-title { font: 500 15px/1.3 var(--serif); font-style: italic; color: var(--ink-mute); padding: 18px 22px 6px; }
.empty { text-align: center; color: var(--ink-soft); padding: 28px 28px 10px; font-size: 15px; }

/* ───── Кнопки ───── */
.btn { min-height: var(--tap); padding: 0 22px; border-radius: var(--r-pill); display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; font-size: 16px; text-align: center; line-height: 1.15; }
.btn.lantern { background: var(--lantern); color: var(--lantern-ink); }
.btn.ghost { border: 1.5px solid var(--lantern-text); color: var(--lantern-text); }
.btn.quiet { background: var(--veil-2); color: var(--ink); }
.btn.yes { background: var(--lit-on); color: var(--ok-ink); }
.btn.no { background: var(--veil-2); color: var(--ink); }
.btn.block { width: 100%; }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn:active:not(:disabled) { transform: scale(0.98); }
.new-chat { margin: 10px 20px 16px; }

/* ───── Нижние вкладки ───── */
.tabs { position: sticky; bottom: 0; display: grid; grid-template-columns: repeat(3, 1fr); padding: 8px 8px calc(8px + var(--safe-bot)); background: linear-gradient(to top, var(--stage-deep) 60%, transparent); }
.tab { text-decoration: none; min-height: var(--tap); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--ink-mute); font-size: 13px; border-radius: 14px; position: relative; }
.tab svg { width: 24px; height: 24px; }
.tab[aria-current='page'] { color: var(--lantern-text); }
.tab .dot { position: absolute; top: 6px; left: calc(50% + 8px); width: 9px; height: 9px; border-radius: 50%; background: var(--lit-wait); }

/* ───── Шапка экрана ───── */
.bar { display: flex; align-items: center; gap: 6px; padding: 8px 10px 10px; min-height: 58px; }
.back { text-decoration: none; min-width: var(--tap); height: var(--tap); display: inline-flex; align-items: center; justify-content: center; color: var(--lantern-text); border-radius: 50%; }
.back svg { width: 26px; height: 26px; }
.bar .ttl { flex: 1; min-width: 0; }
.bar h2 { font: 600 19px/1.2 var(--serif); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar .meta { font-size: 13px; color: var(--ink-mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; gap: 6px; align-items: center; }
.page-title { font: 600 28px/1.15 var(--serif); padding: 18px 20px 8px; }

/* ───── Чат ───── */
.msgs { padding: 8px 14px 14px; display: flex; flex-direction: column; gap: 10px; }
.me { align-self: flex-end; background: var(--lantern); color: var(--lantern-ink); border-radius: 20px 20px 6px 20px; padding: 10px 14px; max-width: 84%; }
.me .msg-text { white-space: pre-wrap; word-break: break-word; }
.me img { display: block; max-width: 100%; border-radius: 12px; margin-bottom: 6px; }
.cl { align-self: flex-start; background: var(--veil); border: 1px solid var(--line); border-radius: 20px 20px 20px 6px; padding: 10px 14px; max-width: 92%; }
.msg-text { word-break: break-word; overflow-wrap: anywhere; }
.msg-text p + p, .msg-text ul, .msg-text ol, .msg-text pre { margin-top: 8px; }
.msg-text ul, .msg-text ol { padding-left: 20px; }
.msg-text code { background: var(--code-bg); border-radius: 6px; padding: 1px 5px; font: 13.5px/1.4 ui-monospace, Menlo, monospace; }
.msg-text pre { background: var(--code-bg); border-radius: 12px; padding: 10px 12px; overflow-x: auto; font: 13px/1.45 ui-monospace, Menlo, monospace; white-space: pre; }
.msg-text pre code { background: none; padding: 0; }
.msg-text h3, .msg-text h4 { font: 600 16px/1.3 var(--serif); margin-top: 8px; }
.msg-time { font-size: 11.5px; color: var(--ink-mute); margin-top: 4px; text-align: right; }
.me .msg-time { color: color-mix(in srgb, var(--lantern-ink) 60%, transparent); }
.pending-mark { opacity: 0.7; }
.step { display: flex; align-items: center; gap: 8px; font: italic 500 14px/1.3 var(--serif); color: var(--step-ink, var(--lit-on)); padding: 2px 4px; }
.step.wait { color: var(--lit-wait); }
.notice { align-self: center; text-align: center; font-size: 13.5px; color: var(--ink-soft); background: var(--veil); border-radius: 14px; padding: 8px 14px; max-width: 92%; white-space: pre-wrap; }
.notice.err { color: var(--lit-wait); background: var(--danger-bg); }

.card { border-radius: var(--r-lg); padding: 16px; background: var(--veil); border: 1px solid var(--line); }
.card.danger { background: radial-gradient(120% 120% at 0% 0%, var(--danger-bg), transparent), var(--veil); border-color: var(--danger-line); }
.card h3 { font: 600 17px/1.3 var(--serif); margin-bottom: 6px; }
.card .cmd { display: block; margin-top: 8px; background: var(--code-bg); border-radius: 10px; padding: 8px 10px; font: 13px/1.45 ui-monospace, Menlo, monospace; white-space: pre-wrap; word-break: break-all; }
.card .hint { font-size: 13px; color: var(--ink-mute); margin-top: 8px; }
.card .actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.card .actions .wide { grid-column: 1 / -1; }
.card .answered { margin-top: 12px; font-weight: 700; }
.card .answered.yes { color: var(--lit-on); }
.card .answered.no { color: var(--lit-wait); }
.opts { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.opt { text-align: left; border-radius: 14px; padding: 11px 14px; background: var(--veil-2); border: 1.5px solid transparent; min-height: var(--tap); }
.opt b { display: block; font-weight: 700; }
.opt span { display: block; font-size: 13.5px; color: var(--ink-soft); margin-top: 2px; }
.opt[aria-pressed='true'] { border-color: var(--lantern); background: rgba(242, 193, 78, 0.14); }
.q-block + .q-block { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.q-head { font-size: 12.5px; color: var(--ink-mute); }
.other { width: 100%; margin-top: 8px; }
.report { border-color: rgba(111, 207, 90, 0.4); }
.report.fail { border-color: var(--danger-line); }
.report .r { display: flex; gap: 10px; margin-top: 8px; }
.report .r b { flex: none; }
.report .files { margin-top: 10px; font-size: 13.5px; color: var(--ink-mute); }

.controls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 6px 14px 6px; }
.controls .btn { min-height: 38px; font-weight: 400; font-size: 14px; background: var(--veil); color: var(--ink-soft); padding: 0 10px; }
.composer { display: flex; gap: 8px; align-items: flex-end; padding: 6px 12px calc(10px + var(--safe-bot)); }
.composer .field { flex: 1; display: flex; flex-direction: column; background: var(--veil-2); border-radius: 23px; }
.composer textarea { width: 100%; min-height: var(--tap); max-height: 40vh; resize: none; border: 0; background: none; color: var(--ink); font: 16px/1.4 var(--sans); padding: 12px 16px; outline: none; }
.composer textarea::placeholder { color: var(--ink-mute); }
.icon-btn { width: var(--tap); height: var(--tap); flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn.send { background: var(--lantern); color: var(--lantern-ink); }
.icon-btn.attach { color: var(--ink-soft); background: var(--veil-2); }
.thumbs { display: flex; gap: 8px; padding: 10px 12px 0; flex-wrap: wrap; }
.thumb { position: relative; width: 58px; height: 58px; border-radius: 12px; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb button { position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0, 0, 0, 0.6); color: #fff; font-size: 14px; line-height: 22px; }

/* ───── Формы, листы ───── */
.sheet-wrap { position: fixed; inset: 0; background: rgba(10, 6, 3, 0.55); display: flex; align-items: flex-end; justify-content: center; z-index: 30; }
.sheet { width: 100%; max-width: 560px; max-height: 92dvh; overflow-y: auto; background: var(--sheet); border-radius: 26px 26px 0 0; padding: 18px 18px calc(18px + var(--safe-bot)); box-shadow: var(--shadow); }
.sheet h2 { font: 600 22px/1.2 var(--serif); margin-bottom: 4px; }
.sheet .lead { color: var(--ink-soft); font-size: 14.5px; margin-bottom: 14px; }
.grab { width: 40px; height: 5px; border-radius: 3px; background: var(--veil-2); margin: -6px auto 14px; }
.label { display: block; font-size: 13.5px; color: var(--ink-mute); margin: 14px 2px 6px; }
.input, .select, .textarea { width: 100%; min-height: var(--tap); border-radius: 14px; border: 1.5px solid var(--line); background: var(--veil); color: var(--ink); font: 16px/1.4 var(--sans); padding: 10px 14px; }
.textarea { min-height: 110px; resize: vertical; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { min-height: 40px; padding: 0 16px; border-radius: var(--r-pill); background: var(--veil-2); display: inline-flex; align-items: center; font-size: 15px; border: 1.5px solid transparent; }
.chip[aria-pressed='true'] { border-color: var(--lantern-text); color: var(--lantern-text); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--veil); border-radius: 14px; padding: 3px; gap: 3px; }
.seg button { min-height: 40px; border-radius: 11px; font-size: 14.5px; color: var(--ink-soft); }
.seg button[aria-pressed='true'] { background: var(--veil-2); color: var(--ink); font-weight: 700; }
.pick-list { display: flex; flex-direction: column; gap: 4px; max-height: 42dvh; overflow-y: auto; margin-top: 4px; }
.pick { text-align: left; padding: 10px 12px; border-radius: 12px; min-height: var(--tap); display: flex; flex-direction: column; justify-content: center; border: 1.5px solid transparent; }
.pick b { font-weight: 700; }
.pick span { font-size: 13px; color: var(--ink-mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick[aria-pressed='true'] { border-color: var(--lantern); background: rgba(242, 193, 78, 0.1); }
.sheet .row-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }

/* ───── Настройки, компьютеры ───── */
.group { margin: 6px 16px 14px; background: var(--veil); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.item { display: flex; align-items: center; gap: 12px; padding: 13px 16px; min-height: 56px; width: 100%; text-align: left; }
.item + .item { border-top: 1px solid var(--line); }
.item .t { flex: 1; min-width: 0; }
.item .t b { display: block; font-weight: 700; }
.item .t span { display: block; font-size: 13.5px; color: var(--ink-mute); }
.item .act { color: var(--lantern-text); font-weight: 700; font-size: 15px; flex: none; }
.item .act.danger { color: var(--lit-wait); }
.group-title { font: italic 500 15px/1.3 var(--serif); color: var(--ink-mute); padding: 10px 24px 2px; }
.sign { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 22px 16px 30px; color: var(--ink-mute); font-size: 12.5px; text-align: center; }
.lp-sign { font: 600 12px/1 var(--sans); letter-spacing: 0.14em; color: #c9a24a; border: 1px solid rgba(201, 162, 74, 0.55); border-radius: 999px; padding: 6px 12px; }
:root[data-theme='light'] .lp-sign { color: #9a7424; border-color: rgba(154, 116, 36, 0.5); }

/* ───── Привязка ───── */
.welcome { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 32px 26px calc(32px + var(--safe-bot)); gap: 14px; }
.welcome .big-bulb { width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, #ffe7a3 0%, var(--lantern) 40%, transparent 72%); margin-bottom: 4px; }
.welcome h1 { font: 600 38px/1.1 var(--serif); }
.welcome p { color: var(--ink-soft); max-width: 340px; }
.welcome .btn { width: 100%; max-width: 340px; }
.steps { text-align: left; max-width: 340px; color: var(--ink-soft); font-size: 15px; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.scanner { position: fixed; inset: 0; background: #000; z-index: 40; display: flex; flex-direction: column; }
.scanner video { flex: 1; width: 100%; object-fit: cover; }
.scanner .frame { position: absolute; left: 50%; top: 45%; width: 64vw; max-width: 300px; aspect-ratio: 1; transform: translate(-50%, -50%); border: 3px solid var(--lantern); border-radius: 24px; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.45); }
.scanner .scan-ui { position: absolute; left: 0; right: 0; bottom: 0; padding: 20px 20px calc(24px + var(--safe-bot)); display: flex; flex-direction: column; gap: 10px; align-items: center; color: #fff; text-align: center; }

.banner { margin: 10px 16px 0; padding: 12px 14px; border-radius: var(--r-md); background: rgba(242, 193, 78, 0.12); border: 1px solid var(--line); font-size: 14px; color: var(--ink-soft); display: flex; gap: 10px; align-items: flex-start; }
.banner b { color: var(--ink); }
.banner.err { background: var(--danger-bg); border-color: var(--danger-line); }
.lock { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 30px; text-align: center; }

.toast { position: fixed; left: 50%; bottom: calc(86px + var(--safe-bot)); transform: translateX(-50%); background: var(--sheet); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow); padding: 10px 16px; border-radius: 14px; font-size: 14.5px; z-index: 50; max-width: calc(100vw - 32px); text-align: center; }
.conn { font-size: 12.5px; color: var(--ink-mute); text-align: center; padding: 4px 0 0; }
.conn.off { color: var(--lit-wait); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* «Пульт 1» в браузере компьютера — шире; QR-код привязки */
:root.admin .app { max-width: 720px; }
:root.admin .sheet { max-width: 520px; border-radius: 26px; margin-bottom: 4vh; }
.qr-box { background: #fff; border-radius: 20px; padding: 12px; width: min(280px, 100%); margin: 6px auto 4px; }
.qr-box svg { display: block; width: 100%; height: auto; }
