

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
  overflow: hidden;
  background: #0d0618;
  color: #ffe9f7;
  font-family: "Segoe UI", system-ui, -apple-system, "Hiragino Sans", "Yu Gothic UI", sans-serif;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

::selection { background: rgba(255, 140, 205, 0.45); color: #fff; }


#sky    { position: fixed; inset: 0; z-index: 0; }

#bgvid  { position: fixed; inset: 0; z-index: 1; width: 100%; height: 100%;
          object-fit: contain; opacity: 0; transition: opacity 1.6s ease; }

#scrim  { position: fixed; inset: 0; z-index: 2; pointer-events: none; opacity: 0;
          transition: opacity 1.6s ease;
          background: radial-gradient(85% 75% at 50% 48%, rgba(12, 5, 24, 0.34) 0%, rgba(8, 3, 16, 0.72) 100%); }

#fx     { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; }
#stage  { position: fixed; inset: 0; z-index: 4; display: grid; place-items: center; }
#fg     { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 5; pointer-events: none; }
#hud, #sale { z-index: 6; }
#enter  { z-index: 10; }
#toast  { z-index: 11; }

body.video-on #bgvid { opacity: 1; }
body.video-on #scrim { opacity: 1; }
body.video-on #sky   { opacity: 0.35; }


#sky {
  background:
    radial-gradient(120% 90% at 50% 110%, #3d1660 0%, transparent 55%),
    radial-gradient(80% 60% at 80% -10%, #241048 0%, transparent 60%),
    linear-gradient(180deg, #0b0418 0%, #1a0b2e 45%, #2a1245 100%);
  transition: opacity 1.6s ease;
}
.moon {
  position: absolute; top: 9%; right: 12%; width: 130px; height: 130px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 38%, #fff6fb 0%, #ffd9f0 45%, rgba(255, 190, 230, 0) 72%);
  filter: blur(1px);
  box-shadow: 0 0 80px 30px rgba(255, 180, 225, 0.25);
  animation: moonBreathe 7s ease-in-out infinite;
}
@keyframes moonBreathe {
  0%, 100% { transform: scale(1);    opacity: 0.9; }
  50%      { transform: scale(1.06); opacity: 1;   }
}

.glow { position: absolute; border-radius: 50%; opacity: 0.55; }
.g1 { width: 62vw; height: 62vw; left: -18vw; top: 10vh;
      background: radial-gradient(circle, rgba(255, 95, 176, 0.42) 0%, rgba(255, 95, 176, 0.14) 45%, transparent 70%);
      animation: drift1 19s ease-in-out infinite; }
.g2 { width: 56vw; height: 56vw; right: -16vw; bottom: -14vh;
      background: radial-gradient(circle, rgba(109, 59, 255, 0.45) 0%, rgba(109, 59, 255, 0.15) 45%, transparent 70%);
      animation: drift2 23s ease-in-out infinite; }
@keyframes drift1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(9vw, -6vh) scale(1.15); }
}
@keyframes drift2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(-8vw, -8vh) scale(1.1); }
}


#hero { text-align: center; padding: 1rem; will-change: transform; }

.kana {
  font-size: clamp(0.75rem, 2vw, 1rem);
  letter-spacing: 0.55em;
  text-indent: 0.55em;
  color: #f7d6ff;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8), 0 0 14px rgba(230, 140, 255, 0.7);
  animation: kanaGlow 3.4s ease-in-out infinite;
}
@keyframes kanaGlow {
  0%, 100% { opacity: 0.8; }
  50%      { opacity: 1; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8), 0 0 22px rgba(240, 160, 255, 0.95); }
}

