/* ---------- base ---------- */
:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-2: #eef3f9;
  --ink: #0f172a;
  --ink-2: #1e293b;
  --muted: #64748b;
  --line: #e2e8f0;
  --accent: #2563eb;
  --accent-soft: #eff4ff;
  --success: #15803d;
  --success-soft: #e9f9ef;
  --danger: #dc2626;
  --danger-soft: #fdeeee;
  --warn: #b45309;
  --warn-soft: #fff7e6;
  --radius: 18px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05), 0 4px 12px rgba(15, 23, 42, .04);
  --shadow-md: 0 12px 32px rgba(15, 23, 42, .08);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 500px at 8% -10%, rgba(37, 99, 235, .10), transparent 60%),
    radial-gradient(800px 500px at 100% 0%, rgba(13, 148, 136, .08), transparent 55%),
    var(--bg);
  color: var(--ink);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

.app {
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: 22px 22px 56px;
}

/* ---------- topbar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 36px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 750;
  letter-spacing: -.01em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #0d9488);
  box-shadow: 0 6px 16px rgba(37, 99, 235, .28);
}

.brand-mark svg { width: 19px; height: 19px; }

.topbar-note {
  font-size: 13px;
  color: var(--muted);
}

/* ---------- home ---------- */
.hero { margin-bottom: 30px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  margin-bottom: 16px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: rgba(255, 255, 255, .7);
  color: #1d4ed8;
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: .02em;
}

.eyebrow-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, .14);
}

.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.08;
  letter-spacing: -.035em;
  font-weight: 800;
}

.hero h1 span {
  background: linear-gradient(100deg, #2563eb 10%, #0d9488 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  max-width: 660px;
  margin: 0;
  color: var(--muted);
  font-size: 16.5px;
}

.test-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
}

.test-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 26px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.test-card:hover {
  transform: translateY(-3px);
  border-color: #cbd5e1;
  box-shadow: var(--shadow-md);
}

.test-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--card-accent), var(--card-accent-2));
}

.test-card[data-test="duben"] { --card-accent: #0d9488; --card-accent-2: #34d399; }
.test-card[data-test="shah"]  { --card-accent: #4f46e5; --card-accent-2: #818cf8; }

.test-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.test-icon {
  flex: none;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: color-mix(in srgb, var(--card-accent) 10%, white);
  color: var(--card-accent);
  border: 1px solid color-mix(in srgb, var(--card-accent) 18%, white);
}

.test-icon svg { width: 26px; height: 26px; }

.test-status {
  font-size: 12px;
  font-weight: 650;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-2);
  white-space: nowrap;
}

.test-status.done { color: var(--success); background: var(--success-soft); }
.test-status.active { color: #1d4ed8; background: var(--accent-soft); }

.test-card h2 {
  margin: 0 0 6px;
  font-size: 23px;
  line-height: 1.2;
  letter-spacing: -.02em;
}

.test-card .desc {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
}

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

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 10px;
  background: var(--surface-2);
  color: #475569;
  font-size: 12.5px;
  font-weight: 600;
}

.chip svg { width: 14px; height: 14px; opacity: .7; }

.card-progress {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.card-progress-label {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
  color: var(--muted);
}

.card-progress-label b { color: var(--ink-2); font-weight: 700; }

.mini-track {
  height: 6px;
  border-radius: 99px;
  background: #e8eef6;
  overflow: hidden;
}

.mini-track > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--card-accent), var(--card-accent-2));
}

.test-card-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
}

.test-card-foot .btn { flex: 1; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 14.5px;
  font-weight: 650;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .15s ease, box-shadow .15s ease;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}

.btn svg { width: 17px; height: 17px; flex: none; }

.btn:hover { background: #e3ebf5; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid rgba(37, 99, 235, .28); outline-offset: 2px; }

.btn-primary {
  color: #fff;
  background: var(--btn-accent, var(--accent));
  box-shadow: 0 8px 18px color-mix(in srgb, var(--btn-accent, var(--accent)) 26%, transparent);
}

.btn-primary:hover { background: color-mix(in srgb, var(--btn-accent, var(--accent)) 88%, black); }

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--muted);
}

