:root {
  color-scheme: dark;
  --ink: #f8fbff;
  --muted: #9aa7c7;
  --line: rgba(116, 247, 255, 0.24);
  --paper: #10162a;
  --panel: rgba(16, 22, 42, 0.78);
  --deep: #070914;
  --coral: #ff3df2;
  --teal: #18f0ff;
  --gold: #ffe66d;
  --green: #61ff9c;
  --red: #ff4f6d;
  --violet: #8b5cff;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.46), 0 0 34px rgba(24, 240, 255, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  padding-bottom: 104px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 61, 242, 0.24), transparent 28%),
    radial-gradient(circle at 82% 16%, rgba(24, 240, 255, 0.20), transparent 30%),
    linear-gradient(160deg, #070914 0%, #10162a 48%, #160a2e 100%);
  color: var(--ink);
}

button,
select {
  font: inherit;
}

.phone-status {
  display: flex;
  justify-content: space-between;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 12px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.app-shell {
  width: min(1180px, calc(100% - 32px));
  min-height: calc(100vh - 104px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: start;
  padding: 18px 0 24px;
}

.feed-panel,
.coach-panel {
  min-width: 0;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 14px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  text-shadow: 0 0 16px rgba(24, 240, 255, 0.48);
}

h1,
h2,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 0.95;
  text-shadow: 0 0 22px rgba(255, 61, 242, 0.22);
}

.session-pill {
  min-width: 94px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(16, 22, 42, 0.84);
  color: var(--gold);
  font-weight: 900;
  box-shadow: 0 0 24px rgba(24, 240, 255, 0.18);
}

.diagnostic-panel,
.profile-panel,
.book-bridge,
.operator-strip,
.coach-card,
.score-strip {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(16px);
}

.diagnostic-panel {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 14px;
  margin-bottom: 14px;
}

.profile-panel {
  display: grid;
  grid-template-columns: minmax(170px, 1.2fr) minmax(120px, 0.75fr) minmax(120px, 0.75fr) minmax(140px, 0.85fr) 88px;
  gap: 12px;
  align-items: end;
  padding: 14px;
  margin-bottom: 14px;
}

.profile-panel h2 {
  margin: 0;
  font-size: 1.05rem;
}

.profile-panel label {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-weight: 900;
}

.profile-panel input,
.profile-panel select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--deep);
  color: var(--ink);
  padding: 0 12px;
  font: inherit;
  font-weight: 900;
}

.diagnostic-panel p:last-child {
  margin: 0;
  color: #dbe7ff;
  font-weight: 800;
  line-height: 1.35;
}

.diagnostic-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.topic-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.topic-tab {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 22, 42, 0.78);
  color: var(--muted);
  font-weight: 900;
  cursor: pointer;
}

.topic-tab.active {
  background: linear-gradient(135deg, rgba(255, 61, 242, 0.34), rgba(24, 240, 255, 0.20));
  border-color: var(--teal);
  color: var(--ink);
  box-shadow: 0 0 22px rgba(24, 240, 255, 0.18);
}

.card {
  position: relative;
  min-height: 570px;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(24, 240, 255, 0.30);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(23, 31, 56, 0.96), rgba(9, 13, 26, 0.97));
  box-shadow: var(--shadow);
  padding: clamp(20px, 4vw, 36px);
  overflow: hidden;
  scroll-margin-bottom: 108px;
  touch-action: pan-y;
  transition: transform 160ms ease, border-color 160ms ease;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 8px;
  background: linear-gradient(90deg, var(--coral), var(--teal), var(--gold), var(--violet));
  box-shadow: 0 0 28px rgba(255, 61, 242, 0.50);
}

.card.swipe-ready {
  border-color: var(--teal);
  transform: translateX(-10px);
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-weight: 900;
  font-size: 0.88rem;
}

.voice-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 18px;
}

.voice-button,
.voice-toggle,
.voice-select-label {
  min-height: 40px;
  border-radius: 8px;
  font-weight: 900;
}

