/* ==========================================================================
   Milo — design tokens
   ========================================================================== */

:root {
  --bg: #fbf5ee;
  --bg-deep: #f3e9dc;
  --surface: #fffdfa;
  --surface-2: #fbf6ef;
  --surface-3: #f3ebe0;
  --line: #ecdfcf;
  --line-strong: #dccab4;
  --ink: #2a1b12;
  --ink-2: #4b3a2e;
  --muted: #8a7666;
  --muted-2: #b3a090;
  --accent: #d0702c;
  --accent-ink: #ffffff;
  --accent-soft: color-mix(in srgb, var(--accent) 12%, transparent);
  --accent-ring: color-mix(in srgb, var(--accent) 32%, transparent);
  --danger: #d6423a;
  --danger-soft: #fdecea;
  --live: #2f9e62;
  --live-soft: color-mix(in srgb, var(--live) 14%, transparent);
  --stage-bg: #140e0a;
  --fur: #cf7d40;
  --cream: #f8e6cc;
  --blush: #ff8f8f;
  --honey-grad: linear-gradient(135deg, #f0a24f 0%, #d0702c 48%, #b8541f 100%);
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 20px;
  --r-xl: 26px;
  --shadow-xs: 0 1px 2px rgba(60, 32, 14, 0.06);
  --shadow-sm: 0 1px 2px rgba(60, 32, 14, 0.05), 0 8px 20px -12px rgba(60, 32, 14, 0.28);
  --shadow-lg: 0 2px 6px rgba(60, 32, 14, 0.06), 0 28px 70px -24px rgba(60, 32, 14, 0.4);
  --font-ui: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  --font-brand: 'Fredoka', 'Nunito', ui-rounded, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

html[data-theme='dark'] {
  --bg: #17110d;
  --bg-deep: #100b08;
  --surface: #1f1712;
  --surface-2: #261d17;
  --surface-3: #30251d;
  --line: #342820;
  --line-strong: #46372c;
  --ink: #fbf1e6;
  --ink-2: #e3d3c3;
  --muted: #a8927f;
  --muted-2: #7a6656;
  --accent: #e88a45;
  --danger: #e2574c;
  --danger-soft: #2b1514;
  --live: #4ecb8a;
  --live-soft: rgba(78, 203, 138, 0.16);
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 24px -14px rgba(0, 0, 0, 0.8);
  --shadow-lg: 0 2px 8px rgba(0, 0, 0, 0.5), 0 34px 80px -26px rgba(0, 0, 0, 0.9);
}

html[data-accent='indigo'] { --accent: #5b5bd6; }
html[data-accent='teal'] { --accent: #0e8f8c; }
html[data-accent='amber'] { --accent: #b4711b; }
html[data-accent='rose'] { --accent: #cf4a6b; }
html[data-accent='plum'] { --accent: #8653d8; }

/* ==========================================================================
   Base
   ========================================================================== */

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior: none;
}

button, input, textarea { font: inherit; color: inherit; }

button {
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

a { color: inherit; }

h1, h2, h3, p, ul { margin: 0; }

ul { padding: 0; list-style: none; }

input {
  border: 0;
  outline: 0;
  background: transparent;
  min-width: 0;
}

input::placeholder { color: var(--muted-2); }

::selection { background: var(--accent); color: #fff; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

*, *::before, *::after { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 99px; border: 2px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-track { background: transparent; }

[hidden] { display: none !important; }

/* ==========================================================================
   Buttons + inputs
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 15px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: transform 0.16s var(--ease), background 0.16s, border-color 0.16s, color 0.16s, box-shadow 0.2s;
}
.btn .icon { width: 16px; height: 16px; }
.btn:active { transform: translateY(1px) scale(0.99); }

.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 10px 22px -12px color-mix(in srgb, var(--accent) 75%, transparent);
}
.btn--primary:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }

.btn--ghost {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}
.btn--ghost:hover { background: var(--surface-2); border-color: var(--line-strong); }

.btn--danger { background: var(--danger); color: #fff; }
.btn--danger:hover { background: color-mix(in srgb, var(--danger) 88%, #000); }

.btn--sm { height: 32px; padding: 0 12px; font-size: 12.5px; }
.btn--xs { height: 26px; padding: 0 10px; font-size: 11.5px; }
.btn--lg { height: 48px; padding: 0 20px; font-size: 14.5px; border-radius: 14px; }
.btn--lg .icon { width: 17px; height: 17px; }

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  color: var(--ink-2);
  transition: background 0.16s, color 0.16s, transform 0.16s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn--sm { width: 30px; height: 30px; }
.icon-btn--sm .icon { width: 16px; height: 16px; }

.mini-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--muted);
}
.mini-btn:hover { background: var(--surface-3); color: var(--ink); }
.mini-btn .icon { width: 13px; height: 13px; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.16s;
}
.text-link:hover { color: var(--accent); }
.text-link .icon { width: 13px; height: 13px; }
.text-link--sm { font-size: 11px; }

.badge {
  display: inline-flex;
  align-items: center;
  height: 19px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--accent-soft);
  color: var(--accent);
  white-space: nowrap;
}
.badge--muted { background: var(--surface-3); color: var(--muted); }
.badge--yt { background: #fde8e7; color: #c22c26; }
.badge--live { background: var(--live-soft); color: var(--live); }
html[data-theme='dark'] .badge--yt { background: #3a1513; color: #ff8a80; }

.dot-live {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 0 3px var(--live-soft);
  flex: none;
  display: inline-block;
}
.dot-badge {
  position: absolute;
  top: 7px;
  right: 7px;
  min-width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--danger);
  box-shadow: 0 0 0 2px var(--surface);
}

/* ==========================================================================
   Brand
   ========================================================================== */

.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand__mark { display: block; width: 32px; height: 32px; color: var(--ink); flex: none; transition: transform 0.4s var(--spring); }
.brand:hover .brand__mark { transform: rotate(-10deg) scale(1.08); }
.brand__mark svg { width: 100%; height: 100%; display: block; }
.brand__name { font-family: var(--font-brand); font-size: 21px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }
.brand--btn { padding: 3px 8px 3px 3px; border-radius: 10px; transition: background 0.16s; }
.brand--btn:hover { background: var(--surface-2); }
.brand--small .brand__mark { width: 24px; height: 24px; }
.brand--small .brand__name { font-size: 15px; }

/* ==========================================================================
   Landing
   ========================================================================== */

.landing {
  position: relative;
  min-height: 100%;
  overflow-x: hidden;
  background:
    radial-gradient(90% 60% at 50% -10%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 70%),
    var(--bg);
}

.landing__glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(42% 38% at 82% 14%, rgba(233, 174, 122, 0.22), transparent 70%),
    radial-gradient(35% 30% at 6% 32%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%);
}

.landing__nav {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  padding: 26px 36px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.landing__nav-links { display: flex; align-items: center; gap: 26px; }
.landing__nav-links a {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.16s;
}
.landing__nav-links a:hover { color: var(--ink); }
.landing__nav .icon-btn { border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 60%, transparent); }

.landing__main {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 36px 64px;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 56px;
  align-items: center;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow .pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 0 4px var(--live-soft);
}

.landing h1 {
  margin: 18px 0 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(58px, 6.6vw, 94px);
  line-height: 0.92;
  letter-spacing: -0.025em;
}
.landing h1 em { font-style: italic; color: var(--accent); }

.lede {
  margin: 24px 0 28px;
  max-width: 47ch;
  font-size: 16px;
  line-height: 1.62;
  color: var(--ink-2);
}

.join-card {
  max-width: 460px;
  padding: 16px;
  border-radius: var(--r-xl);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(20px);
}

.join-card__field { display: flex; flex-direction: column; gap: 6px; }
.join-card__field label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}
.join-card__field input {
  height: 46px;
  padding: 0 14px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 14px;
  transition: border-color 0.16s, box-shadow 0.16s, background 0.16s;
}
.join-card__field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); background: var(--surface); }

.join-card .btn--lg { width: 100%; margin-top: 10px; }

.join-card__or {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 15px 0 11px;
  color: var(--muted-2);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.join-card__or::before,
.join-card__or::after { content: ''; height: 1px; flex: 1; background: var(--line); }
.join-card__or span { white-space: nowrap; }

.join-card__code { display: flex; gap: 8px; }
.join-card__code input {
  flex: 1;
  height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.join-card__code input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }

.fineprint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 13px;
  font-size: 10.5px;
  color: var(--muted);
  text-align: center;
}
.fineprint .icon { width: 12px; height: 12px; }

.landing__points {
  display: flex;
  gap: 22px;
  margin-top: 30px;
  max-width: 520px;
  flex-wrap: wrap;
}
.landing__points li { display: flex; gap: 9px; align-items: flex-start; }
.landing__points .icon { width: 16px; height: 16px; color: var(--accent); margin-top: 2px; }
.landing__points b { display: block; font-size: 12px; font-weight: 600; }
.landing__points small { display: block; font-size: 11px; color: var(--muted); }

/* ---------- landing preview ---------- */

.landing__preview { position: relative; padding: 24px 0 30px; perspective: 1600px; }

.mock {
  position: relative;
  aspect-ratio: 1.16;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: rotateY(-4deg) rotateX(1.4deg);
  transform-origin: 60% 40%;
}

.mock__chrome {
  flex: none;
  height: 38px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.mock__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); }
.mock__dot:first-child { background: #e8aaa5; }
.mock__title { margin-left: 8px; font-size: 10px; font-weight: 500; color: var(--muted); }
.mock__pill {
  margin-left: auto;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--live);
  background: var(--live-soft);
  padding: 2px 7px;
  border-radius: 99px;
}

.mock__body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 168px;
  gap: 8px;
  padding: 9px;
  position: relative;
}

.mock__stage { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.mock__now {
  flex: none;
  height: 24px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}
.mock__status { width: 6px; height: 6px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 3px var(--live-soft); }
.mock__now-text { display: flex; align-items: baseline; gap: 6px; overflow: hidden; }
.mock__now-text b { font-size: 8.5px; font-weight: 600; white-space: nowrap; }
.mock__now-text i { font-size: 7.5px; color: var(--muted); font-style: normal; white-space: nowrap; }

.mock__screen {
  position: relative;
  flex: 1;
  min-height: 0;
  border-radius: 12px;
  overflow: hidden;
  background: #0c1017;
}
.mock__scene { position: absolute; inset: 0; background: linear-gradient(180deg, #101a2c 0%, #2a4257 42%, #8c5b56 74%, #e2a678 100%); }
.mock__scene .moon {
  position: absolute;
  top: 17%;
  right: 19%;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #f8e7c2;
  box-shadow: 0 0 44px 14px rgba(248, 231, 194, 0.35);
}
.mock__scene .hills {
  position: absolute;
  inset: auto 0 0 0;
  height: 56%;
  background:
    radial-gradient(130% 100% at 8% 100%, #1d2c35 0 58%, transparent 59%),
    radial-gradient(130% 100% at 88% 100%, #14212a 0 54%, transparent 55%),
    radial-gradient(100% 80% at 50% 100%, #0d161d 0 50%, transparent 51%);
}
.mock__scene::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.13) 0.5px, transparent 0.5px);
  background-size: 3px 3px;
  opacity: 0.5;
  mix-blend-mode: overlay;
}
.mock__bigplay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  color: #fff;
}
.mock__bigplay svg { width: 13px; height: 13px; fill: currentColor; }
.mock__reaction {
  position: absolute;
  right: 12%;
  top: 22%;
  font-size: 13px;
  animation: floatUp 5s ease-in-out infinite;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}
.mock__scrub {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 22px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.55));
  display: flex;
  align-items: flex-end;
  padding: 0 9px 7px;
}
.mock__scrub::before {
  content: '';
  height: 3px;
  width: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #f3f3f3 0 44%, rgba(255, 255, 255, 0.28) 44%);
}

.mock__side { display: grid; grid-template-rows: 1.12fr 1fr; gap: 8px; min-width: 0; }
.mock__call, .mock__chat {
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  padding: 7px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
  overflow: hidden;
}
.mock__callhead, .mock__chathead { display: flex; align-items: center; gap: 5px; font-size: 8px; font-weight: 600; color: var(--muted); }
.mock__callhead span { background: var(--surface-3); border-radius: 99px; padding: 0 5px; font-size: 7px; }

.mock__tiles { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; min-height: 0; }
.mock__tile { position: relative; border-radius: 7px; overflow: hidden; display: grid; place-items: center; }
.mock__tile span { font-size: 9px; font-weight: 700; color: rgba(255, 255, 255, 0.92); letter-spacing: 0.02em; }
.mock__tile i {
  position: absolute;
  left: 3px;
  bottom: 3px;
  font-style: normal;
  font-size: 5.5px;
  color: #fff;
  background: rgba(0, 0, 0, 0.4);
  padding: 1px 3px;
  border-radius: 3px;
}
.t1 { background: linear-gradient(145deg, #40556b, #1a2531); }
.t2 { background: linear-gradient(145deg, #6b4b45, #2b1d1b); }
.t3 { background: linear-gradient(145deg, #4b5f4a, #1e271e); }
.t4 { background: linear-gradient(145deg, #5a4a6b, #241d2c); }

.mock__bubble {
  font-size: 7.5px;
  line-height: 1.35;
  padding: 4px 6px;
  border-radius: 7px;
  max-width: 88%;
}
.mock__bubble--them { background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); border-bottom-left-radius: 2px; }
.mock__bubble--me { background: var(--accent); color: #fff; align-self: flex-end; border-bottom-right-radius: 2px; }
.mock__input {
  margin-top: auto;
  height: 20px;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: flex;
  align-items: center;
  padding: 0 5px;
  gap: 4px;
  font-size: 6.5px;
  color: var(--muted-2);
}
.mock__input i { margin-left: auto; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); color: #fff; font-style: normal; display: grid; place-items: center; font-size: 8px; }

.mock__phone {
  position: absolute;
  right: -14px;
  bottom: -26px;
  width: 168px;
  height: 296px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  padding: 9px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  transform: rotate(4.5deg);
  z-index: 3;
}
.mock__phone-head { display: flex; align-items: center; justify-content: space-between; font-size: 7.5px; font-weight: 600; color: var(--muted); }
.mock__phone-head i { font-style: normal; letter-spacing: 0.06em; }
.mock__phone-bar {
  height: 24px;
  border-radius: 7px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 6px;
  font-size: 7px;
  color: var(--muted);
}
.mock__phone-bar .icon { width: 9px; height: 9px; }
.mock__phone-thumbs { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.mock__phone-thumbs .thumb { aspect-ratio: 16 / 11; border-radius: 6px; }
.th1 { background: linear-gradient(135deg, #e6b17a, #b4634f); }
.th2 { background: linear-gradient(135deg, #7a9cc4, #2d4763); }
.th3 { background: linear-gradient(135deg, #9fc4a0, #38553d); }
.th4 { background: linear-gradient(135deg, #c79cc9, #5d3a63); }
.mock__phone-note {
  margin-top: auto;
  font-size: 7.5px;
  color: var(--muted);
  line-height: 1.35;
  border-top: 1px dashed var(--line);
  padding-top: 7px;
}
.mock__phone-note b { color: var(--ink); font-size: 8px; }

.mock__floating {
  position: absolute;
  left: 4px;
  bottom: -2px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  font-size: 10.5px;
  font-weight: 500;
  color: var(--ink-2);
}
.mock__floating .icon { width: 13px; height: 13px; color: var(--accent); }

@keyframes floatUp {
  0%, 100% { transform: translateY(0) rotate(-4deg); opacity: 0.85; }
  50% { transform: translateY(-9px) rotate(3deg); opacity: 1; }
}

/* ---------- how + footer ---------- */

.how {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 36px 60px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  border-top: 1px solid var(--line);
}
.how__item { max-width: 320px; }
.how__item span {
  font-family: var(--font-display);
  font-size: 30px;
  color: var(--accent);
  line-height: 1;
}
.how__item h3 { margin: 10px 0 6px; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.how__item p { font-size: 13px; line-height: 1.6; color: var(--muted); }

.landing__footer {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 36px 40px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.landing__footer > p { font-size: 11.5px; color: var(--muted); max-width: 44ch; }
.landing__footer .landing__fine { margin-left: auto; max-width: 48ch; text-align: right; font-size: 10.5px; color: var(--muted-2); }

/* ==========================================================================
   App shell
   ========================================================================== */

.app {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
}

.topbar {
  flex: none;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  backdrop-filter: blur(16px);
  z-index: 40;
}
.topbar__left, .topbar__right { display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar__center { display: flex; justify-content: center; flex: 1; min-width: 0; }

.room-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 4px 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  min-width: 0;
}
.room-chip__label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.room-chip strong {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  white-space: nowrap;
}

.layout-switch {
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.layout-switch button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  transition: background 0.16s, color 0.16s, box-shadow 0.16s;
  white-space: nowrap;
}
.layout-switch button .icon { width: 14px; height: 14px; }
.layout-switch button:hover { color: var(--ink); }
.layout-switch button.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-xs);
}

/* ==========================================================================
   Workspace + panels
   ========================================================================== */

.workspace {
  flex: 1;
  min-height: 0;
  padding: 10px 12px 96px;
}
.workspace__inner { position: relative; height: 100%; }

.panel {
  position: absolute;
  display: flex;
  flex-direction: column;
  min-width: 250px;
  min-height: 170px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow 0.2s var(--ease);
}
.panel:hover { box-shadow: var(--shadow-sm); }
.panel.is-floating { box-shadow: var(--shadow-lg); z-index: 30; }

.panel__head {
  flex: none;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 8px 0 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  cursor: grab;
  user-select: none;
  touch-action: none;
}
.panel__head:active { cursor: grabbing; }
.workspace--locked .panel__head { cursor: default; }

.panel__title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; letter-spacing: -0.01em; min-width: 0; }
.panel__icon { display: grid; place-items: center; color: var(--muted); }
.panel__icon .icon { width: 15px; height: 15px; }
.panel__actions { display: flex; align-items: center; gap: 2px; }

.count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 19px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
}

/* resize handles */
.rh { position: absolute; z-index: 8; }
.rh--n { top: -3px; left: 10px; right: 10px; height: 7px; cursor: ns-resize; }
.rh--s { bottom: -3px; left: 10px; right: 10px; height: 7px; cursor: ns-resize; }
.rh--w { left: -3px; top: 10px; bottom: 10px; width: 7px; cursor: ew-resize; }
.rh--e { right: -3px; top: 10px; bottom: 10px; width: 7px; cursor: ew-resize; }
.rh--nw, .rh--ne, .rh--sw, .rh--se { width: 14px; height: 14px; }
.rh--nw { top: -3px; left: -3px; cursor: nwse-resize; }
.rh--ne { top: -3px; right: -3px; cursor: nesw-resize; }
.rh--sw { bottom: -3px; left: -3px; cursor: nesw-resize; }
.rh--se { bottom: -3px; right: -3px; cursor: nwse-resize; }
.workspace--locked .rh { display: none; }
.workspace--locked .panel { border-style: solid; }
.panel.is-dragging { box-shadow: var(--shadow-lg); z-index: 25; opacity: 0.98; }

/* ==========================================================================
   Stage
   ========================================================================== */

.panel--stage { min-width: 320px; min-height: 220px; }

.now { display: flex; align-items: center; gap: 9px; min-width: 0; }
.now__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted-2);
  flex: none;
  transition: background 0.2s, box-shadow 0.2s;
}
.now__dot.is-live { background: var(--live); box-shadow: 0 0 0 4px var(--live-soft); }
.now__dot.is-screen { background: var(--danger); box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger) 16%, transparent); }
.now__text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.now__label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
}
.now__title {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  max-width: 46vw;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink);
}
.now__actions { display: flex; align-items: center; gap: 2px; flex: none; }

.sync-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px;
  margin-right: 2px;
  border-radius: 999px;
  background: var(--live-soft);
  color: var(--live);
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}
.sync-pill i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.sync-pill.is-off { background: var(--surface-3); color: var(--muted); }

.stage {
  position: relative;
  flex: 1;
  min-height: 0;
  background: var(--surface-2);
  display: flex;
  overflow: hidden;
}
.stage.is-media { background: var(--stage-bg); }

/* "sound is off" chip — shown when the browser refused unmuted autoplay */
.stage-sound-hint {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 88%, transparent);
  color: var(--bg);
  font-size: 11.5px;
  font-weight: 550;
  letter-spacing: -0.005em;
  box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: transform 0.14s ease, opacity 0.14s ease;
  animation: hint-in 0.3s ease both;
}
.stage-sound-hint:hover { transform: translateX(-50%) translateY(-1px); }
.stage-sound-hint .icon { width: 14px; height: 14px; }
@keyframes hint-in {
  from { opacity: 0; transform: translateX(-50%) translateY(6px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.stage__empty {
  flex: 1;
  overflow-y: auto;
  display: grid;
  place-items: center;
  padding: 28px 22px;
  background:
    radial-gradient(70% 70% at 50% 0%, color-mix(in srgb, var(--accent) 6%, transparent), transparent 70%),
    var(--surface-2);
}
.empty-card { width: 100%; max-width: 520px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.empty-card__icon {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 14px;
}
.empty-card__icon .icon { width: 20px; height: 20px; }
.empty-card h2 { font-size: 19px; font-weight: 600; letter-spacing: -0.025em; }
.empty-card p { margin-top: 6px; max-width: 400px; font-size: 12.5px; line-height: 1.55; color: var(--muted); }

.url-bar {
  width: 100%;
  max-width: 470px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 5px 5px 5px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-xs);
  transition: border-color 0.16s, box-shadow 0.16s;
}
.url-bar:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.url-bar > .icon { color: var(--muted-2); width: 16px; height: 16px; }
.url-bar input { flex: 1; height: 34px; font-size: 13px; }

.quick-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 14px; }
.quick-row button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 11.5px;
  font-weight: 500;
  transition: border-color 0.16s, color 0.16s, background 0.16s, transform 0.16s;
}
.quick-row button .icon { width: 13px; height: 13px; color: var(--muted); }
.quick-row button:hover { border-color: var(--accent); color: var(--accent); background: var(--surface); }
.quick-row button:hover .icon { color: var(--accent); }
.empty-card .text-link { margin-top: 16px; }

.stage__web, .stage__yt, .stage__screen {
  position: absolute;
  inset: 0;
  background: #000;
  z-index: 1;
}
.stage__web iframe { width: 100%; height: 100%; border: 0; display: block; background: #000; }
.stage__yt iframe, .stage__yt > div { width: 100% !important; height: 100% !important; border: 0; }
.stage__yt { display: flex; }
.stage__screen video { width: 100%; height: 100%; display: block; object-fit: contain; background: #000; }

.stage__blocked {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow-y: auto;
  display: grid;
  place-items: center;
  padding: 26px 20px;
  background: var(--surface);
  background-image: radial-gradient(80% 80% at 50% -20%, color-mix(in srgb, var(--accent) 7%, transparent), transparent);
}
.blocked-card { max-width: 470px; text-align: center; }
.blocked-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  background: var(--danger-soft);
  color: var(--danger);
}
.blocked-card h2 { font-size: 18px; letter-spacing: -0.02em; font-weight: 600; }
.blocked-card > p { margin: 8px auto 0; font-size: 12.5px; line-height: 1.6; color: var(--muted); max-width: 400px; }
.blocked-card__actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 18px; }
.blocked-card__hint {
  margin-top: 16px !important;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px dashed var(--line);
  font-size: 11px !important;
  color: var(--muted) !important;
}
.blocked-card__hint b { color: var(--ink-2); }

.screen-banner {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 24px);
  padding: 5px 6px 5px 12px;
  border-radius: 999px;
  background: rgba(16, 16, 19, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(14px);
  color: #fff;
  font-size: 11.5px;
  font-weight: 500;
}
.screen-banner #screen-who { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.reactions { position: absolute; inset: 0; pointer-events: none; z-index: 6; overflow: hidden; }
.reaction {
  position: absolute;
  bottom: 8%;
  font-size: 30px;
  animation: reactionFloat 2.8s ease-out forwards;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.35));
}
@keyframes reactionFloat {
  0% { transform: translateY(0) scale(0.6) rotate(-8deg); opacity: 0; }
  12% { opacity: 1; transform: translateY(-14px) scale(1.1) rotate(4deg); }
  100% { transform: translateY(-220px) scale(0.9) rotate(-6deg); opacity: 0; }
}

.fs-exit {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 20;
  display: none;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  background: rgba(16, 16, 19, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 12px;
  backdrop-filter: blur(10px);
}
.fs-exit .icon { width: 14px; height: 14px; }
.stage:fullscreen { background: #000; }
.stage:fullscreen .fs-exit { display: inline-flex; }
.stage:fullscreen .stage__empty { background: var(--stage-bg); }

/* ==========================================================================
   Call
   ========================================================================== */

.call-body { flex: 1; min-height: 0; padding: 8px; display: flex; flex-direction: column; gap: 8px; }

/* mic/camera permission notice */
.media-notice {
  flex: none;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, #d97706 34%, var(--line));
  border-radius: 11px;
  background: color-mix(in srgb, #d97706 10%, var(--surface));
}
.media-notice__icon {
  width: 26px;
  height: 26px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: color-mix(in srgb, #d97706 18%, transparent);
  color: #b45309;
}
.media-notice__icon .icon { width: 14px; height: 14px; }
.media-notice__text { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 1px; }
.media-notice__text b { font-size: 11.5px; font-weight: 600; color: var(--ink); }
.media-notice__text small { font-size: 10.5px; line-height: 1.4; color: var(--muted); }
.media-notice .btn { flex: none; }
.call-grid {
  height: 100%;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr));
  grid-auto-rows: minmax(84px, 1fr);
  overflow-y: auto;
  align-content: stretch;
}
.call-grid[data-compact='true'] { grid-auto-rows: 118px; align-content: start; }

.tile {
  position: relative;
  border-radius: 13px;
  overflow: hidden;
  background: #17171c;
  min-height: 0;
  isolation: isolate;
}
.tile video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #17171c;
}
.tile--self video { transform: scaleX(-1); }
.tile__placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(120% 120% at 30% 0%, rgba(255, 255, 255, 0.08), transparent 60%),
    linear-gradient(160deg, #26262e, #141418);
}
.tile__placeholder.is-hidden { display: none; }
.tile__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #fff;
  background: var(--av, #4b5563);
  box-shadow: 0 6px 18px -8px rgba(0, 0, 0, 0.6);
}
.tile__name {
  position: absolute;
  left: 7px;
  bottom: 7px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 4px;
  max-width: calc(100% - 14px);
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(10, 10, 12, 0.5);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 10.5px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tile__you { color: rgba(255, 255, 255, 0.55); font-size: 9.5px; }
.tile__flags { position: absolute; top: 6px; right: 6px; z-index: 2; display: flex; gap: 3px; }
.tile__tap {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  padding: 7px 13px;
  border: 0;
  border-radius: 999px;
  background: rgba(12, 12, 14, 0.72);
  color: #fff;
  font-size: 11px;
  font-weight: 550;
  cursor: pointer;
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 20px -10px rgba(0, 0, 0, 0.7);
}
.tile__tap:hover { background: rgba(12, 12, 14, 0.86); }
.tile__flag {
  width: 21px;
  height: 21px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--danger);
  color: #fff;
}
.tile__flag .icon { width: 11px; height: 11px; }
.tile__status {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.55);
  background: rgba(16, 16, 19, 0.4);
  backdrop-filter: blur(2px);
  pointer-events: none;
}
.tile__status[hidden] { display: none; }

/* ==========================================================================
   Chat
   ========================================================================== */

.chat { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.chat-status { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; color: var(--muted); }
.chat__list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 12px 6px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  scroll-behavior: smooth;
}
.chat__empty { margin: auto; text-align: center; font-size: 11.5px; color: var(--muted-2); max-width: 190px; line-height: 1.6; }

.msg { display: flex; gap: 7px; align-items: flex-start; max-width: 100%; }
.msg--mine { flex-direction: row-reverse; }
.msg__avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  flex: none;
  display: grid;
  place-items: center;
  font-size: 9px;
  font-weight: 600;
  color: #fff;
  background: var(--av, #64748b);
  margin-top: 13px;
}
.msg__body { max-width: 82%; display: flex; flex-direction: column; }
.msg--mine .msg__body { align-items: flex-end; }
.msg__meta { display: flex; align-items: baseline; gap: 5px; margin: 0 0 3px 2px; font-size: 9.5px; color: var(--muted); }
.msg__meta b { font-weight: 600; color: var(--ink-2); }
.msg__bubble {
  padding: 7px 10px;
  border-radius: 13px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.msg--them .msg__bubble { border-bottom-left-radius: 4px; }
.msg--mine .msg__bubble {
  background: var(--accent);
  border-color: transparent;
  color: #fff;
  border-bottom-right-radius: 4px;
}
.msg--system { justify-content: center; }
.msg--system span {
  font-size: 10px;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 3px 9px;
  border-radius: 999px;
}

.chat__composer { flex: none; border-top: 1px solid var(--line); padding: 7px 9px 9px; }
.reaction-row { display: flex; gap: 2px; padding: 0 2px 5px; }
.reaction-row button {
  width: 26px;
  height: 24px;
  border-radius: 7px;
  font-size: 13px;
  line-height: 1;
  transition: background 0.14s, transform 0.14s;
}
.reaction-row button:hover { background: var(--surface-2); transform: translateY(-1px); }
.chat__form {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 3px 3px 12px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: 12px;
  transition: border-color 0.16s, box-shadow 0.16s, background 0.16s;
}
.chat__form:focus-within { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px var(--accent-ring); }
.chat__form input { flex: 1; height: 32px; font-size: 12.5px; }
.chat__send {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  flex: none;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
  transition: transform 0.14s, opacity 0.14s;
}
.chat__send .icon { width: 14px; height: 14px; }
.chat__send:hover { transform: scale(1.04); }

/* ==========================================================================
   Pocket browser
   ========================================================================== */

.panel--browser { min-width: 270px; }
.panel--browser .panel__icon { color: var(--accent); }

.browser { flex: 1; min-height: 0; display: flex; flex-direction: column; }

.browser__bar {
  flex: none;
  margin: 9px 11px 7px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 3px 3px 3px 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  transition: border-color 0.16s, box-shadow 0.16s, background 0.16s;
}
.browser__bar:focus-within { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px var(--accent-ring); }
.browser__bar > .icon { width: 14px; height: 14px; color: var(--muted-2); }
.browser__bar input { flex: 1; height: 32px; font-size: 12px; }
.browser__go {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--bg);
  flex: none;
}
.browser__go .icon { width: 15px; height: 15px; }

.browser__chips {
  flex: none;
  display: flex;
  gap: 4px;
  padding: 0 11px 7px;
  overflow-x: auto;
  scrollbar-width: none;
}
.browser__chips::-webkit-scrollbar { display: none; }
.browser__chips button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 25px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 10.5px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  transition: color 0.14s, border-color 0.14s;
}
.browser__chips button:hover { color: var(--ink); border-color: var(--line-strong); }
.app-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--c, var(--accent)); flex: none; }

.browser__body { flex: 1; min-height: 0; overflow-y: auto; padding: 3px 11px 11px; }
.browser__section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 12px 1px 7px;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
}
.browser__section-head:first-child { margin-top: 3px; }
.browser__tiny { font-size: 8.5px; letter-spacing: 0.04em; text-transform: none; color: var(--muted-2); font-weight: 500; }

.app-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.app-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  padding: 9px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  text-align: left;
  transition: border-color 0.16s, background 0.16s, transform 0.16s;
}
.app-tile:hover { border-color: var(--line-strong); background: var(--surface-2); transform: translateY(-1px); }
.app-tile__icon {
  width: 27px;
  height: 27px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--c) 14%, transparent);
  color: var(--c);
  margin-bottom: 6px;
}
.app-tile__icon .icon { width: 14px; height: 14px; }
.app-tile b { font-size: 11.5px; font-weight: 600; }
.app-tile small { font-size: 9.5px; color: var(--muted); }

.recent-list { display: flex; flex-direction: column; gap: 3px; }
.recent-empty { font-size: 10.5px; color: var(--muted-2); padding: 4px 1px 8px; line-height: 1.5; }
.recent-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 7px;
  border-radius: 9px;
  text-align: left;
  color: var(--ink-2);
  font-size: 11px;
  transition: background 0.14s;
}
.recent-item:hover { background: var(--surface-2); }
.recent-item .icon { width: 13px; height: 13px; color: var(--muted-2); flex: none; }
.recent-item span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.browser__results { display: flex; flex-direction: column; gap: 4px; }
.result {
  display: flex;
  gap: 8px;
  padding: 5px;
  border-radius: 10px;
  text-align: left;
  transition: background 0.14s;
}
.result:hover { background: var(--surface-2); }
.result__thumb {
  position: relative;
  width: 82px;
  aspect-ratio: 16 / 9;
  border-radius: 7px;
  overflow: hidden;
  flex: none;
  background: var(--surface-3);
}
.result__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.result__dur {
  position: absolute;
  right: 3px;
  bottom: 3px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 8px;
  font-weight: 600;
  padding: 1px 3px;
  border-radius: 3px;
}
.result__text { min-width: 0; display: flex; flex-direction: column; gap: 2px; justify-content: center; }
.result__title {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.result__meta { font-size: 9.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.result__meta span + span::before { content: ' · '; }

.browser__message { padding: 4px 1px 10px; }
.browser-note {
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-2);
  padding: 13px;
}
.browser-note__icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 9px;
}
.browser-note h4 { margin: 0 0 4px; font-size: 12.5px; font-weight: 600; }
.browser-note p { font-size: 11px; line-height: 1.55; color: var(--muted); }
.browser-note .btn { margin-top: 10px; width: 100%; }
.browser-note .text-link { margin-top: 8px; font-size: 10.5px; }

.browser__foot {
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-top: 1px solid var(--line);
  font-size: 9.5px;
  color: var(--muted);
}
.browser__foot .dot-live { width: 5px; height: 5px; }

/* ==========================================================================
   Dock
   ========================================================================== */

.dock {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(20px);
  max-width: calc(100vw - 24px);
}
.dock__sep { width: 1px; height: 24px; background: var(--line); margin: 0 4px; flex: none; }

.dock-btn {
  position: relative;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--ink);
  transition: background 0.16s, color 0.16s, transform 0.16s;
  flex: none;
}
.dock-btn .icon { width: 19px; height: 19px; }
.dock-btn:hover { background: var(--surface-2); color: var(--ink); }
.dock-btn:active { transform: scale(0.94); }
.dock-btn.is-off { background: var(--danger-soft); color: var(--danger); }
.dock-btn.is-on { background: var(--accent); color: #fff; }
.dock-btn.is-active { background: var(--ink); color: var(--bg); }
.dock-btn[hidden] { display: none !important; }

.dock-btn--leave {
  width: auto;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
}
.dock-btn--leave:hover { background: color-mix(in srgb, var(--danger) 86%, #000); color: #fff; }

.dock-btn[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: 5px 9px;
  border-radius: 7px;
  background: var(--ink);
  color: var(--bg);
  font-size: 10px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.14s, transform 0.14s;
  z-index: 5;
}
.dock-btn[data-tip]:hover::after { opacity: 1; transform: translateX(-50%) translateY(0); }
.dock-btn--leave[data-tip]::after { content: none; }

/* ==========================================================================
   Drawer
   ========================================================================== */

.scrim {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(12, 12, 14, 0.36);
  backdrop-filter: blur(2px);
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  width: 380px;
  max-width: 92vw;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.28s var(--ease);
}
@keyframes slideIn { from { transform: translateX(24px); opacity: 0.6; } to { transform: translateX(0); opacity: 1; } }

.drawer__head {
  flex: none;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--line);
}
.drawer__head h2 { font-size: 17px; font-weight: 600; letter-spacing: -0.025em; }
.drawer__head p { margin-top: 3px; font-size: 11px; color: var(--muted); max-width: 30ch; }

.drawer__body { flex: 1; overflow-y: auto; padding: 6px 20px 30px; }

.setting-group { padding: 14px 0 8px; border-bottom: 1px solid var(--line); }
.setting-group:last-child { border-bottom: 0; }
.setting-group h3 {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.setting-note { font-size: 10.5px; color: var(--muted-2); margin: 2px 0 8px; }
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
}
.setting-row--stack { flex-direction: column; align-items: stretch; gap: 7px; }
.setting-label { font-size: 12.5px; font-weight: 500; display: flex; flex-direction: column; gap: 1px; }
.setting-label small { font-size: 10.5px; font-weight: 400; color: var(--muted); }
.setting-row > label { font-size: 12.5px; font-weight: 500; display: flex; flex-direction: column; gap: 1px; }
.setting-row > label small { font-size: 10.5px; font-weight: 400; color: var(--muted); }

.inline-field { display: flex; gap: 6px; }
.inline-field input {
  flex: 1;
  height: 36px;
  padding: 0 11px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-size: 12.5px;
}
.inline-field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); background: var(--surface); }

