:root {
  --paper: oklch(0.955 0.025 78);
  --paper-soft: oklch(0.975 0.018 78);
  --paper-deep: oklch(0.9 0.035 76);
  --ink: oklch(0.19 0.018 55);
  --muted: oklch(0.47 0.025 56);
  --red: oklch(0.56 0.19 29);
  --red-dark: oklch(0.43 0.16 29);
  --red-soft: oklch(0.86 0.07 35);
  --line: oklch(0.29 0.02 55 / 0.26);
  --soft-line: oklch(0.29 0.02 55 / 0.13);
  --focus: oklch(0.56 0.19 29);
  --shadow-hard: 6px 6px 0 var(--ink);
  --shadow-soft: 0 24px 55px -36px oklch(0.23 0.04 45 / 0.45);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --z-grain: 90;
  --z-dialog: 100;
  color-scheme: light;
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--paper);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

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

button:focus-visible,
a:focus-visible,
input:focus-visible + span {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

button:active {
  transform: translateY(2px);
}

[hidden] {
  display: none !important;
}

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

.paper-grain {
  position: fixed;
  inset: 0;
  z-index: var(--z-grain);
  pointer-events: none;
  opacity: 0.16;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.15'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

.screen {
  min-height: 100dvh;
}

.shell {
  width: min(100% - 2rem, 1180px);
  margin-inline: auto;
}

.shell-narrow {
  width: min(100% - 2rem, 940px);
  margin-inline: auto;
}

.topbar,
.quiz-topbar {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 0.72rem;
  color: inherit;
  text-decoration: none;
}

.brand-button {
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.brand-mark {
  width: 36px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  background: var(--red);
  color: var(--paper-soft);
  font-family: "Noto Serif SC", serif;
  font-weight: 900;
  line-height: 1;
  transform: rotate(-4deg);
  box-shadow: 3px 3px 0 var(--ink);
}

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

.brand-copy strong {
  font-size: 0.76rem;
  letter-spacing: 0.12em;
}

.brand-copy small {
  margin-top: 0.22rem;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 600;
}

.header-button,
.text-button {
  min-height: 44px;
  padding: 0.45rem 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.primary-button,
.secondary-button {
  min-height: 52px;
  padding: 0.84rem 1.35rem;
  border: 1px solid var(--ink);
  border-radius: 0;
  font-weight: 800;
  cursor: pointer;
  transition: transform 180ms var(--ease), box-shadow 180ms var(--ease), background-color 180ms var(--ease);
}

.primary-button {
  background: var(--red);
  color: var(--paper-soft);
  box-shadow: 5px 5px 0 var(--ink);
}

.secondary-button {
  background: transparent;
  color: var(--ink);
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
  box-shadow: none;
}

@media (hover: hover) {
  .primary-button:not(:disabled):hover {
    transform: translate(-2px, -2px);
    box-shadow: 7px 7px 0 var(--ink);
  }

  .secondary-button:hover,
  .answer-row:hover {
    background: var(--paper-deep);
  }
}

.intro-screen {
  position: relative;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
}

.intro-screen::before {
  content: "";
  position: absolute;
  width: 280px;
  height: 38px;
  right: -82px;
  top: 19%;
  border-block: 1px solid var(--ink);
  background: var(--red);
  transform: rotate(62deg);
  pointer-events: none;
}

.intro-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(330px, 0.72fr);
  align-items: center;
  gap: clamp(3rem, 8vw, 8rem);
  padding-block: clamp(2.6rem, 6vh, 5.2rem);
}

.intro-copy {
  position: relative;
  z-index: 2;
}

.eyebrow,
.question-kicker,
.section-label {
  margin: 0 0 0.9rem;
  color: var(--red-dark);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.intro-copy h1 {
  max-width: 10ch;
  margin: 0;
  font-family: "Noto Serif SC", serif;
  font-size: clamp(3.35rem, 7.2vw, 6.4rem);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.065em;
}

.intro-copy h1 span,
.intro-copy h1 em {
  display: block;
}

.intro-copy h1 em {
  margin-top: 0.18em;
  color: var(--red);
  font-style: normal;
}

.intro-lede {
  max-width: 34rem;
  margin: 1.45rem 0 0;
  font-size: 1rem;
  line-height: 1.75;
}

.version-selector {
  max-width: 37rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
  margin: 1.55rem 0 0;
  padding: 0;
  border: 0;
}

.version-selector legend {
  width: 100%;
  margin-bottom: 0.65rem;
  font-size: 0.78rem;
  font-weight: 800;
}

.version-selector label {
  position: relative;
  cursor: pointer;
}

.version-selector input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.version-selector label span {
  min-height: 86px;
  display: grid;
  align-content: center;
  gap: 0.28rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--ink);
  background: var(--paper-soft);
  transition: transform 180ms var(--ease), background-color 180ms var(--ease), box-shadow 180ms var(--ease);
}

.version-selector b {
  font-size: 0.98rem;
}

.version-selector small {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.45;
}

.version-selector input:checked + span {
  background: var(--red);
  color: var(--paper-soft);
  box-shadow: 4px 4px 0 var(--ink);
  transform: translate(-2px, -2px);
}

.version-selector input:checked + span small {
  color: var(--paper-soft);
}

.field-help {
  margin: 0.65rem 0 0;
  color: var(--muted);
  font-size: 0.75rem;
}

.intro-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-top: 1.45rem;
}

.score-ticket {
  position: relative;
  width: min(100%, 370px);
  justify-self: end;
  padding: 1.25rem 1.35rem 1.5rem;
  border: 1px solid var(--ink);
  background: var(--paper-soft);
  box-shadow: 12px 12px 0 var(--red);
  transform: rotate(2.2deg);
}

.score-ticket::before,
.score-ticket::after {
  content: "";
  position: absolute;
  width: 22px;
  aspect-ratio: 1;
  top: 57%;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
}

.score-ticket::before { left: -12px; }
.score-ticket::after { right: -12px; }

.ticket-head {
  display: flex;
  justify-content: space-between;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.ticket-score {
  min-height: 190px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  color: var(--red);
  line-height: 0.8;
}

.ticket-score span {
  margin: 0 0.1em 0.18em 0;
  color: var(--ink);
  font-size: 2.4rem;
  font-weight: 900;
}

.ticket-score strong {
  font-family: "Noto Serif SC", serif;
  font-size: clamp(7rem, 13vw, 10rem);
  letter-spacing: -0.1em;
}

.score-ticket > p {
  margin: 0.75rem 0 1.15rem;
  font-family: "Noto Serif SC", serif;
  font-size: 1.2rem;
  font-weight: 900;
  text-align: center;
}

.ticket-rule {
  border-top: 1px dashed var(--ink);
}

.score-ticket dl {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0;
  padding: 1rem 0 0;
}

.score-ticket dl div {
  padding-inline: 0.6rem;
  border-right: 1px solid var(--soft-line);
}

.score-ticket dl div:first-child { padding-left: 0; }
.score-ticket dl div:last-child { padding-right: 0; border-right: 0; }
.score-ticket dt { color: var(--muted); font-size: 0.65rem; }
.score-ticket dd { margin: 0.25rem 0 0; font-weight: 900; font-variant-numeric: tabular-nums; }

.ticket-stamp {
  position: absolute;
  right: 1.1rem;
  bottom: 5.2rem;
  padding: 0.28rem 0.5rem;
  border: 2px solid var(--red);
  color: var(--red);
  font-size: 0.68rem;
  font-weight: 900;
  transform: rotate(-8deg);
}

.intro-foot {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.7rem;
}

.intro-foot p { max-width: 64ch; margin: 0; }
.intro-foot span { flex: none; font-weight: 800; letter-spacing: 0.1em; }

.reveal {
  animation: reveal 520ms var(--ease) both;
  animation-delay: calc(var(--delay) * 110ms);
}

@keyframes reveal {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.quiz-screen {
  background: var(--paper-soft);
}

.question-count {
  margin: 0;
  font-variant-numeric: tabular-nums;
  font-weight: 900;
}

.question-count span:nth-child(1) {
  color: var(--red);
  font-size: 1.4rem;
}

.question-count span:nth-child(2) { margin-inline: 0.35rem; color: var(--muted); }

.progress-track {
  height: 4px;
  margin-top: -2px;
  background: var(--paper-deep);
  overflow: hidden;
}

.progress-track span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--red);
  transform: scaleX(0.03);
  transform-origin: left center;
  transition: transform 360ms var(--ease);
}

.quiz-layout {
  min-height: calc(100dvh - 78px);
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: clamp(2.5rem, 7vw, 6rem);
  align-items: start;
  padding-block: clamp(3.5rem, 9vh, 7rem);
}

.quiz-note {
  padding-top: 0.3rem;
  border-top: 3px solid var(--red);
}

.quiz-note span {
  font-size: 0.72rem;
  font-weight: 900;
}

.quiz-note p {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.7;
}

.question-panel {
  max-width: 660px;
  animation: question-in 420ms var(--ease) both;
}

.question-panel.is-changing {
  animation: question-out 170ms var(--ease) both;
}

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

@keyframes question-out {
  to { opacity: 0; transform: translateY(-10px); }
}

.question-panel h1 {
  max-width: 18ch;
  margin: 0;
  font-family: "Noto Serif SC", serif;
  font-size: clamp(2rem, 4.8vw, 3.55rem);
  line-height: 1.27;
  letter-spacing: -0.045em;
}

.answer-list {
  display: grid;
  gap: 0;
  margin-top: clamp(2rem, 5vh, 3.4rem);
  border-top: 1px solid var(--ink);
}

.answer-row {
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: 34px 1fr 24px;
  align-items: center;
  gap: 0.75rem;
  padding: 0.78rem 0.2rem;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: background-color 150ms var(--ease), color 150ms var(--ease), transform 150ms var(--ease);
}

.answer-row .answer-key {
  color: var(--red);
  font-size: 0.75rem;
  font-weight: 900;
}

.answer-row .answer-text {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.55;
}

.answer-row .answer-mark {
  width: 16px;
  aspect-ratio: 1;
  border: 1px solid var(--ink);
  transform: rotate(45deg);
}

.answer-row.is-selected {
  background: var(--red);
  color: var(--paper-soft);
}

.answer-row.is-selected .answer-key { color: var(--paper-soft); }
.answer-row.is-selected .answer-mark { border-color: var(--paper-soft); background: var(--paper-soft); }

.question-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 1.25rem;
  color: var(--muted);
  font-size: 0.7rem;
}

.result-content {
  padding-block: clamp(3rem, 7vw, 6rem);
}

.score-hero {
  display: grid;
  grid-template-columns: minmax(250px, 0.72fr) minmax(0, 1.2fr);
  gap: clamp(2.5rem, 8vw, 7rem);
  align-items: end;
  padding-bottom: clamp(3rem, 7vw, 5rem);
  border-bottom: 1px solid var(--ink);
}

.score-number {
  position: relative;
  display: inline-flex;
  align-items: flex-end;
  color: var(--red);
  line-height: 0.76;
}

.score-number strong {
  font-family: "Noto Serif SC", serif;
  font-size: clamp(8rem, 19vw, 14rem);
  letter-spacing: -0.1em;
  font-variant-numeric: tabular-nums;
}

.score-number span {
  margin: 0 0 0.22em 0.2em;
  color: var(--ink);
  font-size: 1.5rem;
  font-weight: 900;
}

.score-label {
  margin: 1.15rem 0 0;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.score-heading h1 {
  margin: 0;
  font-family: "Noto Serif SC", serif;
  font-size: clamp(2.4rem, 5.6vw, 4.8rem);
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.score-heading .result-summary {
  max-width: 56ch;
  margin: 1.35rem 0 0;
  font-size: 1rem;
  line-height: 1.8;
}

.score-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.3rem;
}

.score-meta span {
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--line);
  font-size: 0.7rem;
  font-weight: 800;
}

.result-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.7rem;
}

