@import url("/shared/design/themes.css?v=7395ff64ab70") layer(theme);

@layer fallback {
  :root {
    /* Yusiverse — 0x-inspired foundation: near-black surfaces, hairline
       rules, mono data type. Built on the 0x brand core of #26272B / #F4F4F5 /
       #FFFFFF. The accent is used sparingly, the way 0x uses it. */
    --bg: #141517;
    --bg-deep: #0e0f10;
    --panel: #1c1d20;
    --panel-strong: #26272b;
    --panel-soft: #232427;
    --field: #161719;
    --field-strong: #2c2d31;
    --text: #f4f4f5;
    --muted: #a1a1a6;
    --faint: #8b8b91;
    --line: rgba(244, 244, 245, 0.1);
    --line-strong: rgba(244, 244, 245, 0.2);
    --line-soft: rgba(244, 244, 245, 0.06);
    --glass: #1c1d20;
    --glass-strong: #26272b;
    --glass-light: rgba(244, 244, 245, 0.06);
    --scrim: rgba(10, 11, 12, 0.82);
    --success: #4e9a6b;
    --warning: #a8813a;
    --danger: #cd6d65;
    --info: #3e7bfa;
    --accent: #4882fa;
    --accent-strong: #7ba4ff;
    /* A light accent surface meant to carry dark text. --accent-strong is the
       emphasis *text* colour and flips darker in light mode, so anything that
       fills a button with dark type on top has to use this instead. */
    --accent-fill: #7ba4ff;
    --accent-2: #8b6df0;
    --accent-soft: color-mix(in srgb, var(--accent) 16%, transparent);
    --on-accent: #0e0f10;
    --surface: color-mix(in srgb, var(--accent) 6%, var(--panel));
    --surface-raised: color-mix(
      in srgb,
      var(--accent) 10%,
      var(--panel-strong)
    );
    --surface-soft: color-mix(in srgb, var(--accent) 3%, var(--panel));
    --swatch-softBlue: #4882fa;
    --swatch-sage: #4e9a6b;
    --swatch-lavender: #9174f1;
    --swatch-beige: #b08d57;
    --swatch-dustyPink: #c4708a;
    --swatch-turquoise: #1e9e96;
    --swatch-monochrome: #a4a9b8;
    --swatch-coral: #d95f4e;
    --swatch-lime: #7fa830;
    --swatch-violet: #a56de8;
    /* 0x does not use soft elevation or colour glow. Shadows stay flat and
       near-invisible; depth comes from the hairlines, not from blur. */
    --shadow: 0 1px 0 rgba(244, 244, 245, 0.03);
    --shadow-soft: 0 1px 0 rgba(244, 244, 245, 0.02);
    --n-layer-1: 0 0 0 1px var(--line-soft);
    --n-layer-2: var(--n-layer-1);
    --n-layer-3: var(--n-layer-2);
    --n-layer-active: 0 0 0 1px var(--accent);
    --n-glow-sm: 0 0 0 0 transparent;
    --n-glow: 0 0 0 0 transparent;
    --n-glow-wide: 0 0 0 0 transparent;
    --r-xs: 0px;
    --r-sm: 0px;
    --r-md: 0px;
    --r-lg: 0px;
    --r-pill: 0px;
    --ctl: 34px;
    --ctl-sm: 29px;
    --row: 36px;
    --gap: 12px;
    --gap-sm: 8px;
    --gap-lg: 17px;
    --sidebar: 268px;
    --topbar: 60px;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    --g: 1;
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --font:
      "SF Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
      monospace;
    --mono:
      "SF Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
      monospace;
    color-scheme: dark;
  }

  :root[data-theme="light"] {
    /* 0x light mode is the same system inverted: white paper, black type,
       hairline rules, no glass and no soft elevation. */
    --bg: #ffffff;
    --bg-deep: #f4f4f5;
    --panel: #ffffff;
    --panel-strong: #ffffff;
    --panel-soft: #f4f4f5;
    --field: #ffffff;
    --field-strong: #f4f4f5;
    --text: #26272b;
    --muted: #5c5c61;
    --faint: #6c6c72;
    --line: rgba(38, 39, 43, 0.12);
    --line-strong: rgba(38, 39, 43, 0.24);
    --line-soft: rgba(38, 39, 43, 0.08);
    --glass: #ffffff;
    --glass-strong: #ffffff;
    --glass-light: rgba(38, 39, 43, 0.04);
    --scrim: rgba(38, 39, 43, 0.4);
    --success: #2f7a4f;
    --warning: #8a6520;
    --danger: #a83a32;
    --info: #2b62cf;
    --accent-soft: color-mix(in srgb, var(--accent) 12%, transparent);
    --accent-fill: #7ba4ff;
    --on-accent: #ffffff;
    --shadow: 0 1px 0 rgba(38, 39, 43, 0.04);
    --shadow-soft: 0 1px 0 rgba(38, 39, 43, 0.03);
    --n-layer-1: 0 0 0 1px var(--line-soft);
    --n-layer-2: var(--n-layer-1);
    --n-layer-3: var(--n-layer-2);
    color-scheme: light;
  }

  :root[data-accent="softBlue"] {
    --accent: #4882fa;
    --accent-strong: #7ba4ff;
    --accent-2: #8b6df0;
  }
  :root[data-accent="sage"] {
    --accent: #4e9a6b;
    --accent-strong: #7fc499;
    --accent-2: #a8813a;
  }
  :root[data-accent="lavender"] {
    --accent: #9174f1;
    --accent-strong: #b9a3ff;
    --accent-2: #3e7bfa;
  }
  :root[data-accent="beige"] {
    --accent: #b08d57;
    --accent-strong: #d4b483;
    --accent-2: #8b6df0;
  }
  :root[data-accent="dustyPink"] {
    --accent: #c4708a;
    --accent-strong: #e5a3b6;
    --accent-2: #4e9a6b;
  }
  :root[data-accent="turquoise"] {
    --accent: #1e9e96;
    --accent-strong: #5cc9c2;
    --accent-2: #3e7bfa;
  }
  :root[data-accent="monochrome"] {
    --accent: #a4a9b8;
    --accent-strong: #d4d6dc;
    --accent-2: #6e6e73;
  }
  :root[data-accent="coral"] {
    --accent: #d95f4e;
    --accent-strong: #f09386;
    --accent-2: #a8813a;
  }
  :root[data-accent="lime"] {
    --accent: #7fa830;
    --accent-strong: #a9cf62;
    --accent-2: #1e9e96;
  }
  :root[data-accent="violet"] {
    --accent: #a56de8;
    --accent-strong: #c496f0;
    --accent-2: #7ba4ff;
  }
  :root[data-glow="0"] {
    --g: 0;
  }
  :root[data-glow="0.5"] {
    --g: 0.5;
  }
  :root[data-glow="1"] {
    --g: 1;
  }
  :root[data-glow="1.6"] {
    --g: 1.6;
  }
}

:root {
  /* 0x avoids colour glow entirely. A glowing accent reads as a game UI, so
     these collapse into flat hairlines; only the focus ring keeps a tint,
     because it has to stay visible. */
  --glow-1: 0 0 0 1px var(--line-soft);
  --glow-2: 0 0 0 1px var(--line);
  --glow-3: 0 0 0 1px var(--line-strong);
  --glow-tint: 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent);
  --active-ring: 0 0 0 1px var(--accent);
  --content-max: 1440px;
}

* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html {
  min-height: 100%;
  scrollbar-gutter: stable;
}
body {
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 13.5px;
  line-height: 1.5;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body,
button,
input,
select,
textarea {
  font-family: var(--font);
}
button,
input,
select,
textarea {
  font-size: inherit;
}
button {
  color: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}
img,
svg {
  max-width: 100%;
}
svg {
  display: block;
}
[hidden] {
  display: none !important;
}
::selection {
  background: color-mix(in srgb, var(--accent) 24%, transparent);
  color: var(--text);
}
:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 70%, transparent);
  outline-offset: 2px;
}
* {
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: var(--r-pill);
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, var(--accent) 34%, var(--line-strong));
  background-clip: content-box;
}
.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}
.num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
}
.muted {
  color: var(--muted);
}
.faint {
  color: var(--faint);
}
.truncate {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.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;
}

