/* Central Archive: shared structure, seven distinct material palettes. */
body.theme-midcentury {
  --bg:#eae5da; --text-primary:#2c3835; --text-secondary:#58665f;
  --accent:#a34d32; --border-light:#c7c5b7; --card-bg:#f6f2e9;
  --header-bg:#eee9dfee; --archive-metal:#9b8962; --archive-tint:#d7ded5;
  --archive-shadow:0 12px 32px #484d3b12;
}
body.theme-spacetech {
  --bg:#090f1a; --text-primary:#dde5f0; --text-secondary:#a0b1c7;
  --accent:#80b8df; --border-light:#2e4057; --card-bg:#111f30;
  --header-bg:#0c1523ee; --archive-metal:#b7ab83; --archive-tint:#23394d;
  --archive-shadow:0 16px 38px #02070f65;
}
body.theme-wasteland {
  --bg:#dbd2c0; --text-primary:#362e24; --text-secondary:#665a48;
  --accent:#8f412c; --border-light:#b6a68b; --card-bg:#eee5d1;
  --header-bg:#ded4c1ee; --archive-metal:#8a7450; --archive-tint:#c9bca3;
  --archive-shadow:3px 7px 0 #87745620;
}
body.theme-poolcore {
  --bg:#dfece7; --text-primary:#244c4c; --text-secondary:#446c69;
  --accent:#246f70; --border-light:#adccc6; --card-bg:#f1f7ef;
  --header-bg:#e5f0e9ee; --archive-metal:#689d96; --archive-tint:#c2ded6;
  --archive-shadow:0 12px 35px #477f7915;
}
body.theme-forest {
  --bg:#e4e8db; --text-primary:#2c4134; --text-secondary:#516653;
  --accent:#466346; --border-light:#b8c1a7; --card-bg:#f1f2e6;
  --header-bg:#e6e9dfee; --archive-metal:#8c8860; --archive-tint:#d1dcc6;
  --archive-shadow:0 14px 35px #36503412;
}
body.theme-dos {
  --bg:#07130e; --text-primary:#add0a6; --text-secondary:#88b88b;
  --accent:#d1e890; --border-light:#365441; --card-bg:#0b1b13;
  --header-bg:#09160ff5; --archive-metal:#6c9568; --archive-tint:#153120;
  --archive-shadow:none;
}
body.theme-ink {
  --bg:#fff; --text-primary:#171717; --text-secondary:#444;
  --accent:#171717; --border-light:#777; --card-bg:#fff;
  --header-bg:#fff; --archive-metal:#444; --archive-tint:#eee;
  --archive-shadow:none;
}
body[class*="theme-"] .app {height:100dvh; isolation:isolate; background:var(--bg);}
body[class*="theme-"] #content {background:transparent; min-height:0;}
body[class*="theme-"] #header {height:58px; padding-inline:max(18px,calc((100vw - 1160px)/2)); background:var(--header-bg); border-bottom:1px solid var(--border-light); box-shadow:none;}
body[class*="theme-"] #content {margin-top:58px;}
body[class*="theme-"] .header-title {font-family:inherit; color:var(--text-primary); font-size:14px; letter-spacing:.15em;}
body[class*="theme-"] .menu-toggle, .header-home {border:0; background:transparent; color:var(--text-primary); width:36px; height:40px; opacity:1; cursor:pointer; font-size:21px;}
body[class*="theme-"] .menu-toggle::before, body[class*="theme-"] #header::after {display:none;}
body[class*="theme-"] .page-view {max-width:1160px; padding:32px 32px 96px; scrollbar-width:thin; scrollbar-color:var(--border-light) transparent;}
body[class*="theme-"] .archive-header {position:relative; text-align:left; min-height:285px; padding:34px 34px 26px; margin:0 0 32px; border:1px solid var(--border-light); border-top:3px solid var(--archive-metal); background:linear-gradient(110deg,var(--card-bg) 8%,transparent 95%); overflow:hidden;}
.archive-kicker {display:block; font:10px/1.6 'Rajdhani',monospace; letter-spacing:.23em; color:var(--text-secondary);}
body[class*="theme-"] .archive-title {position:relative; z-index:1; margin:22px 0 12px; font-family:'Songti SC','Noto Serif SC','SimSun',serif; font-size:clamp(30px,4.5vw,52px); letter-spacing:.14em; font-weight:500; color:var(--text-primary); text-shadow:none;}
body[class*="theme-"] .archive-title::before, body[class*="theme-"] .archive-title::after {display:none;}
body[class*="theme-"] .archive-subtitle {position:relative; z-index:1; max-width:70%; opacity:1; color:var(--text-secondary); font-size:13px; letter-spacing:.09em; line-height:1.9;}
.archive-meta {position:relative; z-index:1; display:flex; flex-wrap:wrap; gap:14px 28px; margin-top:32px; font-size:11px; color:var(--text-secondary);}
.archive-meta span+span {border-left:1px solid var(--border-light); padding-left:24px;}
.archive-architecture {position:absolute; right:4%; top:20px; bottom:-60px; width:27%; border:1px solid var(--archive-metal); border-radius:140px 140px 0 0; opacity:.35; transform:skewY(-5deg);}
.archive-architecture::before,.archive-architecture::after {content:''; position:absolute; inset:18px 18px 0; border:1px solid var(--archive-metal); border-radius:inherit;}
.archive-architecture::after {inset:36px 36px 0;}
.archive-architecture i {position:absolute; bottom:0; width:1px; height:45%; background:var(--archive-metal);}
.archive-architecture i:nth-child(1){left:20%}.archive-architecture i:nth-child(2){left:35%;height:58%}.archive-architecture i:nth-child(3){left:50%;height:70%}.archive-architecture i:nth-child(4){left:65%;height:58%}.archive-architecture i:nth-child(5){left:80%}
.archive-tools {display:flex; justify-content:space-between; align-items:center; gap:20px; margin-bottom:24px;}
.archive-tools h2 {font-size:19px; color:var(--text-primary); font-weight:500; letter-spacing:.14em;}
.archive-search {display:flex; align-items:center; gap:10px; width:min(380px,50%); padding:11px 14px; border-bottom:1px solid var(--archive-metal); background:var(--card-bg); color:var(--text-secondary);}
.archive-search input {min-width:0; width:100%; font:inherit; font-size:12px; background:none; color:var(--text-primary); border:0; outline:none;}
.archive-search input::placeholder {color:var(--text-secondary);}
.archive-search:focus-within {outline:2px solid var(--accent); outline-offset:3px;}
.archive-search kbd {font:11px monospace; opacity:.6;}
body[class*="theme-"] .archive-grid {display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:20px; margin-bottom:28px;}
body[class*="theme-"] .archive-card {display:flex; flex-direction:column; grid-column:span 2; min-width:0; text-align:left; min-height:265px; padding:26px; border:1px solid var(--border-light); border-radius:3px; background:var(--card-bg); color:var(--text-primary); font:inherit; box-shadow:var(--archive-shadow); transform:none; backdrop-filter:none; transition:transform .2s,border-color .2s; overflow:hidden;}
body[class*="theme-"] .archive-card.primary-book {grid-column:span 3; min-height:270px;}
body[class*="theme-"] .archive-card:nth-child(2) {grid-column:span 3;}
body[class*="theme-"] .archive-card:hover {transform:translateY(-3px); border-color:var(--accent); box-shadow:var(--archive-shadow);}
body[class*="theme-"] .archive-card::before, body[class*="theme-"] .archive-card::after {display:none;}
body[class*="theme-"] .archive-card .card-number {display:block; font:10px/1.7 monospace; letter-spacing:.12em; color:var(--text-secondary); opacity:1; margin:0 0 56px; z-index:1;}
body[class*="theme-"] .archive-card .card-name {display:block; font-family:'Songti SC','Noto Serif SC','SimSun',serif; font-size:27px; font-weight:500; letter-spacing:.08em; color:var(--text-primary); margin:5px 0 10px; z-index:1;}
body[class*="theme-"] .archive-card .card-tag {display:block; color:var(--accent); font-size:10px; letter-spacing:.18em; border:0; border-radius:0; background:none; padding:0; margin:0; z-index:1;}
body[class*="theme-"] .archive-card .card-subtitle {display:block; font-size:12px; letter-spacing:.02em; line-height:1.9; color:var(--text-secondary); opacity:1; margin:0 0 28px; max-width:34em; z-index:1;}
.card-foot {display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px; border-top:1px solid var(--border-light); padding-top:14px; margin-top:auto; z-index:1;}
body[class*="theme-"] .archive-card .card-count {font:10px/1.6 monospace; color:var(--text-secondary); opacity:1;}
.card-enter {font-size:10px; letter-spacing:.1em; color:var(--accent);}
.collection-graphic {position:absolute; width:112px; height:88px; top:20px; right:24px; opacity:.3; color:var(--archive-metal); pointer-events:none;}
.collection-graphic i {position:absolute; display:block; border:1px solid currentColor;}
[data-kind="atlas"] .collection-graphic i:nth-child(1) {width:74px;height:74px;left:17px;top:3px;border-radius:50%;}
[data-kind="atlas"] .collection-graphic i:nth-child(2) {width:90px;height:25px;left:9px;top:28px;border-radius:50%;transform:rotate(-25deg);}
[data-kind="atlas"] .collection-graphic i:nth-child(3) {width:1px;height:88px;left:54px;top:0;border-width:0 0 0 1px;}
[data-kind="atlas"] .collection-graphic i:nth-child(4) {width:100px;height:1px;left:4px;top:40px;border-width:1px 0 0;}
[data-kind="chronicle"] .collection-graphic {border-bottom:1px solid currentColor;}
[data-kind="chronicle"] .collection-graphic i {width:14px;bottom:10px;}
[data-kind="chronicle"] .collection-graphic i:nth-child(1){left:8px;height:28px}
[data-kind="chronicle"] .collection-graphic i:nth-child(2){left:33px;height:43px}
[data-kind="chronicle"] .collection-graphic i:nth-child(3){left:58px;height:64px}
[data-kind="chronicle"] .collection-graphic i:nth-child(4){left:83px;height:48px}
[data-kind="labyrinth"] .collection-graphic i {border-radius:50%;width:82px;height:82px;left:15px;top:0;border-right-color:transparent;transform:rotate(-30deg);}
[data-kind="labyrinth"] .collection-graphic i:nth-child(2){inset:10px auto auto 25px;width:62px;height:62px;transform:rotate(60deg)}
[data-kind="labyrinth"] .collection-graphic i:nth-child(3){inset:20px auto auto 35px;width:42px;height:42px;transform:rotate(140deg)}
[data-kind="labyrinth"] .collection-graphic i:nth-child(4){inset:30px auto auto 45px;width:22px;height:22px}
[data-kind="journal"] .collection-graphic i {width:56px;height:70px;left:22px;top:4px;transform:rotate(-8deg);}
[data-kind="journal"] .collection-graphic i:nth-child(2){left:30px;top:10px;transform:rotate(6deg);background:var(--card-bg)}
[data-kind="journal"] .collection-graphic i:nth-child(3){left:39px;top:28px;width:38px;height:1px;transform:rotate(6deg)}
[data-kind="journal"] .collection-graphic i:nth-child(4){left:37px;top:41px;width:29px;height:1px;transform:rotate(6deg)}
[data-kind="experiment"] .collection-graphic {background:repeating-linear-gradient(0deg,transparent 0 15px,currentColor 16px 17px,transparent 18px 20px);height:62px;top:30px;opacity:.2;}
[data-kind="experiment"] .collection-graphic i {width:52px;height:52px;left:29px;top:4px;transform:rotate(45deg);background:var(--card-bg);}
[data-kind="experiment"] .collection-graphic i:nth-child(n+2) {display:none;}
[data-kind="general"] .collection-graphic i:first-child {inset:14px 28px;border-radius:2px;}
.reading-resume {display:flex; align-items:center; gap:24px; justify-content:space-between; border-left:3px solid var(--accent); padding:16px 20px; background:var(--archive-tint); margin-bottom:24px;}
.reading-resume strong {display:block; font-size:14px; font-weight:500; margin:4px 0;}
.reading-resume div>span:last-child {display:block; font-size:11px; color:var(--text-secondary);}
.reading-resume button {flex-shrink:0; padding:9px 13px; border:1px solid var(--archive-metal); background:var(--card-bg); color:var(--text-primary); font:inherit; font-size:11px; cursor:pointer;}
.search-results {margin-bottom:24px;}
.search-count,.search-empty {font-size:12px; color:var(--text-secondary); padding:12px 0;}
.search-result {display:flex; flex-direction:column; width:100%; text-align:left; padding:16px 20px; background:var(--card-bg); border:0; border-bottom:1px solid var(--border-light); color:var(--text-primary); cursor:pointer;}
.search-result strong {font-size:14px; font-weight:500;}
.search-result span {font-size:11px; color:var(--text-secondary); margin-top:5px;}
body[class*="theme-"] .archive-footer {opacity:1; font:11px/1.7 monospace; color:var(--text-secondary); text-align:left;}
body[class*="theme-"] :is(.book-header,.volume-header) {text-align:left; margin-bottom:26px; padding:15px 0 24px; border-bottom:1px solid var(--border-light);}
body[class*="theme-"] :is(.book-title,.volume-title) {font-family:'Songti SC','SimSun',serif; font-size:30px; color:var(--text-primary); letter-spacing:.06em; text-shadow:none; padding:16px 0 4px; line-height:1.6;}
body[class*="theme-"] :is(.book-title,.volume-title,.book-epigraph)::before, body[class*="theme-"] :is(.book-title,.volume-title,.book-epigraph)::after {display:none;}
body[class*="theme-"] .book-title-sub {display:block; font:12px/2 sans-serif; letter-spacing:.12em; color:var(--text-secondary);}
body[class*="theme-"] :is(.book-count,.volume-count,.book-footer,.volume-description) {color:var(--text-secondary); opacity:1; font-size:12px;}
body[class*="theme-"] .book-epigraph {color:var(--text-secondary); font:14px/2 'Songti SC',serif; letter-spacing:.16em; padding:12px 0; text-align:left; opacity:1;}
body[class*="theme-"] .back-btn {background:transparent; color:var(--accent); border:0; font-size:12px; padding:8px 0; cursor:pointer;}
body[class*="theme-"] .volume-directory {padding:0; margin:20px 0 0; border-top:1px solid var(--border-light);}
body[class*="theme-"] .volume-directory-item {position:relative; display:grid; grid-template-columns:70px 1fr auto 25px; width:100%; align-items:center; gap:8px 18px; padding:21px 14px; border:0; border-bottom:1px solid var(--border-light); background:transparent; text-align:left; color:var(--text-primary); font:inherit; cursor:pointer; transition:background .2s;}
body[class*="theme-"] .volume-directory-item::before,body[class*="theme-"] .volume-directory-item::after {display:none;}
body[class*="theme-"] .volume-directory-item .vol-name {font-size:17px; color:var(--text-primary); letter-spacing:.04em;}
body[class*="theme-"] .volume-directory-item:hover .vol-name {color:var(--accent); letter-spacing:.04em;}
body[class*="theme-"] :is(.vol-number,.vol-chapters) {font:11px/1.6 monospace; color:var(--text-secondary); opacity:1;}
body[class*="theme-"] .vol-arrow {grid-column:4; color:var(--accent); opacity:1;}
body[class*="theme-"] .vol-chapters {grid-column:3; grid-row:1;}
body[class*="theme-"] .vol-dash {display:none;}
body[class*="theme-"] .vol-desc {grid-column:2/-1; color:var(--text-secondary); font-size:12px; opacity:1;}
body[class*="theme-"] .volume-directory-item:nth-child(n) :is(.vol-number,.vol-name,.vol-arrow,.vol-desc,.vol-chapters) {order:0; margin:0; padding-left:0; min-width:0; max-width:100%; white-space:normal; text-align:left; transform:none;}
body[class*="theme-"] .volume-directory-item .vol-name {grid-column:2; grid-row:1;}
body[class*="theme-"] .volume-directory-item .vol-number {grid-column:1; grid-row:1;}
body[class*="theme-"] .volume-directory-item .vol-arrow {grid-column:4; grid-row:1;}
body[class*="theme-"] .volume-directory-item .vol-desc {grid-row:2;}
/* Book semantics are data; theme-layouts.css owns their visual arrangement. */
body[class*="theme-"] .volume-chapter-item {width:100%; display:flex; align-items:center; gap:18px; padding:19px 14px; border:0; border-bottom:1px solid var(--border-light); background:transparent; text-align:left; color:var(--text-primary); font:inherit; cursor:pointer;}
body[class*="theme-"] .volume-chapter-item::before,body[class*="theme-"] .volume-chapter-item::after {display:none;}
body[class*="theme-"] .volume-chapter-item .ch-number {font:11px monospace; width:28px; flex-shrink:0; color:var(--accent); opacity:1;}
body[class*="theme-"] .volume-chapter-item .ch-name {font-size:14px; color:var(--text-primary); opacity:1; min-width:0;}
.ch-arrow {margin-left:auto; color:var(--accent);}
body[class*="theme-"] :is(.volume-directory-item,.volume-chapter-item,.search-result):hover {background:var(--archive-tint);}
body[class*="theme-"] .reader-view {padding:0; max-width:100%; overflow:hidden;}
body[class*="theme-"] .reader-view .main-content {max-width:940px; padding:0 30px; min-height:0;}
body[class*="theme-"] .reader-header {position:relative; padding:16px 0 10px; flex-shrink:0; text-align:left;}
body[class*="theme-"] #chapterTitle {display:block; padding:10px 0; font-size:17px; line-height:1.6; font-weight:500; color:var(--text-primary); opacity:1; letter-spacing:.06em;}
body[class*="theme-"] #chapterTitle::before,body[class*="theme-"] #chapterTitle::after {display:none;}
.reader-breadcrumb {display:flex; flex-wrap:wrap; align-items:center; gap:6px; font-size:10px; color:var(--text-secondary);}
.reader-breadcrumb button {background:none; border:0; color:inherit; font:inherit; cursor:pointer; max-width:100%; text-align:left;}
.reader-breadcrumb button+button::before {content:'/'; margin-right:6px; opacity:.5;}
.reader-tools {display:flex; justify-content:flex-end; gap:8px; align-items:center; padding-bottom:8px;}
.reader-tools>span {font:10px monospace; margin-right:auto; color:var(--text-secondary);}
.reader-tools button {border:1px solid var(--border-light); color:var(--text-primary); background:var(--card-bg); padding:5px 10px; font:11px/1.5 sans-serif; cursor:pointer;}
.reading-track {height:2px; background:var(--border-light);}
.reading-track span {display:block; width:0; height:100%; background:var(--accent);}
body[class*="theme-"] .page-container-single {display:block; min-height:0; padding:0; scrollbar-width:thin;}
body[class*="theme-"] .page-single {max-width:100%; padding:34px clamp(20px,5vw,60px) 60px; margin:0; border:1px solid var(--border-light); border-radius:2px; background:var(--card-bg); box-shadow:none; backdrop-filter:none; font-size:var(--reader-font,18px); color:var(--text-primary); line-height:2; overflow-wrap:anywhere;}
body[class*="theme-"] .page-single::before,body[class*="theme-"] .page-single::after {display:none;}
body[class*="theme-"] .page-single p {font-size:inherit; line-height:2; color:var(--text-primary);}
body[class*="theme-"] .page-single p:first-of-type::first-letter {font:inherit; float:none; padding:0; margin:0; color:inherit;}
body[class*="theme-"] .page-single :is(h1,h2,h3,h4) {font-family:'Songti SC','SimSun',serif; color:var(--text-primary); opacity:1; text-shadow:none; scroll-margin-top:20px;}
body[class*="theme-"] .page-single h1 {font-size:1.6em; letter-spacing:.08em;}
body[class*="theme-"] .page-single h2 {font-size:1.3em; border-left:2px solid var(--archive-metal); padding-left:15px;}
body[class*="theme-"] .page-single :is(h1,h2,h3,h4)::before,body[class*="theme-"] .page-single :is(h1,h2,h3,h4)::after {display:none;}
body[class*="theme-"] .page-single blockquote {background:var(--archive-tint); color:var(--text-secondary); border-left:2px solid var(--accent); border-radius:0;}
body[class*="theme-"] .page-single img {max-width:100%; height:auto;}
body[class*="theme-"] .page-single pre {overflow-x:auto; max-width:100%; white-space:pre; font-size:.8em;}
body[class*="theme-"] .page-single table {display:block; overflow-x:auto; max-width:100%; font-size:.85em;}
body[class*="theme-"] .chapter-nav {display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:7px 14px; padding:12px 0 max(12px,env(safe-area-inset-bottom)); background:var(--bg); border:0; box-shadow:none; min-height:60px;}
body[class*="theme-"] .chapter-nav .page-btn {background:var(--card-bg); border:1px solid var(--border-light); border-radius:2px; padding:9px 14px; color:var(--text-primary); font-size:11px; box-shadow:none;}
body[class*="theme-"] .chapter-nav .page-btn:disabled {opacity:.35; cursor:default;}
body[class*="theme-"] .chapter-nav .page-indicator {font-size:10px; letter-spacing:0; color:var(--text-secondary); opacity:1;}
body[class*="theme-"] .fab-container {right:max(16px,env(safe-area-inset-right)); bottom:max(22px,env(safe-area-inset-bottom));}
body[class*="theme-"] .fab-row {display:flex; flex-direction:column; gap:9px;}
body[class*="theme-"] .fab {width:40px; height:40px; border:1px solid var(--border-light); border-radius:50%; color:var(--text-primary); background:var(--card-bg); box-shadow:var(--archive-shadow); font-size:16px;}
body[class*="theme-"] .fab::before,body[class*="theme-"] .fab::after {display:none;}
body[class*="theme-"] .sidebar {background:var(--card-bg); color:var(--text-primary); border-color:var(--border-light); max-width:calc(100vw - 34px);}
body[class*="theme-"] .sidebar::before,body[class*="theme-"] .sidebar::after {display:none;}
body[class*="theme-"] :is(.sidebar-header h3,.sidebar-close,.sidebar-section-title,.toc .toc-section,.toc a,.recent-link) {color:var(--text-primary); opacity:1;}
body[class*="theme-"] .theme-option {display:block; width:100%; border:1px solid var(--border-light); border-radius:2px; background:transparent; color:var(--text-primary); text-align:left; padding:14px 16px; margin:0 0 10px; font:14px/1.7 sans-serif; cursor:pointer;}
body[class*="theme-"] .theme-option::before {display:none;}
.theme-option small {display:block; margin-top:3px; font-size:10px; color:var(--text-secondary); letter-spacing:.08em;}
body[class*="theme-"] .theme-option.selected {border-color:var(--accent); background:var(--archive-tint);}
body[class*="theme-"] .cover {background:var(--bg); background-image:radial-gradient(ellipse at 50% 100%,var(--archive-tint),transparent 65%);}
body[class*="theme-"] .cover-title {font-family:'Songti SC','SimSun',serif; font-size:clamp(40px,9vw,76px); color:var(--text-primary);}
body[class*="theme-"] .cover-author {opacity:.8;}
body[class*="theme-"] .cover-epigraph {opacity:.8; font-size:13px; letter-spacing:.12em; line-height:2.2;}
body[class*="theme-"] .cover-hint {border:1px solid var(--archive-metal); padding:12px 24px; color:var(--text-primary); background:transparent; opacity:1; animation:none; font:12px/1.6 sans-serif; cursor:pointer;}
button:focus-visible,a:focus-visible,.page-container-single:focus-visible {outline:2px solid var(--accent); outline-offset:3px;}
[hidden] {display:none!important;}
/* Material and spatial identity for each reading environment. */
body.theme-midcentury .archive-header {background:linear-gradient(110deg,#f7f2e6 40%,#d5ddd2); border-radius:3px 3px 70px 3px;}
body.theme-midcentury .archive-card {border-top:3px solid var(--archive-metal);}
body.theme-midcentury .archive-card[data-kind="chronicle"] {border-top-color:#a34d32;}
body.theme-spacetech .archive-header {background:radial-gradient(ellipse at 90% 30%,#27446080,transparent 55%),linear-gradient(120deg,#0c1421,#14273d); border-radius:2px;}
body.theme-spacetech .archive-architecture {border-radius:50%; width:235px; height:235px; top:25px; bottom:auto; transform:rotate(-30deg); border-color:#8fb4d6;}
body.theme-spacetech .archive-architecture i {height:1px; width:90%; left:5%; bottom:50%; transform:rotate(20deg);}
body.theme-spacetech .archive-architecture i:nth-child(n+2) {display:none;}
body.theme-spacetech .archive-card {background:linear-gradient(125deg,#172a40,#0f1a29 65%); border-top-color:var(--archive-metal);}
body.theme-spacetech .archive-card .collection-graphic {opacity:.45;}
body.theme-spacetech .archive-kicker::before {content:'● '; color:#80b8df;}
body.theme-wasteland .archive-header {background:repeating-linear-gradient(0deg,transparent 0 3px,#675d3a05 3px 4px),linear-gradient(110deg,#eae0c9,#c7bba2); border-top:5px solid #746c54; border-radius:0;}
body.theme-wasteland .archive-card {background:linear-gradient(135deg,#f2ead7,#e2d5bb); border-radius:0; border-left:3px solid #8a7450;}
body.theme-wasteland .archive-card .card-number {border-bottom:1px dashed var(--border-light); padding-bottom:9px; width:fit-content;}
body.theme-poolcore .archive-header {background:linear-gradient(135deg,#f1f7ec,#cbe3db); border-top-color:#689d96; border-radius:36px 3px 3px;}
body.theme-poolcore .archive-architecture {background:repeating-linear-gradient(0deg,transparent 0 24px,#689d9630 24px 25px),repeating-linear-gradient(90deg,transparent 0 24px,#689d9630 24px 25px); border-radius:100px 100px 0 0;}
body.theme-poolcore .archive-card {border-radius:18px 3px 3px; border-bottom:3px solid #91bcb3; background:linear-gradient(150deg,#f4f8f0,#e7f1e9);}
body.theme-forest .archive-header {background:radial-gradient(ellipse at 90% 30%,#9fad8150,transparent 55%),linear-gradient(110deg,#eff0e2,#d9e1cc); border-top-color:#73845d;}
body.theme-forest .archive-architecture {transform:rotate(12deg); border-radius:90% 0 80% 0; background:linear-gradient(120deg,transparent,#94a88040);}
body.theme-forest .archive-card {background:linear-gradient(140deg,#f3f3e6,#e9eddd); border-radius:2px 22px 2px 2px; border-bottom:2px solid #7e8f68;}
body.theme-dos :is(.archive-title,.card-name,.book-title,.volume-title,.page-single,.header-title) {font-family:'Courier New','Microsoft YaHei',monospace;}
body.theme-dos :is(.archive-header,.archive-card,.page-single,.reader-tools button,.theme-option) {border-radius:0; box-shadow:none; background:var(--card-bg);}
body.theme-dos .archive-card .card-number::before {content:'> ';color:var(--accent);}
body.theme-dos .archive-title {font-size:36px;}
body.theme-dos .archive-architecture {border-radius:0; transform:none; background:repeating-linear-gradient(0deg,transparent 0 18px,#36544160 18px 19px);}
body.theme-ink :is(.archive-header,.archive-card,.page-single,.cover,.fab) {border-radius:0; box-shadow:none; background:#fff; backdrop-filter:none;}
body.theme-ink .archive-architecture {display:none;}
body.theme-ink .archive-header {min-height:230px;}
body.theme-ink .archive-card {border-color:#555;}
body.theme-ink .collection-graphic {opacity:.65;}
body:is(.theme-midcentury,.theme-spacetech,.theme-wasteland,.theme-poolcore,.theme-forest,.theme-dos,.theme-ink)::before,
body:is(.theme-midcentury,.theme-spacetech,.theme-wasteland,.theme-poolcore,.theme-forest,.theme-dos,.theme-ink)::after {display:none;}
body:is(.theme-midcentury,.theme-spacetech,.theme-wasteland,.theme-poolcore,.theme-forest,.theme-dos,.theme-ink) :is(.data-stream,.dust-particles,.falling-leaves,.atomic-dots,.bubbles,.ripple,.light-beams) {display:none;}
body[data-focus="true"] .reader-breadcrumb {display:none;}
body[data-focus="true"] .reader-view .main-content {max-width:840px;}
body[data-focus="true"]:has(.reader-view[style*="block"]) .fab-container {opacity:.25;}
body[data-focus="true"] .fab-container:hover,body[data-focus="true"] .fab-container:focus-within {opacity:1;}
@media(min-width:1250px) {
  body[class*="theme-"] .reader-view .main-content {max-width:940px;}
  body[class*="theme-"] .reader-header {padding-top:24px;}
}
@media(max-width:760px) {
  body[class*="theme-"] .page-view {padding:20px 20px 110px;}
  body[class*="theme-"] .archive-header {padding:26px 23px; min-height:260px;}
  .archive-architecture {right:-2%; width:33%; opacity:.22;}
  body[class*="theme-"] .archive-subtitle {max-width:85%; font-size:12px;}
  .archive-meta {gap:10px; margin-top:24px; font-size:10px;}
  .archive-meta span+span {padding-left:10px;}
  body[class*="theme-"] .archive-grid {grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px;}
  body[class*="theme-"] .archive-card,body[class*="theme-"] .archive-card.primary-book,body[class*="theme-"] .archive-card:nth-child(2) {grid-column:span 1; min-height:280px; padding:22px 18px;}
  body[class*="theme-"] .archive-card:last-child {grid-column:span 2; min-height:250px;}
  body[class*="theme-"] .archive-card .card-name {font-size:23px;}
  .collection-graphic {width:95px; right:4px; opacity:.23;}
  .archive-tools {gap:14px;}
  .archive-search {width:55%;}
  .archive-search kbd {display:none;}
  .archive-tools h2 {font-size:16px;}
  body[class*="theme-"] .reader-view {padding:0;}
  body[class*="theme-"] .reader-view .main-content {padding:0 44px 0 18px;}
  body[class*="theme-"] .page-single {padding:24px 22px 42px;}
  body[class*="theme-"] .chapter-nav .page-indicator {order:3; width:100%; text-align:center;}
  body[class*="theme-"] .fab-container {right:8px; bottom:105px;}
  body[class*="theme-"] .fab {width:32px; height:32px; font-size:13px;}
  body[class*="theme-"] .fab-row {gap:7px;}
  body[class*="theme-"] .volume-directory-item {grid-template-columns:52px 1fr auto 18px; gap:8px; padding:18px 5px;}
  body[class*="theme-"] .volume-directory-item .vol-name {font-size:15px;}
}
@media(max-width:480px) {
  body[class*="theme-"] .page-view {padding:16px 16px 100px;}
  body[class*="theme-"] .archive-grid {grid-template-columns:minmax(0,1fr);}
  body[class*="theme-"] .archive-card,body[class*="theme-"] .archive-card.primary-book,body[class*="theme-"] .archive-card:nth-child(2),body[class*="theme-"] .archive-card:last-child {grid-column:1; min-height:246px; padding:24px;}
  .archive-tools {align-items:stretch; flex-direction:column;}
  .archive-search {width:100%;}
  body[class*="theme-"] .archive-title {letter-spacing:.06em; font-size:34px;}
  body[class*="theme-"] .archive-header {min-height:270px;padding:25px 20px;}
  .archive-meta {flex-direction:column;}
  .archive-meta span+span {padding-left:0;border-left:0;}
  .reading-resume {gap:12px; padding:14px;}
  .reading-resume button {padding:8px;font-size:10px;}
  body[class*="theme-"] .reader-view {padding:0;}
  body[class*="theme-"] .reader-view .main-content {padding:0 42px 0 12px;}
  body[class*="theme-"] #chapterTitle {font-size:15px; letter-spacing:.02em;}
  body[class*="theme-"] .page-single {padding:22px 18px 42px;}
  body[class*="theme-"] :is(.book-title,.volume-title) {font-size:25px;}
  .archive-kicker {font-size:9px;letter-spacing:.15em;}
}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after {animation:none!important; transition:none!important; scroll-behavior:auto!important;}
}
body.theme-ink *,body.theme-ink *::before,body.theme-ink *::after {animation:none!important; transition:none!important;}

