:root {
  /* АМ palette */
  --bg0: #1c2838;
  --bg1: #1e293b;
  --ink: #e8eef5;
  --muted: #94a3b8;
  --accent: #2ecc71;
  --accent-deep: #27ae60;
  --line: rgba(232, 238, 245, 0.12);
  --danger: #e07a5f;
  --listen: #2ecc71;
  --speak: #2ecc71;
  --trainer: #27ae60;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --font-body: "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
/* display:flex/grid on panels must not beat the hidden attribute */
[hidden] {
  display: none !important;
}
* {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
*::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
html, body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  color: var(--ink);
  font-family: var(--font-body);
  background:
    radial-gradient(1100px 640px at 8% -8%, rgba(46, 204, 113, 0.12) 0%, transparent 52%),
    radial-gradient(900px 520px at 100% 8%, rgba(39, 174, 96, 0.1) 0%, transparent 48%),
    radial-gradient(700px 400px at 50% 110%, rgba(28, 40, 56, 0.9) 0%, transparent 55%),
    linear-gradient(165deg, var(--bg0), var(--bg1));
  background-attachment: fixed;
}
@supports not (min-height: 100dvh) {
  html, body { min-height: 100%; }
}

.shell {
  width: min(680px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2.75rem 0 3.25rem;
  padding-left: env(safe-area-inset-left, 0);
  padding-right: env(safe-area-inset-right, 0);
  padding-bottom: calc(3.25rem + env(safe-area-inset-bottom, 0px));
  transition: width 0.25s ease;
}
.shell.is-session {
  width: min(920px, calc(100% - 1.25rem));
  padding-top: 1rem;
}
.shell.is-session .brand { margin-bottom: 0.25rem; }
.shell.is-session .tagline { margin-bottom: 0.75rem; font-size: 0.9rem; }
.shell.is-gate,
.shell.is-lobby,
.shell.is-report {
  min-height: calc(100vh - 1rem);
  min-height: calc(100dvh - 1rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 2rem;
  padding-bottom: 2.5rem;
}
.meta-compact {
  margin-bottom: 0.6rem;
  font-size: 0.75rem;
}

.brand {
  text-align: center;
}
.brand-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.75rem);
  letter-spacing: 0.01em;
  line-height: 1.1;
  text-align: center;
  animation: brand-in 0.7s ease both;
}
.tagline {
  margin: 0.45rem 0 1.75rem;
  color: var(--muted);
  font-size: 1.02rem;
  text-align: center;
  animation: brand-in 0.7s ease 0.08s both;
}
@keyframes brand-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.panel {
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
}
.panel h1 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.45rem;
}
.lede { color: var(--muted); margin: 0 0 1.25rem; line-height: 1.45; }
.hint { color: var(--muted); font-size: 0.85rem; margin: 0.75rem 0 0; }

/* —— Home: two roles —— */
.shell.is-gate .brand {
  display: none;
}
.gate {
  border-top: 0;
  padding-top: 0;
  animation: brand-in 0.75s ease 0.12s both;
}
.access-form {
  display: grid;
  gap: 0.75rem;
  max-width: 22rem;
  margin: 0 auto;
  text-align: center;
}
.access-input {
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  letter-spacing: 0.06em;
}
.access-form .cta-wide {
  margin-top: 0.15rem;
  width: 100%;
}
.role-paths {
  display: grid;
  gap: 0.85rem;
}
.role-btn {
  display: grid;
  gap: 0.35rem;
  width: 100%;
  text-align: left;
  text-decoration: none;
  color: inherit;
  appearance: none;
  cursor: pointer;
  border-radius: 14px;
  padding: 1.15rem 1.25rem 1.25rem;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(46, 204, 113, 0.08), transparent 42%),
    rgba(0, 0, 0, 0.22);
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    background 0.22s ease,
    box-shadow 0.22s ease;
}
.role-btn:hover,
.role-btn:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(46, 204, 113, 0.45);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.28);
  outline: none;
}
.role-btn:active { transform: translateY(0); }
.role-seller:hover,
.role-seller:focus-visible {
  background:
    linear-gradient(135deg, rgba(46, 204, 113, 0.16), transparent 50%),
    rgba(0, 0, 0, 0.28);
}
.role-trainer {
  background:
    linear-gradient(135deg, rgba(39, 174, 96, 0.1), transparent 42%),
    rgba(0, 0, 0, 0.22);
}
.role-trainer:hover,
.role-trainer:focus-visible {
  border-color: rgba(39, 174, 96, 0.5);
  background:
    linear-gradient(135deg, rgba(39, 174, 96, 0.18), transparent 50%),
    rgba(0, 0, 0, 0.28);
}
.role-eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.role-title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.15;
}
.role-seller .role-title { color: var(--accent); }
.role-trainer .role-title { color: var(--trainer); }
.role-desc {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
  max-width: 34rem;
}
.gate-foot { margin-top: 1.5rem; }

