:root {
  --ink: #1d120b;
  --ink-2: #2e1f13;
  --sepia: #6b5a35;
  --cream: #f1e5c9;
  --gold: #a8913e;
  --gold-soft: #cdb876;
  --paper: #dccfae;
  --paper-2: #d3c59f;
  --navy: #1b2340;
  --olive: #55602b;
  --peach: #e9b48a;
  --peach-line: #dd9477;
  --serif: "Noto Serif KR", "Apple SD Gothic Neo", serif;
  --sans: "IBM Plex Sans KR", "Apple SD Gothic Neo", sans-serif;
  --poster: "Anton", "Impact", sans-serif;
  --pad: clamp(20px, 5.5vw, 56px);
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--ink);
  color: var(--cream);
  font-family: var(--sans);
  line-height: 1.6;
  overflow-x: hidden;
}
body.locked { overflow: hidden; height: 100svh; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--peach); outline-offset: 3px; }

/* ───────── 입장 막 ───────── */
.gate { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; }
.gate-half {
  position: absolute; top: 0; bottom: 0; width: 50.5%;
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,.28) 0 2px, transparent 2px 26px),
    linear-gradient(180deg, #2a1a0f, #140c07);
  transition: transform 1.1s cubic-bezier(.7,0,.2,1);
}
.gate-l { left: 0; }
.gate-r { right: 0; }
.gate-inner { position: relative; text-align: center; transition: opacity .35s, transform .35s; }
.gate-club { font-family: var(--poster); font-size: 2.6rem; letter-spacing: .32em; margin-right: -.32em; }
.gate-sub { color: var(--gold-soft); letter-spacing: .3em; margin-right: -.3em; font-size: .9rem; }
.gate-btn {
  position: relative; display: grid; place-items: center;
  width: 168px; height: 168px; margin: 44px auto 20px; border-radius: 50%;
  border: 1px solid var(--cream);
  font-family: var(--serif); font-weight: 700; font-size: 1.2rem; letter-spacing: .12em;
}
.gate-btn-ring {
  position: absolute; inset: -14px; border-radius: 50%;
  border: 2px dotted var(--peach-line);
  animation: spin 14s linear infinite;
}
.gate-btn::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 1px solid var(--cream); opacity: 0;
  animation: pulse 2.2s ease-out infinite;
}
.gate-btn:active { transform: scale(.96); }
.gate-note { font-size: .8rem; color: var(--gold-soft); }
.gate-quiet { margin-top: 14px; padding: 10px 14px; font-size: .8rem; color: rgba(241,229,201,.6); text-decoration: underline; text-underline-offset: 4px; }
.gate.open .gate-l { transform: translateX(-101%); }
.gate.open .gate-r { transform: translateX(101%); }
.gate.open .gate-inner { opacity: 0; transform: scale(1.15); }
.gate.gone { display: none; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(1.6); opacity: 0; } }

