/* Generated title-card covers, shared by the library and the studio. */
.cover-card {
  --c1: #10172a; --c2: #24345c; --ca: #d8b46a; --ct: #f1ead9;
  position: relative; aspect-ratio: 2 / 3; border-radius: 6px 12px 12px 6px; overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 18%, color-mix(in srgb, var(--ca) 22%, transparent) 0%, transparent 55%),
    linear-gradient(160deg, var(--c2), var(--c1));
  color: var(--ct);
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: 14% 10% 12%;
  text-align: center;
  box-shadow: inset 6px 0 10px -6px #0008, inset 0 0 0 1px #ffffff14, 0 10px 30px -10px #000a;
  font-family: 'EB Garamond', Georgia, serif;
  container-type: inline-size;
}
.cover-card::before {
  content: ''; position: absolute; inset: 5%; border: 1px solid color-mix(in srgb, var(--ca) 45%, transparent); border-radius: 3px; pointer-events: none;
}
.cover-card .cg { color: var(--ca); font-size: 11cqw; line-height: 1; }
.cover-card .ct { font-size: 12.5cqw; line-height: 1.05; font-weight: 500; letter-spacing: .02em; text-wrap: balance; overflow-wrap: anywhere; }
.cover-card .cr { width: 30%; height: 1px; background: var(--ca); opacity: .7; margin: 6% auto; }
.cover-card .ca { font-size: 6.5cqw; font-style: italic; opacity: .8; min-height: 1.2em; }

.cover-card[data-theme='ember']     { --c1: #1f0b07; --c2: #5a1f12; --ca: #f0a35e; --ct: #fbe9dc; }
.cover-card[data-theme='forest']    { --c1: #07150f; --c2: #1a4231; --ca: #9fe0a8; --ct: #e7f3ea; }
.cover-card[data-theme='ocean']     { --c1: #07131f; --c2: #154a66; --ca: #7fd3e6; --ct: #e3f3f7; }
.cover-card[data-theme='rose']      { --c1: #1f0a15; --c2: #57203d; --ca: #f2a7c3; --ct: #fbe7ef; }
.cover-card[data-theme='parchment'] { --c1: #cdb98f; --c2: #f1e7d0; --ca: #8a5a2b; --ct: #33261a; }

/* An uploaded cover image: the picture fills the card, the title and author stay on top.
   A soft shade at the top and bottom keeps the text readable on any picture. */
.cover-card.has-image {
  background:
    linear-gradient(to bottom, #000000b3 0%, #00000040 30%, #00000000 50%, #00000040 72%, #000000b3 100%),
    var(--img) center / cover no-repeat,
    linear-gradient(160deg, var(--c2), var(--c1));
  --ct: #fff;
}
.cover-card.has-image .cg { display: none; } /* title at the top, author at the bottom, the picture in between */
.cover-card.has-image .cr { visibility: hidden; }
.cover-card.has-image .ct, .cover-card.has-image .ca { text-shadow: 0 1px 2px #000c, 0 0 18px #0009; }
.cover-card.has-image::before { border-color: #ffffff30; }
