/* CAPP MEDIA2 — curated release covers. Reuse AppKit/Guidebook theme variables. */
body[data-capp-guidebook-library="1"] .cgl-cover-image,
body[data-capp-guidebook-library="1"] .cgl-detail-cover {
 display:block;width:100%;object-fit:cover;object-position:center;
 border-radius:16px;background:var(--gb-surface-soft);border:1px solid var(--gb-line);
}
body[data-capp-guidebook-library="1"] .cgl-cover-image{aspect-ratio:16/9;margin-bottom:3px}
body[data-capp-guidebook-library="1"] .cgl-detail-cover{aspect-ratio:16/9;max-height:390px;margin-bottom:20px;border-radius:20px}
body[data-capp-library-view="manage"] .clm-cover-image{
 width:100%;max-width:420px;aspect-ratio:16/9;object-fit:cover;
 display:block;border-radius:13px;border:1px solid var(--gb-line);background:var(--gb-surface-soft);
}
body[data-capp-library-view="manage"] .clm-item>.clm-cover-image{max-width:none;width:100%;margin:0 0 2px}
body[data-capp-library-view="manage"] .clm-cover-gallery{
 display:grid;grid-template-columns:repeat(auto-fill,minmax(126px,1fr));gap:10px;
 padding:9px 0 14px;max-height:min(50vh,400px);overflow-y:auto;
}
body[data-capp-library-view="manage"] .clm-cover-gallery .clm-cover-pick{
 appearance:none;display:flex;flex-direction:column;gap:5px;
 min-width:0;min-height:44px;padding:6px;border:1px solid var(--gb-line);
 border-radius:13px;background:var(--gb-surface);color:var(--gb-text);
 cursor:pointer;font-size:12px;font-weight:750;
}
body[data-capp-library-view="manage"] .clm-cover-pick img{
 width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:9px;
}
body[data-capp-library-view="manage"] .clm-cover-upload{
 display:block;width:100%;min-height:44px;margin-top:7px;
 padding:10px;border-radius:12px;border:1px solid var(--gb-line);
 color:var(--gb-text);background:var(--gb-surface);
}
body[data-capp-library-view="manage"] .clm-cover-gallery button:focus-visible,
body[data-capp-library-view="manage"] .clm-cover-upload:focus-visible{
 outline:2px solid var(--gb-primary);outline-offset:3px;
}
@media(max-width:420px){body[data-capp-library-view="manage"] .clm-cover-gallery{grid-template-columns:repeat(2,minmax(0,1fr));}}

/* CAPP_MEDIA2_CARD_COVER1 — replace the decorative hero with the actual cover.
 * The decorative hero remains if there is no published cover. */
body[data-capp-guidebook-library="1"] .cgl-card > .cgl-cover-image + .cgl-card-top {
  position:absolute!important;
  top:32px!important;right:32px!important;bottom:auto!important;left:auto!important;
  z-index:3!important;width:auto!important;height:auto!important;
  min-height:0!important;max-height:none!important;min-width:0!important;
  margin:0!important;padding:0!important;border:0!important;
  border-radius:0!important;box-shadow:none!important;
  background:transparent!important;background-image:none!important;
  transform:none!important;overflow:visible!important;
  display:flex!important;justify-content:flex-end!important;align-items:center!important;
  gap:0!important;
}
body[data-capp-guidebook-library="1"] .cgl-card > .cgl-cover-image + .cgl-card-top::before,
body[data-capp-guidebook-library="1"] .cgl-card > .cgl-cover-image + .cgl-card-top::after {
  content:none!important;display:none!important;
}
body[data-capp-guidebook-library="1"] .cgl-card > .cgl-cover-image + .cgl-card-top .cgl-card-icon {
  display:none!important;
}
body[data-capp-guidebook-library="1"] .cgl-card > .cgl-cover-image + .cgl-card-top .cgl-pill {
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  min-height:39px!important;margin:0!important;padding:8px 13px!important;
  border:1px solid rgba(34,29,243,.10)!important;border-radius:999px!important;
  background:#fff!important;color:#221df3!important;
  box-shadow:0 6px 18px rgba(11,19,44,.12)!important;
  font-size:12px!important;line-height:1.2!important;font-weight:850!important;
  white-space:nowrap!important;
}
@media (max-width:640px) {
  body[data-capp-guidebook-library="1"] .cgl-card > .cgl-cover-image + .cgl-card-top {
    top:29px!important;right:29px!important;
  }
}
