/*! Generated from wwwroot/css/*.css - run: scripts/build-css.ps1 */
* {
  box-sizing: border-box;
}

html {
  /* Lets end-of-page content scroll above the fixed #qc-play-bar */
  scroll-padding-bottom: calc(280px + env(safe-area-inset-bottom, 0px));
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Inter, sans-serif;
  background: #0a0a0a;
  color: #fafafa;
}

/* Left rail — Suno-style: full height, dark, icon + label */
.floating-nav {
  --nav-muted: #a3a3a3;
  --nav-active: #ffffff;
  --nav-border: rgba(255, 255, 255, 0.08);
  position: fixed;
  inset: 0 auto 0 0;
  width: 240px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  padding: 20px 14px 20px 16px;
  background: #000000;
  border-right: 1px solid var(--nav-border);
  height: 100vh;
  max-height: 100vh;
  min-height: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.floating-nav__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 28px;
  padding: 0 4px 0 2px;
  flex-shrink: 0;
}

.floating-nav__logo {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
  line-height: 1.2;
}

.floating-nav__chevron {
  color: #525252;
  font-size: 1rem;
  font-weight: 300;
  user-select: none;
}

.floating-nav__nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}

.floating-nav__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  margin: 0 -4px;
  border-radius: 8px;
  color: var(--nav-muted);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: color 0.15s ease, background 0.15s ease;
}

.floating-nav__item:hover {
  color: #e5e5e5;
  background: rgba(255, 255, 255, 0.06);
}

.floating-nav__item:visited {
  color: var(--nav-muted);
}

.floating-nav__item--active {
  color: var(--nav-active);
  background: transparent;
}

.floating-nav__item--active .floating-nav__icon {
  color: var(--nav-active);
}

.floating-nav__icon {
  flex-shrink: 0;
  color: #737373;
  transition: color 0.15s ease;
}

.floating-nav__item:hover .floating-nav__icon {
  color: #a3a3a3;
}

.floating-nav__item--active .floating-nav__icon {
  color: #ffffff;
}

.floating-nav__item--active:visited {
  color: var(--nav-active);
}

.floating-nav__group {
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--nav-border);
}

.floating-nav__section-label {
  margin: 0 0 10px 12px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #737373;
}

.floating-nav__footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--nav-border);
  flex-shrink: 0;
}

.floating-nav__legal {
  margin: 12px 0 0;
  padding: 0;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.45;
  text-align: center;
  color: #737373;
}

.floating-nav__legal a,
.floating-nav__legal a:visited {
  color: #a3a3a3;
  text-decoration: none;
  transition: color 0.15s ease;
}

.floating-nav__legal a:hover {
  color: #e5e5e5;
  text-decoration: underline;
}

/* [hidden] must win over .floating-nav__pill { display: block } */
.floating-nav [hidden] {
  display: none !important;
}

.floating-nav__pill {
  display: block;
  width: 100%;
  text-align: center;
  padding: 10px 14px;
  border-radius: 999px;
  color: #fafafa;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.floating-nav__pill:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.5);
}

.floating-nav__pill--button {
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.main-wrap {
  margin-left: 240px;
  min-height: 100vh;
  background: #0a0a0a;
  /* Reserve space so the fixed floating player does not cover the last page content */
  padding-bottom: calc(280px + env(safe-area-inset-bottom, 0px));
}

/* Home: same flat canvas as .main-wrap (no gradient layer behind cards) */
.page-home .main-wrap {
  padding: 24px 24px calc(280px + env(safe-area-inset-bottom, 0px));
  background: #0a0a0a;
}

/* Embedded-video / iframe-only transport: fixed strip under content (audio uses floating bar). */
.home-transport-strip {
  position: fixed;
  left: 240px;
  right: 0;
  bottom: 0;
  z-index: 100;
  padding: 10px 20px calc(12px + env(safe-area-inset-bottom, 0px));
  background: rgba(15, 23, 42, 0.97);
  border-top: 1px solid #334155;
  backdrop-filter: blur(10px);
}

.home-transport-strip[hidden] {
  display: none !important;
}

.home-transport-strip .video-transport {
  max-width: 1100px;
  margin: 0 auto;
}

body.page-home .home-transport-strip {
  background: rgba(39, 39, 42, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.35);
}

body.page-home .home-transport-strip .video-transport {
  max-width: 560px;
}

body.track-video-clip-open .home-transport-strip {
  z-index: 210;
  left: 0;
  right: 0;
  padding: 10px 0 calc(12px + env(safe-area-inset-bottom, 0px));
  border-radius: 0;
}

body.track-video-clip-open .home-transport-strip .video-transport {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 0 max(12px, env(safe-area-inset-left, 0px)) 0 max(12px, env(safe-area-inset-right, 0px));
  box-sizing: border-box;
}

@media (max-width: 820px) {
  .home-transport-strip {
    left: 0;
  }

  .page-home .main-wrap {
    padding: 20px 16px calc(300px + env(safe-area-inset-bottom, 0px));
  }

  html {
    scroll-padding-bottom: calc(300px + env(safe-area-inset-bottom, 0px));
  }

  .main-wrap {
    padding-bottom: calc(300px + env(safe-area-inset-bottom, 0px));
  }
}

.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
}

/* Genre strip — bento tiles (name + track count left, framed art right; art hangs past panel) */
.page-home .top-genres {
  position: relative;
  margin-bottom: 24px;
  padding: 12px 16px 14px;
  border-radius: 16px;
  background: #12121a;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.55) inset,
    0 12px 40px rgba(0, 0, 0, 0.45);
  overflow: visible;
}

.page-home .top-genres__head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.page-home .top-genres__title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #f4f4f5;
}

/* Endless horizontal strip: duplicate row + scroll reposition (see index.html) */
.page-home .top-genres__viewport {
  position: relative;
  z-index: 1;
  overflow-x: auto;
  overflow-y: hidden;
  margin: 0 -4px;
  /* Room for genre art hanging 10px above/below each card panel */
  padding: 10px 4px 10px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scroll-behavior: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  outline: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.page-home .top-genres__viewport::-webkit-scrollbar {
  display: none;
}

.page-home .top-genres__viewport.top-genres__viewport--dragging {
  cursor: grabbing;
}

.page-home .top-genres__viewport:focus-visible {
  box-shadow: 0 0 0 2px rgba(129, 140, 248, 0.45);
  border-radius: 12px;
}

.page-home .top-genres__track {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  width: max-content;
  gap: 14px;
}

.page-home .top-genres__set {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  flex-shrink: 0;
  gap: 14px;
}

.page-home .top-genres__set .genre-bento-card {
  flex: 0 0 auto;
  /* Narrow strip: text | 10px | 84px thumb | 15px to card edge */
  width: clamp(198px, 28vw, 252px);
  box-sizing: border-box;
}

.page-home .genre-bento-card {
  position: relative;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  /* Panel was ~96px; ~⅓ shorter panel (64px) + 10px hang top/bottom on the art */
  min-height: 84px;
  padding: 0 15px 0 14px;
  border: none;
  border-radius: 0;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: #f4f4f5;
  background: transparent;
  box-shadow: none;
  transition: color 0.15s ease;
}

.page-home .genre-bento-card::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 0;
  right: 0;
  top: 10px;
  bottom: 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(30, 30, 36, 0.85);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35) inset;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.page-home .genre-bento-card--active::before {
  border-color: rgba(129, 140, 248, 0.65);
  box-shadow:
    0 0 0 1px rgba(99, 102, 241, 0.35),
    0 8px 28px rgba(99, 102, 241, 0.12);
}

.page-home .genre-bento-card__text {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  flex: 1;
}

