/* App styles. One system for the working UI: SF Pro on Apple devices (Inter
   everywhere else), four radii, hairlines instead of grey rings, tonal secondary
   buttons, tight shadows. Newsreader stays for the wordmark and the big arrival
   headlines, the one place the landing page's voice carries over. Colours and
   tokens live in tokens.css; the app is always light. */

@font-face {
  font-family: "Inter Variable";
  src: url("/assets/fonts/Inter-Variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --font-app: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter Variable", "Segoe UI Variable Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --gutter: clamp(16px, 4vw, 40px);
  --card-gap: clamp(8px, 1.2vw, 16px);
  --header-h: 68px;

  /* One radius scale. Capsules only for the status chip, the switches and the dots. */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;

  --hair: color-mix(in srgb, var(--ink) 9%, transparent);
  --fill: color-mix(in srgb, var(--ink) 5.5%, transparent);
  --fill-hover: color-mix(in srgb, var(--ink) 9%, transparent);
  --card-shadow: 0 0 0 1px rgb(12 20 35 / 0.05), 0 1px 2px rgb(12 20 35 / 0.04), 0 18px 44px -22px rgb(12 28 60 / 0.22);
  --button-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.04), 0 1px 2px rgb(0 50 120 / 0.2);
  --ease-sheet: cubic-bezier(0.32, 0.72, 0, 1);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-app);
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

html[data-sheet="open"] {
  overflow: hidden;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background: var(--bg);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.011em;
  font-feature-settings: "kern", "calt";
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
}

button,
summary {
  -webkit-tap-highlight-color: transparent;
}

button {
  min-height: 44px;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

a {
  color: inherit;
}

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

/* Type ------------------------------------------------------------------ */

.t-display,
.t-h1 {
  margin: 0;
  font-family: var(--font-editorial);
  font-weight: 400;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.t-display {
  font-size: clamp(2.8rem, 7vw, 6rem);
  line-height: 0.96;
}

.t-h1 {
  font-size: clamp(2.4rem, 4.6vw, 4rem);
  line-height: 1.02;
}

.t-lead {
  margin: 0;
  color: var(--ink-soft);
  font-size: clamp(1.0625rem, 1.4vw, 1.25rem);
  line-height: 1.5;
  letter-spacing: -0.014em;
  text-wrap: pretty;
}

.accent-italic {
  color: var(--accent);
  font-style: italic;
}

.dot {
  display: inline-block;
  flex: none;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--accent);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--ink);
  font-family: var(--font-editorial);
  font-size: 26px;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.fine {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.45;
}

.hero-note {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.badge {
  display: inline-flex;
  margin: 0 0 12px;
  padding: 6px 12px;
  border-radius: var(--r-sm);
  background: var(--tint);
  color: var(--tint-ink);
  font-size: 13px;
  font-weight: 600;
}

.form-message {
  min-height: 1.35em;
  margin: 8px 0 0;
  color: var(--danger);
  font-size: 13px;
  font-weight: 500;
}

.form-message:empty {
  min-height: 0;
  margin: 0;
}

.field-label {
  display: block;
  margin: 16px 0 6px;
  font-size: 13px;
  font-weight: 600;
}

mark.hl,
.scene-answer strong {
  padding: 0 0.08em;
  background: linear-gradient(transparent 58%, var(--highlight) 58%) no-repeat;
  background-size: 100% 100%;
  color: inherit;
  font-weight: 600;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* Pictogram: the rewinding clock of the landing page, still, pointing 25 s back. */
.picto {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
  line-height: 0;
  vertical-align: -0.12em;
}

.picto svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 0.03em 0.035em rgb(12 20 35 / 0.16)) drop-shadow(0 0.1em 0.14em rgb(12 20 35 / 0.12));
}

.picto-rewind {
  width: 0.85em;
  height: 0.9em;
  margin: 0 0.06em 0 0.1em;
  rotate: 5deg;
}

.picto-hand {
  transform: rotate(-150deg);
  transform-box: view-box;
  transform-origin: 50px 60px;
}

.picto-badge {
  position: absolute;
  top: -0.5em;
  right: -0.75em;
  display: grid;
  place-items: center;
  height: 1.62em;
  padding: 0 0.5em;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent), var(--accent-hover));
  box-shadow: 0 0 0 0.17em var(--surface), 0 0.3em 0.6em -0.15em color-mix(in srgb, var(--accent) 55%, transparent);
  color: var(--accent-ink);
  font-family: var(--font-app);
  font-size: 0.22em;
  font-style: normal;
  font-weight: 700;
  line-height: 1;
}

.picto-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* Buttons --------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: var(--r-md);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.012em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.3s var(--ease-soft), background-color var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease), opacity var(--dur-base) var(--ease);
}

