/*
  彩虹街小偵探 — 視覺與捲動動畫
  介面圖示統一使用 Font Awesome；場景裝飾使用 CSS 幾何造型。
*/

:root {
  --ink: #17394d;
  --ink-soft: #315a70;
  --paper: #fffdf5;
  --cream: #fff4ce;
  --yellow: #ffcb4f;
  --orange: #ff8f56;
  --red: #f05368;
  --blue: #2e8bc0;
  --cyan: #5ac7c8;
  --purple: #7558a6;
  --green: #71aa66;
  --shadow: 0 22px 60px rgba(23, 57, 77, 0.18);
  --soft-shadow: 0 12px 28px rgba(23, 57, 77, 0.14);
  --rounded: 28px;
  --page-progress: 0%;
  --story-progress: 0;
  --unbox-progress: 0;
  --reveal-progress: 0;
  --cursor-glass: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='38' height='38' viewBox='0 0 38 38'%3E%3Ccircle cx='15' cy='15' r='10' fill='%23fffdf5' stroke='%2317394d' stroke-width='4'/%3E%3Ccircle cx='15' cy='15' r='5' fill='%23ffcb4f' fill-opacity='.7'/%3E%3Cpath d='M22 22L34 34' stroke='%2317394d' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E") 15 15, auto;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 5%, rgba(255, 203, 79, 0.14), transparent 24rem),
    var(--paper);
  font-family: "Zen Maru Gothic", "Noto Sans JP", "Microsoft JhengHei", sans-serif;
  font-weight: 700;
  cursor: var(--cursor-glass);
}

body.is-quiz-locked {
  overflow: hidden;
}

button,
a,
[role="button"] {
  cursor: var(--cursor-glass);
}

button {
  font: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 5px solid #ffffff;
  box-shadow: 0 0 0 9px var(--blue);
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 12px 18px;
  border-radius: 14px;
  color: #fff;
  background: var(--ink);
  transform: translateY(-160%);
}

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

.game-hud {
  position: fixed;
  z-index: 100;
  top: 14px;
  left: 50%;
  display: grid;
  grid-template-columns: auto minmax(110px, 310px) auto;
  align-items: center;
  gap: 16px;
  width: min(960px, calc(100% - 28px));
  min-height: 62px;
  padding: 8px 10px 8px 14px;
  border: 2px solid rgba(255, 255, 255, 0.78);
  border-radius: 22px;
  background: rgba(255, 253, 245, 0.88);
  box-shadow: 0 12px 35px rgba(23, 57, 77, 0.13);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

.mini-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-family: "Noto Sans JP", sans-serif;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 3px solid var(--ink);
  border-radius: 50%;
  color: var(--ink);
  background: var(--yellow);
  transform: rotate(-10deg);
}

.progress-shell {
  height: 10px;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 20px;
  background: #fff;
}

.progress-bar {
  width: var(--page-progress);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--yellow), var(--orange), var(--red));
  transition: width 100ms linear;
}

.hud-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.clue-counter {
  display: flex;
  min-width: 74px;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
  padding: 9px 12px;
  border-radius: 14px;
  color: #fff;
  background: var(--ink);
  font-family: "Noto Sans JP", sans-serif;
  font-size: 12px;
}

.clue-counter i {
  margin-right: 5px;
  color: var(--yellow);
}

.clue-counter strong {
  font-size: 18px;
}

.icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 14px;
  color: var(--ink);
  background: var(--yellow);
  transition: transform 180ms ease, background 180ms ease;
}

.icon-button:hover {
  background: #ffe083;
  transform: rotate(-5deg) scale(1.06);
}

.hero {
  position: relative;
  display: grid;
  min-height: 100svh;
  grid-template-columns: minmax(300px, 0.95fr) minmax(360px, 1.05fr);
  align-items: center;
  gap: clamp(20px, 5vw, 80px);
  overflow: hidden;
  padding: 120px max(5vw, 28px) 80px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.7), transparent 48%),
    linear-gradient(165deg, #fff9df 0%, #ffeca6 55%, #ffd268 100%);
}

.hero::before,
.hero::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.hero::before {
  right: -12vw;
  bottom: -25vw;
  width: 72vw;
  height: 50vw;
  border-radius: 50% 50% 0 0;
  background: rgba(113, 170, 102, 0.34);
  transform: rotate(-7deg);
}

