/* ============================================================
   Nushon Meet — тёплая тёмная тема, персиковый акцент
   ============================================================ */
:root {
  --bg: #141110;
  --bg-2: #1d1815;
  --surface: rgba(41, 35, 30, 0.72);
  --surface-2: rgba(56, 47, 40, 0.66);
  --surface-3: rgba(28, 24, 21, 0.86);
  --border: rgba(255, 255, 255, 0.075);
  --border-2: rgba(255, 255, 255, 0.13);
  --text: #f5ede5;
  --muted: #ab9c8e;
  --muted-2: #8d8073;
  --accent: #e07a5f;
  --accent-2: #c96a4f;
  --accent-3: #e6b980;
  --accent-soft: rgba(224, 122, 95, 0.15);
  --accent-line: rgba(224, 122, 95, 0.38);
  --danger: #c0563f;
  --danger-soft: rgba(192, 86, 63, 0.16);
  --ok: #a9b665;
  --warn: #d9a35b;
  --r-sm: 9px;
  --r: 12px;
  --r-lg: 14px;
  --r-xl: 16px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --shadow-warm: 0 10px 30px rgba(224, 122, 95, 0.22);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(1100px 760px at 12% -12%, rgba(224, 122, 95, 0.20), transparent 62%),
    radial-gradient(880px 680px at 104% -4%, rgba(230, 185, 128, 0.11), transparent 58%),
    radial-gradient(900px 900px at 50% 120%, rgba(201, 106, 79, 0.10), transparent 60%),
    linear-gradient(165deg, #171312 0%, #1e1815 46%, #141110 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
[hidden] { display: none !important; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.09); border-radius: 20px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(224, 122, 95, 0.35); background-clip: content-box; }

h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -0.02em; }
p { margin: 0; }
a { color: var(--accent); text-decoration: none; }

.screen { min-height: 100vh; min-height: 100dvh; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 28px 20px 56px; }

