:root {
  --paper: #f1eee6;
  --paper-2: #e8e3d8;
  --paper-3: #fbf9f4;
  --ink: #17201c;
  --muted: #667069;
  --line: #cfc9bc;
  --dark: #17201c;
  --white: #fffdf8;
  --analysis: #4d6b57;
  --linear: #b66842;
  --discrete: #876797;
  --programming: #2f6f88;
  --danger: #a54536;
  --success: #3f6b50;
  --shadow: 0 24px 70px rgba(31, 35, 30, 0.12);
  --radius: 22px;
  --subject-accent: var(--analysis);
  color-scheme: light;
  font-family:
    Inter, "Avenir Next", "Hiragino Kaku Gothic ProN", "Yu Gothic",
    "Noto Sans CJK JP", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 8% 0%, rgba(255, 255, 255, 0.9), transparent 30rem),
    var(--paper);
  color: var(--ink);
}

button,
select,
input {
  font: inherit;
}

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

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(47, 111, 136, 0.45);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  transform: translateY(-160%);
  border-radius: 8px;
  background: var(--dark);
  color: white;
  text-decoration: none;
}

.skip-link:focus {
  transform: none;
}

.site-header {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1280px, calc(100% - 48px));
  height: 92px;
  margin: 0 auto;
  border-bottom: 1px solid rgba(23, 32, 28, 0.14);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: var(--dark);
  color: var(--paper);
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 21px;
  font-weight: 700;
}

.brand-copy {
  display: grid;
  line-height: 1;
}

.brand-copy strong {
  font-size: 15px;
  letter-spacing: 0.15em;
}

.brand-copy small {
  margin-top: 7px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

.save-state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.save-state i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 5px rgba(63, 107, 80, 0.12);
}

.text-button {
  padding: 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.view {
  min-height: calc(100vh - 92px);
}

.hero-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
  gap: clamp(56px, 8vw, 120px);
  align-items: center;
  width: min(1180px, calc(100% - 48px));
  min-height: 650px;
  margin: 0 auto;
  padding: 76px 0 92px;
}

.eyebrow,
.kicker {
  margin: 0 0 20px;
  color: var(--analysis);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.eyebrow.light,
.kicker.light {
  color: #b7c9bc;
}

.hero-copy h1,
.mock-intro-copy h1 {
  margin: 0;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif CJK JP", serif;
  font-size: clamp(64px, 7vw, 104px);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.hero-copy h1 em,
.mock-intro-copy h1 em {
  color: var(--analysis);
  font-style: normal;
}

.hero-lead {
  max-width: 660px;
  margin: 34px 0 0;
  color: #58625c;
  font-size: 17px;
  line-height: 1.9;
}

.hero-actions {
  display: flex;
  gap: 14px;
  align-items: stretch;
  margin-top: 40px;
}

.primary-button,
.secondary-button,
.dark-button {
  display: inline-flex;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.primary-button {
  flex-direction: column;
  min-width: 230px;
  padding: 13px 28px;
  border: 1px solid var(--dark);
  background: var(--dark);
  box-shadow: 0 10px 24px rgba(23, 32, 28, 0.13);
  color: white;
}

.primary-button span {
  font-size: 15px;
}

.primary-button small {
  margin-top: 4px;
  color: #bfc7c1;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.primary-button:hover,
.dark-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(23, 32, 28, 0.18);
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.38;
  transform: none;
}

.primary-button.full {
  width: 100%;
}

.primary-button.inverse {
  border-color: var(--paper);
  background: var(--paper);
  color: var(--ink);
}

.primary-button.inverse small {
  color: var(--muted);
}

.secondary-button {
  padding: 0 26px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.32);
}

.secondary-button:hover {
  transform: translateY(-2px);
  background: var(--white);
}

.dark-button {
  gap: 46px;
  padding: 0 26px;
  border: 1px solid #37413b;
  background: transparent;
  color: white;
}

.exam-ticket {
  position: relative;
  width: 100%;
  max-width: 430px;
  margin-left: auto;
  padding: 28px 30px 22px;
  overflow: hidden;
  border: 1px solid rgba(23, 32, 28, 0.16);
  border-radius: 6px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0.32)),
    repeating-linear-gradient(0deg, transparent 0 28px, rgba(23, 32, 28, 0.025) 28px 29px),
    #dfd9ca;
  box-shadow: var(--shadow);
  transform: rotate(1.2deg);
}

.exam-ticket::before {
  position: absolute;
  inset: 0;
  border: 10px solid rgba(255, 255, 255, 0.18);
  content: "";
  pointer-events: none;
}

.ticket-top,
.ticket-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.ticket-top span {
  font-family: "Yu Mincho", serif;
  font-size: 14px;
  letter-spacing: 0.02em;
}

.ticket-number {
  margin-top: 30px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 112px;
  font-weight: 500;
  letter-spacing: -0.08em;
  line-height: 0.8;
}

.ticket-number span {
  margin-left: 10px;
  font-family: inherit;
  font-size: 18px;
  font-style: italic;
  letter-spacing: 0;
}

.exam-ticket > p {
  margin: 16px 0 28px;
  font-family: "Yu Mincho", serif;
  font-size: 17px;
  letter-spacing: 0.12em;
}

