:root {
  color-scheme: dark;
  --bg: #040813;
  --bg-soft: #0a1020;
  --surface-1: rgba(10, 15, 29, 0.68);
  --surface-2: rgba(13, 20, 36, 0.82);
  --surface-3: rgba(17, 25, 46, 0.92);
  --surface-soft: rgba(255, 255, 255, 0.045);
  --surface-accent: rgba(91, 125, 255, 0.11);
  --text: #edf4ff;
  --text-soft: #dce5f7;
  --muted: #98a8c2;
  --muted-strong: #b7c5dc;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --line-accent: rgba(91, 125, 255, 0.24);
  --glass: var(--surface-1);
  --glass-strong: var(--surface-2);
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.34);
  --shadow-soft: 0 16px 40px rgba(0, 0, 0, 0.24);
  --shadow-card: 0 18px 48px rgba(0, 0, 0, 0.22);
  --blue: #5b7dff;
  --blue-dark: #a7b8ff;
  --blue-soft: rgba(91, 125, 255, 0.12);
  --mint: #43d6c0;
  --success: #43d6c0;
  --danger: #ffb7b7;
  --accent-gradient: linear-gradient(135deg, #5b7dff 0%, #7d89ff 52%, #67d0ef 100%);
  --radius-sm: 16px;
  --radius-md: 20px;
  --radius-lg: 24px;
  --radius-xl: 28px;
  --radius-2xl: 32px;
  --motion-fast: 140ms;
  --motion-base: 200ms;
  --motion-slow: 280ms;
  --ease-standard: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-emphasized: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  height: 100%;
  background: var(--bg);
  overscroll-behavior: none;
}

html,
body {
  margin: 0;
  min-height: 100%;
  width: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--text);
  background-color: var(--bg);
  background:
    radial-gradient(circle at 18% 14%, rgba(91, 125, 255, 0.18), transparent 24%),
    radial-gradient(circle at 82% 18%, rgba(67, 214, 192, 0.10), transparent 22%),
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.05), transparent 18%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
  font-family: "Space Grotesk", "Avenir Next", Avenir, "Helvetica Neue", sans-serif;
  overflow-x: hidden;
  overscroll-behavior-y: none;
  overscroll-behavior-x: none;
}

::selection {
  background: rgba(91, 125, 255, 0.26);
  color: #ffffff;
}

.page,
.auth-page,
.dashboard-shell,
.launcher-shell,
.legal-shell,
.studio-shell,
.studio-root {
  overscroll-behavior-y: none;
  overscroll-behavior-x: none;
}

body[data-page="studio"] {
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--motion-fast) var(--ease-standard);
}

body[data-page="studio"].studio-ready {
  opacity: 1;
  pointer-events: auto;
}

body[data-page="studio"] .nav,
body[data-page="studio"] .page-footer {
  display: none;
}

body[data-page="studio"] .studio-shell {
  width: 100vw;
  max-width: none;
  min-height: 100vh;
  margin: 0;
}

body[data-page="studio"] .studio-root {
  min-height: 100vh;
  border-radius: 0;
  overflow: hidden;
  background: transparent;
  box-shadow: none;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.24;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.30) 0 1px, transparent 1.5px),
    radial-gradient(circle at 80% 30%, rgba(255, 255, 255, 0.20) 0 1px, transparent 1.5px),
    radial-gradient(circle at 55% 60%, rgba(255, 255, 255, 0.18) 0 1px, transparent 1.5px);
  background-size: 220px 220px, 260px 260px, 300px 300px;
}

#background {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.82;
}

#background canvas {
  display: block;
  opacity: 0.72;
}

a {
  color: inherit;
  text-decoration: none;
}

.glass {
  background: var(--glass);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.backlight {
  position: fixed;
  inset: auto;
  width: 36vw;
  height: 36vw;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.36;
  pointer-events: none;
  z-index: 0;
}

.backlight-left {
  top: -10vw;
  left: -12vw;
  background: radial-gradient(circle, rgba(91, 125, 255, 0.22), transparent 60%);
}

.backlight-right {
  top: 8vw;
  right: -12vw;
  background: radial-gradient(circle, rgba(67, 214, 192, 0.16), transparent 62%);
}

.nav,
.page,
.auth-page,
.studio-shell,
.dashboard-shell,
.legal-shell,
.launcher-shell {
  position: relative;
  z-index: 1;
}

.nav {
  width: min(1200px, calc(100vw - 32px));
  margin: 18px auto 0;
  border-radius: var(--radius-xl);
  padding: 14px 18px;
  position: sticky;
  top: 16px;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow:
    0 18px 42px rgba(2, 6, 18, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.brand {
  display: grid;
  gap: 2px;
}

.mark {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.label,
.lede,
.meta,
.section-head p,
.auth-head p,
.promo p,
.dashboard-card p,
.legal-card p,
.launcher-card p,
.session-card p {
  color: var(--muted);
}

.nav-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-weight: 650;
}

.nav-language-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.nav-links a,
.nav-action {
  padding: 8px 12px;
  border-radius: 999px;
  transition:
    background var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard),
    border-color var(--motion-fast) var(--ease-standard),
    box-shadow var(--motion-fast) var(--ease-standard),
    color var(--motion-fast) var(--ease-standard);
}

.nav-settings-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--surface-soft);
}

.nav-settings-link span {
  font-size: 16px;
  line-height: 1;
}