/* ---------------------------------------------------------- логотип */
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center;
  background: linear-gradient(135deg, #e07a5f, #c96a4f);
  box-shadow: var(--shadow-warm); color: #fff; flex: none;
}
.brand-mark svg { width: 21px; height: 21px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.brand-sub { font-size: 11.5px; color: var(--muted-2); }
.brand-name .grad {
  background: linear-gradient(180deg, #f7d8c9, #e07a5f);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------------------------------------------------------- карточки */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}
.card-pad { padding: 26px; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.card-head h3 { font-size: 15px; }
.card-head .hint { font-size: 12px; color: var(--muted-2); }
.card-head .grow { flex: 1; }

/* ---------------------------------------------------------- кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 44px; padding: 0 18px; border-radius: var(--r);
  border: 1px solid var(--border-2); background: var(--surface-2); color: var(--text);
  font-size: 14px; font-weight: 550; transition: transform .12s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
  white-space: nowrap;
}
.btn:hover { background: rgba(72, 60, 51, 0.72); border-color: var(--border-2); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary {
  background: linear-gradient(135deg, #e07a5f, #c96a4f);
  border-color: transparent; color: #fff; font-weight: 600;
  box-shadow: 0 8px 28px rgba(224, 122, 95, 0.35);
}
.btn-primary:hover { background: linear-gradient(135deg, #e88a6f, #d0724f); box-shadow: 0 10px 34px rgba(224, 122, 95, 0.45); }
.btn-block { width: 100%; }
.btn-lg { height: 52px; font-size: 15px; border-radius: var(--r-lg); }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: var(--r-sm); }
.btn-danger { background: var(--danger-soft); border-color: rgba(192, 86, 63, 0.4); color: #f0b3a4; }
.btn-danger:hover { background: rgba(192, 86, 63, 0.28); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); }
.btn[disabled] { opacity: .45; pointer-events: none; }

.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  border: 1px solid var(--border); background: rgba(255, 255, 255, 0.035); color: var(--muted);
  transition: background .16s ease, color .16s ease, border-color .16s ease, transform .12s ease;
}
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn:hover { background: rgba(255, 255, 255, 0.08); color: var(--text); }
.icon-btn:active { transform: translateY(1px); }
.icon-btn.on { color: var(--text); border-color: var(--accent-line); background: var(--accent-soft); }
.icon-btn.off { color: #eab5a7; background: var(--danger-soft); border-color: rgba(192, 86, 63, 0.4); }

/* ---------------------------------------------------------- поля */
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 12.5px; color: var(--muted); letter-spacing: .01em; }
.input, select.input {
  height: 46px; padding: 0 14px; border-radius: var(--r); width: 100%;
  background: rgba(20, 17, 15, 0.6); border: 1px solid var(--border-2); color: var(--text);
  outline: none; transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.input::placeholder { color: var(--muted-2); }
.input:focus { border-color: var(--accent-line); box-shadow: 0 0 0 3px rgba(224, 122, 95, 0.14); background: rgba(20, 17, 15, 0.78); }
select.input {
  appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 36px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 21px, calc(100% - 13px) 21px;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
select.input option, select.input optgroup { background: #221d1a; color: var(--text); }
.input-code { letter-spacing: .22em; text-transform: uppercase; font-weight: 600; }

/* ---------------------------------------------------------- тумблер */
.switch { display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { display: none; }
.switch .track {
  width: 40px; height: 23px; border-radius: 20px; background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-2); position: relative; transition: background .18s ease, border-color .18s ease; flex: none;
}
.switch .track::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 17px; height: 17px; border-radius: 50%;
  background: #efe4da; transition: transform .18s ease;
}
.switch input:checked + .track { background: linear-gradient(135deg, #e07a5f, #c96a4f); border-color: transparent; }
.switch input:checked + .track::after { transform: translateX(17px); background: #fff; }
.switch .lbl { font-size: 13.5px; color: var(--text); }
.switch .lbl small { display: block; color: var(--muted-2); font-size: 11.5px; margin-top: 2px; }

/* ---------------------------------------------------------- ползунок */
input[type=range] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 24px; background: transparent; cursor: pointer;
}
input[type=range]::-webkit-slider-runnable-track { height: 5px; border-radius: 5px; background: rgba(255, 255, 255, 0.12); }
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 17px; height: 17px; border-radius: 50%; margin-top: -6px;
  background: linear-gradient(135deg, #f0a184, #e07a5f); border: 2px solid #2a221d; box-shadow: 0 2px 8px rgba(224, 122, 95, 0.5);
}
input[type=range]::-moz-range-track { height: 5px; border-radius: 5px; background: rgba(255, 255, 255, 0.12); }
input[type=range]::-moz-range-thumb { width: 15px; height: 15px; border-radius: 50%; background: #e07a5f; border: 2px solid #2a221d; }

/* ---------------------------------------------------------- сегменты */
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg button {
  height: 36px; padding: 0 14px; border-radius: 11px; font-size: 13px; font-weight: 550;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border); color: var(--muted);
  transition: all .15s ease;
}
.seg button:hover { color: var(--text); background: rgba(255, 255, 255, 0.075); }
.seg button.active {
  background: var(--accent-soft); border-color: var(--accent-line); color: #f6d3c6;
}
.seg.vertical { flex-direction: column; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px;
  border-radius: 999px; font-size: 13px; color: var(--muted);
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border);
}
.chip b { color: var(--text); font-weight: 600; }
.chip.link { cursor: pointer; }
.chip.link:hover { color: var(--text); background: rgba(255, 255, 255, 0.08); }
.chip svg { width: 15px; height: 15px; }
.chip.accent { background: var(--accent-soft); border-color: var(--accent-line); color: #f6d3c6; }

/* ---------------------------------------------------------- вход */
.gate { min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.gate-card { width: 100%; max-width: 430px; padding: 34px 30px 30px; text-align: left; }
.gate-mark {
  width: 58px; height: 58px; border-radius: 19px; display: grid; place-items: center; margin-bottom: 22px;
  background: linear-gradient(135deg, #e07a5f, #c96a4f); box-shadow: 0 12px 34px rgba(224, 122, 95, 0.34);
}
.gate-mark svg { width: 28px; height: 28px; color: #fff; }
.gate h1 { font-size: 27px; margin-bottom: 10px; }
.gate .lead { color: var(--muted); font-size: 14px; line-height: 1.55; margin-bottom: 26px; }
.gate-form { display: flex; flex-direction: column; gap: 14px; }
.gate-foot { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); display: flex; gap: 8px; align-items: center; color: var(--muted-2); font-size: 12px; }
.err { color: #eab5a7; font-size: 13px; min-height: 18px; }

/* ---------------------------------------------------------- лобби */
.lobby-top { display: flex; align-items: center; gap: 14px; margin-bottom: 30px; }
.lobby-top .grow { flex: 1; }
.lobby-hero { margin-bottom: 26px; }
.lobby-hero h1 { font-size: 34px; line-height: 1.15; margin-bottom: 12px; }
.lobby-hero h1 .grad {
  background: linear-gradient(180deg, #f6dccd, #e07a5f); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lobby-hero p { color: var(--muted); font-size: 14.5px; max-width: 620px; line-height: 1.6; }
.lobby-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 18px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.big-action {
  display: flex; flex-direction: column; gap: 14px; padding: 24px; border-radius: var(--r-xl);
  border: 1px solid var(--border); background: var(--surface); backdrop-filter: blur(22px); box-shadow: var(--shadow);
}
.big-action h3 { font-size: 17px; }
.big-action p { color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.join-row { display: flex; gap: 10px; }
.join-row .input { flex: 1; }
.preview-box {
  position: relative; border-radius: var(--r-lg); overflow: hidden; background: #0f0d0c;
  border: 1px solid var(--border); aspect-ratio: 16 / 10;
}
.preview-box video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); display: block; }
.preview-box .ph {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; color: var(--muted-2); font-size: 13px; text-align: center; padding: 20px;
}
.preview-box .ph svg { width: 30px; height: 30px; opacity: .7; }
.meter { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.meter .bar { flex: 1; height: 7px; border-radius: 6px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.meter .fill { height: 100%; width: 0%; border-radius: 6px; background: linear-gradient(90deg, #a9b665, #e6b980 60%, #e07a5f); transition: width .08s linear; }
.meter .lbl { font-size: 11.5px; color: var(--muted-2); white-space: nowrap; }
.recent { display: flex; flex-wrap: wrap; gap: 8px; }
.feat { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 22px; }
.feat div {
  padding: 15px 16px; border-radius: var(--r-lg); background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border); font-size: 13px; color: var(--muted); line-height: 1.5;
}
.feat div b { display: block; color: var(--text); font-size: 13.5px; margin-bottom: 5px; }
.feat svg { width: 17px; height: 17px; color: var(--accent); margin-bottom: 9px; }

/* ---------------------------------------------------------- комната */
.room { display: flex; flex-direction: column; height: 100dvh; overflow: hidden; }
.topbar {
  display: flex; align-items: center; gap: 12px; padding: 12px 18px;
  border-bottom: 1px solid var(--border); background: rgba(23, 19, 17, 0.72);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); z-index: 20; flex: none;
}
.topbar .grow { flex: 1; }
.topbar .brand-sub { display: none; }
.room-body { flex: 1; display: flex; min-height: 0; }
.stage-wrap { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.stage {
  flex: 1; min-height: 0; padding: 16px; overflow: auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px; align-content: start;
}
.stage.solo { grid-template-columns: minmax(0, 1fr); }
.stage > .tile { max-height: min(68vh, 760px); }
.stage.spotlight { display: flex; flex-direction: column; gap: 12px; }
.stage.spotlight .tile.is-screen { flex: 1 1 auto; min-height: 0; aspect-ratio: auto; }
.stage.spotlight .filmstrip {
  display: flex; gap: 12px; overflow-x: auto; padding-bottom: 4px; flex: none;
}
.stage.spotlight .tile:not(.is-screen) { width: 230px; min-width: 230px; aspect-ratio: 16 / 9; }

.tile {
  position: relative; border-radius: var(--r-lg); overflow: hidden; background: #100e0d;
  border: 1px solid var(--border); aspect-ratio: 16 / 9; min-height: 150px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.tile.is-screen { border-color: var(--accent-line); box-shadow: 0 0 0 1px rgba(224, 122, 95, 0.18); }
.tile video { width: 100%; height: 100%; object-fit: contain; display: block; background: #0c0a09; }
.tile video.mirror { transform: scaleX(-1); }
.tile .ph {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  background: radial-gradient(600px 400px at 50% 40%, rgba(224, 122, 95, 0.09), transparent 70%);
}
.tile .ph .avatar { width: 62px; height: 62px; }
.tile .name {
  position: absolute; left: 10px; bottom: 10px; display: flex; align-items: center; gap: 7px;
  max-width: calc(100% - 20px); padding: 6px 11px 6px 7px; border-radius: 999px;
  background: rgba(18, 15, 14, 0.72); backdrop-filter: blur(10px); font-size: 12.5px; font-weight: 550;
  border: 1px solid rgba(255, 255, 255, 0.07);
}
.tile .name .txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .badges { position: absolute; right: 10px; top: 10px; display: flex; gap: 6px; align-items: center; }
.tile .tbadge {
  display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px; border-radius: 999px;
  background: rgba(18, 15, 14, 0.72); backdrop-filter: blur(10px); font-size: 11.5px; color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.07);
}
.tile .tbadge svg { width: 13px; height: 13px; }
.tile .tbadge.good { color: #c6d29a; }
.tile .tbadge.mid { color: #e3bd85; }
.tile .tbadge.bad { color: #eaa892; }
.tile .tbadge.accent { color: #f6d3c6; border-color: var(--accent-line); background: rgba(224, 122, 95, 0.16); }
.tile .stats {
  position: absolute; left: 10px; top: 10px; padding: 7px 10px; border-radius: 11px; font-size: 11px; line-height: 1.6;
  background: rgba(18, 15, 14, 0.78); backdrop-filter: blur(10px); color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.07); font-variant-numeric: tabular-nums;
}
.tile .stats b { color: var(--text); font-weight: 600; }
.tile .actions {
  position: absolute; right: 10px; bottom: 10px; display: flex; gap: 6px; opacity: 0; transition: opacity .18s ease;
}
.tile:hover .actions { opacity: 1; }
.tile .actions .icon-btn { width: 32px; height: 32px; border-radius: 9px; background: rgba(18, 15, 14, 0.72); backdrop-filter: blur(10px); }
.tile .actions .icon-btn svg { width: 15px; height: 15px; }
.tile.speaking { border-color: rgba(169, 182, 101, 0.55); box-shadow: 0 0 0 2px rgba(169, 182, 101, 0.16); }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none;
  font-size: 13px; font-weight: 650; color: #241d19; letter-spacing: -0.02em;
}
.avatar.sm { width: 26px; height: 26px; font-size: 11px; }

/* ---------------------------------------------------------- боковая панель */
.side {
  width: 340px; flex: none; border-left: 1px solid var(--border); background: rgba(23, 19, 17, 0.6);
  backdrop-filter: blur(20px); display: flex; flex-direction: column; min-height: 0;
}
.side-tabs { display: flex; gap: 6px; padding: 12px 14px 0; }
.side-tabs button {
  flex: 1; height: 36px; border-radius: 10px; font-size: 13px; font-weight: 550; color: var(--muted);
  background: transparent; border: 1px solid transparent;
}
.side-tabs button:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.side-tabs button.active { color: #f6d3c6; background: var(--accent-soft); border-color: var(--accent-line); }
.side-body { flex: 1; min-height: 0; overflow: auto; padding: 14px; }
.people { display: flex; flex-direction: column; gap: 4px; }
.people .row { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; }
.people .row:hover { background: rgba(255, 255, 255, 0.04); }
.people .row .who { flex: 1; min-width: 0; }
.people .row .who .nm { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.people .row .who .sub { font-size: 11.5px; color: var(--muted-2); }
.people .row .ic { display: flex; gap: 6px; color: var(--muted-2); }
.people .row .ic svg { width: 15px; height: 15px; }
.people .row .ic .mut { color: #e0a08f; }
.people .row .ic .act { color: var(--accent); }
.chat { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.chat-log { flex: 1; overflow: auto; display: flex; flex-direction: column; gap: 12px; padding-right: 4px; }
.msg { display: flex; gap: 9px; }
.msg .body { min-width: 0; }
.msg .meta { display: flex; align-items: baseline; gap: 8px; margin-bottom: 3px; }
.msg .meta .nm { font-size: 12.5px; font-weight: 600; }
.msg .meta .tm { font-size: 11px; color: var(--muted-2); }
.msg .tx { font-size: 13.5px; line-height: 1.5; color: #e9dfd6; word-wrap: break-word; overflow-wrap: anywhere; white-space: pre-wrap; }
.msg.sys { justify-content: center; }
.msg.sys .tx { font-size: 12px; color: var(--muted-2); text-align: center; }
.chat-form { display: flex; gap: 8px; padding: 12px 0 0; flex: none; }
.chat-form .input { height: 42px; }
.chat-empty { color: var(--muted-2); font-size: 12.5px; text-align: center; margin: auto; padding: 20px; line-height: 1.6; }

/* ---------------------------------------------------------- панель настроек */
.sheet-back {
  position: fixed; inset: 0; background: rgba(12, 10, 9, 0.6); backdrop-filter: blur(4px);
  z-index: 60; opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.sheet-back.open { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; z-index: 61; right: 0; top: 0; height: 100dvh; width: 400px; max-width: 100vw;
  background: rgba(26, 22, 19, 0.97); backdrop-filter: blur(26px); border-left: 1px solid var(--border);
  transform: translateX(102%); transition: transform .24s cubic-bezier(.4, 0, .2, 1);
  display: flex; flex-direction: column;
}
.sheet.open { transform: none; }
.sheet-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--border); flex: none; }
.sheet-head h3 { font-size: 15px; flex: 1; }
.sheet-body { flex: 1; overflow: auto; padding: 18px; display: flex; flex-direction: column; gap: 22px; }
.sheet-foot { flex: none; padding: 14px 18px; border-top: 1px solid var(--border); }
.group { display: flex; flex-direction: column; gap: 12px; }
.group > .gl { font-size: 11.5px; text-transform: uppercase; letter-spacing: .09em; color: var(--muted-2); font-weight: 600; }
.group-row { display: flex; align-items: center; gap: 12px; }
.group-row .grow { flex: 1; }
.val { font-variant-numeric: tabular-nums; font-size: 13px; color: var(--accent-3); font-weight: 600; min-width: 62px; text-align: right; }
.sub-note { font-size: 12px; color: var(--muted-2); line-height: 1.55; }
.presets { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
.presets button {
  padding: 11px 10px; border-radius: 12px; text-align: left; border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04); color: var(--muted); font-size: 12.5px; line-height: 1.35;
}
.presets button b { display: block; font-size: 13px; color: var(--text); font-weight: 600; margin-bottom: 2px; }
.presets button:hover { background: rgba(255, 255, 255, 0.075); }
.presets button.active { border-color: var(--accent-line); background: var(--accent-soft); }
.presets button.active b { color: #f8dccf; }
.table { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; }
.table .tr { display: flex; gap: 10px; padding: 7px 10px; border-radius: 9px; }
.table .tr:nth-child(odd) { background: rgba(255, 255, 255, 0.03); }
.table .tr .k { color: var(--muted); flex: 1; }
.table .tr .v { color: var(--text); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------- нижняя панель */
.bottombar {
  flex: none; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 18px;
  border-top: 1px solid var(--border); background: rgba(23, 19, 17, 0.72); backdrop-filter: blur(20px); z-index: 20;
}
.bottombar .spacer { flex: 1; }
.ctrl {
  display: flex; flex-direction: column; align-items: center; gap: 5px; width: 64px; background: none; border: none; padding: 0;
}
.ctrl .ico {
  width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border); color: var(--text);
  transition: all .16s ease; position: relative;
}
.ctrl .ico svg { width: 20px; height: 20px; }
.ctrl .cap { font-size: 10.5px; color: var(--muted-2); }
.ctrl:hover .ico { background: rgba(255, 255, 255, 0.1); }
.ctrl.off .ico { background: var(--danger-soft); border-color: rgba(192, 86, 63, 0.4); color: #eab5a7; }
.ctrl.active .ico { background: var(--accent-soft); border-color: var(--accent-line); color: #f8dccf; }
.ctrl.primary .ico {
  background: linear-gradient(135deg, #e07a5f, #c96a4f); border-color: transparent; color: #fff;
  box-shadow: 0 8px 26px rgba(224, 122, 95, 0.34);
}
.ctrl.primary.active .ico { background: linear-gradient(135deg, #f09173, #d8704f); }
.ctrl.primary:hover .ico { box-shadow: 0 10px 30px rgba(224, 122, 95, 0.48); }
.ctrl.leave .ico { background: var(--danger-soft); border-color: rgba(192, 86, 63, 0.42); color: #f0b3a4; }
.ctrl .dot {
  position: absolute; top: -3px; right: -3px; min-width: 17px; height: 17px; border-radius: 9px;
  background: linear-gradient(135deg, #e07a5f, #c96a4f); color: #fff; font-size: 10.5px; font-weight: 700;
  display: grid; place-items: center; padding: 0 4px; border: 2px solid #1b1714;
}
.ctrl .kbd {
  position: absolute; bottom: -3px; right: -3px; font-size: 9px; color: var(--muted-2);
  background: rgba(18, 15, 14, 0.9); border: 1px solid var(--border); border-radius: 5px; padding: 0 4px;
}
.reactions { display: flex; gap: 6px; }
.reactions button {
  width: 38px; height: 38px; border-radius: 12px; font-size: 18px; line-height: 1;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border); color: var(--text);
}
.reactions button:hover { background: rgba(224, 122, 95, 0.18); border-color: var(--accent-line); }

/* ---------------------------------------------------------- всплывашки */
.float-emoji {
  position: fixed; z-index: 90; font-size: 34px; pointer-events: none;
  animation: floatUp 2.6s ease-out forwards;
}
@keyframes floatUp {
  0% { opacity: 0; transform: translateY(10px) scale(.7); }
  18% { opacity: 1; transform: translateY(-6px) scale(1.06); }
  100% { opacity: 0; transform: translateY(-150px) scale(.9); }
}
.toast-wrap { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 95; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  padding: 11px 16px; border-radius: 13px; font-size: 13px; background: rgba(30, 25, 22, 0.96);
  border: 1px solid var(--border-2); box-shadow: var(--shadow); backdrop-filter: blur(16px);
  animation: toastIn .22s ease; max-width: 90vw; text-align: center;
}
.toast.err { border-color: rgba(192, 86, 63, 0.5); color: #f2bcae; }
.toast.ok { border-color: var(--accent-line); color: #f6d8cb; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.modal-back {
  position: fixed; inset: 0; background: rgba(12, 10, 9, 0.66); backdrop-filter: blur(6px);
  z-index: 70; display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal { width: 100%; max-width: 520px; max-height: 90dvh; overflow: auto; padding: 24px; }
.modal h3 { font-size: 19px; margin-bottom: 6px; }
.modal .sub { color: var(--muted); font-size: 13.5px; line-height: 1.55; margin-bottom: 20px; }
.modal-actions { display: flex; gap: 10px; margin-top: 22px; }
.modal-actions .grow { flex: 1; }
.source-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.source-grid button {
  padding: 16px 12px; border-radius: var(--r); border: 1px solid var(--border); text-align: center;
  background: rgba(255, 255, 255, 0.04); color: var(--muted); font-size: 12.5px;
}
.source-grid button svg { width: 22px; height: 22px; margin-bottom: 8px; color: var(--accent); }
.source-grid button b { display: block; color: var(--text); font-size: 13.5px; margin-bottom: 3px; }
.source-grid button:hover { background: rgba(255, 255, 255, 0.08); }
.source-grid button.active { border-color: var(--accent-line); background: var(--accent-soft); }
.spinner {
  width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff; animation: spin .7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------- адаптив */
@media (max-width: 1024px) {
  .lobby-grid { grid-template-columns: 1fr; }
  .feat { grid-template-columns: 1fr; }
  .side { width: 300px; }
}
@media (max-width: 860px) {
  .lobby-hero h1 { font-size: 27px; }
  .stage { grid-template-columns: 1fr; padding: 10px; }
  .stage.spotlight .tile:not(.is-screen) { width: 170px; min-width: 170px; }
  .side {
    position: fixed; z-index: 55; right: 0; top: 0; bottom: 0; width: min(92vw, 360px);
    transform: translateX(102%); transition: transform .24s cubic-bezier(.4, 0, .2, 1);
    box-shadow: -20px 0 50px rgba(0, 0, 0, 0.5);
  }
  .side.open { transform: none; }
  .sheet { width: 100vw; }
  .ctrl { width: 56px; }
  .ctrl .ico { width: 44px; height: 44px; }
  .reactions { display: none; }
  .bottombar { gap: 4px; padding: 10px 8px; padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
  .topbar { padding: 10px 12px; gap: 8px; }
  .room-code-chip .full { display: none; }
}
@media (max-width: 520px) {
  .wrap { padding: 20px 14px 40px; }
  .card-pad { padding: 20px; }
  .gate-card { padding: 26px 20px 22px; }
  .modal { padding: 20px; }
  .source-grid { grid-template-columns: 1fr; }
}
