#catalog-section .catalog-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 0 5%;
}

#catalog-section .catalog-sort-controls {
  display: flex;
  align-items: center;
  gap: 24px;
}

#catalog-section .catalog-search input {
  width: clamp(180px, 24vw, 280px);
  padding: 10px 2px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 0;
  outline: none;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 0.8rem;
}

#catalog-section .catalog-search input::placeholder {
  color: #888;
}

#catalog-section .catalog-search input:focus {
  border-color: #fff;
}

#catalog-section .catalog-sort {
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  color: #aaa;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

#catalog-section .catalog-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  padding: 28px 5% 0;
}

#catalog-section .catalog-reset {
  padding: 5px 0;
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  color: #888;
  cursor: pointer;
  font: inherit;
  font-size: 0.72rem;
  transition: color 180ms ease, border-color 180ms ease;
}

#catalog-section .catalog-reset:hover {
  border-color: rgba(255, 255, 255, 0.7);
  color: #fff;
}

#catalog-section .catalog-results-count {
  margin: 0 0 0 auto;
  color: #888;
  font-size: 0.72rem;
}

#catalog-section .catalog-sort:hover,
#catalog-section .catalog-sort:focus-visible {
  color: #fff;
  border-color: #fff;
}

#catalog-section .catalog-grid {
  display: block;
  position: relative;
  width: min(100%, 520px);
  aspect-ratio: 1 / 1;
  margin: 32px auto 0;
  padding: 0;
}

#catalog-section .catalog-deck-controls {
  display: block;
  width: min(100% - 10%, 520px);
  margin: 42px auto 0;
  text-align: center;
}

#catalog-section .catalog-card {
  position: absolute;
  inset: 0;
  overflow: hidden;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border-radius: 14px;
  background:
    radial-gradient(ellipse at 76% 42%, rgba(255, 255, 255, 0.09), transparent 38%),
    linear-gradient(145deg, #191919, #090909 72%);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 260ms ease;
}

#catalog-section .catalog-card::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse at 79% 40%, rgba(0, 113, 227, 0.13), transparent 35%),
    linear-gradient(130deg, transparent 35%, rgba(255, 255, 255, 0.035) 70%, transparent);
  content: '';
  pointer-events: none;
}

#catalog-section .catalog-grid:not(.is-deck-ready) .catalog-card:nth-of-type(1),
#catalog-section .catalog-card.is-deck-top {
  z-index: 3;
}

#catalog-section .catalog-grid:not(.is-deck-ready) .catalog-card:nth-of-type(2),
#catalog-section .catalog-card.is-deck-second {
  z-index: 2;
  transform: translateY(10px) scale(0.97);
}

#catalog-section .catalog-grid:not(.is-deck-ready) .catalog-card:nth-of-type(3),
#catalog-section .catalog-card.is-deck-third {
  z-index: 1;
  transform: translateY(20px) scale(0.94);
}

#catalog-section .catalog-grid:not(.is-deck-ready) .catalog-card:nth-of-type(n + 4),
#catalog-section .catalog-card.is-deck-hidden {
  z-index: 0;
  transform: translateY(20px) scale(0.94);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#catalog-section .catalog-card.is-dragging {
  z-index: 4;
  cursor: grabbing;
  transition: none;
}

#catalog-section .catalog-card.is-dismissing {
  z-index: 4;
}

#catalog-section .catalog-empty {
  position: relative;
  padding: 48px 24px;
  color: #aaa;
  text-align: center;
}

#catalog-section .catalog-grid.is-empty {
  width: 100%;
  aspect-ratio: auto;
}

#catalog-section .catalog-deck-hint {
  margin: 0 0 14px;
  color: #888;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

#catalog-section .catalog-deck-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

#catalog-section .catalog-deck-button {
  min-width: 88px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 9999px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 0.72rem;
  transition: border-color 180ms ease, opacity 180ms ease;
}

#catalog-section .catalog-deck-button:hover:not(:disabled),
#catalog-section .catalog-deck-button:focus-visible {
  border-color: #fff;
}