#backgroundFx {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
  background: var(--bg);
}
.bg-blob {
  display: none;
}
.bg-blob-a {
  display: none;
}
.bg-blob-b {
  display: none;
}
.bg-blob-c {
  display: none;
}
.bg-grid {
  position: absolute;
  inset: 0;
  opacity: 1;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: none;
  mask-image: none;
}
:root[data-theme="light"] .bg-grid {
  opacity: 0.07;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.icon {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon--sm {
  width: 14px;
  height: 14px;
}
.icon--lg {
  width: 21px;
  height: 21px;
}

.glass,
.card,
.ios-section,
.n-token,
.topbar,
.dialog-card,
.auth-card {
  border: 1px solid var(--line);
  background: var(--glass);
  box-shadow: var(--n-layer-2);
}
.glass {
  border-radius: var(--r-lg);
}
.card {
  border-radius: var(--r-md);
  padding: 14px;
}
.ios-section {
  border-radius: var(--r-lg);
  padding: 17px;
}
.n-token {
  border-radius: var(--r-sm);
  box-shadow: var(--n-layer-1);
}
.n-token:hover {
  box-shadow: var(--n-layer-active), var(--n-glow-sm);
}
.hover-lift {
  transition:
    transform 180ms var(--ease),
    box-shadow 180ms var(--ease),
    border-color 180ms var(--ease);
}
.hover-lift:hover {
  transform: translateY(-2px);
  box-shadow: var(--n-layer-3), var(--n-glow-sm);
  border-color: color-mix(in srgb, var(--accent) 24%, var(--line));
}

.btn,
.icon-btn,
.segmented button,
.nav-item,
.pill-button,
.accent-swatch,
.view-chip,
.table-action,
.swatch-button {
  border: 1px solid var(--line);
  background: var(--surface-soft);
  box-shadow: var(--n-layer-1);
  transition:
    transform 150ms var(--spring),
    background 150ms var(--ease),
    border-color 150ms var(--ease),
    box-shadow 150ms var(--ease),
    color 150ms var(--ease);
}
.btn:hover,
.icon-btn:hover,
.segmented button:hover,
.nav-item:hover,
.pill-button:hover,
.accent-swatch:hover,
.view-chip:hover,
.table-action:hover,
.swatch-button:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent) 32%, var(--line));
  box-shadow: var(--n-layer-active), var(--n-glow-sm);
}
.btn:active,
.icon-btn:active,
.segmented button:active,
.nav-item:active,
.pill-button:active {
  transform: scale(0.97);
}
.btn {
  min-height: var(--ctl);
  padding: 0 14px;
  border-radius: var(--r-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-weight: 680;
  letter-spacing: -0.01em;
}
.btn--primary {
  color: var(--on-accent);
  border-color: color-mix(in srgb, var(--accent) 60%, transparent);
  background: var(--accent);
  box-shadow: var(--n-layer-2), var(--n-glow-sm);
}
.btn--primary:hover {
  box-shadow: var(--n-layer-3), var(--n-glow);
}
.btn--ghost {
  background: transparent;
}
.btn--soft {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 25%, var(--line));
}
.btn--danger {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 32%, var(--line));
}
.btn--danger:hover {
  box-shadow:
    var(--n-layer-active),
    0 0 18px -10px var(--danger);
}
.btn--wide {
  width: 100%;
}
.btn--sm {
  min-height: var(--ctl-sm);
  padding-inline: 11px;
  font-size: 12px;
}
.icon-btn {
  width: var(--ctl);
  height: var(--ctl);
  padding: 0;
  border-radius: var(--r-pill);
  display: inline-grid;
  place-items: center;
  color: var(--muted);
}
.icon-btn--sm {
  width: var(--ctl-sm);
  height: var(--ctl-sm);
}
.icon-btn.is-active {
  color: var(--accent-strong);
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 34%, var(--line));
  box-shadow: var(--n-layer-active), var(--n-glow-sm);
}
.icon-btn:focus-visible,
.btn:focus-visible,
.nav-item:focus-visible {
  outline-offset: 3px;
}

.pill,
.badge,
.status-pill,
.role-pill,
.lang-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 0 9px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 680;
  white-space: nowrap;
}
.pill--accent {
  color: var(--accent-strong);
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 28%, var(--line));
}
.badge--success,
.status-pill--success {
  color: var(--success);
  background: color-mix(in srgb, var(--success) 11%, transparent);
  border-color: color-mix(in srgb, var(--success) 27%, var(--line));
}
.badge--warning,
.status-pill--warning {
  color: var(--warning);
  background: color-mix(in srgb, var(--warning) 11%, transparent);
  border-color: color-mix(in srgb, var(--warning) 27%, var(--line));
}
.badge--danger,
.status-pill--danger {
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 11%, transparent);
  border-color: color-mix(in srgb, var(--danger) 27%, var(--line));
}
.badge--info,
.status-pill--info {
  color: var(--info);
  background: color-mix(in srgb, var(--info) 11%, transparent);
  border-color: color-mix(in srgb, var(--info) 27%, var(--line));
}
.status-dot,
.live-dot,
.dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 34%, transparent);
}
.live-dot,
.status-dot--live {
  animation: beacon 1.8s ease-out infinite;
}
.dot--muted {
  background: var(--faint);
  box-shadow: none;
}
.dot--success {
  background: var(--success);
}
.dot--warning {
  background: var(--warning);
}
.dot--danger {
  background: var(--danger);
}
.btn--quiet {
  color: var(--muted);
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}
.btn--quiet:hover {
  color: var(--accent-strong);
  box-shadow: var(--n-glow-sm);
}
.icon--xl {
  position: relative;
  z-index: 1;
  width: 92px;
  height: 92px;
  stroke-width: 1.15;
  filter: drop-shadow(
    0 0 16px color-mix(in srgb, var(--accent) 48%, transparent)
  );
}
.admin-pricing-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--panel);
  box-shadow: var(--n-layer-2);
}
.pricing-card h3,
.admin-pricing-card h3 {
  margin: 0;
  font-size: 16px;
  letter-spacing: -0.035em;
}
.pricing-card p,
.admin-pricing-card p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.pricing-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px;
  transition:
    transform 180ms var(--ease),
    border-color 180ms var(--ease),
    box-shadow 180ms var(--ease);
}
.pricing-card:hover,
.admin-pricing-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
  box-shadow: var(--n-layer-3), var(--n-glow);
}
.pricing-card-head,
.admin-pricing-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.pricing-card h3 {
  font-size: 20px;
}
.pricing-price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 7px;
  padding: 15px 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.pricing-price strong,
.admin-pricing-card-price {
  color: var(--accent-strong);
  font-family: var(--mono);
  font-size: 28px;
  letter-spacing: -0.06em;
}
.pricing-price span {
  color: var(--muted);
  font-size: 11px;
}
.pricing-features {
  display: grid;
  gap: 8px;
  flex: 1 1 auto;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 12px;
}
.pricing-features li {
  position: relative;
  padding-left: 18px;
}
.pricing-features li::before {
  content: "";
  position: absolute;
  top: 0.55em;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: var(--n-glow-sm);
}
.pricing-state {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
.pricing-skeleton {
  min-height: 310px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: linear-gradient(
    105deg,
    var(--surface-soft) 25%,
    var(--glass-light) 45%,
    var(--surface-soft) 65%
  );
  background-size: 240% 100%;
  animation: pricing-shimmer 420ms linear infinite;
}
.admin-pricing-cards {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.admin-pricing-card {
  display: grid;
  gap: 11px;
  padding: 16px;
}
.admin-pricing-card-price {
  font-size: 22px;
}
.admin-pricing-card .table-actions {
  justify-content: flex-start;
  padding-top: 4px;
}

.auth-screen {
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: max(18px, var(--safe-top)) max(18px, var(--safe-right))
    max(18px, var(--safe-bottom)) max(18px, var(--safe-left));
}
.auth-topbar,
.auth-footer {
  width: min(1120px, 100%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.auth-topbar {
  min-height: 44px;
}
.auth-footer {
  color: var(--faint);
  font-size: 11px;
}
.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 0;
  color: var(--on-accent);
  background: var(--accent);
  box-shadow: var(--n-layer-2), var(--n-glow-sm);
}
.brand-mark .icon {
  width: 21px;
  height: 21px;
  stroke-width: 1.8;
}
.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.brand-title {
  font-size: 15px;
  font-weight: 780;
  letter-spacing: -0.03em;
  white-space: nowrap;
}
.brand-subtitle {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
.credit-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 11px;
  font-weight: 650;
  transition:
    border-color 160ms var(--ease),
    color 160ms var(--ease),
    box-shadow 160ms var(--ease);
}
.credit-link:hover {
  color: var(--accent-strong);
  border-color: color-mix(in srgb, var(--accent) 34%, var(--line));
  box-shadow: var(--n-glow-sm);
}
.credit-link .icon {
  width: 13px;
  height: 13px;
}
.auth-layout {
  width: min(1120px, 100%);
  margin: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 420px);
  align-items: center;
  gap: clamp(34px, 7vw, 110px);
  padding: 48px 0;
}
.auth-intro {
  min-width: 0;
}
.auth-kicker,
.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--accent-strong);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.auth-title {
  max-width: 620px;
  margin: 14px 0 14px;
  font-size: clamp(32px, 5.2vw, 64px);
  line-height: 0.98;
  letter-spacing: -0.065em;
  font-weight: 780;
}
.auth-title .accent-word {
  color: var(--accent-strong);
}
.auth-copy {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}
.auth-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}
.auth-card {
  width: 100%;
  border-radius: 0;
  padding: 18px;
  box-shadow: var(--n-layer-3), var(--n-glow-sm);
}
.auth-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.auth-card-title {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.035em;
}
.auth-card-sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.auth-tabs {
  width: 100%;
  margin-bottom: 16px;
}
.auth-form {
  display: grid;
  gap: 12px;
}
.auth-form[hidden] {
  display: none;
}
.form-stack {
  display: grid;
  gap: 11px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}
