/* "Latido": la apertura del regalo (versión gratis).
   Va después de style.css y solo ajusta la página del regalo (/g/).
   Ideas: un solo ritmo (el latido, 1.6 s) para todo lo que se mueve,
   curvas que frenan al llegar, entradas escalonadas y textura fina. */

:root {
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --beat: 1.6s;
  --serif-display: "Fraunces", "Georgia", "Iowan Old Style", ui-serif, serif;
  --sans: system-ui, -apple-system, "Segoe UI", sans-serif;
}

body {
  font-family: var(--serif-display);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Luz ambiente que respira detrás de todo. */
body::before {
  content: "";
  position: fixed;
  inset: -10%;
  z-index: -2;
  pointer-events: none;
  background: radial-gradient(55% 40% at 50% 40%, var(--violet), transparent 72%);
  opacity: 0.35;
  animation: breathe 9s var(--ease-in-out) infinite alternate;
}

@keyframes breathe {
  from { opacity: 0.25; transform: scale(1); }
  to { opacity: 0.45; transform: scale(1.08); }
}

/* Grano de película: casi invisible, quita el aspecto "plano" de pantalla. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 3000;
  pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- el sello: regalo con pulso ---------- */

.mark-wrap {
  position: relative;
  width: 132px;
  height: 132px;
  display: grid;
  place-items: center;
}

.mark-halo {
  position: absolute;
  inset: -30%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(214, 168, 96, 0.28), transparent 62%);
  filter: blur(6px);
  animation: halo var(--beat) var(--ease-out) infinite;
}

.mark-ring {
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  opacity: 0;
  animation: ring var(--beat) var(--ease-out) infinite;
}

.mark-ring.r2 {
  animation-delay: 0.22s;
  border-width: 1px;
}

.gift-mark {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.45));
  animation: heartbeat var(--beat) var(--ease-in-out) infinite;
  transform-origin: 50% 60%;
}

.gift-mark .pulse {
  stroke-dasharray: 120;
  stroke-dashoffset: 120;
  animation: trace var(--beat) var(--ease-out) infinite;
}

.gift-mark .lid {
  transform-box: fill-box;
  transform-origin: 50% 100%;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  12% { transform: scale(1.06); }
  24% { transform: scale(0.99); }
  36% { transform: scale(1.035); }
  56% { transform: scale(1); }
}

@keyframes trace {
  0% { stroke-dashoffset: 120; opacity: 1; }
  45% { stroke-dashoffset: 0; opacity: 1; }
  80% { stroke-dashoffset: 0; opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 0.2; }
}

@keyframes ring {
  0% { transform: scale(0.75); opacity: 0.55; }
  100% { transform: scale(1.9); opacity: 0; }
}

@keyframes halo {
  0%, 100% { opacity: 0.6; transform: scale(0.95); }
  14% { opacity: 1; transform: scale(1.05); }
}

/* ---------- envoltorio (antes de tocar) ---------- */

.wrapper-screen {
  gap: 30px;
}

.wrapper-screen .mark-wrap {
  opacity: 0;
  animation: markIn 1.1s var(--ease-out) 0.1s forwards;
}

@keyframes markIn {
  from { opacity: 0; transform: scale(0.88); filter: blur(8px); }
  to { opacity: 1; transform: scale(1); filter: none; }
}

.wrapper-text {
  margin: 0;
  max-width: 100%;
  padding: 0 8px;
  font-size: 23px;
  font-weight: 350;
  line-height: 1.35;
  color: var(--text);
  text-wrap: balance;
  animation: riseIn 1.1s var(--ease-out) 0.45s forwards;
}

.wrapper-hint {
  margin: 0;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0;
  animation: riseIn 1s var(--ease-out) 1.1s forwards, hintBreath 3.2s var(--ease-in-out) 2.2s infinite;
}

/* Línea de confianza: chica, al pie, sin llamar la atención. */
.wrapper-safe {
  position: fixed;
  left: 0;
  right: 0;
  bottom: max(22px, env(safe-area-inset-bottom));
  margin: 0;
  padding: 0 24px;
  text-align: center;
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-dim);
  opacity: 0;
  animation: riseIn 1s var(--ease-out) 1.4s forwards;
}

