:root {
  --bg: #f6f5f1;
  --bg-top: #fbfcf8;
  --surface: #ffffff;
  --surface-soft: #eef7f3;
  --surface-warm: #fff5de;
  --ink: #17211f;
  --muted: #66736f;
  --border: #d9ded8;
  --primary: #176b5d;
  --primary-strong: #105548;
  --accent: #9a5b00;
  --accent-bg: #fff3d6;
  --done: #167247;
  --done-bg: #e8f6ed;
  --danger: #b33b3b;
  --danger-bg: #fff0ee;
  --info-bg: #eef4ff;
  --shadow: 0 16px 36px rgba(30, 42, 38, 0.11);
  --radius: 8px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  background: var(--bg);
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  margin: 0;
  background: linear-gradient(180deg, var(--bg-top) 0, var(--bg) 360px);
  overflow-x: hidden;
}

button,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

:focus-visible {
  outline: 3px solid rgba(23, 107, 93, 0.42);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  left: var(--space-4);
  top: var(--space-4);
  z-index: 30;
  transform: translateY(-160%);
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
  padding: var(--space-2) var(--space-3);
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

.app-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top, 0px) + var(--space-4)) var(--space-4) var(--space-3);
}

.brand,
.header-actions,
.card-topline,
.card-meta,
.view-head,
.mode-stats {
  display: flex;
  align-items: center;
}

.brand {
  min-width: 0;
  gap: var(--space-3);
}

.brand > div {
  min-width: 0;
}

.brand img {
  flex: 0 0 auto;
  filter: drop-shadow(0 8px 14px rgba(23, 107, 93, 0.16));
}

.header-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-2);
}

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

h1 {
  font-size: 1.25rem;
  line-height: 1.25;
}

h2 {
  font-size: 1.2rem;
  line-height: 1.35;
}

.brand p,
.home-copy p,
.view-head p,
.metric-label,
.card-index,
.live-message,
.card-source,
.card-label,
.section-label,
.choices-fieldset legend,
.answer-detail span,
.note-status {
  color: var(--muted);
}

.brand p,
.view-head p {
  margin-top: var(--space-1);
  font-size: 0.82rem;
}

.app-shell {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: var(--space-2) var(--space-4) calc(env(safe-area-inset-bottom, 0px) + var(--space-5));
}

.mode-home,
.study-panel,
.review-panel {
  display: grid;
  min-width: 0;
  gap: var(--space-4);
}

.home-copy {
  display: grid;
  max-width: 720px;
  gap: var(--space-2);
  padding-top: var(--space-2);
}

.home-copy h2 {
  font-size: 1.5rem;
}

.home-copy p {
  max-width: 38em;
  font-size: 0.95rem;
  line-height: 1.65;
}

.mode-grid {
  display: grid;
  gap: var(--space-3);
}

