:root {
  --night: #19153b;
  --night-2: #28205b;
  --ink: #29213c;
  --paper: #fff8dd;
  --paper-deep: #f4e3ad;
  --cream: #fffdf2;
  --coral: #ff6d72;
  --gold: #ffd45f;
  --mint: #6ed8d1;
  --violet: #b77af0;
  --orange: #ffad55;
  --line: #413665;
  --shadow: 0 14px 0 rgba(11, 8, 36, .27), 0 22px 45px rgba(5, 4, 24, .3);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-height: 100%; background: var(--night); }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  color: var(--cream);
  background:
    radial-gradient(circle at 15% 20%, rgba(183, 122, 240, .2), transparent 28rem),
    radial-gradient(circle at 85% 80%, rgba(110, 216, 209, .15), transparent 30rem),
    linear-gradient(160deg, #161230, #28205a 55%, #151231);
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

button, a { font: inherit; }
button { color: inherit; }
button:focus-visible, a:focus-visible { outline: 4px solid #fff; outline-offset: 4px; }
.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; }

.festival-sky { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.sky-star { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 18px var(--gold); }
.sky-star::before, .sky-star::after { content: ""; position: absolute; inset: 3px -7px; background: inherit; border-radius: 50%; }
.sky-star::after { transform: rotate(90deg); }
.sky-star--1 { top: 14%; left: 7%; }.sky-star--2 { top: 26%; right: 8%; transform: scale(.7); }
.sky-star--3 { bottom: 18%; left: 12%; transform: scale(.55); }.sky-star--4 { bottom: 12%; right: 15%; transform: scale(.85); }
.pennants { position: absolute; top: 64px; left: -2vw; right: -2vw; height: 44px; display: flex; justify-content: space-around; border-top: 4px solid rgba(255, 248, 221, .7); transform: rotate(-1deg); }
.pennants i { width: 44px; height: 38px; clip-path: polygon(0 0, 100% 0, 50% 100%); background: var(--coral); }
.pennants i:nth-child(2n) { background: var(--gold); }.pennants i:nth-child(3n) { background: var(--mint); }

.game-shell { position: relative; z-index: 1; width: min(1180px, 100%); min-height: 100vh; margin: 0 auto; padding: 16px clamp(12px, 3vw, 30px) 48px; }
.topbar { min-height: 52px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.back-link { justify-self: start; color: var(--cream); text-decoration: none; font-size: .9rem; font-weight: 800; }
.back-link span { display: inline-grid; place-items: center; width: 30px; height: 30px; margin-right: 6px; border: 2px solid currentColor; border-radius: 50%; font-size: 1.5rem; }
.marquee-mark { display: flex; align-items: center; gap: 10px; font: 800 .73rem/1 system-ui, sans-serif; letter-spacing: .18em; color: var(--gold); }
.marquee-mark i { width: 7px; height: 7px; background: currentColor; transform: rotate(45deg); box-shadow: 0 0 10px currentColor; }
.sound-button { justify-self: end; min-height: 42px; padding: 8px 13px; border: 2px solid rgba(255,255,255,.55); border-radius: 6px; background: #272052; box-shadow: 4px 4px 0 #0b0924; cursor: pointer; font-weight: 800; }
.screen { position: relative; min-height: calc(100vh - 85px); }

/* Start: a small paper theatre rather than a generic card. */
.start-screen { display: grid; place-items: center; padding: 56px 0 30px; }
.start-stage { position: relative; width: min(820px, 100%); padding: clamp(30px, 5vw, 54px) clamp(18px, 6vw, 74px) 38px; text-align: center; color: var(--ink); background: var(--paper); border: 6px solid #9d3f59; border-radius: 48% 48% 18px 18px / 70px 70px 18px 18px; box-shadow: var(--shadow); overflow: hidden; }
.start-stage::before { content: ""; position: absolute; inset: 12px; border: 3px dashed rgba(65,54,101,.23); border-radius: inherit; pointer-events: none; }
.start-stage::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 18px; background: repeating-linear-gradient(90deg, var(--coral) 0 30px, var(--gold) 30px 60px, var(--mint) 60px 90px); }
.curtain { position: absolute; z-index: 3; top: 22px; bottom: 20px; width: clamp(32px, 7vw, 82px); background: repeating-linear-gradient(90deg, #8a2c49 0 14px, #c64b64 14px 28px); border: 4px solid #6f203b; box-shadow: inset 0 0 18px rgba(0,0,0,.25); }
.curtain::after { content: ""; position: absolute; top: 44%; width: 28px; height: 14px; background: var(--gold); border: 3px solid #8a5a16; border-radius: 50%; }
.curtain--left { left: max(0px, calc(50% - 450px)); border-radius: 40px 0 0 14px; transform: rotate(2deg); }
.curtain--left::after { right: -8px; }.curtain--right { right: max(0px, calc(50% - 450px)); border-radius: 0 40px 14px 0; transform: rotate(-2deg); }
.curtain--right::after { left: -8px; }
.kicker { position: relative; z-index: 1; display: inline-block; margin: 0 0 10px; padding: 7px 16px; color: #fff; background: var(--night-2); border-radius: 2px; font-weight: 900; letter-spacing: .08em; transform: rotate(-1deg); }
h1 { position: relative; z-index: 1; margin: 0; font-size: clamp(2.25rem, 8vw, 5.2rem); line-height: .92; letter-spacing: -.06em; text-shadow: 4px 4px 0 #fff, 7px 7px 0 rgba(65,54,101,.18); }
h1 span { color: var(--coral); font-size: .65em; letter-spacing: .02em; }
.lead { position: relative; z-index: 1; margin: 20px auto 10px; font-weight: 800; line-height: 1.8; }
.lead strong { color: #8c2f79; border-bottom: 4px solid var(--gold); }
.hero-tree { position: relative; width: 260px; height: 154px; margin: 8px auto 12px; }
.hero-tree__glow { position: absolute; inset: 0 28px 20px; border-radius: 50%; background: radial-gradient(circle, rgba(255,212,95,.55), transparent 68%); filter: blur(3px); }
.hero-tree__crown { position: absolute; inset: 2px 22px 48px; display: flex; align-items: center; justify-content: space-evenly; background: #6ed8d1; border: 5px solid var(--line); border-radius: 48% 52% 44% 56%; box-shadow: inset 0 -15px 0 rgba(40,32,91,.12); }
.hero-tree__crown::before, .hero-tree__crown::after { content: ""; position: absolute; width: 74px; height: 65px; border: 5px solid var(--line); border-radius: 50%; background: #8de5bd; z-index: -1; }
.hero-tree__crown::before { left: -17px; bottom: -7px; }.hero-tree__crown::after { right: -17px; top: 8px; background: #c38cf2; }
.hero-tree__crown i { color: #fff8c5; font-style: normal; font-size: 1.5rem; text-shadow: 0 0 8px #fff, 2px 2px 0 #8b5e17; animation: glowPulse 1.7s ease-in-out infinite alternate; }
.hero-tree__crown i:nth-child(2n) { animation-delay: -.8s; }
.hero-tree__trunk { position: absolute; left: 50%; bottom: 22px; width: 42px; height: 55px; transform: translateX(-50%); background: #a45b38; border: 5px solid var(--line); clip-path: polygon(20% 0, 80% 0, 100% 100%, 0 100%); }
.hero-tree__roots { position: absolute; inset: auto 0 0; display: flex; justify-content: space-between; }
.hero-tree__roots span { padding: 3px 9px; color: #fff; background: var(--line); border-radius: 999px; font-size: .72rem; font-weight: 900; }
.how-strip { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: clamp(6px, 2vw, 20px); margin: 14px auto 22px; }
.how-strip div { display: flex; align-items: center; gap: 7px; text-align: left; font-size: .8rem; font-weight: 800; line-height: 1.25; }
.how-strip b { display: grid; place-items: center; width: 30px; height: 30px; color: #fff; background: var(--coral); border: 3px solid var(--line); border-radius: 50%; }
.how-strip em { color: #8e80ae; font-style: normal; }
.start-button, .replay-button { position: relative; z-index: 1; min-height: 58px; padding: 13px 27px; border: 4px solid var(--line); border-radius: 8px; color: #21183e; background: var(--gold); box-shadow: 0 8px 0 #b47625; cursor: pointer; font-size: 1.1rem; font-weight: 1000; transition: transform .13s, box-shadow .13s; }
.start-button:hover, .replay-button:hover { transform: translateY(3px); box-shadow: 0 5px 0 #b47625; }
.start-button i { margin-left: 12px; font-style: normal; }
.quick-help { position: relative; z-index: 1; margin: 20px 0 0; color: #665a79; font-size: .75rem; font-weight: 700; line-height: 1.6; }
.record-ticket { position: absolute; z-index: 5; top: 92px; right: max(5px, calc(50% - 475px)); width: 160px; padding: 13px; color: var(--ink); background: #ffd4d0; border: 3px solid var(--line); transform: rotate(4deg); box-shadow: 6px 7px 0 rgba(0,0,0,.22); }
.record-ticket::before, .record-ticket::after { content: ""; position: absolute; left: 50%; width: 20px; height: 20px; transform: translateX(-50%) rotate(45deg); background: var(--night); border: 3px solid var(--line); }
.record-ticket::before { top: -13px; }.record-ticket::after { bottom: -13px; }
.record-ticket h2 { margin: 0 0 8px; font: 900 .68rem/1 system-ui; letter-spacing: .12em; }
.record-ticket dl { margin: 0; }.record-ticket dl div { display: flex; justify-content: space-between; padding: 5px 0; border-top: 2px dotted #aa6673; font-size: .78rem; }
.record-ticket dt { font-weight: 700; }.record-ticket dd { margin: 0; font-weight: 1000; }

/* Play */
.play-screen { padding-top: 20px; }
.hud-ribbon { display: grid; grid-template-columns: repeat(4, 1fr); max-width: 880px; margin: 0 auto; color: var(--ink); background: var(--paper); border: 4px solid var(--line); box-shadow: 0 7px 0 #0c0928; transform: rotate(-.3deg); }
.hud-ribbon > div { min-width: 0; padding: 8px 12px; text-align: center; border-right: 3px dashed #c5b88e; }
.hud-ribbon > div:last-child { border-right: 0; }.hud-ribbon span { display: block; color: #6b607a; font-size: .68rem; font-weight: 900; }.hud-ribbon strong { display: block; overflow: hidden; text-overflow: ellipsis; font-size: 1.15rem; white-space: nowrap; }.hud-ribbon b { color: #b23b62; }
.glow-hud strong { color: #ac7013; letter-spacing: .06em; }
.journey-track { width: min(880px, 96%); height: 8px; margin: 8px auto 16px; overflow: hidden; background: #0d0a2c; border: 1px solid rgba(255,255,255,.3); }
.journey-track i { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--coral), var(--gold), var(--mint)); transition: width .4s ease; }
.parade-stage { position: relative; padding: clamp(13px, 2vw, 22px); background: linear-gradient(rgba(255,255,255,.02), rgba(255,255,255,.07)), repeating-linear-gradient(90deg, transparent 0 60px, rgba(255,255,255,.025) 60px 61px); border: 4px solid rgba(255,248,221,.28); border-radius: 18px; }
.mission-banner { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 15px; min-height: 90px; padding: 12px 16px; color: var(--ink); background: var(--gold); border: 4px solid var(--line); clip-path: polygon(0 8px, 14px 8px, 14px 0, calc(100% - 14px) 0, calc(100% - 14px) 8px, 100% 8px, 100% calc(100% - 8px), calc(100% - 14px) calc(100% - 8px), calc(100% - 14px) 100%, 14px 100%, 14px calc(100% - 8px), 0 calc(100% - 8px)); }
.scene-icon { display: grid; place-items: center; width: 64px; height: 64px; background: var(--paper); border: 4px solid var(--line); border-radius: 50%; font-size: 2rem; box-shadow: 4px 4px 0 rgba(65,54,101,.25); }
.mission-banner p { margin: 0; font-size: .82rem; font-weight: 800; }.mission-banner p:first-child { color: #7e3158; letter-spacing: .08em; text-transform: uppercase; }.mission-banner h2 { margin: 2px 0; font-size: clamp(1.2rem, 3vw, 1.75rem); }.timer-wrap { min-width: 100px; text-align: right; }.timer-wrap span { font-weight: 1000; }.timer-wrap i { display: block; width: 100px; height: 12px; margin-top: 5px; overflow: hidden; background: #fff7cf; border: 3px solid var(--line); }.timer-wrap b { display: block; width: 100%; height: 100%; background: #4ab5a7; transition: width .1s linear; }.timer-wrap.is-urgent b { background: var(--coral); }.timer-wrap.is-urgent span { color: #a32242; }
.rail-label { display: flex; align-items: center; gap: 10px; margin: 15px 0 8px; color: #dbd3ff; font-size: .72rem; font-weight: 900; letter-spacing: .12em; }.rail-label span { flex: 1; height: 3px; background: repeating-linear-gradient(90deg, #6b5a9e 0 18px, transparent 18px 29px); }
.memory-rail { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(8px, 1.5vw, 16px); padding: 13px 8px 20px; }
.memory-rail::after { content: ""; position: absolute; z-index: -1; left: 0; right: 0; bottom: 5px; height: 13px; background: repeating-linear-gradient(90deg, #9582c7 0 34px, #3b3066 34px 48px); border: 3px solid #0d0a2c; }
.memory-card { --drag-x: 0px; --drag-y: 0px; position: relative; min-width: 0; min-height: 235px; padding: 15px 13px 13px; color: var(--ink); text-align: left; background: var(--paper); border: 4px solid var(--line); border-radius: 4px; box-shadow: 5px 7px 0 #0b0927; cursor: grab; transform: translate(var(--drag-x), var(--drag-y)) rotate(var(--tilt, -1deg)); transition: transform .16s, box-shadow .16s, filter .16s; touch-action: none; }
.memory-card:nth-child(2) { --tilt: 1deg; }.memory-card:nth-child(3) { --tilt: -1.5deg; }
.memory-card:hover, .memory-card.is-selected { filter: brightness(1.07); box-shadow: 0 0 0 5px var(--gold), 7px 10px 0 #0b0927; transform: translate(var(--drag-x), calc(var(--drag-y) - 4px)) rotate(0); }
.memory-card.is-dragging { z-index: 20; cursor: grabbing; transition: none; opacity: .92; transform: translate(var(--drag-x), var(--drag-y)) rotate(3deg) scale(1.04); }
.memory-card__number { position: absolute; z-index: 2; top: -10px; left: -8px; display: grid; place-items: center; width: 35px; height: 35px; color: #fff; background: var(--coral); border: 3px solid var(--line); border-radius: 50%; font-weight: 1000; }
.memory-card__photo { position: relative; display: grid; place-items: center; height: 64px; margin-bottom: 8px; overflow: hidden; background: linear-gradient(150deg, #bcece1, #d1bcf3); border: 3px solid var(--line); }
.memory-card__photo::before { content: ""; position: absolute; width: 80px; height: 80px; background: rgba(255,255,255,.42); transform: rotate(35deg); }.memory-card__photo span { position: relative; font-size: 2rem; }.memory-card__photo i { position: absolute; right: 5px; bottom: 4px; width: 22px; height: 8px; border-radius: 50%; background: rgba(41,33,60,.18); }
.memory-card__past, .memory-card__now { display: block; min-height: 42px; padding: 5px 7px; font-size: clamp(.72rem, 1.55vw, .9rem); font-weight: 800; line-height: 1.45; }
.memory-card__past { color: #695b78; background: #eee4ca; border-left: 5px solid #9b8caa; }.memory-card__now { color: #3c2948; background: #fff1ac; border-left: 5px solid var(--coral); }
.memory-card__arrow { display: block; color: #9978b5; text-align: center; font-weight: 1000; line-height: 1; }
.memory-card__grip { display: block; margin-top: 8px; color: #796b87; text-align: center; font-size: .64rem; font-weight: 900; letter-spacing: .06em; }
.support-zone { padding: 10px 0 0; }.support-zone h3 { margin: 0 0 10px; text-align: center; font-size: .9rem; }.support-zone h3 span { display: inline-block; margin-right: 8px; padding: 4px 9px; color: var(--ink); background: var(--gold); transform: rotate(-1deg); }
.support-gates { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(7px, 1.5vw, 15px); }
.support-gate { position: relative; min-height: 92px; padding: 10px 8px 8px; color: var(--ink); background: var(--paper); border: 4px solid var(--line); border-bottom-width: 9px; border-radius: 38px 38px 5px 5px; box-shadow: 0 7px 0 #0b0927; cursor: pointer; overflow: hidden; transition: transform .13s, filter .13s; }
.support-gate:hover { transform: translateY(3px); filter: brightness(1.08); }.support-gate--home { background: #ffd2a0; }.support-gate--school { background: #a9ece7; }.support-gate--community { background: #dec0fa; }
.support-gate > i { display: flex; align-items: end; justify-content: center; gap: 3px; height: 29px; margin: 0 auto 3px; font-style: normal; }.support-gate > i b { display: block; width: 22px; height: 22px; background: var(--line); border-radius: 50% 50% 40% 40%; }.support-gate > i b:nth-child(2) { width: 18px; height: 18px; opacity: .72; }.support-gate > i b:nth-child(3) { width: 16px; height: 16px; opacity: .5; }
.support-gate span { display: block; font-weight: 1000; }.support-gate small { display: block; margin-top: 2px; font-size: .65rem; font-weight: 700; opacity: .72; }.support-gate kbd { display: inline-grid; place-items: center; min-width: 20px; height: 20px; color: #fff; background: var(--line); border: 0; border-radius: 3px; font: 800 .7rem system-ui; }
.feedback-ribbon { margin: 14px auto 0; padding: 13px 15px; color: var(--ink); background: var(--paper); border: 4px solid var(--line); border-left-width: 13px; box-shadow: 0 7px 0 #0b0927; }
.feedback-ribbon--success { border-left-color: #52c69a; }.feedback-ribbon--partial { border-left-color: var(--gold); }.feedback-ribbon--miss { border-left-color: var(--coral); }
.feedback-ribbon > div { display: flex; justify-content: space-between; gap: 10px; }.feedback-ribbon strong { font-size: 1.08rem; }.feedback-ribbon span { color: #a2395e; font-weight: 1000; }.feedback-ribbon p { margin: 6px 0 11px; font-size: .84rem; font-weight: 700; line-height: 1.65; }.feedback-ribbon button { min-height: 42px; padding: 7px 15px; color: #fff; background: var(--night-2); border: 3px solid var(--line); box-shadow: 3px 4px 0 #160f29; cursor: pointer; font-weight: 900; }
.memory-tree-panel { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 9px; margin-top: 16px; padding: 8px 12px; color: var(--ink); background: #c9f2df; border: 3px solid var(--line); }.memory-tree-panel > div:nth-child(2) span { display: block; font-size: .7rem; font-weight: 800; }.mini-tree { position: relative; width: 38px; height: 42px; }.mini-tree i { position: absolute; inset: 0 2px 11px; background: #55b981; border: 3px solid var(--line); border-radius: 50%; }.mini-tree b { position: absolute; left: 16px; bottom: 0; width: 8px; height: 17px; background: #965436; border: 2px solid var(--line); }.memory-tree { display: grid; grid-template-columns: repeat(9, 1fr); gap: 5px; }.memory-leaf { display: grid; place-items: center; aspect-ratio: 1; color: #8d82a3; background: rgba(255,255,255,.45); border: 2px dashed #7b6c91; border-radius: 50% 50% 50% 8px; transform: rotate(10deg); }.memory-leaf.is-lit { color: var(--ink); background: var(--gold); border-style: solid; animation: leafPop .45s cubic-bezier(.2,1.6,.5,1); }
.success-burst { position: fixed; z-index: 50; inset: 50% auto auto 50%; pointer-events: none; }.success-burst i { position: absolute; width: 10px; height: 10px; background: var(--gold); opacity: 0; transform: rotate(calc(var(--n) * 36deg)) translateY(0); }.success-burst.is-active i { animation: sparkBurst .65s ease-out; animation-delay: calc(var(--n) * 15ms); }

/* Checkpoint bookmark */
.quiz-screen { display: grid; place-items: center; padding: 40px 0; }
.bookmark { position: relative; width: min(720px, 100%); padding: clamp(30px, 5vw, 52px); color: var(--ink); background: var(--paper); border: 5px solid var(--line); box-shadow: var(--shadow); transform: rotate(.3deg); }
.bookmark::before { content: ""; position: absolute; inset: 15px; border: 3px dotted #c6b888; pointer-events: none; }.bookmark__ribbon { position: absolute; top: -7px; right: 38px; width: 54px; height: 82px; background: var(--coral); border: 4px solid var(--line); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 78%, 0 100%); }
.bookmark > p:first-of-type { position: relative; margin: 0; color: #9a365a; font-weight: 1000; }.bookmark h2 { position: relative; margin: 4px 0; font-size: clamp(1.8rem, 5vw, 3rem); }.bookmark__intro { position: relative; margin: 0 0 22px; font-weight: 700; }.bookmark fieldset { position: relative; margin: 0; padding: 0; border: 0; }.bookmark legend { width: 100%; margin-bottom: 15px; font-size: 1.1rem; font-weight: 1000; line-height: 1.65; }.quiz-choices { display: grid; gap: 10px; }.quiz-choice { min-height: 52px; padding: 10px 15px; color: var(--ink); text-align: left; background: #fff; border: 3px solid var(--line); box-shadow: 4px 4px 0 #b5a67d; cursor: pointer; font-weight: 800; }.quiz-choice:not(:disabled):hover { background: #fff1ac; transform: translateX(3px); }.quiz-choice.is-correct { background: #b9edd1; }.quiz-choice.is-wrong { background: #ffc3bf; text-decoration: line-through; }.quiz-explanation { position: relative; margin-top: 16px; padding: 13px; background: #e3d7f5; border-left: 8px solid var(--violet); }.quiz-explanation strong { display: block; color: #7c2b67; }.quiz-explanation p { margin: 5px 0 0; font-size: .86rem; font-weight: 700; line-height: 1.7; }.bookmark__next { position: relative; min-height: 46px; margin-top: 15px; padding: 8px 18px; color: #fff; background: var(--night-2); border: 3px solid var(--line); box-shadow: 4px 4px 0 #0c0927; cursor: pointer; font-weight: 900; }

/* Result */
.result-screen { display: grid; place-items: start center; padding: 34px 0; }.result-stage { position: relative; width: min(850px, 100%); padding: clamp(25px, 5vw, 52px); color: var(--ink); text-align: center; background: var(--paper); border: 6px solid var(--line); box-shadow: var(--shadow); overflow: hidden; }.result-stage::after { content: ""; position: absolute; inset: auto 0 0; height: 17px; background: repeating-linear-gradient(90deg, var(--coral) 0 34px, var(--gold) 34px 68px, var(--mint) 68px 102px, var(--violet) 102px 136px); }.result-rays { position: absolute; top: -250px; left: 50%; width: 500px; height: 500px; transform: translateX(-50%); background: repeating-conic-gradient(rgba(255,212,95,.28) 0 12deg, transparent 12deg 24deg); border-radius: 50%; }.result-stage .kicker, .result-stage h2, .result-stage > p { position: relative; }.result-stage h2 { margin: 8px 0; font-size: clamp(1.8rem, 5vw, 3.2rem); }.result-stage > p { font-weight: 700; line-height: 1.7; }.score-seal { position: relative; display: inline-grid; grid-template-columns: auto auto auto; align-items: end; gap: 6px; min-width: 270px; margin: 10px auto 20px; padding: 12px 22px; background: var(--gold); border: 5px double var(--line); transform: rotate(-1deg); }.score-seal span { grid-column: 1 / -1; font-size: .75rem; font-weight: 900; letter-spacing: .1em; }.score-seal strong { font-size: 2.7rem; line-height: 1; }.score-seal small { font-weight: 900; }.result-stats { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); border: 3px solid var(--line); }.result-stats div { padding: 9px; border-right: 3px dashed #c1b58c; }.result-stats div:last-child { border: 0; }.result-stats span { display: block; color: #6b607a; font-size: .7rem; font-weight: 800; }.result-stats strong { font-size: 1.15rem; }.album-shelf { position: relative; margin: 20px 0; padding: 14px; text-align: left; background: #dff3e8; border: 3px solid var(--line); }.album-shelf > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 12px; }.album-shelf h3, .album-shelf p { margin: 0; }.result-album { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 10px; }.album-stamp { display: grid; place-items: center; aspect-ratio: 1; color: #81778d; background: #ede7dc; border: 3px dashed #9e95a5; border-radius: 6px; }.album-stamp.is-found { color: var(--ink); background: #fff1a8; border-style: solid; font-size: 1.35rem; }.result-actions { position: relative; display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }.secondary-button { min-height: 50px; padding: 10px 20px; color: var(--ink); background: #fff; border: 3px solid var(--line); box-shadow: 0 5px 0 #aaa0ad; cursor: pointer; font-weight: 900; }.ranking-panel { position: relative; margin-top: 28px; padding: 15px; color: var(--ink); text-align: left; background: #e8ddf4; border: 3px solid var(--line); }

@keyframes glowPulse { to { transform: scale(1.22) rotate(8deg); filter: brightness(1.2); } }
@keyframes leafPop { from { transform: scale(.1) rotate(-40deg); } to { transform: scale(1) rotate(10deg); } }
@keyframes sparkBurst { 0% { opacity: 1; transform: rotate(calc(var(--n) * 36deg)) translateY(0) scale(1); } 100% { opacity: 0; transform: rotate(calc(var(--n) * 36deg)) translateY(-150px) scale(.2); } }

@media (max-width: 760px) {
  .game-shell { padding-inline: 9px; }.topbar { grid-template-columns: 1fr 1fr; }.marquee-mark { display: none; }.pennants { top: 58px; }.curtain { display: none; }.start-screen { padding-top: 42px; }.start-stage { border-radius: 34px 34px 12px 12px; }.record-ticket { position: relative; top: auto; right: auto; width: min(360px, 82%); margin: -7px auto 0; transform: rotate(-1deg); }.hero-tree { transform: scale(.9); margin-block: -3px -2px; }.hud-ribbon { grid-template-columns: repeat(2, 1fr); }.hud-ribbon > div:nth-child(2) { border-right: 0; }.hud-ribbon > div:nth-child(-n+2) { border-bottom: 3px dashed #c5b88e; }.mission-banner { grid-template-columns: auto 1fr; }.timer-wrap { grid-column: 1 / -1; width: 100%; display: flex; align-items: center; gap: 8px; }.timer-wrap i { flex: 1; width: auto; }.memory-rail { grid-template-columns: 1fr; padding-inline: 0; }.memory-rail::after { display: none; }.memory-card { min-height: 0; display: grid; grid-template-columns: 54px 1fr 22px 1fr; align-items: center; gap: 5px; padding: 11px; }.memory-card__number { top: -7px; left: -4px; width: 30px; height: 30px; }.memory-card__photo { width: 54px; height: 54px; margin: 0; }.memory-card__photo span { font-size: 1.55rem; }.memory-card__past, .memory-card__now { min-height: 60px; font-size: .71rem; }.memory-card__arrow { transform: rotate(0); }.memory-card__grip { display: none; }.support-gate { min-height: 86px; }.support-gate span { font-size: .75rem; }.support-gate small, .support-gate kbd { display: none; }.memory-tree-panel { grid-template-columns: auto 1fr; }.memory-tree { grid-column: 1 / -1; }.result-album { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 460px) {
  .game-shell { padding-top: 8px; }.sound-button { min-height: 38px; padding: 6px 9px; font-size: .77rem; }.back-link { font-size: .78rem; }.back-link span { width: 26px; height: 26px; }.start-stage { padding-inline: 14px; }.lead { font-size: .86rem; }.how-strip { gap: 4px; }.how-strip div { display: block; text-align: center; font-size: .65rem; }.how-strip b { margin: auto auto 4px; }.how-strip em { font-size: .7rem; }.quick-help { font-size: .65rem; }.parade-stage { padding: 8px; }.mission-banner { gap: 8px; padding: 9px; }.scene-icon { width: 48px; height: 48px; font-size: 1.5rem; }.mission-banner p { font-size: .7rem; }.memory-card { grid-template-columns: 42px 1fr 14px 1fr; gap: 3px; }.memory-card__photo { width: 42px; height: 50px; }.memory-card__past, .memory-card__now { padding: 4px; font-size: .64rem; }.support-gates { gap: 4px; }.support-gate { padding-inline: 3px; border-width: 3px; border-bottom-width: 7px; }.support-gate > i b { width: 18px; height: 18px; }.support-gate span { font-size: .66rem; }.feedback-ribbon p { font-size: .75rem; }.result-stats { grid-template-columns: 1fr; }.result-stats div { border-right: 0; border-bottom: 3px dashed #c1b58c; }.score-seal { min-width: 235px; }.bookmark { padding-inline: 20px; }
}

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