.nav-account-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-notifications {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-notifications-toggle {
  position: relative;
  min-width: 40px;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    background var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard),
    border-color var(--motion-fast) var(--ease-standard),
    box-shadow var(--motion-fast) var(--ease-standard);
}

.nav-notifications.is-open .nav-notifications-toggle,
.nav-notifications-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--line-strong);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
}

.nav-notifications-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  line-height: 1;
}

.nav-notifications-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #ff6c8d;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(255, 108, 141, 0.34);
}

.nav-notifications-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(360px, calc(100vw - 32px));
  padding: 12px;
  border-radius: var(--radius-xl);
  background: rgba(9, 14, 28, 0.96);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-card);
  display: grid;
  gap: 12px;
}

.nav-notifications-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 4px 0;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-notifications-list {
  display: grid;
  gap: 10px;
}

.nav-notification-item,
.nav-notifications-empty {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.nav-notification-copy {
  display: grid;
  gap: 6px;
}

.nav-notification-copy strong,
.nav-notifications-empty strong {
  color: var(--text);
}

.nav-notification-copy p,
.nav-notifications-empty p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

html[data-theme="light"] .nav-notifications-dropdown,
html[data-theme="light"] .nav-account-dropdown {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(20, 32, 51, 0.12);
  box-shadow: 0 24px 52px rgba(64, 92, 136, 0.18);
}

html[data-theme="light"] .nav-notification-item,
html[data-theme="light"] .nav-notifications-empty,
html[data-theme="light"] .nav-account-meta {
  background: rgba(63, 110, 246, 0.05);
  border-color: rgba(20, 32, 51, 0.08);
}

.nav-account-menu .nav-settings-link[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--line-strong);
}

.nav-settings-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--motion-base) var(--ease-emphasized);
  transform-origin: 50% 50%;
}

.nav-settings-link.is-open .nav-settings-icon {
  transform: rotate(90deg);
}

.nav-account-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 220px;
  padding: 10px;
  border-radius: var(--radius-lg);
  background: rgba(9, 14, 28, 0.95);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-card);
  display: grid;
  gap: 6px;
}

.nav-account-meta {
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.nav-account-meta span {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-account-meta strong {
  color: var(--text);
  font-size: 14px;
}

.nav-account-dropdown a,
.nav-account-dropdown button {
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  transition:
    background var(--motion-fast) var(--ease-standard),
    border-color var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}

.nav-account-dropdown a:hover,
.nav-account-dropdown button:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--line);
  transform: translateY(-1px);
}

.nav-account-dropdown a[aria-current="page"] {
  background: var(--surface-accent);
  border-color: var(--line-accent);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.nav-links a:hover,
.nav-action:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
}

.nav-action {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--text);
  cursor: pointer;
  font: inherit;
}

.settings-form {
  display: grid;
  gap: 18px;
  padding-bottom: 112px;
}

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

.settings-page-grid {
  align-items: stretch;
}

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

.settings-panel-block {
  display: grid;
  gap: 16px;
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.settings-block-head {
  display: grid;
  gap: 6px;
}

.settings-block-head strong {
  font-size: 15px;
  color: var(--text);
}

.settings-security-card {
  display: grid;
  gap: 14px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.settings-code-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.settings-code-list li {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--surface-soft);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 14px;
  letter-spacing: 0.08em;
  color: var(--text);
}

.settings-block-head span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.settings-inline-toggles {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.preferences-dialog {
  width: min(760px, calc(100vw - 32px));
  max-width: 100%;
  border: none;
  padding: 0;
  background: transparent;
  color: var(--text);
}

.preferences-dialog::backdrop {
  background: rgba(1, 4, 12, 0.72);
  backdrop-filter: blur(10px);
}

.welcome-dialog {
  width: min(640px, calc(100vw - 32px));
  max-width: 100%;
  border: none;
  padding: 0;
  background: transparent;
  color: var(--text);
}

.welcome-dialog::backdrop {
  background: rgba(1, 4, 12, 0.74);
  backdrop-filter: blur(12px);
}

.welcome-card {
  display: grid;
  gap: 18px;
  padding: 30px;
  border-radius: var(--radius-2xl);
  animation: dialogFadeIn 260ms ease both;
}

.welcome-slogan {
  margin: -4px 0 0;
  font-size: clamp(24px, 4vw, 36px);
  line-height: 1.08;
  letter-spacing: -0.04em;
  color: var(--text);
}

.welcome-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

@keyframes dialogFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.preferences-card {
  display: grid;
  gap: 18px;
  padding: 24px;
  border-radius: var(--radius-2xl);
}

.preferences-copy {
  margin: 0;
  color: var(--muted);
}

.page {
  width: min(1200px, calc(100vw - 32px));
  margin: 28px auto 0;
  display: grid;
  gap: 28px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 420px);
  gap: 24px;
  align-items: start;
}

.hero-copy {
  padding: 18px 0 8px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 16px;
  margin-top: 28px;
}

.hero-card {
  padding: 20px;
  display: grid;
  gap: 16px;
  min-height: 100%;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
}

.hero-card-primary {
  background: linear-gradient(180deg, rgba(18, 26, 50, 0.82), rgba(10, 16, 31, 0.74));
}

.hero-card-secondary {
  background: linear-gradient(180deg, rgba(11, 18, 35, 0.78), rgba(7, 12, 24, 0.72));
}

.hero-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.hero-card-head h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero-card-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.call-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.16), rgba(91, 125, 255, 0.18));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 18px 36px rgba(31, 48, 113, 0.22);
  font-size: 26px;
}

