* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --ink: #0d1e2b;
  --ink-deep: #06111a;
  --muted: #64747c;
  --paper: #f6f3ec;
  --card-bg: rgba(255, 255, 255, 0.7);
  --card-border: rgba(16, 37, 52, 0.08);
  --coral: #f36f52;
  --coral-hover: #e05c3d;
  --mint: #cfe9da;
  --mint-dark: #23744c;
  --line: rgba(16, 37, 52, 0.1);
  --line-glass: rgba(255, 255, 255, 0.18);
  --glass-bg: rgba(13, 30, 43, 0.84);
  --active-glow: #48bb78;
  --danger: #e53e3e;
  --danger-hover: #c53030;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html {
  scroll-behavior: smooth;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
  min-height: 100dvh;
}

/* ═══════════════════════════════════════════════════════════════
   AMBIENT BACKGROUND GLOW ORBS
   ═══════════════════════════════════════════════════════════════ */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
  animation: glowFloat 12s ease-in-out infinite alternate;
}

.glow-1 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(243, 111, 82, 0.25), transparent 70%);
  top: -80px;
  right: -60px;
}

.glow-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(207, 233, 218, 0.4), transparent 70%);
  bottom: 10%;
  left: -100px;
  animation-delay: -6s;
}

@keyframes glowFloat {
  0% { transform: translateY(0) scale(1); }
  50% { transform: translateY(30px) scale(1.1); }
  100% { transform: translateY(-20px) scale(0.95); }
}

.app-shell {
  position: relative;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  z-index: 1;
  overflow-x: hidden;
}

/* ═══════════════════════════════════════════════════════════════
   TOPBAR
   ═══════════════════════════════════════════════════════════════ */
.topbar {
  height: 76px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-top: var(--safe-top);
}

.brand {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--ink);
  text-decoration: none;
  display: flex;
  align-items: center;
}

.brand-mark {
  display: inline-flex;
  gap: 3px;
  margin-right: 8px;
}

.brand-mark i {
  display: block;
  width: 5px;
  background: var(--coral);
  height: 17px;
  border-radius: 4px;
}

.brand-mark i:nth-child(2) {
  height: 23px;
  margin-top: -3px;
  background: var(--ink);
}

.brand-mark i:nth-child(3) {
  height: 13px;
  margin-top: 7px;
  background: #e9b94e;
}

.nav-status {
  font: 600 11px 'DM Mono', monospace;
  letter-spacing: 0.03em;
  color: var(--muted);
  text-transform: uppercase;
  background: rgba(16, 37, 52, 0.05);
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #48bb78;
  margin-right: 6px;
  box-shadow: 0 0 8px #48bb78;
}

/* ═══════════════════════════════════════════════════════════════
   HERO / LANDING SECTION
   ═══════════════════════════════════════════════════════════════ */
.hero {
  width: 100%;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
  padding: 60px 0 50px;
}

.hero-copy {
  width: 100%;
  max-width: 560px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(243, 111, 82, 0.1);
  color: var(--coral);
  border: 1px solid rgba(243, 111, 82, 0.25);
  padding: 5px 12px;
  border-radius: 20px;
  font: 600 11px 'DM Mono', monospace;
  letter-spacing: 0.04em;
  margin-bottom: 18px;
}

.badge-dot {
  width: 6px;
  height: 6px;
  background: var(--coral);
  border-radius: 50%;
}

