:root {
  color-scheme: light;
  --bg: #f4f1ea;
  --panel: #fffdf8;
  --panel-strong: #f8fbfa;
  --ink: #171a1f;
  --muted: #667077;
  --line: #d8ddd7;
  --accent: #0f766e;
  --accent-strong: #075e58;
  --warn: #b45309;
  --danger: #b42318;
  --danger-bg: #fff1ee;
  --shadow: 0 16px 40px rgba(28, 39, 37, 0.12);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
select,
input,
textarea {
  border: 1px solid var(--line);
}

button {
  min-height: 42px;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  font-weight: 700;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

button.primary:hover:not(:disabled) {
  background: var(--accent-strong);
}

button.danger {
  background: var(--danger-bg);
  border-color: #ffc7bf;
  color: var(--danger);
}

.app-shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
  gap: 16px;
}

.assessment-header {
  grid-column: 1 / -1;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  padding: 8px 4px 4px;
}

.assessment-lead {
  margin: 10px 0 0;
  color: var(--muted);
}

.pipeline-progress {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  gap: 8px;
}

.pipeline-progress li {
  min-width: 92px;
  color: var(--muted);
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 800;
}

.pipeline-progress li span {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #ffffff;
  display: grid;
  place-items: center;
}

.pipeline-progress li.active,
.pipeline-progress li.complete {
  color: var(--accent);
}

.pipeline-progress li.active span {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.pipeline-progress li.complete span {
  border-color: var(--accent);
  background: #dff7f1;
}

.pipeline-stage {
  grid-column: 1 / -1;
}

.voice-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
  gap: 16px;
}

.call-panel,
.transcript-panel,
.events-panel,
.assessment-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.call-panel {
  grid-column: 1 / -1;
  padding: 20px;
}

.advanced-settings {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.advanced-settings summary {
  cursor: pointer;
  padding: 11px 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.advanced-settings .prompt-field {
  margin: 0;
  padding: 0 12px 12px;
}

.advanced-settings textarea[readonly] {
  background: #f7f8f6;
  color: #50585d;
}

.assessment-card {
  padding: 28px;
}

.stage-heading,
.stage-actions,
.report-hero,
.report-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.stage-heading h2,
.report-hero h2 {
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.05;
}

.stage-heading p:not(.eyebrow),
.report-hero p:not(.eyebrow) {
  max-width: 680px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.word-counter {
  flex: 0 0 auto;
  width: 108px;
  height: 108px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  background: #e9f8f4;
  display: grid;
  place-content: center;
  text-align: center;
}

.word-counter strong {
  color: var(--accent-strong);
  font-size: 32px;
  line-height: 1;
}

.word-counter span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.word-grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 8px;
}

.word-choice,
.choice-grid label {
  position: relative;
}

.word-choice input,
.choice-grid input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.word-choice span,
.choice-grid span {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.word-choice span {
  min-height: 42px;
  padding: 6px;
  overflow-wrap: anywhere;
  transition: 120ms ease;
}

.word-choice input:focus-visible + span,
.choice-grid input:focus-visible + span {
  outline: 3px solid rgba(15, 118, 110, 0.22);
  outline-offset: 2px;
}

.word-choice input:checked + span {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
  transform: translateY(-1px);
}

.stage-actions {
  margin-top: 28px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.helper-text {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.analysis-spinner {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border: 3px solid #d7e9e5;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.profile-form {
  margin-top: 28px;
  display: grid;
  gap: 22px;
}

.profile-fieldset {
  margin: 0;
  border: 0;
  padding: 0;
}

.profile-fieldset legend {
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.choice-grid span {
  min-height: 48px;
  padding: 8px;
}

.choice-grid input:checked + span {
  border-color: var(--accent);
  background: #e9f8f4;
  color: var(--accent-strong);
  box-shadow: inset 0 0 0 1px var(--accent);
}

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

.report-loading {
  min-height: 420px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  text-align: center;
}

.report-loading h2,
.report-loading p {
  margin: 0;
}

.report-loading p {
  color: var(--muted);
}

.report-hero {
  border-bottom: 1px solid var(--line);
  padding-bottom: 24px;
}

.level-orbit {
  width: 132px;
  height: 132px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--accent);
  color: #ffffff;
  display: grid;
  place-content: center;
  text-align: center;
  box-shadow: 0 0 0 10px #ddf5ef;
}

.level-orbit span {
  font-size: 48px;
  font-weight: 900;
  line-height: 1;
}

.level-orbit small {
  margin-top: 5px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.result-grid,
.report-columns {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.result-panel,
.report-columns article,
.level-reason,
.learning-route {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 18px;
}

.level-reason {
  margin-top: 22px;
}

.level-reason h3,
.level-reason p {
  margin: 0;
}

.level-reason p {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.6;
}

.result-kicker {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.result-panel strong {
  display: block;
  margin-top: 7px;
  color: var(--accent-strong);
  font-size: 34px;
}

.result-panel p {
  margin: 5px 0 0;
  color: var(--muted);
}

.score-section {
  margin-top: 28px;
}

.score-section h3,
.report-columns h3,
.learning-route h3 {
  margin: 0;
}

.score-bars {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.score-item {
  display: grid;
  gap: 7px;
}

.score-item header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.score-track {
  height: 9px;
  border-radius: 99px;
  background: #e4e9e6;
  overflow: hidden;
}

.score-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.report-columns ul {
  margin: 12px 0 0;
  padding-left: 20px;
  color: #343b3f;
  line-height: 1.55;
}

.report-columns li + li {
  margin-top: 7px;
}

.mistake-list {
  margin-top: 12px;
  display: grid;
  gap: 12px;
}

.mistake-item {
  border-left: 3px solid var(--accent);
  padding-left: 12px;
}

.mistake-item p {
  margin: 0;
  line-height: 1.5;
}

.mistake-source {
  color: #5e4541;
}

.mistake-correction {
  margin-top: 4px !important;
  color: var(--accent-strong);
  font-weight: 800;
}

.mistake-explanation {
  margin-top: 5px !important;
  color: var(--muted);
  font-size: 13px;
}

.learning-route {
  margin-top: 22px;
  background: linear-gradient(135deg, #effaf7, #fffdf8 72%);
}

.learning-route > p:not(.eyebrow) {
  max-width: 760px;
  color: var(--muted);
  line-height: 1.55;
}

.learning-route .route-timeline {
  color: #263c37;
  font-weight: 800;
}

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

.route-tags span {
  border-radius: 99px;
  background: #ffffff;
  border: 1px solid var(--line);
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 800;
}

.report-cta {
  margin-top: 22px;
  border-radius: 8px;
  background: #172522;
  color: #ffffff;
  padding: 22px;
}

.report-cta strong {
  font-size: 18px;
}

.report-cta p {
  margin: 6px 0 0;
  color: #c8d6d2;
  line-height: 1.45;
}

.topbar,
.panel-header,
.field-row,
.button-row,
.stage-meta {
  display: flex;
  align-items: center;
}

.topbar,
.panel-header {
  justify-content: space-between;
  gap: 16px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 34px;
  line-height: 1.05;
}

h2 {
  font-size: 15px;
}

.topbar h2 {
  font-size: 34px;
  line-height: 1.05;
}

.status-pill {
  min-width: 112px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  background: #ffffff;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #9aa3a8;
}

.status-pill.live .status-dot {
  background: var(--accent);
}

.status-pill.busy .status-dot {
  background: var(--warn);
}

.status-pill.error .status-dot {
  background: var(--danger);
}

.call-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: minmax(320px, 0.92fr) minmax(360px, 1.08fr);
  gap: 16px;
}

.controls,
.stage,
.transcript-panel,
.events-panel {
  padding: 16px;
}

.controls {
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
}

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

.field-label,
.metric span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.model-switch {
  display: grid;
  gap: 8px;
}

.model-option {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
}

.model-option:has(input:checked) {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.model-option input {
  margin-top: 3px;
  accent-color: var(--accent);
}

.model-option span {
  min-width: 0;
}

.model-option strong,
.model-option small {
  display: block;
}

.model-option strong {
  overflow-wrap: anywhere;
  font-size: 15px;
}

.model-option small {
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.35;
}

.field-row {
  margin-top: 14px;
  gap: 12px;
}

.avatar-controls {
  align-items: stretch;
}

.field {
  flex: 1;
  display: grid;
  gap: 7px;
}

select,
input[type="text"],
textarea {
  width: 100%;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
}

select,
input[type="text"] {
  min-height: 42px;
  padding: 0 12px;
}

textarea {
  min-height: 150px;
  padding: 11px 12px;
  resize: vertical;
  line-height: 1.45;
}

.metric {
  width: 112px;
  min-height: 64px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 10px;
}

.metric strong {
  font-variant-numeric: tabular-nums;
  font-size: 21px;
}

.button-row {
  margin-top: 14px;
  gap: 8px;
  flex-wrap: wrap;
}

.text-form {
  margin-top: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.stage {
  min-height: 500px;
  border: 1px solid var(--line);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(14, 18, 21, 0.98) 0%, rgba(27, 48, 43, 0.96) 56%, rgba(76, 58, 48, 0.98) 57%, #2b211d 100%),
    #17211f;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  isolation: isolate;
}

.stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, transparent 0 8%, rgba(255, 236, 173, 0.1) 28%, transparent 50% 100%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 38px);
  opacity: 0.82;
  pointer-events: none;
}

.stage::after {
  content: "";
  position: absolute;
  inset: 58% 0 0;
  z-index: 1;
  background:
    repeating-linear-gradient(0deg, rgba(255, 241, 210, 0.05) 0 2px, transparent 2px 32px),
    linear-gradient(90deg, rgba(11, 9, 8, 0.34), transparent 28% 72%, rgba(11, 9, 8, 0.34));
  pointer-events: none;
}

.stage-background {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center center;
  opacity: 0;
  transition: opacity 180ms ease;
  pointer-events: none;
}

.stage.has-generated-background {
  background: #111817;
}

.stage.has-generated-background .stage-background {
  opacity: 1;
}

.stage.has-generated-background::before {
  background:
    radial-gradient(circle at 50% 42%, rgba(0, 0, 0, 0) 0 30%, rgba(0, 0, 0, 0.14) 62%, rgba(0, 0, 0, 0.5) 100%),
    linear-gradient(180deg, rgba(8, 11, 12, 0.1), rgba(8, 11, 12, 0.42));
  opacity: 1;
}

.stage.has-generated-background::after {
  display: none;
}

.stage-fullscreen-button {
  min-width: 52px;
  min-height: 36px;
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(10, 13, 14, 0.58);
  color: rgba(255, 251, 239, 0.92);
  padding: 0 12px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(12px);
  font-size: 13px;
  font-weight: 900;
}

.stage-fullscreen-button:hover {
  background: rgba(10, 13, 14, 0.72);
}

.stage-fullscreen-button:focus-visible {
  outline: 3px solid rgba(131, 187, 177, 0.72);
  outline-offset: 2px;
}

.avatar-scene {
  width: min(520px, 100%);
  aspect-ratio: 1;
  position: relative;
  display: grid;
  place-items: center;
  z-index: 2;
}

.rive-avatar-canvas,
.vrm-avatar-canvas {
  width: 100%;
  height: 100%;
  display: none;
  position: absolute;
  inset: 0;
  z-index: 1;
}

.portrait-avatar {
  --portrait-x: 0px;
  --portrait-y: 0px;
  --portrait-rotate: 0deg;
  --portrait-scale: 1;
  width: 100%;
  height: 100%;
  display: none;
  position: absolute;
  inset: 0;
  z-index: 1;
  filter: drop-shadow(0 20px 18px rgba(7, 10, 10, 0.34));
  pointer-events: none;
}

.portrait-avatar-rig {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  transform:
    translate(var(--portrait-x), var(--portrait-y))
    rotate(var(--portrait-rotate))
    scale(var(--portrait-scale));
  transform-origin: 50% 60%;
}

.portrait-avatar-base,
.portrait-avatar-strip {
  display: block;
  position: absolute;
  user-select: none;
}

.portrait-avatar-base {
  width: 100%;
  height: 100%;
  inset: 0;
  object-fit: contain;
  z-index: 1;
}

.portrait-avatar-strip {
  object-fit: fill;
  z-index: 2;
}

.portrait-eyes {
  width: var(--portrait-eyes-w, 45.933%);
  height: var(--portrait-eyes-h, 20.415%);
  left: var(--portrait-eyes-x, 27.033%);
  top: var(--portrait-eyes-y, 27.033%);
}

.portrait-mouth {
  width: var(--portrait-mouth-w, 45.933%);
  height: var(--portrait-mouth-h, 10.207%);
  left: var(--portrait-mouth-x, 27.033%);
  top: var(--portrait-mouth-y, 47.448%);
}

.avatar-scene.is-rive .rive-avatar-canvas,
.avatar-scene.is-vrm .vrm-avatar-canvas,
.avatar-scene.is-portrait .portrait-avatar {
  display: block;
}

.avatar-scene.is-rive .vrm-avatar-canvas,
.avatar-scene.is-rive .portrait-avatar,
.avatar-scene.is-vrm .rive-avatar-canvas,
.avatar-scene.is-vrm .portrait-avatar,
.avatar-scene.is-portrait .rive-avatar-canvas,
.avatar-scene.is-portrait .vrm-avatar-canvas {
  display: none;
}

.meter {
  width: 148px;
  height: 82px;
  position: absolute;
  right: 18px;
  bottom: 34px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  z-index: 4;
  opacity: 0.9;
  pointer-events: none;
}

.meter span {
  width: 3px;
  height: 12px;
  border-radius: 999px;
  background: #a7df72;
  box-shadow: 0 0 12px rgba(167, 223, 114, 0.38);
  transform-origin: center;
  transition: height 80ms linear, opacity 80ms linear;
}

.meter-local {
  left: 18px;
  right: auto;
  bottom: 38px;
  width: 116px;
  height: 54px;
  opacity: 0.75;
}

.meter-local span {
  width: 2px;
  background: #f0b15a;
  box-shadow: 0 0 10px rgba(240, 177, 90, 0.3);
}

.stage-meta {
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  color: rgba(255, 251, 239, 0.76);
  font-size: 13px;
  font-weight: 800;
  position: relative;
  z-index: 3;
}

.stage-meta span {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(10, 13, 14, 0.52);
  padding: 7px 10px;
  max-width: 220px;
  overflow-wrap: anywhere;
}

.stage:fullscreen {
  width: 100vw;
  height: 100vh;
}

.stage.is-fullscreen-stage {
  min-height: 100vh;
  border: 0;
  border-radius: 0;
  padding: 0;
  gap: 0;
  background: #101716;
  place-items: center;
}

.stage.is-fullscreen-stage .stage-background {
  background-size: cover;
  background-position: center center;
  filter: saturate(1.08) contrast(1.02);
}

.stage.is-fullscreen-stage.has-generated-background::before {
  background:
    radial-gradient(circle at 50% 46%, rgba(0, 0, 0, 0) 0 28%, rgba(0, 0, 0, 0.16) 58%, rgba(0, 0, 0, 0.58) 100%),
    linear-gradient(180deg, rgba(7, 10, 10, 0.1), rgba(7, 10, 10, 0.34));
}

.stage.is-fullscreen-stage .avatar-scene {
  width: min(104vw, calc(100vh * 0.86));
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%) scale(1.14);
  transform-origin: 50% 100%;
}

.stage.is-fullscreen-stage .portrait-avatar {
  filter: drop-shadow(0 26px 26px rgba(3, 5, 5, 0.44));
}

.stage.is-fullscreen-stage .stage-fullscreen-button {
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
}

.stage.is-fullscreen-stage .stage-meta,
.stage.is-fullscreen-stage .meter {
  display: none;
}

@media (orientation: portrait) {
  .stage.is-fullscreen-stage .avatar-scene {
    width: min(122vw, calc(100vh * 0.76));
    bottom: 0;
    transform: translateX(-50%) scale(1.18);
  }
}

.transcript-panel,
.events-panel {
  min-height: 360px;
}

.transcript,
.event-log {
  margin-top: 12px;
  height: 300px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.message {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #ffffff;
  line-height: 1.45;
}

.message strong {
  display: block;
  margin-bottom: 4px;
  color: var(--accent);
  font-size: 12px;
  text-transform: uppercase;
}

.message.user strong {
  color: var(--warn);
}

.message.pending {
  color: var(--muted);
}

.event {
  border-left: 3px solid var(--line);
  background: #ffffff;
  padding: 8px 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.event.error {
  border-left-color: var(--danger);
  color: var(--danger);
}

.event.good {
  border-left-color: var(--accent);
}

@media (max-width: 860px) {
  .app-shell,
  .call-grid,
  .voice-workspace {
    grid-template-columns: 1fr;
  }

  .app-shell {
    width: min(100vw - 20px, 680px);
    padding: 10px 0;
  }

  .call-panel,
  .transcript-panel,
  .events-panel,
  .assessment-card {
    box-shadow: none;
  }

  .topbar,
  .field-row,
  .assessment-header,
  .stage-heading,
  .stage-actions,
  .report-hero,
  .report-cta {
    align-items: stretch;
    flex-direction: column;
  }

  .pipeline-progress {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
  }

  .pipeline-progress li {
    min-width: 0;
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

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

  .choice-grid,
  .profile-grid,
  .score-bars,
  .result-grid,
  .report-columns {
    grid-template-columns: 1fr;
  }

  .word-counter,
  .level-orbit {
    align-self: center;
  }

  h1 {
    font-size: 28px;
  }

  .topbar h2 {
    font-size: 28px;
  }

  .status-pill,
  .metric {
    width: 100%;
  }

  .button-row,
  .text-form {
    display: grid;
    grid-template-columns: 1fr;
  }

  .stage {
    min-height: 430px;
  }

  .avatar-scene {
    width: min(100%, 360px);
  }

  .meter {
    right: 10px;
    bottom: 20px;
    width: 100px;
    height: 58px;
    gap: 1px;
  }

  .meter-local {
    left: 10px;
    bottom: 22px;
    width: 82px;
    height: 42px;
  }

  .meter span,
  .meter-local span {
    width: 2px;
  }
}

@media (max-width: 480px) {
  .assessment-card {
    padding: 18px;
  }

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

@media (prefers-reduced-motion: reduce) {
  .analysis-spinner {
    animation: none;
  }
}

@media (min-width: 861px) and (max-width: 1120px) {
  .word-grid {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }

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