:root {
  --color-primary: #8c5a6b;
  --color-primary-deep: #744758;
  --color-primary-soft: #c8a7ae;
  --color-accent: #a96572;
  --color-dark: #2e2529;
  --color-bg: #faf7f5;
  --color-bg-soft: #f1e8e8;
  --color-surface: #fffdfc;
  --color-text: #3c3437;
  --color-muted: #786b70;
  --color-line: #dfd1d4;
  --color-line-strong: #cdb9bf;
  --shadow-soft: 0 16px 40px rgba(80, 53, 62, 0.08);
  --shadow-card: 0 10px 28px rgba(80, 53, 62, 0.07);
  --shadow-float: 0 22px 70px rgba(58, 37, 45, 0.12);
  --radius-xs: 8px;
  --radius-sm: 14px;
  --radius-md: 22px;
  --radius-lg: 34px;
  --radius-pill: 999px;
  --shell: min(1180px, calc(100vw - 40px));
  --reading: 760px;
  --header-height: 78px;
  --text-scale: 1;
  --reading-scale: 1;
  --reading-width: 760px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 40px;
  --space-9: 48px;
  --space-10: 64px;
  --space-11: 80px;
  --space-12: 96px;
  color-scheme: light;
}

html[data-theme="dark"] {
  --color-primary: #c690a2;
  --color-primary-deep: #d8a9b8;
  --color-primary-soft: #795b64;
  --color-accent: #d38c9b;
  --color-dark: #f4e9ec;
  --color-bg: #241f21;
  --color-bg-soft: #30282b;
  --color-surface: #2b2527;
  --color-text: #eee4e7;
  --color-muted: #c0b1b6;
  --color-line: #4b3f43;
  --color-line-strong: #65545a;
  --shadow-soft: 0 16px 40px rgba(0, 0, 0, 0.18);
  --shadow-card: 0 12px 30px rgba(0, 0, 0, 0.17);
  --shadow-float: 0 24px 80px rgba(0, 0, 0, 0.24);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--color-bg); }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: "Noto Serif SC", "Songti SC", SimSun, Georgia, serif;
  font-size: calc(16px * var(--text-scale));
  line-height: 1.75;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
body.menu-open { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--color-primary-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--color-accent); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
::selection { background: var(--color-primary-soft); color: var(--color-dark); }

.skip-link {
  position: fixed;
  z-index: 999;
  left: 16px;
  top: 12px;
  transform: translateY(-150%);
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  background: var(--color-dark);
  color: var(--color-bg);
  text-decoration: none;
  transition: transform 160ms ease;
}
.skip-link:focus { transform: translateY(0); }
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.shell { width: var(--shell); margin-inline: auto; }
.section { padding: var(--space-11) 0; }
.section-tight { padding-top: var(--space-8); }
.section-soft { background: var(--color-bg-soft); border-block: 1px solid var(--color-line); }
.page-top { padding-top: 26px; }
.narrow-copy { max-width: 780px; }
.narrow-copy p { font-size: 1.05rem; }
.narrow-copy h2 { max-width: 16ch; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: var(--header-height);
  border-bottom: 1px solid color-mix(in srgb, var(--color-line), transparent 20%);
  background: color-mix(in srgb, var(--color-bg), transparent 8%);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.header-shell {
  min-height: var(--header-height);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--color-dark);
  text-decoration: none;
  min-width: 154px;
}
.brand-logo {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border-radius: 50%;
  background: var(--color-bg-soft);
  border: 1px solid var(--color-line);
}
.brand-copy { display: grid; line-height: 1.1; }
.brand-copy strong { font-size: 1.06rem; letter-spacing: .12em; }
.brand-copy small { margin-top: 6px; color: var(--color-muted); font-size: .72rem; letter-spacing: .08em; }
.primary-nav { display: flex; justify-content: center; align-items: center; gap: 6px; }
.primary-nav a {
  color: var(--color-text);
  text-decoration: none;
  padding: 10px 13px;
  border-radius: var(--radius-pill);
  font-size: .93rem;
  transition: background 150ms ease, color 150ms ease;
}
.primary-nav a:hover { background: var(--color-bg-soft); color: var(--color-primary-deep); }
.primary-nav a[aria-current="page"] { background: var(--color-primary); color: #fff; }
.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.icon-button,
.text-button,
.reading-toolbar button,
.menu-toggle {
  border: 1px solid var(--color-line);
  background: var(--color-surface);
  color: var(--color-text);
  cursor: pointer;
}
.icon-button {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  box-shadow: 0 4px 16px rgba(77, 50, 59, .04);
}
.icon-button:hover,
.icon-button:focus-visible { border-color: var(--color-primary); color: var(--color-primary-deep); }
.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 9px;
  border-radius: 50%;
}
.menu-toggle span:not(.sr-only) { display: block; height: 2px; margin: 5px 0; background: currentColor; border-radius: 2px; transition: transform 160ms ease, opacity 160ms ease; }
.menu-toggle[aria-expanded="true"] span:nth-of-type(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-of-type(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-of-type(3) { transform: translateY(-7px) rotate(-45deg); }

.eyebrow {
  margin: 0 0 12px;
  color: var(--color-primary-deep);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}
h1, h2, h3 {
  color: var(--color-dark);
  margin-top: 0;
  line-height: 1.25;
  text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 5vw, 4.9rem); letter-spacing: -.04em; margin-bottom: 24px; }
h2 { font-size: clamp(1.7rem, 3.1vw, 2.85rem); letter-spacing: -.025em; margin-bottom: 20px; }
h3 { font-size: clamp(1.06rem, 1.8vw, 1.3rem); margin-bottom: 10px; }
p { margin-top: 0; }
.hero-lede { color: var(--color-muted); font-size: clamp(1.05rem, 1.6vw, 1.26rem); line-height: 1.85; max-width: 46rem; }

.hero { padding: clamp(48px, 8vw, 110px) 0 70px; overflow: clip; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(340px, .78fr);
  gap: clamp(38px, 7vw, 90px);
  align-items: center;
}
.hero-copy { position: relative; z-index: 1; }
.hero-copy::before {
  content: "";
  position: absolute;
  width: 300px;
  height: 300px;
  left: -140px;
  top: -120px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--color-primary-soft), transparent 45%), transparent 70%);
  pointer-events: none;
}
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 28px 0 24px; }
.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  text-decoration: none;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: .93rem;
  font-weight: 700;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--color-primary); color: #fff; box-shadow: 0 10px 28px rgba(140, 90, 107, .18); }