.safe-lock {
  display: inline-block;
  vertical-align: -1px;
  margin-right: 6px;
  width: 11px;
  height: 12px;
  background: currentColor;
  opacity: 0.8;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 11 12'%3E%3Cpath d='M2.5 5V3.5a3 3 0 0 1 6 0V5h.5A1 1 0 0 1 10 6v5a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h.5zm1.5 0h3V3.5a1.5 1.5 0 0 0-3 0V5z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 11 12'%3E%3Cpath d='M2.5 5V3.5a3 3 0 0 1 6 0V5h.5A1 1 0 0 1 10 6v5a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h.5zm1.5 0h3V3.5a1.5 1.5 0 0 0-3 0V5z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* En japonés y coreano la cursiva es falsa (inclinada a la fuerza): mejor recta. */
html[lang="ja"] .wrapper-text,
html[lang="ko"] .wrapper-text,
html[lang="ja"] .moment-dedication,
html[lang="ko"] .moment-dedication,
html[lang="ja"] .end-title,
html[lang="ko"] .end-title {
  font-style: normal;
}

@keyframes riseIn {
  from { opacity: 0; transform: translateY(12px); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: none; }
}

@keyframes hintBreath {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

/* ---------- apertura (al tocar) ---------- */

.opening-layer {
  background: transparent;
}

body[data-bg] .opening-layer {
  background: transparent;
}

.opening-layer .mark-wrap {
  animation: markOut 1.15s var(--ease-in-out) forwards;
}

.opening-layer .gift-mark {
  animation: none;
}

.opening-layer .gift-mark .lid {
  animation: lidOpen 0.7s var(--ease-out) 0.12s forwards;
}

.opening-layer .gift-mark .pulse {
  stroke-dashoffset: 0;
  animation: pulseFlash 0.6s ease-out forwards;
}

.opening-layer .mark-ring,
.opening-layer .mark-halo {
  animation: none;
  opacity: 0;
}

/* Luz que sale de la caja al abrirse. */
.opening-light {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 70vmax;
  height: 70vmax;
  margin: -35vmax 0 0 -35vmax;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 236, 200, 0.55), rgba(214, 168, 96, 0.18) 35%, transparent 65%);
  opacity: 0;
  transform: scale(0.2);
  animation: bloom 1.3s var(--ease-out) 0.25s forwards;
}

/* Onda expansiva del latido. */
.opening-wave {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 120px;
  height: 120px;
  margin: -60px 0 0 -60px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  opacity: 0;
  animation: wave 1.2s var(--ease-out) 0.05s forwards;
}

.opening-layer.leaving {
  animation: openFadeOut 0.55s ease forwards;
}

@keyframes markOut {
  0% { transform: scale(1); opacity: 1; filter: none; }
  12% { transform: scale(0.94); }
  30% { transform: scale(1.12); opacity: 1; filter: none; }
  100% { transform: scale(1.35) translateY(-18px); opacity: 0; filter: blur(14px); }
}

@keyframes lidOpen {
  to { transform: translateY(-16px) rotate(-14deg); }
}

@keyframes pulseFlash {
  0% { stroke: #fff; filter: drop-shadow(0 0 0 rgba(255, 255, 255, 0)); }
  40% { stroke: #fff; filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.9)); }
  100% { filter: none; }
}

@keyframes bloom {
  0% { opacity: 0; transform: scale(0.2); }
  35% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.4); }
}

@keyframes wave {
  0% { opacity: 0.8; transform: scale(0.8); }
  100% { opacity: 0; transform: scale(9); }
}

/* ---------- el regalo abierto: entradas escalonadas ---------- */

.moment-view {
  animation: none;
  gap: 24px;
}

.moment-view:not(.moment-pending) > * {
  animation: riseIn 0.95s var(--ease-out) both;
  animation-delay: calc(0.1s + var(--i, 0) * 0.12s);
}

.moment-from {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}

.moment-from::before,
.moment-from::after {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  opacity: 0.5;
}