.hero h1 {
  font-size: clamp(38px, 5.2vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.055em;
  margin: 0 0 18px;
  font-weight: 800;
  word-break: break-word;
}

.hero h1 em {
  font-family: Georgia, serif;
  font-weight: 400;
  letter-spacing: -0.06em;
  color: #b95a49;
}

.lede {
  width: 100%;
  max-width: 500px;
  color: #52636a;
  font-size: 16px;
  line-height: 1.7;
  margin: 0 0 30px;
}

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

.button {
  border: 0;
  cursor: pointer;
  font: 700 13px 'Manrope', sans-serif;
  border-radius: 8px;
  padding: 14px 24px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
}

.button:active {
  transform: scale(0.97);
}

.button-primary {
  background: var(--coral);
  color: white;
  box-shadow: 0 6px 20px rgba(243, 111, 82, 0.3);
}

.button-primary:hover {
  background: var(--coral-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(243, 111, 82, 0.38);
}

.button-primary i {
  font-style: normal;
  font-size: 16px;
  margin-left: 8px;
  transition: transform 0.2s;
}

.button-primary:hover i {
  transform: translate(2px, -2px);
}

.button-ghost {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
  box-shadow: 0 2px 6px rgba(0,0,0,0.02);
}

.button-ghost:hover {
  background: #faf8f5;
  transform: translateY(-2px);
  border-color: rgba(16, 37, 52, 0.2);
}

.button-dark {
  background: var(--ink);
  color: #fff;
}

.button-dark:hover {
  background: var(--ink-deep);
}

.join-form {
  margin-top: 20px;
  width: 100%;
  max-width: 440px;
  background: #fff;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  box-shadow: 0 6px 20px rgba(0,0,0,0.04);
}

.join-form label {
  display: block;
  font: 11px 'DM Mono', monospace;
  text-transform: uppercase;
  margin-bottom: 8px;
  color: var(--muted);
}

.input-row {
  display: flex;
  gap: 8px;
  width: 100%;
}

.input-row input {
  flex: 1;
  border: 1px solid var(--line);
  background: #faf8f5;
  border-radius: 8px;
  padding: 12px 14px;
  font: 14px 'DM Mono', monospace;
  color: var(--ink);
  min-width: 0;
  outline: none;
}

.input-row input:focus {
  border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(243, 111, 82, 0.15);
}

.trust-pill-row {
  margin-top: 36px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.trust-pill {
  font: 600 11px 'DM Mono', monospace;
  color: var(--muted);
  background: rgba(16, 37, 52, 0.04);
  padding: 5px 10px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ═══════════════════════════════════════════════════════════════
   HERO ART / INTERACTIVE DEMO CARD
   ═══════════════════════════════════════════════════════════════ */
.hero-art {
  height: 420px;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.orbit {
  position: absolute;
  border: 1px solid rgba(16, 37, 52, 0.1);
  border-radius: 50%;
  transform: rotate(-26deg);
  pointer-events: none;
}

.orbit-one {
  width: 390px;
  height: 240px;
}

.orbit-two {
  width: 300px;
  height: 380px;
  transform: rotate(38deg);
}

.call-card-interactive {
  height: 320px;
  width: 250px;
  background: var(--ink-deep);
  border-radius: 18px;
  padding: 16px;
  color: white;
  position: relative;
  box-shadow: 18px 24px 44px rgba(6, 17, 26, 0.28);
  transform: rotate(3deg);
  z-index: 2;
  border: 1px solid rgba(255,255,255,0.1);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.call-card-interactive:hover {
  transform: rotate(0deg) scale(1.03);
}

.call-card-top, .call-card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font: 10px 'DM Mono', monospace;
  color: #a6b8b5;
}

.live-pill {
  color: #e9c77c;
  font-size: 9px;
  font-weight: 600;
  display: flex;
  align-items: center;
}

.live-pill b {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #ed7655;
  border-radius: 50%;
  margin-right: 5px;
  animation: pulseDot 1.5s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.card-video-mock {
  position: absolute;
  top: 48px;
  left: 14px;
  right: 14px;
  bottom: 48px;
  border-radius: 12px;
  background: #142838;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.portrait {
  width: 100%;
  height: 100%;
  background: #1a3245;
  position: relative;
  display: flex;
  align-items: end;
  justify-content: center;
}

.avatar-glow {
  width: 90px;
  height: 120px;
  background: radial-gradient(circle, #f36f52 0%, #31211e 70%);
  border-radius: 50% 50% 12px 12px;
  opacity: 0.85;
}

.portrait span, .mini-portrait span {
  position: absolute;
  left: 8px;
  bottom: 8px;
  font: 10px 'DM Mono', monospace;
  background: rgba(6, 17, 26, 0.75);
  padding: 2px 6px;
  border-radius: 4px;
}

.mini-portrait {
  position: absolute;
  width: 68px;
  height: 74px;
  border-radius: 8px;
  background: #d89878;
  right: 8px;
  bottom: 8px;
  border: 2px solid var(--ink-deep);
  z-index: 3;
  overflow: hidden;
}

.interactive-waveform {
  position: absolute;
  bottom: 12px;
  left: 12px;
  display: flex;
  gap: 3px;
  align-items: center;
  z-index: 4;
}

.interactive-waveform i {
  width: 3px;
  height: 14px;
  background: #efb966;
  border-radius: 2px;
  animation: waveAnim 1s ease-in-out infinite alternate;
}

.interactive-waveform i:nth-child(2), .interactive-waveform i:nth-child(8) { height: 22px; animation-delay: 0.2s; }
.interactive-waveform i:nth-child(3), .interactive-waveform i:nth-child(7) { height: 30px; animation-delay: 0.4s; }
.interactive-waveform i:nth-child(4), .interactive-waveform i:nth-child(6) { height: 18px; animation-delay: 0.1s; }
.interactive-waveform i:nth-child(5) { height: 34px; animation-delay: 0.3s; }

@keyframes waveAnim {
  0% { transform: scaleY(0.3); }
  100% { transform: scaleY(1.2); }
}

.mock-audio-tag {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #48bb78;
}

.active-pulse {
  width: 6px;
  height: 6px;
  background: #48bb78;
  border-radius: 50%;
  box-shadow: 0 0 6px #48bb78;
}

/* Floating Glass Badges */
.floating-badge {
  position: absolute;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  padding: 8px 14px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
  z-index: 5;
}

.floating-badge .emoji {
  font-size: 20px;
}

.floating-badge strong {
  display: block;
  font-size: 12px;
  color: var(--ink);
}

.floating-badge small {
  display: block;
  font-size: 10px;
  color: var(--muted);
}

.badge-top {
  top: 24px;
  left: -20px;
  animation: floatSubtle 4s ease-in-out infinite alternate;
}

.badge-bottom {
  bottom: 24px;
  right: -20px;
  animation: floatSubtle 4s ease-in-out infinite alternate-reverse;
}

@keyframes floatSubtle {
  0% { transform: translateY(0); }
  100% { transform: translateY(-8px); }
}

/* ═══════════════════════════════════════════════════════════════
   FEATURES SECTION
   ═══════════════════════════════════════════════════════════════ */
.features-section {
  padding: 70px 0 50px;
  border-top: 1px solid var(--line);
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 48px;
}

.kicker {
  font: 600 11px 'DM Mono', monospace;
  letter-spacing: 0.16em;
  color: var(--coral);
  margin: 0 0 12px;
  text-transform: uppercase;
}

.section-header h2 {
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.04em;
  margin: 0 0 14px;
  font-weight: 800;
}

.section-desc {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.feature-card:hover {
  transform: translateY(-4px);
  background: #fff;
  border-color: rgba(243, 111, 82, 0.3);
  box-shadow: 0 16px 36px rgba(16, 37, 52, 0.06);
}

.feature-card.highlighted {
  border-color: rgba(243, 111, 82, 0.35);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(254, 243, 240, 0.7));
}

.feature-icon {
  font-size: 28px;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 18px;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
  font-weight: 700;
}

.feature-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 20px;
  flex: 1;
}

.feature-tag {
  align-self: flex-start;
  font: 600 10px 'DM Mono', monospace;
  background: rgba(16, 37, 52, 0.06);
  color: var(--ink);
  padding: 4px 8px;
  border-radius: 6px;
  text-transform: uppercase;
}

/* ═══════════════════════════════════════════════════════════════
   3-STEP PROCESS SECTION
   ═══════════════════════════════════════════════════════════════ */
.steps-section {
  padding: 60px 0;
  border-top: 1px solid var(--line);
}

.steps-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
}

.step-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  text-align: center;
}

.step-number {
  font: 800 24px 'DM Mono', monospace;
  color: var(--coral);
  margin-bottom: 12px;
}

.step-item h4 {
  font-size: 17px;
  margin: 0 0 8px;
  font-weight: 700;
}

.step-item p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
}

.step-divider {
  font-size: 24px;
  color: var(--muted);
  opacity: 0.5;
}

/* ═══════════════════════════════════════════════════════════════
   FAQ ACCORDION
   ═══════════════════════════════════════════════════════════════ */
.faq-section {
  padding: 60px 0 70px;
  border-top: 1px solid var(--line);
}

.faq-accordion {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.faq-item.open {
  border-color: var(--coral);
}

.faq-question {
  width: 100%;
  padding: 18px 20px;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font: 700 15px 'Manrope', sans-serif;
  color: var(--ink);
  text-align: left;
}

.faq-icon {
  font-style: normal;
  font-size: 20px;
  color: var(--coral);
  transition: transform 0.2s;
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease-out;
  padding: 0 20px;
}

.faq-item.open .faq-answer {
  max-height: 200px;
  padding: 0 20px 18px;
}

.faq-answer p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}

/* ═══════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════ */
footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 30px;
  margin-top: auto;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(16, 37, 52, 0.06);
}

.footer-brand p {
  color: var(--muted);
  font-size: 13px;
  margin: 6px 0 0;
}

.footer-links {
  display: flex;
  gap: 18px;
  font: 600 11px 'DM Mono', monospace;
  color: var(--muted);
  text-transform: uppercase;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  font: 500 11px 'DM Mono', monospace;
  color: var(--muted);
}

/* ═══════════════════════════════════════════════════════════════
   ROOM VIEW — IN-CALL NATIVE EXPERIENCE
   ═══════════════════════════════════════════════════════════════ */
.room-view {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: calc(var(--safe-bottom) + 84px);
  overflow: hidden;
}

.call-topbar {
  position: absolute;
  top: max(12px, var(--safe-top));
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 30;
  pointer-events: none;
}

.call-topbar > * {
  pointer-events: auto;
}

.call-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.live-indicator {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #fff;
  font: 600 12px 'DM Mono', monospace;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--line-glass);
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.pulse-green {
  width: 7px;
  height: 7px;
  background: #48bb78;
  border-radius: 50%;
  box-shadow: 0 0 8px #48bb78;
  animation: pulseGreen 1.6s infinite;
}

@keyframes pulseGreen {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.room-pill {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #fff;
  font: 500 11px 'DM Mono', monospace;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--line-glass);
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  gap: 4px;
}

.room-pill strong {
  color: #eea067;
  font-weight: 700;
}

.call-top-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.glass-pill-btn {
  background: var(--coral);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  font: 700 12px 'Manrope', sans-serif;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 16px rgba(243, 111, 82, 0.4);
}

.glass-pill-btn:active {
  transform: scale(0.94);
}

.glass-icon-btn {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #fff;
  border: 1px solid var(--line-glass);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 13px;
}

/* Video Stage Area */
.video-stage-container {
  flex: 1;
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 440px;
  display: flex;
}

.video-stage {
  flex: 1;
  position: relative;
  background: var(--ink-deep);
  border-radius: 18px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 12px;
  padding: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
}

.video-tile {
  background: #142838;
  border-radius: 14px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  border: 2px solid transparent;
}

.video-tile.speaking {
  border-color: var(--active-glow);
  box-shadow: 0 0 20px rgba(72, 187, 120, 0.6);
}

.remote-tile {
  width: 100%;
  height: 100%;
  min-height: 400px;
}

.local-tile {
  background: #1d3547;
  min-height: 190px;
  align-self: end;
}

.video-tile video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.local-tile video {
  transform: scaleX(-1);
}

.empty-state {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #c3d0ca;
  gap: 12px;
  z-index: 2;
  background: #142838;
  padding: 20px;
  text-align: center;
}

.empty-state strong {
  font-size: 17px;
  color: #fff;
}

.empty-state small {
  color: #91a5a4;
  font-size: 13px;
  max-width: 280px;
  line-height: 1.5;
}

.mobile-invite-btn {
  margin-top: 8px;
}

.pulse-ring {
  width: 58px;
  height: 58px;
  border: 2px solid #eea067;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #efb966;
  font-size: 26px;
  animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
  0% { box-shadow: 0 0 0 0 rgba(238, 160, 103, 0.5); }
  70% { box-shadow: 0 0 0 18px rgba(238, 160, 103, 0); }
  100% { box-shadow: 0 0 0 0 rgba(238, 160, 103, 0); }
}

.tile-label {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(16, 37, 52, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: white;
  padding: 4px 8px;
  border-radius: 6px;
  font: 600 10px 'DM Mono', monospace;
  text-transform: uppercase;
  z-index: 4;
}

.tile-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--coral);
  color: white;
  padding: 3px 6px;
  border-radius: 4px;
  font: 600 9px 'DM Mono', monospace;
  text-transform: uppercase;
  z-index: 4;
}

.tile-controls {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 6px;
  z-index: 4;
}

.icon-btn {
  background: rgba(16, 37, 52, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line-glass);
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 12px;
}

/* Floating Reactions */
.reactions-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 15;
}