.form-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 3px;
}
.form-note {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}
.form-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}
.form-switch button {
  border: 0;
  padding: 0;
  color: var(--accent-strong);
  background: transparent;
  font-weight: 680;
}

.field {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.field-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 680;
}
.field-hint {
  color: var(--faint);
  font-size: 11px;
}
.input,
.select,
.textarea,
.field input,
.field select,
.field textarea {
  width: 100%;
  min-width: 0;
  min-height: var(--ctl);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  outline: 0;
  color: var(--text);
  background: var(--field);
  box-shadow: inset 0 1px 0 var(--glass-light);
  transition:
    border-color 150ms var(--ease),
    box-shadow 150ms var(--ease),
    background 150ms var(--ease);
}
.input,
.select,
.field input,
.field select {
  padding: 0 11px;
}
.textarea,
.field textarea {
  min-height: 88px;
  padding: 9px 11px;
  resize: vertical;
  line-height: 1.45;
}
.input::placeholder,
.textarea::placeholder,
.field input::placeholder,
.field textarea::placeholder {
  color: var(--faint);
}
.input:hover,
.select:hover,
.textarea:hover,
.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: var(--line-strong);
}
.input:focus,
.select:focus,
.textarea:focus,
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: color-mix(in srgb, var(--accent) 48%, var(--line));
  background: color-mix(in srgb, var(--field) 82%, var(--accent-soft));
  box-shadow: var(--active-ring);
}
.select {
  appearance: none;
  padding-right: 30px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 14px) 15px,
    calc(100% - 10px) 15px;
  background-size:
    4px 4px,
    4px 4px;
  background-repeat: no-repeat;
}
input[type="range"] {
  width: 100%;
  min-height: 28px;
  accent-color: var(--accent);
}
input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--accent);
}

.segmented {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: var(--ctl);
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface-soft);
  box-shadow: var(--n-layer-1);
}
.segmented button {
  min-height: 26px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--r-pill);
  color: var(--muted);
  background: transparent;
  box-shadow: none;
  font-size: 11px;
  font-weight: 720;
}
.segmented button:hover {
  transform: none;
  box-shadow: none;
  color: var(--text);
}
.segmented button.is-active,
.segmented button[aria-selected="true"] {
  color: var(--on-accent);
  background: var(--accent);
  box-shadow: var(--n-glow-sm);
}
.segmented--stretch {
  display: flex;
  width: 100%;
}
.segmented--stretch button {
  flex: 1 1 0;
}

.app-shell {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  background: transparent;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  width: var(--sidebar);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: max(14px, var(--safe-top)) 12px max(14px, var(--safe-bottom));
  border-right: 1px solid var(--line);
  background: var(--panel-strong);
  box-shadow: var(--n-layer-2);
}
.sidebar-brand {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 2px 2px 10px;
  border-bottom: 1px solid var(--line-soft);
}
.sidebar-brand-row {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.sidebar-brand .brand-mark {
  width: 35px;
  height: 35px;
  border-radius: 0;
}
.sidebar-brand .brand-title {
  font-size: 14px;
}
.sidebar-brand .brand-subtitle {
  font-size: 10px;
}
.sidebar-collapse {
  align-self: flex-end;
  width: 30px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--muted);
  background: transparent;
}
.sidebar-collapse:hover {
  color: var(--accent-strong);
  border-color: color-mix(in srgb, var(--accent) 30%, var(--line));
}
.sidebar-close {
  display: none;
}
.sidebar-nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 1px 2px 4px;
  scrollbar-width: thin;
}
.nav-group {
  display: grid;
  gap: 4px;
  margin-bottom: 13px;
}
.nav-group-label {
  padding: 0 8px 3px;
  color: var(--faint);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.nav-item {
  min-height: var(--row);
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  color: var(--muted);
  background: transparent;
  box-shadow: none;
  text-align: left;
  font-size: 12px;
  font-weight: 650;
}
.nav-item:hover {
  transform: none;
  color: var(--text);
  background: var(--surface-soft);
  box-shadow: var(--n-layer-1);
}
.nav-item.is-active {
  color: var(--accent-strong);
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 22%, var(--line));
  box-shadow: var(--n-layer-active), var(--n-glow-sm);
}
.nav-item .icon {
  width: 16px;
  height: 16px;
}
.nav-item-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-footer {
  flex: 0 0 auto;
  display: grid;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
}
.account-chip {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface-soft);
}
.avatar {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: var(--on-accent);
  background: var(--accent);
  font-size: 11px;
  font-weight: 800;
}
.account-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
}
.account-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 720;
}
.account-role {
  color: var(--muted);
  font-size: 10px;
}
.sidebar-footer .btn {
  width: 100%;
}
.app-main {
  grid-column: 2;
  min-width: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: var(--topbar);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: max(9px, var(--safe-top)) clamp(14px, 2.4vw, 28px) 9px;
  border-width: 0 0 1px;
  background: var(--panel);
  box-shadow: var(--n-layer-1);
}
.topbar-left,
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.topbar-left {
  flex: 1 1 auto;
}
.topbar-title {
  min-width: 0;
  display: grid;
  gap: 1px;
}
.topbar-title small {
  color: var(--muted);
  font-size: 10px;
}
.topbar-title h1 {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 17px;
  line-height: 1.15;
  letter-spacing: -0.04em;
}
.topbar-actions {
  flex: 0 0 auto;
}
.quick-control {
  color: var(--muted);
}
.quick-control.is-active {
  color: var(--accent-strong);
}
.menu-trigger {
  display: none;
}
.content-scroll {
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: hidden;
}
.content {
  width: min(var(--content-max), 100%);
  margin: 0 auto;
  padding: clamp(15px, 2.4vw, 28px);
}
.view-root {
  min-width: 0;
}
.app-view {
  min-width: 0;
  animation: pop-in 280ms var(--spring) both;
}
.app-view[hidden] {
  display: none;
}
.view-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 17px;
}
.view-head-copy {
  min-width: 0;
}
.view-head h2 {
  margin: 5px 0 0;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}
.view-head p {
  max-width: 650px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.view-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: clamp(18px, 3.4vw, 34px);
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--accent) 12%, var(--glass)),
    color-mix(in srgb, var(--accent-2) 7%, var(--glass))
  );
  box-shadow: var(--n-layer-3), var(--n-glow-sm);
}
.hero::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: -120px;
  top: -150px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    color-mix(in srgb, var(--accent) 23%, transparent),
    transparent 68%
  );
  filter: blur(8px);
  pointer-events: none;
}
.hero > * {
  position: relative;
  z-index: 1;
}
.hero--home {
  min-height: 220px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.62fr);
  align-items: end;
  gap: 24px;
}
.hero--teacher {
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--accent-2) 12%, var(--glass)),
    color-mix(in srgb, var(--accent) 8%, var(--glass))
  );
}
.hero--admin {
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--warning) 10%, var(--glass)),
    color-mix(in srgb, var(--accent) 8%, var(--glass))
  );
}
.hero--focus {
  min-height: 190px;
}
.hero-title {
  max-width: 690px;
  margin: 12px 0 8px;
  font-size: clamp(28px, 4.2vw, 52px);
  line-height: 0.99;
  letter-spacing: -0.07em;
}
.hero-copy {
  max-width: 650px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}
