/*
 * Website-owned cover presentation.
 *
 * This is ordinary, hand-maintained Hugo source. It is not generated from the
 * Saga cover designer. Keep the explicit Book × Light/Dark profile blocks so
 * an AI-assisted import can translate a copied Studio recipe deliberately.
 */

/* Layered mainline renderer. */
.book-page {
  --book-cover-border: color-mix(in srgb, currentColor 28%, transparent);
}

.book-cover-stage {
  --book-cover-source-width: 5;
  --book-cover-source-height: 8;
  --book-cover-visible-height: 8;
  --book-cover-crop-bottom: 0;
  --book-cover-crop-shift-y: 0cqi;
  --book-cover-image-offset-y: 0;
  --artwork-brightness: 1;
  --profile-title-font: "Vollkorn", serif;
  --profile-title-weight: 700;
  --profile-title-size: 14cqi;
  --profile-title-scale-x: 1;
  --profile-title-top: 104cqi;
  --title-font: var(--profile-title-font);
  --title-weight: var(--profile-title-weight);
  --title-size: var(--localized-title-size-light, var(--profile-title-size));
  --title-scale-x: var(--localized-title-scale-x-light, var(--profile-title-scale-x));
  --title-top: var(--localized-title-top-light, var(--profile-title-top));
  --cover-volume-size: var(--localized-volume-size-light, var(--volume-size));
  --title-origin: center top;
  --title-line-items: center;
  --title-leading: 0.77;
  --title-line-count: 2;
  --title-line-gap: 0.4;
  --title-block-height: calc(var(--title-size) * (var(--title-line-count) * var(--title-leading) + (var(--title-line-count) - 1) * var(--title-line-gap)));
  --title-tracking: -0.035em;
  --title-left: 5cqi;
  --title-width: 90cqi;
  --title-align: center;
  --saga-color: #f2eadb;
  --volume-number-color: #9a7440;
  --volume-color: #9a7440;
  --title-color: #f2eadb;
  --highlight-color: #d8a36c;
  --book-number-color: #f2eadb;
  --byline-color: #f2eadb;
  --upper-overlay: none;
  --lower-overlay: none;

  container-type: inline-size;
  isolation: isolate;
  position: relative;
  box-sizing: border-box;
  width: 100%;
  /* Mainline profiles replace the full-canvas fallback with their shortened
     source-pixel presentation ratio. */
  aspect-ratio: var(--book-cover-source-width) / var(--book-cover-visible-height);
  overflow: hidden;
  background: #d7d0c3;
  box-shadow: 0 0.35rem 1rem rgb(0 0 0 / 0.14);
  color: var(--title-color);
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}

.book-cover-stage::before {
  position: absolute;
  z-index: 3;
  inset: 0;
  box-sizing: border-box;
  content: "";
  background:
    linear-gradient(var(--book-cover-border) 0 0)
      top / 100% 2px no-repeat,
    linear-gradient(var(--book-cover-border) 0 0)
      bottom / 100% var(--book-cover-bottom-border-height, 2px) no-repeat,
    linear-gradient(var(--book-cover-border) 0 0)
      left / 2px 100% no-repeat,
    linear-gradient(var(--book-cover-border) 0 0)
      right / 2px 100% no-repeat;
  filter: brightness(var(--book-cover-border-brightness, 1));
  pointer-events: none;
}

/* Attached actions supply the frame's lower edge. Shadow each complete block
   so the artwork's shadow cannot darken the action at their seam. */
:is(.book-page__cover--with-action, .home-banner__link) {
  box-shadow: 0 0.35rem 1rem rgb(0 0 0 / 0.14);
}

:is(.book-page__cover--with-action .book-cover-stage, .home-banner__link .home-cover-stage) {
  --book-cover-bottom-border-height: 0px;
  box-shadow: none;
}

.book-cover__picture,
.book-cover__read-link {
  position: absolute;
  z-index: 0;
  inset: 0;
  display: block;
  margin: 0;
  overflow: hidden;
  line-height: 0;
}

.book-cover__picture {
  width: 100%;
  height: 100%;
}

.book-cover__art {
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
  filter: brightness(var(--artwork-brightness));
  /* Percentage translation is relative to the image's own height, preserving
     the recovered source-pixel offset at every rendered width. */
  transform: translateY(
    calc(
      var(--book-cover-image-offset-y) * 100% /
        var(--book-cover-source-height)
    )
  );
}

.book-cover__read-link:focus-visible {
  outline-color: var(--action-focus);
  outline-offset: -5px;
}

.book-page__cover:has(.book-cover__read-link:is(:hover, :focus-visible))
  .book-page__cover-action .action {
  background: var(--action-hover-background);
  color: var(--action-hover-color);
}

