/* CanonWiki shared presentation — design code, 18 November 2026.
   Source of the visual rules: design/canonwiki-design-code/ (DESIGN-CODE.md, canonwiki.css).
   System fonts only; no downloaded fonts, no layout scripts. Class names below are the
   renderer contract and are unchanged from the previous stylesheet. */

/* 1 · Tokens ------------------------------------------------------------------ */
:root {
  color-scheme: light dark;
  --font-text: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Iowan Old Style", Charter, "Charter BT", "Bitstream Charter", Georgia, "Times New Roman", serif;
  --font-cjk: "Hiragino Sans", "Noto Sans CJK JP", "Yu Gothic", "Microsoft YaHei", sans-serif;
  --ink: #1a1d21; --ink-2: #4a525c; --muted: #66707b;
  --paper: #ffffff; --canvas: #f6f7f9; --head: #eef0f3;
  --line: #e1e4e8; --line-2: #cdd2d8;
  --link: #2450c4; --link-visited: #6b3fb0;
  --notice: #fff8e8; --notice-line: #ecd59f; --notice-ink: #6b4a07;
  --info: #eef3ff; --info-line: #cfdcfb;
  --target: #fff3c4;
  --panel: var(--paper);
  --r-1: 6px; --r-2: 10px; --r-3: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 8px 24px -16px rgba(16, 24, 40, .25);
  --reading-width: 72ch; --contents-width: 200px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e8eaed; --ink-2: #b6bcc4; --muted: #9aa1ab;
    --paper: #15171a; --canvas: #1b1e22; --head: #23272c;
    --line: #2c3036; --line-2: #3a3f46;
    --link: #8fb0ff; --link-visited: #c4a8ff;
    --notice: #2a2312; --notice-line: #5a4a1e; --notice-ink: #f0d58f;
    --info: #18213a; --info-line: #2c3b66; --target: #3a3214;
    --shadow: none;
  }
}

/* 2 · Base -------------------------------------------------------------------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 16px/1.55 var(--font-text); }
a { color: var(--link); text-decoration: none; }
a:visited { color: var(--link-visited); }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
input, select, textarea { max-width: 100%; min-width: 0; }
input:not([type=hidden]), select, textarea { border: 1px solid var(--line-2); border-radius: var(--r-1); background: var(--paper); padding: 7px 10px; }
button { border: 1px solid var(--line-2); border-radius: var(--r-1); background: var(--paper); padding: 7px 14px; font-weight: 600; font-size: 14px; }
button:hover { background: var(--head); }
:is(a, button, input, select, textarea, summary):focus-visible { outline: 2px solid var(--link); outline-offset: 2px; border-radius: 3px; }
[hidden] { display: none !important; }
[lang|="ja"], [lang|="zh"], [lang|="ko"] { font-family: var(--font-cjk); }
img { max-width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -80px; z-index: 20; background: var(--paper); padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r-1); }
.skip:focus { top: 8px; }

/* 3 · Header -------------------------------------------------------------------- */
.masthead { display: flex; align-items: center; gap: 28px; min-height: 64px; padding: 0 max(24px, calc((100% - 1312px) / 2)); background: var(--paper); border-bottom: 1px solid var(--line); }
.brand, .brand:visited { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; white-space: nowrap; line-height: 1; }
.brand:hover { text-decoration: none; color: var(--ink); }
.brand::before { content: "C"; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--ink); color: var(--paper); font: 700 19px/1 var(--font-display); }
.brand-canon, .brand-wiki { font: 700 21px/1 var(--font-display); letter-spacing: -.01em; color: inherit; }
.brand-wiki { margin-left: -10px; }
.site-search { display: flex; align-items: center; flex: 1; max-width: 520px; gap: 6px; font-size: 15px; }
.site-search input { flex: 1; height: 40px; border-radius: var(--r-2); background: var(--canvas); padding: 0 14px; }
.site-search button { height: 40px; border-radius: var(--r-2); background: var(--ink); color: var(--paper); border-color: var(--ink); }
.site-search button:hover { opacity: .9; background: var(--ink); }
.mobile-menu, .mobile-search { display: none; }