.hero-side {
  display: grid;
  gap: 8px;
  align-content: end;
}
.hero-side-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--panel);
}
.hero-side-card strong {
  font-size: 12px;
}
.hero-side-card span {
  color: var(--muted);
  font-size: 11px;
}
.grid {
  min-width: 0;
  display: grid;
  gap: var(--gap);
}
/* two columns only while each keeps a usable width; a narrow content area
   (tablet with the sidebar open) gets one column instead of cramped cards */
.grid--two {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
}
.grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid--wide {
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
}
.grid--side {
  grid-template-columns: minmax(0, 0.68fr) minmax(0, 1.32fr);
}
.stack {
  min-width: 0;
  display: grid;
  gap: var(--gap);
}
.section-gap {
  margin-top: var(--gap);
}
.ios-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 13px;
}
.ios-head-copy {
  min-width: 0;
}
.ios-head h2,
.ios-head h3 {
  margin: 0;
  font-size: 15px;
  letter-spacing: -0.035em;
}
.ios-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
}
.ios-head-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gap-sm);
}
.stat-card {
  position: relative;
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--panel);
  box-shadow: var(--n-layer-1);
}
.stat-card:hover {
  box-shadow: var(--n-layer-active), var(--n-glow-sm);
}
.stat-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 720;
}
.stat-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 25px;
  line-height: 1.05;
  letter-spacing: -0.07em;
}
.stat-hint {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--faint);
  font-size: 10px;
}
.stat-card--accent {
  border-color: color-mix(in srgb, var(--accent) 25%, var(--line));
  background: linear-gradient(145deg, var(--accent-soft), var(--surface-soft));
}
.stat-card--accent .stat-value {
  color: var(--accent-strong);
}
.ring-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gap);
}
.ring-card {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 7px;
  padding: 14px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-soft);
  box-shadow: var(--n-layer-1);
  text-align: center;
}
.ring {
  --value: 0%;
  position: relative;
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--accent) var(--value), var(--line) 0);
  box-shadow: var(--n-glow-sm);
}
.ring::before {
  content: "";
  position: absolute;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--panel-strong);
}
.ring-value {
  position: relative;
  z-index: 1;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 15px;
  font-weight: 750;
}
.ring-label {
  color: var(--muted);
  font-size: 10px;
}
.bar-list {
  display: grid;
  gap: 10px;
}
.bar-row {
  display: grid;
  grid-template-columns: minmax(95px, 0.6fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.bar-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 11px;
}
.bar-track {
  height: 7px;
  overflow: hidden;
  border-radius: var(--r-pill);
  background: var(--line);
}
.bar-fill {
  width: var(--value, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 12px -4px var(--accent);
  animation: bar-in 500ms var(--spring) both;
}
.bar-value {
  color: var(--text);
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 10px;
}
.card-list {
  display: grid;
  gap: 8px;
}
.list-row {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  background: var(--surface-soft);
}
.list-row:hover {
  border-color: color-mix(in srgb, var(--accent) 22%, var(--line));
  background: var(--surface-raised);
}
.list-row-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 0;
  color: var(--accent-strong);
  background: var(--accent-soft);
}
.list-row-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}
.list-row-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
}
.list-row-subtitle {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 10px;
}
.list-row-meta {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 10px;
  white-space: nowrap;
}
.sticky-composer {
  position: sticky;
  bottom: 12px;
  z-index: 4;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  background: color-mix(in srgb, var(--glass-strong) 84%, transparent);
  box-shadow: var(--n-layer-3), var(--n-glow-sm);
}
.sticky-composer .textarea {
  min-height: 45px;
  height: 45px;
  resize: none;
}
.recorder {
  display: grid;
  gap: 10px;
}
.recorder-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-soft);
}
.recorder-orb {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--on-accent);
  background: var(--accent);
  box-shadow: var(--n-glow-sm);
}
.recorder-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.recorder-copy strong {
  font-size: 12px;
}
.recorder-copy span {
  color: var(--muted);
  font-size: 11px;
}
.recorder-timer {
  color: var(--accent-strong);
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 16px;
}
.recorder.is-recording .recorder-orb {
  animation: beacon 1.4s ease-out infinite;
}
.table-wrap {
  min-width: 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  /* A table is wider than a phone, and with no cue the last column simply looks
     clipped. These layers paint a soft edge only while there is more table to
     scroll to: the `local` covers slide with the content and hide the `scroll`
     shadows once you reach either end. */
  background-color: var(--surface-soft);
  background-image:
    linear-gradient(90deg, var(--surface-soft) 40%, transparent),
    linear-gradient(270deg, var(--surface-soft) 40%, transparent),
    linear-gradient(90deg, var(--line-strong), transparent),
    linear-gradient(270deg, var(--line-strong), transparent);
  background-position:
    left center,
    right center,
    left center,
    right center;
  background-size:
    40px 100%,
    40px 100%,
    18px 100%,
    18px 100%;
  background-repeat: no-repeat;
  background-attachment: local, local, scroll, scroll;
}
table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  text-align: left;
}
th,
td {
  padding: 10px 11px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}
th {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
td {
  color: var(--text);
  font-size: 12px;
}
tbody tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover {
  background: var(--accent-soft);
}
.table-primary {
  min-width: 0;
  display: grid;
  gap: 2px;
}
.table-primary strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.table-primary span {
  color: var(--muted);
  font-size: 10px;
}
.table-actions {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
}
.table-action {
  min-height: 27px;
  padding: 0 8px;
  border-radius: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}
.empty-state {
  min-height: 145px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  padding: 18px;
  border: 1px dashed color-mix(in srgb, var(--accent) 22%, var(--line));
  border-radius: var(--r-md);
  background: var(--surface-soft);
  text-align: center;
}
.empty-state .icon {
  width: 27px;
  height: 27px;
  color: var(--accent-strong);
  opacity: 0.8;
  animation: empty-float 3.6s ease-in-out infinite;
}
.empty-state strong {
  font-size: 13px;
}
.empty-state p {
  max-width: 340px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}
.skeleton {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-sm);
  background: linear-gradient(
    105deg,
    var(--line-soft) 25%,
    var(--glass-light) 45%,
    var(--line-soft) 65%
  );
  background-size: 240% 100%;
  animation: shimmer 1.4s linear infinite;
}
.skeleton-line {
  height: 11px;
  margin: 7px 0;
}
.skeleton-line.short {
  width: 55%;
}
.skeleton-block {
  min-height: 108px;
}
.world-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: var(--gap);
}
.world-card {
  position: relative;
  min-width: 0;
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  overflow: hidden;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--panel);
  box-shadow: var(--n-layer-1);
}
.world-card::before {
  content: "";
  position: absolute;
  width: 130px;
  height: 130px;
  right: -48px;
  top: -50px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-soft), transparent 70%);
  pointer-events: none;
}
.world-card--tall {
  min-height: 250px;
  grid-row: span 2;
}
.world-card--wide {
  grid-column: span 2;
  min-height: 150px;
}
.world-card > * {
  position: relative;
  z-index: 1;
}
.world-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.world-card-title {
  margin: 0;
  font-size: 15px;
  letter-spacing: -0.04em;
}
.world-card-copy {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
}
.world-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--faint);
  font-size: 10px;
}
.view-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.view-chip {
  min-height: 28px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}
.view-chip.is-active {
  color: var(--on-accent);
  border-color: transparent;
  background: var(--accent);
  box-shadow: var(--n-glow-sm);
}
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.filter-search {
  flex: 1 1 190px;
  min-width: 150px;
}
.filter-select {
  flex: 0 1 180px;
  min-width: 130px;
}
.collection-card {
  min-width: 0;
  display: grid;
  gap: 9px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-soft);
  box-shadow: var(--n-layer-1);
}
.collection-card:hover {
  box-shadow: var(--n-layer-active), var(--n-glow-sm);
}
.collection-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.collection-card h3 {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}
.collection-card p {
  min-height: 32px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}