.hero::after {
  bottom: 0;
  left: 0;
  width: 100%;
  height: 30px;
  background: repeating-linear-gradient(90deg, var(--red) 0 64px, #fff 64px 128px);
}

.hero-copy,
.hero-scene {
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  color: var(--red);
  font-family: "Noto Sans JP", sans-serif;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.eyebrow i {
  color: var(--orange);
}

.hero h1 {
  margin: 0;
  line-height: 0.95;
}

.hero h1 span {
  display: block;
}

.title-small {
  font-size: clamp(30px, 4vw, 54px);
  letter-spacing: 0.18em;
}

.title-main {
  margin: 5px 0 12px;
  color: var(--ink);
  font-family: "Noto Sans JP", sans-serif;
  font-size: clamp(70px, 10vw, 138px);
  font-weight: 900;
  letter-spacing: -0.08em;
  text-shadow: 6px 6px 0 #fff, 10px 10px 0 rgba(240, 83, 104, 0.2);
}

.title-case {
  width: fit-content;
  padding: 10px 18px 12px;
  border: 3px solid var(--ink);
  border-radius: 14px 14px 14px 4px;
  color: #fff;
  background: var(--red);
  box-shadow: 5px 5px 0 var(--ink);
  font-size: clamp(19px, 2.2vw, 29px);
  line-height: 1.2;
  transform: rotate(-1deg);
}

.hero-lead {
  max-width: 610px;
  margin: 30px 0;
  color: var(--ink-soft);
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.8;
}

.hero-actions,
.ending-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
}

.primary-button,
.secondary-button {
  min-height: 64px;
  padding: 8px 24px 8px 10px;
  border: 3px solid var(--ink);
  border-radius: 20px;
  box-shadow: 6px 6px 0 var(--ink);
  font-size: 20px;
  font-weight: 900;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.primary-button {
  color: var(--ink);
  background: #fff;
}

.primary-button:hover,
.secondary-button:hover {
  box-shadow: 3px 3px 0 var(--ink);
  transform: translate(3px, 3px);
}

.primary-button:disabled {
  opacity: 0.48;
  filter: grayscale(0.7);
}

.button-icon {
  display: inline-grid;
  width: 45px;
  height: 45px;
  margin-right: 12px;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: var(--red);
}

.secondary-button {
  padding-left: 22px;
  color: #fff;
  background: var(--ink);
}

.secondary-button i {
  margin-right: 10px;
}

.duration-note {
  color: var(--ink-soft);
  font-size: 14px;
}

.duration-note i {
  margin-right: 6px;
}

.hero-scene {
  aspect-ratio: 0.9;
  max-height: 680px;
  border: 5px solid var(--ink);
  border-radius: 48% 48% 34px 34px;
  background:
    linear-gradient(180deg, #7ed6e8 0 45%, #bde57d 45% 64%, #e7a96f 64% 100%);
  box-shadow: 14px 16px 0 rgba(23, 57, 77, 0.18), inset 0 0 0 12px rgba(255, 255, 255, 0.35);
  transform: rotate(2deg);
}

.scene-arch {
  position: absolute;
  top: 8%;
  left: 9%;
  width: 82%;
  height: 63%;
  border: 16px solid #fff4ce;
  border-bottom: 0;
  border-radius: 50% 50% 0 0;
  box-shadow: inset 0 0 0 5px var(--ink);
}

.detective {
  position: absolute;
  z-index: 3;
  right: 16%;
  bottom: 12%;
  width: 50%;
  height: 70%;
  filter: drop-shadow(8px 14px 8px rgba(23, 57, 77, 0.18));
}

.detective-head,
.detective-ear,
.detective-body,
.detective-arm {
  position: absolute;
  display: block;
  background: #3ba9aa;
}

.detective-head {
  z-index: 3;
  top: 6%;
  left: 18%;
  width: 68%;
  height: 47%;
  border: 4px solid var(--ink);
  border-radius: 48% 48% 43% 43%;
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.25) 0 3px, transparent 4px),
    #3ba9aa;
}

.detective-ear {
  top: 14%;
  width: 25%;
  aspect-ratio: 1;
  border: 4px solid var(--ink);
  border-radius: 50%;
}

.ear-left { left: 5%; }
.ear-right { right: 1%; }

.detective-eye {
  position: absolute;
  top: 31%;
  width: 15%;
  aspect-ratio: 1;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 2px -3px 0 #8ccdd5;
}

.detective-eye::after {
  position: absolute;
  top: 35%;
  left: 40%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink);
  content: "";
}

.eye-left { left: 26%; }
.eye-right { right: 24%; }

.detective-mouth {
  position: absolute;
  bottom: 20%;
  left: 35%;
  width: 31%;
  height: 15%;
  border: 4px solid var(--ink);
  border-top: 0;
  border-radius: 0 0 50% 50%;
}

.detective-body {
  z-index: 2;
  bottom: 2%;
  left: 24%;
  width: 58%;
  height: 52%;
  border: 4px solid var(--ink);
  border-radius: 45% 45% 24% 24%;
}

.detective-scarf {
  position: absolute;
  z-index: 4;
  top: 47%;
  left: 22%;
  width: 62%;
  height: 11%;
  border: 4px solid var(--ink);
  border-radius: 40%;
  background: var(--yellow);
  transform: rotate(-4deg);
}

.detective-arm {
  z-index: 4;
  right: -8%;
  bottom: 21%;
  width: 50%;
  height: 15%;
  border: 4px solid var(--ink);
  border-radius: 50px;
  transform: rotate(-30deg);
}

.detective-glass {
  position: absolute;
  z-index: 5;
  right: -31%;
  bottom: 28%;
  color: var(--ink);
  font-size: clamp(64px, 8vw, 116px);
  transform: rotate(-12deg);
}

.empty-jar {
  position: absolute;
  z-index: 4;
  bottom: 10%;
  left: 8%;
  display: grid;
  width: 22%;
  height: 27%;
  place-items: center;
  border: 5px solid var(--ink);
  border-radius: 16px 16px 35px 35px;
  color: rgba(23, 57, 77, 0.68);
  background: rgba(255, 255, 255, 0.68);
  font-size: clamp(22px, 4vw, 44px);
}

.empty-jar::before {
  position: absolute;
  top: -13%;
  width: 120%;
  height: 17%;
  border: 5px solid var(--ink);
  border-radius: 9px;
  background: var(--red);
  content: "";
}

.empty-jar span {
  position: absolute;
  bottom: 12%;
  font-family: "Noto Sans JP", sans-serif;
  font-size: clamp(8px, 1.1vw, 13px);
  font-weight: 900;
  letter-spacing: 0.16em;
}

.street-sign {
  position: absolute;
  z-index: 3;
  top: 12%;
  right: -3%;
  padding: 10px 16px;
  border: 4px solid var(--ink);
  border-radius: 12px;
  color: #fff;
  background: var(--red);
  box-shadow: 5px 5px 0 var(--ink);
  font-size: clamp(10px, 1.4vw, 17px);
  letter-spacing: 0.1em;
  transform: rotate(7deg);
}

.hero-sun {
  position: absolute;
  top: 9%;
  right: 4%;
  width: 130px;
  height: 130px;
  border: 5px solid var(--ink);
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 18px rgba(255, 143, 86, 0.18);
}