/* 4 · Layout -------------------------------------------------------------------- */
.wiki-layout { max-width: 1360px; margin: 0 auto; padding: 0 24px 48px; }
.site-navigation { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 22px; margin: 0 calc(50% - 50vw) 28px; padding: 10px max(24px, calc((100vw - 1312px) / 2)); background: var(--paper); border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 500; }
.site-navigation strong { display: none; }
.site-navigation a, .site-navigation a:visited { color: var(--ink-2); padding: 4px 0; }
.site-navigation a[aria-current=page] { color: var(--ink); font-weight: 650; box-shadow: inset 0 -2px var(--ink); text-decoration: none; }
.site-navigation span { margin-left: auto; color: var(--muted); font-size: 12px; }
.site-navigation .navigation-group { margin-left: 0; padding-left: 18px; border-left: 1px solid var(--line); color: var(--ink); font-size: 14px; font-weight: 650; }
.mobile-menu .navigation-group { display: block; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 12px; font-weight: 650; }
.wiki-page { min-width: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-3); padding: 32px 40px 8px; }
.wiki-page.has-contents { display: grid; grid-template-columns: var(--contents-width) minmax(0, 1fr); gap: 40px; align-items: start; }
.page-main { grid-column: 2; grid-row: 1; min-width: 0; }
.wiki-page:not(.has-contents) .page-main { grid-column: auto; }
main { min-width: 0; min-height: 420px; }
main:focus { outline: none; }

