@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/PlusJakartaSans-VariableFont_wght.310b1a7f9485.ttf") format("truetype");
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: italic;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/PlusJakartaSans-Italic-VariableFont_wght.36b66648f3bc.ttf") format("truetype");
}
@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("../fonts/Figtree-VariableFont_wght.1bb7463418dc.ttf") format("truetype");
}
@font-face {
  font-family: "Figtree";
  font-style: italic;
  font-weight: 300 900;
  font-display: swap;
  src: url("../fonts/Figtree-Italic-VariableFont_wght.7f7ee45b2a15.ttf") format("truetype");
}

:root {
  /* "Book" theme: a faded version of the logo's parchment, so the logo stands out. */
  --paper: #f3ecdd;
  --ink: #2b1f1a;
  --muted: #6f6052;
  --rule: #ddd1ba;
  --accent: #680a1c;
  --gold: #80602a;
  --hover: rgba(43, 31, 26, 0.08);
  --band: #46020b;
  --panel: #fbf7ee;
  --band-ink: #f3ecdd;
  --band-gold: #d4b06a;
  --band-hover: rgba(255, 255, 255, 0.12);
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Noto Serif", Georgia, serif;
  --sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  --reading: "Figtree", "Plus Jakarta Sans", system-ui, sans-serif;
  --measure: 42rem;
}
html[data-theme="light"] {
  --paper: #faf8f4;
  --ink: #221b1d;
  --muted: #6f6468;
  --rule: #e4ddd3;
  --hover: rgba(34, 27, 29, 0.07);
  --panel: #ffffff;
}
html[data-theme="dark"] {
  --paper: #17141a;
  --ink: #e7e0d7;
  --muted: #9a9098;
  --rule: #302a30;
  --accent: #e06b7e;
  --gold: #c9a25c;
  --hover: rgba(255, 255, 255, 0.09);
  --band: #22050b;
  --panel: #1f1b22;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { background: var(--paper); color: var(--ink); }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
img { max-width: 100%; height: auto; }

h1, h2, h3 {
  font-family: var(--sans);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 0.5em;
}

/* Site frame ---------------------------------------------------------- */
.site-main, .site-footer {
  max-width: 64rem;
  margin: 0 auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

/* Header: your burned-paper image behind the menus, the logo in its hole ------ */
.site-header {
  position: relative;
  height: 150px;
  background: transparent; /* the page shows through the hole in the image */
  color: var(--band-ink);
  clip-path: inset(0 0 -100px 0); /* the burned edge may hang below the band */
}
/* The image is about 2,960 px wide at this size, centred, nothing beside it. */
.site-header::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  height: 194px;
  background: url("../img/header.404e31fd053a.webp") center top / auto 194px no-repeat;
  pointer-events: none;
}
html[data-theme="dark"] .site-header::before { filter: brightness(0.55); }
.site-header-inner {
  position: relative;
  z-index: 1;
  max-width: 64rem;
  height: 100%;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1rem;
}
.site-nav--left { justify-self: end; }
.site-nav--right { justify-self: start; gap: 0.5rem; }
.site-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.9rem;
  border-radius: 4px;
  color: var(--band-ink);
  text-decoration: none;
}
.site-nav a:hover { background: var(--band-hover); }
.site-nav svg {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--band-gold);
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.header-search { position: relative; display: flex; align-items: center; }
.header-search svg { position: absolute; left: 0.55rem; pointer-events: none; }
.header-search input {
  width: 11rem;
  font: inherit;
  font-family: var(--sans);
  font-size: 0.9375rem;
  padding: 0.5rem 0.6rem 0.5rem 2.6rem;
  background: var(--band-hover);
  color: var(--band-ink);
  border: 1px solid transparent;
  border-radius: 4px;
}
.header-search input::placeholder { color: var(--band-ink); opacity: 0.7; }
.header-search input:focus { background: rgba(255, 255, 255, 0.18); border-color: rgba(255, 255, 255, 0.35); }
.site-header .theme-button { color: var(--band-ink); border-color: rgba(255, 255, 255, 0.35); }
.site-header .theme-button:hover { background: var(--band-hover); border-color: var(--band-ink); }

