:root {
  color-scheme: dark;
  --canvas: #0b0b0d;
  --canvas-soft: #111114;
  --glass: rgba(37, 37, 41, .64);
  --glass-strong: rgba(47, 47, 52, .84);
  --glass-soft: rgba(255, 255, 255, .055);
  --glass-hover: rgba(255, 255, 255, .105);
  --hairline: rgba(255, 255, 255, .13);
  --hairline-bright: rgba(255, 255, 255, .22);
  --text: #f5f5f7;
  --secondary: rgba(235, 235, 245, .60);
  --tertiary: rgba(235, 235, 245, .34);
  --sage: #a8c6b0;
  --sage-deep: #30483a;
  --danger: #ff736b;
  --radius-main: 24px;
  --radius-control: 14px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { min-height: 100%; }
html { background: var(--canvas); }
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(ellipse at 6% -10%, rgba(168, 198, 176, .13), transparent 40rem),
    radial-gradient(ellipse at 105% 104%, rgba(187, 178, 211, .09), transparent 42rem),
    linear-gradient(145deg, var(--canvas-soft), var(--canvas));
  color: var(--text);
}
button, input, textarea, select { font: inherit; }
button { color: inherit; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button, label, input, textarea, select { -webkit-user-select: none; user-select: none; }
textarea, input { -webkit-user-select: text; user-select: text; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible,
.avatar-picker input:focus-visible + .avatar-art {
  outline: 3px solid rgba(168, 198, 176, .42);
  outline-offset: 2px;
}
svg {
  width: 20px; height: 20px; fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.visually-hidden {
  position: absolute !important; width: 1px !important; height: 1px !important;
  padding: 0 !important; margin: -1px !important; overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important;
}

.ambient { position: fixed; z-index: -1; border-radius: 50%; filter: blur(80px); pointer-events: none; opacity: .36; }
.ambient-one { width: 340px; height: 260px; left: -120px; top: 18%; background: rgba(168, 198, 176, .16); }
.ambient-two { width: 400px; height: 320px; right: -160px; bottom: 4%; background: rgba(187, 178, 211, .12); }
.glass, .glass-strong, .glass-control {
  border: 1px solid var(--hairline);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.055), 0 24px 70px rgba(0,0,0,.30);
}
.glass { background: var(--glass); backdrop-filter: blur(34px) saturate(1.5); -webkit-backdrop-filter: blur(34px) saturate(1.5); }
.glass-strong { background: var(--glass-strong); backdrop-filter: blur(44px) saturate(1.55); -webkit-backdrop-filter: blur(44px) saturate(1.55); }
.glass-control { background: rgba(47,47,52,.66); backdrop-filter: blur(26px) saturate(1.45); -webkit-backdrop-filter: blur(26px) saturate(1.45); }

.topbar {
  position: sticky; z-index: 30; top: 12px;
  width: min(1480px, calc(100% - 24px)); height: 58px; margin: 12px auto 0;
  padding: 0 12px 0 10px; border-radius: 19px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 38px; height: 38px; border-radius: 12px; object-fit: cover; box-shadow: 0 2px 12px rgba(0,0,0,.25); }
.brand span { display: grid; gap: 1px; }
.brand strong { font-size: 14px; font-weight: 650; letter-spacing: -.02em; }
.brand small { color: var(--secondary); font-size: 10px; }
.top-status, .status-cluster { display: flex; align-items: center; }
.top-status { gap: 9px; color: var(--secondary); font-size: 11px; }
.status-cluster { gap: 7px; padding: 0 5px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--tertiary); }
.status-dot.live { background: var(--sage); box-shadow: 0 0 0 4px rgba(168,198,176,.12); }
.status-dot.error { background: var(--danger); box-shadow: 0 0 0 4px rgba(255,115,107,.10); }
.protocol-badge, .route-pill, .voice-count {
  border: 1px solid var(--hairline); background: var(--glass-soft); color: var(--secondary);
  border-radius: 999px; white-space: nowrap;
}
.protocol-badge, .route-pill { padding: 6px 9px; font: 600 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.leave-button {
  height: 32px; padding: 0 11px; border: 1px solid rgba(255,115,107,.20);
  border-radius: 11px; background: rgba(255,115,107,.09); color: #ff9a94; cursor: pointer;
}

.room-layout {
  width: min(1480px, 100%); margin: 0 auto; padding: 16px 12px 22px;
  display: grid; grid-template-columns: minmax(0, 1fr) 356px; gap: 14px;
}
.broadcast-column { min-width: 0; display: grid; align-content: start; gap: 12px; }
.stage-card { border-radius: var(--radius-main); overflow: hidden; }
.stage {
  position: relative; overflow: hidden; aspect-ratio: 16 / 9;
  background: radial-gradient(circle at 50% 42%, #1d1d21, #070708 72%);
}
.stage video { width: 100%; height: 100%; object-fit: contain; visibility: hidden; background: #000; }
.stage.crop-16-9 video { object-fit: cover; }
.stage-gradient { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(0,0,0,.20), transparent 28%, transparent 67%, rgba(0,0,0,.35)); }
.stage-welcome {
  position: absolute; inset: 0; padding: 22px; display: grid; place-content: center; justify-items: center;
  text-align: center; background: radial-gradient(circle at 50% 42%, rgba(168,198,176,.07), transparent 23rem);
}
.stage-welcome img { width: 82px; height: 82px; margin-bottom: 18px; border-radius: 25px; object-fit: cover; box-shadow: 0 18px 45px rgba(0,0,0,.32); }
.eyebrow, .section-kicker { color: var(--secondary); font-size: 9px; font-weight: 700; letter-spacing: .13em; }
.stage-welcome h1 { margin: 7px 0 6px; font-size: clamp(25px, 3.3vw, 42px); letter-spacing: -.045em; }
.stage-welcome p { width: min(440px, 90%); margin: 0; color: var(--secondary); font-size: 13px; line-height: 1.45; }
.stage-spinner {
  width: 22px; height: 22px; margin-top: 18px; border: 2px solid var(--hairline);
  border-top-color: var(--sage); border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.stage-error {
  position: absolute; z-index: 8; left: 50%; bottom: 18px; transform: translateX(-50%);
  margin: 0; padding: 10px 14px; border: 1px solid rgba(255,115,107,.24); border-radius: 12px;
  background: rgba(66,36,35,.82); color: #ffb0ab; font-size: 12px;
}
.stream-badges { position: absolute; z-index: 5; top: 15px; left: 15px; display: flex; align-items: center; gap: 7px; }
.live-pill {
  display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px;
  background: rgba(20,20,22,.64); border: 1px solid var(--hairline); backdrop-filter: blur(20px);
  color: #fff; font-size: 9px; font-weight: 700; letter-spacing: .05em;
}
.live-pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 4px rgba(255,115,107,.12); }
.route-pill { background: rgba(20,20,22,.64); backdrop-filter: blur(20px); }
.resume-playback {
  position: absolute; z-index: 7; left: 50%; top: 50%; transform: translate(-50%, -50%);
  height: 44px; padding: 0 15px; border-radius: var(--radius-control); color: var(--text);
  display: flex; align-items: center; gap: 8px; cursor: pointer;
}
.fullscreen-exit {
  position: absolute; z-index: 20; top: max(14px, env(safe-area-inset-top)); right: max(14px, env(safe-area-inset-right));
  width: 44px; height: 44px; border-radius: 15px; color: #fff; cursor: pointer; place-items: center;
}
.fullscreen-exit:not([hidden]) { display: grid; }
.panda-pseudo-fullscreen { overflow: hidden; }
body.panda-pseudo-fullscreen .stage-card {
  position: fixed; inset: 0; z-index: 1000;
  width: 100vw; height: 100dvh; max-width: none; max-height: none;
  border: 0; border-radius: 0; overflow: visible; background: #000;
  box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none;
}
body.panda-pseudo-fullscreen .stage {
  position: relative; inset: auto; width: 100%; height: 100%;
  max-width: none; max-height: none; aspect-ratio: auto; border-radius: 0; background: #000;
}
body.panda-pseudo-fullscreen .stage video {
  width: 100%; height: 100%; object-fit: contain; visibility: visible;
}
body.panda-pseudo-fullscreen .stage-card > .media-toolbar { display: none; }
.stage:fullscreen, .stage:-webkit-full-screen {
  width: 100vw; height: 100vh; max-width: none; max-height: none;
  aspect-ratio: auto; border-radius: 0; background: #000;
}
.stage:fullscreen video, .stage:-webkit-full-screen video {
  width: 100%; height: 100%; object-fit: contain; visibility: visible;
}

.media-toolbar { min-height: 68px; padding: 10px 11px 10px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--hairline); }
.stream-title { min-width: 0; display: grid; gap: 3px; }
.stream-title strong { font-size: 13px; letter-spacing: -.01em; }
.stream-title span { color: var(--secondary); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-actions { flex: 0 0 auto; padding: 3px; border-radius: 16px; display: flex; gap: 2px; box-shadow: inset 0 1px 0 rgba(255,255,255,.04); }
.icon-button, .composer-button, .send-button, .voice-icon-button, .voice-button {
  border: 0; display: grid; place-items: center; cursor: pointer; transition: background .18s ease, color .18s ease, transform .18s ease;
}
.icon-button { width: 39px; height: 39px; border-radius: 12px; background: transparent; color: var(--secondary); }
.icon-button svg { width: 18px; height: 18px; }
.icon-button.active { color: var(--sage); background: rgba(168,198,176,.12); }
.aspect-button b { font-size: 8px; letter-spacing: -.02em; }
.fullscreen-primary { color: #172219; background: var(--sage); }
.stats-strip { border-radius: 18px; padding: 12px 15px; display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.stats-strip div { display: grid; gap: 3px; }
.stats-strip span { color: var(--tertiary); font-size: 9px; }
.stats-strip strong { font-size: 11px; }

.community-panel {
  min-height: calc(100vh - 108px); max-height: calc(100vh - 108px);
  border-radius: var(--radius-main); overflow: hidden; display: flex; flex-direction: column;
}
.people-section { padding: 17px 17px 11px; border-bottom: 1px solid var(--hairline); }
.section-heading, .communication-heading { display: flex; align-items: center; justify-content: space-between; }
.section-heading { margin-bottom: 11px; }
.section-heading h2, .communication-heading h2 { margin: 3px 0 0; font-size: 15px; letter-spacing: -.02em; }
.section-heading h2 b { margin-left: 3px; color: var(--secondary); font-size: 11px; }
.people-list { display: flex; gap: 9px; overflow-x: auto; padding: 2px 1px 5px; scrollbar-width: none; }
.people-list::-webkit-scrollbar { display: none; }
.person { position: relative; min-width: 56px; max-width: 70px; display: grid; justify-items: center; gap: 5px; }
.person-avatar, .message-avatar, .avatar-art {
  display: block; background-size: contain; background-position: center; background-repeat: no-repeat;
  background-color: rgba(255,255,255,.06);
}
.avatar-1 { background-image: url("/panda-avatar-1.png"); }
.avatar-2 { background-image: url("/panda-avatar-2.png"); }
.avatar-3 { background-image: url("/panda-avatar-3.png"); }
.avatar-4 { background-image: url("/panda-avatar-4.png"); }
.avatar-5 { background-image: url("/panda-avatar-5.png"); }
.avatar-6 { background-image: url("/panda-avatar-6.png"); }
.avatar-7 { background-image: url("/panda-avatar-7.png"); }
.avatar-8 { background-image: url("/panda-avatar-8.png"); }
.person-avatar { width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--hairline); }
.person.connected .person-avatar { border-color: rgba(168,198,176,.74); }
.person.speaking .person-avatar, .voice-person.speaking .person-avatar { animation: speaking-pulse 1.05s ease-in-out infinite; }
@keyframes speaking-pulse { 50% { box-shadow: 0 0 0 5px rgba(168,198,176,.20); border-color: var(--sage); } }
.person-name { width: 100%; color: var(--secondary); font-size: 9px; overflow: hidden; text-overflow: ellipsis; text-align: center; white-space: nowrap; }
.person-mic, .participant-mute-button {
  position: absolute; top: 25px; width: 17px; height: 17px; border-radius: 50%;
  display: grid; place-items: center; border: 1.5px solid #29292d; background: #55555b; color: #ddd;
}
.person-mic { right: 2px; }
.participant-mute-button { left: 2px; padding: 0; cursor: pointer; }
.person-mic svg, .participant-mute-button svg { width: 9px; height: 9px; stroke-width: 2.2; }
.person-mic.on { background: var(--sage-deep); color: var(--sage); }
.person-mic.muted, .participant-mute-button.active { background: #653936; color: #ff9c96; }

.chat-section { position: relative; min-height: 0; flex: 1; padding: 15px 13px 13px; display: flex; flex-direction: column; }
.communication-heading { padding: 0 3px 10px; }
.voice-count { padding: 6px 9px; display: flex; align-items: center; gap: 5px; font-size: 9px; }
.voice-count i { width: 6px; height: 6px; border-radius: 50%; background: var(--sage); }
.voice-count b { color: var(--text); }
.messages { flex: 1; min-height: 130px; overflow-y: auto; padding: 5px 3px 12px; display: flex; flex-direction: column; gap: 11px; scrollbar-width: thin; scrollbar-color: var(--hairline) transparent; }
.system-message { align-self: center; color: var(--tertiary); font-size: 9px; text-align: center; padding: 5px 8px; }
.message { display: grid; grid-template-columns: 28px minmax(0,1fr); gap: 7px; align-items: end; }
.message.self { grid-template-columns: minmax(0,1fr); }
.message.self .message-avatar { display: none; }
.message.self .message-body { justify-self: end; align-items: flex-end; }
.message-avatar { width: 28px; height: 28px; border-radius: 50%; }
.message-body { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.message-meta { padding: 0 4px; color: var(--tertiary); font-size: 8px; }
.message-bubble { max-width: 245px; padding: 8px 10px; border: 1px solid rgba(255,255,255,.06); border-radius: 14px 14px 14px 5px; background: rgba(255,255,255,.07); color: #efeff1; font-size: 12px; line-height: 1.38; overflow-wrap: anywhere; }
.message.self .message-bubble { border-color: rgba(168,198,176,.12); border-radius: 14px 14px 5px 14px; background: rgba(48,72,58,.85); }
.message-bubble.emoji { padding: 1px; border: 0; background: transparent; font-size: 29px; }
.message-bubble.sticker { padding: 0; border: 0; background: transparent; display: grid; justify-items: center; gap: 3px; }
.message-bubble.sticker i { width: 108px; height: 74px; border-radius: 13px; }
.message-bubble.sticker span { color: var(--secondary); font-size: 10px; }

.voice-dock { margin-bottom: 8px; display: grid; gap: 5px; }
.voice-person { width: 100%; min-width: 0; padding: 8px; border: 1px solid var(--hairline); border-radius: 16px; background: var(--glass-soft); display: grid; grid-template-columns: 35px minmax(0,1fr) auto; align-items: center; gap: 8px; }
.voice-person .person-avatar { width: 35px; height: 35px; }
.voice-person-copy { min-width: 0; display: grid; gap: 3px; }
.voice-person-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.voice-status { min-width: 0; display: flex; align-items: center; gap: 5px; color: var(--secondary); font-size: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.voice-status i { flex: 0 0 auto; width: 5px; height: 5px; border-radius: 50%; background: var(--tertiary); }
.voice-status.active i { background: var(--sage); }
.voice-status.muted { color: #ffaaa5; }
.voice-status.muted i { background: var(--danger); }
.voice-person-actions { display: flex; align-items: center; gap: 3px; }
.voice-icon-button, .voice-button { height: 30px; border-radius: 10px; background: rgba(255,255,255,.055); color: var(--secondary); }
.voice-icon-button { width: 30px; }
.voice-button { min-width: 65px; padding: 0 8px; display: flex; gap: 5px; background: rgba(168,198,176,.12); color: var(--sage); }
.voice-icon-button svg, .voice-button svg { width: 14px; height: 14px; }
.voice-button b { font-size: 9px; }
.voice-button.active, .voice-icon-button.muted, .voice-mute-button.active { background: rgba(255,115,107,.12); color: #ff9d97; }
.voice-icon-button:disabled { opacity: .38; cursor: default; }
.voice-people-list { display: grid; gap: 4px; }
.voice-people-list .system-message { display: none; }
.voice-people-list .person { max-width: none; min-width: 0; width: 100%; padding: 5px 7px; border-radius: 12px; background: rgba(255,255,255,.035); grid-template-columns: 28px minmax(0,1fr) auto auto; justify-items: start; align-items: center; gap: 6px; }
.voice-people-list .person-avatar { width: 28px; height: 28px; }
.voice-people-list .person-name { text-align: left; font-size: 9px; }
.voice-people-list .person-mic, .voice-people-list .participant-mute-button { position: static; width: 21px; height: 21px; border-width: 1px; }

.composer { padding: 7px; border: 1px solid var(--hairline); border-radius: 16px; background: rgba(255,255,255,.055); }
.composer textarea { width: 100%; min-height: 31px; max-height: 88px; padding: 4px 6px; resize: none; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 12px; }
.composer textarea::placeholder { color: var(--tertiary); }
.composer-actions { display: flex; align-items: center; justify-content: space-between; }
.composer-actions > div { display: flex; gap: 3px; }
.composer-button { width: 29px; height: 29px; border-radius: 9px; background: transparent; color: var(--secondary); }
.composer-button svg { width: 16px; height: 16px; }
.send-button { width: 31px; height: 31px; border-radius: 50%; background: var(--sage); color: #18221a; }
.send-button svg { width: 16px; height: 16px; }
.picker-popover, .sticker-popover { position: absolute; z-index: 8; left: 13px; right: 13px; bottom: 160px; padding: 10px; border-radius: 16px; }
.picker-popover { display: grid; grid-template-columns: repeat(8,1fr); }
.picker-popover button { border: 0; background: transparent; font-size: 20px; cursor: pointer; }
.sticker-popover { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; }
.sticker-popover button { padding: 5px; border: 0; border-radius: 11px; background: var(--glass-soft); color: var(--secondary); cursor: pointer; display: grid; justify-items: center; gap: 3px; font-size: 8px; }
.sticker-art { display: block; width: 78px; height: 52px; background-image: url("/panda-stickers.jpg"); background-size: 300% 200%; background-repeat: no-repeat; border-radius: 9px; }
.sticker-1 { background-position: 0 0; } .sticker-2 { background-position: 50% 0; } .sticker-3 { background-position: 100% 0; }
.sticker-4 { background-position: 0 100%; } .sticker-5 { background-position: 50% 100%; } .sticker-6 { background-position: 100% 100%; }

.audio-settings-popover { position: absolute; z-index: 10; right: 13px; bottom: 150px; width: min(330px, calc(100% - 26px)); padding: 14px; border-radius: 18px; }
.audio-settings-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.audio-settings-heading strong { font-size: 12px; }
.audio-settings-heading button { width: 26px; height: 26px; border: 0; border-radius: 50%; background: var(--glass-soft); color: var(--secondary); cursor: pointer; font-size: 17px; }
.voice-settings { display: grid; gap: 9px; }
.voice-settings > label:not(.noise-control) { display: grid; grid-template-columns: 105px minmax(0,1fr); align-items: center; gap: 8px; color: var(--secondary); font-size: 9px; }
.voice-settings select { width: 100%; height: 34px; border: 1px solid var(--hairline); border-radius: 10px; background: #303034; color: var(--text); padding: 0 8px; outline: 0; }
.noise-control { padding: 9px; border: 1px solid var(--hairline); border-radius: 11px; background: var(--glass-soft); display: grid; grid-template-columns: 18px 1fr; align-items: center; gap: 8px; cursor: pointer; }
.noise-control input { accent-color: var(--sage-deep); }
.noise-control span { display: grid; gap: 2px; }
.noise-control b { font-size: 10px; }
.noise-control small { color: var(--secondary); font-size: 8px; }

.join-overlay { position: fixed; z-index: 50; inset: 0; padding: 18px; display: grid; place-items: center; background: rgba(5,5,7,.56); backdrop-filter: blur(24px) saturate(1.25); -webkit-backdrop-filter: blur(24px) saturate(1.25); }
.join-card { width: min(440px, 100%); padding: 24px; border-radius: 28px; display: flex; flex-direction: column; align-items: stretch; }
.join-identity { display: grid; justify-items: center; text-align: center; }
.join-icon { width: 68px; height: 68px; margin-bottom: 14px; border-radius: 21px; object-fit: cover; box-shadow: 0 14px 35px rgba(0,0,0,.35); }
.join-card h1 { margin: 7px 0 6px; font-size: 27px; line-height: 1.08; letter-spacing: -.04em; }
.join-card .join-identity p { margin: 0; max-width: 330px; color: var(--secondary); font-size: 12px; line-height: 1.45; }
.offline-hint { margin: 18px auto 2px; padding: 7px 10px; border: 1px solid var(--hairline); border-radius: 999px; background: var(--glass-soft); display: flex; align-items: center; gap: 7px; color: var(--secondary); font-size: 9px; }
.offline-hint i { width: 6px; height: 6px; border-radius: 50%; background: var(--tertiary); animation: offline-pulse 2s ease-in-out infinite; }
@keyframes offline-pulse { 50% { background: var(--sage); box-shadow: 0 0 0 4px rgba(168,198,176,.10); } }
.join-fields { margin-top: 19px; display: grid; }
.join-fields > label, .avatar-picker legend { margin: 0 0 6px; color: var(--secondary); font-size: 10px; }
.join-fields > input { width: 100%; height: 44px; margin-bottom: 13px; padding: 0 13px; border: 1px solid var(--hairline-bright); border-radius: 13px; background: rgba(255,255,255,.065); color: var(--text); outline: 0; }
.join-fields > input:focus { border-color: rgba(168,198,176,.75); box-shadow: 0 0 0 4px rgba(168,198,176,.10); }
.join-fields .pin-input { height: 58px; padding: 0; text-align: center; font: 650 27px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .55em; text-indent: .55em; font-variant-numeric: tabular-nums; }
.join-fields .pin-input::placeholder { color: var(--tertiary); letter-spacing: .35em; }
.avatar-picker { border: 0; padding: 0; margin: 2px 0 17px; display: grid; grid-template-columns: repeat(8,1fr); gap: 6px; }
.avatar-picker legend { grid-column: 1 / -1; }
.avatar-picker label { cursor: pointer; }
.avatar-picker input { position: absolute; opacity: 0; pointer-events: none; }
.avatar-art { width: 38px; aspect-ratio: 1; border-radius: 50%; border: 2px solid transparent; transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.avatar-picker input:checked + .avatar-art { border-color: var(--sage); box-shadow: 0 0 0 3px rgba(168,198,176,.12); }
.join-card > button { height: 45px; border: 0; border-radius: 14px; background: var(--sage); color: #172219; font-weight: 700; cursor: pointer; }
.join-card > button:disabled { opacity: .52; cursor: wait; }
.join-error { margin: 10px 0 0 !important; color: #ffaaa5 !important; text-align: center; font-size: 10px !important; }
.join-card > small { margin-top: 11px; color: var(--tertiary); text-align: center; font-size: 9px; line-height: 1.4; }

.host-mode { overflow: hidden; background: #0a0a0b; }
.host-mode .ambient, .host-mode .topbar { display: none; }
.host-mode .room-layout { width: 100%; height: 100vh; padding: 8px; grid-template-columns: minmax(0,1fr) minmax(290px,320px); gap: 8px; }
.host-mode .community-panel { min-height: 0; max-height: none; height: calc(100vh - 16px); }
.host-mode .stage-card, .host-mode .stats-strip, .host-mode .community-panel { box-shadow: none; }
.host-mode .media-toolbar { min-height: 58px; }
.host-mode .icon-button { width: 34px; height: 34px; }
.host-mode .people-section { padding: 13px 14px 8px; }
.host-mode .chat-section { padding: 11px 10px 10px; }
.host-mode #host-preview-button.active { background: rgba(168,198,176,.13); color: var(--sage); }

@media (hover: hover) and (pointer: fine) {
  .icon-button:hover, .composer-button:hover, .voice-icon-button:hover, .voice-button:hover,
  .participant-mute-button:hover, .picker-popover button:hover, .sticker-popover button:hover,
  .audio-settings-heading button:hover, .resume-playback:hover { background: var(--glass-hover); }
  .fullscreen-primary:hover, .send-button:hover, .join-card > button:hover { filter: brightness(1.08); }
  .leave-button:hover { background: rgba(255,115,107,.15); }
  .avatar-picker label:hover .avatar-art { transform: translateY(-1px); border-color: var(--hairline-bright); }
  .avatar-picker label:hover input:checked + .avatar-art { border-color: var(--sage); }
}

@media (max-width: 920px) {
  .room-layout { grid-template-columns: 1fr; }
  .community-panel { min-height: 580px; max-height: 720px; }
  .messages { min-height: 220px; }
  .stats-strip { grid-template-columns: repeat(3,1fr); }
}
@media (max-width: 640px) {
  .topbar { top: 7px; width: calc(100% - 14px); height: 52px; margin-top: 7px; border-radius: 17px; }
  .brand small, #connection-state, .protocol-badge { display: none; }
  .brand-mark { width: 34px; height: 34px; border-radius: 11px; }
  .room-layout { padding: 8px 0 0; gap: 8px; }
  .stage-card, .community-panel { border-left: 0; border-right: 0; border-radius: 0; }
  .stage { aspect-ratio: 16 / 10; }
  .stage-welcome img { width: 62px; height: 62px; border-radius: 19px; margin-bottom: 13px; }
  .stage-welcome h1 { font-size: 25px; }
  .stage-welcome p { font-size: 11px; }
  .media-toolbar { padding: 9px 8px 9px 12px; }
  .stream-title span { max-width: 140px; }
  .icon-button { width: 35px; height: 35px; }
  .media-actions { gap: 0; }
  .stats-strip { border-radius: 0; grid-template-columns: repeat(2,1fr); }
  .community-panel { min-height: calc(100dvh - 330px); max-height: 680px; }
  .join-overlay { align-items: end; padding: 0; }
  .join-card { border-left: 0; border-right: 0; border-bottom: 0; border-radius: 28px 28px 0 0; padding: 21px 17px max(19px, env(safe-area-inset-bottom)); }
  .join-icon { width: 58px; height: 58px; border-radius: 18px; }
  .join-card h1 { font-size: 25px; }
  .avatar-picker { gap: 3px; }
  .avatar-art { width: 34px; }
  .sticker-popover { grid-template-columns: repeat(2,1fr); }
  .voice-person { grid-template-columns: 34px minmax(0,1fr); }
  .voice-person-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .voice-settings > label:not(.noise-control) { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
