.book-cover {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  isolation: isolate;
  container-type: inline-size;
  background: var(--cover-paper, #6d28a8);
  color: var(--cover-ink, #27201e);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1;
  text-align: left;
}
.book-cover *, .book-cover *::before, .book-cover *::after { box-sizing: border-box; }
.book-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(90deg, #17101a38, #17101a09 2.3%, #fff3 3.2%, transparent 4.6%);
  box-shadow: inset 0 0 0 1px #24192019;
}
.bc-original img { display: block; width: 100%; height: 100%; object-fit: fill; }
.bc-upload { background: #fffdf6; }
.bc-upload img { display: block; width: 100%; height: 100%; object-fit: contain; }
.bc-mast {
  position: absolute;
  left: 8.2%;
  right: 7%;
  top: 3.4%;
  height: 8%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.bc-mast > span, .bc-foot {
  font: 800 3.45cqw/1 Arial, Helvetica, sans-serif;
  letter-spacing: .13em;
}
.bc-mast img { display: block; width: 17.5cqw; height: 12.5cqw; object-fit: contain; }
.bc-title { position: absolute; inset: 13% 7% auto 8%; z-index: 1; }
.bc-title small, .bc-title strong, .bc-title em { display: block; }
.bc-title strong {
  font-family: "Arial Black", Arial, Helvetica, sans-serif;
  font-weight: 900;
  letter-spacing: -.078em;
}
.bc-title small, .bc-title em { font-family: Georgia, "Times New Roman", serif; font-weight: 500; }
.bc-art { position: absolute; }
.bc-foot {
  position: absolute;
  inset: auto 0 0;
  height: 9.3%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.8cqw;
  background: var(--cover-ink);
  color: var(--cover-paper);
}

/* A sunny number grid with heavy block lines every third square. */
.bc-classic-sudoku { --cover-ink: #2b281e; --cover-paper: #ffcb39; }
.bc-classic-sudoku .bc-title { top: 16%; }
.bc-classic-sudoku .bc-title small { font-size: 13.2cqw; font-style: italic; letter-spacing: -.06em; }
.bc-classic-sudoku .bc-title strong { font-size: 24cqw; line-height: .9; }
.bc-classic-sudoku .bc-art {
  top: 45%; left: 19%; width: 62%; aspect-ratio: 1;
  background: #fff1bf;
  transform: rotate(-7deg);
  box-shadow: 2.5cqw 2.5cqw 0 #c88621;
}
.bc-sudoku-grid {
  display: grid;
  width: 100%; height: 100%;
  grid-template: repeat(9, 1fr) / repeat(9, 1fr);
  border: 1.2cqw solid currentColor;
  box-sizing: border-box;
}
.bc-sudoku-grid b {
  display: grid;
  place-items: center;
  font: 700 4.7cqw/1 Arial, Helvetica, sans-serif;
  border-right: .25cqw solid currentColor;
  border-bottom: .25cqw solid currentColor;
}
.bc-sudoku-grid b:nth-child(3n) { border-right-width: .82cqw; }
.bc-sudoku-grid b:nth-child(n+19):nth-child(-n+27),
.bc-sudoku-grid b:nth-child(n+46):nth-child(-n+54) { border-bottom-width: .82cqw; }
.bc-sudoku-grid b:nth-child(9n) { border-right: none; }
.bc-sudoku-grid b:nth-last-child(-n+9) { border-bottom: none; }

/* A library-club title stacked above a circled word search. */
.bc-word-search-club { --cover-ink: #073f3b; --cover-paper: #62c8ab; }
.bc-word-search-club .bc-mast { color: #073f3b; }
.bc-word-search-club .bc-title { top: 13%; }
.bc-word-search-club .bc-title small { font-size: 9.2cqw; font-style: italic; }
.bc-word-search-club .bc-title strong {
  font: 900 21.8cqw/.78 Georgia, "Times New Roman", serif;
  letter-spacing: -.085em;
}
.bc-word-search-club .bc-title em {
  margin-top: .6cqw;
  padding-right: 6cqw;
  color: #073f3b;
  text-align: right;
  font-size: 14cqw;
  font-style: italic;
  line-height: .9;
  letter-spacing: -.09em;
}
.bc-word-search-club .bc-art { top: 57%; left: 13%; width: 76%; height: 30%; }
.bc-word-grid {
  position: relative;
  width: 100%; height: 100%;
  display: grid;
  grid-template: repeat(6, 1fr) / repeat(7, 1fr);
  transform: rotate(-5deg);
}
.bc-word-grid b {
  display: grid; place-items: center;
  color: #073f3b;
  font: 800 5.3cqw/1 "Courier New", monospace;
}
.bc-word-grid i {
  position: absolute; left: 0;
  width: 57.1429%; height: 16.6%;
  border: 1.15cqw solid #fff3ae;
  border-radius: 9cqw;
}
.bc-word-first { top: 0; }
.bc-word-last { bottom: 0; }

/* A tiled pattern puzzle with one missing piece. */
.bc-logic-lab { --cover-paper: #f47c5e; --cover-ink: #29233c; }
.bc-logic-lab .bc-title { top: 14.8%; }
.bc-logic-lab .bc-title small { font: italic 10.6cqw/1 Georgia, serif; }
.bc-logic-lab .bc-title strong { font-size: 27.4cqw; line-height: .76; }
.bc-logic-lab .bc-title strong span { color: #fff2c3; }
.bc-logic-lab .bc-art { width: 64%; height: 34%; right: 10%; bottom: 13%; }
.bc-logic-grid {
  width: 100%; height: 100%;
  display: grid;
  grid-template: repeat(3, 1fr) / repeat(3, 1fr);
  gap: 1cqw;
  transform: rotate(-4deg);
}
.bc-logic-grid b {
  display: grid; place-items: center; background: #fee4b1;
  border: .7cqw solid var(--cover-ink);
}
.bc-logic-grid i {
  height: 68%; aspect-ratio: 1;
  background: linear-gradient(135deg, #29233c 50%, #ed8763 50%);
  border-radius: 0 0 var(--corner) 0;
  transform: rotate(var(--turn));
}
.bc-logic-grid .bc-missing { color: #ffe8ae; background: #29233c; font: 800 9cqw/1 Georgia, serif; }

/* A real eleven-by-seven maze in a two-color paperback treatment. */
.bc-off-the-beaten-path { --cover-paper: #db6593; --cover-ink: #423047; }
.bc-off-the-beaten-path .bc-title { top: 16%; }
.bc-off-the-beaten-path .bc-title small { font-style: italic; font-size: 11.8cqw; }
.bc-off-the-beaten-path .bc-title strong {
  font: 900 22.8cqw/.83 Georgia, serif;
  letter-spacing: -.09em;
  color: #fff0d0;
  text-shadow: .85cqw .85cqw 0 #423047;
}
.bc-off-the-beaten-path .bc-art { left: 10%; top: 58%; width: 81%; height: 29%; }
.bc-maze-grid {
  --maze-wall: 1.15cqw;
  display: grid;
  width: 100%; height: 100%;
  grid-template: repeat(7, 1fr) / repeat(11, 1fr);
  background: #f4a4bf;
  transform: rotate(-3deg);
}
.bc-maze-grid i { border-color: var(--cover-ink); border-style: solid; }

/* The supplied series template has a cream title field and a smaller author line. */
.bc-template img { display: block; width: 100%; height: 100%; }
.bc-template strong { position: absolute; inset: 74% 5% auto; height: 14%; display: grid; place-items: center; color: #391367; font: italic 800 8.8cqw/1 var(--display); letter-spacing: -.055em; transform: rotate(-2deg); }
.bc-template > span { position: absolute; inset: 91% 24% auto; height: 4.8%; display: grid; place-items: center; background: #300f4c; color: #ffdd62; font: 700 3.8cqw/1 Arial, sans-serif; }

/* A second family of printed jackets, built at the cover's own scale. */
.bc-series {
  --cover-ink: #292130;
  --cover-paper: var(--series-paper);
  --print-paper: #fff1ce;
  background: var(--cover-paper);
  color: var(--cover-ink);
}
.bc-series .bc-mast, .bc-series .bc-foot { text-transform: uppercase; }
.bc-series .bc-mast { top: 3.3%; height: 8.5%; }
.bc-series .bc-foot { color: var(--print-paper); height: 8.5%; font-size: 3.75cqw; }
.bc-series-title {
  position: absolute; z-index: 1; left: 8%; right: 7%; top: 16%;
  color: var(--cover-ink);
  font: 800 var(--series-title-size)/.94 var(--display, Arial, sans-serif);
  letter-spacing: -.06em; text-wrap: balance;
}
.bc-series-art {
  position: absolute; bottom: 11%; left: 8%; width: 84%; height: 30%;
  display: grid; place-items: center; color: var(--cover-ink);
}
.bc-series-art > div { position: relative; transform: rotate(-5deg); }
.bc-edition-1 .bc-series-title { top: auto; bottom: 13.3%; }
.bc-edition-1 .bc-series-art { top: 17%; bottom: auto; }
.bc-edition-1 .bc-series-art > div { transform: rotate(6deg); }
.bc-edition-2 .bc-series-title { font-family: Georgia, "Times New Roman", serif; font-weight: 700; }
.bc-edition-2 .bc-series-art > div { transform: rotate(2deg); }
.bc-series-detective, .bc-series-nonogram { --cover-ink: #352540; }
.bc-series-words, .bc-series-crossword { --cover-ink: #173a35; }
.bc-series-sudoku, .bc-series-kakuro { --cover-ink: #3c2c23; }

/* A case note with a magnifying lens. */
.bc-clue-sheet {
  width: 61%; height: 79%; border: .9cqw solid; background: var(--print-paper);
  box-shadow: 2cqw 2cqw 0 var(--cover-ink);
}
.bc-clue-sheet i {
  position: absolute; left: 11%; top: 15%; width: 50%; height: 60%;
  background: repeating-linear-gradient(0deg, currentColor 0 1cqw, transparent 1cqw 5cqw);
}
.bc-clue-sheet b {
  position: absolute; left: 55%; top: -9%; width: 50%; aspect-ratio: 1;
  background: color-mix(in srgb, var(--series-paper) 58%, var(--print-paper));
  border: 2.3cqw solid; border-radius: 50%;
}
.bc-clue-sheet b::after {
  content: ""; position: absolute; top: 85%; left: 88%;
  width: 3.4cqw; height: 14cqw; border-radius: 2cqw; background: currentColor;
  transform: rotate(-39deg); transform-origin: center top;
}

.bc-number-fragment, .bc-sum-fragment, .bc-letter-tiles, .bc-cross-strip, .bc-sequence { display: grid; }
.bc-number-fragment {
  grid-template: repeat(3,1fr)/repeat(3,1fr); height: 95%; aspect-ratio: 1;
  border: .9cqw solid currentColor; background: var(--print-paper); box-shadow: 1.7cqw 1.7cqw 0 currentColor;
}
.bc-number-fragment b, .bc-cross-strip > *, .bc-letter-tiles b, .bc-sequence b, .bc-sum-fragment > * {
  display: grid; place-items: center;
}
.bc-number-fragment b { border: .3cqw solid; font: 700 6.5cqw/1 var(--body, Arial, sans-serif); }
.bc-letter-tiles { width: 95%; grid-template-columns: repeat(4,1fr); gap: 1.3cqw; }
.bc-letter-tiles b {
  aspect-ratio: .85; border: .8cqw solid; border-radius: 1.9cqw;
  background: var(--print-paper); box-shadow: .6cqw 1.8cqw 0 currentColor;
  font: 700 11.6cqw/1 Georgia, serif;
}
.bc-letter-tiles b:nth-child(2) { transform: translateY(-3.8cqw) rotate(-4deg); }
.bc-letter-tiles b:nth-child(4) { transform: rotate(7deg); }
.bc-sequence { grid-template-columns: repeat(4,1fr); width: 98%; gap: 1.4cqw; }
.bc-sequence b { aspect-ratio: .8; background: var(--print-paper); border: .85cqw solid; font: 700 14cqw/1 Georgia, serif; }
.bc-sequence b:not(:last-child)::before { content: ""; width: 59%; aspect-ratio: 1; background: currentColor; }
.bc-sequence b:first-child::before { border-radius: 50%; }
.bc-sequence b:nth-child(3)::before { clip-path: polygon(50% 0,100% 100%,0 100%); }
.bc-mini-maze {
  font-size: 7.7cqw; width: 7.8em; height: 4.8em;
  background: var(--print-paper); border: .08em solid; box-shadow: .15em .18em 0 currentColor;
}
.bc-mini-maze::before, .bc-mini-maze::after { content: ""; position: absolute; left: .27em; top: .27em; }
.bc-mini-maze::before { width: 1.12em; height: .12em; box-shadow: var(--maze-horizontal); }
.bc-mini-maze::after { width: .12em; height: 1.12em; box-shadow: var(--maze-vertical); }
.bc-cross-strip {
  grid-template-columns: repeat(6,1fr); width: 98%; border: .65cqw solid; background: var(--print-paper);
  box-shadow: 1.2cqw 1.8cqw 0 currentColor;
}
.bc-cross-strip > * { aspect-ratio: .9; border: .4cqw solid; font: 700 7.8cqw/1 Georgia, serif; }
.bc-cross-strip i { color: var(--print-paper); background: var(--cover-ink); border-color: var(--cover-ink); font-size: 3.8cqw; align-items: start; justify-items: start; padding: .8cqw; }
.bc-cross-strip::before, .bc-cross-strip::after { content: ""; position: absolute; width: 16.66%; aspect-ratio: .9; border: .85cqw solid; background: var(--print-paper); }
.bc-cross-strip::before { bottom: 100%; left: 33.33%; }
.bc-cross-strip::after { top: 100%; left: 66.66%; }
.bc-picture-grid {
  font-size: 7cqw; width: 7em; height: 5em; outline: .8cqw solid;
  background: repeating-linear-gradient(90deg, #3b314635 0 .45cqw, transparent .45cqw 7cqw),
    repeating-linear-gradient(0deg, #3b314635 0 .45cqw, transparent .45cqw 7cqw), var(--print-paper);
}
.bc-picture-grid::before { content: ""; position: absolute; width: 1em; height: 1em; box-shadow: var(--picture-pixels); }
.bc-sum-fragment { grid-template: repeat(2,1fr)/repeat(3,1fr); height: 95%; aspect-ratio: 1.5; border: .65cqw solid; background: var(--print-paper); }
.bc-sum-fragment > * { border: .45cqw solid currentColor; }
.bc-sum-fragment i {
  align-items: end; justify-items: start; padding: .75cqw;
  color: var(--print-paper); border-color: var(--cover-ink); font: 700 5.6cqw/1 Arial, sans-serif;
  background: linear-gradient(45deg, transparent 48%, currentColor 49% 51%, transparent 52%), var(--cover-ink);
}