/* ───────── 첫 화면 ───────── */
.hero {
  position: relative; min-height: 100svh; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column;
  padding: calc(var(--pad) + 14px) var(--pad) calc(var(--pad) + 8px);
  background:
    radial-gradient(90% 55% at 50% 52%, rgba(205,184,118,.34), transparent 70%),
    radial-gradient(120% 60% at 50% 110%, #0e0805 30%, transparent 75%),
    linear-gradient(180deg, #2b1c10 0%, #4a3b20 45%, #1a100a 100%);
}
/* 흐린 사진 배경: 두 장이 번갈아 천천히 겹쳐 바뀜 */
.photos { position: absolute; inset: 0; z-index: -3; overflow: hidden; pointer-events: none; }
.photos i {
  position: absolute; inset: -6%;
  background: center / cover no-repeat;
  filter: blur(5px) grayscale(.5) sepia(.7) brightness(.7);
  opacity: 0; transition: opacity 2.6s ease;
}
.photos i.on { opacity: .2; animation: drift 14s linear forwards; }
@keyframes drift { from { transform: scale(1.02) translate(0, 0); } to { transform: scale(1.12) translate(-1.5%, -1%); } }
.vortex { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.scan {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.2) 0 1px, transparent 1px 4px);
  mix-blend-mode: multiply;
}
.frame { position: absolute; inset: 12px; border: 1px solid rgba(205,184,118,.35); pointer-events: none; }

.bolt { position: absolute; top: 0; width: 26vw; max-width: 170px; z-index: -1; opacity: 0; fill: none; stroke: var(--gold-soft); stroke-width: 1.6; stroke-linejoin: round; filter: drop-shadow(0 0 6px rgba(241,229,201,.8)); }
.bolt-a { left: 2%; }
.bolt-b { right: 3%; }
.bolt.flash { animation: flash .55s steps(1, end); }
@keyframes flash { 0% { opacity: 1; } 12% { opacity: 0; } 22% { opacity: .9; } 40% { opacity: .15; } 55% { opacity: .7; } 100% { opacity: 0; } }
.hero.struck { animation: struck .55s; }
@keyframes struck { 0%, 22% { filter: brightness(1.35); } 12%, 100% { filter: none; } }

.hero-top { display: flex; justify-content: space-between; align-items: baseline; }
.club { font-family: var(--poster); font-size: clamp(1.4rem, 5.4vw, 2.4rem); letter-spacing: .28em; }
.year { color: var(--gold-soft); letter-spacing: .22em; font-size: clamp(.75rem, 3vw, 1.05rem); }

.title {
  display: flex; justify-content: space-between; gap: 1vw;
  margin: clamp(18px, 5vh, 56px) -1vw 0;
  font-family: var(--serif); font-weight: 900; line-height: 1;
  font-size: min(22.5vw, 15rem);
}
.ch { position: relative; display: inline-block; }
.han {
  display: inline-block; opacity: 0;
  transform: translateY(-60%) rotate(-14deg) scale(1.5); filter: blur(10px);
  text-shadow: 0 0 40px rgba(241,229,201,.25);
}
.kor {
  position: absolute; right: -.02em; bottom: -.06em;
  width: 1.9em; height: 1.9em; display: grid; place-items: center;
  font-family: var(--sans); font-weight: 500; font-size: .15em; line-height: 1;
  color: var(--cream); background: var(--ink); border: 1px solid var(--gold-soft); border-radius: 50%;
  transform: scale(0);
}
.entered .han { animation: drop .9s cubic-bezier(.2,.9,.25,1.15) forwards; animation-delay: calc(.55s + var(--i) * .16s); }
.entered .kor { animation: pop .45s cubic-bezier(.3,1.8,.5,1) forwards; animation-delay: calc(1.3s + var(--i) * .16s); }
@keyframes drop { to { opacity: 1; transform: none; filter: none; } }
@keyframes pop { to { transform: scale(1); } }

.emblem {
  position: relative; flex: 1; min-height: 240px;
  display: grid; place-items: center; margin: 3vh 0;
  opacity: 0; transform: scale(.6);
}
.entered .emblem { animation: emblemIn 1.4s cubic-bezier(.2,.8,.2,1) 1.6s forwards; }
@keyframes emblemIn { to { opacity: 1; transform: none; } }
.emblem svg { grid-area: 1 / 1; }
.emblem-ring { width: min(72vw, 46vh, 400px); animation: spin 36s linear infinite; }
.playing .emblem-ring { animation-duration: 16s; }
.emblem-line { fill: none; stroke: rgba(241,229,201,.55); stroke-width: 1; }
.emblem-dots { fill: none; stroke: var(--peach-line); stroke-width: 1.5; stroke-dasharray: 1 7; stroke-linecap: round; }
.emblem-text { fill: var(--cream); font-family: var(--poster); font-size: 15.5px; letter-spacing: 4.3px; }
.emblem-mark { width: min(30vw, 19vh, 168px); fill: var(--cream); filter: drop-shadow(0 0 24px rgba(241,229,201,.3)); }
.playing .emblem-mark { animation: thump .5s ease-out infinite; }
@keyframes thump { 0% { transform: scale(1.06); } 100% { transform: scale(1); } }

.hero-bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; opacity: 0; }
.entered .hero-bottom { animation: fade 1s 2.2s forwards; }
@keyframes fade { to { opacity: 1; } }
.when-label { color: var(--gold-soft); letter-spacing: .2em; font-size: clamp(.6rem, 2.5vw, .85rem); text-transform: none; }
.when-date { font-family: var(--poster); line-height: .95; display: flex; align-items: baseline; flex-wrap: wrap; column-gap: .6rem; }
.date { font-size: clamp(3.6rem, 19vw, 8rem); letter-spacing: -.01em; }
.day { font-size: clamp(1.2rem, 5vw, 2rem); letter-spacing: .08em; }
.time { font-size: clamp(1.1rem, 4.6vw, 1.8rem); letter-spacing: .08em; }
.where { text-align: right; font-size: clamp(.78rem, 3.1vw, 1rem); color: var(--gold-soft); padding-bottom: .5rem; }
.where p:first-child { letter-spacing: .3em; margin-right: -.3em; }
.where-place span { display: block; font-size: .85em; opacity: .8; }