.page-home .genre-bento-card__name {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-home .genre-bento-card__count {
  font-size: 0.74rem;
  color: #71717a;
}

.page-home .genre-bento-card__art {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

/* Square art: 84px tile spans full row; ::before panel is 64px tall → 10px hang top/bottom */
.page-home .genre-bento-card__frame {
  position: relative;
  overflow: hidden;
  width: 84px;
  height: 84px;
  border-radius: 11px;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

/*
 * Inner chromatic fill behind the icon: <img> backgrounds are unreliable for replaced content.
 * This ::before fills the content box so white silhouettes always sit on a solid hue (not black/void).
 */
.page-home .genre-bento-card__frame::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  border-radius: 8px;
  z-index: 0;
  pointer-events: none;
}

.page-home .genre-bento-card__frame > span.genre-bento-card__img,
.page-home .genre-bento-card__frame > img.genre-bento-card__img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border-radius: 8px;
}

.page-home .genre-bento-card__frame > img.genre-bento-card__img {
  object-fit: contain;
  object-position: bottom center;
  display: block;
}

/* Icon tile: chromatic hues only (no white/grey/black fills) */
.page-home .genre-bento-card__frame > span.genre-bento-card__img {
  background: linear-gradient(145deg, #3730a3, #6366f1);
}

.page-home .genre-bento-card--v0 .genre-bento-card__frame {
  background: #b91c1c;
}
.page-home .genre-bento-card--v0 .genre-bento-card__frame::before {
  background: #991b1b;
}
.page-home .genre-bento-card--v0 .genre-bento-card__frame span.genre-bento-card__img {
  background: linear-gradient(160deg, #7f1d1d, #dc2626);
}

.page-home .genre-bento-card--v1 .genre-bento-card__frame {
  background: #7c3aed;
}
.page-home .genre-bento-card--v1 .genre-bento-card__frame::before {
  background: #6d28d9;
}
.page-home .genre-bento-card--v1 .genre-bento-card__frame span.genre-bento-card__img {
  background: linear-gradient(135deg, #5b21b6, #c4b5fd);
}

.page-home .genre-bento-card--v2 .genre-bento-card__frame {
  background: #dc2626;
}
.page-home .genre-bento-card--v2 .genre-bento-card__frame::before {
  background: #be123c;
}
.page-home .genre-bento-card--v2 .genre-bento-card__frame span.genre-bento-card__img {
  background: linear-gradient(160deg, #9f1239, #fb7185);
}

.page-home .genre-bento-card--v3 .genre-bento-card__frame {
  background: #ca8a04;
}
.page-home .genre-bento-card--v3 .genre-bento-card__frame::before {
  background: #d97706;
}
.page-home .genre-bento-card--v3 .genre-bento-card__frame span.genre-bento-card__img {
  background: linear-gradient(145deg, #b45309, #fbbf24);
}

.page-home .genre-bento-card--v4 .genre-bento-card__frame {
  background: #0f766e;
}
.page-home .genre-bento-card--v4 .genre-bento-card__frame::before {
  background: #0d9488;
}
.page-home .genre-bento-card--v4 .genre-bento-card__frame span.genre-bento-card__img {
  background: linear-gradient(160deg, #0f766e, #5eead4);
}

.page-home .genre-bento-card--v5 .genre-bento-card__frame {
  background: #ea580c;
}
.page-home .genre-bento-card--v5 .genre-bento-card__frame::before {
  background: #ea580c;
}
.page-home .genre-bento-card--v5 .genre-bento-card__frame span.genre-bento-card__img {
  background: linear-gradient(135deg, #c2410c, #fdba74);
}

.page-home .genre-bento-card--v6 .genre-bento-card__frame {
  background: #059669;
}
.page-home .genre-bento-card--v6 .genre-bento-card__frame::before {
  background: #059669;
}
.page-home .genre-bento-card--v6 .genre-bento-card__frame span.genre-bento-card__img {
  background: linear-gradient(160deg, #047857, #6ee7b7);
}

.page-home .genre-bento-card--v7 .genre-bento-card__frame {
  background: #2563eb;
}
.page-home .genre-bento-card--v7 .genre-bento-card__frame::before {
  background: #2563eb;
}
.page-home .genre-bento-card--v7 .genre-bento-card__frame span.genre-bento-card__img {
  background: linear-gradient(145deg, #1d4ed8, #93c5fd);
}

.page-home .genre-bento-card:focus-visible {
  outline: 2px solid #818cf8;
  outline-offset: 2px;
}

/* Library bento: Tracks + Artists (below genres) */
.page-home .library-bento {
  margin-bottom: 24px;
  min-width: 0;
}

.page-home .library-bento__grid {
  display: grid;
  /* minmax(0,1fr) — wide max-content children (artist strip) must not steal min-width from the sibling column */
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}

@media (max-width: 900px) {
  .page-home .library-bento__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.page-home .library-bento__tile {
  min-width: 0;
  min-height: 0;
  padding: 22px 22px 20px;
  border-radius: 16px;
  background: #12121a;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.55) inset,
    0 12px 40px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  align-self: stretch;
}

.page-home .library-bento__eyebrow {
  margin: 0 0 6px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #71717a;
}

.page-home .library-bento__track-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  margin-bottom: 16px;
}

.page-home .library-bento__title--lead {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fafafa;
}

.page-home .library-bento__eyebrow--end {
  margin: 0;
  flex: 0 0 auto;
  align-self: center;
}

.page-home .library-bento__title {
  margin: 0 0 16px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fafafa;
}

.page-home .library-bento__artist-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 10px;
  margin-bottom: 14px;
}

.page-home .library-bento__artist-head .library-bento__eyebrow {
  margin: 0;
}

.page-home .library-bento__clear {
  flex: 0 0 auto;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(24, 24, 27, 0.85);
  color: #e4e4e7;
  cursor: pointer;
  font: inherit;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.page-home .library-bento__clear:hover {
  background: rgba(99, 102, 241, 0.28);
  border-color: rgba(129, 140, 248, 0.45);
  color: #fafafa;
}

.page-home .library-bento__clear:focus-visible {
  outline: 2px solid #818cf8;
  outline-offset: 2px;
}

.page-home .library-bento__head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.page-home .library-bento__title--inline {
  margin: 0;
}

.page-home .library-bento__pill {
  font-size: 0.65rem;
  padding: 5px 10px;
  border-radius: 999px;
  background: #0c0c0f;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #a1a1aa;
}

/* ~3 rows visible; max-height also set inline by syncLibraryBentoTrackScrollHeight() in index.html */
.page-home .library-bento__track-scroll {
  --library-bento-track-gap: 4px;
  --library-bento-track-row-est: 60px;
  flex: 0 0 auto;
  max-height: calc(3 * var(--library-bento-track-row-est) + 2 * var(--library-bento-track-gap));
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  outline: none;
}

.page-home .library-bento__track-scroll::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.page-home .library-bento__track-scroll:focus-visible {
  box-shadow: 0 0 0 2px rgba(129, 140, 248, 0.45);
  border-radius: 12px;
}

.page-home .library-bento__track-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.page-home .library-bento__track-row {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 10px 12px;
  margin: 0;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.page-home .library-bento__track-row:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.page-home .library-bento__thumb {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.page-home .library-bento__thumb--v0 {
  background-color: #4c1d95;
}
.page-home .library-bento__thumb--v1 {
  background-color: #c2410c;
}
.page-home .library-bento__thumb--v2 {
  background-color: #0f766e;
}

.page-home .library-bento__track-grow {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.page-home .library-bento__track-grow strong {
  font-size: 0.88rem;
  font-weight: 600;
  color: #fafafa;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-home .library-bento__track-sub {
  font-size: 0.78rem;
  color: #71717a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-home .library-bento__dur {
  font-size: 0.78rem;
  color: #a1a1aa;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

/* Artists strip — endless horizontal scroll (same behavior as top genres). */
.page-home .library-bento__albums-viewport {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  margin: 0 -4px;
  padding: 4px 4px 2px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scroll-behavior: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  outline: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-x;
}

.page-home .library-bento__albums-viewport::-webkit-scrollbar {
  display: none;
}

.page-home .library-bento__albums-viewport.library-bento__albums-viewport--dragging {
  cursor: grabbing;
}

.page-home .library-bento__albums-viewport:focus-visible {
  box-shadow: 0 0 0 2px rgba(129, 140, 248, 0.45);
  border-radius: 12px;
}

.page-home .library-bento__albums-track {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  width: max-content;
  gap: 10px;
}

.page-home .library-bento__albums-set {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  flex-shrink: 0;
  gap: 10px;
}

.page-home .library-bento__albums-set .library-bento__album-cell {
  flex: 0 0 auto;
  /* Similar footprint to the old 4-up grid inside half the page */
  width: clamp(104px, 11vw, 148px);
}

.page-home .library-bento__album-cell {
  aspect-ratio: 1;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  background-size: cover;
  background-position: center;
  padding: 0;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.45) inset,
    0 8px 24px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.page-home .library-bento__album-cell:hover {
  transform: translateY(-3px);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12),
    0 14px 32px rgba(0, 0, 0, 0.45);
}

.page-home .library-bento__album-cell-label {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  display: block;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #0a0a0b;
  background: rgba(245, 158, 11, 0.92);
  border-radius: 999px;
  padding: 6px 10px;
  overflow: hidden;
  pointer-events: none;
}

.page-home .library-bento__album-cell-label-name {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-home .library-bento__album-cell-label-count {
  display: block;
  margin-top: 1px;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  opacity: 0.85;
}

.page-home .library-bento__album-cell-label .library-bento__album-cell-label-text {
  display: inline-block;
}

/* Long names: seamless horizontal scroll (duplicate half, animate -50%). */
.page-home .library-bento__album-cell-label-name.library-bento__album-cell-label--marquee {
  text-overflow: clip;
  text-align: left;
}

.page-home .library-bento__album-cell-label-name.library-bento__album-cell-label--marquee .library-bento__album-cell-label-track {
  display: inline-flex;
  flex-wrap: nowrap;
  width: max-content;
  will-change: transform;
  animation: library-bento-album-marquee var(--album-marquee-duration, 12s) linear infinite;
}

.page-home .library-bento__album-cell-label-name.library-bento__album-cell-label--marquee .library-bento__album-cell-label-seg {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  white-space: nowrap;
}

.page-home .library-bento__album-cell-label-name.library-bento__album-cell-label--marquee .library-bento__album-cell-label-seg-gap {
  display: inline-block;
  width: 1.25rem;
  flex-shrink: 0;
}

@keyframes library-bento-album-marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-home .library-bento__album-cell-label-name.library-bento__album-cell-label--marquee .library-bento__album-cell-label-track {
    animation: none;
    transform: none;
  }
}

.page-home .library-bento__album-cell--v0 {
  background-color: #6366f1;
}
.page-home .library-bento__album-cell--v1 {
  background-color: #e11d48;
}
.page-home .library-bento__album-cell--v2 {
  background-color: #0891b2;
}
.page-home .library-bento__album-cell--v3 {
  background-color: #ca8a04;
}

.page-home .library-bento__album-cell--has-logo {
  background-color: #0f172a;
}

.page-home .library-bento__album-cell--active {
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.85),
    0 0 0 1px rgba(0, 0, 0, 0.45) inset,
    0 8px 24px rgba(0, 0, 0, 0.35);
}

.page-home .library-bento__hint {
  margin: 0;
  margin-top: auto;
  padding-top: 14px;
  font-size: 0.72rem;
  line-height: 1.45;
  color: #71717a;
}

.page-home .now-panel {
  margin: 0 0 24px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(18, 18, 26, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.page-home .now-panel__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 14px;
  align-items: stretch;
}

@media (max-width: 900px) {
  .page-home .now-panel__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.page-home .now-panel__main {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

@media (max-width: 520px) {
  .page-home .now-panel__main {
    grid-template-columns: 180px minmax(0, 1fr);
  }
}

.page-home .now-panel__art {
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(244, 63, 94, 0.25), rgba(139, 92, 246, 0.2));
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.page-home .now-panel__cover {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-home .now-panel__meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.page-home .now-panel__title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fafafa;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-home .now-panel__artist {
  margin: 0;
  color: #a1a1aa;
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-home .now-panel__lyrics {
  position: relative;
  margin-top: 4px;
  padding: 10px 10px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(250, 250, 250, 0.9);
  font-size: 0.82rem;
  line-height: 1.55;
  max-height: 270px;
  overflow: auto;
  white-space: pre-wrap;
}

.page-home .now-panel__lyrics.now-panel__lyrics--empty {
  color: #71717a;
}

.page-home .now-panel__lyrics::-webkit-scrollbar {
  width: 10px;
}

.page-home .now-panel__lyrics::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
}

.page-home .now-panel__lyrics::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  border: 2px solid rgba(0, 0, 0, 0.18);
}

.page-home .now-panel__lyrics:hover::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
}

.page-home .now-panel__side {
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.page-home .now-panel__side-title {
  margin: 0 0 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #71717a;
}

.page-home .now-panel__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.page-home .now-panel__item {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 10px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.page-home .now-panel__item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}

.page-home .now-panel__item--active {
  box-shadow: 0 0 0 2px rgba(244, 63, 94, 0.28);
  border-color: rgba(244, 63, 94, 0.32);
}

.page-home .now-panel__bullet {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: rgba(250, 250, 250, 0.18);
}

.page-home .now-panel__item--active .now-panel__bullet {
  background: rgba(244, 63, 94, 0.9);
}

.page-home .now-panel__item-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.page-home .now-panel__item-title {
  font-size: 0.84rem;
  font-weight: 650;
  color: #fafafa;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-home .now-panel__item-artist {
  font-size: 0.74rem;
  color: #71717a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-home .soundtracks {
  margin: 0 0 110px;
  padding: 18px;
  border-radius: 16px;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.page-home .soundtracks__scroll {
  max-height: min(52vh, 520px);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  margin: 0 -4px;
  padding: 0 4px;
}

.page-home .soundtracks__load-more {
  padding: 12px 8px;
  font-size: 0.75rem;
  color: #71717a;
  text-align: center;
}

.page-home .soundtracks__head {
  margin-bottom: 10px;
}

.page-home .soundtracks__title {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #71717a;
}

.page-home .soundtracks__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.page-home .soundtracks__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  align-items: center;
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: inherit;
  text-align: left;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.page-home .soundtracks__row-main {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.page-home .soundtracks__play {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(24, 24, 27, 0.55);
  color: #e4e4e7;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.page-home .soundtracks__play:hover {
  background: rgba(99, 102, 241, 0.35);
  border-color: rgba(129, 140, 248, 0.45);
  color: #fff;
}

.page-home .soundtracks__play:focus-visible {
  outline: 2px solid #818cf8;
  outline-offset: 2px;
}

.page-home .soundtracks__play-icon {
  display: block;
  margin-left: 2px;
}

.page-home .soundtracks__row:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
}

.page-home .soundtracks__row:hover .soundtracks__play {
  border-color: rgba(255, 255, 255, 0.16);
}

.page-home .soundtracks__row--active {
  border-color: #38bdf8;
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.25);
}

.page-home .soundtracks__thumb {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.page-home .soundtracks__grow {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.page-home .soundtracks__name {
  font-size: 0.92rem;
  font-weight: 700;
  color: #fafafa;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-home .soundtracks__artist {
  font-size: 0.8rem;
  color: #71717a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-home .soundtracks__row-main:focus-visible {
  outline: 2px solid #818cf8;
  outline-offset: 2px;
  border-radius: 8px;
}

.page-home .library-bento__track-row:focus-visible,
.page-home .library-bento__album-cell:focus-visible {
  outline: 2px solid #818cf8;
  outline-offset: 2px;
}

/* Home — top spotlight (#home-spotlight): matches .top-genres / .library-bento / .soundtracks */

.page-home .home-spotlight {
  position: relative;
  margin-bottom: 24px;
  padding: 12px 16px 14px;
  border-radius: 16px;
  background: #12121a;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.55) inset,
    0 12px 40px rgba(0, 0, 0, 0.45);
  overflow: visible;
}

.page-home .home-spotlight[hidden] {
  display: none !important;
}

.page-home .home-spotlight__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 380px);
  gap: 18px;
  align-items: stretch;
}

@media (max-width: 960px) {
  .page-home .home-spotlight__grid {
    grid-template-columns: 1fr;
  }
}

.page-home .home-spotlight--no-video .home-spotlight__grid {
  grid-template-columns: 1fr;
}

.page-home .home-spotlight--no-video .home-spotlight__video-block {
  display: none;
}

.page-home .home-spotlight__video-block[hidden] {
  display: none !important;
}

.page-home .home-spotlight__video-block {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  align-self: stretch;
  min-width: 0;
  min-height: 0;
  height: 100%;
}

/* Same as .page-home .top-genres__title */
.page-home .home-spotlight__heading {
  margin: 0 0 12px;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #f4f4f5;
}

.page-home .home-spotlight__carousel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.page-home .home-spotlight__viewport {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
  background: #09090b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.55) inset,
    0 8px 28px rgba(0, 0, 0, 0.4);
  aspect-ratio: 16 / 9;
  flex: 1 1 auto;
  min-height: 0;
}

.page-home .home-spotlight__slides-track {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  height: 100%;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.page-home .home-spotlight__slide {
  position: relative;
  min-height: 0;
  min-width: 0;
  box-sizing: border-box;
  height: 100%;
}

.page-home .home-spotlight__slide-btn {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 0;
  overflow: hidden;
  text-align: left;
}

.page-home .home-spotlight__slide-btn:focus-visible {
  outline: 2px solid #818cf8;
  outline-offset: 2px;
  z-index: 1;
}

.page-home .home-spotlight__slide-play {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  width: 46px;
  height: 46px;
  padding: 0;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(9, 9, 11, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fafafa;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.page-home .home-spotlight__slide-play:hover {
  background: rgba(99, 102, 241, 0.45);
  border-color: rgba(129, 140, 248, 0.55);
  color: #fff;
}

.page-home .home-spotlight__slide-play:focus-visible {
  outline: 2px solid #818cf8;
  outline-offset: 2px;
}

.page-home .home-spotlight__slide-play-icon {
  display: block;
  margin-left: 3px;
}

.page-home .home-spotlight__slide-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.page-home .home-spotlight__slide-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 38%, rgba(9, 9, 11, 0.82));
}

.page-home .home-spotlight__slide-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-width: calc(100% - 58px);
  padding: 14px 12px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  pointer-events: none;
}

.page-home .home-spotlight__slide-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fafafa;
}

.page-home .home-spotlight__slide-artist {
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #d4d4d8;
}

.page-home .home-spotlight__dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

/* Dots: same accent family as .now-panel__item--active / rose highlights */
.page-home .home-spotlight__dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.page-home .home-spotlight__dot:hover {
  background: rgba(255, 255, 255, 0.38);
}

.page-home .home-spotlight__dot--active {
  background: rgba(244, 63, 94, 0.95);
  box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.2);
  transform: scale(1.2);
}

.page-home .home-spotlight__dot:focus-visible {
  outline: 2px solid #818cf8;
  outline-offset: 2px;
}

/* Right column: matches .page-home .now-panel__side chrome */
.page-home .home-spotlight__tracks-block {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  min-height: 0;
  height: 100%;
  padding: 12px 12px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* Same as .page-home .soundtracks__title */
.page-home .home-spotlight__subheading {
  margin: 0 0 10px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #71717a;
}

/* max-height for ~5 visible rows is set inline by syncHomeSpotlightLayout() in index.html */
.page-home .home-spotlight__tracks-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-right: 2px;
  margin: 0 -2px 0 0;
  -webkit-overflow-scrolling: touch;
}

.page-home .home-spotlight__tracks-scroll::-webkit-scrollbar {
  display: none;
}

.page-home .home-spotlight__tracks-scroll:focus-visible {
  box-shadow: 0 0 0 2px rgba(129, 140, 248, 0.45);
  border-radius: 10px;
}

.page-home .home-spotlight__tracks-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.page-home .home-spotlight__empty {
  margin: 0;
  padding: 8px 4px;
  font-size: 0.82rem;
  color: #71717a;
}

/* Rows: mirror .page-home .soundtracks__row */
.page-home .home-spotlight__track-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  align-items: center;
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: inherit;
  text-align: left;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.page-home .home-spotlight__row-main {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.page-home .home-spotlight__play {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(24, 24, 27, 0.55);
  color: #e4e4e7;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.page-home .home-spotlight__play:hover {
  background: rgba(99, 102, 241, 0.35);
  border-color: rgba(129, 140, 248, 0.45);
  color: #fff;
}

.page-home .home-spotlight__play:focus-visible {
  outline: 2px solid #818cf8;
  outline-offset: 2px;
}

.page-home .home-spotlight__play-icon {
  display: block;
  margin-left: 2px;
}

.page-home .home-spotlight__track-row:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
}

.page-home .home-spotlight__track-row:hover .home-spotlight__play {
  border-color: rgba(255, 255, 255, 0.16);
}

.page-home .home-spotlight__track-row--active {
  border-color: #38bdf8;
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.25);
}

.page-home .home-spotlight__thumb {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.page-home .home-spotlight__grow {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.page-home .home-spotlight__name {
  font-size: 0.92rem;
  font-weight: 700;
  color: #fafafa;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-home .home-spotlight__artist {
  font-size: 0.8rem;
  color: #71717a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-home .home-spotlight__row-main:focus-visible {
  outline: 2px solid #818cf8;
  outline-offset: 2px;
  border-radius: 8px;
}

/* Track preview modal — same card chrome + bottom reserve as .page-home (library-bento + main-wrap) */
#track-quick-modal.track-modal {
  /* Mirrors .page-home .library-bento__tile */
  --tm-card-bg: #12121a;
  --tm-card-radius: 16px;
  --tm-card-border: 1px solid rgba(255, 255, 255, 0.14);
  --tm-card-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.55) inset,
    0 12px 40px rgba(0, 0, 0, 0.45);
  --tm-card-pad: 22px 22px 20px;
  --tm-bento-gap: 14px;
  /* Same as .page-home .main-wrap padding-bottom */
  --tm-bar-reserve: calc(280px + env(safe-area-inset-bottom, 0px));
}

@media (max-width: 820px) {
  #track-quick-modal.track-modal {
    --tm-bar-reserve: calc(300px + env(safe-area-inset-bottom, 0px));
  }
}

.track-modal[hidden] {
  display: none !important;
}

.track-modal:not([hidden]) {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: max(12px, env(safe-area-inset-top, 0px)) 12px var(--tm-bar-reserve);
  box-sizing: border-box;
  pointer-events: auto;
  /* Fixed viewport; scroll here so tall content (lyrics + similar) is never flex-clipped */
  height: 100dvh;
  max-height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-padding-top: 25px;
  scroll-padding-bottom: max(25px, min(48vh, 520px));
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.track-modal:not([hidden])::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.track-modal__backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  /* Same gradient family as .page-home .main-wrap, softened for overlay */
  background: linear-gradient(
    165deg,
    rgba(12, 12, 15, 0.72) 0%,
    rgba(18, 18, 26, 0.68) 40%,
    rgba(26, 16, 40, 0.65) 100%
  );
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  cursor: pointer;
}

.track-modal__close {
  position: fixed;
  top: max(12px, env(safe-area-inset-top, 0px));
  right: max(12px, env(safe-area-inset-right, 0px));
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(24, 24, 30, 0.65);
  color: #e4e4e7;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4);
}

.track-modal__close:hover {
  background: rgba(40, 40, 48, 0.85);
}

.track-modal__close:focus-visible {
  outline: 2px solid #818cf8;
  outline-offset: 2px;
}

/* Cover + details: stacked column; parent .track-modal scrolls (no max-height shrink) */
.track-modal__stack {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: var(--tm-bento-gap, 14px);
  width: min(1120px, 100%);
  flex-shrink: 0;
  /* Bottom spacer so last cards can scroll up into view (same as before) */
  padding: 25px 0 max(25px, min(48vh, 520px));
  box-sizing: border-box;
  overflow: visible;
  pointer-events: auto;
  -webkit-overflow-scrolling: touch;
}

.track-modal__cover-box {
  position: relative;
  flex-shrink: 0;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 356px;
  border-radius: var(--tm-card-radius, 16px);
  border: var(--tm-card-border);
  background: var(--tm-card-bg);
  overflow: hidden;
  box-shadow: var(--tm-card-shadow);
  /* Stack art + bottom overlay in one cell so the overlay always paints above the image (avoids z-index / stacking bugs). */
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  align-items: stretch;
  justify-items: stretch;
  isolation: isolate;
}
.track-modal__cover-box--empty {
  aspect-ratio: auto;
  min-height: 213px;
  max-height: 249px;
  background: linear-gradient(155deg, rgba(45, 45, 58, 0.95), var(--tm-card-bg));
}
.track-modal__cover-box--empty .track-modal__cover-img {
  display: none !important;
}

.track-modal__cover-img {
  grid-area: 1 / 1;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: center;
}

/* Artist logo: thumbnail overlay (top-right on hero), not a bento card. */
.track-modal__artist-logo-wrap {
  position: absolute;
  inset: 15px 15px auto auto;
  margin: 0;
  z-index: 3;
  width: min(190px, 52vw, 38vh);
  height: min(190px, 52vw, 38vh);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.track-modal__artist-logo-wrap[hidden] {
  display: none !important;
}
.track-modal__artist-logo {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
  object-position: center;
  border-radius: 14px;
  background: rgba(12, 12, 18, 0.45);
  padding: 10px;
  box-sizing: border-box;
  box-shadow: 0 4px 28px rgba(0, 0, 0, 0.55);
}

.track-modal__cover-overlay {
  grid-area: 1 / 1;
  align-self: end;
  justify-self: stretch;
  z-index: 2;
  position: relative;
  padding: 44px 18px 16px;
  pointer-events: auto;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.92) 0%,
    rgba(0, 0, 0, 0.55) 45%,
    rgba(0, 0, 0, 0) 100%
  );
  border-radius: 0 0 calc(var(--tm-card-radius, 16px) - 1px) calc(var(--tm-card-radius, 16px) - 1px);
  box-sizing: border-box;
}

.track-modal__cover-overlay-inner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  width: 100%;
  min-width: 0;
}

.track-modal__cover-text {
  flex: 0 0 auto;
  min-width: 0;
}

.track-modal__cover-bottom-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 14px;
  width: 100%;
  min-width: 0;
}

.track-modal__artist-line {
  flex: 0 1 auto;
  min-width: 0;
  max-width: min(52%, 320px);
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-modal__spectrum-wrap {
  flex: 0 1 auto;
  min-width: 72px;
  max-width: min(200px, 100%);
  width: 100%;
  height: 32px;
  align-self: center;
  pointer-events: none;
  border-radius: 6px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.28);
}

.track-modal__spectrum {
  display: block;
  width: 100%;
  height: 32px;
  vertical-align: bottom;
}

body[data-spectrum-theme="studio"] .track-modal__spectrum-wrap {
  height: 26px;
}

body[data-spectrum-theme="studio"] .track-modal__spectrum {
  height: 26px;
}

.track-modal__heading {
  margin: 0;
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fafafa;
  line-height: 1.2;
}

.track-modal__heading--cover {
  color: #fafafa;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
  max-width: 100%;
}

.track-modal__sub {
  margin: 8px 0 0;
  color: #a1a1aa;
  font-size: clamp(0.8rem, 1.5vw, 0.95rem);
}

.track-modal__sub--cover {
  margin: 6px 0 0;
  color: #e4e4e7;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
  max-width: 100%;
}

.track-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.track-modal__actions--cover {
  margin-top: 0;
  flex: 0 0 auto;
  flex-shrink: 0;
  justify-content: flex-end;
}

.track-modal__btn--video {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.track-modal__btn--video[hidden] {
  display: none !important;
}

.track-modal__video-icon {
  flex-shrink: 0;
  display: block;
}

/* Full-screen video clip overlay (above track modal z-index 110) */
.track-video-clip:not([hidden]) {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(12px, env(safe-area-inset-top, 0px)) 16px max(16px, env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
  pointer-events: auto;
}
.track-video-clip[hidden] {
  display: none !important;
}
.track-video-clip__backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(8, 8, 14, 0.52);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  cursor: pointer;
}
.track-video-clip__stage {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: min(88vh, 920px);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  pointer-events: auto;
}
.track-video-clip__back {
  align-self: flex-start;
  border-radius: 999px;
  padding: 8px 16px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(24, 24, 30, 0.65);
  color: #fafafa;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}
.track-video-clip__back:hover {
  background: rgba(40, 40, 48, 0.85);
}
.track-video-clip__back:focus-visible {
  outline: 2px solid #818cf8;
  outline-offset: 2px;
}
.track-video-clip__frame-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.track-video-clip__playback-shade {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: #000;
  opacity: 1;
  transition: opacity 2s ease-out;
  pointer-events: none;
}
.track-video-clip__playback-shade--fade {
  opacity: 0;
}
.track-video-clip__playback-shade--gone {
  opacity: 0;
  visibility: hidden;
  transition: none;
}
.track-video-clip__frame-inner {
  width: 100%;
  height: 100%;
  min-height: 0;
}
.track-video-clip__frame-inner iframe {
  pointer-events: none;
}
.track-video-clip__frame-inner iframe,
.track-video-clip__frame-inner video {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}
/* Blocks pointer events so the embedded player never receives hover/tap (no in-iframe chrome). */
.track-video-clip__input-blocker {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: transparent;
  cursor: default;
  pointer-events: auto;
}

.track-modal__btn {
  border-radius: 999px;
  padding: 8px 18px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
}

.track-modal__btn--primary {
  border: none;
  background: #16a34a;
  color: #fff;
}

.track-modal__btn--primary:hover {
  filter: brightness(1.08);
}

.track-modal__btn--primary.track-modal__btn--stop {
  background: #dc2626;
}

.track-modal__btn--primary.track-modal__btn--stop:hover {
  filter: brightness(1.08);
}

.track-modal__btn--ghost {
  background: rgba(24, 24, 30, 0.65);
  color: #fafafa;
  border-color: rgba(255, 255, 255, 0.14);
}

.track-modal__btn--ghost:hover {
  background: rgba(40, 40, 48, 0.85);
}

.track-modal__btn:focus-visible {
  outline: 2px solid #818cf8;
  outline-offset: 2px;
}

.track-modal__btn--primary:focus-visible:not(.track-modal__btn--stop) {
  outline-color: #4ade80;
}

.track-modal__btn--primary.track-modal__btn--stop:focus-visible {
  outline-color: #f87171;
}

.track-modal__meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  width: 100%;
  align-items: stretch;
  flex-shrink: 0;
}

/* Inner stat chips: same feel as .page-home .soundtracks__row */
.track-modal__stat-card {
  flex: 1 1 calc(33.333% - 8px);
  min-width: min(120px, 100%);
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
}

.track-modal__stat-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #71717a;
}

.track-modal__stat-value {
  display: block;
  margin-top: 4px;
  font-size: 1.25rem;
  font-weight: 800;
  color: #fafafa;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.track-modal__stars {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.1em;
  margin-top: 4px;
  font-size: 1.2rem;
  line-height: 1;
  letter-spacing: 0.02em;
}

.track-modal__star {
  color: rgba(234, 179, 8, 0.88);
  user-select: none;
}

/* Lyrics + similar — same grid gap as .page-home .library-bento__grid */
.track-modal__extras-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--tm-bento-gap, 14px);
  width: 100%;
  align-items: stretch;
  flex-shrink: 0;
}

.track-modal__extra-card {
  flex: 1 1 calc(50% - 7px);
  min-width: min(260px, 100%);
  padding: var(--tm-card-pad);
  border-radius: var(--tm-card-radius, 16px);
  border: var(--tm-card-border);
  background: var(--tm-card-bg);
  box-shadow: var(--tm-card-shadow);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  min-height: auto;
}

.track-modal__extra-head {
  display: block;
  margin: 0 0 10px;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #71717a;
}

.track-modal__lyrics-scroll {
  flex: 1 1 auto;
  min-height: 120px;
  max-height: 240px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 25px 8px 25px 0;
  box-sizing: border-box;
  font-size: 0.88rem;
  line-height: 1.5;
  color: #d4d4d8;
  white-space: pre-wrap;
  word-break: break-word;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.track-modal__lyrics-scroll::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.track-modal__lyrics-scroll--empty {
  color: #71717a;
  font-style: italic;
}

.track-modal__similar-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
}

.track-modal__similar-empty {
  margin: 0;
  font-size: 0.85rem;
  color: #71717a;
  line-height: 1.4;
}

/* Inner rows: match .page-home .soundtracks__row */
.track-modal__similar-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.track-modal__similar-row:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
}

.track-modal__similar-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.track-modal__similar-thumb--empty {
  background: linear-gradient(145deg, rgba(50, 50, 62, 0.9), rgba(24, 24, 30, 0.95));
}

.track-modal__similar-grow {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.track-modal__similar-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fafafa;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-modal__similar-meta {
  font-size: 0.75rem;
  color: #a1a1aa;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-modal__similar-play {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(24, 24, 27, 0.55);
  color: #e4e4e7;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.track-modal__similar-play:hover {
  background: rgba(99, 102, 241, 0.35);
  border-color: rgba(129, 140, 248, 0.45);
  color: #fff;
}

.track-modal__similar-play:focus-visible {
  outline: 2px solid #818cf8;
  outline-offset: 2px;
}

.track-modal__similar-play-icon {
  display: block;
  margin-left: 2px;
}

h1 {
  margin: 0;
  font-size: 2rem;
}

.hero {
  position: relative;
  margin-top: 0;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.page-home .hero {
  gap: 16px;
}

/* Home layout: remove the track preview section beneath Genre + Library boxes. */
.page-home .hero {
  display: none !important;
}

.hero__track-head {
  margin: 0;
  padding: 0;
}

.hero__track-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #f1f5f9;
  line-height: 1.25;
}

.hero__track-artist {
  margin: 6px 0 0;
  color: #94a3b8;
  font-size: 1rem;
}

.page-home .hero__track-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #f4f4f5;
  letter-spacing: -0.02em;
}

.page-home .hero__track-artist {
  margin: 4px 0 0;
  color: #a1a1aa;
  font-size: 0.95rem;
}

/* Large cover + lyrics preview removed; lyrics kept in DOM for scripts (off-screen). */
.hero__video-row {
  width: 100%;
  max-width: 720px;
}

.hero__video-row[hidden] {
  display: none !important;
}

.page-home .hero__video-row {
  max-width: min(100%, 640px);
}

.hero__media-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  pointer-events: none;
}

.hero__lyrics-scroll {
  font-size: 0.74rem;
  line-height: 1.55;
  color: #cbd5e1;
  white-space: pre-wrap;
  word-break: break-word;
}

.page-home .hero__lyrics-scroll {
  font-size: 0.72rem;
  line-height: 1.55;
  color: #a1a1aa;
}

.hero__lyrics-scroll--empty {
  color: #64748b;
  font-style: italic;
}

.page-home .hero__lyrics-scroll--empty {
  color: #71717a;
}

.hero__controls {
  width: 100%;
  max-width: 100%;
  padding-top: 0;
  box-sizing: border-box;
  flex-shrink: 0;
}

/* Single transport row: hide native <audio> whenever the track uses embedded video (YouTube bar or iframe-only). */
.hero__controls--video-mode #player {
  display: none !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

.hero__video-wrap {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  background: #111827;
}

.page-home .hero__video-wrap {
  border-radius: 10px;
  border: 1px solid #27272a;
  background: #09090b;
}

.page-home .hero__video-frame {
  border-radius: 10px;
}

.hero__video-wrap[hidden] {
  display: none !important;
}

/* Clean preview: same cover as audio, no overlays; click cover loads embed (see index script). */
.hero #cover.hero__cover--video-tap {
  cursor: pointer;
}

/* Letterboxed art: intrinsic size cap in JS avoids upscaling small bitmaps (blur). */
.hero__art-frame {
  width: 100%;
  max-width: 576px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  background: #111827;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-home .hero__art-frame {
  background: #09090b;
  border-radius: 10px;
  border: 1px solid #27272a;
}

.hero__art-frame #cover,
.hero #cover.hero__cover--crisp {
  width: auto;
  height: auto;
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  border-radius: 0;
  display: block;
  background: transparent;
}

.hero__video-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
}

.hero__video-wrap iframe,
.hero__video-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.hero__video-wrap video,
.hero__video-frame video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hero #cover[hidden] {
  display: none !important;
}

