/* Shared visual language. Diagram colors retain their semantic meaning. */
html[data-theme]{--site-paper:#f4f1e7;--site-surface:#fffdf5;--site-ink:#203831;--site-muted:#63746b;--site-green:#224b3d;--site-gold:#dbc281;--site-line:#cbd0bf;--site-font:'PingFang SC','Hiragino Sans GB','Microsoft YaHei',sans-serif;--site-mono:ui-monospace,'SFMono-Regular',Consolas,monospace;--paper-white:var(--site-surface);--accent-red:var(--site-green);--text-main:var(--site-ink);--text-dim:var(--site-muted);--text-light:var(--site-muted);--black:var(--site-ink);--bg-dark:var(--site-paper);--red:var(--site-green);--paper:var(--site-surface);--dark:var(--site-ink);--dim:var(--site-muted);--bg:var(--site-paper);--text:var(--site-ink);--border:var(--site-line);--highlight:var(--site-green);--panel:var(--site-surface);--surface:var(--site-surface);--raised:#e8ecdf;--input:var(--site-paper);--white:var(--site-ink);--bg-color:var(--site-paper);--text-color:var(--site-ink);--accent-color:var(--site-green);--secondary-color:var(--site-muted);--panel-bg:var(--site-surface);--primary-color:var(--site-ink);--primary:var(--site-green);--secondary:var(--site-muted);--accent:var(--site-gold);--neutral:var(--site-paper);--base:var(--site-surface);--bg-paper:var(--site-paper);--highlight-bg:#e4e9d9;--table-head:#e4e9d9;--bg2:#e4e9d9;--panel2:var(--site-surface);--wood:var(--site-line);--wood-dark:var(--site-green);--wood-light:#a2af95;--grass:var(--site-green);--grass-dark:var(--site-green);--chip-bg:#e4e9d9;--muted:var(--site-muted)}
body.site-page{background:var(--site-paper);background-image:none;color:var(--site-ink);font-family:var(--site-font);font-weight:400;line-height:1.8}body.site-page *{box-sizing:border-box}body.site-page :is(button,input,textarea,select){font-family:var(--site-font)}body.site-page :is(a,button,input,textarea,select,summary):focus-visible{outline:3px solid #ac793a;outline-offset:4px}body.site-page :is(button,a,input){touch-action:manipulation}body.site-page :is(h1,h2,h3,h4){font-family:var(--site-font);text-shadow:none}body.site-page :is(.time-code,.nav-info,.item-meta,.section-sub,.section-tag,.chapter-marker,.footer-tag){font-family:var(--site-mono);letter-spacing:1px}body.site-page :is(.particles,#starfield,.layer-back-text){display:none}body.site-page :is(.poster-frame,.main-container,.wrap){transform:none!important;perspective:none}body.site-page :is(.back-link,.back-btn,.action-btn,.lab-btn){color:var(--site-green);font-size:12px;letter-spacing:.5px}body.site-page :is(.back-btn,.lab-btn){border-color:var(--site-line);background:var(--site-surface)}body.site-page :is(.back-btn,.lab-btn):hover{background:var(--site-green);color:var(--site-surface)}body.site-page .top-nav{background:var(--site-paper);color:var(--site-ink);border-bottom:1px solid var(--site-line);backdrop-filter:none;padding:14px 24px}body.site-page .top-nav .back-link{color:var(--site-green)}body.site-page :is(.abstract-box,.abstract,.quote-box,.note){background:#e8ecdf;border-color:#a6b2a3;color:var(--site-ink);box-shadow:none}body.site-page :is(.abstract-box,.abstract){border-left:3px solid #8a9c77}body.site-page :is(.abstract-label,.ref-title,.ref-section,.footer-tag){color:var(--site-muted);opacity:1}body.site-page :is(.article-title,.at){color:var(--site-ink);line-height:1.45;letter-spacing:-.5px;font-size:clamp(26px,3.5vw,38px)}body.site-page :is(.article-header,.ah){border-color:var(--site-line)}body.site-page :is(.article-body,.ab){font-size:17px;line-height:1.95;text-align:left;overflow-wrap:break-word;color:var(--site-ink)}body.site-page :is(.article-body,.ab) :is(h2,h3){color:var(--site-green);line-height:1.6;display:block;scroll-margin-top:85px}body.site-page :is(.article-body,.ab) h2::before{background:#8a9c77;vertical-align:middle}body.site-page :is(.article-body,.ab) p{margin-bottom:1.4em}body.site-page :is(.article-body,.ab) a{color:var(--site-green);text-decoration:underline;text-underline-offset:3px}body.site-page :is(.main-container,.wrap){background:var(--site-surface);max-width:850px;padding:48px;border:1px solid var(--site-line);box-shadow:none;margin:88px auto 40px;width:calc(100% - 48px)}body.site-page :is(.article-body,.ab) :is(pre,code.ic){background:#e6eadf;color:var(--site-ink);border-color:#8a9c77}body.site-page :is(.article-body,.ab) :is(table,td,th){border-color:var(--site-line)}body.site-page :is(.article-body,.ab) th{background:#e4e9d9;color:var(--site-ink)}body.site-page .bottom-actions{border-color:var(--site-line);gap:16px;flex-wrap:wrap}body.site-page .tag{background:#e4e9d9;color:var(--site-green)}body.site-page .wl{color:var(--site-green);border-color:#a6b2a3}body.site-page :is(.reader-tools){background:var(--site-green);border:1px solid #66816b;box-shadow:3px 3px #c5c9b6;padding:11px 18px}body.site-page .reader-toc{background:var(--site-surface);border:1px solid var(--site-line);box-shadow:3px 3px #c5c9b6}body.site-page .reader-bar{background:#9ba67c}
/* Catalog and profile use the same paper cards as the homepage. */
html[data-theme=catalog] body.site-page{display:block;height:auto;min-height:100vh;overflow:auto;padding:42px 24px;perspective:none}html[data-theme=catalog] .poster-frame{width:100%;max-width:1000px;aspect-ratio:auto;max-height:none;height:auto;min-height:0;padding:32px;background:var(--site-surface);border:1px solid var(--site-line);border-radius:3px;box-shadow:none;margin:0 auto;transform:none!important}html[data-theme=catalog] .poster-frame:before{display:none}html[data-theme=catalog] .header{margin:0 0 32px;padding-bottom:20px;border-bottom:1px solid var(--site-line)}html[data-theme=catalog] .list-container{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;overflow:visible;padding:0}html[data-theme=catalog] .list-item{margin:0;background:var(--site-paper);border:1px solid var(--site-line);border-radius:3px;padding:23px;transform:none;color:var(--site-ink)}html[data-theme=catalog] .list-item:hover{background:#e8ecdf;border-color:#8a9c77;transform:translateY(-2px)}html[data-theme=catalog] .item-title{font-size:17px;line-height:1.7;color:var(--site-ink)}html[data-theme=catalog] .item-meta{color:var(--site-muted);font-size:10px}html[data-theme=catalog] :is(.section-title,.section-tag){color:var(--site-ink);letter-spacing:1px}html[data-theme=catalog] .footer{border-color:var(--site-line);color:var(--site-muted);margin-top:30px}html[data-theme=catalog] .content-scroll{overflow:visible}html[data-theme=catalog] .id-name{color:var(--site-ink)}html[data-theme=catalog] :is(.info-p,.exp-name){color:var(--site-ink);font-size:14px}html[data-theme=catalog] :is(.section-label,.id-en-name,.exp-date){color:var(--site-muted)}html[data-theme=catalog] .skill-tag{background:var(--site-paper);color:var(--site-green);border-color:#98a68b;font-size:12px}html[data-theme=catalog] .photo-space{border-color:var(--site-line)}html[data-theme=catalog] .video-title{color:var(--site-ink);font-size:14px}
/* Creative tools share controls; their data categories keep distinct colors. */
html[data-theme=tool] .topbar{height:auto;min-height:54px;padding:12px 18px;gap:15px;flex-wrap:wrap}html[data-theme=tool] :is(.btn,.ico-btn,.add-block-btn){font-size:11px;letter-spacing:.5px;min-height:32px}html[data-theme=tool] .btn-red{background:var(--site-green);color:var(--site-surface)}html[data-theme=tool] .btn-ghost{color:var(--site-muted)}html[data-theme=tool] :is(.preview-bar,.sec-head){background:#e8ecdf}html[data-theme=tool] .app-header{background:var(--site-green);border-bottom:1px solid var(--site-line);box-shadow:none;color:var(--site-surface);gap:18px;flex-wrap:wrap}html[data-theme=tool] .app-header h1{font-family:var(--site-font);font-size:18px;text-shadow:none}html[data-theme=tool] .header-actions button{background:var(--site-surface);color:var(--site-green);border:1px solid var(--site-line);font-family:var(--site-font);font-size:11px;text-shadow:none;box-shadow:none}html[data-theme=tool] :is(.tab,.panel,.mat-chip,.field input,.field textarea){box-shadow:none;border-width:1px;border-radius:3px;clip-path:none;font-family:var(--site-font)}html[data-theme=tool] .tab{font-size:12px;padding:12px 15px}html[data-theme=tool] .panel{background:var(--site-surface)}html[data-theme=tool] :is(.mat-label,.mat-bar){background:#e8ecdf;color:var(--site-green)}html[data-theme=tool] .mat-chip{font-size:12px}html[data-theme=tool] .mat-chip.selected{background:#e3e9da;color:var(--site-green);border-color:#71896d}html[data-theme=tool] .preview-panel{background:#e8ecdf}html[data-theme=tool] .toast{background:var(--site-green);color:var(--site-surface)}
/* Concept labs use quiet surfaces; experiment objects retain color contrast. */
html[data-theme=concept] :is(.concept-card,.concept-block,.quote-box){background:var(--site-surface);border:1px solid var(--site-line);border-radius:3px;box-shadow:none}html[data-theme=concept] :is(.citation,.subtitle){color:var(--site-muted)}html[data-theme=concept] :is(.nav-btn,.nav-item,.mode-switch){background:var(--site-surface);color:var(--site-green);border:1px solid var(--site-line);box-shadow:none;border-radius:3px}html[data-theme=concept] :is(.sidebar-left,.sidebar-right){background:var(--site-surface);border-color:var(--site-line)}html[data-theme=concept] :is(.sidebar-title,.panel-header){background:#e4e9d9;color:var(--site-ink);border-color:var(--site-line)}html[data-theme=concept] :is(.logic-card,.logic-title,.logic-text){background:var(--site-surface);color:var(--site-ink);border-color:var(--site-line)}html[data-theme=concept] :is(.cite,.logic-source,.default-msg){color:var(--site-muted)}html[data-theme=concept] .toc-link{color:var(--site-ink)}html[data-theme=concept] .toc-link.active{background:#e4e9d9;color:var(--site-green)}html[data-theme=concept] .chiasm-bg{opacity:.04}html[data-theme=concept] .circle-subject{background:#426b56}html[data-theme=concept] .circle-object{background:#b48d67}html[data-theme=concept] .status-text{color:var(--site-green)}
html[data-theme=essay] :is(.cover-title,.cover h1){color:var(--site-ink);font-weight:600}html[data-theme=essay] :is(.prose,.poem-body){color:var(--site-ink);font-weight:400}html[data-theme=essay] :is(.dim-text,.note-label,.warning-label){color:var(--site-muted)}html[data-theme=essay] .fixed-bg{opacity:.06}html[data-theme=essay] .cover{background:var(--site-paper)}html[data-theme=essay] nav:not(.reader-tools){background:var(--site-paper);border-bottom:1px solid var(--site-line)}html[data-theme=essay] :is(.warning,.note){background:#e8ecdf;color:var(--site-ink);border-color:#98a68b}html[data-theme=essay] :is(.table-wrapper,table,td,th){border-color:var(--site-line)}html[data-theme=essay] th{background:#e4e9d9;color:var(--site-ink)}html[data-theme=essay] .container{background:var(--site-surface);border-color:var(--site-line)}html[data-theme=essay] .hero-gradient{background:var(--site-green)}html[data-theme=essay] .toc-fixed{background:var(--site-surface);border-color:var(--site-line);box-shadow:none}html[data-theme=essay] .serif{font-family:var(--site-font)}
/* Immersive canvases need darkness; their chrome uses the same green and gold. */
html[data-theme=immersive]{--site-paper:#102b25;--site-surface:#1d3e32;--site-ink:#f4efdf;--site-muted:#b4bea9;--site-line:#526b56;--theater-bg:#102b25;--accent:#dbc281}html[data-theme=immersive] #archive-panel{background:var(--site-surface);border-color:var(--site-line)}html[data-theme=immersive] :is(.genre-btn,.stat-box,#info){color:var(--site-ink);border-color:var(--site-line);background:var(--site-surface)}html[data-theme=immersive] .genre-btn.active{background:#35573d;border-color:var(--site-gold)}html[data-theme=immersive] :is(.archive-header,#ui){color:var(--site-muted);border-color:var(--site-line)}html[data-theme=immersive] #chaos-line{accent-color:var(--site-gold);background:#a6af7530}html[data-theme=immersive] #chaos-line::-webkit-slider-thumb{background:var(--site-gold);box-shadow:none}
.site-path{position:relative;z-index:500;display:flex;justify-content:space-between;align-items:center;gap:16px;padding:14px 24px;background:var(--site-paper);border-bottom:1px solid var(--site-line);font:12px var(--site-font);color:var(--site-muted)}.site-path a{color:var(--site-ink)}html[data-theme=immersive] .site-path{position:fixed;top:0;left:0;right:0;background:#102b25dd}html[data-theme=immersive] #ui{top:65px}html[data-theme=immersive] #info{top:65px}html[data-theme=immersive] #archive-panel{padding-top:70px}
@media(max-width:600px){body.site-page :is(.main-container,.wrap){padding:28px 20px;width:100%;margin:70px 0 30px;border-left:0;border-right:0}body.site-page :is(.article-body,.ab){font-size:16px}html[data-theme=catalog] body.site-page{padding:20px 14px}html[data-theme=catalog] .poster-frame{padding:22px 18px}html[data-theme=catalog] .list-container{grid-template-columns:1fr}html[data-theme=catalog] .item-title{font-size:16px}html[data-theme=tool] .layout{height:auto;display:block}html[data-theme=tool] .input-panel{width:100%;min-width:0;max-height:65vh;border-right:0;border-bottom:1px solid var(--site-line)}html[data-theme=tool] .preview-panel{min-height:65vh}html[data-theme=tool] .resize-handle{display:none}html[data-theme=tool] .row3{grid-template-columns:1fr}html[data-theme=essay] .container{padding:28px 20px;margin:20px auto}html[data-theme=essay] .container h1{font-size:26px;letter-spacing:1px}.site-path{font-size:11px;padding:12px 18px}.site-path span{font-size:10px}}
@media(prefers-reduced-motion:reduce){body.site-page *{scroll-behavior:auto!important;animation:none!important;transition:none!important}body.site-page .fade-in{opacity:1!important;transform:none!important}}
@media print{.site-path,.reader-tools,.reader-bar{display:none!important}body.site-page{background:white;color:#203831}body.site-page :is(.main-container,.wrap){border:0;box-shadow:none;margin:0;padding:0;width:100%}}
html[data-theme=tool] :is(.section,.seq-card,.char-card,.tl-card,.voice-table,.key-badge){border:1px solid var(--site-line);border-radius:3px;box-shadow:none;background:var(--site-surface)}html[data-theme=tool] .section::before{display:none}html[data-theme=tool] .section h2{font-family:var(--site-font);font-size:17px;border-bottom:1px solid var(--site-line);text-shadow:none}html[data-theme=tool] .section h3{font-family:var(--site-font);font-size:14px}html[data-theme=tool] .one-sentence{background:#e8ecdf;border:1px solid #a6b2a3;box-shadow:none;color:var(--site-ink)}html[data-theme=tool] .one-sentence::before{display:none}html[data-theme=tool] .one-sentence .placeholder{color:var(--site-muted)}html[data-theme=immersive] #overlay{color:var(--site-gold);text-shadow:none;font-family:var(--site-mono);letter-spacing:1px}html[data-theme=immersive] #status{color:var(--site-muted);opacity:1}html[data-theme=concept] .nose-target{color:var(--site-ink)}html[data-theme=concept] .mode-switch:has(input:checked){background:#e4e9d9}
html[data-theme=concept] body>header{background:var(--site-paper);border-bottom:1px solid var(--site-line);height:auto;min-height:52vh;padding:70px 24px}html[data-theme=concept] body>header h1{color:var(--site-ink);mix-blend-mode:normal;font-size:clamp(28px,4vw,48px);line-height:1.4}html[data-theme=concept] body>header :is(h2,.subtitle,p){color:var(--site-muted)}html[data-theme=concept] .concept-card:hover{background:#e8ecdf}html[data-theme=concept] :is(.quote-box,.citation){border-color:var(--site-line)}html[data-theme=essay] .fade-in{opacity:1;transform:none;transition:none}html[data-theme=essay] .scroll-container section{border-color:var(--site-line)}html[data-theme=essay] .title{font-size:clamp(25px,3.5vw,38px);letter-spacing:2px;font-weight:600;color:var(--site-green)}html[data-theme=essay] footer{color:var(--site-muted)}html[data-theme=essay] .poem-body{font-family:'Songti SC','SimSun',serif;font-weight:400;line-height:2.1}
html[data-theme=concept] blockquote{color:var(--site-muted);border-left:3px solid #98a68b}html[data-theme=concept] .citation{opacity:1;color:var(--site-muted)}
