  /* Theme: Amantes (default), Dios, Amigas, Exes, Jess */
  :root, html.theme-amantes {
    --bg: #122139;
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-stem: rgba(255, 255, 255, 0.28);
    --glow-border: rgba(245, 148, 184, 0.47);
    --glow-shadow: #f594b8;
    --glow-pulse: #f594b8;
    --thorn-cutout: #122139;
    --stem: #066406;
    --leaf: #338f37;
    --sparkle-bg: #ff96c0;
    --sparkle-glow: #ff4e85;
    --petal-base: #d52d58;
    --petal-center: #ce3e62;
    --petal-mid: #b81b43;
    --petal-dark: #9e183a;
    --petal-accent: #c9204b;
    --toggle-track: #2a3a52;
    --toggle-knob: #e8e8e8;
    --banner-title: #e8e8e8;
    --card-text: #d0d4d8;
  }
  html.theme-dios {
    --bg: #87ceeb;
    --glass-border: rgba(255, 255, 255, 0.9);
    --glass-stem: rgba(255, 255, 255, 0.5);
    --glow-border: rgba(255, 255, 255, 0.85);
    --glow-shadow: #fff;
    --glow-pulse: #fff;
    --thorn-cutout: #87ceeb;
    --stem: #2d7d2d;
    --leaf: #3da03d;
    --sparkle-bg: #fff;
    --sparkle-glow: rgba(255, 255, 255, 0.95);
    --petal-base: #f5f3f8;
    --petal-center: #ffffff;
    --petal-mid: #e8e4f0;
    --petal-dark: #ddd8e8;
    --petal-accent: #e4e0ed;
    --toggle-track: #b8d4e8;
    --toggle-knob: #fff;
    --banner-title: #1a3a52;
    --card-text: #2c3e50;
  }
  html.theme-amigas {
    --bg: #ff8a8e;
    --glass-border: rgba(255, 255, 255, 0.9);
    --glass-stem: rgba(255, 255, 255, 0.6);
    --glow-border: rgba(255, 248, 220, 0.65);
    --glow-shadow: #FFF8DC;
    --glow-pulse: #FFFAF0;
    --thorn-cutout: #ff8a8e;
    --stem: #2d7d2d;
    --leaf: #3da03d;
    --sparkle-bg: #c99570;
    --sparkle-glow: #b87a5c;
    --petal-base: #fdda4d;
    --petal-center: #FFEAA2;
    --petal-mid: #fecd51;
    --petal-dark: #FDB000;
    --petal-accent: #a86a52;
    --toggle-track: #e8c8cc;
    --toggle-knob: #fff;
    --banner-title: #4a3728;
    --card-text: #5c4033;
  }
  html.theme-exes {
    --bg: #22201d;
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-stem: rgba(255, 255, 255, 0.2);
    --glow-border: rgba(184, 169, 201, 0.45);
    --glow-shadow: #b8a9c9;
    --glow-pulse: #d4c8e0;
    --thorn-cutout: #22201d;
    --stem: #2d4a2d;
    --leaf: #3d5a3d;
    --sparkle-bg: #d4c8e0;
    --sparkle-glow: #b8a9c9;
    --petal-base: #b8a9c9;
    --petal-center: #d4c8e0;
    --petal-mid: #a090b8;
    --petal-dark: #8b7aa3;
    --petal-accent: #c4b8d4;
    --toggle-track: #2d2d2d;
    --toggle-knob: #e0e0e0;
    --banner-title: #e8e8e8;
    --card-text: #d0d4d8;
  }
  html.theme-jess {
    --bg: #d3e0ed;
    --glass-border: rgba(107, 140, 174, 0.5);
    --glass-stem: rgba(107, 140, 174, 0.35);
    --glow-border: rgba(107, 140, 174, 0.4);
    --glow-shadow: #6b8cae;
    --glow-pulse: #7d9bb8;
    --thorn-cutout: #d3e0ed;
    --stem: #4a6582;
    --leaf: #5a7a9a;
    --sparkle-bg: #7d9bb8;
    --sparkle-glow: #6b8cae;
    --petal-base: #6b8cae;
    --petal-center: #7d9bb8;
    --petal-mid: #5a7a9a;
    --petal-dark: #4a6582;
    --petal-accent: #7d9bb8;
    --toggle-track: #b0bcc8;
    --toggle-knob: #fff;
    --banner-title: #2c3e50;
    --card-text: #2c3e50;
  }

  html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
  }
  html, body {
    min-height: 100%;
    height: 100%;
    width: 100%;
    margin: 0;
    background: var(--bg);
    overflow-x: hidden;
    overflow-y: hidden;
    transition: background 0.4s ease;
  }

  body {
    display: grid;
    grid-template-rows: auto 1fr;
    grid-template-columns: 1fr 1fr;
    gap: 0 1.5rem;
    max-width: 700px;
    margin: 0 auto;
    width: 100%;
    min-height: 0;
  }
  .banner {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.125rem 1.875rem;
    width: 100%;
    box-sizing: border-box;
  }
  .banner-title {
    margin: 3rem 0 1rem 0;
    font-family: system-ui, sans-serif;
    font-size: 2.25rem;
    font-weight: 600;
    color: var(--banner-title);
  }
  .rose-controls .fa-solid {
    font-size: 1.1rem;
    display: block;
    line-height: 1;
  }
  .play-pause .fa-solid {
    font-size: 1.44rem;
  }
  .play-pause {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--toggle-track);
    color: var(--toggle-knob);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
  }
  .play-pause:hover {
    transform: scale(1.05);
  }
  .play-pause:focus-visible {
    outline: 2px solid var(--glow-shadow);
    outline-offset: 2px;
  }
  .play-pause .play-icon {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .play-pause .pause-icon {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .play-pause .play-pause-icon[hidden] {
    display: none;
  }

  .prev-btn,
  .next-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--toggle-track);
    color: var(--toggle-knob);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
  }
  .prev-btn:hover,
  .next-btn:hover {
    transform: scale(1.05);
  }
  .prev-btn:focus-visible,
  .next-btn:focus-visible {
    outline: 2px solid var(--glow-shadow);
    outline-offset: 2px;
  }

  .card-content {
    position: relative;
    min-width: 0;
    min-height: 0;
    width: 300px;
    max-width: 300px;
    justify-self: end;
    box-sizing: border-box;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .card-content::before {
    content: '';
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    height: 3rem;
    background: var(--bg);
    -webkit-mask-image: linear-gradient(to bottom, black, transparent);
    mask-image: linear-gradient(to bottom, black, transparent);
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    pointer-events: none;
    display: block;
    margin-bottom: -3rem;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.2s ease, background-color 0.4s ease;
  }
  .card-content.scrolled-from-top::before {
    opacity: 1;
  }
  .card-content::after {
    content: '';
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3rem;
    background: var(--bg);
    -webkit-mask-image: linear-gradient(to top, black, transparent);
    mask-image: linear-gradient(to top, black, transparent);
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    pointer-events: none;
    display: block;
    margin-top: -3rem;
    transition: background-color 0.4s ease;
  }
  .card-content::-webkit-scrollbar {
    display: none;
  }
  .card-text {
    padding: 1.25rem 1.5rem;
    font-family: system-ui, sans-serif;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--card-text);
  }
  .playlist {
    list-style: decimal;
    margin: 0;
    padding-left: 1.5rem;
  }
  .playlist-item {
    margin-bottom: 0.75rem;
    padding: 0.5rem 0;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--card-text);
  }
  html.theme-dios .playlist-item,
  html.theme-amigas .playlist-item,
  html.theme-jess .playlist-item {
    border-bottom-color: rgba(0, 0, 0, 0.08);
  }
  .playlist-item:hover {
    color: var(--glow-shadow);
  }
  .playlist-item.playing {
    color: var(--glow-shadow);
    font-weight: 600;
  }
  .playlist-title {
    display: block;
    font-size: 1rem;
    font-weight: 600;
  }
  .playlist-artist {
    display: block;
    font-size: 0.875rem;
    font-weight: normal;
    opacity: 0.9;
    margin-top: 0.15rem;
  }
  .card-rose {
    position: relative;
    width: 100%;
    max-width: 340px;
    justify-self: start;
    box-sizing: border-box;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
  }
  .card-rose .rose-visual {
    position: relative;
    width: 100%;
    min-height: 300px;
    flex-shrink: 0;
  }
  @media (min-width: 440px) {
    .card-rose .rose-visual {
      min-height: 340px;
    }
    .card-rose .container {
      -moz-transform: scale(0.8);
      -ms-transform: scale(0.8);
      -webkit-transform: scale(0.8);
      transform: scale(0.8);
    }
  }
  .rose-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-shrink: 0;
  }
  @media (min-width: 440px) {
    .card-rose {
      margin-top: 4rem;
    }
  }
  @media (min-width: 440px) {
    .rose-controls {
      margin-left: -10px;
      transform: scale(0.85);
      transform-origin: center center;
    }
  }

  @media (max-width: 439px) {
    body {
      grid-template-columns: 1fr;
      grid-template-rows: auto auto 1fr;
    }
    .banner {
      padding: 0;
    }
    .card-content,
    .card-rose {
      width: auto;
      max-width: none;
      justify-self: stretch;
    }
    .card-rose {
      --mobile-rose-scale: 0.5;
      --mobile-controls-scale: 1;
      order: 1;
      min-height: 0;
    }
    .card-rose .rose-visual {
      min-height: 0;
      height: calc(300px * var(--mobile-rose-scale));
      transform: scale(var(--mobile-rose-scale));
      transform-origin: center top;
    }
    .card-rose .rose-controls {
      transform: scale(var(--mobile-controls-scale));
      transform-origin: center top;
      margin-top: 1rem;
    }
    .card-content {
      order: 2;
    }
  }

  .container {
    --loopDuration: 28s;
    --startDelay: 0s;
    --petalsPerSide: 4;
    --startInterval: calc(var(--loopDuration) / var(--petalsPerSide));
    width: 100px;
    height: 300px;
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    margin: auto;
    margin-top: 20px;
    -moz-transform: scale(0.6);
    -ms-transform: scale(0.6);
    -webkit-transform: scale(0.6);
    transform: scale(0.6);
  }
  .container div {
    position: absolute;
  }
  .container .glass {
    height: 420px;
    width: 250px;
    border: 3px solid var(--glass-border);
    -moz-border-radius: 300px 300px 0px 0px;
    -webkit-border-radius: 300px;
    border-radius: 300px 300px 0px 0px;
    left: -80px;
    top: -100px;
    border-bottom: 15px solid var(--glass-border);
    transform: translateX(-3px);
  }
  .container .glass:after {
    width: 8px;
    background: var(--glass-stem);
    content: '';
    position: absolute;
    height: 80px;
    top: 430px;
    border-radius: 100px;
    left: 10px;
    top: 180px;
  }
  .container .glass:before {
    width: 8px;
    background: var(--glass-stem);
    content: '';
    position: absolute;
    height: 15px;
    top: 430px;
    border-radius: 100px;
    left: 10px;
    top: 280px;
  }
  .container .glow {
    position: absolute;
    width: 170px;
    height: 170px;
    -moz-border-radius: 100%;
    -webkit-border-radius: 100%;
    border-radius: 100%;
    border: 1px solid var(--glow-border);
    box-shadow: 0px 0px 10px var(--glow-shadow);
    left: -40px;
    top: -40px;
    transform: translateX(-3px);
    -moz-transition: all 0.5s ease;
    -o-transition: all 0.5s ease;
    -webkit-transition: all 0.5s ease;
    transition: all 0.5s ease;
    -moz-animation: glowing 2.5s ease-in-out infinite;
    -webkit-animation: glowing 2.5s ease-in-out infinite;
    animation: glowing 2.5s ease-in-out infinite;
  }
  .container .rose-petals > div {
    --fall-enabled: 0; /* rose petals do not fall by default */
    background: var(--petal-base);
    width: 45px;
    height: 80px;
    position: absolute;
    -moz-transition: all 0.5s ease-out;
    -o-transition: all 0.5s ease-out;
    -webkit-transition: all 0.5s ease-out;
    transition: all 0.5s ease-out;
  }
  .container .rose-petals > div:nth-child(1) {
    border-radius: 15px;
    left: 20px;
    top: 0px;
    background: var(--petal-center);
  }
  .container .rose-petals > div:nth-child(2), .container .rose-petals > div:nth-child(4), .container .rose-petals > div:nth-child(6), .container .rose-petals > div:nth-child(8), .container .rose-petals > div:nth-child(10), .container .rose-petals > div:nth-child(12) {
    border-radius: 0px 30px 0px 30px;
    /* background: #b81b43; */
    left: 0;
    transform-origin: bottom right;

    -moz-animation: bloomFallLeft var(--loopDuration) ease-in-out infinite;
    -webkit-animation: bloomFallLeft var(--loopDuration) ease-in-out infinite;
    animation: bloomFallLeft var(--loopDuration) ease-in-out infinite;
    -moz-animation-fill-mode: forwards;
    -webkit-animation-fill-mode: forwards;
    animation-fill-mode: forwards;
    background: var(--petal-base);
    top: 10px;
    height: 70px;
    z-index: 1;
  }
  .container .rose-petals > div:nth-child(3), .container .rose-petals > div:nth-child(5), .container .rose-petals > div:nth-child(7), .container .rose-petals > div:nth-child(9), .container .rose-petals > div:nth-child(11), .container .rose-petals > div:nth-child(13) {
    border-radius: 30px 0px 30px 0px;
    left: 40px;
    transform-origin: bottom left;

    -moz-animation: bloomFallRight var(--loopDuration) ease-in-out infinite;
    -webkit-animation: bloomFallRight var(--loopDuration) ease-in-out infinite;
    animation: bloomFallRight var(--loopDuration) ease-in-out infinite;
    -moz-animation-fill-mode: forwards;
    -webkit-animation-fill-mode: forwards;
    animation-fill-mode: forwards;
    background: var(--petal-base);
    top: 10px;
    height: 70px;
    z-index: 2;
  }
  .container .rose-petals > div:nth-child(2) {
    --fall-enabled: 1;
    --myDelay: calc(var(--startDelay));
    -moz-animation-delay: var(--myDelay);
    -webkit-animation-delay: var(--myDelay);
    animation-delay: var(--myDelay);
  }
  .container .rose-petals > div:nth-child(3) {
    --myDelay: calc(var(--startDelay));
    -moz-animation-delay: var(--myDelay);
    -webkit-animation-delay: var(--myDelay);
    animation-delay: var(--myDelay);
  }
  .container .rose-petals > div:nth-child(4) {
    --myDelay: calc(var(--startDelay) + var(--startInterval) * 1);
    -moz-animation-delay: var(--myDelay);
    -webkit-animation-delay: var(--myDelay);
    animation-delay: var(--myDelay);
  }
  .container .rose-petals > div:nth-child(5) {
    --fall-enabled: 1;
    --myDelay: calc(var(--startDelay) + var(--startInterval) * 1);
    -moz-animation-delay: var(--myDelay);
    -webkit-animation-delay: var(--myDelay);
    animation-delay: var(--myDelay);
  }
  /* .container .rose-petals > div:nth-child(6) {
    -moz-animation: openRose6 3s ease-in-out;
    -webkit-animation: openRose6 3s ease-in-out;
    animation: openRose6 3s ease-in-out;
    -moz-animation-fill-mode: forwards;
    -webkit-animation-fill-mode: forwards;
    animation-fill-mode: forwards;
    z-index: 1;
    background: var(--petal-accent);
    top: "";
    height: "";
    -moz-animation-delay: 2s;
    -webkit-animation-delay: 2s;
    animation-delay: 2s;
  } */
  .container .rose-petals > div:nth-child(6) {
    --myDelay: calc(var(--startDelay) + var(--startInterval) * 2);
    -moz-animation-delay: var(--myDelay);
    -webkit-animation-delay: var(--myDelay);
    animation-delay: var(--myDelay);
  }
  .container .rose-petals > div:nth-child(7) {
    --myDelay: calc(var(--startDelay) + var(--startInterval) * 2);
    -moz-animation-delay: var(--myDelay);
    -webkit-animation-delay: var(--myDelay);
    animation-delay: var(--myDelay);
  }
  .container .rose-petals > div:nth-child(8) {
    --myDelay: calc(var(--startDelay) + var(--startInterval) * 3);
    -moz-animation-delay:  var(--myDelay);
    -webkit-animation-delay: var(--myDelay);
    animation-delay: var(--myDelay);
  }
  .container .rose-petals > div:nth-child(9) {
    --fall-enabled: 1;
    --myDelay: calc(var(--startDelay) + var(--startInterval) * 3);
    -moz-animation-delay: var(--myDelay);
    -webkit-animation-delay: var(--myDelay);
    animation-delay: var(--myDelay);
  }
  .container .rose-petals > div:nth-child(10) {
    --myDelay: calc(var(--startDelay) + var(--startInterval) * 4);
    -moz-animation-delay:  var(--myDelay);
    -webkit-animation-delay: var(--myDelay);
    animation-delay: var(--myDelay);
  }
  .container .rose-petals > div:nth-child(11) {
    --myDelay: calc(var(--startDelay) + var(--startInterval) * 4);
    -moz-animation-delay: var(--myDelay);
    -webkit-animation-delay: var(--myDelay);
    animation-delay: var(--myDelay);
  }
  .container .rose-petals > div:nth-child(12) {
    --fall-enabled: 1;
    --myDelay: calc(var(--startDelay) + var(--startInterval) * 5);
    -moz-animation-delay:  var(--myDelay);
    -webkit-animation-delay: var(--myDelay);
    animation-delay: var(--myDelay);
  }
  .container .rose-petals > div:nth-child(13) {
    --myDelay: calc(var(--startDelay) + var(--startInterval) * 5);
    -moz-animation-delay:  var(--myDelay);
    -webkit-animation-delay: var(--myDelay);
    animation-delay: var(--myDelay);
  }
  .container .rose-leaves > div:nth-last-child(1) {
    width: 55px;
    height: 30px;
    background: var(--leaf);
    position: absolute;
    top: 60px;
    left: 15px;
    -moz-border-radius: 100px;
    -webkit-border-radius: 100px;
    border-radius: 100px;
  }
  .container .rose-leaves > div:nth-child(1) {
    width: 6px;
    height: 230px;
    border: none;
    top: 80px;
    background: var(--stem);
    left: 40px;
  }
  .container .thorns > div {
    width: 30px;
    height: 30px;
    background: var(--stem);
    top: 100px;
    left: 10px;
  }
  .container .thorns > div:after {
    width: 41px;
    height: 31px;
    -moz-border-radius: 100%;
    -webkit-border-radius: 100%;
    border-radius: 100%;
    background: var(--thorn-cutout);
    content: "";
    position: absolute;
    left: -12px;
    top: 17px;
    transition: background 0.4s ease;
  }
  .container .thorns > div:before {
    width: 41px;
    height: 31px;
    -moz-border-radius: 100%;
    -webkit-border-radius: 100%;
    border-radius: 100%;
    background: var(--thorn-cutout);
    content: "";
    position: absolute;
    left: -11px;
    top: -11px;
    z-index: 0;
    transition: background 0.4s ease;
  }
  .container .thorns > div:nth-child(2) {
    top: 150px;
    -moz-transform: rotate(180deg);
    -ms-transform: rotate(180deg);
    -webkit-transform: rotate(180deg);
    transform: rotate(180deg);
    left: 45px;
  }
  .container .thorns > div:nth-child(3) {
    top: 180px;
  }
  .container .thorns > div:nth-child(4) {
    top: 220px;
    -moz-transform: rotate(180deg);
    -ms-transform: rotate(180deg);
    -webkit-transform: rotate(180deg);
    transform: rotate(180deg);
    left: 45px;
  }
  .container .sparkles {
    bottom: -40px;
  }
  .container .sparkles > div {
    width: 4px;
    height: 4px;
    border-radius: 100px;
    background: var(--sparkle-bg);
    box-shadow: 0px 0px 12px 2px var(--sparkle-glow);
    bottom: 0;
    opacity: 0;
    -moz-animation: sparkle 4s ease-in-out infinite;
    -webkit-animation: sparkle 4s ease-in-out infinite;
    animation: sparkle 4s ease-in-out infinite;
  }
  .container .sparkles > div:nth-child(1) {
    left: 60px;
    -moz-animation-delay: 3s;
    -webkit-animation-delay: 3s;
    animation-delay: 3s;
  }
  .container .sparkles > div:nth-child(2) {
    left: 158px;
    -moz-animation-delay: 2s;
    -webkit-animation-delay: 2s;
    animation-delay: 2s;
  }
  .container .sparkles > div:nth-child(3) {
    left: -22px;
    -moz-animation-delay: 1s;
    -webkit-animation-delay: 1s;
    animation-delay: 1s;
  }
  .container .sparkles > div:nth-child(4) {
    left: 10px;
    -moz-animation-delay: 1s;
    -webkit-animation-delay: 1s;
    animation-delay: 1s;
  }
  .container .sparkles > div:nth-child(5) {
    left: 177px;
    -moz-animation-delay: 3s;
    -webkit-animation-delay: 3s;
    animation-delay: 3s;
  }
  .container .sparkles > div:nth-child(6) {
    left: -82px;
    -moz-animation-delay: 2s;
    -webkit-animation-delay: 2s;
    animation-delay: 2s;
  }
  .container .sparkles > div:nth-child(7) {
    left: 45px;
    -moz-animation-delay: 3s;
    -webkit-animation-delay: 3s;
    animation-delay: 3s;
  }
  .container .sparkles > div:nth-child(8) {
    left: 74px;
    -moz-animation-delay: 3s;
    -webkit-animation-delay: 3s;
    animation-delay: 3s;
  }
  .container .sparkles > div:nth-child(9) {
    left: -79px;
    -moz-animation-delay: 2s;
    -webkit-animation-delay: 2s;
    animation-delay: 2s;
  }
  
  @keyframes sparkle {
    50% {
      opacity: 1;
    }
    100% {
      bottom: 250px;
    }
  }
  @keyframes openRose2 {
    50% {
      -moz-transform: rotate(-90deg);
      -ms-transform: rotate(-90deg);
      -webkit-transform: rotate(-90deg);
      transform: rotate(-90deg);
      top: 80px;
      left: 100px;
    }
    100% {
      -moz-transform: rotate(-60deg);
      -ms-transform: rotate(-60deg);
      -webkit-transform: rotate(-60deg);
      transform: rotate(-60deg);
      top: 210px;
      left: -30px;
    }
  }
  @keyframes openRose3 {
    100% {
      -moz-transform: rotate(60deg);
      -ms-transform: rotate(60deg);
      -webkit-transform: rotate(60deg);
      transform: rotate(60deg);
    }
  }
  @keyframes openRose4 {
    100% {
      -moz-transform: rotate(-30deg);
      -ms-transform: rotate(-30deg);
      -webkit-transform: rotate(-30deg);
      transform: rotate(-30deg);
    }
  }
  @keyframes openRose5 {
    100% {
      -moz-transform: rotate(30deg);
      -ms-transform: rotate(30deg);
      -webkit-transform: rotate(30deg);
      transform: rotate(30deg);
    }
  }
  @keyframes glowing {
    50% {
      box-shadow: 0px 0px 60px var(--glow-pulse);
    }
  }

  @keyframes bloomFallLeft {
    /* Starting state - vertical, about to open */
    0% {
      transform: rotate(0deg);
      top: 10px;
      left: 0;
      background: var(--petal-base);
      opacity: 1;
      z-index: 3;
      /* animation-timing-function: cubic-bezier(0.5, 0, 0.5, 1); */
      animation-timing-function: linear;
      /* animation-timing-function: cubic-bezier(0.5, 0, 0.5, 1); */
    }
    /* Adjust z-index to stay on top while opening */
    13.5% {
      z-index: 5;
    }
    /* Color transform mid fall */
    25% {
      background: var(--petal-mid);
      z-index: 7;
    }
    /* Adjust z-index to stay on top while opening */
    37.5% {
      z-index: 9;
    }
    /* 45% {
      transform: rotate(-56deg);
      top: 10px;
      left: 0;
    } */
    /* Fully opened */
    50% {
      transform: rotate(-55deg);
      top: 10px;
      left: 0;
      background: var(--petal-dark);
      opacity: 1;
      z-index: 11;
    }
    60% {
      transform: rotate(-55deg);
      top: 10px;
      left: 0;
      background: var(--petal-dark);
      opacity: 1;
      z-index: 11;
    }
    /* Mid-point of fall (swooped right) */
    65% {
      transform: rotate(-90deg);
      top: 80px;
      left: 100px;
      background: var(--petal-dark);
      opacity: 1;
      z-index: 11;
    }
    /* Fallen to the ground (swooped left) */
    71% {
      transform: rotate(-60deg);
      top: 210px;
      left: -30px;
      background: var(--petal-dark);
      opacity: 1;
      z-index: 11;
    }
    /* Fade out out on the ground */ 
    75% {
      transform: rotate(-60deg);
      top: 210px;
      left: -30px;
      background: var(--petal-dark);
      opacity: 0;
      z-index: 11;
    }
    /* Back to top, invisible until we get there */
    76% {
      transform: rotate(0deg);
      top: 10px;
      left: 0;
      background: var(--petal-base);
      opacity: 0;
      z-index: 1;
    }
    /* Make visible again */
    77% {
      opacity: 1;
    }
    /* 75% {
      -moz-transform: rotate(-60deg);
      -ms-transform: rotate(-60deg);
      -webkit-transform: rotate(-60deg);
      transform: rotate(-60deg);
      top: 210px;
      left: -30px;
      background: var(--petal-dark);
      opacity: 0;
      z-index: 11;
    } */
/* 
    76%, 100% {
      -moz-transform: rotate(0deg);
      -ms-transform: rotate(0deg);
      -webkit-transform: rotate(0deg);
      transform: rotate(0deg);
      top: 10px;
      left: 0;
      background: var(--petal-base);
      opacity: 1;
      z-index: 1;
    } */
  }

  @keyframes bloomFallRight {
    /* Starting state - vertical, about to open */
    0% {
      transform: rotate(0deg);
      top: 10px;
      left: 40px;
      background: var(--petal-base);
      opacity: 1;
      z-index: 2;
      animation-timing-function: linear;
    }
    /* Adjust z-index to stay on top while opening */
    13.5% {
      z-index: 4;
    }
    /* Color transform mid fall */
    25% {
      background: var(--petal-mid);
      z-index: 6;
    }
    /* Adjust z-index to stay on top while opening */
    37.5% {
      z-index: 8;
    }
    /* Fully opened */
    50% {
      transform: rotate(55deg);
      top: 10px;
      left: 40px;
      background: var(--petal-dark);
      opacity: 1;
      z-index: 10;
    }
    /* pause before fall */
    52% {
      transform: rotate(55deg);
      top: 10px;
      left: 40px;
      background: var(--petal-dark);
      opacity: 1;
      z-index: 10;
    }
    /* Mid-point of fall (swooped left) */
    57% {
      transform: rotate(90deg);
      top: 80px;
      left: 0;
      background: var(--petal-dark);
      opacity: 1;
      z-index: 10;
    }
    /* Fallen to the ground (swooped right) */
    62% {
      transform: rotate(60deg);
      top: 210px;
      left: 110px;
      background: var(--petal-dark);
      opacity: 1;
      z-index: 10;
    }
    /* Fade out out on the ground */
    66% {
      transform: rotate(60deg);
      top: 210px;
      left: 110px;
      background: var(--petal-dark);
      opacity: 0;
      z-index: 10;
    }
    /* Back to top, invisible until we get there */
    76% {
      transform: rotate(0deg);
      top: 10px;
      left: 40px;
      background: var(--petal-base);
      opacity: 0;
      z-index: 2;
    }
    /* Make visible again */
    77% {
      opacity: 1;
    }
  }

  /* Theme dial: 5 presets, circle color = rose color for that theme */
  .theme-dial {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    flex-shrink: 0;
    margin-bottom: 0.75rem;
  }
  .shuffle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--toggle-track);
    color: var(--toggle-knob);
    cursor: pointer;
    font-size: 1.25rem;
    transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease;
    position: relative;
  }
  .shuffle-btn:hover {
    transform: scale(1.05);
  }
  .shuffle-btn:focus-visible {
    outline: 2px solid var(--glow-shadow);
    outline-offset: 2px;
  }
  .shuffle-btn .shuffle-icon {
    display: block;
    position: relative;
  }
  .shuffle-btn .shuffle-plus {
    position: absolute;
    bottom: 4px;
    right: 4px;
    font-size: 0.6rem;
    font-weight: 800;
    line-height: 1;
    display: none;
    width: 1.1em;
    height: 1.1em;
    min-width: 1.1em;
    min-height: 1.1em;
    border-radius: 50%;
    background: var(--bg);
    color: var(--glow-shadow);
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
  }
  .shuffle-btn.shuffle-playlist {
    background: var(--glow-shadow);
    color: var(--bg);
  }
  .shuffle-btn.shuffle-all {
    background: var(--glow-shadow);
    color: var(--bg);
  }
  .shuffle-btn.shuffle-all .shuffle-plus {
    display: flex;
  }
  .volume-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .volume-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--toggle-track);
    color: var(--toggle-knob);
    cursor: pointer;
    font-size: 1.1rem;
    transition: background 0.2s ease, transform 0.2s ease;
  }
  .volume-btn:hover {
    transform: scale(1.05);
  }
  .volume-btn:focus-visible,
  .volume-popup:focus-within {
    outline: none;
  }
  .volume-btn:focus-visible {
    outline: 2px solid var(--glow-shadow);
    outline-offset: 2px;
  }
  .volume-popup {
    position: absolute;
    bottom: calc(100% + 0.5rem);
    left: 50%;
    transform: translateX(-50%);
    padding: 0.75rem 1rem;
    background: var(--bg);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 10;
  }
  html.theme-dios .volume-popup,
  html.theme-amigas .volume-popup,
  html.theme-jess .volume-popup {
    border-color: rgba(0, 0, 0, 0.1);
  }
  .volume-wrap.volume-open .volume-popup {
    opacity: 1;
    visibility: visible;
  }
  .volume-popup[hidden] {
    display: none;
  }
  .volume-wrap.volume-open .volume-popup[hidden] {
    display: block;
  }
  .volume-slider {
    display: block;
    width: 88px;
    height: 6px;
    margin: 0;
    -webkit-appearance: none;
    appearance: none;
    background: var(--toggle-track);
    border-radius: 3px;
    cursor: pointer;
  }
  .volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--glow-shadow);
    cursor: pointer;
    transition: transform 0.15s ease;
  }
  .volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
  }
  .volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border: none;
    border-radius: 50%;
    background: var(--glow-shadow);
    cursor: pointer;
    transition: transform 0.15s ease;
  }
  .volume-slider::-moz-range-thumb:hover {
    transform: scale(1.1);
  }
  .theme-dial-option {
    width: 24px;
    height: 24px;
    padding: 0;
    border: 3px solid transparent;
    border-radius: 50%;
    background: var(--dial-color);
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  }
  .theme-dial-option:hover {
    transform: scale(1.1);
  }
  .theme-dial-option.active {
    border-color: var(--toggle-knob);
    box-shadow: 0 0 0 1px var(--bg);
  }