#player {
  margin-top: 0;
  display: block;
  width: 100%;
  max-width: none;
}

/* Single custom bar for YouTube + streamed audio (must beat .video-transport { display: flex }) */
.video-transport[hidden] {
  display: none !important;
}

/* YouTube sync bar (replaces native <audio> when IFrame API is active) */
.video-transport {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: 0;
  padding: 6px 0;
  min-height: 38px;
}

.video-transport__play {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid #334155;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 0.74rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-family: inherit;
}

.video-transport__play:hover {
  background: #1e293b;
}

.video-transport__seek {
  flex: 1;
  min-width: 0;
  height: 5px;
  -webkit-appearance: none;
  appearance: none;
  background: #334155;
  border-radius: 2px;
  cursor: pointer;
}

.video-transport__seek:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.video-transport__seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #e2e8f0;
  cursor: pointer;
}

.video-transport__seek::-moz-range-thumb {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #e2e8f0;
  cursor: pointer;
  border: 0;
}

.video-transport__time {
  flex-shrink: 0;
  font-size: 0.68rem;
  color: #94a3b8;
  font-variant-numeric: tabular-nums;
  min-width: 7.5em;
  text-align: right;
}

.video-transport__fullscreen {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid #334155;
  background: #0f172a;
  color: #e2e8f0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-family: inherit;
}

