body.collection-page .collection-board {
  background-image:
    radial-gradient(circle at 16% 18%, rgba(216, 183, 101, .08), transparent 31%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .012) 0 1px, transparent 1px 4px),
    linear-gradient(145deg, #15140f 0%, #0b0b0a 58%, #080808 100%);
}

/* Les catégories deviennent des bacs visuels. Le choix de la pochette est
   effectué une fois au chargement par le rendu, puis reste stable pendant
   toute la session pour éviter un changement à chaque interaction. */
body.collection-page .crate-row {
  --crate-columns: 5;
  --crate-gap: clamp(16px, 2vw, 28px);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--crate-gap);
  padding-bottom: 8px;
}

body.collection-page .crate {
  position: relative;
  flex: 0 1 calc((100% - (var(--crate-columns) - 1) * var(--crate-gap)) / var(--crate-columns));
  width: auto;
  min-width: 0;
  max-width: 240px;
  min-height: 280px;
  overflow: hidden;
  border: 1px solid rgba(216, 183, 101, .28);
  border-radius: 18px;
  background: #070706;
  box-shadow: 0 24px 48px rgba(0, 0, 0, .34);
  transition: transform .32s cubic-bezier(.2, .75, .25, 1), border-color .25s ease, box-shadow .25s ease;
}

body.collection-page .crate:hover,
body.collection-page .crate:focus-within {
  transform: translateY(-7px);
  border-color: rgba(244, 231, 191, .66);
  box-shadow: 0 34px 64px rgba(0, 0, 0, .52);
}

body.collection-page .crate.is-active {
  border-color: var(--reprise-gold);
  background: #070706;
  box-shadow: 0 0 0 2px rgba(216, 183, 101, .24), 0 34px 64px rgba(0, 0, 0, .52);
}

body.collection-page .crate-open,
html[data-exkave-theme] body.collection-page .collection-shell button.crate-open,
html[data-theme] body.collection-page .collection-shell button.crate-open {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr auto;
  width: 100%;
  height: 100%;
  min-height: 280px;
  padding: 0 !important;
  overflow: hidden;
  background: #070706 !important;
}

body.collection-page .crate-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 42%, rgba(216, 183, 101, .13), transparent 48%),
    #070706;
}

body.collection-page .crate-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 38%, rgba(3, 3, 3, .92) 88%);
  pointer-events: none;
}

body.collection-page .crate-cover > .cover-art,
body.collection-page .crate-cover > .cover-art img {
  width: 100%;
  height: 100%;
}

body.collection-page .crate-cover > .cover-art {
  min-height: 280px;
}

body.collection-page .crate-cover > .cover-art img {
  display: block;
  object-fit: cover;
}

body.collection-page .crate-cover .collection-cover-temp-badge,
body.collection-page .crate-cover .cover-kicker,
body.collection-page .crate-cover .cover-meta {
  display: none;
}

body.collection-page .crate-cover .crate-icon {
  width: 86px;
  height: 86px;
  color: var(--reprise-gold);
  opacity: .72;
}

body.collection-page .crate-copy {
  position: relative;
  z-index: 3;
  align-self: end;
  display: grid;
  gap: 6px;
  padding: 22px 18px 18px;
  color: #fffdf7;
  text-align: left;
}

body.collection-page .crate strong {
  color: #fffdf7;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: .015em;
  text-shadow: 0 2px 14px rgba(0, 0, 0, .9);
}

body.collection-page .crate small {
  color: #ead78f;
  font-size: 13px;
  opacity: .9;
}

body.collection-page .crate-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
  padding: 0;
  opacity: 0;
}

body.collection-page .crate:hover .crate-actions,
body.collection-page .crate:focus-within .crate-actions {
  opacity: 1;
}

body.collection-page .crate-edit-form {
  min-height: 280px;
  align-content: center;
  padding: 24px;
}

body.collection-page .crate-drawer[hidden] {
  display: none !important;
}

@media (max-width: 720px) {
  body.collection-page .crate-row {
    --crate-columns: 2;
    --crate-gap: 14px;
  }

  body.collection-page .crate,
  body.collection-page .crate-open,
  body.collection-page .crate-cover > .cover-art {
    min-height: 230px;
  }
}

@media (max-width: 460px) {
  body.collection-page .crate-row {
    --crate-columns: 1;
  }

  body.collection-page .crate { max-width: none; }
}

body.collection-page .album-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(54px, 6vw, 84px) clamp(20px, 2.4vw, 38px);
}

body.collection-page .album-card {
  isolation: isolate;
  min-width: 0;
  transition: transform .35s cubic-bezier(.2, .75, .25, 1), filter .35s ease;
}

