/* ═══════════════════════════════════════════
   LittleScreen — Room page (room.html)
   Per-type feature panes + chat split
   ═══════════════════════════════════════════ */

body.ls-page-room {
  height: 100vh;
  overflow: hidden;
  padding-top: 56px;
  /* 2026-05-25 — D reported the room chat input was hiding under the
     bottom toolbar. On room pages tools.js relocates #ls-room-saybar
     INTO the bottombar (avatar + chip + input), bumping its height from
     ~56px to ~98px. Override the shared --ls-page-bottom-offset (defined
     in lib-ticker.css and consumed by the room-body height calc) so the
     chat rail's send area lives ABOVE the bar, not behind it. Includes
     iOS safe-area for home-indicator devices. */
  --ls-page-bottom-offset: calc(108px + env(safe-area-inset-bottom, 0px));
  padding-bottom: calc(108px + env(safe-area-inset-bottom, 0px));
}

/* Header strip */
.room-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 10px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(0,0,0,.18);
}
.room-back {
  color: var(--muted);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-weight: 600;
}
.room-back:hover { color: var(--text); border-color: var(--accent); }
.room-header-info { display: flex; align-items: center; gap: 14px; min-width: 0; flex: 1; }
.room-header-icon {
  font-size: 2rem; line-height: 1;
  width: 50px; height: 50px;
  display: grid; place-items: center;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255,255,255,.04);
}
.room-header-meta { min-width: 0; }
.room-header-meta h1 {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-weight: 800;
  letter-spacing: -.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.room-header-actions { display: flex; gap: 8px; align-items: center; position: relative; }

/* People popover (anchored under the header on the right) */
.room-people-popover {
  position: absolute;
  top: calc(100% + 6px);
  right: 12px;
  width: min(320px, 92vw);
  max-height: 60vh;
  display: flex; flex-direction: column;
  background: rgba(14, 10, 22, .98);
  border: 1px solid rgba(120, 100, 220, .35);
  border-radius: 14px;
  box-shadow: 0 18px 36px -8px rgba(0,0,0,.6);
  z-index: 60;
  overflow: hidden;
}
.room-people-popover.hidden { display: none; }
.room-people-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.room-people-head strong { letter-spacing: .03em; }
.room-people-list {
  list-style: none; margin: 0; padding: 6px 8px;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 4px;
}
.room-people-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(255,255,255,.02);
}
.room-people-row:hover { background: rgba(255,255,255,.05); }
.room-people-pic {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.2);
  display: grid; place-items: center;
  font-size: 1rem;
  background-position: center;
}
.room-people-name {
  min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-size: .95rem;
}
.room-people-dm {
  white-space: nowrap;
  font-size: .78rem;
  padding: 6px 10px;
}
.room-people-empty { padding: 10px 14px; }
body.vr-mode .room-people-popover { width: min(420px, 96vw); }
body.vr-mode .room-people-row { grid-template-columns: 48px 1fr auto; }
body.vr-mode .room-people-pic { width: 48px; height: 48px; font-size: 1.3rem; }
body.vr-mode .room-people-name { font-size: 1.1rem; }
body.vr-mode .room-people-dm { font-size: .92rem; padding: 8px 14px; }
.room-rename-btn { margin-top: 4px; }

/* Body split */
/* 2026-05-25 — bumped bottombar reservation 56→108 to match the actual
   bar height once tools.js relocates #ls-room-saybar into it. */
.room-body {
  height: calc(100vh - 56px - 108px - 70px - env(safe-area-inset-bottom, 0px)); /* topnav + bottombar + header */
  display: grid;
  grid-template-columns: 1fr 360px;
  min-height: 0;
}
.room-feature {
  position: relative;
  background: var(--bg2);
  overflow: hidden;
}
.room-pane {
  position: absolute; inset: 0;
  display: none;
  overflow: auto;
  overflow-x: hidden;
  padding: 16px;
}
.room-pane.active { display: block; }
.room-pane[data-pane="canvas"] { padding: 0; }
.room-pane[data-pane="canvas"] .cc-canvas-wrap { position: absolute; inset: 0; }

/* ── YouTube pane ── */
.yt-wrap { display: flex; flex-direction: column; gap: 10px; height: 100%; width: 100%; max-width: 1100px; margin: 0 auto; min-width: 0; }
.yt-player-wrap {
  position: relative;
  background: #000;
  aspect-ratio: 16/9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}
#yt-player { width: 100%; height: 100%; }
/* Music room visualizer overlay */
.ls-music-viz {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0) 0%, rgba(0,0,0,.4) 100%);
}
.ls-music-viz canvas { width: 100%; height: 100%; display: block; }
.ls-music-viz .ls-viz-mode {
  position: absolute; bottom: 10px; right: 10px;
  pointer-events: auto;
  background: rgba(10,12,18,.7);
  color: #fff; border: 1px solid rgba(255,255,255,.2);
  font-size: .78rem; padding: 5px 10px; border-radius: 999px;
  cursor: pointer; backdrop-filter: blur(8px);
}
.ls-music-viz .ls-viz-mode:hover { background: rgba(10,12,18,.9); }
.yt-empty {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: var(--muted); padding: 20px;
  text-align: center;
}
.yt-now-row {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap;
}
#yt-now-title { flex: 1; min-width: 200px; }
.yt-sync-status {
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: .72rem;
  white-space: nowrap;
}
.yt-sync-status.warn {
  color: var(--danger);
  border-color: rgba(232,90,111,.45);
  background: rgba(232,90,111,.12);
}
.yt-vol-wrap {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 4px 8px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border);
  border-radius: 18px;
}
.yt-vol-wrap input { width: 92px; }
.yt-vol-wrap .vol-ic { font-size: .72rem; font-weight: 800; color: var(--muted); }
.yt-add-row {
  display: flex; gap: 8px;
  min-width: 0;
}
.yt-add-row input { flex: 1; min-width: 0; }
.yt-feedback {
  min-height: 18px;
  color: var(--accent);
  font-size: .8rem;
  font-weight: 700;
}
.yt-feedback:empty { display: none; }
.yt-search-presets {
  display: flex; gap: 8px; flex-wrap: wrap;
  align-items: center;
}
.yt-search-presets a {
  font-size: .8rem;
  color: var(--accent);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 12px;
  text-decoration: none;
}
.yt-search-presets a:hover { background: var(--accent-dim); }
.yt-queue { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 240px; overflow-y: auto; }
.yt-queue-item {
  display: grid; grid-template-columns: auto 1fr auto auto; gap: 10px; align-items: center;
  padding: 8px 12px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.yt-queue-pos { color: var(--muted); font-weight: 700; }
.yt-queue-title { font-weight: 600; }
.yt-vote-btn {
  background: var(--accent-dim); border: 1px solid var(--accent); color: var(--accent);
  font-weight: 800; padding: 6px 12px; border-radius: 8px;
  cursor: pointer; min-height: 36px;
}
.yt-vote-btn.voted { background: var(--accent); color: #1a0e05; }

/* Library picker (mp4) */
.yt-lib-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow-y: auto; }
.yt-lib-item {
  display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center;
  padding: 8px 10px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border); border-radius: 8px;
}
.yt-lib-meta { min-width: 0; }
.yt-lib-meta strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
video#yt-mp4-player { width: 100%; height: 100%; background: #000; display: block; }

