:root {
  color-scheme: light;
  --bg: #eef1f6;
  --card: #ffffff;
  --panel: #f7f9fc;
  --panel-2: #f1f5f9;
  --text: #14213d;
  --muted: #5f6f8a;
  --line: #dce5f1;
  --accent: #2f6df6;
  --accent-hover: #1f57d8;
  --danger: #dc2626;
  --success: #16a34a;
  --shadow: 0 28px 72px rgba(30, 41, 59, .16);
  --soft-shadow: 0 18px 42px rgba(30, 41, 59, .08);
  --radius-xl: 34px;
  --radius-lg: 26px;
  --radius-md: 18px;
}

.dashboard-app {
  width: min(1152px, calc(100vw - 32px));
  margin: 16px auto 0;
  color: #1e293b;
}

.dashboard-app.in-room {
  width: 100%;
  max-width: none;
  margin: 0 auto;
}

.dashboard-main {
  width: 100%;
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 3vw, 32px);
}

.dashboard-hero {
  position: relative;
  overflow: hidden;
  border-radius: clamp(24px, 3vw, 32px);
  padding: clamp(20px, 4vw, 40px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.dashboard-hero-glow {
  position: absolute;
  width: 256px;
  height: 256px;
  right: -96px;
  top: -96px;
  border-radius: 999px;
  background: rgba(59, 130, 246, .10);
  filter: blur(48px);
  pointer-events: none;
  transition: transform .7s ease;
}

.dashboard-hero:hover .dashboard-hero-glow {
  transform: scale(1.22);
}

.dashboard-hero-copy {
  position: relative;
  z-index: 1;
}

.dashboard-hero-copy h2 {
  margin: 0 0 8px;
  font-size: clamp(24px, 4vw, 32px);
  line-height: 1.1;
  font-weight: 850;
  letter-spacing: -.03em;
  color: #0f172a;
}

.dashboard-hero-copy p {
  margin: 0;
  color: #64748b;
  font-size: clamp(13px, 1.8vw, 16px);
  font-weight: 520;
}

.dashboard-start-btn {
  position: relative;
  z-index: 1;
  border: 0;
  border-radius: clamp(14px, 2vw, 18px);
  min-height: 52px;
  padding: 14px clamp(24px, 4vw, 32px);
  background: #2563eb;
  color: #fff;
  box-shadow: 0 10px 25px -5px rgba(37, 99, 235, .4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 800;
  font-size: clamp(14px, 2vw, 16px);
  cursor: pointer;
  transition: transform .25s ease, background-color .25s ease;
  flex-shrink: 0;
}

.dashboard-start-btn:hover {
  background: #1d4ed8;
  transform: translateY(-4px);
}

.dashboard-start-btn svg {
  width: 20px;
  height: 20px;
}

.dashboard-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(8px, 2vw, 24px);
  align-items: start;
}

.dashboard-stat-wrap {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.dashboard-stat-wrap > .dashboard-stat-card {
  width: 100%;
}

.dashboard-stat-card {
  position: relative;
  overflow: hidden;
  border-radius: clamp(18px, 3vw, 28px);
  padding: clamp(12px, 2.5vw, 24px);
  min-height: clamp(148px, 18vw, 216px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform .25s ease;
}

.dashboard-stat-card:hover {
  transform: translateY(-4px);
}

.dashboard-card-bg {
  position: absolute;
  right: -16px;
  bottom: -16px;
  width: clamp(64px, 14vw, 128px);
  height: clamp(64px, 14vw, 128px);
  color: rgba(59, 130, 246, .10);
  transform: rotate(-10deg);
  pointer-events: none;
}

.dashboard-stat-card:first-child .dashboard-card-bg {
  color: rgba(245, 158, 11, .12);
  transform: rotate(12deg);
}

.dashboard-stat-card:last-child .dashboard-card-bg {
  color: rgba(99, 102, 241, .12);
  transform: rotate(6deg);
}

.dashboard-stat-icon {
  width: clamp(28px, 4vw, 40px);
  height: clamp(28px, 4vw, 40px);
  border-radius: clamp(10px, 1.5vw, 14px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, .4);
}

.dashboard-stat-icon svg {
  width: 52%;
  height: 52%;
}

.dashboard-stat-icon.warm {
  color: #fff;
  background: linear-gradient(135deg, #fbbf24, #f97316);
}

.dashboard-stat-icon.blue {
  color: #2563eb;
  background: #dbeafe;
}

.dashboard-stat-icon.indigo {
  color: #4f46e5;
  background: #e0e7ff;
}

.dashboard-stat-card h3 {
  margin: 0 0 6px;
  font-size: clamp(9px, 1.4vw, 11px);
  color: #64748b;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 850;
}

.dashboard-stat-value {
  color: #1e293b;
  font-size: clamp(16px, 4vw, 32px);
  line-height: 1;
  font-weight: 900;
  letter-spacing: -.03em;
  white-space: nowrap;
  position: relative;
  z-index: 1;
}

.dashboard-stat-value span:last-child {
  font-size: clamp(9px, 1.7vw, 14px);
  color: #64748b;
  font-weight: 650;
}

.dashboard-stat-value.non-member {
  font-size: clamp(18px, 4vw, 30px);
}

.gradient-blue,
.gradient-indigo {
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.gradient-blue {
  background-image: linear-gradient(90deg, #2563eb, #4f46e5);
}

.gradient-indigo {
  background-image: linear-gradient(90deg, #4f46e5, #9333ea);
}

.dashboard-stat-card p {
  margin: 10px 0 0;
  font-size: 12px;
  color: #64748b;
  font-weight: 650;
}

.dashboard-direct-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: clamp(12px, 2.5vw, 24px);
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
  white-space: nowrap;
  letter-spacing: .01em;
}

.dashboard-direct-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 14%, transparent);
}

.dashboard-direct-status.available {
  color: #16a34a;
}

.dashboard-direct-status.limited {
  color: #d97706;
}

.dashboard-direct-status.detecting {
  color: #64748b;
}

.room-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  padding: 16px;
  background: rgba(15, 23, 42, .30);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .28s ease;
}

.room-modal-overlay.active {
  opacity: 1;
}

.room-modal-content {
  width: min(448px, calc(100vw - 32px));
  border-radius: 32px;
  padding: 32px;
  position: relative;
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);
  opacity: 0;
  transform: scale(.95) translateY(10px);
  transition: all .4s cubic-bezier(.16, 1, .3, 1);
}

.room-modal-content.active {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.room-modal-content h2 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
}

.room-modal-content > p {
  margin: 0 0 32px;
  color: #64748b;
  font-size: 14px;
}

.room-modal-form {
  display: grid;
  gap: 20px;
}

.room-modal-form label {
  display: block;
  margin: 0 0 8px 4px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.room-modal-form input {
  width: 100%;
  min-height: 50px;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 14px;
}

.enter-room-block {
  display: grid;
}

.join-meeting-container {
  display: flex;
  align-items: stretch;
  width: 100%;
  min-height: 52px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .55);
  border: 1px solid rgba(255, 255, 255, .82);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, .45), 0 12px 26px -22px rgba(15, 23, 42, .45);
  overflow: hidden;
  transition: border-color .22s ease, background .22s ease, box-shadow .22s ease;
}

.join-meeting-container:focus-within {
  border-color: #3b82f6;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, .15), 0 16px 30px -24px rgba(15, 23, 42, .42);
}

.join-meeting-container.auto-ready {
  border-color: rgba(37, 99, 235, .46);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .10), 0 16px 30px -24px rgba(37, 99, 235, .45);
}

.enter-room-input-container {
  flex: 1 1 auto;
  min-width: 0;
}

.room-modal-form .enter-room-input {
  min-height: 52px;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: .01em;
}

.room-modal-form .enter-room-input:focus {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.room-modal-form .enter-room-input::placeholder {
  color: #64748b;
  opacity: .72;
}

.welcome-page-button {
  min-width: 92px;
  border: 0;
  border-left: 1px solid rgba(148, 163, 184, .18);
  padding: 0 24px;
  background: #2563eb;
  color: #fff;
  font-size: 15px;
  font-weight: 850;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}

.welcome-page-button:hover {
  background: #1d4ed8;
}

.welcome-page-button.auto-ready {
  animation: roomStartHint 1.8s ease-in-out infinite;
}

@keyframes roomStartHint {
  0%, 100% {
    box-shadow: 0 16px 30px -18px rgba(37, 99, 235, .55);
  }
  50% {
    box-shadow: 0 18px 34px -14px rgba(37, 99, 235, .85);
  }
}

.welcome-page-button:active {
  transform: scale(.98);
}

.dashboard-modal-submit {
  width: 100%;
  min-height: 52px;
  margin-top: 8px;
  border: 0;
  border-radius: 14px;
  background: #2563eb;
  color: #fff;
  font-size: 16px;
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 14px 30px -14px rgba(37, 99, 235, .75);
  transition: transform .25s ease, background-color .25s ease;
}

.dashboard-modal-submit:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
}

body.dark .dashboard-app {
  color: #e2e8f0;
}

body.dark .dashboard-hero-copy h2,
body.dark .room-modal-content h2 {
  color: #fff;
}

body.dark .dashboard-hero-copy p,
body.dark .dashboard-stat-card h3,
body.dark .dashboard-stat-card p,
body.dark .dashboard-stat-value span:last-child,
body.dark .room-modal-content > p,
body.dark .room-modal-form label {
  color: #cbd5e1;
}

body.dark .dashboard-stat-value:not(.gradient-blue):not(.gradient-indigo) {
  color: #fff;
}

body.dark .dashboard-direct-status.detecting {
  color: #cbd5e1;
}

body.dark .dashboard-direct-status.available {
  color: #4ade80;
}

body.dark .dashboard-direct-status.limited {
  color: #fbbf24;
}

body.dark .dashboard-stat-value.gradient-blue,
body.dark .dashboard-app:not(.in-room) .dashboard-stat-value.gradient-blue {
  background-image: linear-gradient(90deg, #93c5fd, #a5b4fc);
  color: transparent;
  -webkit-text-fill-color: transparent;
}

body.dark .dashboard-stat-value.gradient-indigo,
body.dark .dashboard-app:not(.in-room) .dashboard-stat-value.gradient-indigo {
  background-image: linear-gradient(90deg, #a5b4fc, #d8b4fe);
  color: transparent;
  -webkit-text-fill-color: transparent;
}

body.dark .dashboard-stat-card:nth-child(2) .dashboard-card-bg {
  color: rgba(59, 130, 246, .20);
}

body.dark .dashboard-stat-card:nth-child(3) .dashboard-card-bg {
  color: rgba(99, 102, 241, .20);
}

body.dark .dashboard-stat-icon.blue {
  color: #93c5fd;
  background: rgba(30, 58, 138, .6);
}

body.dark .dashboard-stat-icon.indigo {
  color: #a5b4fc;
  background: rgba(49, 46, 129, .6);
}

body.dark .room-modal-overlay {
  background: rgba(15, 23, 42, .62);
}

body.dark .join-meeting-container {
  border-color: rgba(148, 163, 184, .24);
  background: rgba(15, 23, 42, .48);
}

body.dark .join-meeting-container:focus-within {
  border-color: #60a5fa;
  background: rgba(15, 23, 42, .72);
}

body.dark .room-modal-form .enter-room-input::placeholder {
  color: #cbd5e1;
}

@media (max-width: 720px) {
  .dashboard-app {
    width: min(100%, calc(100vw - 32px));
    margin-top: 10px;
  }

  .dashboard-hero {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    gap: 20px;
  }

  .dashboard-start-btn {
    width: 100%;
  }

  .dashboard-stat-card {
    min-height: 136px;
    padding: 12px;
    border-radius: 18px;
  }

  .dashboard-stat-card p {
    display: none;
  }

  .room-modal-content {
    padding: 32px;
    border-radius: 32px;
  }
}

body.dark {
  color-scheme: dark;
  --bg: #101521;
  --card: #191f2d;
  --panel: #202838;
  --panel-2: #182131;
  --text: #edf2ff;
  --muted: #a8b3c7;
  --line: #313c52;
  --accent: #5b8cff;
  --accent-hover: #79a3ff;
  --danger: #fb7185;
  --success: #22c55e;
  --shadow: 0 22px 54px rgba(0, 0, 0, .35);
  --soft-shadow: 0 10px 28px rgba(0, 0, 0, .20);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background-color: #f5f5f7;
  background-image:
    radial-gradient(at 0% 0%, hsla(210, 100%, 93%, 1) 0px, transparent 50%),
    radial-gradient(at 100% 0%, hsla(280, 100%, 95%, 1) 0px, transparent 50%),
    radial-gradient(at 100% 100%, hsla(190, 100%, 90%, 1) 0px, transparent 50%),
    radial-gradient(at 0% 100%, hsla(240, 100%, 95%, 1) 0px, transparent 50%);
  background-attachment: fixed;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

body.dark {
  background:
    linear-gradient(135deg, rgba(30, 58, 138, .28), transparent 36%),
    linear-gradient(225deg, rgba(88, 28, 135, .24), transparent 34%),
    linear-gradient(45deg, rgba(15, 118, 110, .18), transparent 38%),
    #101521;
  background-attachment: fixed;
}

button, input, select, textarea { font: inherit; }
button { white-space: nowrap; }
.hidden { display: none !important; }

/* ==============================
   预加载页：完整迁移自参考文件，独立作用域
   ============================== */
.preload-view {
  --bg-color: #f4f5f7;
  --text-color: #334155;
  --icon-bg: #ffffff;
  --icon-color: #3b82f6;
  --ring-color: rgba(59, 130, 246, 0.3);
  --gradient-1: hsla(210, 100%, 93%, 1);
  --gradient-2: hsla(280, 100%, 95%, 1);
  --gradient-3: hsla(190, 100%, 90%, 1);
  --gradient-4: hsla(240, 100%, 95%, 1);
  position: fixed;
  inset: 0;
  z-index: 9999;
  width: 100vw;
  height: 100vh;
  display: none;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: var(--bg-color);
  color: var(--text-color);
  background-image:
    radial-gradient(at 0% 0%, var(--gradient-1) 0px, transparent 50%),
    radial-gradient(at 100% 0%, var(--gradient-2) 0px, transparent 50%),
    radial-gradient(at 100% 100%, var(--gradient-3) 0px, transparent 50%),
    radial-gradient(at 0% 100%, var(--gradient-4) 0px, transparent 50%);
  background-attachment: fixed;
  transition: background-color 0.5s ease, color 0.5s ease;
}

@media (prefers-color-scheme: dark) {
  .preload-view {
    --bg-color: #0f172a;
    --text-color: #f1f5f9;
    --icon-bg: #1e293b;
    --icon-color: #60a5fa;
    --ring-color: rgba(96, 165, 250, 0.3);
    --gradient-1: hsla(210, 100%, 15%, 1);
    --gradient-2: hsla(280, 100%, 15%, 1);
    --gradient-3: hsla(190, 100%, 15%, 1);
    --gradient-4: hsla(240, 100%, 15%, 1);
  }
}

html.dark .preload-view,
body.dark .preload-view {
  --bg-color: #0f172a;
  --text-color: #f1f5f9;
  --icon-bg: #1e293b;
  --icon-color: #60a5fa;
  --ring-color: rgba(96, 165, 250, 0.3);
  --gradient-1: hsla(210, 100%, 15%, 1);
  --gradient-2: hsla(280, 100%, 15%, 1);
  --gradient-3: hsla(190, 100%, 15%, 1);
  --gradient-4: hsla(240, 100%, 15%, 1);
}

html.preload-active .preload-view {
  display: flex;
}

html.preload-active .shell {
  display: none !important;
}

.preload-view .loader-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.preload-view .logo-wrapper {
  position: relative;
  width: 80px;
  height: 80px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preload-view .logo-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: var(--icon-bg);
  color: var(--icon-color);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  z-index: 2;
  transition: background-color 0.5s ease, color 0.5s ease;
  animation: preload-breathe 3s ease-in-out infinite;
}

.preload-view .pulse-ring {
  position: absolute;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: var(--ring-color);
  z-index: 1;
  animation: preload-pulse 3s ease-out infinite;
  transition: background-color 0.5s ease;
}

.preload-view .loading-text {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.05em;
  opacity: 0.8;
  animation: preload-text-fade 1.5s ease-in-out infinite;
}

@keyframes preload-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

@keyframes preload-pulse {
  0% { transform: scale(1); opacity: 0.8; }
  80% { transform: scale(1.6); opacity: 0; }
  100% { transform: scale(1.6); opacity: 0; }
}

@keyframes preload-text-fade {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 0.9; }
}

html.app-booting #home-dashboard-btn,
html.app-booting #open-login-dialog,
html.app-booting #open-register-dialog,
html.app-booting #hero-login-btn,
html.app-booting #hero-register-btn {
  display: none !important;
}

body:has(.landing-page:not(.hidden)) .shell {
  width: 100%;
  max-width: none;
  margin: 0;
}

.landing-page {
  width: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #1e293b;
  overflow-x: hidden;
}

.landing-header {
  width: 100%;
  max-width: 1280px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 32px;
  position: relative;
  z-index: 10;
}

.landing-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.landing-brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #3b82f6, #4f46e5);
  color: #fff;
  box-shadow: 0 8px 18px rgba(37, 99, 235, .24);
}

.landing-brand-mark svg,
.landing-feature-icon svg,
.landing-primary-cta svg,
.landing-theme-toggle svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.landing-brand-mark svg {
  width: 20px;
  height: 20px;
}

.landing-brand h1 {
  color: #0f172a;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.025em;
}

.landing-brand span {
  display: block;
  margin-top: 4px;
  color: #2563eb;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .13em;
  line-height: 1;
  text-transform: uppercase;
  opacity: .82;
}

.landing-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
}