.video-transport__fullscreen:hover {
  background: #1e293b;
}

.video-transport__fullscreen:focus-visible {
  outline: 2px solid #818cf8;
  outline-offset: 2px;
}

.video-transport__fullscreen-icon {
  display: block;
  pointer-events: none;
}

#status {
  margin-top: 8px;
  font-size: 0.74rem;
  color: #93c5fd;
}

.page-home #status {
  color: #a78bfa;
  font-size: 0.8rem;
  display: none !important; /* Remove the "Press play to start: ..." helper text on home */
}

@media (max-width: 820px) {
  .floating-nav {
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
    max-height: none;
    overflow: visible;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    padding: 16px;
  }

  .floating-nav__header {
    width: 100%;
    margin-bottom: 12px;
  }

  .floating-nav__nav {
    flex: 1 1 auto;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    overflow: visible;
    min-height: 0;
  }

  .floating-nav__group {
    width: 100%;
    margin-top: 12px;
    padding-top: 12px;
  }

  .floating-nav__footer {
    width: 100%;
    margin-top: 12px;
    padding-top: 12px;
  }

  .main-wrap {
    margin-left: 0;
  }

}

/* Site-wide floating play bar — same glass dock on every page (nav + main layout). */
.qc-play-bar {
  position: fixed;
  left: calc(240px + (100vw - 240px) / 2);
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 120;
  width: min(calc(100vw - 240px - 32px), 620px);
  max-width: 620px;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 12px);
  pointer-events: none;
  transition: opacity 0.38s ease, transform 0.38s ease;
}