.voice-button {
  border: 0;
  background: linear-gradient(135deg, var(--teal), var(--violet));
  color: #050712;
  padding: 0 16px;
  cursor: pointer;
  box-shadow: 0 0 18px rgba(24, 240, 255, 0.25);
}

.voice-toggle,
.voice-select-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: rgba(16, 22, 42, 0.78);
  color: var(--ink);
  padding: 0 12px;
}

.voice-select-label {
  padding-right: 10px;
}

.voice-select-label select {
  min-height: 30px;
  max-width: 170px;
  border: 0;
  border-radius: 6px;
  background: var(--deep);
  color: var(--ink);
  font-weight: 800;
}

.voice-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
}

.hook {
  max-width: 100%;
  margin: 20px 0 10px;
  color: var(--coral);
  font-weight: 900;
  font-size: 1rem;
}

.eli5 {
  margin: 0 0 18px;
  color: #dbe7ff;
  font-size: 1.08rem;
  line-height: 1.45;
  font-weight: 750;
}

.visual {
  min-height: 120px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 8px;
  background:
    linear-gradient(rgba(24, 240, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24, 240, 255, 0.08) 1px, transparent 1px),
    rgba(7, 9, 20, 0.74);
  background-size: 22px 22px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 14px;
}

.visual-flash-card {
  min-height: 78px;
  border: 1px solid rgba(24, 240, 255, 0.30);
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(24, 240, 255, 0.16), rgba(139, 92, 255, 0.22));
  color: var(--ink);
  box-shadow: 0 0 16px rgba(24, 240, 255, 0.34);
  cursor: pointer;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 8px;
  text-align: center;
  font: inherit;
  font-weight: 900;
}

.visual-flash-card:nth-child(odd) {
  background: linear-gradient(135deg, rgba(255, 61, 242, 0.18), rgba(255, 230, 109, 0.20));
  box-shadow: 0 0 16px rgba(255, 61, 242, 0.35);
}

.visual-flash-card.revealed {
  background: linear-gradient(135deg, var(--teal), #00a3ff);
  color: #050712;
}

.visual-flash-card.revealed:nth-child(odd) {
  background: linear-gradient(135deg, var(--coral), var(--gold));
}

.visual-flash-card:hover,
.visual-flash-card:focus-visible {
  outline: none;
  transform: translateY(-2px);
  border-color: var(--gold);
}

.visual-flash-card strong {
  display: block;
  font-size: 1rem;
}

.visual-flash-card small {
  display: block;
  font-size: 0.72rem;
  line-height: 1.2;
}

.visual-flash-card:not(.revealed) small {
  color: var(--muted);
}

.visual-caption {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 850;
}

.card h2 {
  margin: 0 0 20px;
  font-size: clamp(1.55rem, 4vw, 2.45rem);
  line-height: 1.08;
}

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

.answer-button {
  min-height: 58px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 22, 42, 0.86);
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.answer-button:hover,
.answer-button:focus-visible {
  transform: translateY(-2px);
  border-color: var(--teal);
  box-shadow: 0 0 20px rgba(24, 240, 255, 0.20);
  outline: none;
}

.answer-button.correct {
  background: rgba(97, 255, 156, 0.14);
  border-color: var(--green);
}

.answer-button.wrong {
  background: rgba(255, 79, 109, 0.14);
  border-color: var(--red);
}

.feedback {
  min-height: 52px;
  margin-top: 16px;
  color: var(--muted);
  font-weight: 800;
}

.confidence-check {
  margin: 2px 0 16px;
  padding: 14px;
  border: 1px solid rgba(24, 240, 255, 0.30);
  border-radius: 8px;
  background: rgba(7, 9, 20, 0.62);
}

.confidence-check[hidden] {
  display: none;
}

.confidence-check h3 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.confidence-check p {
  margin: 10px 0 0;
  color: var(--muted);
  font-weight: 800;
}

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

.confidence-actions button {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 22, 42, 0.86);
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
}

.confidence-actions button:hover,
.confidence-actions button:focus-visible,
.confidence-actions button.selected {
  border-color: var(--gold);
  background: rgba(255, 230, 109, 0.14);
  outline: none;
}

