:root {
  --ink: #f4efe6;
  --muted: rgba(244, 239, 230, 0.62);
  --dim: rgba(244, 239, 230, 0.38);
  --line: rgba(244, 239, 230, 0.18);
  --bg: #070705;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Syne", "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); }
body { overflow: hidden; }

#bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  background: #070705;
  pointer-events: none;
}
#bg-player,
#bg iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 177.78vh;
  height: 100vh;
  min-width: 100vw;
  min-height: 56.25vw;
  transform: translate(-50%, -50%) scale(1.12);
  pointer-events: none;
}

.grain, .vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}
.grain {
  opacity: 0.14;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}
.vignette {
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,.55) 100%);
}

.hud {
  position: fixed;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.1rem 1.4rem;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.hud.top { top: 0; left: 0; right: 0; justify-content: space-between; }
.hud.bottom {
  bottom: 0; left: 0; right: 0;
  justify-content: center;
  background: linear-gradient(transparent, rgba(0,0,0,.55));
  padding-bottom: 1.4rem;
}
.brand { font-weight: 600; opacity: 0.7; }
.now-title { font-family: var(--serif); letter-spacing: 0.04em; text-transform: none; font-size: 1.15rem; opacity: 0.9; }
.text-btn, .hud button, .go, .mic {
  background: none;
  border: 0;
  color: var(--ink);
  font: inherit;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  opacity: 0.75;
}
.text-btn:hover, .hud button:hover, .go:hover, .mic:hover { opacity: 1; }
.hud label { display: flex; align-items: center; gap: 0.45rem; opacity: 0.8; }
.hud input[type=range] { width: 88px; accent-color: var(--ink); }

.home {
  position: relative;
  z-index: 3;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8vh 8vw 12vh;
  max-width: 1100px;
  overflow-y: auto;
}
.home.hidden { display: none; }
.kicker {
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--muted);
  margin: 0 0 0.6rem;
}
h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.8rem, 7vw, 5.4rem);
  margin: 0 0 1.4rem;
  line-height: 0.95;
}
.search {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.55rem;
  max-width: 720px;
}
.search input {
  flex: 1;
  background: transparent;
  border: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.35rem;
  outline: none;
}
.search input::placeholder { color: var(--dim); }
.status { min-height: 1.4rem; color: var(--muted); font-size: 0.9rem; }
.scenes {
  margin-top: 2.4rem;
  display: grid;
  gap: 1rem 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  max-width: 820px;
}
.scene {
  background: none;
  border: 0;
  color: inherit;
  text-align: left;
  cursor: pointer;
  padding: 0;
  font: inherit;
}
.scene strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 500;
}
.scene span { color: var(--muted); font-size: 0.92rem; }
.scene:hover strong { text-decoration: underline; text-underline-offset: 6px; }
.hint { margin-top: 3rem; color: var(--dim); font-size: 0.78rem; letter-spacing: 0.04em; max-width: 36rem; }

.music-dock {
  position: fixed;
  right: 1.1rem;
  bottom: 4.6rem;
  z-index: 4;
  width: 260px;
  opacity: 0.42;
  transition: opacity 0.2s;
}
.music-dock:hover { opacity: 1; }
#music-player, #music-player iframe { width: 260px; height: 146px; }
.track-label {
  margin: 0.35rem 0 0;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.listening .mic { opacity: 1; animation: pulse 1.2s infinite; }
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

@media (max-width: 700px) {
  .music-dock { display: none; }
  .hud.bottom { flex-wrap: wrap; }
  h1 { font-size: 2.6rem; }
}
