:root {
  color-scheme: light dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  /* Neo-Brutalist / Maximalist Color Tokens */
  --bg-cobalt: #3544EE;
  --bg-cream: #F1EFEB;
  --bg-paper: #E7E4DC;
  --neon-lime: #C8FF00;
  --neon-yellow: #FFE600;
  --hot-orange: #FF5C00;
  --hot-pink: #FF3B81;
  --electric-cyan: #00F0FF;
  --ink-black: #0A0A0A;
  --pure-white: #FFFFFF;
  --gopher-blue: #63D0FF;
  
  /* Brutalist Strokes & Shadows */
  --border-thick: 3px solid var(--ink-black);
  --border-med: 2px solid var(--ink-black);
  --border-thin: 1.5px solid var(--ink-black);
  
  --shadow-sm: 3px 3px 0 var(--ink-black);
  --shadow-md: 4px 4px 0 var(--ink-black);
  --shadow-lg: 6px 6px 0 var(--ink-black);
  --shadow-xl: 8px 8px 0 var(--ink-black);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

[hidden] {
  display: none !important;
}

.icon-inline {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.icon-btn {
  display: inline-block;
  flex-shrink: 0;
}

.icon-dock {
  display: inline-block;
  flex-shrink: 0;
}

.icon-input {
  display: inline-block;
  flex-shrink: 0;
  color: #64748B;
}

html, body {
  min-height: 100%;
  background: var(--bg-cobalt);
  color: var(--ink-black);
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

button, input, select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

/* App Outer Shell */
.app-shell {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 24px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Main Brutalist Canvas Board Card */
.board-card {
  width: 100%;
  max-width: 1200px;
  background: var(--bg-cream);
  border: var(--border-thick);
  border-radius: 8px;
  box-shadow: var(--shadow-xl);
  padding: 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  box-sizing: border-box;
}

.lobby-view, .friends-view {
  zoom: 1.3;
}

@media (max-width: 768px) {
  .lobby-view, .friends-view {
    zoom: 0.9;
  }
}

/* Fullscreen Call View Override */
.board-card.call-view {
  padding: 0;
  max-width: 100%;
  border-radius: 0;
  border: none;
  box-shadow: none;
}

/* ========================================== */
/* SCREEN 1: LOBBY & ROOM CREATOR             */
/* ========================================== */

.brutalist-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding-bottom: 12px;
  border-bottom: 2px dashed #D0CCC2;
}

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

/* Inline style attributes are blocked by the app's CSP (style-src 'self'). */
.brand-logo-img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  border-radius: 50%;
}

.brand-logo {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink-black);
  text-decoration: none;
}

.live-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--hot-pink);
  border: 1.5px solid var(--ink-black);
  display: inline-block;
  animation: pulse-dot 1.8s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.7; }
}

.nav-links {
  display: flex;
  gap: 24px;
  align-items: center;
}

.nav-link {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--ink-black);
  cursor: pointer;
  transition: color 0.15s ease;
}

.nav-link:hover {
  color: var(--bg-cobalt);
  text-decoration: underline;
}

.nav-link-btn {
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--ink-black);
  cursor: pointer;
  padding: 0;
  transition: color 0.15s ease;
}

.nav-link-btn:hover {
  color: var(--bg-cobalt);
  text-decoration: underline;
}

.nav-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-friends-mobile-btn {
  display: none;
  background: var(--pure-white);
  color: var(--ink-black);
  border: var(--border-thin);
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 8px 12px;
  cursor: pointer;
  transition: transform 0.1s ease, background 0.15s ease;
}

.nav-friends-mobile-btn:hover {
  background: var(--bg-cream);
  color: var(--bg-cobalt);
}

.nav-cta-btn {
  background: var(--ink-black);
  color: var(--neon-lime);
  font-size: 0.82rem;
  font-weight: 800;
  padding: 8px 16px;
  border-radius: 4px;
  border: var(--border-thin);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.nav-cta-btn:hover {
  background: var(--bg-cobalt);
  color: var(--pure-white);
  box-shadow: 2px 2px 0 var(--ink-black);
}

/* Ticker Tape */
.ticker-tape {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--neon-yellow);
  border: var(--border-med);
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--ink-black);
}

