/* Music card overrides only */
#catalog-root {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: stretch;
  max-width: 1140px;
}
.song-card {
  background: #0D0D0D;
  border: 1px solid #4DD0E1;
  border-radius: 28px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-sizing: border-box;
}
.song-card-body {
  display: flex;
  flex-direction: column;
  flex: 1 0 auto;
}
.song-card-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.song-card h3 {
  margin: 0;
  font-size: 24px;
  font-weight: bold;
  color: #4DD0E1;
  text-align: center;
  min-height: 2.6em; /* reserve 2 lines */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
}
.song-card .song-card-share {
  position: absolute;
  top: 24px;
  right: 24px;
  background: transparent;
  border: none;
  padding: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #F57C00;
  cursor: pointer;
}
.song-card .song-card-share .share-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
.song-card-header {
  position: relative;
  margin-bottom: 16px;
}
.song-card-artwork {
  position: relative;
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 16px;
}
.song-card-artwork img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.song-card-genre {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(245,245,245,0.9);
  color: #000;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 14px;
  max-width: 90%;
  white-space: normal;
  word-break: break-word;
  text-align: center;
  line-height: 1.3;
}
.song-card-description {
  color: #D3D3D3;
  font-size: 18px;
  text-align: center;
  margin: 0 0 16px 0;
  min-height: 2.6em; /* reserve 2 lines */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
}
/* Buttons */
.music-action-button.play-button,
.music-action-button.download-button {
  width: 100%;
  height: 54px;
  border-radius: 12px;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  transition: filter 0.2s;
}
.music-action-button.play-button {
  background: #F57C00;
  color: #1A1A1A;
}
.music-action-button.play-button .icon {
  color: #1A1A1A;
}
.music-action-button.download-button {
  background: #4DD0E1;
  color: #1A1A1A;
  text-decoration: none;
}
.music-action-button.download-button .icon {
  color: #1A1A1A;
}
/* Divider and rating */
.song-card-divider {
  border: none;
  border-top: 1px solid #4DD0E1;
  margin: 12px 0;
}
.rating-container {
  text-align: center;
}
.rating-container .rating-caption {
  display: block;
  color: #D3D3D3;
  font-size: 14px;
  margin-bottom: 8px;
}
.rating-container .rating-stars {
  display: flex;
  justify-content: center;
  gap: 8px;
}
.rating-container .rating-stars button.star {
  background: transparent;
  border: none;
  color: #4DD0E1;
  font-size: 32px;
  line-height: 1;
  padding: 6px;
  width: 44px;
  height: 44px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rating-container .rating-stars button.star:focus-visible {
  outline: 2px solid #4DD0E1;
  outline-offset: 2px;
}
/* Footer */
.song-card-footer {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  align-items: stretch;
}
.song-card-footer .music-action-button {
  flex: 1;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 16px;
  text-decoration: none;
  border: 2px solid;
  cursor: pointer;
  transition: filter 0.2s;
}
.song-card-footer .opiniones-link {
  border-color: #F57C00;
  color: #F57C00;
  background: transparent;
}
.song-card-footer .opiniones-link .icon {
  color: #F57C00;
}
.song-card-footer .details-link {
  border-color: #4DD0E1;
  color: #4DD0E1;
  background: transparent;
}
.song-card-footer .details-link .icon {
  color: #4DD0E1;
}
/* Responsive grid */
@media (max-width: 1049px) {
  #catalog-root {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 679px) {
  #catalog-root {
    grid-template-columns: 1fr;
  }
}
/* Share dialog */
.share-dialog {
  background: #fff;
  color: #000;
  border-radius: 8px;
  padding: 20px;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000;
  width: min(400px, calc(100vw - 32px));
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.share-dialog input {
  width: 100%;
  padding: 8px;
  margin-bottom: 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  color: #000;
  background: #fff;
}
.share-dialog button {
  height: 44px;
  padding: 0 16px;
  border-radius: 4px;
  border: 1px solid #ccc;
  background: #f0f0f0;
  color: #000;
  cursor: pointer;
  margin-right: 8px;
}
.share-dialog button:focus-visible {
  outline: 2px solid #4DD0E1;
}
.community-comments {
  border: 1px solid #888;
  color: #D3D3D3;
  border-radius: 8px;
  padding: 12px;
}
/* Override legacy .song-card-actions button specificity */
.song-card .song-card-actions button.music-action-button,
.song-card .song-card-actions a.music-action-button {
  /* Our styles already more specific, but ensure */
}
/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .music-action-button,
  .song-card-footer .music-action-button {
    transition: none;
  }
}

