/* ═══════════════════════════════════════════════════════════════
   TamilChat — immersive app screens (group chat + random video)
   Dark, focused, full-height. Loaded only on /chat and /video.
   ═══════════════════════════════════════════════════════════════ */

/* ── Critical stacking/visibility fix ──────────────────────────────
   The `hidden` attribute must always win over a component's own
   `display:` rule. Without this, elements that set `display: flex`
   in their own class (e.g. the group-video stage, the notifications
   popover) stay visible even while `hidden` is set, which was the
   root cause of the "empty dark box with just the palm-tree logo"
   and "notifications permanently overlapping the user list" bugs.
   Keep this rule first so nothing below can out-specificity it. */
[hidden] { display: none !important; }

.app-body {
  background: var(--grad-night);
  color: #ece7f5;
  min-height: 100vh;
  overflow: hidden;
}
.app-body::before {
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(600px 400px at 85% -10%, rgba(255,107,53,.20), transparent 60%),
    radial-gradient(500px 400px at -5% 110%, rgba(123,92,255,.22), transparent 60%);
}

.app-shell { position: relative; z-index: 1; height: 100vh; display: flex; flex-direction: column; }

/* App top bar */
.app-bar {
  height: 60px; flex: 0 0 60px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 18px; background: rgba(15,10,28,.6); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,.08); min-width: 0;
}
.app-bar .brand { font-size: 18px; color: #fff; }
.app-bar .brand-mark { width: 32px; height: 32px; font-size: 18px; }
.app-bar .room-title { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 700; font-size: 16px; }
.app-bar .room-title .emoji { font-size: 22px; }
.app-bar .bar-right { display: flex; align-items: center; gap: 10px; }
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px; border-radius: 100px; background: rgba(255,255,255,.08); font-size: 13px; font-weight: 600; }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: #36e07f; animation: pulse 2s infinite; }
.icon-btn { width: 38px; height: 38px; border-radius: 11px; border: none; background: rgba(255,255,255,.08); color: #fff; font-size: 17px; cursor: pointer; display: grid; place-items: center; transition: .15s; }
.icon-btn:hover { background: rgba(255,255,255,.16); }

/* Layout: video stage + chat side panel */
.app-main { flex: 1; display: grid; grid-template-columns: 1fr 360px; min-height: 0; min-width: 0; }
.stage { position: relative; padding: 18px; min-height: 0; display: flex; flex-direction: column; gap: 14px; }

/* Video grid (group) */
.video-grid { flex: 1; display: grid; gap: 12px; min-height: 0; align-content: center;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.video-tile {
  position: relative; background: #0e0a1c; border-radius: 18px; overflow: hidden;
  aspect-ratio: 4/3; border: 1px solid rgba(255,255,255,.08); box-shadow: var(--shadow);
}
.video-tile video { width: 100%; height: 100%; object-fit: cover; background:#0e0a1c; }
.video-tile .name { position: absolute; left: 10px; bottom: 10px; font-size: 12.5px; font-weight: 600;
  background: rgba(0,0,0,.5); padding: 4px 11px; border-radius: 100px; display: flex; align-items: center; gap: 6px; }
.video-tile .muted-ind { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,.5); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; }
.video-tile.placeholder { display: grid; place-items: center; color: #6b6385; font-size: 14px; gap: 10px; text-align: center; }
.video-tile .avatar-big { width: 76px; height: 76px; border-radius: 50%; background: var(--grad-warm); display: grid; place-items: center; font-size: 32px; font-family: var(--font-tamil); font-weight: 800; color: #fff; }

/* Single big stage (random) */
.stage-single { flex: 1; display: grid; grid-template-rows: 1fr 1fr; gap: 12px; min-height: 0; }
@media (min-width: 760px){ .stage-single { grid-template-rows: 1fr; grid-template-columns: 1fr 1fr; } }
.stage-single .video-tile { aspect-ratio: auto; height: 100%; }
.local-mini { position: absolute; }

/* Control dock */
.dock { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 6px; }
.dock .ctrl {
  width: 54px; height: 54px; border-radius: 50%; border: none; cursor: pointer; font-size: 21px;
  background: rgba(255,255,255,.10); color: #fff; display: grid; place-items: center; transition: .18s;
}
.dock .ctrl:hover { background: rgba(255,255,255,.2); transform: translateY(-2px); }
.dock .ctrl.off { background: #e53e6b; }
.dock .ctrl.primary { background: var(--grad-warm-soft); box-shadow: var(--shadow-glow); width: 60px; height: 60px; font-size: 24px; }
.dock .ctrl.danger { background: #e53e6b; }
.dock .ctrl.success { background: #18b368; }
.dock .ctrl-wide { width: auto; padding: 0 26px; border-radius: 100px; font-family: var(--font-head); font-weight: 700; font-size: 16px; gap: 8px; }

/* Chat panel */
.chat-panel { display: flex; flex-direction: column; min-height: 0; background: rgba(13,9,24,.55); backdrop-filter: blur(12px); border-left: 1px solid rgba(255,255,255,.08); }
.chat-tabs { display: flex; flex: 0 0 auto; border-bottom: 1px solid rgba(255,255,255,.08); }
.chat-tabs button { flex: 1; padding: 14px; background: none; border: none; color: #9b94ad; font-family: var(--font-head); font-weight: 600; font-size: 14px; cursor: pointer; border-bottom: 2px solid transparent; }
.chat-tabs button.active { color: #fff; border-bottom-color: var(--saffron); }
.tab-panel { flex: 1; min-height: 0; display: none; flex-direction: column; }
.tab-panel.active { display: flex; }

.messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.messages::-webkit-scrollbar { width: 7px; }
.messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 10px; }
.msg { max-width: 86%; }
.msg .who { font-size: 11.5px; color: #b6aecb; margin: 0 0 3px 4px; font-weight: 600; }
.msg .bubble { background: rgba(255,255,255,.08); padding: 9px 13px; border-radius: 4px 14px 14px 14px; font-size: 14.5px; word-wrap: break-word; }
.msg.me { align-self: flex-end; }
.msg.me .who { text-align: right; margin: 0 4px 3px 0; }
.msg.me .bubble { background: var(--grad-warm-soft); color: #fff; border-radius: 14px 4px 14px 14px; }
.msg.system { align-self: center; max-width: 100%; }
.msg.system .bubble { background: rgba(255,255,255,.05); color: #9b94ad; font-size: 12.5px; padding: 5px 12px; border-radius: 100px; }
.typing-line { height: 18px; padding: 0 18px; font-size: 12px; color: #8b83a3; font-style: italic; }

.composer { flex: 0 0 auto; padding: 12px; display: flex; gap: 9px; border-top: 1px solid rgba(255,255,255,.08); }
.composer input { flex: 1; min-width: 0; padding: 12px 15px; border-radius: 100px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.06); color: #fff; font-size: 14.5px; font-family: var(--font-body); }
.composer input:focus { outline: none; border-color: var(--saffron); }
.composer input::placeholder { color: #877f9e; }
.composer .send { width: 46px; height: 46px; border-radius: 50%; border: none; background: var(--grad-warm-soft); color: #fff; font-size: 18px; cursor: pointer; flex: 0 0 auto; display: grid; place-items: center; transition: .15s; }
.composer .send:hover { transform: scale(1.06); }
.composer .emoji-btn { width: 44px; height: 46px; border: none; background: transparent; font-size: 20px; cursor: pointer; flex: 0 0 auto; border-radius: 50%; transition: .15s; }
.composer .emoji-btn:hover { background: rgba(255,255,255,.08); }

/* Message timestamps */
.msg .who .t { color: #877f9e; font-weight: 400; font-size: 10.5px; margin-left: 5px; }
.msg .bubble a { color: #ffd2a6; text-decoration: underline; word-break: break-all; }
.msg.me .bubble a { color: #fff; }

/* Emoji picker panel */
.emoji-panel { display: none; flex-wrap: wrap; gap: 5px; padding: 12px; border-top: 1px solid rgba(255,255,255,.08); max-height: 168px; overflow-y: auto; }
.emoji-panel.open { display: flex; }
.emoji-panel button { background: rgba(255,255,255,.06); border: none; border-radius: 9px; font-size: 20px; width: 40px; height: 40px; cursor: pointer; transition: .12s; }
.emoji-panel button:hover { background: rgba(255,255,255,.18); transform: scale(1.1); }

/* Connection status dot states (override the green .dot) */
#connDot.off { background: #e8a33d; box-shadow: none; }
#connDot.bad { background: #e53e6b; box-shadow: none; animation: none; }
#connPill { transition: opacity .2s; }

/* Members list */
.members { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.member { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 12px; transition: .12s; }
.member:hover { background: rgba(255,255,255,.05); }
.member .av { width: 36px; height: 36px; border-radius: 50%; background: var(--grad-warm); display: grid; place-items: center; font-weight: 700; color: #fff; font-size: 15px; font-family: var(--font-tamil); flex: 0 0 auto; }
.member .mname { font-size: 14px; font-weight: 600; }
.member .mstatus { font-size: 11.5px; color: #8b83a3; }
.member .cam-on { margin-left: auto; color: #36e07f; font-size: 13px; }

/* Join / gate overlay */
.gate { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 22px;
  background: rgba(10,7,20,.72); backdrop-filter: blur(8px); }
.gate-card { width: 100%; max-width: 420px; background: #1b1430; border: 1px solid rgba(255,255,255,.1); border-radius: var(--radius-lg); padding: 32px 30px; box-shadow: var(--shadow-lg); text-align: center; }
.gate-card .emoji { font-size: 46px; }
.gate-card h2 { color: #fff; font-size: 24px; margin: 10px 0 6px; }
.gate-card p { color: #a39bba; font-size: 14.5px; margin-bottom: 22px; }
.gate-card input { width: 100%; padding: 14px 16px; border-radius: 12px; border: 1.5px solid rgba(255,255,255,.14); background: rgba(255,255,255,.05); color: #fff; font-size: 16px; text-align: center; margin-bottom: 14px; font-family: var(--font-body); }
.gate-card input:focus { outline: none; border-color: var(--saffron); }
.gate-opts { display: flex; gap: 10px; justify-content: center; margin-bottom: 20px; flex-wrap: wrap; }
.toggle-chip { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 100px; background: rgba(255,255,255,.06); border: 1.5px solid rgba(255,255,255,.12); cursor: pointer; font-size: 14px; font-weight: 600; color: #cfc8e0; user-select: none; transition: .15s; }
.toggle-chip.on { background: rgba(255,107,53,.18); border-color: var(--saffron); color: #fff; }
.gate-foot { font-size: 12.5px; color: #877f9e; margin-top: 16px; }
.gate-foot a { color: var(--saffron); }

/* Connection toast */
.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%) translateY(140%); z-index: 60;
  background: #1b1430; border: 1px solid rgba(255,255,255,.12); color: #fff; padding: 12px 20px; border-radius: 100px;
  font-size: 14px; box-shadow: var(--shadow-lg); transition: transform .3s ease; }
.toast.show { transform: translateX(-50%) translateY(0); }

/* status banner inside stage */
.status-banner { text-align: center; color: #b9b1ce; font-size: 14.5px; padding: 8px; }
.status-banner b { color: #fff; }

/* Mobile app layout (random video page) */
@media (max-width: 860px) {
  .stage-single { grid-template-rows: 1fr 1fr; grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════
   Community chat room — gamified people list, stories, DMs, voice
   (original components, dark theme)
   ═══════════════════════════════════════════════════════════════ */

.app-main { grid-template-columns: 1fr 340px; }
.chat-main { display: flex; flex-direction: column; min-height: 0; min-width: 0; position: relative; }
.side-panel { display: flex; flex-direction: column; min-height: 0; background: rgba(13,9,24,.55); backdrop-filter: blur(12px); border-left: 1px solid rgba(255,255,255,.08); }

/* App-bar notification badge */
.icon-btn.has-badge { position: relative; }
.icon-btn .badge { position: absolute; top: -3px; right: -3px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 10px; background: #ef476f; color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; }

/* Collapsible group-video stage */
.video-stage { flex: 0 0 auto; max-height: 42vh; display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,.08); background: rgba(0,0,0,.18); }
.video-stage .video-grid { min-height: 120px; }

/* Stories bar */
.stories { flex: 0 0 auto; display: flex; gap: 14px; padding: 12px 14px; overflow-x: auto; border-bottom: 1px solid rgba(255,255,255,.06); }
.stories::-webkit-scrollbar { height: 0; }
.story { display: flex; flex-direction: column; align-items: center; gap: 5px; cursor: pointer; flex: 0 0 auto; width: 58px; }
.story-ring { width: 56px; height: 56px; border-radius: 50%; padding: 2.5px; background: conic-gradient(from 120deg, var(--c), #ff6b35, #7b5cff, var(--c)); display: grid; place-items: center; transition: transform .15s; }
.story:hover .story-ring { transform: scale(1.06); }
.story.add .story-ring { background: rgba(255,255,255,.18); }
.story-thumb { width: 100%; height: 100%; border-radius: 50%; background: #1b1430; display: grid; place-items: center; font-size: 22px; }
.story span { font-size: 11px; color: #b6aecb; max-width: 58px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Pinned topic banner */
.topic-banner { flex: 0 0 auto; display: flex; align-items: flex-start; gap: 10px; margin: 12px 14px 0; padding: 11px 14px; border-radius: 14px; background: linear-gradient(135deg, rgba(255,107,53,.16), rgba(123,92,255,.16)); border: 1px solid rgba(255,255,255,.1); }
.topic-banner .ico { font-size: 16px; }
.topic-banner .topic-text { flex: 1; font-size: 13px; color: #e7e1f3; line-height: 1.5; }
.topic-banner .topic-close { background: none; border: none; color: #9b94ad; cursor: pointer; font-size: 14px; }

/* Messages with avatars */
.chat-main .messages { flex: 1; }
.messages .msg { display: flex; gap: 9px; align-items: flex-start; max-width: 90%; }
.messages .msg.me { flex-direction: row-reverse; align-self: flex-end; }
.messages .msg.system { display: block; align-self: center; max-width: 100%; }
.msg .msg-body { min-width: 0; }
.msg.me .msg-body { text-align: right; }
.msg.me .bubble { display: inline-block; text-align: left; }

/* Avatars (shared) */
.av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-tamil); font-weight: 800; color: #fff; font-size: 16px; flex: 0 0 auto; position: relative; background: radial-gradient(circle at 32% 28%, var(--ring, #7b5cff), #241a3a 88%); box-shadow: 0 0 0 2px var(--ring, #7b5cff), 0 2px 8px rgba(0,0,0,.3); }
.av.sm { width: 34px; height: 34px; font-size: 14px; box-shadow: 0 0 0 1.5px var(--ring, #7b5cff); }
.av .cam-dot { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: #36e07f; border: 2px solid #160f29; }

/* People list (rich rows) */
.side-tabs { display: flex; flex: 0 0 auto; border-bottom: 1px solid rgba(255,255,255,.08); }
.side-tabs button { flex: 1; padding: 14px 6px; background: none; border: none; color: #9b94ad; font-family: var(--font-head); font-weight: 600; font-size: 13.5px; cursor: pointer; border-bottom: 2px solid transparent; position: relative; }
.side-tabs button.active { color: #fff; border-bottom-color: var(--saffron); }
.tab-badge { display: inline-grid; place-items: center; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 10px; background: #ef476f; color: #fff; font-size: 10.5px; font-weight: 700; margin-left: 4px; }
.side-panel .tab-panel { flex: 1; min-height: 0; display: none; flex-direction: column; }
.side-panel .tab-panel.active { display: flex; }
.side-search { padding: 12px 12px 6px; }
.side-search input { width: 100%; padding: 9px 13px; border-radius: 100px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.06); color: #fff; font-size: 13.5px; font-family: var(--font-body); }
.side-search input:focus { outline: none; border-color: var(--saffron); }
.online-head { padding: 6px 16px; font-size: 12px; font-weight: 700; letter-spacing: .4px; color: #8b83a3; text-transform: uppercase; }
.online-head .online-count { color: #36e07f; }

.members { flex: 1; overflow-y: auto; padding: 4px 8px 12px; display: flex; flex-direction: column; gap: 2px; }
.member { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 12px; cursor: pointer; transition: background .12s; }
.member:hover { background: rgba(255,255,255,.06); }
.member.me { background: rgba(255,107,53,.08); }
.member .m-main { flex: 1; min-width: 0; }
.member .m-name { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member .m-name .rk { font-size: 12px; }
.member .m-status { font-size: 12px; color: #a79fc0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member .m-lvl { flex: 0 0 auto; text-align: center; font-family: var(--font-head); font-weight: 800; font-size: 15px; color: var(--gold); line-height: 1; }
.member .m-lvl small { display: block; font-size: 8.5px; color: #6b6385; font-weight: 700; letter-spacing: .5px; }

/* DM list + thread */
.dm-list { flex: 1; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.dm-empty { color: #8b83a3; font-size: 13.5px; text-align: center; padding: 40px 22px; line-height: 1.6; }
.dm-row { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 12px; cursor: pointer; }
.dm-row:hover { background: rgba(255,255,255,.06); }
.dm-thread { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.dm-thread-head { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,.08); }
.dm-thread-head .av { width: 30px; height: 30px; font-size: 13px; }
.dm-thread-name { font-family: var(--font-head); font-weight: 700; font-size: 15px; }
.dm-thread .messages .msg .bubble { background: rgba(255,255,255,.08); }
.dm-thread .messages .msg.me .bubble { background: var(--grad-warm-soft); }
.dm-thread .messages .msg .t { font-size: 10px; color: #877f9e; margin-top: 2px; }

/* Popovers (notifications + profile) */
.popover { position: fixed; z-index: 80; background: #1b1430; border: 1px solid rgba(255,255,255,.12); border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden; }
.notif-panel { top: 64px; right: 14px; width: 320px; max-height: 60vh; display: flex; flex-direction: column; }
.popover-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; font-family: var(--font-head); font-weight: 700; color: #fff; border-bottom: 1px solid rgba(255,255,255,.08); }
.notif-list { overflow-y: auto; }
.notif-row { display: flex; justify-content: space-between; gap: 10px; padding: 11px 16px; font-size: 13px; color: #cfc8e0; cursor: pointer; border-bottom: 1px solid rgba(255,255,255,.05); }
.notif-row:hover { background: rgba(255,255,255,.05); }
.notif-row small { color: #9890ad; flex: 0 0 auto; }
.notif-empty { padding: 30px; text-align: center; color: #a79fc0; font-size: 13.5px; }

.profile-pop { top: 50%; left: 50%; transform: translate(-50%, -50%); width: 300px; text-align: center; padding-bottom: 20px; }
.profile-cover { height: 70px; background: var(--grad-warm); }
.profile-av { width: 76px; height: 76px; border-radius: 50%; margin: -38px auto 8px; display: grid; place-items: center; font-family: var(--font-tamil); font-weight: 800; font-size: 32px; color: #fff; border: 4px solid #1b1430; }
.profile-name { font-family: var(--font-head); font-weight: 800; font-size: 20px; }
.profile-meta { display: flex; justify-content: center; gap: 10px; margin: 7px 0; font-size: 13px; }
.profile-meta .lvl { background: rgba(255,184,77,.16); color: var(--gold); padding: 3px 11px; border-radius: 100px; font-weight: 700; }
.profile-meta .rank { background: rgba(123,92,255,.16); color: #b9a8ff; padding: 3px 11px; border-radius: 100px; font-weight: 600; }
.profile-status { color: #b6aecb; font-size: 14px; padding: 0 20px; margin-bottom: 16px; font-style: italic; }
.profile-actions { display: flex; gap: 10px; justify-content: center; padding: 0 20px; }
.profile-actions .btn { flex: 1; padding: 10px; font-size: 14px; }

/* Voice notes */
.voice-btn { width: 44px; height: 46px; border: none; background: transparent; font-size: 19px; cursor: pointer; flex: 0 0 auto; border-radius: 50%; transition: .15s; color: #cfc8e0; }
.voice-btn:hover { background: rgba(255,255,255,.08); }
.voice-btn.recording { background: #ef476f; color: #fff; animation: pulse 1s infinite; }
.bubble.voice { display: flex; align-items: center; gap: 8px; }
.bubble.voice audio { height: 32px; max-width: 180px; }
.bubble.voice .vico { font-size: 15px; }
.bubble.voice .vdur { font-size: 11px; opacity: .7; }

/* Host/bot badge — marks the 6 greeter bots clearly as non-admin bots */
.bot-badge {
  display: inline-flex; align-items: center; gap: 3px; font-size: 10px; font-weight: 800;
  letter-spacing: .3px; padding: 2px 7px; border-radius: 100px; margin-left: 5px;
  background: rgba(123,92,255,.22); color: #d9d0ff; border: 1px solid rgba(123,92,255,.4);
  vertical-align: middle; text-transform: uppercase;
}
.member.bot .av, .msg .av.bot { box-shadow: 0 0 0 2px #7b5cff, 0 2px 8px rgba(0,0,0,.3); }

/* Mobile "People" toggle (opens the online-user drawer) */
.people-toggle { display: none; }

/* Backdrop behind the mobile people drawer — starts below the top bar so
   the header (and its people-toggle button) stays reachable to close it. */
.panel-backdrop {
  position: fixed; top: 60px; left: 0; right: 0; bottom: 0; z-index: 65; background: rgba(5,3,12,.55);
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.panel-backdrop.show { opacity: 1; pointer-events: auto; }

/* Responsive — the online-people panel is a right sidebar on desktop and
   a slide-in drawer (triggered by the 👥 button) on mobile/tablet. */
@media (max-width: 860px) {
  .app-main { grid-template-columns: 1fr; }
  .people-toggle { display: inline-flex; }
  .side-panel {
    position: fixed; top: 60px; right: 0; z-index: 70;
    width: min(88vw, 360px); height: calc(100vh - 60px); height: calc(100dvh - 60px);
    border-left: 1px solid rgba(255,255,255,.08); border-top: none;
    box-shadow: -14px 0 44px rgba(0,0,0,.45);
    transform: translateX(100%); transition: transform .26s ease;
  }
  .side-panel.open { transform: translateX(0); }
  .app-bar .brand-text { display: none; }
  .notif-panel { width: calc(100vw - 28px); }

  /* Top bar: too many icons for a narrow screen at full size — shrink,
     tighten gaps, drop the least essential controls, and keep the room
     name/online-count out of the flow so nothing clips off-viewport.
     Keep it above the drawer/backdrop (z-index) so it stays usable
     (e.g. tapping 👥 again) while the drawer is open. */
  .app-bar { padding: 0 10px; position: relative; z-index: 75; }
  .app-bar .room-title { display: none; }
  .app-bar .bar-right { gap: 6px; }
  .app-bar #connText { display: none; }
  .app-bar #soundBtn { display: none; }
  .app-bar .pill { padding: 7px 9px; }
  .app-bar .icon-btn { width: 34px; height: 34px; font-size: 15px; border-radius: 9px; }
}