.moment-dedication {
  margin: 0;
  max-width: 100%;
  font-size: 26px;
  font-weight: 350;
  line-height: 1.42;
  letter-spacing: -0.005em;
  text-wrap: balance;
}

.moment-dedication .quote {
  font-size: 1.15em;
  line-height: 0;
}

.ded-chunk {
  display: inline-block;
  transform: translateY(6px);
  filter: blur(8px);
  transition: opacity 1.2s var(--ease-out), filter 1.2s var(--ease-out), transform 1.2s var(--ease-out);
}

.ded-chunk.on {
  transform: none;
}

.player-wrap {
  border-radius: 14px;
  box-shadow: 0 24px 48px -22px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.07);
}

.full-track-link,
.spotify-credit,
.end-sub {
  font-family: var(--sans);
}

/* ---------- pantallas finales ---------- */

.end-title {
  font-size: 23px;
  font-weight: 350;
  text-wrap: balance;
}

.kept-dedication {
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07);
}

.kept-text {
  font-size: 19px;
  font-weight: 350;
}

@media (prefers-reduced-motion: reduce) {
  body::before,
  .mark-halo,
  .mark-ring,
  .gift-mark,
  .gift-mark .pulse,
  .wrapper-screen .mark-wrap,
  .wrapper-text,
  .wrapper-hint,
  .wrapper-safe,
  .moment-view:not(.moment-pending) > * {
    animation: none !important;
    opacity: 1;
    filter: none;
    transform: none;
  }
  .mark-ring { opacity: 0; }
  .gift-mark .pulse { stroke-dashoffset: 0; }
  .ded-chunk { transform: none !important; }
}

/* ---------- reproductor propio (muestra de Apple) ---------- */

.player-wrap.own-player {
  overflow: visible;
  box-shadow: none;
}

.op {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 24px 48px -22px rgba(0, 0, 0, 0.7);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  text-align: left;
}

.op-art {
  position: relative;
  flex: none;
  width: 76px;
  height: 76px;
  border-radius: 12px;
  background: #2a1d3a center / cover no-repeat;
  box-shadow: 0 10px 22px -10px rgba(0, 0, 0, 0.8);
}

.op-btn {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(10, 6, 18, 0.55);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.2s var(--ease-out), background 0.2s ease;
}

.op-btn:active {
  transform: scale(0.92);
}

/* Triángulo de play / dos barras de pausa, dibujados con CSS. */
.op-btn::before,
.op-btn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
}

.op-btn::before {
  margin: -8px 0 0 -4px;
  border-style: solid;
  border-width: 8px 0 8px 13px;
  border-color: transparent transparent transparent #fff;
}

.op.is-playing .op-btn::before,
.op.is-playing .op-btn::after {
  margin: -8px 0 0;
  width: 4px;
  height: 16px;
  border: none;
  border-radius: 2px;
  background: #fff;
}

.op.is-playing .op-btn::before { margin-left: -6px; }
.op.is-playing .op-btn::after { margin-left: 2px; }

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

.op-title,
.op-artist {
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.op-title {
  font-size: 17px;
  font-weight: 500;
  color: var(--text);
}

.op-artist {
  margin-top: 2px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--text-dim);
}

.op-bar {
  position: relative;
  height: 3px;
  margin-top: 12px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
}

.op-fill {
  position: absolute;
  inset: 0;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s linear;
}

/* Barras que laten mientras suena (el mismo pulso de la marca). */
.op.is-playing .op-art {
  animation: artPulse var(--beat) var(--ease-in-out) infinite;
}

@keyframes artPulse {
  0%, 100% { transform: scale(1); }
  12% { transform: scale(1.03); }
  36% { transform: scale(1.015); }
}

/* ---------- "Escúchala completa en" ---------- */

.listen-on {
  width: 100%;
}

.listen-on-title {
  margin: 0 0 10px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  opacity: 0.8;
}

.listen-on-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.listen-chip {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--text);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
  transition: box-shadow 0.2s ease, color 0.2s ease;
}