.countdown {
  margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(205,184,118,.35);
  display: flex; gap: clamp(14px, 5vw, 36px); align-items: baseline;
  font-family: var(--poster); opacity: 0;
}
.entered .countdown { animation: fade 1s 2.5s forwards; }
.countdown b { font-weight: 400; font-size: clamp(1.7rem, 8vw, 2.8rem); font-variant-numeric: tabular-nums; display: inline-block; }
.countdown b.tick { animation: tick .35s ease-out; }
@keyframes tick { 0% { transform: translateY(-.25em); opacity: .3; } 100% { transform: none; opacity: 1; } }
.countdown span { font-family: var(--sans); font-size: .75rem; color: var(--gold-soft); margin-left: 4px; }
.countdown .live { font-family: var(--serif); font-weight: 700; font-size: clamp(1.1rem, 5vw, 1.6rem); }

.scroll-cue {
  display: block; width: max-content; margin: 18px auto 0; padding: 8px 4px 20px;
  font-size: .8rem; letter-spacing: .12em; color: var(--gold-soft); text-decoration: none;
  position: relative; opacity: 0;
}
.entered .scroll-cue { animation: fade 1s 3s forwards; }
.scroll-cue::after {
  content: ""; position: absolute; left: 50%; bottom: 2px; width: 9px; height: 9px;
  border-right: 1.5px solid; border-bottom: 1.5px solid;
  transform: translateX(-50%) rotate(45deg); animation: nudge 1.4s ease-in-out infinite;
}
@keyframes nudge { 50% { transform: translate(-50%, 5px) rotate(45deg); } }

/* ───────── 종이 영역 ───────── */
.paper {
  position: relative; overflow: hidden; color: var(--navy);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .28 0 0 0 0 .12 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E"),
    radial-gradient(60% 30% at 20% 12%, rgba(255,255,255,.22), transparent),
    radial-gradient(50% 25% at 85% 60%, rgba(107,90,53,.16), transparent),
    linear-gradient(180deg, var(--paper), var(--paper-2));
  padding: clamp(56px, 12vw, 120px) var(--pad) 150px;
}
.star { position: absolute; z-index: 0; fill: var(--peach); stroke: var(--peach-line); stroke-width: 2; opacity: .8; will-change: transform; }
.star-a { width: min(90vw, 620px); right: -28vw; top: 34%; }
.star-b { width: min(64vw, 420px); left: -30vw; top: 68%; }
.paper > section, .foot { position: relative; z-index: 1; max-width: 760px; margin-inline: auto; }

.about { display: grid; gap: 36px; }
.poster { position: relative; width: min(74%, 330px); margin-inline: auto; transform: rotate(-2.2deg); }
.poster img { display: block; width: 100%; height: auto; box-shadow: 0 18px 40px -14px rgba(29,18,11,.7); }
.tape {
  position: absolute; z-index: 1; top: -14px; left: 50%; width: 96px; height: 28px;
  transform: translateX(-50%) rotate(3deg);
  background: rgba(233,180,138,.85);
  clip-path: polygon(0 12%, 4% 0, 8% 14%, 12% 0, 16% 12%, 100% 0, 100% 88%, 96% 100%, 92% 86%, 88% 100%, 84% 88%, 0 100%);
}
.poster.sway { animation: sway 5s ease-in-out infinite; transform-origin: 50% -10px; }
@keyframes sway { 0%, 100% { transform: rotate(-2.2deg); } 50% { transform: rotate(1.2deg); } }
.about h2, .setlist-head h2 { font-family: var(--serif); font-weight: 900; letter-spacing: .12em; line-height: 1.2; }
.about h2 { font-size: clamp(1.7rem, 7vw, 2.4rem); margin-bottom: 14px; }
.about h2 span { font-size: .55em; font-weight: 500; color: var(--olive); letter-spacing: .2em; margin-left: .3em; }
.about-text p { font-family: var(--serif); font-weight: 500; font-size: 1.02rem; line-height: 2; margin-bottom: 1em; word-break: keep-all; }
.facts { margin-top: 26px; display: grid; gap: 14px; }
.facts dt { font-family: var(--serif); font-weight: 700; color: var(--olive); letter-spacing: .5em; font-size: .85rem; }
.facts dd { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 1.1rem; }

