:root {
  --sky1: #6ec3ff;
  --sky2: #c9ecff;
  --ink: #3a2a5c;
  --white: #fff;
  --en: #ffc83d;
  --en-dark: #e89a00;
  --ko: #ff7eb3;
  --ko-dark: #e0457f;
  --green: #39c46a;
  --blue: #3f9bff;
  --purple: #9b6bff;
  --orange: #ff8a3d;
  --shadow: 0 8px 0 rgba(58, 42, 92, .18);
  --font: "Jua", "Fredoka", system-ui, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: linear-gradient(180deg, var(--sky1) 0%, var(--sky2) 70%, #e9f8ff 100%);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  user-select: none;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; border: 0; cursor: pointer; }
[hidden] { display: none !important; }

/* ── 하늘 배경 ── */
.sky { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.sun {
  position: absolute; top: 4vh; right: 6vw; width: 110px; height: 110px; border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #fff6b0, #ffd53d 60%, #ffbf1f);
  box-shadow: 0 0 0 18px rgba(255, 220, 80, .25), 0 0 0 40px rgba(255, 220, 80, .12);
  animation: pulse 4s ease-in-out infinite;
}
.cloud {
  position: absolute; background: #fff; border-radius: 100px; opacity: .92;
  width: 160px; height: 52px; animation: drift linear infinite;
}
.cloud::before, .cloud::after { content: ""; position: absolute; background: #fff; border-radius: 50%; }
.cloud::before { width: 70px; height: 70px; top: -36px; left: 26px; }
.cloud::after { width: 54px; height: 54px; top: -24px; left: 80px; }
.c1 { top: 12vh; animation-duration: 70s; animation-delay: -10s; }
.c2 { top: 30vh; transform: scale(.7); animation-duration: 95s; animation-delay: -60s; }
.c3 { top: 6vh; transform: scale(.55); animation-duration: 120s; animation-delay: -30s; }
.hills { position: absolute; left: 0; bottom: 0; width: 100%; height: 26vh; min-height: 140px; }

@keyframes drift { from { left: -200px; } to { left: 110vw; } }
@keyframes pulse { 50% { transform: scale(1.06); } }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-14px) rotate(3deg); } }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-10deg) scale(1.1); } 75% { transform: rotate(10deg) scale(1.1); } }
@keyframes hop { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-60px) scale(1.08); } }
@keyframes dance {
  0%, 100% { transform: translateY(0) rotate(-6deg) scaleY(1); }
  25% { transform: translateY(-18px) rotate(0) scaleY(1.03); }
  50% { transform: translateY(0) rotate(6deg) scaleY(.96); }
  75% { transform: translateY(-18px) rotate(0) scaleY(1.03); }
}