.btn:has(.btn-icon) {
  padding-right: 7px;
}

.btn:active:not(:disabled) {
  transform: scale(0.975);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.btn-accent {
  background: var(--accent);
  box-shadow: var(--button-shadow);
  color: var(--accent-ink);
}

.btn-accent:hover:not(:disabled) {
  background: var(--accent-hover);
}

.btn-soft {
  background: var(--tint);
  color: var(--tint-ink);
}

.btn-soft:hover:not(:disabled) {
  background: color-mix(in srgb, var(--tint) 80%, var(--accent));
}

/* Secondary: a tonal fill, no ring. */
.btn-ghost {
  background: var(--fill);
  color: var(--ink);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--fill-hover);
}

.btn-small {
  min-height: 40px;
  padding-inline: 16px;
  border-radius: 12px;
  font-size: 14px;
}

.btn-large {
  min-height: 56px;
  padding-inline: 26px;
  border-radius: 16px;
  font-size: 17px;
}

.btn-large:has(.btn-icon) {
  padding-right: 9px;
}

.btn-icon {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgb(255 255 255 / 0.18);
  transition: transform var(--dur-base) var(--ease);
}

.btn:hover .btn-icon {
  transform: translateX(2px);
}

.btn-icon svg {
  display: block;
}

.text-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.text-button::after {
  position: absolute;
  right: 4px;
  bottom: 10px;
  left: 4px;
  height: 1px;
  background: currentColor;
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease);
}

.text-button:hover:not(:disabled)::after {
  transform: scaleX(1);
}

.text-button:hover:not(:disabled) {
  color: var(--ink);
}

.text-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--hair), 0 1px 2px rgb(12 20 35 / 0.04);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.012em;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.3s var(--ease-soft), opacity var(--dur-base) var(--ease);
}

.chip:active:not(:disabled) {
  transform: scale(0.97);
}

.chip:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

/* Fields ---------------------------------------------------------------- */

input,
select,
textarea {
  width: 100%;
  border: 0;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 16%, transparent);
  color: var(--ink);
  font-size: 16px;
  transition: box-shadow var(--dur-base) var(--ease);
}

input[type="text"],
input[type="email"],
input[type="password"] {
  min-height: 56px;
  padding: 0 18px;
  border-radius: 16px;
}

select {
  min-height: 48px;
  padding: 0 14px;
  border-radius: var(--r-md);
}

textarea {
  min-height: 108px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  line-height: 1.45;
  resize: vertical;
}

input:hover,
select:hover,
textarea:hover {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 30%, transparent);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent);
  outline: none;
}

.view:not([hidden]) {
  animation: view-in 0.7s var(--ease) both;
}

/* --------------------------------------------------------------------------
   Arrival: the landing page's story as four slides on one white card
   -------------------------------------------------------------------------- */

.onboarding {
  display: grid;
  min-height: calc(100vh - 2 * var(--card-gap));
  min-height: calc(100dvh - 2 * var(--card-gap));
  margin: var(--card-gap);
  padding: 0 var(--gutter) max(24px, env(safe-area-inset-bottom));
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--card-shadow);
}

.onboarding-top {
  display: flex;
  min-height: 72px;
  padding-top: env(safe-area-inset-top);
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
}

.legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 20px;
  font-size: 13px;
}

.legal-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink-soft);
  text-decoration: none;
}

.legal-nav a:hover {
  color: var(--ink);
}

.onboarding-track {
  display: grid;
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: clamp(16px, 4vh, 48px) 8px;
  align-items: center;
}

.onboarding-slide {
  display: grid;
  grid-area: 1 / 1;
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.08s, transform 0.9s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s;
}

.onboarding-slide[data-state="before"],
.onboarding-slide[data-state="after"] {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1), transform 0.9s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s 0.9s;
}

.onboarding-slide[data-state="before"] {
  transform: translateX(-64px);
}

.onboarding-slide[data-state="after"] {
  transform: translateX(64px);
}

.onboarding-slide:not([data-state]):not([data-slide="0"]) {
  visibility: hidden;
  opacity: 0;
}

.slide-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}

.slide-copy .t-lead {
  max-width: 30rem;
}

.onboarding-slide[data-state="current"] .slide-copy > * {
  animation: rise-in 0.8s var(--ease) both;
}

.onboarding-slide[data-state="current"] .slide-copy > :nth-child(2) { animation-delay: 0.06s; }
.onboarding-slide[data-state="current"] .slide-copy > :nth-child(3) { animation-delay: 0.12s; }
.onboarding-slide[data-state="current"] .slide-copy > :nth-child(n+4) { animation-delay: 0.18s; }