.collection-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.collection-card-foot span {
  color: var(--faint);
  font-size: 10px;
}
.topic-list {
  display: grid;
  gap: 8px;
}
.topic-row {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  background: var(--surface-soft);
}
.topic-row:hover {
  background: var(--surface-raised);
  border-color: color-mix(in srgb, var(--accent) 22%, var(--line));
}
.topic-index {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 0;
  color: var(--accent-strong);
  background: var(--accent-soft);
  font-family: var(--mono);
  font-size: 10px;
}
.topic-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}
.topic-copy strong {
  font-size: 12px;
}
.topic-copy span {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
}
.topic-progress {
  width: 76px;
  height: 6px;
  overflow: hidden;
  border-radius: var(--r-pill);
  background: var(--line);
}
.topic-progress span {
  display: block;
  width: var(--value, 0%);
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}
.feedback-item {
  display: grid;
  gap: 5px;
  padding: 11px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  background: var(--surface-soft);
}
.feedback-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.feedback-item-head strong {
  font-size: 11px;
}
.feedback-item p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}
.feedback-item time {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
}
.settings-block {
  display: grid;
  gap: 13px;
}
.setting-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}
/* the label keeps a readable width; when the control does not fit beside it,
   the control moves to its own line instead of covering the text */
.setting-copy {
  flex: 1 1 10rem;
  min-width: min(10rem, 100%);
  display: grid;
  gap: 3px;
}
.setting-row:has(.accent-picker) .setting-copy {
  flex: none;
}
.setting-copy strong {
  font-size: 12px;
}
.setting-copy span {
  color: var(--muted);
  font-size: 10px;
}
.accent-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.accent-swatch {
  width: 30px;
  height: 30px;
  position: relative;
  padding: 0;
  border-radius: 50%;
  background: var(--swatch);
  box-shadow: var(--n-layer-1);
}
.accent-swatch.is-active {
  box-shadow: var(--n-layer-active), var(--n-glow-sm);
}
.accent-swatch.is-active::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid var(--on-accent);
  border-radius: 50%;
}
.swatch-button {
  min-height: 30px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}
