.book-work {
  --book-blue: #243b9b;
  --book-night: #10152b;
  --book-wash: color-mix(in srgb, var(--accent) 7%, var(--panel));
}
.book-work.book-work--sister-squad-2 { --book-blue: #2949bd; }
.book-work.book-work--miracle-shot { --book-blue: #285b9b; }

.book-work-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .63fr);
  align-items: center;
  gap: clamp(20px, 5vw, 74px);
  width: min(1200px, calc(100% - 48px));
  margin: calc(var(--nav-height, 70px) + 16px) auto clamp(24px, 5vw, 64px);
  padding: clamp(24px, 5vw, 70px);
  border-radius: 22px;
  background: radial-gradient(ellipse at 88% 22%, var(--book-blue), transparent 66%),
              linear-gradient(112deg, var(--book-night), #1c2755);
  color: #fff;
}
.book-work #site-nav + .book-work-hero { margin-top: 16px; }
.book-work-hero h1 {
  margin: 0 0 9px;
  color: #fff;
  font: 800 clamp(2rem, 6.3vw, 5.7rem)/.98 Pretendard, Inter, sans-serif;
  letter-spacing: -.065em;
  text-wrap: balance;
}
.book-work-hero p {
  margin: 0;
  color: #e0e7ff;
  font-size: clamp(1.03rem, 2.25vw, 1.48rem);
  font-weight: 670;
  line-height: 1.42;
  overflow-wrap: anywhere;
  word-break: keep-all;
}
.book-work-cover {
  display: block;
  justify-self: center;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: clamp(180px, 33vw, 380px);
  border-radius: 4px 8px 8px 4px;
  box-shadow: 2px 0 0 #cbd2ef, 4px 0 0 #8692c0, 14px 18px 32px #050816a6;
}
.book-work-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: clamp(16px, 3vw, 29px); }
.book-work .book-work-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 9px 13px;
  border: 1px solid #b8c7ff89;
  border-radius: 8px;
  color: #fff !important;
  font-size: .9rem;
  font-weight: 760;
  line-height: 1.25;
}
.book-work .book-work-actions .book-work-buy { background: #edf1ff; border-color: #edf1ff; color: #171f47 !important; }
.book-work .book-work-actions a:hover { border-color: #fff; }
.book-work .book-work-actions a:focus-visible { outline-color: #fff; }

.book-work > main.container {
  width: min(1100px, calc(100% - 48px));
  padding: 0 0 100px !important;
  margin-inline: auto;
}
.book-work main [id] { scroll-margin-top: calc(var(--nav-height, 70px) + 22px); }
.book-work main :is(.section-title, .seo-main-title, .seo-heading, .section-label, .back-link) {
  color: var(--accent) !important;
  border-color: var(--rule) !important;
}
.book-work main :is(.synopsis-section, .char-card, .faction-item, .english-edition-note, .ss2-story-section, .seo-box, section.seo-block, .world-card) {
  background: var(--panel) !important;
  border-color: var(--rule) !important;
  box-shadow: none !important;
}
.book-work main :is(.char-name, .faction-name, .album-title, .world-card h3, .ss2-story-copy h2, .english-edition-note h2, section.seo-block h2, section.seo-block h3) {
  color: var(--ink) !important;
}
.book-work main :is(.char-desc, .char-quote, .faction-desc, .synopsis-text, .seo-text, section.seo-block p, .ss2-story-copy p, .english-edition-note p) {
  color: var(--subtle) !important;
}
.book-work main :is(.seo-box, .seo-block, .synopsis-section, .book-editorial, .ss2-story-copy, .english-edition-note) :is(h2, h3, p, li, blockquote) {
  overflow-wrap: anywhere;
  word-break: keep-all;
}
.book-work main :is(.book-editorial, .ss2-story-copy, .english-edition-note, .seo-box, section.seo-block) a:not(.get-book-button) {
  color: var(--accent) !important;
  text-underline-offset: .17em;
}
.book-work main .get-book-button {
  min-height: 48px;
  padding: 12px clamp(15px, 3vw, 24px) !important;
  border: 1px solid var(--accent) !important;
  border-radius: 8px !important;
  background: var(--accent) !important;
  color: var(--on-accent) !important;
  box-shadow: none !important;
  letter-spacing: 0;
}
.book-work main .get-book-button::after { content: none; }
.book-work main .get-book-button :is(span, .get-book-arrow) { color: inherit !important; }

.book-work main .book-editorial,
.book-work main .english-edition-note {
  width: 100%;
  max-width: 920px;
  margin: clamp(26px, 5vw, 60px) auto;
  padding: clamp(18px, 4vw, 42px);
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--panel);
  color: var(--ink);
  text-align: left;
}
.book-work main .ms-theme-content { border: 0 !important; padding: 0 !important; }
.book-work main .book-editorial h2,
.book-work main .english-edition-note h2 {
  margin: 0 0 18px;
  color: var(--ink) !important;
  font-family: Pretendard, Inter, sans-serif !important;
  font-size: clamp(1.42rem, 4.5vw, 2.4rem) !important;
  line-height: 1.24 !important;
  letter-spacing: -.035em;
}
.book-work main .book-editorial h3,
.book-work main .book-reading-list strong {
  display: block;
  margin: clamp(18px, 3vw, 30px) 0 7px !important;
  padding-top: 13px;
  border-top: 1px solid var(--rule);
  color: var(--ink) !important;
  font-family: Pretendard, Inter, sans-serif !important;
  font-size: clamp(1.02rem, 3.8vw, 1.27rem) !important;
  font-weight: 750;
  line-height: 1.42 !important;
  letter-spacing: -.02em;
}
.book-work main .book-editorial p,
.book-work main .english-edition-note p,
.book-work main .ss2-story-copy p,
.book-work main :is(.seo-box, section.seo-block) p {
  max-width: 67ch;
  margin: 0 0 14px;
  color: var(--subtle);
  font-size: clamp(.97rem, 2vw, 1.09rem) !important;
  font-weight: 400;
  line-height: 1.72 !important;
  text-align: left;
}
.book-work main .book-editorial :is([data-i18n$="_kicker"], .ms-theme-kicker),
.book-work main .english-edition-note [data-i18n$="_kicker"] {
  display: block;
  margin-bottom: 8px;
  color: var(--accent) !important;
  font-size: .82rem !important;
  font-weight: 750;
  letter-spacing: 0;
}
.book-work main .book-editorial p:last-child { margin-bottom: 0; }
.book-work main .book-reading-list { margin: 10px 0 0; padding-inline-start: 1.35rem; }
.book-work main .book-reading-list li::marker { color: var(--accent); font-weight: 750; }
.book-work main .book-reading-list p { padding: 4px 0; }
.book-work main .book-editorial article + article { margin-top: 12px; }
.book-work main .book-work-related { background: var(--book-wash); }
.book-work main .ss2-story-copy { text-align: left; }
.book-work main .ss2-story-copy h2 { white-space: normal; }
.book-work main .ss2-story-copy blockquote {
  max-width: 62ch;
  margin: 16px 0;
  padding: 12px 15px;
  border-inline-start: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  background: var(--book-wash);
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.72;
}
@media (max-width: 640px) {
  .book-work-hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, .54fr);
    width: calc(100% - 24px);
    margin-bottom: 24px;
    padding: 18px 15px;
    gap: 13px;
    border-radius: 14px;
  }
  .book-work-hero h1 { font-size: clamp(1.55rem, 6.25vw, 2.6rem); text-wrap: wrap; }
  .book-work-actions { gap: 6px; }
  .book-work .book-work-actions a { padding-inline: 8px; font-size: .79rem; }
  .book-work-cover { max-height: 174px; }
  .book-work > main.container { width: calc(100% - 24px); padding-bottom: 105px !important; }
  .book-work main :is(.book-editorial, .seo-box, section.seo-block, .ss2-story-section, .english-edition-note, .synopsis-section) {
    max-width: 100%;
    padding: 16px !important;
    margin-inline: auto;
  }
  .book-work main .seo-section { width: 100%; padding-inline: 0; }
  .book-work main .seo-box .seo-block { padding-inline: 0 !important; }
}

