/* Components the atlas panel and the entity pages share: the album shelf,
   the preview player that dresses its sleeves, and the moodboard's base.
   --shelf-fill is the family's plate color (pages: --plate on the page;
   the atlas panel sets it from its own --phue). */
/* the listening shelf: featured sleeve + placard on an ink shelf rule,
   contact grid of smaller sleeves below */
.shelf { margin-top: var(--sp-2); }
.shelf .cover {
  display: block; object-fit: cover; background: var(--shelf-fill, var(--plate, var(--peri)));
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}
.shelf a.sleeve { display: block; flex: none; line-height: 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease; }
@media (hover: hover) {
  .shelf a.sleeve:hover { transform: translateY(-3px);
    box-shadow: 0 6px 14px rgba(24, 21, 17, 0.18); }
}
.shelf-feature {
  /* the curator text starts level with the sleeve's top edge */
  display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-3);
  align-items: flex-start;
  padding-bottom: 2px;
}
.albumby { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.albumby .via { flex: 1 1 auto; min-width: 0; }
/* the year as a tiny cut-paper plate in the page's fill — the site's own
   material instead of a bordered chip */
.shelf .tag {
  --cut: 0.5rem;
  border: none; background: var(--shelf-fill, var(--plate, var(--peri))); color: var(--ink);
  font-size: var(--text-tag); font-weight: 600;
  font-variant-numeric: tabular-nums;
  padding: 1px 11px 1px 8px; flex: none; white-space: nowrap;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut) / 0.21256) 100%, 0 100%);
}
/* spotlight: sleeve one cell wide, sentence beside it; the caption spans the
   full shelf width below — title and artist each on one untruncated line,
   the year plate closing the artist's line at the right edge */
.feature-sleeve { width: calc((100% - 1.5rem) / 3); }
.feature-sleeve .cover { width: 100%; height: auto; aspect-ratio: 1 / 1; }
.feature-caption { flex-basis: 100%; order: 2; display: flex;
  flex-direction: column; gap: 1px; min-width: 0; }
.feature-caption .albumtitle { white-space: nowrap; overflow: visible;
  text-overflow: clip; }
.feature-byline { display: flex; align-items: baseline; gap: 6px; }
.feature-byline .via { flex: none; white-space: nowrap; overflow: visible; }
.feature-byline .tag { margin-left: auto; }
.feature-why {
  flex: 1 1 140px; min-width: 0; margin: 0;
  font-size: var(--text--1); color: var(--ink-soft); font-style: italic;
}
.shelf-feature .placard { flex: 1 1 140px; }
/* top-pick sleeve = one grid cell: all covers on a shelf share one size */
.shelf-feature .cover { width: 100%; height: auto; aspect-ratio: 1 / 1; }
.placard { display: flex; flex-direction: column; gap: 3px; min-width: 0;
  padding-bottom: 2px; }
.placard .albumtitle { white-space: normal; font-family: var(--font-display);
  font-size: 1.1rem; line-height: 1.25; }
.shelf .placard .albumwhy { font-style: italic; white-space: normal;
  overflow: visible; margin-top: 3px; }
/* square contact grid: three equal columns filling the column width (6 picks
   = 3x2, 3 picks = one full row), cells as large as the space allows */