.onboarding-slide[data-state="current"] .scene,
.onboarding-slide[data-state="current"] .privacy-panel {
  animation: rise-in 0.9s var(--ease) 0.12s both;
}

@media (min-width: 960px) {
  .onboarding-slide {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  }

  .onboarding-slide .scene,
  .onboarding-slide .privacy-panel {
    justify-self: center;
  }
}

.onboarding-login {
  justify-items: center;
  text-align: center;
}

@media (min-width: 960px) {
  .onboarding-login {
    grid-template-columns: minmax(0, 640px);
    justify-content: center;
  }
}

.onboarding-login .slide-copy {
  align-items: center;
}

.login-form {
  width: min(460px, 100%);
  text-align: left;
}

.login-form .field-label {
  margin-top: 4px;
}

.password-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.onboarding-nav {
  display: flex;
  width: min(1120px, 100%);
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.onboarding-dots {
  display: flex;
  align-items: center;
}

.onboarding-dots button {
  width: 30px;
  min-height: 44px;
  padding: 0 3px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.onboarding-dots button::before {
  display: block;
  width: 100%;
  height: 4px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--ink) 14%, transparent);
  content: "";
  transition: background-color 0.4s var(--ease);
}

.onboarding-dots button[aria-current="step"]::before {
  background: var(--accent);
}

.onboarding-next {
  min-width: 156px;
}

/* The scenes of the landing page, playing in a loop while their slide is in front */

.scene {
  display: flex;
  width: min(540px, 100%);
  flex-direction: column;
  gap: 14px;
  padding: clamp(16px, 2.2vw, 22px);
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--card-shadow);
  text-align: left;
}

.scene-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 12px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.scene-subject {
  margin: 0;
  color: var(--ink);
  font-size: inherit;
  font-weight: 600;
}

.live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
}

.live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--switch-on);
}

.scene-teacher {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
}

.scene-speech {
  display: grid;
  min-height: 2.6em;
  margin: 0;
  font-size: clamp(1.0625rem, 1.8vw, 1.25rem);
  font-weight: 500;
  letter-spacing: -0.018em;
  line-height: 1.3;
}

.speech {
  grid-area: 1 / 1;
  opacity: 0;
}

.speech-1 {
  color: var(--accent-text);
}

.scene-buffer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border-radius: var(--r-lg);
  background: var(--bg);
  transition: box-shadow 0.5s var(--ease), transform 0.6s var(--ease);
}

.buffer-head,
.buffer-scale {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
}

.buffer-scale {
  font-weight: 400;
}

.buffer-clip {
  color: var(--accent-text);
}

.buffer-tape {
  position: relative;
  height: 56px;
  overflow: hidden;
  border-radius: var(--r-md);
  background: var(--fill);
  box-shadow: inset 0 0 0 1px var(--hair);
}

.scene-wave {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.buffer-question {
  position: absolute;
  top: 6px;
  right: 8px;
  bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64%;
  padding: 0 12px;
  overflow: hidden;
  border-radius: 10px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1.5px var(--accent);
  color: var(--tint-ink);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.scene-stage {
  display: grid;
  min-height: clamp(200px, 30vh, 250px);
}

.scene-stage > * {
  grid-area: 1 / 1;
}

.scene-result {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 18px;
  border-radius: var(--r-lg);
  background: var(--tint);
}

.scene-result p {
  margin: 0;
}

.scene-heard {
  font-size: 14px;
}

.scene-heard > span:first-child,
.scene-label {
  display: block;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
}

.scene-label {
  color: var(--tint-ink);
}

.scene-answer {
  font-size: clamp(1rem, 1.5vw, 1.0625rem);
  line-height: 1.5;
  letter-spacing: -0.012em;
}

.scene-meta {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.scene-button {
  position: relative;
  overflow: hidden;
  cursor: default;
}

.scene-ripple {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.35);
  opacity: 0;
  pointer-events: none;
}

.scene-listening .buffer-question {
  opacity: 0;
}

.scene-answering .scene-result {
  opacity: 0;
}

.scene-answering .buffer-question {
  transform: translateX(-34%);
}

.privacy-panel {
  display: flex;
  width: min(500px, 100%);
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: clamp(24px, 4vw, 40px) clamp(16px, 3vw, 32px);
  border-radius: var(--r-xl);
  background: var(--tint);
}

.switch-list {
  width: 100%;
  margin: 0;
  padding: 2px 18px;
  border-radius: var(--r-lg);
  background: var(--surface);
  list-style: none;
  text-align: left;
}

.switch-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
  font-size: 15px;
}

.switch-list li + li {
  border-top: 1px solid var(--hair);
}

.switch-state {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-soft);
  font-size: 13px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 28px;
  border-radius: 999px;
  background: var(--bg-deep);
}

