@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&family=Syne:wght@600;700;800&display=swap");

:root {
  --ink: #0a1628;
  --ink-soft: #243044;
  --muted: #5b6b7c;
  --line: rgba(10, 22, 40, 0.1);
  --surface: #ffffff;
  --surface-2: #f3f6f9;
  --bg: #eef3f7;
  --live: #00a896;
  --live-deep: #007f74;
  --warm: #ff6b4a;
  --danger: #e23d3d;
  --ok: #1f9d63;
  --shadow: 0 16px 40px rgba(10, 22, 40, 0.08);
  --shadow-lg: 0 28px 60px rgba(10, 22, 40, 0.12);
  --radius: 20px;
  --radius-sm: 14px;
  --font: "Outfit", system-ui, sans-serif;
  --display: "Syne", "Outfit", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(900px 520px at -5% -10%, rgba(0, 168, 150, 0.16), transparent 55%),
    radial-gradient(780px 480px at 110% 0%, rgba(255, 107, 74, 0.1), transparent 50%),
    linear-gradient(180deg, #f7fafc 0%, var(--bg) 48%, #e8eef4 100%);
  -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; }
a { color: var(--live-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
#app { min-height: 100vh; }

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse-soft {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.04); opacity: 1; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.shell {
  max-width: 1080px;
  margin: 0 auto;
  padding: 22px 18px 48px;
  animation: rise 0.45s var(--ease) both;
}

.brand {
  font-family: var(--display);
  font-size: clamp(2.6rem, 7vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin: 0;
  line-height: 0.98;
  color: var(--ink);
}
.brand span { color: var(--live); }

.brand-logo {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  display: block;
  box-shadow: var(--shadow);
  object-fit: cover;
}
.brand-logo.sm {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(10, 22, 40, 0.16);
}
.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.auth-panel .brand-logo { margin-bottom: 6px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}

.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 16px;
  position: relative;
  overflow: hidden;
}
.auth-wrap::before {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 168, 150, 0.22), transparent 70%);
  top: -80px;
  right: -60px;
  animation: pulse-soft 6s ease-in-out infinite;
  pointer-events: none;
}
.auth-wrap::after {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 107, 74, 0.16), transparent 70%);
  bottom: -40px;
  left: -40px;
  pointer-events: none;
}
.auth-panel {
  width: min(440px, 100%);
  display: grid;
  gap: 14px;
  position: relative;
  z-index: 1;
  animation: rise 0.5s var(--ease) both;
}
.auth-panel .eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--live-deep);
  margin: 0;
}
.auth-panel .lead {
  color: var(--muted);
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.45;
}
.auth-panel form { display: grid; gap: 12px; margin-top: 6px; }
.auth-panel label {
  display: grid;
  gap: 6px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.auth-panel input {
  width: 100%;
  border: 1.5px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  outline: none;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.auth-panel input:focus {
  border-color: rgba(0, 168, 150, 0.55);
  box-shadow: 0 0 0 4px rgba(0, 168, 150, 0.12);
  background: #fff;
}
.auth-actions { display: grid; gap: 10px; margin-top: 4px; }

.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.btn {
  border: 0;
  border-radius: 14px;
  padding: 12px 18px;
  cursor: pointer;
  background: var(--live);
  color: #fff;
  font-weight: 650;
  letter-spacing: -0.01em;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), background 0.18s;
  box-shadow: 0 8px 20px rgba(0, 168, 150, 0.25);
}
.btn:hover { background: var(--live-deep); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--line);
  box-shadow: none;
}
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { background: var(--danger); box-shadow: 0 8px 20px rgba(226, 61, 61, 0.25); color: #fff; }
.btn.ok { background: var(--ok); color: #fff; box-shadow: 0 8px 20px rgba(31, 157, 99, 0.22); }
.btn.warm { background: var(--warm); color: #fff; }
.btn.icon {
  width: 54px; height: 54px; padding: 0;
  display: inline-grid; place-items: center;
  border-radius: 999px;
  background: rgba(255,255,255,0.14);
  color: #fff;
  box-shadow: none;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.18);
}
.btn.icon:hover { background: rgba(255,255,255,0.22); transform: scale(1.04); }
.btn.lg { padding: 15px 22px; font-size: 1.05rem; border-radius: 16px; }
.btn.block { width: 100%; }

.err {
  color: #9f1d1d;
  background: rgba(226, 61, 61, 0.08);
  border: 1px solid rgba(226, 61, 61, 0.28);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.92rem;
}
.muted { color: var(--muted); }
.hint { font-size: 0.88rem; color: var(--muted); line-height: 1.4; }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}
.topbar h1 {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.02em;
}
.topbar .back {
  min-width: 88px;
}

.home-hero {
  margin-bottom: 28px;
}
.home-hero .hello {
  font-size: 1.05rem;
  color: var(--muted);
  margin: 10px 0 0;
}
.home-hero .name {
  font-family: var(--display);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 4px 0 0;
}

.nav-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
@media (min-width: 760px) {
  .nav-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.tile {
  display: grid;
  gap: 8px;
  padding: 22px 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  text-align: left;
  color: inherit;
  box-shadow: var(--shadow);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s;
  min-height: 128px;
  position: relative;
  overflow: hidden;
}
.tile::before {
  content: "";
  position: absolute;
  inset: auto -20% -40% auto;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 168, 150, 0.14), transparent 70%);
  pointer-events: none;
}
.tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(0, 168, 150, 0.28);
}
.tile .ico {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(0, 168, 150, 0.12);
  color: var(--live-deep);
  font-size: 1.25rem;
}
.tile.feature {
  background: linear-gradient(145deg, #0a1628 0%, #123047 100%);
  color: #fff;
  border: 0;
  grid-column: 1 / -1;
  min-height: 140px;
}
.tile.feature .ico { background: rgba(0, 168, 150, 0.25); color: #7ff0e2; }
.tile.feature .muted { color: rgba(255,255,255,0.68); }
.tile.feature::before {
  background: radial-gradient(circle, rgba(0, 168, 150, 0.35), transparent 70%);
}
.tile strong { font-size: 1.08rem; font-weight: 700; letter-spacing: -0.02em; }
.tile span { font-size: 0.9rem; }

.list { display: grid; gap: 10px; }
.list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 4px 16px rgba(10, 22, 40, 0.04);
}
.list-item .meta { display: grid; gap: 2px; }
.list-item .meta strong { font-weight: 650; }
.list-item .meta small { color: var(--muted); }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }

.chat-layout {
  display: grid;
  grid-template-rows: 1fr auto;
  height: min(70vh, 640px);
  gap: 10px;
}
.messages {
  overflow: auto;
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}
.bubble {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 16px;
  background: var(--surface-2);
  line-height: 1.4;
}
.bubble.me {
  justify-self: end;
  background: rgba(0, 168, 150, 0.16);
  color: var(--ink);
}
.composer { display: flex; gap: 8px; }
.composer input {
  flex: 1;
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 14px;
  padding: 12px 14px;
}

.roulette-hero {
  max-width: 520px;
  margin: 12px auto 0;
  text-align: center;
  padding: 32px 24px;
}
.roulette-orb {
  width: 88px;
  height: 88px;
  margin: 0 auto 18px;
  border-radius: 28px;
  display: grid;
  place-items: center;
  font-size: 2rem;
  background: linear-gradient(145deg, rgba(0,168,150,0.18), rgba(255,107,74,0.12));
  animation: pulse-soft 3.5s ease-in-out infinite;
}
.roulette-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 16px auto 0;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-soft);
  font-weight: 550;
  font-size: 0.95rem;
}
.roulette-status .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--live);
}
.roulette-status.searching .dot {
  animation: pulse-soft 1s ease-in-out infinite;
  background: var(--warm);
}