/* 5 · Type ------------------------------------------------------------------------ */
h1 { font: 600 40px/1.12 var(--font-display); letter-spacing: -.01em; margin: 0 0 8px; overflow-wrap: anywhere; }
h2 { font: 600 27px/1.25 var(--font-display); margin: 40px 0 14px; padding: 0 0 8px; border-bottom: 1px solid var(--line); }
h3 { font: 600 21px/1.3 var(--font-display); margin: 26px 0 10px; }
h4 { font: 650 16px/1.4 var(--font-text); margin: 18px 0 8px; }
p { margin: 12px 0; }
ul, ol { padding-left: 24px; margin: 12px 0; }
li { margin: 5px 0; }
main :is(p, li, dd), .breadcrumb, .edition-navigation { overflow-wrap: anywhere; }
main p { max-width: var(--reading-width); }
/* :where() keeps this general reading rule light, so specific rules below win. */
:where(.article-lead p, .article-sections section > p, .article-sections .disclosure-body > p, .about-page p, .guide-page p):not(.page-subtitle, .coverage-note, .section-note, .summary-label, .source-date) { font: 18px/1.7 var(--font-display); }
.article-lead p:is(.coverage-note, .section-note, .summary-label), .article-sections p:is(.coverage-note, .section-note) { font: 13px/1.5 var(--font-text); color: var(--muted); }
.article-lead p.summary-label { font-weight: 650; color: var(--ink-2); margin-bottom: 4px; }
.page-subtitle { color: var(--muted); font-size: 14px; margin: 0 0 20px; }
.breadcrumb { font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.breadcrumb a { color: var(--ink-2); }
.breadcrumb span { margin: 0 8px; color: var(--muted); }
.title-format { font: 400 15px var(--font-text); color: var(--muted); margin-left: 10px; white-space: nowrap; vertical-align: middle; }
.edition-navigation { display: flex; flex-wrap: wrap; gap: 8px 24px; border-bottom: 1px solid var(--line); padding: 0 0 12px; margin: 0 0 20px; font-size: 14px; }
.coverage-note, .section-note { color: var(--muted); font-size: 13px; }
.summary-label { font: 650 13px var(--font-text); letter-spacing: .02em; color: var(--ink-2); }
.guide-callout { background: var(--info); border: 1px solid var(--info-line); border-radius: var(--r-2); padding: 10px 14px; font-size: 14px; }
sup { font-size: 11px; line-height: 0; vertical-align: super; }
.citation { font: 600 11px var(--font-text); white-space: nowrap; }

/* 6 · Article ------------------------------------------------------------------------ */
.article-content { display: block; }
.article-identity { margin-bottom: 8px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.identity-copy { min-width: 0; }
.article-lead { display: flow-root; max-width: 980px; margin: 22px 0 26px; }
.article-lead > p { max-width: none; }
.article-lead > p:first-of-type { margin-top: 0; }
.article-sections section { display: flow-root; }
.cover { float: right; width: 170px; max-width: 35%; margin: 0 0 16px 24px; }
.cover img { display: block; width: 100%; height: auto; aspect-ratio: 17 / 24; object-fit: cover; border-radius: var(--r-1); box-shadow: var(--shadow); background: var(--head); }
.cover figcaption { color: var(--muted); font-size: 12px; line-height: 1.45; margin-top: 8px; }

/* contents rail */
.contents { grid-column: 1; grid-row: 1; position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow: auto; font-size: 14px; }
.contents h2 { font: 700 12px/1.2 var(--font-text); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border: 0; padding: 0; margin: 4px 0 10px; }
.contents ol { list-style: none; margin: 0; padding: 0 0 0 12px; border-left: 2px solid var(--line); }
.contents li { margin: 0; }
.contents a { display: block; padding: 5px 0; }
.mobile-contents { display: none; }
summary { cursor: pointer; min-height: 44px; padding: 9px 0; overflow-wrap: anywhere; }

/* infobox (quick facts) */
.infobox, .editorial-infobox { clear: both; width: 100%; max-width: 100%; border: 1px solid var(--line); border-radius: var(--r-2); overflow: hidden; background: var(--paper); margin: 20px 0 16px; font-size: 14px; }
:is(.infobox, .editorial-infobox, .article-disclosure) > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; padding: 8px 16px; background: var(--head); }
:is(.infobox, .editorial-infobox, .article-disclosure) > summary::-webkit-details-marker { display: none; }
:is(.infobox, .editorial-infobox, .article-disclosure) > summary::after { content: "+"; font: 400 20px/1 var(--font-text); color: var(--muted); }
:is(.infobox, .editorial-infobox, .article-disclosure)[open] > summary::after { content: "−"; }
:is(.infobox, .editorial-infobox, .article-disclosure) > summary h2 { font: 650 15px/1.3 var(--font-text); padding: 0; margin: 0; border: 0; }
:is(.infobox, .editorial-infobox)[open] > summary { border-bottom: 1px solid var(--line); }
.infobox table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.infobox th, .infobox td { border: 0; border-top: 1px solid var(--line); padding: 8px 16px; vertical-align: top; text-align: left; overflow-wrap: anywhere; line-height: 1.45; }
.infobox tr:first-child > * { border-top: 0; }
.infobox th, .infobox .fact-label { width: 34%; font-weight: 400; color: var(--muted); overflow-wrap: break-word; word-break: normal; }
.editorial-infobox dl { display: grid; grid-template-columns: minmax(100px, 1fr) minmax(0, 2fr); margin: 0; }
.editorial-infobox dt, .editorial-infobox dd { margin: 0; padding: 8px 16px; border-top: 1px solid var(--line); min-width: 0; }
.editorial-infobox dt { color: var(--muted); }
.editorial-infobox dd > p:first-child { margin-top: 0; }
.editorial-infobox dd > p:last-child { margin-bottom: 0; }

/* disclosures */
.article-disclosure { border: 1px solid var(--line); border-radius: var(--r-2); overflow: hidden; margin: 12px 0; }
.article-disclosure[open] > summary { border-bottom: 1px solid var(--line); }
.disclosure-body { padding: 4px 16px 8px; }

/* 7 · Tables -------------------------------------------------------------------------- */
.wikitable { width: 100%; max-width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; border: 1px solid var(--line); border-radius: var(--r-2); overflow: hidden; background: var(--paper); font-size: 14px; margin: 12px 0 22px; }
.wikitable th, .wikitable td { border: 0; border-top: 1px solid var(--line); padding: 10px 14px; vertical-align: top; text-align: left; overflow-wrap: anywhere; line-height: 1.45; }
.wikitable thead th { border-top: 0; background: var(--canvas); color: var(--ink-2); font-weight: 650; }
.wikitable tbody th { font-weight: 400; }
.wikitable caption { text-align: left; font-weight: 650; padding: 0 0 8px; }
.article-sections .wikitable { table-layout: auto; }
.community-page { max-width: 1100px; }
.community-page section { margin-block: 24px; }
.recent-changes-table thead th:first-child { width: 36%; }
.recent-changes-table thead th:nth-child(2) { width: 16%; }
.recent-changes-table thead th:nth-child(3) { width: 32%; }
.recent-changes-table time { white-space: nowrap; }
.edition-label { display: block; color: var(--muted); font-size: 12px; font-weight: 400; margin-top: 3px; }
.volume-table th:first-child { width: 30%; }
.volume-links { list-style: none; display: flex; flex-wrap: wrap; gap: 5px 14px; margin: 0; padding: 0; }
.volume-links li { margin: 0; }

/* 8 · Sources ------------------------------------------------------------------------ */
.source-list, .source-citations { font-size: 14px; line-height: 1.65; color: var(--ink-2); }
.source-list li { overflow-wrap: anywhere; padding: 3px 0; }
.source-citations > li { margin: 14px 0; }
:is(.source-list, .source-citations) > li:target { background: var(--target); outline: 4px solid var(--target); border-radius: 2px; }
.source-date { color: var(--muted); font-size: 13px; }
.source-citations blockquote { margin: 10px 0 10px 14px; padding-left: 12px; border-left: 3px solid var(--line-2); overflow-wrap: anywhere; font-family: var(--font-display); }
.source-record .source-record-value, .source-hash { overflow-wrap: anywhere; }
.source-scope-json { white-space: pre-wrap; overflow-wrap: anywhere; }
.source-record dl { margin: 8px 0; }
.source-record dt { font-weight: 650; }
.source-record dd { margin: 0 0 10px 16px; }

/* 9 · Scope notice (reader position for fixed-scope pages) ----------------------------- */
.editorial-scope { background: var(--notice); border: 1px solid var(--notice-line); color: var(--notice-ink); border-radius: var(--r-2); padding: 10px 14px; margin: 20px 0; font-size: 14px; }
.editorial-scope h2 { font: 650 14px/1.4 var(--font-text); margin: 0 0 4px; padding: 0; border: 0; color: inherit; }
.editorial-scope p { margin: 4px 0; }

/* Explore tiles (series hub) */
.explore-tiles { margin: 28px 0 8px; }
.explore-tiles h2 { margin-top: 0; }
.explore-tiles ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.explore-tiles li { margin: 0; }
.explore-tiles a, .explore-tiles a:visited { display: block; height: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-2); background: var(--paper); color: var(--ink); text-decoration: none; }
.explore-tiles a:hover { border-color: var(--line-2); box-shadow: var(--shadow); text-decoration: none; }
.explore-tiles b { display: block; font: 600 18px/1.25 var(--font-display); }
.explore-tiles .section-note { display: block; margin-top: 4px; font-size: 13px; }