.switch::after {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 1px 3px rgb(12 20 35 / 0.28);
  content: "";
}

.switch.is-on {
  background: var(--switch-on);
}

.switch.is-on::after {
  left: 20px;
}

.consent {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

/* --------------------------------------------------------------------------
   Shell
   -------------------------------------------------------------------------- */

.app-shell {
  min-height: 100vh;
  min-height: 100dvh;
}

.notice-bar {
  display: flex;
  min-height: 44px;
  margin: var(--card-gap) var(--card-gap) 0;
  padding: 6px 20px;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border-radius: var(--r-md);
  background: var(--warning);
  color: var(--bg);
  font-size: 14px;
  font-weight: 500;
  text-align: center;
}

.notice-bar .text-button {
  color: inherit;
}

.notice-offline {
  background: var(--ink-soft);
}

.app-header {
  display: flex;
  min-height: var(--header-h);
  padding: max(8px, env(safe-area-inset-top)) var(--gutter) 8px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.app-shell[data-mode="classroom"] .app-header {
  width: min(760px, 100% - 2 * var(--card-gap));
  margin-inline: auto;
  padding-inline: 4px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* --------------------------------------------------------------------------
   Setup
   -------------------------------------------------------------------------- */

.setup-view {
  display: grid;
  min-height: calc(100vh - var(--header-h) - var(--card-gap));
  min-height: calc(100dvh - var(--header-h) - var(--card-gap));
  margin: 0 var(--card-gap) var(--card-gap);
  padding: clamp(40px, 7vw, 96px) var(--gutter);
  place-items: center;
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--card-shadow);
}

.class-form {
  display: flex;
  width: min(820px, 100%);
  flex-direction: column;
  align-items: center;
  gap: 22px;
  text-align: center;
}

.class-form .t-display {
  max-width: 10em;
}

.setup-lead {
  max-width: 32rem;
}

.setup-field {
  display: flex;
  width: min(620px, 100%);
  gap: 10px;
  margin-top: 4px;
}

.setup-field input {
  flex: 1;
  min-height: 56px;
  font-size: 17px;
}

.start-class-button {
  flex: none;
}

.answer-clip-field {
  width: min(620px, 100%);
  text-align: left;
}

.answer-clip-field .field-label {
  margin-top: 0;
}

/* --------------------------------------------------------------------------
   Lesson
   -------------------------------------------------------------------------- */

.lesson {
  width: min(760px, 100% - 2 * var(--card-gap));
  margin: 0 auto;
  padding-bottom: max(32px, env(safe-area-inset-bottom));
}

.stage {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: clamp(18px, 2.6vw, 26px);
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--card-shadow);
}

.stage-bar {
  align-items: center;
}

.stage-bar .scene-subject {
  font-size: 20px;
  letter-spacing: -0.022em;
  overflow-wrap: anywhere;
}

.live {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 500;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--line-strong);
  transition: background-color var(--dur-base) var(--ease);
}

.status-dot[data-state="live"] {
  background: var(--switch-on);
  animation: signal-pulse 2.2s ease-out infinite;
}

.status-dot[data-state="busy"],
.status-dot[data-state="warming"] {
  background: var(--warning);
}

.status-dot[data-state="error"] {
  background: var(--danger);
}

/* The buffer: a live waveform of the last 25 seconds, drawn on a canvas. */
.wave {
  display: grid;
  gap: 6px;
}