.ticket-flow {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  border-top: 1px solid rgba(23, 32, 28, 0.23);
  list-style: none;
}

.ticket-flow li {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  border-bottom: 1px solid rgba(23, 32, 28, 0.16);
}

.ticket-flow li > span {
  color: #8b8e84;
  font-family: Georgia, serif;
  font-size: 12px;
  font-style: italic;
}

.ticket-flow b {
  font-size: 13px;
}

.ticket-flow small {
  color: var(--muted);
  font-size: 10px;
}

.ticket-cut {
  height: 1px;
  margin: 24px -30px 18px;
  border-top: 1px dashed rgba(23, 32, 28, 0.35);
}

.ticket-footer {
  color: #6f746d;
}

.subject-section,
.coverage-section {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 108px 0;
}

.subject-section {
  border-top: 1px solid var(--line);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 70px;
  align-items: end;
  margin-bottom: 48px;
}

.section-heading.compact {
  margin-bottom: 36px;
}

.section-heading h2,
.exam-day-copy h2,
.setup-header h1,
.dialog-head h2 {
  margin: 0;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(34px, 4.2vw, 58px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.18;
}

.section-heading > p,
.setup-header p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.9;
}

.subject-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.subject-card {
  --card-accent: var(--analysis);
  position: relative;
  min-height: 300px;
  padding: 32px;
  overflow: hidden;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.18);
  cursor: pointer;
  text-align: left;
  transition:
    background 180ms ease,
    transform 180ms ease;
}

.subject-card:hover {
  z-index: 2;
  background: var(--white);
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.subject-card::after {
  position: absolute;
  right: -35px;
  bottom: -80px;
  width: 190px;
  height: 190px;
  border: 38px solid color-mix(in srgb, var(--card-accent), transparent 84%);
  border-radius: 50%;
  content: "";
}

.subject-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.subject-index {
  color: var(--card-accent);
  font-family: Georgia, serif;
  font-size: 14px;
  font-style: italic;
}

.subject-count {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.subject-card h3 {
  margin: 44px 0 12px;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(27px, 3vw, 39px);
  font-weight: 500;
  letter-spacing: -0.03em;
}

.subject-card p {
  max-width: 440px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

.subject-card-bottom {
  position: absolute;
  right: 32px;
  bottom: 28px;
  left: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.subject-progress {
  display: grid;
  grid-template-columns: 120px auto;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 10px;
}

.subject-progress i {
  display: block;
  height: 3px;
  overflow: hidden;
  background: #d9d5ca;
}

.subject-progress i::after {
  display: block;
  width: var(--progress, 0%);
  height: 100%;
  background: var(--card-accent);
  content: "";
}

.subject-arrow {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper-3);
  font-size: 18px;
}

.exam-day-section {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(420px, 1.15fr);
  gap: 80px;
  align-items: center;
  width: min(1280px, calc(100% - 48px));
  margin: 20px auto;
  padding: 86px 72px;
  border-radius: 8px;
  background: var(--dark);
  color: white;
}

.exam-day-copy p:not(.kicker) {
  max-width: 510px;
  margin: 28px 0 34px;
  color: #b8c0bb;
  font-size: 14px;
  line-height: 1.9;
}

.rhythm-card {
  padding: 34px;
  border: 1px solid #3d4842;
  border-radius: 4px;
  background: #1b2520;
}

.rhythm-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  margin-bottom: 34px;
}

.rhythm-head span {
  font-family: "Yu Mincho", serif;
  font-size: 22px;
}

.rhythm-head small {
  max-width: 210px;
  color: #929d96;
  font-size: 10px;
  line-height: 1.6;
  text-align: right;
}

.rhythm-bars {
  display: grid;
  gap: 16px;
}

.rhythm-bars > div {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  height: 46px;
  padding: 0 14px;
  overflow: hidden;
  border: 1px solid #39443e;
  border-radius: 3px;
}

.rhythm-bars > div::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--w);
  background: color-mix(in srgb, var(--tone), transparent 35%);
  content: "";
}

.rhythm-bars span,
.rhythm-bars b {
  position: relative;
  z-index: 1;
  font-size: 12px;
}

.rhythm-total {
  display: flex;
  justify-content: space-between;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid #3a453f;
  color: #b9c2bd;
  font-size: 11px;
}

.coverage-section {
  padding-bottom: 70px;
}

.coverage-list {
  border-top: 1px solid var(--line);
}

.coverage-row {
  --row-accent: var(--analysis);
  display: grid;
  grid-template-columns: 70px 210px 1fr;
  gap: 28px;
  align-items: baseline;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.coverage-row .num {
  color: var(--row-accent);
  font-family: Georgia, serif;
  font-size: 13px;
  font-style: italic;
}

.coverage-row b {
  font-family: "Yu Mincho", serif;
  font-size: 18px;
  font-weight: 600;
}

.coverage-row p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

.home-footer {
  display: flex;
  justify-content: space-between;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 26px 0 46px;
  border-top: 1px solid var(--line);
}

.home-footer p {
  max-width: 820px;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.8;
}

/* Practice setup */
.practice-setup-view {
  padding: 52px 24px 100px;
}

.setup-shell {
  width: min(840px, 100%);
  margin: 0 auto;
}

.back-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.back-link.light {
  color: #b9c2bd;
}

.setup-header {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 28px;
  align-items: center;
  margin: 58px 0 48px;
}

.setup-header h1 {
  margin-bottom: 12px;
}

.subject-monogram {
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--subject-accent), transparent 50%);
  border-radius: 50%;
  background: color-mix(in srgb, var(--subject-accent), transparent 88%);
  color: var(--subject-accent);
  font-family: "Yu Mincho", serif;
  font-size: 36px;
}