/* Fiction wikis index: work entries */
.about-page > ul:has(> li > h2) { list-style: none; padding: 0; margin: 20px 0 0; }
.about-page > ul > li:has(> h2) { margin: 0; padding: 14px 0; border-top: 1px solid var(--line); }
.about-page > ul > li > h2 { margin: 0; padding: 0; border: 0; font-size: 21px; }
.about-page > ul > li > h2 + p { margin: 4px 0 0; font: 14px/1.5 var(--font-text); color: var(--muted); }

/* 10 · Directory ------------------------------------------------------------------------ */
.directory-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 20px; }
.directory-heading .page-subtitle { margin: 0; }
.directory-count { font-size: 13px; white-space: nowrap; color: var(--muted); }
.directory-panel > h2 { margin-top: 8px; }
.catalog-search { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin: 16px 0; }
.catalog-search label { font-size: 14px; color: var(--ink-2); }
.catalog-search input { width: min(380px, 100%); height: 40px; border-radius: var(--r-2); }
.directory-mobile-controls { display: none; }
.featured-guides { margin-top: 24px; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 0; margin: 10px 0; font-size: 13px; }
.filter-bar form { display: contents; }
.filter-bar span { margin-right: 4px; color: var(--muted); }
.filter-bar button, .filter-link, .filter-link:visited { font: 500 13px var(--font-text); border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--ink-2); padding: 6px 13px; }
.filter-bar button[aria-pressed=true], .filter-link[aria-current=page] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.result-count { border-top: 1px solid var(--line); padding: 10px 0; margin: 8px 0 0; font-size: 13px; color: var(--muted); }
#popular-note, .catalog-note { font-size: 13px; color: var(--muted); }
.catalog-table { margin: 0; }
.catalog-table th:first-child { width: 64%; }
.catalog-table th:nth-child(2) { width: 13%; }
.catalog-table tbody tr:hover { background: var(--canvas); }
.topic-row { display: flex; align-items: flex-start; gap: 14px; }
.topic-picture { display: block; flex: 0 0 52px; }
.topic-copy { flex: 1; min-width: 0; }
.topic-cover { display: block; flex: 0 0 52px; width: 52px; height: 74px; object-fit: cover; background: var(--head); border-radius: 4px; }
.topic-title { font: 600 17px/1.3 var(--font-display); display: block; }
.topic-details { font-size: 12px; line-height: 1.5; color: var(--muted); margin: 4px 0 0; }
.topic-summary { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: 14px; line-height: 1.5; margin: 5px 0 0; color: var(--ink-2); }
.mobile-edition { display: none; }
.format-label, .catalog-table td:last-child { font-size: 12px; color: var(--muted); }
.catalog-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 0; font-size: 14px; }
.empty-results { padding: 12px 0; }