.wave-head,
.wave-scale {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.wave-name {
  color: var(--ink);
  font-weight: 600;
}

.wave-count {
  font-weight: 500;
}

.wave-clip {
  display: none;
  color: var(--accent-text);
  font-weight: 600;
}

.wave-canvas {
  display: block;
  width: 100%;
  height: 88px;
  border-radius: var(--r-md);
  background: var(--fill);
  box-shadow: inset 0 0 0 1px var(--hair);
  transition: background-color 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

/* The tap: the buffer becomes the clip. */
.wave[data-tap="on"] .wave-canvas {
  background: color-mix(in srgb, var(--accent) 7%, transparent);
  box-shadow: inset 0 0 0 1.5px var(--accent);
}

.wave[data-tap="on"] .wave-clip {
  display: inline;
}

.wave[data-tap="on"] .wave-name {
  color: var(--accent-text);
}

.wave[data-tap="on"] .wave-count {
  display: none;
}

.result-empty {
  margin: -4px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  text-wrap: balance;
}

/* The result --------------------------------------------------------------- */

.result {
  gap: 12px;
  padding: 18px 20px 20px;
  scroll-margin-top: calc(var(--header-h) + 8px);
}

.result[data-enter="on"] {
  animation: chat-in 0.6s var(--ease) both;
}

.result .scene-heard {
  display: grid;
  gap: 2px;
  font-size: 15px;
  line-height: 1.45;
}

.result .scene-heard > span:first-child {
  font-size: 12px;
}

.heard-text {
  color: var(--ink);
  font-weight: 500;
  overflow-wrap: anywhere;
}

.result-kind {
  color: var(--ink-soft);
  font-size: 12px;
}

.result-kind:empty {
  display: none;
}

.answer-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  margin-top: 4px !important;
  padding-top: 12px;
  border-top: 1px solid color-mix(in srgb, var(--tint-ink) 14%, transparent);
}

.verdict {
  font-size: 12px;
  font-weight: 600;
}

.verdict[data-verdict="teilweise"] {
  color: var(--warning);
}

.verdict[data-verdict="nein"] {
  color: var(--danger);
}

.result-warning {
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
}

.result-answer {
  font-family: var(--font-app);
  font-size: 19px;
  line-height: 1.5;
  letter-spacing: -0.015em;
  overflow-wrap: anywhere;
}

.result-answer > :first-child {
  margin-top: 0;
}

.result-answer > :last-child {
  margin-bottom: 0;
}

.scene-answer p,
.scene-answer ul,
.scene-answer ol {
  margin: 0 0 0.6em;
}

.scene-answer ul,
.scene-answer ol {
  padding-left: 1.3em;
}

.scene-answer li {
  margin-bottom: 0.3em;
}

/* Formulas from Temml (see mathNode in app.js).  MathML Core draws them with
   the system's math font; a long one scrolls instead of widening the card. */
.scene-answer math {
  font-family: "STIX Two Math", "Cambria Math", math;
  font-size: 1.05em;
  font-style: normal;
  font-weight: normal;
  letter-spacing: normal;
}

.scene-answer .math-display {
  display: block;
  margin: 0.4em 0;
  overflow-x: auto;
}

.scene-answer math.tml-display {
  display: block;
}

.result[data-final="on"] .result-answer strong {
  animation: hl-sweep 0.9s var(--ease) 0.2s both;
}

.result .chips {
  margin-top: 4px;
}

.result[data-state="error"] .scene-heard,
.result[data-state="error"] .answer-head {
  display: none;
}

.result[data-state="error"] .result-answer {
  font-size: 16px;
}

.typing {
  display: inline-flex;
  gap: 5px;
  margin: 4px 0;
  padding: 13px 16px;
  border-radius: var(--r-md);
  background: var(--surface);
}

.typing > span:not(.visually-hidden) {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--tint-ink);
  opacity: 0.35;
  animation: typing-dot 0.9s var(--ease) infinite;
}

.typing > span:nth-child(3) {
  animation-delay: 0.15s;
}

.typing > span:nth-child(4) {
  animation-delay: 0.3s;
}

.correction-form .field-label {
  margin-top: 4px;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-top: 10px;
}

.result .scene-meta {
  margin-top: 0;
}

.result .scene-meta:empty {
  display: none;
}

/* Actions: they stay at the bottom of the screen while a long answer scrolls. */

.stage-actions {
  position: sticky;
  z-index: 5;
  bottom: max(10px, env(safe-area-inset-bottom));
  display: flex;
  margin-top: auto;
  padding-top: 4px;
  flex-direction: column;
  gap: 10px;
  background: var(--surface);
}

.stage-actions::before {
  position: absolute;
  right: 0;
  bottom: 100%;
  left: 0;
  height: 22px;
  background: linear-gradient(to top, var(--surface), transparent);
  content: "";
  pointer-events: none;
}

.clip-button {
  position: relative;
  width: 100%;
  min-height: 60px;
  overflow: hidden;
  font-size: 18px;
}

.clip-button:disabled {
  background: var(--fill);
  box-shadow: none;
  color: var(--ink-faint);
  opacity: 1;
}

.clip-button[data-tap="on"] .scene-ripple {
  animation: scene-ripple 0.9s var(--ease) both;
}

.action-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.action-pair .btn {
  min-height: 48px;
  padding-inline: 14px;
}

.mic-button {
  min-height: 52px;
}

/* Turbo: the fast mode as a switch above the clip button. A tonal row like the other
   secondary buttons; the bolt turns blue when it is on. */
.turbo-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 6px 16px 6px 10px;
  border: 0;
  border-radius: var(--r-md);
  background: var(--fill);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color var(--dur-base) var(--ease);
}

.turbo-toggle:hover:not(:disabled) {
  background: var(--bg-deep);
}

.turbo-toggle:disabled {
  cursor: default;
  opacity: 0.6;
}