/* The logo sits inside the hole in the image. The side padding keeps the
   menus clear of the hole's burned edges. */
.site-logo { align-self: start; padding: 40px 80px 0; background: transparent; }
.site-logo img { display: block; height: 140px; width: auto; }
html[data-theme="dark"] .site-logo img { filter: brightness(0) invert(1); }

/* Mobile header: menu button on the left, monogram + wordmark inside the hole. */
.menu-button, .site-wordmark { display: none; }
.menu-button {
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  background: transparent;
  color: var(--band-ink);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  cursor: pointer;
}
.menu-button svg { width: 1.5rem; height: 1.5rem; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }
.site-wordmark { align-items: center; gap: 0.5rem; }
.site-wordmark img { display: block; height: 1.375rem; width: auto; }
.site-wordmark .site-mark { height: 2.75rem; }
@media (max-width: 48rem) {
  .site-header { height: 110px; }
  .site-header::before { height: 143px; background: url("../img/header.404e31fd053a.webp") center top / auto 143px no-repeat; }
  .site-header-inner { display: flex; align-items: center; gap: 0.875rem; padding: 0 1.25rem; }
  .site-header .site-nav, .site-header .site-logo { display: none; }
  .menu-button { display: inline-flex; }
  .site-header .site-wordmark {
    display: flex;
    position: absolute;
    left: 50%;
    top: 38px;
    transform: translateX(-50%);
  }
}
html[data-theme="dark"] .site-wordmark img { filter: brightness(0) invert(1); }