.card-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 10px;
}

.card-links button {
  min-height: 34px;
  border: 1px solid rgba(24, 240, 255, 0.24);
  border-radius: 8px;
  background: rgba(7, 9, 20, 0.58);
  color: var(--muted);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 900;
}

.card-links button:hover,
.card-links button:focus-visible {
  border-color: var(--teal);
  color: var(--ink);
  outline: none;
}

.actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
}

.ghost-button,
.primary-button {
  min-height: 48px;
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 900;
  cursor: pointer;
}

.ghost-button {
  border: 1px solid var(--line);
  background: rgba(16, 22, 42, 0.78);
  color: var(--ink);
}

.ghost-button.callout {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(255, 230, 109, 0.16), 0 0 22px rgba(255, 230, 109, 0.20);
}

.primary-button {
  flex: 1;
  border: 0;
  background: linear-gradient(135deg, var(--coral), var(--violet));
  color: var(--ink);
  box-shadow: 0 0 22px rgba(255, 61, 242, 0.24);
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  box-shadow: none;
}

.book-bridge {
  padding: 16px;
}

.book-bridge p:last-child {
  margin: 0;
  font-weight: 900;
}

.operator-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
  padding: 12px;
  scroll-margin-bottom: 108px;
}

.operator-strip span {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  background: rgba(7, 9, 20, 0.72);
  color: var(--ink);
  font-weight: 900;
}

.operator-strip strong {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--teal), var(--coral));
  color: #050712;
}

.coach-panel {
  display: grid;
  gap: 14px;
}

.score-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 14px;
}

.score-label {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.score-strip strong {
  display: block;
  margin-top: 3px;
  color: var(--gold);
  font-size: 1.8rem;
}

.coach-card {
  padding: 18px;
  scroll-margin-bottom: 108px;
}

.coach-card h2 {
  margin: 0 0 12px;
  font-size: 1.05rem;
}

.progress-track {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: rgba(154, 167, 199, 0.22);
  overflow: hidden;
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--green), var(--gold));
  transition: width 220ms ease;
}

.coach-card p,
.notes,
.ladder {
  color: var(--muted);
  line-height: 1.45;
}

.confidence-insight-card {
  border-color: rgba(255, 230, 109, 0.34);
}

.confidence-insight-card p {
  color: #f4edc2;
  font-weight: 850;
}

.session-plan-card {
  border-color: rgba(97, 255, 156, 0.30);
}

.session-plan {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.45;
}

.session-plan li {
  margin: 9px 0;
}

.session-plan li:first-child {
  color: var(--ink);
  font-weight: 900;
}

.ladder {
  margin: 0;
  padding-left: 20px;
}

.ladder li {
  margin: 9px 0;
}

.ladder .done {
  color: var(--green);
  font-weight: 900;
}

.ladder .active {
  color: var(--ink);
  font-weight: 900;
}

.notes {
  margin: 0;
  padding-left: 18px;
}

.notes li {
  margin: 9px 0;
}

.settings-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.avatar-preview {
  min-height: 86px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 80%, rgba(24, 240, 255, 0.20), transparent 34%),
    rgba(7, 9, 20, 0.62);
}

.avatar-preview span {
  width: 54px;
  height: 78px;
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: contain;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.42));
}

.profile-save-button {
  grid-column: 1 / -1;
  justify-self: end;
  min-height: 42px;
  padding: 0 18px;
  white-space: nowrap;
}

.parent-monitor-link {
  margin: 12px 0 0;
}

.parent-monitor-link a {
  color: var(--teal);
  font-weight: 900;
}

.parent-live-shell .card {
  min-height: 520px;
}

.live-events {
  display: grid;
  gap: 10px;
}

.live-event {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 9, 20, 0.66);
  padding: 12px;
}

.live-event strong {
  color: var(--gold);
}

.live-event p {
  margin: 4px 0 0;
  color: var(--ink);
  font-weight: 800;
}

