/* ==========================================================================
   Antbeatz Beat Vault Stylesheet (WP2, ported from antbeatz-pro src/styles/vault.css)
   Requires /css/tokens.css and /css/base.css loaded first.
   Also styles the cart drawer (cart.js) and sticky player (player.js) on any page.
   ========================================================================== */

/* ---------- Header Search & Vault Nav ---------- */
.page-vault header.site-header {
  gap: 16px;
}

.search-wrap {
  position: relative;
  flex: 1 1 280px;
  max-width: 400px;
  display: flex;
  align-items: center;
}

.search-ico {
  position: absolute;
  left: 14px;
  width: 15px;
  height: 15px;
  stroke: var(--muted);
  stroke-width: 2;
  fill: none;
  pointer-events: none;
}

.search {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  color: var(--ink);
  font-size: 13px;
  padding: 10px 36px 10px 38px;
  outline: none;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}

.search::placeholder {
  color: var(--muted);
}

.search:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(245, 180, 0, 0.14);
}

.search::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.search-clear {
  position: absolute;
  right: 10px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: rgba(244, 241, 232, 0.1);
  color: var(--ink);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.search-clear[hidden] {
  display: none;
}

.cartchip {
  cursor: pointer;
}

.cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--radius-pill);
  background: var(--gold);
  color: var(--ink-dark);
  font-size: 10px;
  font-weight: 900;
}

/* ---------- Main Container & Hero ---------- */
.vault-main {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 40px var(--gutter) 44px;
  position: relative;
  z-index: var(--z-base);
}

.vault-hero {
  margin-bottom: 26px;
}

.vault-hero h1 {
  font-family: var(--font-display);
  font-size: var(--text-hero-vault);
  line-height: 0.9;
  letter-spacing: -3px;
  text-transform: uppercase;
  margin-top: 14px;
}

.vault-hero h1 em {
  font-style: normal;
  color: var(--gold);
  text-decoration: underline;
  text-decoration-thickness: 4px;
  text-underline-offset: 8px;
}

.vault-sub {
  margin-top: 16px;
  color: var(--muted);
  font-size: var(--text-lg);
  line-height: 1.55;
  max-width: 680px;
}

.vault-toolbar {
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  appearance: none;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: var(--radius-pill);
  padding: 8px 14px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color var(--dur-fast), color var(--dur-fast), background var(--dur-fast);
  white-space: nowrap;
}

.chip:hover {
  border-color: var(--gold-border);
  color: var(--ink);
}

.chip.on {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink-dark);
}

.chip.fav-chip.on {
  background: var(--gold);
  color: var(--ink-dark);
}

.result-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

/* ---------- Legacy Catalog Promo Card ---------- */
.legacy-wrap {
  margin-bottom: 28px;
}

.legacy-card {
  display: flex;
  align-items: center;
  gap: 18px;
  background: linear-gradient(135deg, rgba(245, 180, 0, 0.08), rgba(17, 17, 20, 0.96) 45%);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-md);
  padding: 18px 22px;
}

.legacy-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--gold-tint);
  border: 1px solid var(--gold-border);
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.legacy-copy {
  flex: 1 1 auto;
  min-width: 0;
}

.legacy-copy h2 {
  font-size: 16px;
  font-weight: 900;
  margin-top: 4px;
  color: var(--ink);
}

.legacy-copy p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 3px;
}

.legacy-cta {
  flex-shrink: 0;
}

/* ---------- 6-Column Track Catalog ---------- */
.listhead {
  display: grid;
  grid-template-columns: 64px minmax(200px, 280px) minmax(0, 0.9fr) minmax(0, 1.1fr) 70px 150px;
  gap: 16px;
  align-items: center;
  padding: 0 14px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1.8px;
  text-transform: uppercase;
}

.listhead .col-bpm {
  text-align: center;
}

.listhead .col-action {
  text-align: right;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.row {
  display: grid;
  grid-template-columns: 64px minmax(200px, 280px) minmax(0, 0.9fr) minmax(0, 1.1fr) 70px 150px;
  gap: 16px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  cursor: pointer;
  transition: transform var(--dur-fast), border-color var(--dur-fast), background var(--dur-fast);
}

.row:hover {
  transform: translateX(4px);
  border-color: var(--gold-border-hover);
}

.row.playing {
  background: var(--surface-playing);
  border-color: var(--gold);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.42);
}

.row.incart {
  border-color: var(--green-border);
}

.row.playing.incart {
  border-color: var(--gold);
}

/* Thumbnail + Play + Favorite */
.thumb {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface-2);
  flex-shrink: 0;
}