/* Mobile drawer --------------------------------------------------------- */
html.drawer-open, html.drawer-open body { overflow: hidden; }
.drawer-overlay { position: fixed; inset: 0; background: rgba(20, 10, 8, 0.45); z-index: 9; }
.drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(82vw, 19rem);
  z-index: 10;
  display: flex;
  flex-direction: column;
  padding: 0.75rem 1.25rem 1.5rem;
  background: var(--paper);
  border-right: 1px solid var(--rule);
  overflow-y: auto;
}
.drawer[hidden], .drawer-overlay[hidden] { display: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.75rem; }
.drawer-head .site-wordmark { display: flex; padding: 0; background: transparent; }
.drawer-head .site-wordmark img { height: 1.5rem; }
.drawer-head .site-wordmark .site-mark { height: 2.5rem; }
.drawer-close {
  font: inherit;
  font-size: 1.5rem;
  line-height: 1;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 2px;
  cursor: pointer;
}
.drawer-link {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.75rem 0.25rem;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.0625rem;
  border-bottom: 1px solid var(--rule);
}
.drawer-link svg, .drawer-search svg {
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
  color: var(--accent);
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.drawer-search { display: flex; align-items: center; gap: 0.875rem; padding: 0.75rem 0.25rem; border-bottom: 1px solid var(--rule); }
.drawer-search input {
  flex: 1;
  min-width: 0;
  font: inherit;
  padding: 0.35rem 0.6rem;
  background: transparent;
  color: inherit;
  border: 1px solid var(--rule);
  border-radius: 2px;
}
.drawer-theme { display: flex; align-items: center; gap: 0.5rem; padding-top: 1rem; }
.drawer-theme span { color: var(--muted); font-size: 0.875rem; margin-right: 0.25rem; }
.theme-button[aria-pressed="true"] { background: var(--accent); color: #fff; border-color: var(--accent); }
.site-main { padding-top: calc(44px + 1.5rem); padding-bottom: 4rem; }
@media (max-width: 48rem) { .site-main { padding-top: calc(33px + 1.5rem); } }
.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.875rem;
}
.footer-nav { display: flex; flex-wrap: wrap; gap: 1rem; }
.footer-nav a { color: var(--muted); text-decoration: none; }
.footer-nav a:hover { color: var(--accent); }
.footer-copy { margin: 0; }
.page-title { font-size: 2rem; margin-bottom: 1.5rem; }
.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.page-head .page-title { margin: 0; }
.empty { color: var(--muted); }

/* Buttons and forms --------------------------------------------------- */
.reader-button, .theme-button {
  font: inherit;
  font-size: 0.9375rem;
  padding: 0.35rem 0.75rem;
  background: transparent;
  color: inherit;
  border: 1px solid var(--rule);
  border-radius: 2px;
  cursor: pointer;
  text-decoration: none;
}
.reader-button:hover, .theme-button:hover { border-color: var(--ink); }
.reader-button[aria-pressed="true"] { background: var(--accent); color: #fff; border-color: var(--accent); }
.reader-button:disabled { opacity: 0.4; cursor: default; }
.reader-link {
  font: inherit;
  font-size: 0.875rem;
  background: none;
  border: 0;
  padding: 0;
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
  justify-self: start;
}
.button {
  display: inline-block;
  padding: 0.625rem 1.125rem;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border-radius: 2px;
  font-weight: 600;
}
.button:hover { background: var(--ink); color: var(--paper); }
.button--secondary { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.button--secondary:hover { background: var(--accent); color: #fff; }
.search { display: flex; gap: 0.5rem; width: min(100%, 22rem); }
.search input {
  flex: 1;
  min-width: 0;
  font: inherit;
  padding: 0.35rem 0.6rem;
  background: var(--paper);
  color: inherit;
  border: 1px solid var(--rule);
  border-radius: 2px;
}

/* Home ---------------------------------------------------------------- */
.home { display: grid; grid-template-columns: minmax(0, 1fr) 17rem; gap: 2.5rem 3rem; }
@media (max-width: 56rem) { .home { grid-template-columns: 1fr; } }
.home-section { margin-bottom: 2.5rem; }
.home-section h2 {
  font-size: 1.375rem;
  padding-bottom: 0.4rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--gold);
}
.home-main .novel-grid { grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr)); gap: 1.5rem 1.25rem; }
.news-list { list-style: none; margin: 0; padding: 0; }
.news-list li { padding: 0.75rem 0; border-bottom: 1px solid var(--rule); }
.news-list li a { font-family: var(--sans); font-weight: 600; font-size: 1.0625rem; }
.news-list time { color: var(--muted); font-size: 0.875rem; margin-left: 0.5rem; }
.news-list p { margin: 0.25rem 0 0; color: var(--muted); font-size: 0.9375rem; }
.more { font-size: 0.9375rem; }
.update-list { list-style: none; margin: 0; padding: 0; }
.update-row { display: flex; gap: 0.875rem; padding: 0.625rem 0; border-bottom: 1px solid var(--rule); }
.update-cover img, .update-cover span {
  display: block;
  width: 3rem;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: var(--rule);
  border-radius: 2px;
}
.update-text { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.update-title { font-family: var(--sans); font-weight: 600; color: var(--ink); text-decoration: none; }
.update-title:hover { color: var(--accent); }
.update-chapter { color: var(--accent); text-decoration: none; font-size: 0.9375rem; }
.update-chapter:hover { text-decoration: underline; }
.update-meta { color: var(--muted); font-size: 0.8125rem; }
.trend-list { margin: 0; padding-left: 1.5rem; }
.trend-list li { padding: 0.4rem 0; border-bottom: 1px solid var(--rule); }
.trend-list li::marker { color: var(--gold); font-weight: 600; }
.trend-list a { font-family: var(--sans); font-weight: 600; color: var(--ink); text-decoration: none; }
.trend-list a:hover { color: var(--accent); }
.trend-meta { display: block; color: var(--muted); font-size: 0.8125rem; }

/* Prose pages (news, about, privacy...) ------------------------------- */
.prose { max-width: var(--measure); font-family: var(--sans); font-size: 1.0625rem; line-height: 1.65; }
.prose h2 { font-size: 1.375rem; margin-top: 1.75em; }
.prose h3 { font-size: 1.125rem; margin-top: 1.5em; }
.prose p, .prose ul, .prose ol { margin: 0 0 1em; }
.prose-date { color: var(--muted); font-size: 0.9375rem; margin: -0.5rem 0 1.5rem; }

/* Library ------------------------------------------------------------- */
.novel-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 2rem 1.5rem;
}
.novel-grid a { color: inherit; text-decoration: none; display: block; }
.novel-grid a:hover .novel-title { color: var(--accent); }
.novel-cover {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: var(--rule);
  margin-bottom: 0.625rem;
  border-radius: 2px;
}
.novel-title { font-family: var(--sans); font-weight: 600; line-height: 1.25; display: block; }
.novel-author, .novel-langs { display: block; color: var(--muted); font-size: 0.875rem; }

/* Novel page ---------------------------------------------------------- */
.novel-header { display: grid; grid-template-columns: 1fr; gap: 1.5rem; margin-bottom: 2.5rem; }
@media (min-width: 40rem) {
  .novel-header { grid-template-columns: 12rem 1fr; align-items: start; }
}
.novel-cover--large { width: 12rem; max-width: 50%; margin: 0; }
.novel-heading { font-size: clamp(1.75rem, 4vw, 2.75rem); }
.novel-byline { font-size: 1.125rem; margin: 0 0 0.5rem; }
.novel-meta { color: var(--muted); margin: 0 0 1rem; }
.novel-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.languages { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; margin-bottom: 1.25rem; }
.languages .current { font-weight: 600; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
.novel-description {
  max-width: var(--measure);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  margin-bottom: 2.5rem;
}
.chapters h2 { font-size: 1.375rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); }
.chapter-list { list-style: none; margin: 0; padding: 0; column-gap: 3rem; }
@media (min-width: 48rem) { .chapter-list { columns: 2; } }
.chapter-list li { break-inside: avoid; padding: 0.4rem 0; border-bottom: 1px solid var(--rule); }
.chapter-list a { color: inherit; text-decoration: none; display: flex; gap: 0.75rem; }
.chapter-list a:hover { color: var(--accent); }
.chapter-number { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 2.5rem; flex-shrink: 0; }

/* Reader -------------------------------------------------------------- */
.reading .site-main { max-width: none; padding: 0; }
.reader {
  --reader-size: 18px;
  --reader-font: var(--reading);
  --reader-leading: 1.75;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.reader[data-font="serif"] { --reader-font: var(--serif); }
.reader[data-font="serif"] { --reader-font: var(--serif); }
.reader[data-font="sans"] { --reader-font: var(--reading); }
.reader[data-font="wide"] { --reader-font: Verdana, "DejaVu Sans", Geneva, sans-serif; }
.reader[data-spacing="tight"] { --reader-leading: 1.5; }
.reader[data-spacing="loose"] { --reader-leading: 2; }

.reader-bar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 1rem;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  font-size: 0.9375rem;
}
.reader-back {
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 40%;
}
.reader-chapter {
  flex: 1;
  text-align: center;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 40rem) { .reader-chapter { display: none; } .reader-back { flex: 1; max-width: none; } }
.reader-actions { display: flex; gap: 0.5rem; align-items: center; }
.reader-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; }
.reader-progress-bar { height: 100%; width: 0; background: var(--gold); }

