/* ==========================================================================
   PxMeet — Jitsi-style design system
   Tokens taken from the reference deployment (meet.elenmc.ir):
   page #131519 · stage #040404 · action blue #0376da/#0074e0 ·
   hangup #cb2233 · welcome card #d5e5ff · 48px toolbox buttons, 3px radius
   ========================================================================== */

:root {
  --bg: #131519;          /* page, header, footer, panels */
  --bg-stage: #040404;    /* video stage */
  --bg-elev: #1c1e22;      /* dialogs, elevated surfaces */
  --bg-hover: rgba(255, 255, 255, .10);
  --bg-input: #3d3d3d;
  --line: rgba(255, 255, 255, .10);
  --line-strong: rgba(255, 255, 255, .18);
  --text: #f1f1f1;
  --text-dim: #a8adb4;
  --text-faint: #7d828a;
  --blue: #0376da;
  --blue-strong: #0074e0;
  --blue-hover: #025fae;
  --red: #cb2233;
  --red-hover: #e04757;
  --red-active: #a21b29;
  --green: #2ea44f;
  --amber: #d99114;
  --card-blue: #d5e5ff;
  --ink: #131519;          /* text on light surfaces */
  --radius: 4px;
  --radius-lg: 8px;
  --header-h: 56px;
  --tool: 48px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", open_sanslight,
          "Helvetica Neue", Helvetica, Arial, Tahoma, sans-serif;
  --shadow: 0 12px 32px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { margin: 0; font-weight: 600; }
p { margin: 0; }
ul, ol, dl { margin: 0; padding: 0; list-style: none; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }

:focus-visible { outline: 2px solid var(--blue-strong); outline-offset: 2px; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .18); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, .3); background-clip: padding-box; }

.hidden { display: none !important; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.noscript {
  max-width: 640px; margin: 64px auto; padding: 24px;
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius-lg);
  color: var(--text);
}
.noscript p { margin-top: 10px; color: var(--text-dim); }

kbd {
  display: inline-block; min-width: 26px; padding: 3px 8px;
  background: #2b2f36; border: 1px solid var(--line-strong);
  border-bottom-width: 2px; border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px; text-align: center; color: var(--text);
}

/* ============================== shared bits ============================== */

.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--text-faint); }
.dot-ok { background: var(--green); }
.dot-bad { background: var(--red); }

.tab-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px; margin-inline-start: 6px;
  background: var(--blue); color: #fff; border-radius: 9px;
  font-size: 11px; font-weight: 700; line-height: 1;
}