.listen-chip:hover,
.listen-chip:focus-visible {
  color: var(--gold);
  box-shadow: inset 0 0 0 1px var(--gold);
}

@media (prefers-reduced-motion: reduce) {
  .op.is-playing .op-art { animation: none; }
}

/* ---------- video de YouTube (Premium) ---------- */

.player-wrap.has-video {
  overflow: hidden;
}

.yt-box {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
}

.yt-box iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Botón propio de play sobre el video (solo se ve en pausa). */
.yt-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 64px;
  height: 64px;
  margin: -32px 0 0 -32px;
  border: none;
  border-radius: 50%;
  background: rgba(10, 6, 18, 0.6);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.3s ease, transform 0.2s var(--ease-out);
}

.yt-play::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  margin: -11px 0 0 -6px;
  border-style: solid;
  border-width: 11px 0 11px 18px;
  border-color: transparent transparent transparent #fff;
}

.yt-play:active {
  transform: scale(0.92);
}

.yt-box.is-playing .yt-play {
  opacity: 0;
  pointer-events: none;
}

/* ---------- elegir la escena (dentro de la app) ---------- */

.pick {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pick .end-title,
.pick .end-sub {
  margin: 0;
}

.pick-from {
  margin: 0;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  color: var(--gold);
}

.pick .listen-chip {
  border: none;
  font-size: 14px;
  cursor: pointer;
}

/* ======================================================================
   Aperturas Premium
   ====================================================================== */

/* ---------- Telón de cine ---------- */

.opening-telon {
  overflow: hidden;
  background: rgba(5, 2, 6, 0.6);
}

.opening-telon .curtain {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 51%;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.35), transparent 18%, transparent 82%, rgba(0, 0, 0, 0.55)),
    repeating-linear-gradient(90deg, #5a0a14 0, #8e1626 3.2vw, #b02234 4.6vw, #8e1626 6vw, #5a0a14 8.4vw);
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.6);
  animation: curtainOpen 1.35s var(--ease-in-out) 0.25s forwards;
}

.opening-telon .curtain.left {
  left: 0;
  transform-origin: left center;
  --dir: -1;
}

.opening-telon .curtain.right {
  right: 0;
  transform-origin: right center;
  --dir: 1;
}