.setlist { margin-top: clamp(80px, 18vw, 140px); }
.setlist-head { text-align: center; margin-bottom: 30px; }
.setlist-eyebrow { color: var(--olive); letter-spacing: .5em; margin-right: -.5em; font-weight: 500; font-size: .9rem; text-transform: uppercase; }
.setlist-head h2 { font-size: clamp(2.3rem, 11vw, 3.6rem); }
.setlist-hint { margin-top: 6px; font-size: .78rem; color: var(--sepia); }

.group { margin-top: 34px; }
.group h3 {
  font-family: var(--serif); font-weight: 700; font-size: .92rem; letter-spacing: .32em; color: var(--olive);
  padding-bottom: 8px; border-bottom: 1.5px solid var(--olive);
}
.group ol { list-style: none; padding: 0; }
.song {
  position: relative; display: grid; grid-template-columns: 2.4rem 1fr auto; align-items: baseline; column-gap: 8px;
  padding: 15px 2px 16px; cursor: pointer; -webkit-tap-highlight-color: transparent; user-select: none;
  opacity: 0; transform: translateX(-18px);
  transition: opacity .6s, transform .6s cubic-bezier(.2,.8,.2,1);
  transition-delay: calc(var(--n) * 70ms);
}
.group.seen .song { opacity: 1; transform: none; }
.song-no { font-weight: 500; color: var(--olive); font-size: .92rem; font-variant-numeric: tabular-nums; }
.song-title { font-family: var(--serif); font-weight: 700; font-size: clamp(1.02rem, 4.5vw, 1.3rem); line-height: 1.35; word-break: keep-all; }
.song-artist { font-size: clamp(.72rem, 3vw, .9rem); color: #3c4258; text-align: right; max-width: 42vw; word-break: keep-all; }
.string { position: absolute; left: 0; bottom: -7px; width: 100%; height: 14px; overflow: visible; pointer-events: none; }
.string path { fill: none; stroke: rgba(27,35,64,.32); stroke-width: 1; vector-effect: non-scaling-stroke; }
.song.ringing .string path { stroke: var(--navy); }
.song.ringing .song-title { animation: buzz .32s linear; }
@keyframes buzz { 20% { transform: translateY(-1px); } 40% { transform: translateY(1px); } 60% { transform: translateY(-.5px); } 80% { transform: translateY(.5px); } }

.song.now .song-no { color: transparent; position: relative; }
.song.now .song-no::before {
  content: ""; position: absolute; left: 0; bottom: 2px; width: 18px; height: 14px;
  background:
    linear-gradient(var(--peach-line) 0 0) 0 100% / 3px var(--a, 60%) no-repeat,
    linear-gradient(var(--peach-line) 0 0) 5px 100% / 3px var(--b, 100%) no-repeat,
    linear-gradient(var(--peach-line) 0 0) 10px 100% / 3px var(--c, 40%) no-repeat,
    linear-gradient(var(--peach-line) 0 0) 15px 100% / 3px var(--d, 80%) no-repeat;
  animation: eqbg .9s steps(4) infinite;
}
@keyframes eqbg {
  0% { --a: 60%; --b: 100%; --c: 40%; --d: 80%; }
  25% { --a: 100%; --b: 50%; --c: 80%; --d: 30%; }
  50% { --a: 40%; --b: 80%; --c: 100%; --d: 60%; }
  75% { --a: 80%; --b: 30%; --c: 60%; --d: 100%; }
}
@property --a { syntax: "<percentage>"; inherits: false; initial-value: 60%; }
@property --b { syntax: "<percentage>"; inherits: false; initial-value: 100%; }
@property --c { syntax: "<percentage>"; inherits: false; initial-value: 40%; }
@property --d { syntax: "<percentage>"; inherits: false; initial-value: 80%; }

.foot { margin-top: 110px; text-align: center; }
.foot-mark { width: 44px; fill: var(--navy); animation: spinY 7s linear infinite; }
@keyframes spinY { to { transform: rotateY(360deg); } }
.foot-club { margin-top: 12px; font-family: var(--serif); font-weight: 700; letter-spacing: .14em; }
.foot-insta { display: inline-block; margin-top: 6px; padding: 8px; font-weight: 500; text-underline-offset: 4px; }

/* ───────── BGM 도크 ───────── */
.dock {
  position: fixed; z-index: 40; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
  max-width: 420px; margin-inline: auto;
  background: rgba(29,18,11,.94); color: var(--cream);
  border: 1px solid rgba(205,184,118,.5); border-radius: 14px;
  box-shadow: 0 12px 30px -10px rgba(0,0,0,.7);
  backdrop-filter: blur(6px);
  transform: translateY(140%); transition: transform .7s cubic-bezier(.2,.9,.2,1);
  overflow: hidden;
}
.dock.show { transform: none; }
.dock-video { height: 0; overflow: hidden; transition: height .4s ease; background: #000; }
.dock.expanded .dock-video { height: calc(min(100vw - 24px, 420px) * .5625); }
.dock-video iframe { width: 100%; height: calc(min(100vw - 24px, 420px) * .5625); display: block; border: 0; }
.dock-bar { display: flex; align-items: center; gap: 12px; padding: 9px 12px; }
.dock-toggle { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--gold-soft); display: grid; place-items: center; }
.eq { display: flex; align-items: flex-end; gap: 3px; height: 16px; }
.eq i { width: 3px; height: 4px; background: var(--cream); border-radius: 1px; }
.playing .eq i { animation: eq .8s ease-in-out infinite alternate; }
.eq i:nth-child(1) { animation-delay: -.2s; } .eq i:nth-child(2) { animation-delay: -.55s; }
.eq i:nth-child(3) { animation-delay: -.1s; } .eq i:nth-child(4) { animation-delay: -.4s; }
@keyframes eq { 0% { height: 3px; } 100% { height: 16px; } }
.dock-meta { flex: 1; min-width: 0; line-height: 1.3; }
.dock-title { font-family: var(--serif); font-weight: 700; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dock-next { flex: none; width: 40px; height: 44px; display: grid; place-items: center; }
.dock-next svg { width: 20px; height: 20px; fill: var(--cream); }
.dock-next:active svg { transform: translateX(3px); }
.dock-artist { font-size: .74rem; color: var(--gold-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dock-expand { flex: none; padding: 10px 12px; font-size: .78rem; color: var(--gold-soft); border: 1px solid rgba(205,184,118,.4); border-radius: 999px; }

/* 좁은 폰: 아티스트를 제목 아래 줄로 내려 제목이 쪼개지지 않게 */
@media (max-width: 479px) {
  .song { grid-template-columns: 2.2rem 1fr; row-gap: 2px; padding: 13px 2px 14px; }
  .song-artist { grid-column: 2; text-align: left; max-width: none; }
  .hero { padding-bottom: calc(var(--pad) + 76px); }
  .hero-bottom { flex-direction: column; align-items: flex-start; gap: 8px; }
  .where { text-align: left; padding-bottom: 0; white-space: nowrap; }
  .where p:first-child { letter-spacing: .2em; }
  .where-place span { display: inline; }
  .foot-club { letter-spacing: .04em; }
}

@media (min-width: 760px) {
  .about { grid-template-columns: 330px 1fr; align-items: center; gap: 56px; }
  .poster { width: 100%; }
  .song { grid-template-columns: 3.4rem 1fr auto; }
  .song-artist { max-width: none; }
  .title { justify-content: center; gap: 2vw; font-size: min(17vw, 26vh, 15rem); }
  .dock { left: auto; right: 20px; margin: 0; width: 360px; }
  .dock.expanded .dock-video, .dock-video iframe { height: 202px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
  .han, .kor, .emblem, .hero-bottom, .countdown, .scroll-cue { opacity: 1; transform: none; filter: none; }
  .song { opacity: 1; transform: none; }
}
