/* Comicwell reading pages: the strip on ink. Extends style.css (load it first). Plan and wireframes: ../DESIGN-READER.md */

:root {
  --col: 800px;            /* the strip column: the reader's 1600-wide images at 2x */
}

/* ---------- Shells ---------- */

body.reader { background: var(--ink); color: #e9e9e9; min-height: 100vh; display: flex; flex-direction: column; }
body.reader main { flex: 1 0 auto; }
/* Short pages (sign-in, link confirm) keep the footer at the bottom of the window, as on ink. */
body.paper { min-height: 100vh; display: flex; flex-direction: column; }
body.paper main { flex: 1 0 auto; }

/* The one column every reading page shares: centred, content left-aligned inside it. */
.read-col { width: 100%; max-width: calc(var(--col) + 2 * var(--side)); margin-inline: auto; padding-inline: var(--side); }
.read-col.flush { padding-inline: 0; max-width: var(--col); }   /* the strip itself runs edge to edge on a phone */

/* ---------- Narration box: the reader's caption, on ink it throws an orange hard shadow ---------- */

.narration {
  background: var(--caption); color: #fff;
  padding: clamp(18px, 3vw, 28px) clamp(18px, 3vw, 32px);
  box-shadow: 6px 6px 0 0 var(--orange);
}
.narration h1, .narration h2 { font-size: clamp(var(--s3), 5vw, var(--s4)); line-height: 0.98; letter-spacing: -0.015em; }
.narration p { margin-top: 14px; max-width: 34em; }
.narration a:not(.btn) { color: var(--orange-ink); }
.narration a:not(.btn):hover { color: #fff; }
.fine { font-size: var(--s-1); color: var(--muted-ink); }
.narration .fine { margin-top: 20px; }

/* ---------- Buttons: the CTA language of the app ("Unlock Chapter 21") ---------- */

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; margin-top: 26px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px;
  border: 0; border-radius: 0; cursor: pointer;
  background: var(--orange); color: var(--ink);
  font: 700 var(--s1)/1.1 var(--display); font-stretch: condensed; letter-spacing: 0.01em;
  text-decoration: none;
}
.btn:hover { background: #fff; color: var(--ink); }
.btn-quiet { background: var(--caption); color: #fff; }
.btn-ink { background: var(--ink); color: #fff; }
.btn-block { width: 100%; justify-content: flex-start; }
/* Share links: plain links to Facebook, X, Reddit and Pinterest; the name shows beside the icon on wide screens. */
.share { display: flex; flex-wrap: wrap; gap: 10px; }
.share a {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-width: 44px; min-height: 44px; padding: 0 12px;
  background: var(--caption); color: #fff;
  font: 700 var(--s0)/1 var(--display); font-stretch: condensed; text-decoration: none;
}
.share a:hover { background: #fff; color: var(--ink); }
.share svg { flex: none; }
.novel-col .share { margin-top: 24px; }
.novel-col .share :focus-visible { outline-color: var(--ink); }
@media (max-width: 600px) { .share a span { display: none; } }
.btn .price { margin-left: auto; font-weight: 600; }

/* ---------- 16+ notice ---------- */

.notice { padding-block: clamp(48px, 12vh, 140px) clamp(64px, 14vh, 160px); }
.notice-box { max-width: 36em; }

/* ---------- Series page: a band (banner or cover), the cover over it, then two columns ---------- */

.series-band { background: var(--panel); }
.series-band-art { height: clamp(180px, 22vw, 300px); overflow: hidden; }
.series-band-art img { width: 100%; height: 100%; object-fit: cover; opacity: 0.55; }
.series-top {
  position: relative; display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; align-items: end;
  margin-top: calc(-1 * clamp(90px, 11vw, 150px));
}
.series-cover { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; background: var(--panel); box-shadow: 6px 6px 0 0 var(--orange); }
.series-title h1 { font-size: clamp(var(--s4), 5vw, 3.5rem); line-height: 0.98; letter-spacing: -0.02em; color: #fff; }
.stats { display: flex; flex-wrap: wrap; gap: 6px 24px; margin-top: 10px; font: 700 var(--s1)/1.2 var(--display); font-stretch: condensed; color: #fff; }
.byline { margin-top: 6px; font: 600 var(--s0)/1.3 var(--display); font-stretch: condensed; color: var(--muted-ink); }
.byline a { color: var(--orange-ink); }
.author-bio { max-width: 38em; }
.author-bio p { margin-top: 14px; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tag {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; background: var(--caption); color: #fff;
  font: 700 var(--s0)/1.1 var(--display); font-stretch: condensed; text-decoration: none;
}
.tag:hover { background: var(--orange); color: var(--ink); }
.series-title .actions { margin-top: 18px; gap: 10px; }
.series-title .actions form { display: contents; }
.series-title .fine { margin: 0; }
.series-cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 40px; align-items: start; margin-top: 36px; padding-bottom: clamp(48px, 7vw, 96px); }
.series-main > .hook { font-size: var(--s1); line-height: 1.6; max-width: 40em; }
.series-main .chapters { padding-block: 32px 0; }
.series-main .chapters h2, .about h2 { font-size: clamp(var(--s3), 3.6vw, 2.75rem); letter-spacing: -0.015em; color: #fff; }
.about { margin-top: 40px; }
.story-so-far { margin-top: 40px; max-width: 40em; }
.story-so-far h2 { font-size: clamp(var(--s3), 3.6vw, 2.75rem); letter-spacing: -0.015em; color: #fff; }
.story-so-far h3 { font-size: var(--s1); margin-top: 24px; }
.story-so-far p { line-height: 1.6; margin-top: 8px; }
.series-section { margin-top: 40px; max-width: 40em; }
.series-section h2 { font-size: clamp(var(--s3), 3.6vw, 2.75rem); letter-spacing: -0.015em; color: #fff; }
.series-section p { line-height: 1.6; margin-top: 8px; }
.series-section ul { line-height: 1.6; margin: 4px 0 0; padding-left: 1.25em; }
.series-section a { color: var(--orange-ink); }
.facts { margin-top: 12px; display: grid; grid-template-columns: minmax(0, 14em) minmax(0, 1fr); gap: 0; border-top: 1px solid var(--line-ink); }
.facts dt, .facts dd { margin: 0; padding: 12px 0; border-bottom: 1px solid var(--line-ink); }
.facts dt { font: 700 var(--s1)/1.3 var(--display); font-stretch: condensed; color: #fff; padding-right: 16px; }
.facts a { color: var(--orange-ink); }
.series-aside .novels { padding: 0; max-width: none; }
.series-aside .novels h2 { font-size: var(--s2); }
.series-aside .novel-books { grid-template-columns: minmax(0, 1fr); margin-top: 16px; }
.series-aside .novel-books li { grid-template-columns: minmax(0, 5.5rem) minmax(0, 1fr); box-shadow: none; background: var(--panel); }
.series-aside .novel-books h3 { font-size: var(--s2); }
.series-aside .novel-books .hook { display: none; }
.series-aside .novels, .series-aside .panel-box { margin-bottom: 16px; }
.guides .genre-links { display: block; }
.guides .genre-links a { color: var(--orange-ink); }
.like ul { list-style: none; display: grid; gap: 4px; }
.like a { display: flex; gap: 12px; align-items: center; min-height: 44px; padding: 8px 0; color: #fff; text-decoration: none; }
.like img { width: 54px; height: 72px; flex: none; object-fit: cover; background: var(--caption); }
.like .t { display: block; font: 700 var(--s1)/1.2 var(--display); font-stretch: condensed; }
.like .m { display: block; font-size: var(--s-1); color: var(--muted-ink); }
.like a:hover .t { color: var(--orange-ink); }

.chapters { padding-block: clamp(40px, 6vw, 80px); }
.chapters h2 { font-size: clamp(var(--s3), 4.4vw, 3.75rem); letter-spacing: -0.015em; color: #fff; }
.chapter-list {
  list-style: none; margin-top: 20px;
  display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
}
.chapter-list a {
  display: grid; grid-template-columns: 2.6em minmax(0, 1fr) auto; align-items: baseline; gap: 10px;
  min-height: 52px; padding: 12px 14px;
  background: var(--panel); color: #fff; text-decoration: none;
  font: 600 var(--s0)/1.25 var(--display); font-stretch: condensed;
}
.chapter-list .n { font-weight: 700; font-size: var(--s1); }
.chapter-list .state { font-weight: 600; font-size: var(--s-1); color: var(--muted-ink); }
.chapter-list .free .state { color: var(--orange-ink); }
.chapter-list .locked a { background: transparent; box-shadow: inset 0 0 0 1px var(--line-ink); }
.chapter-list .read a { background: var(--caption); color: var(--muted-ink); box-shadow: inset 4px 0 0 0 var(--orange); }
.chapter-list a:hover { outline: 2px solid var(--orange); outline-offset: 0; }

/* ---------- Reader page ---------- */

.chapter-head { padding-block: clamp(24px, 4vw, 48px) 20px; }
.chapter-head .narration { display: inline-block; max-width: 100%; }
.chapter-head .series-link { display: inline-flex; align-items: center; min-height: 44px; font: 600 var(--s0)/1.2 var(--display); font-stretch: condensed; color: var(--orange-ink); }
.chapter-head h1 { font-size: clamp(var(--s2), 4vw, var(--s3)); margin-top: 6px; }

/* Panels touch, as in the app: the strip is one continuous image column. */
.strip-read { margin-inline: auto; max-width: var(--col); }
.strip-read img { width: 100%; height: auto; background: #141414; }

/* End of chapter: the strip's last panel is orange, cut off by nothing. */
.chapter-end {
  max-width: var(--col); margin: var(--gutter) auto 0;
  background: var(--orange); color: var(--ink);
  padding: clamp(28px, 5vw, 48px) clamp(20px, 4vw, 40px);
}
.chapter-end h2 { font-size: clamp(var(--s3), 5vw, var(--s4)); line-height: 0.95; }
.chapter-end p { margin-top: 12px; max-width: 30em; }
.chapter-end .btn { background: var(--ink); color: #fff; }
.chapter-end :focus-visible, .chapter-end .btn:focus-visible { outline-color: var(--ink); }
.chapter-nav {
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  max-width: var(--col); margin: 18px auto clamp(48px, 7vw, 96px); padding-inline: var(--side);
}
.chapter-nav a, .chapter-nav span { display: inline-flex; align-items: center; min-height: 44px; font: 600 var(--s0)/1 var(--display); font-stretch: condensed; color: #fff; }
.chapter-nav [aria-disabled="true"] { color: var(--muted-ink); text-decoration: none; }

/* ---------- Locked chapter: the series cover, blurred, under the unlock box (never chapter images) ---------- */

/* The cover and the unlock box share one grid cell, so the panel grows with the box: at 320 px or with large text
   the buttons are never clipped. The cover only fills the cell behind the box. */
.locked-panel { display: grid; max-width: var(--col); margin-inline: auto; overflow: hidden; background: #141414; }
.locked-panel > img {
  grid-area: 1 / 1; width: 100%; height: 100%; min-height: 20rem; object-fit: cover;
  filter: blur(18px) brightness(0.55); transform: scale(1.1);
}
.locked-panel .narration {
  grid-area: 1 / 1; align-self: center; position: relative;
  margin: clamp(16px, 4vw, 40px);
}
.locked-panel .narration .btn { flex: 1 1 14rem; text-align: center; }
.locked-panel .balance { font: 600 var(--s0)/1.2 var(--display); font-stretch: condensed; color: var(--muted-ink); margin-top: 10px; }

/* ---------- Story player ---------- */

.choices { list-style: none; display: grid; gap: 14px; margin-top: 28px; }
.choices button {
  width: 100%; text-align: left; cursor: pointer; border: 0; border-radius: 0;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: baseline;
  padding: 18px 20px; background: var(--caption); color: #fff;
  font: 400 var(--s1)/1.4 var(--text);
  box-shadow: 0 0 0 0 var(--orange);
}
.choices button:hover { box-shadow: 6px 6px 0 0 var(--orange); }
.choices .price { font: 700 var(--s0)/1.2 var(--display); font-stretch: condensed; color: var(--orange-ink); }
.aside { background: var(--panel); color: #fff; padding: 16px 20px; margin-top: 18px; max-width: 34em; }
.recap { margin-top: 18px; font-style: italic; color: var(--muted-ink); }
/* A choice card: the option's panel on top, the line of the story under it (serif), the price on the right. */
.choices { padding-left: 0; margin-bottom: clamp(32px, 5vw, 56px); }
.choices button img { grid-column: 1 / -1; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; background: #141414; }
.chapter-head .episode { font: 600 var(--s0)/1.2 var(--display); font-stretch: condensed; color: var(--muted-ink); margin-top: 8px; }
.chapter-head .narration h1 a { color: inherit; text-decoration: none; }
.chapter-head .narration h1 a:hover { color: inherit; text-decoration: underline; }
.story-choice { margin-top: var(--gutter); }
.story-choice .narration { display: inline-block; max-width: 100%; }
.story-choice h2 { font: 400 var(--s2)/1.3 var(--text); letter-spacing: 0; }
/* Intro: the route's card, then its narration box. */
.story-intro { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); align-items: start; gap: clamp(20px, 3vw, 32px); padding-bottom: clamp(32px, 5vw, 56px); }
.story-card { width: 100%; max-width: 420px; height: auto; background: #141414; }
.story-intro h2 { font: 400 var(--s2)/1.3 var(--text); letter-spacing: 0; }
.story-intro h3 { font: 700 var(--s1)/1.2 var(--display); font-stretch: condensed; margin-top: 22px; }
.who { list-style: none; padding-left: 0; margin-top: 8px; display: grid; gap: 6px; }
.who strong { font: 700 var(--s0)/1.3 var(--display); font-stretch: condensed; margin-right: 6px; }
.story-intro .balance { font: 600 var(--s0)/1.2 var(--display); font-stretch: condensed; color: var(--muted-ink); margin-top: 18px; }
/* Endings: one tile per ending, found ones orange like free chapters, the rest outlined. State in words too. */
.story-endings { padding-bottom: clamp(48px, 7vw, 96px); }
.story-endings h2 { font-size: clamp(var(--s3), 4.4vw, 3.75rem); letter-spacing: -0.015em; color: #fff; }
.ending-list { list-style: none; padding-left: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: 10px; margin-top: 18px; }
.ending-list li { display: grid; align-content: start; gap: 4px; padding: 14px 16px; box-shadow: inset 0 0 0 2px var(--line-ink); }
.ending-list li.found { background: var(--orange); color: var(--ink); box-shadow: none; }
.ending-list .t { font: 700 var(--s1)/1.15 var(--display); font-stretch: condensed; }
.ending-list .state { font: 600 var(--s-1)/1.2 var(--display); font-stretch: condensed; }
.ending-list .hint { font-size: var(--s-1); font-style: italic; color: var(--muted-ink); }
/* Ending: the ending's panel, then the orange end card. */
.story-end .canon-note { font-style: italic; }
.story-end .you-chose { font: 700 var(--s0)/1.2 var(--display); font-stretch: condensed; margin-top: 20px; }
.recap-list { margin-top: 6px; padding-left: 1.4em; max-width: 30em; }
.story-end .btn-quiet, .story-end .btn-quiet:hover { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
/* Series page: the series' story paths, in the orange head band. */
.story-links { margin-top: 28px; }
.story-links h2 { font-size: var(--s2); }
.story-links ul { list-style: none; padding-left: 0; display: grid; gap: 12px; margin-top: 10px; }
.story-links a {
  display: grid; grid-template-columns: 60px minmax(0, 1fr); column-gap: 14px; align-items: start;
  background: var(--panel); color: #fff; text-decoration: none; padding: 10px; max-width: 30em;
}
.story-links img { grid-row: span 3; width: 60px; height: 80px; object-fit: cover; background: var(--caption); }
.story-links .t { font: 700 var(--s1)/1.15 var(--display); font-stretch: condensed; }
.story-links .hook { font-size: var(--s-1); margin-top: 0; }
.story-links .state { font: 600 var(--s-1)/1.2 var(--display); font-stretch: condensed; color: var(--muted-ink); }

/* ---------- Paper pages: account, sign-in, library ---------- */

.doc .btn { color: var(--ink); }
.doc .btn-quiet { color: #fff; }
.doc .btn:hover { color: var(--ink); }
.providers { list-style: none; display: grid; gap: 14px; margin-top: 28px; max-width: 26em; padding-left: 0 !important; }
.providers li + li { margin-top: 0 !important; }
.rows { list-style: none; padding-left: 0 !important; border-top: 2px solid var(--orange); }
.rows li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 20px; padding-block: 14px; border-bottom: 1px solid var(--line-ink); margin-top: 0 !important; }
.rows .what { font: 600 var(--s1)/1.2 var(--display); font-stretch: condensed; }
/* Account ID and the delete confirmation (type DELETE). */
.doc code { font: 600 var(--s0)/1.4 ui-monospace, "SF Mono", Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.confirm-form { margin-top: 32px; display: grid; gap: 10px; max-width: 26em; }
.confirm-form label { font: 600 var(--s1)/1.2 var(--display); font-stretch: condensed; }
.confirm-form input[type="text"] {
  font: 600 var(--s1)/1.2 var(--display); letter-spacing: 0.06em; padding: 10px 12px; min-width: 0;
  color: #fff; background: var(--ink); border: 2px solid var(--muted-ink); border-radius: 0;
}
.confirm-form input[type="text"]:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.confirm-form .actions { margin-top: 12px; }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .series-top { grid-template-columns: 140px minmax(0, 1fr); gap: 16px; }
  .series-cols { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .series-top { grid-template-columns: minmax(0, 1fr); margin-top: -120px; }
  .series-cover { width: 150px; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .facts dt { border-bottom: 0; padding-bottom: 0; }
}
@media (max-width: 760px) {
  .story-intro { grid-template-columns: minmax(0, 1fr); }
  .story-card { max-width: 360px; }
  .locked-panel > img { aspect-ratio: 3 / 4; }
}
@media (max-width: 420px) {
  .actions .btn { flex: 1 1 100%; }
  .narration { box-shadow: 4px 4px 0 0 var(--orange); }
}
@media (forced-colors: active) {
  .btn, .choices button { border: 2px solid ButtonText; }
}
@media (prefers-reduced-motion: no-preference) {
  .choices button { transition: box-shadow 120ms ease-out; }
}

/* ---------- Library rows ---------- */
.library li { justify-content: flex-start; }
.library .what { flex: 1 1 12em; }
.lib-cover { width: 60px; height: 80px; object-fit: cover; background: var(--caption); }

/* ---------- Novels: the book page (ink, orange band), the chapter page (paper, light or dark) ---------- */

/* Book page: cover | title, synopsis and chapters | the buy panel and the comic; then facts and other books. */
.book-top { display: grid; grid-template-columns: 280px minmax(0, 1fr) 300px; gap: 36px; align-items: start; padding-top: clamp(24px, 3vw, 40px); }
.book-cover-col img { width: 100%; height: auto; background: var(--panel); box-shadow: 6px 6px 0 0 var(--orange); }
.book-main .behind { font: 700 var(--s0)/1.3 var(--display); font-stretch: condensed; color: var(--orange-ink); }
.book-main .behind a { color: inherit; }
.book-main h1 { margin-top: 4px; font-size: clamp(var(--s4), 5vw, 3.5rem); line-height: 0.98; letter-spacing: -0.02em; color: #fff; }
.book-main .hook { margin-top: 16px; font-size: var(--s1); line-height: 1.6; max-width: 40em; }
.book-main .actions { margin-top: 18px; gap: 10px; }
.book-main .chapters { padding-block: 32px 0; }
.book-main .chapters h2 { font-size: var(--s3); }
.book-buy .book-offer { margin: 0; padding: 0; background: none; }
.book-buy .book-offer h2 { font-size: var(--s2); color: #fff; }
.book-buy .book-offer p { margin-top: 10px; }
.book-buy .actions { display: grid; gap: 10px; margin-top: 14px; }
.book-buy .actions form, .book-buy .actions .btn, .book-buy .book-free .btn { width: 100%; }
.book-buy .actions form .btn { width: 100%; }
.book-buy .book-free { margin-top: 10px; }
.book-buy .book-state { font: 700 var(--s1)/1.2 var(--display); font-stretch: condensed; color: #fff; }
.book-buy .book-download { margin-top: 12px; display: grid; gap: 8px; font-size: var(--s-1); color: var(--muted-ink); }
.book-buy a:not(.btn) { color: var(--orange-ink); }
.book-buy .balance { font: 600 var(--s0)/1.2 var(--display); font-stretch: condensed; color: var(--muted-ink); margin-top: 14px; }
.book-more { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 40px; align-items: start; padding-block: 24px clamp(48px, 7vw, 96px); }
.book-more .about { margin-top: 16px; }
.book-more .reviews + .about { margin-top: 48px; }
.doc .cancel { display: inline-flex; align-items: center; min-height: 44px; }
.offer-note a { color: var(--orange-ink); }
.novel-offer .balance { font: 600 var(--s0)/1.2 var(--display); font-stretch: condensed; color: var(--muted-ink); margin-top: 14px; }
@media (max-width: 1050px) {
  .book-top { grid-template-columns: 200px minmax(0, 1fr); }
  .book-buy { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .book-more { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 620px) {
  .book-top { grid-template-columns: minmax(0, 1fr); }
  .book-cover-col img { width: 170px; }
}

/* Series page: "Read the novel", each book a narration box (the site's voice) on ink. */
.novels { padding-block: clamp(40px, 6vw, 80px) 0; }
.novels h2 { font-size: clamp(var(--s3), 4.4vw, 3.75rem); letter-spacing: -0.015em; color: #fff; }
.novels .intro { margin-top: 12px; max-width: 34em; color: #e9e9e9; }
.novel-books { list-style: none; display: grid; gap: 22px; margin-top: 28px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 24rem), 1fr)); }
.novel-books li { background: var(--panel); color: #fff; padding: clamp(18px, 3vw, 26px); }
.novel-books h3 { font-size: var(--s3); line-height: 1; letter-spacing: -0.01em; }
.novel-books h3 a, .novel-books h2 a, .genre-list h2 a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.novel-books h3 a:hover { text-decoration: underline; }
.novel-books .hook { margin-top: 10px; }
.novel-books .state { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 12px; font: 600 var(--s0)/1.2 var(--display); font-stretch: condensed; color: var(--muted-ink); }
.novel-books .actions { margin-top: 18px; }
.novel-books :focus-visible { outline-color: #fff; }
/* With a cover: the cover in a narrow column beside the text (stacked on a phone). */
.novel-books li { display: grid; grid-template-columns: minmax(0, 9rem) minmax(0, 1fr); gap: 0 clamp(16px, 2.5vw, 24px); align-items: start; }
.novel-books .book-cover img { width: 100%; aspect-ratio: 720 / 1140; object-fit: cover; background: var(--ink); box-shadow: 4px 4px 0 0 var(--orange); }
.novel-books .behind { margin: 0 0 6px; font: 600 var(--s-1)/1.3 var(--display); font-stretch: condensed; color: var(--muted-ink); }
.novel-books .behind a { color: var(--orange-ink); }
.novels-index { padding-bottom: clamp(48px, 7vw, 96px); }
.novels-index h1 { font-size: clamp(var(--s4), 6vw, 5.5rem); line-height: 0.95; letter-spacing: -0.02em; color: #fff; }

/* Comic reader: the way across to the novel, under the end panel. */
.novel-link { max-width: var(--col); margin: 18px auto 0; }
.novel-link a { font: 600 var(--s1)/1.3 var(--display); font-stretch: condensed; color: var(--orange-ink); }
.novel-link a:hover { color: #fff; }

/* Chapter page: one column of prose, about 65 characters, in the Strip C serif. */
:root { --novel-size: var(--s1); }
.novel-col { width: 100%; max-width: calc(42rem + 2 * var(--side)); margin-inline: auto; padding: clamp(24px, 4vw, 48px) var(--side) 0; }
.novel-head { max-width: 100%; }
.novel-head .novel-book { margin-top: 0; font: 600 var(--s0)/1.3 var(--display); font-stretch: condensed; color: var(--muted-ink); }
.novel-head .novel-book a { color: var(--orange-ink); }
.novel-head h1 { margin-top: 12px; }
.novel-head .num { display: block; font: 600 var(--s1)/1.1 var(--display); font-stretch: condensed; color: var(--muted-ink); letter-spacing: 0; margin-bottom: 6px; }
.narration :focus-visible { outline-color: #fff; }

.novel-tools { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 20px; margin-top: 30px; }
/* The comic chapters this part is drawn in: a small orange panel, like a free chapter tile. */
.comic-tab {
  display: inline-block; padding: 9px 14px; background: var(--orange); color: var(--ink); text-decoration: none;
  font: 600 var(--s0)/1.2 var(--display); font-stretch: condensed;
}
.comic-tab:hover { outline: 2px solid currentColor; outline-offset: 2px; }
.text-size:not([hidden]) { display: flex; gap: 8px; margin-left: auto; }
.text-size button {
  min-height: 44px; padding: 6px 12px; cursor: pointer; border: 0; border-radius: 0; background: transparent; color: inherit;
  box-shadow: inset 0 0 0 2px currentColor; font: 600 var(--s-1)/1 var(--display); font-stretch: condensed;
}
.text-size button[disabled] { opacity: 0.45; cursor: default; }

.novel-notice { margin-top: 24px; padding: 12px 16px; box-shadow: inset 4px 0 0 0 var(--orange); font: 600 var(--s1)/1.3 var(--display); font-stretch: condensed; }

.novel-text {
  max-width: 65ch; margin-top: clamp(28px, 4vw, 44px);
  font: 400 var(--novel-size)/1.72 var(--text); font-variant-numeric: oldstyle-nums;
  hyphens: auto; -webkit-hyphens: auto; hanging-punctuation: first; overflow-wrap: break-word;
}
/* Set as a book: no space between paragraphs, the next one indented; a scene opens flush. */
.novel-text > p + p, .novel-text > blockquote + p { text-indent: 1.5em; }
.novel-text > p:first-child::first-line { font-variant-caps: small-caps; letter-spacing: 0.02em; }
.novel-text blockquote { margin: 1em 0; padding-left: 1.2em; box-shadow: inset 3px 0 0 0 var(--orange); font-style: italic; }
/* A scene break is three small panels in a row: the Strip C mark, drawn in the gutter of the text. */
.novel-text hr.scene {
  width: 46px; height: 10px; margin: 1.7em 0; border: 0;
  background: linear-gradient(90deg, var(--orange) 0 10px, transparent 10px 18px, var(--orange) 18px 28px, transparent 28px 36px, var(--orange) 36px 46px);
}
.novel-preview p { max-width: 65ch; }

.novel-offer { margin-top: clamp(32px, 5vw, 48px); }
.novel-offer h2 { font-size: clamp(var(--s2), 4vw, var(--s3)); }

.novel-end { margin-top: clamp(40px, 6vw, 64px); }
.novel-end .actions { margin-top: 20px; }
.novel-end .btn-quiet, .novel-end .btn-quiet:hover { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.novel-end .balance { color: var(--ink); font: 600 var(--s0)/1.2 var(--display); font-stretch: condensed; margin-top: 14px; }
.novel-end .offer-note a { color: var(--ink); }

body.paper .novel-nav { max-width: calc(42rem + 2 * var(--side)); }

/* The 16+ notice over a novel chapter: the text is in the page, behind a full-window dialog until confirmed. */
.age-overlay {
  position: fixed; inset: 0; z-index: 50; overflow-y: auto;
  display: grid; place-items: center; padding: var(--side);
  background: rgb(0 0 0 / 0.9);
}
.age-overlay .notice-box { width: 100%; }
.age-overlay h2 { font-size: clamp(var(--s3), 5vw, var(--s4)); line-height: 0.98; }
body:has(> .age-overlay) { overflow: hidden; }

.lib-sub { display: block; font: 600 var(--s-1)/1.3 var(--display); font-stretch: condensed; color: var(--muted-ink); }

@media (forced-colors: active) {
  .novel-text hr.scene { background: none; border-top: 4px dotted CanvasText; }
  .comic-tab, .text-size button { border: 2px solid ButtonText; }
}
@media (max-width: 420px) {
  /* The offer's buttons sit in forms: the form takes the full row and its button fills it. */
  .novel-offer .actions > *, .novel-end .actions > * { flex: 1 1 100%; }
  .novel-offer form .btn, .novel-end form .btn { width: 100%; }
  .novel-head { box-shadow: 4px 4px 0 0 var(--orange); }
  .text-size:not([hidden]) { margin-left: 0; }
}

/* ---------- Coins (/coins, paper): each pack is a narration box, the coin count is the headline ---------- */
.packs { list-style: none; padding-left: 0 !important; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11.5rem), 1fr)); gap: 22px 18px; margin-top: 32px !important; }
.packs .pack {
  margin-top: 0 !important; display: flex; flex-direction: column; gap: 6px; padding: 18px 18px 20px;
  background: var(--panel); color: #fff;
}
.pack-total { margin-top: 0 !important; display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 0.3em; font-family: var(--display); font-stretch: condensed; }
.pack-total .n { font-size: clamp(var(--s4), 6vw, 3.5rem); font-weight: 700; line-height: 0.95; letter-spacing: -0.02em; color: var(--orange-ink); }
.pack-total .u { font-size: var(--s1); font-weight: 600; }
.pack-split { margin-top: 0 !important; font-size: var(--s-1); color: var(--muted-ink); }
.pack form { margin-top: auto; padding-top: 14px; }
.pack > .btn { margin-top: auto; }
.doc .pack .btn { width: 100%; justify-content: center; }
.coin-balance { margin-top: 20px; font: 600 var(--s1)/1.3 var(--display); font-stretch: condensed; }
.coins .fine { margin-top: 26px; max-width: 36em; }
@media (forced-colors: active) {
  .packs .pack { border: 2px solid CanvasText; }
}

/* Small phones: a smaller cover so the text column keeps room. */
@media (max-width: 420px) {
  .novel-books li { grid-template-columns: minmax(0, 5.5rem) minmax(0, 1fr); }
}

/* ---------- Browse and search (/browse, /search): chips, then grids of covers ---------- */
.browse { padding-block: clamp(28px, 4vw, 48px) clamp(48px, 7vw, 96px); }
.browse h1 { font-size: clamp(var(--s4), 6vw, 4.5rem); line-height: 0.95; letter-spacing: -0.02em; color: #fff; margin-bottom: 20px; }
.browse .chips { margin-top: 20px; }
.browse .chips + .chips { margin-top: 12px; }
.browse .intro { margin-top: 28px; max-width: 36em; }
.browse .intro a { color: var(--orange-ink); }
.row-head { margin: clamp(32px, 4vw, 48px) 0 16px; font-size: clamp(var(--s3), 3.6vw, 2.75rem); color: #fff; }
.page-search { display: flex; flex-wrap: wrap; gap: 10px; max-width: 40rem; margin-bottom: 8px; }
.page-search label { flex: 1 1 16rem; }
.page-search input {
  width: 100%; height: 48px; padding: 0 14px; border: 0; border-radius: 0; background: var(--caption); color: #fff;
  font: 500 var(--s1)/1 var(--display); font-stretch: condensed; -webkit-appearance: none; appearance: none;
}
.page-search input::placeholder { color: var(--muted-ink); opacity: 1; }

/* ---------- Genres: hubs (/genres/<slug>), their index, the "Browse by genre" row, series-page links ---------- */
.genre-hub, .genres-index { padding-bottom: clamp(48px, 7vw, 96px); }
.genre-hub .behind { margin-top: 0; font: 600 var(--s0)/1.3 var(--display); font-stretch: condensed; }
.genre-hub .behind a { color: var(--orange-ink); }
.genre-hub h1, .genres-index h1 { font-size: clamp(var(--s4), 6vw, 5.5rem); line-height: 0.95; letter-spacing: -0.02em; color: #fff; }
.genre-hub h1 { margin-top: 8px; }
.novel-books h2 { font-size: var(--s3); line-height: 1; letter-spacing: -0.01em; }
.novel-books h2 a { text-decoration: none; }
.novel-books h2 a:hover { text-decoration: underline; }
.genre-hub .book-cover img { aspect-ratio: 3 / 4; }
.genre-hub .actions { display: flex; flex-wrap: wrap; gap: 12px; }
.genre-list { list-style: none; display: grid; gap: 22px; margin-top: 28px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); }
.genre-list li { background: var(--panel); color: #fff; padding: clamp(18px, 3vw, 26px); }
.genre-list h2 { font-size: var(--s3); line-height: 1; }
.genre-list h2 a { color: inherit; text-decoration: none; }
.genre-list h2 a:hover { color: var(--orange-ink); }
.genre-list p { margin-top: 10px; color: var(--muted-ink); }
.genre-row { margin-top: clamp(28px, 4vw, 44px); }
.genre-row h2 { font-size: var(--s2); letter-spacing: -0.01em; }
.genre-row ul { list-style: none; display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; padding: 0; }
.genre-row a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; background: var(--orange); color: var(--ink); text-decoration: none;
  font: 700 var(--s1)/1.2 var(--display); font-stretch: condensed;
}
.genre-row a:hover { background: #fff; }
.genre-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; font: 600 var(--s0)/1.3 var(--display); font-stretch: condensed; }
.genre-links a { color: var(--orange-ink); }

/* ---------- Reviews (series and book pages, /reviews?page=n): summary, the reader's form, the list ---------- */
.reviews { margin-top: 40px; max-width: 40em; }
.reviews h2 { font-size: clamp(var(--s3), 3.6vw, 2.75rem); letter-spacing: -0.015em; color: #fff; }
.reviews a:not(.btn) { color: var(--orange-ink); }
.reviews .actions { margin-top: 16px; }
.reviews > .fine { margin-top: 16px; }
.stars { color: var(--orange-ink); letter-spacing: 0.08em; font-family: var(--display); white-space: nowrap; }
.stars .off { color: #767676; }   /* unlit: 3.7:1 on panel, 4.6:1 on ink */
.rating-summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-top: 14px; font: 600 var(--s1)/1.2 var(--display); font-stretch: condensed; color: var(--muted-ink); }
.rating-summary .stars { font-size: var(--s2); }
.rating-summary strong { font-size: var(--s3); line-height: 1; color: #fff; }
.star-summary { margin-top: 10px; font: 600 var(--s1)/1.2 var(--display); font-stretch: condensed; color: var(--muted-ink); }
.star-summary a { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; min-height: 44px; align-content: center; color: inherit; text-decoration: none; }
.star-summary a:hover span:last-child { text-decoration: underline; }
.star-summary strong { color: #fff; }
.reviews .note { margin-top: 16px; padding: 10px 14px; background: var(--caption); box-shadow: inset 4px 0 0 0 var(--orange); }
.reviews .problem { padding: 10px 14px; background: var(--caption); box-shadow: inset 4px 0 0 0 var(--orange); color: #fff; font-weight: 700; }

/* The form: five radio buttons drawn as stars (the chosen one and those before it lit), the text, the spoiler box. */
.review-form, .review-age { display: grid; gap: 12px; margin-top: 20px; padding: clamp(16px, 3vw, 24px); background: var(--panel); }
.review-age p { margin: 0; }
.review-age .actions { margin-top: 4px; }
.star-input { margin: 0; padding: 0; border: 0; min-width: 0; }
.star-input legend, .review-form > label:not(.check) { padding: 0; font: 700 var(--s1)/1.2 var(--display); font-stretch: condensed; color: #fff; }
.star-row { position: relative; display: inline-flex; margin-top: 4px; }
.star-row input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.star-row label { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; cursor: pointer; font-size: 2rem; line-height: 1; color: #767676; }
/* Chosen: orange. Hover previews in white, so it never reads as chosen. Focus: the white outline below. */
.star-row input:checked + label, .star-row label:has(~ input:checked) { color: var(--orange-ink); }
.star-row:hover label, .star-row:hover input:checked + label, .star-row:hover label:has(~ input:checked) { color: #fff; }
.star-row label:hover ~ label, .star-row label:hover ~ label:has(~ input:checked), .star-row label:hover ~ input:checked + label { color: #767676; }
.star-row input:focus-visible + label { outline: 3px solid #fff; outline-offset: -3px; }
.review-form textarea {
  width: 100%; min-height: 9em; padding: 10px 12px; resize: vertical;
  font: 400 var(--s0)/1.5 var(--text); color: #fff; background: var(--ink); border: 2px solid var(--muted-ink); border-radius: 0;
}
.review-form textarea:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.review-form .check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: var(--s0); cursor: pointer; }
.review-form .check input { width: 20px; height: 20px; accent-color: var(--orange); }
.review-form .fine, .review-form .actions { margin: 0; }

/* The list: name, team badge, stars and date; the text; Report and Block under someone else's review. */
.review-list { list-style: none; margin-top: 24px; border-top: 1px solid var(--line-ink); }
.review { padding-block: 18px; border-bottom: 1px solid var(--line-ink); }
.review-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font: 600 var(--s0)/1.3 var(--display); font-stretch: condensed; color: var(--muted-ink); }
.review-head .who { font-size: var(--s1); font-weight: 700; color: #fff; overflow-wrap: anywhere; }
.badge { display: inline-block; padding: 2px 8px; background: var(--orange); color: var(--ink); font: 700 var(--s-1)/1.3 var(--display); font-stretch: condensed; }
.badge.mine { background: var(--caption); color: #fff; }
.review-body p, .review .spoiler p { margin-top: 8px; font-size: var(--s0); line-height: 1.6; overflow-wrap: anywhere; }
.spoiler { margin-top: 8px; }
.spoiler summary, .item-actions summary { display: inline-flex; align-items: center; min-height: 44px; cursor: pointer; font: 700 var(--s0)/1.2 var(--display); font-stretch: condensed; color: var(--orange-ink); }
.item-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0 20px; margin-top: 6px; }
.item-actions summary { color: var(--muted-ink); font-size: var(--s-1); }
.report-form { display: grid; gap: 8px; margin-top: 4px; padding: 12px; background: var(--panel); font-size: var(--s-1); }
.report-form select { min-height: 44px; padding: 0 10px; font: 600 var(--s0)/1.2 var(--display); color: #fff; background: var(--ink); border: 2px solid var(--muted-ink); border-radius: 0; }
.report-form .btn { min-height: 44px; font-size: var(--s0); }
.link-btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0; border: 0; background: none; cursor: pointer; font: 700 var(--s-1)/1.2 var(--display); font-stretch: condensed; color: var(--muted-ink); text-decoration: underline; text-underline-offset: 0.18em; }
.link-btn:hover, .item-actions summary:hover { color: #fff; }
.reviews .more { margin-top: 20px; }

/* /series/<slug>/reviews?page=n */
.reviews-page { padding-block: clamp(24px, 4vw, 48px) clamp(48px, 7vw, 96px); }
.reviews-page .back { font: 600 var(--s0)/1.2 var(--display); font-stretch: condensed; }
.reviews-page .back a { display: inline-flex; align-items: center; min-height: 44px; color: var(--orange-ink); }
.reviews-page h1 { margin-top: 6px; font-size: clamp(var(--s3), 5vw, var(--s4)); line-height: 0.98; letter-spacing: -0.015em; color: #fff; }
.reviews-page .reviews { margin-top: 12px; }
.pager { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 24px; }
.spoiler summary::before { content: "+"; display: inline-block; width: 1em; font-weight: 700; }
.spoiler[open] summary::before { content: "\2212"; }

/* ---------- Chapter comments (a comic chapter's end, a novel chapter after its nav): the Reviews look, plus
   Like, Reply and one level of replies ---------- */
.comments { margin-top: clamp(40px, 6vw, 56px); }
.novel-comments { padding-top: 0; padding-bottom: clamp(48px, 7vw, 96px); }
.novel-comments .comments { margin-top: 0; }
.comment { padding-block: 18px; border-bottom: 1px solid var(--line-ink); }
.comment-body p, .comment .spoiler p { margin-top: 8px; font-size: var(--s0); line-height: 1.6; overflow-wrap: anywhere; }
.comment-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0 16px; margin-top: 6px; }
/* Block and Report join the one row, so on a phone it wraps item by item, not as a block. */
.comment-actions .item-actions { display: contents; }
/* An open Reply or Report takes the whole row under the actions. */
.comment-actions .reply[open], .comment-actions .report[open] { order: 9; flex: 1 1 100%; }
.reply summary { display: inline-flex; align-items: center; min-height: 44px; cursor: pointer; font: 700 var(--s-1)/1.2 var(--display); font-stretch: condensed; color: var(--muted-ink); }
.reply summary:hover { color: #fff; }
.reply .comment-form { margin-top: 4px; padding: 12px; }
.like-btn, .likes {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0;
  font: 700 var(--s-1)/1.2 var(--display); font-stretch: condensed; color: var(--muted-ink);
}
.like-btn { border: 0; background: none; cursor: pointer; }
.like-btn:hover { color: #fff; }
.like-btn[aria-pressed="true"] { color: var(--orange-ink); }
.like-n { font-variant-numeric: tabular-nums; }
.replies { list-style: none; margin-top: 6px; padding-left: clamp(14px, 3vw, 24px); border-left: 2px solid var(--line-ink); }
.replies .comment { padding-block: 10px; border-bottom: 0; }
.replies .comment + .comment { border-top: 1px solid var(--line-ink); }
.comment.removed > .comment-gone { font: italic 600 var(--s0)/1.3 var(--display); font-stretch: condensed; color: var(--muted-ink); }
.comment.removed > .replies { margin-top: 10px; }
.like-btn > [aria-hidden], .likes > [aria-hidden] { font-size: var(--s1); line-height: 1; }

/* ---------- The reader's own posts: Delete (behind "Yes, delete"), Remove my rating, removal notices ---------- */
.delete summary { display: inline-flex; align-items: center; min-height: 44px; cursor: pointer; font: 700 var(--s-1)/1.2 var(--display); font-stretch: condensed; color: var(--muted-ink); }
.delete summary:hover { color: #fff; }
.delete-form { display: grid; gap: 8px; justify-items: start; margin-top: 4px; padding: 12px; background: var(--panel); font-size: var(--s-1); }
.delete-form p { margin: 0; color: #fff; }
.delete-form .btn { min-height: 44px; font-size: var(--s0); }
.comment-actions .delete[open] { order: 9; flex: 1 1 100%; }
.own-hidden { margin-top: 8px; }
.star-input .unrate { margin-left: 12px; vertical-align: middle; }
.mod-notices { display: grid; gap: 10px; margin-top: 16px; }
.mod-notice { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; padding: 10px 14px; background: var(--caption); box-shadow: inset 4px 0 0 0 var(--orange); color: #fff; }
.mod-notice p { margin: 0; flex: 1 1 24em; font-size: var(--s0); line-height: 1.5; overflow-wrap: anywhere; }
.mod-notice a { color: var(--orange-ink); }
.mod-notice .link-btn { color: #fff; }

/* Your posts (/account): each of the reader's reviews and comments, with Delete. */
.my-posts { list-style: none; margin-top: 16px; padding: 0; border-top: 1px solid var(--line-ink); }
.doc .my-posts { padding-left: 0; }
.my-post { padding-block: 14px; border-bottom: 1px solid var(--line-ink); }
.doc li.my-post + li.my-post { margin-top: 0; }
.my-post-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0; font: 600 var(--s0)/1.3 var(--display); font-stretch: condensed; color: var(--muted-ink); }
.my-post-head .what { color: #fff; }
.my-post-head a { color: var(--orange-ink); overflow-wrap: anywhere; }
.doc .my-post-text { margin-top: 6px; overflow-wrap: anywhere; }
.your-posts .note { margin-top: 12px; padding: 10px 14px; background: var(--caption); box-shadow: inset 4px 0 0 0 var(--orange); }
.your-posts .pager { margin-top: 16px; }
