/* Public theme: editorial facelift. Project fonts and accent stay admin-controlled. */
:root {
    color-scheme: light;
    --page: #fcfaf8;
    --surface: #fff;
    --surface-soft: #f4efea;
    --ink: #302827;
    --muted: #706664;
    --line: #e5dcd7;
    --accent-text: color-mix(in srgb, var(--accent) 85%, #302827);
    --accent-soft: color-mix(in srgb, var(--accent) 6%, var(--surface));
    --shadow: 0 12px 32px rgb(44 31 24 / 5%);
    --font-ui: system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
    --content-width: 1120px;
    --bs-body-bg: var(--page);
    --bs-body-color: var(--ink);
    --bs-secondary-color: var(--muted);
    --bs-border-color: var(--line);
}
[data-bs-theme="dark"] {
    color-scheme: dark;
    --page: #18171b;
    --surface: #232126;
    --surface-soft: #26272a;
    --ink: #f0e8e5;
    --muted: #bcb0b3;
    --line: #41383e;
    --accent-text: color-mix(in srgb, var(--accent) 35%, #fff2ed);
    --accent-soft: color-mix(in srgb, var(--accent) 12%, var(--surface));
    --shadow: 0 12px 32px rgb(0 0 0 / 14%);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 145px; }
body { margin: 0; background: var(--page); color: var(--ink); font-family: var(--font-body, Arial, sans-serif); line-height: 1.65; -webkit-font-smoothing: antialiased; }
/* These explicit theme selectors retire higher-specificity legacy dark rules. */
html[data-bs-theme] body { background:var(--page); color:var(--ink); }
html[data-bs-theme] :is(.resource-card,.collection-card,.resource-directory-card,.fanfic-link-card,.fic-card) { color:var(--ink); background:var(--surface); border-color:var(--line); border-radius:20px; box-shadow:none; }
html[data-bs-theme] :is(.resource-card,.collection-card,.resource-directory-card,.fanfic-link-card,.fic-card):hover { border-color:var(--accent-text); box-shadow:var(--shadow); }
html[data-bs-theme] :is(.legal-content,.legal-content h2,.legal-content h3) { color:var(--ink); }
html[data-bs-theme] :is(.resource-description,.collection-card>span:not(.collection-card-kicker,.card-arrow),.resource-directory-copy>span,.hero-copy) { color:var(--muted); }
html[data-bs-theme] :is(.collections-section,.shopping-sections,.tags-section) { background:var(--surface-soft); border-color:var(--line); }
html[data-bs-theme] :is(.seo-section,.resource-sections) { background:var(--page); border-color:var(--line); }
html[data-bs-theme] .hero { background:linear-gradient(110deg,var(--page),var(--accent-soft)); border-color:var(--line); }
html[data-bs-theme] .site-navbar,html[data-bs-theme] .resource-quick-nav { background:var(--surface); color:var(--ink); border-color:var(--line) !important; }
::selection { background: var(--accent-text); color: var(--surface); }
a { color: var(--accent-text); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-text); }
:where(a, button, input, select, textarea, [tabindex]):focus-visible { outline: 3px solid var(--accent-text); outline-offset: 4px; box-shadow: none; }
img { max-width: 100%; }
h1, h2, h3, h4, h5, h6 { color: var(--ink); font-family: var(--font-heading, var(--font-body, sans-serif)); font-weight: 700; text-wrap: balance; overflow-wrap: break-word; }
h1 { font-size: clamp(2rem, 4.5vw, 3rem); line-height: 1.17 !important; letter-spacing: -.025em !important; margin-bottom: 17px; }
h2 { font-size: clamp(1.65rem, 3vw, 2.1rem); line-height: 1.23 !important; letter-spacing: -.02em !important; margin-bottom: 12px; }
h3 { font-size: clamp(1.2rem, 2vw, 1.4rem); line-height: 1.3 !important; letter-spacing: -.012em !important; margin-bottom: 10px; }
p { margin-bottom: 1.2em; }
.lead { font-size: 1.1rem; line-height: 1.75; font-weight: 400; }
.text-secondary { color: var(--muted) !important; }
.eyebrow { display: inline-block; color: var(--accent-text); font: 700 .7rem/1.5 var(--font-ui); letter-spacing: .12em; text-transform: uppercase; }
main .container { max-width: var(--content-width); padding-inline: 28px; }
main .container.content-narrow, main .container.home-seo-content { max-width: var(--content-width); }
.content-narrow { max-width: var(--content-width); }
main > section.py-5 { padding-block: clamp(42px, 5vw, 68px) !important; }
.section-head { max-width: 100%; }
.section-head h2 { margin-top: 9px !important; margin-bottom: 12px !important; }
.section-head p { max-width: 680px; margin-bottom: 0; font: 400 .95rem/1.65 var(--font-ui); }
.section-head.mb-4 { margin-bottom: 28px !important; }
.ui-icon { display: block; width: 22px; height: 22px; flex: 0 0 auto; }

/* Navigation and controls */
.skip-link { position: fixed; z-index: 2300; top: 8px; left: 12px; padding: 12px 18px; border-radius: 10px; background: var(--surface); transform: translateY(-160%); font-family: var(--font-ui); }
.skip-link:focus { transform: none; }
.site-navbar { display: block; padding: 0; background: var(--surface); border-color: var(--line) !important; --bs-navbar-brand-color: var(--ink); --bs-navbar-brand-hover-color: var(--accent-text); }
.header-main { min-height: 76px; flex-wrap: nowrap !important; }
.navbar-brand { min-width: 0; margin-right: 16px; font-family: var(--font-heading, serif); font-size: 1.15rem; letter-spacing: -.035em; }
.brand-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-mark { display: grid; width: 38px; height: 42px; flex: 0 0 38px; place-items: center; border-radius: 11px 11px 11px 3px; background: var(--accent); color: white; font: 700 1.25rem/1 var(--font-heading, serif); }
.header-actions { flex: 0 0 auto; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 10px 18px; border-radius: 10px; font: 600 .9rem/1.4 var(--font-ui); transition: background-color .18s, border-color .18s, box-shadow .18s, transform .18s; }
.btn-lg { min-height: 50px; padding: 13px 22px; font-size: .95rem; }
.btn-sm { padding: 9px 14px; font-size: .83rem; }
.btn-accent { color: #fff; background: var(--accent); border-color: var(--accent); box-shadow: 0 4px 12px rgba(var(--accent-rgb), .15); --bs-btn-active-color: #fff; --bs-btn-active-bg: var(--accent); --bs-btn-active-border-color: var(--accent); }
.btn-accent:hover { color: #fff; background: color-mix(in srgb, var(--accent) 85%, #251c1b); border-color: transparent; box-shadow: 0 6px 18px rgba(var(--accent-rgb), .2); }
.btn-soft { color: var(--ink); background: transparent; border-color: transparent; }
.btn-soft:hover, .btn-soft[aria-current="page"] { color: var(--accent-text); background: var(--accent-soft); border-color: transparent; }
.btn-outline-secondary { --bs-btn-color: var(--ink); --bs-btn-border-color: var(--line); --bs-btn-hover-color: var(--accent-text); --bs-btn-hover-bg: var(--accent-soft); --bs-btn-hover-border-color: var(--accent-text); --bs-btn-active-bg: var(--accent-soft); --bs-btn-active-color: var(--ink); }
.theme-toggle { display: grid; width: 42px; height: 42px; min-height: 42px; padding: 0; flex: 0 0 42px; margin-left: 6px; color: var(--ink); border: 1px solid var(--line); background: var(--surface); border-radius: 50%; }
.theme-toggle:hover { color: var(--accent-text); border-color: var(--accent-text); background: var(--accent-soft); }
.theme-toggle .ui-icon { width: 19px; height: 19px; }
.theme-sun, [data-bs-theme="dark"] .theme-moon { display: none; }
[data-bs-theme="dark"] .theme-sun { display: block; }
.resource-quick-nav { overflow-x: auto; background: var(--surface); border-color: var(--line) !important; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.resource-quick-nav .container { flex-wrap: nowrap; min-height: 49px; }
.resource-quick-label { margin-right: 14px; color: var(--muted); font: 600 .65rem/1.4 var(--font-ui); letter-spacing: .1em; text-transform: uppercase; }
.resource-quick-nav a { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 13px; flex: 0 0 auto; border-radius: 8px; color: var(--muted); font: 500 .82rem/1.4 var(--font-ui); white-space: nowrap; text-decoration: none; transition: .18s; }
.resource-quick-nav a:hover, .resource-quick-nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-text); }
.resource-quick-nav a[aria-current="page"] { font-weight: 700; }

/* First screen */
.hero { position: relative; overflow: hidden; background: linear-gradient(115deg, var(--page) 20%, var(--accent-soft)); border-bottom: 1px solid var(--line); }
.hero > .container { padding-block: clamp(42px, 5.6vw, 78px) !important; }
.hero-title { max-width: 750px; font-size: clamp(2rem, 4.5vw, 3rem) !important; line-height: 1.17 !important; letter-spacing: -.025em !important; }
.hero-copy { max-width: 630px; color: var(--muted); font-size: 1.04rem; line-height: 1.78; }
.hero-copy.mt-4 { margin-top: 23px !important; }
.hero-copy p:last-child { margin-bottom: 0; }
.hero .btn { margin-top: 27px !important; }
.hero-media { position: relative; width: min(355px, 100%); margin: 0 auto; }
.hero-media::before { content: ""; position: absolute; inset: 14px -13px -14px 13px; border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line)); border-radius: 20px; transform: rotate(3deg); }
.hero-image, .hero-image-placeholder { position: relative; display: block; width: 100%; aspect-ratio: 4 / 5; border: 5px solid var(--surface); border-radius: 20px; box-shadow: 0 18px 45px rgb(35 25 20 / 14%); }
.hero-image { height: auto; object-fit: cover; }
.hero-image-placeholder { overflow: hidden; background: linear-gradient(140deg, var(--accent), color-mix(in srgb, var(--accent) 45%, #352b2b)); }
.hero-image-placeholder::after { content: ""; position: absolute; inset: 20%; border: 1px solid #ffffff59; border-radius: 100% 100% 3px 3px; }

/* Catalog, collections, sections: one visual system */
.resource-card, .collection-card, .resource-section-card, .resource-directory-card, .fanfic-link-card { color: var(--ink); background: var(--surface); border: 1px solid var(--line); text-decoration: none; border-radius: 16px; transition: border-color .18s, box-shadow .18s, transform .18s; }
.resource-card { display: flex; align-items: center; gap: 20px; min-height: 114px; height: 100%; padding: 22px 24px; }
.resource-copy { display: flex; min-width: 0; flex-direction: column; gap: 7px; }
.resource-title { color: var(--ink); font: 700 1.02rem/1.4 var(--font-heading, serif); }
.resource-description { display: block; color: var(--muted); font: 400 .85rem/1.6 var(--font-ui); }
.resource-arrow, .card-arrow, .fanfic-card-arrow { display: inline-grid; place-items: center; width: 32px; height: 32px; flex: 0 0 32px; margin-left: auto; border-radius: 50%; color: var(--accent-text); background: var(--accent-soft); }
.resource-arrow::before, .card-arrow::before, .fanfic-card-arrow::before { content: ""; width: 8px; height: 8px; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; transform: rotate(45deg) translate(-1px, 1px); }
.collections-section, .shopping-sections, .tags-section { background: var(--surface-soft); border-block: 1px solid var(--line); }
.resource-sections { background: var(--page); }
.collection-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.collection-card { display: flex; min-width: 0; min-height: 250px; padding: 26px; flex-direction: column; align-items: flex-start; }
.collection-card-kicker { display: inline-flex; margin-bottom: 19px; padding: 5px 9px; border-radius: 6px; color: var(--accent-text); background: var(--accent-soft); font: 600 .7rem/1.4 var(--font-ui); }
.collection-card strong { font: 700 1.2rem/1.32 var(--font-heading, serif); text-wrap: balance; }
.collection-card > span:not(.collection-card-kicker, .card-arrow) { margin-top: 12px; color: var(--muted); font: 400 .87rem/1.65 var(--font-ui); }
.collection-card .card-arrow { margin: auto 0 0 auto; transform: translateY(5px); }
.resource-section-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; }
.resource-section-card { display: flex; grid-column: span 2; min-width: 0; min-height: 230px; padding: 25px; flex-direction: column; align-items: flex-start; }
.resource-section-card:nth-child(-n+2), .resource-shopping-grid .resource-section-card { grid-column: span 3; }
.resource-card-top { display: flex; width: 100%; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.resource-section-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; color: var(--accent-text); background: var(--accent-soft); }
.resource-card-arrow { color: var(--muted); }
.resource-card-arrow .ui-icon { width: 18px; height: 18px; }
.resource-section-kicker { color: var(--muted); font: 600 .65rem/1.4 var(--font-ui); text-transform: uppercase; letter-spacing: .09em; }
.resource-section-card strong { margin: 8px 0 20px; font: 700 1.2rem/1.32 var(--font-heading, serif); text-wrap: balance; }
.resource-section-count { margin-top: auto; color: var(--muted); font: 500 .76rem/1.4 var(--font-ui); }
.resource-shopping-grid .resource-section-card { min-height: 215px; }
.resource-directory { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.resource-directory-card { position: relative; display: flex; min-height: 160px; padding: 24px 52px 24px 24px; gap: 16px; flex-wrap: wrap; }
.resource-directory-copy { display: flex; flex: 1 1 150px; min-width: 0; flex-direction: column; gap: 9px; }
.resource-directory-copy strong { font: 700 1.03rem/1.4 var(--font-heading, serif); overflow-wrap: anywhere; }
.resource-directory-copy span { color: var(--muted); font: 400 .87rem/1.65 var(--font-ui); }
.resource-directory-arrow { position: absolute; right: 18px; top: 20px; color: var(--accent-text); font: 400 1.3rem/1 var(--font-ui); }
.resource-directory-copy .resource-store { color: var(--accent-text); font: 700 .68rem/1.4 var(--font-ui); letter-spacing: .08em; text-transform: uppercase; }
.resource-price { display: flex; align-self: flex-end; flex-direction: column; color: var(--ink); font: 700 1.05rem/1.4 var(--font-ui); white-space: nowrap; }
.resource-price small { margin-top: 4px; color: var(--accent-text); font: 600 .65rem/1.4 var(--font-ui); }
.fanfic-list { display: flex; flex-direction: column; gap: 12px; }
.fanfic-link-card { display: grid; grid-template-columns: 30px 1fr auto; gap: 16px; align-items: center; padding: 19px 22px; }
.fanfic-link-card strong { font-size: 1rem; line-height: 1.45; overflow-wrap: anywhere; }
.fanfic-position { color: var(--muted); font: 600 .73rem/1 var(--font-ui); font-variant-numeric: tabular-nums; }
@media (hover: hover) {
    .resource-card:hover, .collection-card:hover, .resource-section-card:hover, .resource-directory-card:hover, .fanfic-link-card:hover { color: var(--ink); border-color: color-mix(in srgb, var(--accent-text) 55%, var(--line)); box-shadow: var(--shadow); transform: translateY(-2px); }
    .resource-card:hover .resource-title, .collection-card:hover strong, .resource-section-card:hover strong, .resource-directory-card:hover strong { color: var(--accent-text); }
}

/* Keep the discovery section more expressive than the reading catalog. */
.resource-kind-fanart { --section-color: #a92b55; }
.resource-kind-video { --section-color: #7d3db5; }
.resource-kind-audio { --section-color: #395eb4; }
.resource-kind-online { --section-color: #1c7d70; }
.resource-kind-fb2 { --section-color: #387747; }
.resource-sections .resource-section-card {
    --section-ink: color-mix(in srgb, var(--section-color) 85%, #302a27);
    position: relative;
    overflow: hidden;
    border-color: color-mix(in srgb, var(--section-color) 17%, var(--line));
    border-radius: 22px;
    background: linear-gradient(140deg, color-mix(in srgb, var(--section-color) 9%, var(--surface)), var(--surface) 70%);
}
.resource-sections .resource-section-card::after { content: ""; position: absolute; width: 174px; height: 174px; right: -53px; bottom: -74px; border-radius: 50%; background: color-mix(in srgb, var(--section-color) 8%, transparent); pointer-events: none; }
.resource-sections .resource-section-card > * { position: relative; z-index: 1; }
.resource-sections .resource-section-icon { width: 46px; height: 46px; border-radius: 14px; color: #fff; background: var(--section-color); box-shadow: 0 7px 18px color-mix(in srgb, var(--section-color) 18%, transparent); }
.resource-sections .resource-card-arrow { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid color-mix(in srgb, var(--section-color) 20%, var(--line)); border-radius: 50%; color: var(--section-ink); background: color-mix(in srgb, var(--section-color) 5%, var(--surface)); }
.resource-sections .resource-section-kicker { color: var(--section-ink); }
[data-bs-theme="dark"] .resource-sections .resource-section-card { --section-ink: color-mix(in srgb, var(--section-color) 40%, #fff4ec); background: linear-gradient(140deg, color-mix(in srgb, var(--section-color) 16%, var(--surface)), var(--surface) 75%); }
@media (hover: hover) {
    .resource-sections .resource-section-card:hover { border-color: var(--section-ink); box-shadow: 0 12px 30px color-mix(in srgb, var(--section-color) 12%, transparent); }
    .resource-sections .resource-section-card:hover strong { color: var(--section-ink); }
}

/* One shared inner-page header, including the fanfic catalog and story. */
body main :is(.collection-hero,.tag-hero,.legal-hero,.fanfics-header,.fic-story .echo-header) { padding: clamp(30px,4.5vw,64px) 0 44px; background: linear-gradient(110deg,var(--page),var(--accent-soft)); border-bottom:1px solid var(--line); }
body main :is(.collection-hero,.tag-hero,.legal-hero,.fanfics-header,.fic-story .echo-header) h1 { font-size:clamp(2rem,4.5vw,3rem); font-weight:700; line-height:1.17 !important; letter-spacing:-.025em !important; margin:13px 0 17px !important; }
body main :is(.collection-hero,.tag-hero,.legal-hero,.fanfics-header,.fic-story .echo-header) p { color:var(--muted); font-size:1.06rem; line-height:1.75; }
.collection-hero p:last-child, .tag-hero p:last-child, .legal-hero p:last-child { margin-bottom: 0; }
.site-breadcrumbs { display:flex; margin:0 0 30px; color:var(--muted); font:400 .8rem/1.6 var(--font-ui); text-align:left; }
.site-breadcrumbs ol { display:flex; align-items:center; flex-wrap:wrap; gap:6px 0; margin:0; padding:0; list-style:none; }
.site-breadcrumbs li { display:flex; min-width:0; align-items:center; overflow-wrap:anywhere; }
.site-breadcrumbs li+li::before { content:""; width:5px; height:5px; flex:0 0 5px; margin:0 13px; border-top:1px solid currentColor; border-right:1px solid currentColor; transform:rotate(45deg); opacity:.55; }
.site-breadcrumbs a { padding-block:5px; color:var(--muted); text-decoration:none; text-underline-offset:4px; }
.site-breadcrumbs a:hover { color:var(--accent-text); text-decoration:underline; }
.site-breadcrumbs [aria-current="page"] { color:var(--ink); }
.collection-intro { margin-bottom: 26px; }
.legal-content { color: var(--ink); font-size: 1.035rem; line-height: 1.8; overflow-wrap: break-word; }
.legal-content h2 { margin: 2em 0 .7em; font-size: clamp(1.35rem, 2.2vw, 1.6rem); line-height: 1.28; }
.legal-content h3 { margin: 1.8em 0 .65em; font-size: 1.2rem; line-height: 1.32; }
.legal-content > :first-child { margin-top: 0; }
.legal-content p, .legal-content li { text-wrap: pretty; }
.legal-content p { margin-bottom: 1.2em; }
.legal-content li + li { margin-top: .4em; }
.legal-content ul, .legal-content ol { padding-left: 1.4em; margin-bottom: 1.4em; }
.legal-content a { color: var(--accent-text); text-decoration-color: color-mix(in srgb, var(--accent-text) 45%, transparent); }
.legal-content a:hover { text-decoration-color: currentColor; }
.legal-content blockquote { margin: 1.7em 0; padding: 8px 0 8px 24px; border-left: 3px solid var(--accent-text); color: var(--muted); font-style: italic; }
.legal-content blockquote p:last-child { margin-bottom: 0; }
.legal-content figure, .hero-copy figure { margin: 2.3rem 0; }
.legal-content figure img, .hero-copy figure img { display: block; width: 100%; height: auto; border-radius: 16px; }
.legal-content figure figcaption, .hero-copy figure figcaption { margin-top: 12px; color: var(--muted); font: 400 .79rem/1.6 var(--font-ui); text-align: center; }
.legal-content table { display: block; max-width: 100%; overflow-x: auto; }
.seo-section { background: var(--page); border-top: 1px solid var(--line); }
.home-seo-content { max-width: var(--content-width); column-count: 1; }
.home-seo-content :is(h2, h3) { break-after: avoid; }
.home-seo-content :is(h2, h3, ul, ol, blockquote) { break-inside: avoid; }
.home-seo-content p { orphans: 3; widows: 3; }
.home-seo-content figure { column-span: all; break-inside: avoid; }
.resource-seo-bottom { padding-top: 0; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 10px; }
.tag-cloud a { display: inline-flex; align-items: center; min-height: 44px; padding: 9px 15px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink); font: 500 .85rem/1.4 var(--font-ui); text-decoration: none; transition: .18s; }
.tag-cloud a::before { content: "#"; margin-right: 6px; color: var(--accent-text); }
.tag-cloud a:hover { border-color: var(--accent-text); color: var(--accent-text); background: var(--accent-soft); }

/* Outbound pages, notifications and age dialog */
.redirect-page, .empty-state { display: grid; min-height: 65vh; padding: clamp(32px, 5vw, 64px) 20px; place-items: center; }
.redirect-card { width: min(720px, 100%); padding: clamp(26px, 4vw, 48px); border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); }
.redirect-card h1 { font-size: clamp(1.65rem, 3vw, 2.25rem); }
.redirect-card p { font-family: var(--font-ui); font-size: .93rem; }
.redirect-icon { display: grid; width: 54px; height: 54px; margin: 0 auto 20px; place-items: center; border-radius: 15px; background: var(--accent-soft); color: var(--accent-text); font: 400 1.6rem/1 var(--font-ui); }
.target-url { padding: 14px 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); color: var(--ink); overflow-wrap: anywhere; }
.empty-card { grid-column: 1 / -1; padding: 36px; border: 1px dashed var(--line); border-radius: 16px; text-align: center; color: var(--muted); }
.cookie-notice { position: fixed; z-index: 1080; right: 22px; bottom: 22px; display: flex; align-items: flex-end; gap: 18px; width: min(500px, calc(100% - 44px)); padding: 20px; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); background: var(--surface); box-shadow: 0 12px 45px rgb(0 0 0 / 15%); font: 400 .78rem/1.65 var(--font-ui); }
.cookie-notice[hidden] { display: none; }
.cookie-notice strong { display: inline-block; margin-bottom: 5px; font-size: .85rem; }
.cookie-notice span { color: var(--muted); }
.cookie-notice a { color: var(--accent-text); }
body.age-gate-pending { overflow: hidden; }
.age-gate { position: fixed; z-index: 2200; inset: 0; display: grid; overflow-y: auto; padding: 24px; align-items: safe center; justify-items: center; background: rgb(15 16 18 / 74%); backdrop-filter: blur(12px); }
.age-gate[hidden] { display: none; }
.age-gate-card { width: min(530px, 100%); padding: 36px; border: 1px solid var(--line); border-radius: 22px; text-align: center; background: var(--surface); box-shadow: 0 24px 80px #0005; }
.age-gate-mark { display: grid; width: 66px; height: 66px; margin: 0 auto 24px; place-items: center; border-radius: 18px; color: var(--accent-text); background: var(--accent-soft); font: 700 1.45rem/1 var(--font-ui); }
.age-gate-card h2 { margin: 12px 0 16px; font-size: clamp(1.5rem, 4vw, 1.9rem); }
.age-gate-card p { color: var(--muted); font: 400 .92rem/1.7 var(--font-ui); }
.age-gate-actions { display: grid; gap: 10px; margin: 24px 0 18px; }
.age-gate-card small { color: var(--muted); font: 400 .74rem/1.5 var(--font-ui); }
.vk-ad-slot { width: min(calc(100% - 28px), 1180px); margin: 30px auto; padding: 12px; overflow: hidden; text-align: center; }
.vk-ad-redirect_after_card { margin-top: 0; }
.vk-ad-article_sidebar { width: 100%; margin: 20px 0; }
.vk-ad-sticky { position: fixed; z-index: 1070; right: 12px; bottom: 12px; width: auto; max-width: calc(100% - 24px); margin: 0; padding: 0; }
.meta-company-mark { margin-left: .05em; color: inherit; font-size: .65em; font-weight: 700; }
.meta-company-disclosure { padding: 16px 0; border-top: 1px solid var(--line); color: var(--muted); background: var(--surface-soft); font: 400 .8rem/1.6 var(--font-ui); }
.meta-company-disclosure p { margin: 0; }

/* Footer */
.site-footer { padding: 44px 0 22px; color: #bfb8b1; background: #252424; font: 400 .83rem/1.7 var(--font-ui); }
.footer-grid { display: grid; grid-template-columns: 1.1fr 1.2fr 1fr; gap: 48px; padding-bottom: 32px; }
.footer-brand { display: inline-block; margin-bottom: 12px; color: #f5ede5 !important; font: 700 1.35rem/1.3 var(--font-heading, serif); text-decoration: none; }
.footer-about p { max-width: 250px; margin: 0; }
.footer-heading { display: block; margin-bottom: 13px; color: #f5ede5; font: 600 .72rem/1.5 var(--font-ui); letter-spacing: .06em; text-transform: uppercase; }
.footer-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; }
.footer-legal { display: flex; align-items: flex-start; flex-direction: column; gap: 8px; }
.site-footer a { color: #ccc4bd; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; padding-top: 20px; border-top: 1px solid #ffffff1c; color: #aaa29c; font-size: .74rem; }
.footer-top-link { white-space: nowrap; }

/* Responsive layout: comfortable touch targets, no clipped navigation. */
@media (min-width: 1400px) { .container { max-width: var(--content-width); } }
@media (max-width: 991px) {
    .hero > .container { padding-block: 44px !important; }
    .hero .row { --bs-gutter-y: 36px; }
    .hero-media { width: min(310px, 80%); }
    .hero-title { max-width: 680px; }
    .hero-copy { max-width: 640px; }
    .collection-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .resource-section-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .resource-section-card, .resource-section-card:nth-child(-n+2), .resource-shopping-grid .resource-section-card { grid-column: auto; }
    .resource-section-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
    .resource-section-card { min-height: 220px; }
    .resource-quick-nav .container { width: max-content; max-width: none; }
    .resource-quick-label { display: none; }
    .footer-grid { gap: 28px; grid-template-columns: 1fr 1fr; }
    .footer-about { grid-column: 1 / -1; }
    .footer-about p { max-width: none; }
}
@media (max-width: 767px) {
    .home-seo-content { column-count: 1; }
    .resource-directory { grid-template-columns: 1fr; }
    .section-head .btn { align-self: flex-start; }
}
@media (max-width: 575px) {
    .container { padding-inline: 20px; }
    main .container { padding-inline: 20px; }
    .header-main { min-height: 66px; gap: 5px; padding-inline: 14px; }
    .navbar-brand { max-width: 42%; margin-right: 3px; font-size: 1.04rem; gap: 7px !important; }
    .brand-mark { width: 29px; height: 34px; flex-basis: 29px; font-size: 1.02rem; border-radius: 8px 8px 8px 2px; }
    .header-actions { gap: 2px !important; }
    .header-actions .btn-soft { padding-inline: 9px; font-size: .78rem; }
    .theme-toggle { width: 38px; height: 38px; min-height: 38px; flex-basis: 38px; margin-left: 5px; }
    .resource-quick-nav .container { min-height: 48px; padding-block: 3px !important; padding-inline: 13px; gap: 3px !important; }
    .resource-quick-nav a { min-height: 40px; padding-inline: 11px; font-size: .77rem; }
    .hero > .container { padding-block: 34px 40px !important; }
    .hero-title { font-size: 2.1rem !important; line-height: 1.17 !important; letter-spacing: -.025em !important; }
    .hero-copy { font-size: .96rem; line-height: 1.75; }
    .hero-copy.mt-4 { margin-top: 18px !important; }
    .hero-media { width: min(285px, 83%); }
    .hero .btn-lg { width: 100%; }
    .section-head h2 { font-size: 1.65rem; }
    .section-head p { font-size: .87rem; }
    .collection-grid { grid-template-columns: 1fr; gap: 14px; }
    .collection-card { min-height: 230px; padding: 23px; }
    .resource-card { min-height: 108px; padding: 20px; gap: 14px; }
    .resource-title { font-size: 1rem; }
    .resource-description { font-size: .83rem; }
    .resource-section-grid { grid-template-columns: 1fr; gap: 12px; }
    .resource-section-card, .resource-shopping-grid .resource-section-card { min-height: 180px; padding: 22px; }
    .resource-card-top { margin-bottom: 18px; }
    .resource-section-card strong { font-size: 1.16rem; margin-bottom: 14px; }
    .resource-section-card:last-child:nth-child(odd) { grid-column: auto; }
    .resource-directory-card { min-height: 140px; padding: 22px 50px 22px 22px; }
    .fanfic-link-card { grid-template-columns: 22px 1fr auto; padding: 18px 16px; gap: 10px; }
    body main :is(.collection-hero,.tag-hero,.legal-hero,.fanfics-header,.fic-story .echo-header) { padding-top:27px; padding-bottom:30px; }
    body main :is(.collection-hero,.tag-hero,.legal-hero,.fanfics-header,.fic-story .echo-header) h1 { font-size:2.1rem; }
    body main :is(.collection-hero,.tag-hero,.legal-hero,.fanfics-header,.fic-story .echo-header) p { font-size:1rem; }
    .site-breadcrumbs { margin-bottom:24px; font-size:.76rem; }
    .site-breadcrumbs li+li::before { margin-inline:10px; }
    .lead { font-size: 1rem; }
    .legal-content { font-size: 1rem; line-height: 1.78; }
    .legal-content h2 { font-size: 1.35rem; }
    .legal-content h3 { font-size: 1.15rem; }
    .tag-cloud { gap: 8px; }
    .tag-cloud a { padding-inline: 12px; font-size: .8rem; }
    .cookie-notice { right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); width: calc(100% - 24px); padding: 17px; gap: 12px; flex-wrap: wrap; font-size: .74rem; }
    .cookie-notice .btn { min-height: 40px; margin-left: auto; }
    .age-gate { padding: 14px; }
    .age-gate-card { padding: 28px 22px; }
    .age-gate .btn-lg { font-size: .87rem; }
    .redirect-page { padding-inline: 16px; }
    .redirect-card { padding: 26px 20px; }
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
    .footer-about { grid-column: auto; }
    .footer-bottom { align-items: flex-start; }
    .vk-ad-slot { width: calc(100% - 20px); margin-block: 20px; }
    .vk-ad-sticky { width: auto; margin: 0; }
}
@media (max-width: 400px) {
    .header-main .brand-mark { display: none; }
    .navbar-brand { max-width: none; flex: 1 1 auto; }
}
@media (max-width: 359px) {
    .header-main { padding-inline: 10px; }
    .navbar-brand { font-size: .92rem; }
    .header-actions .btn-soft { padding-inline: 6px; font-size: .7rem; }
    .theme-toggle { margin-left: 2px; width: 34px; height: 36px; min-height: 36px; flex-basis: 34px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