.select-field {
  width: 100%;
  height: 36px;
  padding: 0 32px 0 11px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
  font-size: 12.5px;
  font-family: inherit;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 15px, calc(100% - 12px) 15px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  text-overflow: ellipsis;
}
.select-field:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); background-color: var(--surface); }
.select-field:disabled { opacity: 0.55; }

.mic-level {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: var(--surface-3);
  border: 1px solid var(--line);
  overflow: hidden;
}
.mic-level i {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), #4f8f6d 70%, #cf4a6b);
  transition: width 0.08s linear;
}
.mic-level.is-hot { box-shadow: 0 0 0 3px var(--accent-ring); }

.segmented { display: flex; gap: 2px; padding: 3px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; }
.segmented button {
  flex: 1;
  height: 28px;
  border-radius: 7px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--muted);
  transition: background 0.15s, color 0.15s;
}
.segmented button:hover { color: var(--ink); }
.segmented button.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-xs); }

.swatches { display: flex; gap: 9px; }
.swatches button {
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: var(--sw);
  position: relative;
  transition: transform 0.16s;
}
.swatches button::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid transparent;
  transition: border-color 0.16s;
}
.swatches button:hover { transform: scale(1.06); }
.swatches button.is-active::after { border-color: var(--sw); }
.swatches button .icon { position: absolute; inset: 0; margin: auto; width: 13px; height: 13px; color: #fff; display: none; }
.swatches button.is-active .icon { display: block; }

.switch {
  width: 40px;
  height: 23px;
  border-radius: 999px;
  background: var(--surface-3);
  border: 1px solid var(--line);
  padding: 2px;
  flex: none;
  transition: background 0.18s, border-color 0.18s;
}
.switch span {
  display: block;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  transition: transform 0.18s var(--ease);
}
.switch[aria-checked='true'] { background: var(--accent); border-color: var(--accent); }
.switch[aria-checked='true'] span { transform: translateX(17px); background: #fff; }

.mini-toggles { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
.chip-toggle {
  height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 10.5px;
  font-weight: 500;
  color: var(--muted);
}
.chip-toggle.is-active { background: var(--accent-soft); border-color: transparent; color: var(--accent); font-weight: 600; }

.dock-toggles { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; padding-top: 4px; }
.check { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--ink-2); padding: 5px 0; cursor: pointer; }
.check input { appearance: none; width: 15px; height: 15px; border-radius: 4px; border: 1.5px solid var(--line-strong); flex: none; display: grid; place-items: center; transition: background 0.14s, border-color 0.14s; }
.check input::after { content: ''; width: 7px; height: 4px; border-left: 1.5px solid #fff; border-bottom: 1.5px solid #fff; transform: rotate(-45deg) translateY(-1px); opacity: 0; }
.check input:checked { background: var(--accent); border-color: var(--accent); }
.check input:checked::after { opacity: 1; }

.code-inline {
  font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace;
  font-size: 11.5px;
  letter-spacing: 0.12em;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.shortcuts { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 8px 0 4px; }
.shortcuts li { display: flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--muted); }
.shortcuts kbd {
  font-family: inherit;
  font-size: 9.5px;
  font-weight: 600;
  min-width: 19px;
  height: 19px;
  padding: 0 4px;
  display: inline-grid;
  place-items: center;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink-2);
}

/* ==========================================================================
   Toasts
   ========================================================================== */

.toasts {
  position: fixed;
  left: 50%;
  bottom: 86px;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  pointer-events: none;
  max-width: calc(100vw - 32px);
}
.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 11px;
  background: var(--ink);
  color: var(--bg);
  font-size: 11.5px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.25s var(--ease);
  max-width: 92vw;
}
.toast .icon { width: 14px; height: 14px; flex: none; }
.toast--error { background: var(--danger); color: #fff; }
.toast--ok { background: var(--live); color: #fff; }
.toast.is-out { animation: toastOut 0.22s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-4px) scale(0.98); } }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1180px) {
  .layout-switch button span { display: none; }
  .layout-switch button { padding: 0 10px; }
  .now__title { max-width: 30vw; }
  .now .badge { display: none; }
}

