/* The reveal is a saved result; these animations never grant rewards. */
.hatch-scene { position:fixed; inset:0; width:100%; max-width:none; height:100%; max-height:none; margin:0; padding:calc(env(safe-area-inset-top) + 36px) max(26px,env(safe-area-inset-right)) calc(env(safe-area-inset-bottom) + 30px) max(26px,env(safe-area-inset-left)); border:0; background:radial-gradient(ellipse at 50% 48%,#463449 0%,#201e2e 45%,#13151f 85%); color:var(--ivory); overflow:auto; }
.hatch-scene[open] { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:20px; }
.hatch-scene::backdrop { background:#13151f; }
.hatch-skip { position:absolute; top:calc(env(safe-area-inset-top) + 20px); right:max(24px,env(safe-area-inset-right)); display:flex; gap:12px; align-items:center; min-height:44px; padding:8px 12px; border:0; background:none; color:var(--pearl); font:12px var(--font-display); }
.hatch-scene__heading { margin-top:40px; text-align:center; }
.hatch-scene__heading>span { font:9px var(--font-body); letter-spacing:.22em; color:#cfb5d6; }
.hatch-scene h2 { margin:18px 0 12px; font:400 25px var(--font-display); }
.hatch-scene__heading p { font:12px var(--font-display); color:var(--pearl); }
.hatch-scene__egg { position:relative; width:min(100%,380px); height:330px; flex-shrink:0; }
.hatch-scene__egg .egg { width: min(150vw,570px); height:min(150vw,570px); inset:auto; left:50%; top:50%; transform:translate(-50%,-50%); }
.hatch-scene__progress { width:160px; text-align:center; color:#c9b2d2; font:10px var(--font-body); }
.hatch-scene__progress .analysis__bar { margin-bottom:12px; height:2px; background:#b39cb133; }
.hatch-scene__progress .analysis__fill { background:#d2b8de; box-shadow:none; }
#reveal { width:min(390px,calc(100% - 32px)); max-height:calc(100svh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); padding:28px 22px 18px; overflow-y:auto; border:1px solid #a68aaf66; border-radius:22px; background:radial-gradient(ellipse at 50% 35%,#423346,#24222f 62%); text-align:center; color:var(--ivory); }
#reveal::after { display:none; }
#reveal .sheet__en { font:9px var(--font-body); letter-spacing:.2em; color:#ddc3e4; }
.reveal-greeting { margin:12px 0 0; font:19px/1.6 var(--font-display); }
#reveal-img { display:block; margin:0 auto; width:100%; height:clamp(170px,32svh,280px); aspect-ratio:auto; object-fit:contain; filter:drop-shadow(0 10px 16px #100c193b); animation:companion-arrives .65s ease both; }
#reveal .sheet__no { color:#c9b9ce; font:10px var(--font-body); letter-spacing:.1em; }
#reveal .sheet__name { margin:10px 0; color:var(--ivory); background:none; font:400 26px var(--font-display); }
#reveal .sheet__line { margin:10px 0 20px; font:13px/1.8 var(--font-display); }
#reveal .sheet__bonus { margin:0 0 18px; padding:12px 8px; color:#e9ccdf; background:#caa8d310; border-top:1px solid #bfa1c733; border-bottom:1px solid #bfa1c733; font:12px var(--font-display); }
#reveal-ok { width:100%; min-height:50px; border:1px solid #ae93b675; border-radius:12px; background:linear-gradient(135deg,#5b4768,#42384f); color:var(--ivory); font:16px var(--font-display); box-shadow:none; }
.reveal-arrange { display:flex; justify-content:center; align-items:center; gap:12px; width:100%; min-height:46px; margin-top:6px; padding:8px; border:0; background:none; color:var(--pearl); font:12px var(--font-display); }
.reveal-saved { margin:4px 0 0; font:10px/1.6 var(--font-display); color:#bdb0c5; }
#reveal-ok:active { transform:scale(.98); }
@keyframes companion-arrives { from { opacity:0; transform:translateY(16px) scale(.94); } to { opacity:1; transform:none; } }
@media(max-height:700px) { .hatch-scene__egg { height:260px; } .hatch-scene[open] { gap:8px; } #reveal { padding-top:20px; } }
@media(prefers-reduced-motion:reduce) { #reveal-img { animation:none; } .hatch-scene { animation:none; } }
.hatch-scene:not([open]) { display:none; }

/* Keep the page behind native modal backdrops stationary; scroll inside the dialog. */
html:has(dialog[open]), body:has(dialog[open]) { overflow:hidden; overscroll-behavior:none; }
