/* ── 结花小站 · 入场樱幕 v2 ──
   每次进站都播：两片粉帘合拢 → 巫女 logo「啵」一下 → 光环迸开、花瓣洒落 → 帘向两侧缓缓拉开。
   v2（主人钦命）：节奏整体放缓更自然；「幕先于内容」双保险——
   head 内联脚本即刻给 html 挂 .ef-boot，素幕（纯 CSS，下方 boot 段）第一帧就盖上，
   主页内容压在幕底绝无先现；JS 幕建好后卸 .ef-boot 交棒，另留 ef-boot-guard 自动退场兜底。
   全程只动 transform/opacity；pointer-events:none 不挡任何点击。
   层序 9998：在 .click-petals(9999) 与 .gal-menu(10000) 之下，不与它们相争。 */

/* ── 素幕（CSS-only 兜底）：先于一切内容出现的纯粉盖层 ── */
html.ef-boot::before{content:"";position:fixed;inset:0;z-index:2147483000;pointer-events:none;
  background-image:
    radial-gradient(circle at 18% 12%,rgba(255,255,255,.9) 0 3px,transparent 4px),
    radial-gradient(circle at 72% 30%,rgba(255,255,255,.85) 0 2.4px,transparent 3.4px),
    radial-gradient(circle at 38% 62%,rgba(255,255,255,.8) 0 2.8px,transparent 3.8px),
    radial-gradient(circle at 84% 78%,rgba(255,255,255,.85) 0 2.2px,transparent 3.2px),
    radial-gradient(circle at 12% 88%,rgba(255,255,255,.75) 0 2.6px,transparent 3.6px),
    linear-gradient(155deg,#fff7fb 0%,#ffe7f1 42%,#ffd5e6 100%);
  background-size:180px 180px,180px 180px,180px 180px,180px 180px,180px 180px,100% 100%;
  box-shadow:inset 0 0 60px rgba(255,190,214,.55);
  animation:ef-boot-guard .5s ease 3.4s forwards}   /* JS 万一失手，3.4s 后自动放行，页面绝不盖死 */
@keyframes ef-boot-guard{to{opacity:0;visibility:hidden}}

#entry-fx{position:fixed;inset:0;z-index:9998;pointer-events:none;overflow:hidden;
  contain:layout paint;transform:translateZ(0)}
#entry-fx.ef-rm{transition:opacity .38s ease}       /* 减弱动效：只作一次轻淡出 */

/* ── 两片布帘 ── */
.ef-panel{position:absolute;top:-2px;bottom:-2px;width:51.5%;will-change:transform;
  background:linear-gradient(155deg,#fff7fb 0%,#ffe7f1 42%,#ffd5e6 100%);
  box-shadow:inset 0 0 60px rgba(255,190,214,.55);
  transition:transform 1.35s cubic-bezier(.6,.01,.28,1)}
.ef-panel::before{content:"";position:absolute;inset:0;opacity:.5;
  background-image:
    radial-gradient(circle at 18% 12%,rgba(255,255,255,.9) 0 3px,transparent 4px),
    radial-gradient(circle at 72% 30%,rgba(255,255,255,.85) 0 2.4px,transparent 3.4px),
    radial-gradient(circle at 38% 62%,rgba(255,255,255,.8) 0 2.8px,transparent 3.8px),
    radial-gradient(circle at 84% 78%,rgba(255,255,255,.85) 0 2.2px,transparent 3.2px),
    radial-gradient(circle at 12% 88%,rgba(255,255,255,.75) 0 2.6px,transparent 3.6px);
  background-size:180px 180px}
.ef-l{left:0;border-radius:0 30px 30px 0}
.ef-r{right:0;border-radius:30px 0 0 30px}
/* 帘边一串小珍珠 */
.ef-l::after,.ef-r::after{content:"";position:absolute;top:0;bottom:0;width:22px;opacity:.95;
  background:radial-gradient(circle at 50% 50%,rgba(255,255,255,.98) 0 3.4px,rgba(255,255,255,0) 4.4px) 0 0/22px 22px repeat-y}
.ef-l::after{right:-1px}
.ef-r::after{left:-1px}
#entry-fx.ef-open .ef-l{transform:translate3d(-101%,0,0)}
#entry-fx.ef-open .ef-r{transform:translate3d(101%,0,0)}

/* ── 中央：光晕 + logo + 站名 ── */
.ef-core{position:absolute;left:50%;top:50%;z-index:3;width:min(88vw,520px);text-align:center;
  transform:translate(-50%,-50%);transition:opacity .62s ease,transform .62s ease}
.ef-halo{position:absolute;left:50%;top:42%;width:min(74vw,380px);aspect-ratio:1/1;border-radius:50%;
  transform:translate(-50%,-50%) scale(.35);opacity:0;
  background:radial-gradient(circle,rgba(255,253,255,.97) 0%,rgba(255,241,248,.8) 42%,rgba(255,236,245,0) 72%);
  transition:opacity .9s ease,transform 1.15s cubic-bezier(.19,.82,.32,1)}
#entry-fx.ef-play .ef-halo{opacity:1;transform:translate(-50%,-50%) scale(1)}

.ef-logo{position:relative;display:block;margin:0 auto;width:clamp(104px,23vw,160px);height:auto;
  opacity:0;transform:scale(.28) rotate(-14deg);
  filter:drop-shadow(0 8px 20px rgba(255,130,180,.45))}
#entry-fx.ef-play .ef-logo{
  animation:ef-pop .92s cubic-bezier(.34,1.56,.64,1) .08s forwards,
            ef-sway 1.9s ease-in-out 1.05s}