.guest-join-form {
  display: grid;
  gap: 12px;
}

.guest-join-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.guest-join-status {
  margin: 0;
  min-height: 22px;
  color: rgba(220, 228, 255, 0.74);
  font-size: 13px;
}

.guest-join-status[data-tone="success"] {
  color: #9fe6ca;
}

.guest-join-status[data-tone="error"] {
  color: #ffb1b1;
}

.hero-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--surface-soft);
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.hero-metric-grid {
  display: grid;
  gap: 12px;
}

.hero-metric {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.hero-metric strong {
  font-size: 15px;
  letter-spacing: -0.02em;
}

.hero-metric span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.eyebrow {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #c7d1ff;
  font-size: 12px;
  font-weight: 800;
}

.hero h1,
.section-head h2,
.section-head h1,
.promo h2,
.auth-head h1,
.dashboard-card h1,
.dashboard-card h2,
.legal-card h1,
.legal-card h2,
.launcher-card h1,
.launcher-card h2,
.session-card h3 {
  margin: 0;
  letter-spacing: -0.05em;
}

.hero h1 {
  font-size: clamp(48px, 8vw, 88px);
  line-height: 0.95;
}

.section-head h2,
.promo h2,
.auth-head h1,
.dashboard-card h1,
.dashboard-card h2,
.legal-card h1,
.legal-card h2,
.launcher-card h1,
.launcher-card h2 {
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1;
}

.session-card h3 {
  font-size: 24px;
}

.lede {
  max-width: 660px;
  margin: 18px 0 0;
  font-size: 18px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.hero-note {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  margin-top: 20px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--surface-accent);
  color: var(--text-soft);
  font-weight: 700;
  letter-spacing: -0.01em;
  border: 1px solid var(--line-accent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 750;
  letter-spacing: -0.01em;
  transition:
    transform var(--motion-fast) var(--ease-standard),
    box-shadow var(--motion-fast) var(--ease-standard),
    background var(--motion-fast) var(--ease-standard),
    border-color var(--motion-fast) var(--ease-standard),
    color var(--motion-fast) var(--ease-standard);
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 18px 36px rgba(91, 125, 255, 0.28);
}

.button.secondary {
  background: var(--surface-soft);
  border-color: var(--line-strong);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.button.ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.button:active,
.nav-action:active,
.nav-links a:active,
.action-tile:active,
.oauth-button:active,
.room-board .room-row[data-room-pick]:active,
.source-item:active {
  transform: translateY(0) scale(0.99);
}

.button:focus-visible,
.nav-action:focus-visible,
.nav-links a:focus-visible,
.nav-settings-link:focus-visible,
.oauth-button:focus-visible,
.tab:focus-visible,
.auth-inline-button:focus-visible,
.field input:focus-visible,
.field select:focus-visible,
.room-board .room-row[data-room-pick]:focus-visible,
.source-item:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--blue-soft);
}

.button.wide {
  width: 100%;
}

.stat-row {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.stat-card {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.stat-card span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.stat-card strong {
  font-size: 22px;
  letter-spacing: -0.03em;
}

.stat,
.price-card,
.promo,
.auth-panel,
.editor,
.draft-note,
.section-head-wide,
.dashboard-card,
.legal-card,
.launcher-card,
.sidebar-card,
.session-card {
  border-radius: 28px;
}

.stat,
.price-card,
.promo,
.dashboard-card,
.legal-card,
.launcher-card,
.sidebar-card,
.session-card {
  padding: 20px;
}

.stat strong,
.price {
  display: block;
  font-size: 18px;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.stat span,
.meta,
.feature-list,
.draft-note,
.auth-note {
  font-size: 14px;
  line-height: 1.65;
}

.auth-panel {
  padding: 22px;
  align-self: start;
  box-shadow: var(--shadow);
}

.auth-stack {
  display: grid;
  gap: 20px;
  align-self: start;
}

.auth-panel-centered {
  width: min(560px, 100%);
  margin: 0 auto 48px;
}

.auth-panel-secondary {
  background: var(--surface-2);
}

.auth-head h2,
.auth-head h1 {
  margin-bottom: 10px;
}

.auth-head p {
  margin: 0;
  line-height: 1.6;
}

.auth-banner {
  margin: 18px 0 14px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--surface-accent);
  border: 1px solid var(--line-accent);
  color: var(--text-soft);
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.auth-note {
  margin: -4px 0 14px;
}

.auth-entry-stack {
  display: grid;
  gap: 14px;
}

.auth-entry-stack[hidden] {
  display: none !important;
}

.auth-entry-form {
  display: grid;
  gap: 14px;
}

.auth-switch-copy {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.auth-inline-button {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  color: #dce4ff;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.auth-legal-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--muted);
  font-size: 13px;
}

.auth-inline-button:hover,
.auth-legal-inline a:hover {
  color: #ffffff;
}

.oauth-stack {
  display: grid;
  gap: 10px;
  margin: 16px 0 14px;
}

.oauth-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 50px;
  padding-inline: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.oauth-button:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--line-strong);
}

.oauth-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}

.oauth-icon svg {
  width: 20px;
  height: 20px;
}

.oauth-icon-text {
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  font-size: 12px;
  font-weight: 800;
}

.auth-divider {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 2px 0 14px;
  color: rgba(237, 243, 255, 0.6);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
}

.auth-divider span {
  padding: 0 12px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.tab {
  min-height: 44px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface-soft);
  font-weight: 750;
  color: var(--text);
}

.tab.active {
  border-color: rgba(91, 125, 255, 0.28);
  background: rgba(91, 125, 255, 0.12);
  box-shadow: 0 10px 24px rgba(91, 125, 255, 0.12);
}

.auth-form {
  display: none;
  gap: 14px;
}

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

.field-group {
  display: grid;
  gap: 10px;
}

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

.field span {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.field-static strong {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--text);
  font-size: 14px;
  letter-spacing: -0.01em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.field input,
.field select {
  min-height: 48px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--text);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition:
    border-color var(--motion-fast) var(--ease-standard),
    box-shadow var(--motion-fast) var(--ease-standard),
    background var(--motion-fast) var(--ease-standard);
}

.field input::placeholder {
  color: rgba(237, 243, 255, 0.42);
}

.field input:focus,
.field select:focus {
  border-color: rgba(91, 125, 255, 0.34);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 0 4px rgba(91, 125, 255, 0.10);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #edf2fb;
  --bg-soft: #dde7f6;
  --surface-1: rgba(255, 255, 255, 0.72);
  --surface-2: rgba(255, 255, 255, 0.88);
  --surface-3: rgba(255, 255, 255, 0.96);
  --surface-soft: rgba(255, 255, 255, 0.72);
  --surface-accent: rgba(63, 110, 246, 0.10);
  --text: #142033;
  --text-soft: #1d2a40;
  --muted: #55657e;
  --muted-strong: #405067;
  --line: rgba(20, 32, 51, 0.10);
  --line-strong: rgba(20, 32, 51, 0.16);
  --line-accent: rgba(63, 110, 246, 0.22);
  --glass: var(--surface-1);
  --glass-strong: var(--surface-2);
  --shadow: 0 30px 80px rgba(64, 92, 136, 0.16);
  --shadow-soft: 0 16px 40px rgba(64, 92, 136, 0.12);
  --shadow-card: 0 18px 42px rgba(64, 92, 136, 0.12);
  --blue: #3f6ef6;
  --blue-dark: #2343ad;
  --blue-soft: rgba(63, 110, 246, 0.10);
  --mint: #18b89c;
  --success: #18b89c;
  --danger: #ce4a56;
  --accent-gradient: linear-gradient(135deg, #3f6ef6 0%, #5f8dff 55%, #4dc1d6 100%);
}

html[data-theme="light"] body::before {
  opacity: 0.12;
}

html[data-theme="light"] #background {
  opacity: 0.56;
}

html[data-theme="light"] #background canvas {
  opacity: 0.42;
}

html[data-theme="light"] .field input,
html[data-theme="light"] .field select,
html[data-theme="light"] .field-static strong,
html[data-theme="light"] .session-card,
html[data-theme="light"] .settings-panel-block {
  background: var(--surface-soft);
}

html[data-theme="light"] .field input::placeholder {
  color: rgba(20, 32, 51, 0.36);
}

html[data-theme="light"] .preferences-dialog::backdrop {
  background: rgba(219, 229, 244, 0.62);
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #edf2fb;
    --bg-soft: #dde7f6;
    --surface-1: rgba(255, 255, 255, 0.72);
    --surface-2: rgba(255, 255, 255, 0.88);
    --surface-3: rgba(255, 255, 255, 0.96);
    --surface-soft: rgba(255, 255, 255, 0.72);
    --surface-accent: rgba(63, 110, 246, 0.10);
    --text: #142033;
    --text-soft: #1d2a40;
    --muted: #55657e;
    --muted-strong: #405067;
    --line: rgba(20, 32, 51, 0.10);
    --line-strong: rgba(20, 32, 51, 0.16);
    --line-accent: rgba(63, 110, 246, 0.22);
    --glass: var(--surface-1);
    --glass-strong: var(--surface-2);
    --shadow: 0 30px 80px rgba(64, 92, 136, 0.16);
    --shadow-soft: 0 16px 40px rgba(64, 92, 136, 0.12);
    --shadow-card: 0 18px 42px rgba(64, 92, 136, 0.12);
    --blue: #3f6ef6;
    --blue-dark: #2343ad;
    --blue-soft: rgba(63, 110, 246, 0.10);
    --mint: #18b89c;
    --success: #18b89c;
    --danger: #ce4a56;
    --accent-gradient: linear-gradient(135deg, #3f6ef6 0%, #5f8dff 55%, #4dc1d6 100%);
  }

  body::before {
    opacity: 0.12;
  }

  #background {
    opacity: 0.56;
  }

  #background canvas {
    opacity: 0.42;
  }

  .field input,
  .field select,
  .field-static strong,
  .session-card,
  .settings-panel-block {
    background: rgba(255, 255, 255, 0.72);
  }

  .field input::placeholder {
    color: rgba(20, 32, 51, 0.36);
  }

  .preferences-dialog::backdrop {
    background: rgba(219, 229, 244, 0.62);
  }
}