.button-primary:hover { color: #fff; background: var(--color-primary-deep); box-shadow: 0 14px 34px rgba(140, 90, 107, .24); }
.button-secondary { border-color: var(--color-line-strong); background: var(--color-surface); color: var(--color-dark); }
.button-secondary:hover { color: var(--color-primary-deep); border-color: var(--color-primary); }
.text-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; text-decoration: none; }
.text-link::after { content: "→"; transition: transform 150ms ease; }
.text-link:hover::after { transform: translateX(3px); }
.inline-meta { display: flex; flex-wrap: wrap; gap: 10px 18px; margin: 0; padding: 0; list-style: none; color: var(--color-muted); font-size: .88rem; }
.inline-meta li { position: relative; padding-left: 14px; }
.inline-meta li::before { content: ""; position: absolute; left: 0; top: .75em; width: 5px; height: 5px; border-radius: 50%; background: var(--color-primary-soft); }
.hero-media { position: relative; margin: 0; }
.hero-media::before {
  content: "";
  position: absolute;
  inset: 7% -9% -6% 10%;
  border-radius: 44% 56% 48% 52% / 42% 45% 55% 58%;
  background: var(--color-bg-soft);
  border: 1px solid var(--color-line);
  z-index: -1;
}
.hero-media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 48% 52% 46% 54% / 42% 48% 52% 58%;
  box-shadow: var(--shadow-float);
}
.hero-media figcaption { margin-top: 14px; max-width: 34rem; color: var(--color-muted); font-size: .84rem; }

.split-heading { display: flex; align-items: end; justify-content: space-between; gap: 40px; margin-bottom: 34px; }
.split-heading > p { max-width: 34rem; margin-bottom: 3px; color: var(--color-muted); }
.split-heading h2 { margin-bottom: 0; max-width: 18ch; }
.content-card-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.content-card-grid.two-up { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.content-card-grid.three-up { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.content-card {
  position: relative;
  min-height: 230px;
  padding: 28px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.content-card::after {
  content: "";
  position: absolute;
  right: -38px;
  bottom: -42px;
  width: 120px;
  height: 120px;
  border: 1px solid var(--color-line);
  border-radius: 50%;
  opacity: .55;
}
.content-card h3 { max-width: 20ch; }
.content-card p:not(.eyebrow) { color: var(--color-muted); }
.content-card .text-link { position: relative; z-index: 2; margin-top: 8px; }

.reading-layout { display: grid; grid-template-columns: minmax(250px, .66fr) minmax(0, 1.34fr); gap: 44px; align-items: start; }
.reading-layout.wide-gap { gap: clamp(42px, 8vw, 110px); }
.reading-intro { padding-top: 24px; }
.reading-panel { border-top: 1px solid var(--color-line); }
.chapter-list { list-style: none; padding: 0; margin: 0; counter-reset: chapter; }
.chapter-item {
  counter-increment: chapter;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  padding: 24px 0;
  border-bottom: 1px solid var(--color-line);
}
.chapter-tag {
  align-self: start;
  display: inline-flex;
  min-width: 50px;
  justify-content: center;
  padding: 5px 9px;
  border-radius: var(--radius-pill);
  background: var(--color-bg-soft);
  color: var(--color-primary-deep);
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: .7rem;
  font-weight: 700;
}
.chapter-item h3 { margin-bottom: 7px; }
.chapter-item p { margin: 0; color: var(--color-muted); font-size: .94rem; }
.empty-state { border: 1px dashed var(--color-line-strong); border-radius: var(--radius-sm); padding: 24px; color: var(--color-muted); }

.manga-feature { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(280px, .8fr); gap: clamp(30px, 6vw, 74px); align-items: center; }
.manga-feature-media { position: relative; }
.manga-feature-media::before { content: ""; position: absolute; inset: 14px -14px -14px 14px; border-radius: var(--radius-lg); background: var(--color-bg-soft); border: 1px solid var(--color-line); z-index: -1; }
.manga-feature-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); }
.manga-feature-copy p:not(.eyebrow) { color: var(--color-muted); font-size: 1.03rem; }

.faq-shell { max-width: 920px; }
.faq-list { display: grid; gap: 12px; }
.faq-item { border: 1px solid var(--color-line); border-radius: var(--radius-sm); background: var(--color-surface); overflow: clip; }
.faq-item summary { position: relative; cursor: pointer; padding: 20px 58px 20px 22px; font-weight: 700; color: var(--color-dark); list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--color-bg-soft); color: var(--color-primary-deep); }
.faq-item[open] summary::after { content: "−"; }
.faq-answer { padding: 0 22px 20px; color: var(--color-muted); }
.faq-answer p { margin-bottom: 0; }

.breadcrumbs { font-family: ui-sans-serif, system-ui, sans-serif; font-size: .82rem; color: var(--color-muted); }
.breadcrumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; list-style: none; padding: 0; margin: 0; }
.breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: 8px; color: var(--color-line-strong); }
.breadcrumbs a { color: var(--color-muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--color-primary-deep); }

