/* ================= GATE ================= */
.gate { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; overflow-y: auto; }
.gate-card { width: min(460px, 100%); padding: 36px 30px; text-align: center; backdrop-filter: blur(12px); }
.gate-star { font-size: 34px; color: var(--gold); text-shadow: 0 0 30px rgba(242,196,109,.8); margin-bottom: 10px; animation: twinkle 3s ease-in-out infinite; }
.gate h2 { font-size: 32px; margin-bottom: 12px; }
.gate-msg { background: rgba(210,60,69,.15); border: 1px solid rgba(210,60,69,.4); padding: 10px 14px; border-radius: 12px; font-size: 14px; }
.gate-msg.ok { background: rgba(80,200,140,.12); border-color: rgba(80,200,140,.4); }
.gate-alt { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 18px; display: grid; gap: 16px; text-align: left; }
.gate-alt label { font-size: 13px; color: var(--muted); display: block; margin-bottom: 6px; }
.row { display: flex; gap: 8px; }
.row input, .field {
  flex: 1; min-width: 0; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: rgba(0,0,0,.25); color: var(--ink); font: inherit; font-size: 15px;
}
.row input:focus, .field:focus { outline: none; border-color: var(--gold); }
.back-link { display: inline-block; margin-top: 20px; font-size: 14px; color: var(--dim); }
.spinner { width: 34px; height: 34px; margin: 20px auto 0; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--gold); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes twinkle { 50% { opacity: .55; transform: scale(.9); } }

/* ================= TABS ================= */
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tabs a { text-decoration: none; padding: 8px 14px; border-radius: 99px; font-size: 14px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { background: rgba(255,255,255,.1); color: var(--ink); }

.view { display: none; padding: 40px 0 160px; min-height: calc(100svh - 64px); }
.view.on { display: block; animation: viewIn .7s ease both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(12px); } }

.vhead { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; margin-bottom: 32px; }
.vhead h2 { font-size: clamp(32px, 5vw, 52px); margin: 8px 0 8px; }
.vhead p { margin: 0; }

/* ================= INTRO ================= */
.intro { text-align: center; padding-top: 6vh; max-width: 720px; }
.intro h1 { font-size: clamp(42px, 7vw, 80px); margin: 16px 0 20px; }
.intro .lead { color: var(--muted); font-size: 19px; max-width: 52ch; margin: 0 auto; }
.intro .hint { color: var(--dim); font-size: 14px; margin-top: 10px; }
.intro-alt { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 40px; }

