:root {
  --ink: #f6efe2;
  --muted: #d9d0c2;
  --gold: #f0c36a;
  --gold-deep: #c89020;
  --red: #e2232a;
  --red-deep: #9d101c;
  --line: rgba(240, 195, 106, 0.55);
  --night: #07091a;
  --panel: #141226;
  color-scheme: dark;
  font-family: "Nunito", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
  background: #07091a;
  color: var(--ink);
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 50% at 50% 18%, rgba(92, 112, 186, 0.28), transparent 60%),
    radial-gradient(ellipse 40% 30% at 86% 14%, rgba(246, 236, 196, 0.16), transparent 70%),
    linear-gradient(180deg, #07091a 0%, #141833 42%, #1a2148 68%, #101628 100%);
}

button, a { font-family: inherit; }

.sky {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  display: block;
  pointer-events: none;
}

.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;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 4;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.1rem 2.2rem;
  background: linear-gradient(180deg, rgba(6, 8, 18, 0.78), rgba(6, 8, 18, 0));
  pointer-events: none;
}

.brand, .actions { pointer-events: auto; }

.eyebrow {
  margin: 0;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--gold);
}

h1 {
  margin: 0.1rem 0 0;
  font-family: "Rye", "Palatino Linotype", Palatino, serif;
  font-size: clamp(1.45rem, 3.1vw, 2.55rem);
  font-weight: 400;
  line-height: 1.05;
  color: #fff8ec;
  text-shadow: 0 2px 0 #6c121c, 0 10px 28px rgba(0, 0, 0, 0.45);
}

.soon {
  margin: 0.28rem 0 0;
  font-weight: 800;
  font-size: 0.92rem;
  color: var(--ink);
}

.soon-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.4rem;
}

.vol3-card {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--ink);
  background: rgba(8, 10, 22, 0.72);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.25rem 0.6rem 0.25rem 0.25rem;
  max-width: min(280px, 70vw);
}

.vol3-card img {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border-radius: 8px;
}

.vol3-card strong {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}

.vol3-card small {
  display: block;
  font-weight: 800;
  font-size: 0.78rem;
  line-height: 1.2;
}

.vol3-card em {
  display: block;
  font-style: normal;
  font-weight: 800;
  font-size: 0.75rem;
  color: #fff;
}

.presave, .follow, .share {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(8, 10, 22, 0.55);
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.presave.is-waiting {
  opacity: 0.55;
  cursor: default;
}

.follow { min-height: 46px; }

.signup {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin: 0 auto 0.4rem;
  pointer-events: auto;
  flex-wrap: wrap;
}

.signup label {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--muted);
}

.signup input {
  display: block;
  margin-top: 0.2rem;
  min-height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(8, 10, 22, 0.8);
  color: var(--ink);
  padding: 0 0.8rem;
  min-width: 180px;
}

.signup button {
  align-self: end;
  min-height: 40px;
  border-radius: 999px;
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--gold);
  font-weight: 800;
  padding: 0 0.9rem;
  cursor: pointer;
}

.actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.listen, .open-spotify, .enter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  text-decoration: none;
  color: white;
  background: linear-gradient(#ee3342, #b10f22);
  border: 2px solid var(--gold);
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 0.01em;
  box-shadow: 0 8px 22px rgba(160, 16, 32, 0.35);
  cursor: pointer;
}

.listen {
  min-height: 46px;
  padding: 0.55rem 1rem;
  font-size: 1rem;
}

.listen:hover, .open-spotify:hover, .enter:hover { filter: brightness(1.08); }

.listen:focus-visible, .open-spotify:focus-visible, .enter:focus-visible,
.mute:focus-visible, .ghost:focus-visible, .star:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.mute {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: rgba(10, 12, 24, 0.72);
  color: var(--ink);
  cursor: pointer;
  display: grid;
  place-items: center;
  position: relative;
}

