/* One text layout for every pool: canonical name, then story, then continue. */
body .dream-debut-overlay[data-layout="shared"] .dream-debut-copy { position:absolute; inset:auto 0 max(12dvh,calc(env(safe-area-inset-bottom) + 36px)); width:min(calc(100% - 48px),34rem); max-width:none; margin:0 auto; padding:0; display:grid; justify-items:center; gap:12px; z-index:4; text-align:center; }
body .dream-debut-overlay[data-layout="shared"] .pool-entry-name { margin:0; font:600 clamp(1.5rem,6vw,2rem)/1.35 var(--font-display); color:#f7edda; text-wrap:balance; overflow-wrap:anywhere; text-shadow:0 2px 18px #000; opacity:0; }
body .dream-debut-overlay[data-layout="shared"] .dream-debut-line { max-width:100%; margin:0; padding:0; gap:.25em .5em; font-size:.85rem; line-height:1.6; letter-spacing:.06em; color:#e6ddcf; background:transparent; }
body .dream-debut-overlay[data-layout="shared"].is-phase-line .pool-entry-name { animation:encounter-words 700ms both; }
body .dream-debut-overlay[data-layout="shared"].is-ready .pool-entry-name { opacity:1; animation:none; }
body .dream-debut-overlay[data-layout="shared"] .dream-debut-continue { font-size:.75rem; line-height:1.5; }
/* The original mirror's second ripple also finishes within the complete entry. */
body .dream-debut-overlay[data-layout="shared"] .dream-debut-mirror__ripple--2 { animation-duration:calc(var(--pool-scene-duration,3264ms)*.5); }
.encounter-scene { position:absolute; inset:0; overflow:hidden; pointer-events:none; background:radial-gradient(ellipse at 50% 20%,#4d4066,#13192d 65%); }
.encounter-scene--stars { background:radial-gradient(ellipse at 50% 15%,#294a61,#101b2c 65%); }
.encounter-landscape { position:absolute; inset:0; width:100%; height:100%; opacity:.8; }
.encounter-mist { position:absolute; inset:30% -20% 0; background:radial-gradient(ellipse at 20% 50%,#d7cce322,transparent 50%),radial-gradient(ellipse at 80% 55%,#b3c7c72c,transparent 55%); animation:encounter-mist 6s ease both; }
.encounter-moon { position:absolute; width:min(26vw,140px); aspect-ratio:1; left:50%; top:12%; transform:translateX(-50%); border-radius:50%; background:#e7dbed; box-shadow:0 0 60px #c8b6e64a; animation:encounter-moon 3.4s both; }
.encounter-flower { position:absolute; left:50%; top:47%; width:min(40vw,240px); aspect-ratio:1; transform:translate(-50%,-50%); }
.encounter-flower i { position:absolute; left:37%; top:8%; width:26%; height:58%; border-radius:80% 20% 80% 20%; background:linear-gradient(#e1d3edbb,#92749a33); transform-origin:50% 72%; transform:rotate(calc(var(--i)*72deg)) scale(.1); animation:encounter-flower 3.4s calc(var(--i)*70ms) both; }
.encounter-flower b { position:absolute; inset:40%; border-radius:50%; background:#f1dfb8; box-shadow:0 0 40px #edddbd66; }
.encounter-petals i { position:absolute; top:20%; width:8px; height:16px; border-radius:90% 10%; background:#c7abd5; opacity:0; animation:encounter-petal 4.5s calc(var(--i)*100ms) both; }
.encounter-stars i { position:absolute; width:3px; height:3px; border-radius:50%; background:#f3e7b9; box-shadow:0 0 8px #f3e7b9; animation:encounter-words 1.4s calc(var(--i)*55ms) both; }
.encounter-constellation { stroke-dasharray:1400; stroke-dashoffset:1400; animation:encounter-chart 2.8s both; }
.encounter-path { stroke-dasharray:1; stroke-dashoffset:1; animation:encounter-chart 3.4s 300ms both; }
.encounter-gateway { position:absolute; top:27%; left:50%; width:min(45vw,260px); aspect-ratio:.8; transform:translateX(-50%); border:1px solid #d2bd8444; border-radius:50% 50% 0 0; overflow:hidden; box-shadow:0 0 60px #d2bd8422; }
.encounter-gateway i { position:absolute; width:50%; height:100%; background:linear-gradient(#1d3449,#121f30); border:1px solid #d2bd8444; animation:encounter-gate-left 3.4s both; }
.encounter-gateway i:nth-child(2) { right:0; animation-name:encounter-gate-right; }
.encounter-gateway b { position:absolute; inset:10%; background:radial-gradient(ellipse,#e8dca955,transparent 65%); z-index:-1; }
.summon-reveal-overlay[data-timing="shared"]:not(.is-lionheart-reveal):not(.is-reduced):not(.is-fallback) .summon-reveal-card { animation:encounter-character var(--character-duration,2500ms) both; }
.summon-reveal-overlay[data-timing="shared"]:not(.is-lionheart-reveal) .summon-reveal-pet-image { animation:none; }
.summon-reveal-overlay[data-identity-handoff] .summon-reveal-rarity { animation:none;opacity:1;transform:none; }
.summon-reveal-overlay[data-identity-handoff]:not(.is-lionheart-reveal) .summon-reveal-pet-frame { width:min(68vw,390px);height:min(68vw,390px); }
.summon-reveal-overlay[data-identity-handoff] .summon-reveal-pet-image { animation:none; }
.summon-reveal-overlay[data-identity-handoff] .summon-reveal-progress { top:max(4.5rem,calc(env(safe-area-inset-top) + 4.5rem)); max-width:calc(100% - 48px); }
.ceremony-session-tag { z-index:12600; }
.summon-reveal-overlay[data-identity-handoff] .summon-reveal-skip { color:#f0e5ce; background:#102032; border-color:#d3b77c88; min-height:44px; }
.summon-reveal-overlay[data-encounter-world="bloom"] .summon-reveal-pool { display:none; }
.summon-reveal-overlay[data-encounter-world] :is(.summon-reveal-moon,.summon-reveal-fall-petals) { display:none; }
.summon-reveal-overlay[data-encounter-world="stars"] .summon-reveal-pool { display:none; }
.summon-reveal-overlay[data-encounter-world="bloom"] .summon-reveal-card { background:#171d32db; border:1px solid #d8bee899; border-radius:16px; padding:16px; }
.summon-reveal-overlay[data-encounter-world="bloom"] .encounter-flower { top:38%; width:min(65vw,420px); opacity:.45; }
.summon-reveal-overlay[data-encounter-world="bloom"] .encounter-scene[data-motif="moon"] .encounter-flower { opacity:.15; }
.summon-reveal-overlay[data-encounter-world="bloom"] .encounter-scene[data-motif="petal"] .encounter-moon { opacity:.3; }
.ceremony-transition { position:fixed; inset:0; z-index:12240; background:#111d2a; pointer-events:none; }
.identity-dialog .reveal-shell.is-leaving { animation:none; opacity:0; transform:translateY(-4px); transition:opacity var(--next-character-duration,240ms) ease,transform var(--next-character-duration,240ms) ease; }
.identity-dialog .reveal-shell { animation:encounter-words var(--next-character-duration,240ms) both; }
body[data-reduce-motion="true"] .reveal-shell { animation:none;transition:none; }
.identity-surface .awakening-preview-card { margin-top:18px; padding:16px; border:1px solid var(--color-border); border-radius:12px; }
.identity-surface .awakening-preview-card p { margin:8px 0; font-size:.8rem; }
.identity-dialog .awakening-form-options { display:flex; gap:8px; flex-wrap:wrap; margin:14px 0; }
.identity-dialog .awakening-form-options [aria-pressed="true"] { border-color:var(--color-primary); background:var(--color-bg-card-soft); }
/* Scene beats finish inside the shared clock; decorative tails cannot delay handoff. */
:is(.dream-debut-overlay,.dream-bloom-overlay,.summon-reveal-overlay) :is(.encounter-mist,.encounter-moon,.encounter-gateway i) { animation-duration:var(--pool-scene-duration,3400ms); }
:is(.dream-debut-overlay,.dream-bloom-overlay,.summon-reveal-overlay) .encounter-flower i { animation-duration:calc(var(--pool-scene-duration,3400ms)*.9); animation-delay:calc(var(--pool-scene-duration,3400ms)*.016*var(--i)); }
:is(.dream-debut-overlay,.dream-bloom-overlay,.summon-reveal-overlay) .encounter-petals i { animation-duration:calc(var(--pool-scene-duration,3400ms)*.75); animation-delay:calc(var(--pool-scene-duration,3400ms)*.016*var(--i)); }
:is(.dream-debut-overlay,.dream-bloom-overlay,.summon-reveal-overlay) .encounter-constellation { animation-duration:calc(var(--pool-scene-duration,3400ms)*.8); }
:is(.dream-debut-overlay,.dream-bloom-overlay,.summon-reveal-overlay) .encounter-path { animation-duration:calc(var(--pool-scene-duration,3400ms)*.85); animation-delay:calc(var(--pool-scene-duration,3400ms)*.05); }
:is(.dream-debut-overlay,.dream-bloom-overlay) .sugar-scene__gate { transition-duration:calc(var(--pool-scene-duration,3400ms)*.23); }
:is(.dream-debut-overlay,.dream-bloom-overlay) :is(.sugar-scene__light,.sugar-scene__candy,.sugar-scene__cream) { transition-duration:calc(var(--pool-scene-duration,3400ms)*.18); }
@keyframes encounter-words { from {opacity:0;transform:translateY(5px)} to {opacity:1;transform:none} }
@keyframes encounter-mist { from {opacity:0;transform:translateX(-3%)} to {opacity:1;transform:translateX(3%)} }
@keyframes encounter-moon { from {opacity:0;filter:blur(5px)} to {opacity:1;filter:none} }
@keyframes encounter-flower { 0%,15% {opacity:0;transform:rotate(calc(var(--i)*72deg)) scale(.1)} 70%,100% {opacity:1;transform:rotate(calc(var(--i)*72deg)) scale(1)} }
@keyframes encounter-petal { 10% {opacity:0} 35% {opacity:.5} 100% {opacity:0;transform:translate(20px,38vh) rotate(140deg)} }
@keyframes encounter-chart { to {stroke-dashoffset:0} }
@keyframes encounter-gate-left { 0%,20% {transform:none} 80%,100% {transform:translateX(-95%)} }
@keyframes encounter-gate-right { 0%,20% {transform:none} 80%,100% {transform:translateX(95%)} }
@keyframes encounter-character { 0%,20% {opacity:0;transform:translateY(12px) scale(.96)} 62%,100% {opacity:1;transform:none} }
body[data-reduce-motion="true"] .encounter-scene *, .is-reduced .encounter-scene * { animation:none!important; transition:none!important; }
body[data-reduce-motion="true"] .encounter-flower i, .is-reduced .encounter-flower i { opacity:1;transform:rotate(calc(var(--i)*72deg)); }
body[data-reduce-motion="true"] :is(.encounter-constellation,.encounter-path), .is-reduced .encounter-constellation, .is-reduced .encounter-path { stroke-dashoffset:0; }
body[data-reduce-motion="true"] .encounter-gateway i, .is-reduced .encounter-gateway i { transform:translateX(-95%); }
body[data-reduce-motion="true"] .encounter-gateway i:nth-child(2), .is-reduced .encounter-gateway i:nth-child(2) { transform:translateX(95%); }
body .dream-debut-overlay[data-layout="shared"].is-reduced .pool-entry-name { animation:none;opacity:1; }
body .dream-debut-overlay[data-layout="shared"].is-reduced :is(.dream-debut-line__seg,.dream-debut-continue) { animation:none!important; transition:none!important; opacity:1; transform:none; filter:none; }
@media(prefers-reduced-motion:reduce) { .encounter-scene * { animation:none!important;transition:none!important; } .encounter-flower i { opacity:1;transform:rotate(calc(var(--i)*72deg)); } .encounter-constellation,.encounter-path { stroke-dashoffset:0; } .encounter-gateway i { transform:translateX(-95%); } .encounter-gateway i:nth-child(2) { transform:translateX(95%); } }