.ticker-icon {
  font-size: 0.9rem;
}

/* Hero Split Area */
.hero-split {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 28px;
  width: 100%;
}

.hero-left {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
}

.headline-block {
  display: flex;
  flex-direction: column;
  line-height: 0.92;
}

.hero-title-top {
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--ink-black);
  margin: 0;
}

.hero-title-bottom-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-title-bottom {
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--bg-cobalt);
}

.star-sticker {
  background: var(--hot-orange);
  color: var(--pure-white);
  border: var(--border-med);
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  transform: rotate(-2deg);
}

.hero-subhead {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: var(--ink-black);
  line-height: 1.4;
}

/* Action Hub & Cards */
.lobby-action-hub {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  flex: 1;
}

.lobby-cta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  flex: 1;
}

.btn-create-room {
  background: var(--neon-lime);
  color: var(--ink-black);
  min-height: 72px;
  height: 100%;
  padding: 12px 18px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  justify-content: flex-start;
  align-items: center;
  gap: 12px;
}

.btn-create-room:hover {
  background: #A3E635;
  color: var(--ink-black);
  box-shadow: var(--shadow-md);
}

.btn-friends-card {
  background: var(--bg-cobalt);
  color: var(--pure-white);
  min-height: 72px;
  height: 100%;
  padding: 12px 18px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  justify-content: flex-start;
  align-items: center;
  gap: 12px;
}

.btn-friends-card:hover {
  background: var(--hot-orange);
  color: var(--pure-white);
  box-shadow: var(--shadow-md);
}

.btn-create-room .icon-btn,
.btn-friends-card .icon-btn {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.btn-text-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  line-height: 1.15;
}

.btn-primary-title {
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.btn-sub-tag {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  opacity: 0.88;
}

.action-card {
  border: var(--border-thick);
  border-radius: 8px;
  padding: 16px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mobile-action-header {
  display: none;
}

.mobile-or-divider {
  display: none;
}

.join-card-compact {
  background: var(--bg-paper);
  border: var(--border-thick);
  border-radius: 8px;
  padding: 12px 14px;
  box-shadow: var(--shadow-md);
  flex-shrink: 0;
}

.create-card {
  background: var(--neon-lime);
}

.join-card {
  background: var(--bg-paper);
}

.action-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.action-tag {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--ink-black);
}

.badge-pill {
  background: var(--ink-black);
  color: var(--neon-lime);
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 3px;
}

.action-desc {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-black);
  line-height: 1.35;
}

/* Brutalist Buttons */
.btn-brutalist {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: var(--border-med);
  border-radius: 6px;
  font-weight: 800;
  letter-spacing: 0.03em;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  user-select: none;
}

.btn-brutalist:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-sm);
}

.btn-brutalist:active {
  transform: translate(2px, 2px);
  box-shadow: none;
}

.btn-create {
  width: 100%;
  height: 52px;
  background: var(--ink-black);
  color: var(--neon-lime);
  font-size: 0.95rem;
}

.btn-create:hover {
  background: var(--bg-cobalt);
  color: var(--pure-white);
}

.divider-strip {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #71717A;
}

.join-input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.input-container {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--pure-white);
  border: var(--border-med);
  border-radius: 6px;
  padding: 8px 12px;
}

.input-icon {
  font-size: 1rem;
}

.input-container input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink-black);
}

.input-container input::placeholder {
  color: #94A3B8;
  font-weight: 600;
}

.btn-join {
  background: var(--bg-cobalt);
  color: var(--pure-white);
  padding: 0 20px;
  font-size: 0.85rem;
}

.btn-join:hover {
  background: var(--hot-orange);
}

/* Hero Right Column (Graphic & Bento) */
.hero-right {
  background: var(--bg-paper);
  border: var(--border-thick);
  border-radius: 6px;
  padding: 20px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: space-between;
}