#catalog-section .catalog-deck-button:disabled {
  cursor: default;
  opacity: 0.45;
}

#catalog-section .catalog-deck-position {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #aaa;
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#catalog-section .catalog-vinyl {
  position: absolute;
  top: 43%;
  left: 75%;
  z-index: 1;
  width: 76%;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 32% 24%, rgba(255, 255, 255, 0.11), transparent 18%),
    radial-gradient(circle, transparent 0 9%, rgba(255, 255, 255, 0.34) 9.1% 9.3%, transparent 9.5% 17%, rgba(255, 255, 255, 0.2) 17.2% 17.4%, transparent 17.6% 30%, rgba(255, 255, 255, 0.16) 30.2% 30.4%, transparent 30.6% 43%, rgba(255, 255, 255, 0.14) 43.2% 43.4%, transparent 43.6% 58%, rgba(255, 255, 255, 0.12) 58.2% 58.4%, transparent 58.6%),
    repeating-radial-gradient(circle, #101113 0 2px, #24262a 2.5px, #151619 4px);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.62), inset 0 0 0 5px rgba(0, 0, 0, 0.42), inset 0 0 34px rgba(255, 255, 255, 0.05);
  transform: translate(-50%, -50%);
  transition: left 700ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

#catalog-section .catalog-platter {
  position: absolute;
  top: 43%;
  left: 75%;
  z-index: 0;
  width: 81%;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background:
    radial-gradient(circle, transparent 0 88%, rgba(255, 255, 255, 0.1) 88.5% 89%, transparent 89.5%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.1), transparent 42% 70%, rgba(0, 0, 0, 0.5));
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.65), inset 0 0 0 5px rgba(0, 0, 0, 0.38), inset 0 0 0 6px rgba(255, 255, 255, 0.06);
  transform: translate(-50%, -50%);
  transition: left 700ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

#catalog-section .catalog-platter::before,
#catalog-section .catalog-platter::after {
  position: absolute;
  top: 50%;
  width: 5px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #7b8792;
  box-shadow: 0 0 6px rgba(170, 190, 205, 0.5);
  content: '';
  transform: translateY(-50%);
}

#catalog-section .catalog-platter::before {
  left: 8%;
}

#catalog-section .catalog-platter::after {
  right: 8%;
}

#catalog-section .catalog-tonearm {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

#catalog-section .catalog-tonearm::after {
  position: absolute;
  top: calc(12% - 9px);
  right: calc(12% - 9px);
  width: 20px;
  aspect-ratio: 1;
  border: 2px solid rgba(255, 255, 255, 0.46);
  border-radius: 50%;
  background: radial-gradient(circle, #777 0 22%, #222 28% 66%, #aaa 70% 74%, #333 80%);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.7);
  content: '';
}

#catalog-section .catalog-tonearm-arm {
  position: absolute;
  top: 12%;
  right: 12%;
  width: 32%;
  height: 4px;
  border: 1px solid rgba(255, 255, 255, 0.44);
  border-radius: 9999px;
  background: linear-gradient(180deg, #e4e4e4, #555);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
  transform: rotate(-50deg);
  transform-origin: right center;
  transition: transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

#catalog-section .catalog-tonearm-arm::after {
  position: absolute;
  top: -2px;
  left: 0;
  width: 8px;
  height: 6px;
  border-radius: 1px;
  background: linear-gradient(180deg, #dbe3e9, #59636c);
  box-shadow: 0 0 5px rgba(190, 210, 225, 0.4);
  content: '';
}

#catalog-section .catalog-sleeve {
  position: absolute;
  top: 5%;
  left: 6%;
  z-index: 3;
  width: 62%;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 5px;
  background: #171717;
  box-shadow: 0 24px 52px rgba(0, 0, 0, 0.62), 0 2px 8px rgba(0, 0, 0, 0.35), inset 0 0 0 3px rgba(0, 0, 0, 0.14);
  transform: rotate(-3deg);
  transition: transform 600ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 600ms ease;
}

