/* 12月 120点 (歳末): 光・紙吹雪・とよぴの応援・締めの場面転換。
   The static paint is the 100点 (v5) frame. Everything that moves runs only while the entrance
   controller says html[data-nov-motion="ready"] and the visitor has not asked for less motion;
   every movement ends where it started, so the landed page is the 100点 page. */

/* title = 3 layers in the box of the v5 title image: back (glow, gold brush, 筆丸, 歳) / toyopi / front (末) */
.dec-title>img{position:absolute;display:block;max-width:none;height:auto;pointer-events:none}
.dec-title>.dec-title-back{position:relative;width:100%}
.dec-title-toyopi{transform-origin:52.3% 86.2%}
/* the closing toyopi pops up from its feet and cheers around them */
.dec-closing img[data-nov-key$="closing-toyopi"]{transform-origin:50% 96%}
/* light only on the gold brush strokes (mask = the gold pixels of the title, outside the 筆丸, away from the toyopi) */
.dec-title-sheen{position:absolute;inset:0;overflow:hidden;pointer-events:none;
  -webkit-mask:url('december/title-gold-mask.webp') 0 0/100% 100% no-repeat;mask:url('december/title-gold-mask.webp') 0 0/100% 100% no-repeat}
.dec-title-sheen>i{position:absolute;top:-10%;bottom:-10%;left:0;width:26%;opacity:0;
  background:linear-gradient(100deg,#fff0 0,#fffbe800 20%,#fffdf0e6 50%,#fffbe800 80%,#fff0 100%);transform:translateX(-110%)}

/* rays: the gradient moves to ::before so it can turn; the round mask and the clip stay on the box */
.dec-rays{background:none}
.dec-rays::before{content:"";position:absolute;inset:0;
  background:repeating-conic-gradient(from 2deg,#fffffff0 0deg 3.4deg,#fff0 4.6deg 8.8deg,#fffffff0 10deg)}

/* a light band across the gold ground (FV and closing), behind the confetti and every piece */
.dec-gold{overflow:hidden}
.dec-sweep{position:absolute;z-index:0;top:-20%;bottom:-20%;left:0;width:22%;opacity:0;pointer-events:none;
  background:linear-gradient(90deg,#fff0,#ffffff52 40%,#fffbe0a8 50%,#ffffff52 60%,#fff0);transform:translateX(-120%) skewX(-18deg)}

@media (prefers-reduced-motion:no-preference){
  /* the light opens from the 筆丸 as the title lands, then turns slowly */
  html[data-nov-motion="boot"] .dec-rays::before{opacity:0}
  html[data-nov-motion="ready"] .dec-rays::before{will-change:transform,opacity;
    animation:dec-rays-open 1500ms cubic-bezier(.2,.7,.2,1) 150ms both,dec-rays-turn 100s linear 0s infinite}
  /* the confetti keeps drifting down; one tile further is the same picture */
  html[data-nov-motion="ready"] .dec-confetti{top:calc(-1 * var(--dec-cf-top,426px));background-position:0 var(--dec-cf-off,0px);will-change:transform;
    animation:dec-fall var(--dec-cf-t,19s) linear infinite}
}
/* off screen: hold the drifts where they are (fair-120.js sets data-dec-idle) */
[data-dec-idle] .dec-rays::before,[data-dec-idle] .dec-confetti,[data-dec-idle]>.dec-confetti{animation-play-state:paused}
@keyframes dec-rays-open{from{opacity:0;scale:.72}to{opacity:1;scale:1}}
@keyframes dec-rays-turn{to{rotate:360deg}}
@keyframes dec-fall{to{transform:translateY(var(--dec-cf-h,426px))}}