.hud-mini-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 800;
}

.rec-mini-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--ink-black);
  color: var(--pure-white);
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 0.7rem;
}

.rec-mini-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--hot-pink);
}

.hud-stats-text {
  color: var(--ink-black);
}

.hero-logo-box {
  background: var(--bg-cobalt);
  border: var(--border-thick);
  border-radius: 10px;
  padding: 18px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.hero-logo-img {
  width: 100%;
  max-width: 220px;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: 8px;
  display: block;
  user-select: none;
}

.stickers-row {
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.sticker-chip {
  padding: 6px 12px;
  border: var(--border-med);
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.chip-lime {
  background: var(--neon-lime);
  color: var(--ink-black);
}

.chip-orange {
  background: var(--hot-orange);
  color: var(--pure-white);
}

.bento-mini-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.bento-mini-card {
  border: var(--border-med);
  border-radius: 6px;
  padding: 10px 12px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bento-friends {
  background: var(--electric-lime);
  color: var(--ink-black);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.bento-friends:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-md);
  background: #1de05f;
}

.bento-friends:active {
  transform: translate(2px, 2px);
  box-shadow: none;
}

.bento-coturn {
  background: var(--hot-orange);
  color: var(--pure-white);
}

.bento-zerologs {
  background: var(--hot-pink);
  color: var(--pure-white);
}

.bento-title {
  font-size: 0.85rem;
  font-weight: 900;
}

.bento-desc {
  font-size: 0.7rem;
  font-weight: 700;
  opacity: 0.9;
}

/* ========================================== */
/* SCREEN 2: PRE-CALL GREEN ROOM              */
/* ========================================== */

.precall-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 2px dashed #D0CCC2;
}

.precall-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-nav-new-room {
  background: var(--ink-black);
  color: var(--neon-lime);
  padding: 6px 12px;
  font-size: 0.75rem;
  border-radius: 4px;
}

.btn-nav-new-room:hover {
  background: var(--bg-cobalt);
  color: var(--pure-white);
}

.precall-room-tag {
  background: var(--neon-yellow);
  border: var(--border-med);
  border-radius: 4px;
  padding: 4px 12px;
  font-size: 0.8rem;
  font-weight: 800;
}

.precall-split {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 24px;
  width: 100%;
}

.mirror-viewfinder-box {
  background: var(--ink-black);
  border: var(--border-thick);
  border-radius: 8px;
  padding: 16px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  min-height: 440px;
}

.viewfinder-top-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.viewfinder-tag {
  background: var(--neon-lime);
  color: var(--ink-black);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 3px;
}

.vu-meter-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-paper);
  border: var(--border-thin);
  border-radius: 4px;
  padding: 4px 8px;
}

.vu-icon {
  font-size: 0.75rem;
}

.vu-bars, .pip-vu-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}

.vu-bars .bar, .pip-vu-bars .bar {
  width: 3px;
  height: 4px;
  background: #3F3F46;
  border-radius: 1px;
  transition: height 0.05s ease, background 0.05s ease;
}

.vu-bars .bar.active, .pip-vu-bars .bar.active {
  background: var(--neon-lime);
}

.mirror-video-container {
  width: 100%;
  flex: 1;
  min-height: 280px;
  background: #12151D;
  border: var(--border-med);
  border-radius: 6px;
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

#previewVideo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

.mirror-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--pure-white);
}

.avatar-disc-large {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--bg-cobalt);
  border: var(--border-thick);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2.2rem;
}