.reading-hero,
.compact-hero,
.audio-hero,
.manga-hero { padding: 52px 0 64px; }
.reading-hero-grid,
.compact-hero-grid,
.audio-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, .72fr);
  gap: clamp(34px, 6vw, 76px);
  align-items: center;
}
.reading-hero-grid img,
.compact-hero-grid img,
.audio-hero-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-line);
  box-shadow: var(--shadow-soft);
}
.reading-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.reading-toolbar button { min-height: 40px; padding: 8px 13px; border-radius: var(--radius-pill); font-family: ui-sans-serif, system-ui, sans-serif; font-size: .82rem; }
.reading-toolbar button:hover { border-color: var(--color-primary); color: var(--color-primary-deep); }
.sticky-note { position: sticky; top: calc(var(--header-height) + 30px); padding: 26px; border-radius: var(--radius-md); background: var(--color-bg-soft); border: 1px solid var(--color-line); }
.sticky-note p:not(.eyebrow) { color: var(--color-muted); }
.fact-list { display: grid; gap: 0; margin: 20px 0 0; }
.fact-list > div { display: grid; grid-template-columns: 86px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--color-line); }
.fact-list dt { color: var(--color-muted); font-size: .78rem; font-family: ui-sans-serif, system-ui, sans-serif; }
.fact-list dd { margin: 0; }
.reading-article { max-width: var(--reading-width); font-size: calc(1rem * var(--reading-scale)); }
.reading-article > p { color: var(--color-muted); font-size: 1.03em; }
html.reading-wide { --reading-width: 900px; }

.manga-hero { overflow: clip; }
.manga-hero-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(360px, 1.15fr); gap: clamp(34px, 6vw, 80px); align-items: center; }
.manga-hero-copy { padding-block: 20px; }
.manga-collage { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; transform: rotate(-1.5deg); }
.manga-collage img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius-md); border: 1px solid var(--color-line); box-shadow: var(--shadow-soft); }
.manga-collage img:first-child { grid-row: span 2; align-self: center; }
.manga-collage img:nth-child(2) { transform: translateY(24px); }
.manga-collage img:nth-child(3) { transform: translateY(8px); }
.gallery-band { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.gallery-band figure { margin: 0; }
.gallery-band img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-md); border: 1px solid var(--color-line); }
.gallery-band figcaption { padding: 12px 3px 0; color: var(--color-muted); font-size: .84rem; }

.compact-hero { border-bottom: 1px solid var(--color-line); }
.compact-hero-grid h1 { font-size: clamp(2.35rem, 4.4vw, 4rem); max-width: 13ch; }
.audio-hero { background: linear-gradient(180deg, color-mix(in srgb, var(--color-bg-soft), transparent 38%), transparent); }
.audio-hero-grid h1 { font-size: clamp(2.3rem, 4.2vw, 4.1rem); max-width: 14ch; }

.not-found { min-height: calc(100vh - var(--header-height) - 240px); display: grid; align-items: center; padding: 90px 0; }
.error-code { margin: 0 0 10px; color: var(--color-primary-soft); font-family: ui-sans-serif, system-ui, sans-serif; font-size: clamp(4rem, 16vw, 10rem); font-weight: 800; line-height: .9; letter-spacing: -.08em; }

.site-footer { margin-top: 34px; padding: 52px 0; border-top: 1px solid var(--color-line); background: color-mix(in srgb, var(--color-bg-soft), transparent 20%); }
.footer-grid { display: grid; grid-template-columns: 1.2fr .8fr .6fr; gap: 40px; align-items: start; }
.footer-grid p { color: var(--color-muted); font-size: .88rem; max-width: 40rem; }
.footer-brand { color: var(--color-dark) !important; font-weight: 800; font-size: 1rem !important; }
.footer-grid nav { display: grid; gap: 8px; }
.footer-grid nav a { text-decoration: none; color: var(--color-text); }
.footer-grid nav a:hover { color: var(--color-primary-deep); }
.footer-tools { justify-self: end; text-align: right; }
.text-button { padding: 8px 12px; border-radius: var(--radius-pill); }

:focus-visible { outline: 3px solid color-mix(in srgb, var(--color-accent), transparent 22%); outline-offset: 3px; }

@media (hover: hover) {
  .content-card { transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease; }
  .content-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-soft); border-color: var(--color-line-strong); }
  .manga-collage img { transition: transform 240ms ease, box-shadow 240ms ease; }
  .manga-collage img:hover { z-index: 2; transform: scale(1.025) rotate(.5deg); box-shadow: var(--shadow-float); }
}