.turbo-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink-soft);
  transition: background-color var(--dur-base) var(--ease), color var(--dur-base) var(--ease);
}

.turbo-toggle[aria-checked="true"] .turbo-icon {
  background: var(--accent);
  color: var(--accent-ink);
}

.turbo-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.turbo-name {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}

.turbo-hint {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.35;
}

.turbo-toggle .switch {
  flex: none;
  background: var(--line-strong);
}

.turbo-toggle[aria-checked="true"] .switch {
  background: var(--switch-on);
}

.turbo-toggle[aria-checked="true"] .switch::after {
  left: 20px;
}

.clip-status {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}

.clip-status:empty {
  display: none;
}

.cancel-button {
  align-self: center;
}

.retry-controls {
  padding: 12px 16px;
  border-radius: var(--r-md);
  background: var(--fill);
  animation: chat-in 0.5s var(--ease) both;
}

.retry-controls .fine {
  margin: 0;
}

.retry-controls .action-row {
  margin-top: 6px;
}

/* Earlier results: rows like the FAQ of the landing page ----------------- */

.history {
  margin-top: clamp(28px, 5vw, 48px);
}

.history:has(.round-history:empty) {
  display: none;
}

.history-title {
  margin: 0 4px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}

.faq-list {
  display: flex;
  margin: 0;
  padding: 0;
  flex-direction: column;
  gap: 8px;
  list-style: none;
}

.faq-item {
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--hair);
}