.floating-emoji {
  position: absolute;
  bottom: 40px;
  font-size: 38px;
  animation: floatUp 2.4s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  pointer-events: none;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,0.4));
}

@keyframes floatUp {
  0% { opacity: 0; transform: translateY(20px) scale(0.5); }
  20% { opacity: 1; transform: translateY(-40px) scale(1.3); }
  80% { opacity: 0.9; transform: translateY(-240px) scale(1); }
  100% { opacity: 0; transform: translateY(-320px) scale(0.7); }
}

/* ═══════════════════════════════════════════════════════════════
   MODERN GLASS IN-CALL ACTION DOCK
   ═══════════════════════════════════════════════════════════════ */
.call-bottom-dock {
  position: fixed;
  bottom: max(16px, var(--safe-bottom));
  left: 16px;
  right: 16px;
  margin: 0 auto;
  max-width: 480px;
  background: rgba(13, 22, 33, 0.88);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 44px;
  padding: 8px 14px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 6px;
  box-shadow: 0 20px 48px -10px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
  z-index: 40;
}

.dock-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
  min-width: 48px;
  height: 52px;
  border-radius: 26px;
  padding: 4px 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.dock-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.dock-btn:active {
  transform: scale(0.92);
}

.dock-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: #f8fafc;
}

.dock-icon svg {
  display: block;
}