.hero-cloud {
  position: absolute;
  width: 150px;
  height: 50px;
  border: 4px solid var(--ink);
  border-radius: 50px;
  background: #fff;
  opacity: 0.82;
}

.hero-cloud::before,
.hero-cloud::after {
  position: absolute;
  bottom: -4px;
  border: 4px solid var(--ink);
  border-bottom: 0;
  border-radius: 50% 50% 0 0;
  background: #fff;
  content: "";
}

.hero-cloud::before { left: 23px; width: 53px; height: 53px; }
.hero-cloud::after { right: 24px; width: 40px; height: 40px; }
.cloud-one { top: 18%; left: 42%; transform: scale(0.75); }
.cloud-two { top: 31%; left: 5%; transform: scale(0.52); }

.scroll-cue {
  position: absolute;
  z-index: 4;
  bottom: 43px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.74);
  font-size: 12px;
  transform: translateX(-50%);
}

.scroll-cue i {
  animation: down-bounce 1.2s ease-in-out infinite;
}

@keyframes down-bounce {
  50% { transform: translateY(5px); }
}

.section-heading {
  position: relative;
  z-index: 5;
  width: min(760px, calc(100% - 32px));
  margin: 0 auto 34px;
  text-align: center;
}

.section-heading h2,
.route-copy h2,
.ending-section h2,
.note-card h2 {
  margin: 12px 0;
  font-family: "Noto Sans JP", sans-serif;
  font-size: clamp(34px, 5vw, 66px);
  font-weight: 900;
  line-height: 1.14;
  letter-spacing: -0.045em;
}

.section-heading p,
.route-copy p,
.note-card > p,
.ending-section > p {
  margin: 0;
  font-size: clamp(16px, 1.8vw, 21px);
  line-height: 1.7;
}

.light-heading { color: #fff; }

.chapter-chip {
  display: inline-flex;
  padding: 8px 14px;
  border: 2px solid currentColor;
  border-radius: 999px;
  color: #fff;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.yellow-chip { color: var(--yellow); }
.red-chip { color: var(--red); }
.purple-chip { color: var(--purple); }

.story-scroll {
  position: relative;
  height: 360vh;
  background:
    radial-gradient(circle at 50% 30%, rgba(90, 199, 200, 0.22), transparent 36%),
    #12364b;
}

.story-sticky {
  position: sticky;
  top: 0;
  display: flex;
  height: 100svh;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding: 92px 0 28px;
}

.film-window {
  display: grid;
  gap: 18px;
  transform: rotate(-1.2deg);
}

.story-track {
  display: flex;
  gap: 18px;
  width: max-content;
  will-change: transform;
}

.comic-panel {
  position: relative;
  display: flex;
  width: clamp(300px, 37vw, 540px);
  aspect-ratio: 3 / 1.46;
  align-items: flex-end;
  overflow: hidden;
  padding: 20px;
  border: 5px solid #fff;
  border-radius: 22px;
  background-color: var(--cyan);
  background-position: center;
  background-size: cover;
  box-shadow: 8px 10px 0 rgba(0, 0, 0, 0.2);
}

.comic-panel::before {
  position: absolute;
  inset: 35% 0 0;
  background: linear-gradient(transparent, rgba(10, 36, 52, 0.92));
  content: "";
}

.comic-panel > div {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 3px;
  color: #fff;
}

.comic-panel strong {
  font-family: "Noto Sans JP", sans-serif;
  font-size: clamp(19px, 2vw, 28px);
}

.comic-panel span:not(.panel-number) {
  font-size: 13px;
}

.panel-number {
  position: absolute;
  z-index: 3;
  top: 14px;
  left: 14px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  color: var(--ink);
  background: var(--yellow);
  font-size: 11px;
}

.panel-bakery,
.panel-jar,
.panel-detective {
  background-image: url("assets/comic-bakery.png");
}

.panel-bakery { background-position: 20% center; }
.panel-jar { background-position: 82% center; }
.panel-detective { background-position: 45% center; }

.panel-footprint,
.panel-map,
.panel-park,
.panel-mailbox,
.panel-friend {
  background-image: url("assets/comic-park.png");
}

.panel-footprint { background-position: 45% 72%; }
.panel-map { background-position: 18% center; }
.panel-park { background-position: 50% center; }
.panel-mailbox { background-position: 88% center; }
.panel-friend { background-position: 72% 30%; }

.story-meter {
  width: min(440px, 70vw);
  height: 8px;
  margin: 28px auto 0;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.18);
}

.story-meter span {
  display: block;
  width: calc(var(--story-progress) * 100%);
  height: 100%;
  border-radius: inherit;
  background: var(--yellow);
}

.case-note {
  position: relative;
  display: grid;
  min-height: 112svh;
  place-items: center;
  overflow: hidden;
  padding: 120px 22px;
  background:
    linear-gradient(rgba(23, 57, 77, 0.05) 2px, transparent 2px),
    linear-gradient(90deg, rgba(23, 57, 77, 0.05) 2px, transparent 2px),
    #f7efe0;
  background-size: 38px 38px;
}

.note-card {
  position: relative;
  z-index: 3;
  width: min(780px, 92vw);
  padding: clamp(34px, 6vw, 76px);
  border: 4px solid var(--ink);
  border-radius: 5px 28px 5px 28px;
  background: #fffdf5;
  box-shadow: 14px 16px 0 var(--yellow), var(--shadow);
  transform: rotate(-1.4deg);
}

.note-card h2 {
  font-size: clamp(32px, 4.8vw, 58px);
}

.tape {
  position: absolute;
  top: -18px;
  width: 100px;
  height: 38px;
  background: rgba(90, 199, 200, 0.48);
}

.tape-left { left: -24px; transform: rotate(-20deg); }
.tape-right { right: -24px; transform: rotate(18deg); }

.speak-chip {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  padding: 14px 18px;
  border: 3px solid var(--ink);
  border-radius: 14px;
  color: var(--ink);
  background: var(--yellow);
  box-shadow: 4px 4px 0 var(--ink);
  font-family: "Noto Sans JP", sans-serif;
  font-size: clamp(15px, 2vw, 21px);
  transition: background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .speak-chip:hover {
    background: #ffe083;
    box-shadow: 7px 7px 0 var(--ink);
    transform: translate(-3px, -3px) rotate(-1deg);
  }
}

.speak-chip:active {
  box-shadow: 2px 2px 0 var(--ink);
  transform: translate(2px, 2px);
}

@keyframes speak-pulse {
  0%, 70%, 100% { transform: scale(1) rotate(0); }
  78% { transform: scale(1.2) rotate(-8deg); }
  86% { transform: scale(1.08) rotate(6deg); }
}

@media (hover: none) and (pointer: coarse) and (prefers-reduced-motion: no-preference) {
  .speak-chip i {
    animation: speak-pulse 2.4s ease-in-out infinite;
  }
}

.floating-prop {
  position: absolute;
  z-index: 2;
  color: var(--red);
  filter: drop-shadow(7px 10px 0 rgba(23, 57, 77, 0.1));
  will-change: transform;
}

.envelope {
  top: 20%;
  left: 8%;
  font-size: clamp(70px, 10vw, 150px);
  transform: translate3d(calc((var(--note-progress, 0) - .5) * -140px), calc((1 - var(--note-progress, 0)) * 100px), 0) rotate(calc(-18deg + var(--note-progress, 0) * 24deg));
}

.footprint {
  color: var(--blue);
  font-size: clamp(50px, 7vw, 96px);
}

.print-one {
  right: 8%;
  bottom: 26%;
  transform: translate3d(calc((1 - var(--note-progress, 0)) * 120px), calc((1 - var(--note-progress, 0)) * 80px), 0) rotate(-22deg);
}

.print-two {
  right: 21%;
  bottom: 9%;
  opacity: 0.55;
  transform: translate3d(calc((1 - var(--note-progress, 0)) * 170px), calc((1 - var(--note-progress, 0)) * 110px), 0) rotate(-5deg) scale(.75);
}

.clue-unboxing {
  position: relative;
  height: 480vh;
  background:
    radial-gradient(circle at 20% 15%, rgba(255, 203, 79, 0.2), transparent 25rem),
    #e9f5ef;
}

.clue-sticky {
  position: sticky;
  top: 0;
  display: flex;
  min-height: 100svh;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding: 96px 20px 28px;
}

.clue-sticky .section-heading {
  z-index: 1;
  margin-bottom: 14px;
  opacity: clamp(0, calc(1 - var(--unbox-progress) * 5), 1);
  pointer-events: none;
  transform: translateY(calc(var(--unbox-progress) * -32px));
  will-change: opacity, transform;
}

.unboxing-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(280px, 560px) 150px;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 5vw, 80px);
  min-height: 430px;
}

