

:root {
  --page-top: #CFEAFB;
  --page-bottom: #F4F8FB;
  --ink: #0B2346;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
}

body {
  min-height: 100vh;
  background: linear-gradient(180deg, var(--page-top) 0%, var(--page-bottom) 55%);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", sans-serif;
}

.fv {
  position: relative;
  max-width: 520px;
  margin: 0 auto;
}

.fv-copy {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.fv-stage {
  position: relative;
  aspect-ratio: 842 / 1869;
  overflow: hidden;
  background: #7CC8F2;
  user-select: none;
}

.fv-still {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.layer {
  position: absolute;
  display: block;
  max-width: none;
  pointer-events: none;
}


.motion {
  visibility: hidden;
  opacity: 0;
  transition: opacity .4s ease-out, visibility 0s .4s;
}

.is-live .motion {
  visibility: visible;
  opacity: 1;
  transition: opacity .4s ease-out;
}



.sun-glow,
.sun-rays {
  position: absolute;
  left: 87.648%;
  top: 11.610%;
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  pointer-events: none;
}

.sun-glow {
  width: 22%;
  background: radial-gradient(circle, rgba(255, 253, 230, .95) 0 18%, rgba(255, 238, 130, .5) 36%, rgba(255, 238, 130, 0) 68%);
  mix-blend-mode: screen;
  opacity: .5;
}

.sun-rays {
  width: 34%;
  background: repeating-conic-gradient(from 4deg, rgba(255, 255, 255, .95) 0deg 5deg, rgba(255, 255, 255, 0) 9deg 22.5deg);
  -webkit-mask: radial-gradient(circle, transparent 0 20%, #000 30%, rgba(0, 0, 0, .55) 46%, transparent 70%);
  mask: radial-gradient(circle, transparent 0 20%, #000 30%, rgba(0, 0, 0, .55) 46%, transparent 70%);
  mix-blend-mode: soft-light;
  opacity: .9;
}

.is-live .sun-glow {
  animation: sun-breathe 3.2s ease-in-out infinite alternate;
}

.is-live .sun-rays {
  animation: sun-spin 40s linear infinite;
}

@keyframes sun-breathe {
  from { scale: .86; opacity: .3; }
  to { scale: 1.14; opacity: .75; }
}

@keyframes sun-spin {
  to { rotate: 360deg; }
}



.is-live .layer-hand {
  animation: hand-wave 4.8s ease-in-out .5s infinite;
}


@keyframes hand-wave {
  0%, 30%, 100% { rotate: 0deg; }
  7% { rotate: 8deg; }
  14% { rotate: 1.5deg; }
  21% { rotate: 8deg; }
}

.layer-box-a,
.layer-box-b,
.layer-box-c {
  transform-origin: 50% 55%;
}

.is-live .layer-box-a {
  animation: float-a 3.4s ease-in-out infinite alternate;
}

.is-live .layer-box-b {
  animation: float-b 3.9s ease-in-out .4s infinite alternate;
}

.is-live .layer-box-c {
  animation: float-c 3.1s ease-in-out .8s infinite alternate;
}


@keyframes float-a {
  to { translate: -2% -6%; scale: 1.1; rotate: -6deg; }
}

@keyframes float-b {
  to { translate: 1% -6%; scale: 1.1; rotate: 5deg; }
}

@keyframes float-c {
  to { translate: -1% -6%; scale: 1.1; rotate: -5deg; }
}



.headline-pop,
.headline-echo {
  transform-origin: 50% 55%;
}

.is-live .headline-pop {
  animation: headline-stamp 7s cubic-bezier(.2, .8, .3, 1) .3s infinite;
}

.is-live .headline-echo {
  animation: headline-echo 7s ease-out .3s infinite;
}


@keyframes headline-stamp {
  0% { scale: 1; }
  4% { scale: 1.07; }
  9% { scale: 1; }
  12% { scale: 1.02; }
  15%, 100% { scale: 1; }
}

@keyframes headline-echo {
  0% { scale: 1; opacity: 0; }
  4% { scale: 1.04; opacity: .5; }
  15%, 100% { scale: 1.18; opacity: 0; }
}

.headline-shine {
  overflow: hidden;
  -webkit-mask: url("assets/headline-mask.png") 0 0 / 100% 100% no-repeat;
  mask: url("assets/headline-mask.png") 0 0 / 100% 100% no-repeat;
}


.headline-shine::before {
  content: "";
  position: absolute;
  top: -20%;
  bottom: -20%;
  left: 0;
  width: 22%;
  background:
    linear-gradient(100deg, rgba(255, 255, 255, 0) 0 62%, rgba(255, 255, 255, .7) 70%, rgba(255, 255, 255, 0) 78%),
    linear-gradient(100deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .55) 30%, rgba(255, 255, 255, 0) 55%);
  transform: translateX(-130%) skewX(-16deg);
}

.is-live .headline-shine::before {
  animation: headline-shine 7s ease-in-out .3s infinite;
}

@keyframes headline-shine {
  0%, 18% { transform: translateX(-130%) skewX(-16deg); }
  36%, 100% { transform: translateX(430%) skewX(-16deg); }
}



.headlight {
  position: absolute;
  width: 13%;
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  background:
    radial-gradient(circle, #FFF 0 9%, rgba(255, 255, 240, .9) 18%, rgba(255, 246, 200, .42) 36%, rgba(255, 246, 200, 0) 64%),
    linear-gradient(90deg, rgba(255, 255, 255, 0) 4%, rgba(255, 255, 255, .85) 50%, rgba(255, 255, 255, 0) 96%) center / 100% 4% no-repeat;
  mix-blend-mode: screen;
  opacity: 0;
  pointer-events: none;
}

.headlight-left { left: 64.489%; top: 58.587%; }
.headlight-right { left: 94.181%; top: 61.049%; }

.is-live .headlight {
  animation: headlight-flash 6s ease-out 2.2s infinite;
}

@keyframes headlight-flash {
  0%, 17%, 100% { opacity: 0; scale: .6; }
  3% { opacity: 1; scale: 1; }
  7% { opacity: 0; scale: .75; }
  10% { opacity: 1; scale: 1.06; }
}



.icon-pop {
  transform-origin: 50% 50%;
}

.is-live .layer-icon-1 { animation: icon-pop 6s ease-out 1.2s infinite; }
.is-live .layer-icon-2 { animation: icon-pop 6s ease-out 1.45s infinite; }
.is-live .layer-icon-3 { animation: icon-pop 6s ease-out 1.7s infinite; }

@keyframes icon-pop {
  0%, 12%, 100% { scale: 1; rotate: 0deg; }
  4% { scale: 1.14; rotate: -6deg; }
  8% { scale: 1.04; rotate: 3deg; }
}



.twinkle {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 6%;
  aspect-ratio: 1;
  translate: -50% -50%;
  scale: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .85) 0 12%, rgba(255, 250, 210, .35) 30%, rgba(255, 250, 210, 0) 56%);
  pointer-events: none;
}

.twinkle::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, #FFF 0 30%, #FFF6B0 60%, #FFE14D 90%);
  clip-path: polygon(50% 0, 56% 44%, 100% 50%, 56% 56%, 50% 100%, 44% 56%, 0 50%, 44% 44%);
}

.is-live .twinkle {
  animation: twinkle 2.6s ease-in-out var(--d) infinite;
}

@keyframes twinkle {
  0%, 62%, 100% { scale: 0; rotate: 0deg; }
  30% { scale: 1; rotate: 45deg; }
}



.motion-toggle {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  display: none;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1.5px solid rgba(11, 35, 70, .18);
  border-radius: 50%;
  background: rgba(255, 255, 255, .88);
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(11, 35, 70, .18);
  cursor: pointer;
}

.is-live .motion-toggle {
  display: grid;
}

.motion-toggle:focus-visible {
  outline: 3px solid #FFD43B;
  outline-offset: 2px;
}

.motion-toggle svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-play,
.is-user-paused .icon-pause {
  display: none;
}

.is-user-paused .icon-play {
  display: block;
}

.is-paused .fv-stage *,
.is-paused .fv-stage *::before {
  animation-play-state: paused !important;
}

@media (prefers-reduced-motion: reduce) {
  .motion,
  .motion-toggle {
    display: none !important;
  }
}
