/* Skiper UI Skiper3 split capsule, adapted to the Musical Genius palette. */
.music-player {
  --player-width: min(330px, calc(100vw - 32px));
  position: fixed;
  left: max(16px, env(safe-area-inset-left));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 30;
  width: 60px;
  max-width: calc(100% - 32px);
  color: var(--cream);
  transition: width .55s cubic-bezier(.22, 1.18, .36, 1);
  isolation: isolate;
  pointer-events: none;
}
.music-player.is-expanded { width: var(--player-width); }
.music-player button, .player-details, #player-status { pointer-events: auto; }
.music-player.is-expanded .player-toggle { width: min(250px, calc(100% - 70px)); }
.player-shell { position: relative; height: 60px; }
.player-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(250px, calc(100vw - 32px));
  height: 44px;
  padding: 0 12px;
  margin-bottom: 6px;
  border: 1px solid #f2ecdf38;
  border-radius: 24px;
  background: #191a17ed;
  box-shadow: 0 2px 12px #0002;
  color: var(--cream);
  text-align: left;
  font-size: 12px;
  overflow: hidden;
}
.player-toggle-title { display: block; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; }
#track-title { display: inline-block; }
#track-title.is-overflowing { animation: player-title 14s linear infinite alternate; }
@keyframes player-title { from { transform: translateX(0); } to { transform: translateX(var(--title-travel)); } }
.player-toggle-mark { flex: none; font-size: 20px; line-height: 1; transition: transform .35s; }
.is-expanded .player-toggle-mark { transform: rotate(45deg); }
.player-details, .player-play {
  height: 60px;
  border: 1px solid #f2ecdf38;
  border-radius: 999px;
  background: #191a17ed;
  color: var(--cream);
  box-shadow: 0 6px 24px #0003;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.player-details {
  position: absolute;
  inset: 0 70px 0 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 9px;
  opacity: 0;
  visibility: hidden;
  transform: scale(.9);
  transform-origin: left center;
  overflow: hidden;
  transition: opacity .2s, transform .25s, visibility .25s;
}
.is-expanded .player-details { opacity: 1; visibility: visible; transform: scale(1); transition-delay: .18s; }
#track-artwork { width: 40px; height: 40px; flex: none; border-radius: 50%; object-fit: cover; }
.player-meta { flex: 1; min-width: 0; line-height: 1.2; }
#track-artist { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11px; }
.player-time { display: flex; justify-content: space-between; align-items: center; margin-top: 2px; font-size: 10px; color: #e3c688; }
#track-elapsed { font-variant-numeric: tabular-nums; }
.player-play {
  position: absolute;
  right: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 60px;
  padding: 0;
  transition: background .2s, transform .2s;
}
.player-play:hover { background: var(--red); }
.player-play:active { transform: scale(.93); }
.player-play svg { grid-area: 1 / 1; transition: opacity .2s, transform .35s, filter .25s; }
.player-icon-pause { opacity: 0; transform: scale(.5); filter: blur(4px); }
.is-playing .player-icon-play { opacity: 0; transform: scale(.5); filter: blur(4px); }
.is-playing .player-icon-pause { opacity: 1; transform: scale(1); filter: none; }
.player-play[aria-busy="true"] { border-color: var(--gold); }
.player-bars { display: inline-flex; align-items: center; gap: 3px; height: 10px; }
.player-bars i { width: 3px; height: 3px; border-radius: 2px; background: currentColor; }
.is-playing .player-bars i { animation: player-level .8s ease-in-out infinite alternate; }
.is-playing .player-bars i:nth-child(2) { animation-delay: -.6s; }
.is-playing .player-bars i:nth-child(3) { animation-delay: -.2s; }
.is-playing .player-bars i:nth-child(4) { animation-delay: -.4s; }
@keyframes player-level { to { height: 10px; } }
#track-seek {
  --progress: 0%;
  display: block;
  appearance: none;
  -webkit-appearance: none;
  width: 100%; height: 16px;
  padding: 0; margin: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
#track-seek::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(to right, var(--gold) var(--progress), #f2ecdf55 var(--progress)); border-radius: 2px; }
#track-seek::-moz-range-track { height: 2px; background: #f2ecdf55; border-radius: 2px; }
#track-seek::-moz-range-progress { height: 2px; background: var(--gold); }
#track-seek::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 8px; height: 8px; border-radius: 50%; margin-top: -3px; background: var(--cream); border: 0; }
#track-seek::-moz-range-thumb { width: 8px; height: 8px; border-radius: 50%; background: var(--cream); border: 0; }
#player-status:empty { display: none; }
#player-status:not(:empty), .music-player noscript p { width: min(330px, calc(100vw - 32px)); margin: 8px 0 0; padding: 10px 14px; background: var(--ink); border: 1px solid var(--gold); font-size: 12px; line-height: 1.5; }
#player-status[data-kind="autoplay"]:not(:empty) {
  width: max-content;
  max-width: calc(100vw - 32px);
  margin-top: 6px;
  padding: 5px 10px;
  border: 1px solid #f2ecdf38;
  border-radius: 999px;
  background: #191a17ed;
  font-size: 11px;
  line-height: 1.4;
}
#navigation-status:empty { display: none; }
#navigation-status:not(:empty) { position: fixed; z-index: 35; top: 12px; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100vw - 24px); padding: 12px 18px; background: var(--ink); color: var(--cream); border: 1px solid var(--gold); font-size: 13px; }
#navigation-status button, #navigation-status a { margin-left: 10px; color: inherit; background: none; border: 0; text-decoration: underline; padding: 6px; }
.footer-base { padding-bottom: 150px; }
@media (max-width: 600px) {
  .hero-bottom { top: min(calc(100svh - 330px), calc(100% - 145px)); bottom: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .music-player, .music-player * { transition: none; animation: none; }
}

/* Companion control, matching the persistent 60 px play/pause button. */
.back-to-top{position:fixed;z-index:30;right:max(16px,env(safe-area-inset-right));bottom:max(16px,env(safe-area-inset-bottom));width:60px;height:60px;padding:0;display:grid;place-items:center;border:1px solid #f2ecdf38;border-radius:999px;background:#191a17ed;color:var(--cream);box-shadow:0 6px 24px #0003;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);cursor:pointer;}
.back-to-top[hidden]{display:none;}
.back-to-top svg{transform:translateY(-2px);}
.back-to-top:hover{background:#302b25;}
.back-to-top:focus-visible{outline:2px solid var(--cream);outline-offset:4px;}
/* Share the player's own coordinate system, including safe-area and status
   changes. Match the title row height and centre above the 60 px play button. */
@media (max-width: 760px) {
  .music-player.is-expanded .back-to-top {
    position: absolute;
    inset: 0 8px auto auto;
    width: 44px;
    height: 44px;
  }
}
