/* ── Reset & base ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Light mode (default) */
:root {
  --bg:           #ffffff;
  --surface:      #f5f5f5;
  --border:       #000000;
  --border-light: #e0e0e0;
  --text:         #000000;
  --text-sub:     #555555;
  --muted:        #888888;
  --btn-bg:       #000000;
  --btn-text:     #ffffff;
  --accent:       #4f8ef7;
  --green:        #16a34a;
  --yellow:       #ca8a04;
  --red:          #dc2626;
  --radius:       0px;
  --chat-w:       320px;
}

/* Dark vars shared between system preference and manual override */
@media (prefers-color-scheme: dark) {
  /* Only apply when user hasn't explicitly chosen light */
  :root:not([data-theme="light"]) {
    --bg:           #0a0a0a;
    --surface:      #111111;
    --border:       #f0f0f0;
    --border-light: #222222;
    --text:         #f0f0f0;
    --text-sub:     #888888;
    --muted:        #555555;
    --btn-bg:       #f0f0f0;
    --btn-text:     #000000;
    --green:        #22c55e;
    --yellow:       #f59e0b;
    --red:          #ef4444;
  }
}

/* Manual dark override (beats system preference in either direction) */
:root[data-theme="dark"] {
  --bg:           #0a0a0a;
  --surface:      #111111;
  --border:       #f0f0f0;
  --border-light: #222222;
  --text:         #f0f0f0;
  --text-sub:     #888888;
  --muted:        #555555;
  --btn-bg:       #f0f0f0;
  --btn-text:     #000000;
  --green:        #22c55e;
  --yellow:       #f59e0b;
  --red:          #ef4444;
}

/* Manual light override */
:root[data-theme="light"] {
  --bg:           #ffffff;
  --surface:      #f5f5f5;
  --border:       #000000;
  --border-light: #e0e0e0;
  --text:         #000000;
  --text-sub:     #555555;
  --muted:        #888888;
  --btn-bg:       #000000;
  --btn-text:     #ffffff;
  --green:        #16a34a;
  --yellow:       #ca8a04;
  --red:          #dc2626;
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
}

/* ── Buttons ──────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border: 1px solid var(--border-light);
  border-radius: var(--radius);
  font-size: 14px; font-weight: 500; cursor: pointer;
  transition: opacity .12s, background .12s;
  white-space: nowrap; background: transparent; color: var(--text);
}
.btn:hover:not(:disabled) { opacity: 0.75; }
.btn:disabled { opacity: .3; cursor: not-allowed; }

.btn-primary      { background: var(--btn-bg); color: var(--btn-text); border-color: var(--btn-bg); }
.btn-secondary    { background: transparent; color: var(--text); border-color: var(--border-light); }
.btn-ghost        { background: transparent; color: var(--muted); border-color: var(--border-light); }
.btn-danger-ghost { background: transparent; color: var(--red);   border-color: var(--border-light); }
.btn-call         { background: var(--green); color: #fff; border-color: var(--green); }
.btn-hangup       { background: var(--red);   color: #fff; border-color: var(--red); }
.btn-ctrl         { background: transparent; color: var(--text); border-color: var(--border-light); }
.btn-ctrl.active  { border-color: var(--red); color: var(--red); background: transparent; }

/* ── Lobby ────────────────────────────────────────────────────────── */
#lobby {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}

.lobby-card {
  width: 100%; max-width: 400px;
  display: flex; flex-direction: column; gap: 18px;
  background: transparent;
}

/* ── Logo ─────────────────────────────────────────────────────────── */
.logo-mark {
  display: flex; justify-content: center; margin-bottom: 8px;
}

