/* Two comparable reveal studies. No navigation or footer is added. */
:root[data-reveal="particles"] .avatar-mist{background:radial-gradient(ellipse at 50% 48%,#78797A53,#D0D0D032 40%,transparent 72%);filter:blur(30px)}
:root[data-reveal="particles"] .crystal-canvas{position:absolute;inset:-6%;width:112%;height:112%;pointer-events:none;transition:opacity .6s}
:root[data-reveal="particles"] .crystal-canvas.particle-cloud{position:fixed;inset:0;width:100%;height:100%;z-index:11;pointer-events:none;-webkit-mask-image:none;mask-image:none}
:root[data-reveal="particles"] .avatar-float .frost-canvas{opacity:var(--cloud-avatar-opacity,.34)}
.cloud-fallback[data-reveal="particles"] .avatar-float .frost-canvas{opacity:1}
:root[data-reveal="glass"] .avatar-mist{background:radial-gradient(ellipse,#78797A60,#D0D0D029 40%,transparent 70%);filter:blur(26px)}
.reveal-glass{position:absolute;inset:-1% 3% -2%;border-radius:42% 45% 36% 39% / 24% 28% 25% 23%;pointer-events:none;background:linear-gradient(125deg,#fff9,#E5E5E59C 36%,#D0D0D055 70%,#ffffffad);border:1px solid #ffffffc4;box-shadow:inset 2px 2px 7px #ffffffeb,inset -3px -3px 10px #78797A2E,15px 25px 55px -30px #5C5D5F55;backdrop-filter:blur(23px) saturate(.75);-webkit-backdrop-filter:blur(23px) saturate(.75);-webkit-mask-image:linear-gradient(to bottom,transparent calc(var(--glass-cut,-8%) - .9%),var(--color-black) calc(var(--glass-cut,-8%) + 1.7%));mask-image:linear-gradient(to bottom,transparent calc(var(--glass-cut,-8%) - .9%),var(--color-black) calc(var(--glass-cut,-8%) + 1.7%));opacity:var(--glass-opacity,1);transition:opacity .5s}
.reveal-glass::before{content:'';position:absolute;inset:0;border-radius:inherit;background:url('assets/img/frost-grain.svg');opacity:.25;mix-blend-mode:multiply}
.reveal-glass::after{content:'';position:absolute;inset:0;border-radius:inherit;background:linear-gradient(116deg,transparent 10%,#ffffff8c 13%,transparent 18%,transparent 62%,#ffffff55 66%,transparent 71%);opacity:.6;transform:translateX(var(--glass-shift,0px))}
.reveal-glass-edge{position:absolute;left:6%;right:6%;top:var(--glass-cut,-8%);height:5px;pointer-events:none;background:linear-gradient(90deg,transparent,#FFFFFFED 15%,var(--color-white) 43%,#D0D0D0B3 70%,transparent);filter:blur(.6px) drop-shadow(0 3px 3px #78797A65);border-radius:50%;opacity:var(--glass-edge-opacity,0);transform:rotate(-1deg);transition:opacity .3s}
.at-demo .reveal-glass,.at-demo .reveal-glass-edge{opacity:0!important}
@media(max-width:760px){.reveal-glass{backdrop-filter:blur(12px) saturate(.75);-webkit-backdrop-filter:blur(12px) saturate(.75)}.reveal-glass-edge{height:3px}}

@media print{.crystal-canvas{display:none!important}}

/* ---------------------------------------------------------------------
   Arriving at the closing section.
   One companion travels the whole page and stays. --arrival runs 0 to 1
   as the closing section comes in, and it clears everything that is not
   her: the chapter words, the caption, the haze and the particle veil.
   Her live frost render cross-fades into her own image on the same
   curve, so she ends solid, uncovered and alone beside the conversation.
   --------------------------------------------------------------------- */
.companion-scene .keywords,.companion-scene .scene-caption,.companion-scene .mobile-scene-title{opacity:calc(1 - var(--arrival,0))}
.companion-scene.scene-gone .keywords,.companion-scene.scene-gone .scene-caption,.companion-scene.scene-gone .mobile-scene-title{visibility:hidden;pointer-events:none}
:root[data-reveal="particles"] .avatar-float .frost-canvas{opacity:calc(var(--cloud-avatar-opacity,.34) * (1 - var(--arrival,0)))}
.avatar-float.has-live-frost>.avatar-sharp{visibility:visible;opacity:var(--arrival,0)}
.avatar-mist{opacity:calc((.45 + var(--mist,1) * .55) * (1 - var(--arrival,0)))}
/* mist-flow animates opacity, so the haze has to clear through its filter. */
:root[data-reveal="particles"] .avatar-mist{filter:blur(30px) opacity(calc(1 - var(--arrival,0)))}
:root[data-reveal="glass"] .avatar-mist{filter:blur(26px) opacity(calc(1 - var(--arrival,0)))}
.crystal-canvas.particle-cloud{opacity:calc(1 - var(--arrival,0))}

/* ---------------------------------------------------------------- phone
   Nothing. That is deliberate.

   The reveal is CSS, not WebGL: the mist is a blurred radial gradient on
   --mist, the soft layer is her image blurred on --frost, and the sharp layer
   is her image wiped in from the hat down by a mask on --reveal. Those three
   are the reveal, and they run anywhere. The frost canvas only ever replaced
   them where WebGL was available, which is no longer the case on a phone, so
   the layers underneath simply do their job.

   This block used to unmask the sharp layer and hide the other two, which
   handed a phone a finished doll on the first screen and threw away the thing
   the whole page is about. Removing it is the fix; there is nothing to put in
   its place. */