.landing-theme-toggle,
.landing-login-link,
.landing-center-btn,
.landing-register-btn,
.landing-primary-cta,
.landing-secondary-cta,
.auth-submit,
.auth-switch button {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.landing-theme-toggle {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  border-radius: 999px;
  background: transparent;
  color: #64748b;
  transition: background .18s ease, color .18s ease;
}

.landing-theme-toggle:hover {
  background: rgba(255, 255, 255, .60);
  color: #0f172a;
}

.landing-theme-toggle svg {
  width: 20px;
  height: 20px;
  transition: transform .45s ease, opacity .45s ease, color .45s ease;
}

.landing-theme-toggle .theme-sun {
  position: absolute;
  color: #f59e0b;
  opacity: 0;
  transform: rotate(90deg);
}

body.dark .landing-theme-toggle .theme-moon {
  opacity: 0;
  transform: rotate(-90deg);
}

body.dark .landing-theme-toggle .theme-sun {
  opacity: 1;
  transform: rotate(0);
}

.landing-login-link,
.landing-center-btn {
  min-height: 40px;
  padding: 8px 10px;
  background: transparent;
  color: #334155;
  font-size: 14px;
  font-weight: 750;
  transition: color .18s ease;
}

.landing-login-link:hover,
.landing-center-btn:hover {
  color: #0f172a;
}

.landing-center-btn {
  padding-inline: 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .55);
  border: 1px solid rgba(255, 255, 255, .78);
  box-shadow: 0 6px 18px -12px rgba(15, 23, 42, .35);
  backdrop-filter: blur(10px);
  transition: background .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.landing-center-btn:hover {
  background: rgba(255, 255, 255, .78);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px -14px rgba(15, 23, 42, .45);
}

.landing-register-btn {
  min-height: 42px;
  padding: 10px 20px;
  border-radius: 999px;
  background: #0f172a;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 8px 20px -6px rgba(0, 0, 0, .30);
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}

.landing-register-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  background: #1e293b;
  box-shadow: 0 12px 24px -6px rgba(0, 0, 0, .40);
}

.landing-register-btn:disabled,
.landing-register-btn.disabled {
  cursor: not-allowed;
  opacity: .68;
  transform: none;
}

.landing-main {
  width: 100%;
  max-width: 1280px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 10;
  padding: 40px 32px 80px;
  text-align: center;
}

.landing-glow {
  position: absolute;
  top: 46%;
  left: 50%;
  width: 80vw;
  height: 50vh;
  border-radius: 999px;
  background: rgba(96, 165, 250, .20);
  filter: blur(100px);
  transform: translate(-50%, -50%);
  z-index: -1;
  pointer-events: none;
}

.landing-main h2 {
  max-width: 980px;
  color: #0f172a;
  font-size: clamp(44px, 7vw, 72px);
  font-weight: 950;
  letter-spacing: -.055em;
  line-height: 1.08;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .42);
}

.landing-main > p {
  max-width: 672px;
  margin-top: 24px;
  margin-bottom: 40px;
  color: #64748b;
  font-size: clamp(18px, 2vw, 20px);
  font-weight: 600;
  line-height: 1.72;
}

.landing-main > p strong {
  color: #1e293b;
  font-weight: 900;
}

.landing-cta-row {
  width: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 16px;
}

.landing-cta-row.single-action {
  justify-content: center;
}

.landing-cta-row.single-action .landing-primary-cta {
  min-width: 180px;
}

.landing-primary-cta,
.landing-secondary-cta {
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 18px;
  padding: 16px 32px;
  font-size: 16px;
  font-weight: 900;
  transition: transform .20s ease, background .20s ease, box-shadow .20s ease;
}

.landing-primary-cta {
  background: #2563eb;
  color: #fff;
  box-shadow: 0 10px 25px -5px rgba(37, 99, 235, .40);
}

.landing-primary-cta:hover {
  transform: translateY(-4px);
  background: #1d4ed8;
}

.landing-primary-cta svg {
  width: 20px;
  height: 20px;
}

.landing-secondary-cta {
  border: 1px solid #fff;
  background: rgba(255, 255, 255, .60);
  color: #334155;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.landing-secondary-cta:hover:not(:disabled) {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, .82);
}

.landing-secondary-cta:disabled,
.landing-secondary-cta.disabled {
  cursor: not-allowed;
  opacity: .62;
}

.landing-features {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 96px;
  text-align: left;
}

.landing-feature {
  min-height: 292px;
  padding: 32px;
  border-radius: 32px;
  transition: transform .30s ease;
}

.landing-feature:hover {
  transform: translateY(-8px);
}

.landing-feature-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin-bottom: 24px;
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55);
}

.landing-feature-icon svg {
  width: 24px;
  height: 24px;
}

.landing-feature-icon.blue {
  background: #dbeafe;
  color: #2563eb;
}

.landing-feature-icon.indigo {
  background: #e0e7ff;
  color: #4f46e5;
}

.landing-feature-icon.emerald {
  background: #d1fae5;
  color: #059669;
}

.landing-feature h3 {
  margin-bottom: 12px;
  color: #1e293b;
  font-size: 20px;
  font-weight: 900;
}

.landing-feature p {
  color: #64748b;
  font-size: 14px;
  line-height: 1.72;
}

.landing-invite {
  width: min(460px, calc(100vw - 32px));
  display: grid;
  gap: 14px;
  margin-top: 28px;
  padding: 22px;
  border-radius: 28px;
  text-align: left;
}

.landing-invite-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.landing-invite-head h3 {
  color: #0f172a;
  font-size: 20px;
  font-weight: 900;
}

.landing-invite-head p {
  margin-top: 5px;
  color: #64748b;
  font-size: 13px;
}

.landing-invite-head span {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(37, 99, 235, .10);
  color: #2563eb;
  font-size: 12px;
  font-weight: 900;
}

.landing-invite label,
.auth-modal-panel label {
  display: grid;
  gap: 8px;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.landing-invite .landing-primary-cta {
  width: 100%;
  min-height: 48px;
  margin-top: 2px;
  padding: 12px 18px;
  border-radius: 14px;
}

.landing-compat {
  display: none;
}

.glass-input {
  min-height: 50px;
  border: 1px solid rgba(255, 255, 255, .80);
  border-radius: 12px;
  background: rgba(255, 255, 255, .50);
  color: #1e293b;
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 500;
  outline: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background .24s ease, border-color .24s ease, box-shadow .24s ease;
}

.glass-input::placeholder {
  color: #94a3b8;
}

.glass-input:focus {
  border-color: #3b82f6;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, .15);
}

#auth-dialog.native-dialog {
  width: min(448px, calc(100vw - 32px));
  border: 0;
  border-radius: 32px;
  padding: 0;
  background: transparent;
  box-shadow: 0 28px 80px rgba(15, 23, 42, .22);
}

#confirm-dialog.native-dialog {
  width: min(448px, calc(100vw - 32px));
  border: 0;
  border-radius: 32px;
  padding: 0;
  background: transparent;
  box-shadow: 0 28px 80px rgba(15, 23, 42, .22);
}

#auth-dialog.native-dialog::backdrop {
  background: rgba(15, 23, 42, .30);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

#confirm-dialog.native-dialog::backdrop {
  background: rgba(15, 23, 42, .30);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

#auth-dialog.native-dialog[open] {
  animation: landingModalIn .40s cubic-bezier(.16, 1, .3, 1);
}

#confirm-dialog.native-dialog[open] {
  animation: landingModalIn .40s cubic-bezier(.16, 1, .3, 1);
}

#auth-dialog.native-dialog.dialog-closing {
  animation: landingModalOut .24s ease-in forwards;
}

#confirm-dialog.native-dialog.dialog-closing {
  animation: landingModalOut .24s ease-in forwards;
}

#auth-dialog.native-dialog[open]::backdrop {
  animation: backdropIn .24s ease-out;
}

#confirm-dialog.native-dialog[open]::backdrop {
  animation: backdropIn .24s ease-out;
}

#auth-dialog.native-dialog.dialog-closing::backdrop {
  animation: backdropOut .18s ease-in forwards;
}

#confirm-dialog.native-dialog.dialog-closing::backdrop {
  animation: backdropOut .18s ease-in forwards;
}

#auth-dialog.native-dialog[data-nonmodal-dialog] {
  position: fixed;
  inset: 0;
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 16px;
  border: 0;
  border-radius: 0;
  display: none;
  place-items: center;
  overflow: auto;
  background: rgba(15, 23, 42, .30);
  box-shadow: none;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 2000;
}

#auth-dialog.native-dialog[data-nonmodal-dialog][open] {
  display: grid;
  animation: backdropIn .24s ease-out;
}