.live-event small {
  color: var(--muted);
  font-weight: 900;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 10px;
  z-index: 20;
  transform: translateX(-50%);
  width: min(560px, calc(100% - 24px));
  min-height: 68px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(24, 240, 255, 0.28);
  border-radius: 18px;
  background: rgba(7, 9, 20, 0.88);
  box-shadow: 0 0 34px rgba(24, 240, 255, 0.18), 0 20px 50px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(18px);
}

.bottom-nav-button {
  min-width: 0;
  min-height: 50px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  display: grid;
  place-items: center;
  gap: 2px;
  font-size: 0.74rem;
  font-weight: 900;
  cursor: pointer;
}

.bottom-nav-button span {
  font-size: 1.18rem;
  line-height: 1;
}

.bottom-nav-button.active {
  background: linear-gradient(135deg, rgba(24, 240, 255, 0.22), rgba(255, 61, 242, 0.22));
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(24, 240, 255, 0.28), 0 0 18px rgba(255, 61, 242, 0.18);
}

.character-stage {
  pointer-events: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 78px;
  z-index: 18;
  height: 230px;
  overflow: hidden;
}

.character-stage::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 18px;
  height: 5px;
  background: linear-gradient(90deg, transparent, rgba(24, 240, 255, 0.48), rgba(255, 61, 242, 0.28), transparent);
  border-radius: 999px;
  filter: blur(1px);
}

.confetti-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  left: 50%;
  bottom: 150px;
  width: 8px;
  height: 14px;
  border-radius: 3px;
  opacity: 0;
  transform: translate(-50%, 0) rotate(0deg);
  animation: confettiBurst 900ms ease-out forwards;
}

@keyframes confettiBurst {
  0% {
    opacity: 1;
    transform: translate(-50%, 0) rotate(0deg) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--x)), var(--y)) rotate(var(--r)) scale(0.92);
  }
}

.character-sprite {
  position: absolute;
  left: -190px;
  bottom: 22px;
  width: 118px;
  height: 180px;
  opacity: 0;
  background-image: url("assets/esmae-export/esmae-run1.png");
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center bottom;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.42)) drop-shadow(0 0 18px rgba(255, 61, 242, 0.34));
  transform: translateX(0) scale(1);
  transform-origin: center bottom;
}

.character-sprite.run-in {
  animation: characterRunIn 1.45s ease-out both;
}

.character-sprite.react-correct {
  animation: characterCelebrate 0.78s ease-in-out both;
}

.character-sprite.react-wrong {
  animation: characterThink 0.82s ease-in-out both;
}

.character-sprite.exit {
  animation: characterExit 1s ease-in both;
}

.character-bubble {
  position: absolute;
  left: 50%;
  bottom: 170px;
  max-width: min(300px, calc(100vw - 32px));
  opacity: 0;
  transform: translate(-50%, 10px) scale(0.92);
  border: 1px solid rgba(24, 240, 255, 0.42);
  border-radius: 18px;
  background: rgba(7, 9, 20, 0.88);
  color: var(--ink);
  padding: 9px 14px;
  box-shadow: 0 0 24px rgba(24, 240, 255, 0.18);
  font-size: 0.9rem;
  font-weight: 900;
  text-align: center;
}

.character-bubble.show {
  animation: bubblePop 1.36s ease both;
}

@keyframes characterRunIn {
  0% {
    opacity: 1;
    left: -150px;
    transform: translateY(0) scale(0.92);
  }
  72% {
    opacity: 1;
    left: calc(50vw - 59px);
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 1;
    left: calc(50vw - 59px);
    transform: translateY(-3px) scale(1);
  }
}

@keyframes characterCelebrate {
  0%, 100% {
    opacity: 1;
    left: calc(50vw - 59px);
    transform: translateY(0) scale(1.06) rotate(0deg);
  }
  35% {
    transform: translateY(-16px) scale(1.14) rotate(-3deg);
  }
  68% {
    transform: translateY(-4px) scale(1.08) rotate(3deg);
  }
}

