.beat-detail-page {
  width: 100%;
}

.beat-page {
  display: flex;
  flex-direction: column;
  gap: 48px;
  width: 100%;
}

.beat-page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 32px;
  align-items: start;
}

.beat-page-primary {
  display: flex;
  flex-direction: column;
  gap: 32px;
  min-width: 0;
}

.beat-page-hero {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.beat-page-cover {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.beat-cover-container {
  position: relative;
  width: 280px;
  height: 280px;
  border: none;
  border-radius: 20px;
  overflow: hidden;
  background: var(--fill-secondary);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 120ms ease;
  z-index: 1;
  pointer-events: none;
}

.beat-cover-container:hover .play-overlay,
.beat-cover-container:focus-within .play-overlay {
  opacity: 1;
  pointer-events: auto;
}

.play-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  cursor: pointer;
  transform: scale(0.92);
  transition: transform 120ms ease;
}

.beat-cover-container:hover .play-button,
.beat-cover-container:focus-within .play-button {
  transform: scale(1);
}

.play-button svg,
.play-button .lucide {
  width: 22px;
  height: 22px;
  display: block;
}

.beat-page-panel__head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding-top: 4px;
}

.beat-main-info {
  display: none;
}

.beat-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.beat-detail-title {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--label-primary);
}

.beat-title-share {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--label-secondary);
  cursor: pointer;
}

.beat-title-share:hover {
  color: var(--label-primary);
}

.beat-main-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.beat-main-info .artist {
  margin: 0;
  font-size: 17px;
  color: var(--label-secondary);
}

.beat-main-info .artist a {
  color: var(--label-primary);
  font-weight: 600;
  text-decoration: none;
}

.beat-collab-ft,
.beat-collab-you {
  margin: 0;
  font-size: 13px;
  color: var(--label-tertiary);
}

.beat-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.beat-stats li {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border: none;
  border-radius: 999px;
  background: var(--fill-secondary);
  font-size: 13px;
  color: var(--label-secondary);
}

.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.tag-item {
  color: var(--label-tertiary);
  font-size: 13px;
  text-decoration: none;
}

a.tag-item:hover {
  color: var(--label-primary);
}

.beat-page-details {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.beat-detail-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0;
  border: none;
  background: transparent;
}

.beat-detail-card + .beat-detail-card {
  margin-top: 8px;
}

.beat-detail-card__title {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--label-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.beat-description-body {
  font-size: 17px;
  line-height: 1.47;
  color: var(--label-secondary);
}

.files-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.beat-file-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: none;
  background: transparent;
  font-size: 14px;
}

.beat-file-row--split {
  justify-content: space-between;
}

.beat-file-row__main {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.beat-file-row__label {
  color: var(--label-primary);
  font-weight: 600;
}

.beat-file-row__hint {
  color: var(--label-tertiary);
}

.beat-file-row__link {
  color: var(--label-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.beat-page-rail {
  position: sticky;
  top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 300px;
}

.beat-page-store {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.beat-store-panel,
.beat-store-sold {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px;
  border: none;
  border-radius: 20px;
  background: var(--fill-secondary);
}

.beat-store-sold {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  color: var(--label-secondary);
  font-size: 14px;
}

.beat-store-panel__licenses {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: none;
  border-radius: 999px;
  background: var(--fill-primary);
}

.beat-store-panel__option {
  flex: 1 1 0;
  min-width: 0;
  height: 36px;
  padding: 0 8px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--label-secondary);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.beat-store-panel__option:hover {
  color: var(--label-primary);
}

.beat-store-panel__option.is-active {
  background: #fff;
  color: #000;
}

.beat-store-panel__price-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.beat-store-panel__price {
  margin: 0;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: var(--label-primary);
}

.beat-store-panel__tagline {
  margin: 0;
  font-size: 14px;
  line-height: 1.3;
  color: var(--label-tertiary);
}

.beat-store-panel__tagline[hidden] {
  display: none !important;
}

.beat-store-panel__offer {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.beat-store-panel__offer[hidden] {
  display: none !important;
}

.beat-store-panel__offer-label {
  font-size: 12px;
  color: var(--label-tertiary);
}

.beat-store-panel__offer-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  background: #000;
}

.beat-store-panel__offer-cur {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
}

.beat-store-panel__offer-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 40px;
  border: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 22px;
  font-weight: 700;
  outline: none;
}

.beat-store-panel__offer-hint {
  margin: 0;
  font-size: 12px;
  color: var(--label-tertiary);
}

.beat-store-panel__details {
  padding-top: 12px;
  border: none;
  border-top: 1px solid color-mix(in srgb, #fff 12%, transparent);
  /* JS raises this to the tallest license block so Exclusive/WAV bullets don't jump layout. */
  min-height: 11.5rem;
}

.beat-store-panel__detail[hidden] {
  display: none !important;
}

.beat-store-panel__detail-title {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--label-primary);
}

.beat-store-panel__bullets {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.beat-store-panel__bullets li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  line-height: 1.35;
  color: var(--label-secondary);
}

.beat-store-panel__bullets svg,
.beat-store-panel__bullets .lucide {
  width: 14px;
  height: 14px;
  margin-top: 1px;
  flex-shrink: 0;
  color: var(--label-primary);
}

.beat-related {
  display: flex;
  flex-direction: column;
  gap: 17px;
  min-width: 0;
}

.beat-related__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.beat-related__title {
  margin: 0;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--label-primary);
}

.beat-related__nav {
  display: flex;
  gap: 8px;
}

.beat-related__nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 999px;
  background: var(--fill-secondary);
  color: var(--label-primary);
  cursor: pointer;
}

.beat-related__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(160px, 200px);
  gap: 17px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.beat-related__track::-webkit-scrollbar {
  display: none;
}

.beat-related__track .beat-card {
  scroll-snap-align: start;
}

.beat-store-panel__actions,
.beat-purchase-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.beat-purchase-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1 1 auto;
  height: 48px;
  padding: 0 18px;
  border: none;
  border-radius: 999px;
  background: #fff;
  color: #000;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.beat-purchase-btn--cart {
  background: #fff;
  color: #000;
}

