/* pa201 Glass mist gate and moving stars (INV-21 Acrylic Glass · Luxe; the gate from INV-03 W2 A1994, the stars W1.1 A2773).
   The gate has no picture of its own: section.js shows each pane's fixed mist (the skin's .k-ag-mist) only while the pane is
   within half a screen of view; the rule it switches lives in the skin (html.ag-gated .k-ag-mist:not(.is-near)::before).
   The stars: one fixed field, 100lvh from the top (AG-T348), right after the wall and under every pane; each star is the
   kit's one picture (--ag-star, the wall's old pin-point at 1.2x), on two eased drifts and a twinkle (AG-T350). Opacity,
   translate, transform and scale only, so nothing repaints. */
.pa201 { display: none; }
.pa201-stars { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; height: 100lvh; z-index: -1; overflow: hidden; pointer-events: none;
  opacity: 0; transition: opacity .6s ease-out; } /* W2: 0.6 s (was 1.4): the opener's stars have just gone */
.pa201-stars.is-on { opacity: 1; }
/* INV-21B W1.2 (A2820, the owner: the stars "should be visible through the slab as well") and W1.4 (A2823): the one field paints
   at z-index 0, over every pane's frost (z -1, in the page's stacking since the skin drops the panes' isolation) and under a
   half-strength copy of that frost (.k-ag-mist--over, the skin), so through the glass the stars show at about half. */
.pa201-stars { z-index: 0; }
.pa201-stars i { position: absolute; left: var(--pa201-x); top: var(--pa201-y); width: var(--pa201-z); height: var(--pa201-z);
  margin: calc(var(--pa201-z) / -2) 0 0 calc(var(--pa201-z) / -2); background: var(--ag-star) center / 100% 100% no-repeat; opacity: var(--pa201-a);
  animation: pa201-a var(--pa201-at) ease-in-out var(--pa201-ad) infinite alternate, pa201-b var(--pa201-bt) ease-in-out var(--pa201-bd) infinite alternate,
    pa201-tw var(--pa201-tt) ease-in-out var(--pa201-td) infinite alternate; }
.pa201-stars.is-still i, .pa201-stars.is-still b { animation-play-state: paused; }
@keyframes pa201-a { from { translate: calc(var(--pa201-ax) * -1) calc(var(--pa201-ay) * -1); } to { translate: var(--pa201-ax) var(--pa201-ay); } }
@keyframes pa201-b { from { transform: translate(calc(var(--pa201-bx) * -1), calc(var(--pa201-by) * -1)); } to { transform: translate(var(--pa201-bx), var(--pa201-by)); } }
@keyframes pa201-tw { 0% { opacity: calc(var(--pa201-a) * .55); scale: .8; } 100% { opacity: var(--pa201-a); scale: 1.1; } }
html.kjy-lite .pa201-stars, html.motion-reduce .pa201-stars { display: none; }
@media (prefers-reduced-motion: reduce) { .pa201-stars { display: none; } }

/* W2.2 (A2802), the owner's micro effects. Warm haze: a few soft wisps of warm air in the stars' field (under every pane), each
   drifting and breathing on its own slow clock; --pa201-haze is the strength (1 = as built). */
.pa201-stars { --pa201-haze: 1; }
.pa201-stars b { position: absolute; left: var(--pa201-hx); top: var(--pa201-hy); width: var(--pa201-hs); height: calc(var(--pa201-hs) * .62);
  margin: calc(var(--pa201-hs) * -.31) 0 0 calc(var(--pa201-hs) * -.5); border-radius: 50%;
  background: radial-gradient(closest-side, rgb(255 224 176 / calc(.26 * var(--pa201-ha) * var(--pa201-haze))), rgb(255 224 176 / calc(.1 * var(--pa201-ha) * var(--pa201-haze))) 58%, rgb(255 224 176 / 0));
  animation: pa201-hd var(--pa201-ht) ease-in-out var(--pa201-hd) infinite alternate, pa201-hb var(--pa201-hbt) ease-in-out var(--pa201-hbd) infinite alternate; }
@keyframes pa201-hd { from { translate: calc(var(--pa201-hdx) * -1) calc(var(--pa201-hdy) * -1); } to { translate: var(--pa201-hdx) var(--pa201-hdy); } }
@keyframes pa201-hb { from { opacity: .35; } to { opacity: 1; } }

/* the stars gather round the reply's gold "Thank you" after a fresh Send: in from a little further out, a twinkle, up and away */
.pa201-gather { position: absolute; inset: 0; z-index: 3; overflow: visible; pointer-events: none; }
.pa201-gather i { position: absolute; left: var(--pa201-x); top: var(--pa201-y); width: var(--pa201-z); height: var(--pa201-z);
  margin: calc(var(--pa201-z) / -2) 0 0 calc(var(--pa201-z) / -2); background: var(--ag-star) center / 100% 100% no-repeat; opacity: 0;
  animation: pa201-gather 2.6s cubic-bezier(.3, 0, .25, 1) var(--pa201-gd) both; }
@keyframes pa201-gather {
  0% { opacity: 0; scale: .4; translate: var(--pa201-fx) var(--pa201-fy); }
  32% { opacity: 1; scale: 1.05; translate: 0 0; }
  48% { opacity: .75; scale: .8; }
  62% { opacity: 1; scale: 1.1; translate: calc(var(--pa201-ox) * .2) calc(var(--pa201-oy) * .2); }
  100% { opacity: 0; scale: .5; translate: var(--pa201-ox) var(--pa201-oy); } }

/* a glint on a gold bud (the hero's and the closing's sprigs): the stars' own picture, one at a time */
.pa201-glint { position: absolute; left: var(--pa201-gx); top: var(--pa201-gy); width: var(--pa201-gz); height: var(--pa201-gz);
  margin: calc(var(--pa201-gz) / -2) 0 0 calc(var(--pa201-gz) / -2); pointer-events: none; opacity: 0; animation: pa201-glint 1.15s ease-in-out both;
  /* a pale star alone vanished on the light frost (W2.2 look): a warm white core and a soft bloom under its spikes */
  background: var(--ag-star) center / 100% 100% no-repeat,
    radial-gradient(closest-side, rgb(255 254 248) 0%, rgb(255 248 228 / .95) 14%, rgb(255 236 190 / .5) 34%, rgb(255 230 170 / 0) 72%); }
@keyframes pa201-glint { 0% { opacity: 0; scale: .3; rotate: 0deg; } 45% { opacity: .95; scale: 1; } 100% { opacity: 0; scale: .45; rotate: 28deg; } }
html.kjy-lite .pa201-gather, html.kjy-lite .pa201-glint, html.motion-reduce .pa201-gather, html.motion-reduce .pa201-glint { display: none; }