.mirror-fallback-text {
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.viewfinder-bottom-toggles {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-toggle {
  padding: 8px 12px;
  border: var(--border-med);
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.1s ease;
}

.toggle-mic.active {
  background: var(--electric-cyan);
  color: var(--ink-black);
}

.toggle-mic:not(.active) {
  background: #27272A;
  color: #A1A1AA;
  border-color: #52525B;
}

.toggle-cam.active {
  background: var(--neon-lime);
  color: var(--ink-black);
}

.toggle-cam:not(.active) {
  background: #27272A;
  color: #A1A1AA;
  border-color: #52525B;
}

.toggle-noise.active {
  background: var(--hot-pink);
  color: var(--pure-white);
}

.toggle-noise:not(.active) {
  background: #27272A;
  color: #A1A1AA;
  border-color: #52525B;
}

/* Precall Right Actions Column */
.precall-actions-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: space-between;
}

.invite-share-card {
  background: var(--hot-orange);
  color: var(--pure-white);
  border: var(--border-thick);
  border-radius: 6px;
  padding: 16px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.invite-card-title {
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 0.03em;
}

.invite-card-sub {
  font-size: 0.72rem;
  font-weight: 700;
  opacity: 0.95;
  line-height: 1.3;
}

.copy-input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 4px;
}

.copy-input-row input {
  padding: 8px 10px;
  background: var(--bg-cream);
  border: var(--border-med);
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-black);
}

.btn-copy {
  background: var(--neon-lime);
  color: var(--ink-black);
  padding: 0 14px;
  font-size: 0.78rem;
}

.btn-copy:hover {
  background: var(--pure-white);
}

.device-pickers-card {
  background: var(--bg-paper);
  border: var(--border-thick);
  border-radius: 6px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pickers-title {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--ink-black);
}

.device-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.device-label {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--ink-black);
}

.device-select {
  width: 100%;
  padding: 8px 10px;
  background: var(--bg-cream);
  border: var(--border-med);
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-black);
  outline: none;
}

.status-banner {
  font-size: 0.78rem;
  font-weight: 800;
  color: #52525B;
}

.error-banner {
  font-size: 0.78rem;
  font-weight: 800;
  color: #DC2626;
  background: #FEE2E2;
  border: 1.5px solid #DC2626;
  padding: 6px 10px;
  border-radius: 4px;
}

.btn-giant-join {
  width: 100%;
  height: 56px;
  background: var(--neon-lime);
  color: var(--ink-black);
  font-size: 1rem;
  border: var(--border-thick);
  box-shadow: var(--shadow-md);
}

.btn-giant-join:hover {
  background: var(--bg-cobalt);
  color: var(--pure-white);
}

.btn-create-another {
  width: 100%;
  height: 46px;
  background: var(--bg-paper);
  color: var(--ink-black);
  font-size: 0.88rem;
  border: var(--border-med);
  box-shadow: var(--shadow-sm);
}

.btn-create-another:hover {
  background: var(--neon-yellow);
  color: var(--ink-black);
}

/* ========================================== */
/* SCREEN 3: ACTIVE VIDEO CALL & BROADCAST    */
/* ========================================== */

.app-shell:has(#callView:not([hidden])) {
  padding: 0;
  max-width: 100%;
}

.call-view {
  padding: 0;
  overflow: hidden;
  background: var(--ink-black);
  max-width: 100% !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.video-stage-board {
  display: flex;
  width: 100vw;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
}

.remote-video-canvas {
  flex: 1;
  background: #0E1118;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  position: relative;
}

/* Top Broadcast Camcorder HUD */
.camcorder-top-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  z-index: 10;
}

.hud-group-left {
  display: flex;
  gap: 10px;
  align-items: center;
}

.rec-live-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--hot-pink);
  color: var(--pure-white);
  border: var(--border-med);
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.rec-dot-pulsing {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pure-white);
  animation: pulse-dot 1.4s infinite ease-in-out;
}

.room-id-tag {
  background: var(--neon-lime);
  color: var(--ink-black);
  border: var(--border-med);
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: transform 0.1s ease;
}

.room-id-tag:hover {
  transform: scale(1.03);
}

.telemetry-pill {
  background: var(--bg-cream);
  color: var(--ink-black);
  border: var(--border-med);
  border-radius: 4px;
  padding: 4px 12px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

/* Video Stream Wrap */
.video-stream-wrap {
  flex: 1;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 380px;
}

#remoteVideo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 6px;
}

.remote-placeholder-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  z-index: 5;
}