@media (max-width: 1040px) {
  :root { --shell: min(100% - 32px, 960px); }
  .header-shell { grid-template-columns: auto auto 1fr auto; gap: 14px; }
  .menu-toggle { display: inline-block; order: 2; }
  .brand { order: 1; }
  .primary-nav {
    position: fixed;
    inset: var(--header-height) 0 auto 0;
    display: grid;
    align-content: start;
    justify-items: stretch;
    gap: 3px;
    padding: 16px;
    border-bottom: 1px solid var(--color-line);
    background: var(--color-bg);
    box-shadow: var(--shadow-soft);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
  }
  .primary-nav[data-open="true"] { opacity: 1; visibility: visible; transform: translateY(0); }
  .primary-nav a { padding: 13px 14px; border-radius: var(--radius-sm); }
  .header-actions { order: 4; }
  .hero-grid { grid-template-columns: 1fr .74fr; gap: 42px; }
  .content-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content-card-grid.three-up { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reading-layout { grid-template-columns: 1fr; }
  .sticky-note { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 18px 30px; }
  .sticky-note .fact-list { grid-column: 2; grid-row: 1 / span 2; margin-top: 0; }
  .reading-article { max-width: none; }
  .manga-hero-grid { grid-template-columns: 1fr; }
  .manga-collage { max-width: 760px; }
}

@media (max-width: 820px) {
  :root { --header-height: 70px; --space-11: 66px; }
  .header-shell { min-height: var(--header-height); }
  .brand-logo { width: 40px; height: 40px; }
  .brand-copy small { display: none; }
  .hero-grid,
  .reading-hero-grid,
  .compact-hero-grid,
  .audio-hero-grid,
  .manga-feature { grid-template-columns: 1fr; }
  .hero-media { max-width: 560px; margin-inline: auto; }
  .hero-media img { aspect-ratio: 5 / 4; border-radius: var(--radius-lg); }
  .hero-media::before { border-radius: var(--radius-lg); inset: 12px -12px -12px 12px; }
  .split-heading { align-items: start; flex-direction: column; gap: 12px; }
  .split-heading > p { max-width: 50rem; }
  .reading-hero-grid img,
  .compact-hero-grid img,
  .audio-hero-grid img { max-height: 420px; }
  .manga-feature-media { order: 2; }
  .manga-feature-copy { order: 1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-tools { grid-column: 1 / -1; justify-self: start; text-align: left; }
}

@media (max-width: 640px) {
  :root { --shell: calc(100% - 24px); --space-11: 56px; --space-10: 48px; }
  body { line-height: 1.72; }
  .site-header { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
  .header-shell { grid-template-columns: auto 1fr auto; }
  .brand { min-width: 0; }
  .brand-copy { display: none; }
  .menu-toggle { order: 3; justify-self: end; }
  .header-actions { order: 2; justify-self: end; }
  .header-actions .icon-button:first-child { display: none; }
  .primary-nav { top: var(--header-height); }
  .hero { padding-top: 46px; }
  h1 { font-size: clamp(2.25rem, 12vw, 3.5rem); }
  h2 { font-size: clamp(1.62rem, 8vw, 2.3rem); }
  .hero-actions { align-items: stretch; }
  .hero-actions .button { flex: 1 1 180px; }
  .inline-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
  .content-card-grid,
  .content-card-grid.two-up,
  .content-card-grid.three-up { grid-template-columns: 1fr; }
  .content-card { min-height: 0; padding: 22px; }
  .chapter-item { grid-template-columns: 1fr; gap: 10px; padding: 20px 0; }
  .chapter-tag { justify-self: start; }
  .sticky-note { display: block; padding: 22px; }
  .sticky-note .fact-list { margin-top: 18px; }
  .fact-list > div { grid-template-columns: 74px 1fr; }
  .reading-toolbar { display: grid; grid-template-columns: repeat(3, 1fr); }
  .reading-toolbar button { padding-inline: 8px; }
  .manga-collage { gap: 8px; }
  .manga-collage img { border-radius: var(--radius-sm); }
  .gallery-band { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-tools { grid-column: auto; }
  .site-footer { padding: 42px 0; }
}

@media (max-width: 420px) {
  :root { --shell: calc(100% - 20px); }
  .icon-button { width: 38px; height: 38px; }
  .menu-toggle { width: 40px; height: 40px; }
  .hero-lede { font-size: 1rem; }
  .inline-meta { grid-template-columns: 1fr; }
  .hero-actions .button { flex-basis: 100%; }
  .reading-toolbar { grid-template-columns: 1fr 1fr; }
  .reading-toolbar button:last-child { grid-column: 1 / -1; }
  .faq-item summary { padding-right: 50px; }
}

@media print {
  :root { --color-bg: #fff; --color-surface: #fff; --color-text: #111; --color-dark: #000; --color-muted: #444; --color-line: #bbb; }
  body { font-size: 11pt; background: #fff; }
  .site-header,
  .site-footer,
  .hero-actions,
  .reading-toolbar,
  .skip-link,
  .header-actions,
  .menu-toggle { display: none !important; }
  .section,
  .hero,
  .reading-hero,
  .compact-hero,
  .audio-hero,
  .manga-hero { padding: 18pt 0; }
  .shell { width: 100%; }
  a { color: inherit; text-decoration: none; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 8pt; }
  img { max-height: 260pt; object-fit: contain; }
  .content-card,
  .faq-item,
  .sticky-note { box-shadow: none; break-inside: avoid; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* Extended component states and content-specific responsive refinements */
.page-home .novel-preview { border-top: 1px solid var(--color-line); }
.page-home .manga-preview { position: relative; }
.page-home .manga-preview::before { content: ""; position: absolute; inset: 10% 0 14%; background: color-mix(in srgb, var(--color-bg-soft), transparent 38%); z-index: -1; }
.page-novel .reading-hero { background: linear-gradient(180deg, color-mix(in srgb, var(--color-bg-soft), transparent 46%), transparent); }
.page-manga .site-header { border-bottom-color: color-mix(in srgb, var(--color-primary-soft), transparent 35%); }
.page-complete .content-card:nth-child(2n) { background: color-mix(in srgb, var(--color-bg-soft), var(--color-surface) 72%); }
.page-audio .content-card::after { border-style: dashed; }

.content-card-grid.two-up .content-card { min-height: 220px; }
.content-card-grid.three-up .content-card { min-height: 250px; }
.content-card-grid.three-up .content-card h3 { min-height: 2.7em; }
.section-soft .content-card { background: color-mix(in srgb, var(--color-surface), var(--color-bg) 24%); }
.section-soft .content-card:hover { background: var(--color-surface); }

.reading-article h2 { margin-top: 0; }
.reading-article h3 { font-size: 1.18em; }
.reading-article .chapter-item p { max-width: 62ch; }
.reading-article[data-density="compact"] .chapter-item { padding-block: 15px; }
.reading-article[data-density="comfortable"] .chapter-item { padding-block: 28px; }

html[data-theme="dark"] .button-primary { color: #201a1c; background: #d9a8b8; }
html[data-theme="dark"] .button-primary:hover { color: #201a1c; background: #ecc0cd; }
html[data-theme="dark"] .primary-nav a[aria-current="page"] { color: #211a1c; background: #d9a8b8; }
html[data-theme="dark"] .hero-media img,
html[data-theme="dark"] .manga-collage img,
html[data-theme="dark"] .gallery-band img,
html[data-theme="dark"] .reading-hero-grid img,
html[data-theme="dark"] .compact-hero-grid img,
html[data-theme="dark"] .audio-hero-grid img { filter: brightness(.9) saturate(.9); }

body.font-large { --text-scale: 1.08; }
body.font-larger { --text-scale: 1.15; }
body.reading-focus .site-header { opacity: .94; }
body.reading-focus .site-footer { opacity: .9; }

[data-image-state="missing"] {
  min-height: 220px;
  background:
    linear-gradient(135deg, transparent 0 46%, color-mix(in srgb, var(--color-line), transparent 30%) 46% 47%, transparent 47% 100%),
    var(--color-bg-soft);
  border: 1px solid var(--color-line);
}

.toast-region {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 300;
  display: grid;
  gap: 8px;
  max-width: min(360px, calc(100vw - 40px));
  pointer-events: none;
}
.toast {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--color-dark);
  color: var(--color-bg);
  box-shadow: var(--shadow-float);
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: .82rem;
  opacity: 0;
  transform: translateY(8px);
  animation: toast-in 180ms ease forwards;
}
@keyframes toast-in { to { opacity: 1; transform: translateY(0); } }

.scroll-progress {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 500;
  width: 100%;
  height: 3px;
  transform-origin: left center;
  transform: scaleX(0);
  background: var(--color-accent);
  pointer-events: none;
}

.back-top-floating {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--color-line);
  border-radius: 50%;
  background: var(--color-surface);
  color: var(--color-primary-deep);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 160ms ease, visibility 160ms ease, transform 160ms ease;
}
.back-top-floating[data-visible="true"] { opacity: 1; visibility: visible; transform: translateY(0); }

@supports not (backdrop-filter: blur(1px)) {
  .site-header { background: var(--color-bg); }
}
@supports not (color: color-mix(in srgb, white, black)) {
  .site-header { background: rgba(250, 247, 245, .96); }
  html[data-theme="dark"] .site-header { background: rgba(36, 31, 33, .96); }
}

@media (orientation: landscape) and (max-height: 520px) and (max-width: 960px) {
  :root { --header-height: 58px; }
  .site-header { position: relative; }
  .header-shell { min-height: var(--header-height); }
  .hero,
  .reading-hero,
  .compact-hero,
  .audio-hero,
  .manga-hero { padding-top: 32px; }
}

@media (min-width: 1280px) {
  :root { --shell: min(1240px, calc(100vw - 72px)); }
  .hero-grid { grid-template-columns: 1.05fr .75fr; }
  .hero-copy { padding-left: 24px; }
  .content-card { padding: 30px; }
}

@media (min-width: 1600px) {
  :root { --shell: 1320px; }
  .hero-grid { gap: 110px; }
  .manga-hero-grid { gap: 100px; }
  .gallery-band { gap: 26px; }
}

/* Search interface */
.search-hero { padding: 52px 0 28px; }
.search-shell { display: grid; grid-template-columns: minmax(0, .8fr) minmax(320px, 1.2fr); gap: clamp(34px, 7vw, 100px); align-items: end; }
.search-shell h1 { font-size: clamp(2.2rem, 4.5vw, 4.2rem); }
.search-form { padding: 24px; border: 1px solid var(--color-line); border-radius: var(--radius-md); background: var(--color-surface); box-shadow: var(--shadow-card); }
.search-form label { display: block; margin-bottom: 8px; color: var(--color-muted); font-family: ui-sans-serif, system-ui, sans-serif; font-size: .78rem; font-weight: 700; }
.search-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.search-row input { width: 100%; min-height: 48px; padding: 11px 15px; border: 1px solid var(--color-line-strong); border-radius: var(--radius-pill); background: var(--color-bg); color: var(--color-text); outline: none; }
.search-row input:focus { border-color: var(--color-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary), transparent 82%); }
.search-results { max-width: 980px; }
.search-summary { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.search-summary h2 { margin-bottom: 0; }
.search-summary p { margin-bottom: 4px; color: var(--color-muted); }
.search-result-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.search-result-list li { margin: 0; }
.search-result-list a { display: grid; grid-template-columns: 96px minmax(0, 220px) minmax(0, 1fr); gap: 18px; align-items: center; padding: 18px 20px; border: 1px solid var(--color-line); border-radius: var(--radius-sm); background: var(--color-surface); color: var(--color-text); text-decoration: none; transition: border-color 150ms ease, transform 150ms ease, box-shadow 150ms ease; }
.search-result-list a:hover { transform: translateY(-1px); border-color: var(--color-line-strong); box-shadow: var(--shadow-card); }
.search-result-list strong { color: var(--color-dark); line-height: 1.45; }
.search-result-list a > span:last-child { color: var(--color-muted); font-size: .88rem; line-height: 1.65; }
.search-type { justify-self: start; display: inline-flex; padding: 4px 9px; border-radius: var(--radius-pill); background: var(--color-bg-soft); color: var(--color-primary-deep); font-family: ui-sans-serif, system-ui, sans-serif; font-size: .68rem; font-weight: 700; }
.search-empty { padding: 42px; border: 1px dashed var(--color-line-strong); border-radius: var(--radius-md); background: color-mix(in srgb, var(--color-bg-soft), transparent 42%); }
.search-empty h2 { margin-bottom: 10px; }
.search-empty p { max-width: 52rem; color: var(--color-muted); }
.search-button { text-decoration: none; }

/* Reusable layout primitives used by content pages and future editorial blocks */
.stack { display: flex; flex-direction: column; }
.stack-xs { gap: 6px; }
.stack-sm { gap: 10px; }
.stack-md { gap: 16px; }
.stack-lg { gap: 24px; }
.stack-xl { gap: 36px; }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.cluster-between { justify-content: space-between; }
.center { text-align: center; }
.center > * { margin-inline: auto; }
.measure-xs { max-width: 34rem; }
.measure-sm { max-width: 44rem; }
.measure-md { max-width: 58rem; }
.measure-lg { max-width: 72rem; }
.surface { background: var(--color-surface); border: 1px solid var(--color-line); border-radius: var(--radius-md); }
.surface-soft { background: var(--color-bg-soft); border: 1px solid var(--color-line); border-radius: var(--radius-md); }
.surface-pad-sm { padding: 18px; }
.surface-pad-md { padding: 26px; }
.surface-pad-lg { padding: 36px; }
.border-top { border-top: 1px solid var(--color-line); }
.border-bottom { border-bottom: 1px solid var(--color-line); }
.text-muted { color: var(--color-muted); }
.text-primary { color: var(--color-primary-deep); }
.text-dark { color: var(--color-dark); }
.text-small { font-size: .86rem; }
.text-large { font-size: 1.08rem; }

/* Editorial structures for chapter and version content */
.editorial-note { position: relative; padding: 22px 24px 22px 28px; border-left: 3px solid var(--color-primary-soft); background: color-mix(in srgb, var(--color-bg-soft), transparent 35%); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.editorial-note::before { content: ""; position: absolute; left: -6px; top: 24px; width: 9px; height: 9px; border-radius: 50%; background: var(--color-primary); }
.editorial-note p:last-child { margin-bottom: 0; }
.index-group { border-top: 1px solid var(--color-line); }
.index-row { display: grid; grid-template-columns: minmax(120px, .32fr) minmax(0, 1fr); gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--color-line); }
.index-row dt { color: var(--color-muted); font-size: .8rem; font-family: ui-sans-serif, system-ui, sans-serif; }
.index-row dd { margin: 0; }
.meta-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; list-style: none; }
.meta-list li { display: inline-flex; align-items: center; min-height: 28px; padding: 4px 10px; border-radius: var(--radius-pill); background: var(--color-bg-soft); color: var(--color-muted); font-family: ui-sans-serif, system-ui, sans-serif; font-size: .72rem; }
.prose { max-width: var(--reading-width); font-size: calc(1rem * var(--reading-scale)); }
.prose > * + * { margin-top: 1.2em; }
.prose h2 { margin-top: 2.1em; margin-bottom: .7em; }
.prose h3 { margin-top: 1.7em; margin-bottom: .55em; }
.prose ul, .prose ol { padding-left: 1.35em; }
.prose li + li { margin-top: .45em; }
.prose blockquote { margin: 1.7em 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--color-primary-soft); color: var(--color-muted); }
.prose hr { margin: 2.4em 0; border: 0; border-top: 1px solid var(--color-line); }

/* Media cards */
.media-card { display: grid; grid-template-columns: minmax(120px, .4fr) minmax(0, 1fr); gap: 20px; padding: 18px; border: 1px solid var(--color-line); border-radius: var(--radius-md); background: var(--color-surface); }
.media-card img { width: 100%; height: 100%; min-height: 150px; object-fit: cover; border-radius: var(--radius-sm); }
.media-card-body { align-self: center; }
.media-card-body p:last-child { margin-bottom: 0; }
.media-card-reverse { grid-template-columns: minmax(0, 1fr) minmax(120px, .4fr); }
.media-card-reverse img { order: 2; }
.media-card-reverse .media-card-body { order: 1; }

/* Status and badges */
.badge { display: inline-flex; align-items: center; justify-content: center; min-height: 26px; padding: 3px 9px; border: 1px solid var(--color-line); border-radius: var(--radius-pill); background: var(--color-surface); color: var(--color-muted); font-family: ui-sans-serif, system-ui, sans-serif; font-size: .68rem; font-weight: 700; }
.badge-primary { border-color: color-mix(in srgb, var(--color-primary), transparent 56%); color: var(--color-primary-deep); background: color-mix(in srgb, var(--color-primary-soft), transparent 72%); }
.badge-soft { background: var(--color-bg-soft); }
.badge-outline { background: transparent; }

/* Tables are styled for possible structured version comparisons */
.table-wrap { overflow-x: auto; border: 1px solid var(--color-line); border-radius: var(--radius-md); background: var(--color-surface); }
.content-table { width: 100%; border-collapse: collapse; min-width: 620px; }
.content-table th, .content-table td { padding: 14px 16px; border-bottom: 1px solid var(--color-line); text-align: left; vertical-align: top; }
.content-table th { background: var(--color-bg-soft); color: var(--color-dark); font-family: ui-sans-serif, system-ui, sans-serif; font-size: .78rem; }
.content-table td { color: var(--color-muted); }
.content-table tbody tr:last-child td { border-bottom: 0; }
.content-table tbody tr:hover td { background: color-mix(in srgb, var(--color-bg-soft), transparent 55%); }

/* Form primitives */
.field { display: grid; gap: 7px; }
.field label { color: var(--color-muted); font-family: ui-sans-serif, system-ui, sans-serif; font-size: .78rem; font-weight: 700; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--color-line-strong); border-radius: var(--radius-sm); background: var(--color-bg); color: var(--color-text); padding: 11px 13px; }
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--color-primary); outline: 3px solid color-mix(in srgb, var(--color-primary), transparent 84%); outline-offset: 0; }
.field-hint { color: var(--color-muted); font-size: .76rem; }

/* Accessibility helpers */
[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
[hidden] { display: none !important; }
.inert { pointer-events: none; user-select: none; }
.visually-dim { opacity: .72; }
.touch-target { min-width: 44px; min-height: 44px; }
.break-anywhere { overflow-wrap: anywhere; word-break: break-word; }

/* Fine-grained responsive adjustments */
@media (max-width: 920px) {
  .search-shell { grid-template-columns: 1fr; align-items: start; }
  .search-form { max-width: 680px; }
  .search-result-list a { grid-template-columns: 90px minmax(0, 180px) minmax(0, 1fr); gap: 14px; }
  .media-card { grid-template-columns: minmax(110px, .34fr) minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .search-summary { align-items: start; flex-direction: column; gap: 6px; }
  .search-result-list a { grid-template-columns: 1fr; gap: 6px; }
  .search-type { margin-bottom: 2px; }
  .media-card, .media-card-reverse { grid-template-columns: 1fr; }
  .media-card-reverse img, .media-card-reverse .media-card-body { order: initial; }
  .media-card img { max-height: 320px; }
  .index-row { grid-template-columns: 1fr; gap: 5px; }
}
@media (max-width: 520px) {
  .search-row { grid-template-columns: 1fr; }
  .search-row .button { width: 100%; }
  .search-form { padding: 18px; }
  .search-empty { padding: 26px 20px; }
  .surface-pad-lg { padding: 24px; }
}

/* Dense viewport handling */
@media (max-height: 700px) and (min-width: 900px) {
  .hero { padding-top: 46px; padding-bottom: 54px; }
  .hero-media img { max-height: 560px; }
  .reading-hero, .compact-hero, .audio-hero, .manga-hero { padding-top: 38px; padding-bottom: 48px; }
}

/* High contrast preference */
@media (prefers-contrast: more) {
  :root { --color-line: #a98f98; --color-line-strong: #8b717a; }
  .button-primary { border-color: var(--color-dark); }
  .content-card, .faq-item, .search-form, .search-result-list a { box-shadow: none; }
  a { text-decoration-thickness: 2px; }
}

/* Forced colors support */
@media (forced-colors: active) {
  .button, .icon-button, .content-card, .faq-item, .search-form, .search-result-list a, .sticky-note { border: 1px solid CanvasText; }
  .button-primary, .primary-nav a[aria-current="page"] { forced-color-adjust: none; background: Highlight; color: HighlightText; }
  .eyebrow, .text-link, .search-type, .chapter-tag { color: LinkText; }
  .scroll-progress { background: Highlight; }
}

/* Reading comfort refinements */
.reading-article,
.prose {
  hyphens: auto;
  hanging-punctuation: first last;
  font-variant-numeric: oldstyle-nums proportional-nums;
}
.reading-article p,
.prose p { text-wrap: pretty; }
.reading-article > p:first-of-type::first-letter,
.prose.dropcap > p:first-of-type::first-letter {
  float: left;
  margin: .08em .12em 0 0;
  color: var(--color-primary-deep);
  font-size: 3.2em;
  line-height: .82;
  font-weight: 700;
}
html[data-theme="dark"] .reading-article > p:first-of-type::first-letter,
html[data-theme="dark"] .prose.dropcap > p:first-of-type::first-letter { color: var(--color-primary); }

.chapter-item:nth-child(odd) { background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--color-bg-soft), transparent 74%) 50%, transparent); }
.chapter-item:target { scroll-margin-top: calc(var(--header-height) + 22px); background: color-mix(in srgb, var(--color-primary-soft), transparent 78%); }
.chapter-item:focus-within { outline: 2px solid color-mix(in srgb, var(--color-primary), transparent 65%); outline-offset: 5px; }

.reading-toolbar button[aria-pressed="true"] { border-color: var(--color-primary); background: var(--color-bg-soft); color: var(--color-primary-deep); }
.reading-toolbar button:active { transform: translateY(1px); }

/* Link treatments */
.reading-article a,
.prose a,
.narrow-copy a:not(.button) { text-decoration-color: color-mix(in srgb, var(--color-primary), transparent 45%); text-decoration-thickness: 1.5px; }
.reading-article a:hover,
.prose a:hover,
.narrow-copy a:not(.button):hover { text-decoration-color: currentColor; }
a[href^="mailto:"]::after { content: " ↗"; font-size: .78em; }
a[href^="tel:"] { white-space: nowrap; }

/* Content separators */
.ornament-divider { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 34px auto; color: var(--color-primary-soft); }
.ornament-divider::before,
.ornament-divider::after { content: ""; width: min(120px, 22vw); height: 1px; background: var(--color-line); }
.ornament-divider span { width: 7px; height: 7px; border: 1px solid currentColor; transform: rotate(45deg); }

/* Chapter navigation helpers */
.chapter-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 30px; }
.chapter-nav a { display: grid; gap: 4px; padding: 16px 18px; border: 1px solid var(--color-line); border-radius: var(--radius-sm); background: var(--color-surface); text-decoration: none; }
.chapter-nav a:last-child { text-align: right; }
.chapter-nav small { color: var(--color-muted); font-family: ui-sans-serif, system-ui, sans-serif; }
.chapter-nav strong { color: var(--color-dark); }
.chapter-nav a:hover { border-color: var(--color-primary-soft); box-shadow: var(--shadow-card); }

/* Section anchors and target offset */
[id] { scroll-margin-top: calc(var(--header-height) + 24px); }
.anchor-heading { position: relative; }
.anchor-heading .anchor-link { position: absolute; left: -1.2em; top: .1em; opacity: 0; color: var(--color-primary-soft); text-decoration: none; transition: opacity 150ms ease; }
.anchor-heading:hover .anchor-link,
.anchor-heading .anchor-link:focus { opacity: 1; }

/* Skeleton state only appears while real assets are loading */
.is-loading { position: relative; overflow: hidden; background: var(--color-bg-soft); }
.is-loading::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--color-surface), transparent 30%), transparent); animation: loading-sweep 1.2s ease-in-out infinite; }
@keyframes loading-sweep { to { transform: translateX(100%); } }