.mute svg { width: 22px; height: 22px; display: block; }
.mute .slash { display: none; }
.mute.is-muted .waves { display: none; }
.mute.is-muted .slash { display: block; }
.mute.needs-gesture { box-shadow: 0 0 0 0 rgba(240, 195, 106, 0.7); animation: nudge 1.6s ease-out infinite; }

@keyframes nudge {
  70% { box-shadow: 0 0 0 10px rgba(240, 195, 106, 0); }
  100% { box-shadow: 0 0 0 0 rgba(240, 195, 106, 0); }
}

footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  padding: 1.6rem 1rem 0.75rem;
  text-align: center;
  background: linear-gradient(transparent, rgba(6, 8, 18, 0.82) 45%);
  pointer-events: none;
}

.sky-note, .stream {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.sky-note em { color: var(--ink); font-style: normal; font-weight: 800; }

.stream { margin-top: 0.28rem; pointer-events: auto; }
.stream a {
  color: var(--gold);
  font-weight: 800;
  text-decoration: none;
  padding: 0.2rem 0.15rem;
}
.stream a:hover { text-decoration: underline; }
.stream .dot { margin: 0 0.35rem; color: rgba(246, 239, 226, 0.45); }

.star {
  position: absolute;
  z-index: 2;
  width: 48px;
  height: 48px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  transform: translate(-50%, -50%);
  cursor: pointer;
}

.star .glow, .star .core {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.star .glow {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 236, 190, 0.95), rgba(255, 196, 90, 0.15) 62%, transparent 70%);
  filter: blur(0.2px);
  animation: pulse 2.8s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}

.star .core {
  width: 18px;
  height: 18px;
  background: #fff8e4;
  clip-path: polygon(50% 0, 59% 41%, 100% 50%, 59% 59%, 50% 100%, 41% 59%, 0 50%, 41% 41%);
  box-shadow: 0 0 10px 2px rgba(255, 220, 150, 0.9);
}

.star[data-size="1"] .core { width: 14px; height: 14px; }
.star[data-size="2"] .core { width: 22px; height: 22px; }
.star[data-size="3"] .glow { width: 44px; height: 44px; }
.star[data-size="4"] .core { width: 16px; height: 16px; }

.star:nth-child(3n) .glow {
  background: radial-gradient(circle, rgba(226, 236, 255, 0.95), rgba(140, 170, 255, 0.18) 62%, transparent 72%);
}
.star:nth-child(3n) .core { background: #f4f7ff; }
.star:nth-child(3n+1) .core { background: #ffe7a8; }

.star .tip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  max-width: 70vw;
  overflow: hidden;
  text-overflow: ellipsis;
  background: rgba(8, 10, 22, 0.94);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.82rem;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.star .tip b {
  color: var(--gold);
  font-weight: 800;
  margin-right: 0.35rem;
}

.star:hover .tip,
.star:focus-visible .tip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.star.tip-start .tip { left: 0; transform: translateY(4px); }
.star.tip-end .tip { left: auto; right: 0; transform: translateY(4px); }
.star.tip-start:hover .tip,
.star.tip-start:focus-visible .tip,
.star.tip-end:hover .tip,
.star.tip-end:focus-visible .tip { transform: translateY(0); }

@keyframes pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(0.82); opacity: 0.78; }
  50% { transform: translate(-50%, -50%) scale(1.12); opacity: 1; }
}

.splash {
  position: fixed;
  z-index: 40;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding:
    max(0.75rem, env(safe-area-inset-top))
    max(0.85rem, env(safe-area-inset-right))
    max(0.75rem, env(safe-area-inset-bottom))
    max(0.85rem, env(safe-area-inset-left));
  background: rgba(5, 7, 16, 0.55);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: manipulation;
  cursor: pointer;
}

.splash[hidden] { display: none; }