#auth-dialog.native-dialog[data-nonmodal-dialog].dialog-closing {
  animation: backdropOut .18s ease-in forwards;
}

#auth-dialog.native-dialog[data-nonmodal-dialog][open] .auth-modal-content {
  width: min(448px, calc(100vw - 32px));
  max-width: 448px;
  box-sizing: border-box;
  animation: landingModalIn .40s cubic-bezier(.16, 1, .3, 1);
}

#auth-dialog.native-dialog[data-nonmodal-dialog].dialog-closing .auth-modal-content {
  animation: landingModalOut .24s ease-in forwards;
}

@keyframes landingModalIn {
  from {
    opacity: 0;
    transform: scale(.95) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes landingModalOut {
  from {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
  to {
    opacity: 0;
    transform: scale(.96) translateY(8px);
  }
}

.auth-modal-content {
  position: relative;
  width: 100%;
  margin: 0;
  padding: 32px;
  border-radius: 32px;
  text-align: left;
}

.auth-modal-view h2 {
  color: #0f172a;
  font-size: 24px;
  font-weight: 950;
  line-height: 1.2;
  margin: 0 48px 8px 0;
}

.auth-modal-view > p {
  margin: 0 0 32px;
  color: #64748b;
  font-size: 14px;
  line-height: 1.55;
}

.confirm-modal-view > p {
  margin-bottom: 28px;
}

.confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.confirm-actions.single {
  grid-template-columns: 1fr;
}

.confirm-cancel-btn,
.confirm-submit-btn {
  min-height: 48px;
  border: 0;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 850;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
}

.confirm-cancel-btn {
  background: rgba(241, 245, 249, .76);
  color: #475569;
  border: 1px solid rgba(255, 255, 255, .72);
}

.confirm-submit-btn {
  background: #2563eb;
  color: #fff;
  box-shadow: 0 12px 26px -14px rgba(37, 99, 235, .75);
}

.confirm-submit-btn.danger {
  background: #dc2626;
  box-shadow: 0 12px 26px -14px rgba(220, 38, 38, .82);
}

.confirm-cancel-btn:hover,
.confirm-submit-btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.confirm-cancel-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.confirm-submit-btn:hover:not(:disabled) {
  background: #1d4ed8;
}

.confirm-submit-btn.danger:hover:not(:disabled) {
  background: #b91c1c;
}

.confirm-submit-btn:disabled {
  cursor: wait;
  opacity: .78;
}

.auth-view-form {
  display: grid;
}

.login-view-form {
  gap: 20px;
}

.register-view-form {
  gap: 16px;
}

.auth-field {
  display: grid;
  gap: 8px;
}

.auth-field label {
  display: block;
  margin-left: 4px;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  line-height: 1.2;
  text-transform: uppercase;
  text-align: left;
}

.auth-submit-wrap {
  padding-top: 8px;
}

.register-submit-wrap {
  padding-top: 16px;
}

.auth-submit {
  width: 100%;
  min-height: 50px;
  margin-top: 0;
  border-radius: 12px;
  background: #2563eb;
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(37, 99, 235, .24);
  transition: transform .18s ease, background .18s ease;
}

.auth-submit:hover {
  transform: translateY(-2px);
  background: #1d4ed8;
}

.register-submit {
  background: #0f172a;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .20);
}

.register-submit:hover {
  background: #1e293b;
}

.auth-switch {
  margin-top: 24px;
  text-align: center;
  color: #64748b;
  font-size: 14px;
}

.auth-switch button {
  background: transparent;
  color: #2563eb;
  font-weight: 900;
}

.auth-switch button:hover {
  text-decoration: underline;
}

.auth-switch button:disabled {
  cursor: not-allowed;
  color: #94a3b8;
  text-decoration: none;
}

.auth-modal-content .form-status,
.landing-invite .form-status {
  min-height: 20px;
  margin-top: 12px;
  color: #64748b;
  font-size: 13px;
  text-align: center;
}

.auth-modal-content .form-status:empty {
  display: none;
}

body.dark .landing-page {
  color: #e2e8f0;
}

body.dark .landing-brand h1,
body.dark .landing-main h2,
body.dark .landing-main > p strong,
body.dark .landing-feature h3,
body.dark .landing-invite-head h3,
body.dark .auth-modal-view h2 {
  color: #f8fafc;
}

body.dark .landing-main > p,
body.dark .landing-feature p,
body.dark .landing-invite-head p,
body.dark .auth-modal-view > p,
body.dark .auth-switch {
  color: #cbd5e1;
}

body.dark .confirm-cancel-btn {
  border-color: rgba(148, 163, 184, .24);
  background: rgba(30, 41, 59, .62);
  color: #cbd5e1;
}

body.dark .confirm-cancel-btn:hover {
  background: rgba(51, 65, 85, .82);
  color: #fff;
}

body.dark .landing-login-link,
body.dark .landing-center-btn {
  color: #cbd5e1;
}

body.dark .landing-login-link:hover,
body.dark .landing-center-btn:hover {
  color: #fff;
}

body.dark .landing-center-btn {
  border-color: rgba(148, 163, 184, .22);
  background: rgba(30, 41, 59, .54);
}

body.dark .landing-secondary-cta,
body.dark .glass-input {
  border-color: rgba(148, 163, 184, .24);
  background: rgba(30, 41, 59, .62);
  color: #e2e8f0;
}

body.dark .glass-input:focus {
  border-color: #60a5fa;
  background: rgba(30, 41, 59, .86);
}

@media (max-width: 720px) {
  .landing-header {
    padding: 20px 16px;
  }

  .landing-actions {
    gap: 8px;
  }

  .landing-theme-toggle {
    display: none;
  }

  .landing-login-link {
    min-height: 36px;
    padding-inline: 4px;
  }

  .landing-center-btn {
    min-height: 36px;
    padding: 8px 10px;
  }

  .landing-register-btn {
    min-height: 38px;
    padding: 9px 15px;
  }

  .landing-main {
    justify-content: flex-start;
    padding: 54px 16px 64px;
  }

  .landing-main h2 {
    font-size: clamp(40px, 13vw, 56px);
  }

  .landing-main > p {
    margin-top: 18px;
    margin-bottom: 32px;
    font-size: 17px;
  }

  .landing-cta-row {
    width: 100%;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 10px;
  }

  .landing-primary-cta,
  .landing-secondary-cta {
    width: auto;
    flex: 1 1 0;
    min-width: 0;
    padding-inline: 14px;
  }

  .landing-cta-row.single-action {
    width: 100%;
    justify-content: center;
  }

  .landing-cta-row.single-action .landing-primary-cta {
    flex: 0 1 auto;
    min-width: 180px;
    max-width: min(100%, 260px);
  }

  .landing-features {
    grid-template-columns: 1fr;
    gap: 18px;
    margin-top: 64px;
  }

  .landing-feature {
    min-height: 0;
    padding: 26px;
    border-radius: 28px;
  }

  .auth-modal-content {
    padding: 30px 24px;
  }
}

.native-dialog {
  width: min(440px, calc(100vw - 28px));
  border: 0;
  border-radius: 12px;
  padding: 0;
  color: var(--text);
  background: transparent;
  box-shadow: var(--shadow);
}

#account-panel {
  width: min(760px, calc(100vw - 28px));
}

.room-tool-dialog {
  width: min(760px, calc(100vw - 28px));
  max-height: calc(100dvh - 32px);
  overflow: visible;
  box-shadow: var(--shadow);
}

.chat-dialog {
  width: min(560px, calc(100vw - 28px));
}

.diagnostics-dialog {
  position: fixed;
  inset: 0;
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 14px;
  box-sizing: border-box;
  border: 0;
  border-radius: 0;
  outline: none;
  background: transparent;
  overflow: hidden;
  box-shadow: none;
}

.diagnostics-dialog:focus {
  outline: none;
}

.room-tool-dialog .dialog-panel {
  max-height: calc(100dvh - 32px);
  overflow: auto;
}

.native-dialog[open] {
  animation: dialogIn .16s ease-out;
}

.native-dialog.dialog-closing {
  animation: dialogOut .14s ease-in forwards;
}

.diagnostics-dialog[open] {
  display: grid;
  place-items: center;
  animation: none;
}

.diagnostics-dialog.dialog-closing {
  animation: none;
}

.diagnostics-dialog[open] .diagnostics-panel {
  animation: diagnosticsPanelIn .16s ease-out;
}

.diagnostics-dialog.dialog-closing .diagnostics-panel {
  animation: diagnosticsPanelOut .14s ease-in forwards;
}

.native-dialog::backdrop {
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(6px);
}

.native-dialog[open]::backdrop {
  animation: backdropIn .16s ease-out;
}

.native-dialog.dialog-closing::backdrop {
  animation: backdropOut .14s ease-in forwards;
}

@keyframes dialogIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes dialogOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(8px) scale(.985);
  }
}

@keyframes diagnosticsPanelIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes diagnosticsPanelOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(8px) scale(.985);
  }
}

@keyframes backdropIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes backdropOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

.dialog-panel {
  margin: 0;
  width: 100%;
}

.media-toggle {
  width: 100%;
  margin-top: 8px;
}

.settings-stack,
.settings-sliders {
  display: grid;
  gap: 14px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.setting-field {
  min-width: 0;
}

.quality-field {
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: center;
}

.controls.dialog-panel {
  display: grid;
  gap: 16px;
}

.controls.dialog-panel .panel-head,
.chat-panel.dialog-panel .panel-head {
  margin-bottom: 0;
}

.controls.dialog-panel .control-buttons {
  margin: 0;
}

.diagnostics-hint {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  font-weight: 650;
}

.diagnostics-body {
  display: grid;
  gap: 12px;
}

.diagnostics-summary {
  display: grid;
  grid-template-columns: repeat(2, max-content);
  align-items: center;
  gap: 8px 10px;
  min-width: 0;
  overflow: visible;
}

.diagnostic-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, .22);
  background: rgba(248, 250, 252, .78);
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}

.diagnostic-pill.ok {
  border-color: rgba(34, 197, 94, .22);
  background: rgba(220, 252, 231, .72);
  color: #15803d;
}

.diagnostic-pill.warn {
  border-color: rgba(245, 158, 11, .22);
  background: rgba(254, 243, 199, .72);
  color: #b45309;
}

.diagnostic-pill.bad {
  border-color: rgba(239, 68, 68, .20);
  background: rgba(254, 226, 226, .72);
  color: #dc2626;
}

.diagnostic-card-list {
  display: grid;
  gap: 10px;
}

.diagnostic-card {
  border: 1px solid rgba(226, 232, 240, .84);
  border-radius: 16px;
  background: rgba(255, 255, 255, .58);
  padding: 11px 12px 12px;
  box-shadow: 0 14px 30px -22px rgba(15, 23, 42, .28);
}

.diagnostic-card-head {
  display: grid;
  grid-template-columns: minmax(86px, .55fr) minmax(0, 1.55fr);
  grid-template-areas:
    "name metrics"
    "badge metrics";
  align-items: center;
  gap: 1px 10px;
  margin-bottom: 9px;
}