/* Sticky utility rail for wider layouts */
.utility-rail { position: sticky; top: calc(var(--header-height) + 24px); display: grid; gap: 8px; align-self: start; }
.utility-rail a,
.utility-rail button { min-height: 40px; padding: 8px 12px; border: 1px solid var(--color-line); border-radius: var(--radius-pill); background: var(--color-surface); color: var(--color-muted); text-decoration: none; font-family: ui-sans-serif, system-ui, sans-serif; font-size: .74rem; text-align: center; }
.utility-rail a:hover,
.utility-rail button:hover { color: var(--color-primary-deep); border-color: var(--color-primary-soft); }

/* Definition and relationship grids */
.relationship-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.relationship-item { padding: 22px; border: 1px solid var(--color-line); border-radius: var(--radius-md); background: var(--color-surface); }
.relationship-item h3 { margin-bottom: 8px; }
.relationship-item p { margin-bottom: 0; color: var(--color-muted); }
.relationship-item .eyebrow { margin-bottom: 9px; }

/* Pagination primitives */
.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin-top: 34px; }
.pagination a,
.pagination span { min-width: 40px; min-height: 40px; display: inline-grid; place-items: center; padding: 6px 10px; border: 1px solid var(--color-line); border-radius: var(--radius-pill); background: var(--color-surface); color: var(--color-text); text-decoration: none; font-family: ui-sans-serif, system-ui, sans-serif; font-size: .8rem; }
.pagination a:hover { border-color: var(--color-primary); color: var(--color-primary-deep); }
.pagination [aria-current="page"] { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }

/* Responsive reading refinements */
@media (max-width: 860px) {
  .relationship-grid { grid-template-columns: 1fr; }
  .utility-rail { position: static; grid-auto-flow: column; grid-auto-columns: minmax(120px, 1fr); overflow-x: auto; padding-bottom: 4px; }
  .anchor-heading .anchor-link { position: static; opacity: 1; margin-left: 6px; font-size: .75em; }
}
@media (max-width: 600px) {
  .chapter-nav { grid-template-columns: 1fr; }
  .chapter-nav a:last-child { text-align: left; }
  .reading-article > p:first-of-type::first-letter,
  .prose.dropcap > p:first-of-type::first-letter { font-size: 2.75em; }
  .ornament-divider { margin-block: 26px; }
}

/* Print-specific editorial cleanup */
@media print {
  @page { margin: 16mm 14mm 18mm; }
  h1, h2, h3 { break-after: avoid; }
  p, li { orphans: 3; widows: 3; }
  .chapter-item,
  .content-card,
  .relationship-item,
  .media-card { break-inside: avoid; }
  .page-top,
  .breadcrumbs,
  .search-form,
  .back-top-floating,
  .toast-region,
  .scroll-progress { display: none !important; }
  .content-card-grid,
  .content-card-grid.two-up,
  .content-card-grid.three-up { display: block; }
  .content-card { margin-bottom: 10pt; }
  .reading-layout,
  .reading-layout.wide-gap,
  .manga-feature,
  .gallery-band,
  .search-shell,
  .footer-grid { display: block; }
  .sticky-note { margin-bottom: 14pt; }
}