@keyframes ef-pop{
  0%{opacity:0;transform:scale(.28) rotate(-14deg)}
  55%{opacity:1;transform:scale(1.14) rotate(4deg)}
  76%{transform:scale(.97) rotate(-2.5deg)}
  100%{opacity:1;transform:scale(1) rotate(0)}
}
@keyframes ef-sway{
  0%{transform:scale(1) rotate(0)}
  32%{transform:scale(1.02) rotate(-4deg)}
  70%{transform:scale(1) rotate(3deg)}
  100%{transform:scale(1) rotate(0)}
}

.ef-ring{position:absolute;left:50%;top:42%;width:130px;height:130px;margin:-65px 0 0 -65px;
  border:2px solid rgba(255,255,255,.95);border-radius:50%;opacity:0}
.ef-ring2{width:196px;height:196px;margin:-98px 0 0 -98px;border-style:dashed;
  border-color:rgba(255,176,208,.9)}
#entry-fx.ef-rings .ef-ring{animation:ef-ring 1.15s cubic-bezier(.2,.7,.3,1) forwards}
#entry-fx.ef-rings .ef-ring2{animation:ef-ring 1.15s cubic-bezier(.2,.7,.3,1) .18s forwards}
@keyframes ef-ring{
  0%{opacity:0;transform:scale(.25)}
  18%{opacity:.95}
  100%{opacity:0;transform:scale(2.3)}
}

.ef-title{margin:2px 0 0;font-weight:700;letter-spacing:.16em;
  font-family:"Klee One","Yuanti SC","YouYuan","PingFang SC","Microsoft YaHei",sans-serif;
  font-size:clamp(19px,4.6vw,28px);color:#c3416d;
  text-shadow:0 2px 10px rgba(255,255,255,.95),0 0 18px rgba(255,170,205,.6);
  opacity:0;transform:translateY(12px);
  transition:opacity .62s ease,transform .68s cubic-bezier(.19,.82,.32,1)}
.ef-sub{margin-top:4px;letter-spacing:.24em;font-size:clamp(11px,2.9vw,13px);color:#dd5d92;
  font-family:"Klee One","Yuanti SC","YouYuan","PingFang SC","Microsoft YaHei",sans-serif;
  opacity:0;transform:translateY(10px);
  transition:opacity .62s ease .12s,transform .68s cubic-bezier(.19,.82,.32,1) .12s}
#entry-fx.ef-title-in .ef-title,#entry-fx.ef-title-in .ef-sub{opacity:1;transform:translateY(0)}

/* ── 帘前飘落的花瓣（入场专用，与站点常驻 .petals 同形） ── */
.ef-petal{position:absolute;top:-8vh;z-index:2;width:13px;height:11px;opacity:0;
  border-radius:70% 8% 70% 8%;
  background:linear-gradient(135deg,#ffc7dc,#ff9dbb);
  box-shadow:0 0 6px rgba(255,150,185,.45);
  animation:ef-fall linear forwards;will-change:transform,opacity}
@keyframes ef-fall{
  0%{opacity:0;transform:translate3d(0,0,0) rotate(0deg)}
  12%{opacity:.95}
  100%{opacity:.9;transform:translate3d(var(--dx,20px),116vh,0) rotate(var(--r,540deg))}
}

/* ── 收场：内容上浮淡出 ── */
#entry-fx.ef-out .ef-core{opacity:0;transform:translate(-50%,-56%)}

@media (max-width:640px){
  .ef-panel{width:52%}
  .ef-l{border-radius:0 20px 20px 0}
  .ef-r{border-radius:20px 0 0 20px}
  .ef-petal{width:11px;height:9.5px}
}
@media (prefers-reduced-motion:reduce){
  .ef-panel{transition:none}
  .ef-halo,#entry-fx .ef-logo,#entry-fx .ef-ring{animation:none}
}