.faq-item summary {
  display: flex;
  min-height: 56px;
  padding: 12px 18px 12px 20px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.012em;
  list-style: none;
  cursor: pointer;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

/* A drawn chevron instead of a plus in a circle. */
.faq-item summary::after {
  flex: none;
  width: 8px;
  height: 8px;
  margin: 0 4px 3px auto;
  border-right: 2px solid var(--ink-faint);
  border-bottom: 2px solid var(--ink-faint);
  content: "";
  transform: rotate(45deg);
  transition: transform var(--dur-base) var(--ease);
}

.faq-item[open] summary::after {
  margin-bottom: -3px;
  transform: rotate(225deg);
}

.faq-body {
  padding: 0 20px 18px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.55;
}

.faq-item[open] .faq-body {
  animation: chat-in 0.45s var(--ease) both;
}

.faq-body > p:first-child {
  margin-top: 0;
}

.faq-body p {
  margin: 0 0 10px;
}

.faq-body .field-label {
  color: var(--ink);
}

.past-kind {
  flex: none;
  color: var(--tint-ink);
  font-size: 12px;
  font-weight: 600;
}

.past-text {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.past-body {
  color: var(--ink);
}

.past-body .scene-label {
  margin: 0 0 6px;
}

.past-body .scene-answer {
  font-family: var(--font-app);
  font-size: 16px;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   Menu sheet
   -------------------------------------------------------------------------- */

.sheet-backdrop {
  position: fixed;
  z-index: 40;
  inset: 0;
  background: color-mix(in srgb, var(--ink) 28%, transparent);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}

.sheet-backdrop[data-open="true"] {
  opacity: 1;
}

.sheet {
  position: fixed;
  z-index: 41;
  top: var(--card-gap);
  right: var(--card-gap);
  bottom: var(--card-gap);
  display: flex;
  width: min(440px, 100% - 2 * var(--card-gap));
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--r-xl);
  background: var(--bg);
  box-shadow: 0 0 0 1px rgb(12 20 35 / 0.06), 0 30px 80px -20px rgb(12 28 60 / 0.4);
  opacity: 0;
  transform: translateX(32px);
  transition: transform 0.5s var(--ease-sheet), opacity 0.3s var(--ease);
}

.sheet[data-open="true"] {
  opacity: 1;
  transform: none;
}

.sheet-head {
  display: flex;
  padding: 18px 18px 6px 22px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.sheet-head h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.sheet-body {
  padding: 0 14px max(20px, env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
}

.sheet-title {
  margin: 22px 8px 8px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
}

.sheet-body > .sheet-title:first-child {
  margin-top: 8px;
}

.sheet .switch-list {
  margin-bottom: 8px;
  box-shadow: 0 0 0 1px var(--hair);
}

.sheet-action {
  margin: 10px 0 0;
}

.material-count {
  margin: 4px 0 0;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.material-file {
  min-height: 48px;
  padding: 6px 8px;
  border-radius: var(--r-md);
  color: var(--ink-soft);
  font-size: 14px;
}

.material-file::file-selector-button {
  min-height: 34px;
  margin-right: 12px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: var(--fill);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.material-preview {
  display: block;
  max-width: 100%;
  max-height: 180px;
  margin-top: 12px;
  border-radius: 12px;
  object-fit: contain;
}

.material-name {
  min-width: 0;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.photo-hint {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--tint);
  color: var(--ink);
  font-size: 14px;
}

.photo-hint p {
  margin: 0;
}

.photo-hint .text-button {
  padding-left: 0;
  color: var(--tint-ink);
  font-weight: 600;
}

.memory-list {
  margin: 8px 0 0;
  padding-left: 1.2em;
  font-size: 14px;
}

.memory-list li {
  margin-bottom: 6px;
}

.sheet-end {
  display: flex;
  margin-top: 24px;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.end-class-button {
  color: var(--danger);
}

/* --------------------------------------------------------------------------
   Accounts: sign in, sign up, the account in the menu, the quota note
   -------------------------------------------------------------------------- */

.auth {
  width: min(460px, 100%);
  text-align: left;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: var(--fill);
}

.auth-tab {
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--dur-base) var(--ease), color var(--dur-base) var(--ease);
}

.auth-tab[aria-selected="true"] {
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--hair), 0 2px 8px -4px rgba(12, 20, 35, 0.2);
  color: var(--ink);
}

.auth-tab:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.auth-submit {
  width: 100%;
  margin-top: 18px;
}

.field-optional {
  color: var(--ink-soft);
  font-weight: 400;
}

#inviteInput {
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.check {
  display: flex;
  margin-top: 16px;
  gap: 12px;
  align-items: flex-start;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.45;
  cursor: pointer;
}

.check input[type="checkbox"] {
  flex: none;
  width: 22px;
  min-height: 22px;
  height: 22px;
  margin: 0;
  box-shadow: none;
  accent-color: var(--accent);
}

.check a {
  color: var(--accent-text);
}

.invite-note {
  width: min(460px, 100%);
  margin: 0 0 16px;
  padding: 12px 16px;
  border-radius: var(--r-md);
  background: var(--tint);
  color: var(--tint-ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.auth-google {
  margin-top: 6px;
}

.auth-divider {
  display: flex;
  margin: 18px 0 14px;
  align-items: center;
  gap: 14px;
  color: var(--ink-soft);
  font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
  flex: 1;
  height: 1px;
  background: var(--line);
  content: "";
}

.google-button {
  width: 100%;
  gap: 10px;
  text-decoration: none;
}

.auth-code {
  width: min(460px, 100%);
  margin-top: 22px;
  text-align: left;
}

.auth-code > summary {
  display: inline-block;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.auth-code[open] > summary {
  margin-bottom: 4px;
}

.account-clips {
  margin: 12px 0 0;
  color: var(--ink);
  font-size: 20px;
  font-weight: 600;
}

.invite-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}

.invite-link-row input {
  min-height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 14px;
}

.danger-text {
  color: var(--danger);
}

.delete-panel {
  margin-top: 8px;
}

.quota-note {
  margin: 0;
  padding: 10px 14px;
  border-radius: var(--r-md);
  background: var(--tint);
  color: var(--tint-ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  text-align: center;
}

.sheet[data-context="account"] .lesson-only {
  display: none;
}

/* --------------------------------------------------------------------------
   Motion
   -------------------------------------------------------------------------- */

@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(1.2rem);
  }
}

@keyframes chat-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes typing-dot {
  0%,
  60%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }

  30% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

@keyframes hl-sweep {
  from {
    background-size: 0% 100%;
  }
}

@keyframes scene-ripple {
  from {
    opacity: 0.9;
    transform: scale(0.3);
  }

  to {
    opacity: 0;
    transform: scale(12);
  }
}

@keyframes signal-pulse {
  0%, 55%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--switch-on) 0%, transparent); }
  12% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--switch-on) 24%, transparent); }
}

@media (prefers-reduced-motion: no-preference) {
  .onboarding-slide[data-state="current"] .scene-listening .speech-0 { animation: speech-0 7s var(--ease) infinite; }
  .onboarding-slide[data-state="current"] .scene-listening .speech-1 { animation: speech-1 7s var(--ease) infinite; }
  .onboarding-slide[data-state="current"] .scene-listening .speech-2 { animation: speech-2 7s var(--ease) infinite; }
  .onboarding-slide[data-state="current"] .scene-listening .buffer-question { animation: question-fall 7s var(--ease) infinite; }

  .onboarding-slide[data-state="current"] .scene-answering .scene-buffer { animation: answer-buffer 6.5s var(--ease) infinite; }
  .onboarding-slide[data-state="current"] .scene-answering .scene-result { animation: answer-result 6.5s var(--ease) infinite; }
  .onboarding-slide[data-state="current"] .scene-answering .scene-button { animation: answer-press 6.5s var(--ease) infinite; }
  .onboarding-slide[data-state="current"] .scene-answering .scene-ripple { animation: answer-ripple 6.5s var(--ease) infinite; }
  .onboarding-slide[data-state="current"] .scene-answering .hl { animation: answer-hl 6.5s var(--ease) infinite; }

  .onboarding-slide[data-state="current"] .switch.is-on { animation: switch-on 0.5s var(--ease) 0.5s both; }
  .onboarding-slide[data-state="current"] .switch.is-on::after { animation: knob-on 0.5s var(--ease-soft) 0.5s both; }
  .onboarding-slide[data-state="current"] li + li .switch.is-on,
  .onboarding-slide[data-state="current"] li + li .switch.is-on::after { animation-delay: 0.7s; }
}