.qc-play-bar__card {
  position: relative;
  overflow: hidden;
  order: 1;
  flex: 1;
  padding: 14px 18px;
  border-radius: 16px;
  background: rgba(39, 39, 42, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  min-width: 0;
}

.qc-play-bar__spectrum-glass-layer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 58%;
  min-height: 72px;
  max-height: 140px;
  pointer-events: none;
  z-index: 0;
  mask-image: linear-gradient(to top, #000 55%, transparent 100%);
  -webkit-mask-image: linear-gradient(to top, #000 55%, transparent 100%);
}

.qc-play-bar__spectrum-glass {
  display: block;
  width: 100%;
  height: 100%;
  vertical-align: bottom;
  opacity: 0.88;
  mix-blend-mode: screen;
  filter: saturate(1.15);
}

body[data-spectrum-theme="studio"] .qc-play-bar__spectrum-glass-layer {
  display: none;
}

body[data-spectrum-theme="glass"] .qc-play-bar__inner .qc-play-bar__spectrum-wrap {
  display: none !important;
}

body[data-spectrum-theme="glass"] .qc-play-bar {
  max-width: min(calc(100vw - 240px - 24px), 620px);
}

.qc-play-bar__head-frost {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  width: 100%;
  align-self: stretch;
}

body[data-spectrum-theme="studio"] .qc-play-bar__head-frost {
  padding: 0;
  margin: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body[data-spectrum-theme="glass"] .qc-play-bar__head-frost {
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(24, 24, 27, 0.5);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.qc-play-bar.qc-play-bar--visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

/* Soundtrack preview modal (#track-quick-modal): hide floating bar — not needed on this overlay (bar is z-index 120). */
body.track-preview-modal-open #qc-play-bar {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: translate(-50%, 12px) !important;
}

/* Upload Music (admin.html): fold full player into a bottom-right chip; audio keeps playing */
body.page-admin-upload #qc-play-bar.qc-play-bar--folded.qc-play-bar--visible {
  width: 56px !important;
  height: 56px !important;
  min-width: 56px !important;
  max-width: 56px !important;
  left: auto !important;
  right: max(16px, env(safe-area-inset-right, 0px)) !important;
  transform: none !important;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  padding: 0;
  overflow: visible;
  pointer-events: auto;
}

body.page-admin-upload #qc-play-bar.qc-play-bar--folded .qc-play-bar__card {
  display: none !important;
}

body.page-admin-upload #qc-play-bar.qc-play-bar--folded .qc-play-bar__fold-fab {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(39, 39, 42, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fafafa;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  z-index: 2;
  padding: 0;
  margin: 0;
}