/* Call UI */
.call-stage {
  position: fixed;
  inset: 0;
  background: #05080c;
  z-index: 50;
  display: grid;
}
#remoteVideo, #localVideo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #111;
}
#remoteVideo { position: absolute; inset: 0; z-index: 0; background: #000; }
.pip {
  position: absolute;
  width: 112px;
  height: 168px;
  right: 16px;
  top: 16px;
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,0.28);
  box-shadow: var(--shadow-lg);
  cursor: grab;
  z-index: 4;
  background: #1a1a1a;
}
.pip video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.call-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}
.call-overlay .info {
  position: absolute;
  left: 16px;
  top: 16px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.6);
  color: #fff;
}
.call-overlay .info strong { font-size: 1.15rem; font-weight: 650; }
.call-overlay .info .phase {
  opacity: 0.85;
  font-size: 0.92rem;
  margin-top: 2px;
}
.call-overlay .controls {
  position: absolute;
  left: 0; right: 0; bottom: 28px;
  display: flex;
  justify-content: center;
  gap: 12px;
  pointer-events: auto;
  flex-wrap: wrap;
  padding: 0 12px;
}
.waiting {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #0d1520, #121820);
  z-index: 2;
  text-align: center;
  color: #fff;
}
.waiting[hidden] { display: none !important; }
.avatar-lg {
  width: 100px; height: 100px; border-radius: 999px;
  display: grid; place-items: center;
  background: rgba(0, 168, 150, 0.2);
  border: 2px solid rgba(255,255,255,0.12);
  font-size: 2.1rem;
  margin: 0 auto 14px;
  font-family: var(--display);
  font-weight: 700;
}

.incoming {
  position: fixed;
  inset: 0;
  z-index: 60;
  background:
    radial-gradient(600px 400px at 50% 20%, rgba(0,168,150,0.25), transparent 60%),
    #0a1628;
  display: grid;
  place-items: center;
  padding: 24px;
  color: #fff;
}
.incoming .box { text-align: center; display: grid; gap: 12px; width: min(420px, 100%); }
.incoming .box h2 { margin: 0; font-family: var(--display); font-size: 2rem; }
.incoming .ring {
  width: 120px; height: 120px; margin: 0 auto;
  border-radius: 50%;
  border: 3px solid rgba(0,168,150,0.45);
  display: grid; place-items: center;
  animation: pulse-soft 1.4s ease-in-out infinite;
  font-size: 2.4rem;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: var(--ink);
  border: 0;
  color: #fff;
  padding: 12px 16px;
  border-radius: 14px;
  z-index: 100;
  max-width: min(90vw, 420px);
  box-shadow: var(--shadow-lg);
  font-weight: 500;
  animation: rise 0.25s var(--ease);
}

.empty {
  text-align: center;
  padding: 36px 16px;
  color: var(--muted);
}
.empty strong { display: block; color: var(--ink); margin-bottom: 6px; font-size: 1.1rem; }

.boot {
  padding: 48px 24px;
  text-align: center;
  color: var(--ink);
  font-family: var(--font);
}
.boot strong {
  display: block;
  font-family: var(--display);
  font-size: 1.8rem;
  margin-bottom: 8px;
  letter-spacing: -0.03em;
}

.shell-with-dock { padding-bottom: 96px; }
.dock {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  width: min(520px, calc(100% - 24px));
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 8px;
  border-radius: 22px;
  background: rgba(255,255,255,0.92);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(16px);
  z-index: 40;
}
.dock-item {
  border: 0;
  background: transparent;
  border-radius: 16px;
  padding: 10px 6px;
  display: grid;
  gap: 4px;
  place-items: center;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
  cursor: pointer;
}
.dock-item.active {
  background: rgba(0, 168, 150, 0.12);
  color: var(--live-deep);
}
.dock-ico {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.35;
}
.dock-item.active .dock-ico { opacity: 1; background: var(--live); }

.avatar-sm {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(0, 168, 150, 0.12);
  color: var(--live-deep);
  font-weight: 700;
  flex: 0 0 auto;
}
.btn.icon.light {
  width: 42px;
  height: 42px;
  background: var(--surface-2);
  color: var(--ink);
  border: 1px solid var(--line);
  backdrop-filter: none;
}
.btn.icon.light:hover { background: #fff; }

.field, textarea.field {
  width: 100%;
  border: 1.5px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  outline: none;
}
.field:focus, textarea.field:focus {
  border-color: rgba(0, 168, 150, 0.55);
  box-shadow: 0 0 0 4px rgba(0, 168, 150, 0.12);
  background: #fff;
}
.form-grid { display: grid; gap: 12px; }
.form-grid label { display: grid; gap: 6px; font-size: 0.86rem; font-weight: 600; color: var(--ink-soft); }

.profile-card { text-align: center; }
.profile-card h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.6rem;
  letter-spacing: -0.03em;
}
.profile-card .bio { color: var(--ink-soft); margin: 10px 0 0; line-height: 1.45; }