.thumb img {
  width: 64px;
  height: 64px;
  display: block;
  object-fit: cover;
}

.playbtn {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(245, 180, 0, 0.94);
  color: var(--ink-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
  transition: transform var(--dur-fast), filter var(--dur-fast);
}

.playbtn:hover {
  transform: scale(1.07);
  filter: brightness(1.08);
}

.row.playing .playbtn {
  background: var(--gold-2);
}

.favbtn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(244, 241, 232, 0.22);
  background: rgba(8, 8, 10, 0.82);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  transition: color var(--dur-fast), border-color var(--dur-fast), transform var(--dur-fast);
}

.favbtn:hover {
  color: var(--ink);
  border-color: var(--gold-border);
  transform: scale(1.08);
}

.favbtn.on {
  color: var(--gold);
  border-color: var(--gold);
  background: rgba(8, 8, 10, 0.94);
}

/* Track Info Column */
.track-col {
  min-width: 0;
}

.track-title-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.track-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.25;
}

.row.playing .track-title {
  color: var(--gold-2);
}

.track-sub {
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.incart-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--green-border);
  background: var(--green-tint);
  color: var(--green);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.9px;
  text-transform: uppercase;
}

/* Mobile-only compact meta */
.mmeta {
  display: none;
  margin-top: 6px;
  font-size: 11px;
  color: var(--muted);
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.mmeta-sep {
  opacity: 0.45;
}

.col-genre {
  min-width: 0;
}

.genre-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.genre-mood {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.col-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}

.tag {
  font-size: 10px;
  font-weight: 700;
  color: var(--tag-ink);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 3px 9px;
  white-space: nowrap;
}

.col-bpm-val {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 900;
  color: var(--ink);
  text-align: center;
}

.col-bpm-val span {
  display: block;
  font-size: 9px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 1px;
}

.col-act {
  display: flex;
  justify-content: flex-end;
}

.col-act .buy {
  min-width: 122px;
}

/* Empty State */
.empty-state {
  margin-top: 22px;
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  padding: 40px 24px;
  text-align: center;
}

.empty-state h3 {
  font-size: 18px;
  font-weight: 900;
}

.empty-state p {
  margin-top: 8px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 13px;
}

/* ---------- Footer Padding for Sticky Player ---------- */
.page-vault footer.bottom {
  padding-bottom: 130px;
}

/* ---------- Sticky Bottom Audio Player ---------- */
.player {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-player);
  background: var(--surface-player);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--gold-border);
  box-shadow: 0 -16px 40px rgba(0, 0, 0, 0.65);
  transform: translateY(110%);
  transition: transform var(--dur-base) var(--ease-out);
}

.player.show {
  transform: translateY(0);
}

.player-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 12px var(--gutter);
  display: flex;
  align-items: center;
  gap: 16px;
}

.player-track {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  width: 240px;
  flex-shrink: 0;
}

.player-cover {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  object-fit: cover;
  flex-shrink: 0;
}

.player-meta {
  min-width: 0;
}

.player-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--gold);
  letter-spacing: 0.6px;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.pbtn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color var(--dur-fast), color var(--dur-fast), transform var(--dur-fast);
}

.pbtn:hover {
  border-color: var(--gold-border);
  color: var(--gold);
}

.pbtn-play {
  width: 40px;
  height: 40px;
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink-dark);
}

.pbtn-play:hover {
  color: var(--ink-dark);
  filter: brightness(1.08);
  transform: scale(1.04);
}

.pbtn-play svg[hidden],
.pbtn-mute svg[hidden] {
  display: none;
}

.player-progress-wrap {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 140px;
}

.player-time {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  min-width: 34px;
  text-align: center;
}

.prog {
  position: relative;
  flex: 1;
  height: 6px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  cursor: pointer;
}

.prog-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  background: linear-gradient(90deg, var(--gold), var(--gold-2));
  border-radius: var(--radius-pill);
  pointer-events: none;
}

.prog-knob {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gold-2);
  border: 2px solid var(--ink-dark);
  transform: translate(-50%, -50%);
  pointer-events: none;
  box-shadow: 0 0 8px rgba(245, 180, 0, 0.6);
}