/* Additional visual states for content collections */
.collection-list { display: grid; gap: 16px; }
.collection-row { display: grid; grid-template-columns: minmax(150px, .36fr) minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: 18px 20px; border: 1px solid var(--color-line); border-radius: var(--radius-md); background: var(--color-surface); }
.collection-row > img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-sm); }
.collection-row h3 { margin-bottom: 7px; }
.collection-row p { margin-bottom: 0; color: var(--color-muted); }
.collection-row .button { white-space: nowrap; }

.quote-card { position: relative; padding: 30px 32px 28px; border: 1px solid var(--color-line); border-radius: var(--radius-md); background: var(--color-surface); }
.quote-card::before { content: "“"; position: absolute; right: 22px; top: -8px; color: var(--color-bg-soft); font-size: 7rem; line-height: 1; font-family: Georgia, serif; pointer-events: none; }
.quote-card blockquote { position: relative; z-index: 1; margin: 0; color: var(--color-dark); font-size: 1.08rem; line-height: 1.85; }
.quote-card cite { display: block; margin-top: 14px; color: var(--color-muted); font-style: normal; font-size: .82rem; }

.timeline { position: relative; display: grid; gap: 0; padding-left: 30px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 1px; background: var(--color-line-strong); }
.timeline-item { position: relative; padding: 0 0 26px 18px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before { content: ""; position: absolute; left: -28px; top: .65em; width: 9px; height: 9px; border-radius: 50%; background: var(--color-primary); box-shadow: 0 0 0 5px var(--color-bg-soft); }
.timeline-item h3 { margin-bottom: 6px; }
.timeline-item p { margin-bottom: 0; color: var(--color-muted); }

.info-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--color-line); border-radius: var(--radius-md); background: var(--color-line); }
.info-strip > div { padding: 18px 20px; background: var(--color-surface); }
.info-strip strong { display: block; color: var(--color-dark); }
.info-strip span { display: block; margin-top: 3px; color: var(--color-muted); font-size: .8rem; }

.notice { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border: 1px solid var(--color-line); border-radius: var(--radius-sm); background: var(--color-bg-soft); }
.notice::before { content: "i"; flex: 0 0 auto; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--color-primary); color: #fff; font-family: ui-sans-serif, system-ui, sans-serif; font-size: .75rem; font-weight: 800; }
.notice p { margin: 0; color: var(--color-muted); font-size: .9rem; }

@media (max-width: 780px) {
  .collection-row { grid-template-columns: 120px minmax(0, 1fr); }
  .collection-row .button { grid-column: 2; justify-self: start; }
  .info-strip { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .collection-row { grid-template-columns: 1fr; padding: 16px; }
  .collection-row > img { max-height: 260px; }
  .collection-row .button { grid-column: auto; width: 100%; }
  .quote-card { padding: 24px 22px; }
  .timeline { padding-left: 24px; }
}