.file-box {
  position: relative;
  width: min(520px, 70vw);
  height: min(360px, 45vh);
  perspective: 900px;
}

.box-back,
.box-front {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  border: 5px solid var(--ink);
  background: #c8864c;
}

.box-back {
  z-index: 1;
  height: 72%;
  border-radius: 24px;
  background: #9a633a;
  transform: translateY(-16px) rotateX(-4deg);
}

.box-front {
  z-index: 8;
  display: grid;
  height: 53%;
  place-items: center;
  border-radius: 15px 15px 28px 28px;
  color: #fff4ce;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.06) 0 2px, transparent 2px 32px),
    #b87842;
  box-shadow: 10px 14px 0 rgba(23, 57, 77, 0.13);
  font-family: "Noto Sans JP", sans-serif;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.box-front i {
  position: absolute;
  top: 24px;
  font-size: 38px;
}

.box-front span {
  margin-top: 50px;
}

.clue-sheet {
  position: absolute;
  z-index: 3;
  right: 9%;
  bottom: 25%;
  left: 9%;
  display: grid;
  min-height: 260px;
  place-items: center;
  padding: 18px;
  border: 5px solid var(--ink);
  border-radius: 18px 18px 8px 8px;
  background: #fff;
  box-shadow: 6px 8px 0 rgba(23, 57, 77, 0.14);
  transform-origin: 50% 100%;
  will-change: transform, opacity;
}

.clue-sheet i {
  font-size: clamp(45px, 7vw, 78px);
}

.clue-sheet strong {
  font-family: "Noto Sans JP", sans-serif;
  font-size: clamp(28px, 5vw, 54px);
  letter-spacing: 0.04em;
}

.clue-sheet small {
  color: var(--ink-soft);
  font-size: 15px;
}

.clue-index {
  position: absolute;
  top: 12px;
  left: 14px;
  font-size: 10px;
  letter-spacing: 0.14em;
}

.clue-sheet-one {
  color: var(--blue);
  transform: translateY(0) rotate(-4deg);
}

.clue-sheet-two {
  z-index: 4;
  color: var(--red);
  transform: translateY(0) rotate(3deg);
}

.clue-sheet-three {
  z-index: 5;
  color: var(--purple);
  transform: translateY(0) rotate(-1deg);
}

.clue-sheet.is-taken {
  box-shadow: 0 0 0 8px var(--yellow), 8px 12px 0 var(--ink);
}

.pull-guide {
  display: grid;
  justify-items: center;
  gap: 12px;
  text-align: center;
}

.pull-guide > span {
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  border: 4px solid var(--ink);
  border-radius: 50%;
  color: #fff;
  background: var(--red);
  box-shadow: 5px 5px 0 var(--ink);
  font-family: "Noto Sans JP", sans-serif;
  font-size: 18px;
}

.pull-line {
  position: relative;
  width: 4px;
  height: 88px;
  border-radius: 10px;
  background: rgba(23, 57, 77, 0.18);
}

.pull-line i {
  position: absolute;
  top: calc(var(--unbox-progress) * 72px);
  left: 50%;
  width: 18px;
  height: 18px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--yellow);
  transform: translateX(-50%);
}