.player-vol {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.vol-slider {
  width: 76px;
  accent-color: var(--gold);
  cursor: pointer;
}

.player-cart-btn {
  flex-shrink: 0;
}

/* ---------- License Picker Modal ---------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay);
  background: var(--surface-overlay);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.overlay[hidden] {
  display: none;
}

.modal {
  width: 100%;
  max-width: 760px;
  max-height: calc(100dvh - 36px);
  background: var(--surface);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.78);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.modal-cover {
  width: 74px;
  height: 74px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  object-fit: cover;
  flex-shrink: 0;
}

.modal-head-info {
  flex: 1 1 auto;
  min-width: 0;
}

.modal-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.modal-title-row h2 {
  font-size: 20px;
  font-weight: 900;
  line-height: 1.15;
}

.modal-byline {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.mchips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.mchip {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: rgba(244, 241, 232, 0.06);
  border: 1px solid var(--line);
  color: var(--tag-ink);
}

.modal-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.modal-share {
  appearance: none;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  border-radius: var(--radius-pill);
  padding: 7px 12px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: border-color var(--dur-fast), color var(--dur-fast);
}

.modal-share:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.modal-close {
  appearance: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.modal-body {
  padding: 20px 22px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.modal-section-label {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}

.tier-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.tier-card {
  position: relative;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 34px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  text-align: left;
  color: var(--ink);
  transition: border-color var(--dur-fast), transform var(--dur-fast), background var(--dur-fast);
}

.tier-card:hover {
  border-color: var(--gold-border);
  transform: translateY(-2px);
}

.tier-card.selected {
  border-color: var(--gold);
  background: linear-gradient(180deg, rgba(245, 180, 0, 0.12), var(--surface-2));
  box-shadow: 0 0 0 1px var(--gold);
}

.tier-card.incart,
.tier-card.selected.incart {
  border-color: var(--green);
  background: linear-gradient(180deg, rgba(0, 230, 118, 0.12), var(--surface-2));
  box-shadow: 0 0 0 1px var(--green);
}

.tier-card-name {
  font-size: 13px;
  font-weight: 900;
  line-height: 1.25;
}

.tier-card-price {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 900;
  color: var(--gold-2);
}

.tier-card-desc {
  font-size: 11px;
  line-height: 1.45;
  color: var(--muted);
  flex: 1 1 auto;
}

.tier-selected-flag {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0;
  transition: opacity var(--dur-fast);
}

.tier-card.selected .tier-selected-flag {
  opacity: 1;
}

.tier-card.incart .tier-selected-flag,
.tier-card.selected.incart .tier-selected-flag {
  opacity: 1;
  color: var(--green);
}

/* More like this */
.ml-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.ml-card {
  appearance: none;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  color: var(--ink);
  text-align: left;
  transition: border-color var(--dur-fast), transform var(--dur-fast);
}

.ml-card:hover {
  border-color: var(--gold-border);
  transform: translateY(-1px);
}

.ml-card img {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-xs);
  object-fit: cover;
  flex-shrink: 0;
}

.ml-info {
  min-width: 0;
  flex: 1;
}

.ml-title {
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ml-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
}

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 22px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  flex-wrap: wrap;
}

.modal-total {
  display: flex;
  flex-direction: column;
}

.modal-total-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--muted);
}

.modal-total-price {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 900;
  color: var(--gold);
}

.modal-cta-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

#modalAddToCartBtn.added,
.modal-cta-group .added {
  background: var(--green);
  border-color: var(--green);
  color: var(--ink-dark);
  box-shadow: 0 0 18px rgba(0, 230, 118, 0.35);
}

#modalAddToCartBtn.added:hover,
.modal-cta-group .added:hover {
  background: var(--green);
  border-color: var(--green);
  color: var(--ink-dark);
  filter: brightness(1.06);
}

/* ---------- Slide-Over Cart Drawer ---------- */
.cart-backdrop {
  position: fixed;
  inset: 0;
  z-index: 74;
  background: rgba(5, 5, 10, 0.72);
  backdrop-filter: blur(4px);
}

.cart-backdrop[hidden] {
  display: none;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(400px, 100vw);
  z-index: 75;
  background: var(--surface);
  border-left: 1px solid var(--gold-border);
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.72);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--dur-base) var(--ease-out);
}

.cart-drawer.open {
  transform: translateX(0);
}

.cart-drawer {
  z-index: 90;
}

.cart-backdrop {
  z-index: 89;
}

.cart-licensee[hidden] {
  display: none;
}

.cart-drawer[hidden] {
  display: none;
}

.cart-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.cart-drawer-head h2 {
  font-size: 18px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.cart-drawer-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}

.cart-drawer-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cart-empty {
  margin: auto 0;
  text-align: center;
  padding: 28px 12px;
  color: var(--muted);
}

.cart-empty p {
  font-size: 13px;
  margin-bottom: 16px;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.cart-item img {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-xs);
  object-fit: cover;
  flex-shrink: 0;
}

.cart-item-info {
  flex: 1 1 auto;
  min-width: 0;
}