.swatch-button.is-active {
  color: var(--on-accent);
  background: var(--accent);
  border-color: transparent;
}
.switch {
  position: relative;
  width: 42px;
  height: 25px;
  flex: 0 0 auto;
}
.switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.switch-track {
  position: absolute;
  inset: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  background: var(--field-strong);
  pointer-events: none;
  transition:
    background 160ms var(--ease),
    box-shadow 160ms var(--ease);
}
.switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--muted);
  box-shadow: var(--n-layer-1);
  transition:
    transform 160ms var(--spring),
    background 160ms var(--ease);
}
.switch input:checked + .switch-track {
  background: var(--accent-soft);
  box-shadow: var(--glow-tint);
}
.switch input:checked + .switch-track::after {
  transform: translateX(17px);
  background: var(--accent-fill);
}
.switch input:focus-visible + .switch-track {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.bottom-nav {
  display: none;
}
.drawer-scrim {
  display: none;
}
.modal-host,
.toast-host {
  position: fixed;
  z-index: 90;
  pointer-events: none;
}
.modal-host {
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
}
.toast-host {
  right: max(16px, var(--safe-right));
  bottom: max(16px, var(--safe-bottom));
  display: grid;
  gap: 8px;
  width: min(360px, calc(100vw - 32px));
}
.toast {
  pointer-events: auto;
  display: grid;
  gap: 3px;
  padding: 11px 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--glass-strong);
  box-shadow: var(--n-layer-3), var(--n-glow-sm);
  animation: toast-in 240ms var(--spring) both;
}
.toast strong {
  font-size: 12px;
}
.toast span {
  color: var(--muted);
  font-size: 11px;
}
.toast-action {
  justify-self: start;
  min-height: 32px;
  margin-top: 4px;
  padding: 0 12px;
  border: 1px solid var(--accent);
  border-radius: var(--r-sm);
  color: var(--accent);
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.toast-action:hover,
.toast-action:focus-visible {
  color: var(--on-accent);
  background: var(--accent);
}
@media (pointer: coarse) {
  .toast-action {
    min-height: 44px;
  }
}
dialog {
  width: min(560px, calc(100vw - 28px));
  max-height: min(760px, calc(100dvh - 28px));
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--text);
  background: transparent;
  overflow: visible;
}
dialog::backdrop {
  background: var(--scrim);
}
.drawer-modal {
  width: min(420px, calc(100vw - 20px));
  height: 100dvh;
  max-height: 100dvh;
  margin: 0 0 0 auto;
  border-radius: 0 0 0 24px;
}
.drawer-modal[open] {
  animation: drawer-in 240ms var(--spring) both;
}
.drawer-modal .dialog-card {
  height: 100%;
  max-height: 100%;
  border-radius: 0 0 0 24px;
}
.dialog-card {
  max-height: min(760px, calc(100dvh - 28px));
  overflow-y: auto;
  border-radius: 0;
  padding: 18px;
  box-shadow: var(--n-layer-3), var(--n-glow);
}
.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 15px;
}
.dialog-head h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.04em;
}
.dialog-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}
.dialog-body {
  min-width: 0;
}
.dialog-footer {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.dialog-card .form-grid {
  margin-top: 2px;
}

[data-role-only="student"],
[data-role-only="teacher"],
[data-role-only="admin"] {
  display: none;
}
body[data-role="student"] [data-role-only="student"],
body[data-role="teacher"] [data-role-only="teacher"],
body[data-role="admin"] [data-role-only="admin"] {
  display: block;
}
body[data-role="student"] [data-role-only="student"].nav-group,
body[data-role="teacher"] [data-role-only="teacher"].nav-group,
body[data-role="admin"] [data-role-only="admin"].nav-group {
  display: grid;
}
body[data-role="student"] [data-role-only="student"].card,
body[data-role="teacher"] [data-role-only="teacher"].card,
body[data-role="admin"] [data-role-only="admin"].card {
  display: grid;
}
body[data-role="student"] [data-role-only="student"].hero,
body[data-role="teacher"] [data-role-only="teacher"].hero,
body[data-role="admin"] [data-role-only="admin"].hero {
  display: block;
}
@keyframes pricing-shimmer {
  from {
    background-position: 220% 0;
  }
  to {
    background-position: -220% 0;
  }
}

@keyframes drawer-in {
  from {
    opacity: 0;
    transform: translateX(24px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes pop-in {
  from {
    opacity: 0;
    transform: translateY(7px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes shimmer {
  from {
    background-position: 220% 0;
  }
  to {
    background-position: -220% 0;
  }
}
@keyframes beacon {
  0% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 40%, transparent);
  }
  70% {
    box-shadow: 0 0 0 8px transparent;
  }
  100% {
    box-shadow: 0 0 0 0 transparent;
  }
}
@keyframes empty-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}
@keyframes bar-in {
  from {
    transform: scaleX(0);
    transform-origin: left;
  }
  to {
    transform: scaleX(1);
    transform-origin: left;
  }
}

@media (max-width: 900px) {
  .auth-layout {
    width: min(620px, 100%);
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    padding: 34px 0;
  }
  .auth-intro {
    text-align: center;
  }
  .auth-kicker {
    justify-content: center;
  }
  .auth-title {
    margin-inline: auto;
    font-size: clamp(34px, 8vw, 52px);
  }
  .auth-copy {
    margin-inline: auto;
  }
  .auth-highlights {
    justify-content: center;
  }
  .auth-card {
    width: min(520px, 100%);
    margin-inline: auto;
  }
}

@media (max-width: 1200px) {
  :root {
    --sidebar: 240px;
  }
  .hero--home {
    grid-template-columns: minmax(0, 1fr) minmax(190px, 0.55fr);
  }
  .content {
    padding-inline: 20px;
  }
}

@media (max-width: 1023px) {
  :root {
    --sidebar: 240px;
    --topbar: 56px;
  }
  .sidebar {
    padding-inline: 10px;
  }
  .topbar {
    padding-inline: 18px;
  }
  .content {
    padding: 18px;
  }
  .hero--home {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid--wide,
  .grid--side {
    grid-template-columns: minmax(0, 1fr);
  }
  .world-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .world-card--wide {
    grid-column: span 2;
  }
}

@media (max-width: 767px) {
  :root {
    --topbar: 56px;
    --content-max: 100%;
  }
  body {
    padding-bottom: calc(62px + var(--safe-bottom));
  }
  .app-shell {
    display: block;
  }
  .sidebar {
    width: min(292px, calc(100vw - 44px));
    transform: translateX(-105%);
    transition: transform 240ms var(--ease);
    box-shadow: var(--n-layer-3), var(--n-glow);
  }
  body.drawer-open .sidebar {
    transform: translateX(0);
  }
  .sidebar-close {
    position: absolute;
    top: 14px;
    right: 13px;
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--muted);
    background: var(--surface-soft);
  }
  .drawer-scrim {
    position: fixed;
    inset: 0;
    z-index: 25;
    display: block;
    background: var(--scrim);
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms var(--ease);
  }
  body.drawer-open .drawer-scrim {
    opacity: 1;
    pointer-events: auto;
  }
  .menu-trigger {
    display: inline-grid;
  }
  .topbar {
    padding-inline: 12px;
  }
  .topbar-title h1 {
    font-size: 15px;
  }
  .topbar-title small {
    display: none;
  }
  .topbar-actions {
    gap: 5px;
  }
  .topbar-actions .segmented {
    display: none;
  }
  .content {
    padding: 13px 12px 20px;
  }
  .view-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 13px;
  }
  .view-actions {
    justify-content: flex-start;
  }
  .view-head h2 {
    font-size: 27px;
  }
  .hero {
    border-radius: 0;
    padding: 18px;
  }
  .hero--home {
    min-height: 0;
  }
  .hero-title {
    font-size: 32px;
  }
  .hero-copy {
    font-size: 13px;
  }
  .hero-side {
    grid-template-columns: minmax(0, 1fr);
  }
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ring-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid--two,
  .grid--three {
    grid-template-columns: minmax(0, 1fr);
  }
  .world-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .world-card--wide {
    grid-column: span 1;
  }
  .world-card--tall {
    min-height: 210px;
    grid-row: span 1;
  }
  .form-grid,
  .form-grid--three {
    grid-template-columns: minmax(0, 1fr);
  }
  .recorder-panel {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .recorder-panel .recorder-timer {
    grid-column: 2;
  }
  .recorder-panel .btn {
    grid-column: 1 / -1;
    width: 100%;
  }
  .sticky-composer {
    bottom: calc(70px + var(--safe-bottom));
    grid-template-columns: minmax(0, 1fr);
  }
  .sticky-composer .btn {
    width: 100%;
  }
  .bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 80;
    min-height: calc(58px + var(--safe-bottom));
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 3px;
    padding: 5px 7px calc(5px + var(--safe-bottom));
    border-top: 1px solid var(--line);
    background: color-mix(in srgb, var(--glass-strong) 88%, transparent);
    box-shadow: var(--n-layer-3);
  }
  body[data-bottom-items="4"] .bottom-nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  body[data-bottom-items="5"] .bottom-nav {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .bottom-nav button {
    min-width: 0;
    min-height: 48px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 3px;
    border: 1px solid transparent;
    border-radius: 0;
    color: var(--muted);
    background: transparent;
    box-shadow: none;
    font-size: 9px;
    font-weight: 700;
  }
  .bottom-nav button:hover {
    transform: none;
    box-shadow: none;
  }
  .bottom-nav button.is-active {
    color: var(--accent-strong);
    background: var(--accent-soft);
    border-color: color-mix(in srgb, var(--accent) 24%, var(--line));
  }
  .bottom-nav .icon {
    width: 18px;
    height: 18px;
  }
  .toast-host {
    bottom: calc(70px + var(--safe-bottom));
    right: 12px;
    width: calc(100vw - 24px);
  }
}

@media (max-width: 480px) {
  body {
    font-size: 13px;
  }
  .auth-screen {
    padding-inline: 12px;
  }
  .auth-topbar {
    align-items: flex-start;
  }
  .auth-topbar .topbar-actions {
    display: none;
  }
  .auth-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    padding: 30px 0;
  }
  .auth-intro {
    text-align: center;
  }
  .auth-kicker {
    justify-content: center;
  }
  .auth-title {
    margin-inline: auto;
    font-size: 36px;
  }
  .auth-copy {
    margin-inline: auto;
    font-size: 14px;
  }
  .auth-highlights {
    justify-content: center;
  }
  .auth-card {
    border-radius: 0;
    padding: 14px;
  }
  .auth-tabs button {
    padding-inline: 6px;
    font-size: 10px;
    white-space: nowrap;
  }
  .auth-footer {
    align-items: center;
    flex-direction: column;
  }
  .topbar-actions .quick-control[data-action="cycle-glow"] {
    display: none;
  }
  .view-head h2 {
    font-size: 25px;
  }
  .hero-title {
    font-size: 29px;
  }
  .hero-actions .btn {
    flex: 1 1 100%;
  }
  .card,
  .ios-section {
    padding: 13px;
  }
  .stat-card {
    padding: 11px;
  }
  .stat-value {
    font-size: 22px;
  }
  .table-wrap {
    margin-inline: -1px;
  }
  th,
  td {
    padding: 9px 8px;
  }
  .bar-row {
    grid-template-columns: minmax(82px, 0.7fr) minmax(0, 1fr);
  }
  .bar-value {
    grid-column: 2;
  }
  .topic-progress {
    display: none;
  }
  .setting-row {
    align-items: flex-start;
  }
  .dialog-card {
    padding: 14px;
  }
  dialog {
    width: calc(100vw - 20px);
  }
}

@media (max-height: 620px) {
  .auth-screen {
    padding-block: 10px;
  }
  .auth-layout {
    padding: 16px 0;
  }
  .auth-intro {
    display: none;
  }
  .auth-card {
    width: min(480px, 100%);
    margin-inline: auto;
    padding: 14px;
  }
  .auth-card-head {
    margin-bottom: 10px;
  }
  .auth-tabs {
    margin-bottom: 10px;
  }
  .auth-form {
    gap: 8px;
  }
  .auth-footer {
    min-height: 20px;
    font-size: 10px;
  }
}

@media (max-width: 1023px) {
  .admin-pricing-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .icon--xl {
    width: 68px;
    height: 68px;
  }
  .admin-pricing-cards {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    scroll-behavior: auto !important;
    transition: none !important;
  }
  .bg-blob {
    display: none;
  }
}

html[data-anim="off"] *,
html[data-anim="off"] *::before,
html[data-anim="off"] *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}
.brand-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: 3px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.brand-status .live-dot {
  width: 5px;
  height: 5px;
}
.admin-pricing-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--panel);
  box-shadow: var(--n-layer-2);
}
.pricing-card h3,
.admin-pricing-card h3 {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 16px;
  letter-spacing: -0.04em;
}
.pricing-card p,
.admin-pricing-card p {
  position: relative;
  z-index: 1;
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.pricing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
  padding: 23px;
  transition:
    transform 220ms var(--spring),
    border-color 220ms var(--ease),
    box-shadow 220ms var(--ease);
}
.pricing-card:nth-child(2) {
  border-color: color-mix(in srgb, var(--accent) 28%, var(--line));
}
.pricing-card-head,
.admin-pricing-card-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.pricing-card h3 {
  font-size: 21px;
}
.pricing-price {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 7px;
  padding: 15px 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.pricing-price strong,
.admin-pricing-card-price {
  color: var(--accent-strong);
  font-family: var(--mono);
  font-size: 29px;
  letter-spacing: -0.07em;
}
.pricing-price span {
  color: var(--muted);
  font-size: 11px;
}
.pricing-features {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  flex: 1 1 auto;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 12px;
}
.pricing-features li {
  position: relative;
  padding-left: 18px;
}
.pricing-features li::before {
  content: "";
  position: absolute;
  top: 0.55em;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
.pricing-state {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
.pricing-skeleton {
  min-height: 310px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: linear-gradient(
    105deg,
    var(--surface-soft) 25%,
    var(--glass-light) 45%,
    var(--surface-soft) 65%
  );
  background-size: 240% 100%;
  animation: pricing-shimmer 1.4s linear infinite;
}

:root {
  --accent-readable: var(--accent-strong);
}
:root[data-theme="light"] {
  --accent-readable: #24558c;
}
:root[data-theme="light"][data-accent="sage"] {
  --accent-readable: #2e6548;
}
:root[data-theme="light"][data-accent="lavender"] {
  --accent-readable: #5b3f9a;
}
:root[data-theme="light"][data-accent="beige"] {
  --accent-readable: #765426;
}
:root[data-theme="light"][data-accent="dustyPink"] {
  --accent-readable: #8d3e5b;
}
:root[data-theme="light"][data-accent="turquoise"] {
  --accent-readable: #176b70;
}
:root[data-theme="light"][data-accent="monochrome"] {
  --accent-readable: #3f4b61;
}
:root[data-theme="light"][data-accent="coral"] {
  --accent-readable: #9a403d;
}
:root[data-theme="light"][data-accent="lime"] {
  --accent-readable: #416b20;
}
:root[data-theme="light"][data-accent="violet"] {
  --accent-readable: #6336a0;
}
.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 11px;
  font-weight: 650;
  transition:
    color 160ms var(--ease),
    border-color 160ms var(--ease),
    box-shadow 160ms var(--ease),
    transform 160ms var(--spring);
}
.auth-back:hover {
  color: var(--accent-readable);
  border-color: color-mix(in srgb, var(--accent) 32%, var(--line));
  box-shadow: var(--n-glow-sm);
  transform: translateX(-1px);
}
.auth-back .icon {
  width: 14px;
  height: 14px;
  transform: rotate(180deg);
}

@media (max-width: 767px) {
  body:not(.app-visible) {
    padding-bottom: 0;
  }
  .auth-back {
    min-height: 34px;
  }
}

@media (max-width: 480px) {
  .auth-back {
    width: 34px;
    justify-content: center;
    padding: 0;
  }
  .auth-back span {
    display: none;
  }
}

.registration-form {
  gap: 14px;
}
.registration-steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin: 0;
  padding: 7px;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--panel);
  box-shadow: var(--n-layer-1);
}
.registration-step {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  padding: 7px 6px;
  border: 1px solid transparent;
  border-radius: 0;
  color: var(--faint);
  transition:
    color 180ms var(--ease),
    background 180ms var(--ease),
    border-color 180ms var(--ease),
    box-shadow 180ms var(--ease);
}
.registration-step-index {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: inherit;
  background: var(--surface-soft);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
}
.registration-step-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
}
.registration-step-copy strong {
  overflow: hidden;
  color: inherit;
  font-size: 10px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.registration-step-copy small {
  overflow: hidden;
  color: var(--faint);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.registration-step.is-active {
  color: var(--accent-readable);
  border-color: color-mix(in srgb, var(--accent) 28%, transparent);
  background: var(--accent-soft);
  box-shadow: var(--n-layer-1), var(--n-glow-sm);
}
.registration-step.is-active .registration-step-index {
  color: var(--on-accent);
  border-color: transparent;
  background: var(--accent);
}
.registration-step.is-complete {
  color: var(--success);
}
.registration-step.is-complete .registration-step-index {
  color: var(--success);
  border-color: color-mix(in srgb, var(--success) 35%, var(--line));
  background: color-mix(in srgb, var(--success) 12%, transparent);
}
.registration-step-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  background: var(--panel);
  animation: registration-panel-in 360ms var(--spring) both;
}
.registration-step-panel[hidden] {
  display: none;
}
.registration-panel-heading,
.registration-verify-card {
  display: flex;
  align-items: center;
  gap: 10px;
}
.registration-panel-heading > div,
.registration-verify-card > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}
.registration-panel-heading strong,
.registration-verify-card strong {
  font-size: 12px;
  letter-spacing: -0.02em;
}
.registration-panel-heading span,
.registration-verify-card span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}
.registration-panel-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent);
  border-radius: 0;
  color: var(--accent-readable);
  background: var(--accent-soft);
}
.registration-panel-icon--mail {
  color: var(--info);
  border-color: color-mix(in srgb, var(--info) 25%, transparent);
  background: color-mix(in srgb, var(--info) 11%, transparent);
}
.registration-verify-card {
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--info) 20%, var(--line));
  border-radius: var(--r-sm);
  background: color-mix(in srgb, var(--info) 6%, transparent);
}
.registration-password-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.registration-password-status {
  color: var(--faint);
  font-size: 10px;
  font-weight: 650;
}
.registration-password-meter {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  margin-top: -5px;
}
.registration-password-meter i {
  height: 4px;
  border-radius: var(--r-pill);
  background: var(--line);
  transition:
    background 180ms var(--ease),
    box-shadow 180ms var(--ease);
}
.registration-password-meter[data-strength="1"] i:nth-child(-n + 1),
.registration-password-meter[data-strength="2"] i:nth-child(-n + 2) {
  background: var(--warning);
  box-shadow: 0 0 10px -5px var(--warning);
}
.registration-password-meter[data-strength="3"] i {
  background: var(--success);
  box-shadow: 0 0 10px -5px var(--success);
}
.registration-verify-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.registration-verify-actions .btn {
  min-height: 32px;
  padding-inline: 10px;
  font-size: 11px;
}
.registration-footer {
  display: grid;
  gap: 11px;
}
.registration-terms {
  margin: 0;
  color: var(--faint);
  font-size: 10px;
  line-height: 1.45;
}
.registration-ready-panel {
  justify-items: center;
  min-height: 148px;
  align-content: center;
  text-align: center;
  border-color: color-mix(in srgb, var(--success) 28%, var(--line));
  background: color-mix(in srgb, var(--success) 7%, transparent);
  box-shadow:
    var(--n-layer-2),
    0 0 28px -18px var(--success);
}
.registration-ready-panel > strong {
  font-size: 15px;
  letter-spacing: -0.03em;
}
.registration-ready-panel > span:last-child {
  max-width: 260px;
  color: var(--muted);
  font-size: 11px;
}
.registration-ready-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--success) 35%, transparent);
  border-radius: 50%;
  color: var(--success);
  background: color-mix(in srgb, var(--success) 13%, transparent);
  box-shadow: 0 0 0 7px color-mix(in srgb, var(--success) 6%, transparent);
  animation: registration-ready-pulse 2.2s ease-in-out infinite;
}
.registration-ready-icon .icon {
  width: 21px;
  height: 21px;
}