.reader-settings {
  position: fixed;
  top: 3.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  width: min(calc(100% - 2rem), 40rem);
  padding: 1rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  display: grid;
  gap: 0.75rem;
}
.reader-settings[hidden] { display: none; }
.setting { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.setting-label { width: 5rem; color: var(--muted); }
.setting-value { min-width: 2rem; text-align: center; font-variant-numeric: tabular-nums; }

.reader-content { flex: 1; }
.reader-inner { max-width: var(--measure); margin: 0 auto; padding: 1.5rem 1.25rem 4rem; }
.reader .chapter-heading { font-family: var(--reader-font); font-size: calc(var(--reader-size) * 1.5); margin: 0.5rem 0 1.5rem; }
.chapter-body {
  font-family: var(--reader-font);
  font-size: var(--reader-size);
  line-height: var(--reader-leading);
}
.chapter-body p { margin: 0 0 1em; }
.chapter-body img { display: block; margin: 1.5rem auto; }
.chapter-body h1, .chapter-body h2, .chapter-body h3 { break-after: avoid; }
.chapter-end {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 0.9375rem;
}

.reader-foot {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 1rem;
  background: var(--paper);
  border-top: 1px solid var(--rule);
  font-size: 0.9375rem;
}
.reader-indicator { color: var(--muted); font-variant-numeric: tabular-nums; }

/* Paged layout: the viewport is the page, columns are the pages ---------- */
html.paged, html.paged body { height: 100%; overflow: hidden; }
.reader[data-layout="pages"] { height: 100vh; height: 100dvh; min-height: 0; }
.reader[data-layout="pages"] .reader-bar,
.reader[data-layout="pages"] .reader-foot { position: static; }
.reader[data-layout="pages"] .reader-progress { display: none; }
.reader[data-layout="pages"] .reader-content {
  width: 100%;
  max-width: 48rem;
  margin: 0 auto;
  min-height: 0;
  overflow: hidden;
  position: relative;
}
.reader[data-layout="pages"] .reader-inner {
  height: 100%;
  max-width: none;
  margin: 0;
  padding: 1.25rem;
  column-width: var(--page-width, 30rem);
  column-gap: var(--page-gap, 48px);
  column-fill: auto;
}
.reader[data-layout="pages"] .chapter-body img { max-height: 60vh; break-inside: avoid; }

/* Error pages --------------------------------------------------------- */
.error-page { max-width: var(--measure); }

/* Title Case: headings, navigation, buttons, labels ---------------------- */
h1, h2, h3,
.site-nav a, .drawer-link, .footer-nav a,
.button, .theme-button, .reader-button, .reader-link,
.setting-label, .drawer-theme span, .languages, .more,
.novel-title, .update-title, .trend-list a, .news-list li a,
.chapter-end a, .reader-back {
  text-transform: capitalize;
}
input::placeholder { text-transform: capitalize; }

/* Panels, cards, rows, rankings (WTR-style home page) ----------------------- */
.home { grid-template-columns: minmax(0, 1fr) 22rem; gap: 1.25rem; }
@media (max-width: 62rem) { .home { grid-template-columns: 1fr; } }
.home-main, .home-side { display: flex; flex-direction: column; gap: 1.25rem; min-width: 0; }
.panel {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--rule);
}
.panel-head h2 { margin: 0; padding: 0; border: 0; font-size: 1.125rem; font-weight: 600; }
.panel-body { padding: 1rem; }
.panel .empty { margin: 0; padding: 1rem; }
.button--small { padding: 0.35rem 0.75rem; font-size: 0.875rem; }
.announce {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
}
.announce-title { color: #fff; font-weight: 600; text-decoration: none; }
.announce .button { background: var(--paper); color: var(--accent); }
.announce .button:hover { background: #fff; color: var(--accent); }
.notice { padding: 0.9rem 1rem; background: var(--band); color: var(--band-ink); border-radius: 8px; }

/* Horizontal rows of cards */
.scroller { position: relative; }
.scroller-track {
  display: flex;
  gap: 0.75rem;
  padding: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}
.scroller-track > .card { flex: 0 0 10.5rem; scroll-snap-align: start; }
.scroller-arrow {
  position: absolute;
  top: 38%;
  width: 2.25rem;
  height: 2.25rem;
  display: none;
  border: 1px solid var(--rule);
  border-radius: 50%;
  background: var(--panel);
  color: var(--ink);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}
.scroller-arrow--prev { left: 0.5rem; }
.scroller-arrow--next { right: 0.5rem; }
@media (hover: hover) { .scroller:hover .scroller-arrow { display: block; } }

/* Cards */
.card {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 8px;
  overflow: hidden;
  color: var(--ink);
  text-decoration: none;
}
.card:hover .card-title { color: var(--accent); }
.card-cover { aspect-ratio: 3 / 4; background: var(--rule); display: flex; align-items: center; justify-content: center; }
.card-cover img { width: 100%; height: 100%; object-fit: cover; }
.card-cover .card-cover-empty { width: 40%; height: auto; opacity: 0.45; }
.card-body { display: flex; flex-direction: column; gap: 0.35rem; padding: 0.6rem 0.7rem 0.75rem; }
.card-title {
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; font-size: 0.8125rem; color: var(--muted); }
.tag { display: inline-block; padding: 0.1rem 0.5rem; border: 1px solid var(--rule); border-radius: 4px; font-size: 0.75rem; color: var(--ink); }
.card-added { font-size: 0.75rem; color: var(--muted); }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); gap: 1rem; }