.dock-label {
  font: 600 10px 'Manrope', sans-serif;
  letter-spacing: 0.02em;
  color: #94a3b8;
  line-height: 1;
}

.dock-btn:hover .dock-label {
  color: #e2e8f0;
}

/* Active State (e.g. Screen Share) */
.dock-btn.active-toggle {
  background: rgba(72, 187, 120, 0.22);
  border-color: rgba(72, 187, 120, 0.6);
  color: #86efac;
}

.dock-btn.active-toggle .dock-icon {
  color: #86efac;
}

.dock-btn.active-toggle .dock-label {
  color: #86efac;
}

/* Muted / Disabled State */
.dock-btn.muted-toggle {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.6);
  color: #fca5a5;
}

.dock-btn.muted-toggle .dock-icon {
  color: #f87171;
}

.dock-btn.muted-toggle .dock-label {
  color: #fca5a5;
}

/* End Call Hangup Button */
.dock-btn.end-call-btn {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  min-width: 52px;
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.45);
}

.dock-btn.end-call-btn .dock-icon {
  color: #ffffff;
}

.dock-btn.end-call-btn .dock-label {
  color: rgba(255, 255, 255, 0.9);
}

.dock-btn.end-call-btn:hover {
  background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.55);
}

.dock-btn.end-call-btn:active {
  transform: scale(0.92);
}