/* 11 · Footer -------------------------------------------------------------------------- */
.footer { border-top: 1px solid var(--line); padding: 18px 0 22px; margin-top: 40px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; font-size: 13px; color: var(--muted); }
:is(section, details, div, article, li)[id] { scroll-margin-top: 20px; }
/* Fragment links reveal a closed native details ancestor without JavaScript. */
.disclosure-body[id], #quick-facts-content { scroll-margin-top: 72px; }

/* 12 · Title pages: facts column on wide screens -------------------------------------- */
@media (min-width: 1050px) {
  .title-page .article-content:has(> .infobox) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 300px); column-gap: 36px; align-items: start; }
  .title-page .article-content > * { grid-column: 1; min-width: 0; }
  .title-page .article-content > .infobox { grid-column: 2; grid-row: 1 / span 3; margin: 0; position: sticky; top: 24px; }
  .title-page .article-content > .infobox .fact-label, .title-page .article-content > .infobox th { width: 100px; }
  .title-page .article-content > .article-lead { margin-top: 0; }
}

/* 13 · Public wiki article treatment (WikiPacket renderer) ----------------------------- */
.public-manga { min-width: 0; }
.public-manga .breadcrumb { margin-bottom: 16px; }
.public-manga .article-identity { margin: 0 0 18px; }
.public-manga h1 { font-size: 40px; }
.public-manga .page-subtitle { margin: 8px 0 0; }
.public-manga .coverage-note { background: var(--notice); border: 1px solid var(--notice-line); color: var(--notice-ink); border-radius: var(--r-2); padding: 10px 14px; font-size: 14px; }
.public-manga .article-lead { margin: 20px 0 22px; }
.public-manga .article-lead p { font: 19px/1.7 var(--font-display); }
.public-manga article > .wikitable { margin: 0 0 20px; table-layout: fixed; }
.public-manga article > .wikitable caption { padding: 0 0 8px; font: 700 12px/1.2 var(--font-text); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); text-align: left; }
.public-manga article > .wikitable th { width: 36%; font-size: 13px; color: var(--muted); }
.public-manga article > .wikitable td p:first-child { margin-top: 0; }
.public-manga article > .wikitable td p:last-child { margin-bottom: 0; }
.public-manga .article-sections section { padding-bottom: 8px; scroll-margin-top: 16px; }
.public-manga .article-sections section > p { font: 18px/1.7 var(--font-display); }
.public-manga .wikitable td p { font: 14px/1.45 var(--font-text); margin: 0; }
.public-manga .source-context summary { min-height: 0; padding: 4px 0; font-size: 12.5px; color: var(--muted); }
.public-manga .source-context { border-left: 2px solid var(--line-2); padding-left: 10px; color: var(--muted); font-size: 13px; }
@media (min-width: 1200px) { .public-manga article > .wikitable { float: right; width: min(300px, 38%); margin: 0 0 20px 28px; } }