.remote-avatar-disc {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--hot-orange);
  border: var(--border-thick);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2.5rem;
  color: var(--pure-white);
  box-shadow: var(--shadow-sm);
}

.remote-peer-title {
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: var(--pure-white);
}

.speaking-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--neon-lime);
  color: var(--ink-black);
  border: var(--border-med);
  border-radius: 20px;
  padding: 3px 12px;
  font-size: 0.72rem;
  font-weight: 800;
}

.btn-play-remote {
  position: absolute;
  z-index: 20;
  background: var(--hot-orange);
  color: var(--pure-white);
  border: var(--border-thick);
  border-radius: 30px;
  padding: 10px 20px;
  font-size: 0.85rem;
  font-weight: 800;
  box-shadow: var(--shadow-md);
}

.floating-pip-card {
  position: absolute;
  right: 20px;
  top: 20px;
  height: 140px;
  width: auto;
  aspect-ratio: 16 / 9;
  background: var(--ink-black);
  border: var(--border-thick);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  padding: 0;
  z-index: 50;
  cursor: grab;
  user-select: none;
  touch-action: none;
  transition: top 0.22s cubic-bezier(0.2, 0.9, 0.3, 1), left 0.22s cubic-bezier(0.2, 0.9, 0.3, 1), transform 0.15s ease;
}

.floating-pip-card.dragging {
  cursor: grabbing;
  transition: none !important;
  box-shadow: var(--shadow-xl);
  transform: scale(1.03);
}

.pip-viewport {
  width: 100%;
  height: 100%;
  background: #000;
  overflow: hidden;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

#localVideo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scaleX(-1);
  pointer-events: none;
}

#localVideo.no-mirror {
  transform: none;
}

/* Bottom Controls Dock */
.bottom-stage-controls {
  display: flex;
  justify-content: center;
  width: 100%;
  z-index: 15;
}

.tactile-control-dock {
  display: flex;
  gap: 8px;
  background: var(--bg-cream);
  border: var(--border-thick);
  border-radius: 8px;
  padding: 8px;
  box-shadow: var(--shadow-lg);
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}

.dock-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: var(--border-med);
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  user-select: none;
}

.dock-btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 2px 2px 0 var(--ink-black);
}

.dock-btn:active {
  transform: translate(1px, 1px);
  box-shadow: none;
}

.btn-dock-mic {
  background: var(--electric-cyan);
  color: var(--ink-black);
}
.btn-dock-mic[aria-pressed="true"] {
  background: #E4E4E7;
  color: #71717A;
  border-color: #A1A1AA;
}

.btn-dock-cam {
  background: var(--neon-lime);
  color: var(--ink-black);
}
.btn-dock-cam[aria-pressed="true"] {
  background: #E4E4E7;
  color: #71717A;
  border-color: #A1A1AA;
}

.btn-dock-share {
  background: var(--neon-yellow);
  color: var(--ink-black);
}
.btn-dock-share[aria-pressed="true"] {
  background: var(--hot-orange);
  color: var(--pure-white);
}

.btn-dock-fx {
  background: var(--hot-pink);
  color: var(--pure-white);
}
.btn-dock-fx[aria-pressed="true"] {
  background: var(--bg-cobalt);
}

.btn-dock-settings {
  background: var(--bg-paper);
  color: var(--ink-black);
}

.btn-dock-hangup {
  background: var(--hot-orange);
  color: var(--pure-white);
}
.btn-dock-hangup:hover {
  background: #DC2626;
}

/* Collapsible Media & Telemetry Drawer */
.telemetry-drawer-panel {
  width: 360px;
  background: var(--bg-cream);
  border-left: var(--border-thick);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow-y: auto;
  transition: width 0.2s ease, padding 0.2s ease;
}

