/* SukiScans — app.css
   Palette: ink #0d0c10 / panel #16151c / paper #ece6dc / seal #e02440 / gold #e0ab3f
   Display: Zen Old Mincho. Body: system UI stack. */

:root {
  --ink:        #0d0c10;
  --ink-2:      #121116;
  --panel:      #16151c;
  --panel-2:    #1c1a23;
  --line:       #272531;
  --line-soft:  #1f1d27;
  --paper:      #ece6dc;
  --muted:      #9a94a4;
  --muted-2:    #6f6a7a;
  --seal:       #e02440;
  --seal-deep:  #9e1226;
  --seal-glow:  rgba(224, 36, 64, .38);
  --gold:       #e0ab3f;
  --green:      #4ec98a;

  --r-sm: 4px;
  --r:    8px;
  --r-lg: 14px;

  --shell: 1280px;
  --gap:   clamp(14px, 2.2vw, 26px);

  --display: "Zen Old Mincho", "Noto Serif JP", Georgia, serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --header-h: 60px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeSpeed;
  overflow-wrap: break-word;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; background: var(--panel-2); }

a { color: inherit; text-decoration: none; }
a:hover { color: #fff; }

button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -.01em;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); }
h2 { font-size: clamp(1.25rem, 2.1vw, 1.6rem); }
h3 { font-size: 1.05rem; }

p { margin: 0 0 1em; }

.shell { max-width: var(--shell); margin-inline: auto; padding-inline: clamp(14px, 3vw, 28px); }
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--seal); color: #fff; padding: 10px 16px; border-radius: 0 0 var(--r) 0;
}
.skip:focus { left: 0; }

/* ------------------------------------------------------------------ header */

.masthead {
  position: sticky; top: 0; z-index: 50;
  background: rgba(13, 12, 16, .92);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.masthead__bar {
  display: flex; align-items: center; gap: 18px;
  height: var(--header-h);
  max-width: var(--shell); margin-inline: auto;
  padding-inline: clamp(14px, 3vw, 28px);
}

.brand { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.brand__seal {
  width: 34px; height: 34px; flex: 0 0 34px;
  border-radius: 6px;
  background: linear-gradient(155deg, var(--seal) 0%, var(--seal-deep) 100%);
  color: #fff;
  display: grid; place-items: center;
  font-family: var(--display);
  font-size: 19px; line-height: 1;
  box-shadow: 0 2px 10px -2px var(--seal-glow);
}
.brand__name {
  font-family: var(--display);
  font-size: 1.28rem; font-weight: 700; letter-spacing: .01em;
}
.brand__name span { color: var(--seal); }

.mainnav { display: flex; align-items: center; gap: 4px; flex: 1 1 auto; min-width: 0; }
.mainnav a {
  padding: 7px 11px; border-radius: var(--r-sm);
  color: var(--muted); font-size: .92rem; font-weight: 500;
  white-space: nowrap;
}
.mainnav a:hover { color: var(--paper); background: var(--panel); }
.mainnav a[aria-current="page"] { color: var(--paper); box-shadow: inset 0 -2px 0 var(--seal); }

.masthead__tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.searchbox { position: relative; }
.searchbox input {
  width: 210px; max-width: 40vw;
  padding: 8px 12px 8px 34px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 999px; color: var(--paper); font-size: .88rem;
}
.searchbox input::placeholder { color: var(--muted-2); }
.searchbox input:focus { border-color: var(--seal); outline: none; }
.searchbox svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted-2); }