.btn-ghost:hover { background: var(--surface-2); color: var(--ink-2); }

.btn-danger { color: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); }

.icon-btn {
  flex: none;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}

.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; }

.home-foot {
  margin-top: 34px;
  color: #94a3b8;
  font-size: 12.5px;
  text-align: center;
}

/* ---------- quiz ---------- */
.quiz-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.quiz-title {
  min-width: 0;
  flex: 1;
}

.quiz-title .crumb {
  display: block;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
}

.quiz-title h1 {
  margin: 1px 0 0;
  font-size: clamp(19px, 2.4vw, 24px);
  letter-spacing: -.02em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quiz-panel {
  padding: 18px 20px;
  background: rgba(255, 255, 255, .72);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
}

.progress-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.progress-main {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -.01em;
}

.progress-main span { color: var(--muted); font-weight: 500; }

.progress-sub {
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
}

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

.track > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2, #0d9488));
  transition: width .25s ease;
}

.palette-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 5px 2px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.palette-toggle:hover { color: var(--ink); }

.palette-toggle svg {
  width: 14px; height: 14px;
  transition: transform .2s ease;
}

.palette-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

.palette {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(38px, 1fr));
  gap: 6px;
  margin-top: 12px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}

.palette button {
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  transition: all .12s ease;
}