.telemetry-drawer-panel.collapsed {
  display: none !important;
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.drawer-title {
  font-size: 0.88rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: var(--ink-black);
}

.btn-drawer-collapse {
  background: var(--hot-pink);
  color: var(--pure-white);
  border: var(--border-thin);
  border-radius: 3px;
  padding: 4px 8px;
  font-size: 0.68rem;
  font-weight: 800;
}

.btn-drawer-collapse:hover {
  background: var(--ink-black);
}

.drawer-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drawer-section-title {
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: var(--ink-black);
}

.drawer-input-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.drawer-field-label {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--ink-black);
}

.drawer-select {
  width: 100%;
  padding: 6px 8px;
  background: var(--bg-paper);
  border: var(--border-med);
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink-black);
  outline: none;
}

.quality-pills-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
}

.btn-quality-pill {
  padding: 6px 4px;
  border: var(--border-med);
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 800;
  background: var(--bg-paper);
  color: var(--ink-black);
  text-align: center;
  transition: all 0.1s ease;
}

.btn-quality-pill.active {
  background: var(--neon-lime);
  box-shadow: 2px 2px 0 var(--ink-black);
}

.metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.metric-tile {
  background: var(--bg-paper);
  border: var(--border-med);
  border-radius: 4px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.metric-label {
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--ink-black);
}

.metric-val {
  font-size: 0.85rem;
  font-weight: 900;
}

.val-blue { color: var(--bg-cobalt); }
.val-pink { color: var(--hot-pink); }
.val-dark { color: var(--ink-black); }
.val-orange { color: var(--hot-orange); }

/* ========================================== */
/* RESPONSIVE MOBILE BREAKPOINTS (< 768px)    */
/* ========================================== */