@keyframes speech-0 {
  0% { opacity: 0; transform: translateY(8px); }
  5%, 26% { opacity: 1; transform: none; }
  32%, 100% { opacity: 0; transform: translateY(-6px); }
}

@keyframes speech-1 {
  0%, 30% { opacity: 0; transform: translateY(8px); }
  36%, 58% { opacity: 1; transform: none; }
  64%, 100% { opacity: 0; transform: translateY(-6px); }
}

@keyframes speech-2 {
  0%, 62% { opacity: 0; transform: translateY(8px); }
  68%, 94% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: translateY(-6px); }
}

@keyframes question-fall {
  0%, 33% { opacity: 0; transform: translateX(110%); }
  42%, 62% { opacity: 1; transform: none; box-shadow: inset 0 0 0 1.5px var(--accent); }
  74%, 94% { opacity: 1; transform: translateX(-34%); box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 0 5px color-mix(in srgb, var(--accent) 20%, transparent); }
  100% { opacity: 0; transform: translateX(-34%); }
}

@keyframes answer-buffer {
  0% { opacity: 1; transform: none; box-shadow: none; }
  8%, 30% { opacity: 1; transform: translateY(-4px); box-shadow: 0 0 0 1.5px var(--accent), var(--card-shadow); }
  40%, 92% { opacity: 0; transform: translateY(-12px) scale(0.98); box-shadow: none; }
  100% { opacity: 1; transform: none; box-shadow: none; }
}

@keyframes answer-result {
  0%, 36% { opacity: 0; transform: translateY(24px); }
  46%, 90% { opacity: 1; transform: none; }
  98%, 100% { opacity: 0; transform: translateY(8px); }
}

@keyframes answer-press {
  0%, 12%, 26%, 100% { transform: none; }
  18% { transform: scale(0.975); }
}

@keyframes answer-ripple {
  0%, 15% { opacity: 0; transform: scale(0.3); }
  17% { opacity: 0.9; transform: scale(0.3); }
  40%, 100% { opacity: 0; transform: scale(12); }
}

@keyframes answer-hl {
  0%, 50% { background-size: 0% 100%; }
  64%, 100% { background-size: 100% 100%; }
}

@keyframes switch-on {
  from { background: var(--bg-deep); }
}

@keyframes knob-on {
  from { left: 2px; }
}

/* --------------------------------------------------------------------------
   Responsive: Split Screen and phones reflow instead of hiding
   -------------------------------------------------------------------------- */

@media (max-width: 759px) {
  .sheet {
    top: auto;
    left: var(--card-gap);
    width: auto;
    max-height: calc(100dvh - 2 * var(--card-gap));
    transform: translateY(40px);
  }
}

@media (max-width: 959px) {
  .onboarding-slide {
    align-content: center;
  }

  .onboarding-slide .scene,
  .onboarding-slide .privacy-panel {
    width: 100%;
  }
}

@media (max-width: 599px) {
  .wordmark {
    font-size: 24px;
  }

  .legal-nav {
    gap: 0 14px;
  }

  .t-h1 {
    font-size: clamp(2.1rem, 9.5vw, 2.6rem);
  }

  .scene-stage {
    min-height: 220px;
  }

  .password-row {
    grid-template-columns: 1fr;
  }

  .password-row .btn,
  .onboarding-next {
    width: 100%;
  }

  .onboarding-nav {
    flex-direction: column-reverse;
    gap: 6px;
  }

  .setup-field {
    flex-direction: column;
  }

  .buffer-question {
    width: 72%;
    padding: 0 8px;
    font-size: 12px;
  }

  .stage {
    padding: 16px;
  }

  .wave-canvas {
    height: 72px;
  }

  .result {
    padding: 16px;
  }

  .result-answer {
    font-size: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .scene-listening .speech-1,
  .scene-listening .buffer-question {
    opacity: 1;
    transform: none;
  }

  .scene-answering .scene-buffer {
    opacity: 0;
  }

  .scene-answering .scene-result {
    opacity: 1;
  }
}