.dock-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--coral);
  color: #fff;
  font: 700 9px 'DM Mono', monospace;
  padding: 2px 6px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

/* Reactions Popup */
.dock-reactions-wrapper {
  position: relative;
}

.reactions-popup {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  padding: 6px 10px;
  border-radius: 28px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.4);
  border: 1px solid var(--line-glass);
  display: flex;
  gap: 6px;
  z-index: 50;
}

.reaction-btn {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  padding: 3px;
  border-radius: 50%;
  transition: transform 0.15s;
}

.reaction-btn:active {
  transform: scale(1.35);
}

/* In-Call Chat Drawer */
.chat-drawer {
  width: 320px;
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  box-shadow: 0 14px 40px rgba(0,0,0,0.12);
  overflow: hidden;
  z-index: 35;
}

.chat-sheet-handle {
  display: none;
  width: 36px;
  height: 4px;
  background: #cbd5e0;
  border-radius: 2px;
  margin: 8px auto 0;
}

.chat-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-header h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}

.close-chat {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--muted);
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
}

.chat-messages {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-welcome {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  background: rgba(16,37,52,0.04);
  padding: 8px 10px;
  border-radius: 8px;
  line-height: 1.4;
}

.chat-msg {
  max-width: 82%;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.4;
  word-break: break-word;
}

.chat-msg.self {
  align-self: flex-end;
  background: var(--ink);
  color: #fff;
  border-bottom-right-radius: 2px;
}

.chat-msg.peer {
  align-self: flex-start;
  background: rgba(16, 37, 52, 0.08);
  color: var(--ink);
  border-bottom-left-radius: 2px;
}

.chat-msg small {
  display: block;
  font-size: 9px;
  margin-top: 2px;
  opacity: 0.7;
}

.chat-input-form {
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 6px;
  background: #faf8f5;
}

.chat-input-form input {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  outline: none;
  background: #fff;
}

.chat-send {
  padding: 8px 14px;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(16, 37, 52, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  padding: 16px;
  z-index: 100;
}

.share-modal {
  background: var(--paper);
  width: min(100%, 360px);
  padding: 24px 20px;
  border-radius: 16px;
  position: relative;
  box-shadow: 0 24px 48px rgba(0,0,0,0.3);
}

.share-modal h2 {
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: -0.05em;
  margin: 0 0 14px;
}

.close-modal {
  position: absolute;
  right: 14px;
  top: 14px;
  border: 0;
  background: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--ink);
}

.qr-code {
  width: 160px;
  height: 160px;
  background: #fff;
  padding: 8px;
  border-radius: 10px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}

.qr-code img {
  max-width: 100%;
}

.modal-note {
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
  margin-top: 12px;
  margin-bottom: 0;
}

[hidden], .room-view[hidden], #landingContent[hidden], #startView[hidden], #joinForm[hidden], #chatDrawer[hidden], #shareModal[hidden] {
  display: none !important;
}