.book-work main :is(.ss2-story-kicker, .char-tag, .ost-pill, .creation-journal-list a) { color: var(--accent) !important; }
.book-work main :is(.char-tag, .ost-pill) { border-color: var(--rule) !important; }
.book-work main .ss2-story-video-card {
  border-color: var(--rule) !important;
  background: var(--book-wash) !important;
}
.book-work main .ss2-story-video-card :is(h3, p) { color: var(--ink) !important; }
.book-work main .ss2-story-promo { color: var(--subtle) !important; border-color: var(--accent); }

/* Sister Squad series banners. */
.ss-book-banner {
  --banner-bg: #19142b;
  --banner-tint: #2c214a;
  --banner-color: #f7dfb9;
  --banner-framing: 50% 49%;
  display: grid;
  grid-template-columns: minmax(0, .91fr) minmax(0, 1.28fr);
  grid-template-areas: "copy image";
  width: min(1220px, calc(100% - 44px));
  margin: 16px auto clamp(25px, 5vw, 68px);
  overflow: hidden;
  border-radius: 15px;
  background: var(--banner-bg);
  color: #fff;
}
.ss-book-banner--2 {
  --banner-bg: #0e192b;
  --banner-tint: #1b3653;
  --banner-color: #c6e5ff;
  grid-template-columns: minmax(0, 1.03fr) minmax(0, 1fr);
}
.ss-book-banner--2 .ss-book-banner-copy { min-height: clamp(405px, 45vw, 570px); }
.ss-book-banner--2 .ss-book-banner-art {
  background: radial-gradient(ellipse at 17% 35%, #1b3858, transparent 56%),
              radial-gradient(ellipse at 95% 65%, #522825, transparent 53%), #101626;
}
.ss-book-banner--2 .ss-book-banner-art img { object-fit: contain; object-position: center; }
.ss-book-banner-art {
  position: relative;
  grid-area: image;
  min-height: 100%;
  background: var(--banner-tint);
}
.ss-book-banner-art img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--banner-framing);
}
.ss-book-banner-copy {
  grid-area: copy;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-width: 0;
  min-height: clamp(325px, 37vw, 480px);
  padding: clamp(22px, 4.1vw, 63px);
  background: linear-gradient(150deg, var(--banner-tint), var(--banner-bg) 69%);
}
html body.book-work .ss-book-banner .ss-book-banner-series {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 13px;
  color: var(--banner-color) !important;
  font: 800 .78rem/1.2 Pretendard, Inter, sans-serif;
  letter-spacing: .135em;
}
.ss-book-banner-series span {
  display: grid;
  place-items: center;
  min-width: 23px;
  min-height: 23px;
  border: 1px solid currentColor;
  border-radius: 3px;
  letter-spacing: 0;
}
html body.book-work .ss-book-banner h1 {
  margin: 0;
  color: #fff !important;
  -webkit-text-fill-color: currentColor !important;
  font: 800 clamp(2.25rem, 5.05vw, 4.75rem)/1.08 Pretendard, Inter, sans-serif !important;
  letter-spacing: -.065em;
  text-wrap: balance;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
html body.book-work .ss-book-banner .ss-book-banner-line {
  margin: 12px 0 0;
  color: #e2e8f8 !important;
  font-size: clamp(.9rem, 1.55vw, 1.05rem);
  line-height: 1.57;
  word-break: keep-all;
}
.ss-book-banner-actions { display: grid; gap: 7px; width: 100%; margin-top: 20px; }
html body.book-work .ss-book-banner .ss-book-banner-buy {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  justify-self: start;
  gap: 16px;
  min-height: 46px;
  padding: 10px 15px;
  border-radius: 5px;
  background: var(--banner-color);
  color: var(--banner-bg) !important;
  text-decoration: none;
  font-weight: 800;
}
.ss-book-banner-links { display: flex; flex-wrap: wrap; gap: 0 16px; }
html body.book-work .ss-book-banner .ss-book-banner-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: 6px;
  color: #fff !important;
  text-underline-offset: .24em;
  font-size: .86rem;
  font-weight: 720;
}
.ss-book-banner-links a:hover { text-decoration: underline; }
.book-work .ss-book-banner a:focus-visible { outline-color: #fff; }
@media (max-width: 650px) {
  .ss-book-banner {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "image" "copy";
    width: calc(100% - 24px);
    margin-top: 12px;
    border-radius: 12px;
  }
  .ss-book-banner--2 { grid-template-columns: minmax(0, 1fr); }
  .ss-book-banner--2 .ss-book-banner-art { aspect-ratio: 1000 / 1414; max-height: 470px; }
  .ss-book-banner--2 .ss-book-banner-copy { min-height: 0; }
  .ss-book-banner-art { min-height: 0; aspect-ratio: 1.68; }
  .ss-book-banner-copy { min-height: 0; padding: 17px 16px 8px; }
  html body.book-work .ss-book-banner .ss-book-banner-series { margin-bottom: 8px; }
  html body.book-work .ss-book-banner h1 { font-size: clamp(1.78rem, 7.5vw, 3rem) !important; text-wrap: wrap; }
  html body.book-work .ss-book-banner .ss-book-banner-line { margin-top: 7px; }
  .ss-book-banner-actions { margin-top: 14px; }
  html body.book-work .ss-book-banner .ss-book-banner-buy { justify-self: stretch; }
}


/* MIRACLE SHOT hero contrast: the global light-theme heading rule must not
   paint a dark heading onto this permanently dark, illustrated banner. */
html[data-theme="light"] body.book-work--miracle-shot .book-work-hero h1,
html[data-theme="dark"] body.book-work--miracle-shot .book-work-hero h1 {
  color: #fff !important;
  text-shadow: 0 3px 18px rgba(2, 8, 26, .5) !important;
}
html[data-theme="light"] body.book-work--miracle-shot .book-work-hero p,
html[data-theme="dark"] body.book-work--miracle-shot .book-work-hero p {
  color: #e8f1ff !important;
}
html[data-theme="light"] body.book-work--miracle-shot .book-work-hero .book-work-actions a:not(.book-work-buy) {
  color: #fff !important;
  border-color: rgba(207, 224, 255, .65);
}
html[data-theme="light"] body.book-work--miracle-shot .book-work-hero .book-work-actions .book-work-buy {
  color: #171f47 !important;
}
