/* Anime 2027 */
:root {
    color-scheme: light;
    --ink: #252832;
    --muted: #575e6e;
    --paper: #fffdf9;
    --panel: #f7f5ef;
    --line: #ddd9d0;
    --link: #234f7e;
    --accent: #8c3343;
    --body: system-ui, -apple-system, "Segoe UI", sans-serif;
    --display: Georgia, "Times New Roman", serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: #f0eee8; color: var(--ink); font: 1rem/1.65 var(--body); }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: .2em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
button, input, textarea, select { font: inherit; }
button, summary { cursor: pointer; }
code { border-radius: .15em; background: #eae6dc; padding: .1em .25em; overflow-wrap: anywhere; }
.wrap { width: min(100% - 3rem, 88rem); margin-inline: auto; }
.skip-link { position: absolute; top: .5rem; left: .5rem; z-index: 10; padding: .5rem 1rem; background: var(--paper); transform: translateY(-200%); }
.skip-link:focus { transform: none; }
.masthead { border-top: 4px solid var(--accent); border-bottom: 1px solid var(--line); background: var(--paper); }
.masthead-inner, .footer-inner { min-height: 4.65rem; display: flex; align-items: center; justify-content: space-between; gap: 1.2rem; }
.brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--ink); font: 700 1.55rem/1 var(--display); text-decoration: none; white-space: nowrap; }
.brand-mark { width: 2.05rem; aspect-ratio: 1; display: grid; place-items: center; border: 1px solid var(--accent); background: #f0e1df; color: var(--accent); font-size: 1.24rem; }
.site-nav ul, .site-footer ul { display: flex; flex-wrap: wrap; gap: .45rem 1.1rem; padding: 0; margin: 0; list-style: none; }
.site-nav a, .site-footer a { font-size: .9rem; font-weight: 600; text-decoration: none; }
.site-footer { color: var(--muted); border-top: 1px solid var(--line); background: #eeebe3; }
.footer-inner { min-height: 4rem; }
.wiki-shell { display: grid; grid-template-columns: minmax(10rem, 12.3rem) minmax(0, 1fr); gap: 1.65rem; align-items: start; padding-block: 2rem 3.25rem; }
.wiki-sidebar { position: sticky; top: 1rem; max-height: calc(100vh - 2rem); overflow: auto; }
.wiki-sidebar nav + nav { margin-top: 1.2rem; }
.wiki-sidebar h2 { border-bottom: 1px solid var(--line); padding: .35rem .1rem; margin-bottom: .45rem; font-size: .86rem; font-weight: 750; color: var(--ink); }
.wiki-sidebar ul, .wiki-toc { list-style: none; padding: 0; margin: 0; }
.wiki-sidebar li a, .wiki-toc li a { display: block; padding: .32rem .48rem; font-size: .88rem; line-height: 1.4; text-decoration: none; }
.wiki-sidebar a:hover, .wiki-toc a:hover { background: #ece8e0; text-decoration: underline; }
.wiki-sidebar a[aria-current="page"] { background: #ebdfe0; color: #702636; font-weight: 700; }
.wiki-toc li.toc-level-3 { margin-inline-start: .8rem; border-inline-start: 1px solid var(--line); }
.wiki-paper { min-width: 0; padding: clamp(1.3rem, 3.1vw, 3.1rem); background: var(--paper); border: 1px solid var(--line); }
.wiki-welcome { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .82fr); min-height: 14.5rem; background: #f1e6e1; border: 1px solid #e1d4ce; }
.wiki-welcome > div { padding: clamp(1.25rem, 3vw, 2.6rem); }
.wiki-welcome img { width: 100%; height: 100%; min-height: 10rem; object-fit: cover; object-position: 60% 54%; }
.wiki-welcome h1, .section-heading h1, .admin h1, .page-heading h1 { color: var(--ink); font: 400 clamp(2.15rem, 4vw, 3.8rem)/1.05 var(--display); letter-spacing: -.055em; text-wrap: balance; }
.wiki-welcome p { max-width: 34ch; margin-block: .7rem 1.25rem; color: var(--muted); }
.button { display: inline-block; padding: .5rem .78rem; border: 1px solid #c7b5ae; border-radius: .2rem; background: var(--paper); color: var(--ink); font-weight: 650; font-size: .94rem; text-decoration: none; }
.button:hover { background: #eee3df; color: var(--accent); border-color: var(--accent); }
.button.primary { background: var(--accent); border-color: var(--accent); color: white; }
.button.primary:hover { background: #702636; }
.wiki-news { margin-top: 1.65rem; scroll-margin-top: 1.4rem; }
.section-heading { padding-bottom: .52rem; border-bottom: 1px solid var(--line); }
.section-heading h2 { font: 400 clamp(1.8rem, 3vw, 2.65rem)/1.1 var(--display); letter-spacing: -.04em; }
.news-card { display: flex; gap: 1.2rem; align-items: start; padding-block: 1.2rem; border-bottom: 1px solid var(--line); }
.card-image { width: clamp(6rem, 13vw, 12rem); flex: 0 0 auto; overflow: hidden; border: 1px solid var(--line); }
.card-image img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.card-body { min-width: 0; overflow-wrap: anywhere; }
.card-meta, .byline, .wiki-breadcrumbs, .empty { color: var(--muted); font-size: .9rem; }
.card-meta { display: flex; flex-wrap: wrap; gap: .3rem .85rem; }
.card-body h2, .card-body h3 { margin-block: .27rem .45rem; font: 400 clamp(1.35rem, 2.6vw, 2.1rem)/1.15 var(--display); letter-spacing: -.02em; }
.card-body h2 a, .card-body h3 a { text-decoration: none; }
.card-body h2 a:hover, .card-body h3 a:hover { text-decoration: underline; }
.card-body p { max-width: 75ch; color: var(--muted); }
.empty { margin-block: 1.1rem; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1rem; }
.page-numbers { border: 1px solid var(--line); padding: .3rem .6rem; }
.page-numbers.current { background: var(--panel); }
.story { overflow-wrap: anywhere; }
.wiki-breadcrumbs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .75rem; }
.story-header { border-bottom: 1px solid var(--line); padding-bottom: 1rem; margin-bottom: 1.25rem; }
.story h1 { font: 400 clamp(2.05rem, 4.1vw, 3.9rem)/1.07 var(--display); letter-spacing: -.048em; max-width: 31ch; }
.byline { margin-top: .85rem; }
.story-intro { margin-bottom: 1.35rem; color: #435064; font-size: 1.12rem; max-width: 75ch; }
.wiki-entry { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(1.2rem, 2.6vw, 2.25rem); align-items: start; }
.wiki-entry.has-reference { grid-template-columns: minmax(0, 1fr) minmax(13rem, 16.5rem); }
.story-content { min-width: 0; max-width: 75ch; font-size: 1.04rem; line-height: 1.78; grid-row: 1; }
.story-content > * + * { margin-top: .95rem; }
.story-content h2, .story-content h3 { max-width: none; scroll-margin-top: 1.35rem; }
.story-content h2 { padding-bottom: .35rem; margin-top: 1.55em; border-bottom: 1px solid var(--line); font: 400 clamp(1.55rem, 2.85vw, 2.3rem)/1.15 var(--display); letter-spacing: -.034em; }
.story-content h3 { margin-top: 1.3em; font-size: 1.17rem; line-height: 1.35; }
.story-content > :first-child { margin-top: 0; }
.story-content ul { padding-inline-start: 1.4rem; }
.story-content :target { color: var(--accent); }
.infobox { grid-column: 2; border: 1px solid #dbccc6; background: var(--panel); }
.infobox h2 { background: #eee0d9; color: #583039; padding: .55rem .75rem; font: 700 1.16rem/1.25 var(--display); border-bottom: 1px solid #dbccc6; }
.infobox figure { padding: .65rem .65rem .3rem; }
.infobox figure img { width: 100%; border: 1px solid #ded4c9; }
.infobox figcaption { color: var(--muted); font-size: .78rem; text-align: center; margin-top: .3rem; }
.infobox dl > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: .55rem; padding: .45rem .7rem; border-top: 1px solid var(--line); font-size: .83rem; line-height: 1.4; }
.infobox dt { font-weight: 700; }
.reference-links { margin: 0; padding: .6rem .7rem .75rem; border-top: 1px solid var(--line); list-style: none; font-size: .88rem; }
.reference-links li + li { margin-top: .35rem; }
.wiki-mobile-toc { display: none; }
.table-scroll { max-width: 100%; overflow-x: auto; border: 1px solid var(--line); }
.story-content table { border-collapse: collapse; width: 100%; min-width: 28rem; font-size: .92rem; line-height: 1.5; }
.story-content th, .story-content td { text-align: left; vertical-align: top; padding: .57rem .65rem; border-bottom: 1px solid var(--line); }
.story-content th { background: #eae6df; }
.story-content td:first-child { font-weight: 650; }
.story-content tr:nth-child(even) { background: #f7f5f0; }
.story-content tr:last-child td { border-bottom: 0; }
.story-links { display: flex; flex-wrap: wrap; align-items: start; gap: .65rem; margin-top: 1.6rem; padding-top: .9rem; border-top: 1px solid var(--line); }
.section { padding-block: clamp(2rem, 5vw, 4.6rem); }
.page-heading p { margin-top: .8rem; }
.admin h2 { font: 400 clamp(1.7rem, 3vw, 2.2rem)/1.15 var(--display); margin-bottom: .6rem; }
.admin p { color: var(--muted); margin-top: .6rem; }
.editor-heading, .editor-list li { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .7rem 1.2rem; }
.editor-heading { margin-bottom: 1.35rem; }
.admin-panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.admin-panel { padding: clamp(1rem, 3vw, 1.8rem); border: 1px solid var(--line); background: var(--paper); }
.editor-form { display: grid; gap: 1rem; width: min(100%, 50rem); margin-top: 1.3rem; }
.editor-form label { display: grid; gap: .35rem; font-size: .95rem; }
.editor-form input:not([type="checkbox"]), .editor-form textarea, .editor-form select { display: block; width: 100%; min-width: 0; padding: .55rem .7rem; border: 1px solid #968f80; color: var(--ink); background: var(--paper); border-radius: .2rem; }
.editor-form textarea { resize: vertical; }
.editor-form small, .editor-list span { color: var(--muted); }
.field-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.admin .admin-notice { border-left: 3px solid var(--accent); margin-block: 1.25rem; padding: .7rem .9rem; background: var(--paper); color: var(--ink); }
.editor-news { margin-top: clamp(2rem, 5vw, 3.5rem); }
.editor-list { list-style: none; margin: 0; padding: 0; }
.editor-list li { padding: .75rem 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.cover-preview img { width: min(100%, 14rem); margin-bottom: .6rem; }
.cover-preview label { display: flex; align-items: center; gap: .5rem; }
@media (max-width: 67rem) {
    .wiki-shell { grid-template-columns: minmax(8.5rem, 10rem) minmax(0, 1fr); gap: .9rem; }
    .wiki-entry.has-reference { grid-template-columns: minmax(0, 1fr) minmax(10rem, 13rem); }
}
@media (max-width: 54rem) {
    .wiki-shell { display: block; padding-block: .8rem 1.7rem; }
    .wiki-sidebar { position: static; max-height: none; margin-bottom: .75rem; }
    .wiki-home .wiki-sidebar nav h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .wiki-home .wiki-sidebar nav ul { display: flex; flex-wrap: wrap; gap: .3rem; }
    .wiki-home .wiki-sidebar a { border: 1px solid var(--line); background: var(--paper); }
    .wiki-article .wiki-sidebar { display: none; }
    .wiki-mobile-toc { display: block; border: 1px solid var(--line); background: var(--panel); padding: .55rem .75rem; margin-bottom: 1rem; }
    .wiki-mobile-toc summary { font-weight: 700; }
    .wiki-mobile-toc nav { margin-top: .4rem; }
}
@media (max-width: 38rem) {
    .wrap { width: calc(100% - 1.5rem); }
    .masthead-inner { min-height: 4rem; gap: .4rem; }
    .brand { font-size: 1.32rem; }
    .wiki-paper { padding: 1rem; }
    .wiki-welcome { grid-template-columns: 1fr; }
    .wiki-welcome img { max-height: 11rem; }
    .wiki-entry.has-reference { grid-template-columns: minmax(0, 1fr); }
    .story-content { grid-row: auto; }
    .infobox { grid-column: 1; width: 100%; max-width: 26rem; }
    .infobox figure img { max-height: 13rem; object-fit: cover; }
    .card-image { width: 5rem; }
    .news-card { gap: .65rem; }
    .admin-panels, .field-pair { grid-template-columns: minmax(0, 1fr); }
    .editor-form .story-links > * { width: 100%; }
}


/* The site uses the same reading typography in the article and in the editor preview. */
:root {
    --ink: #202d2b;
    --muted: #4f605c;
    --paper: #fffefa;
    --panel: #f1f4ed;
    --line: #d8e0d6;
    --link: #205e53;
    --accent: #296252;
}
body { background: #edf0e8; }
.masthead { border-top-color: #26483e; }
.brand-mark { background: #dcece1; color: #234e40; border-color: #659381; }
.site-nav a { padding-block: .5rem; }
.site-footer { background: #e7ece2; }
.wiki-sidebar h2 { color: #2c4940; }
.wiki-sidebar a[aria-current="page"], .wiki-sidebar a:hover, .wiki-toc a:hover { background: #e0ebe2; color: #22483c; }
.wiki-paper { box-shadow: 0 .45rem 1.75rem #233d3610; }
.wiki-welcome { background: #e2ece0; border-color: #c9ddcf; }
.button { border-color: #a7bcb0; }
.button:hover { background: #e1eee5; }
.button.primary:hover { background: #204a3e; }
.button:disabled { opacity: .65; cursor: wait; }
.story h1 { font-size: clamp(1.9rem, 3.55vw, 3.45rem); }
.story-content h2 { color: #263c34; }
.story-content blockquote { margin-inline: 0; border-inline-start: 3px solid #8ead9b; padding: .45rem .9rem; background: #edf4eb; }
.article-answer { margin-bottom: 1.3rem; padding: .75rem .95rem; border: 1px solid #bed7c5; background: #edf4e9; }
.infobox { border-color: #cbdacd; }
.infobox h2 { background: #dcebe0; color: #273f35; border-color: #cbdacd; }
.infobox figure img { border-color: #cbdacd; }
.infobox .extra-facts summary { padding: .53rem .7rem; font-weight: 650; font-size: .88rem; border-top: 1px solid var(--line); }
.story-content th { background: #e2ede3; }
.story-content tr:nth-child(even) { background: #f0f5ee; }
.wiki-guide { margin-top: 2.6rem; scroll-margin-top: 1.2rem; }
.guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: .9rem; margin-top: .9rem; }
.guide-grid article { padding: .85rem 1rem; border: 1px solid var(--line); background: var(--panel); }
.guide-grid h3 { font: 700 1.14rem/1.35 var(--display); margin-bottom: .5rem; }
.guide-grid p { font-size: .92rem; color: var(--muted); }
.profile-section { border-top: 1px solid var(--line); scroll-margin-top: 1.2rem; }
.profile-section h3 { padding: .55rem .7rem; font: 700 1.05rem/1.3 var(--display); }
.profile-roles { border-top: 1px solid var(--line); }
.profile-roles summary { padding: .45rem .7rem; font-size: .9rem; font-weight: 700; }
.profile-roles summary span { margin-left: .2rem; color: var(--muted); font-size: .83rem; }
.profile-list { display: grid; gap: .35rem; padding: 0 .7rem .65rem; margin: 0; list-style: none; }
.profile-list li { padding: .38rem .5rem; background: var(--paper); border: 1px solid var(--line); font-size: .86rem; line-height: 1.42; }
.profile-list small { display: block; color: var(--muted); }
.editor-source { max-width: 56rem; padding: .7rem .9rem; border: 1px solid var(--line); background: var(--paper); }
.editor-source p { margin-bottom: .45rem; }
.editor-source form { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem .75rem; font-size: .88rem; }
.editor-source [role="status"] { color: var(--muted); }
.wiki-editor-form { width: 100%; }
.wiki-editor-form > label, .wiki-editor-form > .field-pair { max-width: 56rem; }
.editor-panes { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 1rem; align-items: start; }
.editor-text textarea { font: .95rem/1.5 ui-monospace, Consolas, monospace; }
.editor-preview { min-width: 0; padding: .85rem; border: 1px solid var(--line); background: var(--paper); }
.editor-preview h2 { font-size: 1.35rem; margin-bottom: .2rem; }
#article-preview-status { font-size: .87rem; }
#article-preview-content { max-height: 37rem; min-height: 13rem; overflow: auto; margin-top: .7rem; padding: .3rem .4rem .55rem; }
#article-preview-content h2 { font-size: 1.55rem; }
#article-preview-content p { color: var(--ink); }
@media (max-width: 54rem) { .guide-grid, .editor-panes { grid-template-columns: minmax(0,1fr); } }
@media (max-width: 38rem) {
    .masthead-inner { flex-wrap: wrap; padding-block: .4rem; }
    .infobox figure img { max-height: 11rem; }
    .article-answer { font-size: .94rem; }
}


.profile-page .section-heading { margin-bottom: .8rem; }
.profile-page h1 { overflow-wrap: anywhere; }
.profile-intro, .directory-grid span { color: var(--muted); }
.directory-grid { padding: 0; margin: 1.1rem 0 0; list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: .65rem; }
.directory-grid li { min-width: 0; overflow-wrap: anywhere; border: 1px solid var(--line); background: var(--panel); padding: .65rem .8rem; }
.directory-grid a { font-weight: 650; }
.directory-grid span { display: block; font-size: .88rem; margin-top: .25rem; }
.directory-facts { margin-top: 1.25rem; max-width: 48rem; border: 1px solid var(--line); background: var(--panel); }
.directory-facts > div { display: grid; grid-template-columns: minmax(7rem, 1fr) minmax(0, 2fr); gap: .65rem; padding: .5rem .8rem; }
.directory-facts > div + div { border-top: 1px solid var(--line); }
.directory-facts dt { font-weight: 650; }
.directory-facts dd { overflow-wrap: anywhere; }
.profile-titles .directory-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
@media (max-width: 54rem) { .directory-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 38rem) { .directory-grid, .profile-titles .directory-grid { grid-template-columns: minmax(0,1fr); } }