.palette button:hover { border-color: #cbd5e1; color: var(--ink); }
.palette button.is-answered { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 22%, white); color: var(--accent); }
.palette button.is-current { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 18%, transparent); }
.palette button.is-current.is-answered { background: var(--accent); border-color: var(--accent); color: #fff; }

.question-card {
  margin-top: 16px;
  padding: clamp(20px, 3vw, 32px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow-sm);
  animation: rise .22s ease both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.question-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.question-num {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 26px;
  padding: 0 8px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 750;
}

.question-text {
  margin: 0 0 22px;
  font-size: clamp(18px, 2.3vw, 21px);
  line-height: 1.42;
  letter-spacing: -.015em;
  font-weight: 700;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.option {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  width: 100%;
  padding: 13px 15px;
  border: 1.5px solid var(--line);
  border-radius: 13px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color .14s ease, background .14s ease, box-shadow .14s ease;
  -webkit-tap-highlight-color: transparent;
}

.option:hover { border-color: #c7d5e6; background: #fbfdff; }
.option:focus-visible { outline: 3px solid rgba(37, 99, 235, .25); outline-offset: 1px; }

.option-letter {
  flex: none;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  margin-top: -2px;
  border-radius: 9px;
  background: #eef3f9;
  color: #64748b;
  font-size: 13px;
  font-weight: 750;
  transition: background .14s ease, color .14s ease;
}

.option-body { flex: 1; min-width: 0; font-size: 15px; line-height: 1.5; }

.option-check {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 4px;
  border-radius: 50%;
  border: 1.5px solid #cbd5e1;
  display: grid;
  place-items: center;
  color: transparent;
  transition: all .14s ease;
}

.option-check svg { width: 12px; height: 12px; }

.option.is-selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 10%, transparent);
}

.option.is-selected .option-letter { background: var(--accent); color: #fff; }
.option.is-selected .option-check { border-color: var(--accent); background: var(--accent); color: #fff; }

.quiz-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
}

.quiz-nav .btn { min-width: 132px; }
.quiz-nav .btn[disabled] { opacity: .45; pointer-events: none; }

.kbd-hint {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 20px;
  color: #94a3b8;
  font-size: 11.5px;
}

kbd {
  display: inline-block;
  min-width: 18px;
  padding: 1px 5px;
  border: 1px solid #d7e0ec;
  border-bottom-width: 2px;
  border-radius: 5px;
  background: #fff;
  font: inherit;
  font-size: 10.5px;
  font-weight: 650;
  color: #64748b;
  text-align: center;
}

/* ---------- result ---------- */
.result-hero {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(20px, 4vw, 36px);
  align-items: center;
  padding: clamp(22px, 4vw, 34px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow-sm);
}

.score-ring {
  --p: 0;
  --ring: var(--success);
  position: relative;
  width: clamp(120px, 18vw, 152px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(var(--ring) calc(var(--p) * 1%), #e8eef6 0);
  display: grid;
  place-items: center;
  transition: background .4s ease;
}

.score-ring::before {
  content: "";
  position: absolute;
  inset: 11px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}

.score-ring-inner { position: relative; text-align: center; line-height: 1; }

.score-ring-inner b {
  display: block;
  font-size: clamp(28px, 4vw, 36px);
  letter-spacing: -.04em;
  font-weight: 800;
}

.score-ring-inner b span { font-size: .5em; font-weight: 700; color: var(--muted); }

.score-ring-inner small {
  display: block;
  margin-top: 7px;
  font-size: 11.5px;
  font-weight: 650;
  color: var(--muted);
  letter-spacing: .03em;
  text-transform: uppercase;
}

.result-copy h1 {
  margin: 0 0 6px;
  font-size: clamp(22px, 3.4vw, 29px);
  letter-spacing: -.03em;
  line-height: 1.15;
}

.result-copy p { margin: 0 0 16px; color: var(--muted); font-size: 14.5px; }

.score-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.score-chip {
  padding: 7px 12px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 650;
  background: var(--surface-2);
  color: #475569;
}

.score-chip.ok { background: var(--success-soft); color: var(--success); }
.score-chip.bad { background: var(--danger-soft); color: var(--danger); }
.score-chip.skip { background: var(--warn-soft); color: var(--warn); }

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.result-actions .btn { min-height: 42px; }

.review-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 30px 0 14px;
}

.review-head h2 {
  margin: 0;
  font-size: 19px;
  letter-spacing: -.02em;
}

.filters { display: flex; flex-wrap: wrap; gap: 6px; }

.filter {
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 650;
  cursor: pointer;
  transition: all .13s ease;
}

.filter:hover { color: var(--ink); border-color: #cbd5e1; }
.filter.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }

.filter b { font-weight: 750; opacity: .75; margin-left: 3px; }

.review-list { display: flex; flex-direction: column; gap: 10px; }

.review-item {
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid #cbd5e1;
  border-radius: 15px;
  box-shadow: var(--shadow-sm);
}

.review-item.ok { border-left-color: #22c55e; }
.review-item.bad { border-left-color: #ef4444; }
.review-item.skip { border-left-color: #f59e0b; }

.review-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.review-num {
  flex: none;
  min-width: 30px;
  height: 26px;
  display: grid;
  place-items: center;
  padding: 0 7px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 750;
}

.review-q {
  flex: 1;
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
  font-weight: 650;
}

.pill {
  flex: none;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
}

.pill.ok { background: var(--success-soft); color: var(--success); }
.pill.bad { background: var(--danger-soft); color: var(--danger); }
.pill.skip { background: var(--warn-soft); color: var(--warn); }

.review-options { display: flex; flex-direction: column; gap: 6px; }

.ro {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #475569;
  font-size: 13.5px;
  line-height: 1.45;
}

.ro-letter {
  flex: none;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #f1f5f9;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 750;
}

.ro-text { flex: 1; min-width: 0; }

.ro-mark {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 1px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}

.ro-mark svg { width: 13px; height: 13px; }

.ro.is-correct { background: var(--success-soft); border-color: #bbf7d0; color: #14532d; }
.ro.is-correct .ro-letter { background: #bbf7d0; color: #15803d; }
.ro.is-correct .ro-mark { color: var(--success); }

.ro.is-wrong { background: var(--danger-soft); border-color: #fecaca; color: #7f1d1d; }
.ro.is-wrong .ro-letter { background: #fecaca; color: var(--danger); }
.ro.is-wrong .ro-mark { color: var(--danger); }

.ro.is-picked:not(.is-correct) { background: var(--danger-soft); border-color: #fecaca; color: #7f1d1d; }
.ro.is-picked:not(.is-correct) .ro-letter { background: #fecaca; color: var(--danger); }
.ro.is-picked:not(.is-correct) .ro-mark { color: var(--danger); }

.empty-state {
  padding: 44px 20px;
  text-align: center;
  color: var(--muted);
  background: var(--surface);
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
  font-size: 14px;
}

.result-foot {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

/* ---------- dialog ---------- */
dialog.modal {
  width: min(440px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 30px 80px rgba(15, 23, 42, .22);
}

dialog.modal::backdrop {
  background: rgba(15, 23, 42, .42);
  backdrop-filter: blur(2px);
}

.modal-body { padding: 24px 24px 18px; }

.modal-body h3 {
  margin: 0 0 8px;
  font-size: 19px;
  letter-spacing: -.02em;
}

.modal-body p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 24px 22px;
}

/* ---------- misc ---------- */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

[hidden] { display: none !important; }

.h1-alt { display: none; }

.fade-in { animation: fade .25s ease both; }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 640px) {
  .app { padding: 14px 12px calc(30px + env(safe-area-inset-bottom)); }
  .topbar { margin-bottom: 24px; }
  .topbar-note { display: none; }
  .test-card { padding: 20px; border-radius: 20px; }
  .test-card-foot .btn { min-height: 48px; }
  .hero h1 { font-size: clamp(28px, 9vw, 36px); }
  .hero p { font-size: 15px; }
  .quiz-top { gap: 8px; }
  .quiz-top .btn { min-height: 40px; padding: 8px 13px; font-size: 13px; }
  .quiz-top .result-retry { display: none; }
  .quiz-title .crumb { display: none; }
  .quiz-title h1 { font-size: 17px; }
  .h1-main { display: none; }
  .h1-alt { display: inline; }
  .quiz-panel { padding: 15px 16px; }
  .question-card { padding: 18px 16px; border-radius: 18px; }
  .option { padding: 13px 12px; gap: 11px; min-height: 52px; }
  .option-body { font-size: 15px; }
  .option-check { width: 22px; height: 22px; }
  .palette { grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 5px; }
  .palette button { height: 44px; font-size: 12.5px; }
  .quiz-nav {
    position: sticky;
    bottom: calc(8px + env(safe-area-inset-bottom));
    z-index: 20;
    margin: 14px -4px 0;
    padding: 8px;
    border-radius: 16px;
    background: rgba(244, 247, 251, .9);
    backdrop-filter: blur(10px);
    box-shadow: 0 -2px 18px rgba(15, 23, 42, .07);
  }
  .quiz-nav .btn { min-width: 0; flex: 1; min-height: 48px; }
  .kbd-hint { display: none; }
  .result-hero { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .score-chips { justify-content: center; }
  .result-actions { justify-content: center; width: 100%; }
  .result-actions .btn { flex: 1; min-width: 140px; }
  .review-head { align-items: flex-start; }
  .review-item { padding: 15px 14px; }
  .review-top { gap: 9px; }
  .review-q { font-size: 14.5px; }
  .ro {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 4px 10px;
    align-items: start;
  }
  .ro-letter { grid-column: 1; grid-row: 1; }
  .ro-text { grid-column: 2; grid-row: 1; }
  .ro-mark { grid-column: 2; grid-row: 2; margin: 0; }
  .result-copy p { margin-bottom: 12px; }
  .result-foot .btn { width: 100%; }
}

@media (max-width: 380px) {
  .quiz-top .btn { padding: 8px 10px; font-size: 12.5px; }
  .question-label span:last-child { display: none; }
  .review-top { flex-wrap: wrap; }
  .pill { margin-left: 39px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
