:root {
  --navy-950: #071a38;
  --navy-900: #102a56;
  --navy-800: #183b72;
  --blue-700: #1769c2;
  --blue-600: #1786df;
  --cyan-500: #26c7d9;
  --cyan-100: #dff8fb;
  --orange-500: #ff8a35;
  --orange-100: #fff0e5;
  --green-600: #168b5b;
  --green-100: #e5f8ef;
  --red-600: #d34a4a;
  --red-100: #fff0f0;
  --yellow-500: #f7b731;
  --yellow-100: #fff8dc;
  --ink: #17263d;
  --muted: #627089;
  --line: #d7e1ee;
  --surface: #ffffff;
  --surface-2: #f5f8fc;
  --shadow: 0 18px 50px rgba(16, 42, 86, 0.12);
  --shadow-soft: 0 8px 24px rgba(16, 42, 86, 0.09);
  --radius-xl: 26px;
  --radius-lg: 18px;
  --radius-md: 13px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 8% 0%, rgba(38, 199, 217, 0.18), transparent 25rem),
    radial-gradient(circle at 95% 10%, rgba(255, 138, 53, 0.13), transparent 24rem),
    #eef4fb;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

button, input, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid rgba(23, 134, 223, 0.35);
  outline-offset: 2px;
}

.boot-screen {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 16px;
  color: var(--navy-900);
  font-weight: 800;
}

.brand-mark {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  background: linear-gradient(145deg, var(--blue-600), var(--navy-900));
  color: white;
  box-shadow: var(--shadow);
  letter-spacing: .04em;
}

.landing { min-height: 100vh; padding: 22px; }

.landing-shell {
  width: min(1160px, 100%);
  margin: 0 auto;
  min-height: calc(100vh - 44px);
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 32px;
  background: rgba(255,255,255,.86);
  box-shadow: 0 26px 80px rgba(7,26,56,.16);
  backdrop-filter: blur(14px);
}

.hero-panel {
  position: relative;
  overflow: hidden;
  padding: clamp(34px, 5vw, 70px);
  background:
    linear-gradient(145deg, rgba(7,26,56,.97), rgba(23,105,194,.94)),
    #102a56;
  color: white;
}

.hero-panel::before, .hero-panel::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.hero-panel::before {
  width: 340px; height: 340px; right: -150px; top: -130px;
  background: rgba(38,199,217,.17);
  box-shadow: 0 0 90px rgba(38,199,217,.26);
}
.hero-panel::after {
  width: 260px; height: 260px; left: -150px; bottom: -120px;
  background: rgba(255,138,53,.14);
}