#catalog-section .catalog-sleeve::before {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 1;
  width: 5px;
  border-right: 1px solid rgba(255, 255, 255, 0.42);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.25), rgba(0, 0, 0, 0.16));
  content: '';
  pointer-events: none;
}

#catalog-section .catalog-sleeve::after {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent 22% 65%, rgba(255, 255, 255, 0.08));
  content: '';
  pointer-events: none;
}

#catalog-section .catalog-sleeve-art {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#catalog-section .catalog-card.is-deck-top .catalog-vinyl,
#catalog-section .catalog-grid:not(.is-deck-ready) .catalog-card:first-of-type .catalog-vinyl {
  animation: catalog-vinyl-spin 3s linear infinite;
}

#catalog-section .catalog-card:hover .catalog-vinyl,
#catalog-section .catalog-card:focus-within .catalog-vinyl {
  left: 86%;
}

#catalog-section .catalog-card:hover .catalog-platter,
#catalog-section .catalog-card:focus-within .catalog-platter {
  left: 86%;
}

#catalog-section .catalog-card:hover .catalog-sleeve,
#catalog-section .catalog-card:focus-within .catalog-sleeve {
  box-shadow: 0 34px 72px rgba(0, 0, 0, 0.76), 0 4px 12px rgba(0, 0, 0, 0.4), inset 0 0 0 3px rgba(0, 0, 0, 0.14);
  transform: rotate(-1deg) translate(-2%, -1%);
}

#catalog-section .catalog-card:hover .catalog-tonearm-arm,
#catalog-section .catalog-card:focus-within .catalog-tonearm-arm {
  transform: rotate(-64deg);
}

#catalog-section .catalog-vinyl::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #080808;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.6);
  content: '';
  transform: translate(-50%, -50%);
  pointer-events: none;
}

#catalog-section .catalog-vinyl-label {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: 36%;
  aspect-ratio: 1;
  border: 3px solid rgba(12, 12, 12, 0.88);
  border-radius: 50%;
  background: #111;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.22), 0 4px 12px rgba(0, 0, 0, 0.55);
  object-fit: cover;
  transform: translate(-50%, -50%);
}

#catalog-section .catalog-vinyl-label::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #050505;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.6);
  content: '';
  transform: translate(-50%, -50%);
}

@keyframes catalog-vinyl-spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

#catalog-section .catalog-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: flex-end;
  padding: 24px;
  background: transparent;
  text-align: left;
}

#catalog-section .catalog-overlay-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 16px;
  width: min(100%, 420px);
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(10, 10, 10, 0.72);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(18px) saturate(1.25);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
}

#catalog-section .catalog-overlay h3 {
  grid-column: 1 / -1;
  margin: 0;
  color: #fff;
  font-size: clamp(1.2rem, 2.2vw, 1.7rem);
  font-weight: 800;
  letter-spacing: -0.04em;
}

#catalog-section .catalog-meta {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.72rem;
  line-height: 1.6;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#catalog-section .catalog-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

#catalog-section .catalog-info-button,
#catalog-section .listen-link {
  display: inline-block;
  padding: 9px 17px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 9999px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}

#catalog-section .catalog-info-button {
  background: #fff;
  color: #000;
}

#catalog-section .catalog-info-button:hover,
#catalog-section .catalog-info-button:focus-visible,
#catalog-section .listen-link:hover,
#catalog-section .listen-link:focus-visible {
  border-color: #fff;
  background: #fff;
  color: #000;
}