.text-back {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.88rem;
  padding: 0;
  margin: 0 0 1rem;
  cursor: pointer;
}
.text-back:hover { color: var(--ink); }

.lobby .cta-wide {
  display: block;
  width: 100%;
  max-width: 22rem;
  margin: 1.15rem auto 0;
  text-align: center;
}
.report-actions {
  margin-top: 1.35rem;
  justify-content: center;
}

.field-label {
  display: block;
  margin: 0 0 0.4rem;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
}
.field-select,
.field-input,
.access-input {
  font-size: 16px; /* avoid iOS zoom-on-focus */
}
.field-select {
  display: block;
  width: 100%;
  max-width: 28rem;
  appearance: none;
  margin: 0 0 0.35rem;
  padding: 0.7rem 2.2rem 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%) calc(100% - 1.15rem) calc(50% - 0.18rem) / 0.4rem 0.4rem no-repeat,
    linear-gradient(135deg, var(--muted) 50%, transparent 50%) calc(100% - 0.85rem) calc(50% - 0.18rem) / 0.4rem 0.4rem no-repeat,
    rgba(0, 0, 0, 0.28);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  line-height: 1.3;
  cursor: pointer;
  min-height: 2.75rem;
}
.field-select:focus {
  outline: 2px solid rgba(46, 204, 113, 0.55);
  outline-offset: 1px;
}
.field-select option {
  background: #1e293b;
  color: var(--ink);
}
.lobby-minimal {
  width: 100%;
  max-width: 22rem;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  border-top: 0;
  padding-top: 0.5rem;
}
.lobby-minimal .text-back {
  display: inline-block;
  margin-bottom: 1.35rem;
}
.lobby-minimal .field-label {
  text-align: center;
}
.lobby-minimal .field-select,
.lobby-minimal .field-input {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  text-align-last: center;
  box-sizing: border-box;
  width: 100%;
}
.lobby-minimal .demo-code-wrap {
  margin-bottom: 0.85rem;
}
.lobby-minimal .hint,
.lobby-minimal .error {
  text-align: center;
}
.lobby-minimal .warm-progress {
  max-width: 22rem;
  margin-left: auto;
  margin-right: auto;
}
.shell.is-lobby .brand .tagline {
  display: none;
}
.gender-toggle {
  display: inline-flex;
  gap: 0.4rem;
  margin: 0 0 1.1rem;
  max-width: 28rem;
}
.warm-progress {
  margin: 0.85rem 0 0;
  max-width: 28rem;
}
.warm-progress[hidden] {
  display: none !important;
}
.warm-progress-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.warm-progress-track {
  flex: 1 1 auto;
  min-width: 0;
  height: 0.45rem;
  border-radius: 999px;
  background: rgba(232, 238, 245, 0.12);
  overflow: hidden;
}
.warm-progress-bar {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-deep));
  transition: width 0.2s ease;
}
.warm-pct {
  flex: 0 0 auto;
  min-width: 2.6rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: 0.85rem;
  color: var(--muted);
}
.shell.is-session .brand .tagline {
  display: none;
}
.session-minimal .avatar-name:empty {
  display: none;
}
.gender-btn {
  appearance: none;
  flex: 1 1 0;
  min-width: 7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.28);
  color: var(--muted);
  padding: 0.55rem 0.85rem;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}
.gender-btn:hover {
  border-color: rgba(232, 238, 245, 0.28);
  color: var(--ink);
}
.gender-btn[aria-pressed="true"] {
  border-color: rgba(46, 204, 113, 0.45);
  background: rgba(46, 204, 113, 0.16);
  color: var(--accent);
  font-weight: 600;
}
.lobby-minimal #start.cta {
  margin-top: 1.15rem;
  margin-left: auto;
  margin-right: auto;
}

