.sp-wrap {
  position: fixed;
  top: 0; right: 0;
  width: 520px; height: 100vh;
  z-index: 400;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
  transform: translateX(100%);
  transition: none;
}
.sp-wrap.sp-visible {
  transform: translateX(0);
  pointer-events: all;
}

.sp-backdrop {
  position: absolute; inset: 0;
  background: rgba(9,9,9,0.88);
  border-left: 1px solid rgba(255,255,255,0.07);
}

.sp-card {
  position: relative; z-index: 1;
  width: 460px; min-height: 780px;
  border-radius: 36px; overflow: visible;
  padding: 0 36px 28px;
  display: flex; flex-direction: column; align-items: center;
  box-shadow: 0 32px 80px rgba(0,0,0,0.7);
}

.sp-card .card-clip {
  position: absolute; inset: 0;
  border-radius: 36px; overflow: hidden;
  pointer-events: none; z-index: 0;
}
.sp-card .album-wrapper {
  position: absolute; top: 0; bottom: 0; left: -30px; right: -30px;
  z-index: 0; pointer-events: none;
}
.sp-card .default-cover {
  width: 100%; height: 100%; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 76px; opacity: 0.15; font-family: 'DM Serif Display', serif;
}
.sp-card .char-name {
  width: calc(100% + 72px); margin-left: -36px; margin-right: -36px;
  text-align: center; padding: 18px 36px 0;
  font-family: 'IBM Plex Mono', monospace; font-size: 20px;
  letter-spacing: 0.12em; text-transform: uppercase;
  position: relative; margin-bottom: -8px; z-index: 3;
}
.sp-card .actions-row {
  width: calc(100% + 72px); margin-left: -36px; margin-right: -36px;
  display: flex; justify-content: center;
  margin-top: auto; margin-bottom: 10px; z-index: 2; position: relative;
}
.sp-card .heart-btn {
  background: none; border: none; cursor: pointer; padding: 0;
  transition: transform 0.18s; display: flex; align-items: center; justify-content: center;
}
.sp-card .heart-btn:hover  { transform: scale(1.18); }
.sp-card .heart-btn:active { transform: scale(0.88); }
.sp-card .heart-btn.liked { animation: spHeartPop 0.35s ease; }
@keyframes spHeartPop {
  0%{transform:scale(1)} 40%{transform:scale(1.45)} 70%{transform:scale(0.87)} 100%{transform:scale(1)}
}
.sp-card .heart-svg { width: 36px; height: 36px; display: block; overflow: visible; }

.sp-card .track-title {
  width: 100%; text-align: center; font-size: 13px;
  font-family: 'IBM Plex Mono', monospace;
  letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 18px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  position: relative; z-index: 1;
}
.sp-card .progress-section { width: 100%; margin-bottom: 26px; position: relative; z-index: 1; }
.sp-card .progress-track {
  width: 100%; height: 6px; border-radius: 99px;
  position: relative; cursor: pointer; background: rgba(0,0,0,0.12);
}
.sp-card .progress-track::before {
  content: ''; position: absolute; left: 0; right: 0; top: -10px; bottom: -10px;
}
.sp-card .progress-fill {
  height: 100%; width: 0%; border-radius: 99px;
  pointer-events: none; transition: width 0.25s linear;
}
.sp-card .progress-thumb {
  position: absolute; top: 50%; transform: translate(-50%,-50%);
  width: 20px; height: 20px; pointer-events: none;
  display: flex; align-items: center; justify-content: center;
}
.sp-card .progress-thumb svg { width: 20px; height: 20px; filter: drop-shadow(0 1px 3px rgba(0,0,0,0.25)); }
.sp-card .time-row { display: flex; justify-content: space-between; margin-top: 8px; }
.sp-card .time-label { font-size: 11px; letter-spacing: 0.04em; font-family: 'IBM Plex Mono', monospace; }

.sp-card .controls-row {
  display: flex; align-items: center; justify-content: center;
  gap: 18px; width: 100%; position: relative; z-index: 1;
}
.sp-card .ctrl-btn {
  background: none; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; border-radius: 50%;
}
.sp-card .ctrl-btn:hover  { transform: scale(1.12); }
.sp-card .ctrl-btn:active { transform: scale(0.88); }
.sp-card .skip-svg { width: 28px; height: 28px; }
.sp-card .play-btn {
  width: 72px; height: 72px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 18px rgba(0,0,0,0.22);
  transition: transform 0.18s, box-shadow 0.18s;
}
.sp-card .play-btn:hover  { transform: scale(1.08); box-shadow: 0 6px 26px rgba(0,0,0,0.35); }
.sp-card .play-btn:active { transform: scale(0.92); }
.sp-card .left-modes {
  display: flex; align-items: center; gap: 30px;
  position: absolute; left: 0; transform: translateX(-12px);
}
.sp-card .mode-btn {
  background: none; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  padding: 4px; border-radius: 50%; transition: transform 0.18s;
}
.sp-card .mode-btn:hover  { transform: scale(1.15); }
.sp-card .mode-btn:active { transform: scale(0.88); }
.sp-card .mode-btn svg { width: 20px; height: 20px; }
.sp-card .volume-btn {
  background: none; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  padding: 4px; border-radius: 50%;
  position: absolute; right: 16px; transition: transform 0.18s;
}
.sp-card .volume-btn:hover { transform: scale(1.15); }
.sp-card .volume-btn svg { width: 26px; height: 26px; }
.sp-card .volume-popup {
  position: absolute; bottom: calc(100% + 8px); left: 50%;
  transform: translateX(-50%) translateY(6px); width: 36px;
  padding: 14px 0 10px;
  background: var(--sp-popup-bg, #fff);
  border: 1px solid var(--sp-popup-border, rgba(0,0,0,0.15));
  border-radius: 20px; display: flex; flex-direction: column; align-items: center;
  opacity: 0; pointer-events: none; transition: opacity 0.18s, transform 0.18s;
  z-index: 50; box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}
.sp-card .volume-popup.vol-visible {
  opacity: 1; pointer-events: all; transform: translateX(-50%) translateY(0);
}
.sp-card .volume-slider {
  -webkit-appearance: none; appearance: none;
  writing-mode: vertical-lr; direction: rtl;
  width: 4px; height: 80px; border-radius: 99px; outline: none; cursor: pointer;
}
.sp-card .volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 13px; height: 13px;
  border-radius: 50%; cursor: pointer;
  background: var(--thumb-color, #1a1a1a);
}
.sp-card .volume-slider::-moz-range-thumb {
  width: 13px; height: 13px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--thumb-color, #1a1a1a);
}
.sp-card .credits-row {
  width: calc(100% + 72px); margin-left: -36px; margin-right: -36px;
  display: flex; justify-content: space-between; align-items: flex-end;
  padding: 10px 20px 0; margin-top: 8px; position: relative; z-index: 1;
}
.sp-card .credit-item { display: flex; flex-direction: column; gap: 2px; }
.sp-card .credit-item.right { align-items: flex-end; text-align: right; }
.sp-card .credit-label { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.65; font-family: 'IBM Plex Mono', monospace; }
.sp-card .credit-link {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; letter-spacing: 0.06em; text-decoration: none;
  opacity: 0.9; transition: opacity 0.2s; font-family: 'IBM Plex Mono', monospace;
}
.sp-card .credit-link:hover { opacity: 1; }
.sp-card .credit-link svg { width: 11px; height: 11px; flex-shrink: 0; opacity: 0.8; }

.sp-page-shift {
  transition: none;
}
.sp-page-shift.sp-shifted { padding-right: 520px; }