body.page-admin-upload #qc-play-bar.qc-play-bar--folded .qc-play-bar__fold-fab:hover {
  filter: brightness(1.08);
}

body.page-admin-upload #qc-play-bar:not(.qc-play-bar--folded) .qc-play-bar__fold-fab {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(24, 24, 27, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fafafa;
  cursor: pointer;
  z-index: 10;
  padding: 0;
  margin: 0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

body.page-admin-upload #qc-play-bar:not(.qc-play-bar--folded) .qc-play-bar__fold-fab:hover {
  filter: brightness(1.08);
}

body.page-admin-upload .qc-play-bar__fold-fab:focus-visible {
  outline: 2px solid #a5b4fc;
  outline-offset: 2px;
}

html:has(body.page-admin-player-folded) {
  scroll-padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
}

@media (max-width: 820px) {
  body.page-admin-upload #qc-play-bar.qc-play-bar--folded.qc-play-bar--visible {
    right: max(12px, env(safe-area-inset-right, 0px)) !important;
  }
}

/* Upload Music + folder sections (admin.html): collapsible panels */
body.page-admin-upload #panel-upload .admin-panel__toolbar,
body.page-admin-upload #panel-upload-folder .admin-panel__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

body.page-admin-upload #panel-upload.admin-panel--collapsed .admin-panel__toolbar,
body.page-admin-upload #panel-upload-folder.admin-panel--collapsed .admin-panel__toolbar {
  margin-bottom: 0;
}

body.page-admin-upload #panel-upload .admin-panel__collapse-btn,
body.page-admin-upload #panel-upload-folder .admin-panel__collapse-btn {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid #304161;
  background: #0b1327;
  color: #e2e8f0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.15s ease, border-color 0.15s ease;
}

body.page-admin-upload #panel-upload .admin-panel__collapse-btn:hover,
body.page-admin-upload #panel-upload-folder .admin-panel__collapse-btn:hover {
  background: #111c32;
  border-color: #3d5280;
}

body.page-admin-upload #panel-upload .admin-panel__collapse-btn:focus-visible,
body.page-admin-upload #panel-upload-folder .admin-panel__collapse-btn:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}

body.page-admin-upload #panel-upload .admin-panel__chevron,
body.page-admin-upload #panel-upload-folder .admin-panel__chevron {
  display: block;
  transition: transform 0.2s ease;
}

body.page-admin-upload #panel-upload.admin-panel--collapsed .admin-panel__chevron,
body.page-admin-upload #panel-upload-folder.admin-panel--collapsed .admin-panel__chevron {
  transform: rotate(180deg);
}

body.page-admin-upload #panel-upload.admin-panel--collapsed .admin-panel__body,
body.page-admin-upload #panel-upload-folder.admin-panel--collapsed .admin-panel__body {
  display: none !important;
}