.cta, .ghost {
  appearance: none;
  border-radius: 6px;
  padding: 0.75rem 1.2rem;
  font: inherit;
  cursor: pointer;
}
.cta {
  border: 0;
  background: linear-gradient(180deg, var(--accent), var(--accent-deep));
  color: #0b1a12;
  font-weight: 600;
}
.cta:disabled, .ghost:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.ghost {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
}
.actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.voice-actions {
  margin-top: auto;
  padding-top: 1.75rem;
  padding-bottom: 0.35rem;
  justify-content: center;
}
.session-minimal {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 5.5rem);
  min-height: calc(100dvh - 5.5rem);
}
.end-training {
  min-width: min(20rem, 92vw);
  padding: 0.85rem 1.35rem;
  font-size: 0.95rem;
}

.meta {
  display: flex;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.8rem;
  margin-bottom: 1.5rem;
  justify-content: center;
}

.voice-stage-photo {
  display: grid;
  justify-items: center;
  gap: 0.55rem;
  min-height: 52vh;
  padding: 0.25rem 0 0.75rem;
}

.avatar-photo {
  --mouth: 0;
  position: relative;
  display: grid;
  justify-items: center;
  gap: 0.45rem;
  width: 100%;
}
.avatar-frame {
  position: relative;
  height: min(52vh, 680px);
  width: min(92vw, calc(52vh * 0.75), 510px);
  aspect-ratio: 3 / 4;
  border-radius: 18px;
  overflow: hidden;
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(232, 238, 245, 0.12);
  background: #1c2838;
}
.avatar-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.35s ease;
  background: #1c2838;
}
.avatar-video.is-active {
  opacity: 1;
}
.avatar-vignette {
  pointer-events: none;
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 35%, transparent 45%, rgba(0, 0, 0, 0.22) 100%);
  z-index: 2;
}
.avatar-frame.is-prelude-empty .avatar-video.is-active {
  filter: saturate(0.45) brightness(0.62) contrast(0.95);
}
.prelude-countdown {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 0.35rem;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(12, 18, 28, 0.22), rgba(12, 18, 28, 0.62) 72%);
}
.prelude-countdown-num {
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 14vw, 5rem);
  font-weight: 700;
  line-height: 1;
  color: #f4fff8;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.55);
  animation: prelude-tick 1s ease-out;
}
.prelude-countdown-label {
  font-family: var(--font-display);
  font-size: clamp(1rem, 3.5vw, 1.25rem);
  color: rgba(232, 238, 245, 0.9);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}
@keyframes prelude-tick {
  from { transform: scale(1.18); opacity: 0.35; }
  to { transform: scale(1); opacity: 1; }
}
.avatar-name.is-name-hidden {
  opacity: 0.72;
  letter-spacing: 0.04em;
}
.avatar-name.is-name-revealed {
  opacity: 1;
}
.avatar-name {
  margin: 0 0 0.15rem;
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 4.5vw, 2.15rem);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.02em;
  line-height: 1.15;
  text-align: center;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}

.voice-stage[data-state="guest"] .avatar-frame {
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(46, 204, 113, 0.28);
}
.voice-stage[data-state="listen"] .avatar-frame {
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(126, 184, 162, 0.32);
}
.voice-stage[data-state="done"] .avatar-photo {
  opacity: 0.82;
}

@media (max-height: 720px) {
  .avatar-frame { height: min(48vh, 520px); }
}
@media (max-width: 520px) {
  .avatar-frame {
    height: auto;
    width: min(92vw, 420px);
  }
}

.practice-banner {
  margin: 0 0 0.85rem;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(46, 204, 113, 0.35);
  background: linear-gradient(
    135deg,
    rgba(46, 204, 113, 0.16),
    rgba(20, 32, 44, 0.55)
  );
  color: #dff8e9;
  font-family: var(--font-display);
  font-size: 0.95rem;
  line-height: 1.35;
  text-align: center;
}

