:root {
  --midnight: #0a1628;
  --gold: #c9a84c;
  --gold-light: #e8d5a0;
  --gold-glow: #f5ebd3;
  --cream: #faf6ee;
  --text-hint: rgba(250, 246, 238, 0.72);
  --font-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-sans: 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-sans);
  color: var(--cream);
  background:
    radial-gradient(90% 55% at 50% 38%, rgba(30, 58, 95, 0.55) 0%, rgba(10, 22, 40, 0) 62%),
    linear-gradient(180deg, #0c1a30 0%, var(--midnight) 46%, #070f1c 100%);
  -webkit-font-smoothing: antialiased;
}

.notes {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.notes__drift {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.glr-drift-note {
  position: absolute;
  bottom: 0;
  display: block;
  width: clamp(0.85rem, 2vw, 1.35rem);
  color: rgba(245, 235, 211, 0.95);
  filter:
    drop-shadow(0 0 3px rgba(250, 246, 238, 0.95))
    drop-shadow(0 0 8px rgba(201, 168, 76, 0.7))
    drop-shadow(0 0 16px rgba(201, 168, 76, 0.4));
  pointer-events: none;
  animation-name: glr-drift-rise;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  will-change: transform, opacity;
}

.glr-drift-note svg {
  display: block;
  width: 100%;
  height: auto;
}

.glr-drift-note--flag {
  width: clamp(1rem, 2.4vw, 1.65rem);
}

.glr-drift-note--beam {
  width: clamp(1.25rem, 2.9vw, 1.95rem);
}

.glr-drift-note--half {
  width: clamp(0.9rem, 2.15vw, 1.45rem);
}

.glr-drift-note--tiny {
  width: clamp(0.7rem, 1.7vw, 1.05rem);
}

@keyframes glr-drift-rise {
  0% {
    transform: translate3d(0, 4vh, 0) rotate(var(--glr-rot, -14deg)) scale(0.94);
    opacity: 0;
  }
  5% {
    opacity: var(--glr-opacity, 0.58);
  }
  12% {
    opacity: var(--glr-opacity, 0.58);
  }
  38% {
    transform: translate3d(calc(var(--glr-sway, 0.8rem) * 0.55), -18vh, 0) rotate(calc(var(--glr-rot, -14deg) + 4deg)) scale(1);
  }
  62% {
    transform: translate3d(var(--glr-sway, 0.8rem), -52vh, 0) rotate(calc(var(--glr-rot, -14deg) + 7deg)) scale(1.02);
  }
  86% {
    opacity: calc(var(--glr-opacity, 0.58) * 0.55);
  }
  100% {
    transform: translate3d(calc(var(--glr-sway, 0.8rem) * -0.45), -122vh, 0) rotate(calc(var(--glr-rot, -14deg) - 6deg)) scale(0.96);
    opacity: 0;
  }
}

.stage {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(1.15rem + env(safe-area-inset-top)) 1.15rem calc(1.15rem + env(safe-area-inset-bottom));
  max-width: 28rem;
  margin: 0 auto;
}

.panel {
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.65rem 1.25rem 1.45rem;
  border-radius: 22px;
  border: 1px solid rgba(201, 168, 76, 0.4);
  background:
    linear-gradient(180deg, rgba(19, 39, 68, 0.28) 0%, rgba(10, 22, 40, 0.38) 100%);
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.18),
    inset 0 0 0 1px rgba(245, 235, 211, 0.06);
  backdrop-filter: blur(6px);
}

.brand {
  text-align: center;
  margin: 0;
}

.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: min(100%, 9rem);
  margin: 1.15rem auto 1.45rem;
}

.ornament__line {
  flex: 1 1 2.75rem;
  max-width: 3.25rem;
  min-width: 1.5rem;
  height: 1px;
  background: rgba(184, 152, 79, 0.62);
}

.ornament__heart {
  flex: 0 0 auto;
  width: 0.72rem;
  height: 0.72rem;
  opacity: 0.92;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 14' fill='none'%3E%3Cpath d='M8 13S1 8.6 1 4.8C1 2.7 2.6 1 4.6 1c1.2 0 2.3.6 3 1.6.7-1 1.8-1.6 3-1.6 2 0 3.6 1.7 3.6 3.8C14.4 8.6 8 13 8 13z' fill='%23c9a84c'/%3E%3C/svg%3E");
}

.brand__cross {
  display: block;
  width: 1.05rem;
  height: 1.4rem;
  margin: 0 auto 0.7rem;
  color: var(--gold);
  filter:
    drop-shadow(0 0 4px rgba(201, 168, 76, 0.55))
    drop-shadow(0 0 10px rgba(201, 168, 76, 0.28));
}

.brand__cross svg {
  display: block;
  width: 100%;
  height: 100%;
}