/* SVG element colors adapt to light/dark */
.logo-wall  { fill: #111111; }
.logo-ledge { fill: #e2e2e2; }
.logo-brow  { stroke: #111111; }
.logo-text  { fill: #ffffff; }

/* System dark preference */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-wall  { fill: #000000; }
  :root:not([data-theme="light"]) .logo-ledge { fill: #2a2a2a; }
  :root:not([data-theme="light"]) .logo-brow  { stroke: #f0f0f0; }
}

/* Manual dark override */
:root[data-theme="dark"] .logo-wall  { fill: #000000; }
:root[data-theme="dark"] .logo-ledge { fill: #2a2a2a; }
:root[data-theme="dark"] .logo-brow  { stroke: #f0f0f0; }

/* Manual light override */
:root[data-theme="light"] .logo-wall  { fill: #111111; }
:root[data-theme="light"] .logo-ledge { fill: #e2e2e2; }
:root[data-theme="light"] .logo-brow  { stroke: #111111; }

/* Eye look-around animation */
@keyframes eyeGaze {
  0%   { transform: translate(0px,    0px);   }
  8%   { transform: translate(-2.5px, 0px);   }
  20%  { transform: translate(-2.5px, 0px);   }
  30%  { transform: translate(2.5px,  -2px);  }
  42%  { transform: translate(2.5px,  -2px);  }
  50%  { transform: translate(0px,    2.5px); }
  58%  { transform: translate(0px,    2.5px); }
  65%  { transform: translate(0px,    0px);   }
  82%  { transform: translate(0px,    0px);   }
  88%  { transform: translate(2.5px,  -1px);  }
  95%  { transform: translate(2.5px,  -1px);  }
  100% { transform: translate(0px,    0px);   }
}

/* Eye blink — scales eye vertically around its own centre */
@keyframes eyeBlink {
  0%, 84%, 100% { transform: scaleY(1);    }
  89%            { transform: scaleY(0.05); }
  94%            { transform: scaleY(1);    }
}

.eye-move {
  animation: eyeGaze 7s ease-in-out infinite;
}
.eye-blink-wrap {
  transform-box: fill-box;
  transform-origin: center;
  animation: eyeBlink 7s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .eye-move, .eye-blink-wrap { animation: none; }
}

/* ── Lobby typography ─────────────────────────────────────────────── */
.lobby-card .subtitle {
  font-size: 15px; color: var(--text-sub); line-height: 1.55;
}

/* Create room button */
.lobby-card .btn-primary {
  width: 100%; justify-content: center;
  padding: 15px; font-size: 15px; font-weight: 600;
}

/* Divider */
.divider {
  display: flex; align-items: center; gap: 12px;
  color: var(--muted); font-size: 12px;
}
.divider::before, .divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border-light);
}

/* Join row — input and button share a continuous border */
.join-row { display: flex; }
.join-row input {
  flex: 1;
  background: var(--bg); border: 1px solid var(--border-light);
  border-right: none; border-radius: 0;
  padding: 11px 13px; color: var(--text); font-size: 14px; outline: none;
  transition: border-color .15s;
}
.join-row input:focus { border-color: var(--border); }
.join-row .btn-secondary {
  border-left: none; padding: 11px 20px;
  font-weight: 600; border-color: var(--border-light);
}
.join-row .btn-secondary:hover { background: var(--surface); opacity: 1; }

.error-msg { color: var(--red); font-size: 13px; }

/* ── Room layout ──────────────────────────────────────────────────── */
#room { display: flex; flex-direction: column; height: 100vh; }

#topbar {
  display: flex; align-items: center; gap: 6px;
  padding: 0 14px;
  height: 46px;
  background: var(--bg); border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}
#room-label { color: var(--muted); font-size: 13px; }
#room-label strong { color: var(--text); font-family: monospace; font-size: 12px; letter-spacing: .3px; }
.tb-spacer { flex: 1; }

/* Topbar buttons — all same height, uniform */
.tb-btn {
  position: relative;
  display: inline-flex; align-items: center; gap: 5px;
  height: 32px; padding: 0 11px;
  border: 1px solid var(--border-light);
  background: transparent; color: var(--muted);
  font-size: 12px; font-weight: 500; cursor: pointer; white-space: nowrap;
  transition: color .12s, background .12s, border-color .12s;
}
.tb-btn:hover { color: var(--text); border-color: var(--border); }
.tb-btn.chat-open { background: var(--surface); border-color: var(--border); color: var(--text); }
.tb-btn-danger { color: var(--red); }
.tb-btn-danger:hover { background: var(--red); color: #fff; border-color: var(--red); }
/* Theme toggle sits in topbar as a tb-btn */
.theme-toggle-room { font-size: 12px; }

/* Status badge */
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 0;
  font-size: 12px; font-weight: 600; letter-spacing: .3px;
  border: 1px solid;
}
.badge-waiting      { border-color: var(--yellow); color: var(--yellow); }
.badge-connected    { border-color: var(--green);  color: var(--green);  }
.badge-disconnected { border-color: var(--red);    color: var(--red);    }

#main-content {
  display: flex; flex: 1; overflow: hidden;
}

/* ── Video panel ──────────────────────────────────────────────────── */
#video-panel {
  flex: 1; display: flex; flex-direction: column;
  background: #000; overflow: hidden;
}

#video-grid {
  flex: 1; position: relative; background: #000;
  display: flex; align-items: center; justify-content: center;
}

#remote-wrap {
  width: 100%; height: 100%; position: absolute; inset: 0;
}
#remote-video {
  width: 100%; height: 100%; object-fit: contain;
  background: #111;
}

/* Local video — picture-in-picture bottom-right */
#local-wrap {
  position: absolute; bottom: 12px; right: 12px;
  width: 180px; height: 120px;
  border: 1px solid rgba(255,255,255,.2); border-radius: 0; overflow: hidden;
  z-index: 10;
}
#local-video {
  width: 100%; height: 100%; object-fit: cover; background: #1a1a1a;
}

.video-label {
  position: absolute; bottom: 4px; left: 6px;
  font-size: 11px; color: rgba(255,255,255,.6);
  pointer-events: none;
}

/* ── Video overlay controls ───────────────────────────────────────── */
#video-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 32px 16px 12px;
  background: linear-gradient(transparent, rgba(0,0,0,0.70) 45%);
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: 8px;
  z-index: 11;
  opacity: 0; transform: translateY(4px);
  transition: opacity .2s ease, transform .2s ease;
  pointer-events: none;
}
#video-overlay.visible {
  opacity: 1; transform: translateY(0); pointer-events: all;
}