/* ── 첫 화면 ── */
#home { display: flex; flex-direction: column; align-items: center; padding: 3vh 16px 0; min-height: 100dvh; }
.logo {
  margin: 1vh 0 0; font-family: "Fredoka", var(--font); font-weight: 700;
  font-size: clamp(56px, 13vw, 132px); line-height: 1; letter-spacing: .02em;
  display: flex; gap: .02em;
}
.logo span {
  display: inline-block; color: #fff;
  -webkit-text-stroke: .05em var(--ink); paint-order: stroke fill;
  text-shadow: 0 .07em 0 var(--ink);
  animation: bob 2.4s ease-in-out infinite;
}
.logo span:nth-child(1) { color: #ff5d8f; animation-delay: 0s; }
.logo span:nth-child(2) { color: #ffb627; animation-delay: .15s; }
.logo span:nth-child(3) { color: #4cd17a; animation-delay: .3s; }
.logo span:nth-child(4) { color: #3fb2ff; animation-delay: .45s; }
.logo span:nth-child(5) { color: #a77bff; animation-delay: .6s; }
.logo span:nth-child(6) { color: #ff8a3d; animation-delay: .75s; }
.tagline { margin: 1.2vh 0 2.5vh; font-size: clamp(17px, 3.6vw, 26px); color: #fff; text-shadow: 0 2px 0 rgba(58, 42, 92, .35); text-align: center; }

.doors { display: flex; gap: clamp(16px, 4vw, 48px); width: 100%; max-width: 980px; justify-content: center; flex-wrap: wrap; }
.door {
  position: relative; flex: 1 1 320px; max-width: 440px; border-radius: 40px;
  padding: 18px 18px 22px; display: flex; flex-direction: column; align-items: center;
  border: 6px solid #fff; box-shadow: var(--shadow), 0 18px 40px rgba(58, 42, 92, .18);
  transition: transform .18s cubic-bezier(.3, 1.6, .5, 1);
}
.door-en { background: radial-gradient(circle at 50% 35%, #fff4c4, var(--en) 70%); }
.door-ko { background: radial-gradient(circle at 50% 35%, #ffe0ee, var(--ko) 70%); }
.door:hover { transform: translateY(-6px) rotate(-1deg); }
.door:active { transform: scale(.95); }
.door-chars { position: relative; width: 100%; height: clamp(150px, 26vw, 220px); }
.dc { position: absolute; bottom: 0; height: 78%; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .18)); animation: bob 2.2s ease-in-out infinite; }
.dc.m { left: 50%; height: 100%; translate: -50% 0; z-index: 2; animation-delay: -.6s; }
.dc.l { left: 4%; animation-delay: -1.1s; }
.dc.r { right: 4%; animation-delay: -.2s; }
.door-label {
  margin-top: 10px; display: flex; align-items: center; gap: 12px;
  background: #fff; border-radius: 999px; padding: 10px 12px 10px 20px; box-shadow: var(--shadow);
}
.door-label strong { font-size: clamp(28px, 5vw, 40px); font-weight: 400; }
.badge { font-size: 18px; padding: 4px 10px; border-radius: 12px; color: #fff; }
.door-en .badge { background: var(--en-dark); }
.door-ko .badge { background: var(--ko-dark); }
.play-dot {
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: var(--green); box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .18);
  animation: pulse 1.6s ease-in-out infinite;
}
.play-dot svg { width: 30px; height: 30px; fill: currentColor; margin-left: 3px; }

.parade {
  position: relative; width: 100%; height: clamp(110px, 16vh, 170px); margin-top: auto;
  overflow: hidden;
}
.parade img {
  position: absolute; bottom: 8px; height: 80%; cursor: pointer;
  filter: drop-shadow(0 6px 4px rgba(0, 0, 0, .2));
  animation: walk linear infinite;
}
.parade .hopping { animation-play-state: paused; }
@keyframes walk { from { left: 100%; } to { left: -220px; } }

.links { display: flex; gap: 8px 22px; flex-wrap: wrap; justify-content: center; padding: 10px 0 16px; font-family: "Fredoka", sans-serif; font-size: 14px; }
.links a { color: #1d5d2b; background: rgba(255, 255, 255, .7); padding: 6px 12px; border-radius: 999px; }

/* ── 재생 화면 ── */
#theater { display: flex; flex-direction: column; align-items: center; min-height: 100dvh; padding: 12px 16px 24px; gap: 14px; }
.bar { width: 100%; max-width: 1100px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.round {
  display: grid; place-items: center; border-radius: 50%; color: #fff; flex: none;
  box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .18), var(--shadow);
  transition: transform .15s cubic-bezier(.3, 1.6, .5, 1);
}
.round:active { transform: scale(.88); }
.round svg { fill: currentColor; width: 52%; height: 52%; }
.home-btn { width: 64px; height: 64px; background: var(--orange); border: 4px solid #fff; }

.lang-switch { display: flex; background: rgba(255, 255, 255, .85); border-radius: 999px; padding: 5px; box-shadow: var(--shadow); }
.lang-switch a { padding: 10px 16px; border-radius: 999px; font-size: clamp(15px, 3.4vw, 20px); white-space: nowrap; }
.lang-switch a.on[data-lang="en"] { background: var(--en); }
.lang-switch a.on[data-lang="ko"] { background: var(--ko); color: #fff; }

.stage { position: relative; width: 100%; max-width: 1100px; display: flex; align-items: flex-end; justify-content: center; }
.tv {
  position: relative; width: min(100%, 880px);
  background: #fff; padding: clamp(8px, 1.4vw, 16px); border-radius: clamp(22px, 3vw, 36px);
  box-shadow: 0 10px 0 rgba(58, 42, 92, .25), 0 24px 50px rgba(58, 42, 92, .25);
}
.theater-en .tv { background: linear-gradient(135deg, #ffe37a, var(--en)); }
.theater-ko .tv { background: linear-gradient(135deg, #ffb3d1, var(--ko)); }
.tv-screen { position: relative; aspect-ratio: 16 / 9; border-radius: clamp(14px, 2vw, 24px); overflow: hidden; background: #1b1530; }
.tv-screen iframe, .tv-screen #player { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.tv-msg {
  position: absolute; inset: clamp(8px, 1.4vw, 16px); display: grid; place-items: center; text-align: center;
  border-radius: clamp(14px, 2vw, 24px); background: rgba(27, 21, 48, .85); color: #fff; font-size: 22px; padding: 20px;
}

.dancer {
  width: clamp(90px, 13vw, 190px); align-self: flex-end; margin: 0 -10px;
  filter: drop-shadow(0 8px 6px rgba(0, 0, 0, .2)); cursor: pointer; z-index: 1;
  animation: dance 1.2s ease-in-out infinite; animation-play-state: paused;
}
.dancer.right { animation-delay: -.6s; }
.playing .dancer { animation-play-state: running; }
.dancer.wiggle { animation: wiggle .5s ease-in-out 2; }

.controls { display: flex; align-items: center; justify-content: center; gap: clamp(10px, 3vw, 22px); flex-wrap: wrap; }
.big { width: 76px; height: 76px; }
.huge { width: 100px; height: 100px; }
.mid { width: 60px; height: 60px; }
.c-prev, .c-next { background: var(--blue); }
.c-play { background: var(--green); }
.c-shuffle { background: var(--purple); opacity: .55; }
.c-shuffle[aria-pressed="true"] { opacity: 1; outline: 5px solid #fff; }
.c-full { background: var(--orange); }
.c-play .i-pause { display: none; }
.playing .c-play .i-play { display: none; }
.playing .c-play .i-pause { display: block; }
.c-play svg { margin-left: 4px; }
.playing .c-play svg { margin-left: 0; }

.shelf-wrap { width: 100%; max-width: 1100px; }
.shelf {
  display: flex; gap: 12px; overflow-x: auto; padding: 8px 4px 14px; scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}
.shelf button {
  flex: none; width: clamp(130px, 22vw, 190px); aspect-ratio: 16 / 9; border-radius: 18px; padding: 0;
  background: #fff center / cover no-repeat; border: 5px solid #fff; box-shadow: var(--shadow);
  scroll-snap-align: start; position: relative; transition: transform .15s;
}
.shelf button:active { transform: scale(.94); }
.shelf button.on { border-color: var(--green); transform: translateY(-4px); }
.shelf button.on::after {
  content: "♪"; position: absolute; top: -12px; right: -10px; width: 34px; height: 34px; border-radius: 50%;
  background: var(--green); color: #fff; display: grid; place-items: center; font-size: 20px;
}

@media (max-width: 760px) {
  .dancer { position: absolute; bottom: -26px; width: 84px; z-index: 3; margin: 0; }
  .dancer.left { left: -6px; }
  .dancer.right { right: -6px; }
  .stage { margin-bottom: 20px; }
  .controls { gap: 10px; flex-wrap: nowrap; }
  .huge { width: 76px; height: 76px; }
  .big { width: 58px; height: 58px; }
  .mid { width: 46px; height: 46px; }
  .sun { width: 70px; height: 70px; top: 2vh; right: 3vw; box-shadow: 0 0 0 10px rgba(255, 220, 80, .25); }
  .home-btn { width: 56px; height: 56px; }
}
@media (max-height: 520px) and (orientation: landscape) {
  #theater { gap: 8px; padding-top: 8px; }
  .tv { width: min(100%, 70vh * 16 / 9); }
  .shelf-wrap { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0s !important; animation-iteration-count: 1 !important; }
}
@media (prefers-reduced-motion: reduce) {
  .parade { display: flex; justify-content: center; gap: 8px; }
  .parade img { position: static; height: 80%; }
  .cloud { display: none; }
}

/* ── 소개·노래 목록 (10-25 GEO — AI 검색이 읽는 글자, tools/build_seo.py 가 채움) ── */
.about { width: 100%; max-width: 980px; margin: 8px auto 32px; padding: 22px clamp(16px, 4vw, 32px); background: rgba(255, 255, 255, .82);
  border-radius: 28px; box-shadow: var(--shadow); color: #3a2a5c; line-height: 1.6; }
.about h2 { margin: 0 0 8px; font-family: "Fredoka", var(--font); font-size: clamp(20px, 3.2vw, 26px); }
.about p { margin: 0 0 10px; font-size: 15px; }
.songlists { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 8px 28px; margin-top: 10px; }
.songlist h3 { margin: 8px 0 6px; font-size: 17px; }
.songlist h3 a { font-size: 13px; font-weight: 400; color: #1d5d2b; margin-left: 6px; }
.songlist ol { margin: 0; padding-left: 22px; font-size: 15px; }
.songlist li { margin: 3px 0; }
.songlist li a { color: inherit; }
.songlist small { color: #7a6c96; font-size: 12px; }

/* Yepppy 글자 끝의 비버 — 한 글자처럼 (10-25 사용자: "영역을 너무 많이 차지하네") */
.logo { align-items: flex-end; }
.logo-pal { height: 1.08em; width: auto; margin-left: .04em; margin-bottom: -.02em;
  filter: drop-shadow(0 .05em 0 rgba(58, 42, 92, .35)); animation: bob 2.4s ease-in-out infinite; animation-delay: .9s; }

/* /songs 노래 목록 페이지 (10-25 — 메인에서 옮김, 영어 먼저·버튼으로 한국어) */
.songs-page { min-height: 100dvh; padding: 16px; }
.songs-page .about { margin-top: 16px; }
.songs-nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.songs-nav a.home { font-family: "Fredoka", var(--font); font-weight: 700; font-size: 18px; color: #3a2a5c; text-decoration: none; }
.songs-nav button { background: #ff5d8f; color: #fff; padding: 8px 18px; border-radius: 999px; font-weight: 700; box-shadow: var(--shadow); }
.pane h1 { margin: 4px 0 8px; font-family: "Fredoka", var(--font); font-size: clamp(24px, 4vw, 34px); }
.pane p { margin: 0 0 10px; font-size: 15px; }
.pane h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 19px; margin: 18px 0 8px; }
.pane h2 .pill { font-size: 13px; background: #4cd17a; color: #fff; padding: 4px 12px; border-radius: 999px; text-decoration: none; }
.pane h2 .yt { font-size: 13px; font-weight: 400; color: #1d5d2b; }
.pane ol { margin: 0; padding-left: 24px; line-height: 1.8; font-size: 15px; }
.pane li a { color: inherit; }
.pane small { color: #7a6c96; font-size: 12px; }