@media (max-width: 1000px) {
  .landing__main { grid-template-columns: 1fr; gap: 36px; padding-top: 24px; }
  .landing__preview { max-width: 640px; margin: 0 auto; width: 100%; padding-bottom: 34px; }
  .how { grid-template-columns: 1fr; gap: 18px; padding-top: 30px; }
  .how__item { max-width: 480px; }
  .landing__footer .landing__fine { margin-left: 0; text-align: left; }
}

@media (max-width: 860px) {
  .topbar__center { display: none; }
  .workspace { overflow-y: auto; padding: 8px 8px 104px; }
  .workspace__inner { height: auto; display: flex; flex-direction: column; gap: 9px; }
  .panel {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    height: auto !important;
    min-width: 0 !important;
    border-radius: 16px;
  }
  .rh { display: none !important; }
  .panel__head { cursor: default; }
  #panel-stage { order: 1; height: 46vh !important; min-height: 300px !important; }
  #panel-call { order: 2; height: 42vh !important; }
  #panel-chat { order: 3; height: 330px !important; }
  #panel-browser { order: 4; height: 540px !important; }
  .now__title { max-width: 44vw; }
  .call-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .empty-card h2 { font-size: 17px; }
  .stage__empty { padding: 20px 14px; }
  .dock { bottom: 12px; }
  .drawer { width: 100%; max-width: 100%; }
  .mock__phone { width: 140px; height: 252px; right: -4px; bottom: -20px; }
}