html[data-theme="light"] .hero-card-primary,
html[data-theme="light"] .action-tile-primary {
  background: linear-gradient(180deg, rgba(231, 239, 255, 0.92), rgba(247, 250, 255, 0.82)) !important;
}

html[data-theme="light"] .hero-card-secondary {
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.88), rgba(241, 246, 255, 0.78)) !important;
}

html[data-theme="light"] .call-badge {
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.92), rgba(63, 110, 246, 0.12));
  border-color: rgba(20, 32, 51, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82), 0 18px 36px rgba(64, 92, 136, 0.12);
}

html[data-theme="light"] .hero-pill,
html[data-theme="light"] .feature-pill,
html[data-theme="light"] .ledger-status {
  background: rgba(255, 255, 255, 0.84);
}

html[data-theme="light"] .feature-pill.ok,
html[data-theme="light"] .room-empty,
html[data-theme="light"] .auth-banner,
html[data-theme="light"] .hero-note {
  background: rgba(63, 110, 246, 0.08);
  border-color: rgba(63, 110, 246, 0.18);
  color: var(--text-soft);
}

html[data-theme="light"] .room-board .room-row[data-room-pick]:hover,
html[data-theme="light"] .source-item:hover {
  background: rgba(63, 110, 246, 0.08);
}

