:root {
  --ink: #2a1c12;
  --ivory: #f3e8d3;
  --parchment: #e9dcc0;
  --terracotta: #b8562f;
  --terracotta-dark: #7c3a20;
  --maroon: #6e2020;
  --ochre: #cf9a3e;
  --gold: #e7bd63;
  --sage: #7f8c5f;
  --bg-0: #1c130d;
  --bg-1: #2a1b12;
  --glass-bg: rgba(243, 232, 211, 0.09);
  --glass-border: rgba(231, 189, 99, 0.28);
  --shadow-warm: 0 8px 40px rgba(20, 10, 4, 0.55), inset 0 1px 0 rgba(255, 235, 200, 0.16);
}

* { box-sizing: border-box; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html, body {
  height: 100%;
  margin: 0;
}

body {
  min-height: 100%;
  font-family: "EB Garamond", Georgia, serif;
  color: var(--ivory);
  background: var(--bg-0);
}

.stage {
  position: relative;
  display: flex;
  min-height: 100dvh;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
}

/* ---------- backdrop ---------- */

.hero-bg {
  position: fixed;
  inset: 0;
  z-index: -10;
  background: #e9a463;
}

.hero-scene {
  position: absolute;
  inset: 0;
  background-image: url("images/scene.jpg");
  background-size: cover;
  background-position: top center;
  background-repeat: no-repeat;
}

.hero-vignette {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(20, 12, 6, 0.12) 0%, transparent 22%, transparent 62%, rgba(20, 12, 6, 0.6) 100%);
}

/* ---------- player ---------- */

.player-wrap {
  margin-top: auto;
  margin-bottom: 6vh;
  display: flex;
  width: 100%;
  justify-content: center;
  padding: 0 20px;
  z-index: 2;
}

.player {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 30rem;
  padding: 10px 18px 10px 10px;
  border-radius: 999px;
  background: rgba(30, 20, 12, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.art {
  position: relative;
  height: 76px;
  width: 76px;
  flex-shrink: 0;
}
.art-spin {
  height: 100%;
  width: 100%;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.45);
  outline: 1px solid rgba(243, 232, 211, 0.18);
  animation: spin 9s linear infinite;
  animation-play-state: paused;
}
.art-spin.playing { animation-play-state: running; }
.art-spin img { height: 100%; width: 100%; object-fit: cover; display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

.art-hole {
  position: absolute;
  left: 50%;
  top: 50%;
  height: 11px;
  width: 11px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: rgba(10, 6, 3, 0.75);
  box-shadow: 0 0 0 2px rgba(243, 232, 211, 0.35);
}

.meta { min-width: 0; flex: 1; }

.track-title {
  margin: 0;
  font-family: "Tiro Bangla", serif;
  font-size: 16px;
  font-weight: 500;
  color: var(--ivory);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.track-sub {
  margin: 2px 0 0;
  font-family: "Cormorant Garamond", serif;
  font-size: 13px;
  color: rgba(243, 232, 211, 0.62);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.track-sub-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted rgba(243, 232, 211, 0.35);
}
.track-sub-link:hover {
  color: var(--ivory);
  border-bottom-color: var(--ochre);
}

.seek {
  position: relative;
  margin-top: 9px;
  height: 8px;
  width: 100%;
  cursor: pointer;
}
.seek-track {
  position: absolute;
  inset-inline: 0;
  top: 50%;
  height: 3px;
  transform: translateY(-50%);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(243, 232, 211, 0.18);
}
.seek-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: rgba(248, 244, 236, 0.9);
}
.seek-thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  height: 10px;
  width: 10px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: var(--ivory);
  box-shadow: 0 0 0 2px rgba(0,0,0,0.2);
  opacity: 0;
  transition: opacity 0.15s ease;
}
.seek:hover .seek-thumb { opacity: 1; }

.time {
  margin-top: 5px;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: rgba(243, 232, 211, 0.55);
  text-align: left;
}

.controls {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}
.ctrl-btn {
  display: grid;
  place-items: center;
  height: 36px;
  width: 36px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: rgba(243, 232, 211, 0.8);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}
.ctrl-btn:hover { background: rgba(243, 232, 211, 0.12); color: var(--ivory); }
.ctrl-btn:active { transform: scale(0.94); }

.play-btn {
  height: 44px;
  width: 44px;
  background: #f8f4ec;
  color: #241a12;
  box-shadow: 0 4px 14px rgba(0,0,0,0.35);
}
.play-btn:hover { background: #ffffff; transform: scale(1.05); }

@media (max-width: 420px) {
  .player { padding: 10px 14px 10px 10px; gap: 12px; }
  .art { height: 64px; width: 64px; }
}

/* ---------- youtube host (kept off-screen; audio is still audible) ---------- */
.yt-host {
  position: fixed;
  left: -9999px;
  top: -9999px;
  width: 2px;
  height: 2px;
  overflow: hidden;
}

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(7vh + 108px);
  transform: translateX(-50%) translateY(8px);
  z-index: 25;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(20, 12, 6, 0.85);
  border: 1px solid rgba(231, 189, 99, 0.28);
  color: var(--ivory);
  font-size: 13px;
  font-family: "Cormorant Garamond", serif;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  white-space: nowrap;
}
.toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
