/* ==========================================================================
   LUNNIE OFFICIAL SITE — JELLY POP THEME
   ========================================================================== */

/* ---------- 0. RESET ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p, table { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; padding: 0; }
a, button, [role="button"], .face-tap, .play-btn, .sns-btn, .jelly-btn, .menu-btn {
  touch-action: manipulation;
}
img { max-width: 100%; display: block; }
table { border-collapse: collapse; width: 100%; }

/* ---------- 1. DESIGN TOKENS ---------- */
:root {
  --pink: #FF8FC0;
  --pink-deep: #F45E9E;
  --pink-pale: #FFE3F0;
  --mint: #5FD9CF;
  --mint-deep: #23B3A7;
  --mint-pale: #DFF9F6;
  --cream: #FFF9FB;
  --ink: #4A3A47;
  --lilac: #C9B6FF;
  --lilac-pale: #F0EAFF;
  --white: #fff;
  --night: #241B2F;

  --bg-body: var(--cream);
  --bg-surface: var(--white);
  --text-main: var(--ink);
  --text-sub: var(--pink-deep);
  --header-bg: rgba(255, 249, 251, .7);
  --card-border: var(--white);
  --spring: cubic-bezier(.34, 1.56, .64, 1); /* @kind other */
  --pop: cubic-bezier(.68, -0.55, .27, 1.55); /* @kind other */

  --hero-veil: rgba(255, 249, 251, .45);
  --marquee-fill: var(--pink);
  --marquee-stroke: var(--mint);
}

html.live {
  --bg-body: var(--night);
  --bg-surface: #2E2340;
  --text-main: #FFF9FB;
  --text-sub: #FFD1EA;
  --header-bg: rgba(36, 27, 47, .7);
  --card-border: #3C2E52;
  --cream: #2E2340;
  --hero-veil: rgba(36, 27, 47, .28); /* light veil — bg-dark.webp is already dark, keep the penlights visible */
  --pink-pale: #3C2650;
  --mint-pale: #1D3B3A;
  --lilac-pale: #2A2140;
}

@font-face { font-display: swap; }

/* ---------- 2. BASE ---------- */
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  font-family: "Zen Maru Gothic", sans-serif;
  color: var(--text-main);
  background: var(--bg-body);
  background-image:
    linear-gradient(var(--hero-veil), var(--hero-veil)),
    url("../assets/bg-crystal.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  transition: background-color .8s ease, color .8s ease;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
html.live body {
  /* sea of penlights — the asset is already dark, no blend needed */
  background-image:
    linear-gradient(var(--hero-veil), var(--hero-veil)),
    url("../assets/bg-dark.webp");
}

::selection { background: var(--pink); color: var(--white); }

h2, h3 { font-family: "M PLUS Rounded 1c", sans-serif; letter-spacing: .06em; }

/* ---------- 3. PHONE COLUMN LAYOUT ---------- */
#phone-column {
  max-width: 480px;
  margin: 0 auto;
  background: var(--bg-surface);
  position: relative;
  min-height: 100vh;
  box-shadow: 0 0 60px rgba(74, 58, 71, .12);
  overflow: hidden;
  transition: background-color .6s ease;
}

.section { padding: 64px 20px 56px; position: relative; }

/* ---------- 4. SECTION HEAD ---------- */
.section-head { text-align: center; margin-bottom: 32px; }
.section-head-en {
  font-family: "Baloo 2", sans-serif;
  font-weight: 800;
  font-size: 2.4rem;
  line-height: 1;
  margin: 0 0 6px;
}
.section-head-en .stroke {
  color: transparent;
  -webkit-text-stroke: 2px var(--pink-deep);
  paint-order: stroke fill;
}
.section-head-en .fill { color: var(--mint-deep); }
.section-head-ja {
  font-size: .85rem;
  font-weight: 700;
  color: var(--text-sub);
  letter-spacing: .1em;
}

/* ---------- 5. STICKER / GLASS / JELLY UTILITIES ---------- */
.sticker-frame {
  border-radius: 24px;
  border: 3px solid var(--card-border);
  box-shadow: 0 8px 24px rgba(244, 94, 158, .18);
  background: var(--white);
  overflow: hidden;
}
.glass-surface {
  background: rgba(255, 255, 255, .55);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.jelly-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--pink) 0%, var(--pink-deep) 100%);
  color: var(--white);
  font-weight: 700;
  position: relative;
  box-shadow: 0 6px 0 rgba(244, 94, 158, .35), 0 10px 20px rgba(244, 94, 158, .25);
  transition: transform .35s var(--spring);
}
.jelly-btn::before {
  content: "";
  position: absolute;
  top: 10%;
  left: 12%;
  width: 50%;
  height: 30%;
  background: rgba(255, 255, 255, .55);
  border-radius: 50%;
  filter: blur(1px);
  pointer-events: none;
}
.jelly-btn:active { transform: scale(.93); }
@media (hover: hover) {
  .jelly-btn:hover { transform: scale(1.05); }
}