/* 14 · Responsive ----------------------------------------------------------------------- */
@media (max-width: 1199px) {
  .wiki-page.has-contents { display: block; }
  .page-main { display: block; }
  .contents { display: none; }
  .article-identity.has-cover { display: grid; grid-template-columns: minmax(0, 1fr) 140px; gap: 24px; align-items: start; }
  .article-identity > .cover { grid-column: 2; grid-row: 1; float: none; width: 140px; max-width: 100%; margin: 0; }
  .article-identity > .identity-copy { grid-column: 1; grid-row: 1; }
  .mobile-contents { display: block; border: 1px solid var(--line); border-radius: var(--r-2); padding: 0 14px; margin: 20px 0; font-size: 14px; }
  .mobile-contents > summary { font-weight: 650; }
  .mobile-contents ol { display: flex; flex-wrap: wrap; gap: 0 24px; list-style: none; padding: 0; margin: 0 0 10px; }
  .mobile-contents a { display: inline-block; padding: 8px 0; min-height: 44px; }
}
@media (max-width: 760px) {
  .masthead { min-height: 56px; padding: 6px 16px; gap: 16px; }
  .brand::before { width: 28px; height: 28px; font-size: 17px; }
  .brand-canon, .brand-wiki { font-size: 19px; }
  .brand { margin-right: auto; }
  .site-search, .site-navigation { display: none; }
  .mobile-search { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; font-weight: 600; }
  .mobile-menu { display: block; font-size: 14px; font-weight: 600; }
  .mobile-menu > summary { padding: 10px 0; }
  .mobile-menu nav { position: absolute; z-index: 10; top: 56px; right: 16px; width: min(300px, calc(100% - 32px)); max-height: calc(100dvh - 72px); overflow: auto; border: 1px solid var(--line); border-radius: var(--r-2); padding: 8px 14px; background: var(--paper); box-shadow: var(--shadow); font-weight: 500; }
  .mobile-menu nav a { display: block; min-height: 44px; padding: 10px 0; }
  .wiki-layout { padding: 12px 0 24px; }
  .wiki-page { border-inline: 0; border-radius: 0; padding: 22px 16px 4px; }
  main { min-height: 350px; }
  h1 { font-size: 30px; }
  h2 { font-size: 23px; }
  .article-lead p, .article-sections section > p { font-size: 17px; }
  .cover { width: 100px; max-width: 34%; margin-left: 16px; margin-bottom: 12px; }
  .article-identity.has-cover { grid-template-columns: minmax(0, 1fr) 100px; gap: 16px; }
  .article-identity > .cover { width: 100px; }
  .cover figcaption { font-size: 11px; }
  .infobox th, .infobox .fact-label { width: 36%; }
  .infobox th, .infobox td { padding: 9px 12px; }
  .edition-navigation { font-size: 13px; gap: 8px; }
  .article-sections .wikitable { table-layout: fixed; }
  .recent-changes-table { border: 0; }
  .recent-changes-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .recent-changes-table tbody { display: block; }
  .recent-changes-table tr { display: block; border: 1px solid var(--line); border-radius: var(--r-2); margin-bottom: 14px; }
  .recent-changes-table tbody th { display: block; padding: 10px 12px; background: var(--head); font-weight: 650; border: 0; }
  .recent-changes-table td { display: block; border: 0; padding: 5px 12px; }
  .recent-changes-table td::before { content: attr(data-label) ": "; font-size: 12px; color: var(--muted); }
  .recent-changes-table td:last-child { padding-bottom: 10px; }
  input:not([type=hidden]), select, textarea, button, .filter-link { font-size: 16px; min-height: 44px; }
  .filter-link { display: inline-flex; align-items: center; }
  .filter-bar button, .filter-link { font-size: 15px; min-height: 44px; padding: 9px 14px; }
  .filter-bar span { flex-basis: 100%; }
  .catalog-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
  .catalog-search label { grid-column: 1 / -1; margin: 0; }
  .catalog-search input[type=search] { width: 100%; margin: 0; }
  .directory-mobile-controls { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: end; gap: 8px; margin: 16px 0; }
  .directory-mobile-filter { display: grid; gap: 4px; min-width: 0; }
  .directory-mobile-filter label { font-size: 13px; }
  .directory-mobile-filter select { width: 100%; padding: 7px 4px; }
  .directory-mobile-apply { padding: 7px 8px; }
  .directory-mobile-controls ~ .filter-bar, .directory-mobile-controls + .filter-bar { display: none; }
  .catalog-pagination a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 0; }
  .directory-count { font-size: 12px; }
  .catalog-table th:first-child { width: 76%; }
  .catalog-table th:nth-child(2) { width: 24%; }
  .catalog-table thead th:last-child, .catalog-table tbody td:last-child { display: none; }
  .catalog-table th, .catalog-table td { padding: 10px 10px; }
  .topic-row { gap: 10px; }
  .topic-picture { flex-basis: 40px; }
  .topic-cover { flex-basis: 40px; width: 40px; height: 58px; }
  .topic-title { font-size: 16px; }
  .topic-summary { font-size: 13px; }
  .mobile-edition { display: block; font-size: 12px; color: var(--muted); margin: 7px 0 0; }
  .editorial-infobox dl { display: block; }
  .editorial-infobox dt { padding-bottom: 0; }
  .editorial-infobox dd { padding-top: 4px; border-top: 0; }
  .public-manga h1 { font-size: 32px; }
}