.voice-status {
  margin: 0.45rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 3.4vw, 1.25rem);
  font-weight: 600;
  text-align: center;
  color: var(--ink);
  line-height: 1.3;
  max-width: 22rem;
}
.voice-status.is-listen-cue {
  color: #b8f5d0;
  text-shadow: 0 0 18px rgba(46, 204, 113, 0.35);
}
.voice-status.is-think-cue {
  color: var(--muted);
  font-weight: 500;
}
.voice-stage .hint {
  margin-top: 0.35rem;
  text-align: center;
  max-width: 22rem;
}
/* Wide listen pill over avatar — no extra page height / scroll */
.listen-orb {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  display: grid;
  place-items: center;
  width: min(92%, 22rem);
  margin: 0;
  pointer-events: none;
}
.listen-orb-ring,
.listen-orb-core {
  grid-area: 1 / 1;
  border-radius: 999px;
}
.listen-orb-ring {
  width: calc(100% + 1.35rem);
  height: calc(100% + 1.1rem);
  border: 1px solid rgba(46, 204, 113, 0.4);
  background: radial-gradient(
    ellipse at center,
    rgba(46, 204, 113, 0.18) 0%,
    rgba(46, 204, 113, 0.04) 52%,
    transparent 72%
  );
  animation: listen-pulse 2.2s ease-out infinite;
}
.listen-orb-ring-delay {
  animation-delay: 1.1s;
}
.listen-orb-core {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  width: 100%;
  min-height: 3.35rem;
  padding: 0.85rem 1.45rem;
  background:
    linear-gradient(135deg, rgba(62, 214, 130, 0.55), rgba(30, 120, 78, 0.72) 48%, rgba(18, 36, 48, 0.94)),
    rgba(16, 28, 40, 0.92);
  box-shadow:
    0 0 0 1px rgba(180, 255, 210, 0.28),
    0 10px 28px rgba(0, 0, 0, 0.45),
    0 0 36px rgba(46, 204, 113, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: listen-breathe 2.4s ease-in-out infinite;
}
.listen-orb-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 0.22rem;
  height: 1.15rem;
  flex: 0 0 auto;
}
.listen-orb-bars i {
  display: block;
  width: 0.28rem;
  height: 40%;
  border-radius: 99px;
  background: rgba(232, 238, 245, 0.95);
  box-shadow: 0 0 8px rgba(46, 204, 113, 0.55);
  animation: listen-bar 0.9s ease-in-out infinite;
}
.listen-orb-bars i:nth-child(1) { animation-delay: 0s; height: 45%; }
.listen-orb-bars i:nth-child(2) { animation-delay: 0.15s; height: 85%; }
.listen-orb-bars i:nth-child(3) { animation-delay: 0.3s; height: 60%; }
.listen-orb-bars i:nth-child(4) { animation-delay: 0.45s; height: 95%; }
.listen-orb-label {
  max-width: none;
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(1.12rem, 3.6vw, 1.45rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
  color: #f4fff8;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
}
@keyframes listen-pulse {
  0% { transform: scale(0.92); opacity: 0.65; }
  70% { transform: scale(1.06); opacity: 0; }
  100% { transform: scale(1.06); opacity: 0; }
}
@keyframes listen-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.025); }
}
@keyframes listen-bar {
  0%, 100% { transform: scaleY(0.45); opacity: 0.75; }
  50% { transform: scaleY(1); opacity: 1; }
}
@media (max-width: 420px) {
  .listen-orb {
    width: min(94%, 19rem);
    bottom: 0.75rem;
  }
  .listen-orb-label {
    white-space: normal;
    font-size: clamp(1.02rem, 4.2vw, 1.22rem);
  }
  .listen-orb-core {
    min-height: 3.1rem;
    padding: 0.75rem 1.1rem;
    gap: 0.55rem;
  }
}
@media (max-height: 720px) {
  .listen-orb {
    bottom: 0.7rem;
    width: min(90%, 18.5rem);
  }
  .listen-orb-core {
    min-height: 2.9rem;
    padding: 0.65rem 1.15rem;
  }
  .listen-orb-label {
    font-size: clamp(1rem, 3.2vw, 1.22rem);
  }
}
@media (prefers-reduced-motion: reduce) {
  .listen-orb-ring,
  .listen-orb-core,
  .listen-orb-bars i { animation: none; }
}
.mic {
  min-width: 9rem;
}
.mic.hot {
  background: var(--listen);
}