@media (max-width: 768px) {
  body {
    zoom: 1;
  }

  .app-shell {
    padding: max(12px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
  }

  .board-card {
    padding: 18px 14px;
    border: var(--border-thick);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    gap: 14px;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
  }

  .board-card.lobby-view {
    min-height: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }

  .brutalist-nav {
    padding-bottom: 10px;
  }

  .nav-links {
    display: none;
  }

  /* Remove contacts from mobile header as requested */
  .nav-friends-mobile-btn {
    display: none !important;
  }

  .brand-logo {
    font-size: 1.1rem;
  }

  .nav-cta-btn {
    padding: 6px 12px;
    font-size: 0.75rem;
    letter-spacing: 0.02em;
  }

  .ticker-tape {
    padding: 6px 10px;
    font-size: 0.68rem;
    font-weight: 800;
    gap: 6px;
    line-height: 1.2;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    scrollbar-width: none;
  }

  .ticker-tape::-webkit-scrollbar {
    display: none;
  }

  .ticker-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .hero-split {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .hero-left {
    gap: 14px;
  }

  .headline-block {
    gap: 0;
  }

  .hero-title-top,
  .hero-title-bottom {
    font-size: 2.1rem;
    letter-spacing: -0.04em;
    line-height: 1;
  }

  .star-sticker {
    font-size: 0.72rem;
    padding: 3px 8px;
  }

  .hero-subhead {
    font-size: 0.72rem;
    line-height: 1.35;
    margin: 0;
    font-weight: 800;
    color: #334155;
  }

  .lobby-action-hub {
    gap: 12px;
    margin-top: 2px;
    flex: initial;
  }

  .lobby-cta-row {
    grid-template-columns: 1fr;
    gap: 10px;
    flex: initial;
  }

  .btn-create-room {
    min-height: 56px;
    height: auto;
    padding: 12px 16px;
    gap: 12px;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
  }

  .btn-friends-card {
    min-height: 50px;
    height: auto;
    padding: 10px 14px;
    gap: 10px;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
  }

  .btn-create-room .icon-btn,
  .btn-friends-card .icon-btn {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
  }

  .btn-primary-title {
    font-size: 0.92rem;
  }

  .btn-sub-tag {
    font-size: 0.68rem;
  }

  .join-card-compact {
    padding: 14px;
    border: var(--border-thick);
    border-radius: 8px;
    background: var(--pure-white);
  }

  .mobile-action-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
  }

  .mobile-or-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    color: #64748B;
    margin: 2px 0;
    text-transform: uppercase;
  }

  .join-input-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .input-container {
    padding: 10px 12px;
    border-radius: 6px;
  }

  .input-container input {
    font-size: 0.85rem;
  }

  .btn-join {
    width: 100%;
    padding: 12px;
    height: 46px;
    font-size: 0.85rem;
    border-radius: 6px;
    justify-content: center;
  }

  /* Fill empty space on mobile with rich, compact Bento specs and mascot showcase */
  .hero-right {
    display: flex !important;
    margin-top: 4px;
    padding: 16px;
    gap: 14px;
    border-radius: 10px;
  }

  .hero-logo-box {
    padding: 14px 12px;
  }

  .hero-logo-img {
    max-width: 150px;
  }

  .stickers-row {
    gap: 8px;
    flex-wrap: wrap;
  }

  .sticker-chip {
    padding: 4px 10px;
    font-size: 0.7rem;
    flex: 1 1 auto;
    text-align: center;
  }

  .bento-mini-row {
    gap: 8px;
  }

  .bento-mini-card {
    padding: 8px 10px;
  }

  .bento-title {
    font-size: 0.78rem;
  }

  .bento-desc {
    font-size: 0.68rem;
  }

  .precall-split {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .mirror-viewfinder-box {
    min-height: 280px;
  }

  /* Fullscreen Viewport Video Call Stage */
  .call-view {
    position: fixed;
    inset: 0;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 100;
  }

  .video-stage-board {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
  }

  .remote-video-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    overflow: hidden;
  }

  .video-stream-wrap {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 100%;
  }

  #remoteVideo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
  }

  /* Top HUD on Mobile */
  .camcorder-top-hud {
    position: absolute;
    top: max(14px, env(safe-area-inset-top));
    left: 12px;
    right: 12px;
    z-index: 40;
    width: auto;
  }

  .rec-live-tag {
    padding: 4px 8px;
    font-size: 0.68rem;
  }

  .room-id-tag {
    padding: 4px 8px;
    font-size: 0.68rem;
  }

  .telemetry-pill {
    display: none;
  }

  /* Floating Self PiP Viewfinder on Mobile */
  .floating-pip-card {
    position: absolute;
    top: max(56px, env(safe-area-inset-top));
    right: 14px;
    width: 100px;
    height: 145px;
    z-index: 50;
    border-radius: 8px;
    box-shadow: 4px 4px 0 var(--ink-black);
  }

  .pip-viewport {
    width: 100%;
    height: 100%;
  }

  /* Floating Bottom Controls Dock */
  .bottom-stage-controls {
    position: absolute;
    bottom: max(14px, env(safe-area-inset-bottom));
    left: 10px;
    right: 10px;
    z-index: 60;
    width: auto;
  }

  .tactile-control-dock {
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
    gap: 4px;
    padding: 6px;
    flex-wrap: nowrap;
    justify-content: space-between;
    border-radius: 8px;
    box-shadow: 4px 4px 0 var(--ink-black);
  }

  .dock-btn {
    flex: 1 1 auto;
    padding: 10px 4px;
    font-size: 0.7rem;
    justify-content: center;
    gap: 0;
    min-width: 36px;
  }

  .dock-btn .dock-label {
    display: none;
  }

  .btn-dock-hangup {
    flex: 1.4 1 auto;
    padding: 10px 8px;
  }

  .btn-dock-hangup .dock-label {
    display: inline;
    font-size: 0.7rem;
    margin-left: 4px;
  }

  /* Slide-Up Bottom Sheet Drawer on Mobile */
  .telemetry-drawer-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-height: 70vh;
    max-height: 70dvh;
    z-index: 200;
    border-top: var(--border-thick);
    border-left: none;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.7);
    background: var(--bg-cream);
  }

  .telemetry-drawer-panel.collapsed {
    display: none !important;
  }
}

/* ========================================== */
/* PUSH NOTIFICATIONS & CONTACTS SECTION      */
/* ========================================== */

.push-contacts-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 24px;
  width: 100%;
  margin-top: 24px;
}