.beat-purchase-btn--favorite {
  flex: 0 0 auto;
  width: 48px;
  min-width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 999px;
  background: var(--fill-primary);
  color: #fff;
}

.beat-purchase-btn--favorite svg,
.beat-purchase-btn--favorite .lucide {
  width: 20px;
  height: 20px;
}

.beat-purchase-btn--favorite.is-liked {
  color: #fff;
  background: var(--fill-tertiary);
}

.beat-seller-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: none;
  border-radius: 18px;
  background: var(--fill-secondary);
  text-decoration: none;
  color: inherit;
}

.beat-seller-row__avatar {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--fill-quaternary);
}

.beat-seller-row__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}

.beat-seller-row__name {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--label-primary);
}

.beat-seller-row__hint {
  margin: 0;
  font-size: 12px;
  color: var(--label-tertiary);
}

.beat-seller-row__chevron {
  color: var(--label-tertiary);
  flex-shrink: 0;
}

.beat-store-panel__owner-yt,
.beat-store-panel__yt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: none;
  border-radius: 999px;
  background: var(--fill-primary);
  color: var(--label-primary);
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
}

.beat-toolbar {
  display: flex;
  gap: 8px;
}

.beat-toolbar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  border: none;
  border-radius: 999px;
  background: var(--fill-secondary);
  color: var(--label-primary);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

/* Shared by service_detail demos */
.beat-wave-card {
  padding: var(--space-3);
  border-radius: var(--radius-xl);
  background: var(--fill-secondary);
}

.beat-wave-track {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.beat-wave-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 999px;
  background: #fff;
  color: #000;
  cursor: pointer;
}

.beat-wave-road {
  flex: 1 1 auto;
  min-width: 0;
}

.beat-wave-visual {
  position: relative;
  height: 52px;
}

.beat-wave-bars {
  display: flex;
  align-items: center;
  gap: 1px;
  height: 100%;
  overflow: hidden;
}

.beat-wave-bars > * {
  flex: 1 1 0;
  min-width: 1px;
  border-radius: 999px;
  background: var(--label-quaternary);
}

.beat-wave-bars .is-played {
  background: var(--label-primary);
}

.beat-wave-playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--label-primary);
  pointer-events: none;
}

.beat-wave-seek {
  position: absolute;
  inset: 0;
  width: 100%;
  opacity: 0;
  cursor: pointer;
}

.beat-wave-times {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--label-tertiary);
  font-variant-numeric: tabular-nums;
}

.beat-share-toast {
  position: fixed;
  right: 24px;
  left: auto;
  bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  z-index: 1800;
  padding: 8px 16px;
  border: none;
  border-radius: 999px;
  background: #fff;
  color: #000;
  font-size: 13px;
  transform: none;
}

.beat-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--overlay-scrim);
}

.beat-modal-panel {
  width: min(460px, 100%);
  padding: 24px;
  border: none;
  border-radius: 20px;
  background: var(--fill-primary);
}

.beat-modal-title {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 600;
}

.beat-modal-text {
  margin: 0 0 16px;
  font-size: 15px;
  color: var(--label-secondary);
}

.beat-modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.beat-modal-btn {
  height: 40px;
  padding: 0 16px;
  border: none;
  border-radius: 999px;
  background: var(--fill-quaternary);
  color: var(--label-primary);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.beat-modal-btn--primary {
  background: #fff;
  color: #000;
}

@media (max-width: 980px) {
  .beat-page-layout {
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 20px;
  }

  .beat-page-hero {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 18px;
  }

  .beat-cover-container {
    width: 220px;
    height: 220px;
  }

  .beat-page-rail {
    width: 280px;
  }
}

@media (max-width: 860px) {
  .beat-page-layout {
    grid-template-columns: 1fr;
  }

  .beat-page-rail {
    position: static;
    width: 100%;
  }

  .beat-page-hero {
    grid-template-columns: 200px minmax(0, 1fr);
  }

  .beat-cover-container {
    width: 200px;
    height: 200px;
  }
}

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

  .beat-page-cover,
  .beat-cover-container {
    width: 100%;
    max-width: 420px;
  }

  .beat-cover-container {
    height: auto;
    aspect-ratio: 1 / 1;
  }

  .beat-detail-title {
    font-size: 22px;
  }

  .beat-store-panel__licenses {
    overflow-x: auto;
  }
}