/* Overlay buttons — white-on-dark, frosted, uniform 34px tall */
.ov-btn {
  display: inline-flex; align-items: center; gap: 5px;
  height: 34px; padding: 0 13px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.10);
  color: rgba(255,255,255,.85);
  font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: background .12s, border-color .12s, color .12s;
}
.ov-btn:hover:not(:disabled) { background: rgba(255,255,255,.22); border-color: rgba(255,255,255,.45); color: #fff; }
.ov-btn:disabled { opacity: .3; cursor: not-allowed; }
/* Active = toggled state (muted, cam off) */
.ov-btn.active {
  background: rgba(220,38,38,.25); border-color: rgba(220,38,38,.55); color: #fca5a5;
}
.ov-btn.active:hover { background: rgba(220,38,38,.42); color: #fff; }

.ov-btn-call   { background: rgba(22,163,74,.25); border-color: rgba(22,163,74,.6);  color: #86efac; padding: 0 20px; }
.ov-btn-call:hover   { background: rgba(22,163,74,.45); color: #fff; }
.ov-btn-hangup { background: rgba(220,38,38,.25); border-color: rgba(220,38,38,.6);  color: #fca5a5; padding: 0 20px; }
.ov-btn-hangup:hover { background: rgba(220,38,38,.45); color: #fff; }

.ov-sep { width: 1px; height: 22px; background: rgba(255,255,255,.18); margin: 0 2px; align-self: center; }

.ov-lang {
  height: 34px; padding: 0 6px; font-size: 12px;
  background: rgba(255,255,255,.10); color: #fff;
  border: 1px solid rgba(255,255,255,.18); cursor: pointer;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.ov-lang option { background: #1a1a1a; color: #fff; }

/* ── Chat panel ───────────────────────────────────────────────────── */
#chat-panel {
  width: var(--chat-w); min-width: 0;
  display: flex; flex-direction: column;
  background: var(--bg); border-left: 1px solid var(--border-light);
  overflow: hidden;
  transition: width .22s cubic-bezier(.4,0,.2,1),
              border-color .22s;
}
#chat-panel.closed {
  width: 0;
  border-left-color: transparent;
}

/* ── Chat unread badge ────────────────────────────────────────────── */
.chat-badge {
  position: absolute; top: -5px; right: -5px;
  min-width: 16px; height: 16px;
  background: var(--red); color: #fff; border-radius: 0;
  font-size: 9px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; padding: 0 3px;
  border: 1.5px solid var(--bg);
  opacity: 0; transform: scale(0.5);
  transition: opacity .15s, transform .15s;
  pointer-events: none;
}
.chat-badge.visible { opacity: 1; transform: scale(1); }
@keyframes badgePop {
  0%   { transform: scale(0.5); }
  55%  { transform: scale(1.3); }
  100% { transform: scale(1);   }
}
.chat-badge.pop { animation: badgePop .18s ease; }

#chat-messages {
  flex: 1; overflow-y: auto; padding: 12px;
  display: flex; flex-direction: column; gap: 8px;
}

.msg {
  max-width: 85%;
  padding: 8px 11px;
  border-radius: 0;
  font-size: 14px; line-height: 1.45;
  word-break: break-word;
}
.msg-self {
  align-self: flex-end;
  background: var(--btn-bg); color: var(--btn-text);
}
.msg-remote {
  align-self: flex-start;
  background: transparent; color: var(--text);
  border: 1px solid var(--border-light);
}
.msg-system {
  align-self: center;
  background: transparent; color: var(--muted);
  font-size: 12px; font-style: italic;
}
.msg-time {
  display: block; font-size: 10px; margin-top: 3px;
  opacity: .55; text-align: right;
}

#chat-form {
  display: flex; gap: 0; padding: 10px;
  border-top: 1px solid var(--border-light);
}
#chat-input {
  flex: 1; background: var(--bg); border: 1px solid var(--border-light);
  border-right: none; border-radius: 0;
  padding: 8px 10px; color: var(--text); font-size: 14px; outline: none;
}
#chat-input:focus { border-color: var(--border); }
#btn-send { border-left: none; }

/* ── Lobby footer controls (language + theme toggle row) ──────────── */
.lobby-footer-controls {
  display: flex; gap: 8px; justify-content: center; align-items: center;
  align-self: stretch;
}

/* ── Lobby theme toggle ───────────────────────────────────────────── */
/* Lobby version — sits at the bottom of the lobby card, muted */
.theme-toggle-lobby {
  align-self: center;
  padding: 4px 10px; border: 1px solid var(--border-light);
  background: transparent; color: var(--muted);
  font-size: 12px; font-weight: 500; cursor: pointer;
  border-radius: 0; transition: color .15s, border-color .15s;
}
.theme-toggle-lobby:hover { color: var(--text); border-color: var(--border); }

/* ── Language selectors ───────────────────────────────────────────── */
.lang-select-lobby {
  padding: 4px 8px; border: 1px solid var(--border-light);
  background: transparent; color: var(--muted);
  font-size: 12px; font-weight: 500; cursor: pointer;
  border-radius: 0; outline: none;
  transition: color .15s, border-color .15s;
}
.lang-select-lobby:hover { color: var(--text); border-color: var(--border); }
.lang-select-lobby option { background: var(--bg); color: var(--text); }

.lang-select-room {
  height: 28px; padding: 0 6px;
  background: transparent; color: var(--muted);
  border: 1px solid var(--border-light);
  font-size: 12px; cursor: pointer;
  border-radius: 0; outline: none;
  transition: color .15s, border-color .15s;
}
.lang-select-room:hover { color: var(--text); border-color: var(--border); }
.lang-select-room option { background: var(--bg); color: var(--text); }

/* ── Lobby connecting overlay (Option B card takeover) ───────────── */

/* Hide form elements while connecting so the overlay has clear space */
.lobby-card.connecting #btn-create,
.lobby-card.connecting .divider,
.lobby-card.connecting .join-row,
.lobby-card.connecting #lobby-error { display: none; }

.lc-overlay {
  display: flex; flex-direction: column; align-items: center;
  gap: 18px; padding: 20px 0 4px; text-align: center;
}
.lc-overlay.hidden { display: none; }

@keyframes spinRing {
  to { transform: rotate(360deg); }
}
.lc-ring {
  width: 40px; height: 40px;
  border: 2px solid var(--border-light);
  border-top-color: var(--text);
  border-radius: 50%;
  animation: spinRing .75s linear infinite;
  flex-shrink: 0;
}

.lc-title {
  font-size: 15px; font-weight: 600;
}
.lc-sub {
  font-size: 13px; color: var(--text-sub); margin-top: 4px;
}
.lc-sub:empty { display: none; }

@keyframes lcHintFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: none; }
}
.lc-hint {
  font-size: 12px; color: var(--muted); line-height: 1.55;
  border: 1px solid var(--border-light); padding: 10px 14px;
  max-width: 280px; animation: lcHintFadeIn .3s ease;
}
.lc-hint.hidden { display: none; }

.lc-cancel {
  font-size: 12px; color: var(--muted);
  background: none; border: none; cursor: pointer; padding: 2px 0;
  text-decoration: underline; text-decoration-color: var(--border-light);
}
.lc-cancel:hover { color: var(--text); }

/* ── PIN modal ────────────────────────────────────────────────────── */
.pin-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,.55); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
}
.pin-card {
  background: var(--bg); border: 1px solid var(--border-light);
  padding: 32px 36px; display: flex; flex-direction: column;
  align-items: center; gap: 20px;
}
.pin-title { font-size: 15px; font-weight: 600; }
.pin-digits { display: flex; gap: 10px; }
.pin-digit {
  width: 44px; height: 56px; text-align: center;
  font-size: 22px; font-weight: 700;
  border: 1px solid var(--border-light); background: var(--bg);
  color: var(--text); border-radius: var(--radius); outline: none;
  transition: border-color .15s;
}
.pin-digit:focus { border-color: var(--border); }
.pin-error { color: var(--red); font-size: 13px; }

