/* ==========================================================================
   RH / SPOTIFY × APPLE — theme v3

   Dark streaming canvas with Spotify's density and green, plus Apple Music's
   typographic hierarchy, big artwork and blurred backdrops.
   Scoped to <html data-design="v3"> so other themes stay untouched.
   ========================================================================== */

html[data-design="v3"] {
  --bg: #0a0a0b;
  --surface: #18181b;
  --surface-2: #222226;
  --surface-3: #2c2c31;
  --text: #ffffff;
  --text-2: #b4b4bb;
  --text-3: #78787f;
  --accent: #1ed760;
  --accent-soft: rgba(30, 215, 96, 0.14);
  --separator: rgba(255, 255, 255, 0.08);
  --nav-bg: rgba(10, 10, 11, 0.88);
  --card-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
  --mini-bg: rgba(26, 26, 30, 0.94);
  --np-veil: rgba(8, 8, 9, 0.62);
  --np-text: #ffffff;
  --np-text-2: rgba(255, 255, 255, 0.6);
  --np-track: rgba(255, 255, 255, 0.22);
  --radius: 10px;
  color-scheme: dark;
}

html[data-design="v3"] body {
  background: var(--bg);
  color: var(--text);
  letter-spacing: -0.005em;
  /* a suspended transition would leave the page on the previous background */
  transition: none;
}

/* ambient glow from the top, like a lit stage */
html[data-design="v3"] body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 55% at 50% -12%, rgba(30, 215, 96, 0.16), transparent 62%),
    radial-gradient(90% 40% at 10% 0%, rgba(250, 45, 72, 0.07), transparent 55%);
}

html[data-design="v3"] .app {
  position: relative;
  z-index: 1;
}

/* ---------- type ---------- */
html[data-design="v3"] .hero-title,
html[data-design="v3"] .section-header h2,
html[data-design="v3"] .detail-title,
html[data-design="v3"] .np-title,
html[data-design="v3"] .auth-title,
html[data-design="v3"] .collection-hero h1,
html[data-design="v3"] .profile-info h2,
html[data-design="v3"] .sheet-header h2 {
  font-weight: 800;
  letter-spacing: -0.025em;
}

html[data-design="v3"] .hero-title {
  font-size: 32px;
  line-height: 1.06;
}

html[data-design="v3"] .hero-eyebrow {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
  letter-spacing: 0;
  text-transform: none;
  margin-bottom: 2px;
}

html[data-design="v3"] .screen-hero {
  padding: 12px 20px 16px;
}

/* ---------- section headers ---------- */
html[data-design="v3"] .section {
  margin-bottom: 28px;
}

html[data-design="v3"] .section-header {
  align-items: center;
  padding: 0 20px 12px;
}

html[data-design="v3"] .section-header h2 {
  font-size: 21px;
}

html[data-design="v3"] .section-header p {
  font-size: 13px;
  color: var(--text-3);
  margin-top: 1px;
}

html[data-design="v3"] .section-link {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-2);
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  letter-spacing: 0.01em;
}

html[data-design="v3"] .section-link:active {
  background: rgba(255, 255, 255, 0.12);
}

/* ---------- hero card ---------- */
html[data-design="v3"] .hero-card {
  width: calc(100% - 32px);
  height: 210px;
  margin: 0 16px 26px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

html[data-design="v3"] .hero-card-scrim {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.82) 100%);
}

html[data-design="v3"] .hero-card-eyebrow {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--accent);
  opacity: 1;
}

html[data-design="v3"] .hero-card-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

html[data-design="v3"] .hero-card-play {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: #06130a;
  box-shadow: 0 8px 22px rgba(30, 215, 96, 0.4);
}

/* ---------- cards ---------- */
html[data-design="v3"] .h-scroll {
  gap: 14px;
  padding: 2px 20px 10px;
}

html[data-design="v3"] .card {
  width: 152px;
  transition: transform 0.18s ease;
}

html[data-design="v3"] .card:active {
  transform: scale(0.96);
}

html[data-design="v3"] .card-art {
  width: 152px;
  height: 152px;
  border-radius: 8px;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.45);
}

html[data-design="v3"] .artist-card,
html[data-design="v3"] .artist-card .card-art {
  width: 124px;
}

html[data-design="v3"] .artist-card .card-art {
  height: 124px;
  border-radius: 50% !important;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.45);
}