.diagnostic-card-head strong {
  grid-area: name;
  min-width: 0;
  overflow: hidden;
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.diagnostic-head-meta {
  min-width: 0;
  display: contents;
}

.diagnostic-room-traffic {
  grid-column: 1 / -1;
  min-width: 0;
  overflow: visible;
}

.diagnostic-head-meta .diagnostic-pill {
  grid-area: badge;
  justify-self: start;
  max-width: 100%;
  min-height: 15px;
  padding: 1px 6px;
  font-size: 10px;
  line-height: 1;
}

.diagnostic-traffic-line {
  display: grid;
  grid-area: metrics;
  grid-template-columns: repeat(2, max-content);
  align-items: center;
  justify-content: end;
  gap: 3px 10px;
  min-width: 0;
  color: #475569;
  font-size: 11px;
  font-weight: 760;
  font-stretch: normal;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
  white-space: nowrap;
}

.diagnostic-traffic-line.room-total {
  grid-area: auto;
  grid-template-columns: repeat(3, max-content);
  justify-content: start;
}

.diagnostic-traffic-item {
  display: grid;
  grid-template-columns: max-content 8ch;
  align-items: baseline;
  column-gap: 3px;
  justify-content: start;
  min-width: 0;
  overflow: hidden;
}

.diagnostic-traffic-item em {
  color: #94a3b8;
  font-style: normal;
  justify-self: start;
}

.diagnostic-traffic-item b {
  min-width: 0;
  overflow: hidden;
  color: #334155;
  font-size: 11px;
  font-weight: 820;
  font-stretch: normal;
  justify-self: start;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.diagnostic-traffic-line.room-total .diagnostic-traffic-item b {
  min-width: 0;
}

.diagnostic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.diagnostic-row {
  min-width: 0;
  border-radius: 12px;
  background: rgba(248, 250, 252, .72);
  padding: 8px 10px;
}

.diagnostic-row span {
  display: block;
  margin-bottom: 5px;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 850;
}

.diagnostic-row b {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: #334155;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.diagnostic-row b.ok {
  color: #16a34a;
}

.diagnostic-row b.warn {
  color: #d97706;
}

.diagnostic-row b.bad {
  color: #dc2626;
}

.diagnostics-empty {
  border-radius: 14px;
  background: rgba(248, 250, 252, .70);
  color: #64748b;
  font-size: 13px;
  font-weight: 750;
  padding: 14px;
}

.diagnostics-empty.error {
  color: #dc2626;
  background: rgba(254, 226, 226, .68);
}

.settings-sliders .slider-line {
  margin-top: 0;
}

.shell {
  width: min(1660px, calc(100vw - 40px));
  margin: 22px auto;
}

.app-card {
  background: var(--card);
  border: 1px solid rgba(220, 229, 241, .92);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: clamp(24px, 3vw, 38px);
}

.app-card.app.in-room {
  width: 100%;
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: clamp(10px, 2vw, 24px);
}

.glass-panel {
  background: rgba(255, 255, 255, .65);
  border: 1px solid rgba(255, 255, 255, .82);
  box-shadow: 0 10px 40px -10px rgba(15, 23, 42, .10);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

body.dark .glass-panel {
  background: rgba(25, 31, 45, .68);
  border-color: rgba(148, 163, 184, .22);
  box-shadow: 0 18px 44px -18px rgba(0, 0, 0, .42);
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.app.in-room .app-header {
  width: 100%;
  max-width: 1152px;
  margin: 0 auto clamp(16px, 3vw, 32px);
  padding: 8px clamp(4px, 1.6vw, 24px);
  flex-wrap: nowrap;
}

.app.in-room .brand {
  flex-shrink: 0;
  gap: 12px;
}

.app.in-room .brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  color: #fff;
  font-size: 22px;
  background: linear-gradient(135deg, #3b82f6, #4f46e5);
  box-shadow: 0 8px 18px rgba(37, 99, 235, .24);
}

.app.in-room h1 {
  font-size: 20px;
  letter-spacing: -.02em;
}

.app.in-room .brand-badge {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #2563eb;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.app.in-room .top-actions {
  flex: 1;
  min-width: 0;
  gap: 8px;
  flex-wrap: nowrap;
  justify-content: flex-end;
  overflow-x: auto;
  scrollbar-width: none;
}

.app.in-room .top-actions > * {
  flex-shrink: 0;
}

.app.in-room .top-actions::-webkit-scrollbar {
  display: none;
}

.app.in-room .user-pill {
  border-color: rgba(255, 255, 255, .9);
  background: rgba(255, 255, 255, .58);
  color: #64748b;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .03);
  backdrop-filter: blur(8px);
}

.app.in-room .top-actions .btn,
.app.in-room .top-actions .theme-chip {
  min-height: 36px;
  padding: 7px 12px;
  border-color: rgba(255, 255, 255, .66);
  background: rgba(255, 255, 255, .46);
  box-shadow: none;
}

.app.in-room #logout-btn {
  color: #fff;
  border-color: #0f172a;
  background: #0f172a;
  padding-inline: 18px;
}

.icon-action {
  width: 38px;
  min-width: 38px;
  padding: 0;
  display: inline-grid;
  place-items: center;
}

.icon-action svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app.in-room footer {
  display: none;
}

.brand {
  display: flex;
  gap: 14px;
  align-items: center;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #3b82f6, #4f46e5);
  color: #fff;
  box-shadow: 0 8px 18px rgba(37, 99, 235, .22);
}

.brand-mark svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(28px, 2.5vw, 38px); line-height: 1.1; }
h2 { font-size: clamp(23px, 2vw, 30px); line-height: 1.18; }
h3 { font-size: 18px; line-height: 1.25; }
p, .hint { color: var(--muted); line-height: 1.65; }

.brand-badge, .badge, .user-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(47, 109, 246, .06);
  color: var(--accent);
  font-weight: 800;
  font-size: 13px;
}

.app > .app-header .top-actions {
  flex-basis: auto;
  width: auto;
  justify-content: flex-start;
  padding: 0;
  border-radius: 0;
  border: 0;
  background: transparent;
}

.top-actions, .inline-actions, .checks, .status-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.auth-card {
  min-height: min(760px, calc(100vh - 44px));
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 460px);
  gap: 24px;
  align-items: stretch;
}

.auth-intro {
  min-height: 420px;
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 52px);
  background:
    linear-gradient(180deg, rgba(47, 109, 246, .08), rgba(20, 184, 166, .06)),
    var(--panel);
  border: 1px solid var(--line);
  display: grid;
  align-content: center;
  gap: 18px;
}

.auth-intro h2 { font-size: clamp(32px, 4vw, 54px); }
.auth-stack { display: grid; gap: 16px; align-content: start; }
.auth-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.auth-actions .btn { width: 100%; }
.status-strip span {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--muted);
  font-weight: 750;
}

.theme-chip, .btn {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--text);
  padding: 9px 16px;
  cursor: pointer;
  font-weight: 800;
  box-shadow: 0 1px 0 rgba(15, 23, 42, .03);
}

.btn:hover, .theme-chip:hover { border-color: rgba(47, 109, 246, .45); }
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn.primary:hover { background: var(--accent-hover); }
.btn-soft { background: var(--panel-2); }
.btn-danger {
  color: var(--danger);
  border-color: rgba(220, 38, 38, .28);
  background: rgba(220, 38, 38, .06);
}

.panel, .mini-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--soft-shadow);
}
.panel { margin-bottom: 18px; }

.diagnostics-panel.dialog-panel {
  width: min(560px, calc(100vw - 28px));
  max-width: calc(100vw - 28px);
  min-width: 0;
  box-sizing: border-box;
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 18px 20px;
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.diagnostics-panel.dialog-panel .panel-head {
  margin-bottom: 0;
}

.mini-panel { display: grid; gap: 13px; }

.panel-head, .room-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.compact-head { margin-bottom: 0; }

.grid { display: grid; gap: 18px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(190px, 1fr)); }
.lobby-grid { grid-template-columns: minmax(0, 1.45fr) minmax(330px, .75fr); }
.lobby-grid-single { grid-template-columns: minmax(320px, 560px); }
.room-grid { grid-template-columns: minmax(0, 1.8fr) minmax(360px, .8fr); align-items: stretch; }
.form-stack { display: grid; gap: 14px; align-content: start; }

.account-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.account-form label {
  min-width: 0;
}

.account-form .account-submit {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 760;
}

input, select, textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  outline: none;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 109, 246, .14);
}

@media (max-width: 640px) {
  .account-form {
    grid-template-columns: 1fr;
  }
}

.compact-input { min-width: 240px; }
.badges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

.control-buttons { margin: 16px 0; }
.legacy-audio-toggle { display: none !important; }
.check-row { display: inline-flex; align-items: center; gap: 7px; }
.check-row input { width: auto; min-height: 0; }
.check-row label { display: inline; color: var(--text); font-weight: 760; }

.mode-preset-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--card);
}

.mode-preset-card .btn {
  width: max-content;
}

.mode-preset-card span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.meter-row {
  display: grid;
  grid-template-columns: 86px 1fr;
  align-items: center;
  gap: 12px;
  margin: 14px 0;
  color: var(--muted);
  font-weight: 760;
}
.meter {
  height: 18px;
  background: #cfd6df;
  border-radius: 999px;
  overflow: hidden;
}
.meter i {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #22c55e, #facc15, #ef4444);
  transition: width .08s linear;
}

.slider-line {
  grid-template-columns: 92px 1fr 64px;
  align-items: center;
  margin-top: 12px;
}

.chat-panel {
  min-height: min(520px, calc(100dvh - 72px));
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 14px;
}
.chat-messages {
  min-height: 340px;
  max-height: min(520px, calc(100dvh - 210px));
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, .24);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .72), rgba(255, 255, 255, .38)),
    var(--card);
  border-radius: var(--radius-lg);
  padding: 12px;
}
.chat-line { margin-bottom: 11px; }
.chat-line .meta { color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.chat-line .bubble {
  display: inline-block;
  max-width: 88%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .72);
  border-radius: 16px 16px 16px 6px;
  padding: 9px 12px;
  line-height: 1.45;
  word-break: break-word;
}
.chat-line.self { text-align: right; }
.chat-line.self .bubble {
  background: rgba(47, 109, 246, .14);
  border-color: rgba(47, 109, 246, .28);
  border-radius: 16px 16px 6px 16px;
}
.chat-line.system { text-align: center; }
.chat-line.system .bubble {
  max-width: 100%;
  color: var(--muted);
  border-radius: 999px;
  background: rgba(100, 116, 139, .08);
}
.chat-input {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 0;
}

body.dark .chat-messages {
  border-color: rgba(148, 163, 184, .18);
  background:
    linear-gradient(180deg, rgba(30, 41, 59, .58), rgba(15, 23, 42, .36)),
    var(--card);
}

body.dark .chat-line .bubble {
  background: rgba(30, 41, 59, .72);
}

body.dark .chat-line.self .bubble {
  background: rgba(47, 109, 246, .20);
}

.member-list {
  flex: 1;
  list-style: none;
  padding: 14px;
  margin: 0;
  display: grid;
  align-content: start;
  gap: 12px;
  overflow: auto;
}
.member-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, .86);
  background: rgba(255, 255, 255, .66);
  border-radius: 18px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, .04);
}
.member-list li.speaking {
  border-color: rgba(59, 130, 246, .72);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .12), 0 8px 20px rgba(15, 23, 42, .07);
}

body.dark .member-list li {
  border-color: rgba(148, 163, 184, .18);
  background: rgba(30, 41, 59, .62);
}

.member-person {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.member-meta {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.member-avatar-wrap {
  position: relative;
  flex: none;
}

.member-avatar {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .9);
  background: linear-gradient(135deg, #e2e8f0, #f8fafc);
  color: #475569;
  font-size: 17px;
  font-weight: 950;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
}

.member-online-dot {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 14px;
  height: 14px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #10b981;
}

.member-name-row {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.member-name-row strong {
  min-width: 0;
  color: #1e293b;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.dark .member-name-row strong {
  color: #f8fafc;
}

.member-self {
  color: #94a3b8;
  font-size: 12px;
}

.member-role-row {
  min-width: 0;
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  margin-top: 4px;
}

.member-role {
  width: max-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 3px 7px;
  border-radius: 7px;
  border: 1px solid rgba(59, 130, 246, .18);
  background: rgba(219, 234, 254, .75);
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.member-endpoint {
  appearance: none;
  min-width: 0;
  flex: 0 1 auto;
  max-width: 170px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}

.member-role.muted {
  flex: none;
  border-color: rgba(220, 38, 38, .18);
  background: rgba(254, 226, 226, .78);
  color: #dc2626;
}

.member-mic-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 999px;
  border: 1px solid rgba(226, 232, 240, .8);
  background: rgba(241, 245, 249, .60);
  color: #64748b;
}

.member-mic-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.member-list li.speaking .member-mic-icon {
  color: #2563eb;
  background: rgba(219, 234, 254, .8);
  border-color: rgba(59, 130, 246, .26);
}

.member-actions {
  width: 100%;
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: flex-end;
  grid-column: 1 / -1;
}

.member-mute-btn {
  flex-shrink: 0;
  min-height: 32px;
  padding: 7px 12px;
  border-radius: 10px;
  border: 1px solid rgba(244, 63, 94, .16);
  background: rgba(255, 241, 242, .82);
  color: #f43f5e;
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
  transition: background .16s ease, transform .16s ease;
}

.member-mute-btn:hover {
  background: rgba(255, 228, 230, .92);
  transform: translateY(-1px);
}

.member-mute-btn.active {
  color: #2563eb;
  border-color: rgba(59, 130, 246, .16);
  background: rgba(219, 234, 254, .82);
}
.mini-btn {
  min-height: 32px;
  padding: 6px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  font-weight: 760;
}
.mini-btn.warn { color: #d97706; }
.mini-btn.danger { color: var(--danger); }
.status-bar, .form-status { min-height: 22px; color: var(--muted); margin-top: 10px; }
footer { text-align: center; color: var(--muted); margin: 20px 0 4px; }

#room-view {
  padding-bottom: 86px;
}

.room-layout {
  width: 100%;
  min-width: 0;
  max-width: 1152px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(320px, 4fr);
  gap: clamp(16px, 3vw, 32px);
  align-items: start;
}

.room-hero,
.member-panel {
  border-radius: 28px;
  overflow: hidden;
}

.room-hero {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: clamp(18px, 3vw, 26px);
  padding: clamp(22px, 3vw, 32px);
}

.room-hero-main {
  min-width: 0;
  max-width: 100%;
  display: grid;
  gap: clamp(18px, 3vw, 28px);
}

.room-hero-top {
  min-width: 0;
  max-width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.room-hero-top > div:first-child {
  min-width: 0;
  flex: 1 1 auto;
}

.room-title {
  margin-top: 0;
  max-width: 100%;
  font-size: clamp(34px, 4vw, 48px);
  line-height: 1;
  letter-spacing: -.045em;
  color: #0f172a;
  font-weight: 950;
  white-space: nowrap;
  overflow: hidden;
  word-break: normal;
}

.room-title span {
  display: block;
  min-width: 0;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
}

body.dark .room-title {
  color: #f8fafc;
}

.wave-bars {
  flex: 0 0 auto;
  width: 72px;
  height: 48px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 6px;
  opacity: .9;
  padding-bottom: 4px;
  position: relative;
  z-index: 3;
  cursor: pointer;
  outline: none;
  border-radius: 12px;
  pointer-events: auto;
  transition: opacity .18s ease, transform .18s ease;
}

.wave-bars:hover,
.wave-bars:focus-visible {
  opacity: 1;
  transform: translateY(-1px);
}

.wave-bars i {
  width: 6px;
  height: 24px;
  border-radius: 999px 999px 0 0;
  background: #3b82f6;
  animation: soundWave 1.2s ease-in-out infinite;
  transform-origin: bottom;
  pointer-events: none;
}

.wave-bars i:nth-child(2) {
  height: 48px;
  background: #6366f1;
  animation-delay: .18s;
}

.wave-bars i:nth-child(3) {
  height: 32px;
  background: #8b5cf6;
  animation-delay: .34s;
}

.wave-bars i:nth-child(4) {
  height: 20px;
  background: #60a5fa;
  animation-delay: .12s;
}

.wave-bars i:nth-child(5) {
  height: 28px;
  background: #818cf8;
  animation-delay: .28s;
}

@keyframes soundWave {
  0%, 100% { transform: scaleY(.34); }
  50% { transform: scaleY(1); }
}

.room-stats {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: 12px;
}

.room-stat {
  min-width: 0;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  padding: 8px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .72);
  background: rgba(255, 255, 255, .46);
  box-shadow: 0 2px 10px rgba(15, 23, 42, .03);
  backdrop-filter: blur(10px);
}

.room-stat span {
  color: #94a3b8;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  white-space: nowrap;
}

.room-stat b {
  min-width: 0;
  color: #1e293b;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.room-stat #quality-badge {
  color: #2563eb;
}

body.dark .room-stat #quality-badge {
  color: #67e8f9;
}

body.dark .room-stat {
  border-color: rgba(148, 163, 184, .24);
  background: rgba(30, 41, 59, .52);
  color: #cbd5e1;
}

body.dark .room-stat b {
  color: #f8fafc;
}

.room-toast {
  width: max-content;
  max-width: min(100%, 520px);
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .82);
  background: rgba(255, 255, 255, .64);
  color: var(--muted);
  box-shadow: 0 8px 22px rgba(15, 23, 42, .08);
  font-size: 13px;
  font-weight: 760;
  backdrop-filter: blur(12px);
}

.room-toast.error {
  color: var(--danger);
  border-color: rgba(244, 63, 94, .22);
  background: rgba(255, 241, 242, .82);
}

.usage-card {
  width: max-content;
  min-width: 150px;
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  padding: 9px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .72);
  background: rgba(255, 255, 255, .42);
  box-shadow: 0 2px 10px rgba(15, 23, 42, .03);
  backdrop-filter: blur(10px);
}