body.page-admin-upload #panel-upload.admin-panel--collapsed,
body.page-admin-upload #panel-upload-folder.admin-panel--collapsed {
  padding: 14px 20px;
}

.qc-play-bar__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.qc-play-bar__top {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: start;
  column-gap: 12px;
  row-gap: 10px;
  position: relative;
  z-index: 1;
}

.qc-play-bar__art {
  grid-column: 1;
  grid-row: 1 / span 2;
  /* Top-align with the title/meta row (avoid vertical centering vs. the control row below). */
  align-self: start;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

/* Glass theme: head-frost has padding; nudge art so it lines up with the first text baseline. */
body[data-spectrum-theme="glass"] .qc-play-bar__art {
  margin-top: 8px;
}

.qc-play-bar__art--empty {
  background: linear-gradient(145deg, rgba(67, 56, 202, 0.45) 0%, rgba(30, 27, 75, 0.9) 100%);
}

.qc-play-bar__cover {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.qc-play-bar__volume {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 88px;
  flex-shrink: 1;
  min-width: 72px;
  max-width: 140px;
  justify-content: flex-end;
  margin-left: auto;
}

.qc-play-bar__vol-icon {
  display: flex;
  flex-shrink: 0;
  color: #71717a;
  opacity: 0.95;
}

.qc-play-bar__volume-slider {
  width: 76px;
  max-width: 22vw;
  height: 4px;
  cursor: pointer;
  accent-color: #818cf8;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
}

.qc-play-bar__volume-slider::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: rgba(51, 65, 85, 0.95);
}

.qc-play-bar__volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 10px;
  height: 10px;
  margin-top: -3px;
  border-radius: 50%;
  background: #818cf8;
  border: none;
  box-shadow: 0 0 0 2px rgba(129, 140, 248, 0.35);
}

.qc-play-bar__volume-slider::-moz-range-track {
  height: 4px;
  border-radius: 2px;
  background: rgba(51, 65, 85, 0.95);
}

.qc-play-bar__volume-slider::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #818cf8;
  border: none;
}

.qc-play-bar__text {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.qc-play-bar__meta-column {
  flex: 1;
  min-width: 0;
}

.qc-play-bar__dur-head {
  font-variant-numeric: tabular-nums;
  font-size: 0.78rem;
  color: #fcd34d;
  font-weight: 600;
  flex-shrink: 0;
  line-height: 1.25;
  padding-top: 1px;
}

body[data-spectrum-theme="glass"] .qc-play-bar__dur-head {
  color: #a1a1aa;
  font-weight: 500;
}

body[data-spectrum-theme="studio"] .qc-play-bar__dur-head {
  display: none !important;
}

body[data-spectrum-theme="glass"] .qc-play-bar__timeline .qc-play-bar__time--right {
  display: none !important;
}

.qc-play-bar__title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #fafafa;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qc-play-bar__artist {
  margin-top: 2px;
  font-size: 0.82rem;
  color: #a1a1aa;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qc-play-bar__actions {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  flex-shrink: 0;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  max-width: 100%;
}

.qc-play-bar__toggle {
  box-sizing: border-box;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  line-height: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(24, 24, 27, 0.55);
  color: #e4e4e7;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  display: inline-grid;
  place-items: center;
}

.qc-play-bar__toggle-icon,
.qc-play-bar__transport-icon {
  display: block;
  pointer-events: none;
  width: 16px;
  height: 16px;
}

.qc-play-bar__toggle:hover:not(:disabled) {
  background: rgba(39, 39, 42, 0.75);
  border-color: rgba(255, 255, 255, 0.18);
  color: #fafafa;
}

.qc-play-bar__toggle:focus-visible {
  outline: 2px solid rgba(129, 140, 248, 0.65);
  outline-offset: 2px;
}

.qc-play-bar__toggle:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.qc-play-bar__transport {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
}

.qc-play-bar__icon-btn {
  box-sizing: border-box;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  line-height: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(24, 24, 27, 0.55);
  color: #e4e4e7;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  display: inline-grid;
  place-items: center;
}

.qc-play-bar__icon-btn:hover:not(:disabled) {
  background: rgba(39, 39, 42, 0.75);
  border-color: rgba(255, 255, 255, 0.18);
  color: #fafafa;
}

.qc-play-bar__icon-btn:focus-visible {
  outline: 2px solid rgba(129, 140, 248, 0.65);
  outline-offset: 2px;
}

.qc-play-bar__icon-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.qc-play-bar__queue-btn {
  flex: 0 0 auto;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(24, 24, 27, 0.4);
  color: #d4d4d8;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.qc-play-bar__queue-btn:hover {
  background: rgba(39, 39, 42, 0.65);
  color: #fafafa;
}

.qc-play-bar__queue-count {
  min-width: 1.25rem;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.35);
  color: #e0e7ff;
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
}

.qc-play-bar__queue-panel {
  max-height: 140px;
  overflow: auto;
  padding: 8px 10px;
  border-radius: 8px;
  /* Solid enough to mask the spectrum/analyzer behind the queue */
  background: rgba(24, 24, 27, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
}

.qc-play-bar__queue-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.qc-play-bar__queue-li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 0.78rem;
  color: #e4e4e7;
  background: rgba(39, 39, 42, 0.65);
}

.qc-play-bar__queue-li--current {
  outline: 1px solid rgba(129, 140, 248, 0.55);
  background: rgba(79, 70, 229, 0.35);
}