@keyframes pinShake {
  0%,100% { transform: translateX(0);   }
  20%      { transform: translateX(-8px); }
  40%      { transform: translateX(8px);  }
  60%      { transform: translateX(-6px); }
  80%      { transform: translateX(6px);  }
}
.pin-digits.shake { animation: pinShake .35s ease; }

/* ── Auth modal (TOTP) ──────────────────────────────────────────── */
.auth-card { min-width: 320px; max-width: 380px; }
.auth-input {
  width: 100%; padding: 11px 13px;
  background: var(--bg); border: 1px solid var(--border-light);
  color: var(--text); font-size: 15px; outline: none;
  transition: border-color .15s;
}
.auth-input:focus { border-color: var(--border); }
.auth-btn { width: 100%; justify-content: center; }

.auth-setup-instructions {
  font-size: 13px; color: var(--text-sub); line-height: 1.55; text-align: center;
}
.auth-setup-account {
  font-size: 13px; color: var(--muted); text-align: center;
}
.auth-setup-key-wrap {
  display: flex; align-items: center; gap: 0;
  border: 1px solid var(--border-light); background: var(--surface);
}
.auth-setup-key {
  flex: 1; padding: 10px 12px;
  font-family: monospace; font-size: 13px; letter-spacing: 1px;
  color: var(--text); word-break: break-all; user-select: all;
}
.auth-copy-btn {
  padding: 10px 14px; border: none; border-left: 1px solid var(--border-light);
  background: transparent; color: var(--muted); font-size: 12px;
  font-weight: 500; cursor: pointer; white-space: nowrap;
  transition: color .12s, background .12s;
}
.auth-copy-btn:hover { background: var(--bg); color: var(--text); }