.result-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.7fr);
  gap: clamp(3rem, 8vw, 7rem);
  padding-top: clamp(3rem, 7vw, 5rem);
}

.result-section + .result-section {
  margin-top: 4rem;
}

.result-section h2,
.dimension-panel h2 {
  margin: 0;
  font-family: "Noto Serif SC", serif;
  font-size: clamp(1.7rem, 3vw, 2.55rem);
  line-height: 1.2;
  letter-spacing: -0.035em;
}

.result-section > p:not(.section-label) {
  max-width: 62ch;
  margin: 1.1rem 0 0;
  line-height: 1.8;
}

.strength-list {
  display: grid;
  gap: 0;
  margin: 1.4rem 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--ink);
}

.strength-list li {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.strength-list b {
  color: var(--red);
  font-variant-numeric: tabular-nums;
}

.action-plans {
  margin-top: 1.5rem;
  border-top: 1px solid var(--ink);
}

.action-plan {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1.5rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
}

.action-plan h3 {
  margin: 0;
  color: var(--red-dark);
  font-size: 0.88rem;
}

.action-plan p {
  margin: 0;
  line-height: 1.75;
}

.dimension-panel {
  position: sticky;
  top: 1.5rem;
  align-self: start;
  padding: 1.4rem;
  border: 1px solid var(--ink);
  background: var(--paper-soft);
  box-shadow: 7px 7px 0 var(--red);
}

.dimension-list {
  margin-top: 1.5rem;
  border-top: 1px solid var(--ink);
}

.dimension-row {
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.dimension-row-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.82rem;
  font-weight: 800;
}

.dimension-row-head strong {
  color: var(--red);
  font-variant-numeric: tabular-nums;
}

.dimension-track {
  height: 7px;
  margin-top: 0.65rem;
  background: var(--paper-deep);
  overflow: hidden;
}

.dimension-track span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--red);
  transform: scaleX(var(--score));
  transform-origin: left center;
}