/* ═══════════════════════════════════════════════════════════════
   🖥️ DESKTOP IN-CALL ZERO-SCROLL PERFECT FIT (>= 769px)
   ═══════════════════════════════════════════════════════════════ */
@media (min-width: 769px) {
  .app-shell:has(.room-view:not([hidden])) {
    height: 100vh !important;
    max-height: 100vh !important;
    overflow: hidden !important;
    padding: 16px 32px 20px !important;
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box !important;
  }

  .room-view:not([hidden]) {
    height: 100% !important;
    flex: 1 !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    padding-bottom: 0 !important;
    position: relative !important;
  }

  .room-view:not([hidden]) .call-topbar {
    position: static !important;
    width: 100% !important;
    height: 44px !important;
    margin-bottom: 12px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    pointer-events: auto !important;
  }

  .room-view:not([hidden]) .video-stage-container {
    flex: 1 !important;
    min-height: 0 !important;
    height: 100% !important;
    margin-bottom: 14px !important;
    overflow: hidden !important;
    position: relative !important;
    display: flex !important;
    gap: 14px !important;
  }

  .room-view:not([hidden]) .video-stage {
    flex: 1 !important;
    min-height: 0 !important;
    height: 100% !important;
    overflow: hidden !important;
    display: grid !important;
    grid-template-columns: 1fr 280px !important;
    gap: 14px !important;
    padding: 12px !important;
    border-radius: 18px !important;
  }

  .room-view:not([hidden]) .remote-tile,
  .room-view:not([hidden]) .local-tile {
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  .room-view:not([hidden]) .call-bottom-dock {
    position: static !important;
    margin: 0 auto !important;
    width: fit-content !important;
    max-width: 500px !important;
    box-sizing: border-box !important;
  }
}

/* ═══════════════════════════════════════════════════════════════
   📱 ZERO HORIZONTAL OVERFLOW & PERFECT MOBILE SCALING (<= 768px)
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .app-shell {
    padding: 0 16px !important;
  }

  .topbar {
    height: 64px;
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 24px 0 20px;
    gap: 24px;
  }

  .hero-copy {
    max-width: 100%;
  }

  .hero h1 {
    font-size: clamp(28px, 7.5vw, 40px);
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }

  .hero-actions .button {
    width: 100%;
  }

  .hero-art {
    height: 300px;
    max-width: 320px;
  }

  .orbit-one { width: 290px; height: 180px; }
  .orbit-two { width: 220px; height: 270px; }
  .call-card-interactive { width: 210px; height: 270px; }

  .badge-top { left: -10px; top: 10px; }
  .badge-bottom { right: -10px; bottom: 10px; }

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

  .steps-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .step-divider {
    transform: rotate(90deg);
    margin: -4px 0;
  }

  .footer-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-links {
    flex-wrap: wrap;
    gap: 12px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }

  /* In Call Mobile Layout (Preserved Exactly As Is) */
  .app-shell:has(.room-view:not([hidden])) {
    padding: 0 !important;
    max-width: 100% !important;
    height: 100dvh !important;
    overflow: hidden !important;
    background: #000 !important;
  }

  #landingTopbar:has(+ #landingContent[hidden]) {
    display: none !important;
  }

  #landingFooter:has(+ #landingContent[hidden]) {
    display: none !important;
  }

  .room-view {
    padding-bottom: 0 !important;
    height: 100dvh !important;
    overflow: hidden;
  }

  .video-stage-container {
    height: 100dvh;
    min-height: 100dvh;
  }

  .video-stage {
    border-radius: 0;
    padding: 0;
    gap: 0;
    grid-template-columns: 1fr;
    height: 100dvh;
    min-height: 100dvh;
  }

  .remote-tile {
    border-radius: 0;
    min-height: 100dvh;
    height: 100dvh;
  }

  .local-tile {
    position: absolute;
    right: 12px;
    top: max(64px, calc(var(--safe-top) + 50px));
    width: 98px;
    height: 138px;
    border-radius: 14px;
    z-index: 25;
    border: 2px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.6);
    min-height: 0;
  }

  .chat-drawer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 70dvh;
    border-radius: 24px 24px 0 0;
    z-index: 100;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.4);
    animation: slideUp 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .chat-sheet-handle {
    display: block;
  }

  @keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }

  .call-bottom-dock {
    bottom: max(12px, var(--safe-bottom));
    left: 10px;
    right: 10px;
    padding: 6px 8px;
    border-radius: 32px;
  }

  .dock-btn {
    min-width: 40px;
    height: 46px;
    border-radius: 22px;
    padding: 2px 4px;
  }

  .dock-icon {
    font-size: 16px;
  }

  .dock-label {
    font-size: 8.5px;
  }

  .dock-btn.end-call-btn {
    min-width: 44px;
  }
}