html[data-design="v3"] .card-title {
  margin-top: 9px;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  white-space: normal;
  max-height: 2.4em;
  overflow: hidden;
}

html[data-design="v3"] .card-sub {
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--text-3);
}

/* ---------- collection cards ---------- */
html[data-design="v3"] .collection-card {
  width: 236px;
  height: 132px;
  border-radius: 12px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

html[data-design="v3"] .collection-name {
  font-size: 17px;
  font-weight: 800;
}

html[data-design="v3"] .collection-sub {
  font-size: 11.5px;
  opacity: 0.7;
}

/* ---------- track rows ---------- */
html[data-design="v3"] .list {
  padding: 0 8px;
}

html[data-design="v3"] .track-row {
  border-radius: 8px;
  padding: 7px 10px;
  gap: 8px;
}

html[data-design="v3"] .track-row:active {
  background: rgba(255, 255, 255, 0.07);
}

html[data-design="v3"] .track-row.is-current {
  background: rgba(30, 215, 96, 0.1);
}

html[data-design="v3"] .track-row.is-current .track-title {
  color: var(--accent);
}

html[data-design="v3"] .track-title {
  font-size: 15px;
  font-weight: 600;
}

html[data-design="v3"] .track-artist {
  font-size: 12.5px;
  color: var(--text-3);
}

html[data-design="v3"] .track-index {
  font-size: 12px;
  color: var(--text-3);
}

html[data-design="v3"] .track-duration {
  font-size: 11.5px;
  color: var(--text-3);
}

html[data-design="v3"] .track-fav.is-fav {
  color: var(--accent);
}

html[data-design="v3"] .artwork img {
  transition: opacity 0.35s ease;
}

html[data-design="v3"] .track-row .artwork {
  border-radius: 6px !important;
}

/* ---------- tab bar ---------- */
html[data-design="v3"] .tabbar {
  background: var(--nav-bg);
  border-top: 1px solid var(--separator);
  backdrop-filter: saturate(160%) blur(22px);
  -webkit-backdrop-filter: saturate(160%) blur(22px);
}

html[data-design="v3"] .tabbar-item {
  gap: 3px;
  color: var(--text-3);
}

html[data-design="v3"] .tabbar-item span {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

html[data-design="v3"] .tabbar-item.is-active {
  color: var(--accent);
}

/* ---------- mini player ---------- */
html[data-design="v3"] .mini-player {
  left: 10px;
  right: 10px;
  bottom: calc(var(--tab-h) + var(--safe-bottom) + 8px);
  height: 58px;
  border-radius: 10px;
  background: var(--mini-bg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55);
  backdrop-filter: saturate(160%) blur(20px);
  -webkit-backdrop-filter: saturate(160%) blur(20px);
}

html[data-design="v3"] .mini-title {
  font-size: 13.5px;
  font-weight: 700;
}

html[data-design="v3"] .mini-artist {
  font-size: 11.5px;
  color: var(--text-3);
}

html[data-design="v3"] .mini-progress {
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.1);
}

html[data-design="v3"] .mini-progress span {
  background: var(--accent);
  border-radius: 0;
}

/* ---------- now playing ---------- */
html[data-design="v3"] .np-backdrop {
  filter: blur(64px) saturate(1.15) brightness(0.55);
  opacity: 1;
}

html[data-design="v3"] .np-blur {
  background: linear-gradient(180deg, rgba(8, 8, 9, 0.45) 0%, rgba(8, 8, 9, 0.86) 78%, #0a0a0b 100%);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

html[data-design="v3"] .np-round-btn {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

html[data-design="v3"] .np-source-label {
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--accent);
}

html[data-design="v3"] .np-source-sub {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
}

html[data-design="v3"] .np-art {
  border-radius: 14px;
  box-shadow: 0 34px 70px rgba(0, 0, 0, 0.65), 0 2px 10px rgba(0, 0, 0, 0.4);
}

html[data-design="v3"] .np-title {
  font-size: 24px;
  letter-spacing: -0.02em;
}

html[data-design="v3"] .np-artist {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.62);
  margin-top: 2px;
}

html[data-design="v3"] .seek-track {
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.18);
}

html[data-design="v3"] .seek-fill {
  border-radius: 3px;
  background: var(--accent);
  opacity: 1;
}

html[data-design="v3"] .seek-thumb {
  width: 12px;
  height: 12px;
  margin-left: -6px;
  margin-top: -6px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

html[data-design="v3"] .seek-times {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
}

html[data-design="v3"] .transport-play {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #fff;
  color: #0a0a0b;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

html[data-design="v3"] .transport-btn:active {
  transform: scale(0.9);
}

html[data-design="v3"] .np-secondary-btn.is-on {
  color: var(--accent);
}

html[data-design="v3"] .np-heart.is-fav {
  color: var(--accent);
}

html[data-design="v3"] .np-error {
  color: #ff7b6b;
}

/* ---------- sheets ---------- */
html[data-design="v3"] .sheet {
  border-radius: 18px 18px 0 0;
  background: #161619;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 -20px 50px rgba(0, 0, 0, 0.6);
}

html[data-design="v3"] .sheet-grabber {
  background: rgba(255, 255, 255, 0.2);
}

html[data-design="v3"] .sheet-header h2 {
  font-size: 19px;
}

html[data-design="v3"] .action-row {
  border-radius: 8px;
  font-size: 15px;
}

html[data-design="v3"] .action-row:active {
  background: rgba(255, 255, 255, 0.07);
}

html[data-design="v3"] .primary-btn {
  border-radius: 999px;
  background: var(--accent);
  color: #06130a;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.01em;
  padding: 13px 22px;
  box-shadow: 0 8px 22px rgba(30, 215, 96, 0.25);
}

html[data-design="v3"] .text-btn {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-2);
}

html[data-design="v3"] .text-btn.danger {
  color: #ff6b5e;
}

html[data-design="v3"] .text-input {
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 15px;
}

html[data-design="v3"] .text-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

html[data-design="v3"] .chip {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
}

html[data-design="v3"] .chip.is-active {
  background: var(--accent);
  color: #06130a;
}

html[data-design="v3"] .chip.chip-ghost {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-2);
}

/* ---------- search ---------- */
html[data-design="v3"] .search-header,
html[data-design="v3"] .sticky-chips,
html[data-design="v3"] .detail-bar {
  background: var(--nav-bg);
  backdrop-filter: saturate(160%) blur(20px);
  -webkit-backdrop-filter: saturate(160%) blur(20px);
  border-bottom: 1px solid var(--separator);
}

html[data-design="v3"] .search-field {
  height: 40px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  padding: 0 14px;
}

html[data-design="v3"] .search-field input {
  font-size: 15px;
}

html[data-design="v3"] .sort-btn {
  color: var(--text-2);
  font-weight: 700;
}

html[data-design="v3"] .sort-menu {
  background: #1c1c20;
  border-radius: 12px;
}

/* ---------- detail screens ---------- */
html[data-design="v3"] .detail-art {
  border-radius: 14px;
  box-shadow: 0 26px 56px rgba(0, 0, 0, 0.6);
}

html[data-design="v3"] .artist-art-lg {
  border-radius: 50% !important;
  box-shadow: 0 26px 56px rgba(0, 0, 0, 0.6);
}

html[data-design="v3"] .detail-title {
  font-size: 27px;
}

html[data-design="v3"] .detail-artist {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
}

html[data-design="v3"] .detail-meta {
  font-size: 12.5px;
  color: var(--text-3);
}

html[data-design="v3"] .play-pill {
  border-radius: 999px;
  background: var(--accent);
  color: #06130a;
  font-weight: 800;
  font-size: 14px;
  padding: 12px 24px;
  box-shadow: 0 10px 26px rgba(30, 215, 96, 0.28);
}

html[data-design="v3"] .round-action {
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

html[data-design="v3"] .collection-hero {
  border-radius: 16px;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.5);
}

html[data-design="v3"] .collection-hero h1 {
  font-size: 30px;
}

html[data-design="v3"] .playlist-mosaic {
  border-radius: 14px;
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.55);
}

