:root {
  color-scheme: dark;
  --night: #0a1330;
  --night-soft: #101b3d;
  --paper: #f4eedf;
  --paper-deep: #e8dec7;
  --ink: #17213d;
  --muted: #aeb8d3;
  --gold: #e7b956;
  --gold-bright: #ffd982;
  --red: #b7483e;
  --green: #3f8c78;
  --white: #fffdf7;
  --line: rgba(255, 255, 255, 0.14);
  --serif: "Yu Mincho", "Hiragino Mincho ProN", "BIZ UDPMincho", "Noto Serif JP", serif;
  --sans: "Hiragino Kaku Gothic ProN", "Yu Gothic", "BIZ UDPGothic", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--night);
}

body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  color: var(--white);
  font-family: var(--sans);
  background:
    radial-gradient(circle at 78% 10%, rgba(86, 114, 183, 0.24), transparent 32rem),
    linear-gradient(155deg, #101c43 0%, #0b1532 47%, #070e24 100%);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  content: "";
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

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

button {
  font: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--gold-bright);
  outline-offset: 4px;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 15px;
  color: var(--ink);
  background: var(--paper);
  border-radius: 4px;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.page-shell {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  width: min(1320px, 100%);
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  padding: 0 52px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 108px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  gap: 13px;
  align-items: center;
  padding: 0;
  color: inherit;
  text-align: left;
  cursor: pointer;
  background: none;
  border: 0;
}

.brand__seal {
  display: grid;
  width: 44px;
  height: 44px;
  color: var(--white);
  font: 700 21px/1 var(--serif);
  background: var(--red);
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 4px 10px 5px 8px;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.12);
  place-items: center;
  transform: rotate(-2deg);
}

.brand__copy {
  display: grid;
  gap: 3px;
}

.brand__copy strong {
  font: 700 18px/1.2 var(--serif);
  letter-spacing: 0.08em;
}

.brand__copy small {
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.24em;
}

