/* High-quality public profile player. Playback remains owned by app.js. */
.profile-audio-section {
  width: 100%;
  margin-top: 26px;
}

.profile-audio-section .profile-section-heading {
  margin-bottom: 11px;
}

.profile-audio-list {
  display: grid;
  gap: 10px;
}

.profile-audio-card {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 76px 44px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 104px;
  padding: 13px 17px 13px 13px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 24px;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, .11), rgba(255, 255, 255, .045) 58%, rgba(255, 255, 255, .075)),
    rgba(12, 13, 20, .38);
  text-align: left;
  box-shadow: inset 0 1px rgba(255, 255, 255, .085), 0 24px 60px -42px rgba(0, 0, 0, .9);
  overflow: hidden;
  backdrop-filter: blur(22px) saturate(135%);
  transition: border-color .22s ease, transform .22s ease, box-shadow .22s ease;
}

.profile-audio-card:before {
  content: "";
  z-index: -1;
  position: absolute;
  inset: 0;
  opacity: .5;
  background: radial-gradient(circle at 12% 50%, color-mix(in srgb, var(--profile-accent) 24%, transparent), transparent 34%);
  pointer-events: none;
  transition: opacity .25s ease;
}

.profile-audio-card:after {
  content: "";
  z-index: -1;
  position: absolute;
  top: -55%;
  left: -15%;
  width: 38%;
  height: 210%;
  opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .075), transparent);
  transform: rotate(14deg) translateX(-130%);
  pointer-events: none;
}

.profile-audio-card:hover,
.profile-audio-card:focus-within {
  border-color: color-mix(in srgb, var(--profile-accent) 48%, rgba(255, 255, 255, .22));
  transform: translateY(-1px);
  box-shadow: inset 0 1px rgba(255, 255, 255, .1), 0 26px 66px -42px rgba(0, 0, 0, .95);
}

.profile-audio-card.is-playing {
  border-color: color-mix(in srgb, var(--profile-accent) 62%, rgba(255, 255, 255, .26));
  box-shadow: inset 0 1px rgba(255, 255, 255, .12), 0 26px 70px -38px color-mix(in srgb, var(--profile-accent) 34%, transparent);
}

.profile-audio-card.is-playing:before {
  opacity: .9;
}

.profile-audio-card.is-playing:after {
  animation: profileAudioShine 5.8s ease-in-out infinite;
}

.profile-audio-card.has-error {
  opacity: .56;
  filter: saturate(.45);
}

.profile-audio-cover {
  position: relative;
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 19px;
  color: rgba(221, 214, 254, .9);
  background:
    radial-gradient(circle at 32% 20%, rgba(139, 92, 246, .42), transparent 58%),
    linear-gradient(145deg, rgba(35, 29, 67, .94), rgba(17, 18, 28, .96));
  box-shadow: inset 0 1px rgba(255, 255, 255, .075), 0 14px 30px -20px #000;
  overflow: hidden;
}

.profile-audio-cover:after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .035);
  pointer-events: none;
}

.profile-audio-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-audio-cover svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.55;
}

.profile-audio-play {
  z-index: 2;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, .13);
  box-shadow: inset 0 1px rgba(255, 255, 255, .1), 0 10px 25px -17px #000;
  overflow: visible;
  backdrop-filter: blur(12px);
  transition: background .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.profile-audio-play:after {
  display: none;
}

.profile-audio-play:hover {
  border-color: rgba(255, 255, 255, .38);
  background: color-mix(in srgb, var(--profile-accent) 70%, rgba(255, 255, 255, .12));
  transform: scale(1.055);
  box-shadow: 0 12px 30px -17px var(--profile-accent);
}

.profile-audio-play:focus-visible,
.profile-audio-waveform:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--profile-accent) 68%, #fff);
  outline-offset: 3px;
}

.profile-audio-play > span {
  position: static;
  z-index: auto;
  font: 800 .72rem/1 system-ui, sans-serif;
  text-shadow: none;
  transform: translateX(1px);
}

