/*
Theme Name: Логово лисицы
Theme URI: https://liliadna.ru/
Author: Ичи
Description: Уютная адаптивная тема для историй, рисунков и дневника. Динамические меню и рубрики, мастерская, оглавление историй и настройки чтения.
Version: 1.0.6
Requires at least: 6.0
Tested up to: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: liliadna-fox
*/

:root {
    --paper: #fbf7f0; --paper-deep: #f1eae1; --ink: #322a35; --plum: #4b183c;
    --rust: #ae391f; --rust-light: #c74a29; --muted: #817781; --line: #dfd2c8;
    --serif: Georgia, 'Times New Roman', serif; --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --shadow: 0 12px 46px #4b283314;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; color: var(--ink); background: #e8e1da; background-image: radial-gradient(ellipse at 20% 0, #f6f0e9, transparent 65%); font: 15px/1.65 var(--sans); }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, summary { -webkit-tap-highlight-color: transparent; }
button, summary { cursor: pointer; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--rust); }
img { max-width: 100%; height: auto; vertical-align: middle; }
svg { vertical-align: middle; flex-shrink: 0; }
button { color: inherit; }
button:disabled { opacity: .4; cursor: default; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--rust); outline-offset: 4px; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; color: var(--plum); line-height: 1.18; margin: 0; overflow-wrap: anywhere; }
h1 { font-size: clamp(32px, 4vw, 52px); }
h2 { font-size: clamp(26px, 2.6vw, 35px); }
h3 { font-size: 25px; }
p { margin: 0 0 1em; }
.icon { width: 20px; height: 20px; }
.site-shell { max-width: 1320px; margin: 22px auto; background: var(--paper); border: 1px solid #cbbfb9; border-radius: 17px; box-shadow: var(--shadow); overflow: clip; background-image: url('assets/images/paper.svg'); }
.screen-reader-text { border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute !important; width: 1px; word-wrap: normal !important; }
.skip-link { position: absolute; left: 20px; top: -100px; z-index: 100; background: var(--paper); color: var(--ink); padding: 10px 20px; }
.skip-link:focus { top: 12px; }
.site-header { display: flex; align-items: center; gap: 24px; padding: 22px 5%; position: relative; z-index: 20; border-bottom: 1px solid var(--line); min-height: 112px; }
.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; max-width: 37%; flex-shrink: 0; }
.brand-mark { flex-shrink: 0; }
.brand-mark img { width: auto; height: 64px; }
.site-fox-logo { object-fit: contain; }
.brand-copy { display: block; }
.brand-title { display: block; max-width: 260px; color: #762619; font: 25px/1.03 var(--serif); text-wrap: balance; }
.brand-description { display: block; margin-top: 7px; color: var(--muted); font-size: 10px; max-width: 280px; line-height: 1.35; }
.custom-logo-link { flex-shrink: 0; }
.custom-logo { max-height: 64px; width: auto; max-width: 100px; }
.site-nav { display: flex; align-items: center; gap: 22px; font-size: 13px; }
.primary-menu, .footer-menu, .hobbies-menu { list-style: none; margin: 0; padding: 0; }
.primary-menu { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.primary-menu li { position: relative; }
.primary-menu > li > a { display: inline-block; padding: 8px 0; }
.primary-menu .current-menu-item > a, .primary-menu .current-menu-ancestor > a { color: var(--rust); }
.sub-menu { position: absolute; top: 100%; left: -16px; min-width: 205px; max-width: 300px; list-style: none; padding: 10px; margin: 0; background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 8px; visibility: hidden; opacity: 0; z-index: 30; }
.sub-menu a { display: block; padding: 7px 10px; }
.sub-menu .sub-menu { left: 100%; top: 0; }
.primary-menu li:hover > .sub-menu, .primary-menu li:focus-within > .sub-menu, .primary-menu li.submenu-open > .sub-menu { visibility: visible; opacity: 1; }
.submenu-toggle { display: inline-block; border: 0; background: transparent; padding: 4px; margin-left: 2px; font-size: 15px; }
.category-dropdown { position: relative; white-space: nowrap; }
.category-dropdown summary { display: flex; align-items: center; gap: 3px; list-style: none; padding: 8px 0; }
summary::-webkit-details-marker { display: none; }
.category-dropdown summary .icon { width: 14px; }
.category-list { position: absolute; right: 0; top: 100%; min-width: 250px; max-width: 340px; max-height: 65vh; overflow: auto; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 14px 20px; margin: 10px 0 0; list-style: none; white-space: normal; }
.category-list a { display: block; padding: 5px 0; }
.category-list .children { margin: 0; padding-left: 18px; list-style: none; border-left: 1px solid var(--line); }
.header-actions { display: flex; align-items: center; gap: 20px; }
.icon-button { background: transparent; border: none; padding: 6px; display: inline-flex; align-items: center; justify-content: center; color: var(--plum); min-width: 36px; min-height: 36px; }
.icon-button:hover { color: var(--rust); }
.age-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; border: 1px solid #b95d47; border-radius: 12px; font: 12px/1 var(--sans); color: var(--rust); background: #fff8ef88; flex-shrink: 0; }
.mobile-menu-button { display: none; }
.header-actions > button { display: none; }
.js .header-actions > button[data-search-toggle] { display: inline-flex; }
.no-js-search { padding: 12px 5%; border-bottom: 1px solid var(--line); }
.no-js-search .search-form { margin-top: 12px; }
.header-search { position: absolute; top: calc(100% + 1px); left: 0; right: 0; padding: 24px 5%; border-bottom: 1px solid var(--line); background: var(--paper); box-shadow: var(--shadow); }
.search-form { display: flex; gap: 12px; width: 100%; }
.search-form label { flex: 1; min-width: 0; }
input:not([type='checkbox']):not([type='radio']), textarea, select { background: #fffaf5; border: 1px solid var(--line); padding: 10px 14px; border-radius: 6px; color: var(--ink); max-width: 100%; }
.search-form input { width: 100%; height: 48px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 11px; border: 1px solid var(--rust); padding: 10px 21px; min-height: 44px; border-radius: 7px; font-size: 14px; line-height: 1.35; transition: background .18s, box-shadow .18s; }
.button .icon { width: 18px; height: 18px; }
.button-primary { background: linear-gradient(120deg, #ba3c1d, #a7351e); color: white; box-shadow: 0 3px 6px #9e3e1812; }
.button-primary:hover { background: #8f2d19; color: white; box-shadow: 0 4px 12px #9e3e1830; }
.button-outline { background: #fffaf34d; color: var(--rust); }
.button-outline:hover { background: #f2e4d7; }
.text-link { display: inline-flex; gap: 8px; align-items: center; color: var(--rust); font-size: 14px; line-height: 1.4; }
.text-link .icon { width: 17px; height: 17px; }
.eyebrow { color: var(--rust); text-transform: uppercase; letter-spacing: .18em; font-size: 11px; line-height: 1.7; margin-bottom: 18px; }
.handwritten { font-family: 'Segoe Print', 'Bradley Hand', cursive; font-style: italic; color: #a59084; font-size: 17px; line-height: 1.6; }
.home-hero { position: relative; min-height: 530px; overflow: hidden; display: flex; align-items: center; background: #f4ebdf; }
.hero-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 63%; }
.home-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, #fbf7f0ed 0%, #fbf7f0bd 29%, #fbf7f04d 46%, transparent 64%); pointer-events: none; }
.hero-copy { position: relative; z-index: 1; padding: 54px 5% 40px; width: 62%; }
.hero-copy h1 { font-size: clamp(36px, 4.2vw, 58px); line-height: 1.12; letter-spacing: -.025em; max-width: 680px; text-wrap: balance; }
.hero-intro { max-width: 405px; margin: 23px 0; font-size: 16px; line-height: 1.7; }
.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-signature { margin: 22px 0 0 34px; width: 260px; transform: rotate(-5deg); font-size: 15px; text-align: center; }
.hero-signature .icon { width: 14px; height: 14px; }
.home-content { padding: 0 5%; }
.home-section { padding: 30px 0 27px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 19px; }
.section-heading .text-link { flex-shrink: 0; }
.bookshelf-grid { display: grid; grid-template-columns: 1.7fr 1fr 1fr; gap: 20px; }
.story-card { border: 1px solid var(--line); border-radius: 9px; overflow: hidden; display: flex; flex-direction: column; min-width: 0; background: #fffaf344; }
.card-cover { display: block; height: 205px; overflow: hidden; }
.card-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.card-cover:hover img, .gallery-cover:hover img { transform: scale(1.035); }
.card-body { padding: 18px; flex: 1; display: flex; flex-direction: column; align-items: flex-start; }
.card-body h3 { font-size: 27px; margin: 6px 0 9px; }
.card-body p { color: #655c67; font-size: 13px; line-height: 1.6; margin: 0 0 17px; }
.card-body .button { margin-top: auto; padding: 7px 15px; min-height: 37px; font-size: 12px; }
.card-tags { display: flex; gap: 6px; flex-wrap: wrap; font-size: 10px; line-height: 1.4; color: var(--muted); }
.card-tags a, .card-tags > span { border: 1px solid #d9c7c8; padding: 3px 8px; border-radius: 20px; }
.card-tags .icon { width: 13px; height: 13px; }
.story-card-featured { position: relative; color: white; min-height: 378px; border-color: #293c32; }
.story-card-featured .card-cover { position: absolute; inset: 0; height: 100%; }
.story-card-featured::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, #071b1900 5%, #13132244 30%, #071319e6 100%); pointer-events: none; }
.story-card-featured .card-body { position: relative; z-index: 1; justify-content: flex-end; margin-top: auto; padding: 25px; flex: 0; pointer-events: none; }
.story-card-featured .card-body a { pointer-events: auto; }
.story-card-featured h3 { color: white; font-size: clamp(30px, 3.1vw, 43px); }
.story-card-featured h3 a:hover { color: #ffd9b0; }
.story-card-featured p { color: white; font-size: 14px; }
.story-card-featured .card-tags { color: white; }
.story-card-featured .card-tags a { background: #2a172677; border-color: #8c666a66; }
.cover-fallback { width: 100%; height: 100%; display: flex; flex-direction: column; gap: 20px; align-items: center; justify-content: center; background: #46303f url('assets/images/cover-atlas.webp') left top / 200% 200% no-repeat; color: #eee0c5; font: italic 18px/1.4 var(--serif); }
.cover-fallback .icon { width: 56px; height: 56px; opacity: .7; }
.cover-tone-1 { background-position: right top; }
.cover-tone-2 { background-position: left bottom; }
.cover-fallback > .icon, .cover-fallback > span { display: none; }
.gallery-cover .cover-fallback { background-position: right bottom; }
.worlds-strip { display: flex; align-items: center; gap: 22px; border-block: 1px solid var(--line); padding: 22px 0; flex-wrap: wrap; }
.worlds-strip h2 { font-size: 26px; }
.category-chips { display: flex; gap: 10px; flex-wrap: wrap; flex: 1; }
.category-chips a, .post-tags a { display: inline-flex; border: 1px solid #b69489; border-radius: 24px; padding: 5px 17px; font-size: 12px; background: #fffaf344; }
.category-chips a:hover, .post-tags a:hover { background: #f0e1d4; }
.workshop-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.gallery-cover { height: 186px; overflow: hidden; border-radius: 7px; border: 1px solid var(--line); }
.gallery-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.gallery-card h3 { font-size: 23px; margin: 12px 0 6px; }
.gallery-card p { font-size: 13px; color: var(--muted); margin: 0; }
.home-bottom-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; border-top: 1px solid var(--line); padding: 28px 0 34px; }
.home-bottom-grid > :only-child { grid-column: 1 / -1; }
.home-bottom-grid h2 { margin-bottom: 20px; }
.diary-card { display: grid; grid-template-columns: 150px 1fr; gap: 20px; }
.diary-cover { display: block; height: 170px; border-radius: 7px; overflow: hidden; }
.diary-cover img { width: 100%; height: 100%; object-fit: cover; }
.diary-card h3 { font-size: 22px; margin-bottom: 8px; }
.diary-card p { font-size: 13px; line-height: 1.7; margin: 11px 0; }
.post-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; color: var(--muted); font-size: 12px; }
.post-meta span, .post-meta a { display: inline-flex; align-items: center; gap: 6px; }
.post-meta .icon { width: 15px; height: 15px; }
.diary-card .post-meta { gap: 10px; font-size: 11px; }
.diary-card .post-meta > a { display: none; }
.hobbies-section { border-left: 1px solid var(--line); padding-left: 32px; }
.hobbies-content { display: flex; gap: 22px; }
.hobbies-links { flex: 1; }
.hobbies-links > a, .hobbies-menu a { display: flex; align-items: center; gap: 13px; background: #e8ded652; border-radius: 7px; padding: 9px 13px; font-size: 13px; margin-bottom: 8px; }
.hobbies-links > a > .icon { color: var(--rust); }
.hobbies-links > a > .icon:last-child { margin-left: auto; width: 15px; }
.hobbies-links > a:hover, .hobbies-menu a:hover { background: #ecdccf; }
.hobbies-note { transform: rotate(-10deg); align-self: center; text-align: center; font-size: 18px; width: 135px; flex-shrink: 0; }
.hobbies-note .icon { margin-top: 5px; }
.front-page-content { border-top: 1px solid var(--line); padding: 28px 0; }
.mobile-quick-links { display: none; }
.site-footer { margin: 0 3.5%; border-top: 1px solid var(--line); padding: 22px 1.5% 18px; }
.footer-top { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.footer-brand { display: inline-flex; align-items: center; gap: 10px; color: #762619; font: 18px/1.05 var(--serif); max-width: 220px; }
.footer-brand img { width: auto; height: 44px; max-width: 70px; object-fit: contain; flex-shrink: 0; }
.footer-top nav { display: flex; align-items: center; gap: 20px; font-size: 11px; margin: 0 auto; }
.footer-menu { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-signature { font-size: 13px; display: flex; gap: 6px; align-items: center; }
.footer-signature .icon { width: 15px; height: 15px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; margin-top: 18px; color: var(--muted); font-size: 10px; }
.footer-age { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.footer-age .age-badge { min-width: 27px; height: 27px; border-radius: 50%; font-size: 10px; }
.archive-content, .page-content, .single-content { padding: 34px 5% 50px; }
.archive-heading { margin-bottom: 30px; max-width: 850px; }
.archive-description { color: var(--muted); margin-top: 15px; }
.archive-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.archive-grid .story-card h3 { font-size: 26px; }
.card-date { color: var(--muted); font-size: 11px; }
.category-parent-link { margin: -12px 0 24px; }
.category-list-note { font-size: 11px; color: var(--muted); margin: 0 0 8px; padding: 0 0 10px; border-bottom: 1px solid var(--line); }
.sections-directory { padding: 25px 0; margin-top: 20px; border-top: 1px solid var(--line); }
.sections-directory h2 { font-size: 24px; margin-bottom: 15px; }
.sections-directory ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px 20px; }
.sections-directory a { display: flex; align-items: center; gap: 9px; padding: 8px 0; font-size: 13px; }
.sections-directory a > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.sections-directory small { color: var(--muted); font-size: 11px; }
.sections-directory .icon { width: 15px; height: 15px; flex-shrink: 0; }
.extra-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.extra-card-grid .story-card h3 { font-size: 25px; }
.compact-sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 36px; border-top: 1px solid var(--line); margin-top: 20px; }
.compact-section { padding: 22px 0; min-width: 0; border-bottom: 1px solid var(--line); }
.compact-section h2 { font-size: 24px; }
.compact-section .section-heading { margin-bottom: 12px; gap: 14px; }
.compact-section .text-link { font-size: 12px; white-space: nowrap; }
.compact-posts { margin: 0; padding: 0; list-style: none; }
.compact-posts li + li { margin-top: 11px; }
.compact-posts a { display: block; font-family: var(--serif); font-size: 18px; line-height: 1.35; }
.compact-posts time { color: var(--muted); font-size: 11px; }
.compact-posts .icon { width: 14px; height: 14px; margin-left: 5px; vertical-align: middle; }
.subcategory-nav { margin-bottom: 30px; }
.subcategory-nav h2, .category-posts-heading h2 { font-size: 26px; }
.subcategory-nav ul { list-style: none; padding: 0; margin: 15px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.subcategory-nav a { display: flex; align-items: center; gap: 10px; padding: 12px 15px; border: 1px solid var(--line); border-radius: 7px; background: #f1eae155; font-size: 13px; height: 100%; }
.subcategory-nav a > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.subcategory-nav small { color: var(--muted); }
.subcategory-nav .icon { width: 16px; height: 16px; flex-shrink: 0; }
.category-posts-heading { display: flex; align-items: baseline; gap: 15px; margin-bottom: 18px; }
.category-posts-heading > span { color: var(--muted); font-size: 12px; }
.pagination { margin-top: 36px; text-align: center; }
.nav-links { display: flex; align-items: center; gap: 8px; justify-content: center; flex-wrap: wrap; }
.page-numbers { border: 1px solid var(--line); border-radius: 6px; padding: 7px 13px; }
.page-numbers.current { background: var(--rust); color: white; border-color: var(--rust); }
.empty-state { text-align: center; padding-top: 60px; padding-bottom: 70px; }
.empty-state > .icon { width: 50px; height: 50px; color: var(--rust); margin-bottom: 20px; }
.empty-state h1, .empty-state h2 { margin-bottom: 18px; }
.empty-state .search-form { max-width: 680px; margin: 28px auto; }
.empty-shelf { display: flex; gap: 15px; align-items: center; padding: 30px; border: 1px dashed var(--line); border-radius: 8px; }
.empty-shelf p { margin: 0; }
.breadcrumbs { display: flex; gap: 11px; font-size: 12px; color: var(--muted); margin: 0 0 21px; flex-wrap: wrap; }
.breadcrumbs > span:last-child { overflow-wrap: anywhere; }
.reading-layout { display: grid; grid-template-columns: minmax(0, 1fr) 265px; gap: 42px; }
.reading-main { min-width: 0; }
.article-header h1 { font-size: clamp(32px, 3.5vw, 46px); margin-bottom: 13px; }
.article-header { margin-bottom: 25px; }
.reader-toolbar { display: flex; align-items: stretch; justify-content: space-between; gap: 0; color: #fff8ef; border-radius: 8px; background: linear-gradient(110deg, #302337, #432b40); padding: 6px 4px; margin-bottom: 24px; }
.reader-toolbar > a, .reader-toolbar > button, .reader-toolbar > div { display: flex; gap: 8px; align-items: center; justify-content: center; padding: 9px 13px; border: none; border-right: 1px solid #ffffff25; background: transparent; color: inherit; font-size: 12px; min-height: 36px; }
.reader-toolbar > :last-child { border-right: 0; }
.reader-toolbar > a:hover, .reader-toolbar button:hover { color: #ffc29e; }
.reader-toolbar button[aria-pressed='true'] { color: #ffd0a2; }
.reader-toolbar .icon { width: 17px; height: 17px; }
.font-controls { padding-block: 0 !important; }
.font-controls button { border: 0; padding: 8px; background: transparent; color: inherit; }
.resume-reading { border: 0; background: transparent; margin: 0 0 18px; padding: 0; }
.reading-cover { display: block; width: 100%; height: 205px; object-fit: cover; border-radius: 9px 9px 0 0; }
.entry-content { overflow-wrap: anywhere; }
.reader-content { background: #fffcf655; border: 1px solid #eaded466; border-radius: 0 0 9px 9px; padding: 28px 29px; font: var(--reader-font, 18px)/1.85 var(--serif); }
.entry-content > :first-child { margin-top: 0; }
.entry-content > :last-child { margin-bottom: 0; }
.entry-content h2 { font-size: 1.45em; margin: 1.5em 0 .65em; }
.entry-content h3 { font-size: 1.2em; margin: 1.3em 0 .6em; }
.entry-content h4 { font-size: 1.1em; margin: 1.2em 0 .5em; }
.entry-content p, .entry-content ul, .entry-content ol { margin: 0 0 1.1em; }
.entry-content a { color: var(--rust); text-decoration: underline; text-underline-offset: 3px; }
.entry-content blockquote, .wp-block-quote { background: #ebe6e075; border-left: 3px solid #a59aa7; margin: 1.1em 0; padding: 15px 20px; border-radius: 0 6px 6px 0; }
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content blockquote cite { font-size: .85em; color: var(--muted); }
.entry-content figure { margin: 1.2em 0; }
.entry-content figcaption { font: 12px/1.6 var(--sans); color: var(--muted); }
.entry-content img { border-radius: 5px; height: auto; }
.entry-content iframe, .entry-content video { max-width: 100%; }
.entry-content pre { overflow: auto; padding: 18px; background: var(--paper-deep); border-radius: 6px; font: 14px/1.7 monospace; }
.entry-content table { border-collapse: collapse; width: 100%; font-size: .9em; }
.entry-content td, .entry-content th { border: 1px solid var(--line); padding: 8px 12px; }
.entry-content .wp-block-table { overflow: auto; }
.alignleft { float: left; margin: 0 22px 16px 0; }
.alignright { float: right; margin: 0 0 16px 22px; }
.aligncenter { margin-inline: auto; display: block; }
.entry-content::after { content: ''; display: block; clear: both; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 13px; color: var(--muted); text-align: center; }
.gallery { display: flex; flex-wrap: wrap; gap: 12px; }
.gallery-item { flex: 1 1 150px; margin: 0 !important; }
.gallery-item img { width: 100%; height: auto; }
.post-tags { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.post-tags a { color: var(--rust); }
.content-warning { padding: 20px 24px; margin: 26px 0; border: 1px solid #e9d4c1; background: #f4e4d36e; border-radius: 9px; position: relative; overflow: hidden; }
.content-warning::after { content: ''; position: absolute; right: -5px; bottom: -15px; width: 80px; height: 130px; background: url('assets/images/botanical.svg') center / contain no-repeat; opacity: .4; pointer-events: none; }
.warning-heading { display: flex; gap: 12px; align-items: center; color: var(--rust); margin-bottom: 10px; }
.warning-heading h2 { color: var(--rust); font: 16px/1.4 var(--sans); }
.warning-body { display: flex; align-items: center; gap: 18px; }
.warning-body .age-badge { width: 45px; height: 45px; border-radius: 50%; font-size: 15px; }
.warning-body p { font-size: 13px; margin: 0; position: relative; z-index: 1; }
.chapter-navigation { display: flex; gap: 13px; justify-content: space-between; align-items: stretch; margin: 30px 0 0; }
.chapter-navigation .button { font-size: 12px; padding: 10px 13px; max-width: 37%; }
.chapter-navigation .button span { overflow-wrap: anywhere; }
.chapter-navigation .chapter-all { margin-inline: auto; flex-shrink: 0; }
.reader-sidebar { padding-top: 0; min-width: 0; }
.sidebar-box { background: #ebe5df6b; border: 1px solid #e6dbd4; border-radius: 9px; padding: 22px 19px; margin-bottom: 22px; }
.sidebar-title { font-size: 21px; margin-bottom: 17px; }
.toc-list { list-style: none; padding: 0 0 0 13px; margin: 0; border-left: 1px solid #c8b3af; max-height: 460px; overflow-y: auto; font-size: 12px; }
.toc-list li { position: relative; padding: 5px 0; }
.toc-list li::before { content: ''; position: absolute; width: 5px; height: 5px; border-radius: 50%; background: var(--paper); border: 1px solid #aa9595; top: 13px; left: -16px; }
.toc-list a { display: block; padding: 3px 8px; }
.toc-list .current-chapter { background: linear-gradient(90deg, #dfb7a655, transparent); font-weight: 600; color: var(--rust); }
.toc-list .current-chapter::before { background: var(--rust); border-color: var(--rust); }
.toc-subheading { padding-left: 10px !important; color: var(--muted); }
.related-card { display: flex; align-items: center; gap: 13px; margin: 12px 0; font-size: 12px; }
.related-cover { width: 65px; height: 76px; flex-shrink: 0; overflow: hidden; border-radius: 6px; }
.related-cover img { width: 100%; height: 100%; object-fit: cover; }
.related-cover .cover-fallback .icon { width: 30px; height: 30px; }
.related-cover .cover-fallback > span { display: none; }
.related-card strong { display: block; font-weight: 500; line-height: 1.45; }
.related-card small { display: block; color: var(--muted); font-size: 10px; margin-top: 5px; }
.password-note .sidebar-title { display: flex; align-items: center; gap: 9px; font: 14px/1.4 var(--sans); color: var(--rust); }
.password-note .icon { width: 26px; height: 26px; }
.password-note p { font-size: 12px; color: var(--muted); margin: 0; }
.sidebar-signature { padding: 12px 12px 25px 60px; transform: rotate(-7deg); font-size: 17px; background: url('assets/images/botanical.svg') left center / 50px 130px no-repeat; }
.sidebar-signature .icon { width: 15px; height: 15px; }
.widget a { overflow-wrap: anywhere; }
.widget ul { padding-left: 16px; }
.reading-progress { position: fixed; bottom: 0; left: 0; right: 0; height: 3px; z-index: 50; background: #ae391f20; }
.reading-progress span { display: block; height: 100%; background: var(--rust); transform: scaleX(0); transform-origin: left; }
.page-article { max-width: 900px; margin: 0 auto; }
.page-article h1 { margin-bottom: 28px; }
.page-article .entry-content { font: 18px/1.85 var(--serif); }
.page-cover { width: 100%; max-height: 340px; object-fit: cover; border-radius: 9px; margin-bottom: 30px; }
.comments-area { border-top: 1px solid var(--line); margin-top: 38px; padding-top: 28px; }
.comments-area h2, .comment-reply-title { font-size: 26px; margin-bottom: 20px; }
.comment-list { list-style: none; padding: 0; margin: 0 0 30px; }
.comment-list .children { list-style: none; padding-left: 25px; }
.comment-body { padding: 20px 0; border-bottom: 1px solid var(--line); }
.comment-author { display: flex; gap: 10px; align-items: center; }
.comment-author img { border-radius: 50%; }
.comment-metadata, .comment-notes, .logged-in-as { font-size: 12px; color: var(--muted); }
.comment-content { margin-top: 12px; }
.comment-reply-link { color: var(--rust); font-size: 12px; }
.comment-form label { display: block; font-size: 13px; margin-bottom: 5px; }
.comment-form textarea { width: 100%; }
.comment-form-cookies-consent { display: flex; align-items: flex-start; gap: 8px; }
.comment-form-cookies-consent label { display: inline; }
.comment-form .submit { background: var(--rust) !important; border-color: var(--rust) !important; color: white !important; cursor: pointer; }
.post-password-form input[type='password'] { width: 100%; margin: 10px 0; }
.post-password-form input[type='submit'] { background: var(--rust); color: white; border-color: var(--rust); cursor: pointer; }
.js-only { display: none !important; }
.js .js-only { display: inline-flex !important; }
.js [hidden] { display: none !important; }
.js .reading-progress { display: block !important; }

[data-reading-theme='evening'] { --paper: #28232b; --paper-deep: #342d36; --ink: #e4d9cd; --plum: #eddcc8; --muted: #b8a9b5; --line: #50424e; --rust: #e8996d; --shadow: 0 12px 46px #0003; }
[data-reading-theme='evening'] body { background: #1e1b23; }
[data-reading-theme='evening'] .site-shell { background-image: none; border-color: var(--line); }
[data-reading-theme='evening'] .brand-title, [data-reading-theme='evening'] .footer-brand { color: #f0b68d; }
[data-reading-theme='evening'] .site-fox-logo { filter: invert(1); }
[data-reading-theme='evening'] .reader-content { background: #2d2730; border-color: var(--line); }
[data-reading-theme='evening'] .entry-content blockquote { background: #3b323d; border-color: #92758d; }
[data-reading-theme='evening'] .sidebar-box { background: #322b35; border-color: var(--line); }
[data-reading-theme='evening'] .button-outline, [data-reading-theme='evening'] .age-badge, [data-reading-theme='evening'] .post-tags a { background: #342b32; border-color: #976c56; }
[data-reading-theme='evening'] .button-outline:hover { background: #44343c; }
[data-reading-theme='evening'] .content-warning { background: #3b302d; border-color: #6b4a39; }
[data-reading-theme='evening'] .warning-heading h2 { color: var(--rust); }
[data-reading-theme='evening'] input, [data-reading-theme='evening'] textarea, [data-reading-theme='evening'] select { background: #302932 !important; border-color: var(--line) !important; color: var(--ink); }

@media (max-width: 1380px) { .site-shell { margin: 16px 22px; } }
@media (max-width: 1150px) {
    .site-header { gap: 16px; padding-inline: 4%; }
    .brand-title { font-size: 22px; max-width: 210px; }
    .brand-description { max-width: 230px; }
    .primary-menu { gap: 16px; }
    .site-nav { gap: 16px; font-size: 12px; }
    .header-actions { gap: 10px; }
    .home-hero { min-height: 470px; }
    .hero-copy h1 { font-size: 45px; }
    .hero-intro { max-width: 340px; font-size: 15px; }
    .bookshelf-grid { gap: 16px; }
    .card-cover { height: 170px; }
    .story-card-featured { min-height: 350px; }
    .card-body { padding: 14px; }
    .card-body h3 { font-size: 24px; }
    .story-card-featured .card-body { padding: 20px; }
    .story-card-featured h3 { font-size: 34px; }
    .gallery-cover { height: 155px; }
    .hobbies-note { display: none; }
    .diary-card { grid-template-columns: 110px 1fr; gap: 16px; }
    .reading-layout { grid-template-columns: minmax(0, 1fr) 230px; gap: 28px; }
    .reader-toolbar > a, .reader-toolbar > button, .reader-toolbar > div { padding-inline: 10px; font-size: 11px; }
    .reader-toolbar > button > span { max-width: 70px; }
    .reader-content { padding: 23px; }
}
@media (max-width: 900px) {
    .site-shell { margin: 12px; border-radius: 13px; }
    .site-header { padding: 16px 5%; min-height: 92px; }
    .brand { max-width: 72%; }
    .brand-title { max-width: 260px; }
    .site-nav { display: block; }
    .js .header-actions .mobile-menu-button { display: inline-flex; }
    .site-header { flex-wrap: wrap; }
    .js .site-header { flex-wrap: nowrap; }
    .js .site-nav { display: none; }
    .js .site-nav.is-open { display: block; }
    .site-nav { position: static; width: 100%; order: 3; background: var(--paper); padding: 20px 0; }
    .js .site-nav { position: absolute; top: 100%; left: 0; right: 0; padding: 20px 5%; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
    .primary-menu { display: block; }
    .primary-menu > li > a { padding: 9px 0; font-size: 15px; }
    .sub-menu, .sub-menu .sub-menu { position: static; max-width: none; box-shadow: none; margin: 0 0 5px 12px; padding: 5px 12px; border: 0; border-left: 1px solid var(--line); border-radius: 0; opacity: 1; visibility: visible; }
    .js .sub-menu { display: none; }
    .js .submenu-open > .sub-menu { display: block; }
    .submenu-toggle { float: right; min-width: 42px; min-height: 42px; }
    .category-dropdown { margin-top: 9px; border-top: 1px solid var(--line); padding-top: 10px; font-size: 15px; }
    .category-dropdown summary { justify-content: space-between; }
    .category-list { position: static; width: 100%; max-width: none; margin-top: 4px; border: 0; box-shadow: none; background: transparent; padding: 10px 0; }
    .home-hero { min-height: 440px; }
    .hero-copy { width: 72%; }
    .hero-copy h1 { font-size: clamp(33px, 5vw, 45px); }
    .hero-intro { max-width: 320px; }
    .bookshelf-grid { grid-template-columns: 1.45fr 1fr; }
    .bookshelf-grid .story-card:last-child:nth-child(3) { display: none; }
    .worlds-strip { gap: 14px; }
    .worlds-strip h2 { width: 100%; }
    .worlds-strip .text-link { font-size: 12px; }
    .home-bottom-grid { grid-template-columns: 1fr; gap: 26px; }
    .hobbies-section { padding-left: 0; padding-top: 24px; border-left: 0; border-top: 1px solid var(--line); }
    .hobbies-links { max-width: 460px; }
    .hobbies-note { display: block; }
    .archive-grid, .extra-card-grid, .subcategory-nav ul, .sections-directory ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .reading-layout { display: flex; flex-direction: column; gap: 24px; }
    .reader-sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
    .reader-sidebar .sidebar-box { margin: 0; }
    .reader-toc { order: -1; grid-column: 1 / -1; }
    .js .reader-toc { display: none; }
    .js .toc-open .reader-toc { display: block; }
    .toc-open .reader-sidebar { order: -1; }
    .toc-open .reader-sidebar > :not(.reader-toc) { display: none; }
    .reader-toolbar > a, .reader-toolbar > button, .reader-toolbar > div { font-size: 13px; }
    .reader-toolbar > button > span { max-width: none; }
    .sidebar-signature { display: none; }
    .article-header h1 { font-size: 38px; }
    .reading-cover { height: 220px; }
    .footer-bottom { flex-wrap: wrap; }
}
@media (max-width: 600px) {
    body { font-size: 14px; }
    .site-shell { margin: 0; border: 0; border-radius: 0; }
    .site-header { min-height: 82px; padding: 12px 20px; gap: 10px; }
    .brand { gap: 8px; max-width: 72%; }
    .brand-mark img { width: auto; height: 50px; }
    .brand-title { font-size: 20px; max-width: 185px; }
    .brand-description { display: none; }
    .custom-logo { max-height: 48px; max-width: 55px; }
    .header-actions { gap: 3px; }
    .header-actions .age-badge { display: none; }
    .icon-button { min-width: 34px; padding: 5px; }
    .home-hero { min-height: 430px; align-items: flex-start; }
    .hero-art { object-position: 62% 60%; opacity: .84; }
    .home-hero::after { background: linear-gradient(90deg, #fbf7f0f2, #fbf7f0cc 36%, #fbf7f055 65%, transparent), linear-gradient(0deg, #fbf7f0 0%, #fbf7f000 24%); }
    .hero-copy { padding: 34px 22px 26px; width: 100%; }
    .eyebrow { font-size: 9px; letter-spacing: .14em; margin-bottom: 14px; }
    .hero-copy h1 { font-size: clamp(31px, 7.6vw, 43px); max-width: 350px; line-height: 1.1; }
    .hero-intro { max-width: 245px; font-size: 13px; line-height: 1.6; margin: 19px 0 22px; }
    .hero-buttons { gap: 10px; }
    .hero-buttons .button { padding: 10px 15px; font-size: 12px; min-height: 43px; }
    .hero-signature { font-size: 12px; width: 225px; margin: 20px 0 0; }
    .home-content { padding: 0 20px; }
    .home-section { padding: 22px 0; }
    h2 { font-size: 27px; }
    .section-heading { gap: 10px; margin-bottom: 15px; align-items: baseline; }
    .section-heading .text-link { font-size: 11px; gap: 4px; }
    .section-heading .text-link .icon { width: 14px; }
    .bookshelf-grid { grid-template-columns: 1fr; gap: 16px; }
    .bookshelf-grid .story-card:last-child:nth-child(3) { display: flex; }
    .story-card-featured { min-height: 290px; }
    .story-card-featured .card-body { padding: 22px; }
    .story-card-featured h3 { font-size: 34px; }
    .bookshelf-grid > .story-card:not(.story-card-featured) { display: grid; grid-template-columns: 38% 1fr; }
    .bookshelf-grid > .story-card:not(.story-card-featured) .card-cover { height: 100%; min-height: 180px; }
    .bookshelf-grid > .story-card:not(.story-card-featured) .card-body { padding: 14px; }
    .bookshelf-grid > .story-card:not(.story-card-featured) h3 { font-size: 23px; }
    .bookshelf-grid > .story-card:not(.story-card-featured) p { font-size: 12px; }
    .worlds-strip { padding: 20px 0; gap: 12px; }
    .worlds-strip h2 { font-size: 24px; }
    .category-chips { gap: 8px; width: 100%; flex: auto; }
    .category-chips a { font-size: 11px; padding: 5px 13px; }
    .workshop-grid { gap: 19px; grid-template-columns: 1fr; }
    .gallery-cover { height: 190px; }
    .gallery-card h3 { font-size: 24px; }
    .home-bottom-grid { padding: 23px 0; }
    .diary-card { grid-template-columns: 105px 1fr; gap: 15px; }
    .diary-card h3 { font-size: 22px; }
    .diary-cover { height: 154px; }
    .diary-card p { font-size: 12px; }
    .hobbies-content { gap: 10px; }
    .hobbies-note { display: none; }
    .hobbies-links { max-width: none; }
    .mobile-quick-links { display: block; padding: 4px 0 26px; }
    .mobile-quick-links h2 { font-size: 24px; margin-bottom: 14px; }
    .mobile-quick-links > div { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .mobile-quick-links a { padding: 14px 8px; background: #eee5dc99; border: 1px solid #e7d9cd; border-radius: 8px; display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--rust); font-size: 12px; }
    .mobile-quick-links .icon { width: 28px; height: 28px; }
    .site-footer { margin: 0 20px; padding: 20px 0; }
    .footer-top { gap: 20px; }
    .footer-brand { font-size: 17px; max-width: 200px; }
    .footer-top nav { margin: 0; width: 100%; flex-wrap: wrap; gap: 14px; }
    .footer-menu { gap: 14px; }
    .footer-signature { display: none; }
    .footer-bottom { gap: 15px; font-size: 10px; }
    .archive-content, .page-content, .single-content { padding: 25px 20px 35px; }
    .archive-grid, .extra-card-grid { grid-template-columns: 1fr; gap: 20px; }
    .compact-sections, .subcategory-nav ul, .sections-directory ul { grid-template-columns: 1fr; }
    .archive-grid .card-cover { height: 215px; }
    .archive-heading h1, .page-article h1 { font-size: 36px; }
    .breadcrumbs { font-size: 10px; gap: 8px; margin-bottom: 18px; }
    .article-header h1 { font-size: 34px; }
    .post-meta { gap: 12px; font-size: 11px; }
    .reader-toolbar { flex-wrap: wrap; padding: 4px; row-gap: 3px; }
    .reader-toolbar > a, .reader-toolbar > button, .reader-toolbar > div { padding: 8px 9px; font-size: 11px; }
    .reader-toolbar > button > span { max-width: 60px; line-height: 1.3; }
    .font-controls { padding-inline: 0 !important; }
    .font-controls button { padding: 7px; }
    .reader-toolbar .icon { width: 15px; height: 15px; }
    .reading-cover { height: 155px; }
    .reader-content { padding: 22px 16px; line-height: 1.8; }
    .content-warning { padding: 17px; margin-top: 23px; }
    .warning-body { gap: 13px; }
    .warning-body p { font-size: 12px; }
    .warning-heading h2 { font-size: 14px; }
    .chapter-navigation { flex-wrap: wrap; gap: 10px; }
    .chapter-navigation .button { max-width: calc(50% - 5px); font-size: 11px; padding: 9px 12px; flex: 1; }
    .chapter-navigation .chapter-all { order: 3; flex-basis: 100%; max-width: 100%; }
    .reader-sidebar { grid-template-columns: 1fr; }
    .reader-content blockquote { padding: 13px 15px; }
    .search-form { gap: 8px; }
    .search-form input { font-size: 13px; padding-inline: 10px; }
    .search-form .button { padding-inline: 12px; }
    .search-form .button > .icon { display: none; }
    .comment-list .children { padding-left: 15px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