/* ---------- 6. LOADER (G0) ---------- */
#loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--cream);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.loader-logo { display: flex; gap: 2px; align-items: flex-end; }
.loader-logo img { width: 56px; height: auto; opacity: 0; will-change: transform; }
.loader-text {
  font-family: "M PLUS Rounded 1c", sans-serif;
  font-weight: 800;
  color: var(--pink-deep);
  font-size: .9rem;
  letter-spacing: .1em;
  opacity: 0;
}
.loader-curtain {
  position: fixed;
  inset: 0;
  z-index: 2;
}
.loader-curtain--pink { background: var(--pink); z-index: 3; }
.loader-curtain--cream { background: var(--cream); z-index: 2; }
#loader.is-done { pointer-events: none; }

/* ---------- 7. SCROLL PROGRESS (G6) ---------- */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--pink), var(--mint));
  z-index: 950;
  transition: width .08s linear;
}

/* ---------- 8. PARTICLE CANVAS ---------- */
#particle-canvas {
  position: fixed;
  inset: 0;
  z-index: 700;
  pointer-events: none;
  width: 100%;
  height: 100%;
}

/* ---------- 9. HEADER ---------- */
#site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  max-width: 480px;
  margin: 0 auto;
}
.header-logo { display: flex; gap: 2px; }
.header-logo img { width: 28px; height: auto; -webkit-user-select: none; user-select: none; }

.menu-btn {
  width: 40px; height: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 50%;
  transition: transform .3s var(--spring);
}
.menu-btn:active { transform: scale(.9); }
.menu-btn span {
  width: 20px; height: 3px;
  border-radius: 2px;
  background: var(--pink-deep);
  transition: all .3s ease;
}
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- 10. FULLSCREEN MENU ---------- */
#site-menu {
  position: fixed;
  inset: 0;
  z-index: 920;
  background: linear-gradient(160deg, var(--pink) 0%, var(--pink-deep) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  transform: translateY(-100%);
  transition: transform .5s var(--pop);
}
#site-menu.is-open { transform: translateY(0); }
.menu-close {
  position: absolute;
  top: 16px; right: 20px;
  font-size: 2.2rem;
  color: var(--white);
  line-height: 1;
  width: 44px; height: 44px;
}
.menu-list { display: flex; flex-direction: column; gap: 22px; text-align: center; }
.menu-list a {
  font-family: "Baloo 2", sans-serif;
  font-weight: 700;
  font-size: 2rem;
  color: var(--white);
  opacity: 0;
  transform: translateY(24px);
  display: inline-block;
}
#site-menu.is-open .menu-list a { animation: menuIn .5s var(--spring) forwards; }
#site-menu.is-open .menu-list a:nth-child(1) { animation-delay: .08s; }
#site-menu.is-open .menu-list a:nth-child(2) { animation-delay: .15s; }
#site-menu.is-open .menu-list a:nth-child(3) { animation-delay: .22s; }
#site-menu.is-open .menu-list a:nth-child(4) { animation-delay: .29s; }
#site-menu.is-open .menu-list a:nth-child(5) { animation-delay: .36s; }
#site-menu.is-open .menu-list a:nth-child(6) { animation-delay: .43s; }
@keyframes menuIn { to { opacity: 1; transform: translateY(0); } }

/* ---------- 11. HERO (S1 + G1) ---------- */
.hero {
  position: relative;
  min-height: calc(100svh - 60px); /* minus sticky header so SCROLL stays above the fold */
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}
.hero-bg { position: absolute; inset: -20px; z-index: 0; }
.hero-bg-img { width: 100%; height: 100%; object-fit: cover; }
.hero-veil { position: absolute; inset: 0; background: var(--hero-veil); }

.hero-float-layer { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.float-deco {
  position: absolute;
  font-size: 1.6rem;
  color: var(--pink);
  opacity: .7;
  animation: floaty 6s ease-in-out infinite;
}
.float-deco:nth-child(even) { color: var(--mint); }
.fd1 { top: 10%; left: 10%; animation-delay: 0s; font-size: 1.2rem; }
.fd2 { top: 18%; right: 12%; animation-delay: .8s; font-size: 1.8rem; }
.fd3 { top: 32%; left: 6%; animation-delay: 1.6s; font-size: 1.1rem; }
.fd4 { top: 42%; right: 8%; animation-delay: 2.4s; font-size: 1.4rem; }
.fd5 { top: 55%; left: 14%; animation-delay: 3.2s; font-size: 1rem; }
.fd6 { top: 8%; left: 45%; animation-delay: 1.2s; font-size: 1.3rem; }
.fd7 { top: 60%; right: 18%; animation-delay: 2s; font-size: 1.2rem; }
@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-18px) rotate(10deg); }
}