.usage-row {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.usage-row .usage-card,
.capture-row .usage-card {
  width: 100%;
  min-width: 0;
}

.capture-row {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.capture-card b {
  font-size: 15px;
}

.usage-card span {
  color: #94a3b8;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  white-space: nowrap;
}

.usage-card b {
  color: #1e293b;
  font-size: 18px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.capture-card {
  align-items: flex-start;
}

.copyable-actual {
  cursor: pointer;
}

body.dark .usage-card {
  border-color: rgba(148, 163, 184, .24);
  background: rgba(30, 41, 59, .52);
}

body.dark .usage-card b {
  color: #f8fafc;
}

.room-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  padding-top: 22px;
  margin-top: 22px;
  border-top: 1px solid rgba(148, 163, 184, .22);
  overflow-x: auto;
  scrollbar-width: none;
}

.room-actions::-webkit-scrollbar {
  display: none;
}

.room-action-spacer {
  flex: 1 1 auto;
  min-width: 24px;
}

.glass-action {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .70);
  background: rgba(255, 255, 255, .46);
  color: #334155;
  padding: 11px 22px;
  cursor: pointer;
  font-weight: 850;
  box-shadow: 0 2px 12px rgba(15, 23, 42, .04);
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

#copy-invite-btn {
  flex: 0 0 auto;
}

.glass-action:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, .82);
}

.glass-action svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.glass-action.danger {
  color: #dc2626;
}

body.dark .glass-action.danger {
  color: #fda4af;
  border-color: rgba(251, 113, 133, .45);
  background: rgba(244, 63, 94, .14);
}

body.dark .glass-action.danger:hover {
  color: #ffe4e6;
  border-color: rgba(253, 164, 175, .62);
  background: rgba(244, 63, 94, .24);
}

.glass-action.primary-dark {
  color: #fff;
  border-color: #0f172a;
  background: #0f172a;
  box-shadow: 0 12px 24px -12px rgba(15, 23, 42, .55);
}

.glass-action.primary-dark:hover {
  background: #1e293b;
}

.member-panel {
  height: 420px;
  display: flex;
  flex-direction: column;
}

.member-panel-head {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(148, 163, 184, .22);
  background: rgba(255, 255, 255, .30);
}

.member-panel-head h3 {
  font-size: 18px;
  color: #1e293b;
}

body.dark .member-panel-head h3 {
  color: #f8fafc;
}

.member-count-pill {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  color: #fff;
  background: #0f172a;
  font-size: 12px;
  font-weight: 900;
}

.audio-dock {
  position: fixed;
  left: 50%;
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 50;
  width: min(680px, calc(100vw - 32px));
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 12px;
  padding: 9px 18px;
  border: 1px solid rgba(255, 255, 255, .64);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .70), rgba(255, 255, 255, .34)),
    rgba(236, 242, 250, .54);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .72),
    inset 0 -1px 0 rgba(15, 23, 42, .06),
    0 18px 52px rgba(15, 23, 42, .18);
  backdrop-filter: blur(22px) saturate(1.65);
  -webkit-backdrop-filter: blur(22px) saturate(1.65);
  transform: translateX(-50%);
}

body.dark .audio-dock {
  border-color: rgba(148, 163, 184, .30);
  background:
    linear-gradient(135deg, rgba(30, 41, 59, .72), rgba(15, 23, 42, .46)),
    rgba(15, 23, 42, .54);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .12),
    inset 0 -1px 0 rgba(0, 0, 0, .25),
    0 18px 52px rgba(0, 0, 0, .32);
}

.dock-levels,
.dock-icon-btn {
  min-width: 0;
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  color: var(--text);
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
}

.dock-levels {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  overflow: visible;
}

.dock-side {
  min-width: 0;
  min-height: 42px;
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: 0;
  padding: 7px 7px;
  color: var(--text);
  background: transparent;
  cursor: pointer;
  text-align: left;
  box-shadow: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
}

.dock-icon-btn {
  position: relative;
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--accent);
  flex: none;
  width: 42px;
  height: 42px;
}

.dock-side:hover,
.dock-icon-btn:hover {
  background: rgba(255, 255, 255, .42);
}

body.dark .dock-side:hover,
body.dark .dock-icon-btn:hover {
  background: rgba(30, 41, 59, .34);
}

.dock-side:focus,
.dock-side:focus-visible,
.dock-side:active,
.dock-icon-btn:focus,
.dock-icon-btn:focus-visible,
.dock-icon-btn:active {
  outline: none;
  box-shadow: none;
}

.dock-divider {
  width: 1px;
  height: 32px;
  flex: none;
  background: rgba(148, 163, 184, .28);
}

.dock-side.muted {
  color: var(--muted);
}

.dock-icon {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--accent);
  font-size: 18px;
  font-weight: 900;
}

.dock-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dock-icon-btn svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dock-side.muted .dock-icon {
  color: var(--muted);
}

.dock-content {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.dock-line {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
}

.dock-title {
  font-size: 12px;
  font-weight: 850;
  line-height: 1.1;
  min-width: 0;
}

.dock-state {
  color: var(--muted);
  font-size: 10px;
  font-weight: 760;
  line-height: 1.1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dock-meter {
  position: relative;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(100, 116, 139, .22);
}

.dock-meter i {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22c55e, #facc15, #ef4444);
  transition: width .08s linear;
}

.dock-side.muted .dock-meter i {
  opacity: .45;
  filter: grayscale(1);
}

.dock-chat-wrap {
  position: relative;
  min-width: 0;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
}

.dock-chat-wrap .dock-icon-btn {
  width: 100%;
  height: 100%;
}

.dock-unread {
  position: absolute;
  top: 5px;
  right: 5px;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.chat-toast {
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);
  width: min(260px, calc(100vw - 28px));
  padding: 9px 11px;
  border: 1px solid rgba(255, 255, 255, .62);
  border-radius: 15px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .82), rgba(255, 255, 255, .50)),
    rgba(236, 242, 250, .72);
  color: var(--text);
  box-shadow: 0 16px 42px rgba(15, 23, 42, .18);
  backdrop-filter: blur(18px) saturate(1.45);
  -webkit-backdrop-filter: blur(18px) saturate(1.45);
  font-size: 13px;
  line-height: 1.35;
  word-break: break-word;
  pointer-events: none;
  animation: chatToastIn .16s ease-out;
}

.chat-toast.toast-fading {
  animation: chatToastOut .24s ease-in forwards;
}

.chat-toast.error {
  border-color: rgba(244, 63, 94, .32);
  background:
    linear-gradient(135deg, rgba(255, 241, 242, .92), rgba(255, 228, 230, .76)),
    rgba(255, 241, 242, .82);
  color: #be123c;
}

.chat-toast::after {
  content: "";
  position: absolute;
  right: 16px;
  bottom: -6px;
  width: 12px;
  height: 12px;
  transform: rotate(45deg);
  border-right: 1px solid rgba(255, 255, 255, .62);
  border-bottom: 1px solid rgba(255, 255, 255, .62);
  background: rgba(255, 255, 255, .70);
}

body.dark .chat-toast {
  border-color: rgba(148, 163, 184, .30);
  background:
    linear-gradient(135deg, rgba(30, 41, 59, .84), rgba(15, 23, 42, .62)),
    rgba(15, 23, 42, .72);
  box-shadow: 0 16px 42px rgba(0, 0, 0, .35);
}

body.dark .chat-toast::after {
  border-color: rgba(148, 163, 184, .30);
  background: rgba(30, 41, 59, .78);
}

body.dark .chat-toast.error {
  border-color: rgba(244, 63, 94, .28);
  background:
    linear-gradient(135deg, rgba(127, 29, 29, .86), rgba(76, 5, 25, .72)),
    rgba(127, 29, 29, .72);
  color: #fecdd3;
}