/* Ranking */
.tabs { display: flex; border-bottom: 1px solid var(--rule); }
.tab {
  flex: 1;
  padding: 0.6rem 0.5rem;
  font: inherit;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  cursor: pointer;
}
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.tab-panel[hidden] { display: none; }
.rank-list { list-style: none; margin: 0; padding: 0.5rem 0; }
.rank-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem 1rem; color: var(--ink); text-decoration: none; }
.rank-item:hover { background: var(--hover); }
.rank-number { color: var(--gold); font-weight: 700; min-width: 1.5rem; }
.rank-cover { width: 2.75rem; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 4px; background: var(--rule); flex-shrink: 0; }
.rank-text { min-width: 0; }
.rank-title { display: block; font-weight: 600; font-size: 0.9375rem; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-meta { font-size: 0.8125rem; color: var(--muted); }
.ranking-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 1.25rem; }

/* Lists inside panels */
.panel .news-list li, .panel .update-row { padding-left: 1rem; padding-right: 1rem; }
.panel .news-list li:last-child, .panel .update-row:last-child { border-bottom: 0; }

/* Mobile header: monogram only, sized to fill the burned arch -------------- */
@media (max-width: 48rem) {
  .site-header .site-wordmark {
    padding: 0;
    background: transparent;
    box-shadow: none;
    justify-content: center;
  }
  .site-header .site-wordmark::before { content: none; }
  .site-header .site-wordmark img:not(.site-mark) { display: none; }
  .site-header .site-wordmark .site-mark { height: 8rem; }
}
/* Novel page (refined) ------------------------------------------------------ */
.novel { display: flex; flex-direction: column; gap: 1.25rem; }
.novel-hero { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 1.5rem; padding: 1.25rem; }
@media (max-width: 40rem) { .novel-hero { grid-template-columns: 7.5rem minmax(0, 1fr); gap: 1rem; padding: 1rem; } }
.novel-hero-cover {
  align-self: start;
  aspect-ratio: 3 / 4;
  border-radius: 6px;
  overflow: hidden;
  background: var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}