@keyframes registration-ready-pulse {
  0%,
  100% {
    transform: scale(0.96);
    box-shadow: 0 0 0 7px color-mix(in srgb, var(--success) 6%, transparent);
  }
  50% {
    transform: scale(1.04);
    box-shadow: 0 0 0 11px color-mix(in srgb, var(--success) 3%, transparent);
  }
}

@keyframes registration-panel-in {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 480px) {
  .registration-steps {
    gap: 2px;
    padding: 5px;
  }
  .registration-step {
    grid-template-columns: 23px minmax(0, 1fr);
    gap: 5px;
    padding: 6px 4px;
  }
  .registration-step-index {
    width: 23px;
    height: 23px;
    font-size: 8px;
  }
  .registration-step-copy strong {
    font-size: 9px;
  }
  .registration-step-copy small {
    font-size: 8px;
  }
  .registration-step-panel {
    padding: 11px;
  }
  .registration-verify-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .registration-verify-actions .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .registration-step-panel,
  .registration-ready-icon {
    animation: none !important;
  }
}

html[data-anim="off"] .registration-step-panel,
html[data-anim="off"] .registration-ready-icon {
  animation: none !important;
}

:root {
  /* 0x sets its headlines in the same mono as its data, so the display face is
     mono too. The previous serif stack (Iowan/Palatino/Georgia) is what gave
     the site its editorial "Pinterest" look. */
  --font-display:
    "SF Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.brand-copy {
  min-width: 0;
}
html[data-glow="0"] .hero--home::after,
html[data-glow="0"] .hero--teacher::after,
html[data-glow="0"] .hero--admin::after {
  opacity: 0;
}
.pricing-card h3 {
  font-family: var(--font-display);
  font-size: 20px;
}
.pricing-card {
  min-height: 360px;
  padding: 24px;
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--accent) 7%, var(--surface-raised)),
    var(--surface-soft)
  );
}
.pricing-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 24px;
  left: 24px;
  height: 2px;
  background: linear-gradient(
    90deg,
    var(--accent),
    var(--accent-2),
    transparent
  );
}
.pricing-card:nth-child(2) {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  box-shadow: var(--n-layer-3), var(--n-glow-sm);
}
.pricing-card .pricing-card-head {
  margin-bottom: 4px;
}
.pricing-card .eyebrow {
  color: var(--accent-readable);
  letter-spacing: 0.14em;
}
.pricing-card .pricing-price {
  margin-block: 12px;
}
.pricing-card .btn {
  min-height: 50px;
  margin-top: auto;
  border-radius: 0;
}
.pricing-features {
  gap: 7px;
  margin-block: 0 18px;
}
@media (max-width: 767px) {
  .pricing-card {
    min-height: 0;
  }
}
.sidebar-brand .brand-mark {
  width: 40px;
  height: 40px;
  background: transparent;
  box-shadow: none;
}
.auth-topbar .brand-mark,
.sidebar-brand .brand-mark {
  background: transparent;
  box-shadow: none;
}
.auth-topbar .brand-mark .icon,
.sidebar-brand .brand-mark .icon {
  color: var(--accent-readable);
  filter: none;
}
.topbar .quick-control {
  border-color: color-mix(in srgb, var(--accent) 28%, var(--line));
  background: var(--panel);
}
.topbar .quick-control:hover,
.topbar .quick-control.is-active {
  border-color: color-mix(in srgb, var(--accent) 48%, var(--line));
  box-shadow: var(--n-layer-2), var(--n-glow-sm);
}