@keyframes chatToastIn {
  from {
    opacity: 0;
    transform: translateY(6px) scale(.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes chatToastOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(6px) scale(.98);
  }
}

@media (max-width: 720px) {
  #room-view {
    padding-bottom: 74px;
  }

  .app-card.app.in-room {
    padding: 8px 0 14px;
  }

  .app.in-room .app-header {
    margin-bottom: 14px;
    padding-inline: 2px;
    gap: 10px;
  }

  .app.in-room .top-actions {
    flex-wrap: nowrap;
    overflow-x: auto;
    width: auto;
  }

  .room-layout {
    width: 100%;
    max-width: calc(100vw - 16px);
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .room-hero {
    min-height: 0;
    border-radius: 24px;
    padding: 18px 14px;
  }

  .room-title {
    font-size: clamp(26px, 9.2vw, 40px);
  }

  .room-hero-top {
    align-items: flex-end;
    gap: 8px;
  }

  .wave-bars {
    width: 46px;
    height: 36px;
    gap: 3px;
    padding-bottom: 2px;
  }

  .wave-bars i {
    width: 4px;
    height: 18px;
  }

  .wave-bars i:nth-child(2) {
    height: 34px;
  }

  .wave-bars i:nth-child(3) {
    height: 26px;
  }

  .wave-bars i:nth-child(4) {
    height: 16px;
  }

  .wave-bars i:nth-child(5) {
    height: 22px;
  }

  .room-stats {
    gap: 6px;
  }

  .room-stat {
    min-width: 0;
    padding: 7px 8px;
    border-radius: 14px;
  }

  .room-stat span {
    font-size: 8px;
    letter-spacing: .03em;
  }

  .room-stat b {
    font-size: 11px;
  }

  .usage-card {
    min-width: 132px;
    padding: 8px 12px;
  }

  .usage-row {
    gap: 6px;
  }

  .usage-row .usage-card,
  .capture-row .usage-card {
    min-width: 0;
    padding: 8px 8px;
    border-radius: 14px;
  }

  .usage-row .usage-card span,
  .capture-row .usage-card span {
    font-size: 8px;
    letter-spacing: .03em;
  }

  .usage-row .usage-card b {
    font-size: 13px;
  }

  .capture-row .usage-card b {
    font-size: 12px;
  }

  .room-actions {
    gap: 8px;
    padding-top: 16px;
    margin-top: 16px;
  }

  .glass-action {
    min-height: 42px;
    padding: 9px 13px;
    border-radius: 14px;
    font-size: 13px;
  }

  .room-action-spacer {
    min-width: 8px;
  }

  .member-panel {
    height: 320px;
    border-radius: 24px;
  }

  .member-panel-head {
    min-height: 56px;
    padding: 14px 16px;
  }

  .member-list {
    padding: 12px;
  }

  .member-list li {
    padding: 12px;
    border-radius: 16px;
  }

  .audio-dock {
    width: calc(100vw - 16px);
    grid-template-columns: 36px minmax(0, 1fr) 36px;
    bottom: max(12px, env(safe-area-inset-bottom));
    border-radius: 18px;
    padding: 7px 10px;
    gap: 7px;
  }

  .dock-levels,
  .dock-icon-btn {
    min-height: 40px;
  }

  .dock-levels {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 7px;
  }

  .dock-side {
    min-height: 40px;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 5px;
    padding: 5px 3px;
    border-radius: 0;
  }

  .dock-divider {
    display: none;
  }

  .dock-icon {
    width: 22px;
    height: 22px;
    border-radius: 10px;
    font-size: 15px;
  }

  .dock-icon svg {
    width: 17px;
    height: 17px;
  }

  .dock-icon-btn {
    width: 36px;
    height: 40px;
  }

  .dock-chat-wrap {
    width: 36px;
    height: 40px;
  }

  .dock-title {
    font-size: 11px;
  }

  .dock-state {
    font-size: 10px;
  }

  .room-tool-dialog {
    width: calc(100vw - 18px);
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .quality-field {
    grid-template-columns: 1fr;
  }

  .room-tool-dialog .dialog-panel {
    max-height: calc(100dvh - 18px);
  }

  .chat-panel {
    min-height: min(520px, calc(100dvh - 28px));
  }

  .chat-messages {
    min-height: 260px;
    max-height: calc(100dvh - 220px);
  }

  .chat-toast {
    right: -2px;
    width: min(230px, calc(100vw - 22px));
  }
}

@media (max-width: 380px) {
  .room-hero {
    padding: 16px 12px;
  }

  .room-title {
    font-size: clamp(24px, 8.2vw, 34px);
  }

  .wave-bars {
    width: 34px;
    gap: 2px;
  }

  .wave-bars i {
    width: 3px;
  }

  .room-stats,
  .usage-row,
  .capture-row {
    gap: 5px;
  }

  .room-stat,
  .usage-row .usage-card,
  .capture-row .usage-card {
    padding-inline: 6px;
  }

  .room-stat span,
  .usage-row .usage-card span,
  .capture-row .usage-card span {
    font-size: 7px;
    letter-spacing: 0;
  }

  .room-stat b,
  .usage-row .usage-card b {
    font-size: 11px;
  }
}

.dashboard-app .dashboard-header {
  padding: 8px clamp(4px, 1.6vw, 24px);
  flex-wrap: nowrap;
  margin-bottom: clamp(24px, 4vw, 40px);
}

.dashboard-app .dashboard-brand {
  gap: clamp(8px, 1.4vw, 16px);
}

.dashboard-app .dashboard-brand-mark {
  width: clamp(32px, 4vw, 40px);
  height: clamp(32px, 4vw, 40px);
  border-radius: 999px;
  background: linear-gradient(135deg, #3b82f6, #4f46e5);
  box-shadow: 0 8px 18px rgba(37, 99, 235, .24);
}

.dashboard-app .dashboard-brand-subtitle {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #2563eb;
}

.dashboard-app .dashboard-actions {
  flex-wrap: nowrap;
}

.dashboard-app .dashboard-user-pill {
  border: 1px solid rgba(255, 255, 255, .9);
  background: rgba(255, 255, 255, .6);
  color: #64748b;
}

body.dark .dashboard-app .dashboard-user-pill {
  background: rgba(30, 41, 59, .6);
  border-color: rgba(255, 255, 255, .1);
  color: #94a3b8;
}

@media (max-width: 720px) {
  .dashboard-app .dashboard-header {
    padding: 8px 0;
    margin-bottom: 24px;
  }
}

.route-dashboard #auth-view {
  display: none !important;
}

.route-dashboard #app-view.hidden {
  display: block !important;
  visibility: hidden;
}

.dashboard-app:not(.in-room) {
  width: min(1152px, calc(100vw - 32px));
  margin: 34px auto 0;
}

.dashboard-app:not(.in-room) #site-footer {
  display: none;
}

.dashboard-app:not(.in-room) .dashboard-header {
  padding: 8px 0;
  margin-bottom: 58px;
  max-width: 1152px;
}

.dashboard-app:not(.in-room) .dashboard-brand {
  gap: 16px;
  cursor: pointer;
}

.dashboard-app:not(.in-room) .dashboard-brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #3b82f6, #4f46e5);
  box-shadow: 0 8px 18px rgba(37, 99, 235, .24);
}

.dashboard-app:not(.in-room) .dashboard-brand-mark svg,
.dashboard-app:not(.in-room) .dashboard-icon-btn svg,
.dashboard-app:not(.in-room) .dashboard-start-btn svg,
.dashboard-app:not(.in-room) .dashboard-stat-card svg,
.room-modal-overlay svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-app:not(.in-room) .dashboard-brand-mark svg {
  width: 21px;
  height: 21px;
  color: #fff;
}

.dashboard-app:not(.in-room) .dashboard-brand h1 {
  font-size: 20px;
  font-weight: 850;
  color: #0f172a;
  letter-spacing: 0;
}

.dashboard-app:not(.in-room) .dashboard-brand-subtitle {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  line-height: 1;
  font-weight: 750;
  letter-spacing: .14em;
  color: #2563eb;
  text-transform: uppercase;
}

.dashboard-app:not(.in-room) .dashboard-actions {
  gap: 14px;
}

.dashboard-app:not(.in-room) .dashboard-user-pill {
  min-height: 30px;
  padding: 5px 13px;
  border-radius: 999px;
  font-size: 14px;
  color: #64748b;
  background: rgba(255, 255, 255, .6);
  border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: 0 2px 4px rgba(15, 23, 42, .02);
  backdrop-filter: blur(8px);
}

.dashboard-app:not(.in-room) .dashboard-icon-btn {
  width: 36px;
  height: 36px;
  color: #0f172a;
  background: transparent;
}

.dashboard-app:not(.in-room) .dashboard-theme-btn .theme-dark-icon {
  color: #64748b;
}

.dashboard-app:not(.in-room) .dashboard-logout {
  min-height: 38px;
  padding: 8px 23px;
  border-radius: 999px;
  background: #0f172a;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 10px 20px -12px rgba(15, 23, 42, .75);
}

.dashboard-app:not(.in-room) .dashboard-main {
  gap: 32px;
}

.dashboard-app:not(.in-room) .dashboard-hero {
  min-height: auto;
  padding: 40px;
  border-radius: 32px;
  background: rgba(255, 255, 255, .65);
  border: 1px solid rgba(255, 255, 255, .8);
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, .08);
}

.dashboard-app:not(.in-room) .dashboard-hero-copy h2 {
  margin-bottom: 10px;
  font-size: 32px;
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -.02em;
  color: #0f172a;
}

.dashboard-app:not(.in-room) .dashboard-hero-copy p {
  font-size: 16px;
  color: #64748b;
  font-weight: 520;
}

.dashboard-app:not(.in-room) .dashboard-start-btn {
  min-height: 56px;
  padding: 16px 34px;
  border-radius: 18px;
  font-size: 16px;
  font-weight: 850;
  background: #2563eb;
  box-shadow: 0 10px 25px -5px rgba(37, 99, 235, .4);
}

.dashboard-app:not(.in-room) .dashboard-stat-grid {
  gap: 24px;
}

.dashboard-app:not(.in-room) .dashboard-stat-card {
  min-height: 216px;
  padding: 24px;
  border-radius: 28px;
  background: rgba(255, 255, 255, .65);
  border: 1px solid rgba(255, 255, 255, .8);
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, .08);
}

.dashboard-app:not(.in-room) .dashboard-stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  margin-bottom: 24px;
}

.dashboard-app:not(.in-room) .dashboard-stat-icon svg {
  width: 20px;
  height: 20px;
}

.dashboard-app:not(.in-room) .dashboard-card-bg {
  width: 128px;
  height: 128px;
  right: -16px;
  bottom: -16px;
}

.dashboard-app:not(.in-room) .dashboard-stat-card h3 {
  margin-bottom: 7px;
  font-size: 11px;
  font-weight: 850;
  color: #64748b;
  letter-spacing: .08em;
}

.dashboard-app:not(.in-room) .dashboard-stat-value {
  font-size: 32px;
  font-weight: 900;
}

.dashboard-app:not(.in-room) .dashboard-stat-value.non-member {
  font-size: 30px;
}

.dashboard-app:not(.in-room) .dashboard-stat-value span:last-child {
  font-size: 14px;
}

.dashboard-app:not(.in-room) .dashboard-stat-card p {
  display: block;
  margin-top: 10px;
  font-size: 12px;
  color: #64748b;
  font-weight: 650;
}

.dashboard-app:not(.in-room) .room-modal-form label {
  text-align: left;
}

body.dark .dashboard-app:not(.in-room) .dashboard-brand h1,
body.dark .dashboard-app:not(.in-room) .dashboard-hero-copy h2 {
  color: #fff;
}

body.dark .dashboard-app:not(.in-room) .dashboard-hero,
body.dark .dashboard-app:not(.in-room) .dashboard-stat-card {
  background: rgba(30, 41, 59, .65);
  border-color: rgba(255, 255, 255, .08);
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, .5);
}

@media (max-width: 720px) {
  .dashboard-app:not(.in-room) {
    width: min(100%, calc(100vw - 32px));
    margin-top: 20px;
  }

  .dashboard-app:not(.in-room) .dashboard-header {
    margin-bottom: 28px;
  }

  .dashboard-app:not(.in-room) .dashboard-brand {
    gap: 8px;
  }

  .dashboard-app:not(.in-room) .dashboard-brand-mark {
    width: 32px;
    height: 32px;
  }

  .dashboard-app:not(.in-room) .dashboard-brand h1 {
    font-size: 18px;
  }

  .dashboard-app:not(.in-room) .dashboard-brand-subtitle,
  .dashboard-app:not(.in-room) .dashboard-user-pill,
  .dashboard-app:not(.in-room) .dashboard-admin-link {
    display: none;
  }

  .dashboard-app:not(.in-room) .dashboard-actions {
    gap: 4px;
  }

  .dashboard-app:not(.in-room) .dashboard-icon-btn {
    width: 34px;
    height: 34px;
  }

  .dashboard-app:not(.in-room) .dashboard-logout {
    min-height: 34px;
    padding: 7px 14px;
    font-size: 12px;
  }

  .dashboard-app:not(.in-room) .dashboard-main {
    gap: 16px;
  }

  .dashboard-app:not(.in-room) .dashboard-hero {
    min-height: 0;
    padding: 20px;
    border-radius: 24px;
    align-items: flex-start;
  }

  .dashboard-app:not(.in-room) .dashboard-hero-copy h2 {
    font-size: 24px;
  }

  .dashboard-app:not(.in-room) .dashboard-hero-copy p {
    font-size: 13px;
  }

  .dashboard-app:not(.in-room) .dashboard-start-btn {
    width: 100%;
    min-height: 50px;
    padding: 14px 20px;
    border-radius: 14px;
    font-size: 14px;
  }

  .dashboard-app:not(.in-room) .dashboard-stat-grid {
    gap: 8px;
  }

  .dashboard-app:not(.in-room) .dashboard-stat-card {
    min-height: 136px;
    padding: 12px;
    border-radius: 18px;
  }

  .dashboard-app:not(.in-room) .dashboard-stat-icon {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    margin-bottom: 12px;
  }

  .dashboard-app:not(.in-room) .dashboard-stat-icon svg {
    width: 16px;
    height: 16px;
  }

  .dashboard-app:not(.in-room) .dashboard-card-bg {
    width: 64px;
    height: 64px;
  }

  .dashboard-app:not(.in-room) .dashboard-stat-card h3 {
    font-size: 9px;
  }

  .dashboard-app:not(.in-room) .dashboard-stat-value,
  .dashboard-app:not(.in-room) .dashboard-stat-value.non-member {
    font-size: 18px;
  }

  .dashboard-app:not(.in-room) .dashboard-stat-value span:last-child {
    font-size: 9px;
  }

  .dashboard-app:not(.in-room) .dashboard-stat-card p {
    display: none;
  }
}

/* Dashboard reference alignment: mirrors the supplied Tailwind page structure. */
.dashboard-app:not(.in-room) {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 2rem 0 0;
}

.dashboard-app:not(.in-room) .dashboard-header {
  width: 100%;
  max-width: 72rem;
  min-height: 0;
  margin: 0 auto 2.5rem;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
  position: relative;
  z-index: 10;
}

.dashboard-app:not(.in-room) .dashboard-main {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.5rem;
  gap: 2rem;
}

.dashboard-app:not(.in-room) .dashboard-brand {
  gap: 1rem;
}