.mode-panel {
  display: grid;
  min-width: 0;
  gap: var(--space-3);
  min-height: 260px;
  border: 1px solid rgba(23, 107, 93, 0.2);
  border-radius: var(--radius);
  background: var(--surface);
  color: inherit;
  padding: var(--space-5);
  text-align: left;
  box-shadow: var(--shadow);
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.mode-panel:hover {
  border-color: rgba(23, 107, 93, 0.48);
  box-shadow: 0 18px 42px rgba(30, 42, 38, 0.14);
}

.mode-label,
.status-pill,
.category-pill {
  overflow: hidden;
  width: fit-content;
  max-width: 100%;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mode-label {
  background: var(--surface-soft);
  color: var(--primary-strong);
}

.mode-panel h3 {
  color: var(--ink);
  font-size: 1.35rem;
  font-weight: 850;
  line-height: 1.25;
}

.mode-panel p {
  color: #33413d;
  font-size: 0.96rem;
  font-weight: 650;
  line-height: 1.65;
}

.mode-stats {
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: auto;
}

.mode-stats span {
  min-height: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: #33413d;
  padding: 6px 10px;
  font-size: 0.82rem;
  font-weight: 800;
}

.mode-open-button {
  width: 100%;
  min-height: 52px;
  margin-top: var(--space-2);
  border-radius: var(--radius);
  background: var(--primary);
  color: #fff;
  font-size: 1rem;
  font-weight: 850;
  box-shadow: 0 10px 20px rgba(23, 107, 93, 0.2);
}

.mode-open-button::after {
  content: "›";
  display: inline-block;
  margin-left: var(--space-2);
  font-size: 1.2em;
  line-height: 1;
}

.mode-open-button:hover {
  background: var(--primary-strong);
}

.mode-open-button:active {
  transform: translateY(1px);
}

.home-history-panel {
  display: grid;
  gap: var(--space-3);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
}

.home-history-head {
  display: grid;
  gap: var(--space-3);
}

.home-history-head > div:first-child {
  display: grid;
  gap: var(--space-2);
}

.home-history-head h3 {
  color: var(--ink);
  font-size: 1.12rem;
  font-weight: 850;
  line-height: 1.35;
}

.home-history-head p {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.home-history-sort {
  width: 100%;
}

.question-history-list {
  display: grid;
  overflow: auto;
  max-height: min(68vh, 680px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.question-history-item {
  display: grid;
  min-width: 0;
  gap: var(--space-2);
  padding: var(--space-3);
  border-top: 1px solid rgba(23, 107, 93, 0.12);
}

.question-history-item:first-child {
  border-top: 0;
}

.question-history-item.has-mistakes {
  background: linear-gradient(90deg, rgba(255, 240, 238, 0.78), #fff 46%);
}

.history-question {
  display: -webkit-box;
  overflow: hidden;
  color: #26312e;
  font-size: 0.92rem;
  font-weight: 760;
  line-height: 1.55;
  overflow-wrap: anywhere;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.history-chapter {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 720;
  line-height: 1.45;
}

.history-note {
  border-left: 3px solid rgba(23, 107, 93, 0.42);
  border-radius: calc(var(--radius) - 2px);
  background: #f4faf7;
  color: #2f3b38;
  padding: 8px 10px;
  font-size: 0.84rem;
  font-weight: 650;
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.history-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
}

.history-stat {
  display: grid;
  min-width: 0;
  gap: 2px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  padding: 6px 8px;
  text-align: center;
}

.history-stat span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 780;
}

.history-stat strong {
  color: var(--ink);
  font-size: 0.98rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.history-stat.is-wrong strong {
  color: var(--danger);
}

.history-stat.is-correct strong {
  color: var(--done);
}

.history-open-button {
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--primary-strong);
  font-weight: 850;
}

.history-open-button:hover {
  border-color: rgba(23, 107, 93, 0.42);
  background: #e5f2ed;
}

.history-empty {
  padding: var(--space-4);
  color: var(--muted);
  font-size: 0.9rem;
}

.view-head {
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-3);
}

.view-head > div {
  min-width: 0;
}

.toolbar {
  display: grid;
  gap: var(--space-3);
  min-width: 0;
}

.field {
  display: grid;
  gap: var(--space-2);
  min-width: 0;
}

label,
legend {
  color: #2f3b38;
  font-size: 0.82rem;
  font-weight: 780;
}

select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  padding: 0 var(--space-3);
}

.check-toggle {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: var(--space-2);
  align-self: end;
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: var(--space-2) var(--space-3);
}

.check-toggle input {
  position: relative;
  width: 44px;
  height: 24px;
  margin: 0;
  appearance: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #dfe7e2;
  transition: background-color 140ms ease, border-color 140ms ease;
}

.check-toggle input::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(30, 42, 38, 0.24);
  transition: transform 140ms ease;
}

.check-toggle input:checked {
  border-color: var(--primary);
  background: var(--primary);
}

.check-toggle input:checked::after {
  transform: translateX(20px);
}

.check-toggle input:focus-visible {
  outline: 3px solid rgba(23, 107, 93, 0.42);
  outline-offset: 3px;
}

.check-toggle span {
  min-width: 0;
  color: #2f3b38;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.35;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  border: 0;
}

.segmented legend {
  grid-column: 1 / -1;
  margin-bottom: var(--space-1);
}

.segmented label {
  min-width: 0;
}

.segmented input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented span {
  display: grid;
  min-height: 44px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: #2f3b38;
  font-size: 0.9rem;
  font-weight: 800;
  text-align: center;
}

.segmented input:checked + span {
  border-color: rgba(23, 107, 93, 0.48);
  background: var(--surface-soft);
  color: var(--primary-strong);
  box-shadow: inset 0 0 0 1px rgba(23, 107, 93, 0.18);
}

.segmented input:focus-visible + span {
  outline: 3px solid rgba(23, 107, 93, 0.42);
  outline-offset: 3px;
}

.stats-grid,
.progress-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
}

.stats-grid > div,
.progress-strip > div {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: var(--space-3);
}

.metric-value {
  display: block;
  font-size: 1.25rem;
  font-weight: 850;
  line-height: 1.1;
}

.metric-label {
  display: block;
  margin-top: var(--space-1);
  font-size: 0.76rem;
  font-weight: 750;
}

.flashcard,
.quiz-card {
  display: grid;
  min-width: 0;
  border: 1px solid rgba(23, 107, 93, 0.22);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  touch-action: pan-y;
}

.flashcard {
  grid-template-rows: auto auto 1fr auto;
  gap: var(--space-3);
  min-height: 320px;
  padding: var(--space-5);
}

.flashcard.is-answer {
  border-color: rgba(154, 91, 0, 0.38);
  background: linear-gradient(135deg, rgba(255, 245, 222, 0.86), #fff);
}

.quiz-card {
  gap: var(--space-4);
  padding: var(--space-4);
}

.card-topline,
.card-meta {
  justify-content: space-between;
  gap: var(--space-3);
}

.question-card-status {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
}

.category-pill {
  max-width: 72%;
  background: var(--surface-soft);
  color: var(--primary-strong);
}

.status-pill {
  max-width: 68%;
  background: var(--accent-bg);
  color: var(--accent);
}

.status-pill.is-done {
  background: var(--done-bg);
  color: var(--done);
}

.attempt-pill {
  overflow: hidden;
  width: fit-content;
  max-width: 100%;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: #33413d;
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 820;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-index {
  flex: 0 0 auto;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.card-label,
.section-label,
.choices-fieldset legend,
.answer-detail span {
  font-size: 0.78rem;
  font-weight: 850;
}

.card-body {
  display: grid;
  align-content: center;
  min-height: 160px;
  color: var(--ink);
  font-size: 1.42rem;
  font-weight: 850;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.flashcard.is-answer .card-body {
  font-size: 1.18rem;
  font-weight: 720;
}

.card-source {
  display: -webkit-box;
  overflow: hidden;
  font-size: 0.74rem;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.question-block {
  display: grid;
  gap: var(--space-2);
}

.question-text {
  color: var(--ink);
  font-size: 1.04rem;
  font-weight: 780;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.answer-form {
  min-width: 0;
}

.choices-fieldset {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  border: 0;
}

.choice-list {
  display: grid;
  gap: var(--space-2);
}

.choice-option {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: var(--space-3);
  min-height: 52px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  padding: var(--space-3);
  transition: border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}

.choice-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice-option:hover {
  border-color: rgba(23, 107, 93, 0.42);
}

.choice-option:has(input:focus-visible) {
  outline: 3px solid rgba(23, 107, 93, 0.42);
  outline-offset: 3px;
}

.choice-option input:focus-visible + .choice-marker {
  outline: 3px solid rgba(23, 107, 93, 0.42);
  outline-offset: 3px;
}

.choice-option.is-selected {
  border-color: rgba(23, 107, 93, 0.64);
  background: var(--surface-soft);
  box-shadow: inset 0 0 0 1px rgba(23, 107, 93, 0.2);
}

.choice-option.is-correct {
  border-color: rgba(22, 114, 71, 0.68);
  background: var(--done-bg);
}

.choice-option.is-wrong {
  border-color: rgba(179, 59, 59, 0.62);
  background: var(--danger-bg);
}

.choice-marker {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: #fff;
  color: #33413d;
  font-weight: 850;
}

.choice-option.is-selected .choice-marker {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.choice-option.is-correct .choice-marker {
  border-color: var(--done);
  background: var(--done);
  color: #fff;
}

.choice-option.is-wrong .choice-marker {
  border-color: var(--danger);
  background: var(--danger);
  color: #fff;
}

.choice-text {
  min-width: 0;
  color: #26312e;
  font-size: 0.96rem;
  font-weight: 650;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.result-panel {
  display: grid;
  gap: var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--info-bg);
  padding: var(--space-4);
}

.result-panel.is-correct {
  border-color: rgba(22, 114, 71, 0.3);
  background: var(--done-bg);
}

.result-panel.is-wrong {
  border-color: rgba(179, 59, 59, 0.24);
  background: var(--danger-bg);
}

.result-title {
  font-size: 1rem;
  font-weight: 850;
}

.result-panel.is-correct .result-title {
  color: var(--done);
}

.result-panel.is-wrong .result-title {
  color: var(--danger);
}

.answer-detail {
  display: grid;
  gap: var(--space-1);
}

.answer-detail p {
  color: #26312e;
  font-size: 0.94rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.note-detail {
  display: grid;
  gap: var(--space-2);
}

.note-detail textarea {
  width: 100%;
  min-height: 124px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: var(--space-3);
  resize: vertical;
  line-height: 1.6;
}

.note-detail textarea::placeholder {
  color: #88938f;
}

.note-detail textarea:focus-visible {
  outline: 3px solid rgba(23, 107, 93, 0.42);
  outline-offset: 3px;
}

.note-status {
  min-height: 1.1rem;
  font-size: 0.78rem;
  font-weight: 720;
}

.feedback-media {
  overflow: hidden;
  margin: 0;
  border: 1px solid rgba(23, 107, 93, 0.16);
  border-radius: var(--radius);
  background: #fff;
}

.feedback-media img {
  display: block;
  width: 100%;
  max-height: min(68vh, 720px);
  object-fit: contain;
}

.feedback-credit {
  border-top: 1px solid rgba(23, 107, 93, 0.12);
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
  padding: var(--space-2) var(--space-3);
}

.feedback-credit a {
  color: var(--primary-strong);
  font-weight: 750;
}

.feedback-credit a:hover {
  text-decoration-thickness: 2px;
}

.term-list {
  display: grid;
  gap: var(--space-1);
  margin: 0;
  padding-left: 1.2rem;
  color: #26312e;
  font-size: 0.9rem;
  line-height: 1.55;
}

.primary-actions,
.step-actions {
  display: grid;
  gap: var(--space-2);
}

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

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

.decision-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}

.flash-step-actions {
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  align-items: center;
}

.review-step-actions {
  grid-template-columns: 48px 48px;
  align-items: center;
  justify-content: space-between;
}

.utility-actions {
  display: flex;
  justify-content: center;
  margin-top: calc(var(--space-2) * -1);
}

.primary-button,
.secondary-button,
.success-button,
.review-button,
.done-button,
.outline-button,
.ghost-button,
.text-button,
.icon-button,
.reset-button {
  min-width: 0;
  min-height: 46px;
  border-radius: var(--radius);
  font-weight: 850;
}

.primary-button {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 10px 20px rgba(23, 107, 93, 0.2);
}

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

.secondary-button,
.review-button {
  background: var(--accent-bg);
  color: var(--accent);
}

.success-button,
.done-button {
  background: var(--done-bg);
  color: var(--done);
}

.outline-button,
.ghost-button {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--ink);
  padding: 0 var(--space-3);
}

.text-button {
  background: transparent;
  color: var(--primary-strong);
  padding: 0 var(--space-2);
  overflow-wrap: anywhere;
}

.icon-button {
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--primary-strong);
  font-size: 1.8rem;
  line-height: 1;
}

.reset-button {
  min-height: 34px;
  border: 1px solid transparent;
  background: transparent;
  color: #8b3f3f;
  padding: 0 var(--space-2);
  font-size: 0.76rem;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.reset-button:hover {
  border-color: rgba(179, 59, 59, 0.22);
  background: var(--danger-bg);
}

.live-message {
  min-height: 1.25rem;
  font-size: 0.82rem;
  text-align: center;
}

.empty-state {
  display: grid;
  min-height: 220px;
  place-content: center;
  gap: var(--space-2);
  padding: var(--space-5);
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  color: var(--ink);
}

@media (min-width: 720px) {
  .app-header,
  .app-shell {
    padding-inline: var(--space-5);
  }

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

  .home-history-head {
    grid-template-columns: minmax(0, 1fr) minmax(240px, 0.34fr);
    align-items: end;
  }

  .question-history-item {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.44fr) 72px;
    align-items: center;
  }

  .history-chapter {
    grid-column: 1;
  }

  .history-note {
    grid-column: 1 / -1;
  }

  .history-stats {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .history-open-button {
    grid-column: 3;
    grid-row: 1 / span 2;
  }

  .toolbar {
    grid-template-columns: minmax(180px, 0.7fr) minmax(220px, 0.8fr) minmax(340px, 1.3fr);
    align-items: end;
  }

  .flashcard {
    min-height: 360px;
  }

  .quiz-card {
    padding: var(--space-5);
  }

  .review-actions {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    align-items: center;
  }
}

@media (max-width: 520px) {
  .app-header {
    align-items: flex-start;
  }

  .home-copy h2 {
    font-size: 1.28rem;
  }

  .mode-panel {
    min-height: 210px;
    padding: var(--space-4);
  }

  .mode-panel h3 {
    font-size: 1.2rem;
  }

  .flash-actions,
  .decision-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .app-header,
  .app-shell {
    padding-inline: var(--space-3);
  }

  .brand img {
    width: 40px;
    height: 40px;
  }

  .flashcard,
  .quiz-card {
    padding: var(--space-3);
  }

  .flashcard {
    min-height: 282px;
  }

  .card-body {
    font-size: 1.18rem;
  }

  .flashcard.is-answer .card-body {
    font-size: 1rem;
  }

  .question-text {
    font-size: 1rem;
  }

  .choice-option {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: var(--space-2);
    min-height: 54px;
    padding: var(--space-3);
  }

  .choice-marker {
    width: 30px;
    height: 30px;
  }

  .choice-text {
    font-size: 0.92rem;
  }

  .segmented span {
    font-size: 0.84rem;
  }

  .primary-button,
  .secondary-button,
  .success-button,
  .review-button,
  .done-button {
    min-height: 50px;
  }

  .reset-button {
    font-size: 0.84rem;
  }
}

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