.dimension-note {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.65;
}

.score-disclaimer {
  margin-top: 4rem;
  padding: 1.2rem 0;
  border-block: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.75rem;
}

.result-foot {
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding-block: 1.5rem;
  border-top: 1px solid var(--line);
}

.result-foot p {
  max-width: 66ch;
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
}

.history-main {
  padding-block: clamp(3rem, 7vw, 6rem);
}

.history-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--ink);
}

.history-heading h1 {
  margin: 0;
  font-family: "Noto Serif SC", serif;
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  letter-spacing: -0.06em;
}

.history-heading > p {
  margin: 0 0 0.5rem;
  font-weight: 800;
}

.history-intro {
  max-width: 60ch;
  margin: 1.2rem 0 2rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.history-list {
  border-top: 1px solid var(--ink);
}

.history-row {
  width: 100%;
  display: grid;
  grid-template-columns: 90px 1fr auto 24px;
  align-items: center;
  gap: 1.25rem;
  padding: 1.2rem 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.history-score {
  color: var(--red);
  font-family: "Noto Serif SC", serif;
  font-size: 2.4rem;
  font-weight: 900;
  line-height: 1;
}

.history-copy { display: grid; gap: 0.2rem; }
.history-copy strong { font-family: "Noto Serif SC", serif; font-size: 1.05rem; }
.history-copy small,
.history-date { color: var(--muted); font-size: 0.7rem; }
.history-arrow { color: var(--red); font-weight: 900; }

.history-empty {
  padding: 3rem 0;
  border-bottom: 1px solid var(--line);
}

.history-empty h2 { margin: 0; font-family: "Noto Serif SC", serif; }
.history-empty p { margin: 0.8rem 0 0; color: var(--muted); }

.poster-dialog {
  width: min(94vw, 620px);
  max-height: 92dvh;
  padding: 0;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--paper-soft);
  color: var(--ink);
  box-shadow: 10px 10px 0 var(--red-dark);
  overflow: auto;
  z-index: var(--z-dialog);
}

.poster-dialog::backdrop {
  background: oklch(0.19 0.018 55 / 0.68);
  backdrop-filter: blur(4px);
}

.poster-panel { padding: 1.2rem; }

.poster-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.poster-header h2 { margin: 0; font-family: "Noto Serif SC", serif; font-size: 1.45rem; }
.poster-header p { margin: 0.25rem 0 0; color: var(--muted); font-size: 0.72rem; }

.icon-button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.icon-button svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }

.poster-preview {
  min-height: 320px;
  display: grid;
  place-items: center;
  margin-top: 1rem;
  background: var(--paper-deep);
}

.poster-preview img {
  display: block;
  width: 100%;
  height: auto;
}

.poster-skeleton {
  width: 72%;
  display: grid;
  gap: 0.8rem;
}

.poster-skeleton span {
  height: 18px;
  background: var(--paper-soft);
  animation: skeleton 1.15s ease-in-out infinite alternate;
}

.poster-skeleton span:nth-child(2) { width: 78%; height: 70px; }
.poster-skeleton span:nth-child(3) { height: 170px; }

@keyframes skeleton { to { opacity: 0.48; } }

.poster-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.poster-actions button { flex: 1; }
.poster-status { min-height: 1.4rem; margin: 0.65rem 0 0; color: var(--muted); font-size: 0.72rem; }

.poster-error {
  padding: 2rem;
  text-align: center;
}

@media (max-width: 820px) {
  .topbar,
  .quiz-topbar { min-height: 64px; }

  .intro-layout,
  .score-hero,
  .result-grid {
    grid-template-columns: 1fr;
  }

  .intro-layout {
    align-items: start;
    gap: 0;
  }

  .score-ticket {
    width: 250px;
    justify-self: start;
    margin-top: 3rem;
  }

  .quiz-layout {
    min-height: calc(100dvh - 66px);
    grid-template-columns: 1fr;
    gap: 1.8rem;
    padding-block: 2.5rem 3.5rem;
  }

  .quiz-note {
    display: flex;
    gap: 1rem;
    align-items: baseline;
  }

  .quiz-note p { margin: 0; }
  .dimension-panel { position: static; }
  .result-grid { gap: 3rem; }
  .result-actions { align-items: stretch; flex-direction: column; }
}