.dashboard-app:not(.in-room) .dashboard-brand-mark {
  width: 2.5rem;
  height: 2.5rem;
  color: #fff;
  background: linear-gradient(to bottom right, #3b82f6, #4f46e5);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, .10), 0 2px 4px -2px rgba(0, 0, 0, .10);
}

.dashboard-app:not(.in-room) .dashboard-brand-mark svg {
  width: 1.25rem;
  height: 1.25rem;
}

.dashboard-app:not(.in-room) .dashboard-brand h1 {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -.025em;
  color: #0f172a;
}

.dashboard-app:not(.in-room) .dashboard-brand-subtitle {
  display: block;
  margin-top: .25rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: #2563eb;
  font-size: 11px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  opacity: .8;
}

.dashboard-app:not(.in-room) .dashboard-actions {
  gap: .75rem;
}

.dashboard-app:not(.in-room) .dashboard-icon-btn {
  width: 2.25rem;
  height: 2.25rem;
}

.dashboard-app:not(.in-room) .dashboard-hero {
  padding: 2.5rem;
  border-radius: 1.5rem;
}

.dashboard-app:not(.in-room) .dashboard-hero-copy {
  position: relative;
  z-index: 10;
  margin-bottom: 0;
}

.dashboard-app:not(.in-room) .dashboard-hero-copy h2 {
  margin: 0 0 .5rem;
  font-size: 1.875rem;
  line-height: 2.25rem;
  font-weight: 800;
  letter-spacing: -.025em;
  color: #0f172a;
}

.dashboard-app:not(.in-room) .dashboard-hero-copy p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.5rem;
  color: #64748b;
}

body.dark .dashboard-app:not(.in-room) .dashboard-brand h1,
body.dark .dashboard-app:not(.in-room) .dashboard-hero-copy h2 {
  color: #fff;
}

body.dark .dashboard-app:not(.in-room) .dashboard-brand-subtitle {
  color: #60a5fa;
}

body.dark .dashboard-app:not(.in-room) .dashboard-hero-copy p {
  color: #cbd5e1;
}

@media (max-width: 720px) {
  .dashboard-app:not(.in-room) {
    padding-top: 1rem;
  }

  .dashboard-app:not(.in-room) .dashboard-header {
    max-width: 72rem;
    margin-bottom: 1.5rem;
    padding: .5rem 1rem;
  }

  .dashboard-app:not(.in-room) .dashboard-main {
    padding: 0 1rem;
    gap: 1rem;
  }

  .dashboard-app:not(.in-room) .dashboard-brand {
    gap: .5rem;
  }

  .dashboard-app:not(.in-room) .dashboard-brand-mark {
    width: 2rem;
    height: 2rem;
  }

  .dashboard-app:not(.in-room) .dashboard-brand-mark svg {
    width: 1rem;
    height: 1rem;
  }

  .dashboard-app:not(.in-room) .dashboard-brand h1 {
    font-size: 1.125rem;
  }

  .dashboard-app:not(.in-room) .dashboard-brand-subtitle {
    display: none;
  }

  .dashboard-app:not(.in-room) .dashboard-hero {
    padding: 1.25rem;
  }

  .dashboard-app:not(.in-room) .dashboard-hero-copy {
    margin-bottom: 1.25rem;
  }

  .dashboard-app:not(.in-room) .dashboard-hero-copy h2 {
    margin-bottom: .25rem;
    font-size: 1.5rem;
    line-height: 2rem;
  }

  .dashboard-app:not(.in-room) .dashboard-hero-copy p {
    font-size: .75rem;
    line-height: 1rem;
  }
}

.dashboard-app:not(.in-room) .dashboard-stat-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
  padding: 1.5rem;
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, .65);
  border: 1px solid rgba(255, 255, 255, .8);
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, .08);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  transition-property: transform;
  transition-timing-function: cubic-bezier(.4, 0, .2, 1);
  transition-duration: 150ms;
}

.dashboard-app:not(.in-room) .dashboard-stat-card:hover {
  transform: translateY(-.25rem);
}

.dashboard-app:not(.in-room) .dashboard-card-bg {
  right: -1rem;
  bottom: -1rem;
  width: 8rem;
  height: 8rem;
  transform: rotate(-12deg);
  transition: transform 150ms cubic-bezier(.4, 0, .2, 1);
  transform-origin: center;
  will-change: transform;
}

.dashboard-app:not(.in-room) .dashboard-stat-card:first-child .dashboard-card-bg {
  transform: rotate(12deg);
}

.dashboard-app:not(.in-room) .dashboard-stat-card:last-child .dashboard-card-bg {
  transform: rotate(6deg);
}

.dashboard-app:not(.in-room) .dashboard-stat-card:hover .dashboard-card-bg {
  transform: rotate(-12deg) scale(1.1);
}

.dashboard-app:not(.in-room) .dashboard-stat-card:first-child:hover .dashboard-card-bg {
  transform: rotate(12deg) scale(1.1);
}

.dashboard-app:not(.in-room) .dashboard-stat-card:last-child:hover .dashboard-card-bg {
  transform: rotate(6deg) scale(1.1);
}

body.dark .dashboard-app:not(.in-room) .dashboard-stat-card {
  background: rgba(30, 41, 59, .65);
  border-color: rgba(255, 255, 255, .08);
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, .5);
}

@media (max-width: 720px) {
  .dashboard-app:not(.in-room) .dashboard-stat-card {
    padding: .75rem;
    border-radius: 1rem;
  }

  .dashboard-app:not(.in-room) .dashboard-card-bg {
    width: 4rem;
    height: 4rem;
  }
}

body,
.glass-panel,
.glass-input,
.dashboard-app:not(.in-room),
.dashboard-app:not(.in-room) .dashboard-brand h1,
.dashboard-app:not(.in-room) .dashboard-brand-subtitle,
.dashboard-app:not(.in-room) .dashboard-user-pill,
.dashboard-app:not(.in-room) .dashboard-icon-btn,
.dashboard-app:not(.in-room) .dashboard-logout,
.dashboard-app:not(.in-room) .dashboard-hero,
.dashboard-app:not(.in-room) .dashboard-hero-copy h2,
.dashboard-app:not(.in-room) .dashboard-hero-copy p,
.dashboard-app:not(.in-room) .dashboard-stat-card,
.dashboard-app:not(.in-room) .dashboard-stat-card h3,
.dashboard-app:not(.in-room) .dashboard-stat-card p,
.dashboard-app:not(.in-room) .dashboard-stat-value,
.dashboard-app:not(.in-room) .dashboard-stat-value span {
  transition:
    background-color .5s ease,
    background .5s ease,
    border-color .5s ease,
    color .5s ease,
    box-shadow .5s ease,
    opacity .45s ease,
    transform .25s ease;
}

.dashboard-app:not(.in-room) .dashboard-theme-btn .theme-dark-icon,
.dashboard-app:not(.in-room) .dashboard-theme-btn .theme-light-icon {
  transition: transform .5s cubic-bezier(.16, 1, .3, 1), opacity .5s ease, color .5s ease;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  background:
    linear-gradient(135deg, rgba(30, 58, 138, .28), transparent 36%),
    linear-gradient(225deg, rgba(88, 28, 135, .24), transparent 34%),
    linear-gradient(45deg, rgba(15, 118, 110, .18), transparent 38%),
    #101521;
  transition: opacity .55s ease;
}

body.dark::before {
  opacity: 1;
}

body.dark {
  background-color: #f5f5f7;
  background-image:
    radial-gradient(at 0% 0%, hsla(210, 100%, 93%, 1) 0px, transparent 50%),
    radial-gradient(at 100% 0%, hsla(280, 100%, 95%, 1) 0px, transparent 50%),
    radial-gradient(at 100% 100%, hsla(190, 100%, 90%, 1) 0px, transparent 50%),
    radial-gradient(at 0% 100%, hsla(240, 100%, 95%, 1) 0px, transparent 50%);
}

.shell {
  position: relative;
  z-index: 1;
}

body.dark .dashboard-hero-copy p,
body.dark .dashboard-stat-card p,
body.dark .dashboard-stat-value span:last-child,
body.dark .room-modal-content > p,
body.dark .room-modal-form label,
body.dark .room-stat span,
body.dark .usage-card span,
body.dark .member-meta,
body.dark .member-role-row,
body.dark .dock-title,
body.dark .dock-state,
body.dark .chat-line .meta,
body.dark .panel .hint,
body.dark .setting-field,
body.dark .slider-line {
  color: #cbd5e1;
}

body.dark .dashboard-stat-card h3,
body.dark .member-panel-head h3,
body.dark .room-stat b,
body.dark .usage-card b,
body.dark .panel-head h3,
body.dark .panel-head h2,
body.dark .room-title {
  color: #f8fafc;
}

body.dark .dashboard-app:not(.in-room) .dashboard-stat-card h3,
body.dark .dashboard-app.in-room .dashboard-stat-card h3 {
  color: #e2e8f0;
}

body.dark .dashboard-app:not(.in-room) .dashboard-hero-copy p,
body.dark .dashboard-app:not(.in-room) .dashboard-stat-card p,
body.dark .dashboard-app:not(.in-room) .dashboard-stat-value span:last-child {
  color: #cbd5e1;
}

body.dark .diagnostics-hint,
body.dark .diagnostics-empty {
  color: #cbd5e1;
}

body.dark .diagnostic-card {
  border-color: rgba(71, 85, 105, .7);
  background: rgba(15, 23, 42, .42);
}

body.dark .diagnostic-card-head strong {
  color: #f8fafc;
}

body.dark .diagnostic-row {
  background: rgba(15, 23, 42, .46);
}

body.dark .diagnostic-row span {
  color: #94a3b8;
}

body.dark .diagnostic-row b {
  color: #e2e8f0;
}

body.dark .diagnostic-traffic-line {
  color: #cbd5e1;
}

body.dark .diagnostic-traffic-item em {
  color: #94a3b8;
}

body.dark .diagnostic-traffic-item b {
  color: #e2e8f0;
}

body.dark .diagnostic-pill {
  border-color: rgba(148, 163, 184, .18);
  background: rgba(15, 23, 42, .44);
  color: #cbd5e1;
}

body.dark .diagnostic-pill.ok {
  border-color: rgba(74, 222, 128, .22);
  background: rgba(22, 101, 52, .28);
  color: #86efac;
}

body.dark .diagnostic-pill.warn {
  border-color: rgba(251, 191, 36, .24);
  background: rgba(146, 64, 14, .26);
  color: #fcd34d;
}

body.dark .diagnostic-pill.bad {
  border-color: rgba(248, 113, 113, .22);
  background: rgba(127, 29, 29, .28);
  color: #fca5a5;
}

@media (max-width: 720px) {
  .diagnostics-dialog {
    padding: 8px;
  }

  .diagnostics-panel.dialog-panel {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    padding: 18px;
  }

  .diagnostics-hint {
    font-size: 11px;
    line-height: 1.5;
  }

  .diagnostics-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
    gap: 6px;
  }

  .diagnostics-summary .diagnostic-pill {
    justify-content: center;
    min-width: 0;
    white-space: normal;
    text-align: center;
    line-height: 1.15;
  }

  .diagnostics-summary [data-diag-key="summary:speaker"],
  .diagnostics-summary [data-diag-key="summary:remote-audios"] {
    display: none;
  }

  .diagnostic-room-traffic {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
    flex: none;
    overflow: visible;
  }

  .diagnostic-room-traffic .diagnostic-traffic-line.room-total {
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    justify-content: stretch;
    gap: 6px;
    white-space: normal;
  }

  .diagnostic-head-meta {
    display: contents;
    overflow: visible;
    white-space: normal;
  }

  .diagnostic-head-meta .diagnostic-traffic-line {
    grid-area: metrics;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 8px;
    overflow: visible;
    white-space: normal;
    font-size: 10px;
  }

  .diagnostic-traffic-item {
    overflow: visible;
  }

  .diagnostic-traffic-item em,
  .diagnostic-traffic-item b {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }

  .diagnostic-traffic-item b {
    min-width: 0;
  }

  .diagnostic-head-meta .diagnostic-traffic-item[data-traffic-metric="total"] {
    display: none;
  }

  .diagnostic-head-meta .diagnostic-pill {
    grid-area: badge;
    justify-self: start;
    max-width: 100%;
    min-width: 0;
    white-space: normal;
    min-height: 15px;
    padding: 1px 6px;
    font-size: 10px;
    line-height: 1;
  }

  .diagnostic-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .diagnostic-card {
    padding: 10px;
  }

  .diagnostic-card-head {
    display: grid;
    grid-template-columns: minmax(62px, .8fr) minmax(0, 1.7fr);
    grid-template-areas:
      "name metrics"
      "badge metrics";
    align-items: center;
    gap: 1px 8px;
  }

  .diagnostic-card-head strong {
    grid-area: name;
    font-size: 13px;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    word-break: break-word;
    line-height: 1.1;
  }

  .diagnostic-row {
    border-radius: 10px;
    padding: 7px 7px;
  }

  .diagnostic-row span {
    margin-bottom: 3px;
    font-size: 9px;
    line-height: 1.15;
  }

  .diagnostic-row b {
    font-size: 10px;
    line-height: 1.18;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    word-break: break-word;
  }

  .dashboard-app.in-room .dashboard-header {
    width: calc(100vw - 16px);
    margin-bottom: 16px;
    padding: 8px 0;
    gap: 8px;
  }

  .dashboard-app.in-room .dashboard-brand {
    gap: 8px;
  }

  .dashboard-app.in-room .dashboard-brand-mark {
    width: 32px;
    height: 32px;
  }

  .dashboard-app.in-room .dashboard-brand h1 {
    font-size: 18px;
  }

  .dashboard-app.in-room .dashboard-brand-subtitle,
  .dashboard-app.in-room .dashboard-user-pill,
  .dashboard-app.in-room .dashboard-admin-link {
    display: none;
  }

  .dashboard-app.in-room .dashboard-actions {
    gap: 4px;
  }

  .dashboard-app.in-room .dashboard-icon-btn {
    width: 34px;
    height: 34px;
  }

  .dashboard-app.in-room .dashboard-logout {
    min-height: 34px;
    padding: 7px 14px;
    font-size: 12px;
  }
}