.pull-guide p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.7;
}

.unbox-complete {
  align-self: center;
  padding: 12px 18px;
  border-radius: 999px;
  color: #fff;
  background: var(--green);
  opacity: calc((var(--unbox-progress) - .84) * 8);
  transform: translateY(calc((1 - var(--unbox-progress)) * 40px));
}

.quiz-anchor {
  display: grid;
  min-height: 88svh;
  place-items: center;
  padding: 120px 24px;
  background: var(--yellow);
}

.anchor-card {
  width: min(720px, 92vw);
  padding: clamp(32px, 6vw, 70px);
  border: 5px solid var(--ink);
  border-radius: 36px;
  background: #fff;
  box-shadow: 12px 14px 0 var(--ink);
  text-align: center;
}

.anchor-card > i {
  color: var(--red);
  font-size: 56px;
}

.anchor-card h2 {
  margin: 18px 0 8px;
  font-family: "Noto Sans JP", sans-serif;
  font-size: clamp(30px, 4vw, 50px);
}

.anchor-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.7;
}

.choose-route {
  min-height: 115svh;
  padding: 130px max(4vw, 22px);
  background: #fff7ea;
}

.route-copy {
  width: min(820px, 100%);
  margin: 0 auto 50px;
  text-align: center;
}

.route-copy h2 {
  font-size: clamp(36px, 5.4vw, 68px);
}

.route-grid {
  display: grid;
  width: min(1120px, 100%);
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2.5vw, 28px);
  margin: 0 auto;
}

.route-card {
  display: grid;
  min-height: 360px;
  align-content: center;
  justify-items: center;
  gap: 10px;
  padding: 26px 20px;
  border: 4px solid var(--ink);
  border-radius: 28px;
  color: var(--ink);
  background: #fff;
  box-shadow: 8px 9px 0 var(--ink);
  text-align: center;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.route-card:hover,
.route-card.is-selected {
  background: var(--cream);
  box-shadow: 4px 5px 0 var(--ink);
  transform: translateY(5px) rotate(-1deg);
}

.route-card.is-selected {
  outline: 8px solid var(--yellow);
}

.route-icon {
  display: grid;
  width: 120px;
  height: 120px;
  margin-bottom: 12px;
  place-items: center;
  border: 4px solid var(--ink);
  border-radius: 50%;
  color: #fff;
  font-size: 52px;
}

.bakery-icon { background: var(--orange); }
.park-icon { background: var(--green); }
.friend-icon { background: var(--purple); }

.route-card strong {
  font-family: "Noto Sans JP", sans-serif;
  font-size: 29px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.route-card span:not(.route-icon) {
  font-size: 15px;
}

.route-card small {
  color: var(--ink-soft);
  font-size: 13px;
}

.route-feedback {
  min-height: 30px;
  margin: 35px 0 0;
  color: var(--red);
  text-align: center;
}

body.is-route-pending .choose-route ~ section {
  display: none;
}

.learning-trail {
  padding: 120px max(4vw, 22px) 80px;
  background:
    linear-gradient(90deg, transparent 49.7%, rgba(23, 57, 77, 0.11) 49.7% 50.3%, transparent 50.3%),
    #edf7f4;
}

.trail-heading {
  margin-bottom: 70px;
}

.mission-card {
  position: relative;
  display: grid;
  width: min(900px, 100%);
  min-height: 320px;
  grid-template-columns: 1fr .75fr;
  align-items: center;
  gap: 30px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 55px);
  border: 4px solid var(--ink);
  border-radius: 32px;
  background: #fff;
  box-shadow: 10px 12px 0 var(--ink);
}

.mission-card:nth-of-type(even) {
  transform: rotate(1deg);
}

.mission-card h3 {
  margin: 6px 0 13px;
  font-family: "Noto Sans JP", sans-serif;
  font-size: clamp(32px, 4vw, 48px);
}

.mission-card p:not(.eyebrow) {
  margin: 0;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.8;
}

.mission-number {
  position: absolute;
  top: -22px;
  left: -20px;
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  border: 4px solid var(--ink);
  border-radius: 50%;
  color: #fff;
  background: var(--red);
  box-shadow: 4px 4px 0 var(--ink);
}

.mission-art {
  position: relative;
  display: flex;
  min-height: 180px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 4px solid var(--ink);
  border-radius: 24px;
  background: var(--cream);
}

.flowers span {
  width: 60px;
  height: 60px;
  border: 4px solid var(--ink);
  border-radius: 50% 20%;
  background: var(--red);
  transform: rotate(45deg);
}

.flowers span:nth-child(2) { background: var(--yellow); transform: rotate(10deg); }
.flowers span:nth-child(3) { background: var(--blue); transform: rotate(70deg); }

.shapes span { display: block; width: 65px; height: 65px; border: 4px solid var(--ink); }
.shapes .circle { border-radius: 50%; background: var(--red); }
.shapes .square { background: var(--green); transform: rotate(8deg); }
.shapes .triangle { border: 0; background: var(--yellow); clip-path: polygon(50% 0, 100% 100%, 0 100%); filter: drop-shadow(0 4px 0 var(--ink)); }

.bird-art,
.share-art {
  color: var(--purple);
  font-size: 96px;
}

.share-art { color: var(--green); }

.compact-anchor {
  min-height: 72svh;
  margin: 18px auto 28px;
  padding: 50px 18px;
  background: transparent;
}

.compact-anchor .anchor-card {
  display: flex;
  width: min(520px, 86vw);
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 22px 26px;
  border-radius: 20px;
  box-shadow: 6px 7px 0 var(--ink);
}

.compact-anchor .anchor-card > i {
  font-size: 25px;
}

.compact-anchor.is-unlocked .anchor-card {
  border-color: #3f7e3a;
  background: #f1faed;
}

.compact-anchor.is-unlocked .anchor-card > i {
  color: var(--green);
}

.compact-anchor.is-unlocking .anchor-card {
  animation: unlock-card 720ms cubic-bezier(.2, .8, .2, 1) both;
}

.compact-anchor.is-unlocking .anchor-card > i {
  animation: unlock-icon 720ms cubic-bezier(.2, .8, .2, 1) both;
}

@keyframes unlock-card {
  0% { box-shadow: 6px 7px 0 var(--ink); transform: scale(1); }
  38% { box-shadow: 0 0 0 10px rgba(113, 170, 102, .24), 9px 11px 0 var(--ink); transform: scale(1.05) rotate(-1deg); }
  70% { box-shadow: 0 0 0 4px rgba(113, 170, 102, .12), 5px 6px 0 var(--ink); transform: scale(.99) rotate(.4deg); }
  100% { box-shadow: 6px 7px 0 var(--ink); transform: scale(1); }
}

@keyframes unlock-icon {
  0% { transform: rotate(0) scale(1); }
  38% { transform: rotate(-18deg) scale(1.42); }
  70% { transform: rotate(9deg) scale(.94); }
  100% { transform: rotate(0) scale(1); }
}

.reveal-scroll {
  position: relative;
  height: 460vh;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 203, 79, 0.19), transparent 28rem),
    #16364c;
}