.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: #fff; }
.brand-mark { display: inline-flex; }
.brand-name { font-size: 17px; font-weight: 700; letter-spacing: .2px; }
.brand-sm .brand-name { font-size: 15px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 16px; border: 1px solid transparent; border-radius: var(--radius);
  background: #2b2f36; color: var(--text); font-size: 14px; font-weight: 600;
  transition: background .15s, border-color .15s, opacity .15s;
}
.btn:hover { background: #343941; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-hover); }
.btn-secondary { background: #2b2f36; border-color: var(--line-strong); }
.btn-secondary:hover { background: #343941; }
.btn-ghost { background: transparent; border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--bg-hover); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: var(--red-hover); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-lg { padding: 12px 20px; font-size: 15px; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  width: 36px; height: 36px; padding: 0;
  background: transparent; border: 0; border-radius: var(--radius);
  color: var(--text); font-size: 15px;
  transition: background .15s;
}
.icon-btn:hover { background: var(--bg-hover); }
.icon-btn.sm { width: 26px; height: 26px; font-size: 13px; }
.icon-btn.ok { color: var(--green); }
.icon-btn.danger { color: var(--red-hover); }
.icon-btn.send { background: var(--blue); color: #fff; }
.icon-btn.send:hover { background: var(--blue-hover); }

.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-dim); }

.text-input,
.select {
  width: 100%; padding: 9px 11px;
  background: var(--bg-input); color: #fff;
  border: 1px solid transparent; border-radius: 6px;
  font-size: 14px;
}
.text-input::placeholder { color: #9aa0a7; }
.text-input:focus, .select:focus { border-color: var(--blue); outline: none; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #cfd3d8 50%), linear-gradient(135deg, #cfd3d8 50%, transparent 50%); background-position: calc(100% - 17px) 55%, calc(100% - 12px) 55%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-inline-end: 30px; }
[dir="rtl"] .select { background-position: 17px 55%, 12px 55%; background-image: linear-gradient(135deg, transparent 50%, #cfd3d8 50%), linear-gradient(45deg, #cfd3d8 50%, transparent 50%); padding-inline-end: 11px; padding-inline-start: 30px; }
.select option { background: var(--bg-elev); color: var(--text); }

.avatar-fallback {
  display: flex; align-items: center; justify-content: center;
  width: 64px; height: 64px; border-radius: 50%;
  background: #4b5563; color: #fff; font-size: 24px; font-weight: 600;
  user-select: none; flex: none;
}
.avatar {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: #4b5563; color: #fff; font-size: 13px; font-weight: 700; flex: none;
}

.meter { height: 8px; background: #2b2f36; border-radius: 4px; overflow: hidden; }
.meter-fill { height: 100%; width: 0%; background: var(--green); border-radius: 4px; transition: width .1s linear; }

.spinner-lg {
  width: 42px; height: 42px; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .18); border-top-color: var(--blue);
  animation: spin .9s linear infinite; margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ================================ toasts ================================ */

.toasts {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
  z-index: 400; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none; width: min(92vw, 560px);
}
.toast {
  padding: 10px 16px; border-radius: var(--radius);
  background: var(--bg-elev); color: var(--text);
  border: 1px solid var(--line); box-shadow: var(--shadow);
  font-size: 13.5px; animation: toast-in .18s ease-out;
}
.toast.ok { border-inline-start: 3px solid var(--green); }
.toast.err { border-inline-start: 3px solid var(--red); }
.toast.out { opacity: 0; transition: opacity .25s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } }

/* ================================ modals ================================ */

.modal {
  position: fixed; inset: 0; z-index: 300;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(0, 0, 0, .62);
}
.modal-card {
  width: min(680px, 100%); max-height: min(86vh, 900px);
  display: flex; flex-direction: column;
  background: var(--bg-elev); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); overflow: hidden;
}
.modal-card.sm { width: min(480px, 100%); }
.modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; border-bottom: 1px solid var(--line);
}
.modal-head h3 { font-size: 15.5px; display: flex; align-items: center; gap: 9px; }
.modal-body { padding: 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 18px; }
.modal-foot { padding: 12px 16px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; }

.settings-group { display: flex; flex-direction: column; gap: 10px; }
.settings-group h4 { font-size: 13.5px; color: var(--text-dim); font-weight: 600; text-transform: none; display: flex; align-items: center; gap: 8px; }
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13.5px; color: var(--text-dim); }
.settings-row .select { width: auto; min-width: 132px; }

.avatar-preview-row { display: flex; align-items: center; gap: 12px; }
.avatar-preview {
  display: flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--blue); color: #fff; font-size: 20px; font-weight: 700; flex: none;
}

.quality-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.quality-opt {
  display: flex; flex-direction: column; gap: 3px; align-items: flex-start;
  padding: 12px; background: #23262b; border: 1px solid var(--line);
  border-radius: var(--radius); color: var(--text); text-align: start;
  transition: border-color .15s, background .15s;
}
.quality-opt:hover { background: #292d33; }
.quality-opt.active { border-color: var(--blue); background: rgba(3, 118, 218, .16); }
.q-label { font-size: 14px; font-weight: 700; }
.q-sub { font-size: 11.5px; color: var(--text-dim); }
.quality-custom { display: flex; flex-direction: column; gap: 10px; padding-top: 6px; border-top: 1px solid var(--line); }
.qc-row { display: flex; gap: 12px; }
.qc-row label { flex: 1; display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--text-dim); }

.sec-hint { font-size: 12.5px; color: var(--text-faint); line-height: 1.7; }
.sec-group { padding-bottom: 4px; }
.sec-group h4 { color: var(--text); font-size: 14px; }
.sec-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.sec-status-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-dim); }
.sec-status { color: var(--green); font-weight: 700; }
.sec-status.off { color: var(--text-faint); }
.sec-badge { padding: 3px 10px; border-radius: 10px; background: #2b2f36; color: var(--text-dim); font-size: 12px; }
.sec-badge.on { background: rgba(46, 164, 79, .18); color: #6dd58c; }
.sec-switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13.5px; }
.sec-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-track { width: 40px; height: 22px; border-radius: 11px; background: #3a3f46; position: relative; transition: background .15s; flex: none; }
.switch-knob { position: absolute; top: 3px; inset-inline-start: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.sec-switch input:checked + .switch-track { background: var(--green); }
.sec-switch input:checked + .switch-track .switch-knob { transform: translateX(18px); }
[dir="rtl"] .sec-switch input:checked + .switch-track .switch-knob { transform: translateX(-18px); }

.sec-queue { display: flex; flex-direction: column; gap: 8px; }
.sec-queue-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; background: #23262b; border: 1px solid var(--line); border-radius: var(--radius);
}
.sec-queue-row .sq-name { flex: 1; font-size: 13.5px; }
.sec-queue-row .sq-actions { display: flex; gap: 4px; }

.lobby-wait-body { text-align: center; align-items: center; gap: 6px; }
.lobby-wait-body h3 { font-size: 16px; }
.lobby-wait-body p { color: var(--text-dim); font-size: 13.5px; }

.invite-hint { font-size: 13.5px; color: var(--text-dim); }
.invite-link-row { display: flex; gap: 8px; }
.invite-link-row .text-input { flex: 1; }
.invite-password { margin-top: 14px; }
.invite-pw-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

.conn-info-body { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.ci-peer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line); color: var(--text); font-weight: 600; }
.ci-state { font-weight: 400; font-size: 12px; color: var(--text-faint); }
.ci-row { display: flex; justify-content: space-between; gap: 10px; color: var(--text-dim); }
.ci-row b { color: var(--text); font-weight: 600; }

.stats-body { display: flex; flex-direction: column; gap: 10px; font-size: 13.5px; }
.stats-row { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 8px; padding: 9px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: #23262b; align-items: center; }
.stats-row.head { background: transparent; border-color: transparent; color: var(--text-faint); font-size: 12px; }
.stats-name { display: flex; align-items: center; gap: 8px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stats-cell { text-align: center; color: var(--text-dim); }
.stats-cell.good { color: #6dd58c; }
.stats-cell.warn { color: #f0c674; }

.sc-list { display: flex; flex-direction: column; gap: 2px; }
.sc-row { display: flex; align-items: center; gap: 14px; padding: 7px 4px; border-bottom: 1px solid rgba(255, 255, 255, .05); }
.sc-row:last-child { border-bottom: 0; }
.sc-row dt { width: 74px; flex: none; display: flex; gap: 4px; }
.sc-row dd { margin: 0; color: var(--text-dim); font-size: 13.5px; }

/* video effects (Jitsi "background") */
.bg-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.bg-opt {
  display: flex; flex-direction: column; gap: 8px; align-items: center;
  padding: 10px; background: #23262b; border: 1px solid var(--line);
  border-radius: var(--radius); color: var(--text); font-size: 13px;
}
.bg-opt:hover { background: #292d33; }
.bg-opt.active { border-color: var(--blue); background: rgba(3, 118, 218, .16); }
.bg-swatch { width: 100%; height: 56px; border-radius: var(--radius); background: linear-gradient(135deg, #6b7280, #374151); }
.bg-blur { background: repeating-linear-gradient(45deg, #4b5563, #4b5563 6px, #6b7280 6px, #6b7280 12px); filter: blur(1px); }
.bg-gray { background: linear-gradient(135deg, #e5e7eb, #6b7280); }
.bg-sepia { background: linear-gradient(135deg, #d6c39a, #7a6242); }
.bg-off { background: linear-gradient(135deg, #1f2937, #111827); }

/* ============================== context menu ============================= */

.ctx-menu {
  position: fixed; z-index: 320; min-width: 224px; padding: 6px;
  background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
.ctx-head { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.ctx-name { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctx-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 10px; background: transparent; border: 0; border-radius: var(--radius);
  color: var(--text); font-size: 13.5px; text-align: start;
}
.ctx-item:hover { background: var(--bg-hover); }
.ctx-item i { width: 16px; text-align: center; color: var(--text-dim); }
.ctx-item.warn { color: #f0c674; }
.ctx-item.warn i { color: #f0c674; }
.ctx-item.danger { color: #ff8b97; }
.ctx-item.danger i { color: #ff8b97; }
.rp-sep { height: 1px; background: var(--line); margin: 5px 2px; }

/* ============================== reactions =============================== */

.reactions-popup {
  position: fixed; z-index: 320; display: flex; align-items: center; gap: 4px;
  padding: 7px; background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: 24px; box-shadow: var(--shadow);
}
.reaction-emoji, .reaction-hand {
  width: 38px; height: 38px; border: 0; border-radius: 50%;
  background: transparent; font-size: 19px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.reaction-emoji:hover, .reaction-hand:hover { background: var(--bg-hover); }
.reaction-hand { color: var(--text); }
.burst { position: fixed; z-index: 330; font-size: 34px; pointer-events: none; animation: burst 1.4s ease-out forwards; }
@keyframes burst { 0% { opacity: 0; transform: translateY(0) scale(.6); } 15% { opacity: 1; } 100% { opacity: 0; transform: translateY(-140px) scale(1.35); } }

.react-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 7px; margin: 2px 3px 0 0;
  background: #2b2f36; border: 1px solid var(--line);
  border-radius: 11px; font-size: 12px; color: var(--text);
}
.react-chip.mine { border-color: var(--blue); background: rgba(3, 118, 218, .2); }
.rc-count { color: var(--text-dim); font-size: 11px; }

/* ============================== WELCOME ================================= */

.welcome { min-height: 100%; display: flex; flex-direction: column; background: #fff; color: var(--ink); }

.welcome-header {
  position: relative; overflow: hidden; color: #fff;
  background-color: var(--bg);
  background-image: linear-gradient(0deg, rgba(0, 0, 0, .2), rgba(0, 0, 0, .2)),
                    url("/images/welcome-bg.svg");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  padding: 16px clamp(16px, 4vw, 48px) 44px;
}
.wh-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.wh-tools { display: flex; align-items: center; gap: 10px; }
.wh-tool {
  display: inline-flex; align-items: center; gap: 7px;
  height: 34px; padding: 0 12px;
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--radius); color: #fff; font-size: 13px;
}
.wh-tool:hover { background: rgba(255, 255, 255, .2); }
.wh-status { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; background: rgba(0, 0, 0, .32); border-radius: var(--radius); font-size: 13px; color: #e6e7e9; }

.wh-hero { max-width: 720px; margin: clamp(36px, 7vh, 72px) auto 0; text-align: center; }
.wh-title { font-size: clamp(34px, 5.4vw, 42px); font-weight: 400; line-height: 1.2; color: #fff; }
.wh-sub { margin-top: 16px; font-size: clamp(17px, 2.4vw, 20px); font-weight: 600; line-height: 1.3; color: #fff; }

.wh-join { display: flex; gap: 10px; margin-top: 30px; }
.wh-join input {
  flex: 1; min-width: 0; height: 50px; padding: 0 14px;
  background: #fff; color: #000; border: 0; border-radius: var(--radius);
  font-size: 15px;
}
.wh-join input::placeholder { color: #767b82; }
.wh-start {
  height: 50px; padding: 0 22px;
  background: var(--blue-strong); color: #fff;
  border: 0; border-radius: 3px; font-size: 15px; font-weight: 600;
  transition: background .2s;
}
.wh-start:hover { background: var(--blue-hover); }
.wh-hint { margin-top: 14px; font-size: 13px; color: rgba(255, 255, 255, .78); }

.welcome-main { flex: 1; width: 100%; max-width: 1120px; margin: 0 auto; padding: 32px clamp(16px, 4vw, 48px) 8px; display: flex; flex-direction: column; gap: 28px; }

.welcome-card { border-radius: var(--radius-lg); overflow: hidden; }
.card-blue { background: var(--card-blue); color: var(--ink); }
.wc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px 8px; }
.wc-head h2 { font-size: 16px; font-weight: 700; }
.wc-clear { background: transparent; border: 0; color: #2b5fa8; font-size: 13px; font-weight: 600; padding: 4px 6px; border-radius: 4px; }
.wc-clear:hover { background: rgba(43, 95, 168, .12); }
.recent-list { padding: 6px 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.recent-empty { padding: 26px 16px; text-align: center; color: #40506b; font-size: 13.5px; line-height: 1.8; }
.recent-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: rgba(255, 255, 255, .62); border-radius: var(--radius); }
.recent-item .ri-code { font-weight: 700; font-size: 14px; direction: ltr; }
.recent-item .ri-time { color: #4b5b74; font-size: 12px; margin-inline-start: auto; }
.recent-item .ri-go { background: var(--blue-strong); color: #fff; border: 0; border-radius: 3px; padding: 7px 13px; font-size: 13px; font-weight: 600; }
.recent-item .ri-go:hover { background: var(--blue-hover); }
.recent-item .ri-copy { background: transparent; border: 1px solid rgba(19, 21, 25, .2); border-radius: 3px; width: 32px; height: 32px; color: var(--ink); }
.recent-item .ri-copy:hover { background: rgba(19, 21, 25, .07); }

.welcome-features .feat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
.feat-item {
  display: flex; gap: 13px; align-items: flex-start;
  padding: 16px; background: #fff; border: 1px solid #e4e7ec; border-radius: var(--radius-lg);
}
.feat-item i { font-size: 18px; color: var(--blue-strong); margin-top: 2px; }
.feat-item h3 { font-size: 14.5px; margin-bottom: 4px; }
.feat-item p { font-size: 13px; color: #5b6470; line-height: 1.7; }

.welcome-how { padding: 6px 0 12px; }
.welcome-how h2 { font-size: 17px; margin-bottom: 16px; }
.how-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.how-list li { display: flex; gap: 12px; align-items: flex-start; }
.how-num {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; flex: none; border-radius: 50%;
  background: var(--blue-strong); color: #fff; font-weight: 700; font-size: 14px;
}
.how-list h3 { font-size: 14.5px; margin-bottom: 3px; }
.how-list p { font-size: 13px; color: #5b6470; line-height: 1.7; }

.welcome-footer { margin-top: auto; background: var(--bg); color: #fff; padding: 26px clamp(16px, 4vw, 48px); }
.wf-row { max-width: 1120px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; font-size: 13px; color: #d7d9dc; }
.wf-brand { font-weight: 700; }
.wf-note { margin-inline-start: auto; color: var(--text-faint); }

/* =============================== PRE-JOIN =============================== */

.prejoin { position: fixed; inset: 0; z-index: 200; display: flex; background: var(--bg-stage); }
.pj-panel {
  width: min(400px, 100%); display: flex; flex-direction: column; gap: 22px;
  padding: 24px; background: var(--bg); border-inline-end: 1px solid var(--line);
  overflow-y: auto;
}
.pj-brand { align-self: flex-start; }
.pj-body { display: flex; flex-direction: column; gap: 14px; }
.pj-title { font-size: 21px; font-weight: 600; }
.pj-room { font-size: 14px; color: var(--text-dim); font-weight: 600; letter-spacing: .3px; word-break: break-all; }
.pj-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-dim); }
.pj-field input {
  height: 40px; padding: 0 12px;
  background: var(--bg-input); color: #fff;
  border: 1px solid transparent; border-radius: 6px; font-size: 14px;
}
.pj-field input:focus { border-color: var(--blue); outline: none; }
.pj-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.pj-join {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 44px;
  background: var(--blue-strong); color: #fff; border: 0; border-radius: var(--radius);
  font-size: 15px; font-weight: 600;
}
.pj-join:hover { background: var(--blue-hover); }
.pj-join-alt { background: transparent; border: 1px solid var(--line-strong); color: var(--text-dim); border-radius: var(--radius); height: 38px; font-size: 13.5px; }
.pj-join-alt:hover { background: var(--bg-hover); color: var(--text); }
.pj-toggles { display: flex; gap: 8px; }
.pj-toggle {
  width: var(--tool); height: var(--tool);
  display: flex; align-items: center; justify-content: center;
  background: #2b2f36; border: 0; border-radius: var(--radius);
  color: #fff; font-size: 17px;
}
.pj-toggle:hover { background: #343941; }
.pj-toggle.active { background: #3a4048; }
#pjMic:not(.active), #pjCam:not(.active) { background: var(--red); }
#pjMic:not(.active):hover, #pjCam:not(.active):hover { background: var(--red-hover); }
.pj-note { font-size: 12.5px; color: var(--text-faint); line-height: 1.7; }

.pj-preview { position: relative; flex: 1; display: flex; align-items: center; justify-content: center; background: var(--bg-stage); overflow: hidden; }
.pj-preview video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pj-avatar { width: 128px; height: 128px; font-size: 46px; background: #2f3339; }
.pj-preview-bar {
  position: absolute; bottom: 16px; inset-inline-start: 16px;
  display: flex; align-items: center; gap: 7px;
  padding: 6px 12px; border-radius: 14px;
  background: rgba(0, 0, 0, .55); color: #fff; font-size: 12.5px;
}
.pj-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); }

/* ============================== CONFERENCE ============================== */

.conference { position: fixed; inset: 0; display: flex; flex-direction: column; background: var(--bg-stage); }

.conf-header {
  height: var(--header-h); flex: none; z-index: 90;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 0 14px;
  background: rgba(19, 21, 25, .96);
  border-bottom: 1px solid var(--line);
}
.ch-left, .ch-right { display: flex; align-items: center; gap: 8px; min-width: 0; }
.conf-name {
  max-width: 30vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  background: transparent; border: 0; color: var(--text);
  font-size: 14.5px; font-weight: 700; letter-spacing: .2px;
  padding: 6px 8px; border-radius: var(--radius); direction: ltr;
}
.conf-name:hover { background: var(--bg-hover); }
.conf-meta { display: flex; align-items: center; gap: 6px; min-width: 0; }
.conf-people, .conf-timer, .conn-stats, .hands-indicator {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 10px;
  background: rgba(255, 255, 255, .07); border-radius: 15px;
  font-size: 12.5px; color: var(--text-dim);
}
.conf-people i, .conn-stats i, .hands-indicator i { font-size: 12px; }
.conn-detail { direction: ltr; }
.hands-indicator { background: rgba(217, 145, 20, .2); color: #f0c674; }
.host-badge { padding: 4px 10px; border-radius: 12px; background: rgba(3, 118, 218, .22); color: #8ec8ff; font-size: 12px; font-weight: 600; white-space: nowrap; }

.conf-body { flex: 1; display: flex; min-height: 0; }

/* --------------------------------- stage -------------------------------- */

.stage { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--bg-stage); }

.stage-area { position: relative; flex: 1; min-height: 0; }

.video-grid {
  position: absolute; inset: 0;
  display: grid; gap: 8px;
  /* the floating toolbox owns the bottom strip — name pills must stay above it */
  padding: 10px 10px 86px;
  /* --cols / --rows come from renderTileGrid: the stage divides evenly, like
     Jitsi's tile view, instead of one tile stretching across the whole width */
  grid-template-columns: repeat(var(--cols, 1), minmax(0, 1fr));
  grid-template-rows: repeat(var(--rows, 1), minmax(0, 1fr));
}

.video-tile, .pin-stage, .film-thumb {
  position: relative; overflow: hidden;
  background: #0d0e12; border-radius: 4px;
  /* a faint edge keeps every box readable against the black stage */
  border: 2px solid rgba(255, 255, 255, .07);
  min-width: 0; min-height: 0;
}
.video-tile.speaking, .pin-stage.speaking { border-color: #1ec26a; }
.video-tile.screen-tile, .pin-stage.screen-tile { background: #000; }
.video-tile video, .pin-stage video, .film-thumb video {
  width: 100%; height: 100%; object-fit: cover; display: block; background: #000;
}
/* shared content keeps its whole frame visible */
.video-tile.screen-tile video, .pin-stage.screen-tile video { object-fit: contain; }
.video-tile .avatar-fallback, .pin-stage .avatar-fallback {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: clamp(56px, 30%, 120px); height: auto; aspect-ratio: 1;
  font-size: clamp(22px, 8%, 42px); background: #2f3339;
}
.pin-stage { position: absolute; inset: 0; inset-inline-end: 176px; bottom: 78px; border-radius: 4px; }
.video-grid ~ .pin-stage { z-index: 5; }

.tile-label {
  position: absolute; bottom: 8px; inset-inline-start: 8px;
  display: flex; align-items: center; gap: 7px; max-width: calc(100% - 60px);
  padding: 4px 10px; border-radius: 12px;
  background: rgba(0, 0, 0, .55); color: #fff; font-size: 12.5px;
}
.tile-label span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-label .dot { width: 7px; height: 7px; flex: none; }
.spk-ico { display: none; font-size: 11px; color: var(--green); }
.video-tile.speaking .spk-ico, .pin-stage.speaking .spk-ico { display: inline-block; }

.tile-status { position: absolute; top: 8px; inset-inline-end: 8px; display: flex; gap: 6px; }
.st-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(0, 0, 0, .6); color: #fff; font-size: 12px;
}
.st-badge.st-muted { background: var(--red); }
.st-badge.st-hand { background: var(--amber); }
.st-badge.st-camoff { background: rgba(0, 0, 0, .62); color: #e9eaec; }
/* the mic state lives inside the name pill (Jitsi-style) */
.tile-label .st-muted { background: transparent; color: #ff98a3; font-size: 12px; }

.tile-actions { position: absolute; top: 8px; inset-inline-start: 8px; display: flex; gap: 4px; opacity: 0; transition: opacity .15s; }
.video-tile:hover .tile-actions, .pin-stage:hover .tile-actions { opacity: 1; }
.tile-actions .icon-btn { width: 28px; height: 28px; background: rgba(0, 0, 0, .55); border-radius: 50%; font-size: 12px; color: #fff; }
.tile-actions .icon-btn:hover { background: rgba(0, 0, 0, .8); }

.cam-off-hint {
  position: absolute; inset: 0; display: none; /* replaced by the corner badge */
  flex-direction: column;
  align-items: center; justify-content: center; gap: 8px;
  color: var(--text-faint); font-size: 13px; pointer-events: none;
}
.cam-off-hint i { font-size: 22px; }

/* filmstrip (vertical, Jitsi-style) */
.filmstrip {
  position: absolute; top: 8px; bottom: 86px; inset-inline-end: 8px;
  width: 160px; z-index: 6;
  display: flex; flex-direction: column; gap: 8px;
  overflow-y: auto; padding: 2px;
}
.film-thumb { flex: none; height: 96px; cursor: pointer; }
.film-thumb video { object-fit: cover; }
.film-thumb.selected { border-color: var(--blue); }
.film-thumb .thumb-avatar { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.film-thumb .avatar-fallback { position: static; transform: none; width: 44px; height: 44px; font-size: 17px; }
.thumb-label {
  position: absolute; bottom: 4px; inset-inline-start: 6px; right: 6px;
  display: flex; align-items: center; gap: 5px;
  font-size: 11.5px; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .8);
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.thumb-label .dot { width: 6px; height: 6px; }
.thumb-audio-off, .thumb-cam-off { position: absolute; top: 6px; inset-inline-end: 6px; color: var(--red-hover); font-size: 12px; background: rgba(0,0,0,.55); width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }

/* -------------------------------- toolbox ------------------------------- */

.stage-toolbar {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%);
  z-index: 80; max-width: calc(100% - 24px);
  display: flex; align-items: center; gap: 4px;
  padding: 6px; border-radius: 10px;
  background: rgba(19, 21, 25, .92);
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .45);
  overflow-x: auto; scrollbar-width: none;
}
.stage-toolbar::-webkit-scrollbar { display: none; }

.tool-btn {
  position: relative; flex: none;
  width: var(--tool); height: var(--tool);
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: 0; border-radius: var(--radius);
  color: #fff; font-size: 17px;
  transition: background .15s;
}
.tool-btn:hover { background: var(--bg-hover); }
.tool-btn.active { background: rgba(255, 255, 255, .16); }
.tool-btn.danger { color: var(--red-hover); }
.tool-btn.hangup { background: var(--red); }
.tool-btn.hangup:hover { background: var(--red-hover); }
.tool-btn.hangup:active { background: var(--red-active); }
#btnMic:not(.active), #dockMic:not(.active) { background: var(--red); }
#btnMic:not(.active):hover, #dockMic:not(.active):hover { background: var(--red-hover); }
#btnCam:not(.active), #dockCam:not(.active) { background: var(--red); }
#btnCam:not(.active):hover, #dockCam:not(.active):hover { background: var(--red-hover); }
.tool-btn .tab-badge { position: absolute; top: 5px; inset-inline-end: 5px; margin: 0; min-width: 16px; height: 16px; font-size: 10px; padding: 0 4px; }
.tool-btn.hand-raised { background: rgba(217, 145, 20, .3); color: #f0c674; }
.dock-btn.hand-raised { background: rgba(217, 145, 20, .3); color: #f0c674; }

.tool-sep { width: 1px; height: 26px; background: var(--line); margin: 0 5px; flex: none; }

/* --------------------------------- side --------------------------------- */

.side {
  width: 372px; flex: none; display: flex; flex-direction: column;
  background: var(--bg); border-inline-start: 1px solid var(--line);
  min-height: 0;
}
.side:not(.open) { display: none; }

.side-tabs { display: flex; align-items: center; gap: 4px; padding: 8px; border-bottom: 1px solid var(--line); }
.side-tab {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 12px; background: transparent; border: 0;
  border-radius: var(--radius); color: var(--text-dim); font-size: 13.5px;
}
.side-tab:hover { background: var(--bg-hover); color: var(--text); }
.side-tab.active { background: rgba(255, 255, 255, .10); color: var(--text); font-weight: 600; }
.side-close { margin-inline-start: auto; }

.tab-page { display: none; flex: 1; min-height: 0; flex-direction: column; }
.tab-page.active { display: flex; }

/* --------------------------------- chat --------------------------------- */

.chat-scroll { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.chat-empty { margin: auto; text-align: center; color: var(--text-faint); font-size: 13px; padding: 24px; line-height: 1.9; }
.chat-msg { max-width: 92%; padding: 8px 11px; background: #23262b; border-radius: 10px 10px 10px 3px; align-self: flex-start; }
.chat-msg.mine { align-self: flex-end; background: rgba(3, 118, 218, .22); border-radius: 10px 10px 3px 10px; }
.chat-msg.pm { border: 1px solid rgba(217, 145, 20, .5); }
.msg-head { display: flex; align-items: center; gap: 7px; margin-bottom: 3px; }
.msg-name { font-size: 12.5px; font-weight: 700; color: #8ec8ff; }
.chat-msg.mine .msg-name { color: #b6e0ff; }
.msg-time { font-size: 11px; color: var(--text-faint); margin-inline-start: auto; }
.msg-text { font-size: 13.5px; line-height: 1.75; word-break: break-word; white-space: pre-wrap; }
.msg-reply { font-size: 12px; color: var(--text-dim); background: rgba(255, 255, 255, .06); border-inline-start: 2px solid var(--blue); padding: 4px 8px; border-radius: 4px; margin-bottom: 5px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-tag { display: inline-flex; align-items: center; gap: 4px; padding: 1px 6px; border-radius: 8px; background: rgba(217, 145, 20, .22); color: #f0c674; font-size: 10.5px; }
.msg-reacts { display: flex; flex-wrap: wrap; margin-top: 5px; }
.msg-actions { display: none; gap: 3px; margin-top: 5px; }
.chat-msg:hover .msg-actions { display: flex; }
.msg-actions button { min-width: 26px; height: 24px; padding: 0 5px; background: rgba(255, 255, 255, .07); border: 0; border-radius: 5px; font-size: 12px; color: var(--text-dim); }
.msg-actions button:hover { background: rgba(255, 255, 255, .16); color: var(--text); }

.chat-replies, .chat-pm { display: flex; align-items: center; gap: 8px; margin: 0 12px; padding: 7px 10px; background: #23262b; border-radius: var(--radius); font-size: 12.5px; color: var(--text-dim); }
.chat-replies span, .chat-pm span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-recipient { display: flex; align-items: center; gap: 8px; padding: 8px 12px 0; color: var(--text-faint); }
.recipient-select { background: transparent; border: 0; color: var(--text-dim); padding: 4px 6px; background-image: none; }
.chat-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.chat-input input {
  flex: 1; min-width: 0; height: 38px; padding: 0 12px;
  background: #23262b; border: 1px solid transparent; border-radius: 19px;
  color: var(--text); font-size: 13.5px;
}
.chat-input input:focus { border-color: var(--blue); outline: none; }
.chat-input .icon-btn { width: 38px; height: 38px; border-radius: 50%; }

/* -------------------------------- people -------------------------------- */

.btn-invite { margin: 12px 12px 8px; }
.people-filter { margin: 0 12px 8px; height: 36px; padding: 0 12px; background: #23262b; border: 1px solid transparent; border-radius: 18px; color: var(--text); font-size: 13.5px; }
.people-filter:focus { border-color: var(--blue); outline: none; }
.people-scroll { flex: 1; overflow-y: auto; padding: 0 8px 8px; display: flex; flex-direction: column; gap: 2px; min-height: 0; }
.person { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--radius); }
.person:hover { background: rgba(255, 255, 255, .06); }
.p-name { flex: 1; min-width: 0; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-badge { margin-inline-start: 5px; font-size: 11.5px; color: var(--text-faint); }
.p-badge.off { color: var(--red-hover); }
.p-badge.share { color: #8ec8ff; }
.p-host { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 10px; background: rgba(3, 118, 218, .2); color: #8ec8ff; font-size: 11px; line-height: 1.5; white-space: nowrap; }
.p-host i { font-size: 11px; line-height: 1; }
.p-actions { display: flex; gap: 2px; opacity: 0; transition: opacity .15s; }
.person:hover .p-actions { opacity: 1; }
.p-actions .icon-btn { width: 30px; height: 30px; font-size: 13px; }
.btn-mute-all { margin: 8px 12px 12px; }

/* -------------------------------- polls --------------------------------- */

.polls-scroll { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 12px; }
.poll-card { background: #23262b; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 13px; }
.poll-q { font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.poll-opt {
  position: relative; display: flex; align-items: center; gap: 8px; width: 100%;
  margin-bottom: 7px; padding: 9px 12px;
  background: #2b2f36; border: 1px solid transparent; border-radius: var(--radius);
  color: var(--text); font-size: 13.5px; overflow: hidden; text-align: start;
}
.poll-opt:hover { background: #343941; }
.poll-opt.voted { border-color: var(--blue); }
.opt-fill { position: absolute; inset-block: 0; inset-inline-start: 0; background: rgba(3, 118, 218, .32); transition: width .3s; }
.opt-label { position: relative; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opt-pct { position: relative; font-size: 12px; color: var(--text-dim); font-weight: 700; }
.poll-meta { font-size: 11.5px; color: var(--text-faint); margin-top: 4px; }
.poll-create { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.poll-create > input, #pollOptions input { height: 36px; padding: 0 11px; background: #23262b; border: 1px solid transparent; border-radius: var(--radius); color: var(--text); font-size: 13.5px; }
.poll-create input:focus { border-color: var(--blue); outline: none; }
#pollOptions { display: flex; flex-direction: column; gap: 8px; }
.poll-actions { display: flex; gap: 8px; justify-content: space-between; }

/* ------------------------------- whiteboard ------------------------------ */

.wb-panel { position: absolute; inset: 0; z-index: 40; display: flex; flex-direction: column; background: #f4f5f7; }
.wb-tools {
  display: flex; align-items: center; gap: 6px; flex-wrap: nowrap;
  padding: 8px 10px; background: var(--bg); border-bottom: 1px solid var(--line);
  overflow-x: auto; scrollbar-width: thin;
}
.wb-group { display: flex; gap: 4px; }
.wb-tool {
  width: 34px; height: 34px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid transparent; border-radius: var(--radius);
  color: var(--text); font-size: 14px;
}
.wb-tool:hover { background: var(--bg-hover); }
.wb-tool.active { background: var(--blue); color: #fff; }
.wb-tool.danger { color: var(--red-hover); }
.wb-tool:disabled { opacity: .35; cursor: not-allowed; }
.wb-colors { display: flex; gap: 5px; align-items: center; }
.wb-color { width: 20px; height: 20px; flex: none; border-radius: 50%; background: var(--c); border: 2px solid rgba(255, 255, 255, .35); padding: 0; }
.wb-color.active { border-color: var(--blue); transform: scale(1.15); }
.wb-width { display: flex; align-items: center; gap: 7px; color: var(--text-dim); }
.wb-width input { width: 88px; accent-color: var(--blue); }
.wb-title { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; padding-inline-start: 10px; font-size: 13px; color: var(--text-dim); white-space: nowrap; }
.wb-live { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 10px; background: rgba(46, 164, 79, .16); color: #6dd58c; font-size: 11.5px; }
.wb-stage { position: relative; flex: 1; background: #fff; overflow: hidden; touch-action: none; }
.wb-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.wb-cursors { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.wb-cursor { position: absolute; display: flex; align-items: center; gap: 5px; transform: translate(-2px, -2px); will-change: transform; }
.wb-cursor i { font-size: 15px; color: #111827; filter: drop-shadow(0 1px 1px rgba(255,255,255,.8)); }
.wb-cursor-name { padding: 1px 7px; border-radius: 9px; background: var(--blue); color: #fff; font-size: 11px; font-weight: 600; white-space: nowrap; }

/* --------------------------------- media -------------------------------- */

.media-panel { position: absolute; inset: 0; z-index: 40; display: flex; flex-direction: column; background: var(--bg); }
.media-bar { display: flex; gap: 8px; padding: 10px; border-bottom: 1px solid var(--line); }
.media-input { flex: 1; height: 36px; padding: 0 12px; background: #23262b; border: 1px solid transparent; border-radius: var(--radius); color: var(--text); font-size: 13.5px; }
.media-input:focus { border-color: var(--blue); outline: none; }
.media-stage { position: relative; flex: 1; background: #000; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.media-stage video, .media-stage audio { width: 100%; height: 100%; object-fit: contain; }
.media-empty { text-align: center; color: var(--text-faint); padding: 30px; max-width: 460px; line-height: 1.9; }
.media-empty i { font-size: 40px; display: block; margin-bottom: 14px; opacity: .5; }
.media-controls { display: flex; align-items: center; gap: 12px; padding: 10px; border-top: 1px solid var(--line); }
.media-time { font-size: 12.5px; color: var(--text-dim); direction: ltr; }
.media-seek { flex: 1; accent-color: var(--blue); }
.media-hint { font-size: 12px; color: var(--amber); }

/* --------------------------------- dock --------------------------------- */

.dock { display: none; }
.dock-btn {
  position: relative; flex: 1; height: 52px;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: 0; color: #fff; font-size: 18px;
}
.dock-btn.active { background: rgba(255, 255, 255, .1); }
.dock-btn:not(.active) { background: var(--red); }
.dock-btn.danger { background: var(--red); }
.dock-btn .tab-badge { position: absolute; top: 6px; inset-inline-end: 22%; margin: 0; }

/* =============================== responsive ============================= */

@media (max-width: 1180px) {
  .side { width: 330px; }
  .pin-stage { inset-inline-end: 152px; }
  .filmstrip { width: 142px; }
}

@media (max-width: 960px) {
  .conf-meta .conn-detail, .conf-name { display: none; }
  .side { position: absolute; inset-block: 0; inset-inline-end: 0; z-index: 95; box-shadow: var(--shadow); }
  .stage-toolbar { bottom: 8px; gap: 2px; padding: 5px; }
  .tool-btn { width: 42px; height: 42px; font-size: 15px; }
  .tool-sep { margin: 0 3px; }
}

@media (max-width: 760px) {
  .prejoin { flex-direction: column; }
  .pj-panel { width: 100%; border-inline-end: 0; border-bottom: 1px solid var(--line); }
  .pj-preview { min-height: 40vh; }
  .wh-join { flex-direction: column; }
  .wh-start { width: 100%; }
  .stage-toolbar { display: none; }
  .dock { display: flex; background: var(--bg); border-top: 1px solid var(--line); }
  .pin-stage { inset-inline-end: 0; }
  .filmstrip { top: auto; bottom: 6px; inset-inline-end: 6px; width: auto; flex-direction: row; inset-inline-start: 6px; }
  .film-thumb { width: 104px; height: 66px; }
  .conf-header { padding: 0 8px; gap: 6px; }
  .conf-meta { gap: 4px; }
}

@media (max-width: 560px) {
  .conf-timer, .conf-people { display: none; }
  .quality-grid, .bg-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-row { grid-template-columns: 1.4fr repeat(2, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
