:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #667085;
  --line: #d8dee9;
  --surface: #ffffff;
  --surface-muted: #f6f8fb;
  --accent: #275dad;
  --accent-dark: #1e4784;
  --accent-soft: #eaf1fd;
  --danger: #b42318;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: #eef2f7;
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  line-height: 1.7;
}

button, input { font: inherit; }
button { cursor: pointer; }

.page-shell { width: min(1040px, calc(100% - 32px)); margin: 0 auto; padding: 42px 0 28px; }
.site-header { margin-bottom: 24px; }
.eyebrow { margin: 0 0 6px; color: var(--accent); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(1.55rem, 3vw, 2.35rem); line-height: 1.3; }
h2 { margin: 0 0 18px; font-size: clamp(1.1rem, 2vw, 1.35rem); line-height: 1.55; }

.card { padding: clamp(22px, 4vw, 42px); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 12px 30px rgba(22, 35, 58, .06); }
.view.hidden { display: none; }
.plain-list { padding-left: 1.35rem; color: #344054; }
.plain-list li + li { margin-top: 7px; }
.consent-row { display: flex; gap: 10px; align-items: flex-start; margin: 28px 0 22px; font-weight: 700; }
.consent-row input { width: 20px; height: 20px; margin-top: 4px; accent-color: var(--accent); }
.primary-button { width: 100%; min-height: 50px; padding: 10px 18px; color: white; background: var(--accent); border: 0; border-radius: 9px; font-weight: 700; }
.primary-button:hover:not(:disabled) { background: var(--accent-dark); }
.primary-button:disabled { cursor: not-allowed; opacity: .45; }
.small-note, .question-meta, .feedback { color: var(--muted); font-size: .88rem; }
.small-note { margin: 14px 0 0; }

.status-region { min-height: 0; margin-bottom: 16px; }
.status-message { padding: 12px 16px; color: var(--danger); background: #fff4f2; border: 1px solid #f4c7c2; border-radius: 9px; }
.section-heading, .progress-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.badge { display: inline-flex; align-items: center; min-height: 28px; padding: 2px 10px; color: var(--accent-dark); background: var(--accent-soft); border-radius: 999px; font-size: .82rem; font-weight: 700; }
.progress-track { height: 7px; margin: 12px 0 28px; overflow: hidden; background: #e8ecf2; border-radius: 99px; }
.progress-track span { display: block; width: 0; height: 100%; background: var(--accent); border-radius: inherit; transition: width .2s ease; }
.question-meta { margin: 0 0 10px; }
.image-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 3vw, 30px); margin: 22px 0 28px; }
figure { margin: 0; }
.stimulus-card, .practice-grid figure { overflow: hidden; background: var(--surface-muted); border: 1px solid var(--line); border-radius: 10px; }
.stimulus-card img, .practice-grid img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: contain; background: #edf0f4; }
.stimulus-card figcaption { padding: 7px; text-align: center; font-weight: 700; }
fieldset { padding: 0; border: 0; }
legend { margin-bottom: 10px; font-weight: 700; }
.choice-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.choice { display: flex; min-height: 52px; align-items: center; justify-content: center; padding: 8px 10px; color: #344054; background: #fff; border: 2px solid var(--line); border-radius: 9px; text-align: center; font-weight: 700; cursor: pointer; }
.choice:has(input:checked) { color: var(--accent-dark); background: var(--accent-soft); border-color: var(--accent); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
#next-button { margin-top: 22px; }
.practice-choices button { min-height: 48px; padding: 8px; color: #344054; background: #fff; border: 2px solid var(--line); border-radius: 9px; font-weight: 700; }
.practice-choices button:hover { color: var(--accent-dark); border-color: var(--accent); }
.feedback { min-height: 24px; margin-bottom: 0; }
.complete-mark { display: grid; width: 58px; height: 58px; place-items: center; margin-bottom: 16px; color: white; background: #16845b; border-radius: 50%; font-size: 2rem; }
.site-footer { display: flex; justify-content: space-between; gap: 16px; padding: 20px 4px 0; color: var(--muted); font-size: .78rem; }

@media (max-width: 680px) {
  .page-shell { width: min(100% - 20px, 560px); padding-top: 24px; }
  .image-grid { gap: 8px; }
  .choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer { flex-direction: column; gap: 2px; }
}