@media (max-width: 900px) {
  .push-contacts-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.push-card {
  background: var(--bg-paper);
}

.contacts-card {
  background: var(--pure-white);
}

.push-status-pill {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 4px;
  border: var(--border-thin);
}

.push-status-pill.pill-active {
  background: #10B981;
  color: #FFFFFF;
}

.push-status-pill.pill-inactive {
  background: #64748B;
  color: #FFFFFF;
}

.push-status-pill.pill-error {
  background: var(--hot-pink);
  color: #FFFFFF;
}

.push-setup-row {
  margin-top: 4px;
}

.btn-push-enable {
  width: 100%;
  height: 48px;
  background: var(--bg-cobalt);
  color: var(--pure-white);
  font-size: 0.88rem;
}

.btn-push-enable:hover {
  background: var(--hot-orange);
}

.my-card-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 4px;
}

.input-label-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.field-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--ink-black);
}

.card-copy-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  background: var(--pure-white);
  border: var(--border-med);
  border-radius: 6px;
  padding: 4px 6px;
}

.card-copy-row input {
  width: 100%;
  border: none;
  outline: none;
  font-size: 0.78rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 700;
  color: var(--ink-black);
  background: transparent;
  padding-left: 6px;
}

.card-info-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #475569;
  line-height: 1.35;
  background: var(--bg-cream);
  border: var(--border-thin);
  border-radius: 4px;
  padding: 8px 10px;
}

.card-info-note.ios-note {
  background: #FEF3C7;
  border-color: #F59E0B;
  color: #92400E;
  margin-top: 8px;
}

.card-info-note.ios-note .icon-inline {
  color: #D97706;
}

.card-info-note .icon-inline {
  color: var(--bg-cobalt);
  margin-top: 2px;
}

.add-contact-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg-cream);
  border: var(--border-med);
  border-radius: 6px;
  padding: 12px;
}

.add-contact-inputs {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 8px;
}

@media (max-width: 600px) {
  .add-contact-inputs {
    grid-template-columns: 1fr;
  }
}

.btn-add-contact {
  height: 42px;
  background: var(--ink-black);
  color: var(--neon-lime);
  font-size: 0.84rem;
  width: 100%;
}

.btn-add-contact:hover {
  background: var(--bg-cobalt);
  color: var(--pure-white);
}

.contacts-list-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.contacts-list-header {
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  color: #64748B;
  border-bottom: 2px solid #E2E8F0;
  padding-bottom: 4px;
}

.contacts-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 2px;
}

.contact-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-paper);
  border: var(--border-med);
  border-radius: 6px;
  padding: 10px 12px;
  gap: 10px;
  transition: transform 0.1s ease;
}

.contact-item:hover {
  transform: translateX(2px);
}

.contact-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.contact-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--neon-yellow);
  border: var(--border-med);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 900;
  color: var(--ink-black);
  flex-shrink: 0;
}

.contact-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.contact-name {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--ink-black);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-meta {
  font-size: 0.68rem;
  font-weight: 700;
  color: #059669;
}

.contact-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.btn-call-contact {
  background: var(--bg-cobalt);
  color: var(--pure-white);
  padding: 7px 12px;
  font-size: 0.76rem;
  border-radius: 4px;
  border: var(--border-thin);
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-call-contact:hover {
  background: #059669;
}

.btn-del-contact {
  background: transparent;
  color: #94A3B8;
  padding: 7px 8px;
  font-size: 0.72rem;
  border-radius: 4px;
  border: var(--border-thin);
  font-weight: 800;
}

.btn-del-contact:hover {
  background: var(--hot-pink);
  color: #FFFFFF;
  border-color: var(--ink-black);
}

.contacts-empty-state {
  font-size: 0.8rem;
  font-weight: 700;
  color: #64748B;
  padding: 20px 8px;
  text-align: center;
  line-height: 1.4;
  background: var(--bg-paper);
  border: 1.5px dashed #CBD5E1;
  border-radius: 6px;
}