.practice-form {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.34);
  box-shadow: 0 18px 55px rgba(30, 36, 31, 0.07);
}

.practice-form fieldset {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 24px;
  align-items: center;
  margin: 0;
  padding: 26px 30px;
  border: 0;
  border-bottom: 1px solid var(--line);
}

.practice-form legend {
  display: contents;
  font-size: 13px;
  font-weight: 800;
}

.select-wrap {
  display: grid;
  grid-template-columns: 70px 1fr;
  align-items: center;
}

.select-wrap label {
  color: var(--muted);
  font-size: 11px;
}

.select-wrap select {
  width: 100%;
  padding: 12px 40px 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper-3);
  color: var(--ink);
  cursor: pointer;
}

.choice-pills {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.choice-pills label {
  position: relative;
  cursor: pointer;
}

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

.choice-pills span {
  display: grid;
  min-height: 42px;
  place-items: center;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.28);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.choice-pills input:checked + span {
  border-color: var(--subject-accent);
  background: color-mix(in srgb, var(--subject-accent), transparent 87%);
  color: var(--subject-accent);
}

.choice-pills input:focus-visible + span {
  outline: 3px solid rgba(47, 111, 136, 0.35);
  outline-offset: 2px;
}

.setup-summary {
  padding: 22px 30px;
  background: var(--paper-2);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.practice-form > .primary-button {
  width: calc(100% - 60px);
  margin: 30px;
}

/* Mock intro */
.mock-intro-view {
  min-height: calc(100vh - 92px);
  padding: 50px 24px 90px;
  background:
    radial-gradient(circle at 80% 10%, rgba(77, 107, 87, 0.24), transparent 31rem),
    var(--dark);
  color: white;
}

.mock-intro-shell {
  width: min(1160px, 100%);
  margin: 0 auto;
}

.mock-intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(380px, 0.75fr);
  gap: 90px;
  align-items: center;
  min-height: 650px;
}

.mock-intro-copy h1 {
  font-size: clamp(50px, 6vw, 82px);
}

.mock-intro-copy h1 em {
  color: #b7c9bc;
}

.mock-intro-copy > p:not(.eyebrow) {
  max-width: 590px;
  margin: 30px 0;
  color: #b8c0bb;
  line-height: 1.9;
}

.language-row {
  display: inline-grid;
  grid-template-columns: auto auto;
  gap: 4px 18px;
  padding: 16px 22px;
  border: 1px solid #3e4943;
  border-radius: 12px;
}

.language-row > span {
  color: #929d96;
  font-size: 10px;
  letter-spacing: 0.12em;
}

.language-row b {
  grid-row: span 2;
  align-self: center;
  font-family: "Yu Mincho", serif;
  font-size: 20px;
}

.language-row small {
  color: #7d8981;
  font-size: 10px;
}

.instruction-panel {
  padding: 34px;
  border: 1px solid #3c4841;
  border-radius: 8px;
  background: rgba(12, 19, 15, 0.38);
}

.panel-label {
  margin: 0 0 28px;
  color: #9daa9f;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.instruction-panel ol {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  border-top: 1px solid #39443e;
  list-style: none;
}

.instruction-panel li {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: start;
  padding: 20px 0;
  border-bottom: 1px solid #39443e;
}

.instruction-panel li > span {
  color: #829086;
  font-family: Georgia, serif;
  font-size: 12px;
  font-style: italic;
}

.instruction-panel li div {
  display: grid;
  gap: 7px;
}

.instruction-panel li b {
  font-size: 13px;
}

.instruction-panel li small {
  color: #8e9a92;
  font-size: 10px;
  line-height: 1.65;
}

.honor-check {
  display: flex;
  gap: 12px;
  align-items: start;
  margin: 26px 0;
  color: #c3cbc6;
  cursor: pointer;
  font-size: 11px;
  line-height: 1.6;
}

.honor-check input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: #9fb7a7;
}

/* Session */
.session-view {
  min-height: 100vh;
  background: #e9e5dc;
}

body:has(.session-view:not([hidden])) .site-header,
body:has(.oral-view:not([hidden])) .site-header,
body:has(.result-view:not([hidden])) .site-header {
  display: none;
}

.session-header {
  position: sticky;
  z-index: 30;
  top: 0;
  display: grid;
  grid-template-columns: 90px minmax(180px, 0.55fr) minmax(250px, 1fr) 150px;
  gap: 24px;
  align-items: center;
  min-height: 84px;
  padding: 12px max(24px, calc((100vw - 1240px) / 2));
  border-bottom: 1px solid #d0cbc0;
  background: rgba(241, 238, 230, 0.96);
  backdrop-filter: blur(14px);
}

.session-exit {
  width: 58px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.session-identity {
  display: grid;
  gap: 4px;
}

.session-identity span,
.session-progress > span,
.session-clock small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.session-identity b {
  font-family: "Yu Mincho", serif;
  font-size: 17px;
}

.session-progress {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: center;
}

.session-progress > div {
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: #d3cec3;
}

.session-progress i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--subject-accent);
  transition: width 200ms ease;
}