.brand__mark {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.85rem, 8vw, 2.45rem);
  letter-spacing: 0.2em;
  line-height: 1.08;
  color: var(--cream);
}

.brand__sub {
  margin: 0.4rem 0 0;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.52em;
  color: var(--gold);
}

.player {
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.now-label {
  margin: 1.55rem 0 0.4rem;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: rgba(201, 168, 76, 0.82);
}

.title {
  margin: 0;
  max-width: 100%;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.35rem, 5.6vw, 1.85rem);
  line-height: 1.2;
  text-align: center;
  color: var(--cream);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.artist {
  margin: 0.38rem 0 0;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  color: var(--text-hint);
  text-align: center;
  min-height: 1.35em;
}

.status {
  margin: 0.4rem 0 0;
  min-height: 1.15em;
  font-size: 0.76rem;
  color: rgba(250, 246, 238, 0.42);
  text-align: center;
}

.play {
  margin: 0;
  position: relative;
  width: 7.4rem;
  height: 7.4rem;
  border: 0;
  padding: 0;
  border-radius: 50%;
  color: var(--midnight);
  background: radial-gradient(circle at 35% 30%, var(--gold-light), var(--gold) 58%, #b08d38);
  box-shadow:
    0 14px 36px rgba(0, 0, 0, 0.32),
    0 0 0 1px rgba(245, 235, 211, 0.32);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}

.play:hover,
.play:focus-visible {
  transform: translateY(-1px);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.36),
    0 0 0 1px rgba(245, 235, 211, 0.48),
    0 0 28px rgba(201, 168, 76, 0.28);
}

.play:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 5px;
}

.play:active {
  transform: translateY(0);
}

.play:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.play__icon {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.play__icon[hidden] {
  display: none;
}

.play__icon--pause {
  display: none;
}

.play__icon svg {
  width: 7.4rem;
  height: 7.4rem;
  display: block;
}

.player.is-playing .play__icon--play {
  display: none;
}

.player.is-playing .play__icon--pause {
  display: grid;
}

.player.is-playing .play {
  box-shadow:
    0 16px 38px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(245, 235, 211, 0.5),
    0 0 40px rgba(201, 168, 76, 0.38);
}

.footer {
  width: 100%;
  flex-shrink: 0;
  margin-top: 1.35rem;
  padding-top: 1.15rem;
  border-top: 1px solid rgba(201, 168, 76, 0.22);
  text-align: center;
}

.donate {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.donate__link {
  color: var(--gold-light);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.donate__link:hover,
.donate__link:focus-visible {
  color: var(--gold-glow);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.donate__text {
  font-size: 0.78rem;
  line-height: 1.45;
  color: rgba(250, 246, 238, 0.62);
}

.home {
  margin: 1.05rem 0 0;
}

.home__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.55rem;
  padding: 0.55rem 1.35rem;
  border-radius: 999px;
  border: 1px solid rgba(201, 168, 76, 0.65);
  background: rgba(201, 168, 76, 0.12);
  color: var(--cream);
  text-decoration: none;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  box-shadow: 0 0 0 1px rgba(201, 168, 76, 0.12);
}

.home__btn .gold {
  color: var(--gold);
}

.home__btn:hover,
.home__btn:focus-visible {
  color: var(--cream);
  background: rgba(201, 168, 76, 0.22);
  border-color: var(--gold-light);
}

.home__btn:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 3px;
}

.install {
  margin-top: 1.35rem;
  padding-top: 1.15rem;
  border-top: 1px solid rgba(201, 168, 76, 0.22);
}

.install__title {
  margin: 0 0 0.45rem;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--gold-light);
}

.install__text {
  margin: 0 0 0.85rem;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-hint);
}

.install__btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.6rem;
  padding: 0.55rem 1.15rem;
  border: 1px solid rgba(232, 213, 160, 0.7);
  border-radius: 999px;
  background: transparent;
  color: var(--cream);
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}

.install__btn:hover,
.install__btn:focus-visible {
  background: rgba(201, 168, 76, 0.2);
  border-color: var(--gold-light);
}

.install__btn:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 3px;
}

.install__btn[hidden] {
  display: none;
}

@media (min-width: 720px) {
  .stage {
    max-width: 30rem;
    padding-top: 2rem;
  }

  .play,
  .play__icon svg {
    width: 8rem;
    height: 8rem;
  }
}

@media (max-width: 640px) {
  .glr-drift-note {
    width: clamp(0.85rem, 3.4vw, 1.2rem);
  }

  .glr-drift-note--flag {
    width: clamp(0.95rem, 3.8vw, 1.35rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .play {
    transition: none;
  }

  .glr-drift-note {
    animation: none;
    display: none;
  }
}