.splash-card {
  width: min(440px, 100%);
  margin: auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.splash-card .enter,
.splash-card .skip-enter {
  pointer-events: auto;
}

.portrait {
  width: min(200px, 30dvh, 46vw);
  max-height: 30dvh;
  height: auto;
  object-fit: contain;
  flex: 0 1 auto;
  filter: drop-shadow(0 16px 30px rgba(0, 0, 0, 0.45));
}

.splash h2 {
  margin: 0.4rem 0 0;
  font-family: "Rye", Palatino, serif;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 400;
  text-shadow: 0 2px 0 #6c121c;
}

.splash .who {
  margin: 0.35rem 0 0;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--gold);
  font-size: 0.78rem;
}

.splash .lead {
  margin: 0.7rem auto 0;
  max-width: 34ch;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.4;
}

.enter {
  flex: 0 0 auto;
  width: min(100%, 22rem);
  margin-top: 0.85rem;
  min-height: 56px;
  padding: 0.85rem 1.4rem;
  font-size: 1.15rem;
  position: relative;
  z-index: 2;
}

.skip-enter {
  flex: 0 0 auto;
  margin-top: 0.35rem;
  min-height: 44px;
  padding: 0.4rem 1rem;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  text-decoration: underline;
  cursor: pointer;
  position: relative;
  z-index: 2;
}

.fine {
  margin: 0.7rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

dialog {
  width: min(440px, calc(100vw - 1.5rem));
  padding: 1rem 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(ellipse at 10% 0%, rgba(226, 35, 42, 0.18), transparent 50%),
    linear-gradient(180deg, #1c1833, #12101f);
  color: var(--ink);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

dialog::backdrop {
  background: rgba(4, 6, 16, 0.62);
  backdrop-filter: blur(3px);
}

.panel-top {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  align-items: flex-start;
}

.kicker {
  margin: 0;
  color: var(--gold);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

dialog h2 {
  margin: 0.2rem 0 0;
  font-family: "Rye", Palatino, serif;
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.2;
}

.ghost {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  flex: none;
}

.embed-wrap {
  margin-top: 0.8rem;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  min-height: 152px;
}

.embed-wrap iframe {
  display: block;
  width: 100%;
  height: 152px;
  border: 0;
}

.missing {
  margin: 0;
  padding: 1rem;
  color: var(--muted);
  font-weight: 700;
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.open-spotify {
  flex: 1 1 220px;
  min-height: 52px;
  padding: 0.7rem 1.1rem;
  font-size: 1.05rem;
}

.share { flex: none; background: transparent; }

.preview-note {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.star.dim .glow {
  width: 22px;
  height: 22px;
  animation-duration: 4.2s;
  background: radial-gradient(circle, rgba(190, 206, 240, 0.7), transparent 70%);
}

.star.dim .core {
  width: 8px;
  height: 8px;
  background: #d5def4;
  box-shadow: none;
}

/* Spotify's background player mounts an iframe that uses position:fixed
   and otherwise paints over the title. Park it offscreen; audio still plays. */
.bg-embed {
  position: fixed;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  z-index: 0;
}

.bg-embed iframe,
body > iframe {
  position: absolute !important;
  left: -9999px !important;
  top: 0 !important;
  width: 300px !important;
  height: 80px !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

@media (max-width: 720px) {
  header {
    flex-direction: column;
    gap: 0.55rem;
    padding-bottom: 1.4rem;
  }
  .actions { width: 100%; justify-content: space-between; }
  .listen { flex: 1; }
  h1 { font-size: 1.4rem; }
  .star .tip { font-size: 0.78rem; }
  footer { padding-bottom: 0.55rem; }
}

@media (prefers-reduced-motion: reduce) {
  .star .glow,
  .mute.needs-gesture { animation: none; }
  .star .tip { transition: none; }
}

@media (max-height: 740px) {
  .portrait { width: min(132px, 22dvh); max-height: 22dvh; }
  .splash h2 { font-size: 1.35rem; margin-top: 0.2rem; }
  .splash .lead, .splash .fine { display: none; }
  .splash .who { margin-top: 0.2rem; }
  .enter { margin-top: 0.55rem; }
}
