@font-face { font-family: "Onest"; src: url(/fonts/onest-cyrillic-wght-normal.woff2) format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
/* латиница с диакритикой: польский, турецкий, шведский и др. */
@font-face { font-family: "Onest"; src: url(/fonts/onest-latin-ext-wght-normal.woff2) format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Onest"; src: url(/fonts/onest-latin-wght-normal.woff2) format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --display: "Onest", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  /* ночной синий фон, яркий фиолетовый — действия, янтарный — перевод и AI, мятный — защищено/готово, коралловый — запись и выход */
  --bg: #0a0c1b;
  --bg-2: #0e1126;
  --band: #10142d;
  --panel: #151935;
  --panel-2: #1f2447;
  --panel-3: #2a3060;
  --line: #2c335c;
  --line-hover: #414a82;
  --ink: #f3f4ff;
  --ink-2: #d3d6f0;
  --muted: #9aa0c8;
  --accent: #7c5cff;
  --accent-rgb: 124, 92, 255;
  --accent-hover: #8f74ff;
  --accent-ink: #ffffff;
  --ai: #ffb020;
  --ai-rgb: 255, 176, 32;
  --ai-ink: #1d1300;
  --on: #22d59a;
  --on-rgb: 34, 213, 154;
  --danger: #ff4d6a;
  --danger-rgb: 255, 77, 106;
  --danger-hover: #e63b57;
  --warn: #ffb020;
  --sky: #3cc8ff;
  --radius: 18px;
  --bar-h: 80px;
  --shadow: 0 18px 50px rgba(3, 4, 15, .55);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.err { color: #ff8095; margin: 12px 0 0; }
.note { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
.note.warn { color: var(--warn); }

/* ---------- кнопки и поля ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--panel-2); color: var(--ink);
  padding: 10px 18px; font: 600 15px/1 inherit; cursor: pointer; text-decoration: none;
}
.btn:hover { border-color: var(--line-hover); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.big { padding: 15px 26px; font-size: 16px; }
.btn.ghost { background: transparent; }
.btn:disabled { opacity: .45; cursor: default; }
.ctl:disabled, .split .caret:disabled { opacity: .45; cursor: not-allowed; }

.field { display: flex; flex-direction: column; gap: 6px; margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.field b { color: var(--ink); font-weight: 600; }
select, input[readonly] {
  width: 100%; padding: 9px 10px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: inherit;
}
input[type=range] { width: 100%; accent-color: var(--accent); }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 4px 0 0; cursor: pointer; }
.check input { accent-color: var(--accent); width: 16px; height: 16px; }

/* ---------- лобби и конец ---------- */
.view { min-height: 100%; }
.ended { display: grid; place-items: center; padding: 24px 16px; }
.lobby-card { max-width: 480px; text-align: center; }
.lobby-card .btn { margin: 8px 4px 0; }
.logo svg { width: 64px; height: 64px; }
.logo rect { fill: var(--accent); }
.logo path { fill: var(--accent-ink); }
h1 { font-size: 40px; letter-spacing: -0.02em; margin: 18px 0 8px; }
h2 { font-size: 26px; margin: 0 0 8px; }
.lead { font-size: 16px; margin: 0 0 12px; }
.privacy-note { font-size: 12px; color: var(--muted); max-width: 380px; margin: 18px auto 0; }

/* ---------- вход гостя ---------- */
.prejoin { display: grid; place-items: center; padding: 24px 16px; }
.prejoin-card { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(260px, 1fr); gap: 28px; width: min(980px, 100%); align-items: center; }
.preview { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius); overflow: hidden; }
.preview video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.preview-off { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); }
.meter { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; margin: 4px 0 18px; }
.meter i { display: block; height: 100%; width: 0; background: var(--on); transition: width .08s linear; }

/* ---------- встреча ---------- */
.room { display: grid; grid-template-columns: minmax(0, 1fr) auto; height: 100dvh; min-height: 0; }
.room-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.stage { --self-w: clamp(140px, 20vw, 260px); position: relative; flex: 1; min-height: 0; background: #000; overflow: hidden; }

.waiting { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(ellipse 60% 50% at 50% 42%, rgba(var(--accent-rgb), .22), transparent 70%), var(--bg-2); padding: 16px; }
.waiting-box { text-align: center; width: min(520px, 100%); }
.waiting-box p { font-size: 18px; margin: 18px 0; }
.pulse { width: 18px; height: 18px; margin: 0 auto; border-radius: 50%; background: var(--accent); animation: pulse 1.6s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), .6); } 100% { box-shadow: 0 0 0 26px rgba(var(--accent-rgb), 0); } }
.share { display: flex; gap: 8px; }
.share input { flex: 1; min-width: 0; }

.unmute { position: absolute; top: 16px; left: 50%; transform: translateX(-50%); z-index: 5; }
.unmute { border: 0; border-radius: 99px; padding: 10px 18px; background: var(--accent); color: var(--accent-ink); font: 600 14px/1 inherit; cursor: pointer; }

