.play-section { border-top: 1px solid var(--line); scroll-margin-top: 35px; }
.play-tabs { display: grid; grid-template-columns: repeat(3,1fr); margin-top: 46px; border-block: 1px solid var(--line); }
.play-tabs button { background: transparent; display: flex; gap: 15px; align-items: center; padding: 23px 20px; text-align: left; color: var(--muted); font-size: 13px; position: relative; }
.play-tabs button + button { border-left: 1px solid var(--line); }
.play-tabs button > span:first-child { font: 10px/1 monospace; opacity: .65; }
.play-tabs button > span:last-child { margin-left: auto; font-size: 20px; }
.play-tabs button[aria-selected="true"] { color: var(--paper); background: #f3b3cb0a; }
.play-tabs button[aria-selected="true"]::after { content: ''; position: absolute; bottom: -1px; left: 20px; right: 20px; height: 2px; background: var(--accent); }
.play-panel { padding: 52px 0 30px; min-height: 570px; }
.play-layout { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(30px,6vw,100px); align-items: center; }
.play-aside { max-width: 380px; }
.play-aside h3 { font: 400 clamp(34px,3.5vw,48px)/1.12 var(--serif); letter-spacing: -.035em; margin: 18px 0; }
.play-aside > p:not(.eyebrow) { color: var(--muted); font-size: 13px; line-height: 1.85; }
.play-aside .button { margin-top: 25px; }
.play-micro { font: 10px/1.7 monospace; letter-spacing: .07em; color: var(--accent); }
.case-track { display: flex; gap: 10px; margin-top: 30px; }
.case-track span { width: 34px; height: 3px; background: var(--line); }
.case-track .is-solved { background: var(--accent); }
.case-file { background: #eddbd2; color: #452333; padding: clamp(26px,4vw,48px); position: relative; box-shadow: 6px 12px 45px #0003; transform: rotate(1deg); border-radius: 2px; }
.case-file::before { content: ''; position: absolute; top: -9px; left: 40%; width: 72px; height: 20px; background: #caa6a57d; transform: rotate(-5deg); }
.case-file .play-micro { color: #7d4c5f; }
.case-file h4 { font: 400 clamp(25px,2.5vw,34px)/1.25 var(--serif); margin: 22px 0; letter-spacing: -.025em; }
.case-file p { font-size: 13px; line-height: 1.8; }
.case-file button:focus-visible { outline-color: #74354e; }
.case-stamp { display: inline-block; border: 1px solid #9b496b; color: #8b3e5d; padding: 7px 12px; margin: 30px 0 16px; transform: rotate(-8deg); font: 11px monospace; letter-spacing: .12em; }
.case-answers { display: grid; gap: 8px; }
.case-answer { display: flex; align-items: center; gap: 15px; padding: 13px 15px; min-height: 48px; border: 1px solid #753d572f; background: #fff6; color: #452333; text-align: left; font-size: 13px; border-radius: 3px; transition: background .2s, transform .2s; }
.case-answer > span { font: 10px monospace; color: #85546b; }
.case-answer:hover { background: #fff9; transform: translateX(3px); }
.case-answer[aria-disabled="true"] { opacity: .55; }
.case-answer.is-correct { background: #d4e3d2; border-color: #5b7959; }
.case-answer.is-wrong { background: #ebc6c4; }
.case-feedback { margin-top: 20px; min-height: 24px; }
.case-next { margin-top: 18px; min-height: 44px; border-radius: 30px; background: #51273c; color: #fff0e9; padding: 12px 22px; font-size: 12px; }
.case-clue { margin-top: 16px; font-size: 12px; }
.case-clue summary { cursor: pointer; padding-block: 8px; }
.case-file .text-button { color: #753950; min-height: 44px; }
.case-code { white-space: pre-wrap; font: 12px/1.8 monospace; padding: 20px 0; border-block: 1px solid #753d5730; margin-block: 20px; overflow-wrap: anywhere; }
.pairs-board { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; perspective: 1000px; }
.pair-card { padding: 0; background: transparent; aspect-ratio: .86; position: relative; border-radius: 5px; min-width: 0; }
.pair-turn { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .45s var(--ease); }
.pair-card.is-up .pair-turn { transform: rotateY(180deg); }
.pair-back, .pair-front { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; backface-visibility: hidden; border-radius: 4px; overflow: hidden; }
.pair-back { background: repeating-linear-gradient(45deg,#3f223718 0 4px,#edb1ca08 4px 5px),#281725; border: 1px solid #f3b3cb42; }
.pair-back::before { content: ''; position: absolute; inset: 8px; border: 1px solid #f3b3cb25; border-radius: 2px; }
.pair-back span { font: italic 26px var(--serif); color: var(--accent); }
.pair-front { transform: rotateY(180deg); border: 5px solid #e8cfd0; background: #492738; }
.pair-front img { width: 100%; height: 100%; object-fit: cover; }
.pair-card.is-matched .pair-front { border-color: #e5b6cd; }
.pair-card.is-matched::after { content: '♥'; position: absolute; right: 8px; bottom: 5px; color: white; text-shadow: 0 1px 5px #000; }
.pair-card[aria-disabled="true"] { cursor: default; }
.pairs-meta { display: flex; justify-content: space-between; gap: 15px; margin-bottom: 18px; color: var(--muted); font-size: 11px; flex-wrap: wrap; }
.pairs-meta strong { color: var(--accent); font-weight: 500; }
.pairs-note { margin-top: 22px; min-height: 62px; font-size: 12px; color: var(--muted); }
.pairs-note .text-button { display: flex; color: var(--accent); min-height: 44px; }
.play-restart { display: block; margin-top: 20px; min-height: 44px; }
.mail-moods { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.mail-moods button { border: 1px solid var(--line); color: var(--muted); background: #f3b3cb05; padding: 11px 16px; min-height: 44px; border-radius: 30px; font-size: 12px; }
.mail-moods button[aria-pressed="true"] { color: var(--ink); background: var(--accent); border-color: var(--accent); }
.mail-stage { display: grid; place-items: center; min-height: 390px; padding: 25px; position: relative; }
.mail-stage::before, .mail-stage::after { content: ''; position: absolute; inset: 15% 8%; border: 1px solid var(--line); border-radius: 50%; transform: rotate(-25deg); pointer-events: none; }
.mail-stage::after { transform: rotate(25deg); }
.mail-envelope { position: relative; background: #e8cbd0; color: #4b2637; width: min(100%,360px); padding: 35px 30px 25px; text-align: left; transform: rotate(-4deg); box-shadow: 9px 18px 40px #0004; z-index: 1; border: 1px solid #fff2; }
.mail-envelope::after { content: 'JP → V'; position: absolute; right: 22px; top: 22px; font: 9px monospace; padding: 8px; border: 1px dashed #9b6b7b; transform: rotate(8deg); }
.mail-envelope .play-micro { color: #7c4c5f; margin-bottom: 40px; padding-right: 75px; }
.mail-envelope h4 { font: 32px/1.15 var(--serif); margin: 12px 0; }
.mail-envelope p { font-size: 13px; line-height: 1.8; }
.mail-envelope .text-button { color: #683046; font-size: 12px; margin-top: 20px; min-height: 44px; }
.mail-count { color: #85546b; font: 9px monospace; margin-top: 16px; padding-top: 14px; border-top: 1px solid #74445c30; }
.play-footnote { border-top: 1px solid var(--line); padding-top: 22px; font-size: 10px; color: var(--muted); display: flex; align-items: center; gap: 15px; }
.play-footnote > span { font: 13px monospace; color: var(--accent); }
.play-reveal { animation: play-appear .4s var(--ease) both; }
@keyframes play-appear { from { opacity: .3; translate: 0 10px; } to { opacity: 1; translate: 0 0; } }
@media (max-width: 800px) {
  .play-layout { grid-template-columns: 1fr; gap: 32px; }
  .play-aside { max-width: 100%; }
  .play-panel { min-height: 0; padding-top: 32px; }
  .play-tabs button { padding: 17px 10px; gap: 8px; font-size: 11px; }
  .play-tabs button > span:last-child { display: none; }
  .play-tabs button[aria-selected="true"]::after { left: 10px; right: 10px; }
  .case-file { transform: rotate(.5deg); }
  .pairs-board { max-width: 560px; margin: auto; gap: 9px; }
  .pair-card { aspect-ratio: .94; }
  .mail-stage { min-height: 340px; padding: 20px 12px; }
  .play-footnote { align-items: flex-start; }
}
@media (max-width: 420px) {
  .play-tabs button { font-size: 10px; gap: 6px; }
  .play-tabs button > span:first-child { display: none; }
  .case-file { padding: 24px; }
  .pair-back span { font-size: 20px; }
}
html[data-motion="reduced"] .play-reveal { animation: none; }
html[data-motion="reduced"] .pair-turn, html[data-motion="reduced"] .case-answer { transition: none; }

/* The album itself is the game. Each question and its moment share one scene. */
html[data-experience="story"] { scroll-padding-top: 125px; }
html[data-experience="story"] #percurso { scroll-margin-top: 32px; }
html[data-experience="story"] #journey-stage { scroll-margin-top: 0; align-items: start; }
html[data-experience="story"] #chapter-copy > :not(#story-question):not(#story-moment) { display: none; }
html[data-experience="story"] .journey-bottom { display: none; }
html[data-experience="story"] .hero-copy > #start-story { margin-top: 31px; }
html[data-experience="story"] .memory-visual { position: sticky; top: 140px; }
html[data-experience="story"] #journey-photo { transition: box-shadow .4s, transform .4s; }
html[data-experience="story"] #journey-photo:disabled { opacity: 1; cursor: default; }
html[data-experience="story"] #chapter-image { transition: filter .8s, transform .8s; }
html[data-experience="story"] [data-discovered="false"] #chapter-image { filter: blur(7px) saturate(.5) brightness(.58); transform: scale(1.04); }
html[data-experience="story"] [data-discovered="false"] .image-open { visibility: hidden; }
.story-dashboard { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 40px; padding-block: 18px; border-block: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.story-dashboard > span { font: 10px/1.8 monospace; color: var(--accent); }
#story-question { min-width: 0; }
#story-question .play-micro { font-size: 9px; letter-spacing: .06em; }
#story-question .story-prompt { font: 400 clamp(30px,3.1vw,45px)/1.15 var(--serif); margin: 18px 0 24px; letter-spacing: -.035em; }
#story-question .case-answer { background: #f3b3cb07; border-color: var(--line); color: var(--paper); min-height: 52px; line-height: 1.6; }
#story-question .case-answer > span { color: var(--accent); }
#story-question .case-answer:hover { background: #f3b3cb12; }
#story-question .case-answer.is-wrong { background: #bf5c6d20; border-color: #b76b7b70; }
.story-feedback { color: var(--accent); font: italic 20px/1.6 var(--serif); margin-top: 22px; }
.story-feedback:empty { display: none; }
.story-clue { margin-top: 18px; font-size: 12px; color: var(--muted); }
.story-clue summary { cursor: pointer; padding-block: 10px; }
.story-clue p { padding-block: 7px; line-height: 1.8; }
.story-skip { min-height: 44px; font-size: 11px; text-decoration: underline; text-underline-offset: 4px; }
#story-moment { border-top: 1px solid var(--line); padding-top: 28px; margin-top: 28px; animation: play-appear .55s var(--ease) both; }
#story-moment .story-moment-title { font: 400 clamp(26px,2.5vw,36px)/1.2 var(--serif); white-space: pre-line; margin: 14px 0 20px; }
.story-inline-body { color: var(--muted); font-size: 13px; line-height: 1.9; }
.story-inline-body p + p { margin-top: 15px; }
.story-code { background: #08070c66; border-left: 2px solid var(--accent); padding: 20px 24px; margin-block: 28px; text-align: left; min-width: 0; }
.story-code-label { display: block; font: 9px/1.8 monospace; color: #b093a4; margin-bottom: 14px; }
.story-code pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: 12px/1.9 'Cascadia Code',Consolas,monospace; color: #e6dbe6; }
.code-string { color: #f3b3cb; }
.code-comment { color: #a998ba; }
.story-related { display: block; min-height: 44px; color: var(--accent); }
.story-next { display: flex; width: fit-content; margin-top: 20px; text-align: center; gap: 12px; line-height: 1.6; }
.story-replay { display: block; font-size: 10px; margin-top: 5px; }
.route-stop.is-found .stop-marker { background: var(--accent); box-shadow: 0 0 18px #f3b3cb3d; }
.route-stop.is-found .stop-date { color: var(--accent); }
.integrated-play { margin-top: 45px; padding-block: 32px; border-block: 1px solid var(--line); }
.integrated-play .play-layout { grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr); }
.integrated-play .play-aside { min-width: 0; }
.story-library { margin-top: 28px; }
.story-library > summary { cursor: pointer; font-size: 12px; color: var(--muted); padding: 18px 0; border-bottom: 1px solid var(--line); list-style: none; display: flex; justify-content: space-between; gap: 15px; }
.story-library > summary::-webkit-details-marker { display: none; }
.story-library > summary:hover { color: var(--paper); }
.story-library[open] > summary > span { rotate: 90deg; }
.story-forward { color: var(--accent); min-height: 48px; margin-top: 28px; font-size: 12px; }
.ending-choice { max-width: 550px; margin: 32px auto; }
.ending-choice .button { margin-top: 16px; }
.ending-choice .story-code { margin-block: 18px; padding: 24px 30px; }
.ending-choice .story-code pre { font-size: 15px; }
@media (max-width: 800px) {
  .integrated-play .play-layout { grid-template-columns: minmax(0,1fr); }
  html[data-experience="story"] .memory-visual { position: relative; top: auto; }
  html[data-experience="story"] #journey-stage { scroll-margin-top: 0; }
  html[data-experience="story"] .journey-photo img { max-height: 45svh; }
  html[data-experience="story"] .chapter-copy { padding-top: 22px; }
  .story-dashboard { margin-top: 26px; font-size: 10px; }
  .story-dashboard > span { font-size: 9px; }
  .story-code { padding: 18px; }
  .story-code pre { font-size: 11px; }
  .story-next { font-size: 11px; }
  .ending-choice .story-code pre { font-size: 12px; }
}
html[data-motion="reduced"] #story-moment { animation: none; }
html[data-motion="reduced"][data-experience="story"] #chapter-image { transition: none; }