.cover__header-shade,
.cover__shade {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.cover__header-shade {
  height: 34cqi;
  background: var(--upper-overlay);
}

.cover__shade {
  background: var(--lower-overlay);
}

.book-cover__copy {
  position: absolute;
  z-index: 2;
  inset: 0;
  margin: 0;
  pointer-events: none;
}

.cover__series,
.cover__volume,
.cover__title,
.cover__byline {
  position: absolute;
  margin: 0;
  padding: 0;
  border: 0;
  text-shadow: 0 0.05em 0.12em rgb(0 0 0 / 0.22);
}

.cover__series {
  top: var(--series-top);
  right: var(--series-right);
  left: var(--series-left);
  color: var(--saga-color);
  font-family: var(--series-font-family);
  font-size: var(--series-size);
  font-weight: var(--series-font-weight);
  letter-spacing: var(--series-tracking);
  line-height: var(--series-line-height);
  text-align: var(--series-text-align);
  text-transform: var(--series-text-transform);
  white-space: nowrap;
}

.cover__volume {
  top: var(--volume-top);
  right: var(--volume-right);
  left: var(--volume-left);
  font-family: var(--volume-font-family);
  font-size: var(--cover-volume-size);
  font-weight: var(--volume-font-weight);
  letter-spacing: var(--volume-tracking);
  line-height: var(--volume-line-height);
  text-align: var(--volume-text-align);
  text-transform: var(--volume-text-transform);
  white-space: nowrap;
}

.cover__volume-number,
.cover__volume-separator {
  color: var(--volume-number-color);
}

.cover__volume-title {
  color: var(--volume-color);
}

.cover__title {
  display: flex;
  flex-direction: column;
  align-items: var(--title-line-items);
  justify-content: center;
  /* Previously inherited from the global h1 rule; part of the locked cover fit. */
  gap: calc(1em * var(--title-line-gap));
  /* Apply the website crop shift, then raise only titles that need room above
     the book/author lockup. Font sizes and recorded positions stay intact. */
  top: min(
    calc(var(--title-top) - var(--book-cover-crop-shift-y)),
    calc(100% - var(--byline-bottom) - var(--byline-height) - 7.4cqi - var(--title-block-height))
  );
  left: var(--title-left);
  width: var(--title-width);
  color: var(--title-color);
  font-family: var(--title-font);
  font-size: var(--title-size);
  font-weight: var(--title-weight);
  letter-spacing: var(--title-tracking);
  line-height: var(--title-leading);
  text-align: var(--title-align);
  text-transform: uppercase;
}

.cover__title .title-line {
  display: block;
  width: max-content;
  white-space: nowrap;
  transform: scaleX(var(--title-scale-x));
  transform-origin: var(--title-origin);
}

.cover__title .title-word {
  display: inline;
}

.cover__title :is(.is-highlighted, .is-highlighted-light) {
  color: var(--highlight-color);
}

.cover__title .is-highlighted-dark {
  color: var(--title-color);
}

.cover__byline {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(1em * var(--byline-gap));
  white-space: nowrap;
  right: var(--byline-right);
  bottom: var(--byline-bottom);
  left: var(--byline-left);
  color: var(--byline-color);
  font-family: var(--byline-font-family);
  font-size: var(--byline-size);
  font-weight: var(--byline-font-weight);
  letter-spacing: var(--byline-tracking);
  line-height: var(--byline-line-height);
  text-align: var(--byline-text-align);
  text-transform: var(--byline-text-transform);
}

.cover__book-number {
  color: var(--book-number-color);
  font-size: calc(1em * var(--byline-book-scale));
}

/* Homepage crop and presentation remain website-owned. */
.home-banner {
  margin: 0;
  line-height: 0;
}

.home-banner__link {
  isolation: isolate;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  color: inherit;
  text-decoration: none;
}

.home-banner__link:focus-visible {
  outline-color: var(--action-focus);
  outline-offset: -4px;
}

.home-cover-stage {
  grid-row: 1;
  grid-column: 1;
}

.home-cover-stage .cover__series {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
}

.home-page__cover .book-cover-stage.home-cover-stage {
  --book-cover-visible-height: var(--home-cover-visible-height);
  --book-cover-crop-bottom: calc(
    var(--book-cover-source-height) - var(--home-cover-visible-height)
  );
  --book-cover-image-offset-y: var(--home-cover-image-offset-y);
}

.home-cover-stage::before {
  --book-cover-border-brightness: var(--home-cover-border-brightness);
}

.home-cover__tagline {
  color: var(--volume-color);
}

/* The homepage action stays attached to its cover frame. */
.home-banner__action {
  grid-row: 2;
  grid-column: 1;
  position: relative;
  padding-block-end: calc(0.7rem + 2px);
  border: 0;
}

/* Paint the remaining edges of the shared homepage cover frame. */
.home-banner__action::before {
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  content: "";
  background:
    linear-gradient(var(--action-border) 0 0)
      bottom / 100% 2px no-repeat,
    linear-gradient(var(--action-border) 0 0)
      left / 2px 100% no-repeat,
    linear-gradient(var(--action-border) 0 0)
      right / 2px 100% no-repeat;
  pointer-events: none;
}

.home-banner__link:hover .home-banner__action {
  background: var(--action-hover-background);
  color: var(--action-hover-color);
}

/* Book-page actions continue the cover frame without a top edge. */
.book-page__cover-action .action {
  border-color: var(--action-border);
  background: var(--action-background);
  color: var(--action-color);
}

.book-page__cover-action .release-status__label {
  color: inherit;
}

@media (prefers-color-scheme: dark) {
  :is(.book-page__cover--with-action, .home-banner__link) {
    box-shadow: 0 0.45rem 1.2rem rgb(0 0 0 / 0.42);
  }

  .book-cover-stage {
    --title-size: var(--localized-title-size-dark, var(--profile-title-size));
    --title-scale-x: var(--localized-title-scale-x-dark, var(--profile-title-scale-x));
    --title-top: var(--localized-title-top-dark, var(--profile-title-top));
    --cover-volume-size: var(--localized-volume-size-dark, var(--volume-size));
    background-color: #070706;
    box-shadow: 0 0.45rem 1.2rem rgb(0 0 0 / 0.42);
  }

  .cover__title :is(.is-highlighted, .is-highlighted-dark) {
    color: var(--highlight-color);
  }

  .cover__title .is-highlighted-light {
    color: var(--title-color);
  }

}

@media (max-width: 712px) {
  .book-cover-stage::before {
    background:
      linear-gradient(var(--book-cover-border) 0 0)
        top / 100% 2px no-repeat,
      linear-gradient(var(--book-cover-border) 0 0)
        bottom / 100% var(--book-cover-bottom-border-height, 2px) no-repeat;
  }

  .book-page__cover-action .action {
    border-inline-width: 0;
  }

  .home-banner__action::before {
    background:
      linear-gradient(var(--action-border) 0 0)
        bottom / 100% 2px no-repeat;
  }
}

@media print {
  .book-cover-stage {
    box-shadow: none;
  }

  :is(.book-page__cover--with-action, .home-banner__link) {
    box-shadow: none;
  }
}

/* The Art of Being Struck remains an independent, already typeset cover. */
.book-taobs .book-cover-stage {
  --book-cover-border: #938878;

  aspect-ratio: 3 / 4;
  background: #ded7c8;
}

.book-page.book-taobs .book-page__cover {
  --action-background: #5A5650;
  --action-color: #E4DDD0;
  --action-hover-background: color-mix(in srgb, #5A5650 84%, #000000);
  --action-hover-color: #E4DDD0;
  --action-focus: #5A5650;
  --action-border: #938878;
}

.book-taobs .book-cover__copy h1 {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (prefers-color-scheme: dark) {
  .book-taobs .book-cover-stage {
    --book-cover-border: #857969;

    background: #181713;
  }

  .book-page.book-taobs .book-page__cover {
    --action-background: #575651;
    --action-color: #E4DDD0;
    --action-hover-background: color-mix(in srgb, #575651 84%, #000000);
    --action-hover-color: #E4DDD0;
    --action-focus: #938878;
    --action-border: #857969;
  }
}

/* Website-owned profile values. */

.book-cover-stage {
  --series-font-family: "Noto Sans", system-ui, sans-serif;
  --series-font-weight: 700;
  --series-size: 6.2cqi;
  --series-line-height: 1;
  --series-tracking: 0.035em;
  --series-text-transform: uppercase;
  --series-text-align: center;
  --series-top: 4cqi;
  --series-left: 7cqi;
  --series-right: 7cqi;
  --volume-font-family: "Noto Sans", system-ui, sans-serif;
  --volume-font-weight: 700;
  --volume-size: 4cqi;
  --volume-line-height: 1;
  --volume-tracking: 0.14em;
  --volume-text-transform: uppercase;
  --volume-text-align: center;
  --volume-top: 12.6cqi;
  --volume-left: 7cqi;
  --volume-right: 7cqi;
  --byline-font-family: "Noto Sans", system-ui, sans-serif;
  --byline-font-weight: 700;
  --byline-size: 4.6cqi;
  --byline-book-scale: 0.7;
  --byline-gap: 0.35;
  --byline-height: calc(var(--byline-size) * (var(--byline-line-height) * (1 + var(--byline-book-scale)) + var(--byline-gap)));
  --byline-line-height: 1;
  --byline-tracking: 0.14em;
  --byline-text-transform: uppercase;
  --byline-text-align: center;
  --byline-bottom: 7cqi;
  --byline-left: 7cqi;
  --byline-right: 7cqi;
}

.book-cover-stage[data-book="1"] {
  --book-cover-source-width: 990;
  --book-cover-source-height: 1584;
  --book-cover-visible-height: 1484;
  --book-cover-crop-bottom: 100;
  --book-cover-crop-shift-y: 10.101cqi;
  --book-cover-image-offset-y: -80;
  --book-cover-border-brightness: 1;
  --artwork-brightness: 1.1;
  --profile-title-font: "Vollkorn", serif;
  --profile-title-weight: 700;
  --profile-title-size: 15.29cqi;
  --profile-title-scale-x: 1;
  --title-origin: center top;
  --title-line-items: center;
  --title-leading: 0.8;
  --title-tracking: -0.02em;
  --profile-title-top: 113.47cqi;
  --title-left: 5cqi;
  --title-width: 90cqi;
  --title-align: center;
  --saga-color: #241D18;
  --volume-number-color: #8F361F;
  --volume-color-light: #2F5137;
  --volume-color-dark: #C8DEA0;
  --volume-color: var(--volume-color-light);
  --book-cover-border: #C8DEA0;
  --title-color: #FFF3DC;
  --highlight-color: #C8DEA0;
  --book-number-color: #FFF3DC;
  --byline-color: #FFF3DC;
  --upper-overlay: linear-gradient(to bottom, rgb(242 234 219 / 0.86), rgb(242 234 219 / 0.46) 54%, transparent 100%);
  --lower-overlay: linear-gradient(to top, rgb(20 19 16 / 0.68), rgb(20 19 16 / 0.22) 42%, transparent 62%);
}

.book-cover-stage[data-book="2"] {
  --book-cover-source-width: 990;
  --book-cover-source-height: 1584;
  --book-cover-visible-height: 1484;
  --book-cover-crop-bottom: 100;
  --book-cover-crop-shift-y: 10.101cqi;
  --book-cover-image-offset-y: -20;
  --book-cover-border-brightness: 1;
  --artwork-brightness: 1.15;
  --profile-title-font: "Vollkorn", serif;
  --profile-title-weight: 700;
  --profile-title-size: 18.80cqi;
  --profile-title-scale-x: 1;
  --title-origin: center top;
  --title-line-items: center;
  --title-leading: 0.75;
  --title-tracking: -0.045em;
  --profile-title-top: 104cqi;
  --title-left: 5cqi;
  --title-width: 90cqi;
  --title-align: center;
  --saga-color: #241D18;
  --volume-number-color: #8F361F;
  --volume-color-light: #2F5137;
  --volume-color-dark: #C8DEA0;
  --volume-color: var(--volume-color-light);
  --book-cover-border: #C8DEA0;
  --title-color: #FFF3DC;
  --highlight-color: #C8DEA0;
  --book-number-color: #FFF3DC;
  --byline-color: #FFF3DC;
  --upper-overlay: linear-gradient(to bottom, rgb(242 234 219 / 0.86), rgb(242 234 219 / 0.46) 54%, transparent 100%);
  --lower-overlay: linear-gradient(to top, rgb(20 19 16 / 0.68), rgb(20 19 16 / 0.22) 42%, transparent 62%);
}

.book-cover-stage[data-book="3"] {
  --book-cover-source-width: 990;
  --book-cover-source-height: 1584;
  --book-cover-visible-height: 1484;
  --book-cover-crop-bottom: 100;
  --book-cover-crop-shift-y: 10.101cqi;
  --book-cover-image-offset-y: -80;
  --book-cover-border-brightness: 1;
  --artwork-brightness: 1;
  --profile-title-font: "Vollkorn", serif;
  --profile-title-weight: 700;
  --profile-title-size: 18.02cqi;
  --profile-title-scale-x: 1;
  --title-origin: center top;
  --title-line-items: center;
  --title-leading: 0.75;
  --title-tracking: -0.045em;
  --profile-title-top: 104cqi;
  --title-left: 5cqi;
  --title-width: 90cqi;
  --title-align: center;
  --saga-color: #1F2821;
  --volume-number-color: #6F4E28;
  --volume-color-light: #34593C;
  --volume-color-dark: #B8D49A;
  --volume-color: var(--volume-color-light);
  --book-cover-border: #B8D49A;
  --title-color: #FFF3DC;
  --highlight-color: #F0C96A;
  --book-number-color: #FFF3DC;
  --byline-color: #FFF3DC;
  --upper-overlay: linear-gradient(to bottom, rgb(242 234 219 / 0.86), rgb(242 234 219 / 0.46) 54%, transparent 100%);
  --lower-overlay: linear-gradient(to top, rgb(18 32 24 / 0.68), rgb(18 32 24 / 0.22) 42%, transparent 62%);
}

.book-cover-stage[data-book="4"] {
  --book-cover-source-width: 990;
  --book-cover-source-height: 1584;
  --book-cover-visible-height: 1484;
  --book-cover-crop-bottom: 100;
  --book-cover-crop-shift-y: 10.101cqi;
  --book-cover-image-offset-y: -70;
  --book-cover-border-brightness: 1;
  --artwork-brightness: 1.1;
  --profile-title-font: "Vollkorn", serif;
  --profile-title-weight: 700;
  --profile-title-size: 17.95cqi;
  --profile-title-scale-x: 1;
  --title-origin: center top;
  --title-line-items: center;
  --title-leading: 0.75;
  --title-tracking: -0.045em;
  --profile-title-top: 99cqi;
  --title-left: 5cqi;
  --title-width: 90cqi;
  --title-align: center;
  --saga-color: #1F2821;
  --volume-number-color: #6F4E28;
  --volume-color-light: #34593C;
  --volume-color-dark: #B8D49A;
  --volume-color: var(--volume-color-light);
  --book-cover-border: #B8D49A;
  --title-color: #FFF3DC;
  --highlight-color: #F0C96A;
  --book-number-color: #FFF3DC;
  --byline-color: #FFF3DC;
  --upper-overlay: linear-gradient(to bottom, rgb(242 234 219 / 0.86), rgb(242 234 219 / 0.46) 54%, transparent 100%);
  --lower-overlay: linear-gradient(to top, rgb(18 32 24 / 0.68), rgb(18 32 24 / 0.22) 42%, transparent 62%);
}

.book-cover-stage[data-book="5"] {
  --book-cover-source-width: 990;
  --book-cover-source-height: 1584;
  --book-cover-visible-height: 1484;
  --book-cover-crop-bottom: 100;
  --book-cover-crop-shift-y: 10.101cqi;
  --book-cover-image-offset-y: -100;
  --book-cover-border-brightness: 1;
  --artwork-brightness: 1.15;
  --profile-title-font: "Vollkorn", serif;
  --profile-title-weight: 700;
  --profile-title-size: 14cqi;
  --profile-title-scale-x: 0.88;
  --title-origin: center top;
  --title-line-items: center;
  --title-leading: 0.8;
  --title-tracking: -0.02em;
  --profile-title-top: 111cqi;
  --title-left: 5cqi;
  --title-width: 90cqi;
  --title-align: center;
  --saga-color: #1F2821;
  --volume-number-color: #6F4E28;
  --volume-color-light: #34593C;
  --volume-color-dark: #B8D49A;
  --volume-color: var(--volume-color-light);
  --book-cover-border: #B8D49A;
  --title-color: #FFF3DC;
  --highlight-color: #F0C96A;
  --book-number-color: #FFF3DC;
  --byline-color: #FFF3DC;
  --upper-overlay: linear-gradient(to bottom, rgb(242 234 219 / 0.86), rgb(242 234 219 / 0.46) 54%, transparent 100%);
  --lower-overlay: linear-gradient(to top, rgb(18 32 24 / 0.68), rgb(18 32 24 / 0.22) 42%, transparent 62%);
}

.book-cover-stage[data-book="6"] {
  --book-cover-source-width: 990;
  --book-cover-source-height: 1584;
  --book-cover-visible-height: 1484;
  --book-cover-crop-bottom: 100;
  --book-cover-crop-shift-y: 10.101cqi;
  --book-cover-image-offset-y: -100;
  --book-cover-border-brightness: 1;
  --artwork-brightness: 1.15;
  --profile-title-font: "Vollkorn", serif;
  --profile-title-weight: 700;
  --profile-title-size: 14cqi;
  --profile-title-scale-x: 0.94;
  --title-origin: center top;
  --title-line-items: center;
  --title-leading: 0.84;
  --title-tracking: 0;
  --profile-title-top: 99cqi;
  --title-left: 5cqi;
  --title-width: 90cqi;
  --title-align: center;
  --saga-color: #2B1730;
  --volume-number-color: #7A3F2D;
  --volume-color-light: #54315F;
  --volume-color-dark: #D9BCE3;
  --volume-color: var(--volume-color-light);
  --book-cover-border: #D9BCE3;
  --title-color: #FFF0F8;
  --highlight-color: #F3B46C;
  --book-number-color: #FFF0F8;
  --byline-color: #FFF0F8;
  --upper-overlay: linear-gradient(to bottom, rgb(242 234 219 / 0.86), rgb(242 234 219 / 0.46) 54%, transparent 100%);
  --lower-overlay: linear-gradient(to top, rgb(37 18 42 / 0.9), rgb(37 18 42 / 0.38) 44%, transparent 64%);
}

.book-cover-stage[data-book="7"] {
  --book-cover-source-width: 990;
  --book-cover-source-height: 1584;
  --book-cover-visible-height: 1484;
  --book-cover-crop-bottom: 100;
  --book-cover-crop-shift-y: 10.101cqi;
  --book-cover-image-offset-y: 0;
  --book-cover-border-brightness: 1;
  --artwork-brightness: 1.15;
  --profile-title-font: "Vollkorn", serif;
  --profile-title-weight: 700;
  --profile-title-size: 22cqi;
  --profile-title-scale-x: 1;
  --title-origin: center top;
  --title-line-items: center;
  --title-leading: 0.75;
  --title-tracking: -0.045em;
  --profile-title-top: 104cqi;
  --title-left: 5cqi;
  --title-width: 90cqi;
  --title-align: center;
  --saga-color: #2B1730;
  --volume-number-color: #7A3F2D;
  --volume-color-light: #54315F;
  --volume-color-dark: #D9BCE3;
  --volume-color: var(--volume-color-light);
  --book-cover-border: #D9BCE3;
  --title-color: #FFF0F8;
  --highlight-color: #F3B46C;
  --book-number-color: #FFF0F8;
  --byline-color: #FFF0F8;
  --upper-overlay: linear-gradient(to bottom, rgb(242 234 219 / 0.86), rgb(242 234 219 / 0.46) 54%, transparent 100%);
  --lower-overlay: linear-gradient(to top, rgb(37 18 42 / 0.9), rgb(37 18 42 / 0.38) 44%, transparent 64%);
}

/* Book 8's Rishi-red frame is a website-only decision in both themes. */
.book-cover-stage[data-book="8"] {
  --book-cover-source-width: 990;
  --book-cover-source-height: 1584;
  --book-cover-visible-height: 1484;
  --book-cover-crop-bottom: 100;
  --book-cover-crop-shift-y: 10.101cqi;
  --book-cover-image-offset-y: -70;
  --book-cover-border-brightness: 1.5;
  --artwork-brightness: 1.20;
  --profile-title-font: "Vollkorn", serif;
  --profile-title-weight: 700;
  --profile-title-size: 14cqi;
  --profile-title-scale-x: 1;
  --title-origin: center top;
  --title-line-items: center;
  --title-leading: 0.8;
  --title-tracking: -0.02em;
  --profile-title-top: 111cqi;
  --title-left: 5cqi;
  --title-width: 90cqi;
  --title-align: center;
  --saga-color: #F0A367;
  --volume-number-color: #FFB277;
  --volume-color-light: #D6E3C3;
  --volume-color-dark: #F1D9B8;
  --volume-color: var(--volume-color-light);
  --book-cover-border: #C73E1D;
  --title-color: #F0A367;
  --highlight-color: #B7CCA7;
  --book-number-color: #F0A367;
  --byline-color: #F0A367;
  --upper-overlay: linear-gradient(to bottom, rgb(27 13 7 / 0.84), rgb(27 13 7 / 0.4) 54%, transparent 100%);
  --lower-overlay: linear-gradient(to top, rgb(45 23 13 / 0.58), rgb(45 23 13 / 0.18) 40%, transparent 60%);
}

.book-cover-stage[data-book="9"] {
  --book-cover-source-width: 990;
  --book-cover-source-height: 1584;
  --book-cover-visible-height: 1484;
  --book-cover-crop-bottom: 100;
  --book-cover-crop-shift-y: 10.101cqi;
  --book-cover-image-offset-y: 0;
  --book-cover-border-brightness: 1.5;
  --artwork-brightness: 1.20;
  --profile-title-font: "Vollkorn", serif;
  --profile-title-weight: 700;
  --profile-title-size: 16.78cqi;
  --profile-title-scale-x: 1;
  --title-origin: center top;
  --title-line-items: center;
  --title-leading: 0.75;
  --title-tracking: -0.045em;
  --profile-title-top: 111cqi;
  --title-left: 5cqi;
  --title-width: 90cqi;
  --title-align: center;
  --saga-color: #FFF1DC;
  --volume-number-color: #B8D889;
  --volume-color-light: #E8C99F;
  --volume-color-dark: #F1D9B8;
  --volume-color: var(--volume-color-light);
  --book-cover-border: #006B3C;
  --title-color: #FFF1DC;
  --highlight-color: #B8D889;
  --book-number-color: #FFF1DC;
  --byline-color: #FFF1DC;
  --upper-overlay: linear-gradient(to bottom, rgb(7 16 11 / 0.84), rgb(7 16 11 / 0.4) 54%, transparent 100%);
  --lower-overlay: linear-gradient(to top, rgb(18 32 24 / 0.68), rgb(18 32 24 / 0.22) 42%, transparent 62%);
}

.home-page__cover {
  --home-cover-visible-height: 700;
  --home-cover-image-offset-y: -180;
  --home-cover-border-brightness: 1;
}

@media screen and (prefers-color-scheme: light) {
  .book-page.book-1 .book-page__cover {
    --action-background: #2F5137;
    --action-color: #FFFFFF;
    --action-hover-background: color-mix(in srgb, #2F5137 84%, #000000);
    --action-hover-color: #FFFFFF;
    --action-focus: #2F5137;
    --action-border: #C8DEA0;
  }

  .book-page.book-2 .book-page__cover {
    --action-background: #2F5137;
    --action-color: #FFFFFF;
    --action-hover-background: color-mix(in srgb, #2F5137 84%, #000000);
    --action-hover-color: #FFFFFF;
    --action-focus: #2F5137;
    --action-border: #C8DEA0;
  }

  .book-page.book-3 .book-page__cover {
    --action-background: #34593C;
    --action-color: #FFFFFF;
    --action-hover-background: color-mix(in srgb, #34593C 84%, #000000);
    --action-hover-color: #FFFFFF;
    --action-focus: #34593C;
    --action-border: #B8D49A;
  }

  .book-page.book-4 .book-page__cover {
    --action-background: #34593C;
    --action-color: #FFFFFF;
    --action-hover-background: color-mix(in srgb, #34593C 84%, #000000);
    --action-hover-color: #FFFFFF;
    --action-focus: #34593C;
    --action-border: #B8D49A;
  }

  .book-page.book-5 .book-page__cover {
    --action-background: #34593C;
    --action-color: #FFFFFF;
    --action-hover-background: color-mix(in srgb, #34593C 84%, #000000);
    --action-hover-color: #FFFFFF;
    --action-focus: #34593C;
    --action-border: #B8D49A;
  }

  .book-page.book-6 .book-page__cover {
    --action-background: #54315F;
    --action-color: #FFFFFF;
    --action-hover-background: color-mix(in srgb, #54315F 84%, #000000);
    --action-hover-color: #FFFFFF;
    --action-focus: #54315F;
    --action-border: #D9BCE3;
  }

  .book-page.book-7 .book-page__cover {
    --action-background: #54315F;
    --action-color: #FFFFFF;
    --action-hover-background: color-mix(in srgb, #54315F 84%, #000000);
    --action-hover-color: #FFFFFF;
    --action-focus: #54315F;
    --action-border: #D9BCE3;
  }

  .book-page.book-8 .book-page__cover {
    --action-background: #D6E3C3;
    --action-color: #181713;
    --action-hover-background: color-mix(in srgb, #D6E3C3 84%, #FFFFFF);
    --action-hover-color: #181713;
    --action-focus: #D6E3C3;
    --action-border: #FF5D2C;
  }

  .book-page.book-9 .book-page__cover {
    --action-background: #E8C99F;
    --action-color: #181713;
    --action-hover-background: color-mix(in srgb, #E8C99F 84%, #FFFFFF);
    --action-hover-color: #181713;
    --action-focus: #E8C99F;
    --action-border: #00A15A;
  }

  .home-page__cover {
    --action-background: #2F5137;
    --action-color: #FFFFFF;
    --action-hover-background: color-mix(in srgb, #2F5137 84%, #000000);
    --action-hover-color: #FFFFFF;
    --action-focus: #2F5137;
    --action-border: #C8DEA0;
  }
}

@media screen and (prefers-color-scheme: dark) {
  .book-cover-stage[data-book="1"] {
    --book-cover-source-width: 990;
    --book-cover-source-height: 1584;
    --book-cover-visible-height: 1484;
    --book-cover-crop-bottom: 100;
    --book-cover-crop-shift-y: 10.101cqi;
    --book-cover-image-offset-y: -80;
    --book-cover-border-brightness: 0.5;
    --artwork-brightness: 1.15;
    --profile-title-font: "Vollkorn", serif;
    --profile-title-weight: 700;
    --profile-title-size: 15.67cqi;
    --profile-title-scale-x: 1;
    --title-origin: center top;
    --title-line-items: center;
    --title-leading: 0.77;
    --title-tracking: -0.035em;
    --profile-title-top: 104cqi;
    --title-left: 5cqi;
    --title-width: 90cqi;
    --title-align: center;
    --saga-color: #FFF3DC;
    --volume-number-color: #F47A42;
    --volume-color: var(--volume-color-dark);
    --book-cover-border: #F47A42;
    --title-color: #FFF3DC;
    --highlight-color: #C8DEA0;
    --book-number-color: #FFF3DC;
    --byline-color: #FFF3DC;
    --upper-overlay: linear-gradient(to bottom, rgb(7 7 6 / 0.84), rgb(7 7 6 / 0.4) 54%, transparent 100%);
    --lower-overlay: linear-gradient(to top, rgb(7 7 6 / 0.76), rgb(7 7 6 / 0.3) 42%, transparent 62%);
  }

  .book-cover-stage[data-book="2"] {
    --book-cover-source-width: 990;
    --book-cover-source-height: 1584;
    --book-cover-visible-height: 1484;
    --book-cover-crop-bottom: 100;
    --book-cover-crop-shift-y: 10.101cqi;
    --book-cover-image-offset-y: -20;
    --book-cover-border-brightness: 0.5;
    --artwork-brightness: 1.15;
    --profile-title-font: "Vollkorn", serif;
    --profile-title-weight: 700;
    --profile-title-size: 18.80cqi;
    --profile-title-scale-x: 1;
    --title-origin: center top;
    --title-line-items: center;
    --title-leading: 0.75;
    --title-tracking: -0.045em;
    --profile-title-top: 104cqi;
    --title-left: 5cqi;
    --title-width: 90cqi;
    --title-align: center;
    --saga-color: #FFF3DC;
    --volume-number-color: #F47A42;
    --volume-color: var(--volume-color-dark);
    --book-cover-border: #F47A42;
    --title-color: #FFF3DC;
    --highlight-color: #C8DEA0;
    --book-number-color: #FFF3DC;
    --byline-color: #FFF3DC;
    --upper-overlay: linear-gradient(to bottom, rgb(7 7 6 / 0.84), rgb(7 7 6 / 0.4) 54%, transparent 100%);
    --lower-overlay: linear-gradient(to top, rgb(7 7 6 / 0.76), rgb(7 7 6 / 0.3) 42%, transparent 62%);
  }

  .book-cover-stage[data-book="3"] {
    --book-cover-source-width: 990;
    --book-cover-source-height: 1584;
    --book-cover-visible-height: 1484;
    --book-cover-crop-bottom: 100;
    --book-cover-crop-shift-y: 10.101cqi;
    --book-cover-image-offset-y: -80;
    --book-cover-border-brightness: 1;
    --artwork-brightness: 1.1;
    --profile-title-font: "Vollkorn", serif;
    --profile-title-weight: 700;
    --profile-title-size: 18.02cqi;
    --profile-title-scale-x: 1;
    --title-origin: center top;
    --title-line-items: center;
    --title-leading: 0.75;
    --title-tracking: -0.045em;
    --profile-title-top: 104cqi;
    --title-left: 5cqi;
    --title-width: 90cqi;
    --title-align: center;
    --saga-color: #FFF3DC;
    --volume-number-color: #E4B46A;
    --volume-color: var(--volume-color-dark);
    --book-cover-border: #34593C;
    --title-color: #FFF3DC;
    --highlight-color: #F0C96A;
    --book-number-color: #FFF3DC;
    --byline-color: #FFF3DC;
    --upper-overlay: linear-gradient(to bottom, rgb(7 7 6 / 0.84), rgb(7 7 6 / 0.4) 54%, transparent 100%);
    --lower-overlay: linear-gradient(to top, rgb(7 14 10 / 0.76), rgb(7 14 10 / 0.3) 42%, transparent 62%);
  }

  .book-cover-stage[data-book="4"] {
    --book-cover-source-width: 990;
    --book-cover-source-height: 1584;
    --book-cover-visible-height: 1484;
    --book-cover-crop-bottom: 100;
    --book-cover-crop-shift-y: 10.101cqi;
    --book-cover-image-offset-y: -70;
    --book-cover-border-brightness: 1;
    --artwork-brightness: 1.20;
    --profile-title-font: "Vollkorn", serif;
    --profile-title-weight: 700;
    --profile-title-size: 17.95cqi;
    --profile-title-scale-x: 1;
    --title-origin: center top;
    --title-line-items: center;
    --title-leading: 0.75;
    --title-tracking: -0.045em;
    --profile-title-top: 99cqi;
    --title-left: 5cqi;
    --title-width: 90cqi;
    --title-align: center;
    --saga-color: #FFF3DC;
    --volume-number-color: #E4B46A;
    --volume-color: var(--volume-color-dark);
    --book-cover-border: #34593C;
    --title-color: #FFF3DC;
    --highlight-color: #F0C96A;
    --book-number-color: #FFF3DC;
    --byline-color: #FFF3DC;
    --upper-overlay: linear-gradient(to bottom, rgb(7 7 6 / 0.84), rgb(7 7 6 / 0.4) 54%, transparent 100%);
    --lower-overlay: linear-gradient(to top, rgb(7 14 10 / 0.76), rgb(7 14 10 / 0.3) 42%, transparent 62%);
  }

  .book-cover-stage[data-book="5"] {
    --book-cover-source-width: 990;
    --book-cover-source-height: 1584;
    --book-cover-visible-height: 1484;
    --book-cover-crop-bottom: 100;
    --book-cover-crop-shift-y: 10.101cqi;
    --book-cover-image-offset-y: -100;
    --book-cover-border-brightness: 1;
    --artwork-brightness: 1.25;
    --profile-title-font: "Vollkorn", serif;
    --profile-title-weight: 700;
    --profile-title-size: 14cqi;
    --profile-title-scale-x: 0.88;
    --title-origin: center top;
    --title-line-items: center;
    --title-leading: 0.8;
    --title-tracking: -0.02em;
    --profile-title-top: 111cqi;
    --title-left: 5cqi;
    --title-width: 90cqi;
    --title-align: center;
    --saga-color: #FFF3DC;
    --volume-number-color: #E4B46A;
    --volume-color: var(--volume-color-dark);
    --book-cover-border: #34593C;
    --title-color: #FFF3DC;
    --highlight-color: #F0C96A;
    --book-number-color: #FFF3DC;
    --byline-color: #FFF3DC;
    --upper-overlay: linear-gradient(to bottom, rgb(7 7 6 / 0.84), rgb(7 7 6 / 0.4) 54%, transparent 100%);
    --lower-overlay: linear-gradient(to top, rgb(7 14 10 / 0.76), rgb(7 14 10 / 0.3) 42%, transparent 62%);
  }

  .book-cover-stage[data-book="6"] {
    --book-cover-source-width: 990;
    --book-cover-source-height: 1584;
    --book-cover-visible-height: 1484;
    --book-cover-crop-bottom: 100;
    --book-cover-crop-shift-y: 10.101cqi;
    --book-cover-image-offset-y: -100;
    --book-cover-border-brightness: 1;
    --artwork-brightness: 1.20;
    --profile-title-font: "Vollkorn", serif;
    --profile-title-weight: 700;
    --profile-title-size: 14cqi;
    --profile-title-scale-x: 0.94;
    --title-origin: center top;
    --title-line-items: center;
    --title-leading: 0.84;
    --title-tracking: 0;
    --profile-title-top: 99cqi;
    --title-left: 5cqi;
    --title-width: 90cqi;
    --title-align: center;
    --saga-color: #FFF0F8;
    --volume-number-color: #F3B46C;
    --volume-color: var(--volume-color-dark);
    --book-cover-border: #54315F;
    --title-color: #FFF0F8;
    --highlight-color: #FFC985;
    --book-number-color: #FFF0F8;
    --byline-color: #FFF0F8;
    --upper-overlay: linear-gradient(to bottom, rgb(27 13 32 / 0.84), rgb(27 13 32 / 0.4) 54%, transparent 100%);
    --lower-overlay: linear-gradient(to top, rgb(18 9 22 / 0.94), rgb(18 9 22 / 0.44) 44%, transparent 64%);
  }

  .book-cover-stage[data-book="7"] {
    --book-cover-source-width: 990;
    --book-cover-source-height: 1584;
    --book-cover-visible-height: 1484;
    --book-cover-crop-bottom: 100;
    --book-cover-crop-shift-y: 10.101cqi;
    --book-cover-image-offset-y: 0;
    --book-cover-border-brightness: 1;
    --artwork-brightness: 1.20;
    --profile-title-font: "Vollkorn", serif;
    --profile-title-weight: 700;
    --profile-title-size: 22cqi;
    --profile-title-scale-x: 1;
    --title-origin: center top;
    --title-line-items: center;
    --title-leading: 0.75;
    --title-tracking: -0.045em;
    --profile-title-top: 104cqi;
    --title-left: 5cqi;
    --title-width: 90cqi;
    --title-align: center;
    --saga-color: #FFF0F8;
    --volume-number-color: #F3B46C;
    --volume-color: var(--volume-color-dark);
    --book-cover-border: #54315F;
    --title-color: #FFF0F8;
    --highlight-color: #FFC985;
    --book-number-color: #FFF0F8;
    --byline-color: #FFF0F8;
    --upper-overlay: linear-gradient(to bottom, rgb(27 13 32 / 0.84), rgb(27 13 32 / 0.4) 54%, transparent 100%);
    --lower-overlay: linear-gradient(to top, rgb(18 9 22 / 0.94), rgb(18 9 22 / 0.44) 44%, transparent 64%);
  }

  .book-cover-stage[data-book="8"] {
    --book-cover-source-width: 990;
    --book-cover-source-height: 1584;
    --book-cover-visible-height: 1484;
    --book-cover-crop-bottom: 100;
    --book-cover-crop-shift-y: 10.101cqi;
    --book-cover-image-offset-y: -70;
    --book-cover-border-brightness: 0.5;
    --artwork-brightness: 1.25;
    --profile-title-font: "Vollkorn", serif;
    --profile-title-weight: 700;
    --profile-title-size: 14cqi;
    --profile-title-scale-x: 1;
    --title-origin: center top;
    --title-line-items: center;
    --title-leading: 0.8;
    --title-tracking: -0.02em;
    --profile-title-top: 111cqi;
    --title-left: 5cqi;
    --title-width: 90cqi;
    --title-align: center;
    --saga-color: #FFF1DC;
    --volume-number-color: #FF8A68;
    --volume-color: var(--volume-color-dark);
    --book-cover-border: #C73E1D;
    --title-color: #FFF1DC;
    --highlight-color: #FF8A68;
    --book-number-color: #FFF1DC;
    --byline-color: #FFF1DC;
    --upper-overlay: linear-gradient(to bottom, rgb(27 13 7 / 0.84), rgb(27 13 7 / 0.4) 54%, transparent 100%);
    --lower-overlay: linear-gradient(to top, rgb(20 10 6 / 0.68), rgb(20 10 6 / 0.24) 40%, transparent 60%);
  }

  .book-cover-stage[data-book="9"] {
    --book-cover-source-width: 990;
    --book-cover-source-height: 1584;
    --book-cover-visible-height: 1484;
    --book-cover-crop-bottom: 100;
    --book-cover-crop-shift-y: 10.101cqi;
    --book-cover-image-offset-y: 0;
    --book-cover-border-brightness: 0.5;
    --artwork-brightness: 1.25;
    --profile-title-font: "Vollkorn", serif;
    --profile-title-weight: 700;
    --profile-title-size: 16.78cqi;
    --profile-title-scale-x: 1;
    --title-origin: center top;
    --title-line-items: center;
    --title-leading: 0.75;
    --title-tracking: -0.045em;
    --profile-title-top: 111cqi;
    --title-left: 5cqi;
    --title-width: 90cqi;
    --title-align: center;
    --saga-color: #FFF1DC;
    --volume-number-color: #CBE6A1;
    --volume-color: var(--volume-color-dark);
    --book-cover-border: #006B3C;
    --title-color: #FFF1DC;
    --highlight-color: #CBE6A1;
    --book-number-color: #FFF1DC;
    --byline-color: #FFF1DC;
    --upper-overlay: linear-gradient(to bottom, rgb(7 16 11 / 0.84), rgb(7 16 11 / 0.4) 54%, transparent 100%);
    --lower-overlay: linear-gradient(to top, rgb(7 14 10 / 0.76), rgb(7 14 10 / 0.3) 42%, transparent 62%);
  }

  .home-page__cover {
    --home-cover-visible-height: 700;
    --home-cover-image-offset-y: -180;
    --home-cover-border-brightness: 0.5;
  }

  .book-page.book-1 .book-page__cover {
    --action-background: #C8DEA0;
    --action-color: #181713;
    --action-hover-background: color-mix(in srgb, #C8DEA0 84%, #FFFFFF);
    --action-hover-color: #181713;
    --action-focus: #C8DEA0;
    --action-border: #7A3D21;
  }

  .book-page.book-2 .book-page__cover {
    --action-background: #C8DEA0;
    --action-color: #181713;
    --action-hover-background: color-mix(in srgb, #C8DEA0 84%, #FFFFFF);
    --action-hover-color: #181713;
    --action-focus: #C8DEA0;
    --action-border: #7A3D21;
  }

  .book-page.book-3 .book-page__cover {
    --action-background: #B8D49A;
    --action-color: #181713;
    --action-hover-background: color-mix(in srgb, #B8D49A 84%, #FFFFFF);
    --action-hover-color: #181713;
    --action-focus: #B8D49A;
    --action-border: #34593C;
  }

  .book-page.book-4 .book-page__cover {
    --action-background: #B8D49A;
    --action-color: #181713;
    --action-hover-background: color-mix(in srgb, #B8D49A 84%, #FFFFFF);
    --action-hover-color: #181713;
    --action-focus: #B8D49A;
    --action-border: #34593C;
  }

  .book-page.book-5 .book-page__cover {
    --action-background: #B8D49A;
    --action-color: #181713;
    --action-hover-background: color-mix(in srgb, #B8D49A 84%, #FFFFFF);
    --action-hover-color: #181713;
    --action-focus: #B8D49A;
    --action-border: #34593C;
  }

  .book-page.book-6 .book-page__cover {
    --action-background: #D9BCE3;
    --action-color: #181713;
    --action-hover-background: color-mix(in srgb, #D9BCE3 84%, #FFFFFF);
    --action-hover-color: #181713;
    --action-focus: #D9BCE3;
    --action-border: #54315F;
  }

  .book-page.book-7 .book-page__cover {
    --action-background: #D9BCE3;
    --action-color: #181713;
    --action-hover-background: color-mix(in srgb, #D9BCE3 84%, #FFFFFF);
    --action-hover-color: #181713;
    --action-focus: #D9BCE3;
    --action-border: #54315F;
  }

  .book-page.book-8 .book-page__cover {
    --action-background: #F1D9B8;
    --action-color: #181713;
    --action-hover-background: color-mix(in srgb, #F1D9B8 84%, #FFFFFF);
    --action-hover-color: #181713;
    --action-focus: #F1D9B8;
    --action-border: #641F0F;
  }

  .book-page.book-9 .book-page__cover {
    --action-background: #F1D9B8;
    --action-color: #181713;
    --action-hover-background: color-mix(in srgb, #F1D9B8 84%, #FFFFFF);
    --action-hover-color: #181713;
    --action-focus: #F1D9B8;
    --action-border: #00361E;
  }

  .home-page__cover {
    --action-background: #C8DEA0;
    --action-color: #181713;
    --action-hover-background: color-mix(in srgb, #C8DEA0 84%, #FFFFFF);
    --action-hover-color: #181713;
    --action-focus: #C8DEA0;
    --action-border: #7A3D21;
  }
}