.error { color: var(--danger); text-align: center; }
pre {
  white-space: pre-wrap;
  word-break: break-word;
  background: rgba(0,0,0,0.28);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1rem;
  font-size: 0.85rem;
}

.report-panel {
  width: 100%;
  max-width: 22rem;
  margin-left: auto;
  margin-right: auto;
  border-top: 0;
  padding-top: 0.5rem;
  text-align: center;
}
.report-panel .cta { margin-top: 0; }
.shell.is-report .brand .tagline {
  display: none;
}
.report-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
}
.report-view { display: grid; gap: 1.1rem; margin-top: 0.85rem; justify-items: center; text-align: center; }
.report-hero {
  display: grid;
  gap: 0.45rem;
  justify-items: center;
  width: 100%;
  max-width: 22rem;
  margin-left: auto;
  margin-right: auto;
  padding-bottom: 0.95rem;
  border-bottom: 1px solid var(--line);
}
.report-mood {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
}
.report-mood[data-mood="доволен"],
.report-mood[data-mood="воодушевлён"] { color: var(--listen); }
.report-mood[data-mood="нейтрален"] { color: var(--ink); }
.report-mood[data-mood="скептичен"] { color: var(--accent); }
.report-mood[data-mood="разочарован"],
.report-mood[data-mood="раздражён"] { color: var(--danger); }
.report-score {
  margin: 0.15rem 0 0;
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink);
  line-height: 1;
}
.report-score-max {
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--muted);
}
.report-score-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}
.report-verdict {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
}
.report-verdict[data-v="хорошо"] { color: var(--listen); }
.report-verdict[data-v="частично"] { color: var(--accent); }
.report-verdict[data-v="слабо"],
.report-verdict[data-v="не начата"] { color: var(--danger); }
.report-sub { margin: 0; color: var(--muted); font-size: 0.92rem; }
.lobby .field-label { margin-top: 0.95rem; }
.lobby .field-label:first-of-type { margin-top: 0; }
.lobby .field-select { margin-bottom: 0.15rem; }
.report-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.85rem;
}
.report-stats strong { color: var(--ink); font-weight: 600; }
.report-block h2 {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
}
.report-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.4rem;
}
.report-list li {
  display: grid;
  grid-template-columns: 1.4rem 1fr;
  gap: 0.45rem;
  align-items: start;
  color: var(--ink);
  font-size: 0.92rem;
}
.report-mark { line-height: 1.35; }
.report-mark.ok { color: var(--listen); }
.report-mark.no { color: var(--danger); }
.report-mark.na { color: var(--muted); }
.transcript {
  display: grid;
  gap: 0.65rem;
  margin: 0;
}
.transcript-item {
  margin: 0;
  padding: 0.65rem 0.75rem;
  border-left: 3px solid var(--line);
  background: rgba(0, 0, 0, 0.18);
  border-radius: 0 6px 6px 0;
}
.transcript-item[data-role="guest"] { border-left-color: var(--accent); }
.transcript-item[data-role="seller"] { border-left-color: var(--listen); }
.transcript-who {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.transcript-text { margin: 0; white-space: pre-wrap; }
.report-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}
.report-raw {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.85rem;
}
.report-raw summary { cursor: pointer; user-select: none; }
.report-raw pre { margin-top: 0.5rem; max-height: 240px; overflow: auto; }

/* Session finale: leave video done → banner + mini confetti / soft ash */
.finale {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: radial-gradient(
    ellipse at 50% 35%,
    rgba(8, 14, 22, 0.15),
    rgba(8, 14, 22, 0.72) 55%,
    rgba(8, 14, 22, 0.88)
  );
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease;
}
.finale.is-on {
  opacity: 1;
  pointer-events: auto;
}
.finale[hidden] {
  display: none !important;
}
.finale-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.finale-card {
  position: relative;
  z-index: 1;
  max-width: 22rem;
  width: min(92vw, 22rem);
  text-align: center;
  padding: 1.35rem 1.25rem 1.45rem;
  border-radius: 14px;
  border: 1px solid rgba(232, 238, 245, 0.14);
  background: linear-gradient(
    165deg,
    rgba(22, 32, 48, 0.92),
    rgba(12, 18, 28, 0.96)
  );
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
  transform: translateY(18px) scale(0.94);
  opacity: 0;
  animation: finale-card-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.12s forwards;
}
.finale-card[data-kind="sale"] {
  border-color: rgba(46, 204, 113, 0.45);
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(46, 204, 113, 0.12),
    0 0 42px rgba(46, 204, 113, 0.18);
}
.finale-card[data-kind="miss"] {
  border-color: rgba(148, 163, 184, 0.28);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}