.logo {
  position: relative;
  font-size: clamp(3.4rem, 14vw, 8.6rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.02em;
  background: linear-gradient(105deg, #ff8fd0 0%, #ffc4ea 24%, #c49bff 52%, #8ec5ff 78%, #ff8fd0 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 26px rgba(255, 120, 200, 0.45))
          drop-shadow(0 3px 12px rgba(0, 0, 0, 0.55));   
  animation: sheen 7s linear infinite;
}
@keyframes sheen {
  0%   { background-position: 0% 50%; }
  100% { background-position: 220% 50%; }
}

.logo .dot {
  display: inline-block;
  background: linear-gradient(105deg, #ff8fd0 0%, #c49bff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: dotBounce 2.4s ease-in-out infinite;
}
@keyframes dotBounce {
  0%, 100% { transform: translateY(0)      scale(1); }
  30%      { transform: translateY(-0.08em) scale(1.18); }
  60%      { transform: translateY(0.02em)  scale(0.95); }
}

.tag {
  margin-top: 0.6rem;
  font-size: clamp(0.78rem, 2.2vw, 1rem);
  letter-spacing: 0.14em;
  color: rgba(255, 234, 247, 0.92);
  text-shadow: 0 1px 7px rgba(0, 0, 0, 0.85);
}
.tag .sep { color: #ff9ed2; animation: kanaGlow 2.2s ease-in-out infinite; display: inline-block; }



#girl {
  display: block;
  margin-inline: auto;
  width: auto;
  height: clamp(150px, 32vh, 330px);
  max-width: 46vw;
  object-fit: contain;
  pointer-events: none;
  -webkit-user-drag: none;
  filter: drop-shadow(0 14px 34px rgba(247, 210, 113, 0.3))
          drop-shadow(0 0 22px rgba(232, 56, 79, 0.18));
  animation: floaty 4.6s ease-in-out infinite;
}
@keyframes floaty {
  0%, 100% { transform: translateY(0)     rotate(0deg);   }
  50%      { transform: translateY(-11px) rotate(-0.8deg); }
}


.chip {
  position: fixed;
  z-index: 6;
  bottom: 18px;
  padding: 0.55em 1.15em;
  border-radius: 999px;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  color: #ffd9f0;
  background: rgba(40, 16, 60, 0.5);
  border: 1px solid rgba(255, 160, 220, 0.35);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 22px rgba(255, 110, 190, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.3s ease;
}
button.chip { cursor: pointer; font-family: inherit; }
button.chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(255, 110, 190, 0.4);
}
button.chip:focus-visible { outline: 2px solid #ff9ed2; outline-offset: 2px; }
#musicBtn.off { opacity: 0.55; border-color: rgba(255, 160, 220, 0.15); }
#nowplaying { left: 18px; max-width: 46vw; overflow: hidden;
              text-overflow: ellipsis; white-space: nowrap; }


#controls {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 10px;
}
#controls .chip { position: static; bottom: auto; right: auto; }

#vol { display: flex; align-items: center; gap: 9px; padding: 0.5em 0.95em; }
#vol.muted { opacity: 0.5; }
#volIcon { font-size: 0.85rem; line-height: 1; width: 1.1em; text-align: center; }

#volRange {
  -webkit-appearance: none;
  appearance: none;
  width: 92px;
  height: 4px;
  border-radius: 999px;
  cursor: pointer;
  background: linear-gradient(90deg, #ff9ed2 0%, #c49bff var(--pct, 70%),
                              rgba(255, 240, 250, 0.2) var(--pct, 70%));
}
#volRange:focus-visible { outline: 2px solid #ff9ed2; outline-offset: 4px; }
#volRange::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: #fff6fb;
  border: 0;
  box-shadow: 0 0 10px rgba(255, 158, 210, 0.95);
  transition: transform 0.15s ease;
}
#volRange::-webkit-slider-thumb:hover { transform: scale(1.2); }
#volRange::-moz-range-thumb {
  width: 13px; height: 13px;
  border-radius: 50%;
  background: #fff6fb;
  border: 0;
  box-shadow: 0 0 10px rgba(255, 158, 210, 0.95);
}
#volRange::-moz-range-track { height: 4px; border-radius: 999px; background: transparent; }


#sale {
  position: fixed;
  left: 0; right: 0; bottom: 64px;
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  line-height: 1.8;
  color: rgba(255, 224, 242, 0.72);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.85);
  -webkit-user-select: text;
  user-select: text;             
  pointer-events: auto;
}

#sale p {
  display: inline-block;
  padding: 0.55em 1.2em;
  border-radius: 18px;
  background: rgba(14, 5, 28, 0.66);
  border: 1px solid rgba(255, 160, 220, 0.2);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  max-width: min(92vw, 640px);
}
#sale strong { color: rgba(255, 190, 230, 0.9); font-weight: 600; }
#sale a {
  color: #ff9ed2;
  text-decoration: none;
  border-bottom: 1px dotted rgba(255, 158, 210, 0.6);
  transition: color 0.2s ease, text-shadow 0.2s ease;
}
#sale a:hover { color: #ffc4ea; text-shadow: 0 0 12px rgba(255, 150, 215, 0.9); }