.sound-button {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  padding: 9px 14px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.sound-button svg {
  width: 18px;
  fill: currentcolor;
}

.sound-button svg path:last-child {
  fill: none;
  stroke: currentcolor;
  stroke-linecap: round;
  stroke-width: 1.6;
}

.sound-button[aria-pressed="false"] .sound-wave {
  display: none;
}

main {
  display: flex;
  flex: 1;
}

.screen {
  width: 100%;
  animation: screen-in 0.65s cubic-bezier(0.22, 0.8, 0.25, 1) both;
}

.start-screen {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(380px, 0.95fr);
  gap: 50px;
  align-items: center;
  min-height: 680px;
  padding: 54px 0 44px;
}

.eyebrow {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 0 0 25px;
  color: var(--gold-bright);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
}

.eyebrow span {
  width: 26px;
  height: 1px;
  background: currentcolor;
}

.hero-copy h1 {
  margin: 0;
  font: 600 clamp(44px, 5.1vw, 72px)/1.33 var(--serif);
  letter-spacing: 0.02em;
}

.hero-copy h1 em {
  position: relative;
  color: var(--gold-bright);
  font-style: normal;
}

.hero-copy h1 em::after {
  position: absolute;
  right: 0;
  bottom: -8px;
  left: 0;
  height: 3px;
  content: "";
  background: radial-gradient(ellipse at center, rgba(231, 185, 86, 0.75), transparent 70%);
}

.lead {
  margin: 29px 0 0;
  color: #cbd2e4;
  font: 400 16px/2.1 var(--serif);
  letter-spacing: 0.05em;
}

.start-actions {
  display: flex;
  gap: 19px;
  align-items: center;
  margin-top: 35px;
}

.start-actions > p {
  max-width: 155px;
  margin: 0;
  color: #8894b3;
  font-size: 10px;
  line-height: 1.7;
}

kbd {
  padding: 1px 4px;
  color: #bdc7df;
  font: inherit;
  border: 1px solid #63708f;
  border-radius: 3px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  gap: 25px;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  padding: 0 25px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  border-radius: 3px;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.primary-button {
  color: #241c0f;
  background: linear-gradient(135deg, #f2cf78, var(--gold));
  border: 1px solid #ffde8b;
  box-shadow: 0 12px 34px rgba(231, 185, 86, 0.18);
}

.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-2px);
}

.primary-button:disabled {
  cursor: wait;
  filter: saturate(0.45);
  opacity: 0.68;
  box-shadow: none;
  transform: none;
}

.primary-button:hover {
  box-shadow: 0 15px 40px rgba(231, 185, 86, 0.27);
}

.primary-button svg,
.secondary-button svg,
.next-button svg,
.feedback a svg {
  width: 20px;
  fill: none;
  stroke: currentcolor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.game-facts {
  display: flex;
  gap: 38px;
  margin: 42px 0 0;
}

.data-status {
  min-height: 18px;
  margin: 12px 0 -30px;
  color: #9ca8c3;
  font-size: 10px;
  letter-spacing: 0.05em;
}

.data-status.is-error {
  color: #f0a098;
}

.game-facts div {
  display: grid;
  gap: 3px;
}

.game-facts dt {
  color: var(--paper);
  font: 500 23px/1 var(--serif);
}

.game-facts dd {
  margin: 0;
  color: #74809f;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.19em;
}

.hero-visual {
  position: relative;
  align-self: stretch;
  min-height: 540px;
}

.ticket {
  position: absolute;
  top: 33px;
  right: 28px;
  z-index: 2;
  width: min(390px, 90%);
  padding: 25px 27px 23px;
  overflow: hidden;
  color: #24304c;
  background:
    linear-gradient(90deg, transparent 49.5%, rgba(41, 51, 73, 0.09) 50%, transparent 50.5%),
    var(--paper);
  border-radius: 5px;
  box-shadow: 0 35px 60px rgba(0, 0, 0, 0.28);
  transform: rotate(4deg);
}

.ticket::before,
.ticket::after {
  position: absolute;
  top: 50%;
  width: 20px;
  height: 20px;
  content: "";
  background: #111d3f;
  border-radius: 50%;
  transform: translateY(-50%);
}

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

.ticket__top,
.ticket__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ticket__top {
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(36, 48, 76, 0.22);
}

.ticket__top span {
  font: 700 15px/1 var(--serif);
  letter-spacing: 0.16em;
}

.ticket__top small,
.ticket__meta {
  color: #77725f;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.ticket__route {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 18px;
  align-items: end;
  padding: 23px 4px 20px;
  text-align: center;
}

.ticket__route div {
  display: grid;
  gap: 5px;
}

.ticket__route small {
  color: #8b826d;
  font-size: 9px;
}

.ticket__route strong {
  font: 700 24px/1 var(--serif);
  letter-spacing: 0.2em;
}

.ticket__arrow {
  padding-bottom: 3px;
  color: var(--red);
  font-size: 24px;
}

.ticket__punch {
  position: absolute;
  right: 34px;
  bottom: 21px;
  width: 48px;
  height: 48px;
  border: 2px solid rgba(183, 72, 62, 0.45);
  border-radius: 50%;
  transform: rotate(-16deg);
}

.train-wrap {
  position: absolute;
  right: -20px;
  bottom: 40px;
  left: 10px;
  height: 265px;
  filter: drop-shadow(0 28px 34px rgba(0, 0, 0, 0.33));
}

.train {
  position: absolute;
  right: 13%;
  bottom: 48px;
  width: 300px;
  height: 140px;
  animation: train-float 3.3s ease-in-out infinite;
}

.train__body {
  position: absolute;
  right: 66px;
  bottom: 25px;
  width: 170px;
  height: 76px;
  background: #172448;
  border: 3px solid #526488;
  border-radius: 42px 18px 10px 8px;
  box-shadow: inset 0 -12px rgba(0, 0, 0, 0.16);
}

.train__body::before {
  position: absolute;
  right: -28px;
  bottom: 1px;
  width: 38px;
  height: 20px;
  content: "";
  background: #172448;
  border: 3px solid #526488;
  transform: skewX(27deg);
}

.train__window {
  position: absolute;
  top: 13px;
  right: 29px;
  width: 34px;
  height: 28px;
  background: #f7d47c;
  border: 4px solid #37496f;
  border-radius: 2px 10px 2px 2px;
  box-shadow: 0 0 22px rgba(247, 212, 124, 0.45);
}

.train__lamp {
  position: absolute;
  top: 20px;
  left: -6px;
  width: 10px;
  height: 16px;
  background: #ffde88;
  border-radius: 50%;
  box-shadow: -8px 0 30px 13px rgba(255, 222, 136, 0.18);
}

.train__cab {
  position: absolute;
  right: 0;
  bottom: 27px;
  width: 77px;
  height: 111px;
  background: #1c2b51;
  border: 3px solid #5a6c91;
  border-radius: 3px 3px 9px;
  box-shadow: inset 0 -14px rgba(0, 0, 0, 0.16);
}

.train__cab::before {
  position: absolute;
  top: -10px;
  right: -10px;
  left: -10px;
  height: 10px;
  content: "";
  background: #34466f;
  border-radius: 5px 5px 2px 2px;
}

.train__cab span {
  position: absolute;
  top: 17px;
  right: 13px;
  width: 43px;
  height: 32px;
  background: linear-gradient(135deg, #f4cd6f, #b87a35);
  border: 4px solid #43577e;
  border-radius: 2px;
}

.train__chimney {
  position: absolute;
  bottom: 97px;
  left: 48px;
  width: 35px;
  height: 46px;
  background: #1b294f;
  border: 3px solid #57698e;
  border-radius: 3px 3px 8px 8px;
}

.train__chimney::before {
  position: absolute;
  top: -13px;
  left: -8px;
  width: 45px;
  height: 14px;
  content: "";
  background: #283a63;
  border: 3px solid #65769a;
  border-radius: 50%;
}

.train__wheel {
  position: absolute;
  bottom: 4px;
  background: #111a34;
  border: 5px solid #596a8c;
  border-radius: 50%;
  box-shadow: inset 0 0 0 7px #253454;
}

.train__wheel::after {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 8px;
  height: 8px;
  content: "";
  background: var(--gold);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.train__wheel--1 { left: 62px; width: 68px; height: 68px; }
.train__wheel--2 { right: 25px; width: 60px; height: 60px; }

.train__smoke {
  position: absolute;
  z-index: -1;
  width: 50px;
  height: 50px;
  background: rgba(171, 185, 216, 0.2);
  border-radius: 50%;
  filter: blur(2px);
  animation: smoke 3.2s ease-out infinite;
}

.train__smoke--1 { top: -22px; left: 19px; }
.train__smoke--2 { top: -51px; left: -17px; animation-delay: 1.4s; }

.rail {
  position: absolute;
  right: 0;
  bottom: 30px;
  left: 0;
  height: 6px;
  background: #66718e;
  box-shadow: 0 12px #313e60;
  transform: perspective(200px) rotateX(13deg);
}

.rail span {
  position: absolute;
  top: -7px;
  width: 11px;
  height: 32px;
  background: #3f4d6a;
  transform: rotate(20deg);
}

.rail span:nth-child(1) { left: 8%; }
.rail span:nth-child(2) { left: 28%; }
.rail span:nth-child(3) { left: 48%; }
.rail span:nth-child(4) { left: 68%; }
.rail span:nth-child(5) { left: 88%; }

.site-footer {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  min-height: 63px;
  color: #7885a3;
  font-size: 9px;
  letter-spacing: 0.08em;
  border-top: 1px solid var(--line);
}

.site-footer p { margin: 0; }
.site-footer a { color: #aeb9d1; }

.sky {
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.star {
  position: absolute;
  width: 3px;
  height: 3px;
  background: #fff4c5;
  border-radius: 50%;
  box-shadow: 0 0 11px 2px rgba(255, 244, 197, 0.4);
  animation: twinkle 2.6s ease-in-out infinite alternate;
}

.star--1 { top: 12%; left: 8%; }
.star--2 { top: 29%; left: 46%; animation-delay: 0.8s; }
.star--3 { top: 17%; right: 9%; animation-delay: 1.4s; }
.star--4 { top: 70%; left: 3%; animation-delay: 0.3s; }
.star--5 { top: 55%; right: 4%; animation-delay: 1.9s; }

.moon {
  position: absolute;
  top: 12%;
  right: 7%;
  width: 240px;
  height: 240px;
  opacity: 0.06;
  border: 1px solid #d7e0fa;
  border-radius: 50%;
  box-shadow: 0 0 90px rgba(196, 210, 244, 0.18);
}

.cloud {
  position: absolute;
  width: 360px;
  height: 100px;
  opacity: 0.08;
  background: radial-gradient(ellipse, #bac8e6 0 30%, transparent 31%) 0 0 / 120px 80px;
  filter: blur(12px);
}

.cloud--1 { top: 21%; left: -70px; }
.cloud--2 { right: -100px; bottom: 20%; transform: scale(1.4); }

.floating-letter {
  position: absolute;
  color: rgba(255, 255, 255, 0.025);
  font: 400 190px/1 var(--serif);
}

.floating-letter--1 { top: 20%; left: -30px; transform: rotate(-8deg); }
.floating-letter--2 { right: 3%; bottom: 2%; transform: rotate(6deg); }
.floating-letter--3 { bottom: 5%; left: 42%; font-size: 120px; }

/* Quiz */
.game-screen {
  padding: 30px 0 45px;
}

.journey-bar {
  display: grid;
  grid-template-columns: 150px 1fr 110px;
  gap: 28px;
  align-items: center;
  margin-bottom: 30px;
}

.journey-bar__copy {
  display: grid;
  gap: 5px;
}

.journey-bar__copy span,
.score-chip span {
  color: #8793b1;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.journey-bar__copy strong {
  font: 600 14px/1 var(--serif);
  letter-spacing: 0.07em;
}

.stations {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  padding: 0;
  list-style: none;
}

.stations::before {
  position: absolute;
  top: 50%;
  right: 9px;
  left: 9px;
  height: 1px;
  content: "";
  background: #435070;
}

.stations li {
  position: relative;
  display: grid;
  width: 20px;
  height: 20px;
  color: transparent;
  background: var(--night-soft);
  border: 1px solid #566383;
  border-radius: 50%;
  place-items: center;
}

.stations li.is-current {
  background: var(--gold);
  border-color: var(--gold-bright);
  box-shadow: 0 0 0 5px rgba(231, 185, 86, 0.12), 0 0 20px rgba(231, 185, 86, 0.35);
}

.stations li.is-complete {
  color: var(--night);
  font-size: 10px;
  font-weight: 900;
  background: #aebfba;
  border-color: #d9e1da;
}

.score-chip {
  display: flex;
  gap: 8px;
  align-items: baseline;
  justify-content: flex-end;
}

.score-chip strong {
  color: var(--gold-bright);
  font: 500 22px/1 var(--serif);
  letter-spacing: 0.05em;
}

.quiz-layout {
  display: grid;
  grid-template-columns: 105px minmax(0, 900px);
  gap: 33px;
  justify-content: center;
  align-items: start;
}

.question-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 8px;
}

.vertical-label {
  margin: 0 0 18px;
  color: #7884a1;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.25em;
  writing-mode: vertical-rl;
}

.timer {
  position: relative;
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
}

.timer svg {
  position: absolute;
  inset: 0;
  width: 100%;
  transform: rotate(-90deg);
}

.timer circle {
  fill: none;
  stroke-width: 4;
}

.timer__track { stroke: rgba(255, 255, 255, 0.12); }
.timer__value {
  stroke: var(--gold);
  stroke-linecap: round;
  transition: stroke 200ms ease;
}

.timer.is-low .timer__value { stroke: #e46b5f; }

.timer > span {
  display: flex;
  align-items: baseline;
}

.timer strong { font: 500 26px/1 var(--serif); }
.timer small { margin-left: 2px; color: #8792af; font-size: 9px; }

.streak {
  margin: 14px 0 0;
  color: #7e8aa6;
  font-size: 9px;
}

.streak strong { color: var(--gold-bright); font-size: 13px; }

.quiz-card {
  position: relative;
  min-height: 585px;
  padding: 43px clamp(34px, 5vw, 68px) 39px;
  overflow: hidden;
  color: var(--ink);
  background:
    linear-gradient(rgba(31, 42, 66, 0.035) 1px, transparent 1px) 0 0 / 100% 30px,
    var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 4px 9px 4px 7px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
}

.quiz-card::before {
  position: absolute;
  inset: 9px;
  pointer-events: none;
  content: "";
  border: 1px solid rgba(37, 48, 76, 0.14);
}

.card-heading {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.question-kicker {
  margin: 0 0 9px;
  color: var(--red);
  font: 700 11px/1 var(--serif);
  letter-spacing: 0.14em;
}

.card-heading h2 {
  margin: 0;
  font: 600 clamp(21px, 3vw, 28px)/1.4 var(--serif);
  letter-spacing: 0.06em;
}

.ink-mark {
  display: grid;
  width: 42px;
  height: 42px;
  color: rgba(183, 72, 62, 0.75);
  font: 700 19px/1 var(--serif);
  border: 2px solid rgba(183, 72, 62, 0.5);
  border-radius: 50%;
  place-items: center;
  transform: rotate(10deg);
}

.quote {
  position: relative;
  min-height: 120px;
  margin: 38px 0 12px;
  padding: 2px 0 0 31px;
  font: 500 clamp(19px, 2.4vw, 27px)/2.05 var(--serif);
  letter-spacing: 0.055em;
  border-left: 2px solid #b5a98e;
}

.quote::before {
  position: absolute;
  top: -18px;
  left: 12px;
  color: rgba(36, 48, 76, 0.12);
  font: 700 67px/1 Georgia, serif;
  content: "“";
}

.quote mark {
  display: inline-block;
  min-width: 92px;
  margin: 0 4px;
  padding: 0 12px;
  color: var(--red);
  text-align: center;
  background: rgba(183, 72, 62, 0.08);
  border-bottom: 2px dotted var(--red);
  border-radius: 3px 3px 0 0;
}

.quote-hint {
  margin: 0 0 27px 33px;
  color: #7f7b70;
  font-size: 10px;
  letter-spacing: 0.1em;
}

.answers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}

.answer-button {
  position: relative;
  display: flex;
  gap: 15px;
  align-items: center;
  min-height: 66px;
  padding: 10px 17px;
  color: #28334f;
  text-align: left;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.38);
  border: 1px solid #c7bda6;
  border-radius: 3px;
  transition: border 160ms ease, background 160ms ease, transform 160ms ease;
}

.answer-button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.8);
  border-color: #887d65;
  transform: translateY(-1px);
}

.answer-button > span:first-child {
  display: grid;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  color: #7f7561;
  font: 500 12px/1 var(--serif);
  border: 1px solid #b5aa92;
  border-radius: 50%;
  place-items: center;
}

.answer-button > strong {
  font: 600 17px/1.4 var(--serif);
  letter-spacing: 0.08em;
}

.answer-button.is-correct {
  color: #235b4f;
  background: rgba(63, 140, 120, 0.13);
  border-color: var(--green);
}

.answer-button.is-wrong {
  color: #7b302c;
  background: rgba(183, 72, 62, 0.12);
  border-color: var(--red);
}

.answer-button:disabled { cursor: default; }

.feedback {
  position: absolute;
  inset: auto 0 0;
  z-index: 3;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
  min-height: 180px;
  padding: 28px clamp(30px, 5vw, 66px);
  color: var(--white);
  background: #172443;
  border-top: 1px solid #61708e;
  animation: feedback-in 0.35s ease-out both;
}

.feedback__icon {
  display: grid;
  width: 48px;
  height: 48px;
  color: var(--gold-bright);
  font: 700 24px/1 var(--serif);
  border: 1px solid currentcolor;
  border-radius: 50%;
  place-items: center;
}

.feedback__status {
  margin: 0 0 5px;
  color: var(--gold-bright);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.feedback__body h3 {
  margin: 0 0 7px;
  font: 600 18px/1.3 var(--serif);
  letter-spacing: 0.05em;
}

.feedback__body > p:last-of-type {
  margin: 0;
  color: #b5bfd5;
  font: 400 11px/1.7 var(--serif);
}

.feedback a {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  margin-top: 8px;
  color: #d5dded;
  font-size: 10px;
  text-underline-offset: 3px;
}

.feedback a svg { width: 14px; }

.next-button {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  padding: 12px 15px;
  color: var(--gold-bright);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  background: transparent;
  border: 1px solid rgba(231, 185, 86, 0.45);
  border-radius: 3px;
}

.next-button svg { width: 16px; }

/* Result */
.result-screen {
  display: grid;
  padding: 37px 0 45px;
  place-items: center;
}

.result-card {
  position: relative;
  width: min(780px, 100%);
  padding: 43px clamp(28px, 6vw, 72px) 38px;
  color: var(--ink);
  text-align: center;
  background:
    linear-gradient(90deg, transparent 49.8%, rgba(31, 42, 66, 0.04) 50%, transparent 50.2%),
    var(--paper);
  border-radius: 5px;
  box-shadow: 0 35px 90px rgba(0, 0, 0, 0.32);
}

.result-card::before {
  position: absolute;
  inset: 10px;
  pointer-events: none;
  content: "";
  border: 1px solid rgba(36, 48, 76, 0.15);
}

.result-stamp {
  position: absolute;
  top: 35px;
  right: 46px;
  display: grid;
  width: 64px;
  height: 64px;
  color: rgba(183, 72, 62, 0.62);
  font: 700 18px/1 var(--serif);
  border: 3px double currentcolor;
  border-radius: 50%;
  place-items: center;
  transform: rotate(13deg) scale(1.15);
  animation: stamp-in 0.45s 0.55s cubic-bezier(0.22, 1.5, 0.48, 1) both;
}

.eyebrow--center {
  justify-content: center;
  margin-bottom: 14px;
  color: #9a7839;
}

.result-overline {
  margin: 0 0 5px;
  color: #827966;
  font: 400 11px/1 var(--serif);
  letter-spacing: 0.13em;
}

.result-card h2 {
  margin: 0;
  font: 600 24px/1.5 var(--serif);
  letter-spacing: 0.09em;
}

.result-score {
  display: flex;
  align-items: baseline;
  justify-content: center;
  margin: 8px 0 2px;
}

.result-score strong {
  color: #9c7330;
  font: 500 clamp(60px, 8vw, 86px)/1 var(--serif);
  letter-spacing: -0.03em;
}

.result-score span {
  margin-left: 9px;
  color: #8c826f;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.rank {
  display: inline-block;
  margin: 4px 0 8px;
  padding: 5px 13px;
  color: #7c2f2b;
  font: 600 14px/1.4 var(--serif);
  border-top: 1px solid rgba(183, 72, 62, 0.33);
  border-bottom: 1px solid rgba(183, 72, 62, 0.33);
}

.result-message {
  margin: 5px auto 21px;
  color: #6f6a5f;
  font: 400 12px/1.8 var(--serif);
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0 auto 22px;
  border-top: 1px solid #c8bea8;
  border-bottom: 1px solid #c8bea8;
}

.result-stats div {
  display: grid;
  gap: 5px;
  padding: 13px 10px;
}

.result-stats div + div { border-left: 1px solid #c8bea8; }
.result-stats span { color: #8a8375; font-size: 9px; letter-spacing: 0.1em; }
.result-stats strong { font: 600 18px/1 var(--serif); }

.collected-books > p {
  margin: 0 0 10px;
  color: #827a6b;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

#book-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: center;
}

.book-tag {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 5px 9px;
  color: #4a4a46;
  font: 500 10px/1 var(--serif);
  background: rgba(255, 255, 255, 0.38);
  border: 1px solid #c8bda5;
  border-radius: 2px;
}

.book-tag::before {
  width: 5px;
  height: 13px;
  content: "";
  background: var(--red);
  border-radius: 1px;
}

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

.result-actions .primary-button {
  min-height: 51px;
  padding: 0 20px;
}

.secondary-button {
  min-height: 51px;
  color: #33405e;
  background: transparent;
  border: 1px solid #a79d88;
}

.secondary-button svg { width: 18px; }

.x-share-button {
  color: #f7f7f7;
  background: #111;
  border-color: #111;
}

.x-share-button:hover {
  color: #fff;
  background: #252525;
  border-color: #252525;
  box-shadow: 0 10px 24px rgba(17, 17, 17, 0.2);
}

.x-share-button svg {
  fill: currentcolor;
  stroke: none;
}

.share-feedback {
  min-height: 18px;
  margin: 8px 0 -15px;
  color: #517364;
  font-size: 10px;
}

.confetti {
  position: fixed;
  top: -20px;
  z-index: 50;
  width: 7px;
  height: 15px;
  pointer-events: none;
  animation: confetti-fall 1.8s ease-in forwards;
}

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

@keyframes feedback-in {
  from { opacity: 0; transform: translateY(100%); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes train-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

@keyframes smoke {
  0% { opacity: 0; transform: translate(20px, 25px) scale(0.4); }
  30% { opacity: 0.8; }
  100% { opacity: 0; transform: translate(-45px, -55px) scale(1.5); }
}

@keyframes twinkle {
  from { opacity: 0.25; transform: scale(0.7); }
  to { opacity: 1; transform: scale(1.25); }
}

@keyframes stamp-in {
  from { opacity: 0; transform: rotate(13deg) scale(2.3); }
  to { opacity: 1; transform: rotate(13deg) scale(1); }
}

@keyframes confetti-fall {
  to { opacity: 0.7; transform: translate(var(--drift), 105vh) rotate(720deg); }
}

@media (max-width: 900px) {
  .page-shell { padding: 0 27px; }
  .start-screen { grid-template-columns: 1fr; padding-top: 45px; }
  .hero-copy { max-width: 680px; }
  .hero-visual { display: none; }
  .quiz-layout { grid-template-columns: 1fr; }
  .question-meta {
    flex-direction: row;
    gap: 16px;
    justify-content: flex-end;
    padding: 0;
  }
  .vertical-label { margin: 0 auto 0 0; writing-mode: initial; }
  .timer { width: 60px; height: 60px; }
  .timer strong { font-size: 20px; }
  .streak { margin: 0; }
  .quiz-card { min-height: 610px; }
}

@media (max-width: 640px) {
  .page-shell { padding: 0 16px; }
  .site-header { min-height: 82px; }
  .brand__seal { width: 38px; height: 38px; font-size: 18px; }
  .brand__copy strong { font-size: 15px; }
  .brand__copy small { font-size: 6px; }
  .sound-button { width: 41px; height: 41px; justify-content: center; padding: 0; }
  .sound-button span { display: none; }
  .start-screen { min-height: auto; padding: 55px 0 52px; }
  .hero-copy h1 { font-size: clamp(36px, 11.6vw, 52px); line-height: 1.45; }
  .lead { font-size: 14px; }
  .start-actions { display: grid; }
  .start-actions .primary-button { width: 100%; }
  .start-actions > p { max-width: none; text-align: center; }
  .game-facts { gap: 26px; justify-content: center; }
  .game-facts div { text-align: center; }
  .site-footer { align-items: flex-start; flex-direction: column; gap: 7px; justify-content: center; padding: 13px 0; }
  .journey-bar { grid-template-columns: 1fr auto; gap: 13px; }
  .stations { grid-column: 1 / -1; grid-row: 2; }
  .score-chip { grid-column: 2; grid-row: 1; }
  .question-meta { margin-bottom: -8px; }
  .vertical-label { display: none; }
  .quiz-card { min-height: 665px; padding: 32px 24px 28px; }
  .card-heading h2 { font-size: 21px; }
  .ink-mark { width: 36px; height: 36px; font-size: 16px; }
  .quote { min-height: 158px; margin-top: 29px; padding-left: 20px; font-size: 19px; line-height: 1.9; }
  .quote-hint { margin-left: 22px; }
  .answers { grid-template-columns: 1fr; gap: 9px; }
  .answer-button { min-height: 56px; }
  .feedback { grid-template-columns: auto 1fr; gap: 14px; min-height: 245px; padding: 22px 25px; }
  .feedback__icon { width: 40px; height: 40px; font-size: 20px; }
  .next-button { grid-column: 1 / -1; justify-content: center; }
  .result-screen { padding-top: 25px; }
  .result-card { padding: 46px 24px 34px; }
  .result-stamp { top: 24px; right: 25px; width: 49px; height: 49px; font-size: 14px; }
  .result-score strong { font-size: 58px; }
  .result-stats strong { font-size: 15px; }
  .result-actions { display: grid; }
  .result-actions button { width: 100%; }
}

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