/* Yao Stories. This layer keeps the complete original underneath. */
@font-face {
  font-family: "Yao Literata";
  src: url("/assets/fonts/Literata-variable.woff2") format("woff2"), url("/assets/fonts/Literata-variable.ttf") format("truetype");
  font-weight: 200 900;
  font-style: normal;
  font-display: optional;
}
:root {
  color-scheme: dark;
  --ink: #ece9e2; --muted: #9b9eaa; --paper: #0c1015; --cream: #151a21;
  --line: #2b303a; --rust: #d9b475; --night: #11161d;
  --surface: #151a21; --elevated: #1c222c; --reader-text: #dedbd4;
  --reader-size: 19px; --reader-leading: 1.9; --paragraph-gap: 1.4em;
}
html[data-reader-theme="light"] {
  color-scheme: light;
  --ink: #242b33; --muted: #666e78; --paper: #f6f4ef; --cream: #fffdf8;
  --line: #d9d5ce; --rust: #91683b; --night: #eeeae2;
  --surface: #fffdf8; --elevated: #ede9e0; --reader-text: #30343b;
}
body.yao-stories { background: var(--paper); color: var(--ink); font-family: Arial, "PingFang SC", "Microsoft YaHei", sans-serif; }
::selection { background: #d9b47544; color: var(--ink); }
.yao-stories :focus-visible { outline: 2px solid var(--rust); outline-offset: 4px; }
.shell { width: min(1200px, calc(100% - 64px)); }
.site-header { height: 88px; border-bottom: 1px solid var(--line); gap: 20px; }
.brand { gap: 12px; flex-shrink: 0; }
.brand b { font: 600 25px/1.1 Georgia, serif; letter-spacing: -.025em; color: var(--ink); }
.brand small { font-size: 8px; color: var(--muted); letter-spacing: .2em; margin-top: 7px; }
.brand-mark { width: 30px; height: 34px; background: transparent; border: 1px solid var(--rust); border-radius: 5px 9px 9px 5px; box-shadow: none; }
.brand-mark:before { top: 3px; bottom: 3px; left: 5px; height: auto; width: 1px; border-radius: 0; background: var(--rust); }
.brand-mark i { inset: 8px 6px 8px 11px; transform: none; border: 0; border-top: 1px solid var(--rust); border-bottom: 1px solid var(--rust); }
.top-note { background: var(--night); color: var(--muted); min-height: 30px; font-size: 10px; letter-spacing: .06em; }
.site-header nav { margin-left: 0; gap: 28px; color: var(--muted); }
.site-header nav a { padding: 15px 0; }
.outline-button { border-color: var(--line); border-radius: 7px; background: var(--surface); color: var(--ink); padding: 12px 16px; }
.outline-button:hover { background: var(--elevated); color: var(--rust); }
.header-actions { gap: 14px; }
.back { font-size: 11px; color: var(--muted); white-space: nowrap; }
.lang-switch { border: 0; border-radius: 7px; background: var(--surface); padding: 3px; }
.lang-switch button { color: var(--muted); min-height: 34px; border-radius: 5px; padding: 7px 9px; font-size: 10px; }
.lang-switch button.active { color: var(--rust); background: var(--elevated); }
.global-language-trigger { background: transparent; color: var(--muted); }
.global-language-panel { background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 20px 70px #0008; border-radius: 12px; }
.global-language-head strong, .global-language-option span, .global-language-device strong { color: var(--ink); }
.global-language-head small, .global-language-option small, .global-language-note { color: var(--muted); }
.global-language-search, .global-language-device, .global-language-option { border-color: var(--line); background: transparent; color: var(--ink); }
.global-language-search input { color: var(--ink); }
.global-language-option:hover, .global-language-device:hover { background: var(--elevated); }
.hero { min-height: 580px; padding: 58px 0 70px; gap: 70px; }
.hero h1 { color: var(--ink); font-size: clamp(42px, 5vw, 68px); font-weight: 400; line-height: 1.08; letter-spacing: -.055em; }
.hero h1 em { color: var(--rust); font-weight: 400; }
.hero-copy > p { color: var(--muted); font-size: 15px; line-height: 1.8; max-width: 420px; }
.search { border: 1px solid var(--line); background: var(--surface); border-radius: 9px; padding: 7px; box-shadow: none; }
.search input { background: transparent; color: var(--ink); font-size: 13px; }
.search button { background: var(--rust); color: #1c1710; border-radius: 5px; min-height: 42px; font-size: 11px; }
.stats { border-color: var(--line); margin-top: 30px; }
.stats div { border-color: var(--line); }
.stats strong { color: var(--ink); font-family: Georgia, serif; }
.stats span { color: var(--muted); }
.feature-paper { border: 1px solid #ffffff20; border-radius: 14px; background: var(--surface); box-shadow: 0 24px 64px #0004; transform: none; overflow: hidden; }
.feature-paper:hover { transform: translateY(-3px); }
.paper-copy h2 { font-size: 34px; letter-spacing: -.035em; }
.carousel-control { color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 50%; }
.carousel-status, .carousel-footer { color: var(--muted); }
.trust { background: var(--night); border-color: var(--line); }
.trust .shell { color: var(--muted); min-height: 68px; font-size: 11px; }
.home-discovery { padding-top: 60px; padding-bottom: 60px; }
.home-discovery-muted { background: var(--night); border-color: var(--line); }
.discovery-heading h2, .related-head h2 { font-weight: 400; letter-spacing: -.025em; font-size: 34px; }
.discovery-heading p, .discovery-heading a { color: var(--muted); }
.story-grid { gap: 24px; }
.story-card { border: 1px solid var(--line); background: var(--surface); border-radius: 11px; overflow: hidden; box-shadow: none; }
.story-card:hover { border-color: #d9b47566; box-shadow: 0 16px 32px #0002; transform: translateY(-3px); }
.cover { height: 215px; }
.cover:after { display: none; }
.cover img { transition: transform .4s ease; }
.cover:hover img { transform: scale(1.035); }
.card-body { padding: 20px; }
.card-meta { color: var(--muted); gap: 9px; flex-wrap: wrap; }
.card-body h3 { color: var(--ink); font-size: 22px; font-weight: 400; line-height: 1.35; min-height: 58px; letter-spacing: -.015em; }
.card-title-row { display: flex; align-items: flex-start; gap: 12px; margin: 12px 0 9px; min-height: 58px; }
.card-title-row h3 { flex: 1; min-width: 0; min-height: 0; margin: 0; overflow-wrap: anywhere; }
.card-copy-link { display: inline-flex; align-items: center; justify-content: center; gap: 5px; flex-shrink: 0; min-height: 40px; margin-top: -2px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--elevated); color: var(--muted); font: 11px/1.2 Arial, "PingFang SC", "Microsoft YaHei", sans-serif; white-space: nowrap; cursor: pointer; }
.card-copy-link svg { flex-shrink: 0; }
.card-copy-link:hover, .card-copy-link.is-copied { border-color: var(--rust); color: var(--rust); }
.card-copy-link:disabled { cursor: wait; }
.card-body > p { color: var(--muted); font-size: 12px; line-height: 1.8; }
.tags { flex-wrap: wrap; }
.tags span, .tags a { background: var(--elevated); color: var(--muted); border-color: var(--line); border-radius: 4px; }
.read-link { border-color: var(--line); color: var(--ink); padding-top: 17px; }
.theme-card { border-color: var(--line); background: var(--surface); color: var(--ink); border-radius: 10px; box-shadow: none; }
.theme-card h3, .theme-card b { color: var(--ink); }
.theme-card p { color: var(--muted); }
.archive-count-band { background: var(--night); border-color: var(--line); }
.archive-count-mark strong { color: var(--rust); }
.archive-count-band blockquote { color: var(--muted); }
.site-footer { border-color: var(--line); color: var(--muted); }
.site-footer > p, .site-footer nav, .site-footer > small { color: var(--muted); }
.library { gap: 36px; padding-top: 40px; }
.library-title, .library-main h1 { color: var(--ink); }
.folder { background: transparent; border-color: var(--line); color: var(--muted); border-radius: 7px; }
.folder b, .folder i { color: var(--muted); }
.folder.active { background: var(--surface); border-color: var(--rust); }
.folder.active b { color: var(--rust); }
.folder small, .folders blockquote, .library-context-note { color: var(--muted); }
.library-controls input, .library-controls select, .library-toolbar select { color: var(--ink); background: var(--surface); border-color: var(--line); border-radius: 5px; }
.library-tabs { border-color: var(--line); }
.library-tabs button { background: transparent; color: var(--muted); border-color: var(--line); }
.library-tabs button.active { color: var(--rust); border-color: var(--rust); background: var(--surface); }
.library-tabs button[hidden] { display: none; }
.load-more-button { color: var(--ink); background: var(--surface); border-color: var(--line); border-radius: 7px; }
.empty { color: var(--muted); background: var(--surface); }

/* The story gets to the point. All original prose is preserved. */
.reader { grid-template-columns: minmax(0, 760px) 300px; gap: 52px; padding-top: 24px; padding-bottom: 56px; }
.reader-main { min-width: 0; }
.breadcrumb { font-size: 10px; color: var(--muted); gap: 8px; flex-wrap: wrap; margin-top: 20px; }
.article-head { padding: 24px 0 14px; border-bottom: 0; }
.yao-story-heading { display: flex; align-items: center; gap: 20px; }
.yao-cover { width: 76px; height: 98px; flex-shrink: 0; padding: 0; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; background: var(--surface); cursor: zoom-in; }
.yao-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.yao-title-copy { flex: 1; min-width: 0; }
.article-label { gap: 10px; font-size: 9px; color: var(--rust); letter-spacing: .1em; justify-content: flex-start; align-items: center; }
.article-label i { color: var(--muted); }
.article-head h1 { font: 400 clamp(30px, 3.3vw, 42px)/1.12 Georgia, "Noto Serif SC", serif; letter-spacing: -.04em; margin: 12px 0; color: var(--ink); }
.article-stats { color: var(--muted); margin-top: 10px; gap: 12px; flex-wrap: wrap; font-size: 10px; line-height: 1.6; }
.yao-story-details { color: var(--muted); margin: 18px 0 0; font-size: 11px; }
.yao-story-details summary { cursor: pointer; display: flex; align-items: center; gap: 10px; list-style: none; min-height: 32px; }
.yao-story-details summary::-webkit-details-marker { display: none; }
.yao-story-details > p { color: var(--muted); font: 15px/1.8 Georgia, serif; }
.yao-story-details[open] { padding: 14px 18px; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; }
.story-taxonomy { color: var(--muted); border-color: var(--line); }
.story-taxonomy a { color: var(--rust); background: transparent; border-color: var(--line); }
.content-warning { background: var(--elevated); color: var(--muted); border-color: var(--rust); }
.content-warning b { color: var(--rust); }
.chapter-navigation { margin: 18px 0; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); box-shadow: none; overflow: hidden; }
.chapter-navigation-head { padding: 13px 16px; align-items: center; gap: 16px; flex-direction: row; }
.chapter-position { gap: 5px; }
.chapter-position strong { color: var(--ink); font-size: 23px; }
.chapter-position strong i { color: var(--muted); }
.chapter-select-label { min-width: 0; width: min(300px, 70%); }
.chapter-select-label > span { display: none; }
.chapter-select { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 5px; font-size: 12px; height: 40px; }
.chapter-navigation-track { height: 2px; background: var(--line); }
.chapter-navigation-track i { background: var(--rust); }
.chapter-turn { border-top: 1px solid var(--line); }
.chapter-turn-link { padding: 15px 16px; min-height: 64px; color: var(--ink); }
.chapter-turn-link + .chapter-turn-link { border-color: var(--line); }
.chapter-turn-link:hover { background: var(--elevated); color: var(--rust); }
.chapter-turn-link b { font-size: 13px; }
.chapter-turn-link > span { color: var(--rust); font-size: 9px; }
.chapter-turn-link.is-disabled { color: var(--muted); }
.chapter-navigation-top { background: transparent; border: 0; border-block: 1px solid var(--line); border-radius: 0; margin: 4px 0 18px; }
.chapter-navigation-top .chapter-navigation-head { padding: 10px 0; }
.chapter-navigation-top .chapter-turn, .chapter-navigation-top .chapter-navigation-track { display: none; }
.chapter-position > span { color: var(--muted); font-size: 8px; }
.chapter-page-head { margin: 24px auto 16px; max-width: 680px; border: 0; padding: 0; }
.chapter-page-head > span { color: var(--rust); font-size: 9px; letter-spacing: .14em; }
.chapter-page-head h2 { color: var(--ink); font: 400 24px/1.35 Georgia, "Noto Serif SC", serif; margin: 8px 0; }
.chapter-page-head p { color: var(--muted); font-size: 10px; margin: 8px 0 18px; }
.prose { max-width: 680px; }
.prose > p { color: var(--reader-text); font: var(--reader-size)/var(--reader-leading) Georgia, "Noto Serif SC", "Songti SC", serif; margin: 0 0 var(--paragraph-gap); letter-spacing: 0; text-align: start; overflow-wrap: break-word; }
html[data-reader-font="sans"] .prose > p { font-family: Arial, "PingFang SC", "Microsoft YaHei", sans-serif; }
.prose > h2 { color: var(--ink); border-color: var(--line); font-size: 26px; }
.prose .dropcap:first-letter { float: none; font-size: inherit; line-height: inherit; color: inherit; margin: 0; }
.chapter-end { border-color: var(--line); margin: 28px 0 0; padding: 28px 20px; background: var(--surface); border-radius: 9px; }
.chapter-end > span { color: var(--rust); }
.chapter-end h2 { color: var(--ink); font-size: 26px; }
.chapter-end p { color: var(--muted); font-size: 12px; }
.chapter-end a { color: #201b13; background: var(--rust); min-height: 46px; padding: 15px 22px; border-radius: 6px; font-size: 12px; font-weight: 700; }
.story-share { border: 0; margin: 20px 0; padding: 10px 0; align-items: center; }
.story-share > span { color: var(--muted); font-size: 10px; }
.story-share button { border: 1px solid var(--line); color: var(--muted); background: transparent; min-height: 42px; border-radius: 6px; padding: 9px 12px; font-size: 11px; }
.story-share button.active { color: var(--rust); background: var(--surface); border-color: var(--rust); }
.reader-side { padding-top: 0; }
.reading-card { color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 9px; box-shadow: none; padding: 22px; }
.reading-card span, .reading-card p { color: var(--muted); font-size: 11px; }
.reading-card strong { color: var(--rust); }
.reader-footer { color: var(--muted); border-color: var(--line); font-size: 11px; }
.resume-reading { color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 7px; }
.resume-reading span { color: var(--muted); }
.resume-reading button { background: var(--rust); color: #201b13; min-height: 40px; border-radius: 5px; }
.resume-reading .text-button { background: transparent; color: var(--muted); }
.reading-journey-active body { padding-top: 0; }
.reading-progress { top: 0; height: 3px; border: 0; background: var(--line); box-shadow: none; z-index: 8000; }
.reading-progress-copy, .reading-progress-figure, .reading-progress-checkpoint, .reading-progress-goal, .reading-progress-complete { display: none; }
.reading-progress-fill { background: var(--rust); box-shadow: none; }
.related-stories { border-color: var(--line); }

/* Five calm reserves. No provider is loaded until separately configured. */
.yao-stories .reader .ad-slot { display: grid; border: 1px dashed var(--line); background: var(--surface); box-shadow: none; color: var(--muted); margin: 0; padding: 12px; min-height: 88px; border-radius: 7px; }
.reader .ad-slot-house > strong, .reader .ad-slot-house > small, .reader .ad-slot-house > a { display: none; }
.reader .ad-slot-house > span { color: var(--muted); font: 9px/1.5 Arial, sans-serif; letter-spacing: .12em; }
.reader .yao-ad-end { margin-top: 24px; }
.yao-stories .reader-side .ad-slot { height: 250px; min-height: 250px; width: 100%; margin-top: 24px; }
.reader-main .prose .ad-slot { display: none; }

.yao-reader-toolbar { position: sticky; top: 3px; z-index: 30; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; background: var(--paper); border-block: 1px solid var(--line); }
.yao-reading-label { color: var(--muted); font-size: 9px; letter-spacing: .12em; }
.yao-tool-actions { display: flex; gap: 4px; }
.yao-tool-actions button { min-height: 36px; border: 0; border-radius: 5px; color: var(--muted); background: transparent; padding: 8px 12px; font-size: 11px; cursor: pointer; }
.yao-tool-actions button b { font: 18px Georgia, serif; margin-right: 5px; }
.yao-tool-actions button:hover, .yao-tool-actions button[aria-pressed="true"] { color: var(--rust); background: var(--surface); }
.yao-settings-panel { position: absolute; top: 55px; right: 0; width: min(340px, 100%); border: 1px solid var(--line); border-radius: 10px; padding: 17px 20px; color: var(--ink); background: var(--surface); box-shadow: 0 20px 60px #0005; }
.yao-settings-panel[hidden] { display: none; }
.yao-settings-title { display: flex; align-items: center; justify-content: space-between; padding-bottom: 10px; gap: 8px; }
.yao-settings-title strong { font: 400 16px Georgia, serif; }
.yao-settings-panel button, .yao-settings-panel select { color: var(--ink); background: var(--elevated); border: 1px solid var(--line); border-radius: 5px; min-height: 40px; padding: 8px 12px; font-size: 12px; cursor: pointer; }
.yao-settings-title button { min-width: 40px; font-size: 20px; padding: 2px; }
.yao-setting-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.yao-size-controls, .yao-theme-controls { display: flex; align-items: center; gap: 5px; }
.yao-size-controls output { min-width: 34px; text-align: center; color: var(--ink); }
.yao-theme-controls button[aria-pressed="true"] { border-color: var(--rust); color: var(--rust); }
.yao-settings-panel button:disabled { opacity: .4; cursor: default; }
.yao-focus-mode .site-header, .yao-focus-mode .breadcrumb, .yao-focus-mode .article-head, .yao-focus-mode .reader-side, .yao-focus-mode .yao-ad-top, .yao-focus-mode .yao-ad-end, .yao-focus-mode .reader-footer { display: none; }
.yao-focus-mode .reader { display: block; max-width: 760px; padding-top: 0; }
.info { color: var(--ink); }
.info > .intro, .info section p, .info section li { color: var(--muted); }
.info section { border-color: var(--line); }
.info h1, .info section h2 { color: var(--ink); }
.business-contact, .contact-card, .analytics-kpi, .analytics-panel, .analytics-table { color: var(--ink); background: var(--surface); border-color: var(--line); }
.analytics-consent { background: #171e27; border-color: #444953; border-radius: 10px; color: #f1eee6; box-shadow: 0 20px 70px #0007; }
.consent-actions button, .analytics-consent button { border-radius: 5px; font-size: 11px; min-height: 44px; }
.analytics-consent [data-consent="all"], .analytics-consent [data-consent="save"] { background: var(--rust); color: #201b13; border-color: var(--rust); }
.privacy-control-panel { background: var(--surface); border-color: var(--line); color: var(--ink); }
.yao-stories .brand b, .yao-stories .hero h1, .yao-stories .paper-copy h2, .yao-stories .card-body h3, .yao-stories .discovery-heading h2, .yao-stories .theme-card h3, .yao-stories .article-head h1, .yao-stories .chapter-page-head h2, .yao-stories .chapter-end h2, .yao-stories .prose > p { font-family: "Yao Literata", "Noto Serif SC", Georgia, serif; }
html[data-reader-font="sans"] .yao-stories .prose > p { font-family: Arial, "PingFang SC", "Microsoft YaHei", sans-serif; }
body.yao-stories .ad-slot { color: var(--muted); border-color: var(--line); background: var(--surface); border-radius: 7px; min-height: 78px; }
body.yao-stories .ad-slot-house { color: var(--muted); background: transparent; border: 0; box-shadow: none; padding: 10px; }
body.yao-stories .ad-slot-house > strong, body.yao-stories .ad-slot-house > small, body.yao-stories .ad-slot-house > a { display: none; }
body.yao-stories .ad-slot-house > span { color: var(--muted); font: 9px/1.5 Arial, sans-serif; letter-spacing: .12em; }
body.yao-stories .cover:not(:has(img)) { background: radial-gradient(ellipse at 80% 15%, #d9b47526, transparent 65%), #1c222c; }
.yao-stories .folder-list { max-height: 75vh; overflow: auto; scrollbar-width: thin; }
.paper-image span { background: linear-gradient(180deg, #0c101508 0%, #151a2144 50%, #151a21 100%); }
.feature-paper.has-art .paper-copy small { color: var(--rust); background: #0c1015bd; }
.feature-paper .paper-copy p { color: var(--muted); }
.feature-paper .paper-copy h2 { color: var(--ink); }
.search > span { position: relative; width: 16px; height: 16px; flex: 0 0 16px; margin-inline: 8px 10px; border: 1.5px solid var(--muted); border-radius: 50%; font-size: 0; }
.search > span::after { content: ""; position: absolute; width: 7px; height: 1.5px; bottom: -3px; right: -5px; transform: rotate(45deg); background: var(--muted); }
.yao-library-filters { min-width: 0; }
.yao-library-filters > summary { color: var(--muted); cursor: pointer; font-size: 12px; padding: 15px 0; border-block: 1px solid var(--line); margin-bottom: 18px; }
.yao-library-filters .folder-list { max-height: 390px; }
.yao-library-filters .tag-cloud { max-height: 180px; overflow: auto; padding: 2px 0; scrollbar-width: thin; }
.yao-library-filters .tag-cloud a { color: var(--muted); border-color: var(--line); background: var(--surface); border-radius: 5px; }
.series-panel span, .author-mini { background: var(--surface); border-color: var(--line); color: var(--ink); }
.series-panel small, .author-mini span { color: var(--muted); }
.library-hero { padding-top: 42px; padding-bottom: 30px; }
.library-hero h1 { font-family: "Yao Literata", Georgia, serif; font-size: 48px; }
.library-hero p { color: var(--muted); }
.random-story { min-height: 90px; border-color: var(--line); background: var(--surface); border-radius: 7px; }
.random-story span { font-size: 20px; }
.index-head label select { color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 5px; min-height: 38px; padding: 7px; }

@media (max-width: 1100px) {
  .reader { grid-template-columns: minmax(0, 1fr) 260px; gap: 32px; }
  .hero { gap: 35px; }
  .site-header nav { gap: 20px; }
  .outline-button { display: none; }
}
@media (max-width: 800px) {
  .shell { width: calc(100% - 40px); }
  .reader { grid-template-columns: 1fr; max-width: 720px; gap: 0; }
  .reader-side { display: none; }
  .hero { grid-template-columns: 1fr 1fr; min-height: 0; padding: 42px 0 50px; gap: 24px; }
  .hero h1 { font-size: 46px; }
  .hero-copy > p { font-size: 13px; }
  .feature-paper { min-height: 360px; }
  .story-grid { gap: 18px; }
  .global-language-panel { max-width: calc(100vw - 32px); }
}
@media (max-width: 600px) {
  .shell { width: calc(100% - 36px); }
  .site-header { height: 70px; gap: 8px; }
  body.yao-stories:is([data-page="story"], [data-page="info"], [data-page="author"], [data-page="analytics"]) .site-header { height: 70px; min-height: 70px; padding: 0; }
  body.yao-stories .header-actions .back { display: none; }
  .site-header .brand b { font-size: 21px; }
  .brand small { font-size: 7px; letter-spacing: .13em; }
  .brand-mark { width: 24px; height: 29px; }
  .brand { gap: 8px; }
  .header-actions { gap: 4px; }
  .header-actions .back { display: none; }
  .lang-switch { padding: 2px; }
  .lang-switch button { padding: 7px; font-size: 9px; min-height: 34px; }
  .global-language-trigger b { display: inline; }
  .global-language-trigger { min-width: 30px; }
  .top-note { padding: 7px 12px; font-size: 9px; }
  .hero { display: grid; grid-template-columns: 1fr; padding: 38px 0 44px; gap: 30px; }
  .hero h1 { font-size: 48px; margin: 20px 0; }
  .hero-copy > p { font-size: 14px; max-width: 320px; }
  .search { flex-wrap: nowrap; padding: 6px; }
  .search input { width: 100%; min-width: 0; height: 42px; }
  .search button { width: auto; padding: 10px 13px; flex-shrink: 0; font-size: 10px; }
  .stats { gap: 16px; margin-top: 24px; }
  .stats div { min-width: 0; padding-right: 16px; }
  .stats strong { font-size: 24px; }
  .stats span { font-size: 8px; }
  .feature-carousel { width: 100%; }
  .feature-paper { min-height: 330px; }
  .trust .shell { grid-template-columns: 1fr 1fr; gap: 12px; font-size: 9px; padding: 18px 0; }
  .home-discovery { padding-top: 38px; padding-bottom: 38px; }
  .discovery-heading { gap: 15px; }
  .discovery-heading h2 { font-size: 29px; }
  .discovery-heading p { font-size: 12px; }
  .discovery-heading > a { font-size: 10px; max-width: 80px; text-align: right; }
  .story-grid { grid-template-columns: 1fr; gap: 22px; }
  .cover { height: 210px; }
  .card-body h3 { min-height: 0; font-size: 24px; }
  .card-body > p { min-height: 0; font-size: 13px; }
  .library { padding-top: 24px; gap: 25px; }
  .library-hero { display: block; padding-top: 30px; padding-bottom: 20px; }
  .library-hero h1 { font-size: 36px; margin-block: 12px; }
  .library-hero p { font-size: 13px; }
  .random-story { min-height: 44px; margin-top: 15px; display: inline-flex; flex-direction: row; gap: 12px; padding: 12px 16px; }
  .random-story span { display: none; }
  .public-library-layout { padding-top: 20px; gap: 15px; }
  .yao-library-filters > summary { margin-bottom: 0; }
  .yao-library-filters[open] > summary { margin-bottom: 18px; }
  .yao-library-filters .folders { padding-bottom: 18px; }
  .yao-stories .folder-list { max-height: none; }
  .reader { padding-top: 16px; }
  .yao-stories .reader .yao-ad-top { min-height: 64px; padding: 8px; }
  .breadcrumb { margin-top: 16px; font-size: 9px; }
  .article-head { padding: 20px 0 12px; }
  .yao-story-heading { gap: 14px; }
  .yao-cover { width: 58px; height: 80px; }
  .article-head h1 { font-size: 30px; margin: 8px 0; }
  .article-label { font-size: 8px; letter-spacing: .06em; }
  .article-stats { margin-top: 5px; gap: 6px 10px; font-size: 9px; }
  .yao-story-details { margin-top: 10px; }
  .yao-story-details summary { min-height: 28px; }
  .yao-reader-toolbar { padding: 5px 0; }
  .yao-tool-actions button { min-height: 40px; padding-inline: 10px; }
  .chapter-navigation-top { margin-bottom: 18px; }
  .chapter-navigation-head { gap: 12px; padding: 12px; }
  .chapter-position strong { font-size: 21px; }
  .chapter-select-label { width: 75%; }
  .chapter-select { font-size: 12px; height: 40px; }
  .chapter-page-head { margin: 18px 0 16px; }
  .chapter-page-head h2 { font-size: 22px; margin-top: 7px; }
  .chapter-page-head > span { font-size: 8px; }
  .prose > p { line-height: var(--reader-leading); }
  .chapter-end h2 { font-size: 24px; }
  .story-share { flex-direction: column; align-items: flex-start; gap: 10px; }
  .story-share > div { width: 100%; gap: 6px; display: flex; }
  .story-share button { flex: 1; padding-inline: 7px; font-size: 10px; }
  .reader-footer { min-height: 130px; font-size: 10px; }
  .reader-footer nav { gap: 20px; }
  .analytics-consent { left: 10px; right: 10px; bottom: 10px; padding: 15px; gap: 12px; grid-template-columns: 1fr; }
  .analytics-consent strong { font-size: 17px; }
  .analytics-consent p { font-size: 10px; margin: 6px 0; }
  .consent-form { gap: 6px; }
  .consent-form label { padding: 8px 6px; min-height: 56px; gap: 5px; }
  .consent-form label small { font-size: 8px; }
  .consent-actions { gap: 6px; }
  .consent-actions button { padding: 8px 5px; font-size: 10px; }
}

/* Owner's reading review: visible controls, one compact navigation, spaced ads. */
.yao-header-theme { display: inline-flex; align-items: center; gap: 2px; padding: 3px; background: var(--surface); border: 1px solid var(--line); border-radius: 7px; }
.yao-header-theme button { border: 0; color: var(--muted); background: transparent; padding: 7px 9px; min-height: 34px; border-radius: 5px; font: 11px Arial, sans-serif; cursor: pointer; }
.yao-header-theme button[aria-pressed="true"] { color: var(--rust); background: var(--elevated); }
.lang-switch .global-language-trigger { min-width: 88px; padding-inline: 9px; }
.lang-switch .global-language-trigger b { display: inline; font: 600 10px/1 Arial, sans-serif; color: var(--muted); letter-spacing: 0; }
.article-label { flex-wrap: wrap; }
#story-info-trigger { padding: 3px 6px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); background: var(--surface); font-size: 10px; cursor: pointer; }
.article-head > .yao-summary { display: flex; align-items: baseline; gap: 12px; max-width: none; margin: 18px 0 6px; font: 14px/1.75 Arial, "PingFang SC", sans-serif; color: var(--muted); }
.yao-summary b { flex-shrink: 0; font-size: 11px; color: var(--rust); }
.yao-info-dialog { width: min(460px, calc(100vw - 40px)); max-height: calc(100dvh - 60px); overflow: auto; padding: 22px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); box-shadow: 0 20px 70px #0007; }
.yao-info-dialog::backdrop { background: #0009; }
.yao-info-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.yao-info-head h2 { font-size: 19px; margin: 0; }
.yao-info-head button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 5px; background: var(--elevated); color: var(--ink); font-size: 23px; cursor: pointer; }
.yao-info-dialog p { font: 13px/1.8 Arial, sans-serif; color: var(--muted); }
.yao-info-dialog small { color: var(--muted); }
.reader-side { display: flex; flex-direction: column; align-self: stretch; }
.reader-side .reading-card { flex: 0 0 auto; }
.yao-ad-rail { display: flex; flex-direction: column; justify-content: space-between; gap: 32px; flex: 1; padding-top: 24px; min-height: 850px; }
.yao-stories .reader-side .yao-ad-rail .ad-slot { flex: 0 0 250px; height: 250px; min-height: 250px; margin: 0; }
.story-contents-picker { display: grid; gap: 18px; padding-top: 24px; }
.story-contents-picker label { display: grid; gap: 8px; width: 100%; font: 12px/1.5 Arial, sans-serif; color: var(--muted); }
.story-contents-picker select { width: 100%; }
.reading-page-select-label { width: 125px; }
.reading-page-select { width: 100%; height: 40px; padding: 6px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: var(--ink); font-size: 11px; }
.yao-stories .chapter-end { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-top: 24px; padding: 15px 18px; text-align: left; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.yao-stories .chapter-end p { margin: 5px 0 0; color: var(--muted); font: 13px/1.5 Arial, sans-serif; }
.yao-stories .chapter-end a { flex-shrink: 0; margin: 0; padding: 10px 14px; font-size: 11px; border-radius: 5px; background: var(--rust); color: #201b13; }
.yao-stories .chapter-end.story-page-footer { flex-direction: column; align-items: stretch; gap: 8px; padding: 12px 16px; }
.story-footer-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.story-footer-actions > div { min-width: 0; }
.story-page-numbers { display: flex; align-items: center; gap: 6px; max-width: 100%; overflow-x: auto; padding: 2px 0; scrollbar-width: thin; }
.yao-stories .story-page-numbers .story-page-number { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 32px; width: 32px; height: 32px; min-height: 32px; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 5px; background: transparent; color: var(--muted); font: 600 12px/1 Arial, sans-serif; }
.yao-stories .story-page-numbers a:hover { border-color: var(--rust); color: var(--rust); }
.yao-stories .story-page-numbers [aria-current="page"] { background: var(--rust); border-color: var(--rust); color: #201b13; }
@media (max-width: 800px) { .reader-side { display: none; } }
@media (max-width: 700px) {
  body.yao-stories .site-header { height: auto !important; min-height: 106px !important; flex-wrap: wrap; gap: 10px; padding-block: 12px !important; }
  .site-header .header-actions { width: 100%; gap: 8px; justify-content: space-between; }
  .yao-header-theme button { padding-inline: 7px; font-size: 10px; }
  .lang-switch button { padding-inline: 6px; font-size: 9px; }
  .lang-switch .global-language-trigger { min-width: 77px; padding-inline: 6px; }
  .lang-switch .global-language-trigger b { display: inline; font-size: 9px; }
  .global-language-panel { top: 124px; max-height: calc(100dvh - 140px); }
  .chapter-position strong { font-size: 19px; }
  .article-head { padding: 18px 0 8px; }
  .article-head > .yao-summary { margin: 12px 0 0; font-size: 13px; line-height: 1.7; }
  .chapter-page-head { margin: 12px auto; }
  .chapter-page-head h2 { font-size: 21px; margin-block: 6px; }
  .chapter-page-head p { margin: 6px 0 12px; }
  .yao-stories .chapter-end { padding: 13px 12px; gap: 10px; }
  .yao-stories .chapter-end p { font-size: 12px; }
  .yao-stories .chapter-end a { padding: 10px; font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
