:root{--ink:#243e35;--green:#204f3e;--deep:#173b2f;--sage:#e9f0e8;--paper:#fffefa;--bg:#f4f3ec;--line:#dce2d7;--muted:#6c7a70;--gold:#bc9461;--amber:#8c5e28;--shadow:0 10px 35px #263e3210;font-family:"Microsoft YaHei","PingFang SC",system-ui,sans-serif;color:var(--ink);background:var(--bg);font-synthesis:none}*{box-sizing:border-box}body{margin:0;font-size:15px;line-height:1.65}button,input,select,textarea{font:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button,a{touch-action:manipulation}button{cursor:pointer}a{color:inherit;text-decoration:none}a:hover,.text-link:hover{text-decoration:underline;text-underline-offset:4px}button:disabled{opacity:.45;cursor:not-allowed}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,[tabindex]:focus-visible{outline:3px solid #b28a50;outline-offset:3px}[hidden]{display:none!important}h1,h2,h3,p{margin:0}h1,h2,h3{line-height:1.4}p+p{margin-top:12px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.skip-link{position:fixed;top:-100px;left:10px;background:white;padding:10px;z-index:500}.skip-link:focus{top:10px}.site-header{background:#fffef9f5;border-bottom:1px solid var(--line);position:sticky;top:0;z-index:30;backdrop-filter:blur(14px)}.header-inner{max-width:1440px;padding:18px 32px 10px;margin:auto;display:flex;align-items:center;justify-content:space-between;gap:20px}.brand{display:flex;align-items:center;gap:12px}.brand:hover{text-decoration:none}.brand strong{font:700 23px/1.35 "SimSun","Songti SC",serif;letter-spacing:.08em;display:block}.brand small{display:block;color:var(--muted);font-size:11px;letter-spacing:.08em;margin-top:4px}.seal{font:30px/1 "SimSun",serif;border:1px solid #37644d;background:var(--green);color:#eee6cf;width:47px;height:52px;border-radius:4px;display:grid;place-items:center;outline:1px solid #9baf99;outline-offset:3px}.header-actions{display:flex;align-items:center;gap:16px;font-size:13px}.local-badge{display:inline-flex;gap:7px;align-items:center;font-size:12px;color:var(--green)}.local-badge i{background:#64937a;width:6px;height:6px;border-radius:50%}.quiet-button{padding:8px 10px;background:none;border:0;color:var(--green);border-radius:6px}.quiet-button:hover{background:var(--sage)}.main-nav{display:flex;gap:28px;max-width:1440px;padding:0 32px;margin:auto;overflow-x:auto;scrollbar-width:thin}.main-nav>a{white-space:nowrap;padding:13px 2px 12px;border-bottom:3px solid transparent;font-size:14px;font-weight:600}.main-nav>a.active{border-color:var(--green);color:var(--green)}#draftBadge:not(:empty){margin-left:5px;background:var(--sage);border-radius:12px;padding:0 6px;font-size:11px}.site-main{max-width:1440px;padding:30px 32px 65px;margin:auto;min-height:65vh}.view{animation:arrive .2s ease}@keyframes arrive{from{opacity:.55;transform:translateY(5px)}to{opacity:1;transform:none}}.hero{display:grid;grid-template-columns:1.4fr .6fr;min-height:477px;background:var(--deep);border-radius:9px;overflow:hidden;position:relative;color:#fffdf1;box-shadow:var(--shadow)}.hero-copy{padding:49px 55px 34px;position:relative;z-index:1}.eyebrow{font-size:11px;font-weight:700;letter-spacing:.15em;color:#627d67;text-transform:uppercase;margin-bottom:9px}.eyebrow.light{color:#cfb480}.hero h1{font:500 clamp(31px,3.5vw,48px)/1.45 "SimSun","Songti SC",serif;letter-spacing:.05em;margin:17px 0 19px}.hero-intro{font-size:14px;line-height:1.9;max-width:510px;color:#dae5d8}.hero-search{display:flex;max-width:520px;border:1px solid #79947e;border-radius:5px;margin:26px 0 13px;background:#fffef9;padding:4px}.hero-search input{min-width:0;width:100%;border:0;background:none;padding:11px 10px;color:var(--ink);font-size:14px}.hero-search button{border:0;background:#d6bf96;color:#273e30;border-radius:3px;white-space:nowrap;font-weight:700;padding:9px 18px}.hero-links{display:flex;gap:24px;color:#ead8b5;font-size:12px}.hero-caption{font-size:10px;color:#adc1ad;margin-top:27px}.hero-archive{display:flex;align-items:center;justify-content:center;position:relative;padding:35px;background:linear-gradient(120deg,#385d45,#758061);flex-direction:column;gap:18px}.hero-archive:before{content:"";position:absolute;inset:14px;border:1px solid #eee5c82a}.book-frame{height:330px;width:242px;transform:rotate(5deg);border-radius:2px;box-shadow:12px 16px 30px #09231870;overflow:hidden}.book-frame img{width:100%;height:100%;object-fit:cover}.archive-caption{font-size:10px;letter-spacing:.12em;color:#e4e3cf;z-index:1}.stats-strip{display:grid;grid-template-columns:repeat(4,1fr);padding:23px 0;border-bottom:1px solid var(--line);margin-bottom:35px}.stat{padding-left:28px;border-right:1px solid var(--line)}.stat:first-child{padding-left:4px}.stat:last-child{border:0}.stat strong{font:32px/1.3 Georgia,"SimSun",serif;margin-right:10px}.stat span{color:var(--muted);font-size:12px}.section-heading{display:flex;justify-content:space-between;align-items:end;gap:18px;margin:26px 0 16px}.section-heading h2{font:600 25px/1.4 "SimSun",serif}.muted{color:var(--muted);font-size:13px}.entry-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.entry-card{background:var(--paper);border:1px solid var(--line);padding:26px;border-radius:7px;transition:transform .15s,border-color .15s}.entry-card:hover{transform:translateY(-3px);border-color:#9aaa93;text-decoration:none}.entry-no{font-size:10px;letter-spacing:.13em;color:#8d987d}.entry-card h3{font:600 22px/1.5 "SimSun",serif;margin:17px 0 10px}.entry-card p{font-size:13px;color:var(--muted);line-height:1.9}.entry-arrow{display:block;font-size:12px;font-weight:700;margin-top:25px;color:var(--green)}.home-bottom{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-top:24px}.paper-panel{border:1px solid var(--line);background:var(--paper);border-radius:7px;padding:27px;box-shadow:0 4px 20px #263e3205}.paper-panel h2{font:600 24px/1.4 "SimSun",serif;margin-bottom:14px}.paper-panel p{font-size:14px;line-height:1.9}.green-panel{background:#e8eee2}.green-panel .eyebrow.light{color:#71885b}.green-panel small{display:block;color:var(--muted);font-size:11px;margin-top:15px}.button{display:inline-flex;justify-content:center;align-items:center;gap:6px;background:#fffefa;border:1px solid #c6d2c1;color:var(--green);border-radius:5px;padding:9px 14px;min-height:42px;line-height:1.5;font-size:14px}.button:hover{background:#edf2e8;text-decoration:none}.button.primary{background:var(--green);color:#fff;border-color:var(--green)}.button.primary:hover{background:#326a50}.button.inverse{background:var(--deep);color:#fff;margin-top:18px}.text-link{color:var(--green);font-size:13px;background:none;border:0;display:inline-block;margin-top:18px;padding:0;cursor:pointer;font-weight:600}.page-heading{margin:12px 0 26px;max-width:880px}.page-heading h1{font:600 35px/1.4 "SimSun",serif;margin-bottom:12px;letter-spacing:.04em}.page-heading p:last-child{color:var(--muted);font-size:14px}.page-heading.compact{margin-bottom:18px}input,select,textarea{color:var(--ink);background:white;border:1px solid #cbd5c6;border-radius:5px;padding:10px;max-width:100%}input[type=search]{appearance:none}.people-controls{padding:22px}.search-field{display:block}.search-field>span{display:block;font-size:12px;color:var(--muted);margin-bottom:8px}.search-field>input{width:100%;max-width:700px}.filter-row{display:flex;align-items:end;gap:15px;flex-wrap:wrap;margin-top:17px}.filter-row label,.relationship-panel label{display:flex;flex-direction:column;font-size:12px;gap:5px;color:var(--muted)}.filter-row select{min-width:120px;font-size:13px}.list-heading{display:flex;justify-content:space-between;align-items:center;gap:15px;margin:22px 0 14px;font-size:13px}.people-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.person-card{background:var(--paper);border:1px solid var(--line);border-radius:6px;padding:19px;text-align:left;display:flex;flex-direction:column;align-items:start;color:var(--ink);line-height:1.7;min-width:0}.person-card:hover{border-color:#7a9d7e;box-shadow:var(--shadow)}.person-card h3{font-size:18px;margin:9px 0 5px;font-family:"SimSun",serif}.person-card small{font-size:11px;color:var(--muted)}.person-card p{font-size:12px;color:var(--muted);overflow-wrap:anywhere}.person-card .badge{margin-top:13px}.badge{display:inline-block;font-size:10px;padding:2px 8px;border-radius:3px;background:#eaf1e5;color:#4f7352}.badge.uncertain{background:#fbefdb;color:#8c652c}.pagination{display:flex;justify-content:center;gap:15px;align-items:center;margin:26px 0}.empty-state{padding:35px;text-align:center;color:var(--muted);background:var(--paper);border:1px dashed var(--line);grid-column:1/-1}.inline-search{display:flex;gap:10px;margin-bottom:14px}.inline-search input{flex:1;min-width:0;max-width:600px}.search-results{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:14px}.search-results:empty{display:none}.tree-panel{border:1px solid #cad6c6;background:var(--paper);border-radius:7px;overflow:hidden}.tree-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:13px;border-bottom:1px solid var(--line)}.tree-toolbar strong{font-family:"SimSun",serif;font-size:16px;margin-right:8px}.tree-toolbar select{padding:7px;font-size:12px}.tree-controls{display:flex;align-items:center;gap:7px;flex-wrap:wrap}.tree-controls .button{font-size:12px;padding:6px 11px;min-height:34px}.zoom-text{font-size:11px;color:var(--muted);width:40px;text-align:center}.tree-viewport{height:min(67vh,650px);min-height:430px;background:radial-gradient(#cbd7c7 .8px,transparent .8px) 0 0/21px 21px;position:relative;overflow:hidden;touch-action:none;cursor:grab}.tree-viewport:active{cursor:grabbing}.tree-stage{position:absolute;left:0;top:0;transform-origin:0 0}.tree-stage svg{position:absolute;top:0;left:0;overflow:visible}.tree-stage path{fill:none;stroke:#9cb39b;stroke-width:1.6}.tree-stage path.special-line{stroke:#ba975d;stroke-dasharray:6 4}.tree-person{position:absolute;width:160px;height:82px;border:1px solid #bccdb7;border-top:3px solid #668b65;border-radius:7px;background:#fffef9;color:var(--ink);padding:7px 5px;text-align:center;user-select:none;box-shadow:0 3px 10px #1e462b0b;line-height:1.4;overflow:hidden}.tree-person small,.tree-person span{display:block;color:#7a8b78;font-size:10px}.tree-person strong{display:block;font:600 17px/1.6 "SimSun",serif;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tree-person.uncertain{border-top-color:#b99152}.tree-person.selected{background:#e4efd9;border:2px solid var(--green)}.tree-status{padding:10px 14px;font-size:11px;color:var(--muted);border-top:1px solid var(--line)}.relationship-panel{margin-top:22px}.relationship-panel form{display:flex;gap:14px;align-items:end;flex-wrap:wrap;margin-top:15px}.relationship-result{display:flex;flex-wrap:wrap;gap:7px;align-items:center;margin-top:17px}.relation-step{display:flex;align-items:center;gap:7px;font-size:12px}.relation-step>span{color:#8b774e;font-size:11px}.history-grid{display:grid;grid-template-columns:1.15fr .85fr;gap:20px}.history-timeline{border-left:1px solid #b4c7ac;margin:26px 0 0 8px;padding-left:25px}.history-event{position:relative;margin-bottom:27px}.history-event:before{content:"";position:absolute;left:-30px;top:9px;width:8px;height:8px;border-radius:50%;background:#7d9871;outline:4px solid #edf1e7}.history-event small{color:#9a835b;font-size:11px}.history-event h3{font-size:17px;margin:5px 0}.history-event p{color:var(--muted);font-size:13px}.history-event .text-link{margin-top:5px}.document-links{display:flex;flex-direction:column;margin:18px 0;gap:0}.document-links button{background:transparent;border:0;border-bottom:1px solid var(--line);padding:13px 2px;display:flex;justify-content:space-between;text-align:left;color:var(--green)}.rank-panel{margin-top:20px}.rank-poem{font:600 24px/1.95 "SimSun",serif;text-align:center;padding:25px;background:var(--sage);border-radius:6px;color:var(--green);letter-spacing:.09em}.source-note{font-size:12px!important;color:var(--muted);margin:15px 0}.generation-grid{display:grid;grid-template-columns:repeat(9,1fr);gap:8px;margin:22px 0}.generation-cell{border:1px solid var(--line);border-radius:4px;background:white;text-align:center;padding:10px 3px;color:var(--ink)}.generation-cell small{display:block;color:var(--muted);font-size:10px}.generation-cell strong{display:block;font:600 24px/1.6 "SimSun",serif}.generation-cell:hover{background:var(--sage)}.article-tabs{display:flex;gap:10px;margin-bottom:20px}.reading-article{max-width:880px;margin:auto;padding:45px 60px;font-size:16px;line-height:2}.reading-article h1,.reading-article h2{font-family:"SimSun",serif}.reading-article p{font-size:15px;line-height:2.1;margin:18px 0}.reading-article blockquote{font-size:12px;color:var(--muted);border-left:3px solid #c3ad88;padding-left:15px}.wide-input{width:100%;max-width:680px;margin-bottom:20px}.review-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.review-card{border:1px solid var(--line);border-radius:6px;background:var(--paper);padding:23px;min-width:0}.review-card h2{font-size:19px;font-family:"SimSun",serif;margin:10px 0}.review-card p{font-size:13px;line-height:1.85;overflow-wrap:anywhere}.review-card .review-evidence{background:#f0f2e9;color:#65765c;padding:10px;border-radius:4px;margin:12px 0;font-size:12px}.action-row{display:flex;gap:8px;flex-wrap:wrap;margin-top:13px}.source-list{display:flex;flex-direction:column;gap:8px}.source-list button,.source-list a{font-size:12px;text-align:left;overflow-wrap:anywhere}.person-dialog{position:fixed;inset:0 0 0 auto;margin:0;width:min(570px,100vw);max-width:100vw;height:100dvh;max-height:100dvh;border:0;border-left:1px solid var(--line);background:var(--paper);color:var(--ink);padding:0 28px 40px;box-shadow:-15px 0 70px #112a2440;overscroll-behavior:contain}.person-dialog::backdrop{background:#15382b55;backdrop-filter:blur(2px)}.drawer-head{display:flex;justify-content:space-between;align-items:center;position:sticky;top:0;background:var(--paper);border-bottom:1px solid var(--line);padding:16px 0;z-index:1}.drawer-head .eyebrow{margin:0}.person-title{padding:23px 0 17px;border-bottom:1px solid var(--line)}.person-title h2{font:600 31px/1.5 "SimSun",serif}.person-title small{color:var(--muted);font-size:12px}.detail-section{padding:18px 0;border-bottom:1px solid var(--line)}.detail-section h3{font-size:13px;font-weight:700;margin-bottom:10px}.detail-section p{font-size:13px;line-height:1.9;overflow-wrap:anywhere}.detail-section .person-links{display:flex;gap:7px;flex-wrap:wrap}.detail-section .person-links .button{font-size:12px;min-height:34px;padding:6px 10px}.detail-section dl{display:grid;grid-template-columns:85px 1fr;gap:10px;font-size:13px}.detail-section dt{color:var(--muted)}.detail-section dd{margin:0;overflow-wrap:anywhere}.variant-note{background:#f8efdE;border-radius:5px;padding:13px;font-size:12px;line-height:1.9}.transcription{background:#f1f2e9;padding:14px;border-radius:5px}.site-footer{border-top:1px solid var(--line);max-width:1376px;margin:auto;padding:26px 0 34px;display:flex;justify-content:space-between;gap:20px;align-items:start;color:var(--muted);font-size:11px}.site-footer strong{font-family:"SimSun",serif;font-size:15px;color:var(--green);display:block}.site-footer span{display:block;margin-top:5px}.site-footer div:last-child{display:flex;gap:18px}.toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);max-width:min(600px,90vw);background:#173e31;color:#fff;padding:13px 23px;border-radius:6px;box-shadow:var(--shadow);font-size:13px;z-index:300}.load-state{text-align:center;padding:70px 25px;font-size:16px}.error-message{color:#9b4b30}.lib-root button,.work-root button{min-height:40px}#archiveContainer,#workspaceContainer{min-width:0}
@media(min-width:1500px){.hero-copy{padding:60px}.hero{min-height:500px}}
@media(max-width:1050px){.header-actions{gap:4px}.header-actions .local-badge{display:none}.hero-copy{padding:35px}.hero{grid-template-columns:1.45fr .55fr}.hero-archive{padding:20px}.book-frame{width:195px;height:280px}.people-grid{grid-template-columns:1fr 1fr}.main-nav{gap:23px}.site-footer{margin:0 30px}.generation-grid{grid-template-columns:repeat(6,1fr)}}
@media(max-width:700px){body{font-size:14px}.header-inner{padding:13px 17px 6px;gap:10px}.brand strong{font-size:18px}.brand small{font-size:9px}.seal{width:36px;height:41px;font-size:25px}.header-actions{flex-direction:column;align-items:end;gap:0}.header-actions .quiet-button{font-size:10px;padding:3px}.main-nav{padding:0 17px;gap:21px}.main-nav>a{font-size:12px;padding-top:12px}.site-main{padding:18px 16px 40px}.hero{grid-template-columns:1fr}.hero-copy{padding:29px 24px 23px}.hero h1{font-size:34px;margin:14px 0}.hero-intro{font-size:12px}.hero-search{margin-top:23px}.hero-search input{font-size:12px;padding:10px 7px}.hero-search button{font-size:12px;padding:8px 12px}.hero-caption{margin-top:20px;font-size:9px}.hero-archive{display:none}.stats-strip{padding:19px 0;margin-bottom:24px}.stat{padding-left:10px}.stat strong{font-size:23px;display:block;margin:0}.stat span{font-size:9px}.section-heading{align-items:start;flex-direction:column;gap:5px;margin-top:22px}.section-heading h2{font-size:23px}.section-heading>.muted{font-size:11px}.entry-grid{grid-template-columns:1fr;gap:10px}.entry-card{padding:20px;display:grid;grid-template-columns:1fr auto}.entry-card h3{font-size:21px;margin:7px 0}.entry-no,.entry-card h3,.entry-card p{grid-column:1}.entry-arrow{grid-column:2;grid-row:1/4;margin:auto 0 auto 15px;font-size:10px;max-width:42px}.entry-card p{font-size:12px}.home-bottom,.history-grid,.review-grid{grid-template-columns:1fr}.paper-panel{padding:20px}.paper-panel h2{font-size:22px}.paper-panel p{font-size:13px}.page-heading h1{font-size:29px}.page-heading{margin:9px 0 21px}.page-heading p:last-child{font-size:12px}.people-controls{padding:16px}.filter-row{gap:10px}.filter-row label{flex:1 1 43%;min-width:0}.filter-row select{width:100%;min-width:0;font-size:12px}.people-grid{grid-template-columns:1fr}.person-card{padding:15px 18px;display:grid;grid-template-columns:1fr auto;gap:0 10px}.person-card>small,.person-card h3,.person-card p{grid-column:1}.person-card>.badge{grid-column:2;grid-row:1/5;margin:auto}.person-card h3{margin:4px 0;font-size:20px}.list-heading>.muted{display:none}.list-heading{margin:18px 0 12px}.tree-toolbar{padding:10px;gap:7px}.tree-controls{gap:6px}.tree-toolbar>strong{width:100%;margin-bottom:2px}.tree-toolbar select{max-width:60%;font-size:11px}.tree-controls .button{font-size:11px;padding:6px 9px}.tree-viewport{min-height:420px;height:58vh}.tree-status{font-size:10px}.relationship-panel form{gap:10px}.relationship-panel label{width:100%}.relationship-panel label input{width:100%}.rank-poem{font-size:20px;padding:20px 8px}.generation-grid{grid-template-columns:repeat(4,1fr);gap:6px}.generation-cell strong{font-size:21px}.reading-article{padding:24px}.article-tabs .button{font-size:12px}.site-footer{margin:0 16px;padding:22px 0;flex-direction:column;gap:12px}.person-dialog{padding:0 20px 35px}.person-title h2{font-size:28px}.person-dialog .action-row .button{font-size:12px}.review-card{padding:18px}.pagination{font-size:12px;gap:8px}}
.tree-toggle{position:absolute;width:25px;height:25px;padding:0;border-radius:50%;border:1px solid #a8bda0;background:#fffef9;color:var(--green);display:grid;place-items:center;font-size:18px;line-height:1;box-shadow:0 2px 5px #173b2f17;z-index:2}.tree-toggle:hover{background:var(--sage)}
@media(max-width:700px){.hero{min-height:0}.hero h1{font-size:30px}}
@media(prefers-reduced-motion:reduce){.view{animation:none}.entry-card{transition:none}}

/* Keep the original demo's clear, rounded navigation and adjacent tree details.
   Reading workspaces use the available screen, not the article-page width. */
:root { --site-header-height: 136px; }
.main-nav { gap: 8px; padding-bottom: 8px; }
.main-nav > a { padding: 7px 15px; border: 1px solid transparent; border-radius: 10px; }
.main-nav > a:hover { background: var(--sage); text-decoration: none; }
.main-nav > a.active { border-color: var(--green); background: var(--green); color: white; }
.hero, .paper-panel, .entry-card { border-radius: 16px; }
.home-intro { display: grid; grid-template-columns: 1.15fr 1fr; gap: 20px; margin: 0 0 30px; }
.origin-preview blockquote { margin: 18px 0; padding: 0 0 0 18px; border-left: 3px solid var(--gold); font: 600 22px/1.8 "SimSun", serif; }
.origin-preview .origin-signature { font-size: 12px; color: var(--muted); margin-top: 14px; }
.place-tags { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0; }
.place-tags span { padding: 7px 15px; border-radius: 20px; background: var(--sage); color: var(--green); font-size: 14px; }
.entry-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.entry-card { padding: 24px 20px; }
.entry-card h3 { font-size: 21px; }
body[data-view="tree"] .site-main,
body[data-view="archive"] .site-main { max-width: none; padding: 12px 18px 0; }
body[data-view="tree"] .header-inner, body[data-view="tree"] .main-nav,
body[data-view="archive"] .header-inner, body[data-view="archive"] .main-nav { max-width: none; }
@media (min-width: 701px) {
  body[data-view="tree"] .header-inner, body[data-view="archive"] .header-inner { padding: 7px 20px 5px; }
  body[data-view="tree"] .brand strong, body[data-view="archive"] .brand strong { font-size: 19px; }
  body[data-view="tree"] .brand small, body[data-view="archive"] .brand small { margin-top: 0; font-size: 9px; }
  body[data-view="tree"] .seal, body[data-view="archive"] .seal { width: 32px; height: 36px; font-size: 24px; }
  body[data-view="tree"] .main-nav, body[data-view="archive"] .main-nav { padding: 0 18px 6px; }
  body[data-view="tree"] .main-nav > a, body[data-view="archive"] .main-nav > a { font-size: 13px; padding: 5px 13px; }
}
body[data-view="tree"] .site-footer, body[data-view="archive"] .site-footer { display: none; }
body[data-view="tree"] .site-main { height: calc(100dvh - var(--site-header-height)); min-height: 0; }
.view[data-page="tree"] { height: 100%; display: flex; flex-direction: column; gap: 7px; animation: none; }
.tree-page-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex: 0 0 auto; }
.tree-page-heading > div { display: flex; align-items: baseline; gap: 16px; }
.tree-page-heading h1 { font: 600 24px/1.4 "SimSun", serif; white-space: nowrap; }
.tree-page-heading .muted { font-size: 12px; }
.tree-page-heading .inline-search { margin: 0; width: min(430px, 40vw); gap: 7px; }
.tree-page-heading input { height: 34px; padding: 5px 10px; }
.tree-page-heading .button { min-height: 34px; white-space: nowrap; padding: 4px 13px; }
.view[data-page="tree"] .search-results { margin: 0; max-height: 100px; overflow-y: auto; flex: 0 0 auto; }
.tree-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 12px; flex: 1 1 auto; min-height: 0; }
.tree-panel { min-width: 0; height: 100%; display: flex; flex-direction: column; border-radius: 12px; }
.tree-toolbar { flex: 0 0 auto; padding: 5px 10px; gap: 5px 12px; }
.tree-toolbar-heading { display: flex; align-items: center; gap: 8px; }
.tree-toolbar-heading strong { margin: 0; font-size: 15px; }
.tree-toolbar-heading small { color: var(--muted); font-size: 11px; }
.tree-toolbar select { height: 30px; padding: 4px 7px; }
.tree-controls { gap: 6px 9px; }
.tree-controls .button { min-height: 30px; padding: 4px 9px; }
.tree-controls .button.active { border-color: var(--green); background: var(--sage); }
.tree-control-group { display: flex; align-items: center; gap: 5px; }
.tree-selection-bar { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; padding: 3px 12px; border-bottom: 1px solid var(--line); font-size: 12px; }
.tree-selection-trail { color: var(--muted); font-size: 11px; }
.tree-selection-bar .button { min-height: 28px; font-size: 12px; padding: 3px 9px; margin-left: auto; }
.tree-viewport { height: auto; min-height: 180px; flex: 1 1 auto; }
.tree-status { padding: 4px 10px; flex: 0 0 auto; font-size: 10px; line-height: 1.5; }
.tree-help { margin-left: 12px; }
.tree-workspace.is-expanded { position: fixed; inset: 0; z-index: 1000; padding: 10px; background: var(--bg); height: 100dvh; }
body.tree-reading-expanded { overflow: hidden; }
.tree-detail-dock { min-width: 0; min-height: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.tree-detail-empty { padding: 25px; color: var(--muted); font-size: 13px; }
.tree-detail-empty h2 { color: var(--green); font: 600 24px/1.5 "SimSun", serif; margin-bottom: 12px; }
.tree-detail-empty .button { margin-top: 20px; }
.person-dialog.tree-inline { position: relative; inset: auto; margin: 0; width: 100%; height: 100%; max-height: none; max-width: none; border: 0; padding: 0 18px 30px; box-shadow: none; overflow-y: auto; }
.person-dialog.tree-inline .drawer-head { padding: 9px 0; }
.person-dialog.tree-inline .person-title { padding: 15px 0; }
.person-dialog.tree-inline .person-title h2 { font-size: 27px; }
.person-dialog.tree-inline .action-row { gap: 6px; }
.person-dialog.tree-inline .action-row .button { font-size: 12px; padding: 6px 9px; min-height: 34px; }
.person-dialog.tree-inline .detail-section dl { display: block; }
.person-dialog.tree-inline .detail-section dt { margin-top: 12px; margin-bottom: 5px; font-size: 12px; }
.tree-relationship-tools { flex: 0 0 auto; border: 1px solid var(--line); border-radius: 9px 9px 0 0; background: var(--paper); max-height: 45vh; overflow-y: auto; }
.tree-relationship-tools > summary { cursor: pointer; padding: 7px 14px; font-size: 13px; font-weight: 600; }
.tree-relationship-tools > summary span { font-weight: 400; color: var(--muted); margin-left: 18px; font-size: 12px; }
.tree-relationship-tools .relationship-panel { margin: 0; border: 0; padding: 15px; }
.tree-relationship-tools h2 { font-size: 20px; }
.view[data-page="archive"] { animation: none; }
@media (max-width: 1200px) {
  .tree-page-heading > div > .muted { display: none; }
  .tree-workspace { grid-template-columns: minmax(0, 1fr) 305px; }
  .entry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1050px) {
  .tree-workspace { grid-template-columns: minmax(0, 1fr); }
  .tree-detail-dock { display: none; }
  .main-nav { gap: 5px; }
  .main-nav > a { padding: 7px 12px; }
}
@media (max-width: 700px) {
  .main-nav { padding-bottom: 7px; }
  .main-nav > a { padding: 6px 12px; }
  .home-intro { grid-template-columns: 1fr; gap: 12px; }
  .origin-preview blockquote { font-size: 20px; }
  .entry-grid { grid-template-columns: 1fr; }
  .entry-card { padding: 20px; }
  .place-tags { margin: 18px 0; gap: 7px; }
  .place-tags span { padding: 5px 13px; font-size: 13px; }
  body[data-view="tree"] .site-main, body[data-view="archive"] .site-main { padding: 8px 8px 0; }
  body[data-view="tree"] .site-main { height: auto; }
  .view[data-page="tree"] { height: auto; gap: 8px; }
  .tree-page-heading { display: block; }
  .tree-page-heading h1 { font-size: 21px; margin: 2px 0 8px; }
  .tree-page-heading .inline-search { width: 100%; }
  .tree-workspace { flex: none; height: max(540px, calc(100dvh - var(--site-header-height) - 150px)); }
  .tree-viewport { min-height: 250px; }
  .tree-toolbar { padding: 8px; }
  .tree-toolbar-heading small { display: none; }
  .tree-selection-trail { display: none; }
  .tree-help { display: none; }
  .tree-status { font-size: 10px; }
  .tree-relationship-tools { max-height: none; }
  .tree-relationship-tools > summary span { display: none; }
}

/* The original demo's lightweight family cards and gently curved branches. */
.tree-page-heading, .tree-page-heading > div { display: contents; }
.tree-page-heading .muted, .tree-toolbar-heading { display: none; }
.tree-workspace { grid-template-columns: minmax(0, 1fr) 300px; }
.tree-panel, .tree-detail-dock { border-radius: 18px; }
.tree-panel { overflow: visible; }
.tree-toolbar { position: relative; padding: 10px 12px; gap: 8px; background: #fffefb; border-radius: 18px 18px 0 0; z-index: 5; }
.tree-toolbar #treeSearchForm { flex: 1 1 180px; min-width: 210px; width: auto; margin: 0; gap: 6px; }
.tree-toolbar #treeQuery { width: 100%; max-width: none; min-width: 0; height: 38px; padding: 8px 11px; border-radius: 10px; font-size: 13px; }
.tree-toolbar #treeSearchForm .button { min-height: 38px; padding: 6px 11px; border-radius: 10px; font-size: 13px; white-space: nowrap; }
.tree-controls { display: contents; }
.tree-controls .button { min-height: 36px; padding: 6px 11px; border-radius: 10px; font-size: 12px; }
.tree-controls .button.active { color: white; background: var(--green); border-color: var(--green); }
.tree-control-group { gap: 6px; flex-wrap: wrap; }
.tree-navigation-controls { margin-left: auto; }
.tree-selection-bar { gap: 8px; min-height: 30px; background: #fcfdf8; }
.tree-selection-trail { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-viewport { background: radial-gradient(#c0d4bf .8px, transparent .8px) 0 0 / 28px 28px; }
.tree-stage path { stroke: #bfd2bc; stroke-width: 1.5; }
.tree-stage path.main-line { stroke: #64a777; stroke-width: 2; }
.tree-stage path.side-line { stroke: #c6d7c1; }
.tree-stage path.special-line { stroke: #bd9a67; stroke-dasharray: 5 4; }
.tree-person { width: 134px; height: 70px; padding: 10px 6px 7px; border: 1px solid #ccddcb; border-top: 2px solid #80ab87; border-radius: 9px; background: linear-gradient(#fff, #f9fcf8); box-shadow: 0 3px 7px #264e3410; }
.tree-person small { color: #81927e; font-size: 10px; line-height: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tree-person strong { color: #183b2c; font: 700 16px / 26px "SimSun", "Songti SC", serif; }
.tree-person.main-line { border-top-color: #4d9963; }
.tree-person.selected { border: 1.5px solid #2f6847; border-top: 2px solid #2f6847; background: #eaf3e6; }
.tree-person.uncertain { border-top-color: #b89e75; }
.tree-toggle { width: 21px; height: 21px; font-size: 15px; background: #fffefa; border-color: #bbceaf; box-shadow: 0 2px 4px #284e3410; }
.tree-status { border-radius: 0 0 18px 18px; background: #fffefb; line-height: 1.7; }
.tree-more-controls { position: static; flex: 0 0 auto; }
.tree-more-controls > summary { list-style: none; cursor: pointer; padding: 7px 10px; border: 1px solid #c6d2c1; border-radius: 10px; font-size: 12px; background: #fffefa; white-space: nowrap; }
.tree-more-controls > summary::-webkit-details-marker { display: none; }
.tree-more-controls > summary::after { content: " ▾"; }
.tree-more-body { position: absolute; right: 10px; top: calc(100% + 8px); width: min(420px, 80vw); padding: 14px; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 28px #173b2f24; background: var(--paper); display: flex; flex-wrap: wrap; gap: 8px; }
.tree-more-body .tree-control-group { flex-wrap: wrap; }
.tree-more-body select { max-width: 100%; height: 35px; }
.tree-more-body .button { min-height: 35px; }
@media (max-width: 1050px) {
  .tree-workspace { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
  .tree-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; padding: 9px; gap: 7px; }
  .tree-toolbar #treeSearchForm { grid-column: 1 / -1; min-width: 0; width: 100%; }
  .tree-navigation-controls { grid-column: 1; grid-row: 2; margin-left: 0; min-width: 0; flex-wrap: nowrap; gap: 4px; }
  .tree-navigation-controls .button { padding-inline: 7px; }
  .tree-controls .button { min-height: 34px; padding: 5px 9px; font-size: 11px; }
  .tree-view-controls { grid-column: 1 / -1; grid-row: 3; flex: none; flex-wrap: nowrap; gap: 6px; }
  .tree-more-controls { grid-column: 2; grid-row: 2; margin-left: 0; }
  .tree-more-controls > summary { padding: 7px 8px; font-size: 11px; }
  .tree-selection-bar { flex-wrap: wrap; }
  .tree-workspace { height: max(590px, calc(100dvh - var(--site-header-height) - 70px)); }
  .tree-more-body { width: min(340px, 86vw); }
}

/* The unbound visitor starts with the shared genealogy, not a person's dock. */
@media (min-width: 1051px) {
  .tree-workspace { grid-template-columns: minmax(0, 1fr); }
  .tree-detail-dock { display: none; }
  .tree-workspace.has-tree-detail { grid-template-columns: minmax(0, 1fr) 300px; }
  .tree-workspace.has-tree-detail .tree-detail-dock { display: block; }
}
.tree-reference { position: absolute; width: 134px; height: 70px; min-height: 70px; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 8px 6px; border: 1px dashed #9dac95; border-top: 2px solid #9dac95; border-radius: 9px; background: #faf9f1; color: var(--ink); font-family: inherit; cursor: pointer; box-shadow: 0 3px 7px #264e3410; text-align: center; }
.tree-reference small { color: #77846e; font-size: 10px; line-height: 16px; white-space: nowrap; }
.tree-reference strong { font: 700 16px / 26px "SimSun", "Songti SC", serif; }
.tree-reference:hover, .tree-reference:focus-visible { background: #edf2e5; outline: 2px solid #73976c; outline-offset: 2px; }
.source-person-link { border-style: dashed; }
.tree-volume-note { position: absolute; transform: translateX(-50%); padding: 6px 14px; border: 1px solid #c4b591; border-radius: 20px; color: #75613d; background: #fff9e9; font: 600 15px / 1.5 "SimSun", "Songti SC", serif; white-space: nowrap; }
.tree-stage path.tree-volume-bracket { fill: none; stroke: #aa9166; stroke-width: 2; }
.tree-stage path.sibling-brace { fill: none; stroke: #95ac88; stroke-width: 1.5; }
.tree-sibling-note { position: absolute; color: #6e7f65; font-size: 12px; white-space: nowrap; }
.tree-navigation-controls { max-width: 100%; }
.candidate-controls { padding: 22px; }
.candidate-search-form { display: flex; align-items: end; gap: 12px; margin-bottom: 16px; }
.candidate-search-form .search-field { flex: 1; min-width: 0; }
.candidate-search-form input { width: 100%; }
.candidate-guidance { color: var(--muted); font-size: 12px; line-height: 1.8; margin-top: 12px; }
.candidate-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.candidate-card { min-width: 0; padding: 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.candidate-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.candidate-card-heading small, .candidate-meta { color: var(--muted); font-size: 12px; }
.candidate-card h2 { font: 600 25px / 1.5 "SimSun", "Songti SC", serif; margin-bottom: 4px; }
.candidate-family { color: #486050; font-size: 12px; line-height: 1.9; overflow-wrap: anywhere; margin-top: 8px; }
.candidate-reason { font-size: 12px; line-height: 1.8; color: #7b6845; padding-top: 12px; margin-top: 12px; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.candidate-card .action-row .button { min-height: 36px; font-size: 12px; }
.candidate-page-link { margin-left: 12px; min-height: 32px; padding: 4px 10px; font-size: 12px; }
@media (max-width: 700px) {
  .candidate-grid { grid-template-columns: minmax(0, 1fr); }
  .candidate-controls, .candidate-card { padding: 16px; }
  .candidate-search-form { align-items: stretch; flex-direction: column; }
  .candidate-card-heading { align-items: start; }
  .candidate-card-heading .badge { white-space: normal; }
}
@media (max-width: 700px) {
  .tree-navigation-controls { overflow-x: auto; scrollbar-width: thin; }
  .tree-navigation-controls .button { flex: 0 0 auto; }
  .tree-top-sibling strong { font-size: 14px; }
}

/* Mobile reading controls: search, three main actions, then zoom/fullscreen. */
.tree-mobile-tools { display:flex;gap:8px;flex-wrap:wrap; }
.tree-reference.tree-gap { border:1px dashed #a29575;background:#f6f2e8;color:#665d47;box-shadow:none; }
.lib-page-cells .lib-cell-generation{margin:0 0 20px}
.lib-page-cells .lib-cell-generation>h4{margin:0 0 6px;font-size:17px;line-height:1.65;color:var(--green)}
.lib-page-cells .lib-cell-list{margin:0;padding-left:1.35em}
.lib-page-cells .lib-person-cell{margin:0 0 7px;padding:0;background:none;border:0;border-radius:0;line-height:1.9;overflow-wrap:anywhere}
.lib-page-cells .lib-cell-prose{margin:0}
.lib-page-cells .lib-cell-name{font-weight:600}
.lib-page-cells .lib-cell-notes{font-size:13px;margin:0 0 3px;color:var(--muted)}
.lib-page-cells .lib-cell-notes summary{cursor:pointer;color:var(--green);width:fit-content}
.lib-page-cells .lib-cell-notes p{margin:2px 0 0;line-height:1.7}
.tree-gap strong { font-size:15px; }
.tree-unlinked-note { position:absolute;border:1px dashed #bda67c;border-radius:7px;background:#fff9ed;color:#75592e;padding:5px 8px;font-size:12px;white-space:nowrap; }
.tree-viewport { user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;overscroll-behavior:contain; }
.tree-fullscreen-controls[hidden] { display:none!important; }
.tree-fullscreen-controls { position:absolute;z-index:50;top:max(12px,env(safe-area-inset-top));right:max(12px,env(safe-area-inset-right));display:flex;gap:8px; }
.tree-fullscreen-controls .button { min-height:44px;padding:9px 17px;background:#fffefaf2;border:1px solid #aac3a5;border-radius:12px;box-shadow:0 3px 16px #173b2f1a;color:var(--green);font-size:14px; }
.tree-fullscreen-surface { position:fixed;inset:0;z-index:1000;overflow:hidden;background:var(--paper); }
.tree-workspace.is-expanded { display:block!important;position:absolute;inset:auto;padding:0;min-height:0;z-index:1000;overflow:hidden;border-radius:0;background:var(--paper); }
.tree-workspace.is-expanded .tree-panel { height:100%;border:0;border-radius:0;overflow:hidden; }
.tree-workspace.is-expanded .tree-toolbar,.tree-workspace.is-expanded .tree-selection-bar,.tree-workspace.is-expanded .tree-status,.tree-workspace.is-expanded .tree-detail-dock { display:none!important; }
.tree-workspace.is-expanded .tree-viewport { width:100%;height:100%;min-height:0;border-radius:0; }
.tree-workspace.tree-turning { will-change:transform,opacity; }
.tree-workspace.tree-turning .tree-viewport { pointer-events:none; }
.tree-screen-detail { position:absolute;inset:0 0 0 auto;width:min(420px,100%);height:100%;max-height:100%;z-index:40; }
.tree-screen-detail .drawer-head { padding-top:68px; }
@media(max-width:700px){
  .tree-navigation-controls { grid-column:1/-1;grid-row:2;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;overflow:visible; }
  .tree-navigation-controls .button { width:100%;min-width:0;font-size:12px;padding:7px 5px;min-height:42px; }
  .tree-toolbar { grid-template-columns:minmax(0,1fr) auto;gap:8px; }
  .tree-view-controls { grid-column:1;grid-row:3;gap:5px;min-width:0; }
  .tree-view-controls .button { min-height:40px;min-width:36px;font-size:13px; }
  .tree-view-controls .zoom-text { width:35px;flex:none; }
  .tree-view-controls #treeExpand { margin-left:auto;padding-inline:10px;white-space:nowrap; }
  .tree-more-controls { grid-column:2;grid-row:3; }
  .tree-more-controls>summary { min-height:40px;display:flex;align-items:center;padding:7px 10px;font-size:12px; }
  .tree-toolbar #treeSearchForm input,.tree-toolbar #treeSearchForm .button { min-height:42px; }
  .tree-selection-label { min-width:0; }
  .tree-fullscreen-controls .button { min-height:44px; }
}

/* Accepted family contributions stay distinct from unresolved source doubts. */
.family-update-note { margin-top:9px;font-size:12px;line-height:1.85; }
.family-update-note>summary { display:list-item;width:fit-content;cursor:pointer;padding:2px 9px;border-radius:4px;background:#eaf1e5;color:#4f7352; }
.family-update-note>p { margin:8px 0 0;font-size:12px;overflow-wrap:anywhere; }
.family-update-credit { color:var(--muted); }
.family-update-contributor { border:0;background:none;color:var(--green);text-decoration:underline;text-underline-offset:3px;padding:0;font:inherit; }
.family-parentage-note { margin-top:12px; }
.person-card>.family-update-badge { grid-column:1;justify-self:start;display:inline-block;width:fit-content;margin-top:9px;padding:2px 8px;border-radius:3px;background:#eaf1e5;color:#4f7352;font-size:10px;line-height:1.8; }

/* 2026-10-18 读者可读性：长辈在手机上阅读，正文与说明字号放大；输入框不小于16px，避免手机浏览器点开时自动放大页面。 */
.stats-strip[data-count="3"] { grid-template-columns: repeat(3, 1fr); }
.main-nav { position: relative; }
@media (max-width: 700px) {
  body { font-size: 16px; }
  .brand small { font-size: 11px; }
  .header-actions .quiet-button { font-size: 13px; padding: 4px 6px; }
  .main-nav > a { font-size: 15px; padding: 7px 13px; }
  .main-nav.more-right { -webkit-mask-image: linear-gradient(to right, #000 82%, transparent); mask-image: linear-gradient(to right, #000 82%, transparent); }
  .main-nav.more-left.more-right { -webkit-mask-image: linear-gradient(to right, transparent, #000 10%, #000 82%, transparent); mask-image: linear-gradient(to right, transparent, #000 10%, #000 82%, transparent); }
  .main-nav.more-left:not(.more-right) { -webkit-mask-image: linear-gradient(to right, transparent, #000 10%); mask-image: linear-gradient(to right, transparent, #000 10%); }
  .eyebrow { font-size: 12px; }
  .hero-intro { font-size: 15px; }
  .hero-links { font-size: 14px; }
  .hero-caption { font-size: 12px; }
  .hero-search input, .hero-search button { font-size: 16px; }
  .stat span { font-size: 12px; }
  .entry-no { font-size: 12px; }
  .entry-card p, .paper-panel p, .muted { font-size: 15px; }
  .entry-arrow { font-size: 12px; }
  .source-note { font-size: 13px !important; }
  input, select, textarea, .filter-row select, .tree-toolbar #treeQuery, .tree-page-heading input { font-size: 16px; }
  .search-field > span, .filter-row label, .relationship-panel label { font-size: 14px; }
  .person-card small { font-size: 13px; }
  .person-card p { font-size: 14px; }
  .badge { font-size: 12px; }
  .list-heading, .pagination { font-size: 14px; }
  .candidate-card-heading small, .candidate-meta, .candidate-family, .candidate-reason { font-size: 14px; }
  .candidate-card .action-row .button { font-size: 14px; min-height: 42px; }
  .detail-section h3 { font-size: 15px; }
  .detail-section dl { grid-template-columns: 7em 1fr; }
  .detail-section p, .detail-section dl { font-size: 15px; }
  .person-title small { font-size: 13px; }
  .person-dialog .action-row .button, .detail-section .person-links .button { font-size: 14px; min-height: 40px; }
  .history-event p { font-size: 15px; }
  .history-event small { font-size: 13px; }
  .generation-cell small { font-size: 12px; }
  .reading-article p { font-size: 17px; }
  .tree-status { font-size: 12px; }
  .site-footer { font-size: 13px; }
  .green-panel small { font-size: 13px; }
}

/* 2026-10-23 两人关系查询移到人物名录（王旭鹏：世系树页只查世系） */
[data-page="people"] .tree-relationship-tools{margin:14px 0;border-radius:12px;max-height:none}

/* 2026-10-26 展开全谱的生长动画（website/demo-tree.js 的 playGrowth，王旭鹏确认第三版）：
   孩子从父亲卡片处沿连线长出来；卡片自己泛金光；收尾零星闪亮。计数在树上面单独一层。 */
.tree-stage.tree-growing{will-change:transform}
.tree-growing .tree-person,.tree-growing .tree-reference{opacity:0;transform:translate(var(--dx,0px),var(--dy,0px)) scale(.3);transition:opacity .6s ease,transform .8s cubic-bezier(.22,.8,.25,1)}
.tree-growing .tree-toggle,.tree-growing .tree-unlinked-note,.tree-growing .tree-volume-note{opacity:0;transition:opacity .6s}
.tree-growing .grown{opacity:1;transform:none}
.tree-growing path[data-child-id]{opacity:0;transition:opacity .5s}
.tree-growing path.family-line[data-child-id]{opacity:1;stroke-dasharray:1;stroke-dashoffset:1;transition:stroke-dashoffset .8s cubic-bezier(.22,.8,.25,1)}
.tree-growing path.grown{opacity:1;stroke-dashoffset:0}
.tree-person.bloom,.tree-reference.bloom{animation:treeBloom 1.25s ease-out}
.tree-person.tree-twinkle,.tree-reference.tree-twinkle{animation:treeTwinkle 1.2s ease-in-out}
@keyframes treeBloom{0%{background:#ffe9a8;border-color:#e0ad45;box-shadow:0 0 0 3px #f2cf75,0 0 34px 12px #f6d88dcc}100%{}}
@keyframes treeTwinkle{0%,100%{}40%{background:#fff0c2;border-color:#e3b450;box-shadow:0 0 0 3px #f2d07a,0 0 30px 10px #f7dc96bb}}
.tree-fx{position:absolute;inset:0;pointer-events:none;overflow:hidden;z-index:6}
.tree-fx-counter{position:absolute;left:14px;top:12px;display:flex;align-items:baseline;gap:8px;padding:8px 14px;border-radius:12px;background:#173b2fe6;color:#f3e3bb;box-shadow:0 6px 22px #0f2a2033;font-family:"SimSun","Songti SC",serif;transition:opacity .6s,transform .6s,box-shadow .6s}
.tree-fx-counter strong{font:700 26px/1 Georgia,"SimSun",serif;color:#ffe3a0;min-width:2.6em;text-align:right;font-variant-numeric:tabular-nums}
.tree-fx-gen{font-size:15px;letter-spacing:.06em;display:inline-block}
.tree-fx-gen.flip{animation:treeFlip .35s ease-out}
.tree-fx-unit{font-size:13px;color:#d9c79b}
.tree-fx-counter.done{box-shadow:0 0 0 1px #e5c77a,0 0 26px #f0cd7a77}
.tree-fx-counter.leave{opacity:0;transform:translateY(-8px)}
@keyframes treeFlip{0%{transform:translateY(60%);opacity:0}100%{transform:none;opacity:1}}
@media(prefers-reduced-motion:reduce){.tree-fx{display:none}}

/* 2026-10-26 世系树“← 返回”（双击看上下家系等换视图后回到之前） */
.tree-selection-bar .tree-view-back{min-height:28px;padding:3px 10px;font-size:12px;font-weight:600;color:#fff;background:var(--green);border-color:var(--green);flex:none}