/* TOTP digit inputs — reuse pin-digit sizing */
.totp-digit {
  width: 44px; height: 56px; text-align: center;
  font-size: 22px; font-weight: 700;
  border: 1px solid var(--border-light); background: var(--bg);
  color: var(--text); border-radius: var(--radius); outline: none;
  transition: border-color .15s;
}
.totp-digit:focus { border-color: var(--border); }

/* ── Leave confirmation modal ────────────────────────────────────── */
.leave-body {
  font-size: 13px; color: var(--text-sub);
  margin: 0 0 20px; line-height: 1.55; text-align: center; max-width: 260px;
}
.leave-btns { display: flex; gap: 10px; justify-content: center; }
.btn-danger { background: #c0392b; color: #fff; border-color: #c0392b; }
.btn-danger:hover { background: #a93226; border-color: #a93226; }
.re-countdown { font-size: 13px; color: var(--muted); margin: -12px 0 8px; }

/* ── Caption entries in chat panel ───────────────────────────────── */
.msg-caption-you,
.msg-caption-peer {
  font-style: italic; font-size: 12px; opacity: 0.8;
  padding: 2px 10px; line-height: 1.4; max-width: 100%;
}
.msg-caption-you  { color: var(--accent); align-self: flex-end;  text-align: right; }
.msg-caption-peer { color: var(--muted);  align-self: flex-start; text-align: left;  }
.msg-caption-label { font-weight: 600; font-style: normal; }
.msg-caption-live { border-left: 2px solid var(--border-light); padding-left: 8px; }


/* ── Fullscreen mode ─────────────────────────────────────────────── */
#video-panel:-webkit-full-screen,
#video-panel:fullscreen {
  display: flex;
  flex-direction: column;
  background: #000;
  width: 100vw;
  height: 100vh;
}
#video-panel:-webkit-full-screen #video-grid,
#video-panel:fullscreen #video-grid {
  flex: 1;
  min-height: 0;
}
#video-panel:-webkit-full-screen #remote-wrap,
#video-panel:fullscreen #remote-wrap {
  flex: 1;
  min-height: 0;
}
#video-panel:-webkit-full-screen #remote-wrap video,
#video-panel:fullscreen #remote-wrap video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ── Mic muted toast ──────────────────────────────────────────────── */
.mic-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  z-index: 50;
  pointer-events: none;
  animation: micToastFade 3.2s ease forwards;
}