html[data-design="v3"] .load-more-row .primary-btn {
  min-width: 220px;
}

/* ---------- profile ---------- */
html[data-design="v3"] .profile-card {
  border-radius: 16px;
  background: linear-gradient(140deg, #1d1d21, #141417);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
}

html[data-design="v3"] .profile-avatar {
  background: linear-gradient(145deg, #1ed760, #12a34a);
  color: #06130a;
  font-weight: 800;
}

html[data-design="v3"] .stats-grid {
  gap: 10px;
}

html[data-design="v3"] .stat {
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: none;
}

html[data-design="v3"] .stat-value {
  font-size: 20px;
  font-weight: 800;
}

html[data-design="v3"] .stat-label {
  color: var(--text-3);
}

html[data-design="v3"] .group-title {
  color: var(--text-3);
  font-size: 12px;
  letter-spacing: 0.06em;
}

html[data-design="v3"] .settings-card {
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: none;
}

html[data-design="v3"] .setting-row {
  border-bottom: 1px solid var(--separator);
}

html[data-design="v3"] .segmented {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}

html[data-design="v3"] .segmented button {
  border-radius: 999px;
  font-weight: 600;
}

html[data-design="v3"] .segmented button.is-active {
  background: var(--accent);
  color: #06130a;
  box-shadow: none;
}

html[data-design="v3"] .switch {
  background: rgba(255, 255, 255, 0.16);
}

html[data-design="v3"] .switch:checked {
  background: var(--accent);
}

/* ---------- auth ---------- */
html[data-design="v3"] .auth-screen {
  background:
    radial-gradient(110% 60% at 50% -10%, rgba(30, 215, 96, 0.18), transparent 60%),
    radial-gradient(80% 40% at 100% 0%, rgba(250, 45, 72, 0.1), transparent 55%),
    #0a0a0b;
}

html[data-design="v3"] .auth-card {
  border-radius: 18px;
  background: rgba(22, 22, 26, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

html[data-design="v3"] .auth-logo {
  border-radius: 50%;
  background: var(--accent);
  color: #06130a;
  box-shadow: 0 12px 30px rgba(30, 215, 96, 0.35);
}

html[data-design="v3"] .auth-title {
  font-size: 26px;
}

html[data-design="v3"] .auth-sub {
  color: var(--text-2);
}

html[data-design="v3"] .auth-segments {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}

html[data-design="v3"] .auth-segments button {
  border-radius: 999px;
  font-weight: 700;
  font-size: 13.5px;
}

html[data-design="v3"] .auth-segments button.is-active {
  background: var(--accent);
  color: #06130a;
  box-shadow: none;
}

html[data-design="v3"] .auth-field span {
  color: var(--text-3);
  font-weight: 600;
}

html[data-design="v3"] .auth-field input {
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

html[data-design="v3"] .auth-field input:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.08);
}

/* ---------- lyrics ---------- */
html[data-design="v3"] .lyrics-backdrop {
  filter: blur(64px) saturate(1.1) brightness(0.4);
}

html[data-design="v3"] .lyrics-scrim {
  background: linear-gradient(180deg, rgba(8, 8, 9, 0.5), rgba(8, 8, 9, 0.9));
}

html[data-design="v3"] .lyrics-line {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.28);
}

html[data-design="v3"] .lyrics-line.is-past {
  color: rgba(255, 255, 255, 0.42);
}

html[data-design="v3"] .lyrics-line.is-active {
  color: var(--accent);
  transform: none;
  text-shadow: none;
}

html[data-design="v3"] .lyrics-play {
  border-radius: 50%;
  background: var(--accent);
  color: #06130a;
  border: 0;
}

html[data-design="v3"] .lyrics-hint {
  color: rgba(255, 255, 255, 0.42);
}

/* ---------- misc ---------- */
html[data-design="v3"] .toast {
  border-radius: 999px;
  background: rgba(30, 215, 96, 0.95);
  color: #06130a;
  font-weight: 700;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

html[data-design="v3"] .empty-state p {
  font-size: 17px;
  font-weight: 700;
}

html[data-design="v3"] .inline-error,
html[data-design="v3"] .auth-error {
  border-radius: 10px;
  background: rgba(255, 92, 77, 0.12);
  color: #ff8a7a;
}

html[data-design="v3"] .queue-row {
  border-radius: 8px;
}

html[data-design="v3"] .queue-row.is-current {
  background: rgba(30, 215, 96, 0.12);
}

html[data-design="v3"] .equalizer i {
  background: var(--accent);
}

html[data-design="v3"] .preview-banner {
  border-radius: 10px;
  background: rgba(250, 45, 72, 0.14);
  color: #ff9a91;
}