.novel-hero-cover img { width: 100%; height: 100%; object-fit: cover; }
.novel-hero-cover .card-cover-empty { width: 45%; height: auto; opacity: 0.45; }
.novel-hero-info { min-width: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.novel-hero .novel-heading { font-size: clamp(1.25rem, 3vw, 1.875rem); margin: 0; }
.novel-alt-title { margin: 0; color: var(--muted); font-size: 0.9375rem; }
.novel-hero .novel-byline { margin: 0; font-size: 0.9375rem; color: var(--muted); }
.novel-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0.25rem 0;
  padding: 0.75rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  text-align: center;
}
@media (max-width: 40rem) { .novel-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.novel-stats dt { font-size: 0.6875rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.novel-stats dd { margin: 0.15rem 0 0; font-weight: 600; font-size: 1.0625rem; }
.status-dot { display: inline-block; width: 0.5rem; height: 0.5rem; border-radius: 50%; margin-right: 0.35rem; vertical-align: middle; background: var(--gold); }
.status-dot--ongoing { background: #2e9e6a; }
.status-dot--completed { background: var(--accent); }
.status-dot--hiatus { background: var(--muted); }
.novel-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.novel-hero .languages { margin: 0; font-size: 0.9375rem; }
.novel-hero .novel-actions { margin-top: 0.25rem; }
.novel-hero .novel-actions .button { flex: 1 1 10rem; max-width: 16rem; text-align: center; }
.section-label { font-size: 1rem; font-weight: 600; margin: 0 0 0.6rem; padding-left: 0.6rem; border-left: 3px solid var(--accent); }
.section-label:not(:first-child) { margin-top: 1.5rem; }
.novel-summary { line-height: 1.65; }
.novel-summary p { margin: 0 0 0.75em; }
.novel-summary.is-collapsed {
  max-height: 9.5rem;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 60%, transparent);
  mask-image: linear-gradient(#000 60%, transparent);
}
.novel-details { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: 0.6rem 1rem; margin: 0; font-size: 0.9375rem; }
.novel-details div { display: contents; }
.novel-details dt { color: var(--muted); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; padding-top: 0.15rem; }
.novel-details dd { margin: 0; }
.novel-chapters { padding: 0.25rem 1rem 1rem; }
.novel-chapters .chapter-list li:last-child { border-bottom: 0; }

/* Cover lightbox --------------------------------------------------------------- */
.cover-zoom {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}
.cover-zoom img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.2s ease; }
.cover-zoom:hover img { transform: scale(1.03); }
.cover-zoom-hint {
  position: absolute;
  right: 0.4rem;
  bottom: 0.4rem;
  width: 1.75rem;
  height: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 1rem;
  line-height: 1;
}
.cover-lightbox {
  max-width: none;
  max-height: none;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 1.5rem;
  border: 0;
  background: transparent;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}
.cover-lightbox[open] { display: flex; }
.cover-lightbox::backdrop { background: rgba(10, 4, 4, 0.88); }
.cover-lightbox img {
  max-width: min(100%, 40rem);
  max-height: 100%;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}
.cover-lightbox-close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}

/* Accessibility --------------------------------------------------------------- */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--paper);
  color: var(--ink);
  border: 2px solid var(--accent);
  border-radius: 4px;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }
.site-main:focus { outline: none; }
/* The default focus ring is dark red, invisible on the dark band: use gold there. */
.site-header :focus-visible, .announce :focus-visible { outline-color: var(--band-gold); }
/* Dark theme: the lighter red needs dark text on it to stay readable. */
html[data-theme="dark"] .button,
html[data-theme="dark"] .button--secondary:hover,
html[data-theme="dark"] .theme-button[aria-pressed="true"],
html[data-theme="dark"] .reader-button[aria-pressed="true"],
html[data-theme="dark"] .announce,
html[data-theme="dark"] .announce-title { color: #17141a; }
html[data-theme="dark"] .button--secondary { color: var(--accent); }
.page-contact { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--rule); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* Site Update label on news posts ---------------------------------------------- */
.tag--update { color: var(--accent); border-color: var(--accent); font-weight: 600; }
.news-list .tag--update, .prose-date .tag--update { margin-right: 0.4rem; vertical-align: 0.1em; }
.news-list time { white-space: nowrap; }

/* Ad spots (only on the page while ads are on) ------------------------------ */
.ad-slot { margin: 0 0 2.5rem; text-align: center; }
.ad-slot .adsbygoogle { display: block; width: 100%; }
.ad-label { margin: 0 0 0.25rem; color: var(--muted); font-family: var(--sans); font-size: 0.75rem; }
.ad-slot--reader { width: 100%; max-width: var(--measure); margin: 1.5rem auto; padding: 0 1.25rem; }
/* Page-by-page reading has no ad spots (ads.js removes them before asking for ads). */
.reader[data-layout="pages"] .ad-slot { display: none; }
/* Google found no ad to show: hide the empty spot and its label. */
.ad-slot:has(.adsbygoogle[data-ad-status="unfilled"]) { display: none; }