html.route-dashboard .shell {
  width: 100%;
  max-width: none;
  margin: 0;
}

body.dark::before {
  background-color: #0f172a;
  background-image:
    radial-gradient(at 0% 0%, hsla(210, 100%, 15%, 1) 0px, transparent 50%),
    radial-gradient(at 100% 0%, hsla(280, 100%, 15%, 1) 0px, transparent 50%),
    radial-gradient(at 100% 100%, hsla(190, 100%, 15%, 1) 0px, transparent 50%),
    radial-gradient(at 0% 100%, hsla(240, 100%, 15%, 1) 0px, transparent 50%);
}

.room-modal-form .room-modal-action {
  padding-top: 8px;
}

.room-modal-content .form-status:empty {
  display: none;
}

.room-modal-form .welcome-page-button {
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 12px;
  padding: 0 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #2563eb;
  color: #fff;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);
  font-size: 16px;
  font-weight: 700;
}

.room-modal-form .welcome-page-button:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
}

.dashboard-app:not(.in-room) {
  width: 100%;
  max-width: 1152px;
  margin: 0 auto;
  padding: 32px 24px 0;
}

.dashboard-app:not(.in-room) .dashboard-header {
  padding: 16px 0;
  margin-bottom: 40px;
  max-width: none;
}

.dashboard-app:not(.in-room) .dashboard-brand {
  gap: 16px;
}

.dashboard-app:not(.in-room) .dashboard-brand-mark {
  width: 40px;
  height: 40px;
}

.dashboard-app:not(.in-room) .dashboard-brand-mark svg {
  width: 20px;
  height: 20px;
}

.dashboard-app:not(.in-room) .dashboard-brand h1 {
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.025em;
}

.dashboard-app:not(.in-room) .dashboard-brand-subtitle {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .13em;
  opacity: .82;
}

.dashboard-app:not(.in-room) .dashboard-actions {
  gap: 12px;
}

.dashboard-app:not(.in-room) .dashboard-user-pill {
  min-height: 30px;
  padding: 4px 12px;
  font-size: 14px;
}

.dashboard-app:not(.in-room) .dashboard-icon-btn {
  width: 36px;
  height: 36px;
  color: #64748b;
}

.dashboard-app:not(.in-room) .dashboard-icon-btn svg,
.dashboard-app.in-room .dashboard-icon-btn svg,
.dashboard-app .dashboard-theme-btn svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-app .dashboard-theme-btn .theme-dark-icon {
  color: #64748b;
  opacity: 1;
  transform: rotate(0);
}

.dashboard-app .dashboard-theme-btn .theme-light-icon {
  position: absolute;
  color: #f59e0b;
  opacity: 0;
  transform: rotate(90deg);
}

body.dark .dashboard-app .dashboard-theme-btn .theme-dark-icon {
  color: #cbd5e1;
  opacity: 0;
  transform: rotate(-90deg);
}

body.dark .dashboard-app .dashboard-theme-btn .theme-light-icon {
  color: #fbbf24;
  opacity: 1;
  transform: rotate(0);
}

body.dark .dashboard-app:not(.in-room) .dashboard-icon-btn,
body.dark .dashboard-app.in-room .dashboard-icon-btn {
  color: #cbd5e1;
}

body.dark .dashboard-app:not(.in-room) .dashboard-icon-btn:hover,
body.dark .dashboard-app.in-room .dashboard-icon-btn:hover {
  background: rgba(51, 65, 85, .6);
  color: #fff;
}

.dashboard-app:not(.in-room) .dashboard-logout {
  min-height: 40px;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 800;
}

.dashboard-app:not(.in-room) .dashboard-main {
  gap: 32px;
}

.dashboard-app:not(.in-room) .dashboard-hero {
  min-height: 0;
  padding: 40px;
  border-radius: 24px;
}

.dashboard-app:not(.in-room) .dashboard-hero-copy h2 {
  margin-bottom: 8px;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -.03em;
}

.dashboard-app:not(.in-room) .dashboard-hero-copy p {
  font-size: 16px;
  color: #64748b;
  font-weight: 520;
}

.dashboard-app:not(.in-room) .dashboard-start-btn {
  min-height: 56px;
  padding: 16px 32px;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 800;
}

.dashboard-app:not(.in-room) .dashboard-stat-grid {
  gap: 24px;
}

.dashboard-app:not(.in-room) .dashboard-stat-card {
  min-height: 0;
  padding: 24px;
  border-radius: 24px;
  justify-content: flex-start;
}

.dashboard-app:not(.in-room) .dashboard-stat-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 24px;
  border-radius: 12px;
}

.dashboard-app:not(.in-room) .dashboard-stat-icon svg {
  width: 20px;
  height: 20px;
}

.dashboard-app:not(.in-room) .dashboard-card-bg {
  width: 128px;
  height: 128px;
  right: -16px;
  bottom: -16px;
}

.dashboard-app:not(.in-room) .dashboard-stat-card h3 {
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 850;
}

.dashboard-app:not(.in-room) .dashboard-stat-value {
  font-size: 36px;
  font-weight: 900;
}

.dashboard-app:not(.in-room) #dashboard-membership-value,
.dashboard-app:not(.in-room) .dashboard-stat-value.non-member {
  font-size: 30px;
}

.dashboard-app:not(.in-room) .dashboard-stat-value span:last-child {
  font-size: 14px;
}

.dashboard-app:not(.in-room) .dashboard-stat-card p {
  display: block;
  margin-top: 10px;
  font-size: 12px;
  color: #64748b;
}

body.dark .dashboard-app:not(.in-room) .dashboard-hero,
body.dark .dashboard-app:not(.in-room) .dashboard-stat-card {
  background: rgba(30, 41, 59, .65);
  border-color: rgba(255, 255, 255, .08);
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, .5);
}

body.dark .dashboard-app:not(.in-room) .dashboard-user-pill {
  background: rgba(30, 41, 59, .6);
  border-color: rgba(255, 255, 255, .1);
  color: #cbd5e1;
}

body.dark .dashboard-app:not(.in-room) .dashboard-hero-copy p,
body.dark .dashboard-app:not(.in-room) .dashboard-stat-card p,
body.dark .dashboard-app:not(.in-room) .dashboard-stat-value span:last-child {
  color: #cbd5e1;
}

body.dark .dashboard-app:not(.in-room) .dashboard-stat-card h3 {
  color: #e2e8f0;
}

@media (max-width: 720px) {
  .dashboard-app:not(.in-room) {
    width: 100%;
    max-width: none;
    padding: 16px 16px 0;
    margin: 0 auto;
  }

  .dashboard-app:not(.in-room) .dashboard-header {
    padding: 8px 0;
    margin-bottom: 24px;
  }

  .dashboard-app:not(.in-room) .dashboard-brand {
    gap: 8px;
  }

  .dashboard-app:not(.in-room) .dashboard-brand-mark {
    width: 32px;
    height: 32px;
  }

  .dashboard-app:not(.in-room) .dashboard-brand h1 {
    font-size: 18px;
  }

  .dashboard-app:not(.in-room) .dashboard-actions {
    gap: 4px;
  }

  .dashboard-app:not(.in-room) .dashboard-icon-btn {
    width: 34px;
    height: 34px;
  }

  .dashboard-app:not(.in-room) .dashboard-logout {
    min-height: 34px;
    padding: 7px 14px;
    font-size: 12px;
  }

  .dashboard-app:not(.in-room) .dashboard-main {
    gap: 16px;
  }

  .dashboard-app:not(.in-room) .dashboard-hero {
    padding: 20px;
    border-radius: 24px;
  }

  .dashboard-app:not(.in-room) .dashboard-hero-copy h2 {
    font-size: 24px;
  }

  .dashboard-app:not(.in-room) .dashboard-hero-copy p {
    font-size: 13px;
  }

  .dashboard-app:not(.in-room) .dashboard-start-btn {
    width: 100%;
    min-height: 50px;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 14px;
  }

  .dashboard-app:not(.in-room) .dashboard-stat-grid {
    gap: 8px;
  }

  .dashboard-app:not(.in-room) .dashboard-stat-card {
    min-height: 0;
    padding: 12px;
    border-radius: 16px;
  }

  .dashboard-app:not(.in-room) .dashboard-stat-icon {
    width: 28px;
    height: 28px;
    margin-bottom: 12px;
    border-radius: 8px;
  }

  .dashboard-app:not(.in-room) .dashboard-stat-icon svg {
    width: 16px;
    height: 16px;
  }

  .dashboard-app:not(.in-room) .dashboard-card-bg {
    width: 64px;
    height: 64px;
  }

  .dashboard-app:not(.in-room) .dashboard-stat-card h3 {
    font-size: 9px;
  }

  .dashboard-app:not(.in-room) .dashboard-stat-value,
  .dashboard-app:not(.in-room) #dashboard-membership-value,
  .dashboard-app:not(.in-room) .dashboard-stat-value.non-member {
    font-size: 16px;
  }

  .dashboard-app:not(.in-room) .dashboard-stat-value span:last-child {
    font-size: 9px;
  }
}

/* Final dashboard lock: keep the lobby identical to the reference HTML. */
.dashboard-app:not(.in-room) {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 2rem 0 0;
}

.dashboard-app:not(.in-room) .dashboard-header {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto 2.5rem;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  position: relative;
  z-index: 10;
}

.dashboard-app:not(.in-room) .dashboard-main {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.5rem;
  gap: 2rem;
}

.dashboard-app:not(.in-room) .dashboard-brand {
  gap: 1rem;
}

.dashboard-app:not(.in-room) .dashboard-brand-mark {
  width: 2.5rem;
  height: 2.5rem;
  background: linear-gradient(to bottom right, #3b82f6, #4f46e5);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, .10), 0 2px 4px -2px rgba(0, 0, 0, .10);
}

.dashboard-app:not(.in-room) .dashboard-brand-mark svg {
  width: 1.25rem;
  height: 1.25rem;
}

.dashboard-app:not(.in-room) .dashboard-brand h1 {
  margin: 0;
  color: #0f172a;
  font-size: 1.25rem;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -.025em;
}

.dashboard-app:not(.in-room) .dashboard-brand-subtitle {
  display: block;
  margin-top: .25rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: #2563eb;
  font-size: 11px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  opacity: .8;
}

.dashboard-app:not(.in-room) .dashboard-hero {
  padding: 2.5rem;
  border-radius: 1.5rem;
}

.dashboard-app:not(.in-room) .dashboard-hero-copy {
  position: relative;
  z-index: 10;
  margin-bottom: 0;
}

.dashboard-app:not(.in-room) .dashboard-hero-copy h2 {
  margin: 0 0 .5rem;
  color: #0f172a;
  font-size: 1.875rem;
  line-height: 2.25rem;
  font-weight: 800;
  letter-spacing: -.025em;
}

.dashboard-app:not(.in-room) .dashboard-hero-copy p {
  margin: 0;
  color: #64748b;
  font-size: 1rem;
  line-height: 1.5rem;
}

body.dark .dashboard-app:not(.in-room) .dashboard-brand h1,
body.dark .dashboard-app:not(.in-room) .dashboard-hero-copy h2 {
  color: #fff;
}

body.dark .dashboard-app:not(.in-room) .dashboard-brand-subtitle {
  color: #60a5fa;
}

body.dark .dashboard-app:not(.in-room) .dashboard-hero-copy p {
  color: #cbd5e1;
}

@media (max-width: 720px) {
  .dashboard-app:not(.in-room) {
    padding-top: 1rem;
  }

  .dashboard-app:not(.in-room) .dashboard-header {
    margin-bottom: 1.5rem;
    padding: .5rem 1rem;
  }

  .dashboard-app:not(.in-room) .dashboard-main {
    padding: 0 1rem;
    gap: 1rem;
  }

  .dashboard-app:not(.in-room) .dashboard-brand {
    gap: .5rem;
  }

  .dashboard-app:not(.in-room) .dashboard-brand-mark {
    width: 2rem;
    height: 2rem;
  }

  .dashboard-app:not(.in-room) .dashboard-brand h1 {
    font-size: 1.125rem;
  }

  .dashboard-app:not(.in-room) .dashboard-brand-subtitle {
    display: none;
  }

  .dashboard-app:not(.in-room) .dashboard-hero {
    padding: 1.25rem;
  }

  .dashboard-app:not(.in-room) .dashboard-hero-copy {
    margin-bottom: 1.25rem;
  }

  .dashboard-app:not(.in-room) .dashboard-hero-copy h2 {
    margin-bottom: .25rem;
    font-size: 1.5rem;
    line-height: 2rem;
  }

  .dashboard-app:not(.in-room) .dashboard-hero-copy p {
    font-size: .75rem;
    line-height: 1rem;
  }
}