html[data-theme="light"] .customer-ledger-table thead th {
  background: rgba(248, 251, 255, 0.94);
}

.auth-form-actions {
  display: grid;
  gap: 10px;
}

.session-card {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.session-card .eyebrow {
  margin-bottom: 0;
}

.session-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.auth-panel.has-session .auth-tabs,
.auth-panel.has-session .auth-form,
.auth-panel.has-session .auth-entry-stack,
.auth-panel.has-session .oauth-stack,
.auth-panel.has-session .auth-divider {
  display: none;
}

.auth-panel.has-session .session-card {
  display: grid;
}

.section {
  display: grid;
  gap: 18px;
}

.section-head {
  max-width: 760px;
}

.section-head p {
  margin: 12px 0 0;
  line-height: 1.65;
}

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

.price-card {
  min-height: 280px;
}

.price-card.featured {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: var(--line-accent);
}

.tier {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted-strong);
}

.price {
  font-size: 44px;
  line-height: 1;
  margin-top: 14px;
}

.feature-list {
  margin: 16px 0 0;
  padding-left: 18px;
  color: var(--text);
}

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

.page-footer,
.dashboard-footer,
.legal-footer {
  margin: 20px 0 32px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 14px;
}

.footer-links a {
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--text);
}

.promo,
.editor {
  padding: 22px;
}

.promo p {
  margin: 12px 0 0;
  line-height: 1.7;
}

.editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.editor h2,
.promo h2 {
  margin: 0;
}

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

.draft-note {
  margin-top: 16px;
  padding: 16px 18px;
  background: var(--surface-accent);
  border: 1px solid var(--line-accent);
  color: var(--text-soft);
  font-weight: 650;
}

.studio-shell {
  width: min(1200px, calc(100vw - 32px));
  margin: 18px auto 28px;
}

.studio-root {
  min-height: 86vh;
  border-radius: 28px;
  overflow: hidden;
  background: rgba(4, 7, 14, 0.86);
  box-shadow: var(--shadow);
}

.dashboard-shell,
.legal-shell,
.launcher-shell {
  width: min(1200px, calc(100vw - 32px));
  margin: 28px auto 40px;
  display: grid;
  gap: 18px;
}

.dashboard-grid,
.launcher-grid {
  display: grid;
  gap: 18px;
}

.dashboard-stack {
  display: grid;
  gap: 18px;
  align-self: start;
}

.dashboard-action-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.action-tile {
  display: grid;
  gap: 8px;
  padding: 20px;
  border-radius: var(--radius-xl);
  min-height: 170px;
  background: var(--glass);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  transition:
    transform var(--motion-fast) var(--ease-standard),
    border-color var(--motion-fast) var(--ease-standard),
    background var(--motion-fast) var(--ease-standard),
    box-shadow var(--motion-fast) var(--ease-standard);
}

.action-tile strong {
  font-size: 24px;
  letter-spacing: -0.04em;
}

.action-tile span:last-child {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.action-tile-primary {
  background: linear-gradient(180deg, rgba(22, 31, 61, 0.88), rgba(10, 16, 33, 0.74));
  border-color: var(--line-accent);
  box-shadow: var(--shadow);
}

.action-tile:hover {
  transform: translateY(-2px);
  border-color: var(--line-accent);
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.18);
}

.walkthrough-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 24px;
  border: 0;
  background: transparent;
  color: var(--text);
  z-index: 82;
  align-items: flex-end;
  justify-content: flex-end;
  pointer-events: none;
}

.walkthrough-overlay:not([open]) {
  display: none;
}

.walkthrough-overlay[open] {
  display: flex;
}

.walkthrough-card {
  width: min(460px, 100%);
  padding: 28px;
  border-radius: var(--radius-2xl);
  display: grid;
  gap: 16px;
  pointer-events: auto;
  position: relative;
  z-index: 83;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  animation: dialogFadeIn 220ms ease both;
}

