/* Website navigation and alternate reading themes; original book layouts are retained. */
:root { color-scheme: light; }
:root[data-theme=dark] { color-scheme: dark; }
.reading-bar { position:relative;z-index:3;display:flex;justify-content:space-between;align-items:center;gap:16px;max-width:1120px;margin:auto;padding:20px; font:14px/1.5 'PingFang SC','Microsoft YaHei',sans-serif; }
.reading-bar a {color:var(--ink);text-decoration:none;}
.reading-bar button {font:inherit;color:var(--ink);border:1px solid var(--line);border-radius:24px;padding:8px 14px;background:transparent;cursor:pointer;flex-shrink:0;}
.reading-bar a:focus-visible,.reading-bar button:focus-visible {outline:2px solid currentColor;outline-offset:5px;}
.reading-notice {position:relative;max-width:1120px;margin:0 auto;padding:0 20px;color:var(--muted);font-size:13px;}
body {overflow-wrap:anywhere;}
h1,h2,h3 {letter-spacing:.02em;}
table {max-width:100%;}
@media(max-width:480px) { .grid,.mood-grid {grid-template-columns:minmax(0,1fr);} th,td {overflow-wrap:anywhere;} }
@media(prefers-reduced-motion:reduce) {html {scroll-behavior:auto;}}
:root[data-theme=dark]:not([data-book=three-body-2]) {
 --ink:#e8e8e5;--muted:#b3b9c0;--line:rgba(191,207,223,.2);--bg:#14191f;--paper:#20272e;--paper-strong:#242c35;--paper-soft:#171c22;--paper-deep:#262e2a;--accent:#8cbbf2;--accent-deep:#a2c8f5;--accent-soft:#263b51;--warm:#352e22;--blue:#8dbce8;--blue-soft:#243749;--gold:#ff9094;--gold-soft:#3b262a;--coral:#8dbce8;--moss:#a8bd9d;--moss-dark:#bdd0b3;--rust:#e4a387;--shadow:none;
}
:root[data-theme=dark]:not([data-book=three-body-2]) body {background:var(--bg);}
:root[data-theme=dark][data-book=three-body-1] :is(header,nav,.note,.quote,.mood,.timeline li,th,td,.pill) {background:var(--paper);color:var(--ink);}
:root[data-theme=dark][data-book=three-body-1] :is(.lead,.question-list li strong,nav a) {color:var(--ink);}
:root[data-theme=dark][data-book=three-body-1] nav a:hover {background:var(--accent-soft);}
:root[data-theme=dark][data-book=three-body-1] .timeline li::before {color:var(--bg);}
:root[data-theme=dark][data-book=cognitive-awakening] :is(nav,.card,details,.map-node,.steps li,.top,th) {background:var(--paper);}
:root[data-theme=dark][data-book=cognitive-awakening] :is(.hero-quote,.lead,.quote,.personal) {color:var(--ink);}
:root[data-theme=dark][data-book=cognitive-awakening] .steps li::before {color:var(--bg);}
:root[data-theme=dark][data-book=temple-of-earth] :is(.map article,.map article:first-child,.return-note,.tag) {background:var(--paper);}
:root[data-theme=dark][data-book=temple-of-earth] :is(.lead,.principle p) {color:var(--ink);}
:root[data-theme=dark][data-book=temple-of-earth] .quote {background:#304333;}
:root[data-theme=light][data-book=three-body-2] {--ink:#23332b;--muted:#53665c;--deep:#f5f7f1;--panel:#edf1e9;--panel-2:#e5ece2;--line:rgba(41,77,56,.2);--green:#34694c;--amber:#805f25;--red:#974a40;--blue:#366777;}
:root[data-theme=light][data-book=three-body-2] body {background:var(--deep);}
:root[data-theme=light][data-book=three-body-2] :is(nav,.profile,.callout,.formula) {background:var(--panel);}
:root[data-theme=light][data-book=three-body-2] :is(h3,.hero-quote,.lead,blockquote,.formula,.profile strong) {color:var(--ink);}
@media print {.reading-bar {display:none;}}
:root[data-theme=dark][data-book=temple-of-earth] .encounter {background:var(--paper);}
@media(max-width:680px) { [data-book=cognitive-awakening] header::before,[data-book=cognitive-awakening] header::after {opacity:.12;} }
:root[data-theme=light][data-book=three-body-2] .reader-note {background:var(--panel-2);}