/* ── Debate pane ── */
.debate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  max-width: 1100px; margin: 0 auto;
}
.debate-cell {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.debate-cell h3 { font-size: 1rem; margin-bottom: 0; }
.debate-timer-display {
  font-family: ui-monospace, 'SF Mono', Consolas, monospace;
  font-size: 3rem; font-weight: 800; text-align: center;
  letter-spacing: .04em;
  color: var(--accent);
  margin: 8px 0;
}
.debate-timer-display.warn { color: #ffd76b; animation: pulse .6s ease infinite alternate; }
.debate-timer-display.done { color: var(--danger); }
@keyframes pulse { from { transform: scale(1); } to { transform: scale(1.05); } }
.debate-timer-row {
  display: grid;
  grid-template-columns: minmax(72px, 92px) minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}
.debate-timer-row input {
  width: 100%;
  min-width: 0;
}
.debate-timer-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}
.debate-timer-actions .btn-accent,
.debate-timer-actions .btn-ghost {
  width: 100%;
  min-width: 0;
  white-space: nowrap;
}
/* 2026-05-06 — debate timer preset chips + auto-advance toggle. */
.debate-timer-presets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  margin: 6px 0 8px;
}
.debate-timer-presets .dt-chip {
  min-width: 0;
  padding: 5px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  color: var(--text, #f5ede8);
  font-family: ui-monospace, 'SF Mono', Consolas, monospace;
  font-weight: 700;
  font-size: .76rem;
  cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
}
.debate-timer-presets .dt-chip:hover {
  background: rgba(255,255,255,.10);
  border-color: var(--accent, #f0a050);
}
.debate-timer-presets .dt-chip.is-active {
  background: var(--accent, #f0a050);
  color: #1a0e05;
  border-color: var(--accent, #f0a050);
}
.debate-timer-auto {
  display: flex; align-items: center; gap: 6px;
  margin-top: 8px;
  font-size: .72rem;
  color: var(--muted, #a09098);
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}
.debate-timer-auto input { width: 14px; height: 14px; }
.debate-timer-auto:hover span { color: var(--text, #f5ede8); }
.debate-current-topic {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255,255,255,.03);
}
.debate-current-topic strong {
  min-width: 0;
  line-height: 1.35;
  word-break: break-word;
}
.debate-current-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.debate-add-row { display: flex; gap: 6px; margin-bottom: 10px; }
.debate-add-row input { flex: 1; min-width: 0; }
.hand-list, .topic-list, .source-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.hand-item, .topic-item, .source-item {
  display: grid; gap: 8px; align-items: center;
  padding: 8px 10px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.hand-item { grid-template-columns: auto 1fr auto auto; }
.hand-pos { background: var(--accent); color: #1a0e05; border-radius: 50%; width: 28px; height: 28px; display: grid; place-items: center; font-weight: 800; font-size: .85rem; }
.hand-offline {
  margin-left: 6px;
  color: var(--danger);
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
}
.debate-followup-block {
  display: grid;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.followup-list .hand-pos {
  background: rgba(255,255,255,.12);
  color: var(--accent);
  border: 1px solid rgba(255,255,255,.10);
}
.topic-item { grid-template-columns: auto 1fr auto; }
.topic-vote-btn {
  background: var(--accent-dim); border: 1px solid var(--accent); color: var(--accent);
  border-radius: 8px; padding: 5px 10px; min-height: 32px;
  font-weight: 800; cursor: pointer; font-size: .85rem;
}
.topic-vote-btn.voted { background: var(--accent); color: #1a0e05; }
.source-item { grid-template-columns: 1fr auto; }
.source-item a { color: var(--accent); word-break: break-all; }

/* Discuss grid */
.discuss-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  max-width: 1100px; margin: 0 auto;
}

/* Games */
.game-tabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.game-tab {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 700; color: var(--muted);
  cursor: pointer;
}
.game-tab.active { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }
.game-pane { display: none; max-width: 900px; margin: 0 auto; }
.game-pane.active { display: block; }
.trivia-row, .geo-row, .topic-rou-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.trivia-card, .geo-card, .topic-rou-card { padding: 18px; font-size: 1.05rem; line-height: 1.5; }
.trivia-card-big {
  padding: 28px;
  font-size: 1.4rem;
  line-height: 1.5;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}
.geo-card img {
  width: 100%; max-height: 360px; object-fit: cover;
  border-radius: 10px; margin-bottom: 8px;
}
.trivia-fullscreen { padding: 30px 16px; max-width: 900px; margin: 0 auto; }

/* Open / blank rooms */
.open-banner {
  max-width: 720px; margin: 0 auto;
  padding: 18px;
}

/* Room chat (right panel) */
.room-chat {
  display: flex; flex-direction: column;
  border-left: 1px solid var(--border);
  background: rgba(0,0,0,.2);
  min-height: 0;
}
.room-chat-head {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.room-chat-log {
  flex: 1; min-height: 0; overflow-y: auto;
  list-style: none; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 8px;
}
.room-chat-msg {
  display: grid; grid-template-columns: auto 1fr; gap: 8px;
  padding: 8px 10px;
  background: rgba(255,255,255,.03);
  border-radius: 10px;
  border: 1px solid var(--border);
}
.room-chat-msg .ic { font-size: 1.15rem; }
.room-chat-msg .nm { font-weight: 700; font-size: .85rem; }
.room-chat-msg .tx { color: var(--text); word-break: break-word; }
.room-chat-msg .tt { font-size: .68rem; color: var(--muted); margin-left: 6px; }
.room-chat-form {
  display: grid; grid-template-columns: 1fr auto; gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--border);
}

/* Mobile */
@media (max-width: 760px) {
  .room-body { grid-template-columns: 1fr; grid-template-rows: 1fr 280px; }
  .room-chat { border-left: none; border-top: 1px solid var(--border); }
  .room-pane { padding: 10px; }
  .yt-now-row { gap: 6px; display: grid; grid-template-columns: 1fr; }
  #yt-now-title { min-width: 0; }
  .yt-vol-wrap { width: max-content; max-width: 100%; }
  .yt-add-row { display: grid; grid-template-columns: 1fr; }
  .yt-add-row button { width: 100%; }
  .yt-queue-item { grid-template-columns: auto 1fr; }
  .yt-queue-item button { min-width: 0; }
  .yt-lyrics-head { align-items: flex-start; }
  .yt-lyrics-tools { justify-content: flex-start; }
  .debate-timer-display { font-size: 2.2rem; }
  .debate-grid { grid-template-columns: 1fr; max-width: 100%; }
  .debate-timer-row,
  .debate-timer-actions,
  .debate-add-row { grid-template-columns: 1fr; }
  .debate-timer-actions { display: grid; }
  .debate-timer-presets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .debate-add-row { display: grid; }
  .hand-item { grid-template-columns: auto 1fr; }
  .hand-item button { grid-column: 1 / -1; width: 100%; }
  body.ls-room-karaoke .yt-wrap,
  body.ls-room-music .yt-wrap,
  body.ls-room-theater .yt-wrap,
  body.ls-room-karaoke .room-pane[data-pane="youtube"],
  body.ls-room-music .room-pane[data-pane="youtube"],
  body.ls-room-theater .room-pane[data-pane="youtube"] {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box;
  }
  body.ls-room-karaoke .yt-add-row,
  body.ls-room-music .yt-add-row,
  body.ls-room-theater .yt-add-row {
    display: grid !important;
    grid-template-columns: 1fr !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }
  body.ls-room-karaoke .yt-add-row #yt-input,
  body.ls-room-music .yt-add-row #yt-input,
  body.ls-room-theater .yt-add-row #yt-input {
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* VR mode */
body.vr-mode .room-pane { font-size: 1.05rem; }
body.vr-mode .room-header-meta h1 { font-size: 1.7rem; }
body.vr-mode .yt-add-row input { font-size: 1.05rem; }
body.vr-mode .room-chat-msg .tx { font-size: 1.05rem; }
body.vr-mode .debate-timer-display { font-size: 4rem; }

/* ── Karaoke lyrics panel ── */
.yt-lyrics-panel {
  margin-top: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.yt-lyrics-panel.hidden { display: none; }
.yt-lyrics-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(255,112,208,.08);
  border-bottom: 1px solid var(--border);
}
.yt-lyrics-head h4 { font-size: 1rem; }
.yt-lyrics-tools {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.yt-lyrics-font {
  background: rgba(255,255,255,.06);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 6px;
  min-height: 34px;
  min-width: 96px;
  font-size: .85rem;
}
.yt-lyrics-autoscroll {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  color: var(--muted);
  font-size: .8rem;
  min-height: 34px;
}
.yt-lyrics-display {
  font-family: ui-monospace, 'SF Mono', Consolas, monospace;
  white-space: pre-wrap;
  padding: 16px 18px;
  margin: 0;
  font-size: var(--lyrics-size, 1.1rem);
  line-height: 1.7;
  max-height: 320px;
  overflow-y: auto;
  color: var(--text);
}
body.vr-mode .yt-lyrics-display { font-size: var(--lyrics-size, 1.45rem); line-height: 1.65; }
.yt-lyrics-display.empty { color: var(--muted); font-style: italic; }
.yt-lyrics-edit { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--border); }
.yt-lyrics-edit.hidden { display: none; }
.yt-lyrics-edit input { padding: 10px 12px; border-radius: 8px; }
.yt-lyrics-edit textarea {
  min-height: 200px; resize: vertical;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 10px 12px;
  font-family: ui-monospace, monospace;
}
.yt-lyrics-edit-row { display: flex; gap: 6px; flex-wrap: wrap; }

/* ════════════ HUB DOORS (sub-room picker) — v2.5 ════════════ */
.hub-doors-wrap {
  padding: 18px;
  position: relative;
  /* Holds the bg video underneath the doors grid */
  overflow: hidden;
  border-radius: 16px;
  min-height: 420px;
}
.hub-bg-video {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: .55;
  filter: brightness(.65) saturate(1.1);
  pointer-events: none;
}
.hub-doors-wrap > .hub-doors-head,
.hub-doors-wrap > .hub-doors {
  position: relative;
  z-index: 1;
}
.hub-doors-head { margin-bottom: 14px; }
.hub-doors-head h2 {
  margin: 0 0 4px;
  font-size: 1.4rem;
  text-shadow: 0 2px 12px rgba(0,0,0,.7);
}
.hub-doors-head p { text-shadow: 0 1px 6px rgba(0,0,0,.6); }
/* Body class set by room.js renderHub() — gives the chat panel a slightly
   warmer hub-vibe accent so it's clear you can chat here just like the lobby */
body.is-hub .room-chat {
  border-left-color: rgba(120,80,200,.32);
}
body.is-hub .room-chat-head h3::after {
  content: ' (hub lobby)';
  color: var(--muted);
  font-weight: 400;
  font-size: .8rem;
}
.hub-doors {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 600px) { .hub-doors { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .hub-doors { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1400px) { .hub-doors { grid-template-columns: repeat(4, 1fr); } }
.hub-door {
  position: relative;
  display: block;
  min-height: 150px;
  padding: 0;
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: var(--fg, #fff);
  background: linear-gradient(135deg, var(--tile-color, #555) 0%, rgba(20,18,28,.95) 60%);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 4px 18px rgba(0,0,0,.35);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  isolation: isolate;
}
.hub-door::before {
  content: '';
  position: absolute; inset: 0;
  background-image: var(--art-img, none);
  background-size: cover;
  background-position: center;
  opacity: .35;
  z-index: 0;
  transition: opacity .25s ease, transform .4s ease;
}
.hub-door:hover { transform: translateY(-2px); border-color: var(--tile-color, #888); box-shadow: 0 8px 24px rgba(0,0,0,.5); }
.hub-door:hover::before { opacity: .55; transform: scale(1.04); }
.hub-door-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  z-index: 1;
  transition: opacity .35s ease;
  pointer-events: none;
}
.hub-door-video.playing { opacity: .55; }
.hub-door-inner {
  position: relative; z-index: 2;
  padding: 14px;
  display: flex; flex-direction: column;
  height: 100%;
  background: linear-gradient(to top, rgba(0,0,0,.65) 0%, rgba(0,0,0,.15) 50%, rgba(0,0,0,0) 100%);
}
.hub-door-head {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 6px;
}
.hub-door-icon { font-size: 1.4rem; line-height: 1; }
.hub-door-name { font-size: 1.05rem; flex: 1; min-width: 0; }
.hub-door-badge {
  font-size: .7rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255,200,0,.22);
  color: #ffd966;
  border: 1px solid rgba(255,200,0,.3);
  white-space: nowrap;
}
.hub-door-badge.open {
  background: rgba(80,200,120,.22);
  color: #7ce0a0;
  border-color: rgba(80,200,120,.35);
}
.hub-door-desc {
  margin: 0 0 auto;
  font-size: .82rem;
  color: rgba(255,255,255,.78);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hub-door-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 10px;
  font-size: .8rem;
  color: rgba(255,255,255,.85);
}
.hub-door-cta { font-weight: 600; color: var(--tile-color, #fff); }
.hub-door.full { opacity: .55; pointer-events: none; }
.hub-door.full .hub-door-cta { color: #c66; }

/* VR mode: bigger touch targets & text for headset use */
body.vr-mode .hub-doors { grid-template-columns: repeat(2, 1fr); gap: 22px; }
body.vr-mode .hub-door { min-height: 220px; }
body.vr-mode .hub-door-name { font-size: 1.5rem; }
body.vr-mode .hub-door-desc { font-size: 1.05rem; -webkit-line-clamp: 3; }
body.vr-mode .hub-door-foot { font-size: 1rem; }
body.vr-mode .hub-door-badge { font-size: .9rem; padding: 4px 12px; }

/* Phone: stack tighter, taller cards so video reads */
@media (max-width: 599px) {
  .hub-doors-wrap { padding: 12px; }
  .hub-door { min-height: 170px; }
  .hub-door-desc { -webkit-line-clamp: 3; }
}

@media (prefers-reduced-motion: reduce) {
  .hub-door, .hub-door::before, .hub-door-video { transition: none; }
  .hub-door-video { display: none; }
}

/* HOME tile: HUB badge */
.home-tile-hub-badge {
  font-size: .62rem; font-weight: 700; letter-spacing: .08em;
  padding: 2px 7px; border-radius: 999px;
  background: rgba(255,255,255,.14);
  color: rgba(255,255,255,.85);
  margin-left: auto;
}

/* ════════════════════════════════════════════════════════════════
   v2.6 — Karaoke 2-col, font picker, per-user volume,
   roster panel, voice/STT buttons, bio
   ════════════════════════════════════════════════════════════════ */

/* ── Karaoke 2-column layout (video left, lyrics column right) ── */
body.is-karaoke .yt-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.9fr);
  grid-template-areas:
    "player   lyrics"
    "now      lyrics"
    "addrow   lyrics"
    "presets  lyrics"
    "queue    lyrics";
  gap: 12px;
  max-width: 1400px;
  align-items: start;
}
body.is-karaoke .yt-player-wrap { grid-area: player; }
body.is-karaoke .yt-now-row     { grid-area: now; }
body.is-karaoke .yt-add-row     { grid-area: addrow; }
body.is-karaoke .yt-search-presets { grid-area: presets; }
body.is-karaoke .yt-queue, body.is-karaoke #yt-queue-empty { grid-area: queue; }
body.is-karaoke .yt-lyrics-panel {
  grid-area: lyrics;
  margin-top: 0;
  position: sticky;
  top: 12px;
  align-self: start;
  max-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
}
body.is-karaoke .yt-lyrics-display {
  flex: 1;
  max-height: none;
  min-height: min(360px, calc(100vh - 280px));
}
@media (max-width: 900px){
  body.is-karaoke .yt-wrap {
    grid-template-columns: 1fr;
    grid-template-areas: "player" "now" "lyrics" "addrow" "presets" "queue";
  }
  body.is-karaoke .yt-lyrics-panel { position: static; max-height: 60vh; }
}
@media (max-width: 700px){
  .yt-add-row { flex-wrap: wrap; }
  .yt-add-row input { flex-basis: 100%; }
  .yt-now-row { align-items: flex-start; }
  #yt-now-title { flex-basis: 100%; min-width: 0; }
  .yt-vol-wrap { flex: 1 1 160px; }
  .yt-vol-wrap input { width: 100%; }
  .yt-lyrics-head { align-items: flex-start; flex-direction: column; }
  .yt-lyrics-tools { justify-content: flex-start; }
}

/* ── Lyrics font presets ── */
.yt-lyrics-display.font-sans   { font-family: 'Inter','Segoe UI',system-ui,sans-serif; }
.yt-lyrics-display.font-serif  { font-family: 'Georgia','Cambria',serif; }
.yt-lyrics-display.font-mono   { font-family: ui-monospace,'SF Mono',Consolas,monospace; }
.yt-lyrics-display.font-display{ font-family: 'Bebas Neue','Oswald','Impact',sans-serif; letter-spacing:.04em; }
.yt-lyrics-display.font-hand   { font-family: 'Caveat','Comic Sans MS',cursive; line-height:1.45; }

.yt-vol-wrap input[type=range] {
  width: 110px; accent-color: var(--accent, #ffd76b);
}

/* ── Karaoke library modal ── */
.kl-card { max-width: 720px; }
.kl-search-wrap { display: flex; gap: 6px; align-items: center; }
.kl-search-wrap input {
  background: rgba(255,255,255,.06);
  border: 1px solid var(--border); color: var(--text);
  padding: 6px 10px; border-radius: 8px; font-size: .9rem;
  width: 220px;
}
.kl-cats {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
}
.kl-cat {
  background: rgba(255,255,255,.05); color: var(--text);
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 4px 10px;
  font-size: .85rem;
  cursor: pointer;
}
.kl-cat.active { background: var(--accent, #ffd76b); color: #000; }
.kl-list {
  max-height: 50vh; overflow-y: auto;
  padding: 8px 14px;
  display: flex; flex-direction: column; gap: 4px;
}
.kl-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  background: rgba(255,255,255,.03);
  border-radius: 8px;
}
.kl-row:hover { background: rgba(255,255,255,.07); }
.kl-row .kl-meta { flex: 1; }
.kl-row .kl-title { font-weight: 600; }
.kl-row .kl-artist { font-size: .85rem; color: var(--muted); }
.kl-hint { padding: 0 14px 12px; }

/* ── Roster slide-out panel ── */
.roster-panel {
  position: fixed; top: 0; right: 0;
  height: 100vh;
  width: min(380px, 92vw);
  background: var(--card, #1a1622);
  border-left: 1px solid var(--border);
  z-index: 5000;
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .25s ease;
  box-shadow: -10px 0 30px rgba(0,0,0,.4);
}
.roster-panel.open { transform: translateX(0); }
.roster-panel.hidden { display: none; }
.roster-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.roster-head h3 { margin: 0; font-size: 1.05rem; }
.roster-list {
  list-style: none; margin: 0; padding: 8px;
  flex: 1; overflow-y: auto;
  display: flex; flex-direction: column; gap: 6px;
}
.roster-item {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 12px;
  background: rgba(255,255,255,.04);
  border-radius: 10px;
  border-left: 3px solid var(--accent, #ffd76b);
}
.roster-item.is-host { border-left-color: gold; }
.roster-item.is-self { background: rgba(255,215,107,.08); }
.roster-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
  background: rgba(0,0,0,.3);
}
.roster-info { flex: 1; min-width: 0; }
.roster-name { font-weight: 600; font-size: .95rem; }
.roster-host-tag { color: gold; font-size: .75rem; margin-left: 4px; }
.roster-bio { font-size: .8rem; color: var(--muted); line-height: 1.35;
  overflow: hidden; text-overflow: ellipsis; }
.roster-actions { display: flex; gap: 4px; margin-top: 4px; }
.roster-actions button { font-size: .75rem; padding: 2px 8px; }
.roster-empty { padding: 14px; text-align: center; }

/* ── Voice/STT buttons in chat form ── */
.stt-btn, .voice-rec-btn {
  position: relative;
  font-size: 1rem;
  padding: 6px 10px;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}
.stt-btn.listening {
  background: linear-gradient(120deg, #ff5577, #ffaa44);
  color: #fff;
  animation: stt-pulse 1.2s ease-in-out infinite alternate;
}
@keyframes stt-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255,85,119,.5); }
  100% { box-shadow: 0 0 0 8px rgba(255,85,119,0); }
}
.voice-rec-btn.recording {
  background: #d92626; color: #fff;
  animation: voice-rec-pulse 0.8s ease-in-out infinite alternate;
}
.voice-rec-btn.unsupported {
  opacity: 0.35; cursor: not-allowed;
}
@keyframes voice-rec-pulse {
  0%   { transform: scale(1.0); }
  100% { transform: scale(1.08); }
}
.voice-rec-timer { font-size: .7rem; margin-left: 4px; }

/* ── Voice messages in chat log ── */
.voice-msg-bubble {
  display: inline-flex; gap: 6px; align-items: center;
  background: rgba(255,255,255,.06);
  border-radius: 18px;
  padding: 4px 12px;
  margin-top: 2px;
}
.vm-play-btn {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--accent, #ffd76b); color: #000;
  border: none;
  font-size: .8rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.voice-msg-dur { font-size: .8rem; color: var(--muted); }

/* ── Roster open button in chat header ── */
.room-chat-roster-btn,
.room-chat-settings-btn {
  font-size: .8rem; padding: 3px 8px;
}

.room-settings-card { width: min(520px, 94vw); }
.room-settings-form { display: flex; flex-direction: column; gap: 10px; }
.room-setting-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255,255,255,.04);
}
.room-setting-row strong { display: block; }
.room-setting-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.35;
}
.room-setting-row input {
  width: 22px;
  height: 22px;
  accent-color: var(--accent);
}
.room-settings-note { margin: 2px 0 0; }

/* ════════════════════════════════════════════════════════════════
   v2.7 — DMs, Live voice broadcast, Pictionary
   ════════════════════════════════════════════════════════════════ */

/* ── DM modal ── */
.dm-card { max-width: 600px; height: 70vh; display: flex; flex-direction: column; }
.dm-head-actions { display: flex; gap: 6px; align-items: center; }
.dm-body { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.dm-inbox {
  list-style: none; margin: 0; padding: 8px;
  flex: 1; overflow-y: auto;
  display: flex; flex-direction: column; gap: 4px;
}
.dm-inbox-item {
  display: flex; gap: 10px; align-items: center;
  padding: 10px 12px;
  background: rgba(255,255,255,.04);
  border-radius: 10px;
  cursor: pointer;
  border: 1px solid transparent;
}
.dm-inbox-item:hover { background: rgba(255,255,255,.08); }
.dm-inbox-item.unread { border-color: var(--accent, #ffd76b); }
.dm-inbox-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.3); font-size: 1.3rem; flex-shrink: 0;
}
.dm-inbox-meta { flex: 1; min-width: 0; }
.dm-inbox-name { font-weight: 600; }
.dm-inbox-preview { font-size: .8rem; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-inbox-badge {
  background: var(--accent, #ffd76b); color: #000;
  border-radius: 10px; padding: 1px 7px;
  font-size: .75rem; font-weight: 700;
}
.dm-inbox-empty { padding: 14px; text-align: center; }

.dm-thread-wrap { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.dm-thread {
  list-style: none; margin: 0; padding: 10px 14px;
  flex: 1; overflow-y: auto;
  display: flex; flex-direction: column; gap: 6px;
}
.dm-bubble {
  max-width: 75%;
  padding: 7px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,.07);
  word-wrap: break-word;
}
.dm-bubble.is-mine {
  align-self: flex-end;
  background: var(--accent, #ffd76b); color: #000;
}
.dm-bubble .dm-time { display: block; font-size: .7rem; opacity: .65; margin-top: 2px; }
.dm-form {
  display: flex; gap: 6px; padding: 8px 14px;
  border-top: 1px solid var(--border);
}
.dm-form input {
  flex: 1;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--border); color: var(--text);
  padding: 7px 12px; border-radius: 18px; font-size: .9rem;
}

/* DM button on roster card */
.roster-actions .roster-dm-btn { font-size: .75rem; padding: 2px 8px; }

/* Inbox unread badge on chat-head DM count (future) */
.room-chat-roster-btn .roster-unread {
  background: var(--accent, #ffd76b);
  color: #000;
  border-radius: 9px;
  padding: 0 5px;
  margin-left: 3px;
  font-size: .7rem;
  font-weight: 700;
}

/* ── Live voice broadcast ── */
.room-chat-live-btn {
  font-size: .8rem; padding: 3px 8px;
}
.room-chat-live-btn.broadcasting {
  background: #d92626; color: #fff;
  animation: live-voice-pulse 1.4s ease-in-out infinite alternate;
}
.room-chat-live-btn.listening {
  background: rgba(217,38,38,.25); color: #ffaaaa;
}
@keyframes live-voice-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(217,38,38,.6); }
  100% { box-shadow: 0 0 0 10px rgba(217,38,38,0); }
}

.live-voice-pill {
  position: fixed;
  bottom: 80px; left: 50%;
  transform: translateX(-50%);
  background: rgba(217,38,38,0.95); color: #fff;
  border-radius: 24px;
  padding: 8px 16px;
  display: flex; gap: 10px; align-items: center;
  font-size: .85rem;
  box-shadow: 0 4px 16px rgba(0,0,0,.4);
  z-index: 4500;
}
.live-voice-pill.hidden { display: none; }
.lvp-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #fff;
  animation: live-voice-blink 1s ease-in-out infinite alternate;
}
@keyframes live-voice-blink {
  0%   { opacity: 1; }
  100% { opacity: 0.3; }
}
.lvp-mute-btn { background: transparent; border: 1px solid rgba(255,255,255,.4); color: #fff; }

/* ── Pictionary ── */
.pic-banner { padding: 12px 14px; }
.pic-status-row {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  margin-bottom: 8px;
}
.pic-word-row {
  display: flex; gap: 8px; align-items: baseline;
  margin: 8px 0;
}
.pic-word {
  font-size: 1.6rem;
  font-family: ui-monospace, 'SF Mono', Consolas, monospace;
  letter-spacing: .15em;
  color: var(--accent, #ffd76b);
  font-weight: 600;
}
.pic-word.is-secret {
  color: #fff;
  background: linear-gradient(120deg, #6b3a8a, #d6549a);
  padding: 4px 12px;
  border-radius: 6px;
}
.pic-word.is-revealed {
  color: #ffaa55;
  text-decoration: line-through;
  text-decoration-color: rgba(255,255,255,.35);
}
.pic-actions-row {
  display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px;
}
.pic-scores {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.pic-score-chip {
  display: inline-flex; gap: 6px; align-items: center;
  background: rgba(255,255,255,.06);
  border-radius: 14px;
  padding: 3px 10px;
  font-size: .85rem;
}
.pic-score-chip.is-drawer { background: rgba(255,215,107,.15); border: 1px solid var(--accent, #ffd76b); }
.pic-score-chip .pic-pts { font-weight: 700; color: var(--accent, #ffd76b); }
#pic-timer-pill.warn { background: #d92626; color: #fff; }

/* Guess chat msg highlight */
.room-chat-msg.is-correct {
  background: rgba(255,215,107,.12);
  border-left: 3px solid var(--accent, #ffd76b);
  padding-left: 8px;
}

/* ═══════════════════════════════════════════
   ROOM SAY-BAR (lib-saybar.js mounted here, ls-2.43)
   Fixed-bottom strip mirroring the lobby say-bar so users can chat
   without opening the side rail.
   ═══════════════════════════════════════════ */
.ls-room-saybar-wrap {
  position: fixed;
  left: 50%;
  bottom: 78px; /* sits above bottombar (~70px) + safe-area */
  transform: translateX(-50%);
  width: min(640px, calc(100vw - 24px));
  z-index: 30;
  pointer-events: auto;
}
.ls-room-saybar-wrap .ls-saybar {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 8px 10px;
  background: rgba(20, 14, 28, .85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 999px;
  box-shadow: 0 6px 24px rgba(0,0,0,.45);
}
.ls-room-saybar-wrap .ls-saybar-input {
  flex: 1;
  min-width: 0;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 999px;
  color: var(--ink, #f5ede8);
  padding: 8px 14px;
  font-size: max(16px, 1rem);
}
.ls-room-saybar-wrap .ls-saybar-input:focus {
  outline: none;
  border-color: var(--accent, #ffd76b);
  background: rgba(255,255,255,.07);
}
.ls-room-saybar-wrap .ls-say-mode-btn,
.ls-room-saybar-wrap .ls-say-mic-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,.10);
  color: var(--ink, #f5ede8);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: .9rem;
  cursor: pointer;
  white-space: nowrap;
}
.ls-room-saybar-wrap .ls-say-mode-btn:hover,
.ls-room-saybar-wrap .ls-say-mic-btn:hover {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.20);
}
.ls-room-saybar-wrap .ls-say-mic-btn.active {
  background: rgba(255, 60, 60, .25);
  border-color: rgba(255, 60, 60, .65);
  color: #ffe0e0;
}
@media (max-width: 720px) {
  .ls-room-saybar-wrap { bottom: 80px; width: calc(100vw - 16px); }
  .ls-room-saybar-wrap .ls-saybar { padding: 6px 8px; gap: 4px; }
}
body.chrome-hidden .ls-room-saybar-wrap { bottom: 16px; }
body.vr-mode .ls-room-saybar-wrap { width: min(820px, calc(100vw - 24px)); }

/* Collaborative Canvas Empty State */
.cc-canvas-empty-state {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  pointer-events: none; /* Let events fall through to the canvas */
  z-index: 3;
  transition: opacity 0.25s ease, visibility 0.25s;
  opacity: 1;
  visibility: visible;
}
.cc-canvas-empty-state.hidden {
  opacity: 0;
  visibility: hidden;
}
.cc-empty-card {
  background: rgba(20, 12, 18, 0.94);
  border: 1px solid rgba(120, 100, 220, 0.4);
  border-radius: 18px;
  padding: 24px;
  max-width: 380px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.cc-empty-icon {
  font-size: 3rem;
  display: inline-block;
  margin-bottom: 12px;
  animation: ccFloat 4s ease-in-out infinite;
}
.cc-empty-card h3 {
  margin: 0 0 10px 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent, #a78bfa);
}
.cc-empty-card p {
  margin: 0 0 16px 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text, #f5ede8);
}
.cc-empty-tip {
  font-size: 0.78rem;
  color: var(--muted, #a09098);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 12px;
}

@keyframes ccFloat {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
  100% { transform: translateY(0px); }
}

/* Art Studio UX pass: make the draw controls feel docked to the user toolbar,
   and keep the room chat rail usable even when the global toolbar chat exists. */
body.ls-page-room .cc-toolbar {
  left: 12px !important;
  right: calc(360px + 24px) !important;
  bottom: calc(58px + env(safe-area-inset-bottom, 0px)) !important;
  width: auto !important;
  max-width: none !important;
  transform: translateY(calc(100% + 18px)) !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 7px 10px !important;
  border-radius: 16px 16px 0 0 !important;
  border-color: rgba(255,255,255,.13) !important;
  border-bottom-color: transparent !important;
  background:
    linear-gradient(180deg, rgba(44, 34, 48, .96), rgba(24, 16, 28, .94)) !important;
  box-shadow: 0 -18px 40px rgba(0,0,0,.44), inset 0 1px 0 rgba(255,255,255,.08) !important;
}
body.ls-page-room .cc-toolbar.open,
body.ls-page-room.draw-dock-open .cc-toolbar {
  transform: translateY(0) !important;
}
body.ls-page-room .cc-tool {
  min-width: 42px !important;
  min-height: 38px !important;
  padding: 5px 9px !important;
  border-radius: 11px !important;
  font-size: .86rem !important;
  font-weight: 850 !important;
  letter-spacing: 0 !important;
  background: rgba(255,255,255,.045) !important;
  border-color: rgba(255,255,255,.08) !important;
}
body.ls-page-room .cc-tool:hover {
  background: rgba(255,255,255,.09) !important;
  border-color: rgba(255,255,255,.18) !important;
}
body.ls-page-room .cc-tool.active {
  background: linear-gradient(180deg, rgba(126, 227, 202, .22), rgba(96, 169, 255, .16)) !important;
  border-color: rgba(126, 227, 202, .7) !important;
  color: #eafff9 !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 0 18px rgba(79, 221, 187, .18) !important;
}
body.ls-page-room .cc-color-row {
  align-items: center !important;
  gap: 4px !important;
  padding: 4px 6px !important;
  border: 1px solid rgba(255,255,255,.08) !important;
  border-radius: 999px !important;
  background: rgba(0,0,0,.16) !important;
}
body.ls-page-room .cc-color {
  width: 25px !important;
  height: 25px !important;
  box-shadow: 0 0 0 1px rgba(0,0,0,.42), inset 0 0 0 1px rgba(255,255,255,.12) !important;
}
body.ls-page-room .cc-color.active {
  transform: scale(1.08) !important;
  border-color: #fff !important;
  box-shadow: 0 0 0 2px rgba(126,227,202,.55), 0 0 14px rgba(126,227,202,.24) !important;
}
body.ls-page-room .cc-size-row {
  min-width: min(170px, 20vw) !important;
  padding: 5px 8px !important;
  border: 1px solid rgba(255,255,255,.08) !important;
  border-radius: 999px !important;
  background: rgba(0,0,0,.16) !important;
}
body.ls-page-room .cc-size-row input[type="range"] {
  width: min(110px, 12vw) !important;
}
body.ls-page-room .cc-tool-sep {
  height: 24px !important;
  margin: 0 2px !important;
  background: rgba(255,255,255,.13) !important;
}
body.ls-page-room .cc-settings-pop {
  bottom: calc(100% + 10px);
  top: auto;
  right: 10px;
}
body.ls-page-room .cc-toolbar.open ~ .pg-startbar {
  bottom: 150px;
}
body.ls-page-room #bb-draw-btn.active {
  background: rgba(126, 227, 202, .14);
  border-color: rgba(126, 227, 202, .48);
}

body.ls-page-room.ls-chat-via-toolbar .room-chat #room-chat-form {
  position: static !important;
  left: auto !important;
  width: auto !important;
  height: auto !important;
  overflow: visible !important;
  pointer-events: auto !important;
  opacity: 1 !important;
}
body.ls-page-room .room-chat {
  background:
    linear-gradient(180deg, rgba(12, 12, 14, .96), rgba(8, 8, 9, .98));
}
body.ls-page-room .room-chat-head {
  min-height: 58px;
  padding: 12px 16px 10px;
  background: rgba(255,255,255,.025);
}
body.ls-page-room .room-chat-head h3 {
  font-size: 1.04rem;
  letter-spacing: 0;
}
body.ls-page-room #room-chat-info {
  padding: 4px 9px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 999px;
  background: rgba(255,255,255,.04);
}
body.ls-page-room .room-chat-log {
  padding: 14px 12px;
  gap: 9px;
  scrollbar-width: thin;
}
body.ls-page-room .room-chat-log:empty::before {
  content: "No messages yet.";
  display: grid;
  place-items: center;
  min-height: 120px;
  color: var(--muted);
  border: 1px dashed rgba(255,255,255,.12);
  border-radius: 14px;
  background: rgba(255,255,255,.025);
}
body.ls-page-room .room-chat-msg {
  grid-template-columns: 34px 1fr;
  gap: 9px;
  padding: 10px 11px;
  border-radius: 14px;
  border-color: rgba(255,255,255,.09);
  background: rgba(255,255,255,.045);
  box-shadow: 0 10px 22px rgba(0,0,0,.16);
}
body.ls-page-room .room-chat-msg.is-mine {
  margin-left: auto;
  width: min(88%, 295px);
  border-color: rgba(126, 227, 202, .36);
  background: linear-gradient(180deg, rgba(50, 93, 90, .34), rgba(29, 37, 42, .48));
}
body.ls-page-room .room-chat-msg .ic {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  font-size: .95rem;
  overflow: hidden;
}
body.ls-page-room .room-chat-msg .ic.has-pic {
  background-size: cover;
  background-position: center;
}
body.ls-page-room .room-chat-msg .nm {
  padding: 0;
  border: 0;
  background: transparent;
  font-size: .76rem;
  line-height: 1.15;
  max-width: 150px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: baseline;
}
body.ls-page-room .room-chat-msg .tt {
  margin-left: 4px;
  font-size: .66rem;
}
body.ls-page-room .room-chat-msg .tx {
  margin-top: 3px;
  line-height: 1.34;
  font-size: .9rem;
}
body.ls-page-room .room-chat .ls-quick-reply {
  padding: 6px 8px;
  background: rgba(0,0,0,.34);
  border-color: rgba(255,255,255,.08);
}
body.ls-page-room .room-chat .ls-qr-btn {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  font-size: 1.05rem;
  background: rgba(255,255,255,.055);
}
body.ls-page-room .room-chat-form {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 10px;
  background: rgba(255,255,255,.025);
}
body.ls-page-room .room-chat-form input {
  min-width: 0;
  min-height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.055);
  color: var(--text);
  padding: 9px 12px;
}
body.ls-page-room .room-chat-form input:focus {
  outline: none;
  border-color: rgba(126, 227, 202, .68);
  box-shadow: 0 0 0 3px rgba(126, 227, 202, .14);
}
body.ls-page-room .room-chat-form button {
  min-height: 42px;
  border-radius: 14px;
  padding-inline: 14px;
}

@media (max-width: 980px) {
  body.ls-page-room .cc-toolbar {
    right: calc(360px + 24px) !important;
    justify-content: flex-start !important;
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    scrollbar-width: thin;
  }
  body.ls-page-room .cc-color-row,
  body.ls-page-room .cc-size-row {
    flex: 0 0 auto;
  }
  body.ls-page-room .cc-toolbar.open ~ .pg-startbar {
    display: none;
  }
  body.ls-page-room .cc-size-row {
    min-width: 140px !important;
  }
  body.ls-page-room .cc-size-row input[type="range"] {
    width: 86px !important;
  }
}
@media (max-width: 760px) {
  body.ls-page-room .room-body {
    height: calc(100vh - 56px - 56px - 112px);
    grid-template-rows: minmax(128px, 1fr) minmax(108px, 30vh);
  }
  body.ls-page-room .room-chat-head {
    min-height: 34px;
    padding: 7px 10px;
  }
  body.ls-page-room .room-chat-head h3 {
    font-size: .9rem;
  }
  body.ls-page-room #room-chat-info {
    padding: 2px 7px;
  }
  body.ls-page-room .room-chat-log {
    padding: 6px 8px;
    gap: 5px;
  }
  body.ls-page-room .room-chat-log:empty::before {
    display: none;
  }
  body.ls-page-room .room-chat .ls-quick-reply {
    display: none;
  }
  body.ls-page-room .room-chat-form {
    padding: 7px 8px;
  }
  body.ls-page-room .room-chat-form input,
  body.ls-page-room .room-chat-form button {
    min-height: 38px;
  }
  body.ls-page-room .cc-toolbar {
    position: absolute !important;
    left: 8px !important;
    right: 8px !important;
    bottom: 8px !important;
    justify-content: flex-start !important;
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    scrollbar-width: none;
  }
  body.ls-page-room .cc-toolbar::-webkit-scrollbar {
    display: none;
  }
  body.ls-page-room .cc-tool {
    min-width: 38px !important;
    min-height: 36px !important;
    padding: 5px 8px !important;
  }
  body.ls-page-room .cc-color-row,
  body.ls-page-room .cc-size-row {
    flex: 0 0 auto;
  }
  body.ls-page-room .cc-toolbar.open ~ .pg-startbar {
    display: none;
  }
}
@media (max-width: 760px) and (max-height: 620px) {
  body.ls-page-room .room-chat-form {
    transform: translateY(-24px);
    margin-top: -24px;
  }
}

/* 2026-05-24 re-audit refinements: make mobile canvas and karaoke controls
   scan cleanly instead of crowding the stage. */
@media (max-width: 760px) {
  body.ls-page-room .cc-toolbar {
    flex-wrap: wrap !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    align-content: center !important;
    max-height: 150px !important;
    gap: 5px !important;
    padding: 7px !important;
  }
  body.ls-page-room .cc-tool-sep {
    display: none !important;
  }
  body.ls-page-room .cc-tool {
    flex: 1 0 52px !important;
    min-width: 0 !important;
    font-size: .75rem !important;
    padding: 5px 6px !important;
  }
  body.ls-page-room #cc-undo,
  body.ls-page-room #cc-clear,
  body.ls-page-room #cc-settings-btn {
    flex-basis: 68px !important;
  }
  body.ls-page-room .cc-color-row {
    order: 2;
    flex: 1 1 100%;
    justify-content: center !important;
  }
  body.ls-page-room .cc-size-row {
    order: 3;
    flex: 1 1 100%;
    min-width: 0 !important;
  }
  body.ls-page-room .cc-size-row input[type="range"] {
    width: 100% !important;
  }

  body.is-karaoke .yt-wrap {
    gap: 8px;
    grid-template-areas:
      "player"
      "now"
      "addrow"
      "lyrics"
      "presets"
      "queue";
  }
  body.is-karaoke .yt-player-wrap {
    aspect-ratio: 16 / 9;
    min-height: 168px;
    max-height: 240px;
  }
  body.is-karaoke .yt-now-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
  }
  body.is-karaoke #yt-now-title {
    grid-column: 1 / -1;
    min-width: 0;
  }
  body.is-karaoke .yt-vol-wrap {
    width: 100%;
  }
  body.is-karaoke .yt-add-row {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }
  body.is-karaoke .yt-add-row #yt-input {
    grid-column: 1 / -1;
  }
  body.is-karaoke .yt-add-row button {
    width: 100%;
    min-height: 38px;
    padding-inline: 8px;
    white-space: nowrap;
  }
  body.is-karaoke .yt-lyrics-panel {
    max-height: none;
    border-radius: 14px;
  }
  body.is-karaoke .yt-lyrics-head {
    gap: 8px;
  }
  body.is-karaoke .yt-lyrics-tools {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) repeat(2, auto);
    gap: 6px;
  }
  body.is-karaoke .yt-lyrics-autoscroll,
  body.is-karaoke #yt-lyrics-edit-btn {
    grid-column: span 2;
  }
  body.is-karaoke .yt-lyrics-display {
    min-height: 148px;
    max-height: 34vh;
  }
  body.is-karaoke .yt-search-presets {
    max-height: 72px;
    overflow: auto;
    padding-bottom: 2px;
    scrollbar-width: thin;
  }
}

/* ─────────────────────────────────────────────────────────────────
   2026-05-25 — Debate room GUI condensation (D ask: "more cohesive
   and compact"). Original styles still load above; this block is
   the last word so it wins on specificity-equal rules.
   Goals:
     · Less white-space, tighter info density
     · Timer display shrinks when idle, expands when running
     · 2-column grid on desktop (was 4× sparse cards)
     · Unified card chrome (eyebrow heading, .ls-card-eyebrow vibe)
     · Empty states de-emphasized so signal stands out
   Tested at 800×1280 (preview default) + 1440×900 (desktop).
───────────────────────────────────────────────────────────────── */

/* 1. Grid: 2 cols on med+, denser gap, drop max-width to use width */
.debate-grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 10px;
  max-width: 100%;
  padding: 0 4px;
}

/* 2. Cards: tighter padding + uniform vertical rhythm */
.debate-cell {
  gap: 8px;
  padding: 12px 14px;
}
.debate-cell h3 {
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted, #a0909a);
  font-weight: 700;
  margin: 0 0 2px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

/* 3. Inputs: tighter */
.debate-cell input,
.debate-cell textarea,
.debate-cell select {
  padding: 6px 9px !important;
  font-size: .88rem !important;
}

/* 4. Timer display: compact when idle (00:00), grows when active.
   Uses .is-running set by room.js when start fires. We don't add JS
   for it — when "Idle" is shown, the display shows "--:--" + a
   modest size. When a round is running we let the existing
   .warn/.done states bring back attention.  */
.debate-timer-display {
  font-size: 1.6rem;
  margin: 2px 0 4px;
  letter-spacing: .02em;
  opacity: .65;
}
.debate-timer-display:not([data-state="idle"]):not(:empty),
.debate-timer-display.warn,
.debate-timer-display.done {
  font-size: 2.4rem;
  opacity: 1;
}

/* 5. Presets: single 6-col row */
.debate-timer-presets {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 3px;
  margin: 4px 0 6px;
}
.debate-timer-presets .dt-chip {
  padding: 4px 4px;
  font-size: .7rem;
}

/* 6. Timer row + actions: condensed */
.debate-timer-row { gap: 6px; }
.debate-timer-actions { gap: 6px; }
.debate-timer-actions .btn-accent,
.debate-timer-actions .btn-ghost {
  padding: 5px 10px;
  font-size: .82rem;
}
.debate-timer-auto {
  font-size: .68rem;
  margin-top: 4px;
  gap: 5px;
}
.debate-timer-auto input { width: 13px; height: 13px; }
#debate-status {
  margin-top: 2px;
  font-size: .68rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  opacity: .7;
}

/* 7. Speaker Queue: Raise Hand + Queue Follow-up on one row, tighter */
.debate-cell #hand-raise {
  width: 100%;
  padding: 8px 12px;
  font-weight: 700;
}
.debate-followup-block {
  padding-top: 6px;
  gap: 6px;
}
.debate-followup-block #followup-raise {
  width: 100%;
}
.hand-list, .topic-list, .source-list { gap: 4px; }
.hand-item, .topic-item, .source-item {
  padding: 5px 8px;
  font-size: .85rem;
}
.hand-pos { width: 22px; height: 22px; font-size: .72rem; }

/* 8. Empty-state hints: small + italic + faded — present but quiet */
.hand-empty, .topic-empty, .source-empty,
#followup-empty {
  font-style: italic;
  font-size: .72rem;
  opacity: .55;
  margin: 2px 0 0;
}

/* 9. Topic Picker: current-topic block tighter */
.debate-current-topic {
  padding: 8px 10px;
  gap: 4px;
  font-size: .9rem;
}
.debate-current-topic strong {
  font-size: .98rem;
}
.debate-current-actions {
  gap: 4px;
}
.debate-current-actions .btn-ghost {
  padding: 4px 9px;
  font-size: .74rem;
}

/* 10. Add-row: tighter, smaller add button */
.debate-add-row {
  gap: 5px;
  margin-bottom: 6px;
}
.debate-add-row .btn-accent {
  padding: 5px 12px;
  font-size: .82rem;
  white-space: nowrap;
}

/* 11. Mobile: keep 1 col, shrink presets to 3×2 */
@media (max-width: 720px) {
  .debate-grid { grid-template-columns: 1fr; gap: 8px; padding: 0; }
  .debate-cell { padding: 10px 12px; }
  .debate-timer-display { font-size: 1.4rem; }
  .debate-timer-display:not([data-state="idle"]):not(:empty),
  .debate-timer-display.warn,
  .debate-timer-display.done {
    font-size: 2rem;
  }
  .debate-timer-presets { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Mobile Tab Switcher styling */
.room-mobile-tabs {
  display: none;
}

@media (max-width: 760px) {
  .room-mobile-tabs {
    display: flex;
    background: var(--surface-low, #1e1e24);
    border-bottom: 1px solid var(--border);
    height: 44px;
    align-items: stretch;
    justify-content: space-around;
  }
  .room-mobile-tab {
    flex: 1;
    border: none;
    background: none;
    color: var(--text-muted, #a0aec0);
    font-family: inherit;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
  }
  .room-mobile-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
  }
  .room-mobile-tab-chat-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--danger, #ff4d4d);
    display: inline-block;
  }
  .room-mobile-tab-chat-dot.hidden {
    display: none;
  }

  /* Override grid for split panes */
  body.ls-page-room .room-body {
    display: block !important;
    position: relative;
    height: calc(100vh - 56px - 56px - 44px) !important;
    overflow: hidden;
  }

  .room-feature {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    background: var(--bg2, #0d0a14);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s;
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
  }

  .room-chat {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    background: var(--bg, #09060f);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s;
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
    border-left: none !important;
    border-top: none !important;
  }

  body.show-chat-pane .room-feature {
    transform: translateX(-100%);
    opacity: 0;
    pointer-events: none;
  }
  
  body.show-chat-pane .room-chat {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
  }
}