/* 15 · Print ------------------------------------------------------------------------------ */
@media print {
  .masthead, .site-navigation, .footer, .skip, .catalog-search, .filter-bar, .mobile-contents, .contents { display: none; }
  body { background: #fff; }
  .wiki-layout { display: block; margin: 0; padding: 0; }
  .wiki-page, .wiki-page.has-contents { display: block; border: 0; padding: 0; }
  main { min-height: 0; }
  .wikitable, .infobox { break-inside: avoid; }
  main details::details-content { content-visibility: visible; }
  main details:not([open]) > :not(summary) { display: block !important; }
  main details > summary::after { content: none; }
}

/* Wiki catalog: the wikis-only home and A–Z list (wiki_site.py). */
.wiki-catalog h1 { margin-bottom: 6px; }
.catalog-lede { max-width: 68ch; font: 18px/1.65 var(--font-display); color: var(--ink-2); }
.wiki-cards { list-style: none; margin: 0 0 8px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.wiki-card { display: flex; flex-direction: column; gap: 3px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-2); background: var(--paper); position: relative; }
.wiki-card:hover { border-color: var(--line-2); background: var(--canvas); }
.wiki-card-title { font: 600 18px/1.3 var(--font-display); }
.wiki-card-title::after { content: ""; position: absolute; inset: 0; border-radius: var(--r-2); }
.wiki-card-title:focus-visible { outline: none; }
.wiki-card:focus-within { outline: 2px solid var(--link); outline-offset: 2px; }
.wiki-card-meta { color: var(--muted); font-size: 14px; }
.az-jump { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 8px; position: sticky; top: 0; z-index: 2; padding: 8px 0; background: var(--paper); border-bottom: 1px solid var(--line); }
.az-jump a { min-width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: var(--r-1); font-weight: 600; font-size: 14px; color: var(--ink-2); }
.az-jump a:hover { background: var(--canvas); color: var(--ink); }
.az-group { scroll-margin-top: 60px; }
.az-group h3 { font: 600 22px/1.2 var(--font-display); margin: 24px 0 10px; }
@media (max-width: 760px) { .wiki-cards { grid-template-columns: 1fr; } .az-jump a { min-width: 30px; height: 30px; } }