.reveal-sticky {
  position: sticky;
  top: 0;
  display: grid;
  min-height: 100svh;
  grid-template-rows: auto minmax(340px, 1fr) auto;
  align-items: center;
  overflow: hidden;
  padding: 90px 20px 24px;
}

.reveal-heading {
  margin-bottom: 0;
}

.reveal-heading h2 {
  font-size: clamp(30px, 4vw, 50px);
}

.reveal-heading p {
  font-size: 15px;
}

.exploded-chest {
  --explode: var(--reveal-progress);
  --chest-opacity: clamp(0, calc((.78 - var(--reveal-progress)) * 4.35), 1);
  --truth-opacity: clamp(0, calc((var(--reveal-progress) - .55) * 4.35), 1);
  position: relative;
  width: min(700px, 88vw);
  height: min(500px, 52vh);
  margin: 0 auto;
  perspective: 1000px;
  transform: scale(calc(.72 + var(--explode) * .34));
  transform-style: preserve-3d;
}

.chest-layer,
.chest-glow,
.truth-picture,
.focus-ring {
  position: absolute;
  left: 50%;
  will-change: transform, opacity;
}

.chest-glow {
  top: 45%;
  width: 380px;
  height: 270px;
  border-radius: 50%;
  background: rgba(255, 203, 79, 0.9);
  filter: blur(55px);
  opacity: min(calc(var(--explode) * .86), var(--chest-opacity));
  transform: translate(-50%, -50%) scale(calc(.3 + var(--explode)));
}

.chest-lid {
  z-index: 6;
  top: 16%;
  width: 410px;
  height: 130px;
  border: 6px solid var(--ink);
  border-radius: 140px 140px 20px 20px;
  background: #b96f3e;
  box-shadow: inset 0 -16px 0 #8f4f31;
  opacity: var(--chest-opacity);
  transform: translate3d(-50%, calc(var(--explode) * -150px), calc(var(--explode) * 130px)) rotateX(calc(var(--explode) * -28deg));
}

.chest-lid span {
  position: absolute;
  inset: 18px 26px;
  border: 7px solid var(--yellow);
  border-bottom: 0;
  border-radius: 110px 110px 0 0;
}

.chest-rim {
  z-index: 5;
  top: 42%;
  width: 450px;
  height: 54px;
  border: 6px solid var(--ink);
  border-radius: 14px;
  background: var(--yellow);
  opacity: var(--chest-opacity);
  transform: translate3d(-50%, calc(var(--explode) * -45px), calc(var(--explode) * 80px));
}

.chest-tray {
  z-index: 4;
  top: 47%;
  display: flex;
  width: 390px;
  height: 100px;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 5px solid var(--ink);
  border-radius: 16px;
  background: #fff4ce;
  opacity: var(--chest-opacity);
  transform: translate3d(-50%, calc(var(--explode) * -15px), calc(var(--explode) * 130px)) rotateX(calc(var(--explode) * 18deg));
}

.cookie {
  width: 68px;
  height: 68px;
  border: 4px solid var(--ink);
  background: #d99a55;
  clip-path: polygon(50% 0, 63% 32%, 98% 35%, 71% 57%, 79% 93%, 50% 74%, 21% 93%, 29% 57%, 2% 35%, 37% 32%);
}

.cookie-two { transform: rotate(18deg) scale(.88); }
.cookie-three { transform: rotate(-13deg) scale(.92); }

.chest-box {
  z-index: 3;
  top: 48%;
  width: 430px;
  height: 190px;
  border: 6px solid var(--ink);
  border-radius: 14px 14px 30px 30px;
  background:
    linear-gradient(90deg, transparent 46%, var(--yellow) 46% 54%, transparent 54%),
    #a96038;
  box-shadow: inset 0 -30px 0 #89482f;
  opacity: var(--chest-opacity);
  transform: translate3d(-50%, calc(var(--explode) * 80px), calc(var(--explode) * -30px)) rotateX(calc(var(--explode) * 9deg));
}

