:root { color-scheme: dark; --glass: rgba(12, 8, 18, .68); --line: rgba(255,255,255,.16); --accent: #f2c56f; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; color: #fff; background: radial-gradient(circle at 50% 40%, #3a2347, #09070d 70%); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, a, input { font: inherit; }
button, a { color: inherit; }

.wallpaper { position: fixed; inset: 0; width: 100%; height: 100%; object-fit: cover; user-select: none; transition: opacity 850ms cubic-bezier(.2,.8,.2,1), transform 7s ease; }
.wallpaper.active { opacity: 1; transform: scale(1.018); }
.wallpaper.inactive { opacity: 0; transform: scale(1); }
.vignette { position: fixed; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(0,0,0,.38), transparent 28%, transparent 66%, rgba(0,0,0,.55)); }

/* Controls stay out of the way until the intro is dismissed. */
body.locked .chrome { display: none; }
.chrome { transition: opacity .3s ease, transform .3s ease; }
body.ui-hidden .chrome { opacity: 0; pointer-events: none; transform: translateY(-10px); }

.topbar { position: fixed; z-index: 10; top: 16px; left: 50%; transform: translateX(-50%); width: min(1160px, calc(100vw - 28px)); min-height: 68px; display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 18px; background: var(--glass); box-shadow: 0 18px 70px rgba(0,0,0,.38); backdrop-filter: blur(22px) saturate(140%); }
body.ui-hidden .topbar { transform: translateX(-50%) translateY(-10px); }
.brand { flex: 0 0 auto; padding: 0 8px 0 6px; min-width: 122px; }
.brand strong { display: block; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; }
.brand span { display: block; margin-top: 3px; color: rgba(255,255,255,.62); font-size: 11px; }
.strip { flex: 1; display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.strip::-webkit-scrollbar { display: none; }
.thumb { position: relative; flex: 0 0 64px; height: 42px; overflow: hidden; border: 1px solid rgba(255,255,255,.15); border-radius: 10px; padding: 0; background: #16111e; cursor: pointer; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb:hover { transform: translateY(-2px); border-color: rgba(255,255,255,.55); }
.thumb.selected { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(242,197,111,.22), 0 5px 18px rgba(0,0,0,.4); }
.thumb span { position: absolute; right: 4px; bottom: 3px; min-width: 16px; height: 16px; display: grid; place-items: center; border-radius: 5px; background: rgba(0,0,0,.68); font-size: 9px; font-weight: 800; }
.actions { display: flex; gap: 7px; flex: 0 0 auto; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.07); cursor: pointer; transition: background .2s ease, transform .2s ease; }
.icon-btn:hover { background: rgba(255,255,255,.15); transform: translateY(-1px); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.caption { position: fixed; z-index: 8; left: 28px; bottom: 28px; max-width: min(480px, calc(100vw - 56px)); text-shadow: 0 2px 18px rgba(0,0,0,.8); }
.caption .count { color: rgba(255,255,255,.7); font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.caption h1 { margin: 5px 0 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(26px, 3.3vw, 50px); font-weight: 500; letter-spacing: -.025em; }

.audio-dock { position: fixed; z-index: 10; right: 28px; bottom: 28px; width: min(420px, calc(100vw - 56px)); display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 12px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 17px; background: var(--glass); backdrop-filter: blur(22px) saturate(140%); box-shadow: 0 18px 60px rgba(0,0,0,.35); }
.play { width: 44px; height: 44px; border: 0; border-radius: 50%; display: grid; place-items: center; background: #f4f0e8; color: #19131f; cursor: pointer; }
.play svg { width: 18px; height: 18px; fill: currentColor; }
.play .icon-pause, body.playing .play .icon-play { display: none; }
body.playing .play .icon-pause { display: block; }
.track strong { display: block; font-size: 13px; }
.track span { display: block; margin-top: 2px; color: rgba(255,255,255,.58); font-size: 11px; }
.progress { position: relative; height: 4px; margin-top: 8px; border-radius: 99px; background: rgba(255,255,255,.15); cursor: pointer; overflow: hidden; }
.progress i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #d5a85b, #fff1bd); }
.bars { display: flex; align-items: center; gap: 3px; height: 24px; }
.bars i { width: 3px; height: 7px; border-radius: 5px; background: rgba(255,255,255,.58); animation: bounce .7s ease-in-out infinite alternate; animation-play-state: paused; }
body.playing .bars i { animation-play-state: running; }
.bars i:nth-child(2) { animation-delay: -.25s; } .bars i:nth-child(3) { animation-delay: -.5s; } .bars i:nth-child(4) { animation-delay: -.15s; } .bars i:nth-child(5) { animation-delay: -.4s; }
@keyframes bounce { to { height: 22px; background: #f2c56f; } }

.intro { position: fixed; z-index: 30; inset: 0; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 50% 45%, rgba(80,49,88,.3), rgba(7,5,11,.84)); backdrop-filter: blur(14px); transition: opacity .7s ease, visibility .7s ease; }
.intro.gone { opacity: 0; visibility: hidden; }
.intro-card { width: min(600px, 100%); text-align: center; }
.seal { width: 62px; height: 62px; display: grid; place-items: center; margin: 0 auto 22px; border: 1px solid rgba(255,255,255,.22); border-radius: 50%; font-size: 29px; background: rgba(255,255,255,.06); box-shadow: 0 0 50px rgba(242,197,111,.18); }
.eyebrow { color: #e6c681; font-size: 11px; font-weight: 800; letter-spacing: .25em; text-transform: uppercase; }
.intro h2 { margin: 12px 0 14px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(38px, 7vw, 72px); line-height: .98; font-weight: 500; letter-spacing: -.04em; }
.intro p { max-width: 470px; margin: 0 auto; color: rgba(255,255,255,.66); line-height: 1.6; }
.intro-form { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 26px; }
.intro-form input { width: min(300px, 100%); padding: 12px 18px; border: 1px solid rgba(255,255,255,.22); border-radius: 999px; background: rgba(255,255,255,.07); color: #fff; text-align: center; letter-spacing: .08em; }
.intro-form input:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.intro .error { min-height: 1.4em; color: #ffb4a8; font-size: 14px; }
.enter { border: 1px solid rgba(255,255,255,.2); border-radius: 999px; padding: 13px 20px; background: #f3eee5; color: #17111b; font-weight: 800; cursor: pointer; box-shadow: 0 12px 35px rgba(0,0,0,.3); transition: transform .2s ease; }
.enter:hover { transform: translateY(-2px) scale(1.01); }

.hint { position: fixed; z-index: 9; top: 99px; left: 50%; transform: translateX(-50%); padding: 8px 12px; border-radius: 99px; background: rgba(0,0,0,.58); color: rgba(255,255,255,.78); font-size: 11px; opacity: 0; pointer-events: none; transition: opacity .25s ease; }
.hint.show { opacity: 1; }

.confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 40; }

@media (max-width: 850px) {
  .brand { display: none; }
  .topbar { top: 10px; width: calc(100vw - 20px); }
  .thumb { flex-basis: 57px; height: 38px; }
  .actions .optional { display: none; }
  .caption { left: 18px; bottom: 114px; }
  .audio-dock { left: 50%; right: auto; bottom: 15px; transform: translateX(-50%); width: calc(100vw - 30px); }
}

@media (prefers-reduced-motion: reduce) {
  .wallpaper, .chrome, .intro { transition: none; }
  .bars i { animation: none; }
}
