:root {
  --ink: #17222b;
  --muted: #6d736f;
  --paper: #f5f1e8;
  --paper-deep: #ede7db;
  --white: #fffdf8;
  --navy: #183142;
  --coral: #ff765f;
  --coral-dark: #e85f4a;
  --lavender: #9d8dd2;
  --blue: #5b92a7;
  --line: rgba(23, 34, 43, 0.14);
  --shadow: 0 24px 70px rgba(31, 39, 42, 0.1);
  --radius-lg: 32px;
  --radius-md: 22px;
  font-family: Inter, "Avenir Next", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--paper);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 85% 15%, rgba(157, 141, 210, 0.12), transparent 25rem),
    radial-gradient(circle at 8% 75%, rgba(91, 146, 167, 0.1), transparent 24rem),
    var(--paper);
}

button {
  font: inherit;
}

button:focus-visible {
  outline: 3px solid rgba(255, 118, 95, 0.35);
  outline-offset: 3px;
}

.app-shell {
  width: min(100% - 48px, 1240px);
  margin: 0 auto;
}

.topbar {
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand,
.header-stat,
.header-back,
.text-button {
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.header-leading {
  display: flex;
  align-items: center;
  gap: 22px;
}

.header-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px 8px 8px;
  border: 1px solid rgba(24, 49, 66, .24);
  border-radius: 99px;
  background: var(--white);
  color: var(--navy);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 5px 14px rgba(24, 49, 66, .08);
  transition: background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.header-back:hover {
  background: #fff;
  transform: translateX(-2px);
  box-shadow: 0 7px 18px rgba(24, 49, 66, .13);
}

.header-back-icon {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-size: 14px;
}

.header-back[hidden] {
  display: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 4px 0;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.19em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
}

.brand-mark svg {
  width: 22px;
  fill: none;
  stroke: var(--paper);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.header-stat {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 99px;
  font-size: 12px;
  color: var(--muted);
  transition: background 180ms ease;
}

.header-stat:hover {
  background: rgba(255, 255, 255, 0.5);
}

.header-stat strong {
  color: var(--ink);
}

.header-stat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 4px rgba(255, 118, 95, 0.14);
}

.view {
  display: none;
  animation: viewIn 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.view.is-active {
  display: block;
}

@keyframes viewIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.home-view {
  padding: 58px 0 48px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(370px, 0.8fr);
  align-items: center;
  gap: clamp(48px, 8vw, 108px);
}

.eyebrow,
.answer-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.22em;
}

.eyebrow > span,
.answer-kicker > span {
  width: 22px;
  height: 2px;
  background: var(--coral);
}

.eyebrow b,
.answer-kicker b {
  color: var(--ink);
  margin-left: 2px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 22px;
  font-size: clamp(42px, 5vw, 68px);
  line-height: 1.15;
  letter-spacing: -0.055em;
}

h1 em {
  color: var(--coral-dark);
  font-style: normal;
}

.hero-description {
  margin-bottom: 32px;
  color: var(--muted);
  font-size: 15px;
  line-height: 2;
}

.setup-card {
  max-width: 660px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 253, 248, 0.72);
  box-shadow: 0 16px 45px rgba(31, 39, 42, 0.05);
  backdrop-filter: blur(10px);
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 18px;
}

.setting-row + .setting-row {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.setting-label {
  display: block;
  margin-bottom: 5px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.setting-row p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.segmented-control,
.category-pills {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: var(--paper-deep);
}

.segmented-control button,
.category-pills button {
  padding: 9px 13px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  transition: 160ms ease;
}

.segmented-control button:hover,
.category-pills button:hover {
  color: var(--ink);
}

.segmented-control button.is-selected,
.category-pills button.is-selected {
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 3px 10px rgba(31, 39, 42, 0.08);
}

.primary-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px 14px 20px;
  border: 0;
  border-radius: 14px;
  background: var(--navy);
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(24, 49, 66, 0.16);
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.primary-button:hover:not(:disabled) {
  transform: translateY(-2px);
  background: #214256;
  box-shadow: 0 16px 30px rgba(24, 49, 66, 0.21);
}

.primary-button:active:not(:disabled) {
  transform: translateY(0);
}

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

.button-arrow {
  width: 30px;
  height: 30px;
  display: grid;
  flex: 0 0 30px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  font-size: 16px;
}

.start-button {
  margin-top: 4px;
}

.session-note {
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.focus-card {
  min-height: 560px;
  position: relative;
  overflow: hidden;
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--navy);
  color: #fff;
  box-shadow: 0 30px 75px rgba(24, 49, 66, 0.2);
}

.focus-card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.12;
  background-image: radial-gradient(rgba(255,255,255,.7) 0.7px, transparent 0.7px);
  background-size: 9px 9px;
  mask-image: linear-gradient(to bottom, #000, transparent 88%);
}

.focus-card-top,
.focus-footer {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.17em;
}

.focus-date {
  color: rgba(255,255,255,.55);
}

.orbit-visual {
  height: 410px;
  position: relative;
  display: grid;
  place-items: center;
}

.orbit {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
}

.orbit-one { width: 330px; height: 330px; }
.orbit-two { width: 245px; height: 245px; border-color: rgba(255, 118, 95, 0.4); }
.orbit-three { width: 160px; height: 160px; border-style: dashed; }

.focus-center {
  width: 138px;
  height: 138px;
  display: flex;
  position: relative;
  z-index: 2;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 20px 45px rgba(255, 118, 95, 0.32);
  text-align: center;
}

.focus-center span {
  margin-bottom: 7px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.06em;
  opacity: 0.78;
}

.focus-center strong {
  font-size: 19px;
  line-height: 1.35;
  letter-spacing: 0.06em;
}

.floating-token {
  width: 46px;
  height: 46px;
  display: grid;
  position: absolute;
  z-index: 3;
  place-items: center;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 50%;
  background: #28495d;
  font-family: Georgia, serif;
  font-size: 19px;
  box-shadow: 0 12px 24px rgba(0,0,0,.15);
}

.token-a { top: 64px; right: 46px; }
.token-b { bottom: 58px; right: 54px; background: var(--lavender); }
.token-c { bottom: 74px; left: 32px; background: #5b92a7; }

.focus-footer {
  align-items: center;
  justify-content: flex-start;
  gap: 15px;
  letter-spacing: 0;
}

.focus-footer p {
  margin: 0;
  color: rgba(255,255,255,.58);
  font-size: 10px;
  line-height: 1.7;
}

.focus-footer strong {
  color: #fff;
  font-size: 11px;
}

.mini-bars {
  height: 28px;
  display: flex;
  align-items: flex-end;
  gap: 3px;
}

.mini-bars i {
  width: 3px;
  border-radius: 3px;
  background: var(--coral);
}

.mini-bars i:nth-child(1) { height: 10px; }
.mini-bars i:nth-child(2) { height: 22px; }
.mini-bars i:nth-child(3) { height: 15px; }
.mini-bars i:nth-child(4) { height: 26px; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 660px;
  margin-top: 18px;
  scroll-margin-top: 20px;
}

.stats-grid article {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.4);
}

.stat-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  font-size: 15px;
}

.stat-icon.coral { background: var(--coral); }
.stat-icon.violet { background: var(--lavender); }
.stat-icon.blue { background: var(--blue); }

.stats-grid article div {
  display: flex;
  flex-direction: column;
}

.stats-grid strong {
  font-size: 18px;
  line-height: 1.2;
}

.stats-grid article div span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

/* Question view */
.session-view {
  min-height: calc(100vh - 92px);
  padding: 34px 0 54px;
}

.session-header {
  display: grid;
  grid-template-columns: 1fr minmax(220px, 420px) 1fr;
  align-items: center;
  gap: 24px;
}

.text-button {
  width: fit-content;
  padding: 8px 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

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

.progress-copy {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .13em;
}

.progress-copy strong {
  color: var(--ink);
  letter-spacing: 0;
}

.progress-track {
  height: 5px;
  overflow: hidden;
  border-radius: 5px;
  background: #dfd9cf;
}

.progress-track span {
  width: 12.5%;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--coral);
  transition: width 400ms ease;
}

.difficulty-badge {
  justify-self: end;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.question-layout {
  min-height: 610px;
  display: grid;
  grid-template-columns: minmax(250px, .68fr) minmax(500px, 1.32fr);
  align-items: center;
  gap: clamp(38px, 7vw, 100px);
  padding: 38px 3vw 10px;
}

.question-meta h2 {
  max-width: 340px;
  margin: 18px 0 15px;
  font-size: clamp(35px, 4.4vw, 55px);
  line-height: 1.23;
  letter-spacing: -.05em;
}

.question-meta > p:not(.eyebrow) {
  max-width: 330px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.85;
}

.type-tag {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 99px;
  background: rgba(157, 141, 210, .16);
  color: #66579a;
  font-size: 10px;
  font-weight: 800;
}

.memory-tip {
  display: flex;
  gap: 12px;
  max-width: 340px;
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.memory-tip > span {
  color: var(--coral);
}

.memory-tip p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.65;
}

.memory-tip strong {
  color: var(--ink);
  font-size: 9px;
  letter-spacing: .14em;
}

.training-card {
  min-height: 490px;
  display: flex;
  position: relative;
  flex-direction: column;
  padding: 26px;
  border: 1px solid rgba(23,34,43,.1);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow);
}

.training-card::after {
  content: "";
  width: 110px;
  height: 110px;
  position: absolute;
  right: -18px;
  bottom: -18px;
  z-index: -1;
  border-radius: 28px;
  background: rgba(157, 141, 210, .18);
  transform: rotate(13deg);
}

.training-card-label {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .18em;
}

.training-card-label i {
  height: 1px;
  flex: 1;
  background: var(--line);
}

.stimulus-stage,
.recall-stage {
  min-height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  flex-direction: column;
  padding: 30px 10px 20px;
  text-align: center;
}

.stimulus-content {
  max-width: 100%;
}

.token-row,
.word-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.number-token,
.word-token {
  min-width: 62px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  background: var(--paper);
  box-shadow: inset 0 0 0 1px rgba(23,34,43,.05), 0 8px 18px rgba(24,49,66,.06);
  font-family: Georgia, "Yu Mincho", serif;
  font-size: 34px;
  animation: tokenIn 420ms both;
}

.number-token:nth-child(3n+2),
.word-token:nth-child(3n+2) { background: rgba(157, 141, 210, .15); }
.number-token:nth-child(3n+3),
.word-token:nth-child(3n+3) { background: rgba(255, 118, 95, .12); }

.word-token {
  min-width: 86px;
  height: 58px;
  padding: 0 16px;
  font-family: inherit;
  font-size: 18px;
  font-weight: 700;
}

@keyframes tokenIn {
  from { opacity: 0; transform: translateY(10px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.calculation-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.calc-start {
  min-width: 84px;
  padding: 20px;
  border-radius: 18px;
  background: var(--navy);
  color: #fff;
  font-family: Georgia, serif;
  font-size: 32px;
}

.calc-op {
  padding: 16px 17px;
  border-radius: 15px;
  background: var(--paper);
  color: var(--ink);
  font-size: 20px;
  font-weight: 800;
}

.calc-arrow {
  color: #b0aba2;
  font-size: 16px;
}

.stimulus-caption {
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 22px;
  line-height: 1.7;
}

.recall-stage[hidden],
.stimulus-stage[hidden] {
  display: none;
}

.recall-stage {
  animation: viewIn 380ms ease;
}

.recall-icon {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  margin-bottom: 22px;
  border-radius: 50%;
  background: rgba(157, 141, 210, .14);
}

.recall-icon svg {
  width: 52px;
  fill: none;
  stroke: #7665ad;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.recall-stage strong {
  font-size: 20px;
}

.recall-stage p {
  max-width: 380px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}

.training-actions {
  display: flex;
  justify-content: center;
}

.training-actions .primary-button {
  max-width: 320px;
}

.answer-button {
  background: var(--coral-dark);
  box-shadow: 0 12px 24px rgba(232,95,74,.18);
}

.answer-button:hover:not(:disabled) {
  background: #d75541;
}

/* Answer view */
.answer-view {
  min-height: calc(100vh - 92px);
  padding: 50px 0 70px;
}

.answer-shell {
  max-width: 880px;
  margin: 0 auto;
}

.answer-card {
  min-height: 310px;
  display: grid;
  grid-template-columns: .75fr 1.25fr;
  align-items: center;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--navy);
  color: #fff;
  box-shadow: 0 30px 70px rgba(24,49,66,.18);
}

.answer-card-copy {
  align-self: stretch;
  display: flex;
  justify-content: center;
  flex-direction: column;
  padding: 42px;
  border-right: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.03);
}

.answer-overline {
  color: var(--coral);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .18em;
}

.answer-card h2 {
  margin: 12px 0;
  font-size: 38px;
  letter-spacing: -.04em;
}

.answer-card-copy p {
  margin: 0;
  color: rgba(255,255,255,.55);
  font-size: 11px;
  line-height: 1.7;
}

.answer-display {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 44px 32px;
}

.answer-token {
  min-width: 54px;
  min-height: 58px;
  display: grid;
  place-items: center;
  padding: 9px 13px;
  border-radius: 14px;
  background: rgba(255,255,255,.1);
  font-family: Georgia, "Yu Mincho", serif;
  font-size: 28px;
  animation: tokenIn 380ms both;
}

.answer-token.word {
  min-width: 78px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
}

.answer-single {
  position: relative;
  font-family: Georgia, serif;
  font-size: clamp(74px, 10vw, 118px);
  line-height: 1;
}

.answer-single::after {
  content: "";
  width: 44px;
  height: 5px;
  position: absolute;
  left: 50%;
  bottom: -19px;
  border-radius: 5px;
  background: var(--coral);
  transform: translateX(-50%);
}

.self-check {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin-top: 22px;
  padding: 24px 27px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.45);
}

.self-check h3 {
  margin: 0 0 5px;
  font-size: 16px;
}

.self-check p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.check-buttons {
  display: flex;
  gap: 9px;
}

.check-button {
  min-width: 145px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  transition: 160ms ease;
}

.check-button span {
  margin-right: 5px;
}

.check-button:hover {
  transform: translateY(-1px);
  border-color: rgba(23,34,43,.3);
}

.check-button:disabled {
  cursor: default;
  opacity: .72;
  transform: none;
}

.check-button.retry.is-selected {
  border-color: var(--lavender);
  background: rgba(157,141,210,.14);
  color: #66579a;
}

.check-button.success.is-selected {
  border-color: var(--coral);
  background: rgba(255,118,95,.12);
  color: #cb4f3b;
}

.next-button {
  max-width: 320px;
  margin: 20px 0 0 auto;
}

/* Summary */
.summary-view {
  min-height: calc(100vh - 92px);
  padding: 52px 0 70px;
}

.summary-card {
  max-width: 650px;
  position: relative;
  overflow: hidden;
  margin: 0 auto;
  padding: 56px 42px 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow);
  text-align: center;
}

.summary-card::before,
.summary-card::after {
  content: "";
  width: 150px;
  height: 150px;
  position: absolute;
  border-radius: 50%;
  filter: blur(1px);
}

.summary-card::before { top: -80px; left: -50px; background: rgba(255,118,95,.18); }
.summary-card::after { right: -60px; bottom: -90px; background: rgba(157,141,210,.18); }

.summary-card .eyebrow {
  justify-content: center;
}

.summary-card h2 {
  margin: 0 0 10px;
  font-size: clamp(34px, 5vw, 48px);
  letter-spacing: -.05em;
}

.summary-card > p:not(.eyebrow):not(.summary-message) {
  color: var(--muted);
  font-size: 13px;
}

.score-ring {
  width: 180px;
  height: 180px;
  display: grid;
  position: relative;
  z-index: 2;
  place-items: center;
  margin: 32px auto 26px;
  border-radius: 50%;
  background: conic-gradient(var(--coral) 0%, var(--coral) 0%, var(--paper-deep) 0%);
}

.score-ring::before {
  content: "";
  width: 146px;
  height: 146px;
  position: absolute;
  border-radius: 50%;
  background: var(--white);
}

.score-ring div {
  position: relative;
  z-index: 1;
}

.score-ring strong {
  display: block;
  font-family: Georgia, serif;
  font-size: 58px;
  line-height: 1;
}

.score-ring span {
  color: var(--muted);
  font-size: 11px;
}

.summary-message {
  min-height: 25px;
  margin: 0 0 30px;
  font-weight: 700;
}

.summary-actions {
  max-width: 330px;
  position: relative;
  z-index: 2;
  margin: 0 auto;
}

.summary-actions .text-button {
  margin-top: 12px;
}

.confetti-mark span {
  position: absolute;
  color: var(--coral);
}

.confetti-mark span:nth-child(1) { top: 42px; left: 70px; }
.confetti-mark span:nth-child(2) { top: 78px; right: 70px; color: var(--lavender); font-size: 9px; }
.confetti-mark span:nth-child(3) { top: 145px; right: 100px; color: var(--blue); font-size: 8px; transform: rotate(20deg); }

@media (max-width: 920px) {
  .app-shell { width: min(100% - 34px, 760px); }
  .hero-grid { grid-template-columns: 1fr; }
  .focus-card { min-height: 480px; }
  .orbit-visual { height: 340px; }
  .question-layout { grid-template-columns: 1fr; padding: 60px 0 10px; gap: 30px; }
  .question-meta { text-align: center; }
  .question-meta h2, .question-meta > p:not(.eyebrow), .memory-tip { margin-left: auto; margin-right: auto; }
  .question-meta .eyebrow { justify-content: center; }
  .question-meta h2 { margin-top: 14px; }
  .memory-tip { display: none; }
}

@media (max-width: 650px) {
  .app-shell { width: min(100% - 24px, 540px); }
  .topbar { height: 74px; }
  .brand { font-size: 12px; }
  .brand-mark { width: 30px; height: 30px; }
  .header-stat { padding-right: 0; }
  .header-stat > strong { display: none; }
  .header-leading { gap: 10px; }
  .header-back { padding: 6px 10px 6px 6px; font-size: 11px; }
  .header-back-icon { width: 25px; height: 25px; }
  .home-view { padding-top: 38px; }
  h1 { font-size: 42px; }
  .desktop-only { display: none; }
  .setup-card { padding: 17px; }
  .setting-row { align-items: stretch; flex-direction: column; }
  .segmented-control, .category-pills { display: grid; grid-template-columns: repeat(3, 1fr); }
  .category-pills { grid-template-columns: repeat(2, 1fr); }
  .focus-card { min-height: 430px; padding: 22px; }
  .orbit-visual { height: 310px; transform: scale(.88); }
  .stats-grid { grid-template-columns: 1fr; }
  .stats-grid article { padding: 12px 14px; }
  .session-view { padding-top: 24px; }
  .session-header { grid-template-columns: auto 1fr; }
  .difficulty-badge { display: none; }
  .question-layout { min-height: auto; padding-top: 42px; }
  .question-meta h2 { font-size: 35px; }
  .question-meta > p:not(.eyebrow) { font-size: 16px; }
  .training-card { min-height: 450px; padding: 20px; border-radius: 24px; }
  .stimulus-stage, .recall-stage { min-height: 320px; padding-left: 0; padding-right: 0; }
  .number-token { min-width: 50px; height: 60px; border-radius: 14px; font-size: 28px; }
  .word-token { min-width: 72px; height: 52px; font-size: 15px; }
  .token-row, .word-row { gap: 8px; }
  .calc-start { min-width: 68px; padding: 16px; }
  .calc-op { padding: 13px; }
  .stimulus-caption { font-size: 19px; }
  .recall-stage p { font-size: 15px; }
  .answer-view { padding-top: 36px; }
  .answer-card { grid-template-columns: 1fr; }
  .answer-card-copy { min-height: auto; padding: 27px; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.1); text-align: center; }
  .answer-card-copy p { display: none; }
  .answer-card h2 { margin-bottom: 0; font-size: 30px; }
  .answer-display { min-height: 190px; padding: 36px 20px; }
  .self-check { align-items: stretch; flex-direction: column; padding: 20px; text-align: center; }
  .check-buttons { display: grid; grid-template-columns: 1fr 1fr; }
  .check-button { min-width: 0; padding: 13px 8px; }
  .next-button { max-width: none; }
  .summary-card { padding: 48px 22px 34px; }
}

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