.candle { position: relative; width: 90px; height: 170px; margin: 44px auto 0; display: block; background: none; border: 0; }
.candle .wax { position: absolute; bottom: 0; left: 25px; width: 40px; height: 100px; border-radius: 6px 6px 4px 4px; background: linear-gradient(90deg, #e9dcc4, #fff8ea 45%, #d7c6a6); box-shadow: inset 0 -10px 20px rgba(0,0,0,.15); }
.candle .wick { position: absolute; bottom: 100px; left: 44px; width: 2px; height: 12px; background: #2b2118; border-radius: 2px; }
.candle .flame {
  position: absolute; bottom: 108px; left: 33px; width: 24px; height: 44px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: radial-gradient(ellipse at 50% 80%, #fff 0 15%, #ffe39a 30%, #ff9d2e 60%, transparent 70%);
  opacity: 0; transform: scale(.3); transform-origin: 50% 100%; transition: opacity .6s, transform .8s cubic-bezier(.2,1.6,.4,1);
}
.candle::after { content: ""; position: absolute; left: 50%; bottom: 120px; width: 0; height: 0; border-radius: 50%; translate: -50% 50%; box-shadow: 0 0 0 0 rgba(255,190,90,0); transition: box-shadow 1.2s; }
.candle:hover .wax { filter: brightness(1.05); }
.candle:not(.lit) .wick { animation: twinkle 2s ease-in-out infinite; }
.candle.lit .flame { opacity: 1; transform: scale(1); animation: flicker 2.4s ease-in-out infinite .8s; }
.candle.lit::after { box-shadow: 0 0 120px 70px rgba(255,190,90,.28); }
@keyframes flicker { 25% { transform: scale(1.02, .96) rotate(-2deg); } 50% { transform: scale(.97, 1.04) rotate(1.5deg); } 75% { transform: scale(1.03, .98) rotate(-1deg); } }

/* ================= CONSTELLATION ================= */
.constellation { display: flex; align-items: center; justify-content: center; gap: 0; margin: 0 auto 36px; max-width: 560px; }
.constellation button { background: none; border: 0; padding: 6px; color: rgba(255,255,255,.22); display: grid; place-items: center; position: relative; flex: none; }
.constellation button svg { width: 22px; height: 22px; transition: color .6s, filter .6s, transform .4s; }
.constellation button.done { color: var(--gold); }
.constellation button.done svg { filter: drop-shadow(0 0 8px rgba(242,196,109,.9)); }
.constellation button.cur svg { transform: scale(1.35); color: var(--ink); filter: drop-shadow(0 0 10px rgba(255,255,255,.7)); }
.constellation button span { position: absolute; top: 100%; font-size: 10px; letter-spacing: .15em; color: var(--dim); font-weight: 700; }
.constellation i { flex: 1; height: 1px; background: rgba(255,255,255,.14); min-width: 12px; }
.constellation i.done { background: linear-gradient(90deg, var(--gold), rgba(242,196,109,.4)); }

/* ================= STATION ================= */
.station { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: start; }
.station.enter .st-anim { animation: rise 1s cubic-bezier(.2,.8,.2,1) both; }
.station.enter .st-anim:nth-child(2) { animation-delay: .12s; }
.station.enter .st-anim:nth-child(3) { animation-delay: .24s; }
.station.enter .st-anim:nth-child(4) { animation-delay: .36s; }
.station.enter .st-anim:nth-child(5) { animation-delay: .48s; }
@keyframes rise { from { opacity: 0; transform: translateY(26px); filter: blur(6px); } }

.st-label { color: var(--accent); font-size: 12px; letter-spacing: .28em; text-transform: uppercase; font-weight: 800; }
.st-title { font-size: clamp(40px, 6vw, 72px); margin: 10px 0 6px; }
.st-feat { color: var(--muted); font-size: 15px; margin-bottom: 18px; }
.st-reflection { font-family: var(--serif); font-size: clamp(19px, 2vw, 22px); line-height: 1.55; color: #e9e3d6; font-weight: 400; }

.media { position: relative; margin: 26px 0 22px; }
.art { position: relative; width: min(340px, 78%); aspect-ratio: 1; margin: 10px auto 6px; }
.art img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; position: relative; z-index: 2; box-shadow: 0 30px 80px -20px rgba(0,0,0,.8); transition: border-radius 1s, transform 1s; }
.art::before { content: ""; position: absolute; inset: -14%; border-radius: 50%; background: radial-gradient(circle, rgba(var(--glow), .5), transparent 62%); filter: blur(20px); opacity: .7; transition: opacity 1s; z-index: 1; }
.art::after { content: ""; position: absolute; inset: 42%; border-radius: 50%; background: var(--night); z-index: 3; box-shadow: 0 0 0 6px rgba(255,255,255,.08); transition: opacity .6s; }
.art.playing img { animation: spinv 24s linear infinite; }
.art.playing::before { opacity: 1; animation: breathe 4s ease-in-out infinite; }
@keyframes spinv { to { transform: rotate(360deg); } }
@keyframes breathe { 50% { transform: scale(1.08); } }
.art-play { position: absolute; z-index: 4; left: 50%; top: 50%; translate: -50% -50%; width: 64px; height: 64px; }
.art-play svg { width: 24px; height: 24px; }

.vwrap { border-radius: 16px; overflow: hidden; background: #000; box-shadow: 0 30px 80px -20px rgba(0,0,0,.8), 0 0 60px -10px rgba(var(--glow), .45); }
.vwrap video { width: 100%; aspect-ratio: 16/9; background: #000; }
.media-switch { display: flex; gap: 8px; justify-content: center; margin-top: 14px; }

.moment { padding: 22px 24px; margin-top: 20px; border-color: rgba(var(--glow), .35); background: linear-gradient(180deg, rgba(var(--glow), .10), rgba(255,255,255,.02)); }
.moment .k { font-size: 11px; letter-spacing: .26em; text-transform: uppercase; font-weight: 800; color: var(--accent); margin-bottom: 6px; }
.moment p { margin: 0; font-size: 16px; }
.moment .field { width: 100%; margin-top: 14px; font-family: var(--serif); font-size: 20px; }
.moment .saved { font-size: 13px; color: var(--gold-2); margin-top: 8px; min-height: 1em; }
.pledges { display: grid; gap: 8px; margin-top: 14px; }
.pledges label { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); cursor: pointer; font-size: 15px; transition: background .2s, border-color .2s; }
.pledges label:hover { background: rgba(255,255,255,.05); }
.pledges input { accent-color: var(--gold); width: 18px; height: 18px; }
.pledges label:has(input:checked) { border-color: var(--gold); background: rgba(242,196,109,.12); }
.breath { display: flex; align-items: center; gap: 18px; margin-top: 14px; }
.breath .orb { width: 54px; height: 54px; border-radius: 50%; background: radial-gradient(circle, #fff, rgba(var(--glow), .8) 40%, rgba(var(--glow), 0) 72%); transform: scale(.5); flex: none; }
.breath .orb.go { animation: inhale 8s ease-in-out 3; }
@keyframes inhale { 0%,100% { transform: scale(.5); } 50% { transform: scale(1.25); } }
.breath .btxt { font-family: var(--serif); font-size: 19px; }

.st-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
.st-nav .next.pulse { animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 10px rgba(242,196,109,0), 0 10px 40px -6px rgba(242,196,109,.9); } 0% { box-shadow: 0 0 0 0 rgba(242,196,109,.6); } }

.lyrics { position: sticky; top: 88px; max-height: calc(100svh - 200px); overflow: auto; padding: 28px 30px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.2) transparent; }
.lyrics h4 { margin: 0 0 16px; font-size: 11px; letter-spacing: .28em; text-transform: uppercase; color: var(--dim); }
.lyrics .body { font-family: var(--serif); font-size: 19px; line-height: 1.6; }
.lyrics .body p { margin: 0 0 22px; }
.lyrics .tag { display: inline-block; font-family: var(--sans); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); font-weight: 800; margin-bottom: 2px; }
.lyrics .credits { font-size: 13px; color: var(--dim); border-top: 1px solid var(--line); padding-top: 14px; }

.kara .ln { margin: 0 0 6px; cursor: pointer; transition: color .45s, transform .45s, text-shadow .45s, opacity .45s; transform-origin: left center; }
.kara .ln:hover { color: var(--gold-2); }
.kara.live .ln { color: rgba(246, 241, 231, .38); }
.kara.live .ln.past { color: rgba(246, 241, 231, .62); }
.kara.live .ln.on { color: #fff; transform: scale(1.045); text-shadow: 0 0 22px rgba(var(--glow), .9), 0 0 3px rgba(255, 255, 255, .5); }
.kara .brk { height: 16px; }
.kara .tag { display: block; margin-top: 4px; }
.lyrics { position: sticky; }

/* ================= FINAL ================= */
.final { text-align: center; max-width: 760px; padding-top: 4vh; }
.final h1 { font-size: clamp(42px, 7vw, 84px); margin: 14px 0 18px; }
.final .lead { color: var(--muted); font-size: 19px; max-width: 50ch; margin: 0 auto; }
.final .commit { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 36px 0; text-align: left; }
.final .commit .card { padding: 22px; }
.final .commit .k { font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); font-weight: 800; }
.final .commit .v { font-family: var(--serif); font-size: 22px; margin-top: 6px; }
.final .actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.big-star { width: 90px; height: 90px; margin: 0 auto; color: var(--gold); filter: drop-shadow(0 0 30px rgba(242,196,109,.9)); animation: twinkle 3s ease-in-out infinite; }

/* ================= PLAYLIST ================= */
.plist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.plist li { display: grid; grid-template-columns: 28px 56px 1fr auto auto; gap: 16px; align-items: center; padding: 10px 14px; border-radius: 14px; cursor: pointer; transition: background .2s; }
.plist li:hover { background: rgba(255,255,255,.05); }
.plist li.on { background: rgba(242,196,109,.1); }
.plist li.on .num { color: var(--gold); }
.plist .num { color: var(--dim); font-weight: 700; text-align: center; }
.plist img { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; }
.plist .t { font-family: var(--serif); font-size: 20px; line-height: 1.2; }
.plist .s { color: var(--dim); font-size: 13px; }
.plist .d { color: var(--dim); font-size: 14px; font-variant-numeric: tabular-nums; }
.eq { display: inline-flex; gap: 2px; height: 14px; align-items: end; }
.eq b { width: 3px; background: var(--gold); animation: eq 1s ease-in-out infinite; }
.eq b:nth-child(2) { animation-delay: -.4s; } .eq b:nth-child(3) { animation-delay: -.7s; }
@keyframes eq { 0%,100% { height: 30%; } 50% { height: 100%; } }
.paused .eq b { animation-play-state: paused; }

/* ================= VIDEOS ================= */
.vgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.vcard { background: none; border: 0; padding: 0; text-align: left; }
.vcard .th { position: relative; border-radius: 16px; overflow: hidden; aspect-ratio: 16/9; border: 1px solid var(--line); }
.vcard img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.vcard:hover img { transform: scale(1.05); }
.vcard .th::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.55), transparent 50%); }
.vcard .pl { position: absolute; z-index: 2; left: 14px; bottom: 14px; }
.vcard h3 { font-size: 22px; margin-top: 12px; }
.vcard p { color: var(--dim); font-size: 14px; margin: 2px 0 0; }

.modal { position: fixed; inset: 0; z-index: 60; background: rgba(3,5,15,.92); display: grid; place-items: center; padding: 16px; backdrop-filter: blur(6px); }
.modal-inner { width: min(1100px, 100%); position: relative; }
.modal video { width: 100%; max-height: 80svh; border-radius: 14px; background: #000; }
.modal h3 { margin-top: 14px; font-size: 24px; }
.modal-x { position: absolute; right: 0; top: -54px; }

/* ================= DOWNLOADS ================= */
.dl-top { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 26px; }
.dl-big { padding: 24px; text-decoration: none; display: grid; gap: 4px; transition: border-color .3s, transform .3s; }
.dl-big:hover { border-color: rgba(242,196,109,.5); transform: translateY(-2px); }
.dl-big b { font-family: var(--serif); font-size: 22px; font-weight: 500; }
.dl-big .muted { font-size: 14px; }
.dl-ico { font-size: 22px; color: var(--gold); font-weight: 800; }
.dl-list { display: grid; gap: 8px; }
.dl-row { display: grid; grid-template-columns: 52px 1fr auto; gap: 16px; align-items: center; padding: 10px 14px; border: 1px solid var(--line); border-radius: 14px; }
.dl-row img { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; }
.dl-row .t { font-family: var(--serif); font-size: 19px; }
.dl-row .btns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: end; }
.dl-row .btns a { font-size: 13px; padding: 8px 12px; }

/* ================= PLAYER ================= */
.player { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 40; max-width: 860px; margin: 0 auto; border-radius: 18px; background: rgba(16, 22, 50, .88); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border: 1px solid var(--line); box-shadow: 0 20px 60px -10px rgba(0,0,0,.7); overflow: hidden; }
.seek input { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; margin: 0; display: block; background: linear-gradient(90deg, var(--gold) var(--p, 0%), rgba(255,255,255,.12) var(--p, 0%)); cursor: pointer; }
.seek input::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: var(--gold-2); }
.seek input::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: var(--gold-2); }
.player-row { display: flex; align-items: center; gap: 14px; padding: 10px 12px; }
.player-row img { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; flex: none; }
.p-meta { flex: 1; min-width: 0; display: grid; line-height: 1.3; }
.p-meta b { font-family: var(--serif); font-weight: 500; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-meta span { font-size: 12px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-time { font-size: 13px; color: var(--dim); font-variant-numeric: tabular-nums; }
.p-ctrls { display: flex; gap: 6px; align-items: center; }
.p-ctrls .icon-btn { width: 40px; height: 40px; border: 0; background: none; }
.p-ctrls .icon-btn.primary { background: var(--ink); width: 46px; height: 46px; }

/* ================= RESPONSIVE ================= */
@media (max-width: 900px) {
  .topbar .wrap { flex-direction: column; height: auto; padding: 10px 0 8px; gap: 6px; align-items: stretch; }
  .brand { justify-content: center; }
  .tabs { justify-content: center; }
  .station { grid-template-columns: 1fr; gap: 24px; }
  .lyrics { position: relative; top: 0; max-height: 62svh; padding: 22px; }
  .vgrid, .dl-top, .final .commit { grid-template-columns: 1fr; }
  .plist li { grid-template-columns: 22px 48px 1fr auto; gap: 12px; padding: 8px 6px; }
  .plist .d { display: none; }
  .plist img { width: 48px; height: 48px; }
  .dl-row { grid-template-columns: 44px 1fr; }
  .dl-row img { width: 44px; height: 44px; }
  .dl-row .btns { grid-column: 1 / -1; justify-content: start; }
  .p-time { display: none; }
  .view { padding-top: 24px; }
  .constellation { margin-bottom: 26px; }
  .constellation button svg { width: 18px; height: 18px; }
}

/* ================= GIFT ================= */
.gift-quote { font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--gold-2); margin: 10px 0 0; }
.gift-sent { z-index: 70; }
.gs-card { width: min(520px, 100%); padding: 34px 28px; text-align: center; background: linear-gradient(180deg, #172150, #0d1430); }
.gs-card h2 { font-size: clamp(26px, 4vw, 34px); margin: 10px 0 12px; }
.gs-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 14px; }
