.life-opening{position:fixed!important;inset:auto;margin:0;padding:0;border:0;background:transparent;overflow:hidden;pointer-events:none!important;z-index:2147483000;isolation:isolate;contain:paint;animation:life-opening-fade 2.5s both}
.life-opening::backdrop{background:transparent;pointer-events:none}
.life-opening-ink{position:absolute;inset:-15%;width:130%;height:130%;object-fit:cover;animation:life-ink-clear 1.5s both;pointer-events:none}
.life-opening-rays{position:absolute;inset:-30%;background:conic-gradient(from 10deg,transparent,#f4d28b38 12deg,transparent 25deg,transparent 72deg,#f4d28b29 85deg,transparent 105deg,transparent 160deg,#f4d28b38 175deg,transparent 195deg,transparent 265deg,#f4d28b22 280deg,transparent 300deg);mask-image:radial-gradient(ellipse,#000 5%,transparent 65%);animation:life-rays 2.4s both}
.life-opening-ribbon{position:absolute;left:-35%;top:40%;width:170%;height:15%;border-radius:50%;background:radial-gradient(ellipse,#fff1cbbc 0%,#c79e5833 15%,transparent 65%);mix-blend-mode:screen;animation:life-ribbon 1.8s ease-out both;transform:rotate(-22deg)}
.life-opening-ribbon.second{animation-delay:.15s;top:60%;transform:rotate(20deg)}
.life-opening-ring{position:absolute;left:50%;top:50%;width:90px;height:90px;border-radius:50%;box-shadow:0 0 18px 2px #e8c47a,inset 0 0 12px #e8c47a;animation:life-ring 1.1s .5s both}
.life-opening-title{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:18px;text-align:center;padding:24px;color:#ffe8b4;font-family:var(--serif);text-shadow:0 2px 8px #000,0 0 28px #000;animation:life-title 2.3s both}
.life-opening-title strong{font-size:clamp(28px,5vw,62px);line-height:1.35;letter-spacing:.08em}.life-opening-title span{font-size:14px;letter-spacing:.2em}.life-opening-title small{font-size:clamp(13px,2vw,19px)}
.life-opening-seal{position:absolute;width:clamp(64px,10vw,110px);height:auto;left:calc(50% - 40px);top:66%;animation:life-seal 1.8s .4s both}
@keyframes life-ink-clear{0%{opacity:.95;transform:scale(1)}100%{opacity:0;transform:scale(1.7) rotate(12deg)}}
@keyframes life-rays{0%{opacity:0;transform:rotate(-12deg)}35%{opacity:1}100%{opacity:0;transform:rotate(20deg)}}
@keyframes life-ribbon{0%{opacity:0;translate:-35% 0}35%{opacity:.8}100%{opacity:0;translate:35% 0}}
@keyframes life-ring{0%{opacity:0;transform:translate(-50%,-50%) scale(.4)}20%{opacity:.75}100%{opacity:0;transform:translate(-50%,-50%) scale(8)}}
@keyframes life-title{0%,12%{opacity:0;transform:scale(1.08)}30%,78%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.98)}}
@keyframes life-seal{0%{opacity:0;transform:scale(2) rotate(-18deg)}22%,75%{opacity:1;transform:scale(1) rotate(-6deg)}100%{opacity:0;transform:scale(1)}}
@keyframes life-opening-fade{0%,85%{opacity:1}100%{opacity:0}}
/* Light crossing joins the ink turn, and is clear again while reading. */
.life-prologue.is-prologue-entering .prologue-landscape:after{content:''!important;display:block!important;position:absolute!important;inset:-20%!important;width:auto!important;height:auto!important;border:0!important;background:radial-gradient(ellipse at center,#f8d69a80,transparent 55%)!important;mix-blend-mode:screen;pointer-events:none;animation:life-ribbon 1.4s ease-out both!important}
@media(prefers-reduced-motion:reduce){.life-opening,.life-prologue.is-prologue-entering .prologue-landscape:after{display:none!important}}
.life-opening-title{background:radial-gradient(ellipse at center,#100d08c9 0%,#100d0870 30%,transparent 66%)}
.life-opening-seal{left:50%;translate:-50% 0}
/* A closing chronicle, restrained silver for death and gold for completion. */
.life-ending-scroll{position:absolute;left:50%;top:50%;width:min(72%,600px);height:65%;object-fit:contain;translate:-50% -50%;opacity:.28;animation:ending-scroll 2.5s both}
.life-ending .life-opening-title{background:radial-gradient(ellipse,#100d08ef 0%,#100d08b0 36%,transparent 76%)}
.life-ending .life-opening-seal{top:68%}
.life-ending.is-farewell .life-opening-ink{filter:grayscale(1);animation-duration:2s}
.life-ending.is-farewell .life-opening-rays,.life-ending.is-farewell .life-opening-ribbon,.life-ending.is-farewell .life-opening-ring,.life-ending.is-farewell .life-opening-seal,.life-ending.is-farewell .life-ending-scroll{filter:grayscale(1)}
.life-ending.is-farewell .life-opening-title{color:#ede4d4}
.life-ending.is-farewell .life-opening-seal{animation:farewell-seal 2.3s both}
.life-ending-mote{position:absolute;left:var(--x);top:80%;width:4px;height:7px;background:#ffe3a2;box-shadow:0 0 7px #f8c675;border-radius:50%;animation:ending-mote 2.2s var(--delay) both;pointer-events:none}
.is-farewell .life-ending-mote{background:#c5c2b9;box-shadow:none;border-radius:0;width:3px;height:5px}
@keyframes ending-scroll{0%{opacity:0;transform:scaleX(.15) rotate(-5deg)}30%,75%{opacity:.35;transform:scaleX(1) rotate(0)}100%{opacity:0;transform:scale(1.05)}}
@keyframes ending-mote{0%{opacity:0;transform:translate(0,0) rotate(0)}25%{opacity:.9}100%{opacity:0;transform:translate(var(--drift),-240px) rotate(220deg)}}
@keyframes farewell-seal{0%{opacity:0;transform:translateY(18px) scale(.9)}30%,70%{opacity:.7;transform:translateY(0) scale(1)}100%{opacity:0;transform:translateY(-14px) scale(1.04)}}

/* Ink arrives first; the words settle before the ceremony clears. */
.life-opening-ink{animation:life-ink-reveal 1.25s cubic-bezier(.2,.7,.2,1) both}
.life-opening-title{z-index:3;animation:life-title-hold 2.5s both}
.life-opening-rays,.life-opening-ribbon,.life-opening-ring{z-index:1}
@keyframes life-ink-reveal{0%{opacity:0;transform:scale(.8) rotate(-9deg)}18%{opacity:1;transform:scale(1.04) rotate(-4deg)}55%{opacity:.65}100%{opacity:0;transform:scale(1.6) rotate(8deg)}}
@keyframes life-title-hold{0%,18%{opacity:0;transform:translateY(9px)}34%,84%{opacity:1;transform:translateY(0)}100%{opacity:0;transform:translateY(0)}}
.life-farewell-page{position:absolute;top:0;bottom:0;width:50%;background:linear-gradient(90deg,#111210ee,#25241eef);animation:farewell-page 2.5s ease both}
.life-farewell-page.left{left:0;transform-origin:left center}
.life-farewell-page.right{right:0;transform-origin:right center;background:linear-gradient(90deg,#25241eef,#111210ee)}
.life-ending.is-farewell .life-opening-ink{animation:farewell-ink 2.5s ease both;filter:grayscale(1);mix-blend-mode:multiply}
.life-ending.is-farewell .life-ending-scroll{animation:farewell-book 2.5s ease both;opacity:.18}
.life-ending.is-farewell .life-opening-title{animation:life-title-hold 2.5s both;background:radial-gradient(ellipse,#131410d9,transparent 70%)}
.life-farewell-name{font:400 clamp(20px,3vw,32px)/1.4 var(--serif);letter-spacing:.22em;color:#c9c1b0}
.life-ending.is-farewell .life-ending-mote{top:35%;animation:farewell-dust 2.4s var(--delay) both}
@keyframes farewell-page{0%{opacity:0;transform:scaleX(.1)}28%,84%{opacity:.9;transform:scaleX(1)}100%{opacity:0;transform:scaleX(1)}}
@keyframes farewell-ink{0%{opacity:0;transform:translateY(-6%) scale(1.08)}36%{opacity:.7}80%{opacity:.45;transform:translateY(3%) scale(1)}100%{opacity:0;transform:translateY(4%) scale(1)}}
@keyframes farewell-book{0%{opacity:0;transform:scaleX(1)}25%,60%{opacity:.2;transform:scaleX(.98)}88%{opacity:.12;transform:scaleX(.08)}100%{opacity:0;transform:scaleX(.03)}}
@keyframes farewell-dust{0%{opacity:0;transform:translateY(0)}25%{opacity:.25}100%{opacity:0;transform:translateY(85px)}}