#enter {
  position: fixed; inset: 0;
  display: grid; place-items: center;
  
  background: radial-gradient(80% 80% at 50% 45%, rgba(26, 10, 44, 0.82) 0%, rgba(8, 3, 16, 0.92) 100%);
  transition: opacity 0.8s ease;
}
#enter.gone { opacity: 0; pointer-events: none; }

#yueWelcome {
  display: block;
  width: auto;
  height: clamp(120px, 24vh, 200px);
  max-width: 72vw;
  margin: 0 auto 0.3rem;
  object-fit: contain;
  pointer-events: none;
  -webkit-user-drag: none;
  filter: drop-shadow(0 10px 28px rgba(247, 210, 113, 0.35));
  animation: welcomeIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes welcomeIn {
  from { opacity: 0; transform: translateY(16px) scale(0.94); }
  to   { opacity: 1; transform: none; }
}

.enter-card {
  text-align: center;
  padding: 2.1rem 3.4rem 2.8rem;
  border-radius: 28px;
  background: rgba(36, 14, 60, 0.55);
  border: 1px solid rgba(255, 150, 220, 0.35);
  box-shadow: 0 0 60px rgba(255, 110, 190, 0.25), inset 0 0 40px rgba(120, 60, 200, 0.15);
  animation: cardFloat 5s ease-in-out infinite;
}
@keyframes cardFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
.enter-logo {
  font-size: clamp(2.2rem, 8vw, 3.6rem);
  font-weight: 900;
  margin: 0.25em 0 0.7em;
  background: linear-gradient(105deg, #ff8fd0, #c49bff, #8ec5ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
#enterBtn {
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: #fff0fa;
  padding: 0.95em 2.3em;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: linear-gradient(105deg, #ff7cc0, #9d6bff);
  box-shadow: 0 0 30px rgba(255, 110, 190, 0.55);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: btnPulse 2.4s ease-in-out infinite;
}
#enterBtn:hover { transform: scale(1.06); box-shadow: 0 0 46px rgba(255, 110, 190, 0.85); }
#enterBtn:focus-visible { outline: 2px solid #ffd9f0; outline-offset: 3px; }
@keyframes btnPulse {
  0%, 100% { box-shadow: 0 0 24px rgba(255, 110, 190, 0.45); }
  50%      { box-shadow: 0 0 44px rgba(157, 107, 255, 0.75); }
}
.hint { margin-top: 1.1rem; font-size: 0.78rem; opacity: 0.65; letter-spacing: 0.08em; }


#toast {
  position: fixed;
  top: 22px; left: 50%;
  transform: translate(-50%, -12px);
  padding: 0.6em 1.3em;
  border-radius: 999px;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  color: #ffd9f0;
  background: rgba(40, 16, 60, 0.72);
  border: 1px solid rgba(255, 160, 220, 0.4);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

.nojs { position: fixed; inset: auto 0 40% 0; text-align: center; z-index: 20; }



@media (max-height: 560px) {
  #girl { height: clamp(90px, 22vh, 150px); }
  .logo { font-size: clamp(2.4rem, 16vh, 4.6rem); }
  .kana { font-size: 0.68rem; }
  .tag  { font-size: 0.7rem; margin-top: 0.3rem; }
  #stage { place-items: start center; padding-top: 4vh; }
  #sale { bottom: 8px; font-size: 0.66rem; }
  #sale br { display: none; }
  #sale a { margin-left: 0.6em; }
  #sale p { padding: 0.4em 0.9em; }
  
  .chip { bottom: 52px; }
  #controls { bottom: 52px; }
  #yueWelcome { height: clamp(90px, 20vh, 130px); }
  .enter-card { padding: 1.2rem 2.4rem 1.6rem; }
}


@media (max-width: 560px) {
  .kana { letter-spacing: 0.3em; text-indent: 0.3em; }
  #controls { right: 50%; bottom: 14px; transform: translateX(50%); gap: 8px; }
  #sale { bottom: 86px; padding-inline: 0.75rem; font-size: 0.66rem; }
  #sale p { padding: 0.5em 0.9em; }
  #nowplaying {
    left: 50%; right: auto; bottom: 164px;
    transform: translateX(-50%);
    max-width: 86vw; font-size: 0.72rem;
  }
  #musicBtn { font-size: 0.75rem; padding: 0.5em 0.85em; }
  #vol { padding: 0.45em 0.75em; gap: 7px; }
  #volRange { width: 68px; }
  .enter-card { padding: 1.6rem 1.6rem 2rem; margin-inline: 1rem; }
}


@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.15s !important;
  }
}