.opening-telon .valance {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 9vh;
  background: repeating-radial-gradient(circle at 50% -40%, #b02234 0 3vw, #6d0f1c 3vw 4vw);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  border-bottom: 2px solid rgba(214, 168, 96, 0.7);
}

.opening-telon .stage-light {
  position: absolute;
  inset: 0;
  background: radial-gradient(40% 60% at 50% 30%, rgba(255, 230, 180, 0.35), transparent 70%);
  opacity: 0;
  animation: bloom 1.6s var(--ease-out) 0.4s forwards;
}

@keyframes curtainOpen {
  0% { transform: translateX(0) scaleX(1); }
  15% { transform: translateX(calc(var(--dir) * -1%)) scaleX(1.01); }
  100% { transform: translateX(calc(var(--dir) * 100%)) scaleX(0.7); }
}

/* ---------- Carta ---------- */

.opening-carta {
  background: rgba(8, 4, 12, 0.45);
}

.envelope {
  position: relative;
  width: 230px;
  height: 150px;
  perspective: 700px;
  animation: envIn 0.5s var(--ease-out) both, envOut 0.6s var(--ease-in-out) 1.25s forwards;
}

.env-back,
.env-front {
  position: absolute;
  inset: 0;
  border-radius: 10px;
}

.env-back {
  background: linear-gradient(160deg, #e9dcc4, #cdb894);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.7);
}

.env-front {
  background:
    linear-gradient(32deg, #f3e8d4 49.6%, transparent 50%) left / 50% 100% no-repeat,
    linear-gradient(-32deg, #f3e8d4 49.6%, transparent 50%) right / 50% 100% no-repeat,
    linear-gradient(0deg, #efe2ca 40%, transparent 41%);
  z-index: 3;
}

.env-flap {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 62%;
  background: linear-gradient(180deg, #dcc8a6, #c9b088);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top center;
  z-index: 4;
  animation: flapOpen 0.6s var(--ease-in-out) 0.3s forwards;
}

.env-card {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 8%;
  height: 84%;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #fffaf2;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 2;
  animation: cardUp 0.7s var(--ease-out) 0.75s forwards;
}

.env-heart {
  font-size: 34px;
  color: #b02234;
  animation: heartbeat var(--beat) var(--ease-in-out) infinite;
}

@keyframes envIn {
  from { opacity: 0; transform: translateY(30px) scale(0.9); }
  to { opacity: 1; transform: none; }
}

@keyframes flapOpen {
  to { transform: rotateX(180deg); z-index: 1; }
}

@keyframes cardUp {
  to { transform: translateY(-70%); }
}

@keyframes envOut {
  to { opacity: 0; transform: translateY(-24px) scale(1.15); filter: blur(10px); }
}

/* ---------- Polvo de estrellas ---------- */

.opening-estrellas {
  background: rgba(3, 3, 12, 0.55);
}

.stars {
  position: absolute;
  left: 50%;
  top: 50%;
}

.star {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--s);
  height: var(--s);
  margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2);
  border-radius: 50%;
  background: #fff6dc;
  box-shadow: 0 0 8px 2px rgba(255, 220, 150, 0.8);
  opacity: 0;
  animation: starIn 0.9s var(--ease-in-out) var(--d) forwards, starOut 0.6s var(--ease-out) 1.05s forwards;
}

@keyframes starIn {
  0% { opacity: 0; transform: translate(var(--x), var(--y)) scale(0.4); }
  30% { opacity: 1; }
  100% { opacity: 1; transform: translate(0, 0) scale(1); }
}

@keyframes starOut {
  from { transform: translate(0, 0) scale(1); }
  to { opacity: 0; transform: translate(calc(var(--x) * 0.6), calc(var(--y) * 0.6)) scale(0.2); }
}

.opening-estrellas .opening-light {
  animation-delay: 0.95s;
}

/* ---------- insignia "✦ Premium" de quien regala ---------- */

.premium-badge {
  margin-left: 4px;
  padding: 3px 9px;
  border: none;
  border-radius: 999px;
  font: inherit;
  font-size: 10px;
  letter-spacing: 0.16em;
  color: #1a0f24;
  background: linear-gradient(135deg, #f6dca0, #d6a860 55%, #b98a3e);
  box-shadow: 0 0 0 1px rgba(255, 236, 190, 0.4), 0 4px 12px -4px rgba(214, 168, 96, 0.8);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  animation: badgeShine 3.2s var(--ease-in-out) 1.5s infinite;
}

@keyframes badgeShine {
  0%, 80%, 100% { filter: brightness(1); }
  88% { filter: brightness(1.35); }
}

.premium-sheet {
  position: fixed;
  inset: 0;
  z-index: 2500;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  background: rgba(5, 3, 10, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: fadeIn 0.25s ease both;
}

.premium-sheet.leaving {
  animation: fadeOut 0.25s ease forwards;
}

.premium-card {
  width: 100%;
  max-width: 420px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 22px 20px 18px;
  border-radius: 22px;
  text-align: left;
  background: linear-gradient(180deg, #2a1a3c, #160d22);
  box-shadow: inset 0 0 0 1px rgba(214, 168, 96, 0.35), 0 30px 60px -20px rgba(0, 0, 0, 0.8);
  animation: riseIn 0.45s var(--ease-out) both;
}

.premium-card-title {
  margin: 0 0 6px;
  font-size: 21px;
  color: var(--gold);
}

.premium-card .end-sub {
  margin: 0 0 10px;
}

.premium-perks {
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
}

.premium-perks li {
  position: relative;
  padding: 6px 0 6px 24px;
}

.premium-perks li::before {
  content: "✦";
  position: absolute;
  left: 2px;
  color: var(--gold);
}

.premium-card .full-track-link {
  display: block;
  margin: 12px auto 0;
  background: none;
  cursor: pointer;
}

@keyframes fadeIn {
  from { opacity: 0; }
}

@keyframes fadeOut {
  to { opacity: 0; }
}