.chest-lock {
  z-index: 7;
  top: 48%;
  display: grid;
  width: 70px;
  height: 86px;
  place-items: center;
  border: 5px solid var(--ink);
  border-radius: 13px;
  color: var(--ink);
  background: var(--yellow);
  font-size: 31px;
  opacity: var(--chest-opacity);
  transform: translate3d(calc(-50% + var(--explode) * 185px), calc(var(--explode) * 105px), calc(var(--explode) * 190px)) rotate(calc(var(--explode) * 24deg));
}

.truth-picture {
  z-index: 10;
  top: 6%;
  width: min(620px, 82vw);
  aspect-ratio: 3 / 2;
  border: 7px solid #fff;
  border-radius: 32px;
  background: url("assets/comic-chest.png") center / cover;
  box-shadow: var(--shadow);
  opacity: var(--truth-opacity);
  transform: translateX(-50%) scale(calc(.72 + var(--explode) * .28));
  -webkit-mask-image: radial-gradient(circle at 50% 48%, #000 0 calc(var(--explode) * 52%), transparent calc(var(--explode) * 72%));
  mask-image: radial-gradient(circle at 50% 48%, #000 0 calc(var(--explode) * 52%), transparent calc(var(--explode) * 72%));
}

.focus-ring {
  z-index: 11;
  top: 14%;
  color: #fff;
  font-size: clamp(200px, 36vw, 420px);
  opacity: calc((.78 - var(--explode)) * 2.8);
  filter: drop-shadow(0 0 10px rgba(23, 57, 77, 0.75));
  transform: translateX(-50%) scale(calc(.52 + var(--explode) * .9)) rotate(-15deg);
}

.truth-caption {
  position: relative;
  z-index: 12;
  width: min(760px, 92vw);
  margin: 0 auto;
  padding: 16px 24px;
  border: 2px solid rgba(255, 255, 255, 0.34);
  border-radius: 22px;
  color: #fff;
  background: rgba(13, 39, 55, 0.82);
  text-align: center;
  opacity: calc((var(--reveal-progress) - .72) * 5);
  backdrop-filter: blur(12px);
}

.truth-caption span {
  color: var(--yellow);
  font-size: 11px;
  letter-spacing: 0.18em;
}

.truth-caption strong {
  display: block;
  margin: 4px 0;
  font-size: clamp(20px, 3vw, 31px);
}

.truth-caption p {
  margin: 0;
  font-size: 13px;
  line-height: 1.65;
}

.final-anchor {
  background: var(--purple);
}

.ending-section {
  position: relative;
  display: flex;
  min-height: 110svh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 130px 22px 70px;
  background:
    radial-gradient(circle at 50% 32%, rgba(255, 255, 255, 0.75), transparent 14rem),
    linear-gradient(165deg, #fff8dc, #ffdc79);
  text-align: center;
}

.ending-section::before {
  position: absolute;
  right: -12%;
  bottom: -27%;
  left: -12%;
  height: 48%;
  border: 5px solid var(--ink);
  border-radius: 50% 50% 0 0;
  background: var(--green);
  content: "";
}

.ending-section > * {
  position: relative;
  z-index: 2;
}

.ending-badge {
  display: grid;
  width: 150px;
  height: 150px;
  margin-bottom: 22px;
  place-items: center;
  border: 7px solid var(--ink);
  border-radius: 50%;
  color: #fff;
  background: var(--red);
  box-shadow: 0 0 0 12px #fff, 10px 14px 0 rgba(23, 57, 77, 0.18);
  font-size: 76px;
  transform: rotate(-5deg);
}

.ending-section h2 {
  max-width: 900px;
}

.ending-section > p {
  max-width: 760px;
}

.ending-stats {
  display: flex;
  gap: 12px;
  margin: 36px 0;
}

.ending-stats > div {
  display: grid;
  min-width: 118px;
  padding: 18px;
  border: 3px solid var(--ink);
  border-radius: 18px;
  background: #fff;
  box-shadow: 4px 5px 0 var(--ink);
}

.ending-stats strong {
  font-family: "Noto Sans JP", sans-serif;
  font-size: 32px;
}

.ending-stats span {
  color: var(--ink-soft);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.parent-note {
  margin-top: 34px !important;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink-soft);
  font-size: 12px !important;
}

.quiz-dialog {
  width: min(780px, calc(100% - 28px));
  max-height: calc(100svh - 26px);
  overflow: auto;
  padding: clamp(24px, 5vw, 48px);
  border: 5px solid var(--ink);
  border-radius: 34px;
  color: var(--ink);
  background: #fffdf5;
  box-shadow: 13px 15px 0 var(--ink);
  text-align: center;
}

.quiz-dialog::backdrop {
  background: rgba(12, 36, 51, 0.82);
  backdrop-filter: blur(8px);
}

.quiz-dialog[open] {
  animation: dialog-in 280ms cubic-bezier(.2, .8, .2, 1) both;
}

@keyframes dialog-in {
  from { opacity: 0; transform: translateY(30px) scale(.94); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.quiz-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--red);
  font-size: 12px;
  letter-spacing: 0.16em;
}

.dark-icon {
  color: #fff;
  background: var(--ink);
}

.quiz-visual {
  display: grid;
  width: 120px;
  height: 120px;
  margin: 6px auto 14px;
  place-items: center;
  border: 5px solid var(--ink);
  border-radius: 50%;
  color: #fff;
  background: var(--blue);
  box-shadow: 7px 8px 0 var(--ink);
  font-size: 56px;
}

.quiz-prompt {
  margin: 0;
  color: var(--red);
  font-family: "Noto Sans JP", sans-serif;
  font-size: 17px;
}

.quiz-dialog h2 {
  margin: 6px 0;
  font-family: "Noto Sans JP", sans-serif;
  font-size: clamp(30px, 5vw, 51px);
  font-weight: 900;
  line-height: 1.15;
}

.quiz-hint {
  margin: 0 0 24px;
  color: var(--ink-soft);
  font-size: 14px;
}

.quiz-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.answer-button {
  display: grid;
  min-height: 112px;
  place-items: center;
  gap: 8px;
  padding: 14px 10px;
  border: 4px solid var(--ink);
  border-radius: 20px;
  color: var(--ink);
  background: #fff;
  box-shadow: 5px 6px 0 var(--ink);
  font-family: "Noto Sans JP", sans-serif;
  font-size: clamp(16px, 2.3vw, 23px);
  font-weight: 900;
  transition: transform 150ms ease, background 150ms ease;
}

.answer-button i {
  font-size: 32px;
}

.answer-button:hover {
  background: var(--cream);
  transform: translateY(-3px);
}

.answer-button.is-wrong {
  background: #ffe1e5;
  animation: shake 320ms ease;
}

.answer-button.is-correct {
  color: #fff;
  background: var(--green);
}

@keyframes shake {
  25% { transform: translateX(-7px); }
  50% { transform: translateX(7px); }
  75% { transform: translateX(-4px); }
}

.quiz-feedback {
  min-height: 34px;
  margin-top: 16px;
  color: var(--red);
  font-size: 17px;
}

.quiz-feedback.is-good { color: #3f7e3a; }

.toast {
  position: fixed;
  z-index: 500;
  right: 22px;
  bottom: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 18px;
  border: 3px solid var(--ink);
  border-radius: 16px;
  color: #fff;
  background: var(--green);
  box-shadow: 5px 6px 0 var(--ink);
  opacity: 0;
  pointer-events: none;
  transform: translateY(30px);
  transition: opacity 200ms ease, transform 200ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.noscript-card {
  position: fixed;
  z-index: 900;
  inset: 20px;
  display: grid;
  place-items: center;
  padding: 30px;
  border: 5px solid var(--ink);
  border-radius: 25px;
  background: #fff;
  text-align: center;
}

@media (max-width: 860px) {
  .game-hud {
    grid-template-columns: auto 1fr auto;
    gap: 8px;
  }

  .mini-brand span:last-child,
  .clue-counter span,
  .clue-counter i {
    display: none;
  }

  .clue-counter {
    min-width: 45px;
    padding: 8px;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-top: 120px;
    padding-bottom: 100px;
  }

  .hero-copy {
    text-align: center;
  }

  .title-case,
  .hero-lead {
    margin-right: auto;
    margin-left: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-scene {
    width: min(600px, 94vw);
    margin: 0 auto;
  }

  .cloud-one { left: 64%; }

  .route-grid {
    grid-template-columns: 1fr;
    max-width: 560px;
  }

  .route-card {
    min-height: 240px;
  }

  .mission-card {
    grid-template-columns: 1fr;
  }

  .mission-art {
    min-height: 150px;
  }
}

@media (max-width: 620px) {
  .game-hud {
    top: 8px;
    min-height: 55px;
    padding: 6px;
    border-radius: 18px;
  }

  .brand-mark,
  .icon-button {
    width: 38px;
    height: 38px;
  }

  .hud-actions {
    gap: 3px;
  }

  .clue-counter {
    display: none;
  }

  .hero {
    padding-right: 18px;
    padding-left: 18px;
  }

  .title-main {
    font-size: clamp(62px, 23vw, 98px);
  }

  .title-case {
    font-size: 18px;
  }

  .hero-scene {
    width: 100%;
  }

  .story-sticky {
    padding-top: 82px;
  }

  .comic-panel {
    width: 78vw;
  }

  .unboxing-layout {
    grid-template-columns: 1fr;
    min-height: 470px;
  }

  .file-box {
    width: 86vw;
    height: 330px;
    margin: 0 auto;
  }

  .pull-guide {
    grid-template-columns: auto 80px 1fr;
    align-items: center;
  }

  .pull-line {
    width: 80px;
    height: 4px;
  }

  .pull-line i {
    top: 50%;
    left: calc(var(--unbox-progress) * 64px + 8px);
    transform: translate(-50%, -50%);
  }

  .quiz-options {
    grid-template-columns: 1fr;
  }

  .answer-button {
    min-height: 78px;
    grid-template-columns: 42px 1fr;
  }

  .reveal-sticky {
    grid-template-rows: auto minmax(320px, 1fr) auto;
  }

  .exploded-chest {
    width: 100%;
  }

  .chest-lid { width: 300px; height: 100px; }
  .chest-rim { width: 330px; }
  .chest-tray { width: 295px; }
  .chest-box { width: 320px; height: 160px; }
  .cookie { width: 54px; height: 54px; }

  .ending-stats {
    width: 100%;
    justify-content: center;
  }

  .ending-stats > div {
    min-width: 0;
    flex: 1;
    padding: 13px 8px;
  }

  .ending-actions {
    justify-content: center;
  }

  .primary-button,
  .secondary-button {
    font-size: 17px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
  .story-track,
  .floating-prop,
  .clue-sheet,
  .chest-layer,
  .truth-picture,
  .focus-ring {
    transform: none !important;
  }
  .clue-sticky .section-heading { transform: none !important; }
  .reveal-scroll { height: auto; min-height: 100svh; }
  .reveal-sticky { position: relative; }
  .exploded-chest { transform: none !important; }
  .truth-picture {
    opacity: 1;
    transform: translateX(-50%) !important;
    mask-image: none;
    -webkit-mask-image: none;
  }
  .focus-ring { opacity: 0 !important; }
  .chest-layer,
  .chest-glow { opacity: 0 !important; }
}