.brand-row { position: relative; z-index: 1; display: flex; align-items: center; gap: 14px; }
.brand-row .brand-mark { width: 64px; height: 64px; border-radius: 19px; background: white; color: var(--navy-900); box-shadow: none; }
.brand-copy strong { display: block; font-size: 1.05rem; letter-spacing: .02em; }
.brand-copy span { color: #bcd6f5; font-size: .82rem; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: clamp(46px, 9vh, 90px);
  padding: 7px 12px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  color: #d8efff;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--cyan-500); box-shadow: 0 0 0 5px rgba(38,199,217,.14); }

.hero-panel h1 {
  position: relative;
  z-index: 1;
  max-width: 630px;
  margin: 22px 0 18px;
  font-size: clamp(2.5rem, 5.5vw, 5rem);
  line-height: .98;
  letter-spacing: -.055em;
}
.hero-panel h1 span { display: block; color: #64e0eb; }
.hero-lead { position: relative; z-index: 1; max-width: 580px; margin: 0; color: #d7e6f8; font-size: clamp(.98rem, 1.4vw, 1.12rem); }

.hero-stats { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-top: 38px; }
.hero-stat { padding: 15px; border: 1px solid rgba(255,255,255,.15); border-radius: 17px; background: rgba(255,255,255,.075); }
.hero-stat strong { display: block; font-size: 1.35rem; }
.hero-stat span { display: block; color: #bcd6f5; font-size: .75rem; }

.setup-panel { padding: clamp(28px, 4vw, 58px); display: flex; align-items: center; }
.setup-card { width: 100%; }
.setup-card h2 { margin: 0 0 6px; color: var(--navy-900); font-size: clamp(1.45rem, 2.6vw, 2rem); letter-spacing: -.03em; }
.setup-subtitle { margin: 0 0 28px; color: var(--muted); font-size: .92rem; }

.form-group { margin-bottom: 19px; }
.form-label { display: block; margin-bottom: 8px; color: var(--navy-900); font-size: .83rem; font-weight: 850; }
.required { color: var(--red-600); }
.field {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: white;
  padding: 0 14px;
  color: var(--ink);
  transition: .18s ease;
}
.field:hover { border-color: #aebfd3; }
.field:focus { border-color: var(--blue-600); box-shadow: 0 0 0 4px rgba(23,134,223,.1); }
.field-grid { display: grid; grid-template-columns: 1fr .7fr; gap: 12px; }

.choice-grid { display: grid; gap: 9px; }
.choice-grid.subjects { grid-template-columns: repeat(3, 1fr); }
.choice-grid.modes { grid-template-columns: repeat(2, 1fr); }
.choice-card { position: relative; }
.choice-card input { position: absolute; opacity: 0; pointer-events: none; }
.choice-card label {
  min-height: 78px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: white;
  color: var(--ink);
  text-align: center;
  transition: .18s ease;
}
.choice-card label strong { font-size: .84rem; line-height: 1.25; }
.choice-card label span { color: var(--muted); font-size: .7rem; }
.choice-card label:hover { transform: translateY(-1px); border-color: #9cbce0; box-shadow: var(--shadow-soft); }
.choice-card input:checked + label { border-color: var(--blue-600); background: #eaf5ff; box-shadow: inset 0 0 0 1px var(--blue-600); color: var(--navy-900); }
.choice-card input:focus-visible + label { outline: 3px solid rgba(23,134,223,.3); outline-offset: 2px; }

.setup-note { display: flex; gap: 9px; margin: 16px 0 20px; padding: 12px 14px; border-radius: 13px; background: var(--cyan-100); color: #24526b; font-size: .79rem; }
.setup-note strong { color: var(--navy-900); }
.link-button { border: 0; padding: 0; background: transparent; color: var(--blue-700); font-weight: 900; text-decoration: underline; }

.btn {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 13px;
  padding: 11px 18px;
  font-weight: 850;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, var(--blue-600), var(--navy-800)); color: white; box-shadow: 0 10px 24px rgba(23,105,194,.24); }
.btn-primary:hover { box-shadow: 0 13px 30px rgba(23,105,194,.3); }
.btn-secondary { border: 1px solid var(--line); background: white; color: var(--navy-900); }
.btn-soft { background: #e9f3ff; color: var(--blue-700); }
.btn-warning { background: var(--yellow-100); color: #845b00; }
.btn-danger { background: var(--red-600); color: white; }
.btn-block { width: 100%; }
.btn:disabled { cursor: not-allowed; opacity: .55; transform: none; }

.exam-shell { min-height: 100vh; }
.exam-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  min-height: 72px;
  padding: 11px clamp(16px, 3vw, 38px);
  border-bottom: 1px solid rgba(215,225,238,.9);
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(14px);
}
.exam-brand { display: flex; align-items: center; gap: 10px; color: var(--navy-900); font-weight: 900; }
.exam-brand .brand-mark { width: 42px; height: 42px; border-radius: 12px; font-size: .78rem; }
.exam-progress { width: min(390px, 34vw); text-align: center; }
.exam-progress-top { display: flex; justify-content: space-between; margin-bottom: 6px; color: var(--muted); font-size: .74rem; font-weight: 750; }
.progress-track { height: 8px; overflow: hidden; border-radius: 99px; background: #e8eef6; }
.progress-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--cyan-500), var(--blue-600)); transition: width .3s ease; }
.header-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
.timer { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px; background: var(--navy-900); color: white; font-variant-numeric: tabular-nums; font-weight: 900; }
.timer.warning { background: #a76c00; }
.timer.danger { background: var(--red-600); animation: pulse 1.1s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(211,74,74,.12); } }

.exam-layout { width: min(1440px, 100%); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 22px; padding: 24px clamp(16px, 3vw, 38px) 100px; }
.question-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-xl); background: var(--surface); box-shadow: var(--shadow); }
.question-top { padding: clamp(18px, 3vw, 30px); border-bottom: 1px solid var(--line); background: linear-gradient(135deg, #f8fbff, #eef8fb); }
.question-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 15px; }
.tag { display: inline-flex; align-items: center; min-height: 28px; padding: 5px 9px; border-radius: 999px; background: #e7f1ff; color: var(--blue-700); font-size: .72rem; font-weight: 850; }
.tag.orange { background: var(--orange-100); color: #a84d0c; }
.tag.dark { background: var(--navy-900); color: white; }
.question-top h1 { margin: 0 0 5px; color: var(--navy-900); font-size: clamp(1.35rem, 2.4vw, 1.95rem); line-height: 1.2; letter-spacing: -.025em; }
.question-indicator { margin: 0; color: var(--muted); font-size: .8rem; }
.question-body { padding: clamp(18px, 3vw, 32px); }
.visual-frame { margin: 0 0 24px; overflow: hidden; border: 1px solid var(--line); border-radius: 19px; background: #eef3f9; }
.visual-frame img { width: 100%; max-height: 500px; display: block; object-fit: contain; background: white; }
.visual-frame figcaption { padding: 9px 14px; border-top: 1px solid var(--line); background: #f7f9fc; color: var(--muted); font-size: .73rem; font-style: italic; text-align: center; }
.stimulus { margin-bottom: 22px; padding: 18px 20px; border-left: 4px solid var(--cyan-500); border-radius: 0 15px 15px 0; background: var(--surface-2); }
.stimulus h2 { margin: 0 0 9px; color: var(--navy-900); font-size: 1.05rem; }
.stimulus p { margin: 0 0 9px; text-align: justify; }
.stimulus p:last-child { margin-bottom: 0; }
.prompt { margin: 0 0 16px; color: var(--navy-900); font-size: clamp(1.02rem, 1.8vw, 1.2rem); line-height: 1.5; }
.answer-hint { margin: -7px 0 14px; color: var(--muted); font-size: .77rem; }

.options { display: grid; gap: 10px; }
.option { position: relative; }
.option input { position: absolute; opacity: 0; pointer-events: none; }
.option label {
  display: grid;
  grid-template-columns: 38px 1fr;
  align-items: start;
  gap: 12px;
  min-height: 58px;
  padding: 11px 14px 11px 11px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: white;
  transition: .17s ease;
}
.option label:hover { border-color: #9abce3; background: #f8fbff; transform: translateX(2px); }
.option-letter { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; background: #edf2f8; color: var(--navy-800); font-weight: 900; }
.option-text { align-self: center; padding-top: 5px; }
.option input:checked + label { border-color: var(--blue-600); background: #eaf5ff; box-shadow: inset 0 0 0 1px var(--blue-600); }
.option input:checked + label .option-letter { background: var(--blue-600); color: white; }
.option input:focus-visible + label { outline: 3px solid rgba(23,134,223,.3); outline-offset: 2px; }

.category-table { width: 100%; border-collapse: separate; border-spacing: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 15px; }
.category-table th, .category-table td { padding: 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.category-table tr:last-child td { border-bottom: 0; }
.category-table th:last-child, .category-table td:last-child { border-right: 0; }
.category-table th { background: var(--navy-900); color: white; font-size: .8rem; }
.category-table th:first-child { text-align: left; }
.category-table td:not(:first-child) { width: 115px; text-align: center; }
.cat-button { min-width: 82px; min-height: 38px; border: 1px solid #bdcada; border-radius: 10px; background: white; color: var(--ink); font-weight: 750; }
.cat-button.selected { border-color: var(--blue-600); background: var(--blue-600); color: white; }

.question-actions { display: flex; align-items: center; gap: 10px; margin-top: 24px; }
.question-actions .spacer { flex: 1; }

.navigator { position: sticky; top: 95px; align-self: start; padding: 20px; border: 1px solid var(--line); border-radius: 22px; background: rgba(255,255,255,.94); box-shadow: var(--shadow-soft); }
.navigator h2 { margin: 0; color: var(--navy-900); font-size: 1rem; }
.navigator-sub { margin: 2px 0 15px; color: var(--muted); font-size: .74rem; }
.number-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.number-btn { aspect-ratio: 1; border: 1px solid var(--line); border-radius: 10px; background: white; color: var(--ink); font-size: .76rem; font-weight: 850; }
.number-btn.answered { border-color: #8fd5b9; background: var(--green-100); color: var(--green-600); }
.number-btn.flagged { border-color: #efcc62; background: var(--yellow-100); color: #895d00; }
.number-btn.current { border-color: var(--blue-600); background: var(--blue-600); color: white; box-shadow: 0 5px 12px rgba(23,134,223,.22); }
.legend { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; color: var(--muted); font-size: .68rem; }
.legend span { display: flex; align-items: center; gap: 6px; }
.dot { width: 10px; height: 10px; border-radius: 3px; background: white; border: 1px solid var(--line); }
.dot.done { background: var(--green-100); border-color: #8fd5b9; }
.dot.flag { background: var(--yellow-100); border-color: #efcc62; }
.dot.now { background: var(--blue-600); border-color: var(--blue-600); }
.navigator .btn { margin-top: 18px; }

.mobile-nav-button { display: none; }
.modal-backdrop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 18px; background: rgba(7,26,56,.72); backdrop-filter: blur(5px); }
.modal { width: min(620px, 100%); max-height: calc(100vh - 36px); overflow: auto; padding: clamp(22px, 4vw, 34px); border-radius: 24px; background: white; box-shadow: 0 30px 90px rgba(7,26,56,.3); }
.modal-icon { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 18px; background: var(--yellow-100); font-size: 1.6rem; }
.modal h2 { margin: 16px 0 6px; color: var(--navy-900); font-size: 1.55rem; }
.modal p { color: var(--muted); }
.summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 20px 0; }
.summary-item { padding: 14px; border-radius: 14px; background: var(--surface-2); text-align: center; }
.summary-item strong { display: block; color: var(--navy-900); font-size: 1.4rem; }
.summary-item span { color: var(--muted); font-size: .72rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

.result-page { min-height: 100vh; padding: 24px; }
.result-shell { width: min(1120px, 100%); margin: 0 auto; }
.result-hero { overflow: hidden; position: relative; display: grid; grid-template-columns: 1fr 280px; gap: 25px; align-items: center; padding: clamp(28px, 5vw, 58px); border-radius: 28px; background: linear-gradient(135deg, var(--navy-950), var(--blue-700)); color: white; box-shadow: var(--shadow); }
.result-hero::after { content: ""; position: absolute; width: 330px; height: 330px; right: -110px; top: -170px; border-radius: 50%; background: rgba(38,199,217,.16); }
.result-kicker { color: #64e0eb; font-weight: 850; text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; }
.result-hero h1 { margin: 7px 0 8px; font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1.05; letter-spacing: -.045em; }
.result-hero p { max-width: 620px; margin: 0; color: #d2e3f6; }
.score-ring { position: relative; z-index: 1; width: 210px; height: 210px; margin: auto; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--cyan-500) var(--score), rgba(255,255,255,.13) 0); }
.score-ring::before { content: ""; position: absolute; inset: 14px; border-radius: 50%; background: var(--navy-900); }
.score-copy { position: relative; text-align: center; }
.score-copy strong { display: block; font-size: 3rem; line-height: 1; }
.score-copy span { color: #c7d9ef; font-size: .75rem; }

.result-cards { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin: 18px 0; }
.result-stat { padding: 18px; border: 1px solid var(--line); border-radius: 17px; background: white; box-shadow: var(--shadow-soft); }
.result-stat span { display: block; color: var(--muted); font-size: .74rem; }
.result-stat strong { display: block; margin-top: 3px; color: var(--navy-900); font-size: 1.5rem; }

.analysis-card { padding: clamp(20px, 3vw, 30px); border: 1px solid var(--line); border-radius: 22px; background: white; box-shadow: var(--shadow-soft); }
.analysis-card h2 { margin: 0 0 4px; color: var(--navy-900); }
.analysis-card > p { margin: 0 0 20px; color: var(--muted); font-size: .84rem; }
.skill-row { display: grid; grid-template-columns: minmax(150px, 260px) 1fr 52px; gap: 14px; align-items: center; margin: 14px 0; }
.skill-name { font-size: .82rem; font-weight: 750; }
.skill-track { height: 10px; overflow: hidden; border-radius: 99px; background: #e8eef6; }
.skill-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--cyan-500), var(--blue-600)); }
.skill-score { color: var(--navy-900); font-size: .84rem; font-weight: 900; text-align: right; }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 0; }

.review-page { min-height: 100vh; padding-bottom: 80px; }
.review-header { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px clamp(16px, 4vw, 46px); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.95); backdrop-filter: blur(12px); }
.review-header h1 { margin: 0; color: var(--navy-900); font-size: 1.15rem; }
.review-shell { width: min(1020px, 100%); margin: 0 auto; padding: 24px 16px; }
.review-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 17px; }
.filter-btn { min-height: 38px; padding: 7px 13px; border: 1px solid var(--line); border-radius: 999px; background: white; color: var(--muted); font-size: .78rem; font-weight: 800; }
.filter-btn.active { border-color: var(--blue-600); background: var(--blue-600); color: white; }
.review-card { margin-bottom: 15px; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: white; box-shadow: var(--shadow-soft); }
.review-card-head { display: flex; justify-content: space-between; gap: 12px; padding: 15px 18px; border-bottom: 1px solid var(--line); background: #f8fafc; }
.review-card-head strong { color: var(--navy-900); }
.status-pill { padding: 5px 9px; border-radius: 999px; font-size: .7rem; font-weight: 900; }
.status-pill.correct { background: var(--green-100); color: var(--green-600); }
.status-pill.partial { background: var(--yellow-100); color: #856000; }
.status-pill.wrong { background: var(--red-100); color: var(--red-600); }
.review-body { padding: 18px; }
.review-body img { width: min(480px, 100%); max-height: 260px; object-fit: contain; display: block; margin: 0 auto 15px; border: 1px solid var(--line); border-radius: 13px; background: white; }
.review-prompt { color: var(--navy-900); font-weight: 850; }
.answer-review { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.answer-box { padding: 13px; border-radius: 13px; background: var(--surface-2); }
.answer-box span { display: block; color: var(--muted); font-size: .7rem; }
.answer-box strong { display: block; margin-top: 3px; font-size: .85rem; }
.explanation { padding: 14px; border-left: 4px solid var(--cyan-500); border-radius: 0 12px 12px 0; background: var(--cyan-100); color: #294d63; font-size: .84rem; }

.toast { position: fixed; z-index: 100; left: 50%; bottom: 25px; transform: translate(-50%, 20px); max-width: calc(100% - 32px); padding: 11px 16px; border-radius: 12px; background: var(--navy-950); color: white; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: .25s ease; font-size: .82rem; font-weight: 750; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.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; }

@media (max-width: 980px) {
  .landing-shell { grid-template-columns: 1fr; }
  .hero-panel { min-height: auto; }
  .eyebrow { margin-top: 40px; }
  .hero-panel h1 { max-width: 700px; }
  .setup-panel { padding-top: 38px; padding-bottom: 44px; }
  .exam-layout { grid-template-columns: 1fr; }
  .navigator { display: none; }
  .mobile-nav-button { display: inline-flex; }
  .exam-header { grid-template-columns: 1fr auto; }
  .exam-progress { position: absolute; left: 0; right: 0; bottom: -8px; width: 100%; }
  .exam-progress-top { display: none; }
  .progress-track { border-radius: 0; height: 5px; }
  .result-hero { grid-template-columns: 1fr 220px; }
  .score-ring { width: 180px; height: 180px; }
}

@media (max-width: 700px) {
  .landing { padding: 0; }
  .landing-shell { min-height: 100vh; border: 0; border-radius: 0; }
  .hero-panel { padding: 28px 22px 42px; }
  .hero-panel h1 { font-size: 2.75rem; }
  .hero-stats { gap: 7px; }
  .hero-stat { padding: 11px 8px; }
  .hero-stat strong { font-size: 1.05rem; }
  .hero-stat span { font-size: .63rem; }
  .setup-panel { padding: 30px 20px 40px; }
  .choice-grid.subjects { grid-template-columns: 1fr; }
  .choice-grid.subjects .choice-card label { min-height: 62px; }
  .field-grid { grid-template-columns: 1fr; }
  .exam-header { min-height: 64px; padding: 9px 12px; }
  .exam-brand .brand-mark { display: none; }
  .exam-brand span { font-size: .8rem; }
  .timer { padding: 7px 9px; font-size: .8rem; }
  .exam-layout { padding: 16px 10px 94px; }
  .question-card { border-radius: 18px; }
  .question-top, .question-body { padding: 17px 15px; }
  .visual-frame img { max-height: 360px; }
  .stimulus { padding: 14px; }
  .stimulus p { text-align: left; font-size: .9rem; }
  .option label { grid-template-columns: 34px 1fr; padding: 10px; }
  .option-letter { width: 32px; height: 32px; border-radius: 9px; }
  .option-text { padding-top: 3px; font-size: .9rem; }
  .question-actions { position: fixed; z-index: 18; left: 0; right: 0; bottom: 0; margin: 0; padding: 10px; border-top: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(12px); }
  .question-actions .btn { min-height: 44px; padding: 9px 12px; font-size: .78rem; }
  .category-table { font-size: .78rem; }
  .category-table th, .category-table td { padding: 8px 6px; }
  .category-table td:not(:first-child) { width: 68px; }
  .cat-button { min-width: 54px; min-height: 36px; padding: 5px; font-size: .72rem; }
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions .btn { width: 100%; }
  .result-page { padding: 0; }
  .result-hero { grid-template-columns: 1fr; border-radius: 0 0 28px 28px; text-align: center; }
  .result-hero p { margin-inline: auto; }
  .score-ring { width: 166px; height: 166px; }
  .result-cards { grid-template-columns: 1fr 1fr; padding: 0 14px; }
  .analysis-card { margin: 0 14px; }
  .skill-row { grid-template-columns: 1fr 48px; gap: 7px; }
  .skill-track { grid-column: 1 / -1; grid-row: 2; }
  .skill-score { grid-column: 2; grid-row: 1; }
  .result-actions { padding: 0 14px 24px; }
  .result-actions .btn { flex: 1 1 45%; }
  .answer-review { grid-template-columns: 1fr; }
}

@media print {
  body { background: white; }
  .result-actions, .review-header .btn, .review-filter { display: none !important; }
  .result-page, .review-page { padding: 0; }
  .result-hero { box-shadow: none; print-color-adjust: exact; }
  .analysis-card, .result-stat, .review-card { box-shadow: none; break-inside: avoid; }
}