.finale-title {
  margin: 0;
  font-size: clamp(1.35rem, 4.2vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--ink);
}
.finale-card[data-kind="sale"] .finale-title {
  color: #7dffb2;
}
.finale-card[data-kind="miss"] .finale-title {
  color: #c5d0de;
}
.finale-sub {
  margin: 0.55rem 0 0;
  font-size: 1rem;
  line-height: 1.35;
  color: var(--muted);
}
.finale-card[data-kind="sale"] .finale-sub {
  color: rgba(185, 255, 210, 0.85);
}
@keyframes finale-card-in {
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

/* —— Mobile polish (additive; desktop unchanged above) —— */
@media (max-width: 720px) {
  .shell {
    width: min(680px, calc(100% - 1.25rem));
    padding-top: 1.35rem;
    padding-bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
  }
  .shell.is-session {
    width: min(920px, calc(100% - 0.75rem));
    padding-top: 0.35rem;
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
  }
  .shell.is-gate,
  .shell.is-lobby,
  .shell.is-report {
    justify-content: flex-start;
    padding-top: 1.25rem;
    padding-bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
    min-height: calc(100dvh - env(safe-area-inset-top, 0px) - 0.5rem);
  }
  .brand-name {
    font-size: clamp(1.55rem, 7vw, 2.1rem);
  }
  .tagline {
    margin-bottom: 1.1rem;
    font-size: 0.95rem;
  }
  .access-form,
  .lobby-minimal,
  .report-panel {
    max-width: none;
    width: 100%;
  }
  .cta,
  .ghost,
  .end-training {
    min-height: 2.85rem;
    touch-action: manipulation;
  }
  .end-training {
    min-width: 0;
    width: 100%;
    max-width: 22rem;
  }
  .voice-actions {
    position: sticky;
    bottom: 0;
    z-index: 6;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    padding-bottom: calc(0.55rem + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(
      180deg,
      transparent 0%,
      rgba(28, 40, 56, 0.72) 28%,
      rgba(28, 40, 56, 0.94) 100%
    );
  }
  .session-minimal {
    min-height: calc(100dvh - 4.25rem - env(safe-area-inset-top, 0px));
  }
  .voice-stage-photo {
    min-height: 0;
    gap: 0.35rem;
    padding: 0;
  }
  .avatar-name {
    font-size: clamp(1.25rem, 5.5vw, 1.7rem);
  }
  .avatar-frame {
    height: min(46dvh, 46vh, 420px);
    width: min(94vw, calc(46dvh * 0.75), calc(46vh * 0.75), 360px);
    border-radius: 14px;
  }
  .listen-orb {
    width: min(94%, 20rem);
    bottom: 0.65rem;
  }
  .listen-orb-label {
    white-space: normal;
    font-size: clamp(1.02rem, 4.2vw, 1.22rem);
  }
  .practice-banner {
    font-size: 0.88rem;
    padding: 0.6rem 0.75rem;
  }
  .finale {
    padding: 1rem;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  }
  .finale-card {
    width: min(100%, 22rem);
    padding: 1.15rem 1rem 1.25rem;
  }
  .report-score {
    font-size: 2.1rem;
  }
}

@media (max-width: 720px) and (max-height: 700px) {
  .shell.is-session .brand { display: none; }
  .avatar-frame {
    height: min(42dvh, 42vh, 340px);
    width: min(88vw, calc(42dvh * 0.75), calc(42vh * 0.75), 300px);
  }
  .avatar-name {
    font-size: 1.15rem;
  }
}

@media (max-width: 380px) {
  .shell {
    width: calc(100% - 0.85rem);
  }
  .listen-orb-bars {
    display: none;
  }
  .listen-orb-core {
    gap: 0;
    padding: 0.7rem 0.95rem;
  }
}