.suggest {
  position: absolute; top: calc(100% + 8px); right: 0; width: min(380px, 84vw);
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: 0 20px 50px -18px #000; overflow: hidden; z-index: 60;
}
.suggest:empty { display: none; }
.suggest a { display: flex; gap: 10px; padding: 9px 12px; align-items: center; }
.suggest a:hover, .suggest a:focus-visible { background: var(--panel-2); }
.suggest img { width: 34px; height: 48px; object-fit: cover; border-radius: 3px; flex: 0 0 34px; }
.suggest strong { display: block; font-size: .9rem; font-weight: 600; }
.suggest small { color: var(--muted); font-size: .76rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 16px; border-radius: var(--r);
  border: 1px solid var(--line); background: var(--panel);
  color: var(--paper); font-size: .9rem; font-weight: 600; cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.btn:hover { background: var(--panel-2); border-color: #3a3746; color: var(--paper); }
.btn--seal { background: var(--seal); border-color: var(--seal); color: #fff; }
.btn--seal:hover { background: #ef3450; border-color: #ef3450; color: #fff; }
.btn--ghost { background: transparent; }
.btn--sm { padding: 6px 12px; font-size: .82rem; }
.btn--wide { width: 100%; }
.btn[aria-pressed="true"] { background: var(--seal-deep); border-color: var(--seal); color: #fff; }

.icon-btn {
  display: grid; place-items: center; width: 38px; height: 38px;
  border-radius: var(--r); border: 1px solid var(--line); background: var(--panel); cursor: pointer;
}
.icon-btn:hover { background: var(--panel-2); }

.nav-toggle { display: none; }

@media (max-width: 900px) {
  .mainnav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--ink-2); border-bottom: 1px solid var(--line);
    padding: 8px clamp(14px, 3vw, 28px) 16px;
    transform: translateY(-130%); transition: transform .22s ease;
    max-height: calc(100dvh - var(--header-h)); overflow: auto;
  }
  .mainnav[data-open="true"] { transform: translateY(0); }
  .mainnav a { padding: 12px 6px; border-bottom: 1px solid var(--line-soft); font-size: 1rem; }
  .nav-toggle { display: grid; order: -1; }
  .searchbox input { width: 150px; }
}
@media (max-width: 560px) {
  .brand__name { display: none; }
  .searchbox input { width: 120px; }
}

/* ------------------------------------------------------------ hero slider */

.hero {
  position: relative; isolation: isolate;
  border-bottom: 1px solid var(--line-soft);
  overflow: hidden;
  background: var(--ink-2);
}
.hero__track { display: grid; }

/* All slides stack in the same grid cell; only the active one is visible. */
.hero__slide {
  grid-area: 1 / 1;
  position: relative; isolation: isolate;
  min-height: 420px;
  opacity: 0; visibility: hidden;
  transition: opacity .5s ease;
}
.hero__slide[data-active="true"] { opacity: 1; visibility: visible; z-index: 1; }

/* Without JS the first slide is simply the hero. */
.no-js .hero__slide:not([data-active="true"]) { display: none; }

.hero__backdrop {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover; object-position: center 28%;
  opacity: .55;
  transform: scale(1.03);
}
/* When a series has no banner we reuse the cover, so it needs heavy treatment
   to work as a wide backdrop rather than looking like a stretched thumbnail. */
.hero__slide--nobanner .hero__backdrop {
  filter: blur(30px) saturate(1.7) brightness(1.15);
  opacity: .85;
  transform: scale(1.35);
  object-position: 72% 40%;
  /* Fade the art out towards the text so the copy always stays readable. */
  mask-image: linear-gradient(90deg, transparent 6%, #000 62%);
  -webkit-mask-image: linear-gradient(90deg, transparent 6%, #000 62%);
}
.hero__slide::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, var(--ink) 6%, rgba(13, 12, 16, .84) 38%, rgba(13, 12, 16, .12) 76%),
    linear-gradient(0deg, var(--ink) 0%, rgba(13, 12, 16, .05) 52%);
}

.hero__inner {
  display: grid; grid-template-columns: minmax(0, 1fr) 300px;
  gap: clamp(24px, 4vw, 56px); align-items: center;
  max-width: var(--shell); margin-inline: auto;
  min-height: 420px;
  padding: clamp(30px, 4vw, 50px) clamp(14px, 3vw, 28px);
}
.hero__text { max-width: 62ch; padding-left: 35px;}

.hero__meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin: 0 0 12px; font-size: .84rem; color: var(--muted);
}
.hero__dot { color: var(--muted-2); }
.hero__score { color: var(--gold); font-weight: 700; }
.hero__pick {
  display: inline-flex; align-items: center;
  padding: 3px 9px; border-radius: 3px;
  background: var(--seal); color: #fff;
  font-size: .72rem; font-weight: 700; letter-spacing: .01em;
}
.hero__pick--rank { background: rgba(224, 171, 63, .16); color: var(--gold); }

.hero__title { font-size: clamp(1.9rem, 4vw, 3rem); margin: 0 0 .12em; }
.hero__title a { color: inherit; }
.hero__title a:hover { color: #fff; }
.hero__orig { color: var(--muted); font-size: .95rem; margin: 0 0 12px; }

.hero__genres { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.chip--sm { padding: 3px 9px; font-size: .74rem; }

.hero__blurb {
  color: #cfc8c0; margin-bottom: 22px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.hero__reads { color: var(--muted-2); font-size: .82rem; }
.btn--glass {
  background: rgba(255, 255, 255, .07);
  border-color: rgba(255, 255, 255, .16);
  backdrop-filter: blur(6px);
}
.btn--glass:hover { background: rgba(255, 255, 255, .13); }

.hero__cover { display: block; position: relative; }
.hero__cover::before {
  content: ""; position: absolute; inset: -12% -8%; z-index: -1;
  background: radial-gradient(ellipse at center, var(--seal-glow) 0%, transparent 68%);
  opacity: .5; filter: blur(28px);
}
.hero__cover img {
  width: 100%; aspect-ratio: 2 / 3; object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 30px 70px -26px #000, 0 0 0 1px rgba(0, 0, 0, .5);
  transition: transform .35s ease;
}
.hero__cover:hover img { transform: translateY(-4px); }

/* --- controls --- */

.hero__arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  display: grid; place-items: center; width: 42px; height: 42px;
  border-radius: 50%; cursor: pointer;
  background: rgba(13, 12, 16, .6);
  border: 1px solid rgba(255, 255, 255, .14);
  color: var(--paper);
  backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .2s ease, background .2s ease;
}
.hero:hover .hero__arrow, .hero__arrow:focus-visible { opacity: 1; }
.hero__arrow:hover { background: var(--seal); border-color: var(--seal); }
.hero__arrow--prev { left: 14px; }
.hero__arrow--next { right: 14px; }

.hero__dots {
  position: absolute; left: 0; right: 0; bottom: 16px; z-index: 3;
  display: flex; justify-content: center; gap: 8px;
}
.hero__dot-btn {
  width: 26px; height: 16px; padding: 0;
  background: none; border: 0; cursor: pointer;
  display: grid; place-items: center;
}
.hero__dot-btn span {
  display: block; width: 22px; height: 3px; border-radius: 3px;
  background: rgba(255, 255, 255, .3);
  transition: background .2s ease, width .2s ease;
}
.hero__dot-btn[aria-selected="true"] span { background: var(--seal); width: 30px; }
.hero__dot-btn:hover span { background: rgba(255, 255, 255, .6); }

@media (max-width: 880px) {
  .hero__slide, .hero__inner { min-height: 0; }
  .hero__inner {
    grid-template-columns: 128px minmax(0, 1fr);
    gap: 18px; align-items: start;
    padding-block: 26px 46px;
  }
  .hero__cover { order: -1; }
  .hero__blurb { -webkit-line-clamp: 3; margin-bottom: 14px; font-size: .92rem; }
  .hero__meta { font-size: .78rem; gap: 6px; margin-bottom: 8px; }
  .hero__dots { bottom: 12px; }
  .hero__title { font-size: clamp(1.35rem, 5.4vw, 1.9rem); }
  .hero__arrow { display: none; }
  .hero__slide::after {
    background: linear-gradient(180deg, rgba(13, 12, 16, .74) 0%, rgba(13, 12, 16, .92) 65%, var(--ink) 100%);
  }
}
@media (max-width: 520px) {
  .hero__inner { grid-template-columns: 104px minmax(0, 1fr); gap: 14px; padding-block: 20px 40px; }
  .hero__genres, .hero__reads, .hero__orig, .hero__dot { display: none; }
  .hero__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .hero__actions .btn { width: 100%; padding-inline: 8px; font-size: .84rem; }
}

/* --------------------------------------------------------------- sections */

.layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 320px;
  gap: clamp(22px, 3vw, 40px);
  padding-block: clamp(26px, 4vw, 44px);
  align-items: start;
}
@media (max-width: 1040px) { .layout { grid-template-columns: 1fr; } }

.section + .section { margin-top: clamp(30px, 4vw, 48px); }
.section__head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  margin-bottom: 18px; padding-bottom: 10px;
  border-bottom: 1px solid var(--line-soft);
}
.section__head h2, .section__head .section__h1 { margin: 0; }
.section__h1 { font-size: clamp(1.25rem, 2.1vw, 1.6rem); }
.section__head a { color: var(--muted); font-size: .86rem; font-weight: 600; }
.section__head a:hover { color: var(--seal); }
.section__note { color: var(--muted); font-size: .88rem; margin: -8px 0 18px; }

/* ------------------------------------------------------------ update rows */

.updates { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 720px) { .updates { grid-template-columns: 1fr; } }

.update {
  display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px;
  padding: 12px; border-radius: var(--r);
  background: var(--panel); border: 1px solid var(--line-soft);
}
.update:hover { border-color: var(--line); background: var(--panel-2); }
.update__cover img {
  width: 96px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 6px;
  transition: transform .25s ease;
}
.update:hover .update__cover img { transform: scale(1.03); }
@media (max-width: 400px) {
  .update { grid-template-columns: 78px minmax(0, 1fr); gap: 12px; }
  .update__cover img { width: 78px; }
}
.update__title {
  font-weight: 600; font-size: 1rem; margin: 0 0 2px;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.update__sub { color: var(--muted-2); font-size: .76rem; margin-bottom: 8px; }
.update__chapters { display: grid; gap: 5px; }
.chapter-pill {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 6px 10px; border-radius: var(--r-sm);
  background: var(--ink-2); border: 1px solid transparent;
  font-size: .84rem; color: #c6c0cd;
}
.chapter-pill:hover { border-color: var(--line); color: #fff; background: #1a1922; }
.chapter-pill time { color: var(--muted-2); font-size: .74rem; white-space: nowrap; }
.chapter-pill .fresh { color: var(--seal); font-weight: 700; }

/* ---------------------------------------------------------- series cards */

.grid {
  display: grid; gap: var(--gap);
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}
@media (max-width: 420px) { .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }

.card { position: relative; }
.card__art {
  position: relative; display: block; overflow: hidden;
  border-radius: var(--r); border: 1px solid var(--line-soft);
  background: var(--panel-2);
}
.card__art img {
  width: 100%; aspect-ratio: 2 / 3; object-fit: cover;
  transition: transform .3s ease;
}
.card:hover .card__art img { transform: scale(1.04); }
.card__badge {
  position: absolute; top: 7px; left: 7px;
  padding: 2px 7px; border-radius: 3px;
  background: rgba(13, 12, 16, .82); backdrop-filter: blur(3px);
  font-size: .68rem; font-weight: 700; letter-spacing: .02em; color: var(--paper);
}
.card__badge--seal { background: var(--seal); color: #fff; }
.card__score {
  position: absolute; right: 7px; bottom: 7px;
  display: flex; align-items: center; gap: 3px;
  padding: 2px 7px; border-radius: 3px;
  background: rgba(13, 12, 16, .84);
  font-size: .72rem; font-weight: 700; color: var(--gold);
}
.card__title {
  margin: 9px 0 3px; font-size: .9rem; font-weight: 600; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card__meta { color: var(--muted-2); font-size: .76rem; }
.card__latest { color: var(--muted); font-size: .78rem; }

/* --------------------------------------------------------------- rank rail */

.aside { display: grid; gap: 26px; align-content: start; }
@media (min-width: 1041px) { .aside { position: sticky; top: calc(var(--header-h) + 20px); } }

.panel {
  background: var(--panel); border: 1px solid var(--line-soft);
  border-radius: var(--r-lg); padding: 16px;
}
.panel > h2 { font-size: 1.1rem; margin-bottom: 12px; }

.rank { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.rank > li { list-style: none; }
.rank__item {
  display: grid; grid-template-columns: 26px 40px minmax(0, 1fr); gap: 11px;
  align-items: center; padding: 7px 6px; border-radius: var(--r-sm);
}
.rank__item:hover { background: var(--panel-2); }
.rank__n {
  font-family: var(--display); font-size: 1.15rem; font-weight: 700;
  color: var(--muted-2); text-align: center;
}
.rank > li:nth-child(-n+3) .rank__n { color: var(--gold); }
.rank__item img { width: 40px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 3px; }
.rank__title {
  font-size: .87rem; font-weight: 600;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.rank__meta { color: var(--muted-2); font-size: .74rem; }

.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  padding: 5px 11px; border-radius: 5px;
  border: 1px solid var(--line); background: var(--panel-2);
  font-size: .8rem; color: var(--muted); white-space: nowrap;
}
.chip:hover, .chip[aria-current="page"] { border-color: var(--seal); color: var(--paper); }
.chip--on { border-color: var(--seal); background: rgba(224, 36, 64, .12); color: var(--paper); }

/* ------------------------------------------------------------ series page */

.hero-series { position: relative; isolation: isolate; border-bottom: 1px solid var(--line-soft); }
.hero-series__bg {
  position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%;
  object-fit: cover; opacity: .72; filter: blur(2px) saturate(.8);
}
.hero-series::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(13, 12, 16, .72) 0%, var(--ink) 92%);
}
.series-head {
  display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: clamp(18px, 3vw, 36px);
  padding-block: clamp(24px, 4vw, 44px);
}
.series-head__cover img {
  width: 100%; aspect-ratio: 2 / 3; object-fit: cover;
  border-radius: var(--r); border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 0 24px 50px -22px #000;
}
.series-head h1 { margin-bottom: .2em; }
.series-head__alt { color: var(--muted); font-size: .92rem; margin-bottom: 14px; }
.facts { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 16px; padding: 0; list-style: none; }
.facts li { font-size: .85rem; color: var(--muted); }
.facts b { color: var(--paper); font-weight: 600; }
.series-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 0; }
@media (max-width: 680px) {
  .series-head { grid-template-columns: 116px minmax(0, 1fr); gap: 16px; }
  .series-head h1 { font-size: 1.4rem; }
}

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.tabs button {
  padding: 10px 14px; background: none; border: 0; cursor: pointer;
  color: var(--muted); font-weight: 600; font-size: .92rem;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs button[aria-selected="true"] { color: var(--paper); border-bottom-color: var(--seal); }

.prose { max-width: 100%; color: #cdc7c0; }
.prose h2, .prose h3 { color: var(--paper); margin-top: 1.4em; }
.prose a { color: var(--seal); text-decoration: underline; text-underline-offset: 2px; }
.prose ul, .prose ol { padding-left: 1.2em; }

.chapter-toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.chapter-toolbar input, .chapter-toolbar select {
  padding: 8px 12px; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r); font-size: .88rem;
}
.chapter-toolbar input { flex: 1 1 200px; }

.chapter-list {
  display: grid; gap: 6px; max-height: 620px; overflow: auto;
  padding-right: 4px; padding-bottom: 8px;
  mask-image: linear-gradient(180deg, #000 calc(100% - 28px), transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 28px), transparent 100%);
}
.chapter-list:not([data-scrolls]) { mask-image: none; -webkit-mask-image: none; }
.chapter-list::-webkit-scrollbar { width: 8px; }
.chapter-list::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; }
.chapter-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 11px 14px; border-radius: var(--r);
  background: var(--panel); border: 1px solid var(--line-soft);
}
.chapter-row:hover { border-color: var(--seal); background: var(--panel-2); }
.chapter-row--read { opacity: .55; }
.chapter-row__n { font-weight: 600; font-size: .93rem; }
.chapter-row__t { color: var(--muted); font-size: .82rem; font-weight: 400; }
.chapter-row time { color: var(--muted-2); font-size: .76rem; white-space: nowrap; }

.stat-row { display: flex; flex-wrap: wrap; gap: 18px; margin: 16px 0; }
.stat { display: grid; gap: 2px; }
.stat b { font-family: var(--display); font-size: 1.25rem; }
.stat span { color: var(--muted-2); font-size: .76rem; }

.stars { display: inline-flex; gap: 2px; }
.stars button {
  background: none; border: 0; cursor: pointer; padding: 0 1px;
  color: var(--muted-2); font-size: 1.05rem; line-height: 1;
}
.stars button[data-on="1"] { color: var(--gold); }

/* -------------------------------------------------------------- the reader */

.reading .masthead { position: static; }

.reader-bar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 10px;
  padding: 8px clamp(10px, 2vw, 20px);
  background: rgba(13, 12, 16, .95); border-bottom: 1px solid var(--line-soft);
  backdrop-filter: blur(8px);
  transition: transform .25s ease;
}
.reader-bar[data-hidden="true"] { transform: translateY(-100%); }
.reader-bar__title {
  min-width: 0; flex: 1 1 auto;
  font-size: .9rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.reader-bar select {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  padding: 7px 10px; font-size: .85rem; max-width: 44vw;
}

.pages { margin-inline: auto; background: #000; }
.pages img {
  width: 100%; height: auto; margin-inline: auto; display: block;
  content-visibility: auto;
}
.pages--fit  { max-width: 900px; }
.pages--wide { max-width: 1200px; }
.pages--full { max-width: 100%; }

.reader-nav {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 22px clamp(14px, 3vw, 28px); max-width: 900px; margin-inline: auto;
}
.reader-end { text-align: center; padding: 30px 16px; }

.progress-bar {
  position: fixed; left: 0; bottom: 0; height: 3px; z-index: 45;
  background: var(--seal); width: 0; transition: width .1s linear;
}

/* ------------------------------------------------------------- pagination */

.pager { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 32px 0 8px; }
.pager a, .pager span {
  min-width: 38px; padding: 8px 12px; text-align: center;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--panel); font-size: .88rem;
}
.pager a:hover { border-color: var(--seal); }
.pager [aria-current="page"] { background: var(--seal); border-color: var(--seal); color: #fff; font-weight: 700; }
.pager span[aria-disabled] { opacity: .35; }

/* --------------------------------------------------------------- comments */

.comment { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 12px; padding: 14px 0; border-top: 1px solid var(--line-soft); }
.comment__avatar {
  width: 38px; height: 38px; border-radius: 50%; object-fit: cover;
  background: var(--panel-2); display: grid; place-items: center;
  font-family: var(--display); color: var(--seal);
}
.comment__head { display: flex; gap: 10px; align-items: baseline; margin-bottom: 3px; }
.comment__head b { font-size: .89rem; }
.comment__head time { color: var(--muted-2); font-size: .75rem; }
.comment__body { color: #cdc7c0; font-size: .92rem; }
.comment__replies { margin-left: 12px; padding-left: 14px; border-left: 1px solid var(--line-soft); }
.spoiler { cursor: pointer; filter: blur(5px); transition: filter .15s; }
.spoiler[data-open="1"] { filter: none; }

.formbox { display: grid; gap: 12px; max-width: 460px; }
.formbox label { font-size: .85rem; color: var(--muted); display: grid; gap: 5px; }
.formbox input, .formbox textarea, .formbox select {
  padding: 10px 12px; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r); font-size: .95rem; width: 100%;
}
.formbox input:focus, .formbox textarea:focus { border-color: var(--seal); outline: none; }
.notice {
  padding: 11px 14px; border-radius: var(--r); font-size: .88rem;
  border: 1px solid var(--line); background: var(--panel);
}
.notice--bad { border-color: var(--seal-deep); background: rgba(224, 36, 64, .1); }
.notice--good { border-color: #2c6b4c; background: rgba(78, 201, 138, .09); }

/* ---------------------------------------------------------------- filters */

.filters {
  display: grid; gap: 14px; padding: 16px;
  background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--r-lg);
  margin-bottom: 24px;
}
.filters__row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filters__row > b { font-size: .8rem; color: var(--muted-2); font-weight: 600; min-width: 58px; }

/* ------------------------------------------------------------------ footer */

.footer { border-top: 1px solid var(--line-soft); background: var(--ink-2); margin-top: 50px; }
.footer__grid {
  display: grid; gap: 30px; padding-block: 40px;
  grid-template-columns: 1.6fr repeat(3, 1fr);
}
@media (max-width: 780px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
.footer h3 { font-size: .95rem; margin-bottom: 12px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer a, .footer p { color: var(--muted); font-size: .87rem; }
.footer a:hover { color: var(--paper); }
.footer__bottom {
  border-top: 1px solid var(--line-soft); padding-block: 18px;
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between;
  color: var(--muted-2); font-size: .8rem;
}

/* ------------------------------------------------------------------- misc */

.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty h2 { color: var(--paper); }
.center { text-align: center; }
.muted { color: var(--muted); }
.sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.tag-seal {
  display: inline-flex; align-items: center; gap: 5px;
  color: var(--seal); font-size: .74rem; font-weight: 700;
}
.divider { height: 1px; background: var(--line-soft); margin: 26px 0; border: 0; }