/* субтитры поверх видео: последние две строки, лишнее уходит вверх */
.captions {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%);
  /* не залезаем под окно своего видео справа */
  width: min(900px, calc(100% - 2 * (var(--self-w) + 40px))); text-align: center; z-index: 4; pointer-events: none;
  transition: opacity .4s ease;
}
.captions.fade { opacity: 0; }
.cap-orig {
  display: inline-block; max-width: 100%; margin-bottom: 6px; padding: 2px 10px; border-radius: 8px;
  background: rgba(0,0,0,.55); color: var(--ink-2); font-size: 15px; line-height: 1.4;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; direction: rtl; /* видны последние слова */
}
.cap-orig:empty { display: none; }
.cap-orig span { direction: ltr; unicode-bidi: isolate; }
.cap-text {
  display: flex; flex-direction: column; justify-content: flex-end;
  max-height: calc(2 * 1.35em + 12px); overflow: hidden;
  font-size: clamp(18px, 2.4vw, 28px); line-height: 1.35; font-weight: 600;
}
.cap-text > div { padding: 4px 14px; border-radius: 10px; background: rgba(0,0,0,.66); box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.cap-text .tmp { color: var(--ink-2); font-weight: 500; }

.self {
  position: absolute; right: 16px; bottom: 16px; width: var(--self-w); z-index: 6;
  border-radius: 12px; overflow: hidden; background: var(--bg-2); box-shadow: 0 6px 24px rgba(0,0,0,.5);
  border: 1px solid rgba(255,255,255,.08);
}
.self.screen video { transform: none; object-fit: contain; background: #000; }
.self video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transform: scaleX(-1); background: var(--bg-2); }
.selfcap { padding: 6px 8px; font-size: 12px; line-height: 1.35; background: rgba(0,0,0,.75); max-height: 4.2em; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; }
.selfcap .tmp { color: var(--muted); }
.self-badge { position: absolute; top: 6px; left: 6px; font-size: 11px; padding: 2px 8px; border-radius: 99px; background: var(--danger); }
.netstate { position: absolute; top: 16px; left: 16px; z-index: 5; padding: 6px 12px; border-radius: 99px; background: rgba(0,0,0,.6); font-size: 13px; color: var(--warn); }

/* запрос на ретранслятор */
.ask { position: absolute; inset: 0; z-index: 15; display: grid; place-items: center; padding: 16px; background: rgba(0,0,0,.55); }
.ask-box { width: min(480px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: 0 16px 50px rgba(0,0,0,.5); }
.ask-box h3 { margin: 0 0 8px; font-size: 18px; }
.ask-box p { margin: 0 0 10px; color: var(--muted); }
.ask-facts { margin: 0 0 16px; padding-left: 18px; font-size: 14px; }
.ask-facts li { margin: 4px 0; }
.ask-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-bottom: 10px; }

/* код безопасности */
.sec { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; margin-top: 2px; padding: 2px 8px 2px 4px; border: 1px solid var(--line); border-radius: 99px; background: transparent; color: var(--ink); font: 600 12px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .06em; cursor: pointer; }
.sec svg { width: 14px; height: 14px; fill: var(--on); }
.sec-emoji { font-size: 15px; letter-spacing: .12em; }
.sec-pop { width: min(380px, calc(100vw - 32px)); }
.sec-pics { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 0; margin: 8px 0 12px; counter-reset: pic; }
.sec-pics li { counter-increment: pic; position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.sec-pics li::before { content: counter(pic); position: absolute; top: 4px; left: 7px; font-size: 11px; color: var(--muted); }
.sec-pics .pic { font-size: 40px; line-height: 1.1; }
.sec-pics .name { font-size: 13px; font-weight: 600; text-align: center; }
.sec-digits { margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.sec-digits b { font: 700 15px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .1em; color: var(--ink); }

/* ссылка-кнопка */
.link { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* справка: панель справа на десктопе, лист снизу на телефоне */
:root { --help-w: 400px; }
.help {
  position: fixed; top: 0; right: 0; bottom: 0; width: var(--help-w); z-index: 40;
  display: flex; background: var(--panel); border-left: 1px solid var(--line);
  box-shadow: -12px 0 40px rgba(0,0,0,.35); animation: help-in .18s ease-out;
}
@keyframes help-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.help-box { display: flex; flex-direction: column; width: 100%; min-width: 0; height: 100%; }
.help-grab { display: none; }
.help-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 18px 8px; }
.help-head h2 { font-size: 20px; margin: 0; }
.help-head .ctl { height: 36px; min-width: 36px; padding: 0; font-size: 16px; }
/* пока открыта справка, страница сдвигается влево — видео не перекрывается */
body.help-open .view { margin-right: var(--help-w); }
.help-nav { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 18px 12px; border-bottom: 1px solid var(--line); }
.help-nav a { font-size: 13px; color: var(--ink); text-decoration: none; padding: 4px 10px; border-radius: 99px; background: var(--panel-2); border: 1px solid var(--line); }
.help-nav a:hover { border-color: var(--accent); }
.help-body { overflow-y: auto; padding: 4px 18px 18px; }
.help-body section { padding-top: 14px; scroll-margin-top: 8px; }
.help-body h3 { font-size: 17px; margin: 8px 0 8px; }
.help-body p, .help-body li { color: var(--ink-2); }
.help-body ul, .help-body ol { padding-left: 20px; }
.help-body li { margin: 4px 0; }
.help-body a { color: var(--accent); }
.callout { padding: 10px 12px; border-left: 3px solid var(--on); background: rgba(var(--on-rgb), .1); border-radius: 0 10px 10px 0; }
.callout.warn { border-left-color: var(--warn); background: rgba(var(--accent-rgb), .1); }
.steps li { margin: 8px 0; }
.table-wrap { overflow-x: auto; }
.help-body table { width: 100%; border-collapse: collapse; font-size: 13px; }
.help-body th, .help-body td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.help-body thead th { color: var(--muted); font-weight: 600; }
.help-body tbody th { font-weight: 600; color: var(--ink); }

/* ---------- чат ---------- */
:root { --chat-w: 340px; }
.chat { width: var(--chat-w); min-height: 0; display: flex; flex-direction: column; background: var(--panel); border-left: 1px solid var(--line); }
.chat-grab { display: none; }
.chat-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 4px; }
.chat-head h2 { font-size: 16px; margin: 0; }
.chat-head .ctl { height: 32px; min-width: 32px; padding: 0; font-size: 14px; }
.chat-tools { display: flex; gap: 6px; }
.chat-tools svg { width: 16px; height: 16px; fill: currentColor; }
#chatClear:hover { color: var(--danger); border-color: var(--danger); }
.clear-ask { margin: 6px 14px 4px; padding: 10px 12px; border: 1px solid var(--danger); border-radius: 10px; background: rgba(var(--danger-rgb), .1); font-size: 13px; }
.clear-ask p { margin: 0 0 8px; line-height: 1.4; }
.clear-ask .row { display: flex; gap: 8px; justify-content: flex-end; }
.clear-ask .btn { padding: 6px 12px; font-size: 13px; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.chat-note { display: flex; gap: 8px; align-items: flex-start; margin: 0 14px 8px; padding: 8px 10px; border-radius: 10px; background: rgba(var(--on-rgb), .1); font-size: 12px; color: var(--ink-2); }
.chat-note svg { width: 14px; height: 14px; fill: var(--on); flex: none; margin-top: 2px; }
.chat-list { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 14px 10px; display: flex; flex-direction: column; gap: 8px; }
.chat-empty { margin: auto; color: var(--muted); font-size: 13px; text-align: center; }
.msg { max-width: 86%; padding: 7px 10px 5px; border-radius: 14px; background: var(--panel-2); align-self: flex-start; overflow-wrap: anywhere; white-space: pre-wrap; font-size: 14px; line-height: 1.4; }
.msg.mine { align-self: flex-end; background: var(--accent); }
.msg time { display: block; text-align: right; font-size: 10px; color: var(--muted); margin-top: 2px; }
.sys { align-self: center; font-size: 12px; color: var(--muted); }
.sys time { margin-left: 6px; font-size: 10px; opacity: .75; font-variant-numeric: tabular-nums; }
.fcard { align-self: flex-start; width: min(270px, 92%); padding: 10px; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--line); }
.fcard.mine { align-self: flex-end; }
.fcard .fhead { display: flex; gap: 8px; align-items: center; }
.fcard .ficon { font-size: 22px; }
.fcard .fname { font-weight: 600; font-size: 13px; overflow-wrap: anywhere; }
.fcard .fsize { font-size: 12px; color: var(--muted); }
.fcard .fstatus { font-size: 12px; color: var(--ink-2); margin: 6px 0 0; }
.fcard .fbar { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; margin-top: 6px; }
.fcard .fbar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s linear; }
.fcard .facts { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.fcard .facts .btn { padding: 6px 10px; font-size: 13px; }
.fcard.risky .fname::after { content: " ⚠"; color: var(--warn); }
.fcard .flink { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.fcard .fthumb { display: block; max-width: 100%; max-height: 180px; margin-top: 8px; border-radius: 8px; cursor: zoom-in; background: #000; }
.chat-drop { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(var(--accent-rgb), .15); border: 2px dashed var(--accent); border-radius: 12px; font-weight: 600; pointer-events: none; }
.chat { position: relative; }
/* поле ввода на всю ширину, кнопки — строкой под ним */
.chat-form { display: grid; grid-template-columns: auto auto 1fr auto; grid-template-areas: "ta ta ta ta" "emo att . send"; align-items: center; gap: 4px 2px; padding: 10px 10px 6px; border-top: 1px solid var(--line); }
.chat-form textarea { grid-area: ta; width: 100%; box-sizing: border-box; resize: none; min-height: 84px; max-height: 40vh; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: inherit; font-size: 15px; line-height: 1.4; overflow-y: auto; }
.chat-form textarea:focus { outline: none; border-color: var(--accent); }
#emojiBtn { grid-area: emo; } #attachBtn { grid-area: att; } #sendBtn { grid-area: send; }
.chat-icon { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.chat-icon svg { width: 22px; height: 22px; fill: currentColor; }
.chat-icon:hover { color: var(--ink); background: var(--panel-2); }
.chat-icon.send { color: var(--accent); }
.chat-icon:disabled { opacity: .35; cursor: default; }
.chat-form textarea:disabled { opacity: .6; }
/* эмодзи: системный шрифт, без картинок; панель в потоке над полем ввода */
.emoji-panel { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 2px; max-height: 176px; overflow-y: auto; padding: 8px 10px; border-top: 1px solid var(--line); contain: content; overscroll-behavior: contain; }
.emoji-panel[hidden] { display: none; }
.emoji-panel button { height: 38px; border: 0; border-radius: 8px; background: transparent; font-size: 22px; line-height: 1; padding: 0; cursor: pointer; touch-action: manipulation; font-family: "Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",sans-serif; }
.emoji-panel button:hover, .emoji-panel button:focus-visible { background: var(--panel-2); outline: none; }
#emojiBtn[aria-expanded="true"] { color: var(--accent); }
.msg.big { background: transparent; font-size: 34px; line-height: 1.15; padding: 0 2px; }
.badge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font: 700 11px/18px inherit; text-align: center; }
#chatBtn.active { background: var(--panel); border-color: var(--accent); color: var(--accent); }

/* окно подтверждения и просмотр */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(0,0,0,.6); }
.modal-box { width: min(440px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.modal-box h3 { margin: 0 0 12px; font-size: 18px; }
.rec-preview { display: block; width: 100%; max-height: 220px; margin: 0 0 12px; border-radius: 10px; background: #000; }
.file-line { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 12px; background: var(--bg); margin-bottom: 12px; overflow-wrap: anywhere; }
.file-ico { font-size: 26px; }
.modal-text { color: var(--ink-2); margin: 0 0 10px; }
.modal-warn { color: var(--warn); background: rgba(var(--accent-rgb), .1); border-radius: 10px; padding: 8px 10px; font-size: 14px; margin: 0 0 10px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.viewer { position: fixed; top: 0; left: 0; bottom: 0; right: 0; z-index: 30; display: flex; flex-direction: column; background: rgba(8, 10, 24, .96); }
/* на компьютере просмотр не закрывает чат — можно переписываться, пока смотрите файл */
body.chat-open .viewer { right: var(--chat-w); }
body.help-open .viewer { right: var(--help-w); }
body.chat-open.help-open .viewer { right: calc(var(--chat-w) + var(--help-w)); }
.viewer-bar { flex: none; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.viewer-name { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viewer-bar .ctl { height: 38px; min-width: 38px; padding: 0; }
.viewer-body { flex: 1; min-height: 0; display: grid; place-items: center; padding: 12px; overflow: auto; }
.viewer-body img, .viewer-body video { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; }
.viewer-body audio { width: min(520px, 100%); }
.viewer-body iframe { width: 100%; height: 100%; border: 0; border-radius: 8px; background: #fff; }
.viewer-body pre { align-self: stretch; justify-self: stretch; margin: 0; padding: 14px; border-radius: 10px; background: var(--panel); color: var(--ink); font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; overflow: auto; }
.viewer-note { color: var(--muted); font-size: 12px; margin-top: 8px; text-align: center; }

/* панель управления */
.bar {
  height: var(--bar-h); flex: none; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  gap: 12px; padding: 0 16px; background: var(--panel); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.bar-left { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 13px; }
.status { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status.ok { color: var(--on); }
.quota { color: var(--muted); font-size: 12px; }
.quota.low { color: var(--warn); }
.bar-center { display: flex; gap: 10px; align-items: center; }
.bar-right { display: flex; justify-content: flex-end; gap: 2px; }

.ctl {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; min-width: 48px; padding: 0 12px; border-radius: 24px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--ink); cursor: pointer; font: 600 14px/1 inherit;
}
.ctl svg { width: 22px; height: 22px; fill: currentColor; flex: none; }
.ctl:hover { border-color: var(--line-hover); }
.ctl .off { display: none; }
.ctl[aria-pressed="false"] .on { display: none; }
.ctl[aria-pressed="false"] .off { display: block; }
#micBtn[aria-pressed="false"], #camBtn[aria-pressed="false"] { background: var(--danger); border-color: var(--danger); }
.ctl.wide { padding: 0 16px; }
.ctl.danger { background: var(--danger); border-color: var(--danger); width: 64px; }
.ctl.active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.ctl.busy::after { content: ""; position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--warn); animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .2; } }

.split { display: inline-flex; }
.split .ctl { border-radius: 24px 0 0 24px; }
.split .caret {
  height: 48px; width: 30px; border: 1px solid var(--line); border-left: 0; border-radius: 0 24px 24px 0;
  background: var(--panel-2); color: var(--muted); cursor: pointer; font-size: 12px;
}
.split .ctl.active + .caret { background: var(--accent-hover); color: var(--accent-ink); border-color: var(--accent-hover); }

.pop {
  position: fixed; z-index: 20; bottom: calc(var(--bar-h) + 10px); width: min(340px, calc(100vw - 32px));
  max-height: calc(100dvh - var(--bar-h) - 30px); overflow-y: auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 16px 12px; box-shadow: 0 12px 40px rgba(0,0,0,.5);
}
.pop h3 { margin: 0 0 6px; font-size: 16px; }

.toast {
  position: fixed; left: 50%; top: 18px; transform: translateX(-50%); z-index: 30;
  max-width: calc(100vw - 32px); padding: 10px 16px; border-radius: 12px;
  background: var(--panel-2); border: 1px solid var(--line); box-shadow: 0 8px 30px rgba(0,0,0,.4);
}
.toast.err { border-color: var(--danger); }

@media (max-width: 1000px) {
  /* планшеты и телефоны: справка — лист снизу поверх нижней части экрана */
  .help {
    top: auto; left: 0; width: auto; height: min(75dvh, 640px);
    border-left: 0; border-top: 1px solid var(--line); border-radius: 18px 18px 0 0;
    box-shadow: 0 -12px 40px rgba(0,0,0,.45); animation: help-up .2s ease-out;
    padding-bottom: env(safe-area-inset-bottom);
  }
  @keyframes help-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
  .help-grab { display: block; width: 44px; height: 5px; border-radius: 99px; background: var(--line); margin: 8px auto 0; flex: none; }
  .help-head { padding: 8px 16px 6px; }
  .help-head h2 { font-size: 18px; }
  .help-nav { flex-wrap: nowrap; overflow-x: auto; padding: 0 16px 10px; scrollbar-width: none; }
  .help-nav::-webkit-scrollbar { display: none; }
  .help-nav a { white-space: nowrap; flex: none; }
  .help-body { padding: 4px 16px 16px; }
  body.help-open .view { margin-right: 0; }
  body.chat-open .viewer, body.help-open .viewer, body.chat-open.help-open .viewer { right: 0; }
  .room { grid-template-columns: minmax(0, 1fr); }
  .chat {
    position: fixed; left: 0; right: 0; bottom: 0; width: auto; height: min(72dvh, 620px); z-index: 35;
    border-left: 0; border-top: 1px solid var(--line); border-radius: 18px 18px 0 0;
    box-shadow: 0 -12px 40px rgba(0,0,0,.45); padding-bottom: env(safe-area-inset-bottom);
  }
  .chat-grab { display: block; position: absolute; top: 6px; left: 50%; transform: translateX(-50%); width: 44px; height: 5px; border-radius: 99px; background: var(--line); }
  .chat-head { padding-top: 16px; }
}

@media (max-width: 760px) {
  .prejoin-card { grid-template-columns: 1fr; }
  :root { --bar-h: 128px; }
  .bar { grid-template-columns: 1fr auto; grid-template-rows: auto auto; padding: 8px 12px; height: auto; min-height: var(--bar-h); }
  .bar-center { grid-column: 1 / -1; grid-row: 2; justify-content: center; flex-wrap: wrap; gap: 8px; }
  .ctl.wide span { display: none; }
  .ctl.wide { padding: 0 12px; }
  #recBtn.recording span { display: inline; }
  /* на телефоне своё видео — сверху справа, субтитры на всю ширину снизу */
  .stage { --self-w: 110px; }
  .self { right: 10px; top: 10px; bottom: auto; }
  .captions { bottom: 12px; width: calc(100% - 24px); }
  .netstate { max-width: calc(100% - 150px); }
}

/* запись видео */
#recBtn svg { fill: var(--danger); }
#recBtn.recording { background: var(--danger); border-color: var(--danger); color: #fff; }
#recBtn.recording svg { fill: #fff; animation: recPulse 1.2s ease-in-out infinite; }
#recBtn.recording + .caret { background: var(--danger-hover); border-color: var(--danger-hover); color: #fff; }
#recLabel { font-variant-numeric: tabular-nums; }
@keyframes recPulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { #recBtn.recording svg { animation: none; } }
.rec-badge { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); max-width: calc(100% - 24px); text-align: center; z-index: 7; box-shadow: 0 4px 16px rgba(0,0,0,.4); padding: 4px 10px; border-radius: 99px; background: var(--danger); color: #fff; font-size: 13px; font-weight: 600; }
.radios { border: 0; padding: 0; margin: 0 0 8px; }
.radios legend { font-size: 13px; color: var(--muted); margin-bottom: 4px; padding: 0; }
.radios input:disabled + * , .radios label:has(input:disabled) { opacity: .55; }

/* ожидание собеседника: обратный отсчёт и выбор после него */
.waiting-box .wait-timer { margin: 4px 0 12px; color: var(--muted); font-size: 14px; }
.wait-timer b { color: var(--ink); font-variant-numeric: tabular-nums; font-size: 16px; }
.wait-over { margin-top: 10px; }
.waiting-box .wait-over p { font-size: 15px; margin: 0 0 12px; color: var(--muted); line-height: 1.45; }
.wait-over .row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.check.deny { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }

/* панель кнопок: если места мало (например, открыт чат), у широких кнопок остаются только значки */
.bar { container: bar / inline-size; }
.ctl.wide span { white-space: nowrap; }
@container bar (max-width: 1180px) {
  .ctl.wide span { display: none; }
  .ctl.wide { padding: 0 12px; }
  #recBtn.recording span { display: inline; }
}
@container bar (max-width: 820px) {
  .bar-center { gap: 6px; }
  .ctl { height: 42px; min-width: 42px; }
  .ctl.wide { padding: 0 10px; }
  .ctl.danger { width: 52px; }
  .split .caret { width: 26px; height: 42px; }
  .bar-right .btn { padding: 8px 10px; font-size: 13px; }
}

/* «● Записывается» — на том видео, которое сейчас пишется (своём или собеседника) */
.rec-mark { white-space: nowrap; position: absolute; top: 12px; left: 12px; z-index: 6; padding: 4px 10px; border-radius: 99px; background: rgba(0,0,0,.65); color: #fff; font-size: 13px; font-weight: 600; border: 1px solid var(--danger); }
.rec-mark.small { top: auto; bottom: 6px; left: 6px; padding: 2px 8px; font-size: 11px; }
.rec-mark::first-letter { color: var(--danger); }
@media (max-width: 760px) {
  .rec-badge { left: 12px; right: 130px; transform: none; max-width: none; font-size: 12px; }
}
.rec-whose { font-size: inherit; font-weight: 500; opacity: .9; }
@container bar (max-width: 820px) { .rec-whose { display: none; } }
@media (max-width: 760px) { .rec-whose { display: none; } }

/* демонстрация экрана */
#screenBtn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.screen-mark { position: absolute; left: 12px; bottom: 12px; z-index: 6; padding: 4px 10px; border-radius: 99px; background: rgba(0,0,0,.65); color: #fff; font-size: 13px; }

/* ===== плитки участников: 1 — на весь экран, 2 — рядом, 3–4 — 2×2, 5–6 — 3×2 ===== */
.tiles { position: absolute; inset: 0; display: grid; gap: 6px; padding: 6px; grid-template-columns: 1fr; grid-auto-rows: 1fr; }
.tiles[data-n="0"] { display: none; }
.tiles[data-n="1"] { padding: 0; gap: 0; }
.tiles[data-n="2"] { grid-template-columns: repeat(2, 1fr); }
.tiles[data-n="3"], .tiles[data-n="4"] { grid-template-columns: repeat(2, 1fr); }
.tiles[data-n="5"], .tiles[data-n="6"] { grid-template-columns: repeat(3, 1fr); }
.tile { position: relative; min-width: 0; min-height: 0; overflow: hidden; background: var(--bg-2); border-radius: 10px; }
.tiles[data-n="1"] .tile { border-radius: 0; }
.tile video { width: 100%; height: 100%; object-fit: cover; background: #000; display: block; }
.tiles[data-n="1"] .tile video, .tile.screen video { object-fit: contain; }
.tile-wait { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 14px; background: rgba(0,0,0,.55); }
.tile-wait[hidden] { display: none; }
.tile-top { position: absolute; top: 8px; left: 8px; right: 8px; display: flex; flex-wrap: wrap; gap: 6px; z-index: 6; pointer-events: none; }
.tile-top .rec-mark { position: static; }
.tx-badge { padding: 4px 10px; border-radius: 99px; background: rgba(0,0,0,.65); border: 1px solid var(--accent); color: #fff; font-size: 12px; font-weight: 600; white-space: nowrap; }
.tx-badge[hidden] { display: none; }
.tile-bar { position: absolute; left: 8px; right: 8px; bottom: 8px; display: flex; align-items: center; gap: 6px; z-index: 6; pointer-events: none; }
.tile-name { max-width: 50%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 3px 9px; border-radius: 99px; background: rgba(0,0,0,.6); color: #fff; font-size: 13px; font-weight: 600; }
.tile-mic { padding: 2px 6px; border-radius: 99px; background: var(--danger); font-size: 12px; }
.tile-mic[hidden] { display: none; }
.tile-bar .screen-mark { position: static; font-size: 12px; padding: 3px 9px; }
.tile-bar .screen-mark[hidden] { display: none; }
.tile-tx { pointer-events: auto; margin-left: auto; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: 99px; border: 1px solid rgba(255,255,255,.18); background: rgba(0,0,0,.6); color: #fff; font: 600 13px/1 inherit; cursor: pointer; }
.tile-tx svg { width: 16px; height: 16px; fill: currentColor; }
.tile-tx:hover { border-color: var(--accent); }
.tile-tx.active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.tile-tx[hidden] { display: none; }
/* субтитры — внутри плитки, над подписью */
.tile .captions { left: 50%; bottom: 48px; width: calc(100% - 24px); max-width: 900px; }
.tiles:not([data-n="1"]) .tile .cap-text { font-size: clamp(14px, 1.5vw, 20px); }
.tiles[data-n="1"] .tile .captions { width: min(900px, calc(100% - 2 * (var(--self-w) + 40px))); bottom: 56px; }
@media (max-width: 760px) {
  .tiles[data-n="2"] { grid-template-columns: 1fr; }
  .tiles[data-n="3"], .tiles[data-n="4"] { grid-template-columns: repeat(2, 1fr); }
  .tiles[data-n="5"], .tiles[data-n="6"] { grid-template-columns: repeat(2, 1fr); }
  .tile-tx span { display: none; }
  .tile-tx { padding: 0 8px; }
  .tiles[data-n="1"] .tile .captions { width: calc(100% - 24px); }
}
/* своё окошко: имя */
.self-name { position: absolute; left: 6px; bottom: 6px; max-width: calc(100% - 12px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 1px 7px; border-radius: 99px; background: rgba(0,0,0,.6); font-size: 11px; }
#recOnSelf { bottom: auto; top: 6px; left: auto; right: 6px; }
/* сообщения в группе: кто написал */
.msg .from { display: block; font-size: 12px; color: var(--accent); margin-bottom: 2px; }
/* коды безопасности — по участнику */
.sec-list { max-height: min(60vh, 520px); overflow-y: auto; }
.sec-item h4 { margin: 8px 0 0; font-size: 14px; }
.sec-item + .sec-item { border-top: 1px solid var(--line); margin-top: 6px; }
#popTile { width: min(340px, calc(100vw - 32px)); }
#popTile .btn { width: 100%; margin-top: 4px; }
.field input { width: 100%; box-sizing: border-box; padding: 9px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: inherit; }
.fstatus { white-space: pre-line; }
.sec-emoji.many { font-size: 13px; letter-spacing: 0; font-weight: 600; }
/* своё видео плиткой в сетке */
.self.in-grid { position: relative; right: auto; bottom: auto; top: auto; width: auto; min-width: 0; min-height: 0; border-radius: 10px; box-shadow: none; z-index: 1; }
.self.in-grid video { height: 100%; aspect-ratio: auto; }
.self.in-grid .selfcap { position: absolute; left: 0; right: 0; bottom: 30px; }

/* камера выключена: цветная плашка с именем вместо чёрного кадра */
.tile-plate { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; padding: 12px 16px 44px; color: rgba(255,255,255,.95); }
.tile-plate[hidden] { display: none; }
.plate-ini { max-width: 100%; text-align: center; font-weight: 700; line-height: 1.15; font-size: clamp(18px, 3.4vw, 44px); overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tiles:not([data-n="1"]) .plate-ini { font-size: clamp(16px, 2.2vw, 30px); }
.self:not(.in-grid) .tile-plate { padding: 8px 8px 24px; }
.self:not(.in-grid) .plate-ini { font-size: clamp(13px, 1.4vw, 18px); }
.self .self-name, .self .self-badge, .self .rec-mark, .self .selfcap { z-index: 3; }
.self .selfcap { position: relative; }
.self.in-grid .selfcap { position: absolute; }

/* ===== кошелёк минут перевода ===== */
.btn.wal { display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.btn.wal svg { width: 16px; height: 16px; fill: currentColor; }
.btn.wal.low { color: var(--warn); border-color: rgba(var(--accent-rgb), .4); }
.wallet-pop { width: min(380px, calc(100vw - 32px)); }
.wp-bal { margin: 2px 0 8px; font-size: 15px; }
.wp-bal b { font-size: 28px; font-variant-numeric: tabular-nums; }
.wp-note { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; padding: 9px 12px; border-radius: 10px; background: rgba(var(--on-rgb), .14); color: var(--ink); font-size: 14px; font-weight: 600; line-height: 1.35; }
.wp-note::before { content: ""; flex: none; width: 18px; height: 18px; background: var(--on); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm-1.4 14.2-4.2-4.2 1.4-1.4 2.8 2.8 5.6-5.6 1.4 1.4z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm-1.4 14.2-4.2-4.2 1.4-1.4 2.8 2.8 5.6-5.6 1.4 1.4z'/%3E%3C/svg%3E") center / contain no-repeat; }
.wp-agree { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0 4px; font-size: 12px; line-height: 1.4; color: var(--muted); cursor: pointer; text-align: left; }
.wp-agree input { margin-top: 2px; flex: none; width: 16px; height: 16px; accent-color: var(--accent); }
.wp-agree a { color: var(--ink); }
.wp-agree.need { color: var(--ink); outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 6px; animation: wpShake .35s; }
@keyframes wpShake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.packs.off .pack { opacity: .55; }
#popWallet .note a { color: var(--accent); }
.wp-hist { list-style: none; margin: 8px 0; padding: 0; max-height: 180px; overflow: auto; font-size: 13px; }
.wp-hist li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.wp-hist li:last-child { border-bottom: 0; }
.wp-hist .left { font-variant-numeric: tabular-nums; text-align: right; }
.wp-hist small { grid-column: 1 / -1; color: var(--muted); font-size: 11px; }
.wp-hist .gone { opacity: .55; }
.legal-links { margin-top: 18px; font-size: 12px; line-height: 1.4; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 8px; }
.legal-links .sep { color: var(--muted); }
.legal-links .report-link { line-height: inherit; font-size: inherit; }
.legal-links a { color: var(--muted); }
.packs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; }
.pack { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); cursor: pointer; font: inherit; }
.pack:hover { border-color: var(--accent); }
.pack:disabled { opacity: .5; cursor: progress; }
.pack b { font-size: 16px; }
.pack span { font-weight: 700; color: var(--accent); }
.pack small { font-size: 11px; color: var(--muted); text-align: center; line-height: 1.25; }
.wp-row { display: flex; gap: 8px; margin: 8px 0; }
.wp-row input { flex: 1; min-width: 0; padding: 9px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: inherit; text-transform: uppercase; }
.wp-more { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.wp-more summary { cursor: pointer; font-size: 13px; color: var(--ink-2); }
.wp-code { margin: 8px 0; }
.wp-code code { display: block; padding: 10px; border-radius: 10px; background: var(--bg); border: 1px dashed var(--line); font: 600 16px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .06em; text-align: center; user-select: all; margin-bottom: 6px; }
.note.ok { color: var(--on); }
@media (max-width: 420px) { .packs { grid-template-columns: 1fr; } .pack { flex-direction: row; justify-content: space-between; padding: 10px 12px; } }
.pop.centered { top: 50%; bottom: auto; transform: translateY(-50%); max-height: calc(100dvh - 24px); }


/* ====================================================================== главная (лобби) */
.lobby { display: block; padding: 0; overflow-x: hidden; }
.lobby h1, .lobby h2, .lobby h3, .lp-brand, .vd-text { font-family: var(--display); }
.lp-top, .lp-hero, .lp-wrap, .lp-foot { width: min(1120px, 100%); margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.lp-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 18px; padding-bottom: 18px; }
.lp-brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 23px; letter-spacing: -0.01em; }
.lp-logo { width: 44px; height: 44px; display: block; }
.lp-top-actions { display: flex; align-items: center; gap: 14px; }
.install-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: transparent; color: var(--ink);
  border-radius: 999px; padding: 7px 14px 7px 10px; font: 600 14px/1 inherit; cursor: pointer; }
.install-btn svg { width: 18px; height: 18px; fill: none; stroke: var(--accent); }
.install-btn:hover { border-color: var(--accent); }
.install-hint { position: fixed; top: 64px; right: 16px; width: min(320px, calc(100vw - 32px)); }
.install-hint h3 { font-size: 15px; margin: 0 0 6px; }
.install-hint p { margin: 0; font-size: 14px; }
.ios-share { width: 16px; height: 16px; fill: var(--accent); vertical-align: -3px; }

.lp-hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 56px; align-items: center; padding-top: 48px; padding-bottom: 72px; }
.lp-hero h1 { font-size: clamp(34px, 4.6vw, 56px); line-height: 1.04; letter-spacing: -0.035em; font-weight: 750; margin: 0 0 20px; max-width: 14ch; text-wrap: balance; }
.lp-lead { font-size: 18px; line-height: 1.5; color: var(--muted); max-width: 40ch; margin: 0 0 28px; }
.lp-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.lp-cta .btn { margin: 0; }
.lp-feats { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.lp-feats li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; padding: 16px 0; border-top: 1px solid var(--line); }
.lp-feats li:first-child { border-top: 0; }
.lp-feats li > svg { width: 28px; height: 28px; fill: var(--accent); margin-top: 2px; }
.lp-feats h3 { font-size: 18px; font-weight: 650; margin: 0 0 2px; letter-spacing: -0.01em; display: flex; align-items: center; gap: 6px; }
.lp-feats p { margin: 0; color: var(--muted); }
.feat-head { display: flex; align-items: center; gap: 6px; margin: 0 0 2px; }
.feat-head h3 { margin: 0; }

/* подсказка с пояснением мелким шрифтом */
.hint { position: relative; display: inline-flex; }
.hint-btn { display: inline-grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: help; }
.hint-btn svg { width: 16px; height: 16px; fill: var(--muted); }
.hint-btn:hover svg, .hint-btn:focus-visible svg, .hint.open .hint-btn svg { fill: var(--accent); }
.hint-pop { position: absolute; z-index: 20; left: 50%; top: calc(100% + 8px); transform: translateX(-50%); width: min(300px, 80vw);
  padding: 10px 12px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); box-shadow: 0 12px 30px rgba(0,0,0,.45);
  font: 400 12px/1.45 ui-sans-serif, system-ui, sans-serif; color: var(--ink); letter-spacing: 0; text-align: left;
  opacity: 0; visibility: hidden; transition: opacity .12s; }
.hint:hover .hint-pop, .hint-btn:focus-visible + .hint-pop, .hint.open .hint-pop { opacity: 1; visibility: visible; }

/* блок перевода */
.lp-tx { background: var(--band); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 80px 0 72px; }
.lp-tx h2 { font-size: clamp(30px, 4vw, 48px); line-height: 1.06; letter-spacing: -0.03em; font-weight: 750; margin: 0 0 16px; max-width: 18ch; text-wrap: balance; }
.lp-slogan { font-size: clamp(17px, 1.8vw, 21px); font-weight: 650; letter-spacing: -0.01em; margin: 0 0 14px; max-width: 40ch; text-wrap: balance;
  background: linear-gradient(90deg, rgb(var(--ai-rgb)), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lp-usp { list-style: none; padding: 32px 0 0; margin: 40px 0 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; gap: 32px 48px; }
.lp-usp li { display: flex; gap: 14px; align-items: flex-start; }
.lp-usp svg { flex: 0 0 auto; width: 26px; height: 26px; fill: rgb(var(--ai-rgb)); margin-top: 2px; }
.lp-usp h3 { font-size: 18px; letter-spacing: -0.01em; font-weight: 700; margin: 0 0 4px; }
.lp-usp p { color: var(--muted); margin: 0; max-width: 46ch; }
.lp-tx-lead { font-size: 18px; color: var(--muted); max-width: 52ch; margin: 0 0 40px; }

.vdemo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(120px, 0.7fr) minmax(0, 1fr); align-items: center; gap: 0; margin: 0 0 56px;
  padding: 32px; border-radius: 24px; background: var(--bg); border: 1px solid var(--line); }
.vd-side { display: flex; flex-direction: column; gap: 10px; min-height: 150px; justify-content: center; }
.vd-to { text-align: right; align-items: flex-end; }
.vd-lang { font: 700 13px/1 ui-sans-serif, system-ui, sans-serif; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 5px 7px; align-self: flex-start; }
.vd-to .vd-lang { align-self: flex-end; color: var(--accent); border-color: rgba(var(--accent-rgb), .45); }
.vd-text { font-size: clamp(22px, 2.6vw, 32px); line-height: 1.15; letter-spacing: -0.02em; font-weight: 650; margin: 0; transition: opacity .35s, transform .35s; }
.vd-who { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.vd-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.vd-flow { position: relative; height: 80px; margin: 0 12px; contain: layout paint; will-change: transform; }   /* перерисовка волны — только в своём слое */
.vd-flow svg { width: 100%; height: 100%; overflow: visible; }
.vd-wave { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 34 10; animation: vdFlow 1.6s linear infinite; }
/* волна анимируется, только когда видна на экране и не закрыта окном/меню — иначе страница перерисовывается 60 раз в секунду впустую */
.vdemo:not(.inview) .vd-wave, body:has(.modal:not([hidden]), .pop:not([hidden]), .help:not([hidden])) .vd-wave { animation-play-state: paused; }
@keyframes vdFlow { to { stroke-dashoffset: -88; } }
.vd-ai { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent); color: var(--accent); font: 800 14px/1 var(--display); letter-spacing: .02em; }
.vdemo.swap .vd-text { opacity: 0; transform: translateY(6px); }

.lp-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.lp-mode h3 { font-size: 24px; letter-spacing: -0.02em; font-weight: 700; margin: 0 0 8px; }
.lp-mode > p { color: var(--muted); margin: 0 0 18px; max-width: 46ch; }
.lp-langs-title { font-weight: 600; color: var(--ink) !important; margin: 0 0 10px !important; font-size: 14px; }
.lp-langs { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.lp-langs li { padding: 5px 10px; border-radius: 999px; background: var(--panel-2); font-size: 13px; line-height: 1.3; }
.lp-langs[data-collapsed="1"] li:nth-child(n+17) { display: none; }
#langsMore { margin-top: 12px; }
.lp-tx-cta { margin-top: 48px; display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.lp-tx-cta .btn { margin: 0; }
.lp-price { margin: 0; color: var(--muted); max-width: 46ch; }

.lp-foot { padding-top: 32px; padding-bottom: 40px; text-align: center; }
.lp-foot .privacy-note { margin: 0 auto; }

@media (max-width: 860px) {
  .lp-hero { grid-template-columns: 1fr; gap: 36px; padding-top: 24px; padding-bottom: 48px; }
  .lp-hero h1 { max-width: 18ch; }
  .lp-modes { grid-template-columns: 1fr; gap: 40px; }
  .lp-usp { grid-template-columns: 1fr; gap: 24px; }
  .vdemo { grid-template-columns: 1fr; padding: 22px; }
  .vd-side { min-height: 0; }
  .vd-flow { height: 64px; margin: 10px 0; }
  .lp-tx { padding: 56px 0 48px; }
}
@media (max-width: 520px) {
  .lp-top, .lp-hero, .lp-wrap, .lp-foot { padding-left: 16px; padding-right: 16px; }
  .lw-label { display: none; }
  .install-btn span { display: none; }
  .install-btn { padding: 8px; }
  .lp-lead, .lp-tx-lead { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .vd-wave { animation: none; }
  .vd-text { transition: none; }
}

/* ---------- поделиться ссылкой */
.share-btn svg { width: 16px; height: 16px; fill: currentColor; flex: none; }
.share-pop { width: min(300px, calc(100vw - 32px)); padding: 14px; }
.sh-head { display: flex; align-items: center; gap: 12px; padding: 2px 4px 12px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.sh-head-ico { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: rgba(var(--accent-rgb), .14); }
.sh-head-ico svg { width: 20px; height: 20px; fill: var(--accent); }
.sh-head h3 { font: 700 16px/1.25 var(--display); letter-spacing: -0.01em; margin: 0; }
.sh-link { margin: 2px 0 0; font-size: 12px; color: var(--muted); max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-list { display: grid; gap: 2px; }
.share-list a, .share-list button { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 10px; color: var(--ink); text-decoration: none; background: none; border: 0; font: inherit; font-size: 15px; font-weight: 500; line-height: 1.2; text-align: left; cursor: pointer; width: 100%; }
.share-list a:hover, .share-list button:hover, .share-list a:focus-visible, .share-list button:focus-visible { background: var(--panel-2); }
.sh-ico { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--c, var(--panel-2)); color: #fff; font: 800 14px/1 var(--display); }
.sh-glyph { background: var(--panel-2); }
.sh-glyph svg { width: 18px; height: 18px; fill: var(--ink); }
@container bar (max-width: 1180px) { .bar-right .share-btn span { display: none; } }

/* справка: кто что видит */
.who-sees { margin: 10px 0 0; display: grid; gap: 10px; }
.who-sees > div { padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.who-sees dt { font-weight: 650; margin: 0 0 4px; }
.who-sees dd { margin: 2px 0 0; color: var(--muted); }
.who-sees dd b { color: var(--ink); font-weight: 600; }

/* =====================================================================
   Оформление 2.0: ночной синий, фиолетовый — действия, янтарный — перевод
   ===================================================================== */
body { font-family: var(--display); font-size: 15px; background: var(--bg); }
::selection { background: rgba(var(--accent-rgb), .45); color: #fff; }
:focus-visible { outline: 2px solid var(--accent-hover); outline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--display); letter-spacing: -0.015em; }
.link { color: #ad9bff; }
.link:hover { color: #c7baff; }

/* кнопки */
.btn { border-radius: 12px; border-color: transparent; background: var(--panel-2); transition: background .15s, border-color .15s, box-shadow .15s, transform .1s; }
.btn:hover { background: var(--panel-3); border-color: transparent; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 22px rgba(var(--accent-rgb), .38); }
.btn.primary:hover { background: var(--accent-hover); filter: none; box-shadow: 0 10px 28px rgba(var(--accent-rgb), .5); }
.btn.ghost { background: transparent; border-color: var(--line); }
.btn.ghost:hover { background: var(--panel-2); border-color: var(--line-hover); }
.btn.big { border-radius: 14px; padding: 16px 28px; font-size: 16px; }
.btn.danger { background: var(--danger); box-shadow: 0 8px 22px rgba(var(--danger-rgb), .3); }

/* поля */
select, input[readonly], .field input, .wp-row input, .promo-form input {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; transition: border-color .15s, box-shadow .15s;
}
select:focus, input:focus, textarea:focus { outline: none; border-color: var(--accent) !important; box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .25); }
input[type=range], .check input, .wp-agree input { accent-color: var(--accent); }

/* вход гостя */
.prejoin { background: radial-gradient(ellipse 70% 60% at 30% 40%, rgba(var(--accent-rgb), .16), transparent 70%), var(--bg); }
.preview { border-radius: 22px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.prejoin-side { background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 24px; box-shadow: var(--shadow); }
.prejoin-side h2 { font-size: 28px; font-weight: 750; }
.meter i { background: linear-gradient(90deg, var(--on), #7af0c6); }

/* встреча */
.stage { background: var(--bg-2); }
.pulse { background: var(--accent); }
.waiting-box p { font-weight: 600; }
.waiting-box .share { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 8px; box-shadow: var(--shadow); }
.waiting-box .share input { border: 0; background: transparent; }
.tile { border-radius: 16px; background: var(--bg-2); box-shadow: inset 0 0 0 1px rgba(255,255,255,.04); }
.tiles { gap: 8px; padding: 8px; }
.tile-name, .self-name { background: rgba(10, 12, 27, .62); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.tx-badge { background: rgba(10, 12, 27, .7); border-color: var(--ai); color: var(--ai); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.tile-tx { background: rgba(10, 12, 27, .62); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-color: rgba(255,255,255,.14); }
.tile-tx:hover { border-color: var(--ai); }
.tile-tx.active { background: var(--ai); border-color: var(--ai); color: var(--ai-ink); }
.self { border-radius: 16px; border: 1px solid rgba(255,255,255,.1); box-shadow: var(--shadow); }
.cap-text > div { background: rgba(10, 12, 27, .72); }

/* панель управления */
.bar { background: rgb(21, 25, 53); border-top-color: var(--line); }
.ctl { border-color: transparent; background: var(--panel-2); transition: background .15s, box-shadow .15s, transform .1s; }
.ctl:hover { background: var(--panel-3); border-color: transparent; }
.ctl:active { transform: scale(.96); }
#micBtn[aria-pressed="false"], #camBtn[aria-pressed="false"] { background: var(--danger); box-shadow: 0 6px 18px rgba(var(--danger-rgb), .35); }
.ctl.danger { box-shadow: 0 6px 18px rgba(var(--danger-rgb), .35); }
.ctl.danger:hover { background: var(--danger-hover); }
.split .caret { border-color: transparent; background: var(--panel-2); border-left: 1px solid rgba(255,255,255,.06); }
.split .caret:hover { background: var(--panel-3); color: var(--ink); }
#voiceBtn.active { background: var(--ai); color: var(--ai-ink); box-shadow: 0 6px 20px rgba(var(--ai-rgb), .4); }
#voiceBtn.active + .caret { background: #e89c10; color: var(--ai-ink); border-color: #e89c10; }
#chatBtn.active { background: rgba(var(--accent-rgb), .18); border-color: var(--accent); color: #c7baff; }
#screenBtn[aria-pressed="true"] { background: var(--accent); color: #fff; }
.btn.wal { color: var(--ai); border-color: rgba(var(--ai-rgb), .4); }
.btn.wal.low { color: var(--danger); border-color: rgba(var(--danger-rgb), .45); }
.status.ok { color: var(--on); }
.sec { border-color: rgba(var(--on-rgb), .35); background: rgba(var(--on-rgb), .08); }
.badge { background: var(--danger); color: #fff; box-shadow: 0 0 0 2px var(--panel); }

/* всплывающие окна */
.pop { background: rgb(21, 25, 53); border-color: var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.pop h3 { font-size: 17px; font-weight: 700; }
.toast { background: var(--panel-2); border-color: var(--line); border-radius: 14px; box-shadow: var(--shadow); font-weight: 500; }
.toast.err { border-color: var(--danger); background: #2a1730; }
.modal { background: rgba(5, 6, 16, .8); }
.modal-box, .ask-box { border-radius: 22px; box-shadow: var(--shadow); }
.ask { background: rgba(5, 6, 16, .6); }
.modal-warn { color: var(--ai); background: rgba(var(--ai-rgb), .1); }
.callout.warn { border-left-color: var(--ai); background: rgba(var(--ai-rgb), .08); }

/* чат */
.chat { background: var(--panel); }
.msg { background: var(--panel-2); border-radius: 16px 16px 16px 6px; }
.msg.mine { background: var(--accent); color: #fff; border-radius: 16px 16px 6px 16px; }
.msg.mine time { color: rgba(255,255,255,.72); }
.msg.big, .msg.mine.big { background: transparent; }
.msg .from { color: #ad9bff; font-weight: 600; }
.fcard { background: var(--panel-2); border-color: transparent; border-radius: 16px; }
.fcard .fbar i { background: linear-gradient(90deg, var(--accent), #b39bff); }
.chat-form textarea { background: var(--bg-2); border-radius: 14px; }
.chat-icon.send { color: #fff; background: var(--accent); }
.chat-icon.send:hover { background: var(--accent-hover); color: #fff; }
.chat-icon.send:disabled { background: var(--panel-2); color: var(--muted); }
.chat-note { color: var(--ink-2); }

/* справка */
.help { background: var(--panel); }
.help-nav a { background: var(--panel-2); border-color: transparent; }
.help-nav a:hover { border-color: var(--accent); background: var(--panel-3); }
.who-sees > div { background: var(--bg-2); border-color: var(--line); }

/* кошелёк */
.wp-bal b { font-family: var(--display); font-size: 34px; color: var(--ai); }
.pack { background: var(--bg-2); border-color: var(--line); border-radius: 14px; transition: border-color .15s, transform .1s, box-shadow .15s; }
.pack:hover { border-color: var(--accent); box-shadow: 0 8px 22px rgba(var(--accent-rgb), .25); }
.pack:active { transform: translateY(1px); }
.pack span { color: #c7baff; }
.wp-agree.need { outline-color: var(--accent); }

/* ---------- главная ---------- */
.lp-hero h1 { font-weight: 780; }
.lp-feats li > svg { width: 44px; height: 44px; padding: 10px; border-radius: 14px; margin-top: 0; }
.lp-feats li { grid-template-columns: 44px 1fr; align-items: start; border-top-color: rgba(255,255,255,.06); }
.lp-feats li:nth-child(1) > svg { fill: var(--accent-hover); background: rgba(var(--accent-rgb), .16); }
.lp-feats li:nth-child(2) > svg { fill: var(--sky); background: rgba(60, 200, 255, .14); }
.lp-feats li:nth-child(3) > svg { fill: var(--on); background: rgba(var(--on-rgb), .14); }
.lp-feats li:nth-child(4) > svg { fill: #ff8aa0; background: rgba(var(--danger-rgb), .14); }
.lp-hero { position: relative; }
.lobby { background: radial-gradient(ellipse 55% 45% at 18% 12%, rgba(var(--accent-rgb), .22), transparent 70%), var(--bg); }
.install-btn { border-color: var(--line); background: rgba(255,255,255,.03); }
.install-btn:hover { border-color: var(--accent); background: rgba(var(--accent-rgb), .12); }
.install-btn svg { stroke: #ad9bff; }
.hint-btn:hover svg, .hint-btn:focus-visible svg, .hint.open .hint-btn svg { fill: #ad9bff; }
.hint-pop { background: var(--panel-2); border-color: var(--line-hover); }

.lp-tx { background: radial-gradient(ellipse 50% 60% at 85% 30%, rgba(var(--ai-rgb), .12), transparent 70%), var(--band); border-color: rgba(255,255,255,.05); }
.vdemo { background: rgba(10, 12, 27, .75); border-color: var(--line); border-radius: 28px; box-shadow: var(--shadow); }
.vd-lang { border-color: rgba(var(--accent-rgb), .5); color: #c7baff; }
.vd-to .vd-lang { color: var(--ai); border-color: rgba(var(--ai-rgb), .55); }
.vd-dot { background: var(--accent-hover); box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .2); }
.vd-wave { stroke: var(--accent-hover); }
.vd-ai { border-color: var(--ai); color: var(--ai-ink); background: var(--ai); box-shadow: 0 0 0 6px rgba(var(--ai-rgb), .18), 0 0 28px rgba(var(--ai-rgb), .45); }
.lp-mode h3 { display: flex; align-items: center; gap: 10px; }
.lp-mode h3::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--ai); box-shadow: 0 0 0 4px rgba(var(--ai-rgb), .18); }
.lp-mode:nth-child(2) h3::before { background: var(--sky); box-shadow: 0 0 0 4px rgba(60, 200, 255, .18); }
#langsVoice li { background: rgba(var(--ai-rgb), .12); color: #ffe2a8; }
#langsText li { background: rgba(60, 200, 255, .1); color: #c4ecff; }
.lp-foot { border-top: 1px solid rgba(255,255,255,.05); }

/* ---------- поделиться ---------- */
.sh-head-ico { background: rgba(var(--accent-rgb), .18); }
.sh-head-ico svg { fill: #ad9bff; }
.share-list a:hover, .share-list button:hover { background: var(--panel-3); }
.lp-brand { gap: 12px; }
.lp-brand-sub { font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: .01em; padding-left: 12px; border-left: 1px solid var(--line); line-height: 1.6; }
@media (max-width: 520px) { .lp-brand { font-size: 19px; gap: 10px; } .lp-logo { width: 36px; height: 36px; } .lp-brand-sub { font-size: 12px; padding-left: 10px; } }
@media (max-width: 380px) { .lp-brand-sub { display: none; } }

/* ссылка без Cloudflare — для участников из России */
.alt-row { margin: 10px 0 0 !important; font-size: 13px !important; font-weight: 500 !important; color: var(--muted); }
.alt-row a { color: #ad9bff; word-break: break-all; }
.sh-ico[style*="2a5bd7"] { font-size: 11px; letter-spacing: .02em; }

/* ---------- сообщить о проблеме */
.icon-btn { padding: 8px 10px; }
.icon-btn svg { width: 17px; height: 17px; fill: currentColor; display: block; }
.report-link { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); text-decoration: none; font-size: inherit; }
.report-link:hover { color: var(--ink); }
.report-link svg { width: 14px; height: 14px; fill: currentColor; }
.report-pop { width: min(380px, calc(100vw - 32px)); padding: 14px; }
.report-pop .sh-head-ico svg { width: 20px; height: 20px; fill: #ad9bff; }
.report-pop textarea { width: 100%; box-sizing: border-box; resize: vertical; min-height: 72px; padding: 9px 11px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); color: var(--ink); font: inherit; font-size: 14px; }
.rp-preview { margin: 0 0 10px; font-size: 13px; }
.rp-preview summary { cursor: pointer; color: #ad9bff; }
.rp-preview pre { max-height: 220px; overflow: auto; margin: 8px 0 0; padding: 10px; border-radius: 10px; background: var(--bg-2); font: 11px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink-2); }
.rp-send { width: 100%; }
.idea-pop .sh-head-ico svg { fill: #ffd36b; }
.idea-lead { margin: 0 0 10px; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.idea-pop textarea { width: 100%; box-sizing: border-box; resize: vertical; min-height: 96px; margin-bottom: 8px; }
.help-idea .idea-btn { display: inline-flex; align-items: center; gap: 8px; }
.idea-btn svg { width: 18px; height: 18px; fill: #ffd36b; }

/* ---------- мини-окно (Document Picture-in-Picture) */
#pipBtn.on { color: #c7baff; border-color: var(--accent); background: rgba(var(--accent-rgb), .16); }
.pip-body { margin: 0; height: 100vh; overflow: hidden; background: var(--bg-2); }
.pip { position: relative; display: flex; flex-direction: column; height: 100%; }
.pip-grid { flex: 1; min-height: 0; display: grid; gap: 4px; padding: 4px; grid-template-columns: 1fr; grid-auto-rows: 1fr; }
.pip-grid[data-n="2"] { grid-template-columns: 1fr 1fr; }
.pip-grid[data-n="3"], .pip-grid[data-n="4"] { grid-template-columns: 1fr 1fr; }
.pip-grid[data-n="5"], .pip-grid[data-n="6"] { grid-template-columns: repeat(3, 1fr); }
.pip-tile { position: relative; min-width: 0; min-height: 0; overflow: hidden; border-radius: 10px; background: #05060f; }
.pip-tile video { width: 100%; height: 100%; object-fit: cover; display: block; }
.pip-tile.screen video { object-fit: contain; }
.pip-tile:not(.pip-self) > video { transform: none; }
.pip-plate { position: absolute; inset: 0; display: grid; place-items: center; padding: 8px; color: #fff; font: 700 15px/1.2 var(--display); text-align: center; }
.pip-name { position: absolute; left: 6px; bottom: 6px; max-width: calc(100% - 40px); padding: 1px 7px; border-radius: 99px; background: rgba(10, 12, 27, .7); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pip-mic { position: absolute; right: 6px; bottom: 5px; font-size: 12px; }
.pip-self { position: absolute; right: 8px; bottom: 60px; width: 30%; max-width: 140px; aspect-ratio: 16 / 9; z-index: 3; border: 1px solid rgba(255,255,255,.18); box-shadow: 0 6px 18px rgba(0,0,0,.5); }
.pip-self video { transform: scaleX(-1); }
.pip-self .pip-plate { font-size: 11px; }
.pip-wait { position: absolute; top: 10px; left: 0; right: 0; margin: 0; text-align: center; font-size: 13px; color: var(--muted); z-index: 2; }
.pip-bar { flex: none; display: flex; justify-content: center; gap: 8px; padding: 8px; background: var(--panel); border-top: 1px solid var(--line); }
.pip-bar .ctl { height: 40px; min-width: 40px; padding: 0 10px; }
.pip-bar .ctl.danger { width: 52px; }
.pip-bar .ctl svg { width: 20px; height: 20px; }
.pip-bar .ctl[aria-pressed="false"] { background: var(--danger); }

/* ======================= язык сайта и флаги ======================= */
img.flag { width: 20px; height: 15px; flex: none; border-radius: 3px; object-fit: cover; box-shadow: 0 0 0 1px rgba(255, 255, 255, .14); vertical-align: -2px; }
.lp-langs li { display: inline-flex; align-items: center; gap: 7px; }
.lp-langs li img.flag { width: 18px; height: 13.5px; }
.lang-sw { position: relative; }
.lang-btn { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font: 600 13px/1 inherit; letter-spacing: .02em; cursor: pointer; }
.lang-btn:hover, .lang-btn[aria-expanded="true"] { border-color: var(--accent); }
.lang-btn::after { content: ''; width: 6px; height: 6px; margin-left: 1px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-2px) rotate(45deg); }
.lang-list { position: absolute; z-index: 60; top: calc(100% + 6px); right: 0; min-width: 200px; max-height: min(70vh, 520px); overflow: auto; margin: 0; padding: 6px; list-style: none;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.lang-list button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 9px; background: none; color: var(--ink); font: 500 14px/1.2 inherit; text-align: left; cursor: pointer; }
.lang-list button:hover, .lang-list button:focus-visible { background: var(--panel-2); outline: none; }
.lang-list button[aria-selected="true"] { background: rgba(var(--accent-rgb), .16); font-weight: 650; }
.lang-list button[aria-selected="true"]::after { content: '✓'; margin-left: auto; color: var(--accent); }
.corner-lang { position: absolute; top: 14px; right: 16px; z-index: 5; }
.prejoin, .ended { position: relative; }
@media (max-width: 560px) {
  .lang-btn span { display: none; }
  .lang-btn { padding: 0 8px; }
  .corner-lang { top: 10px; right: 10px; }
}

/* голосом / субтитрами — в меню перевода на плитке */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin: 4px 0 10px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); }
.seg button { border: 0; border-radius: 9px; padding: 8px 10px; background: none; color: var(--muted); font: 600 13px/1.2 inherit; cursor: pointer; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--accent); color: #fff; }

/* встреча вдвоём: своё видео плавает в правом нижнем углу — кнопка «Перевод» на плитке собеседника не должна под ним прятаться */
.tiles[data-n="1"] .tile-bar { right: calc(var(--self-w) + 32px); }
@media (max-width: 760px) { .tiles[data-n="1"] .tile-bar { right: 8px; } }

/* организатор: удалить участника (на плитке) и замок на вход (на панели) */
.tile-kick { pointer-events: auto; display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; border-radius: 99px;
  border: 1px solid rgba(255,255,255,.14); background: rgba(10, 12, 27, .62); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: #fff; cursor: pointer; }
.tile-kick svg { width: 17px; height: 17px; fill: currentColor; }
.tile-kick:hover { border-color: var(--danger); color: var(--danger); }
.tile-kick[hidden] { display: none; }
.tile-tx:not([hidden]) + .tile-kick { margin-left: 0; }
.tile-tx[hidden] + .tile-kick { margin-left: auto; }
.lock-btn .ic-closed { display: none; }
.lock-btn[aria-pressed="true"] .ic-closed { display: block; }
.lock-btn[aria-pressed="true"] .ic-open { display: none; }
.lock-btn.active { border-color: var(--ai); color: var(--ai); background: rgba(var(--ai-rgb), .12); }

/* экран входа: микрофон и камера вкл./выкл. — выбор запоминается для следующих встреч */
.pj-ctl { position: absolute; left: 0; right: 0; bottom: 14px; display: flex; justify-content: center; gap: 12px; z-index: 2; }
.pj-ctl .ctl { box-shadow: 0 6px 18px rgba(0,0,0,.4); }
#pjMicBtn[aria-pressed="false"], #pjCamBtn[aria-pressed="false"] { background: var(--danger); border-color: var(--danger); }

/* ---------- запланированные встречи */
.plan-btn { display: inline-flex; align-items: center; gap: 8px; }
.plan-btn svg, .pj-plan-title svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
.plan-list { margin-top: 18px; display: grid; gap: 8px; max-width: 520px; }
.plan-list-title { margin: 0; font-size: 13px; color: var(--muted); }
.plan-row { display: flex; align-items: center; gap: 6px; padding: 8px 8px 8px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-2); }
.plan-row-when { flex: 1; min-width: 0; text-align: left; color: var(--ink); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; }
.plan-row-when::first-letter { text-transform: uppercase; }
.plan-row .btn { padding: 6px 12px; font-size: 14px; min-height: 0; }
.plan-del { color: var(--muted); }
.plan-box { width: min(500px, 100%); max-height: calc(100dvh - 32px); overflow: auto; }
.plan-box input[type=datetime-local] { width: 100%; box-sizing: border-box; color-scheme: dark; }
.plan-when { font-size: 17px; font-weight: 700; margin: 0 0 12px; }
.plan-when::first-letter { text-transform: uppercase; }
.plan-link { display: flex; gap: 6px; }
.plan-link input { flex: 1; min-width: 0; font-size: 13px; }
.plan-acts { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.plan-acts .btn { font-size: 14px; padding: 7px 12px; text-decoration: none; }
.plan-host { margin: 0 0 10px; font-size: 14px; }
.plan-host summary { cursor: pointer; color: var(--muted); }
.plan-host .note { margin: 8px 0; }
.pj-plan { border: 1px solid rgba(var(--ai-rgb), .4); background: rgba(var(--ai-rgb), .08); border-radius: 16px; padding: 12px 14px; margin-bottom: 14px; }
.pj-plan-title { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font-size: 13px; color: var(--muted); }
.pj-plan .plan-when { margin: 0 0 2px; }
.pj-plan .muted { margin: 0 0 8px; font-size: 13px; }
.pj-plan .plan-acts { margin: 0; }
@media (max-width: 520px) { .plan-row { flex-wrap: wrap; } .plan-row-when { flex-basis: 100%; } }

/* ---------- главная: выделенная карточка про AI-перевод голоса */
.lp-feats li.lp-feat-ai { position: relative; margin-top: 10px; padding: 18px 18px 18px 16px; border: 0; border-radius: 20px; grid-template-columns: 52px 1fr;
  background: linear-gradient(135deg, rgba(var(--ai-rgb), .16), rgba(var(--accent-rgb), .14) 60%, rgba(60, 200, 255, .10));
  box-shadow: 0 14px 40px rgba(var(--ai-rgb), .12), inset 0 0 0 1px rgba(var(--ai-rgb), .38); }
.lp-feats li.lp-feat-ai h3 { font-size: 19px; font-weight: 750; line-height: 1.25; margin-bottom: 6px; display: block;
  background: linear-gradient(90deg, #ffd27a, var(--ai) 45%, #c9b8ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lp-feats li.lp-feat-ai p { color: var(--ink-2); }
.ai-ico { position: relative; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--ai); box-shadow: 0 8px 24px rgba(var(--ai-rgb), .35); }
.ai-ico svg { width: 26px; height: 26px; fill: var(--ai-ink); }
.ai-ico b { position: absolute; right: -6px; bottom: -6px; font: 800 10px/1 var(--display); letter-spacing: .04em; padding: 4px 5px; border-radius: 7px; background: var(--accent); color: #fff; box-shadow: 0 0 0 3px var(--bg); }
.ai-more { display: inline-block; margin-top: 8px; padding: 0; font-weight: 600; font-size: 14px; color: var(--ai); text-decoration: none; }
.ai-more:hover { text-decoration: underline; }

/* ---------- кошелёк: бесплатная проба */
.wp-trial { display: grid; gap: 10px; margin: 12px 0; padding: 12px 14px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(var(--ai-rgb), .16), rgba(var(--accent-rgb), .12)); box-shadow: inset 0 0 0 1px rgba(var(--ai-rgb), .4); }
.wp-trial p { margin: 0; font-size: 14px; line-height: 1.45; }
.wp-trial .btn { width: 100%; }

/* напоминание про наушники перед переводом своего голоса */
.hp-box { text-align: center; }
.hp-ico { width: 56px; height: 56px; margin: 0 auto 10px; border-radius: 50%; display: grid; place-items: center; background: rgba(var(--ai-rgb), .16); }
.hp-ico svg { width: 30px; height: 30px; fill: rgb(var(--ai-rgb)); }
.hp-box .modal-actions { justify-content: center; flex-wrap: wrap; }

/* валюта оплаты: все варианты видны сразу */
.wp-cur { display: flex; gap: 6px; margin: 4px 0 10px; padding: 4px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); }
.wp-cur button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 10px; border: 0; border-radius: 9px;
  background: transparent; color: var(--muted); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.wp-cur button b { font-size: 16px; }
.wp-cur button:hover { color: var(--ink); }
.wp-cur button[aria-checked="true"] { background: rgba(var(--accent-rgb), .22); color: var(--ink); box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), .6); }

/* версии сайта на всех языках — обычные ссылки (их видят и поисковики) */
.lang-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; margin-top: 14px; font-size: 13px; }
.lang-links a { color: var(--muted); text-decoration: none; }
.lang-links a:hover { color: var(--ink); text-decoration: underline; }
