/* The Musical Safari 0.12.22 — vertically balanced artwork and copy with aligned footers.
   Scoped to individual genre archives only; all other frontend templates unchanged. */
.tms-genre-archive { overflow: clip; }
.tms-genre-archive .tms-genre-archive__hero { padding-block: clamp(44px, 6vw, 78px); }
.tms-genre-archive .tms-genre-archive__hero h1 { overflow-wrap: anywhere; text-wrap: balance; margin-bottom: 12px; }
.tms-genre-archive .tms-genre-archive__hero .tms-genre-archive__tagline {
  margin: 0; max-width: 640px; color: #c0c0d9; font-size: clamp(.91rem,1.8vw,1.09rem);
  font-weight: 450; line-height: 1.5; text-wrap: pretty;
}
.tms-genre-archive .tms-genre-archive__songs { padding-block: clamp(28px, 4vw, 55px) 70px; }
.tms-genre-archive__toolbar {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap;
  gap: 8px 14px; max-width: 1040px; margin: 0 auto 18px;
}
.tms-genre-archive__toolbar h2 {
  margin: 0; font-size: clamp(1.12rem, 2.4vw, 1.55rem); line-height: 1.25;
  letter-spacing: -.025em; color: #f4f1ff;
}
.tms-genre-archive__toolbar > span { color: #aaa9cc; font-size: .79rem; }
.tms-genre-song-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px; max-width: 1040px; margin: 0 auto;
}
.tms-genre-song {
  position: relative; isolation: isolate;
  display: grid; grid-template-columns: clamp(96px, 9vw, 110px) minmax(0,1fr);
  grid-template-rows: auto;
  align-content: stretch; align-items: center; gap: 12px;
  min-width: 0; min-height: 0; padding: 12px; border-radius: 19px;
  border: 1px solid rgba(157,149,222,.29);
  background: linear-gradient(145deg, rgba(28,28,66,.72), rgba(12,15,38,.87));
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.tms-genre-song:hover {
  transform: translateY(-2px); border-color: rgba(173,158,252,.55);
  background: linear-gradient(145deg, rgba(40,37,82,.82), rgba(16,18,49,.96));
}
.tms-genre-song__art {
  grid-column: 1; grid-row: 1; align-self: center; position: relative; display: block;
  width: 100%; aspect-ratio: 1; overflow: hidden; border-radius: 12px;
  border: 1px solid rgba(204,201,255,.13); background: #17152d;
}
.tms-genre-song__art img,
.tms-genre-song__art .tms-placeholder {
  display: block; width: 100%; height: 100%; object-fit: cover;
}
.tms-genre-song__art .tms-placeholder { display: grid; place-items: center; font-size: 1.1rem; }
.tms-genre-song__content {
  grid-column: 2; grid-row: 1; align-self: stretch;
  display: grid; grid-template-rows: minmax(0,1fr) auto;
  min-width: 0; min-height: clamp(96px,9vw,110px);
}
/* The details are centred in the available space, not pinned to the card top.
   Footers share the bottom edge of the row; album artwork is centred beside
   the whole information column, even when title/artist text takes two lines. */
.tms-genre-song__details {
  min-width: 0; min-height: 0; align-self: center; overflow: hidden;
}

.tms-genre-song__type {
  margin: 0 0 5px; color: #abb6ff;
  text-transform: uppercase; letter-spacing: .11em;
  font-size: .61rem; font-weight: 760; line-height: 1.3;
}
.tms-genre-song__title {
  margin: 0 0 5px; color: #f6f5ff; font-family: var(--font-display, inherit);
  font-size: clamp(.92rem, 1.32vw, 1.17rem); line-height: 1.22;
  font-weight: 770; letter-spacing: -.02em; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  overflow: hidden;
}
.tms-genre-song__title a { color: inherit; text-decoration: none; }
.tms-genre-song__title a:hover { color: #d1c7ff; }
.tms-genre-song__artist {
  margin: 0; color: #b2b0cd; font-size: clamp(.71rem,.95vw,.86rem);
  line-height: 1.33; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.tms-genre-song__credit {
  display: block; min-width: 0; max-width: 100%; margin: 7px 0 0;
  color: #beb9db; font-size: .66rem; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: clip;
}
.tms-genre-song__credit-label { color: #aba6d9; font-weight: 700; margin-right: 3px; }
.tms-genre-song__credit-value { color: #d1cee3; }
.tms-genre-song__footer {
  display: flex; align-items: center; justify-content: space-between;
  min-width: 0; gap: 4px; margin-top: 0;
  padding-top: 5px; align-self: end;
}
.tms-genre-song__year {
  color: #a7a6c4; font-size: .76rem; font-variant-numeric: tabular-nums;
}
.tms-genre-song__action {
  flex: none; margin-left: auto;
  display: grid; place-items: center;
  width: 34px; height: 34px;
  border: 1px solid rgba(172,159,240,.29); border-radius: 50%;
  background: rgba(122,105,219,.18); color: #e8e5ff;
  cursor: pointer; text-decoration: none;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.tms-genre-song__action:hover {
  border-color: rgba(201,173,255,.72); background: rgba(128,101,235,.32);
  transform: scale(1.06);
}
.tms-genre-song__action svg { width: 18px; height: 18px; flex: none; }
.tms-genre-song__action--play .icon-fill { fill: currentColor; stroke: none; }
.tms-genre-song__title a:focus-visible,
.tms-genre-song__art:focus-visible,
.tms-genre-song__action:focus-visible {
  outline: 3px solid #d0b2ff; outline-offset: 3px;
}
.tms-genre-archive__empty { color: #b7b3d0; padding-block: 25px; }
.tms-genre-player-placeholder { display: grid; place-items: center; width: 100%; height: 100%; color: #c8b6ff; }
@media (max-width: 600px) {
  .tms-genre-archive .tms-genre-archive__hero { padding-block: 40px 43px; }
  .tms-genre-archive .tms-genre-archive__songs { padding-block: 25px 54px; }
  .tms-genre-song-grid { gap: 10px; }
  .tms-genre-song {
    grid-template-columns: 82px minmax(0,1fr);
    gap: 8px; height: auto; min-height: 0; padding: 9px; border-radius: 16px;
  }
  .tms-genre-song__art { border-radius: 10px; }
  .tms-genre-song__content { min-height: 82px; }
  .tms-genre-song__type { font-size: .55rem; letter-spacing: .08em; margin-bottom: 3px; }
  .tms-genre-song__title { font-size: .78rem; line-height: 1.2; font-weight: 745; margin-bottom: 3px; -webkit-line-clamp: 2; }
  .tms-genre-song__artist { font-size: .67rem; line-height: 1.2; }
  .tms-genre-song__credit { font-size: .59rem; margin-top: 5px; line-height: 1.25; white-space: nowrap; overflow: hidden; }
  /* Show a credit on phones only when the complete value fits in the narrow column. */
  .tms-genre-song__credit:not(.is-mobile-short) { display: none; }
  .tms-genre-song__footer { padding-top: 4px; }
  .tms-genre-song__year { font-size: .65rem; }
  .tms-genre-song__action { width: 28px; height: 28px; }
  .tms-genre-song__action svg { width: 14px; height: 14px; }
}
@media (max-width: 360px) {
  .tms-genre-song-grid { gap: 8px; }
  .tms-genre-song { grid-template-columns: 70px minmax(0, 1fr); padding: 8px; column-gap: 6px; height: auto; min-height: 0; }
  .tms-genre-song__content { min-height: 70px; }
  .tms-genre-song__title { font-size: .75rem; }
  .tms-genre-song__type { font-size: .48rem; letter-spacing: 0; }
  .tms-genre-song__artist { font-size: .64rem; }
  .tms-genre-song__action { width: 26px; height: 26px; }
  .tms-genre-song__year { font-size: .6rem; }
  .tms-genre-song__footer { gap: 2px; }
  .tms-genre-song__credit { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .tms-genre-song, .tms-genre-song__action { transition: none; }
}