@keyframes micToastFade {
  0%   { opacity: 0; transform: translateX(-50%) translateY(6px); }
  12%  { opacity: 1; transform: translateX(-50%) translateY(0);   }
  72%  { opacity: 1; }
  100% { opacity: 0; }
}

/* ── Utility ──────────────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ── Prevent iOS Safari auto-zoom on input/select focus ──────────── */
/* iOS zooms when focused element font-size < 16px                    */
@media (hover: none) {
  input, select { font-size: 16px !important; }
}

/* ── Responsive: stack on narrow screens ─────────────────────────── */
@media (max-width: 600px) {
  :root { --chat-w: 100%; }
  #main-content { flex-direction: column; }
  #local-wrap { width: 100px; height: 70px; }

  /* Chat panel: height-based slide on mobile */
  #chat-panel {
    width: 100%; border-left: none; border-top: 1px solid var(--border-light);
    height: 260px;
    transition: height .22s cubic-bezier(.4,0,.2,1), border-color .22s;
  }
  #chat-panel.closed { width: 100%; height: 0; border-top-color: transparent; }

  /* Topbar: compact — hide labels, keep room ID visible */
  #room-label { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #status-badge { display: none; }
  #btn-theme  { display: none; }
  .btn-label  { display: none; }

  /* Larger overlay button tap targets on mobile */
  .ov-btn { height: 40px; font-size: 18px; padding: 0 14px; }
  .ov-btn-call, .ov-btn-hangup { padding: 0 18px; }
  .ov-lang { height: 40px; font-size: 16px; }
}