.session-clock {
  justify-self: end;
  text-align: right;
}

.session-clock time {
  display: block;
  margin-top: 2px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 29px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.session-clock.warning time {
  color: var(--danger);
  animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
  50% {
    opacity: 0.55;
  }
}

.session-tabs {
  position: sticky;
  z-index: 25;
  top: 84px;
  display: flex;
  gap: 8px;
  justify-content: center;
  overflow-x: auto;
  padding: 14px 24px;
  border-bottom: 1px solid #d0cbc0;
  background: #e9e5dc;
  scrollbar-width: none;
}

.session-tabs::-webkit-scrollbar {
  display: none;
}

.question-tab {
  --tab-accent: var(--subject-accent);
  display: inline-flex;
  flex: 0 0 auto;
  gap: 8px;
  align-items: center;
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid #c9c4b9;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
}

.question-tab::before {
  width: 6px;
  height: 6px;
  border: 1px solid #a5a096;
  border-radius: 50%;
  content: "";
}

.question-tab.answered::before {
  border-color: var(--tab-accent);
  background: var(--tab-accent);
}

.question-tab.active {
  border-color: var(--ink);
  background: var(--ink);
  color: white;
}

.question-tab.active::before {
  border-color: white;
}

.session-layout {
  display: grid;
  grid-template-columns: minmax(0, 820px) 270px;
  gap: 30px;
  justify-content: center;
  align-items: start;
  padding: 48px 24px 100px;
}

.question-paper {
  min-height: 620px;
  padding: clamp(32px, 5vw, 64px);
  border: 1px solid #d1ccc2;
  border-radius: 4px;
  background:
    linear-gradient(90deg, transparent 70px, rgba(190, 101, 80, 0.09) 70px 71px, transparent 71px),
    var(--white);
  box-shadow: 0 20px 55px rgba(34, 38, 33, 0.08);
}

.question-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 36px;
  padding-bottom: 15px;
  border-bottom: 1px solid #dfdbd2;
}