.qc-play-bar__queue-li-text {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qc-play-bar__queue-remove {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #a1a1aa;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.qc-play-bar__queue-remove:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #fecaca;
}

.qc-play-bar__timeline {
  display: flex;
  align-items: center;
  gap: 10px;
}

.qc-play-bar__time {
  font-variant-numeric: tabular-nums;
  font-size: 0.78rem;
  color: #d4d4d8;
  font-weight: 500;
  min-width: 3rem;
  flex-shrink: 0;
}

.qc-play-bar__time--right {
  text-align: right;
}

.qc-play-bar__seek {
  flex: 1;
  min-width: 0;
  height: 4px;
  cursor: pointer;
  accent-color: #818cf8;
}

.qc-play-bar__seek:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Spectrum visualizer (AnalyserNode; rendering in escape-theme.js, wired from global-player.js) */
.qc-play-bar__spectrum-wrap {
  width: 100%;
  min-height: 40px;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.qc-play-bar__spectrum {
  display: block;
  width: 100%;
  height: 40px;
  vertical-align: bottom;
}

@media (max-width: 820px) {
  .qc-play-bar {
    left: 50%;
    width: min(92vw, 620px);
    max-width: 620px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }
}

/* Embedded video transport (bottom strip on Home) — same chrome as the floating player */
.video-transport__play {
  width: 40px;
  height: 40px;
  border: none;
  background: #fafafa;
  color: #18181b;
  font-size: 0.85rem;
}

.video-transport__play:hover {
  background: #f4f4f5;
}

.video-transport__seek {
  height: 4px;
  background: #3f3f46;
  border-radius: 2px;
}

.video-transport__seek::-webkit-slider-thumb {
  width: 10px;
  height: 10px;
  background: linear-gradient(135deg, #c4b5fd, #6366f1);
}

.video-transport__seek::-moz-range-thumb {
  width: 10px;
  height: 10px;
  background: #818cf8;
}

.video-transport__time {
  color: #a1a1aa;
  font-size: 0.72rem;
}

body.page-home .video-transport__fullscreen {
  width: 40px;
  height: 40px;
  border: none;
  background: #fafafa;
  color: #18181b;
}

body.page-home .video-transport__fullscreen:hover {
  background: #f4f4f5;
}

/* Theme settings page (theme-settings.html) */
.theme-settings-panel {
  margin-top: 8px;
  max-width: 560px;
  padding: 22px 24px;
  border-radius: 16px;
  background: #0f172a;
  border: 1px solid #1f2a44;
}

.theme-settings-panel__title {
  margin: 0 0 8px;
  font-size: 1.45rem;
  font-weight: 700;
  color: #f8fafc;
}

.theme-settings-panel__lead {
  margin: 0 0 22px;
  font-size: 0.92rem;
  line-height: 1.55;
  color: #94a3b8;
}

.theme-settings-panel__h2 {
  margin: 20px 0 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

.theme-settings-panel__hint {
  margin: 0 0 12px;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #64748b;
}

.theme-settings-panel__options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.theme-settings-panel__option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #273549;
  background: rgba(15, 23, 42, 0.6);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.theme-settings-panel__option:hover {
  border-color: #3b4f6b;
  background: rgba(30, 41, 59, 0.45);
}

.theme-settings-panel__option:has(input:checked) {
  border-color: rgba(96, 165, 250, 0.55);
  background: rgba(30, 58, 138, 0.25);
}

.theme-settings-panel__option input {
  margin-top: 3px;
  flex-shrink: 0;
  accent-color: #60a5fa;
}

.theme-settings-panel__option-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.theme-settings-panel__option-name {
  font-size: 0.92rem;
  font-weight: 600;
  color: #e2e8f0;
}

.theme-settings-panel__option-desc {
  font-size: 0.82rem;
  line-height: 1.45;
  color: #94a3b8;
}

.theme-settings-panel__saved {
  margin-top: 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #86efac;
}

/* Legal pages — privacy / terms (match ESCape Music cards + typography) */
.page-legal .main-wrap {
  padding: 24px 24px calc(280px + env(safe-area-inset-bottom, 0px));
  background: #0a0a0a;
}

@media (max-width: 820px) {
  .page-legal .main-wrap {
    padding: 20px 16px calc(300px + env(safe-area-inset-bottom, 0px));
  }
}

.page-legal .page {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 8px 32px 24px;
}

@media (max-width: 640px) {
  .page-legal .page {
    padding: 0 16px 28px;
  }
}

.legal-doc {
  margin: 0;
  padding: 28px 32px 40px;
  border-radius: 16px;
  background: #12121a;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.55) inset,
    0 12px 40px rgba(0, 0, 0, 0.45);
}

@media (max-width: 640px) {
  .legal-doc {
    padding: 22px 18px 32px;
    border-radius: 14px;
  }
}

.legal-doc__header {
  margin-bottom: 22px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.legal-doc__eyebrow {
  margin: 0 0 8px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #737373;
}

.legal-doc__title {
  margin: 0 0 12px;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #f4f4f5;
}

.legal-doc__updated {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: #a3a3a3;
}

.legal-doc__updated a {
  color: #e5e5e5;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.legal-doc__updated a:hover {
  color: #ffffff;
  border-bottom-color: rgba(255, 255, 255, 0.5);
}

.legal-doc__lede {
  margin: 0 0 0;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: #d4d4d4;
}

.legal-doc h2 {
  margin: 28px 0 12px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.35;
  color: #f4f4f5;
}

.legal-doc h2:first-of-type {
  margin-top: 26px;
  padding-top: 0;
  border-top: none;
}

.legal-doc p {
  margin: 0 0 14px;
  font-size: 0.875rem;
  line-height: 1.65;
  color: #a3a3a3;
}

.legal-doc p.legal-doc__eyebrow {
  margin: 0 0 8px;
}

.legal-doc p.legal-doc__updated {
  margin: 0;
}

.legal-doc li {
  margin: 0 0 10px;
  font-size: 0.875rem;
  line-height: 1.65;
  color: #a3a3a3;
}

.legal-doc ul {
  margin: 0 0 18px;
  padding: 16px 18px 16px 28px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
  list-style: disc;
}

.legal-doc ul li::marker {
  color: #525252;
}

.legal-doc strong {
  font-weight: 600;
  color: #e5e5e5;
}

.legal-doc a {
  color: #fafafa;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.legal-doc a:hover {
  color: #ffffff;
  border-bottom-color: rgba(255, 255, 255, 0.5);
}

.legal-doc__header a {
  border-bottom-color: rgba(255, 255, 255, 0.28);
}

/* Pricing — PayPal subscribe (sandbox / live client id from API or fallback) */
.page-pricing .main-wrap {
  padding: 24px 24px calc(280px + env(safe-area-inset-bottom, 0px));
  background: #0a0a0a;
}

.page-pricing .page {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 8px 32px 24px;
}

.pricing-panel {
  margin: 0;
  padding: 0;
  border-radius: 16px;
  background: #12121a;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.55) inset,
    0 12px 40px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.pricing-panel__inner {
  padding: 28px 32px 32px;
}

.pricing-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.pricing-panel__plan-name {
  margin: 0;
  font-family: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #fafafa;
  line-height: 1.2;
}

.pricing-panel__badge {
  flex-shrink: 0;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #d4d4d4;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.pricing-panel__tagline {
  margin: 0 0 22px;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: #a3a3a3;
}

.pricing-panel__price-block {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.pricing-panel__price-main {
  margin: 0 0 6px;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fafafa;
  line-height: 1.15;
}

.pricing-panel__price-period {
  font-size: 1.125rem;
  font-weight: 600;
  color: #d4d4d4;
}

.pricing-panel__price-detail {
  margin: 10px 0 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #a3a3a3;
}

.pricing-panel__price-detail strong {
  color: #e5e5e5;
  font-weight: 600;
}

.pricing-panel__price-footnote {
  margin: 8px 0 0;
  font-size: 0.8125rem;
  color: #737373;
}

.pricing-features {
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}

.pricing-features__item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: #d4d4d4;
}

.pricing-features__item:last-child {
  margin-bottom: 0;
}

.pricing-features__icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  color: #22c55e;
}

.pricing-panel__cta-wrap {
  margin-bottom: 20px;
}

.pricing-panel__email-step {
  margin-bottom: 4px;
}

.pricing-panel__email-lede {
  margin: 0 0 14px;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: #a3a3a3;
}

.pricing-panel__email-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #737373;
}

.pricing-panel__email-input {
  display: block;
  width: 100%;
  max-width: 420px;
  box-sizing: border-box;
  margin-bottom: 8px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: #0a0a0a;
  color: #fafafa;
  font-size: 1rem;
}

.pricing-panel__email-input::placeholder {
  color: #737373;
}

.pricing-panel__email-input:focus {
  outline: none;
  border-color: rgba(34, 197, 94, 0.55);
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.15);
}

.pricing-panel__email-error {
  min-height: 1.25em;
  margin: 0 0 12px;
  font-size: 0.875rem;
  color: #fca5a5;
}

.pricing-panel__email-step .pricing-panel__btn-primary {
  margin-top: 4px;
}

.pricing-panel__paypal-step {
  margin-bottom: 4px;
}

.pricing-panel__paypal-label {
  margin: 0 0 10px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #737373;
}

.pricing-panel__signin-hint {
  margin: 0 0 18px;
  padding: 14px 16px;
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #93c5fd;
  font-size: 0.9rem;
  line-height: 1.5;
}

.pricing-panel__signin-hint a {
  color: #bfdbfe;
  font-weight: 600;
}

.pricing-panel__checkout-auth {
  display: none;
}

.pricing-panel__server-warning {
  margin: 0 0 16px;
  padding: 14px 16px;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.45);
  color: #fecaca;
  font-size: 0.9rem;
  line-height: 1.55;
}

.pricing-panel__server-warning code {
  font-size: 0.85em;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.35);
  color: #fde68a;
}

.pricing-panel__note--error {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: #fecaca;
  font-size: 0.9rem;
  line-height: 1.45;
}

.pricing-panel__btn-primary {
  width: 100%;
  max-width: 360px;
  padding: 14px 22px;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  color: #0c0c0c;
  background: linear-gradient(180deg, #fde68a 0%, #f59e0b 100%);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.2);
  transition: filter 0.15s ease, transform 0.1s ease;
}

.pricing-panel__btn-primary:hover:not(:disabled) {
  filter: brightness(1.05);
}

.pricing-panel__btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.pricing-panel__link-details {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.875rem;
  color: #a3a3a3;
}

.pricing-panel__link-details summary {
  cursor: pointer;
  color: #d4d4d4;
  font-weight: 600;
}

.pricing-panel__link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
  align-items: center;
}

.pricing-panel__link-row input {
  flex: 1;
  min-width: 200px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: #0a0a0a;
  color: #fafafa;
  font-size: 0.9rem;
}

.pricing-panel__link-row button {
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #fafafa;
  font-weight: 600;
  cursor: pointer;
}

.pricing-panel__success-banner {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #86efac;
  font-size: 0.9rem;
  display: none;
}

.pricing-panel__success-banner.is-visible {
  display: block;
}

.pricing-panel__sandbox {
  margin: 0 0 20px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(234, 179, 8, 0.12);
  border: 1px solid rgba(234, 179, 8, 0.35);
  color: #fde68a;
  font-size: 0.875rem;
  line-height: 1.45;
}

.pricing-panel__title {
  margin: 0 0 8px;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fafafa;
}

.pricing-panel__lede {
  margin: 0 0 24px;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: #a3a3a3;
}

.pricing-panel__amount {
  margin: 0 0 8px;
  font-size: 1.75rem;
  font-weight: 700;
  color: #fafafa;
}

.pricing-panel__note {
  margin: 16px 0 0;
  font-size: 0.8125rem;
  color: #737373;
  line-height: 1.45;
}

.pricing-panel__note code {
  font-size: 0.75em;
  color: #a3a3a3;
}

#paypal-button-container-pricing {
  min-height: 48px;
}

@media (max-width: 640px) {
  .pricing-panel__inner {
    padding: 22px 18px 26px;
  }

  .pricing-panel__head {
    flex-direction: column;
    align-items: flex-start;
  }

  .pricing-panel__price-main {
    font-size: 1.65rem;
  }
}