body.collection-page .album-card:hover,
body.collection-page .album-card:focus-within {
  z-index: 2;
  transform: translateY(-10px) scale(1.012);
  filter: brightness(1.04);
}

body.collection-page .album-card-open,
body.collection-page .album-cover {
  overflow: visible;
}

body.collection-page .album-cover-slot {
  display: contents;
}

body.collection-page .album-cover {
  position: relative;
  border: 1px solid rgba(240, 217, 145, .3);
  border-radius: 2px;
  background: #070706;
  box-shadow: 0 30px 54px rgba(0, 0, 0, .58), 0 5px 12px rgba(0, 0, 0, .64);
  transform: perspective(900px) rotateX(.45deg);
}

body.collection-page .album-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: linear-gradient(118deg, transparent 5%, rgba(255, 255, 255, .12) 31%, transparent 48%);
  opacity: .34;
  transition: opacity .3s ease, transform .4s ease;
}

body.collection-page .album-cover::after {
  content: "";
  position: absolute;
  left: -5%;
  right: -5%;
  bottom: -9px;
  z-index: 5;
  height: 8px;
  border-radius: 2px 2px 6px 6px;
  background: linear-gradient(180deg, #e2c770 0 18%, #756020 34%, #181306 78%);
  box-shadow: 0 9px 13px rgba(0, 0, 0, .72), 0 1px 0 rgba(255, 247, 207, .38);
}

body.collection-page .album-cover > .cover-art,
body.collection-page .album-cover-slot > .cover-art {
  overflow: hidden;
}

body.collection-page .album-card:hover .album-cover::before,
body.collection-page .album-card:focus-within .album-cover::before {
  opacity: .66;
  transform: translateX(2%);
}

body.collection-page .album-country {
  position: absolute;
  top: 13px;
  left: 13px;
  z-index: 6;
  max-width: calc(100% - 26px);
  overflow: hidden;
  border: 1px solid rgba(216, 183, 101, .5);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(5, 5, 4, .76);
  color: #f0d991;
  font: 400 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .09em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
  backdrop-filter: blur(8px);
}

body.collection-page .album-open-cue {
  position: absolute;
  right: 12px;
  bottom: 12px;
  left: 12px;
  z-index: 7;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid #e1c46e;
  border-radius: 11px;
  background: linear-gradient(115deg, #f0d991, #ae842b);
  color: #090805;
  font-size: 13px;
  font-weight: 400;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .24s ease, transform .24s ease;
}

body.collection-page .album-card:hover .album-open-cue,
body.collection-page .album-card:focus-within .album-open-cue {
  opacity: 1;
  transform: none;
}

body.collection-page .album-info {
  position: relative;
  isolation: isolate;
  container-type: inline-size;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 0;
  padding: 14px 2px 0;
  overflow: clip;
}

body.collection-page .album-info strong {
  position: relative;
  z-index: 1;
  display: block;
  font-size: 18px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.collection-page .album-info > :not(.album-year) {
  position: relative;
  z-index: 1;
}

body.collection-page .pressing-identity-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

body.collection-page .pressing-identity-row .pressing-code {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-exkave-theme] body.collection-page .album-info .album-year {
  position: static !important;
  justify-self: end;
  z-index: 1 !important;
  display: block !important;
  max-width: 5ch;
  margin: 0;
  overflow: hidden !important;
  color: #e4bd4f !important;
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 400 !important;
  line-height: 1;
  letter-spacing: -.06em;
  opacity: .42;
  pointer-events: none;
  text-align: right;
  text-shadow: 0 8px 28px rgba(216, 183, 101, .12);
  white-space: nowrap;
}

body.collection-page .drawer-search-field {
  grid-template-columns: 32px minmax(0, 1fr);
}

body.collection-page .drawer-search-field > span {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  font-size: 32px;
  line-height: 1;
}

body.collection-page .fact-value-link {
  color: var(--reprise-paper);
  font-weight: 400;
  text-decoration-color: rgba(216, 183, 101, .58);
  text-underline-offset: 4px;
}

body.collection-page .fact-value-link:hover,
body.collection-page .fact-value-link:focus-visible {
  color: #f0d991;
  text-decoration-color: currentColor;
}

@media (max-width: 1100px) and (min-width: 721px) {
  body.collection-page .crate-row { --crate-columns: 3; }
  body.collection-page .album-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  body.collection-page .album-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 44px 14px;
  }

  body.collection-page .album-info {
    min-height: 0;
    padding-top: 12px;
  }

  body.collection-page .album-open-cue {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.collection-page .album-card,
  body.collection-page .album-cover::before,
  body.collection-page .album-open-cue {
    transition: none;
  }
}