.walkthrough-card .button {
  position: relative;
  z-index: 84;
  pointer-events: auto;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.walkthrough-overlay::backdrop {
  background: transparent;
}

.walkthrough-progress {
  color: var(--muted);
  font-size: 14px;
}

body.walkthrough-open {
  overflow: hidden;
}

body.walkthrough-open::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(2, 4, 10, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 80;
}

[data-walkthrough-focus-active] {
  position: relative;
  z-index: 81;
  border-radius: var(--radius-xl);
  box-shadow:
    0 0 0 1px rgba(163, 186, 255, 0.42),
    0 24px 60px rgba(4, 8, 20, 0.34);
}

.dashboard-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 420px);
}

.launcher-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 380px);
}

.room-board {
  display: grid;
  gap: 14px;
}

.lobby-grid {
  display: grid;
  gap: 14px;
}

.device-panel {
  display: grid;
  gap: 16px;
  margin-top: 6px;
}

.step-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity var(--motion-base) var(--ease-standard),
    transform var(--motion-base) var(--ease-standard),
    border-color var(--motion-fast) var(--ease-standard),
    background var(--motion-fast) var(--ease-standard);
}

.step-card[hidden] {
  display: none !important;
}

.step-card.revealed {
  animation: stepFadeIn 260ms ease both;
}

@keyframes stepFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.device-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.device-head h2 {
  margin: 0;
}