.hero-badges { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.sticker-badge {
  position: absolute;
  font-family: "M PLUS Rounded 1c", sans-serif;
  font-weight: 800;
  font-size: .72rem;
  letter-spacing: .04em;
  padding: 8px 14px;
  border-radius: 999px;
  border: 3px solid var(--white);
  box-shadow: 0 8px 20px rgba(244, 94, 158, .2);
  white-space: nowrap;
}
.badge-1 {
  background: var(--pink);
  color: var(--white);
  top: 60%;
  left: 5%;
  transform: rotate(6deg);
}
.badge-2 {
  background: var(--mint);
  color: var(--white);
  left: 5px;
  top: 70%;
  transform: rotate(-6deg);
}

.hero-pose {
  position: relative;
  z-index: 2;
  left: 0%;
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  object-position: bottom;
  margin: 0 auto;
  display: block;
}

.hero-logo {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: .8;
}
.hero-logo img { position: absolute; width: 38vw; max-width: 170px; height: auto; filter: drop-shadow(0 6px 14px rgba(74,58,71,.32)); }
.jelly-ru { top: 4%; left: 13%; }
.hero-logo .jelly-ni { top: 4%; right: 13%; width: 42vw; max-width: 190px; }
.jelly-ru { animation: jellyA 3.4s ease-in-out infinite; transform-origin: bottom center; }
.jelly-ni { animation: jellyB 3.4s ease-in-out infinite; transform-origin: bottom center; }
@keyframes jellyA {
  0%, 100% { transform: scale(1, 1) rotate(-2deg); }
  25% { transform: scale(1.08, .92) rotate(-2deg); }
  50% { transform: scale(.94, 1.08) rotate(1deg); }
  75% { transform: scale(1.04, .96) rotate(-1deg); }
}
@keyframes jellyB {
  0%, 100% { transform: scale(1, 1) rotate(2deg); }
  25% { transform: scale(.94, 1.08) rotate(2deg); }
  50% { transform: scale(1.08, .92) rotate(-1deg); }
  75% { transform: scale(.96, 1.04) rotate(1deg); }
}

.hero-copy {
  position: absolute;
  left: 24px;
  right: 24px; /* keep clear of the live-mode FAB */
  bottom: calc(env(safe-area-inset-bottom) + 88px);
  z-index: 4;
  text-align: right;
}
.hero-copy-main {
  display: inline-block;
  font-family: "M PLUS Rounded 1c", sans-serif;
  font-weight: 900;
  font-size: 1.5rem;
  letter-spacing: .05em;
  color: var(--pink-deep);
  line-height: 1.45;
  padding: 10px 18px 12px;
  border-radius: 22px;
  background: rgba(255, 255, 255, .5);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 6px 20px rgba(244, 94, 158, .15);
  text-shadow: 0 2px 0 var(--white);
  transition: background-color .6s ease, color .6s ease;
}
.hero-copy-sub {
  font-family: "Baloo 2", sans-serif;
  font-weight: 700;
  font-size: .72rem;
  letter-spacing: .12em;
  color: var(--mint-deep);
  margin-top: 8px;
  padding-left: 6px;
  text-shadow: 0 1px 0 var(--white), 0 0 8px rgba(255, 255, 255, .8);
}

.hero-scroll {
  position: absolute;
  bottom: calc(env(safe-area-inset-bottom) + 96px); /* clear of the overlapping marquee band */
  left: 0; right: 0;
  z-index: 5;
  text-align: center;
  font-family: "Baloo 2", sans-serif;
  font-weight: 800;
  font-size: .72rem;
  letter-spacing: .1em;
  color: var(--pink-deep);
  text-shadow: 0 1px 0 var(--white), 0 0 10px rgba(255, 255, 255, .9);
  animation: scrollBob 1.6s ease-in-out infinite;
}
@keyframes scrollBob {
  0%, 100% { transform: translateY(0); opacity: .7; }
  50% { transform: translateY(8px); opacity: 1; }
}

/* ---------- 12. DUAL MARQUEE (G2) ---------- */
.marquee-section {
  position: relative;
  z-index: 3; /* above the hero image */
  transform: rotate(-2deg) scale(1.05);
  margin: -72px 0 20px; /* pull up over the hero's lower edge */
}
.marquee-wrap {
  overflow: hidden;
  white-space: nowrap;
  border-top: 3px solid var(--white);
  border-bottom: 3px solid var(--white);
  padding: 8px 0;
}
.marquee-wrap--top { background: var(--pink-pale); }
.marquee-wrap--bottom { background: var(--mint-pale); margin-top: -3px; }

.marquee-track { display: inline-flex; width: max-content; }
.marquee-track span {
  font-family: "Baloo 2", sans-serif;
  font-weight: 800;
  font-size: 1.6rem;
  padding-right: 0;
}
.marquee-track--left {
  color: var(--marquee-fill);
  animation: marqueeLeft 18s linear infinite;
}
.marquee-track--right {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--marquee-stroke);
  animation: marqueeRight 20s linear infinite;
}
@keyframes marqueeLeft { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes marqueeRight { from { transform: translateX(-50%); } to { transform: translateX(0); } }

/* ---------- 13. NEWS (S3) ---------- */
.news-list { display: flex; flex-direction: column; gap: 18px; }
.news-card {
  border-radius: 24px;
  border: 3px solid var(--white);
  background: var(--bg-surface);
  box-shadow: 0 8px 24px rgba(244, 94, 158, .18);
  padding: 18px 18px 20px;
  position: relative;
  opacity: 0;
  transition: rotate .3s var(--spring);
}
.news-card.is-shown { opacity: 1; }
/* sticker tilt via the standalone `rotate` property so GSAP's transform (y) never clears it */
.news-card:nth-child(odd) { rotate: -1.2deg; }
.news-card:nth-child(even) { rotate: 1deg; }
.news-card:active { rotate: 0deg; }
@media (hover: hover) {
  .news-card:hover { rotate: 0deg; }
}

.tag {
  display: inline-block;
  font-family: "Baloo 2", sans-serif;
  font-weight: 700;
  font-size: .65rem;
  letter-spacing: .06em;
  padding: 4px 12px;
  border-radius: 999px;
  color: var(--white);
  margin-bottom: 8px;
}
.tag-release { background: var(--pink); }
.tag-live { background: var(--mint); }
.tag-info { background: var(--lilac); }

.news-date {
  display: block;
  font-family: "Baloo 2", sans-serif;
  font-size: .72rem;
  color: var(--text-sub);
  margin-bottom: 6px;
  letter-spacing: .04em;
}
.news-title { font-size: .92rem; font-weight: 700; line-height: 1.6; }

/* ---------- 14. PROFILE (S4 + G3) ---------- */
.profile-face-wrap {
  position: relative;
  width: 62%;
  margin: 0 auto 28px;
}
.face-tap {
  display: block;
  width: 100%;
  padding: 0;
  transform: rotate(-1.5deg);
  transition: transform .4s var(--spring);
}
.face-tap img { width: 100%; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.face-tap.is-bouncing { animation: faceBounce .5s var(--spring); }
@keyframes faceBounce {
  0% { transform: rotate(-1.5deg) scale(1); }
  35% { transform: rotate(-1.5deg) scale(1.12, .9); }
  60% { transform: rotate(-1.5deg) scale(.94, 1.08); }
  100% { transform: rotate(-1.5deg) scale(1); }
}
.tap-hint {
  position: absolute;
  bottom: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(180deg, var(--pink) 0%, var(--pink-deep) 100%);
  color: var(--white);
  border: 3px solid var(--white);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(244, 94, 158, .3);
  pointer-events: none;
  z-index: 6;
  animation: hintBob 1.6s ease-in-out infinite;
  transition: opacity .5s ease, transform .5s var(--spring);
}
.tap-hint.is-hidden { opacity: 0; transform: translateX(-50%) scale(.6); animation: none; }
@keyframes hintBob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-6px); }
}
html.live .tap-hint { border-color: #3C2E52; }
@media (prefers-reduced-motion: reduce) {
  .tap-hint { animation: none; }
}

.face-bubble {
  position: absolute;
  top: -6px;
  right: -14px;
  background: var(--white);
  border: 3px solid var(--pink);
  border-radius: 20px 20px 20px 4px;
  padding: 8px 14px;
  font-size: .78rem;
  font-weight: 700;
  color: var(--pink-deep);
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(244, 94, 158, .2);
  opacity: 0;
  transform: scale(.3);
  transform-origin: bottom left;
  pointer-events: none;
  z-index: 5;
}
.face-bubble.is-visible { animation: bubblePop .45s var(--spring) forwards; }
@keyframes bubblePop {
  0% { opacity: 0; transform: scale(.3); }
  60% { opacity: 1; transform: scale(1.1); }
  100% { opacity: 1; transform: scale(1); }
}

.profile-table {
  background: rgba(255, 255, 255, .55);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-radius: 20px;
  border: 3px solid var(--white);
  overflow: hidden;
  margin-bottom: 28px;
}
.profile-table tr:not(:last-child) th,
.profile-table tr:not(:last-child) td { border-bottom: 1px dashed var(--pink-pale); }
.profile-table th, .profile-table td {
  padding: 12px 14px;
  text-align: left;
  font-size: .84rem;
}
.profile-table th {
  color: var(--text-sub);
  font-weight: 700;
  width: 30%;
  white-space: nowrap;
}
.profile-table td { font-weight: 500; }

.gauge-list { display: flex; flex-direction: column; gap: 16px; }
.gauge-label {
  display: flex;
  justify-content: space-between;
  font-size: .8rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-sub);
}
.gauge-value--infinity { font-size: 1rem; color: var(--pink-deep); }
.gauge-track {
  height: 16px;
  border-radius: 999px;
  background: var(--pink-pale);
  border: 2px solid var(--white);
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(74, 58, 71, .12);
}
.gauge-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  position: relative;
}
.gauge-fill--cute { background: linear-gradient(90deg, var(--pink), var(--pink-deep)); }
.gauge-fill--genki { background: linear-gradient(90deg, var(--mint), var(--mint-deep)); }
.gauge-fill--ai { background: linear-gradient(90deg, var(--lilac), #9C7FE8); }

/* ---------- 15. SWIPE STAGE (S5 + G4) ---------- */
.stage-section { position: relative; }
.stage-pin {
  position: relative;
  height: 100svh;
  overflow: hidden;
  background: var(--lilac-pale); /* Scene1 = DANCE! */
}
.stage-scene {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
}
.stage-scene.is-active { opacity: 1; visibility: visible; }
.stage-word {
  font-family: "Baloo 2", sans-serif;
  font-weight: 800;
  font-size: 5rem; /* 120% of 4.2rem */
  line-height: 1;
  letter-spacing: .02em;
  margin-bottom: -8vh;
  position: relative;
  z-index: 1; /* behind the pose image */
  color: transparent;
}
.stage-word[data-color="pink"] { -webkit-text-stroke: 2px var(--pink-deep); }
.stage-word[data-color="mint"] { -webkit-text-stroke: 2px var(--mint-deep); }
.stage-word[data-color="lilac"] { -webkit-text-stroke: 2px var(--lilac); }
.stage-scene.word-filled .stage-word[data-color="pink"] { color: var(--pink); -webkit-text-stroke: 2px var(--pink-deep); }
.stage-scene.word-filled .stage-word[data-color="mint"] { color: var(--mint); -webkit-text-stroke: 2px var(--mint-deep); }
.stage-scene.word-filled .stage-word[data-color="lilac"] { color: var(--lilac); -webkit-text-stroke: 2px #9C7FE8; }

.stage-img {
  height: 56svh;
  width: auto;
  max-width: 92%;
  object-fit: contain;
  position: relative;
  z-index: 2; /* in front of the word */
  filter: drop-shadow(0 16px 24px rgba(74, 58, 71, .2));
  -webkit-user-select: none;
  user-select: none;
}
.stage-counter {
  position: absolute;
  top: 20px; left: 20px;
  z-index: 4;
  font-family: "Baloo 2", sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  background: rgba(255, 255, 255, .7);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  padding: 4px 14px;
  border-radius: 999px;
  color: var(--pink-deep);
}
.stage-hint {
  position: absolute;
  bottom: 20px; right: 20px;
  z-index: 4;
  font-size: .68rem;
  font-weight: 700;
  color: var(--text-sub);
  background: rgba(255, 255, 255, .7);
  padding: 6px 12px;
  border-radius: 999px;
}

.stage-fallback { display: none; }

/* reduced-motion: horizontal snap gallery fallback */
@media (prefers-reduced-motion: reduce) {
  .stage-pin { display: none; }
  .stage-fallback {
    display: block;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  .stage-fallback-track { display: flex; }
  .stage-fallback-item {
    flex: 0 0 100%;
    scroll-snap-align: center;
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
  }
  .stage-fallback-item .stage-word { color: currentColor; }
  .stage-fallback-item img { height: 50vh; width: auto; max-width: 90%; }
}

/* ---------- 16. DISCOGRAPHY (S6) ---------- */
.song-list { display: flex; flex-direction: column; gap: 20px; }
.song-card {
  display: grid;
  grid-template-columns: 84px 1fr auto;
  align-items: center;
  gap: 14px;
  background: var(--bg-surface);
  border-radius: 24px;
  border: 3px solid var(--white);
  box-shadow: 0 8px 24px rgba(244, 94, 158, .18);
  padding: 12px;
}
.song-jacket {
  width: 84px; height: 84px;
  border-radius: 16px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.song-jacket--1 { background: linear-gradient(135deg, var(--pink) 0%, var(--lilac) 100%); }
.song-jacket--2 { background: linear-gradient(135deg, var(--mint) 0%, var(--pink-pale) 100%); }
.song-jacket-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.song-jacket-heart {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  line-height: 1;
  color: rgba(255, 255, 255, .4);
  transform: translateY(-4px);
}
.song-jacket-title {
  position: relative;
  z-index: 1;
  font-family: "M PLUS Rounded 1c", sans-serif;
  font-weight: 800;
  font-size: .52rem;
  letter-spacing: .05em;
  color: var(--white);
  text-align: center;
  line-height: 1.5;
  padding: 0 4px;
  max-height: calc(1.5em * 2);
  overflow: hidden;
  transform: rotate(-4deg);
  text-shadow: 0 1px 3px rgba(0, 0, 0, .2);
}
.eq-bars {
  position: absolute;
  bottom: 6px; left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 16px;
  opacity: 0;
  transition: opacity .2s ease;
}
.song-card.is-playing .eq-bars { opacity: 1; }
.eq-bars span {
  width: 3px;
  height: 30%;
  background: var(--white);
  border-radius: 2px;
}
.song-card.is-playing .eq-bars span { animation: eqBounce .5s ease-in-out infinite; }
.eq-bars span:nth-child(1) { animation-delay: 0s; }
.eq-bars span:nth-child(2) { animation-delay: .12s; }
.eq-bars span:nth-child(3) { animation-delay: .24s; }
.eq-bars span:nth-child(4) { animation-delay: .06s; }
@keyframes eqBounce {
  0%, 100% { height: 20%; }
  50% { height: 95%; }
}

.song-name { font-size: .84rem; font-weight: 700; line-height: 1.4; }
.song-date { font-size: .7rem; color: var(--text-sub); margin-top: 4px; font-family: "Baloo 2", sans-serif; }

.play-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--pink), var(--pink-deep));
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 0 rgba(244, 94, 158, .35);
  transition: transform .3s var(--spring);
  flex-shrink: 0;
}
.play-btn:active { transform: scale(.88); }
.play-btn.is-playing .play-icon { transform: scale(.85); }
.play-icon { font-size: .9rem; margin-left: 2px; }
.play-btn--secret { background: linear-gradient(180deg, var(--mint), var(--mint-deep)); box-shadow: 0 4px 0 rgba(35, 179, 167, .35); }

/* ---------- 17. OFF SHOT (S7) ---------- */
.offshot-wrap { position: relative; display: flex; justify-content: center; padding-top: 10px; }
.washi-tape {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%) rotate(-4deg);
  width: 120px;
  height: 34px;
  background: rgba(95, 217, 207, .55);
  border: 1px solid rgba(255, 255, 255, .6);
  z-index: 2;
}
.polaroid {
  position: relative;
  z-index: 1;
  background: var(--white);
  padding: 14px 14px 34px;
  border-radius: 6px;
  box-shadow: 0 12px 28px rgba(74, 58, 71, .22);
  transform: rotate(2.5deg);
  width: 72%;
}
.polaroid img { width: 100%; border-radius: 2px; -webkit-user-select: none; user-select: none; }
.polaroid-caption {
  position: absolute;
  bottom: 8px;
  left: 0; right: 0;
  text-align: center;
  font-family: "M PLUS Rounded 1c", sans-serif;
  font-weight: 700;
  font-size: .82rem;
  color: var(--pink-deep);
  transform: rotate(-1deg);
}

/* ---------- 18. FOLLOW + FOOTER (S8) ---------- */
.sns-list { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }
.sns-btn {
  width: 58px; height: 58px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  background: linear-gradient(180deg, var(--white), var(--pink-pale));
  border: 3px solid var(--white);
  color: var(--pink-deep);
  box-shadow: 0 6px 16px rgba(244, 94, 158, .2);
  transition: transform .35s var(--spring);
}
.sns-btn:active { transform: scale(.88) rotate(-6deg); }
.sns-icon { width: 28px; height: 28px; display: block; }
.sns-icon--tiktok { overflow: visible; }
.tiktok-shadow-cyan { fill: #25F4EE; transform: translate(-1.5px, 1.5px); }
.tiktok-shadow-pink { fill: #FE2C55; transform: translate(1.5px, -1.5px); }
.tiktok-main { fill: #241B2F; }
.sns-icon--youtube path:first-child { fill: var(--pink-deep); }
.sns-icon--youtube path:last-child { fill: var(--white); }
.sns-icon--instagram {
  fill: none;
  stroke: var(--pink-deep);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sns-icon--instagram circle:last-child { fill: var(--pink-deep); stroke: none; }
@media (hover: hover) {
  .sns-btn:hover { transform: scale(1.08) rotate(4deg); }
}

#site-footer {
  text-align: center;
  padding: 48px 20px 64px;
  background: linear-gradient(180deg, transparent, var(--pink-pale) 40%);
}
.footer-logo { display: flex; justify-content: center; gap: 2px; margin-bottom: 14px; }
.footer-logo img { width: 26px; height: auto; opacity: .8; }
.footer-copyright { font-size: .72rem; color: var(--text-sub); font-family: "Baloo 2", sans-serif; }
.footer-tagline { font-size: .68rem; color: var(--text-sub); opacity: .7; margin-top: 4px; font-style: italic; }
.to-top-btn {
  margin: 24px auto 0;
  display: inline-flex;
  padding: 12px 26px;
  font-size: .78rem;
  font-weight: 700;
}

/* ---------- 19. SECTION WAVE DIVIDERS ---------- */
.section::before {
  content: "";
  position: absolute;
  top: -1px; left: 0; right: 0;
  height: 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 480 20' preserveAspectRatio='none'%3E%3Cpath d='M0 10 Q 40 0 80 10 T 160 10 T 240 10 T 320 10 T 400 10 T 480 10 V0 H0 Z' fill='%23FFF9FB'/%3E%3C/svg%3E");
  background-size: 100% 100%;
  pointer-events: none;
}
.news-section::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 480 20' preserveAspectRatio='none'%3E%3Cpath d='M0 10 Q 40 0 80 10 T 160 10 T 240 10 T 320 10 T 400 10 T 480 10 V0 H0 Z' fill='%23FFF9FB'/%3E%3C/svg%3E"); }

/* ---------- 20. LIVE MODE FAB (G5) ---------- */
#live-fab {
  position: fixed;
  right: 18px;
  bottom: 24px;
  z-index: 800;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--pink), var(--pink-deep));
  box-shadow: 0 8px 20px rgba(244, 94, 158, .35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  transition: transform .35s var(--spring), background .5s ease;
}
#live-fab:active { transform: scale(.88); }
html.live #live-fab { background: linear-gradient(180deg, var(--lilac), #7A5FD8); }
.live-fab-tooltip {
  position: absolute;
  right: 66px;
  bottom: 14px;
  background: var(--ink);
  color: var(--white);
  font-size: .68rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 12px;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(6px);
  transition: opacity .3s ease, transform .3s ease;
  pointer-events: none;
}
.live-fab-tooltip::after {
  content: "";
  position: absolute;
  right: -5px; top: 50%;
  transform: translateY(-50%);
  border: 5px solid transparent;
  border-left-color: var(--ink);
}
.live-fab-tooltip.is-visible { opacity: 1; transform: translateX(0); }

/* ---------- 21. TOAST ---------- */
#toast {
  position: fixed;
  left: 50%;
  bottom: 100px;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: var(--white);
  padding: 12px 22px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
  z-index: 960;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease, transform .3s ease;
  max-width: 80%;
  text-align: center;
}
#toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 22. LIVE MODE HERO SPOTLIGHT ---------- */
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 62% 58% at 50% 34%, rgba(255, 240, 250, .35), transparent 70%);
  opacity: 0;
  transition: opacity .6s ease;
  pointer-events: none;
}
html.live .hero-bg::after { opacity: 1; }
/* smooth live-mode cross-fades: filter glow + JS-driven src swap opacity dip */
.hero-pose, .hero-bg-img { transition: filter .6s ease, opacity .25s ease; }
html.live .hero-pose {
  /* the dark asset IS the live version — only add the penlight glow */
  filter: drop-shadow(0 0 24px rgba(201, 182, 255, .5));
}
html.live .hero-copy-main {
  color: #FFE3F0;
  background: rgba(36, 27, 47, .55);
  text-shadow: 0 2px 0 rgba(36, 27, 47, .5), 0 6px 20px rgba(255, 143, 192, .4);
}
html.live .hero-copy-sub { color: var(--mint); text-shadow: 0 1px 2px rgba(36, 27, 47, .6); }
html.live .hero-scroll { color: #FFD1EA; text-shadow: 0 1px 2px rgba(36, 27, 47, .7); }

/* ---------- 22b. HERO REACTION STREAM ---------- */
.reaction-stream {
  position: absolute;
  right: 6px;
  bottom: 18%;
  width: 64px;
  height: 52%;
  pointer-events: none;
  z-index: 4; /* above the hero image */
}
.reaction-stamp {
  position: absolute;
  left: 0;
  bottom: -12%;
  opacity: 0;
  line-height: 1;
  will-change: bottom, transform, opacity;
}
.reaction-stamp.is-floating {
  animation:
    stampRise var(--rise, 3s) linear forwards,
    stampSway 1.2s ease-in-out infinite alternate;
}
@keyframes stampRise {
  0%   { bottom: -12%; opacity: 0; }
  12%  { opacity: 1; }
  78%  { opacity: .85; }
  100% { bottom: 100%; opacity: 0; }
}
@keyframes stampSway {
  from { transform: translateX(-14px); }
  to   { transform: translateX(14px); }
}

/* ---------- 23. REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .jelly-ru, .jelly-ni, .float-deco, .hero-scroll, .marquee-track { animation: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- 24. RESPONSIVE NICETIES ---------- */
@media (min-width: 481px) {
  body {
    padding: 0;
    background-image:
      radial-gradient(ellipse 75% 65% at 12% 8%, rgba(255, 170, 205, .8), transparent 62%),
      radial-gradient(ellipse 75% 65% at 88% 92%, rgba(90, 225, 235, .75), transparent 62%),
      linear-gradient(135deg, #ffe6f1 0%, #fbfbfe 50%, #dffaf7 100%);
  }
  .hero {
    min-height: max(720px, calc(100svh - 60px));
  }
  .hero-pose {
    width: auto;
    height: clamp(520px, 68svh, 650px);
    max-width: 100%;
  }
  .hero-logo img {
    width: clamp(120px, 30vw, 170px);
  }
  .hero-logo .jelly-ni {
    width: clamp(135px, 34vw, 190px);
  }
  html.live body { background-blend-mode: normal; }
}
@media (max-width: 340px) {
  .hero-copy-main { font-size: 1.3rem; }
  .stage-word { font-size: 4.1rem; }
}

/* ---------- 25. PC SIDE RAILS (>=1100px) ---------- */
.side-rail { display: none; }
section[id], #top { scroll-margin-top: 64px; } /* sticky header offset for anchor jumps */

@media (min-width: 1100px) {
  .side-rail {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: fixed;
    top: 50%;
    translate: 0 -50%;
    z-index: 100; /* below header(900), above body decoration */
  }
  /* column max 480px centered -> its edge is 240px from center; keep a 40px+ gap */
  .side-rail--left  { right: calc(50% + 280px); pointer-events: none; }
  .side-rail--right { left: calc(50% + 280px); gap: 14px; }

  /* --- left rail: jelly logo + floating jump pose --- */
  .rail-logo { display: flex; gap: 2px; margin-bottom: 30px; }
  .rail-logo img {
    width: 72px;
    height: auto;
    filter: drop-shadow(0 6px 12px rgba(74, 58, 71, .2));
    transform-origin: bottom center;
  }
  .rail-logo img:nth-child(1) { animation: jellyA 3.4s ease-in-out infinite; }
  .rail-logo img:nth-child(2) { animation: jellyB 3.4s ease-in-out infinite; }

  .rail-pose {
    width: 300px;
    rotate: -4deg;
    filter: drop-shadow(0 16px 28px rgba(74, 58, 71, .25));
    animation: railFloat 6s ease-in-out infinite;
    transition: filter .6s ease;
  }
  @keyframes railFloat {
    0%, 100% { transform: translateY(-12px); }
    50%      { transform: translateY(12px); }
  }

  .rail-deco {
    position: absolute;
    font-size: 1.4rem;
    opacity: .75;
    animation: floaty 6s ease-in-out infinite;
    transition: color .6s ease;
  }
  .rail-deco--1 { top: 20%; left: -14px; color: var(--pink); animation-delay: .5s; }
  .rail-deco--2 { top: 42%; right: -10px; color: var(--mint); animation-delay: 1.7s; font-size: 1.1rem; }
  .rail-deco--3 { bottom: 4%; left: 2px; color: var(--lilac); animation-delay: 2.9s; font-size: 1.2rem; }

  html.live .rail-pose {
    filter: brightness(.85) drop-shadow(0 0 20px rgba(201, 182, 255, .55));
  }
  html.live .rail-deco { color: #FFD1EA; }

  /* --- right rail: anchor pills + scroll spy --- */
  .rail-link {
    font-family: "Baloo 2", sans-serif;
    font-weight: 700;
    font-size: .8rem;
    letter-spacing: .04em;
    color: var(--pink-deep);
    background: var(--white);
    border: 3px solid var(--white);
    border-radius: 999px;
    padding: 7px 18px;
    box-shadow: 0 6px 16px rgba(244, 94, 158, .2);
    transition: transform .35s var(--spring), background-color .3s ease, color .3s ease, border-color .3s ease;
  }
  .rail-link:nth-child(odd) { rotate: -1.5deg; }
  .rail-link:nth-child(even) { rotate: 1.5deg; }
  .rail-link:hover { transform: scale(1.08); }
  .rail-link.is-active { background: var(--pink); border-color: var(--white); color: var(--white); }

  html.live .rail-link {
    background: rgba(46, 35, 64, .8);
    border-color: rgba(46, 35, 64, .8);
    color: #FFD1EA;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }
  html.live .rail-link.is-active { background: var(--pink); border-color: var(--white); color: var(--white); }
}

/* ---------- 26. GENKI TAP GAME ---------- */
/* snappy refill only once the tap game has taken over (initial nyuun stays GSAP) */
.gauge-fill--genki[data-tapped="1"] { transition: width .18s ease-out; }
.gauge-fill--genki.no-anim { transition: none; }

/* color tiers per lap range */
.gauge-fill--genki.tier-mint { background: linear-gradient(90deg, var(--mint), var(--pink)); }
.gauge-fill--genki.tier-lilac { background: linear-gradient(90deg, var(--lilac), var(--pink)); }
.gauge-fill--genki.tier-gold { background: linear-gradient(90deg, #FFD34D, #FF8FC0); }
.gauge-fill--genki.tier-gold.is-max {
  background: linear-gradient(110deg, #FFD34D 15%, #FFF3B8 38%, #FF8FC0 62%, #FFD34D 85%);
  background-size: 250% 100%;
  animation: goldShimmer 2.2s linear infinite;
}
@keyframes goldShimmer {
  from { background-position: 100% 0; }
  to   { background-position: -150% 0; }
}

/* number pop on every update */
.gauge-value { display: inline-block; }
.gauge-value.is-pop { animation: valuePop .35s var(--spring); }
@keyframes valuePop {
  0%   { transform: scale(1.25); }
  100% { transform: scale(1); }
}

/* rising "+50 元気!" text at the tap point */
.genki-float {
  position: fixed;
  z-index: 750;
  pointer-events: none;
  font-family: "M PLUS Rounded 1c", sans-serif;
  font-weight: 800;
  font-size: .85rem;
  color: var(--pink-deep);
  text-shadow: 0 1px 0 var(--white), 0 0 8px rgba(255, 255, 255, .9);
  white-space: nowrap;
  opacity: 0;
}
.genki-float.is-rising { animation: genkiRise .7s ease-out forwards; }
@keyframes genkiRise {
  0%   { opacity: 0; transform: translate(-50%, 0) scale(.8); }
  15%  { opacity: 1; transform: translate(-50%, -8px) scale(1.05); }
  100% { opacity: 0; transform: translate(-50%, -46px) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .genki-float { display: none; }
  .gauge-fill--genki.tier-gold.is-max { animation: none; }
}