.shelf-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-4) var(--sp-3); padding-top: var(--sp-4); }
.shelf-cell { margin: 0; min-width: 0; }
/* a shelf-borrowed artist entry anchors to its album card; :target flashes it */
.shelf-feature:target, .shelf-cell:target { animation: card-flash 1.6s ease-out; }
@keyframes card-flash {
  0%, 40% { outline: 3px solid var(--plate, var(--ink)); outline-offset: 4px; }
  100% { outline: 3px solid transparent; outline-offset: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .shelf-feature:target, .shelf-cell:target { animation: none; }
}
.shelf-cell .cover { width: 100%; height: auto; aspect-ratio: 1 / 1; }
.shelf-cell figcaption { display: flex; flex-direction: column; gap: 1px;
  padding-top: 5px; }
/* one small text style on the shelf: --text--1; hierarchy via weight/ink only */
.shelf .albumtitle { overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; font-size: var(--text--1); font-weight: 500; }
.shelf .albumtitle a { color: var(--ink); text-decoration: none; }
.shelf .albumtitle a:hover { text-decoration: underline; }
.shelf .via { font-size: var(--text--1); color: var(--ink-soft); overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; display: block; }
.cover-fallback {
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 600; font-size: 1.3rem;
  color: var(--ink-soft); width: 100%; aspect-ratio: 1 / 1;
}
.shelf-feature .cover-fallback { font-size: 2.4rem; }
@media (prefers-reduced-motion: reduce) {
  .shelf a.sleeve { transition: none; }
  .shelf a.sleeve:hover { transform: none; }
}
/* listening: the wrapper stands in for the sleeve in the shelf layout so the
   player can dress the cover itself. Previews play through a bare <audio>
   element; the preview's time draws as an ink frame around the sleeve (a
   paper under-stroke keeps it readable on any artwork), and a paper strip on
   the cover's bottom edge holds stop / next, the track name, and the Apple
   Music credit. The slot below the shelf remains only for the compact embed
   fallback when an album has no resolvable previews. */
.sleeve-wrap { position: relative; display: block; flex: none; }
.play-btn {
  position: absolute; left: var(--sp-2); bottom: var(--sp-2);
  width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%;
  background: var(--ink); color: var(--paper);
  display: grid; place-items: center; cursor: pointer;
  opacity: 0.82; line-height: 0;
}
.play-btn:hover { opacity: 1; }
.play-btn svg { margin-left: 1px; }
.play-btn.loading { animation: pbpulse 0.9s ease-in-out infinite; }
@keyframes pbpulse { 50% { opacity: 0.45; } }
.sleeve-wrap.listening .play-btn { display: none; }
/* the preview's time: one bar in the family's own map color, growing along
   the cover's bottom edge */
.play-progress {
  position: absolute; left: 0; bottom: 0; height: 7px; width: 0;
  background: var(--ring-accent, var(--ink));
  pointer-events: none; transition: width 0.3s linear;
}
@media (prefers-reduced-motion: reduce) {
  .play-btn.loading { animation: none; }
  .play-progress { transition: none; }
}
/* while listening, only the essentials sit on the artwork: stop / next where
   the play button was, and the small Apple Music credit chip opposite */
.np-controls {
  position: absolute; left: var(--sp-2); bottom: var(--sp-2);
  display: flex; gap: 6px;
}
.np-controls button {
  width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%;
  background: var(--ink); color: var(--paper);
  display: grid; place-items: center; cursor: pointer;
  flex: none; line-height: 0; opacity: 0.85;
}
.np-controls button:hover { opacity: 1; }
.np-link {
  position: absolute; right: var(--sp-2); bottom: var(--sp-2);
  padding: 2px 7px; background: var(--paper); color: var(--ink-soft);
  font-size: var(--text-tag); text-underline-offset: 3px;
  opacity: 0.92;
}
.np-link:hover { opacity: 1; color: var(--ink); }
.shelf-player { margin-top: var(--sp-3); }
.shelf-player iframe { display: block; width: 100%; height: 175px;
  border: 0; border-radius: 10px; }
/* the moodboard: one community image per aesthetic with its median-cut
   palette as swatches (beside it on pages, beneath it in the panel) */
.board .board-img {
  display: block; width: 100%; height: auto;
  background: var(--shelf-fill, var(--plate, var(--peri)));
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}
.board a.board-link { display: block; line-height: 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease; }
@media (hover: hover) {
  .board a.board-link:hover { transform: translateY(-3px);
    box-shadow: 0 6px 14px rgba(24, 21, 17, 0.18); }
}
.board-swatches { display: flex; height: 12px; margin-top: 6px; }
.board-swatch { flex: 1; }
.board-credit { margin-top: 4px; }
.board-credit a { font-size: var(--text-tag); color: var(--ink-soft);
  text-decoration: none; }
.board-credit a:hover { text-decoration: underline; }
@media (prefers-reduced-motion: reduce) {
  .board a.board-link { transition: none; }
  .board a.board-link:hover { transform: none; }
}
