:root {
  --paper: #FAF7F5;
  --paper-2: #F1E8E8;
  --ink: #2E2529;
  --text: #3C3437;
  --muted: #786B70;
  --brand: #8C5A6B;
  --brand-soft: #C8A7AE;
  --accent: #A96572;
  --line: rgba(46, 37, 41, .13);
  --line-strong: rgba(46, 37, 41, .2);
  --surface: rgba(255, 255, 255, .68);
  --shadow: 0 18px 45px rgba(73, 51, 58, .09);
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 30px;
  --shell: min(1180px, calc(100vw - 40px));
  --reading: 760px;
  --header-h: 78px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 24px); }
body {
  margin: 0;
  background:
    radial-gradient(circle at 12% 4%, rgba(200,167,174,.16), transparent 26rem),
    linear-gradient(180deg, #fcfaf8 0, var(--paper) 18rem, var(--paper) 100%);
  color: var(--text);
  font-family: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  line-height: 1.78;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
body::selection { background: rgba(169,101,114,.22); color: var(--ink); }
a { color: inherit; text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, [tabindex]:focus-visible { outline: 3px solid rgba(169,101,114,.38); outline-offset: 3px; }

.shell { width: var(--shell); margin-inline: auto; }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 999; padding: 10px 14px; border-radius: 8px; background: var(--ink); color: white; transform: translateY(-180%); transition: transform .2s ease; }
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  min-height: var(--header-h);
  border-bottom: 1px solid transparent;
  background: rgba(250,247,245,.82);
  backdrop-filter: blur(16px) saturate(1.05);
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
html[data-scrolled] .site-header { border-color: var(--line); box-shadow: 0 10px 28px rgba(66,45,53,.06); background: rgba(250,247,245,.94); }
.header-shell { min-height: var(--header-h); display: flex; align-items: center; gap: 32px; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; min-width: 160px; }
.brand img { width: 46px; aspect-ratio: 1; object-fit: cover; border-radius: 14px; background: var(--paper-2); box-shadow: inset 0 0 0 1px var(--line); }
.brand span { display: grid; line-height: 1.15; }
.brand strong { color: var(--ink); font-size: 1.08rem; letter-spacing: .08em; }
.brand small { margin-top: 5px; color: var(--muted); font-size: .76rem; letter-spacing: .08em; }
.site-nav { display: flex; align-items: center; gap: 6px; }
.site-nav a { position: relative; padding: 10px 14px; border-radius: 999px; color: var(--muted); font-family: system-ui, -apple-system, "Microsoft YaHei", sans-serif; font-size: .91rem; text-decoration: none; transition: color .16s ease, background .16s ease; }
.site-nav a:hover { color: var(--ink); background: rgba(200,167,174,.12); }
.site-nav a.is-active { color: var(--brand); background: rgba(140,90,107,.1); font-weight: 650; }
.menu-toggle { display: none; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.7); color: var(--ink); padding: 9px 14px; cursor: pointer; }

main { min-height: calc(100svh - 220px); }
.eyebrow { margin: 0 0 10px; color: var(--brand); font-family: system-ui, -apple-system, "Microsoft YaHei", sans-serif; font-size: .78rem; font-weight: 750; letter-spacing: .18em; text-transform: uppercase; }
.lead { max-width: 68ch; color: #53464b; font-size: clamp(1.08rem, 1.8vw, 1.28rem); line-height: 1.9; }
h1, h2, h3 { color: var(--ink); font-weight: 700; line-height: 1.25; letter-spacing: -.02em; }
h1 { margin: 0; font-size: clamp(2.35rem, 5.8vw, 5.2rem); }
h2 { font-size: clamp(1.6rem, 3.3vw, 2.65rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 10px 18px; border: 1px solid transparent; border-radius: 999px; font-family: system-ui, -apple-system, "Microsoft YaHei", sans-serif; font-size: .92rem; font-weight: 700; text-decoration: none; transition: transform .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease; }
.button:hover { transform: translateY(-1px); }
.button.primary { background: var(--brand); color: white; box-shadow: 0 10px 26px rgba(140,90,107,.22); }
.button.primary:hover { background: #7e4f60; color: white; }
.button.ghost { border-color: var(--line-strong); background: rgba(255,255,255,.52); color: var(--ink); }
.button.soft { border-color: rgba(140,90,107,.15); background: rgba(200,167,174,.2); color: #694251; }
.text-link, .soft-link { color: var(--brand); font-family: system-ui, -apple-system, "Microsoft YaHei", sans-serif; font-weight: 700; }
.soft-link { display: inline-flex; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); text-decoration: none; }

.hero { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(320px, .78fr); gap: clamp(32px, 7vw, 96px); align-items: center; min-height: calc(100svh - var(--header-h)); padding-block: 52px 68px; }
.hero-copy { max-width: 690px; }
.hero-copy h1 { max-width: 9.8ch; }
.hero-copy .lead { margin-top: 26px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.work-facts { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1px; overflow: hidden; margin: 40px 0 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--line); }
.work-facts div { min-width: 0; padding: 17px 16px; background: rgba(255,255,255,.6); }
.work-facts dt { color: var(--muted); font-family: system-ui, sans-serif; font-size: .74rem; }
.work-facts dd { margin: 7px 0 0; color: var(--ink); font-size: .94rem; line-height: 1.45; }
.hero-art { position: relative; margin: 0; }
.hero-art::before { content: ""; position: absolute; inset: 8% -5% -5% 10%; z-index: -1; border-radius: 42% 58% 54% 46% / 43% 42% 58% 57%; background: rgba(200,167,174,.22); filter: blur(1px); }
.hero-art img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: 48% 52% 10% 10% / 18% 18% 8% 8%; box-shadow: var(--shadow); background: var(--paper-2); }
.hero-art figcaption { margin-top: 12px; color: var(--muted); font-size: .8rem; text-align: right; }

.section-heading { display: grid; grid-template-columns: minmax(0,.35fr) minmax(0,1fr); gap: 20px 50px; align-items: end; margin-bottom: 30px; }
.section-heading .eyebrow { align-self: start; padding-top: 12px; }
.section-heading h2 { margin: 0; }
.section-heading > p:last-child { grid-column: 2; margin: -8px 0 0; color: var(--muted); }
.section-heading.compact { grid-template-columns: 180px minmax(0,1fr); }
.reading-split { padding-block: 76px; border-top: 1px solid var(--line); }
.feature-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.feature-card { min-height: 280px; padding: clamp(26px,4vw,44px); border: 1px solid var(--line); border-radius: var(--radius-lg); background: rgba(255,255,255,.54); box-shadow: 0 14px 40px rgba(86,54,64,.05); }
.feature-card:nth-child(2) { background: linear-gradient(145deg, rgba(241,232,232,.88), rgba(255,255,255,.56)); }
.feature-card h3 { margin: 10px 0 14px; font-size: clamp(1.45rem,2.7vw,2.2rem); }
.feature-card p:not(.eyebrow) { max-width: 48ch; color: var(--muted); }
.feature-card a { display: inline-flex; gap: 8px; margin-top: 16px; color: var(--brand); font-weight: 700; text-decoration: none; }
.feature-card a span { transition: transform .16s ease; }
.feature-card a:hover span { transform: translateX(3px); }

.novel-preview { padding-block: 74px; }
.chapter-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-strong); }
.chapter-list li { border-bottom: 1px solid var(--line); }
.chapter-list a { display: grid; grid-template-columns: 100px minmax(0,1fr) minmax(220px,.72fr); gap: 22px; align-items: center; padding: 19px 8px; text-decoration: none; }
.chapter-list a:hover { background: rgba(200,167,174,.08); }
.chapter-no { color: var(--brand); font-family: system-ui, sans-serif; font-size: .76rem; font-weight: 750; letter-spacing: .08em; }
.chapter-title { color: var(--ink); font-weight: 700; }
.chapter-note { color: var(--muted); font-size: .86rem; text-align: right; }
.section-action { display: flex; justify-content: flex-end; margin-top: 24px; }

.visual-band { display: grid; grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr); overflow: hidden; margin-block: 80px 100px; border-radius: var(--radius-lg); background: #302629; color: #f8efef; box-shadow: var(--shadow); }
.visual-copy { display: flex; flex-direction: column; justify-content: center; padding: clamp(34px,5vw,68px); }
.visual-copy .eyebrow { color: #d5b3bb; }
.visual-copy h2 { margin: 0 0 18px; color: #fff9f7; font-size: clamp(1.7rem,3.3vw,3rem); }
.visual-copy p { color: #d8cccf; }
.visual-copy .button { align-self: flex-start; margin-top: 16px; background: rgba(200,167,174,.14); color: white; border-color: rgba(255,255,255,.16); }
.visual-band > img { width: 100%; height: 100%; min-height: 420px; object-fit: cover; }
.secondary-topics { padding-block: 24px 100px; }
.compact-cards { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.compact-card { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,.45); text-decoration: none; }
.compact-card span { display: block; color: var(--brand); font-family: system-ui,sans-serif; font-size: .76rem; font-weight: 800; letter-spacing: .12em; }
.compact-card strong { display: block; margin-top: 9px; color: var(--ink); font-size: 1.32rem; }
.compact-card p { margin: 9px 0 0; color: var(--muted); }

.page-intro { padding-block: 48px 42px; }
.page-intro h1 { max-width: 14ch; font-size: clamp(2.45rem,5vw,4.65rem); }
.page-intro .lead { max-width: 760px; margin-top: 22px; }
.wide-intro h1 { max-width: 18ch; }
.compact-intro { max-width: 920px; margin-inline: auto; }
.breadcrumbs { margin-bottom: 36px; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; color: var(--muted); font-family: system-ui,sans-serif; font-size: .82rem; }
.breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: 8px; color: #b1a2a7; }
.breadcrumbs a { text-decoration: none; }

.reader-layout { display: grid; grid-template-columns: 230px minmax(0,1fr); gap: clamp(34px,6vw,88px); align-items: start; padding-bottom: 110px; }
.reader-toc { min-width: 0; }
.sticky-panel { position: sticky; top: calc(var(--header-h) + 28px); max-height: calc(100vh - var(--header-h) - 50px); overflow: auto; padding-right: 10px; scrollbar-width: thin; scrollbar-color: var(--brand-soft) transparent; }
.sticky-panel > strong { display: block; margin-bottom: 14px; color: var(--ink); font-size: 1rem; }
.sticky-panel ol { margin: 0; padding: 0; list-style: none; border-left: 1px solid var(--line); }
.sticky-panel li { margin: 0; }
.sticky-panel a { display: block; padding: 7px 0 7px 14px; color: var(--muted); font-family: system-ui,sans-serif; font-size: .79rem; line-height: 1.45; text-decoration: none; border-left: 2px solid transparent; transform: translateX(-1px); }
.sticky-panel a:hover, .sticky-panel a[aria-current="location"] { color: var(--brand); border-left-color: var(--brand); }
.reader-content { --reader-scale: 1; width: min(100%, var(--reading)); margin-inline: auto; font-size: calc(1rem * var(--reader-scale)); transition: width .2s ease; }
.reader-content[data-wide] { width: min(100%, 920px); }
.reading-toolbar { position: sticky; top: calc(var(--header-h) + 10px); z-index: 30; display: flex; flex-wrap: wrap; gap: 7px; width: fit-content; margin: 0 0 30px auto; padding: 7px; border: 1px solid var(--line); border-radius: 999px; background: rgba(250,247,245,.92); box-shadow: 0 10px 28px rgba(77,52,60,.08); backdrop-filter: blur(12px); }
.reading-toolbar button { border: 0; border-radius: 999px; background: transparent; color: var(--muted); padding: 7px 11px; font-family: system-ui,sans-serif; font-size: .76rem; cursor: pointer; }
.reading-toolbar button:hover { color: var(--ink); background: rgba(200,167,174,.16); }
.reader-section { padding-block: 12px 44px; border-bottom: 1px solid var(--line); outline: none; }
.reader-section + .reader-section { padding-top: 48px; }
.reader-section h2 { margin: 7px 0 15px; font-size: clamp(1.55rem,2.7vw,2.15rem); }
.reader-section p { font-size: 1.03em; line-height: 2; }
.chapter-kicker { margin-bottom: 0 !important; color: var(--brand); font-family: system-ui,sans-serif; font-size: .74rem !important; font-weight: 800; letter-spacing: .08em; }
.section-summary { padding-left: 18px; border-left: 3px solid rgba(140,90,107,.3); color: #615157; font-size: .98em !important; }
.reader-next { margin-top: 50px; padding: 28px; border-radius: var(--radius); background: var(--paper-2); }
.reader-next p { margin-top: 0; }

.comic-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; padding-bottom: 86px; }
.comic-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: rgba(255,255,255,.53); }
.comic-card > img { width: 100%; aspect-ratio: 16/10; object-fit: cover; background: var(--paper-2); }
.comic-card > div { padding: 25px 28px 30px; }
.comic-card h2 { margin: 5px 0 12px; font-size: clamp(1.3rem,2.4vw,1.9rem); }
.comic-card p:last-child { color: var(--muted); }
.comic-card-featured { grid-column: 1 / -1; display: grid; grid-template-columns: 1.18fr .82fr; align-items: stretch; }
.comic-card-featured > img { height: 100%; aspect-ratio: auto; min-height: 430px; }
.comic-card-featured > div { display: flex; flex-direction: column; justify-content: center; padding: clamp(35px,6vw,72px); }
.comic-card-featured h2 { font-size: clamp(1.75rem,3.2vw,2.7rem); }
.card-index { margin: 0; color: var(--brand); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .77rem; letter-spacing: .12em; }
.bridge-panel { display: flex; align-items: center; justify-content: space-between; gap: 32px; margin-bottom: 100px; padding: 34px 38px; border-radius: var(--radius-lg); background: #eadfe0; }
.bridge-panel h2 { margin: 0 0 10px; font-size: clamp(1.5rem,2.8vw,2.25rem); }
.bridge-panel p { max-width: 64ch; margin-bottom: 0; color: #65565b; }
.bridge-panel .button { flex: 0 0 auto; }

.note-list { max-width: 920px; padding-bottom: 78px; }
.note-list article { display: grid; grid-template-columns: 64px minmax(0,1fr); gap: 22px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.note-list article > span { padding-top: 6px; color: var(--brand-soft); font-family: ui-monospace, monospace; font-size: .8rem; letter-spacing: .12em; }
.note-list h2 { margin: 0 0 8px; font-size: 1.45rem; }
.note-list p { margin: 0; color: var(--muted); }
.cross-links { max-width: 920px; display: flex; align-items: center; justify-content: space-between; gap: 30px; margin-bottom: 100px; padding: 30px 34px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,.5); }
.cross-links h2 { margin: 0 0 8px; font-size: 1.4rem; }
.cross-links p { margin: 0; color: var(--muted); }
.cross-links .button { flex: 0 0 auto; }

.audio-intro { padding-bottom: 54px; }
.audio-intro-grid { display: grid; grid-template-columns: minmax(0,1fr) 420px; gap: 44px; align-items: center; }
.audio-intro-grid img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 50% 50% 18px 18px / 24% 24% 18px 18px; background: var(--paper-2); }
.audio-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1px; overflow: hidden; margin-bottom: 72px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--line); }
.audio-list article { min-height: 220px; padding: 34px; background: rgba(255,255,255,.58); }
.audio-list h2 { margin: 7px 0 10px; font-size: 1.4rem; }
.audio-list p:last-child { color: var(--muted); }

.not-found { min-height: 68vh; display: flex; flex-direction: column; justify-content: center; padding-block: 70px; }
.not-found h1 { max-width: 12ch; }
.not-found > p:not(.eyebrow) { max-width: 56ch; margin-top: 20px; color: var(--muted); }

.site-footer { border-top: 1px solid var(--line); background: rgba(241,232,232,.44); }
.footer-grid { display: grid; grid-template-columns: 1fr auto auto; gap: 50px; align-items: start; padding-block: 42px; }
.footer-grid strong { color: var(--ink); font-size: 1.1rem; }
.footer-grid p { max-width: 44ch; margin: 8px 0 0; color: var(--muted); font-size: .85rem; }
.footer-grid nav { display: grid; gap: 8px; }
.footer-grid nav a, .back-top { color: var(--muted); font-family: system-ui,sans-serif; font-size: .82rem; text-decoration: none; }
.footer-grid nav a:hover, .back-top:hover { color: var(--brand); }

/* Fine-grained responsive behavior: layout, type, navigation and reading density are adjusted independently. */
@media (max-width: 1080px) {
  :root { --shell: min(100% - 32px, 1040px); }
  .hero { grid-template-columns: 1fr 390px; gap: 44px; }
  .hero-copy h1 { font-size: clamp(2.6rem,6vw,4.4rem); }
  .work-facts { grid-template-columns: 1fr; }
  .work-facts div + div { border-top: 1px solid var(--line); }
  .reader-layout { grid-template-columns: 200px minmax(0,1fr); gap: 42px; }
  .audio-intro-grid { grid-template-columns: minmax(0,1fr) 340px; }
}

@media (max-width: 900px) {
  :root { --header-h: 70px; }
  .menu-toggle { display: inline-flex; }
  .site-nav { position: absolute; top: calc(100% + 8px); right: 16px; left: 16px; display: none; flex-direction: column; align-items: stretch; padding: 10px; border: 1px solid var(--line); border-radius: 20px; background: rgba(250,247,245,.98); box-shadow: var(--shadow); }
  .site-nav[data-open] { display: flex; }
  .site-nav a { padding: 12px 14px; border-radius: 12px; }
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 44px; }
  .hero-copy { max-width: 760px; }
  .hero-copy h1 { max-width: 11ch; }
  .hero-art { width: min(100%,680px); margin-left: auto; }
  .hero-art img { aspect-ratio: 16/11; border-radius: 24px; }
  .hero-art::before { inset: 12% -2% -8% 15%; border-radius: 40px; }
  .work-facts { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .work-facts div + div { border-top: 0; border-left: 1px solid var(--line); }
  .section-heading, .section-heading.compact { grid-template-columns: 1fr; gap: 6px; }
  .section-heading .eyebrow { padding-top: 0; }
  .section-heading > p:last-child { grid-column: 1; margin-top: 5px; }
  .visual-band { grid-template-columns: 1fr; }
  .visual-band > img { min-height: 300px; max-height: 500px; }
  .reader-layout { grid-template-columns: 1fr; }
  .reader-toc { order: 0; }
  .sticky-panel { position: static; max-height: none; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,.48); }
  .sticky-panel ol { columns: 2; column-gap: 28px; }
  .reader-content { width: min(100%, 820px); }
  .comic-card-featured { grid-template-columns: 1fr; }
  .comic-card-featured > img { min-height: 0; aspect-ratio: 16/9; }
  .audio-intro-grid { grid-template-columns: 1fr; }
  .audio-intro-grid img { max-width: 620px; margin-left: auto; border-radius: var(--radius-lg); }
}

@media (max-width: 700px) {
  :root { --shell: min(100% - 24px, 660px); }
  body { line-height: 1.7; }
  .brand img { width: 40px; border-radius: 12px; }
  .brand small { display: none; }
  .hero { padding-block: 34px 52px; gap: 34px; }
  .hero-copy h1 { font-size: clamp(2.35rem,12vw,3.7rem); }
  .lead { font-size: 1.04rem; }
  .work-facts { grid-template-columns: 1fr; }
  .work-facts div + div { border-left: 0; border-top: 1px solid var(--line); }
  .feature-grid, .compact-cards, .comic-grid, .audio-list { grid-template-columns: 1fr; }
  .reading-split, .novel-preview { padding-block: 54px; }
  .chapter-list a { grid-template-columns: 82px minmax(0,1fr); gap: 8px 14px; }
  .chapter-note { grid-column: 2; text-align: left; }
  .visual-band { margin-block: 58px 70px; }
  .visual-copy { padding: 30px 24px; }
  .secondary-topics { padding-bottom: 70px; }
  .page-intro { padding-block: 34px 30px; }
  .page-intro h1 { font-size: clamp(2.25rem,11vw,3.6rem); }
  .sticky-panel ol { columns: 1; }
  .reading-toolbar { position: static; margin-left: 0; border-radius: 16px; }
  .reader-section { padding-bottom: 34px; }
  .reader-section + .reader-section { padding-top: 36px; }
  .bridge-panel, .cross-links { flex-direction: column; align-items: flex-start; padding: 28px 24px; }
  .bridge-panel .button, .cross-links .button { width: 100%; }
  .audio-list { background: transparent; border: 0; overflow: visible; gap: 14px; }
  .audio-list article { min-height: 0; border: 1px solid var(--line); border-radius: var(--radius); }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 460px) {
  :root { --shell: calc(100% - 20px); }
  .header-shell { gap: 10px; }
  .brand { min-width: 0; }
  .brand strong { font-size: 1rem; }
  .menu-toggle { padding-inline: 12px; }
  .hero-actions { display: grid; grid-template-columns: 1fr; }
  .button { width: 100%; }
  .hero-art figcaption { text-align: left; }
  .feature-card { min-height: 0; padding: 24px 20px; }
  .chapter-list a { grid-template-columns: 1fr; padding: 17px 2px; }
  .chapter-note { grid-column: 1; }
  .section-action { justify-content: flex-start; }
  .compact-card { padding: 24px 20px; }
  .breadcrumbs { margin-bottom: 26px; }
  .reader-layout { padding-bottom: 74px; }
  .reading-toolbar button { flex: 1 1 auto; }
  .comic-card > div { padding: 22px 20px 26px; }
  .note-list article { grid-template-columns: 44px minmax(0,1fr); gap: 12px; }
}

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

@media print {
  :root { --paper: #fff; --text: #111; --ink: #000; }
  body { background: #fff; color: #111; font-size: 11pt; }
  .site-header, .site-footer, .reading-toolbar, .reader-toc, .hero-actions, .button, .back-top { display: none !important; }
  .shell { width: 100%; }
  .reader-layout { display: block; }
  .reader-content { width: 100%; max-width: none; }
  .reader-section { break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
  a[href]::after { content: " (" attr(href) ")"; font-size: .8em; color: #555; }
}

/* Reusable content primitives for future article additions without changing the visual system. */
.prose { max-width: var(--reading); margin-inline: auto; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { margin-top: 2.2em; margin-bottom: .65em; }
.prose h3 { margin-top: 1.8em; margin-bottom: .55em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .45em; }
.prose blockquote { margin: 1.5em 0; padding: 1em 1.2em; border-left: 3px solid var(--brand-soft); background: rgba(241,232,232,.48); color: #5f5055; }
.prose code { padding: .12em .34em; border-radius: 5px; background: rgba(46,37,41,.07); font-family: ui-monospace, monospace; font-size: .88em; }
.meta-row { display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--muted); font-family: system-ui,sans-serif; font-size: .78rem; }
.meta-row span { display: inline-flex; align-items: center; gap: 6px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.tag-list a, .tag-list span { display: inline-flex; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.45); color: var(--muted); font-family: system-ui,sans-serif; font-size: .75rem; text-decoration: none; }
.notice { padding: 18px 20px; border: 1px solid rgba(140,90,107,.18); border-radius: var(--radius-sm); background: rgba(200,167,174,.12); }
.notice strong { color: var(--ink); }
.notice p:last-child { margin-bottom: 0; }
.quote-card { padding: 28px; border-radius: var(--radius); background: rgba(46,37,41,.95); color: #eee4e7; }
.quote-card blockquote { margin: 0; font-size: 1.18rem; line-height: 1.8; }
.quote-card cite { display: block; margin-top: 14px; color: #cbbbc0; font-size: .8rem; font-style: normal; }
.two-col { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; }
.three-col { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.rule-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.rule-list li { display: grid; grid-template-columns: 140px minmax(0,1fr); gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.rule-list strong { color: var(--ink); }
.rule-list span { color: var(--muted); }
.timeline { position: relative; margin: 0; padding: 0 0 0 26px; list-style: none; }
.timeline::before { content: ""; position: absolute; top: 5px; bottom: 5px; left: 7px; width: 1px; background: var(--line-strong); }
.timeline li { position: relative; padding: 0 0 28px; }
.timeline li::before { content: ""; position: absolute; left: -24px; top: .65em; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 5px var(--paper); }
.timeline strong { display: block; color: var(--ink); }
.timeline p { margin: 5px 0 0; color: var(--muted); }
.index-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(230px,1fr)); gap: 14px; }
.index-item { min-height: 150px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,.4); }
.index-item strong { display: block; color: var(--ink); }
.index-item p { margin: 7px 0 0; color: var(--muted); font-size: .88rem; }
.callout-row { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; padding: 22px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.callout-row p { margin: 0; }
.disclosure { border-top: 1px solid var(--line); }
.disclosure details { border-bottom: 1px solid var(--line); }
.disclosure summary { cursor: pointer; padding: 16px 2px; color: var(--ink); font-weight: 700; }
.disclosure details > div { padding: 0 2px 18px; color: var(--muted); }
.media-frame { overflow: hidden; border-radius: var(--radius-lg); background: var(--paper-2); box-shadow: inset 0 0 0 1px var(--line); }
.media-frame img { width: 100%; height: 100%; object-fit: cover; }
.stateless-tabs { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.stateless-tabs a { padding: 8px 12px; border-radius: 999px; color: var(--muted); font-family: system-ui,sans-serif; font-size: .78rem; text-decoration: none; }
.stateless-tabs a[aria-current="page"] { background: rgba(140,90,107,.1); color: var(--brand); font-weight: 700; }
.empty-state { display: grid; place-items: center; min-height: 240px; padding: 36px; border: 1px dashed var(--line-strong); border-radius: var(--radius); text-align: center; }
.empty-state strong { color: var(--ink); font-size: 1.2rem; }
.empty-state p { max-width: 46ch; margin: 8px 0 0; color: var(--muted); }
.inline-note { display: inline; padding: .08em .32em; border-radius: 5px; background: rgba(169,101,114,.1); color: #6f4654; }
.divider-label { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: center; margin: 28px 0; color: var(--muted); font-family: system-ui,sans-serif; font-size: .74rem; letter-spacing: .1em; }
.divider-label::before, .divider-label::after { content: ""; height: 1px; background: var(--line); }
.avatar-note { display: grid; grid-template-columns: 52px 1fr; gap: 14px; align-items: start; }
.avatar-note .avatar { display: grid; place-items: center; aspect-ratio: 1; border-radius: 50%; background: var(--paper-2); color: var(--brand); font-weight: 800; }
.avatar-note p { margin: 0; color: var(--muted); }
.kbd { display: inline-flex; min-width: 1.8em; justify-content: center; padding: .12em .38em; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 5px; background: rgba(255,255,255,.72); font-family: ui-monospace, monospace; font-size: .78em; }

@media (max-width: 700px) {
  .two-col, .three-col { grid-template-columns: 1fr; }
  .rule-list li { grid-template-columns: 1fr; gap: 4px; }
  .callout-row { grid-template-columns: 1fr; }
}

.reference-section { margin-top: 56px; padding-top: 52px; border-top: 1px solid var(--line-strong); }
.reference-section > h2, .glossary-section > h2 { margin: 6px 0 26px; font-size: clamp(1.6rem,2.9vw,2.3rem); }
.reference-list { border-top: 1px solid var(--line); }
.reference-list article { display: grid; grid-template-columns: 52px minmax(0,1fr); gap: 18px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.reference-no { color: #b69ba4; font-family: ui-monospace, monospace; font-size: .76rem; letter-spacing: .1em; padding-top: 4px; }
.reference-kind { margin: 0 0 4px !important; color: var(--brand) !important; font-family: system-ui,sans-serif; font-size: .7rem !important; font-weight: 800; letter-spacing: .1em; }
.reference-list h3 { margin: 0 0 8px; font-size: 1.16rem; }
.reference-list p:last-child { margin: 0; color: var(--muted); font-size: .96em; }
.glossary-section { margin-top: 64px; padding-top: 52px; border-top: 1px solid var(--line-strong); }
.glossary-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin: 0; }
.glossary-grid div { padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(255,255,255,.42); }
.glossary-grid dt { color: var(--ink); font-weight: 800; }
.glossary-grid dd { margin: 6px 0 0; color: var(--muted); font-size: .9em; }
.comic-notes { padding-bottom: 80px; }
.comic-note-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
.comic-note-grid article { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,.42); }
.comic-note-grid h3 { margin: 0 0 8px; font-size: 1rem; }
.comic-note-grid p { margin: 0; color: var(--muted); font-size: .86rem; line-height: 1.7; }

@media (max-width: 980px) { .comic-note-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 700px) { .glossary-grid, .comic-note-grid { grid-template-columns: 1fr; } .reference-list article { grid-template-columns: 38px minmax(0,1fr); gap: 10px; } }

/* Additional interaction and device adaptations used by the reading-oriented layouts. */
@media (hover: hover) and (pointer: fine) {
  .feature-card, .compact-card, .comic-card, .comic-note-grid article, .glossary-grid div { transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background-color .18s ease; }
  .feature-card:hover, .compact-card:hover, .comic-card:hover { transform: translateY(-2px); border-color: rgba(140,90,107,.24); box-shadow: 0 16px 38px rgba(81,54,63,.08); }
  .comic-note-grid article:hover, .glossary-grid div:hover { border-color: rgba(140,90,107,.22); background: rgba(255,255,255,.62); }
  .chapter-list a { transition: background-color .15s ease, padding-left .15s ease; }
  .chapter-list a:hover { padding-left: 13px; }
}

@media (pointer: coarse) {
  .site-nav a, .reading-toolbar button, .button, .menu-toggle { min-height: 44px; }
  .sticky-panel a { padding-block: 10px; }
  .chapter-list a { padding-block: 21px; }
}

@media (max-height: 680px) and (min-width: 901px) {
  .sticky-panel { max-height: calc(100vh - var(--header-h) - 24px); }
  .sticky-panel a { padding-block: 5px; }
  .reading-toolbar { top: calc(var(--header-h) + 6px); }
}

@media (orientation: landscape) and (max-width: 900px) and (max-height: 520px) {
  :root { --header-h: 60px; }
  .site-header { position: relative; }
  .hero { grid-template-columns: 1.1fr .9fr; gap: 26px; padding-block: 28px; }
  .hero-art img { aspect-ratio: 4/3; }
  .hero-copy h1 { font-size: clamp(2rem,6vw,3.1rem); }
  .hero-copy .lead { margin-top: 14px; font-size: .96rem; }
  .hero-actions { margin-top: 18px; }
  .work-facts { display: none; }
}

@media (prefers-contrast: more) {
  :root { --line: rgba(46,37,41,.28); --line-strong: rgba(46,37,41,.42); --muted: #5c5054; }
  .site-nav a.is-active, .button.soft, .compact-card, .feature-card, .comic-card { border-color: var(--line-strong); }
  .eyebrow, .chapter-kicker, .reference-kind, .card-index { color: #754555; }
}

@media (forced-colors: active) {
  * { forced-color-adjust: auto; }
  .button, .menu-toggle, .reading-toolbar, .feature-card, .comic-card, .compact-card, .glossary-grid div { border: 1px solid CanvasText; }
  .button.primary { background: ButtonFace; color: ButtonText; }
  .sticky-panel a[aria-current="location"] { border-left: 3px solid Highlight; color: LinkText; }
}

@supports not (backdrop-filter: blur(1px)) {
  .site-header { background: rgba(250,247,245,.98); }
  .reading-toolbar { background: var(--paper); }
}

@supports (content-visibility: auto) {
  .reference-list article, .comic-note-grid article { content-visibility: auto; contain-intrinsic-size: 1px 170px; }
}

@supports selector(:focus-visible) {
  :focus:not(:focus-visible) { outline: none; }
}

.page-home .site-header { background-color: rgba(250,247,245,.78); }
.page-home .hero + .reading-split { position: relative; }
.page-home .hero + .reading-split::before { content: ""; position: absolute; left: 50%; top: 0; width: min(100vw, 1400px); height: 100%; transform: translateX(-50%); background: linear-gradient(180deg, rgba(241,232,232,.11), transparent 40%); pointer-events: none; z-index: -1; }
.page-novel main { background: linear-gradient(180deg, rgba(241,232,232,.15), transparent 24rem); }
.page-novel .reader-content { position: relative; }
.page-novel .reader-content::before { content: ""; position: absolute; z-index: -1; inset: -30px -38px auto; height: 180px; border-radius: 50%; background: radial-gradient(circle, rgba(200,167,174,.08), transparent 72%); filter: blur(10px); }
.page-comic main { background: radial-gradient(circle at 85% 8%, rgba(140,90,107,.08), transparent 30rem); }
.page-complete main { background: linear-gradient(180deg, rgba(200,167,174,.11), transparent 22rem); }
.page-audio main { background: radial-gradient(circle at 82% 10%, rgba(200,167,174,.14), transparent 26rem); }
.page-404 main { background: radial-gradient(circle at 50% 30%, rgba(200,167,174,.18), transparent 30rem); }

.reference-list article:nth-child(4n+1) .reference-no { color: #a96572; }
.reference-list article:nth-child(4n+2) .reference-no { color: #8c5a6b; }
.reference-list article:nth-child(4n+3) .reference-no { color: #9c7b84; }
.reference-list article:nth-child(4n+4) .reference-no { color: #b6959e; }
.reference-list article:nth-child(odd) { background: linear-gradient(90deg, rgba(241,232,232,.12), transparent 38%); }
.reference-list article > div { min-width: 0; }
.reference-list article p { overflow-wrap: anywhere; }
.glossary-grid div:nth-child(3n+1) { background: rgba(255,255,255,.5); }
.glossary-grid div:nth-child(3n+2) { background: rgba(241,232,232,.34); }
.glossary-grid div:nth-child(3n+3) { background: rgba(200,167,174,.11); }

.site-nav a[aria-current="page"]::after { content: ""; position: absolute; left: 50%; bottom: 4px; width: 4px; height: 4px; border-radius: 50%; background: currentColor; transform: translateX(-50%); opacity: .7; }
.footer-grid nav a { position: relative; width: fit-content; }
.footer-grid nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -2px; height: 1px; background: var(--brand); transition: right .18s ease; }
.footer-grid nav a:hover::after { right: 0; }

@media (min-width: 1200px) {
  .page-home .hero-copy { padding-left: 14px; }
  .page-home .hero-art { margin-right: 8px; }
  .comic-grid { gap: 28px; }
  .comic-card > div { padding-inline: 32px; }
  .reader-layout { grid-template-columns: 250px minmax(0,1fr); }
  .sticky-panel a { font-size: .8rem; }
}

@media (min-width: 1440px) {
  :root { --shell: min(1260px, calc(100vw - 72px)); }
  .hero { gap: 110px; }
  .hero-copy h1 { font-size: 5.45rem; }
  .feature-card { min-height: 300px; }
  .comic-card-featured > img { min-height: 480px; }
}

@media (max-width: 360px) {
  .brand { gap: 8px; }
  .brand img { width: 36px; }
  .menu-toggle { font-size: .82rem; }
  .site-nav { left: 10px; right: 10px; }
  .hero-copy h1 { font-size: 2.18rem; }
  .hero-copy .lead { font-size: .98rem; }
  .feature-card h3 { font-size: 1.36rem; }
  .page-intro h1 { font-size: 2.08rem; }
  .reading-toolbar { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); width: 100%; }
  .reading-toolbar button { width: 100%; }
  .note-list article { grid-template-columns: 1fr; }
  .note-list article > span { padding-top: 0; }
}