.device-copy {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

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

.device-features {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.feature-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.feature-pill.ok {
  color: var(--text-soft);
  border-color: var(--line-accent);
  background: var(--surface-accent);
}

.feature-pill.off {
  opacity: 0.76;
}

.status-card,
.share-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.status-card span,
.share-copy span {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 4px;
}

.status-card strong,
.share-copy strong {
  display: block;
  font-size: 14px;
  letter-spacing: -0.02em;
  color: var(--text);
  word-break: break-word;
}

.share-copy {
  min-width: 0;
  display: grid;
}

.share-box {
  align-items: center;
}

.share-box .button {
  flex-shrink: 0;
}

.room-board .room-row[data-room-pick] {
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  background: var(--surface-soft);
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  border-radius: var(--radius-lg);
  transition:
    transform var(--motion-fast) var(--ease-standard),
    border-color var(--motion-fast) var(--ease-standard),
    background var(--motion-fast) var(--ease-standard),
    box-shadow var(--motion-fast) var(--ease-standard);
}

.room-board .room-row[data-room-pick] strong {
  color: var(--text-soft);
}

.room-board .room-row[data-room-pick]:hover {
  transform: translateY(-2px);
  border-color: var(--line-accent);
  background: rgba(91, 125, 255, 0.07);
}

.room-empty {
  padding: 18px;
  border-radius: var(--radius-md);
  background: var(--surface-accent);
  border: 1px solid var(--line-accent);
  color: var(--text-soft);
  line-height: 1.6;
}

.dashboard-card,
.legal-card,
.launcher-card,
.sidebar-card {
  background: var(--glass);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.dashboard-card h1,
.launcher-card h1,
.legal-card h1 {
  margin-bottom: 10px;
}

.dashboard-card h2,
.launcher-card h2,
.legal-card h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.dashboard-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.dashboard-list .row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.dashboard-list .row strong {
  color: var(--text-soft);
}

.dashboard-balance-card {
  display: grid;
  gap: 18px;
}

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

.dashboard-ready-item {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--surface-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.dashboard-ready-item span {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dashboard-ready-item strong {
  color: var(--text-soft);
  font-size: 15px;
}

.dashboard-ready-copy,
.dashboard-usage-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.dashboard-usage-shell {
  margin-top: 18px;
  display: grid;
  gap: 12px;
}

.dashboard-usage-empty {
  margin: 0;
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--muted);
}

.customer-ledger {
  margin-top: 18px;
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0 0;
  flex-wrap: wrap;
}

.table-meta {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.customer-ledger-shell {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface-soft);
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.customer-ledger-table {
  width: 100%;
  border-collapse: collapse;
}

.customer-ledger-table thead th {
  padding: 14px 16px;
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  font-weight: 700;
  background: rgba(255, 255, 255, 0.02);
}

.customer-ledger-table tbody td {
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  vertical-align: top;
  font-size: 14px;
  color: var(--text);
}

.customer-ledger-table tbody tr:first-child td {
  border-top: 0;
}

.customer-ledger-table td strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
  font-weight: 700;
}

.customer-ledger-table td span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.ledger-amount-cell,
.ledger-balance-cell,
.ledger-status-cell {
  white-space: nowrap;
}

.ledger-amount-cell,
.ledger-balance-cell {
  text-align: right;
}

.ledger-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  text-transform: capitalize;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}

.ledger-empty-row td {
  color: var(--muted);
}

.legal-card ul {
  margin: 12px 0 0;
  padding-left: 20px;
}

.auth-page {
  width: min(1200px, calc(100vw - 32px));
  margin: 54px auto 40px;
  display: grid;
  place-items: center;
}

.page.pricing-page {
  gap: 20px;
}

.page-head {
  max-width: 760px;
}

.page-head-wide {
  max-width: 760px;
}

.page-head p {
  margin: 12px 0 0;
  line-height: 1.65;
}

@media (max-width: 1080px) {
  .hero,
  .hero-grid,
  .split,
  .pricing-grid,
  .stat-row,
  .editor-grid,
  .dashboard-grid,
  .launcher-grid,
  .dashboard-action-strip {
    grid-template-columns: 1fr;
  }

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

  .hero h1,
  .section-head h1,
  .dashboard-card h1,
  .legal-card h1,
  .launcher-card h1 {
    font-size: clamp(36px, 8vw, 58px);
  }

  .price-card.featured {
    transform: none;
  }
}

@media (max-width: 680px) {
  .page,
  .nav,
  .studio-shell,
  .auth-page,
  .dashboard-shell,
  .launcher-shell,
  .legal-shell {
    width: min(100vw - 20px, 1200px);
  }

  .auth-panel,
  .price-card,
  .promo,
  .editor,
  .dashboard-card,
  .legal-card,
  .launcher-card,
  .sidebar-card {
    padding: 18px;
  }

  .auth-tabs {
    grid-template-columns: 1fr;
  }

  .auth-legal-inline {
    gap: 12px;
  }

  .hero-card {
    padding: 18px;
  }

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

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

  .device-head {
    flex-direction: column;
  }

  .settings-form-grid,
  .settings-inline-toggles,
  .settings-panel-grid,
  .profile-avatar-grid,
  .profile-card-head,
  .dashboard-ready-grid {
    grid-template-columns: 1fr;
  }

  .preferences-card {
    padding: 18px;
  }

  .save-widget {
    left: 16px;
    right: 16px;
    bottom: 16px;
    width: auto;
    align-items: stretch;
    flex-direction: column;
  }

  .save-widget [data-save-widget-button] {
    width: 100%;
  }

  .page-footer,
  .dashboard-footer,
  .legal-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

.pricing-grid-live {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pricing-grid-bundles {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-bundle-grid {
  margin-top: 18px;
}

.dashboard-grid-live {
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 400px);
  align-items: start;
}

.dashboard-split {
  align-items: start;
}

.stat-row-balance,
.stat-row-admin {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.provider-list,
.source-list,
.usage-chart,
.admin-table {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.provider-item,
.source-item,
.usage-bar-row,
.admin-table-head,
.admin-table-row {
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--surface-soft);
}

.provider-item,
.source-item {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
}

.provider-item strong,
.source-item strong {
  color: var(--text-soft);
  font-size: 15px;
}

.provider-item span,
.source-item span {
  color: var(--muted);
  line-height: 1.55;
  font-size: 14px;
}

.source-item {
  transition:
    transform var(--motion-fast) var(--ease-standard),
    border-color var(--motion-fast) var(--ease-standard),
    background var(--motion-fast) var(--ease-standard),
    box-shadow var(--motion-fast) var(--ease-standard);
}

.source-item:hover {
  transform: translateY(-1px);
  border-color: var(--line-accent);
  background: rgba(91, 125, 255, 0.08);
  box-shadow: var(--shadow-card);
}

.bundle-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.bundle-foot span {
  color: var(--muted);
  font-size: 14px;
}

.usage-bar-row {
  padding: 14px 16px;
}

.usage-bar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.usage-bar-head span {
  color: var(--muted);
  font-size: 14px;
}

.usage-bar-head strong {
  color: var(--text-soft);
}

.usage-bar-meta {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.usage-bar-track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.usage-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(67, 214, 192, 0.85), rgba(91, 125, 255, 0.95));
  box-shadow: 0 0 16px rgba(91, 125, 255, 0.24);
}

.admin-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.form-status {
  min-height: 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.saved-voice-consent,
.saved-voice-progress,
.saved-voice-recorder,
.saved-voice-step {
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--surface-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.saved-voice-consent,
.saved-voice-progress,
.saved-voice-recorder {
  padding: 16px 18px;
}

.saved-voice-consent {
  display: grid;
  gap: 10px;
}

.saved-voice-consent strong,
.saved-voice-progress strong,
.saved-voice-recorder strong,
.saved-voice-step strong {
  color: var(--text-soft);
}

.saved-voice-consent p,
.saved-voice-progress p,
.saved-voice-recorder p,
.saved-voice-step p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.saved-voice-progress-head,
.saved-voice-recorder-head,
.saved-voice-step-head,
.saved-voice-step-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.saved-voice-progress-head span,
.saved-voice-recorder-head span,
.saved-voice-step-head span,
.saved-voice-step-meta span {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.saved-voice-recorder-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
}

.saved-voice-recorder-head strong {
  justify-self: start;
}

[data-saved-voice-recording-timer] {
  justify-self: end;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-soft);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.saved-voice-progress-bar {
  margin-top: 14px;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.saved-voice-progress-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(67, 214, 192, 0.88), rgba(91, 125, 255, 0.95));
  box-shadow: 0 0 16px rgba(91, 125, 255, 0.24);
}

.saved-voice-helper {
  margin-top: 10px;
}

.saved-voice-script {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.saved-voice-script p {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.saved-voice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.saved-voice-steps {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.saved-voice-step {
  padding: 16px 18px;
  display: grid;
  gap: 12px;
}

.saved-voice-step.is-locked {
  opacity: 0.62;
}

.saved-voice-step.is-active {
  border-color: var(--line-accent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 12px 28px rgba(91, 125, 255, 0.14);
}

.saved-voice-step.is-complete {
  border-color: rgba(67, 214, 192, 0.18);
}

.saved-voice-step-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.saved-voice-step audio {
  width: 100%;
}

.save-widget {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 55;
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(360px, calc(100vw - 32px));
  padding: 14px 16px;
  border-radius: 22px;
  background: rgba(13, 20, 36, 0.94);
  border: 1px solid var(--line-strong);
  box-shadow: 0 18px 44px rgba(1, 4, 12, 0.34);
}

.save-widget-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
  flex: 1;
}

.save-widget-copy strong {
  color: var(--text);
  font-size: 15px;
}

.save-widget .form-status {
  min-height: 0;
  margin: 0;
}

.save-widget [data-save-widget-button] {
  min-width: 120px;
}

.save-widget [data-save-widget-button][disabled] {
  cursor: default;
  opacity: 0.82;
}

.profile-grid {
  align-items: start;
}

.profile-hero p {
  max-width: 680px;
}

.profile-form {
  padding-bottom: 108px;
}

.profile-card-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.profile-avatar-preview {
  position: relative;
  width: 104px;
  height: 104px;
  border-radius: 28px;
  display: grid;
  place-items: center;
  overflow: hidden;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.05em;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: var(--shadow-card);
}

.profile-avatar-preview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-avatar-preview.is-uploaded {
  background: rgba(255, 255, 255, 0.04);
}

.profile-copy {
  margin-top: 10px;
}

.profile-upload-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.profile-avatar-section {
  display: grid;
  gap: 16px;
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface-soft);
}

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

.profile-avatar-option {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition:
    border-color var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard),
    background var(--motion-fast) var(--ease-standard);
}

.profile-avatar-option:hover {
  transform: translateY(-1px);
  border-color: var(--line-accent);
}

.profile-avatar-option.is-selected {
  border-color: var(--line-accent);
  background: rgba(91, 125, 255, 0.08);
}

.profile-avatar-swatch {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.profile-avatar-option strong {
  font-size: 14px;
}

.profile-avatar-option span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.profile-readonly-note {
  align-self: end;
  min-height: 52px;
}

.avatar-aurora {
  background: linear-gradient(135deg, #5b7dff 0%, #67d0ef 100%);
}

.avatar-ocean {
  background: linear-gradient(135deg, #0f4c81 0%, #2ba6cb 100%);
}

.avatar-sunrise {
  background: linear-gradient(135deg, #ff7b54 0%, #ffb347 100%);
}

.avatar-forest {
  background: linear-gradient(135deg, #1c6b4c 0%, #44b97a 100%);
}

.avatar-ember {
  background: linear-gradient(135deg, #8b1e3f 0%, #ff6b57 100%);
}

.avatar-violet {
  background: linear-gradient(135deg, #5d3fd3 0%, #9f7aea 100%);
}

html[data-theme="light"] .hero-card-primary,
html[data-theme="light"] .action-tile-primary {
  background: linear-gradient(180deg, rgba(231, 239, 255, 0.92), rgba(247, 250, 255, 0.82));
}

html[data-theme="light"] .hero-card-secondary {
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.88), rgba(241, 246, 255, 0.78));
}

html[data-theme="light"] .call-badge {
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.92), rgba(63, 110, 246, 0.12));
  border-color: rgba(20, 32, 51, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82), 0 18px 36px rgba(64, 92, 136, 0.12);
}

html[data-theme="light"] .hero-pill,
html[data-theme="light"] .feature-pill,
html[data-theme="light"] .ledger-status {
  background: rgba(255, 255, 255, 0.84);
}

html[data-theme="light"] .feature-pill.ok,
html[data-theme="light"] .room-empty,
html[data-theme="light"] .auth-banner,
html[data-theme="light"] .hero-note {
  background: rgba(63, 110, 246, 0.08);
  border-color: rgba(63, 110, 246, 0.18);
  color: var(--text-soft);
}

html[data-theme="light"] .room-board .room-row[data-room-pick]:hover,
html[data-theme="light"] .source-item:hover {
  background: rgba(63, 110, 246, 0.08);
}

html[data-theme="light"] .customer-ledger-table thead th {
  background: rgba(248, 251, 255, 0.94);
}

.admin-table {
  margin-top: 22px;
}

.admin-table-head,
.admin-table-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(6, minmax(0, 1fr));
  gap: 14px;
  padding: 14px 16px;
  align-items: center;
}

.admin-table-head {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  background: rgba(255, 255, 255, 0.03);
}

.admin-table-row strong {
  color: #dce4ff;
}

.admin-table-head-payments,
.admin-table-row-payments {
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr) repeat(4, minmax(0, 1fr));
}

@media (max-width: 1080px) {
  .pricing-grid-live,
  .pricing-grid-bundles,
  .dashboard-grid-live {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .customer-ledger-table thead {
    display: none;
  }

  .customer-ledger-table,
  .customer-ledger-table tbody,
  .customer-ledger-table tr,
  .customer-ledger-table td {
    display: block;
    width: 100%;
  }

  .customer-ledger-table tbody td {
    padding: 8px 16px;
    border: 0;
  }

  .customer-ledger-table tbody tr {
    padding: 10px 0;
    border-top: 1px solid var(--line);
  }

  .customer-ledger-table tbody tr:first-child {
    border-top: 0;
  }

  .customer-ledger-table tbody td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  .ledger-amount-cell,
  .ledger-balance-cell,
  .ledger-status-cell {
    text-align: left;
    white-space: normal;
  }
}

@media (max-width: 680px) {
  .bundle-foot,
  .usage-bar-head,
  .admin-table-head,
  .admin-table-row {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: flex-start;
  }

  .bundle-foot {
    display: flex;
  }
}