@media (max-width: 720px) {
  #catalog-section .catalog-heading {
    align-items: start;
    flex-direction: column;
  }

  #catalog-section .catalog-sort-controls {
    width: 100%;
    justify-content: space-between;
    gap: 16px;
  }

  #catalog-section .catalog-search {
    flex: 1;
  }

  #catalog-section .catalog-search input {
    width: 100%;
    box-sizing: border-box;
  }

  #catalog-section .catalog-filters {
    gap: 14px;
  }

  #catalog-section .catalog-results-count {
    flex-basis: 100%;
    margin-left: 0;
  }

  #catalog-section .catalog-grid {
    width: 90%;
  }

  #catalog-section .catalog-empty {
    position: relative;
    margin: 0;
  }

  #catalog-section .catalog-deck-controls {
    width: 90%;
    margin-top: 42px;
  }

  #catalog-section .catalog-deck-controls[hidden] {
    display: none;
  }

  #catalog-section .catalog-overlay {
    padding: 16px;
  }

  #catalog-section .catalog-overlay-content {
    gap: 4px 10px;
    padding: 12px;
  }

  #catalog-section .catalog-vinyl {
    top: 41%;
    left: 78%;
    width: 78%;
  }

  #catalog-section .catalog-platter {
    top: 41%;
    left: 78%;
    width: 83%;
  }

  #catalog-section .catalog-card:hover .catalog-vinyl,
  #catalog-section .catalog-card:focus-within .catalog-vinyl {
    left: 86%;
  }

  #catalog-section .catalog-card:hover .catalog-platter,
  #catalog-section .catalog-card:focus-within .catalog-platter {
    left: 86%;
  }

  #catalog-section .catalog-sleeve {
    top: 4%;
    left: 7%;
    width: 53%;
  }

  #catalog-section .catalog-tonearm-arm {
    top: 10%;
    right: 10%;
    width: 32%;
  }

  #catalog-section .catalog-tonearm::after {
    top: calc(10% - 9px);
    right: calc(10% - 9px);
  }

  #catalog-section .catalog-meta {
    grid-column: 1 / -1;
    grid-row: 2;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }

  #catalog-section .catalog-actions {
    grid-row: 3;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  #catalog-section .catalog-info-button,
  #catalog-section .listen-link {
    grid-row: 3;
    padding: 9px 13px;
  }
}

#catalog-track-info {
  position: fixed;
  inset: 50% auto auto 50%;
  width: min(440px, calc(100vw - 36px));
  max-width: none;
  max-height: min(80vh, 620px);
  padding: 24px;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  background:
    radial-gradient(ellipse at 100% 0%, rgba(0, 113, 227, 0.16), transparent 45%),
    #101114;
  color: #fff;
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.75);
  transform: translate(-50%, -50%);
}

#catalog-track-info::backdrop {
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(8px);
}

#catalog-track-info .catalog-track-info-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

#catalog-track-info .catalog-track-info-eyebrow {
  margin: 0 0 8px;
  color: #8abfff;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

#catalog-track-info h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.4rem, 5vw, 2rem);
  line-height: 1.1;
}

#catalog-track-info .catalog-track-info-close {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 1.35rem;
  line-height: 1;
}

#catalog-track-info .catalog-track-info-facts {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px 18px;
  margin: 0;
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

#catalog-track-info dt {
  color: #a4a6ad;
  font-size: 0.82rem;
}

#catalog-track-info dd {
  margin: 0;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  text-align: right;
}

#catalog-track-info .catalog-track-info-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

#catalog-track-info .catalog-track-info-links a {
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 9999px;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  text-decoration: none;
}

#catalog-track-info .catalog-track-info-links a:hover,
#catalog-track-info .catalog-track-info-links a:focus-visible,
#catalog-track-info .catalog-track-info-close:hover,
#catalog-track-info .catalog-track-info-close:focus-visible {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

@media (prefers-reduced-motion: reduce) {
  #catalog-section .catalog-vinyl,
  #catalog-section .catalog-platter,
  #catalog-section .catalog-tonearm-arm,
  #catalog-section .catalog-overlay,
  #catalog-section .catalog-card,
  #catalog-section .catalog-sleeve,
  #catalog-section .catalog-deck-button {
    transition-duration: 0.01ms;
  }

  #catalog-section .catalog-card.is-deck-top .catalog-vinyl,
  #catalog-section .catalog-grid:not(.is-deck-ready) .catalog-card:first-of-type .catalog-vinyl {
    animation: none;
  }
}