.hero--home,
.hero--teacher,
.hero--admin {
  isolation: isolate;
  overflow: hidden;
  border-color: color-mix(in srgb, var(--accent) 30%, var(--line));
  background:
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--accent) 12%, var(--glass)),
      color-mix(in srgb, var(--accent-2) 8%, var(--glass))
    ),
    var(--glass);
  box-shadow: var(--n-layer-3), var(--n-glow-sm);
  animation: dashboard-board-in 480ms var(--spring) both;
}
.hero--home::before,
.hero--teacher::before,
.hero--admin::before {
  content: "LISTEN  /  SPEAK  /  REMEMBER";
  position: absolute;
  z-index: 0;
  top: 17px;
  right: -20%;
  color: color-mix(in srgb, var(--accent) 42%, transparent);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.2em;
  white-space: nowrap;
  animation: dashboard-word-track 16s linear infinite;
}
.hero--teacher::before {
  content: "READ  /  GUIDE  /  GROW";
}
.hero--admin::before {
  content: "CLEAR  /  SAFE  /  READY";
}
.hero--home::after,
.hero--teacher::after,
.hero--admin::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: -50%;
  right: -15%;
  width: 55%;
  height: 200%;
  border-radius: 50%;
  background: conic-gradient(
    from 180deg,
    transparent 0deg,
    color-mix(in srgb, var(--accent) 18%, transparent) 70deg,
    transparent 145deg,
    color-mix(in srgb, var(--accent-2) 12%, transparent) 235deg,
    transparent 360deg
  );
  filter: blur(26px);
  opacity: 0.18;
  pointer-events: none;
  animation: dashboard-board-glow 9s ease-in-out infinite;
}
.hero--home > *,
.hero--teacher > *,
.hero--admin > * {
  position: relative;
  z-index: 1;
}
.hero--home .hero-title,
.hero--teacher .hero-title,
.hero--admin .hero-title {
  font-family: var(--font-display);
  letter-spacing: -0.025em;
  word-spacing: 0.04em;
  animation: dashboard-title-in 460ms 80ms var(--spring) both;
}
.hero--home .hero-side-card {
  animation: dashboard-side-card-in 420ms var(--spring) both;
}
.hero--home .hero-side-card:nth-child(1) {
  animation-delay: 140ms;
}
.hero--home .hero-side-card:nth-child(2) {
  animation-delay: 220ms;
}
.stat-grid .stat-card {
  position: relative;
  overflow: hidden;
  border-color: color-mix(in srgb, var(--accent) 20%, var(--line));
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--accent) 7%, var(--surface-raised)),
    var(--surface-soft)
  );
  animation: dashboard-stat-in 420ms var(--spring) both;
}
.stat-grid .stat-card:nth-child(1) {
  animation-delay: 40ms;
}
.stat-grid .stat-card:nth-child(2) {
  animation-delay: 90ms;
}
.stat-grid .stat-card:nth-child(3) {
  animation-delay: 140ms;
}
.stat-grid .stat-card:nth-child(4) {
  animation-delay: 190ms;
}
.stat-grid .stat-card::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: 0;
  left: 12px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: calc(var(--g) * 0.65);
}
.stat-grid .stat-card:hover {
  border-color: color-mix(in srgb, var(--accent) 44%, var(--line));
  box-shadow: var(--n-layer-3), var(--n-glow-sm);
}
.ios-section {
  transition:
    border-color 220ms var(--ease),
    box-shadow 220ms var(--ease),
    transform 220ms var(--spring);
  animation: dashboard-section-in 440ms 220ms var(--spring) both;
}
.ios-section:hover {
  border-color: color-mix(in srgb, var(--accent) 30%, var(--line));
  box-shadow: var(--n-layer-2), var(--n-glow-sm);
  transform: translateY(-2px);
}
.bar-fill {
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 calc(16px * var(--g)) -5px var(--accent);
  animation: dashboard-bar-in 500ms var(--spring) both;
}
.bar-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 36%;
  background: linear-gradient(
    90deg,
    transparent,
    var(--glass-light),
    transparent
  );
  transform: translateX(-140%);
  animation: dashboard-bar-scan 2.8s ease-in-out infinite;
}

@keyframes dashboard-board-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes dashboard-board-glow {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  50% {
    transform: translate3d(-12px, 10px, 0) rotate(8deg);
  }
}
@keyframes dashboard-word-track {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-42%);
  }
}
@keyframes dashboard-title-in {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes dashboard-side-card-in {
  from {
    opacity: 0;
    transform: translateX(14px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes dashboard-stat-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes dashboard-section-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes dashboard-bar-in {
  from {
    transform: scaleX(0);
    transform-origin: left;
  }
  to {
    transform: scaleX(1);
    transform-origin: left;
  }
}
@keyframes dashboard-bar-scan {
  0%,
  100% {
    transform: translateX(-140%);
  }
  55% {
    transform: translateX(340%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero--home,
  .hero--teacher,
  .hero--admin,
  .hero--home::before,
  .hero--teacher::before,
  .hero--admin::before,
  .hero--home::after,
  .hero--teacher::after,
  .hero--admin::after,
  .hero--home .hero-title,
  .hero--teacher .hero-title,
  .hero--admin .hero-title,
  .hero--home .hero-side-card,
  .stat-grid .stat-card,
  .ios-section,
  .bar-fill,
  .bar-fill::after {
    animation: none !important;
  }
}

html[data-anim="off"] .hero--home,
html[data-anim="off"] .hero--teacher,
html[data-anim="off"] .hero--admin,
html[data-anim="off"] .hero--home::before,
html[data-anim="off"] .hero--teacher::before,
html[data-anim="off"] .hero--admin::before,
html[data-anim="off"] .hero--home::after,
html[data-anim="off"] .hero--teacher::after,
html[data-anim="off"] .hero--admin::after,
html[data-anim="off"] .hero--home .hero-title,
html[data-anim="off"] .hero--teacher .hero-title,
html[data-anim="off"] .hero--admin .hero-title,
html[data-anim="off"] .hero--home .hero-side-card,
html[data-anim="off"] .stat-grid .stat-card,
html[data-anim="off"] .ios-section,
html[data-anim="off"] .bar-fill,
html[data-anim="off"] .bar-fill::after {
  animation: none !important;
}
.topbar {
  min-height: 70px;
}
.topbar-actions {
  gap: 10px;
}
.topbar .quick-control {
  width: 40px;
  height: 40px;
  min-height: 40px;
}
.topbar-title h1 {
  font-size: 19px;
}

@media (max-width: 767px) {
  .topbar {
    min-height: 62px;
  }
  .topbar .quick-control {
    width: 36px;
    height: 36px;
    min-height: 36px;
  }
  .topbar-title h1 {
    font-size: 17px;
  }
}
/* a long title (RU "Разговорная практика", "Панель преподавателя") wraps to two
   lines instead of ending in an ellipsis on phones and tablets */
@media (max-width: 1023px) {
  .topbar-title h1 {
    white-space: normal;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }
}
.pricing-skeleton {
  min-height: 360px;
}
@media (max-width: 767px) {
  .pricing-card,
  .pricing-skeleton {
    min-height: 300px;
  }
}

@media (forced-colors: active) {
  :where(button, a, input, select, textarea, [tabindex]):focus-visible {
    outline: 2px solid CanvasText !important;
    outline-offset: 3px;
  }
  .hero--home,
  .hero--teacher,
  .hero--admin {
    forced-color-adjust: auto;
  }
}

/* Returning, signed-in visitor: nothing but the page colour until the session
   is confirmed (see rememberSession in app.js). */
html.resuming .landing-screen,
html.resuming .lp-fx,
html.resuming #authScreen,
html.resuming #backgroundFx {
  display: none !important;
}