.menu-stack { display: grid; gap: 10px; }
.menu-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 16px;
  padding: 14px 16px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(10, 22, 40, 0.04);
  color: inherit;
}
.menu-row span { font-size: 1.2rem; }
.menu-row div { display: grid; gap: 2px; }
.menu-row strong { font-weight: 650; }
.menu-row small { color: var(--muted); }
.menu-row:hover { border-color: rgba(0, 168, 150, 0.28); }

/* ===== Meeting (Zoom-like room) ===== */
.meeting-hero {
  background: linear-gradient(145deg, rgba(0,168,150,0.12), rgba(255,107,74,0.08));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 22px;
  margin-bottom: 14px;
}
.meeting-hero h1 {
  font-family: var(--display);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin: 4px 0 8px;
  letter-spacing: -0.03em;
}
.meeting-cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.meeting-section-title { margin: 0 0 12px; font-size: 1rem; }
.meeting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 8px;
  cursor: pointer;
  color: inherit;
}
.meeting-row.static { cursor: default; }
.meeting-row:hover { border-color: rgba(0,168,150,0.35); }
.meeting-badge {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(10,22,40,0.08);
  color: var(--ink-soft);
}
.meeting-badge.live { background: rgba(0,168,150,0.18); color: var(--live-deep); }
.meeting-form label { display: block; margin-bottom: 12px; }
.meeting-form .tip { margin: 0 0 14px; font-size: 0.9rem; }
.check-row { display: flex !important; align-items: center; gap: 8px; font-weight: 500; }
.meeting-code-block {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--surface-2); border-radius: 12px; padding: 12px 14px; margin: 12px 0;
}
.meeting-code-block code { font-size: 1.25rem; font-weight: 700; letter-spacing: 0.06em; }
.wait-banner {
  background: rgba(255,107,74,0.12); border-radius: 12px; padding: 12px; font-weight: 600;
}
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.meeting-room-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr min(300px, 34vw);
  grid-template-rows: auto auto 1fr auto;
  grid-template-areas:
    "top top"
    "wait wait"
    "stage side"
    "dock dock";
  background: #0b1220;
  color: #f4f7fb;
}
.mr-top {
  grid-area: top;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.mr-top .muted { margin-left: 10px; color: rgba(255,255,255,0.55); font-size: 0.85rem; }
.mr-wait {
  grid-area: wait;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: #2a2110;
  color: #ffe8c2;
}
.mr-stage {
  grid-area: stage;
  min-height: 280px;
  padding: 12px;
}
.mr-side {
  grid-area: side;
  border-left: 1px solid rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
  gap: 0;
  background: #101826;
  overflow: hidden;
}
.mr-panel { padding: 14px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.mr-panel h3 { margin: 0 0 10px; font-size: 0.95rem; }
.mr-part { padding: 6px 0; font-size: 0.92rem; }
#mr-chat {
  max-height: 180px;
  overflow: auto;
  font-size: 0.88rem;
  display: grid;
  gap: 6px;
}
.mr-chat-form { display: flex; gap: 6px; margin-top: 8px; }
.mr-chat-form .field {
  flex: 1;
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
  color: #fff;
}
.mr-dock {
  grid-area: dock;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 12px 20px;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(8px);
}
.mr-ctrl {
  width: 68px;
  border: 0;
  background: rgba(255,255,255,0.08);
  color: #fff;
  border-radius: 16px;
  padding: 10px 6px;
  cursor: pointer;
  display: grid;
  gap: 4px;
  justify-items: center;
}
.mr-ctrl small { font-size: 0.68rem; opacity: 0.8; }
.mr-ctrl.off { background: rgba(226,61,61,0.25); }
.mr-ctrl.active { background: rgba(0,168,150,0.3); }
.mr-ctrl.danger { background: rgba(226,61,61,0.35); }
.mesh-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  height: 100%;
}
.mesh-tile {
  position: relative;
  background: #1a2436;
  border-radius: 16px;
  overflow: hidden;
  min-height: 160px;
  aspect-ratio: 4/3;
}
.mesh-tile video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #000;
}
.mesh-name {
  position: absolute;
  left: 10px;
  bottom: 10px;
  font-weight: 600;
  font-size: 0.85rem;
  text-shadow: 0 1px 6px rgba(0,0,0,0.7);
}
.mr-ended {
  display: grid;
  place-items: center;
  height: 100%;
  font-family: var(--display);
  font-size: 1.4rem;
}
.mr-ended.err { color: #ff8f8f; font-size: 1rem; padding: 24px; text-align: center; }
.btn.sm { padding: 6px 12px; font-size: 0.85rem; border-radius: 10px; }
.btn.lg.block { width: 100%; }

@media (max-width: 860px) {
  .meeting-room-shell {
    grid-template-columns: 1fr;
    grid-template-areas:
      "top"
      "wait"
      "stage"
      "side"
      "dock";
  }
  .mr-side { border-left: 0; border-top: 1px solid rgba(255,255,255,0.08); max-height: 280px; }
}

/* ===== 2026 UX polish ===== */
.home-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.home-actions { display: flex; gap: 8px; }
.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 1.1rem;
  box-shadow: 0 4px 14px rgba(10,22,40,0.04);
}
.icon-btn:hover { border-color: rgba(0,168,150,0.35); color: var(--live-deep); }
.home-intro { margin-bottom: 20px; animation: rise 0.5s var(--ease) both; }
.home-intro .hello { margin: 0; color: var(--muted); font-weight: 500; }
.home-intro .name {
  font-family: var(--display);
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin: 4px 0 6px;
  line-height: 1.05;
}
.section-label {
  font-family: var(--display);
  font-size: 1.05rem;
  margin: 18px 0 10px;
  letter-spacing: -0.02em;
}
.tile.feature {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  padding: 20px 18px;
  margin-bottom: 12px;
  border: 0;
  border-radius: 20px;
  color: #fff;
  background: linear-gradient(135deg, #0A1628, #14324A);
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.tile.feature:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.tile.feature.meeting { background: linear-gradient(135deg, #0E2A24, #1B4A3C); }
.tile.feature strong { display: block; font-size: 1.1rem; margin-bottom: 4px; }
.tile.feature .muted { color: rgba(255,255,255,0.7) !important; font-size: 0.88rem; }
.tile.feature .tile-arrow { opacity: 0.7; font-size: 1.2rem; }
.ico-box {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.1);
  color: #7FF0E2;
  font-size: 1.15rem;
}
.ico-box.soft { color: #9FE8C8; }
.ico-box.light {
  background: rgba(0,168,150,0.12);
  color: var(--live-deep);
  width: 42px;
  height: 42px;
  margin-bottom: 10px;
}
.nav-grid .tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(10,22,40,0.05);
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.nav-grid .tile:hover {
  border-color: rgba(0,168,150,0.3);
  transform: translateY(-2px);
}
.nav-grid .tile strong { font-size: 1rem; }
.dock {
  backdrop-filter: blur(12px);
  background: rgba(255,255,255,0.92) !important;
  box-shadow: 0 -8px 32px rgba(10,22,40,0.06);
  border-top: 1px solid var(--line);
}
.dock-item.active { color: var(--live-deep); font-weight: 700; }
.auth-panel {
  animation: rise 0.55s var(--ease) both;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
}
.auth-panel label { display: grid; gap: 6px; margin-bottom: 12px; font-weight: 600; color: var(--ink-soft); }
.auth-panel input {
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  padding: 14px 16px;
}
.auth-panel input:focus {
  outline: none;
  border-color: var(--live);
  box-shadow: 0 0 0 3px rgba(0,168,150,0.15);
}
.btn {
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn.lg { min-height: 52px; border-radius: 14px; font-weight: 650; }
.card {
  border-radius: 20px !important;
  box-shadow: 0 12px 32px rgba(10,22,40,0.06) !important;
}
.topbar {
  margin-bottom: 14px;
}
.shell-with-dock { padding-bottom: 88px; }

/* Invite modal (Zoom-like) */
.invite-overlay {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(10,22,40,0.55);
  display: grid; place-items: center;
  padding: 18px;
  animation: rise 0.25s var(--ease) both;
}
.invite-card {
  width: min(520px, 100%);
  background: var(--surface);
  border-radius: 20px;
  padding: 18px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
}
.invite-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px;
  font-family: var(--display);
  font-size: 1.2rem;
}
.invite-row {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
  font-size: 0.9rem;
}
.invite-row code {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  background: var(--surface-2); padding: 8px 10px; border-radius: 10px;
}
#invite-body {
  width: 100%;
  font-size: 0.88rem;
  line-height: 1.45;
  resize: vertical;
}