.question-meta span {
  color: var(--subject-accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.question-meta small {
  color: #92978f;
  font-family: Georgia, serif;
  font-size: 11px;
  font-style: italic;
}

.question-prompt {
  color: #1e2622;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif CJK JP", serif;
  font-size: 18px;
  line-height: 1.85;
}

.question-prompt p {
  margin-top: 0;
}

.question-prompt pre {
  margin: 24px 0;
  padding: 20px;
  overflow-x: auto;
  border: 1px solid #d8d3ca;
  border-radius: 3px;
  background: #f4f1e9;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
  line-height: 1.65;
}

.question-prompt code:not(pre code),
.solution-panel code:not(pre code),
.oral-card code:not(pre code) {
  padding: 0.08em 0.32em;
  border-radius: 3px;
  background: #ece8df;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.88em;
}

.mock-paper-meta {
  margin-bottom: 22px;
}

.mock-paper-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.mock-paper-heading h2 {
  margin: 0;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 500;
}

.mock-paper-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.mock-paper-stem {
  padding: 22px 24px;
  border: 1px solid #d8d3ca;
  border-radius: 6px;
  background: #f5f2eb;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 15px;
  line-height: 1.85;
}

.mock-paper-stem > p:first-child {
  margin-top: 0;
}

.mock-paper-stem > p:last-child {
  margin-bottom: 0;
}

.mock-paper-stem pre,
.oral-shared-stem pre {
  margin: 20px 0;
  padding: 18px;
  overflow-x: auto;
  border: 1px solid #d6d1c7;
  border-radius: 4px;
  background: #ece8df;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  line-height: 1.65;
}

.paper-instruction,
.linked-definition {
  margin: 0;
}

.linked-formula {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px dashed #d2cdc3;
}

.common-option-bank {
  margin-top: 18px;
  padding: 20px 22px;
  border: 2px solid #272f2b;
  border-radius: 6px;
  background: white;
}

.common-option-bank > b {
  font-family: "Yu Mincho", serif;
  font-size: 16px;
}

.common-option-bank > p {
  display: inline;
  margin-left: 10px;
  color: var(--muted);
  font-size: 9px;
}

.common-option-bank > div {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px 18px;
  margin-top: 16px;
}

.common-option-bank > div > span {
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 0;
  font-size: 13px;
}

.common-option-bank i {
  color: var(--muted);
  font-family: Georgia, serif;
  font-size: 12px;
  font-style: normal;
}

.mock-subquestions {
  display: grid;
  margin-top: 28px;
  border-top: 1px solid #d6d1c7;
}

.mock-subquestion {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid #d6d1c7;
}

.mock-subquestion-number {
  padding-top: 4px;
  color: var(--subject-accent);
  font-family: Georgia, serif;
  font-size: 11px;
  font-style: italic;
}

.mock-subquestion .question-prompt {
  font-size: 15px;
}

.mock-subquestion .question-prompt p {
  margin-bottom: 12px;
}

.blank-label {
  display: inline-grid;
  min-width: 36px;
  height: 28px;
  place-items: center;
  margin-right: 8px;
  border: 1px solid #bab5aa;
  border-radius: 3px;
  background: white;
  font-family: Georgia, serif;
  font-size: 12px;
  font-style: italic;
}

.compact-answer-options {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.compact-answer-options label {
  position: relative;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid #c9c4ba;
  border-radius: 50%;
  background: white;
  color: var(--muted);
  cursor: pointer;
  transition:
    border 140ms ease,
    background 140ms ease,
    color 140ms ease;
}

.compact-answer-options input,
.mock-choice-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.compact-answer-options label:hover,
.compact-answer-options label.selected {
  border-color: var(--subject-accent);
  background: var(--subject-accent);
  color: white;
}

.compact-answer-options span {
  font-family: Georgia, serif;
  font-size: 12px;
}

.mock-choice-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.mock-choice-options label {
  position: relative;
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 8px;
  align-items: center;
  min-height: 44px;
  padding: 8px 11px;
  border: 1px solid #d0cbc1;
  border-radius: 6px;
  background: white;
  cursor: pointer;
}

.mock-choice-options label:hover,
.mock-choice-options label.selected {
  border-color: var(--subject-accent);
  background: color-mix(in srgb, var(--subject-accent), transparent 92%);
}

.mock-choice-options label > span {
  color: var(--subject-accent);
  font-family: Georgia, serif;
  font-size: 12px;
}

.mock-choice-options label > b {
  font-size: 12px;
  font-weight: 500;
}

.direct-answer {
  display: flex;
  gap: 10px;
  align-items: center;
}

.direct-answer > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.direct-answer input {
  width: 140px;
  height: 44px;
  padding: 0 14px;
  border: 1px solid #bdb8ae;
  border-radius: 5px;
  background: white;
  color: var(--ink);
  font-family: Georgia, serif;
  font-size: 20px;
}

.truth-table {
  display: grid;
  grid-template-columns: repeat(3, 74px);
  width: max-content;
  margin: 22px auto 4px;
  border-top: 1px solid #aaa69d;
  border-left: 1px solid #aaa69d;
  background: white;
}

.truth-table > * {
  display: grid;
  min-height: 38px;
  place-items: center;
  border-right: 1px solid #aaa69d;
  border-bottom: 1px solid #aaa69d;
}

.truth-table > span {
  background: #e8e4da;
  font-size: 11px;
}

.truth-table > b {
  font-family: Georgia, serif;
  font-size: 13px;
  font-weight: 500;
}

.trace-table {
  display: grid;
  gap: 8px;
  width: max-content;
  max-width: 100%;
  margin: 22px auto 4px;
  padding: 18px;
  border: 1px solid #bdb8ae;
  background: white;
}

.trace-row {
  display: grid;
  grid-template-columns: repeat(5, 54px);
  gap: 7px;
}

.trace-row span,
.output-blanks span {
  display: grid;
  min-height: 34px;
  place-items: center;
  font-family: Georgia, serif;
  font-size: 16px;
}

.trace-row .table-blank,
.output-blanks span {
  border: 1px solid #8f8c84;
  background: #f2efe8;
  font-size: 12px;
  font-style: italic;
}

.output-blanks {
  display: grid;
  grid-template-columns: repeat(5, 62px);
  gap: 8px;
  width: max-content;
  max-width: 100%;
  margin: 20px auto 4px;
}

.mock-paper-footnote {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 9px;
  text-align: right;
}

.answer-options {
  display: grid;
  gap: 11px;
  margin-top: 32px;
}

.answer-option {
  position: relative;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  align-items: start;
  padding: 15px 18px;
  border: 1px solid #d5d0c6;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.62);
  cursor: pointer;
  transition:
    border 150ms ease,
    background 150ms ease,
    transform 150ms ease;
}

.answer-option:hover {
  border-color: #9da49e;
  background: white;
  transform: translateX(2px);
}

.answer-option input {
  position: absolute;
  opacity: 0;
}

.answer-mark {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid #c7c3b9;
  border-radius: 50%;
  color: var(--muted);
  font-family: Georgia, serif;
  font-size: 12px;
}

.answer-text {
  padding-top: 3px;
  font-size: 14px;
  line-height: 1.7;
}

.answer-option.selected {
  border-color: var(--subject-accent);
  background: color-mix(in srgb, var(--subject-accent), transparent 92%);
}

.answer-option.selected .answer-mark {
  border-color: var(--subject-accent);
  background: var(--subject-accent);
  color: white;
}

.answer-option.correct {
  border-color: var(--success);
  background: #edf5ef;
}

.answer-option.incorrect {
  border-color: var(--danger);
  background: #f8eeeb;
}

.answer-option.locked {
  cursor: default;
  transform: none;
}

.solution-panel {
  margin-top: 28px;
  padding: 24px;
  border-left: 3px solid var(--subject-accent);
  border-radius: 0 8px 8px 0;
  background: #ece8df;
  font-size: 13px;
  line-height: 1.8;
}

.solution-panel > b {
  display: block;
  margin-bottom: 12px;
  color: var(--subject-accent);
  font-size: 10px;
  letter-spacing: 0.14em;
}

.solution-panel p:last-child {
  margin-bottom: 0;
}

.oral-box {
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid color-mix(in srgb, var(--subject-accent), transparent 62%);
  border-radius: 8px;
  background: color-mix(in srgb, var(--subject-accent), transparent 92%);
}

.oral-box span {
  display: block;
  margin-bottom: 8px;
  color: var(--subject-accent);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.session-side {
  position: sticky;
  top: 154px;
  display: grid;
  gap: 14px;
}

.side-card {
  padding: 22px;
  border: 1px solid #d0cbc0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.32);
}

.side-card h3 {
  margin: 0 0 15px;
  font-family: "Yu Mincho", serif;
  font-size: 16px;
}

.side-card p,
.side-card li {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}

.side-card ul {
  margin: 0;
  padding-left: 16px;
}

.side-card .primary-button,
.side-card .secondary-button {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  margin-top: 12px;
  padding-right: 16px;
  padding-left: 16px;
}

.next-button {
  display: inline-flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  padding: 0 17px;
  border: 1px solid var(--ink);
  border-radius: 9px;
  background: var(--ink);
  color: white;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.next-button:disabled {
  border-color: #c6c1b7;
  background: #d2cdc3;
  color: #8f918c;
  cursor: not-allowed;
}

.keyboard-hint {
  text-align: center;
}

/* Oral */
.oral-view {
  min-height: 100vh;
  background: var(--dark);
  color: white;
}

.oral-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding: 56px 0 30px;
  border-bottom: 1px solid #3d4942;
}

.oral-header h1 {
  margin: 0;
  font-family: "Yu Mincho", serif;
  font-size: clamp(27px, 4vw, 45px);
  font-weight: 500;
}

.oral-clock {
  text-align: right;
}

.oral-clock small {
  display: block;
  margin-bottom: 5px;
  color: #8f9a93;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.oral-clock time {
  font-family: Georgia, serif;
  font-size: 38px;
  font-variant-numeric: tabular-nums;
}

.oral-clock.warning time {
  color: #e7977e;
}

.oral-shell {
  display: grid;
  grid-template-columns: 190px minmax(0, 850px);
  gap: 46px;
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding: 44px 0 100px;
}

.oral-rail {
  display: grid;
  align-content: start;
  gap: 8px;
}

.oral-step {
  --oral-accent: var(--analysis);
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: center;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid #3b4640;
  border-radius: 8px;
  background: transparent;
  color: #8e9992;
  text-align: left;
}

.oral-step span {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 1px solid #536058;
  border-radius: 50%;
  font-family: Georgia, serif;
  font-size: 9px;
}

.oral-step b {
  font-size: 10px;
}

.oral-step.active {
  border-color: var(--oral-accent);
  background: color-mix(in srgb, var(--oral-accent), transparent 78%);
  color: white;
}

.oral-step.done span {
  border-color: var(--oral-accent);
  background: var(--oral-accent);
  color: white;
}

.oral-card {
  min-height: 550px;
  padding: clamp(28px, 5vw, 54px);
  border: 1px solid #414d46;
  border-radius: 8px;
  background: #1b2520;
}

.oral-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
  padding-bottom: 16px;
  border-bottom: 1px solid #3c4841;
}

.oral-card-head span {
  color: #adbbb1;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.oral-card-head small {
  color: #7d8a82;
  font-family: Georgia, serif;
  font-style: italic;
}

.oral-shared-stem {
  margin-bottom: 30px;
  padding: 20px;
  border: 1px solid #3d4a42;
  border-radius: 6px;
  background: #202d26;
  color: #d6ddd8;
  font-family: "Yu Mincho", serif;
  font-size: 12px;
  line-height: 1.75;
}

.oral-shared-stem > p:first-child {
  margin-top: 0;
}

.oral-shared-stem > p:last-child {
  margin-bottom: 0;
}

.oral-shared-stem pre {
  border-color: #445149;
  background: #18231d;
  color: #e1e6e2;
}

.oral-shared-stem .linked-formula {
  border-top-color: #445149;
}

.oral-shared-stem .truth-table,
.oral-shared-stem .trace-table {
  color: var(--ink);
}

.oral-prompt-list {
  display: grid;
  gap: 28px;
}

.oral-prompt-item {
  padding-bottom: 26px;
  border-bottom: 1px solid #35413a;
}

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

.oral-prompt-item > span {
  color: #829087;
  font-family: Georgia, serif;
  font-size: 10px;
  font-style: italic;
}

.oral-prompt-item .question-prompt {
  margin-top: 10px;
  color: #f1f2ee;
  font-size: 15px;
}

.oral-selection {
  margin-top: 14px;
  padding: 12px 14px;
  border-left: 2px solid #718178;
  background: #202d26;
  color: #cbd1cd;
  font-size: 11px;
  line-height: 1.7;
}

.oral-instruction {
  margin: 30px 0 22px;
  padding: 17px 20px;
  border: 1px dashed #526057;
  border-radius: 8px;
  color: #b0b9b3;
  font-size: 11px;
  line-height: 1.7;
}

.oral-card .dark-button {
  width: 100%;
}

/* Result */
.result-view {
  min-height: 100vh;
  padding: 70px 24px 110px;
}

.result-shell {
  width: min(1020px, 100%);
  margin: 0 auto;
}

.result-hero {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 42px;
  align-items: center;
  padding-bottom: 46px;
  border-bottom: 1px solid var(--line);
}

.score-ring {
  display: grid;
  width: 150px;
  height: 150px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background:
    radial-gradient(circle, var(--paper) 58%, transparent 59%),
    conic-gradient(var(--analysis) var(--score-angle), #d7d2c8 0);
}

.score-ring div {
  text-align: center;
}

.score-ring b {
  display: block;
  font-family: Georgia, serif;
  font-size: 45px;
  font-weight: 500;
  line-height: 0.9;
}

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

.result-hero-copy .kicker {
  margin-bottom: 12px;
}

.result-hero-copy h1 {
  margin: 0;
  font-family: "Yu Mincho", serif;
  font-size: clamp(36px, 5vw, 58px);
  font-weight: 500;
  letter-spacing: -0.04em;
}

.result-hero-copy p {
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.result-breakdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 30px 0 60px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.breakdown-card {
  --breakdown-accent: var(--analysis);
  padding: 20px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.breakdown-card span {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.breakdown-card b {
  display: block;
  margin: 12px 0 8px;
  color: var(--breakdown-accent);
  font-family: Georgia, serif;
  font-size: 28px;
  font-weight: 500;
}

.breakdown-card small {
  color: var(--muted);
  font-size: 9px;
}

.result-review h2 {
  margin: 0 0 24px;
  font-family: "Yu Mincho", serif;
  font-size: 30px;
  font-weight: 500;
}

.review-list {
  display: grid;
  gap: 16px;
}

.review-card {
  --review-accent: var(--analysis);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.28);
}

.review-card summary {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 14px;
  align-items: center;
  min-height: 64px;
  padding: 10px 18px;
  cursor: pointer;
  list-style: none;
}

.review-card summary::-webkit-details-marker {
  display: none;
}

.review-status {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: #e2ddd3;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.review-card.is-correct .review-status {
  background: #deebe1;
  color: var(--success);
}

.review-card.is-wrong .review-status {
  background: #f1ded8;
  color: var(--danger);
}

.review-title {
  display: grid;
  gap: 4px;
}

.review-title b {
  font-size: 12px;
}

.review-title small {
  color: var(--muted);
  font-size: 9px;
}

.review-card summary > small {
  color: var(--review-accent);
  font-size: 10px;
  font-weight: 800;
}

.review-body {
  padding: 24px 28px 28px 66px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.8;
}

.review-answer {
  display: grid;
  gap: 7px;
  margin-bottom: 18px;
  padding: 14px;
  border-radius: 7px;
  background: var(--paper-2);
  font-size: 11px;
}

.result-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 46px;
}

/* Dialog */
.history-dialog {
  width: min(760px, calc(100% - 32px));
  max-height: calc(100vh - 48px);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper-3);
  box-shadow: 0 30px 90px rgba(13, 19, 15, 0.28);
}

.history-dialog::backdrop {
  background: rgba(16, 23, 19, 0.56);
  backdrop-filter: blur(4px);
}

.dialog-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  padding: 28px 30px 22px;
  border-bottom: 1px solid var(--line);
}

.dialog-head .kicker {
  margin-bottom: 7px;
}

.dialog-head h2 {
  font-size: 30px;
}

.dialog-head button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.history-content {
  max-height: 65vh;
  padding: 28px 30px 34px;
  overflow-y: auto;
}

.history-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 28px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.history-summary div {
  padding: 18px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.history-summary b {
  display: block;
  font-family: Georgia, serif;
  font-size: 30px;
  font-weight: 500;
}

.history-summary small {
  color: var(--muted);
  font-size: 9px;
}

.history-subjects {
  display: grid;
  gap: 12px;
}

.history-subject-row {
  --history-accent: var(--analysis);
  display: grid;
  grid-template-columns: 150px 1fr 70px;
  gap: 15px;
  align-items: center;
}

.history-subject-row span {
  font-size: 11px;
  font-weight: 700;
}

.history-subject-row i {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #ddd8ce;
}

.history-subject-row i::after {
  display: block;
  width: var(--history-width);
  height: 100%;
  border-radius: inherit;
  background: var(--history-accent);
  content: "";
}

.history-subject-row small {
  color: var(--muted);
  font-size: 9px;
  text-align: right;
}

.history-empty {
  padding: 50px 20px;
  color: var(--muted);
  text-align: center;
}

.toast {
  position: fixed;
  z-index: 100;
  right: 24px;
  bottom: 24px;
  max-width: min(380px, calc(100% - 48px));
  padding: 13px 17px;
  border-radius: 10px;
  background: var(--dark);
  box-shadow: 0 14px 40px rgba(23, 32, 28, 0.22);
  color: white;
  font-size: 11px;
  line-height: 1.6;
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: none;
}

@media (max-width: 960px) {
  .hero-shell {
    grid-template-columns: 1fr;
    gap: 60px;
    padding-top: 60px;
  }

  .exam-ticket {
    max-width: 570px;
    margin: 0;
    transform: none;
  }

  .exam-day-section {
    grid-template-columns: 1fr;
    gap: 50px;
    padding: 64px 44px;
  }

  .mock-intro-grid {
    grid-template-columns: 1fr;
    gap: 50px;
    padding-top: 70px;
  }

  .session-header {
    grid-template-columns: 64px 1fr 120px;
  }

  .session-progress {
    display: none;
  }

  .session-layout {
    grid-template-columns: minmax(0, 760px);
  }

  .session-side {
    position: static;
    grid-row: 1;
    grid-template-columns: 1fr auto;
  }

  .side-card {
    display: none;
  }

  .session-side .side-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
  }

  .oral-shell {
    grid-template-columns: 1fr;
  }

  .oral-rail {
    grid-template-columns: repeat(4, 1fr);
  }

  .oral-step {
    grid-template-columns: 18px 1fr;
    padding: 0 8px;
  }
}

@media (max-width: 700px) {
  .site-header {
    width: calc(100% - 32px);
    height: 74px;
  }

  .brand-copy strong {
    font-size: 13px;
  }

  .brand-copy small,
  .save-state {
    display: none;
  }

  .header-actions {
    gap: 0;
  }

  .view {
    min-height: calc(100vh - 74px);
  }

  .hero-shell,
  .subject-section,
  .coverage-section,
  .exam-day-section,
  .home-footer {
    width: calc(100% - 32px);
  }

  .hero-shell {
    min-height: auto;
    padding: 54px 0 70px;
  }

  .hero-copy h1 {
    font-size: clamp(56px, 17vw, 78px);
  }

  .hero-lead {
    font-size: 15px;
  }

  .hero-actions,
  .result-actions {
    flex-direction: column;
  }

  .hero-actions > *,
  .result-actions > * {
    width: 100%;
  }

  .exam-ticket {
    padding-right: 24px;
    padding-left: 24px;
  }

  .ticket-number {
    font-size: 94px;
  }

  .subject-section,
  .coverage-section {
    padding: 76px 0;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 20px;
  }

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

  .subject-card {
    min-height: 285px;
  }

  .exam-day-section {
    padding: 54px 24px;
  }

  .rhythm-card {
    padding: 23px;
  }

  .rhythm-head {
    display: grid;
    gap: 10px;
  }

  .rhythm-head small {
    text-align: left;
  }

  .coverage-row {
    grid-template-columns: 42px 1fr;
    gap: 16px;
  }

  .coverage-row p {
    grid-column: 2;
  }

  .home-footer {
    display: grid;
    gap: 20px;
  }

  .setup-header {
    grid-template-columns: 68px 1fr;
  }

  .subject-monogram {
    width: 68px;
    height: 68px;
    font-size: 28px;
  }

  .practice-form fieldset {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 22px;
  }

  .choice-pills {
    grid-template-columns: repeat(2, 1fr);
  }

  .practice-form > .primary-button {
    width: calc(100% - 44px);
    margin: 22px;
  }

  .mock-intro-view {
    min-height: calc(100vh - 74px);
  }

  .mock-intro-copy h1 {
    font-size: 48px;
  }

  .instruction-panel {
    padding: 24px;
  }

  .session-header {
    grid-template-columns: 56px 1fr 90px;
    gap: 10px;
    min-height: 72px;
    padding: 10px 14px;
  }

  .session-identity span {
    display: none;
  }

  .session-identity b {
    font-size: 14px;
  }

  .session-clock time {
    font-size: 24px;
  }

  .session-tabs {
    top: 72px;
    justify-content: flex-start;
    padding: 10px 14px;
  }

  .session-layout {
    padding: 18px 12px 70px;
  }

  .question-paper {
    min-height: 0;
    padding: 28px 20px 34px;
    background: var(--white);
  }

  .question-prompt {
    font-size: 16px;
  }

  .mock-paper-heading {
    display: grid;
    gap: 8px;
    align-items: start;
  }

  .mock-paper-stem {
    padding: 18px;
    overflow-x: auto;
  }

  .common-option-bank {
    padding: 17px;
  }

  .common-option-bank > div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mock-subquestion {
    grid-template-columns: 1fr;
    gap: 10px;
  }

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

  .trace-table {
    overflow-x: auto;
  }

  .answer-option {
    grid-template-columns: 30px 1fr;
    padding: 13px;
  }

  .session-side {
    grid-template-columns: 1fr;
  }

  .oral-header,
  .oral-shell {
    width: calc(100% - 32px);
  }

  .oral-header {
    align-items: start;
    padding-top: 34px;
  }

  .oral-header h1 {
    font-size: 22px;
  }

  .oral-clock time {
    font-size: 29px;
  }

  .oral-rail {
    grid-template-columns: repeat(2, 1fr);
  }

  .oral-card {
    min-height: 0;
    padding: 26px 20px;
  }

  .result-view {
    padding-top: 42px;
  }

  .result-hero {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .result-breakdown {
    grid-template-columns: repeat(2, 1fr);
  }

  .review-card summary {
    grid-template-columns: 30px 1fr;
  }

  .review-card summary > small {
    display: none;
  }

  .review-body {
    padding: 20px;
  }

  .history-summary {
    grid-template-columns: 1fr 1fr;
  }

  .history-summary div:last-child {
    grid-column: span 2;
  }

  .history-subject-row {
    grid-template-columns: 100px 1fr;
  }

  .history-subject-row small {
    grid-column: 2;
    text-align: left;
  }
}

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

@media print {
  .site-header,
  .session-header,
  .session-tabs,
  .session-side {
    display: none !important;
  }

  .session-view,
  .session-layout {
    min-height: auto;
    padding: 0;
    background: white;
  }

  .question-paper {
    border: 0;
    box-shadow: none;
  }
}