/* Header fix */
#catalog-root article.song-card .song-card-header {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  grid-template-rows: auto auto;
  align-items: start;
  gap: 0 8px;
  min-height: 2.6em;
}
#catalog-root article.song-card .song-card-header h3 {
  grid-column: 2;
  grid-row: 1;
  font-size: 22px;
  line-height: 1.3;
  margin: 0;
  max-height: 2.6em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
}
@media (max-width: 480px) {
  #catalog-root article.song-card .song-card-header h3 {
    font-size: 20px;
  }
}
#catalog-root article.song-card .song-card-header .song-card-share {
  grid-column: 3;
  grid-row: 1;
  position: static;
  margin: 0;
  justify-self: end;
  align-self: start;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
}
/* Description override */
#catalog-root article.song-card .song-card-body .song-card-description {
  color: #E6E6E6;
  font-size: 18px;
  line-height: 1.4;
  margin: 0 0 20px;
  height: 2.8em;
  min-height: 2.8em;
  max-height: 2.8em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
#catalog-root article.song-card .song-card-body {
  padding: 0;
}
/* Actions full width */
#catalog-root article.song-card .song-card-actions {
  align-items: stretch;
}
/* Rating */
#catalog-root article.song-card .rating-container > span {
  color: #E6E6E6;
}
#catalog-root article.song-card .rating-container {
  display: flex;
  gap: clamp(0px, 2vw, 6px);
}
#catalog-root article.song-card .rating-container > * {
  min-width: 44px;
  max-width: 44px;
}
/* Footer grid */
#catalog-root article.song-card .song-card-footer {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr);
  gap: 12px;
}
#catalog-root article.song-card .song-card-footer a {
  min-width: 0;
  padding: 8px;
  font-size: clamp(14px, 2vw, 16px);
  display: flex;
  align-items: center;
  min-height: 54px;
  border: 2px solid transparent;
  border-radius: 12px;
  transition: border-color 0.2s, filter 0.2s;
}
#catalog-root article.song-card .song-card-footer a svg {
  flex-shrink: 0;
  margin-right: 8px;
}
#catalog-root article.song-card .song-card-footer a:hover {
  border-color: rgba(255,255,255,0.3);
  filter: brightness(1.1);
}
#catalog-root article.song-card .song-card-footer a:focus-visible {
  outline: 2px solid turquoise;
  outline-offset: 2px;
}
/* Music detail actions */
.song-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 0;
}
.music-action-button {
  min-height: 44px;
}
.music-action-button:focus-visible {
  outline: 2px solid turquoise;
  outline-offset: 2px;
}
/* Share button dark transparent with cyan text */
button.song-card-share,
.music-action-button[data-action='share'] {
  background: rgba(0, 0, 0, 0.5);
  color: #00FFFF;
  border: 1px solid rgba(0, 255, 255, 0.5);
}
/* Community comments heading */
.community-comments h3,
.community-comments h4,
.community-comments .heading {
  color: inherit;
}
/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  #catalog-root article.song-card .song-card-footer a {
    transition: none;
  }
}
#catalog-root .song-card .rating-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  max-width: none;
}

#catalog-root .song-card .rating-container > span {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: none;
  color: #E6E6E6;
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
}

#catalog-root .song-card .rating-container > .rating-stars {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 0;
  width: auto;
  min-width: 0;
  max-width: 100%;
  flex: none;
}

#catalog-root .song-card .rating-stars button.star {
  flex: 0 0 44px;
  width: 44px;
  min-width: 44px;
  max-width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #4DD0E1;
  font-size: 32px;
}

#catalog-root .song-card .song-card-footer a.opiniones-link {
  border: 2px solid #F57C00;
  color: #F57C00;
}

#catalog-root .song-card .song-card-footer a.details-link {
  border: 2px solid #4DD0E1;
  color: #4DD0E1;
}

#catalog-root .song-card .song-card-footer {
  display: grid;
  grid-template-columns: 1.8fr 1fr;
  min-width: 0;
}

#catalog-root .song-card .song-card-footer a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

#catalog-root .song-card .song-card-footer a svg {
  margin: 0;
  flex-shrink: 0;
}

#catalog-root .song-card .song-card-header .song-card-share {
  background: transparent;
  border: none;
  color: #F57C00;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

@media(max-width:640px){
body.music-body .global-player{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px 8px;padding:8px 12px;align-items:center;}
#player-previous,#player-play,#player-next{grid-row:1;min-height:40px;width:100%;padding:8px;font-size:12px;}
#player-previous{grid-column:1;}
#player-play{grid-column:2;}
#player-next{grid-column:3;}
#player-now-playing{grid-column:1/-1;grid-row:2;flex:none;min-width:0;min-height:0;font-size:12px;line-height:1.3;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}
label[for=player-progress]{grid-row:3;grid-column:1;font-size:11px;}
input#player-progress{grid-row:3;grid-column:2/4;width:100%;min-width:0;margin:0;}
label[for=player-volume]{grid-row:4;grid-column:1;font-size:11px;}
input#player-volume{grid-row:4;grid-column:2/4;width:100%;margin:0;}
.global-audio{position:absolute;}
body.music-body footer{padding-bottom:200px;}
}