:root {
  color-scheme: light;
  --ink: #17211c;
  --muted: #5d6862;
  --line: #dce3dd;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-solid: #ffffff;
  --canvas: #f4f6f2;
  --primary: #155a43;
  --primary-dark: #0d4532;
  --primary-soft: #e6f2ec;
  --orange: #e66f2d;
  --orange-soft: #fff0e7;
  --success: #16724e;
  --success-soft: #e7f6ee;
  --danger: #b6423b;
  --danger-soft: #fcecea;
  --shadow: 0 24px 70px rgba(25, 47, 36, 0.1);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--canvas);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 4% 0%, rgba(235, 173, 125, 0.16), transparent 28rem),
    radial-gradient(circle at 100% 88%, rgba(86, 148, 116, 0.13), transparent 30rem),
    var(--canvas);
  font-family: "Poppins", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

html[lang="ru"] body {
  font-family: "Manrope", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

button,
summary,
label {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.page-glow {
  position: fixed;
  z-index: -1;
  border-radius: 999px;
  filter: blur(2px);
  pointer-events: none;
}

.page-glow-one {
  top: 10rem;
  left: -11rem;
  width: 22rem;
  height: 22rem;
  background: rgba(255, 215, 181, 0.22);
}

.page-glow-two {
  right: -9rem;
  bottom: 7rem;
  width: 22rem;
  height: 22rem;
  background: rgba(190, 222, 204, 0.23);
}

.app-shell {
  width: min(100% - 40px, 1020px);
  margin: 0 auto;
  padding: 26px 0 72px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  margin-bottom: 54px;
}

.brand {
  display: inline-flex;
  gap: 11px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  overflow: hidden;
  border-radius: 13px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(23, 33, 28, 0.08), 0 9px 20px rgba(33, 70, 139, 0.18);
}

.brand-mark::before,
.brand-mark::after {
  position: absolute;
  width: 42px;
  height: 14px;
  content: "";
}

.brand-mark::before {
  transform: translateY(-14px);
  background: #ae1c28;
}

.brand-mark::after {
  transform: translateY(14px);
  background: #21468b;
}

.brand-mark span {
  position: relative;
  z-index: 1;
  color: #21468b;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.brand strong {
  display: block;
  font-size: 16px;
  line-height: 1.3;
}

.language-switcher {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(211, 222, 214, 0.95);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 8px 24px rgba(25, 47, 36, 0.07);
  backdrop-filter: blur(10px);
}

.language-button {
  display: inline-flex;
  min-width: 48px;
  min-height: 38px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 9px;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  transition: color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.language-button:hover {
  color: var(--ink);
  background: rgba(230, 242, 236, 0.72);
}

.language-button[aria-pressed="true"] {
  color: var(--primary-dark);
  background: var(--surface-solid);
  box-shadow: 0 3px 10px rgba(25, 47, 36, 0.12);
}

.language-button:focus-visible {
  outline: 3px solid rgba(21, 90, 67, 0.22);
  outline-offset: 2px;
}

.language-flag {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1;
}

.screen {
  animation: screen-in 360ms ease both;
}

@keyframes screen-in {
  from {
    transform: translateY(7px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.intro {
  width: min(100%, 680px);
  margin: 0 auto 35px;
  text-align: center;
}

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

.intro h1,
.results-heading h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 54px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.intro > p:last-child,
.results-heading > p:last-child {
  margin: 17px auto 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

.setup-card,
.question-card,
.results-card {
  border: 1px solid rgba(211, 222, 214, 0.9);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.setup-card {
  padding: 9px 40px 0;
}

.form-section {
  min-width: 0;
  margin: 0;
  padding: 32px 0 34px;
  border: 0;
  border-bottom: 1px solid var(--line);
}

.form-section legend {
  display: flex;
  gap: 11px;
  align-items: center;
  padding: 0;
  font-size: 17px;
  font-weight: 700;
}

.step-number {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 8px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 13px;
  font-weight: 800;
}

.section-help {
  margin: 8px 0 18px 37px;
  color: var(--muted);
  font-size: 14px;
}

.choice-grid {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

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

.choice-card {
  position: relative;
  display: flex;
  min-height: 92px;
  cursor: pointer;
}

.choice-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.choice-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  padding: 18px 42px 18px 18px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(248, 250, 248, 0.72);
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.choice-content strong,
.choice-content small {
  display: block;
}

.choice-content strong {
  font-size: 15px;
  font-weight: 700;
}

.choice-content small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.radio-mark {
  position: absolute;
  top: 19px;
  right: 17px;
  width: 18px;
  height: 18px;
  border: 1.5px solid #aab5ae;
  border-radius: 50%;
  background: #fff;
}

.choice-card input:checked + .choice-content {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: 0 0 0 1px var(--primary);
}

.choice-card input:checked ~ .radio-mark {
  border: 5px solid var(--primary);
}

.choice-card input:focus-visible + .choice-content {
  outline: 3px solid rgba(21, 90, 67, 0.18);
  outline-offset: 2px;
}

.group-picker {
  margin-left: 37px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(248, 250, 248, 0.65);
}

.group-picker[open] {
  border-color: #b8c8be;
  background: #fff;
  box-shadow: 0 14px 35px rgba(31, 58, 44, 0.08);
}

.group-picker summary {
  display: flex;
  min-height: 72px;
  cursor: pointer;
  list-style: none;
  align-items: center;
  justify-content: space-between;
  padding: 13px 18px;
}

.group-picker summary::-webkit-details-marker {
  display: none;
}

.group-picker summary small,
.group-picker summary strong {
  display: block;
}

.group-picker summary small {
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.group-picker summary strong {
  font-size: 15px;
}

.chevron {
  width: 9px;
  height: 9px;
  margin-right: 6px;
  transform: rotate(45deg) translateY(-2px);
  border-right: 2px solid #76817a;
  border-bottom: 2px solid #76817a;
  transition: transform 180ms ease;
}

.group-picker[open] .chevron {
  transform: rotate(225deg) translate(-2px, -2px);
}

.group-menu {
  max-height: min(62vh, 560px);
  overflow-y: auto;
  padding: 0 12px 12px;
  border-top: 1px solid var(--line);
  overscroll-behavior: contain;
}

.group-section-label {
  position: sticky;
  top: 0;
  z-index: 1;
  margin: 0 -4px;
  padding: 13px 12px 7px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.96);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.group-option {
  position: relative;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 66px;
  padding: 10px 8px;
  cursor: pointer;
  border-bottom: 1px solid #edf0ed;
}

.group-option:last-child {
  border-bottom: 0;
}

.group-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.check-mark {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 1.5px solid #a7b2ab;
  border-radius: 6px;
  background: #fff;
}

.group-option input:checked ~ .check-mark {
  border-color: var(--primary);
  background: var(--primary);
}

.group-option input:checked ~ .check-mark::after {
  width: 7px;
  height: 4px;
  transform: translateY(-1px) rotate(-45deg);
  border-bottom: 2px solid #fff;
  border-left: 2px solid #fff;
  content: "";
}

.group-option input:focus-visible ~ .check-mark {
  outline: 3px solid rgba(21, 90, 67, 0.18);
  outline-offset: 2px;
}

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

.group-option strong {
  font-size: 14px;
}

.group-option small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.all-groups-option {
  padding-top: 12px;
}

.word-count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.count-control {
  display: flex;
  gap: 28px;
  align-items: flex-end;
  margin: 20px 0 0 37px;
}

.count-control label > span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.count-control input {
  width: 124px;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: #fff;
  font-weight: 700;
  outline: none;
}

.count-control input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(21, 90, 67, 0.12);
}

.quick-counts {
  display: flex;
  gap: 6px;
  padding: 5px;
  border-radius: 12px;
  background: #eef2ee;
}

.quick-counts button {
  min-width: 45px;
  height: 38px;
  cursor: pointer;
  border: 0;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  font-weight: 700;
}

.quick-counts button:hover,
.quick-counts button.active {
  color: var(--primary-dark);
  background: #fff;
  box-shadow: 0 3px 9px rgba(25, 47, 36, 0.08);
}

.quick-counts button:disabled {
  cursor: not-allowed;
  color: #adb5b0;
  background: transparent;
  box-shadow: none;
  transform: none;
}

.count-help {
  margin-top: 10px;
  margin-bottom: 0;
}

.field-error {
  margin: 9px 0 0 37px;
  color: var(--danger);
  font-size: 13px;
  font-weight: 650;
}

.setup-footer {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  margin: 0 -40px;
  padding: 25px 40px;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  background: rgba(247, 249, 247, 0.8);
}

.setup-footer p {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.tip-icon {
  display: inline-grid;
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.button {
  display: inline-flex;
  min-height: 44px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 19px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-weight: 720;
  transition: transform 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(0);
}

.button:focus-visible {
  outline: 3px solid rgba(21, 90, 67, 0.22);
  outline-offset: 2px;
}

.button-primary {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 9px 20px rgba(21, 90, 67, 0.17);
}

.button-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 11px 24px rgba(21, 90, 67, 0.22);
}

.button-large {
  min-width: 170px;
  min-height: 50px;
}

.button-secondary {
  border-color: var(--line);
  background: #fff;
}

.button-secondary:hover {
  border-color: #bdc9c1;
  background: #f9faf9;
}

.button-quiet {
  min-height: 38px;
  padding: 0 13px;
  border-color: var(--line);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.54);
  font-size: 13px;
}

.button-danger {
  color: #fff;
  background: var(--danger);
}

.quiz-screen {
  width: min(100%, 790px);
  margin: 0 auto;
}

.quiz-toolbar,
.progress-copy {
  display: flex;
  align-items: center;
}

.quiz-toolbar {
  justify-content: space-between;
  margin-bottom: 13px;
}

.progress-copy {
  gap: 18px;
  font-size: 13px;
  font-weight: 700;
}

#question-position {
  color: var(--ink);
}

#live-score {
  color: var(--success);
}

.progress-track {
  height: 7px;
  overflow: hidden;
  margin-bottom: 28px;
  border-radius: 999px;
  background: #dee5df;
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), #3d9a72);
  transition: width 300ms ease;
}

.question-card {
  min-height: 480px;
  padding: 36px 48px 42px;
}

.question-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.group-pill,
.direction-label {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 720;
}

.group-pill {
  padding: 0 11px;
  color: var(--primary);
  background: var(--primary-soft);
}

.direction-label {
  color: var(--muted);
}

.prompt-block {
  min-height: 190px;
  padding: 54px 0 38px;
  text-align: center;
}

.prompt-block p {
  margin: 0 0 13px;
  color: var(--muted);
  font-size: 14px;
}

.prompt-block h2 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: clamp(34px, 7vw, 54px);
  font-weight: 720;
  letter-spacing: -0.04em;
  line-height: 1.08;
}

#answer-form label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 700;
}

.answer-row {
  display: flex;
  gap: 10px;
}

.answer-row input {
  min-width: 0;
  height: 54px;
  flex: 1;
  padding: 0 17px;
  border: 1px solid #cfd8d1;
  border-radius: 13px;
  color: var(--ink);
  background: #fff;
  font-size: 17px;
  font-weight: 590;
  outline: none;
}

.answer-row input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(21, 90, 67, 0.12);
}

.answer-row input:disabled {
  color: #737e77;
  background: #f5f7f5;
}

.answer-row .button {
  min-width: 145px;
}

.input-hint {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.feedback {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  align-items: start;
  margin-top: 24px;
  padding: 15px 17px;
  border-radius: 14px;
}

.feedback.correct {
  color: #115c3e;
  background: var(--success-soft);
}

.feedback.incorrect {
  color: #89322d;
  background: var(--danger-soft);
}

.feedback-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
}

.correct .feedback-icon {
  background: var(--success);
}

.incorrect .feedback-icon {
  background: var(--danger);
}

.feedback strong {
  font-size: 14px;
}

.feedback p {
  margin: 2px 0 0;
  font-size: 13px;
}

.results-screen {
  width: min(100%, 850px);
  margin: 0 auto;
}

.results-card {
  padding: 48px;
}

.results-heading {
  text-align: center;
}

.results-heading h1 {
  font-size: clamp(34px, 6vw, 46px);
}

.results-heading > p:last-child {
  max-width: 570px;
  font-size: 16px;
}

.score-panel {
  display: flex;
  gap: 48px;
  align-items: center;
  justify-content: center;
  margin: 38px 0 42px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #f8faf8;
}

.score-ring {
  position: relative;
  display: grid;
  width: 132px;
  height: 132px;
  flex: 0 0 auto;
  place-content: center;
  border-radius: 50%;
  background: conic-gradient(var(--primary) calc(var(--score) * 1%), #dfe6e0 0);
  text-align: center;
}

.score-ring::before {
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: #fff;
  content: "";
}

.score-ring span,
.score-ring small {
  position: relative;
  z-index: 1;
  display: block;
}

.score-ring span {
  font-size: 27px;
  font-weight: 780;
  letter-spacing: -0.04em;
}

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

.result-stats {
  display: grid;
  gap: 10px;
  min-width: 270px;
  margin: 0;
}

.result-stats div {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
}

.result-stats div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.result-stats dt {
  color: var(--muted);
  font-size: 13px;
}

.result-stats dd {
  margin: 0;
  font-size: 14px;
  font-weight: 760;
}

.review-section {
  padding-top: 4px;
}

.review-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 16px;
}

.review-heading .eyebrow {
  margin-bottom: 4px;
}

.review-heading h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.missed-count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.review-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.review-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr);
  gap: 15px;
  align-items: center;
  padding: 14px 17px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.review-item:last-child {
  border-bottom: 0;
}

.review-item span {
  display: block;
  overflow-wrap: anywhere;
}

.review-item .review-label {
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.review-item .review-word {
  font-size: 14px;
  font-weight: 680;
}

.review-arrow {
  color: #a3ada6;
  text-align: center;
}

.perfect-result {
  padding: 28px;
  border: 1px solid #cce3d7;
  border-radius: 16px;
  color: var(--success);
  background: var(--success-soft);
  text-align: center;
  font-size: 15px;
  font-weight: 700;
}

.results-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 32px;
  padding-top: 25px;
  border-top: 1px solid var(--line);
}

.stop-dialog {
  width: min(100% - 32px, 460px);
  padding: 0;
  border: 0;
  border-radius: 22px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 30px 90px rgba(16, 33, 24, 0.3);
}

.stop-dialog::backdrop {
  background: rgba(15, 28, 21, 0.5);
  backdrop-filter: blur(3px);
}

.stop-dialog form {
  padding: 34px;
  text-align: center;
}

.dialog-icon {
  display: grid;
  width: 44px;
  height: 44px;
  margin: 0 auto 16px;
  place-items: center;
  border-radius: 14px;
  color: var(--danger);
  background: var(--danger-soft);
  font-size: 12px;
}

.stop-dialog h2 {
  margin: 0;
  font-size: 23px;
  letter-spacing: -0.03em;
}

.stop-dialog p {
  margin: 10px 0 24px;
  color: var(--muted);
  font-size: 14px;
}

.dialog-actions {
  display: flex;
  gap: 9px;
  justify-content: center;
}

.noscript-message {
  position: fixed;
  right: 20px;
  bottom: 20px;
  left: 20px;
  z-index: 10;
  padding: 16px;
  border-radius: 12px;
  color: #fff;
  background: var(--danger);
  text-align: center;
}

@media (max-width: 760px) {
  .site-header {
    margin-bottom: 38px;
  }

  .direction-grid {
    grid-template-columns: 1fr;
  }

  .choice-card {
    min-height: 72px;
  }

  .count-control {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .question-card {
    padding: 30px 28px 34px;
  }

  .score-panel {
    flex-direction: column;
    gap: 28px;
  }

  .result-stats {
    width: min(100%, 330px);
  }
}

@media (max-width: 560px) {
  .app-shell {
    width: min(100% - 24px, 1020px);
    padding-top: 16px;
  }

  .site-header {
    margin-bottom: 30px;
  }

  .brand {
    min-width: 0;
    gap: 8px;
  }

  .brand strong {
    font-size: 14px;
  }

  .language-button {
    min-width: 44px;
    padding-inline: 7px;
  }

  .intro {
    margin-bottom: 25px;
    text-align: left;
  }

  .intro h1 {
    font-size: 40px;
  }

  .intro > p:last-child {
    font-size: 16px;
  }

  .setup-card {
    padding: 5px 19px 0;
    border-radius: 22px;
  }

  .form-section {
    padding: 26px 0 28px;
  }

  .section-help,
  .group-picker,
  .count-control,
  .field-error {
    margin-left: 0;
  }

  .group-option {
    grid-template-columns: 20px minmax(0, 1fr);
  }

  .word-count {
    display: none;
  }

  .count-control input {
    width: 100%;
  }

  .count-control label {
    width: 100%;
  }

  .quick-counts {
    width: 100%;
  }

  .quick-counts button {
    flex: 1;
  }

  .setup-footer {
    align-items: stretch;
    flex-direction: column;
    margin: 0 -19px;
    padding: 22px 19px;
    border-radius: 0 0 22px 22px;
  }

  .setup-footer .button {
    width: 100%;
  }

  .question-card {
    min-height: 0;
    padding: 25px 19px 28px;
    border-radius: 22px;
  }

  .quiz-toolbar {
    gap: 12px;
  }

  .progress-copy {
    flex-wrap: wrap;
    gap: 4px 14px;
  }

  .question-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .group-pill {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .prompt-block {
    min-height: 168px;
    padding: 43px 0 31px;
  }

  .prompt-block h2 {
    font-size: 38px;
  }

  .answer-row {
    flex-direction: column;
  }

  .answer-row .button {
    min-height: 50px;
  }

  .results-card {
    padding: 34px 20px 24px;
    border-radius: 22px;
  }

  .score-panel {
    margin: 30px 0 36px;
    padding: 24px 16px;
  }

  .result-stats {
    width: 100%;
    min-width: 0;
  }

  .result-stats div {
    gap: 12px;
  }

  .review-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .review-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .review-arrow {
    display: none !important;
  }

  .results-actions,
  .dialog-actions {
    flex-direction: column-reverse;
  }

  .results-actions .button,
  .dialog-actions .button {
    width: 100%;
  }
}

@media (max-width: 400px) {
  .brand > span:last-child {
    display: none;
  }
}

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