.cart-item-title {
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-tier {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.cart-item-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.cart-item-price {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 900;
  color: var(--gold);
}

.cart-remove {
  appearance: none;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  cursor: pointer;
}

.cart-remove:hover {
  color: var(--error);
}

.cart-drawer-foot {
  padding: 16px 20px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cart-subtotal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}

.cart-subtotal-row strong {
  font-family: var(--font-mono);
  font-size: 20px;
  color: var(--gold);
}

.cart-checkout-btn {
  width: 100%;
}

.cart-checkout-btn[aria-disabled="true"] {
  opacity: 0.45;
  pointer-events: none;
}

/* ---------- Responsive Breakpoints ---------- */
@media (max-width: 980px) {
  .tier-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .vault-main {
    padding: 26px var(--gutter-mobile) 36px;
  }

  .vault-hero h1 {
    letter-spacing: -2px;
  }

  .search-wrap {
    order: 5;
    flex: 1 0 100%;
    max-width: none;
  }

  /* Prevent iOS Safari auto-zoom on focus */
  .search {
    font-size: 16px;
    padding: 10px 38px;
  }

  .legacy-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .legacy-cta {
    width: 100%;
  }

  .listhead {
    display: none;
  }

  .row {
    grid-template-columns: 64px minmax(0, 1fr) auto;
    gap: 12px;
    padding: 12px;
  }

  .col-genre,
  .col-tags,
  .col-bpm-val {
    display: none;
  }

  .mmeta {
    display: flex;
  }

  .col-act .buy {
    min-width: 96px;
    padding: 9px 10px;
  }

  /* Sticky player mobile layout */
  .player-inner {
    flex-wrap: wrap;
    padding: 10px var(--gutter-mobile);
    gap: 10px;
  }

  .player-track {
    flex: 1 1 auto;
    width: auto;
  }

  .player-controls .pbtn-nav,
  .player-vol {
    display: none;
  }

  .player-progress-wrap {
    order: 10;
    flex: 1 0 100%;
  }
}

@media (max-width: 640px) {
  .ml-grid {
    grid-template-columns: 1fr;
  }

  /* Native bottom-sheet license modal on mobile */
  .overlay {
    align-items: flex-end;
    padding: 0;
  }

  .modal {
    width: 100%;
    max-width: 100%;
    max-height: 92dvh;
    border-radius: 20px 20px 0 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
  }

  .modal-head {
    flex-wrap: wrap;
    padding: 16px;
    gap: 12px;
  }

  .modal-cover {
    width: 52px;
    height: 52px;
  }

  .modal-title-row h2 {
    font-size: 17px;
  }

  .modal-close {
    width: 40px;
    height: 40px;
  }

  .modal-body {
    padding: 16px;
  }

  .tier-card {
    padding: 16px;
  }

  .modal-head-actions {
    margin-left: auto;
  }

  .modal-foot {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 14px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  }

  .modal-total {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
  }

  .modal-cta-group {
    width: 100%;
    gap: 10px;
  }

  .modal-cta-group .btn2 {
    flex: 1;
    min-height: 48px;
    font-size: 12px;
  }

  /* Full-width mobile cart drawer with safe-area bottom */
  .cart-drawer {
    width: 100%;
    max-width: 100vw;
  }

  .cart-drawer-head {
    padding: 16px;
  }

  .cart-drawer-body {
    padding: 14px 16px;
  }

  .cart-drawer-foot {
    padding: 14px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  }

  .cart-drawer-foot .btn2 {
    min-height: 48px;
    font-size: 12px;
  }

  /* Safe-area spacing on sticky mobile player */
  .player-inner {
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 520px) {
  .row {
    grid-template-columns: 52px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 10px;
  }

  .thumb {
    width: 52px;
    height: 52px;
  }

  .track-title-line {
    flex-wrap: wrap;
    gap: 5px;
  }

  .track-title {
    font-size: 13px;
  }

  .col-act .buy {
    min-width: 84px;
    min-height: 40px;
    padding: 8px 10px;
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .row,
  .playbtn,
  .favbtn,
  .player,
  .tier-card,
  .ml-card,
  .cart-drawer {
    transition: none;
  }

  .row:hover {
    transform: none;
  }
}


/* ==========================================================================
   SITE additions (WP2)
   ========================================================================== */

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: var(--z-progress);
  background: var(--gold);
  color: var(--ink-dark);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-weight: 900;
  font-size: 12px;
}

.skip-link:focus {
  top: 12px;
}

/* Search lives in the hero on SITE (the shared header is rendered by chrome.js) */
.vault-search {
  margin-top: 22px;
}

.vault-search .search-wrap {
  max-width: 560px;
}

.vault-search .search {
  font-size: 14px;
  padding: 12px 40px 12px 40px;
}

/* Rows: links + clickable tags */
a.track-title {
  color: inherit;
  text-decoration: none;
}

a.track-title:hover {
  color: var(--gold-2);
}

button.tag {
  appearance: none;
  font-family: inherit;
  cursor: pointer;
  transition: border-color var(--dur-fast), color var(--dur-fast);
}

button.tag:hover {
  border-color: var(--gold-border);
  color: var(--ink);
}

.row:focus-within {
  border-color: var(--gold-border-hover);
}

.row-skeleton {
  height: 90px;
  cursor: default;
  background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%);
  background-size: 200% 100%;
  animation: ab-skeleton 1.2s linear infinite;
}

.row-skeleton:hover {
  transform: none;
  border-color: var(--line);
}

@keyframes ab-skeleton {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

/* Modal additions */
body.modal-open {
  overflow: hidden;
}

.modal-share svg {
  vertical-align: -2px;
  margin-right: 2px;
}

.modal-share[hidden] {
  display: none;
}

.more-like[hidden] {
  display: none;
}

.tier-card:focus-visible,
.ml-card:focus-visible,
.chip:focus-visible,
.buy:focus-visible,
.prog:focus-visible {
  outline: 2px solid var(--gold-2);
  outline-offset: 2px;
}

.modal-artist {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 200px;
  min-width: 0;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--muted);
}

.modal-artist em {
  font-style: normal;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}

.modal-artist input,
.cart-field input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  padding: 9px 11px;
  outline: none;
}

.modal-artist input:focus,
.cart-field input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(245, 180, 0, 0.14);
}