.profile-audio-card.is-playing .profile-audio-play {
  border-color: color-mix(in srgb, var(--profile-accent) 58%, #fff);
  background: color-mix(in srgb, var(--profile-accent) 76%, #10121c);
  box-shadow: 0 12px 30px -17px var(--profile-accent), 0 0 0 5px color-mix(in srgb, var(--profile-accent) 12%, transparent);
}

.profile-audio-card.is-playing .profile-audio-play > span {
  transform: none;
}

.profile-audio-copy {
  z-index: 1;
  display: grid;
  min-width: 0;
}

.profile-audio-copy > small {
  color: color-mix(in srgb, var(--profile-accent) 64%, #fff);
  font-size: calc(.49rem * var(--profile-card-scale));
  font-weight: 820;
  letter-spacing: .095em;
  line-height: 1.2;
  text-transform: uppercase;
}

.profile-audio-copy > strong {
  min-width: 0;
  margin-top: 3px;
  color: rgba(255, 255, 255, .94);
  font-size: calc(.78rem * var(--profile-card-scale));
  font-weight: 790;
  line-height: 1.25;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.profile-audio-copy > .profile-audio-timeline {
  display: grid;
  grid-template-columns: 34px minmax(72px, 1fr) 34px;
  align-items: center;
  gap: 9px;
  height: auto;
  min-width: 0;
  margin-top: 9px;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

.profile-audio-timeline > time {
  color: rgba(255, 255, 255, .52);
  font: 720 calc(.52rem * var(--profile-card-scale))/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: nowrap;
}

.profile-audio-timeline > time:last-child {
  text-align: right;
}

.profile-audio-waveform {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
  height: 28px;
  margin: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  cursor: pointer;
  overflow: hidden;
  touch-action: none;
}

.profile-audio-waveform-bars {
  position: absolute;
  inset: 1px 0;
  display: flex;
  align-items: center;
  gap: clamp(1px, .32vw, 3px);
  pointer-events: none;
}

.profile-audio-waveform-bars > i {
  flex: 1 1 0;
  min-width: 1px;
  max-width: 4px;
  height: var(--wave-height);
  border-radius: 999px;
  background: rgba(255, 255, 255, .22);
  transition: opacity .2s ease, transform .2s ease;
}

.profile-audio-waveform-progress {
  position: absolute;
  z-index: 2;
  top: 1px;
  bottom: 1px;
  left: 0;
  width: 0;
  max-width: 100%;
  border-radius: 5px;
  background: repeating-linear-gradient(90deg, #7c5cff 0 3px, transparent 3px 6px);
  filter: drop-shadow(0 0 5px color-mix(in srgb, var(--profile-accent) 70%, #7c5cff));
  pointer-events: none;
  transition: width .08s linear;
}

.profile-audio-waveform:after {
  content: "";
  position: absolute;
  z-index: 3;
  top: 1px;
  bottom: 1px;
  left: var(--audio-progress, 0%);
  width: 1px;
  opacity: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 0 8px rgba(255, 255, 255, .5);
  transform: translateX(-.5px);
  transition: left .08s linear, opacity .18s ease;
}

.profile-audio-card.is-playing .profile-audio-waveform:after,
.profile-audio-waveform:hover:after,
.profile-audio-waveform:focus-visible:after {
  opacity: 1;
}

.profile-audio-card.is-playing .profile-audio-waveform-bars > i:nth-child(4n + 1) {
  animation: profileWaveBeat 1.1s ease-in-out infinite alternate;
}

.profile-audio-card.is-playing .profile-audio-waveform-bars > i:nth-child(4n + 3) {
  animation: profileWaveBeat 1.35s .14s ease-in-out infinite alternate-reverse;
}

.profile-audio-card audio {
  display: none;
}

.profile-volume-control {
  border-color: rgba(255, 255, 255, .16);
  background: rgba(10, 11, 18, .72);
  box-shadow: inset 0 1px rgba(255, 255, 255, .065), 0 20px 48px -28px #000;
  backdrop-filter: blur(22px) saturate(140%);
}

.profile-volume-control input[type="range"] {
  accent-color: color-mix(in srgb, var(--profile-accent) 82%, #8b5cf6);
}

.profile-entry-gate [data-profile-enter-music]:disabled {
  opacity: .72;
  cursor: progress;
  transform: none;
}

.profile-entry-gate [data-profile-enter-music][aria-busy="true"] > i {
  color: transparent;
  border: 2px solid rgba(255, 255, 255, .3);
  border-top-color: #fff;
  border-radius: 999px;
  animation: profileYoutubeLoading .75s linear infinite;
}

@keyframes profileAudioShine {
  0%, 55% { opacity: 0; transform: rotate(14deg) translateX(-130%); }
  66% { opacity: 1; }
  88%, 100% { opacity: 0; transform: rotate(14deg) translateX(390%); }
}

@keyframes profileWaveBeat {
  from { transform: scaleY(.78); opacity: .72; }
  to { transform: scaleY(1.08); opacity: 1; }
}

@media (max-width: 620px) {
  .profile-audio-card {
    grid-template-columns: 62px 38px minmax(0, 1fr);
    gap: 10px;
    min-height: 88px;
    padding: 10px 11px 10px 10px;
    border-radius: 20px;
  }

  .profile-audio-cover {
    width: 62px;
    height: 62px;
    border-radius: 16px;
  }

  .profile-audio-cover svg {
    width: 25px;
    height: 25px;
  }

  .profile-audio-play {
    width: 37px;
    height: 37px;
  }

  .profile-audio-copy > .profile-audio-timeline {
    grid-template-columns: 31px minmax(54px, 1fr) 31px;
    gap: 6px;
    margin-top: 7px;
  }

  .profile-audio-waveform-bars {
    gap: 1px;
  }

  .profile-audio-waveform-bars > i:nth-child(2n) {
    display: none;
  }
}

@media (max-width: 390px) {
  .profile-audio-card {
    grid-template-columns: 54px 34px minmax(0, 1fr);
    gap: 8px;
    padding: 9px;
    border-radius: 18px;
  }

  .profile-audio-cover {
    width: 54px;
    height: 54px;
    border-radius: 14px;
  }

  .profile-audio-play {
    width: 34px;
    height: 34px;
  }

  .profile-audio-copy > small {
    display: none;
  }

  .profile-audio-copy > strong {
    font-size: calc(.72rem * var(--profile-card-scale));
  }

  .profile-audio-copy > .profile-audio-timeline {
    grid-template-columns: 29px minmax(44px, 1fr) 29px;
    gap: 4px;
    margin-top: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .profile-audio-card,
  .profile-audio-play,
  .profile-audio-waveform-progress,
  .profile-audio-waveform:after,
  .profile-audio-waveform-bars > i {
    transition: none;
    animation: none !important;
  }
}

.profile-audio-card.is-youtube-source {
  align-items: center;
  padding-bottom: 12px;
}

.profile-audio-card.is-youtube-source .profile-audio-cover:before {
  content: "▶";
  position: absolute;
  right: 6px;
  bottom: 6px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border: 2px solid rgba(12, 13, 20, .9);
  border-radius: 999px;
  color: #fff;
  background: #ff0033;
  font: 800 8px/1 system-ui, sans-serif;
  box-shadow: 0 5px 14px rgba(255, 0, 51, .34);
}

.profile-audio-card.is-youtube-source.is-buffering .profile-audio-play > span {
  width: 14px;
  height: 14px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, .32);
  border-top-color: #fff;
  border-radius: 999px;
  color: transparent;
  animation: profileYoutubeLoading .75s linear infinite;
}

.profile-audio-youtube-details {
  z-index: 1;
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
  margin-top: 2px;
}

.profile-audio-youtube-details > summary {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 12px;
  color: rgba(255, 255, 255, .72);
  background: rgba(4, 5, 9, .28);
  font-size: calc(.58rem * var(--profile-card-scale));
  font-weight: 720;
  list-style: none;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, color .18s ease;
}

.profile-audio-youtube-details > summary::-webkit-details-marker {
  display: none;
}

.profile-audio-youtube-details > summary:hover,
.profile-audio-youtube-details > summary:focus-visible,
.profile-audio-youtube-details[open] > summary {
  border-color: color-mix(in srgb, var(--profile-accent) 40%, rgba(255, 255, 255, .18));
  color: #fff;
  background: rgba(7, 8, 13, .44);
}

.profile-audio-youtube-details > summary:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--profile-accent) 68%, #fff);
  outline-offset: 3px;
}

.profile-audio-youtube-details > summary svg {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  color: #ff304d;
  fill: currentColor;
}

.profile-audio-youtube-details > summary span {
  min-width: 0;
}

.profile-audio-youtube-details > summary i {
  margin-left: auto;
  color: rgba(255, 255, 255, .48);
  font: 800 1rem/1 system-ui, sans-serif;
  transform-origin: center;
  transition: transform .18s ease;
}

.profile-audio-youtube-details[open] > summary i {
  transform: rotate(180deg);
}

.profile-audio-youtube-shell {
  display: grid;
  gap: 8px;
  width: 100%;
  min-width: 0;
  padding-top: 10px;
  animation: profileYoutubeReveal .2s ease both;
}

.profile-audio-youtube-player {
  position: relative;
  display: grid;
  place-items: center;
  justify-self: center;
  width: min(100%, 356px);
  min-width: min(200px, 100%);
  height: 200px;
  min-height: 200px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 16px;
  color: rgba(255, 255, 255, .78);
  background: #050505;
  box-shadow: inset 0 1px rgba(255, 255, 255, .06);
}

.profile-audio-youtube-player > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: .52;
  object-fit: cover;
  filter: saturate(.8) brightness(.62);
}

.profile-audio-youtube-player > span {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 9px;
  padding: 14px;
  text-align: center;
}

.profile-audio-youtube-player > span svg {
  width: 28px;
  height: 28px;
  color: #ff0033;
  fill: currentColor;
  filter: drop-shadow(0 7px 14px rgba(255, 0, 51, .26));
}

.profile-audio-youtube-player > span strong {
  font-size: calc(.68rem * var(--profile-card-scale));
}

.profile-audio-youtube-player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.profile-audio-youtube-player.has-player {
  overflow: visible;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.profile-audio-youtube-meta {
  display: flex;
  align-items: center;
  justify-self: center;
  gap: 8px;
  width: min(100%, 356px);
  min-width: 0;
}

.profile-audio-youtube-meta > p {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  color: rgba(255, 255, 255, .48);
  font-size: calc(.53rem * var(--profile-card-scale));
  font-weight: 660;
  line-height: 1.4;
}

.profile-audio-youtube-meta > p svg {
  flex: 0 0 auto;
  width: 13px;
  height: 13px;
  color: #ff304d;
  fill: currentColor;
}

.profile-audio-youtube-meta > button {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
  color: rgba(255, 255, 255, .68);
  background: rgba(255, 255, 255, .05);
  font-size: calc(.5rem * var(--profile-card-scale));
  font-weight: 720;
  cursor: pointer;
}

.profile-audio-youtube-meta > button:hover,
.profile-audio-youtube-meta > button:focus-visible {
  border-color: rgba(255, 255, 255, .24);
  color: #fff;
  background: rgba(255, 255, 255, .09);
}

.profile-audio-card.is-youtube-source.has-error {
  opacity: 1;
  border-color: rgba(251, 113, 133, .42);
  filter: none;
}

.profile-audio-card.is-youtube-source.has-error .profile-audio-play:disabled {
  opacity: .42;
  cursor: not-allowed;
}

@keyframes profileYoutubeLoading {
  to { transform: rotate(360deg); }
}

@keyframes profileYoutubeReveal {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 620px) {
  .profile-audio-youtube-player {
    min-height: 200px;
    border-radius: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .profile-audio-card.is-youtube-source.is-buffering .profile-audio-play > span,
  .profile-audio-youtube-shell {
    animation: none;
  }

  .profile-audio-youtube-details > summary,
  .profile-audio-youtube-details > summary i {
    transition: none;
  }
}

/* Optional player designs share the same playback markup and controls. */
.profile-audio-section.audio-style-compact .profile-audio-list {
  gap: 7px;
}

.profile-audio-section.audio-style-compact .profile-audio-card {
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 11px;
  min-height: 68px;
  padding: 10px 13px;
  border-radius: 15px;
  background: rgba(10, 12, 20, .62);
  box-shadow: inset 0 1px rgba(255, 255, 255, .07), 0 12px 32px -27px #000;
}

.profile-audio-section.audio-style-compact .profile-audio-cover {
  display: none;
}

.profile-audio-section.audio-style-compact .profile-audio-play {
  grid-column: 1;
  grid-row: 1;
  width: 36px;
  height: 36px;
  background: color-mix(in srgb, var(--profile-accent) 26%, rgba(255, 255, 255, .09));
}

.profile-audio-section.audio-style-compact .profile-audio-copy {
  grid-column: 2;
  grid-row: 1;
}

.profile-audio-section.audio-style-compact .profile-audio-copy > small {
  font-size: calc(.46rem * var(--profile-card-scale));
}

.profile-audio-section.audio-style-compact .profile-audio-copy > strong {
  font-size: calc(.74rem * var(--profile-card-scale));
}

.profile-audio-section.audio-style-compact .profile-audio-copy > .profile-audio-timeline {
  grid-template-columns: 30px minmax(55px, 1fr) 30px;
  gap: 7px;
  margin-top: 5px;
}

.profile-audio-section.audio-style-compact .profile-audio-waveform {
  height: 18px;
}

.profile-audio-section.audio-style-compact .profile-audio-waveform-bars > i:nth-child(3n) {
  display: none;
}

.profile-audio-section.audio-style-cover .profile-audio-list {
  gap: 14px;
}

.profile-audio-section.audio-style-cover .profile-audio-card {
  grid-template-columns: 112px minmax(0, 1fr) 44px;
  gap: 17px;
  min-height: 152px;
  padding: 18px;
  border-radius: 27px;
  background:
    radial-gradient(circle at 12% 34%, color-mix(in srgb, var(--profile-accent) 26%, transparent), transparent 52%),
    linear-gradient(118deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .045) 68%),
    rgba(9, 10, 18, .58);
}

.profile-audio-section.audio-style-cover .profile-audio-cover {
  grid-column: 1;
  grid-row: 1;
  width: 112px;
  height: 112px;
  border-radius: 21px;
  box-shadow: 0 18px 36px -22px #000;
}

.profile-audio-section.audio-style-cover .profile-audio-cover svg {
  width: 43px;
  height: 43px;
}

.profile-audio-section.audio-style-cover .profile-audio-copy {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
}

.profile-audio-section.audio-style-cover .profile-audio-copy > small {
  font-size: calc(.53rem * var(--profile-card-scale));
}

.profile-audio-section.audio-style-cover .profile-audio-copy > strong {
  margin-top: 7px;
  font-size: calc(1.08rem * var(--profile-card-scale));
  white-space: normal;
  overflow-wrap: anywhere;
}

.profile-audio-section.audio-style-cover .profile-audio-copy > .profile-audio-timeline {
  margin-top: 17px;
}

.profile-audio-section.audio-style-cover .profile-audio-play {
  grid-column: 3;
  grid-row: 1;
  width: 44px;
  height: 44px;
  background: color-mix(in srgb, var(--profile-accent) 62%, #181c2a);
}

.profile-audio-section.audio-style-cover .profile-audio-youtube-details,
.profile-audio-section.audio-style-compact .profile-audio-youtube-details {
  grid-column: 1 / -1;
  grid-row: 2;
}

@media (max-width: 620px) {
  .profile-audio-section.audio-style-cover .profile-audio-card {
    grid-template-columns: 78px minmax(0, 1fr) 36px;
    gap: 10px;
    min-height: 108px;
    padding: 11px;
    border-radius: 20px;
  }

  .profile-audio-section.audio-style-cover .profile-audio-cover {
    width: 78px;
    height: 78px;
    border-radius: 15px;
  }

  .profile-audio-section.audio-style-cover .profile-audio-play {
    width: 36px;
    height: 36px;
  }

  .profile-audio-section.audio-style-cover .profile-audio-copy > strong {
    margin-top: 3px;
    font-size: calc(.84rem * var(--profile-card-scale));
  }

  .profile-audio-section.audio-style-cover .profile-audio-copy > .profile-audio-timeline {
    margin-top: 7px;
  }
}

@media (max-width: 390px) {
  .profile-audio-section.audio-style-cover .profile-audio-card {
    grid-template-columns: 64px minmax(0, 1fr) 32px;
    gap: 7px;
    padding: 9px;
  }

  .profile-audio-section.audio-style-cover .profile-audio-cover {
    width: 64px;
    height: 64px;
  }

  .profile-audio-section.audio-style-cover .profile-audio-play {
    width: 32px;
    height: 32px;
  }

  .profile-audio-section.audio-style-cover .profile-audio-copy > strong {
    font-size: calc(.72rem * var(--profile-card-scale));
  }

  .profile-audio-section.audio-style-compact .profile-audio-copy > small {
    display: block;
  }
}
