/* The print keeps its original caption; the index below it opens a closer view. */
#albumCaption { margin-block: .5rem; }
.album-cue {
  margin: .6rem auto;
  max-width: 34em;
  color: var(--quiet);
  font-size: .9rem;
}
#albumPieces {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 8rem), 1fr));
  gap: .45rem;
  margin: .65rem .4rem .9rem;
}
#albumPieces button {
  min-width: 0;
  min-height: 44px;
  padding: .5rem;
  overflow-wrap: anywhere;
  color: var(--chapter);
  border-bottom: 2px solid var(--ribbon);
}

/* A numbered insert record on album stock, with one velvet bed for the mount. */
#albumDetail {
  width: min(30rem, calc(100% - 1.5rem));
  max-height: calc(100vh - 1.5rem);
  max-height: calc(100dvh - max(.75rem, env(safe-area-inset-top)) - max(.75rem, env(safe-area-inset-bottom)));
  overflow: auto;
  overscroll-behavior: contain;
  padding: clamp(.75rem, 3vw, 1.25rem);
  color: var(--ink);
  background: var(--leaf) var(--album-stock) center / cover;
  border: 3px double var(--rule);
  border-radius: 3px 12px 3px 3px;
  box-shadow: 0 10px 36px #211a2352;
  overflow-wrap: anywhere;
}
#albumDetail::backdrop { background: #211e26bd; }
#albumDetail header .eyebrow { color: var(--quiet); }
#detailTitle { margin: .25rem 0 .65rem; }
.detail-plate {
  padding: .35rem;
  background: #302e30 url('daylight/pile.jpg') center / cover;
  border: 1px solid var(--rule);
  box-shadow: inset 0 0 0 2px #302a26;
}
#detailMount {
  display: block;
  width: 100%;
  height: auto;
  max-height: 34vh;
  object-fit: contain;
}
#detailGradesTitle { margin: .75rem 0 .25rem; }
#detailGrades {
  margin: 0 0 .65rem;
  padding-inline-start: 1.6rem;
  list-style: decimal-leading-zero;
  font-size: .94rem;
}
#detailGrades li {
  padding: .2rem .15rem;
  border-bottom: 1px solid var(--rule);
}
#detailGrades canvas { width:36px; height:36px; margin-inline-end:.55rem; vertical-align:middle; }
#detailGrades li::marker { font: italic .83rem Georgia, serif; color: var(--chapter); }
#closeDetail {
  width: 100%;
  min-height: 44px;
  color: var(--leaf);
  background: var(--chapter);
  border-color: var(--chapter);
}
@media (prefers-reduced-motion: no-preference) {
  #albumDetail[open] { animation: album-detail-appear 140ms ease-out; }
  @keyframes album-detail-appear { from { opacity: .8; } to { opacity: 1; } }
}