@media (max-width: 620px) {
  .landing__nav { padding: 18px 18px 4px; }
  .landing__nav-links a { display: none; }
  .landing__main { padding: 22px 18px 44px; gap: 26px; }
  .landing h1 { font-size: clamp(46px, 13vw, 66px); }
  .lede { font-size: 14.5px; margin: 18px 0 22px; }
  .join-card { padding: 13px; border-radius: 18px; }
  .join-card__code { flex-direction: column; }
  .join-card__code .btn { width: 100%; }
  .landing__points { gap: 14px; }
  .landing__points li { flex: 1 1 100%; }
  .landing__preview { padding-bottom: 46px; }
  .mock { transform: none; aspect-ratio: 0.95; }
  .mock__body { grid-template-columns: minmax(0, 1fr) 112px; }
  .mock__phone { width: 116px; height: 208px; right: -2px; bottom: -34px; padding: 7px; }
  .mock__phone-note { font-size: 6.5px; }
  .mock__phone-note b { font-size: 7px; }
  .mock__floating { font-size: 9px; padding: 6px 10px; bottom: -12px; }
  .how { padding: 26px 18px 40px; }
  .landing__footer { padding: 22px 18px 30px; }
  .landing__footer .landing__fine { font-size: 9.5px; }

  .topbar { height: 56px; padding: 0 8px; }
  .brand__name { display: none; }
  .room-chip__label { display: none; }
  .room-chip { padding-left: 8px; }
  .topbar__right .btn span { display: none; }
  .topbar__right .btn { width: 36px; padding: 0; }
  .topbar__right .btn .icon { width: 17px; height: 17px; }

  .workspace { padding: 6px 6px 96px; }
  #panel-stage { height: 40vh !important; min-height: 260px !important; }
  #panel-call { height: 46vh !important; }
  .now__title { max-width: 40vw; }
  .now__label { display: none; }
  #sync-pill { display: none !important; }
  .now__actions .icon-btn--sm:nth-child(2) { display: none; }

  .quick-row { gap: 4px; }
  .quick-row button { height: 27px; font-size: 10.5px; padding: 0 8px; }
  .url-bar { margin-top: 14px; }
  .url-bar .btn { display: none; }
  .empty-card p { font-size: 11.5px; }

  .dock { gap: 1px; padding: 5px; bottom: 8px; }
  .dock-btn { width: 39px; height: 39px; }
  .dock-btn .icon { width: 17px; height: 17px; }
  .dock-btn--leave { padding: 0 12px; font-size: 11.5px; }
  .dock__sep { margin: 0 2px; height: 20px; }
  .blocked-card h2 { font-size: 16px; }
  .blocked-card__actions .btn { width: 100%; }
  .drawer__body { padding: 6px 16px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
