/* =====================================================================================
   CAPE CLASH 1.0l NEXT LEVEL - B2 reward ceremony looks (public/css/nl-reel.css)
   The chest show (public/js/chestshow.js) injects its own base sheet; these rules add the Reward Reel
   (E07), fragment bars (E08), the summary action (E09), the silhouette tease and the UNVEIL cinematic
   (E11). Every rule is gated by its html.nl-<ID> class (public/js/nl-core.js paints them; nl-reel.js
   registers E07-E12/G1) and every animation honours REDUCE MOTION. Transform/opacity only.
   ===================================================================================== */

/* ---------- E07: the Reward Reel ---------- */
html.nl-E07 .ccs .ccsDots{position:absolute;z-index:6;left:50%;transform:translateX(-50%);
  top:calc(44px + env(safe-area-inset-top,0px));display:flex;gap:7px;pointer-events:none;}
html.nl-E07 .ccs .ccsDots:empty{display:none;}
html.nl-E07 .ccs .ccsDot{width:10px;height:10px;border-radius:50%;box-sizing:border-box;
  border:2px solid rgba(255,248,231,.55);background:rgba(27,20,48,.7);transition:transform .2s ease-out,background-color .2s;}
html.nl-E07 .ccs .ccsDot.done{background:rgba(255,248,231,.7);border-color:rgba(255,248,231,.85);}
html.nl-E07 .ccs .ccsDot.on{background:var(--ccs-col,#ffd23f);border-color:#fff8e7;transform:scale(1.35);
  box-shadow:0 0 8px var(--ccs-col,#ffd23f);}
html.nl-E07 .ccs .ccsSum.on ~ .ccsDots{display:none;}
html.nl-E07 .ccs .ccsCards.ccsStageOut{animation:ccsStageOut .22s ease-in both;pointer-events:none;}
@keyframes ccsStageOut{from{opacity:1;transform:none}to{opacity:0;transform:translateX(-34%) scale(.9)}}
html.nl-E07 .ccs .ccsTop.ccsTitleIn .ccsTitle{animation:ccsTitleIn .32s cubic-bezier(.2,1.5,.45,1) both;}
@keyframes ccsTitleIn{from{opacity:0;transform:rotate(-2deg) scale(1.5)}to{opacity:1;transform:rotate(-2deg) scale(1)}}
html.nl-E07 .ccs{transition:background-color .3s;}
/* keepsake fan: small cards */
html.nl-E07 .ccs .ccsFanCard .ccsBand{font-size:10px;letter-spacing:.8px;padding:2px 3px;}
html.nl-E07 .ccs .ccsFanCard .ccsName{font-size:9.5px;min-height:20px;letter-spacing:.4px;}
html.nl-E07 .ccs .ccsFanCard .ccsQ{font-size:34px;}
html.nl-E07 .ccs .ccsFanCard .ccsFace{border-width:2px;border-radius:7px;}
html.nl-E07 .ccs .ccsArt.ccsKeep{align-items:center;padding:4px;box-sizing:border-box;}
html.nl-E07 .ccs .ccsArt.ccsKeep>*{width:100%;height:100%;max-width:100%;max-height:100%;}
html.nl-E07 .ccs .ccsKeepScene{position:relative;width:100%;height:100%;border-radius:5px;overflow:hidden;
  box-shadow:inset 0 0 0 2px rgba(27,20,48,.6);}
html.nl-E07 .ccs .ccsArt.ccsKeep svg{width:100%;height:100%;display:block;}
html.nl-E07 .ccs .ccsArt .ccsChestImg{object-fit:contain;object-position:50% 70%;}
/* coins stage: one big coin card that counts up */
html.nl-E07 .ccs .ccsBigCard .ccsName{font-size:24px;min-height:40px;letter-spacing:1.2px;font-variant-numeric:tabular-nums;}
html.nl-E07 .ccs .ccsBigCard .ccsBand{font-size:16px;padding:4px 4px 3px;}
html.nl-E07 .ccs .ccsBigCard .ccsArt .ci,html.nl-E07 .ccs .ccsBigCard .ccsArt>.ci svg{width:70%;height:70%;}
html.nl-E07 .ccs .ccsBigCard.ccsCounting .ccsIn{animation:ccsCoinJig .14s linear infinite alternate;}
html.nl-E07 .ccs .ccsBigCard.ccsCounted .ccsIn{animation:ccsCoinLand .36s cubic-bezier(.2,1.6,.45,1) both;}
@keyframes ccsCoinJig{from{transform:rotateY(180deg) scale(1.02) rotate(-1.2deg)}to{transform:rotateY(180deg) scale(1.04) rotate(1.2deg)}}
@keyframes ccsCoinLand{0%{transform:rotateY(180deg) scale(1.14)}100%{transform:rotateY(180deg) scale(1)}}

/* ---------- E09: the summary's next step ---------- */
html.nl-E09 .ccs .ccsSumBtns{display:flex;gap:8px;margin-top:12px;}
html.nl-E09 .ccs .ccsSumBtns .ccsSumGo{margin-top:0;}
html.nl-E09 .ccs .ccsSumBtns .ccsSumDone{flex:0 0 34%;background:#2f2552;color:#fff8e7;border-color:#7060a0;box-shadow:0 4px 0 #120d28;}
html.nl-E09 .ccs .ccsSumBtns .ccsSumAct{flex:1 1 auto;background:#9be15d;animation:ccsActGlow 1.6s ease-in-out .4s infinite;}
@keyframes ccsActGlow{0%,100%{box-shadow:0 4px 0 #120d28,0 0 0 0 rgba(155,225,93,0)}50%{box-shadow:0 4px 0 #120d28,0 0 14px 3px rgba(155,225,93,.55)}}

/* ---------- E08: copies toward the next level ---------- */
html.nl-E08 .ccs .ccsProg{position:relative;flex:0 0 auto;height:13px;margin:0;background:#120d28;
  border-top:2px solid #1b1430;overflow:hidden;}
html.nl-E08 .ccs .ccsProgFill{position:absolute;left:0;top:0;bottom:0;width:100%;transform-origin:0 50%;
  transform:scaleX(var(--p0,0));background:linear-gradient(180deg,#7ee8fa,#3fa7d6);}
html.nl-E08 .ccs .ccsProg.go .ccsProgFill{transform:scaleX(var(--p1,0));transition:transform .45s steps(5,end);}
html.nl-E08 .ccs .ccsProgTxt{position:relative;display:block;text-align:center;font:800 9.5px/13px system-ui,sans-serif;
  letter-spacing:.3px;color:#fff8e7;text-shadow:0 1px 0 #1b1430,0 0 2px #1b1430;font-variant-numeric:tabular-nums;}
html.nl-E08 .ccs .ccsProg.ccsProgFull .ccsProgFill{background:linear-gradient(180deg,#b6f27a,#5fbf2f);}
html.nl-E08 .ccs .ccsProg.ccsProgMax .ccsProgFill{transform:none;background:linear-gradient(180deg,#ffe98a,#e0a92a);}
html.nl-E08 .ccs .ccsCard.ccsReadyBump{animation:ccsReadyBump .42s cubic-bezier(.2,1.6,.45,1) both;}
@keyframes ccsReadyBump{0%{transform:scale(1)}40%{transform:scale(1.1)}100%{transform:scale(1)}}
html.nl-E08 .ccs .ccsStamp{position:absolute;left:50%;top:44%;z-index:4;pointer-events:none;white-space:nowrap;
  font-family:Bangers,cursive;font-size:15px;letter-spacing:1px;line-height:1;color:#1b1430;background:#9be15d;
  padding:4px 8px 3px;border:2.5px solid #1b1430;border-radius:4px;box-shadow:2px 3px 0 rgba(4,2,12,.55);
  transform:translate(-50%,-50%) rotate(-10deg);animation:ccsStampIn .3s cubic-bezier(.2,1.6,.45,1) both;}
html.nl-E08 .ccs .ccsFanCard .ccsStamp{font-size:11px;}
@keyframes ccsStampIn{from{opacity:0;transform:translate(-50%,-50%) rotate(-10deg) scale(2.2)}to{opacity:1;transform:translate(-50%,-50%) rotate(-10deg) scale(1)}}
html.nl-E08 .ccs .ccsMini .ccsProg{width:100%;height:11px;border-top-width:1.5px;}
html.nl-E08 .ccs .ccsMini .ccsProgTxt{font-size:8.5px;line-height:11px;}
html.nl-E08 .ccs .ccsMini.ccsMiniReady{box-shadow:inset 0 0 0 2px #9be15d,0 0 8px rgba(155,225,93,.6);}
html.nl-E08 .ccs .ccsSpotProg{position:relative;width:min(76vw,300px);height:16px;border:2px solid #1b1430;border-radius:8px;}
html.nl-E08 .ccs .ccsSpotProg .ccsProgTxt{font-size:11px;line-height:12px;}

/* ---------- E11: the silhouette tease on a new face's card back ---------- */
html.nl-E11 .ccs .ccsSil{position:absolute;inset:8px 6px 6px;display:flex;align-items:flex-end;justify-content:center;
  pointer-events:none;opacity:.55;}
html.nl-E11 .ccs .ccsSil>canvas,html.nl-E11 .ccs .ccsSil>img,html.nl-E11 .ccs .ccsSil>div{width:100%;height:100%;object-fit:contain;
  object-position:50% 100%;filter:brightness(0);}
html.nl-E11 .ccs .ccsSil .ccsLeaderArt>img{filter:brightness(0);}
html.nl-E11 .ccs .ccsHasSil .ccsQ{position:relative;z-index:1;font-size:46px;opacity:.9;}
html.nl-E11 .ccs .ccsCard.charge.ccsHasSil .ccsSil{opacity:.8;}

/* ---------- E11: the UNVEIL cinematic (index.html unveilShow -> NLReel.unveilCine) ---------- */
html.nl-E11 #unveil .nlCineDark,html.nl-E11 #unveil .nlCineShaft,html.nl-E11 #unveil .nlCineFlash{display:none;}
html.nl-E11 #unveil.nlCineRun .nlCineDark{display:block;position:absolute;inset:0;z-index:0;pointer-events:none;
  background:#05030c;animation:nlCineDark var(--nl-cine-end,1500ms) linear both;}
@keyframes nlCineDark{0%,40%{opacity:1}47%{opacity:.82}55%{opacity:0}100%{opacity:0}}
html.nl-E11 #unveil.nlCineRun .nlCineShaft,html.nl-E11 #unveil.nlCineEnd .nlCineShaft{display:block;position:absolute;z-index:0;
  pointer-events:none;left:50%;bottom:0;width:58%;height:100%;margin-left:-29%;transform-origin:50% 100%;
  background:linear-gradient(0deg,rgba(255,255,255,.95) 0%,var(--nl-cine,#ffd23f) 22%,rgba(0,0,0,0) 100%);
  -webkit-mask-image:linear-gradient(90deg,transparent,#000 30%,#000 70%,transparent);
  mask-image:linear-gradient(90deg,transparent,#000 30%,#000 70%,transparent);opacity:.32;}
html.nl-E11 #unveil.nlCineRun .nlCineShaft{animation:nlCineShaft 1100ms cubic-bezier(.2,.8,.3,1) 120ms both;}
@keyframes nlCineShaft{0%{opacity:0;transform:scaleY(0) scaleX(.4)}35%{opacity:1;transform:scaleY(1) scaleX(.6)}
  55%{opacity:1;transform:scaleY(1) scaleX(1.25)}100%{opacity:.32;transform:scaleY(1) scaleX(1)}}
html.nl-E11 #unveil.nlCineRun .nlCineFlash{display:block;position:absolute;inset:0;z-index:4;pointer-events:none;background:#fff;
  animation:nlCineFlash 300ms ease-out 600ms both;}
@keyframes nlCineFlash{0%{opacity:0}18%{opacity:1}100%{opacity:0}}
html.nl-E11 #unveil.nlCineRun .uvArt{animation:none;}
html.nl-E11 #unveil.nlCineRun .uvArt>canvas,html.nl-E11 #unveil.nlCineRun .uvBust>img,html.nl-E11 #unveil.nlCineRun .uvBust>.lcMedal{
  animation:nlCineArt 1150ms linear both,scBreath 4.2s ease-in-out 1.4s infinite;transform-origin:50% 80%;}
@keyframes nlCineArt{
  0%{filter:brightness(0) invert(0);transform:scale(.96);opacity:.85}
  26%{filter:brightness(0) invert(0);transform:scale(1);opacity:1}
  47%{filter:brightness(0) invert(1);transform:scale(1.02)}
  55%{filter:brightness(0) invert(1);transform:scale(1.25)}
  62%{filter:brightness(1) invert(0);transform:scale(.95)}
  72%{transform:scale(1.05)}
  84%{transform:scale(.99)}
  100%{filter:brightness(1) invert(0);transform:scale(1)}}
html.nl-E11 #unveil.nlCineRun .uvTop{animation:nlCineTop 380ms cubic-bezier(.2,1.5,.45,1) 640ms both;}
@keyframes nlCineTop{from{opacity:0;transform:translateX(-50%) rotate(-3deg) scale(2)}to{opacity:1;transform:translateX(-50%) rotate(-3deg) scale(1)}}
html.nl-E11 #unveil.nlCineRun .uvPlate{animation:nlCinePlate 300ms ease-out 640ms both;}
@keyframes nlCinePlate{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:none}}
html.nl-E11 #unveil.nlCineRun .uvReveal .uvName{animation:none;}
html.nl-E11 #unveil .uvName{position:relative;}
html.nl-E11 #unveil .nlL{display:inline-block;white-space:pre;}
html.nl-E11 #unveil.nlCineRun .nlL{animation:nlLetter 260ms cubic-bezier(.2,1.6,.45,1) both;}
@keyframes nlLetter{from{opacity:0;transform:scale(2.4) rotate(-8deg)}to{opacity:1;transform:none}}
html.nl-E11 #unveil .nlPow{position:absolute;left:50%;top:50%;width:150px;height:150px;margin:-75px 0 0 -75px;z-index:-1;
  pointer-events:none;opacity:0;border-radius:50%;
  background:repeating-conic-gradient(from 0deg,var(--nl-cine,#ffd23f) 0deg 6deg,rgba(0,0,0,0) 6deg 20deg);
  -webkit-mask-image:radial-gradient(circle,#000 18%,transparent 66%);mask-image:radial-gradient(circle,#000 18%,transparent 66%);}
html.nl-E11 #unveil.nlCineRun .nlPow{animation:nlPow 520ms ease-out both;}
@keyframes nlPow{0%{opacity:0;transform:scale(.3) rotate(0)}30%{opacity:.9}100%{opacity:0;transform:scale(1.5) rotate(40deg)}}
html.nl-E11 #unveil.nlCineRun .nlStar{animation:nlStar 320ms cubic-bezier(.2,1.7,.45,1) both;}
@keyframes nlStar{from{opacity:0;transform:scale(0) rotate(-40deg)}to{opacity:1;transform:none}}
html.nl-E11 #unveil.nlCineRun .uvActs,html.nl-E11 #unveil.nlCineRun .uvSkip{animation:nlCineActs 260ms ease-out var(--nl-cine-end,1500ms) both;}
@keyframes nlCineActs{from{opacity:0}to{opacity:1}}
html.nl-E11 #unveil.nlCineRun .uvMeta{display:flex;}
html.nl-E11 #unveil.nlCineRun .uvMeta .starRow{display:inline-flex;}

/* ---------- REDUCE MOTION: the shipped still panel and a still summary ---------- */
html[data-anim="none"] #unveil .nlCineDark,html[data-anim="none"] #unveil .nlCineShaft,html[data-anim="none"] #unveil .nlCineFlash{display:none !important;}
html[data-anim="none"] .ccs *,html[data-anim="none"] #unveil.nlCine *{animation:none !important;transition:none !important;}
body.cc-rm .ccs .ccsProg.go .ccsProgFill,body.cc-rm .ccs .ccsStamp,body.cc-rm .ccs .ccsCards.ccsStageOut{animation:none;transition:none;}
@media (prefers-reduced-motion:reduce){
  #unveil .nlCineDark,#unveil .nlCineShaft,#unveil .nlCineFlash{display:none !important;}
  .ccs .ccsProg.go .ccsProgFill,.ccs .ccsStamp,.ccs .ccsCards.ccsStageOut,.ccs .ccsTitleIn .ccsTitle,.ccs .ccsSumAct{animation:none;transition:none;}
}
