/* Open the Eyes (Kai-Guang): scoped look on the shared motion-webtoon engine. Everything is under body[data-series=kai-guang].
   Palette: slate #3E4F61 (shop/alley field), black-red memory (prologue), bone #F4F1EA, soot #141619, cinnabar #D92B2B. */
html:has(body[data-series="kai-guang"]){background:#fff}
body.mw[data-series="kai-guang"]{background:#fff;
  --kg-slate:#3E4F61;--kg-bone:#F4F1EA;--kg-soot:#141619;--kg-red:#D92B2B;--kg-memory:#170b0a;--kg-gold:#E2B24A;--kg-violet:#cdb8ef;
  --t-void:var(--kg-memory);--t-dusk:var(--kg-slate);--t-night:var(--kg-soot);--t-cream:var(--kg-slate);
  --ink:var(--kg-soot);--gold:var(--kg-gold);--crimson:var(--kg-red)}
body[data-series="kai-guang"] .ambient{display:none}
/* the field colour lives inside the column; the page outside is white (panel-joins) */
body[data-series="kai-guang"] .strip{box-shadow:none;overflow-x:clip}
body[data-series="kai-guang"][data-tone="void"] .strip{background-image:
  radial-gradient(circle at 18% 22%,#d92b2b55 0 1.5px,#0000 2.5px),radial-gradient(circle at 72% 64%,#ff6a3d44 0 1px,#0000 2px);
  background-size:calc(23 * var(--u)) calc(31 * var(--u)),calc(17 * var(--u)) calc(23 * var(--u))}

/* ---- bar + cover ---- */
body[data-series="kai-guang"] .mw-bar{background:#141619ee;color:var(--kg-bone);border-bottom:1px solid #d92b2b55}
body[data-series="kai-guang"].on-cover .mw-bar{background:transparent;border:0}
body[data-series="kai-guang"] .cover{background:var(--kg-soot)}
body[data-series="kai-guang"] .cover:before{display:none}
body[data-series="kai-guang"] .cover>.media{width:100%;object-position:50% 22%}
body[data-series="kai-guang"] .cover:after{background:linear-gradient(180deg,#141619e0 0%,#14161922 30%,#14161900 46%,#141619d0 74%,#141619fa 100%)}
body[data-series="kai-guang"] .cover-title{top:calc(var(--bar) + 3svh)}
body[data-series="kai-guang"] .logo{font-family:"Cormorant Garamond",Georgia,serif;font-style:normal;font-weight:700;letter-spacing:.04em;line-height:.92;color:var(--kg-bone);text-shadow:0 3px 16px #000}
body[data-series="kai-guang"] .logo .eyes{color:var(--kg-red)}
body[data-series="kai-guang"] .kicker,body[data-series="kai-guang"] .ep-tag{color:#ef8b7f}
body[data-series="kai-guang"] .cover-hook{font-family:"Cormorant Garamond",Georgia,serif}
body[data-series="kai-guang"] .cover-hook em{color:#ef8b7f}
body[data-series="kai-guang"] #fab{display:none}

/* ---- panels: the picture is masked inside .kg-clip, lettering is never masked ---- */
body[data-series="kai-guang"] .panel{isolation:isolate;z-index:2}
body[data-series="kai-guang"] .gutter{z-index:8}                     /* gutter lettering straddles the joins, on top */
body[data-series="kai-guang"] .art{background:transparent;overflow:visible}
body[data-series="kai-guang"] .kg-clip{position:absolute;inset:0;overflow:hidden;background:#2a3138}
body[data-series="kai-guang"] .kg-clip>.media{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block;transform-origin:50% 50%}
body[data-series="kai-guang"] .kg-clip>.media.cropped{inset:auto;object-fit:fill}
body[data-series="kai-guang"] .kg-clip>.kg-stack{display:flex;flex-direction:column}
body[data-series="kai-guang"] .kg-cell{position:relative;flex:1 1 0;min-height:0}
body[data-series="kai-guang"] .kg-cell>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block}
body[data-series="kai-guang"] img.kg-missing{visibility:hidden}

/* placeholder for art that hasn't landed: neutral block, panel number */
body[data-series="kai-guang"] .kg-ph{display:none;position:absolute;inset:0;z-index:1;align-items:center;justify-content:center;flex-direction:column;gap:6px;
  background:repeating-linear-gradient(135deg,#59616a 0 14px,#535a63 14px 28px);color:#e9e5dc;font:700 clamp(18px,6cqw,40px)/1 system-ui,sans-serif;letter-spacing:.06em;
  box-shadow:inset 0 0 0 1px #ffffff22}
body[data-series="kai-guang"] .kg-ph.on{display:flex}
body[data-series="kai-guang"] .kg-ph-note{font-size:clamp(11px,2.4cqw,14px);font-weight:500;opacity:.7;letter-spacing:.12em;text-transform:uppercase}

/* in-frame swap (P2 bulge -> blast) */
body[data-series="kai-guang"] .kg-swap-box{position:absolute;inset:0;z-index:2;opacity:0;pointer-events:none}
body[data-series="kai-guang"] .kg-swap-box.on{opacity:1;animation:kg-jolt .32s cubic-bezier(.36,.07,.19,.97)}
body[data-series="kai-guang"] .kg-swap-box>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
@keyframes kg-jolt{0%{transform:scale(1.06)}30%{transform:translate(-2%,1%) scale(1.04)}60%{transform:translate(1.5%,-1%) scale(1.02)}100%{transform:none}}
/* door crack (from Till Death dg-crack): a red seam that widens with the scroll (--p 0..1) */
body[data-series="kai-guang"] .kg-seam{position:absolute;top:6%;bottom:6%;z-index:1;pointer-events:none;width:calc(1% + var(--p,0) * 9%);transform:translateX(-50%);
  background:linear-gradient(90deg,#0000,#ff3b2fcc 35%,#ffd1a8 50%,#ff3b2fcc 65%,#0000);mix-blend-mode:screen;filter:blur(.6px);
  clip-path:polygon(40% 0,60% 0,100% 50%,60% 100%,40% 100%,0 50%);opacity:calc(.25 + var(--p,0) * .75)}
body[data-series="kai-guang"] .art{--p:0}

/* cut-out slide-in intro (Till Death #3): keyed character over the panel, may overhang */
body[data-series="kai-guang"] .kg-cutout{position:absolute;z-index:5;height:auto;pointer-events:none;opacity:0;filter:drop-shadow(0 0 1.5px #141619) drop-shadow(0 6px 14px #0008);
  transition:opacity .5s ease,transform .9s cubic-bezier(.2,.7,.2,1)}
body[data-series="kai-guang"] .kg-cutout.from-left{transform:translateX(-14%)}
body[data-series="kai-guang"] .kg-cutout.from-right{transform:translateX(14%)}
body[data-series="kai-guang"] .kg-cutout.in{opacity:1;transform:none}

/* ---- joins (docs/panel-joins-and-masking.md): never the same twice in a row ---- */
body[data-series="kai-guang"] .kg-cut-top-l .kg-clip{clip-path:polygon(0 7%,100% 0,100% 100%,0 100%)}
body[data-series="kai-guang"] .kg-cut-top-r .kg-clip{clip-path:polygon(0 0,100% 8%,100% 100%,0 100%)}
body[data-series="kai-guang"] .kg-cut-bottom-r .kg-clip{clip-path:polygon(0 0,100% 0,100% 92%,0 100%)}
body[data-series="kai-guang"] .kg-cut-bottom-l .kg-clip{clip-path:polygon(0 0,100% 0,100% 100%,0 91%)}
body[data-series="kai-guang"] .kg-cut-both-r .kg-clip{clip-path:polygon(0 0,100% 6%,100% 100%,0 94%)}
body[data-series="kai-guang"] .kg-slice-pos .kg-clip{clip-path:polygon(0 14%,100% 0,100% 86%,0 100%)}   /* about +8 deg */
body[data-series="kai-guang"] .kg-slice-neg .kg-clip{clip-path:polygon(0 0,100% 17%,100% 100%,0 83%)}   /* about -10 deg */
body[data-series="kai-guang"] .kg-slice-pos,body[data-series="kai-guang"] .kg-slice-neg{margin-top:calc(-3 * var(--u))}
body[data-series="kai-guang"] .kg-outline .kg-clip,
body[data-series="kai-guang"] .kg-popup .kg-clip,
body[data-series="kai-guang"] .kg-framed .kg-clip,
body[data-series="kai-guang"] .kg-breakout .kg-clip{box-shadow:inset 0 0 0 3px var(--kg-soot),inset 0 0 0 5px var(--kg-bone)}
body[data-series="kai-guang"] .kg-popup{z-index:6}
body[data-series="kai-guang"] .kg-overlap{margin-top:calc(-16 * var(--u))}
body[data-series="kai-guang"] .kg-popup .art,body[data-series="kai-guang"] .kg-outline .art{filter:drop-shadow(0 8px 18px #0006)}
body[data-series="kai-guang"] .kg-tilt-l .art{transform:rotate(-1.6deg)}
body[data-series="kai-guang"] .kg-tilt-r .art{transform:rotate(2deg)}
body[data-series="kai-guang"] .kg-impact .kg-clip{box-shadow:inset 0 0 0 4px var(--kg-soot),inset 0 0 0 9px #fff}
body[data-series="kai-guang"] .kg-impact .art{filter:drop-shadow(7px 9px 0 var(--kg-soot))}
body[data-series="kai-guang"] .kg-vignette .kg-clip::after{content:"";position:absolute;inset:0;z-index:3;pointer-events:none;background:radial-gradient(ellipse at center,#0000 55%,#170b0acc 100%)}
body[data-series="kai-guang"] .kg-diag .kg-clip::after{content:"";position:absolute;inset:0;z-index:3;pointer-events:none;
  background:linear-gradient(to top right,#0000 calc(50% - 3px),var(--kg-bone) calc(50% - 3px),var(--kg-bone) calc(50% + 3px),#0000 calc(50% + 3px))}
body[data-series="kai-guang"] .panel.kg-extra{position:relative;z-index:2}
body[data-series="kai-guang"] .kg-extra-gap{height:calc(4 * var(--u))}

/* ---- gutters ---- */
body[data-series="kai-guang"] .gutter.kg-streak{position:relative;overflow:hidden;
  background:linear-gradient(180deg,#0000 0%,#0b0606 14%,#0b0606 58%,var(--kg-slate) 100%)}
body[data-series="kai-guang"] .gutter.kg-streak::before{content:"";position:absolute;inset:0;pointer-events:none;
  background:
    linear-gradient(180deg,#0000 30%,#f4f1ea55 100%) 12% 100%/1px 46% no-repeat,
    linear-gradient(180deg,#0000 20%,#f4f1ea66 100%) 27% 100%/1px 62% no-repeat,
    linear-gradient(180deg,#0000 40%,#f4f1ea44 100%) 41% 100%/1px 34% no-repeat,
    linear-gradient(180deg,#0000 10%,#f4f1ea77 100%) 58% 100%/2px 70% no-repeat,
    linear-gradient(180deg,#0000 35%,#f4f1ea55 100%) 73% 100%/1px 50% no-repeat,
    linear-gradient(180deg,#0000 25%,#f4f1ea44 100%) 88% 100%/1px 40% no-repeat}
body[data-series="kai-guang"] .gutter.kg-world-rain{background:repeating-linear-gradient(100deg,#0000 0 calc(3 * var(--u)),#c9d4de33 calc(3 * var(--u)) calc(3 * var(--u) + 1px))}
body[data-series="kai-guang"] .gutter.kg-world-lantern{background:radial-gradient(ellipse 30% 70% at 82% 50%,#f2c46a33,#0000 70%),radial-gradient(ellipse 22% 60% at 20% 40%,#f2c46a22,#0000 70%)}
body[data-series="kai-guang"] .gutter.kg-crane-fall{position:relative;overflow:visible}
body[data-series="kai-guang"] .kg-crane{position:absolute;left:14%;top:-30%;width:calc(13 * var(--u));z-index:9;pointer-events:none;opacity:0}
body[data-series="kai-guang"] .kg-crane.go{animation:kg-crane 2.6s cubic-bezier(.35,.1,.4,1) forwards}
@keyframes kg-crane{0%{opacity:1;transform:translate(0,0) rotate(-18deg)}35%{transform:translate(calc(6 * var(--u)),calc(12 * var(--u))) rotate(14deg)}
  70%{transform:translate(calc(-2 * var(--u)),calc(24 * var(--u))) rotate(-10deg)}100%{opacity:1;transform:translate(calc(3 * var(--u)),calc(34 * var(--u))) rotate(6deg)}}

/* breathing seam: faint red heartbeat line on Shen's chest (P10, P23) */
body[data-series="kai-guang"] .kg-heart{position:absolute;z-index:2;width:3px;transform:translateX(-50%);pointer-events:none;border-radius:2px;
  background:linear-gradient(180deg,#0000,#ff3a2f 30%,#ff7a5c 50%,#ff3a2f 70%,#0000);box-shadow:0 0 6px 1px #d92b2b88;mix-blend-mode:screen;opacity:.12;
  animation:kg-heartbeat 1.7s ease-in-out infinite}
@keyframes kg-heartbeat{0%,100%{opacity:.12}10%{opacity:.7}20%{opacity:.25}30%{opacity:.55}48%{opacity:.12}}

/* living paper layer: sparse, slow, behind panels and lettering (z 1 < panels 2 < gutters 8) */
body[data-series="kai-guang"] .kg-paper{position:absolute;left:0;right:0;z-index:1;pointer-events:none;overflow:hidden}
body[data-series="kai-guang"] .kg-bit{position:absolute;left:var(--x);width:calc(1.6 * var(--u) * var(--s));height:calc(1.1 * var(--u) * var(--s));
  background:#f4f1eadd;box-shadow:0 0 0 .5px #14161933;clip-path:polygon(0 18%,78% 0,100% 70%,22% 100%);
  animation:kg-drift var(--dur) linear var(--delay) infinite}
body[data-series="kai-guang"] .kg-bit-crane{background:none;box-shadow:none;clip-path:none;width:calc(3.4 * var(--u) * var(--s));height:auto}
body[data-series="kai-guang"] .kg-bit-crane svg{display:block;width:100%;fill:#f4f1eae6;stroke:#141619;stroke-width:2.5;stroke-linejoin:round}
body[data-series="kai-guang"] .kg-paper.frozen .kg-bit{animation-play-state:paused}
@keyframes kg-drift{
  0%{transform:translate(0,calc(-40 * var(--u))) rotate(0deg);opacity:0}
  10%{opacity:.85}
  50%{transform:translate(calc(var(--sway) * var(--u)),0) rotate(160deg)}
  90%{opacity:.85}
  100%{transform:translate(calc(var(--sway) * -.4 * var(--u)),calc(40 * var(--u))) rotate(330deg);opacity:0}}

/* ---- lettering: pops in once at the reading line, then stays still ---- */
body[data-series="kai-guang"] .bubble{z-index:20}
body[data-series="kai-guang"] .bubble svg{overflow:visible}
body[data-series="kai-guang"] .bubble .who{display:none!important}
body[data-series="kai-guang"] .bubble.speaking .bub{animation:none}
body[data-series="kai-guang"] .bubble.speech .copy{font-size:clamp(15px,3.3cqw,18px);text-transform:none;letter-spacing:0;line-height:1.26;padding:clamp(18px,3.8cqw,26px) clamp(24px,7.5cqw,52px)}
body[data-series="kai-guang"] .bubble.speech path{fill:#fff;stroke:var(--kg-soot);stroke-width:2.2}
body[data-series="kai-guang"] .bubble.kg-small .copy{font-size:clamp(15px,2.9cqw,16px)!important;padding:clamp(14px,3cqw,20px) clamp(18px,5.5cqw,36px)!important}
body[data-series="kai-guang"] .bubble.kg-shout .copy{font-weight:800;text-transform:uppercase;font-size:clamp(16px,3.8cqw,22px)}
body[data-series="kai-guang"] .bubble.kg-shout path{stroke-width:3}
body[data-series="kai-guang"] .bubble.kg-whisper path{stroke-dasharray:2.5 3.5;stroke-width:1.4;stroke:#7a7570;stroke-linecap:round;fill:#f1eee8}
body[data-series="kai-guang"] .bubble.kg-whisper .copy{font-size:clamp(13px,3.1cqw,16px);font-style:italic;color:#56514c;letter-spacing:.02em}
/* Thought clouds (inner voice tied to a visible thinker): puffy outline + shrinking circles to the head */
body[data-series="kai-guang"] .bubble.thought path,body[data-series="kai-guang"] .bubble.thought circle{fill:#fbf8f2;stroke:#2b2622;stroke-width:2}
body[data-series="kai-guang"] .bubble.thought .copy{font:italic 600 clamp(15px,3.9cqw,20px)/1.3 "Shantell Sans","Comic Sans MS",system-ui,sans-serif;color:#2b2622;padding:.8em 1.2em;text-align:center}
body[data-series="kai-guang"] .bubble.kg-crack .copy{font-weight:800;text-transform:uppercase;white-space:nowrap}
body[data-series="kai-guang"] .bubble.kg-crack path{stroke-dasharray:22 5 9 4 30 6;stroke-width:2.6}
body[data-series="kai-guang"] .bubble.kg-crack .bub{clip-path:polygon(0 0,62% 0,55% 38%,68% 52%,58% 100%,0 100%,0 0,70% 0,100% 0,100% 100%,64% 100%,74% 54%,61% 40%,69% 0)}
body[data-series="kai-guang"] .bubble.kg-no .copy{font:900 clamp(26px,7cqw,44px)/1 "Shantell Sans",system-ui,sans-serif;padding:.45em .9em}
body[data-series="kai-guang"] .kg-key{color:var(--kg-red);font-weight:800}

/* captions without boxes: narration (bare violet serif), place card, handwriting, text beat, title */
body[data-series="kai-guang"] .bubble.caption rect{fill:none;stroke:none}
body[data-series="kai-guang"] .bubble.kg-narr .copy{font:italic 600 clamp(17px,4.4cqw,26px)/1.2 "Cormorant Garamond",Georgia,serif;color:var(--kg-violet);text-transform:none;letter-spacing:.01em;line-height:1.28;padding:.45em .85em;text-shadow:none}
body[data-series="kai-guang"] .bubble.kg-place .copy{font:600 clamp(15px,3cqw,17px)/1.2 "Cormorant Garamond",Georgia,serif;letter-spacing:.22em;text-transform:uppercase;color:var(--kg-bone);padding:.45em .9em;border-left:3px solid var(--kg-red);background:#141619b3}
body[data-series="kai-guang"] .bubble.kg-hand .copy{font:500 clamp(17px,3.6cqw,21px)/1.2 Caveat,"Shantell Sans",cursive;color:#f1d9cf;text-transform:none;letter-spacing:.02em;padding:.2em 0;text-shadow:none}
body[data-series="kai-guang"] .bubble.kg-beat{justify-content:center}
body[data-series="kai-guang"] .bubble.kg-beat .copy{font:italic 600 clamp(22px,6.4cqw,40px)/1.15 "Cormorant Garamond",Georgia,serif;color:var(--kg-bone);text-transform:none;letter-spacing:.01em;text-align:center;padding:0}
body[data-series="kai-guang"] .bubble.kg-title{justify-content:center}
body[data-series="kai-guang"] .bubble.kg-title .copy{text-align:center;padding:0;text-transform:none;color:var(--kg-soot)}
body[data-series="kai-guang"] .kg-title-main{display:block;font:700 clamp(38px,11.5cqw,82px)/.95 "Cormorant Garamond",Georgia,serif;letter-spacing:.06em;color:var(--kg-bone);text-shadow:0 2px 0 var(--kg-soot),0 0 22px #141619aa}
body[data-series="kai-guang"] .kg-title-sub{display:block;margin-top:.6em;font:italic 600 clamp(15px,4.2cqw,24px)/1.2 "Cormorant Garamond",Georgia,serif;color:#f6d7cf;letter-spacing:.03em;text-shadow:0 1px 8px #141619}

/* SFX: pop once (engine sfx-pop), no looping tremor */
body[data-series="kai-guang"] .sfx{z-index:18;color:var(--kg-bone);-webkit-text-stroke:0;font-size:clamp(20px,6cqw,40px);
  text-shadow:-2px -2px 0 var(--kg-soot),2px -2px 0 var(--kg-soot),-2px 2px 0 var(--kg-soot),2px 2px 0 var(--kg-soot)}
body[data-series="kai-guang"] .sfx.on span{animation:sfx-pop .44s cubic-bezier(.2,1.7,.4,1) both;animation-delay:var(--d,0s)}
body[data-series="kai-guang"] .sfx.kg-big{font-size:clamp(40px,13cqw,92px)}
body[data-series="kai-guang"] .sfx.kg-huge{font-size:clamp(50px,16cqw,116px)}
body[data-series="kai-guang"] .sfx.kg-mid{font-size:clamp(28px,8.5cqw,60px)}
body[data-series="kai-guang"] .sfx.kg-red{font-family:"Permanent Marker",Bangers,Impact,sans-serif;color:var(--kg-red);letter-spacing:.02em;
  text-shadow:-3px -3px 0 #fff,3px -3px 0 #fff,-3px 3px 0 #fff,3px 3px 0 #fff,0 6px 0 var(--kg-soot)}
body[data-series="kai-guang"] .sfx.kg-redgrey{font-family:"Permanent Marker",Bangers,Impact,sans-serif;color:#a8504c;text-shadow:-2px -2px 0 #e6e1d8,2px -2px 0 #e6e1d8,-2px 2px 0 #e6e1d8,2px 2px 0 #e6e1d8}
body[data-series="kai-guang"] .sfx.kg-gold{font-family:Bangers,Impact,sans-serif;color:var(--kg-gold);letter-spacing:.06em}
body[data-series="kai-guang"] .sfx.kg-neon{font-family:Bangers,Impact,sans-serif;font-style:italic;color:#d9fbff;letter-spacing:.1em;text-shadow:0 0 6px #7fe9ff,0 0 14px #3ccfff,-2px 2px 0 var(--kg-soot)}
body[data-series="kai-guang"] .sfx.kg-pastel{font:600 clamp(16px,4.4cqw,26px)/1 "Shantell Sans",system-ui,sans-serif;color:#cfd3d8;letter-spacing:.04em;
  text-shadow:-1.5px -1.5px 0 var(--kg-soot),1.5px -1.5px 0 var(--kg-soot),-1.5px 1.5px 0 var(--kg-soot),1.5px 1.5px 0 var(--kg-soot)}
body[data-series="kai-guang"] .sfx.kg-nonsound{font:italic 500 clamp(14px,3.4cqw,19px)/1 "Shantell Sans",system-ui,sans-serif;color:#d7dbe0;letter-spacing:.12em;text-shadow:0 1px 3px #000}

/* ---- end ---- */
body[data-series="kai-guang"] .end{background:var(--kg-soot);color:var(--kg-bone);min-height:60svh}
body[data-series="kai-guang"] .end-kicker{color:#ef8b7f}
body[data-series="kai-guang"] .tbc{font-family:"Cormorant Garamond",Georgia,serif;font-style:normal;color:var(--kg-bone)}

/* ======================= KG VFX LIBRARY (kgFx) — docs/vfx-library.md =======================
   Layers: .kg-fx-in inside .kg-clip (clipped to the panel shape, above art + vignette),
   .kg-fx over the art (may overhang, e.g. ash into the gutter). Lettering stays above (sfx z18, bubbles z20). */
body[data-series="kai-guang"] .kg-fx,body[data-series="kai-guang"] .kg-fx-in{position:absolute;inset:0;pointer-events:none}
body[data-series="kai-guang"] .kg-fx{z-index:6;overflow:visible}
body[data-series="kai-guang"] .kg-fx-in{z-index:4;overflow:hidden}
body[data-series="kai-guang"] .kg-fx-svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none}
body[data-series="kai-guang"] .kg-fx-lines{mix-blend-mode:screen}
body[data-series="kai-guang"] .kg-fx-flash{position:absolute;inset:0;mix-blend-mode:screen;opacity:0}
body[data-series="kai-guang"] .kg-fx-ring{position:absolute;aspect-ratio:1;border:3px solid #fff;border-radius:50%;box-shadow:0 0 12px #ffffffaa,inset 0 0 10px #ffffff88;opacity:0}
/* fold */
body[data-series="kai-guang"] .kg-fx-fold{position:absolute}
body[data-series="kai-guang"] .kg-fx-hole{position:absolute;inset:0;overflow:hidden}
body[data-series="kai-guang"] .kg-fx-hole.patched{-webkit-mask-image:linear-gradient(90deg,#0000,#000 14%,#000 86%,#0000),linear-gradient(180deg,#0000,#000 8%,#000 92%,#0000);-webkit-mask-composite:source-in;
  mask-image:linear-gradient(90deg,#0000,#000 14%,#000 86%,#0000),linear-gradient(180deg,#0000,#000 8%,#000 92%,#0000);mask-composite:intersect}
body[data-series="kai-guang"] .kg-fx-pleat{position:absolute;overflow:hidden;backface-visibility:hidden}
body[data-series="kai-guang"] .kg-fx-pleat::after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,#0000 70%,#14161955);pointer-events:none}
body[data-series="kai-guang"] .kg-fx-pleat.odd::after{background:linear-gradient(90deg,#ffffff22,#0000 40%)}
body[data-series="kai-guang"] .kg-fx-pane{position:absolute}
body[data-series="kai-guang"] .kg-fx-pane>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block;max-width:none}
/* particles: burst (paper / soot) and ash */
body[data-series="kai-guang"] .kg-fx-p{position:absolute;display:block;will-change:transform,opacity;pointer-events:none}
body[data-series="kai-guang"] .kg-fx-paper{background:#F4F1EA}
body[data-series="kai-guang"] .kg-fx-soot{background:#141619;border-radius:50%}
/* ignite: glowing pupils */
body[data-series="kai-guang"] .kg-fx-eye{--kg-fx-eye:#D92B2B;position:absolute;aspect-ratio:1;border-radius:50%;transform:translate(-50%,-50%);mix-blend-mode:screen;
  background:radial-gradient(circle,#fff 0 16%,#ffb39c 24%,var(--kg-fx-eye) 40%,color-mix(in srgb,var(--kg-fx-eye) 45%,transparent) 56%,#0000 72%)}
body[data-series="kai-guang"] .kg-fx-eye.lit{box-shadow:0 0 14px 4px color-mix(in srgb,var(--kg-fx-eye) 55%,transparent)}
body[data-series="kai-guang"] .kg-fx-eye.pulse{animation:kg-fx-pulse 1.4s ease-in-out infinite}
@keyframes kg-fx-pulse{0%,100%{transform:translate(-50%,-50%) scale(1);opacity:1}50%{transform:translate(-50%,-50%) scale(1.25);opacity:.72}}
/* fire: white-and-red tongues, transform/opacity only */
body[data-series="kai-guang"] .kg-fx-fire{--kg-fx-flame:#ff3b22;position:absolute;transform-origin:50% 100%;mix-blend-mode:screen;
  background:radial-gradient(ellipse 60% 55% at 50% 70%,color-mix(in srgb,var(--kg-fx-flame) 55%,transparent),#0000 75%)}
body[data-series="kai-guang"] .kg-fx-fire.oval{-webkit-mask-image:radial-gradient(closest-side,#000 55%,#0000);mask-image:radial-gradient(closest-side,#000 55%,#0000)}
body[data-series="kai-guang"] .kg-fx-tongue{position:absolute;bottom:2%;transform-origin:50% 100%;clip-path:polygon(50% 0,64% 30%,82% 55%,90% 80%,72% 100%,28% 100%,10% 80%,18% 55%,36% 30%);
  background:radial-gradient(ellipse 46% 52% at 50% 82%,#fff 0 22%,#ffe1d2 32%,var(--kg-fx-flame) 55%,#d92b2b00 80%)}
body[data-series="kai-guang"] .kg-fx-fire.burning .kg-fx-tongue{animation:kg-fx-flick .5s ease-in-out infinite alternate}
@keyframes kg-fx-flick{0%{transform:scale(1,1) skewX(0deg);opacity:.95}50%{transform:scale(.9,1.14) skewX(4deg);opacity:1}100%{transform:scale(1.06,.84) skewX(-5deg);opacity:.8}}
/* speed lines */
body[data-series="kai-guang"] .kg-fx-speed{position:absolute;inset:0;overflow:hidden;opacity:0}
body[data-series="kai-guang"] .kg-fx-speed-rot{position:absolute;left:-50%;top:-50%;width:200%;height:200%}
body[data-series="kai-guang"] .kg-fx-streak{position:absolute;left:-45%;border-radius:2px;will-change:transform}
/* ===================== /KG VFX LIBRARY ===================== */

@media (prefers-reduced-motion:reduce){
  body[data-series="kai-guang"] .kg-swap-box.on{animation:none}
  body[data-series="kai-guang"] .kg-crane{opacity:1;top:40%}
  body[data-series="kai-guang"] .kg-heart,body[data-series="kai-guang"] .kg-paper{display:none}
  body[data-series="kai-guang"] .kg-fx-eye.pulse,body[data-series="kai-guang"] .kg-fx-fire .kg-fx-tongue{animation:none}
}

/* Ink written on a paper prop (the Name-Slip): dark brush ink, no box, sits on the art */
body[data-series="kai-guang"] .bubble.kg-slip .copy{font:500 clamp(18px,4.4cqw,26px)/1.15 Caveat,"Shantell Sans",cursive;color:#5a1208;text-transform:none;letter-spacing:.01em;padding:.1em 0;text-shadow:none}

/* Ch 3: fog and flood world-gutters, the foundry stamp */
body[data-series="kai-guang"] .gutter.kg-world-fog{background:radial-gradient(ellipse 60% 80% at 30% 60%,#dfe5ea2e,#0000 70%),radial-gradient(ellipse 50% 70% at 78% 40%,#dfe5ea24,#0000 70%),linear-gradient(180deg,#0000,#cfd8df1c 60%,#0000)}
body[data-series="kai-guang"] .gutter.kg-world-water{background:repeating-radial-gradient(ellipse 120% 40% at 50% 120%,#0000 0 calc(4 * var(--u)),#9fb3c22a calc(4 * var(--u)) calc(4 * var(--u) + 1px)),linear-gradient(180deg,#0a0d10,#11171c)}
body[data-series="kai-guang"] .bubble.kg-stamp{justify-content:center}
body[data-series="kai-guang"] .bubble.kg-stamp .copy{font:700 clamp(18px,4.6cqw,28px)/1 "Cormorant Garamond",Georgia,serif;letter-spacing:.18em;color:#e8c779;background:#1a1408cc;border:2px solid #b08a3a;padding:.25em .5em;text-transform:none}

/* Ch 3: the dead girl's voice. Black torn-paper bubble, bone-white uneven letters, a red bleed. Static, never animated. */
body[data-series="kai-guang"] .bubble.kg-ghost svg{filter:url(#kg-tear) drop-shadow(0 0 4px #9e0f0faa)}
body[data-series="kai-guang"] .bubble.kg-ghost path{fill:#0c0b0d;stroke:#cfc6b4;stroke-width:1.3}
body[data-series="kai-guang"] .bubble.kg-ghost .copy{color:#ece4d2;font:italic 500 clamp(14px,3.5cqw,19px)/1.3 "Shantell Sans",cursive;letter-spacing:.05em;text-shadow:0 0 5px #b3141499,0 1px 0 #000}
body[data-series="kai-guang"] .bubble.kg-ghost .kg-ghost-w{display:inline-block;white-space:nowrap}
body[data-series="kai-guang"] .bubble.kg-ghost .kg-ghost-w span{display:inline-block}
/* The Paper Sovereign's voice: black box, gold edge, gold text (never mistaken for a character's thought) */
body[data-series="kai-guang"] .bubble.kg-narr.kg-gold svg{filter:url(#kg-burn) drop-shadow(0 0 6px #8e0b0bcc) drop-shadow(0 0 14px #5a0606aa)}
body[data-series="kai-guang"] .bubble.kg-narr.kg-gold rect{fill:#070405;stroke:#7d1010;stroke-width:2.2}
body[data-series="kai-guang"] .bubble.kg-narr.kg-gold .copy{color:#d9a441;letter-spacing:.05em;text-shadow:0 0 4px #a3101099,0 0 10px #6b0808aa,0 1px 0 #000}
body[data-series="kai-guang"] .bubble.kg-narr.kg-gold .kg-ghost-w{display:inline-block;white-space:nowrap}
body[data-series="kai-guang"] .bubble.kg-narr.kg-gold .kg-ghost-w span{display:inline-block}
/* breaking voices (kg-cracked / kg-shatter, see kai-guang.js) */
body[data-series="kai-guang"] .bubble .bub{position:relative}
body[data-series="kai-guang"] .bubble svg.kg-cracks{position:absolute;inset:0;width:100%;height:100%;overflow:hidden;border-radius:50%;pointer-events:none;z-index:2}
body[data-series="kai-guang"] .bubble svg.kg-cracks path{fill:none;stroke:#141619;stroke-width:2.2;stroke-linejoin:miter;stroke-dasharray:1;stroke-dashoffset:1;animation:kg-crack-draw .28s ease-out forwards}
@keyframes kg-crack-draw{to{stroke-dashoffset:0}}
body[data-series="kai-guang"] .bubble .kg-shard{pointer-events:none;will-change:transform,opacity}
@media (prefers-reduced-motion: reduce){body[data-series="kai-guang"] .bubble svg.kg-cracks path{animation:none;stroke-dashoffset:0}}
body[data-series="kai-guang"] .bubble.kg-crack .bub{transition:clip-path .09s ease-out}

/* the Sovereign's black fire + warping letters (kai-guang.js) */
body[data-series="kai-guang"] .bubble.kg-narr.kg-gold .bub{position:relative;isolation:isolate}
body[data-series="kai-guang"] .bubble.kg-narr.kg-gold .kg-blackfire{position:absolute;left:-4%;right:-4%;top:-95%;bottom:-10%;z-index:-1;pointer-events:none;filter:url(#kg-flame);background:radial-gradient(ellipse 12% 60% at 18% 62%,#000 50%,#0000 72%),radial-gradient(ellipse 10% 75% at 38% 58%,#050102 50%,#0000 72%),radial-gradient(ellipse 12% 85% at 58% 55%,#000 50%,#0000 72%),radial-gradient(ellipse 10% 65% at 80% 60%,#050102 50%,#0000 72%),radial-gradient(ellipse 9% 45% at 28% 66%,#b3141488 30%,#0000 70%),radial-gradient(ellipse 9% 55% at 66% 64%,#b3141488 30%,#0000 70%),radial-gradient(ellipse 50% 30% at 50% 78%,#000 60%,#0000 80%)}
body[data-series="kai-guang"] .bubble.kg-narr.kg-gold svg{z-index:0}
body[data-series="kai-guang"] .bubble.kg-narr.kg-gold .copy{position:relative;z-index:1;filter:url(#kg-waver)}
@media (prefers-reduced-motion: reduce){body[data-series="kai-guang"] .bubble.kg-narr.kg-gold .copy{filter:none}}
body[data-series="kai-guang"] .bubble.kg-beat rect{fill:none!important;stroke:none!important;filter:none!important}
body[data-series="kai-guang"] .bubble.kg-beat .bub{max-width:100%}
body[data-series="kai-guang"] .bubble.kg-beat .copy{white-space:normal;text-wrap:balance;font-size:clamp(20px,5.6cqw,36px)}
body[data-series="kai-guang"] .bubble.kg-beat .copy{color:#F4F1EA!important;text-shadow:0 2px 0 #000,0 0 10px #000}
/* memory panels: warm sepia grade (flashbacks) */
body[data-series="kai-guang"] .kg-memory-grade .kg-clip img,body[data-series="kai-guang"] .kg-memory-grade .kg-clip video{filter:sepia(.6) saturate(.85) contrast(.95) brightness(.97)}