.modal-error,
.cart-error {
  flex: 1 0 100%;
  background: var(--red-tint);
  border: 1px solid var(--red-border);
  color: var(--red);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 12px;
  line-height: 1.4;
}

.modal-error[hidden],
.cart-error[hidden] {
  display: none;
}

/* Cart drawer additions */
.cart-item-title {
  display: block;
  color: var(--ink);
  text-decoration: none;
}

a.cart-item-title:hover {
  color: var(--gold-2);
}

.cart-item .fchips {
  margin-top: 6px;
}

.cart-licensee {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cart-licensee-label {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--gold);
}

.cart-licensee-label span {
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.cart-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 11px;
  color: var(--muted);
}

.cart-checkout-btn[disabled] {
  opacity: 0.45;
  pointer-events: none;
}

.cart-secure-note {
  font-size: 10px;
  color: var(--muted);
  text-align: center;
}

/* Player additions */
.player-cart-btn.incart {
  min-width: 110px;
}

body.has-player footer.bottom,
body.has-player .page-pad-player {
  padding-bottom: 130px;
}

.noscript {
  max-width: var(--container-max);
  margin: 20px auto;
  padding: 0 var(--gutter);
  color: var(--muted);
}

@media (max-width: 820px) {
  .vault-search .search-wrap {
    order: 0;
    max-width: none;
  }

  .modal-artist input,
  .cart-field input {
    font-size: 16px; /* prevent iOS zoom */
  }
}

@media (max-width: 640px) {
  .modal-head-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

@media (prefers-reduced-motion: reduce) {
  .row-skeleton {
    animation: none;
  }
}

/* ---------- Home vault teaser (vault-teaser.js) ---------- */
.teaser-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.teaser-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px;
  transition: border-color var(--dur-fast), transform var(--dur-fast);
}

.teaser-card:hover {
  border-color: var(--gold-border-hover);
  transform: translateY(-2px);
}

.teaser-card.playing {
  background: var(--surface-playing);
  border-color: var(--gold);
}

.teaser-card.incart {
  border-color: var(--green-border);
}

.teaser-art {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-2);
}

.teaser-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.teaser-art .playbtn {
  width: 46px;
  height: 46px;
}

.teaser-badge {
  position: absolute;
  top: 8px;
  left: 8px;
}

.teaser-title {
  display: block;
  font-weight: 900;
  font-size: 14px;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.teaser-title:hover {
  color: var(--gold-2);
}

.teaser-meta {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.teaser-meta .mono {
  font-family: var(--font-mono);
}

.teaser-card .buy {
  margin-top: auto;
}

.teaser-error {
  grid-column: 1 / -1;
  color: var(--muted);
}

.teaser-error a {
  color: var(--gold);
}

@media (max-width: 980px) {
  .teaser-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .teaser-grid {
    grid-template-columns: 1fr;
  }
}
