/* Opening sequence: one turn and one local flash; the back remains visible first. */
.reveal-stage{isolation:isolate;background:radial-gradient(ellipse at 50% 40%,#312140,#101023 56%,#070913);animation:stage-in .25s ease both}
.card-stage{width:min(66vw,286px);max-height:64dvh;perspective:1600px;overflow:visible}
.flipping-card{animation:future-turn 4.6s linear both;transform-style:preserve-3d;will-change:transform}
.flip-back{transform:rotateY(0deg) translateZ(1px)}
.flip-front{transform:rotateY(180deg) translateZ(1px)}
.flip-face{backface-visibility:hidden;-webkit-backface-visibility:hidden;overflow:visible}
.reveal-aura{background:radial-gradient(ellipse,#e8bd6470,transparent 65%);animation:future-aura 4.6s ease both}
.reveal-stage.rare .reveal-aura{background:radial-gradient(ellipse,#c881e9a0,#e8bd6455 30%,transparent 67%)}
.reveal-stage.ultra .reveal-aura{background:conic-gradient(#8febed80,#b893ec88,#e8bd6480,#8febed80);filter:blur(24px)}
.reveal-flash{animation:future-flash 4.6s linear both;background:radial-gradient(ellipse,#fff3d7b0,transparent 64%);inset:-10%}
.reveal-stars{animation:future-particles 4.6s ease both;background-size:69px 91px,113px 137px}
.reveal-stage.rare .reveal-stars{background-image:radial-gradient(circle,#eac984 0 1.4px,transparent 2px),radial-gradient(circle,#ce91ed 0 1.7px,transparent 2.5px)}
.reveal-stage.ultra .reveal-stars{background-image:radial-gradient(circle,#9aeff1 0 1.7px,transparent 3px),radial-gradient(circle,#e3c2ff 0 2px,transparent 3px);background-size:59px 83px,97px 131px}
.reveal-orbit{position:absolute;width:min(96vw,680px);aspect-ratio:1;border:1px solid #dfbe6855;border-radius:50%;box-shadow:inset 0 0 70px #c7a15b16,0 0 50px #c7a15b18;animation:future-orbit 4.6s ease both;pointer-events:none}
.reveal-orbit:after{content:'';position:absolute;inset:7%;border:1px dashed #d2b67c55;border-radius:50%;transform:rotate(32deg) scaleX(.72)}
.reveal-caption{max-width:95%;text-align:center;font-size:13px}
.sound-control-panel select{max-width:100%;background:#151a2b;color:#efdcbb;border:1px solid #bd9a68;border-radius:6px;padding:10px;font:inherit;min-height:44px}
#motion-status{width:100%;font-size:12px;line-height:1.8}
.paper:has(.choices){animation:scene-arrive .35s ease both}
.chapter-art[data-category="人間関係"]{border-color:#c888b1}
.chapter-art[data-category="お金・生活"]{border-color:#d6bf72}
.chapter-art[data-category="自由・冒険"]{border-color:#75c7cf}
.chapter-art[data-category="特別な転機"]{border-color:#c794ed}
.choice:active{transform:translateY(2px) scale(.99);background:#48344e;border-color:#e0bc78}
.timeline li{animation:scene-arrive .5s ease both}.timeline li:nth-child(2){animation-delay:.1s}.timeline li:nth-child(3){animation-delay:.2s}.timeline li:nth-child(4){animation-delay:.3s}
.entry.found{animation:scene-arrive .35s ease both}.hero-halo{box-shadow:0 0 80px #c8a36318,inset 0 0 70px #8c6aaa20}
.share-unavailable{padding:13px 16px;border-left:2px solid #b99b69;background:#292136;font-size:13px;line-height:1.8}
@keyframes future-turn{0%{transform:translateY(30px) rotateY(0deg) scale(.87)}12%{transform:translateY(-8px) rotateY(0deg) scale(1)}32%{transform:translateY(-12px) rotateY(0deg) scale(1)}45.65%{transform:translateY(-6px) rotateY(90deg) scale(1.03)}58%{transform:translateY(0) rotateY(180deg) scale(1)}100%{transform:translateY(0) rotateY(180deg) scale(1)}}
@keyframes future-flash{0%,42%{opacity:0;transform:scale(.5)}46%{opacity:.82;transform:scale(1.1)}53%,100%{opacity:0;transform:scale(1.35)}}
@keyframes future-aura{0%{opacity:0;transform:scale(1.5)}32%{opacity:.9;transform:scale(.8)}58%{opacity:.8;transform:scale(1.15)}100%{opacity:.4;transform:scale(1.2)}}
@keyframes future-particles{0%{opacity:0;transform:scale(1.4) rotate(-8deg)}32%{opacity:.8;transform:scale(.85)}60%{opacity:.9;transform:scale(1.15) rotate(5deg)}100%{opacity:.25;transform:scale(1.3) rotate(8deg)}}
@keyframes future-orbit{0%{opacity:0;transform:scale(.7) rotate(-20deg)}30%{opacity:.8;transform:scale(1) rotate(0)}62%{opacity:.9;transform:scale(1.08) rotate(20deg)}100%{opacity:.25;transform:scale(1.1) rotate(30deg)}}
@keyframes scene-arrive{from{opacity:0;transform:translateY(9px)}to{opacity:1;transform:translateY(0)}}
.effects-off .paper,.effects-off .timeline li,.effects-off .entry{animation:none}
@media(prefers-reduced-motion:reduce){html:not(.motion-full) .paper,html:not(.motion-full) .timeline li,html:not(.motion-full) .entry{animation:none}}
@media(max-width:600px){.sound-control-panel label:has(select){display:grid;width:100%;gap:5px}.reveal-stage .card-flavor{font-size:10px!important}.reveal-stage .card-caption h2{font-size:14px!important}.reveal-stage{gap:10px}}
@media(max-height:600px) and (orientation:landscape){.card-stage{height:65dvh;width:auto;max-height:none}.reveal-orbit{height:96dvh;width:auto}.reveal-caption{display:none}}
body.reveal-active{overflow:hidden}