@media (max-width: 560px) {
  body { font-size: 15px; }
  .shell,
  .shell-narrow { width: min(100% - 2rem, 1180px); }

  .brand-copy strong { font-size: 0.68rem; }
  .brand-copy small { font-size: 0.64rem; }
  .header-button { font-size: 0.72rem; }

  .intro-layout {
    position: relative;
    display: block;
    padding-block: clamp(1.25rem, 3.5vh, 2rem) 1rem;
  }

  .intro-screen::before {
    width: 76px;
    height: 9px;
    top: 88px;
    right: 16px;
    border: 0;
    transform: rotate(-5deg);
  }

  .intro-copy { padding-right: 0; }
  .eyebrow { margin-bottom: 0.55rem; font-size: 0.62rem; }

  .intro-copy h1 {
    max-width: none;
    font-size: clamp(2.45rem, 12vw, 3.2rem);
    line-height: 0.98;
  }

  .intro-lede {
    max-width: 31ch;
    margin-top: 0.9rem;
    font-size: 0.78rem;
    line-height: 1.65;
  }

  .version-selector {
    gap: 0.55rem;
    margin-top: 1rem;
  }

  .version-selector legend { margin-bottom: 0.45rem; font-size: 0.7rem; }
  .version-selector label span { min-height: 72px; padding: 0.58rem 0.65rem; }
  .version-selector b { font-size: 0.86rem; }
  .version-selector small { font-size: 0.62rem; line-height: 1.35; }
  .field-help { margin-top: 0.45rem; font-size: 0.64rem; }

  .intro-actions {
    margin-top: 0.9rem;
  }

  .intro-actions .primary-button { min-height: 48px; flex: 1; }

  .score-ticket {
    display: none;
  }

  .intro-foot {
    min-height: 42px;
    font-size: 0.58rem;
  }

  .intro-foot p { max-width: 46ch; line-height: 1.4; }
  .intro-foot span { display: none; }

  .quiz-layout {
    gap: 1.1rem;
    padding-block: 1.7rem 2.5rem;
  }

  .quiz-note { display: block; padding-top: 0.55rem; }
  .quiz-note p { margin-top: 0.35rem; font-size: 0.68rem; }
  .question-kicker { margin-bottom: 0.55rem; font-size: 0.62rem; }
  .question-panel h1 { font-size: clamp(1.65rem, 8.7vw, 2.25rem); line-height: 1.32; }
  .answer-list { margin-top: 1.55rem; }
  .answer-row { min-height: 55px; grid-template-columns: 28px 1fr 18px; gap: 0.55rem; padding: 0.68rem 0.15rem; }
  .answer-row .answer-text { font-size: 0.78rem; }
  .question-footer span { font-size: 0.62rem; }

  .result-content { padding-block: 2.4rem 3.5rem; }
  .score-hero { gap: 1.5rem; }
  .score-number strong { font-size: 8.5rem; }
  .score-heading h1 { font-size: 2.35rem; }
  .score-heading .result-summary { font-size: 0.86rem; }
  .result-grid { padding-top: 2.8rem; }
  .result-section + .result-section { margin-top: 3rem; }
  .action-plan { grid-template-columns: 1fr; gap: 0.45rem; }
  .dimension-panel { padding: 1rem; box-shadow: 5px 5px 0 var(--red); }
  .result-foot { align-items: stretch; flex-direction: column; gap: 1rem; }

  .history-heading { align-items: start; }
  .history-row { grid-template-columns: 68px 1fr 18px; gap: 0.7rem; }
  .history-date { display: none; }
  .history-score { font-size: 2rem; }
  .poster-panel { padding: 0.9rem; }
}

@media (max-height: 720px) and (max-width: 560px) {
  .topbar { min-height: 56px; }
  .intro-layout { padding-block: 0.9rem 0.65rem; }
  .intro-copy h1 { font-size: 2.35rem; }
  .intro-lede { margin-top: 0.65rem; line-height: 1.48; }
  .version-selector { margin-top: 0.75rem; }
  .version-selector label span { min-height: 64px; }
  .field-help { display: none; }
  .intro-actions { margin-top: 0.65rem; }
  .intro-foot { min-height: 34px; }
}

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