@keyframes characterThink {
  0%, 100% {
    opacity: 1;
    left: calc(50vw - 59px);
    transform: translateY(0) scale(1.04) rotate(0deg);
  }
  25% {
    transform: translateY(0) scale(1.04) rotate(-4deg);
  }
  50% {
    transform: translateY(0) scale(1.04) rotate(4deg);
  }
  75% {
    transform: translateY(0) scale(1.04) rotate(-2deg);
  }
}

@keyframes characterExit {
  0% {
    opacity: 1;
    left: calc(50vw - 59px);
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    left: calc(100vw + 140px);
    transform: translateY(0) scale(0.94);
  }
}

@keyframes bubblePop {
  0% {
    opacity: 0;
    transform: translate(-50%, 10px) scale(0.92);
  }
  18%, 82% {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -4px) scale(0.98);
  }
}

@media (max-width: 920px) {
  .app-shell {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .coach-panel {
    grid-row: 2;
  }
}

@media (max-width: 620px) {
  body {
    padding-bottom: 96px;
  }

  body[data-app-page="card"] .coach-panel {
    display: none;
  }

  .phone-status,
  .app-shell {
    width: min(100% - 20px, 1180px);
  }

  .app-shell {
    padding: 10px 0 18px;
  }

  .top-bar {
    align-items: flex-start;
  }

  .diagnostic-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .profile-panel {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .avatar-preview {
    min-height: 110px;
  }

  .avatar-preview span {
    width: 72px;
    height: 104px;
  }

  .diagnostic-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

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

  .card {
    min-height: calc(100dvh - 120px);
    padding: 14px;
    scroll-margin-top: 8px;
    scroll-margin-bottom: 96px;
  }

  .card-meta {
    font-size: 0.78rem;
  }

  .voice-controls {
    gap: 8px;
    margin-top: 12px;
  }

  .voice-button,
  .voice-toggle,
  .voice-select-label {
    min-height: 34px;
    padding: 0 10px;
  }

  .hook {
    margin: 12px 0 6px;
    font-size: 0.9rem;
  }

  .eli5 {
    margin-bottom: 10px;
    font-size: 0.95rem;
    line-height: 1.26;
  }

  .answers {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px;
  }

  .answer-button {
    width: 100%;
    min-height: 48px;
    padding: 0 8px;
  }

  .card h2 {
    margin-bottom: 12px;
    font-size: clamp(1.28rem, 6.2vw, 1.8rem);
  }

  .visual {
    min-height: 72px;
    gap: 6px;
    padding: 8px;
    margin-bottom: 6px;
  }

  .visual-flash-card {
    min-height: 52px;
    padding: 5px;
  }

  .visual-flash-card strong {
    font-size: 0.86rem;
  }

  .visual-flash-card small {
    font-size: 0.66rem;
  }

  .visual-caption {
    margin-bottom: 10px;
    font-size: 0.78rem;
  }

  .feedback {
    min-height: 34px;
    margin-top: 10px;
    font-size: 0.85rem;
  }

  .confidence-check {
    margin: 0 0 10px;
    padding: 10px;
  }

  .confidence-check h3 {
    margin-bottom: 8px;
    font-size: 0.95rem;
  }

  .confidence-check p {
    margin-top: 8px;
    font-size: 0.82rem;
  }

  .confidence-actions button {
    min-height: 40px;
  }

  .card-links {
    margin-bottom: 8px;
  }

  .card-links button {
    min-height: 32px;
  }

  .actions {
    margin-top: 0;
  }

  .ghost-button,
  .primary-button {
    min-height: 46px;
    padding: 0 12px;
  }

  .support-page .book-bridge {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

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

  .score-strip strong {
    font-size: 1.35rem;
  }

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

  .character-stage {
    bottom: 78px;
    height: 170px;
  }

  .character-sprite {
    width: 138px;
    height: 138px;
  }
}

@media (max-height: 760px) {
  .card {
    min-height: auto;
  }

  .visual {
    min-height: 82px;
    margin-bottom: 16px;
  }

  .hook {
    margin-top: 14px;
  }

  .eli5 {
    margin-bottom: 14px;
    font-size: 1rem;
  }
}
