
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.reveal{opacity:1;transform:none;transition:none}.btn,.theme-card{transition:none}}

/* ShelIao Wang editorial biographies */
.preface-copy p{margin:0 0 22px;line-height:2.65;font-size:15px;color:#5e594f}.preface-copy .preface-quote{font:500 clamp(17px,2vw,25px)/1.9 var(--serif);color:var(--green);padding:20px 0 8px;border-top:1px solid var(--line)}.preface-copy .oral-note,.source-note{font:400 11px/1.9 var(--sans);color:var(--muted);letter-spacing:.02em}.inscription-stamp{font:500 11px var(--serif);display:inline-block;margin-top:31px;padding:10px 16px;border:1px solid var(--gold);color:var(--brown);letter-spacing:.2em}.biography-section{padding:112px 0;border-bottom:1px solid var(--line)}.biography-alt{background:#e8e0d2}.biography-head{display:flex;justify-content:space-between;gap:16px;align-items:center;border-bottom:1px solid var(--line);padding-bottom:23px}.biography-index{color:var(--brown);font:500 13px var(--serif);letter-spacing:.19em}.biography-grid{display:grid;grid-template-columns:minmax(240px,.8fr) 1.2fr;gap:clamp(35px,7vw,125px);padding-top:70px}.biography-title{position:sticky;top:125px;height:fit-content}.title-seal{display:inline-grid;width:52px;height:52px;place-items:center;border:1px solid var(--gold);color:var(--brown);font:600 22px var(--serif)}.biography-title h2{font:400 clamp(43px,5vw,76px)/1.45 var(--serif);letter-spacing:.04em;margin:28px 0}.biography-title h2 small{display:block;font:600 10px var(--latin);letter-spacing:.22em;color:var(--gold);margin-top:10px}.biography-subtitle{font:400 18px/2 var(--serif);color:var(--green);max-width:320px}.biography-rule{height:1px;width:80px;background:var(--gold);margin:32px 0}.biography-aside{font-size:13px;line-height:2.1;color:var(--muted);max-width:350px}.biography-text h3{font:500 22px/1.6 var(--serif);margin:0 0 15px;color:var(--green)}.biography-text>p{font-size:15px;line-height:2.7;color:#5e594f;margin:0 0 41px}.biography-text>blockquote{position:relative;margin:25px 0 37px;padding:29px 30px;border-left:2px solid var(--gold);font:400 clamp(18px,2vw,25px)/2 var(--serif);color:var(--green);background:#f0e9df}.biography-text>blockquote small{display:block;font:400 11px var(--sans);color:var(--muted);text-align:right}.biography-alt .biography-text>blockquote{background:#f3eee4}.biography-text .source-note{margin-top:29px;border-top:1px solid var(--line);padding-top:15px;font:400 11px/2 var(--sans);color:var(--muted)}
@media(max-width:920px){.biography-grid{grid-template-columns:1fr;gap:28px}.biography-title{position:static}.biography-title h2{margin:16px 0}.biography-rule{margin:20px 0}.biography-section{padding:72px 0}}
@media(max-width:720px){.preface-copy p{font-size:14px;line-height:2.4}.biography-text>p{font-size:14px;line-height:2.5;margin-bottom:30px}.biography-title h2{font-size:44px}.biography-head{padding-bottom:16px}.biography-index{font-size:10px}.biography-grid{padding-top:39px}}

/* Navigation and reading refinements */
section[id], .intro-block[id]{scroll-margin-top:110px}.nav-links{gap:clamp(11px,1.7vw,28px)}.nav-links a{font-size:11px}
@media (max-width:1100px){.nav{height:auto;min-height:76px;flex-wrap:wrap;padding:13px 23px}.menu-toggle{display:block}.nav-right{display:none}.nav-links{display:none;order:3;width:100%;margin:0;padding:12px 0;flex-direction:column;align-items:stretch;gap:0;border-top:1px solid var(--line)}.nav-links.open{display:flex}.nav-links a{font-size:13px;padding:10px 0}}

/* Editorial navigation & long-form reading */
html{scroll-padding-top:105px}section[id],article[id],.intro-block[id]{scroll-margin-top:105px}
.reading-progress{position:fixed;top:0;left:0;width:0;height:3px;z-index:100;background:var(--gold);pointer-events:none;transition:width .1s linear}
.biography-next{display:flex;gap:10px;align-items:center;justify-content:space-between;margin-top:24px;padding:24px 20px;border:1px solid #c8bcab;color:var(--green);transition:background .2s,border-color .2s}
.biography-next:hover{background:rgba(173,144,97,.10);border-color:var(--gold)}
.biography-next>span{font:500 10px var(--latin);letter-spacing:.07em;color:var(--brown)}
.biography-next strong{font:400 18px/1.5 var(--serif)}
.biography-next strong span{font:400 15px var(--latin)}
.backtotop{position:fixed;bottom:24px;right:25px;z-index:15;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;width:52px;height:52px;background:var(--green);border:1px solid var(--gold);box-shadow:0 8px 25px #00000018;color:#f4eee1;opacity:0;pointer-events:none;transform:translateY(12px);transition:opacity .25s,transform .25s}
.backtotop.shown{opacity:1;pointer-events:auto;transform:none}
.backtotop span:first-child{font:400 22px/1.1 var(--serif)}.backtotop span:last-child{font:500 8px/1.2 var(--latin);letter-spacing:.13em}
@media(max-width:720px){html{scroll-padding-top:82px}section[id],article[id],.intro-block[id]{scroll-margin-top:82px}.backtotop{right:14px;bottom:17px;width:44px;height:44px}.biography-next{align-items:flex-start;flex-direction:column;gap:9px}}
@media(prefers-reduced-motion:reduce){.reading-progress,.biography-next,.backtotop{transition:none}}

/* 家乘序與史傳閱讀字體層次 */
.family-preface{grid-template-columns:minmax(260px,.85fr) minmax(0,1.15fr);gap:clamp(35px,6vw,105px)}
.family-preface .preface-heading h2{font-size:clamp(42px,5.4vw,75px);line-height:1.5;letter-spacing:.055em}
.preface-side-note{margin-top:75px;color:var(--gold);font:400 16px/2.25 var(--serif);letter-spacing:.16em}
.family-preface .serif-manuscript>p:not(.oral-note){font:400 clamp(16px,1.48vw,20px)/2.5 var(--serif);letter-spacing:.045em;color:#3e4138;text-align:justify;margin:0 0 30px}
.preface-colophon{margin-top:47px;padding-top:34px;text-align:right}
.preface-colophon .colophon-rule{display:block;width:48px;height:1px;background:var(--gold);margin:0 0 28px auto}
.preface-colophon p{font:400 clamp(15px,1.4vw,19px)/2.4 var(--serif);letter-spacing:.045em;color:var(--green);text-align:justify;margin:0 0 12px}
.preface-colophon .colophon-seal{display:inline-block;padding:6px 11px;border:1px solid var(--gold);font:400 11px var(--serif);letter-spacing:.13em;color:var(--brown)}
.family-preface .serif-manuscript .oral-note{margin-top:37px;padding-top:17px;border-top:1px solid var(--line);font:400 11px/2 var(--sans);text-align:left}
.biography-text>p{font-family:var(--serif);letter-spacing:.028em;text-align:justify}
.chronicle-copy p{font-family:var(--serif);letter-spacing:.035em}
@media(max-width:900px){.family-preface{grid-template-columns:1fr}.preface-side-note{margin-top:22px}.family-preface .preface-heading h2{font-size:43px}}
@media(max-width:720px){.family-preface .serif-manuscript>p:not(.oral-note){font-size:16px;line-height:2.25;text-align:left}.preface-colophon p{font-size:15px;line-height:2.2;text-align:left}.preface-side-note{margin-top:18px}.biography-text>p{text-align:left}.chronicle-copy p{font-size:14px}}

/* Chapter-end commentary for the historical-biographical voice */
.compiler-verdict{margin:48px 0 24px;padding:33px clamp(20px,3vw,40px);border:1px solid rgba(173,144,97,.45);border-top:3px double var(--gold);background:linear-gradient(140deg,#f4efe4,#ebe2d3);position:relative}
.compiler-label{display:block;color:var(--brown);font:600 11px/1.5 var(--serif);letter-spacing:.18em;margin-bottom:15px}
.compiler-verdict p{color:var(--green);font:400 clamp(16px,1.6vw,19px)/2.35 var(--serif);margin:0 0 17px}
.compiler-verdict small{font:400 11px/1.8 var(--sans);color:var(--muted)}
.biography-alt .compiler-verdict{background:linear-gradient(135deg,#eee7da,#e5dcca)}
@media(max-width:720px){.compiler-verdict{margin-top:35px;padding:24px 20px}.compiler-verdict p{font-size:16px;line-height:2.3}}

/* 史傳全文不用標點 以行距與留白輔助閱讀 */
.preface-copy p,.biography-text>p,.chronicle-copy p,.compiler-verdict p{line-break:strict;overflow-wrap:anywhere;text-align:justify;text-justify:inter-ideograph}

/* Mobile editorial reading experience */
:root{--touch-height:48px}
.mobile-chapters{display:none}
@media(max-width:1100px){
  .nav{z-index:60}
  .menu-toggle{min-width:48px;min-height:48px;display:inline-flex;align-items:center;justify-content:center;gap:10px;border-radius:2px}
  .menu-toggle:after{content:"";display:block;width:14px;height:12px;border-top:1px solid currentColor;border-bottom:1px solid currentColor;box-shadow:inset 0 5px 0 -4px currentColor}
  .menu-toggle[aria-expanded="true"]:after{transform:rotate(45deg);border-bottom:0;box-shadow:none}
  .nav-links{padding:8px 0 14px;max-height:min(72svh,560px);overflow-y:auto;overscroll-behavior:contain}
  .nav-links a{min-height:48px;display:flex;align-items:center;font-size:14px;border-bottom:1px solid rgba(116,93,72,.11)}
  .nav-links a:last-child{border-bottom:0}
}
@media(max-width:720px){
  html{scroll-padding-top:calc(84px + env(safe-area-inset-top,0px))}
  body{padding-bottom:calc(66px + env(safe-area-inset-bottom,0px));overflow-x:clip}
  body:before{display:none}
  .nav{padding:10px max(18px,env(safe-area-inset-left,0px)) 10px max(18px,env(safe-area-inset-right,0px));min-height:69px;background:var(--linen);gap:10px}
  .brand{gap:10px;min-width:0}.crest{width:40px;height:42px;flex:0 0 auto;font-size:16px}.brand-copy strong{font-size:16px;white-space:nowrap}.brand-copy small{font-size:8px;letter-spacing:.11em}
  .menu-toggle{margin-left:auto;flex:0 0 auto;padding:9px 10px;font-size:13px}
  .nav-links{max-height:calc(100dvh - 92px);gap:0;border-top:1px solid var(--line)}
  .nav-links a{padding:10px 8px}
  .wrap{width:calc(100% - 40px)}
  .hero{min-height:0;display:flex;flex-direction:column}
  .hero-copy{padding:clamp(34px,7svh,55px) 22px 35px}
  .hero h1{margin:18px 0 15px}
  .display{font-size:clamp(43px,10.6vw,58px);line-height:1.35;letter-spacing:-.06em}
  .hero .intro{font-size:14px;line-height:2.0;max-width:38ch}
  .hero-cta{gap:11px;margin-top:24px;align-items:stretch}
  .hero-cta .btn{min-height:49px;padding:10px 19px;flex:1 1 175px;justify-content:center}
  .quiet-link{min-height:49px;display:inline-flex;align-items:center;justify-content:center;flex:1 1 140px;padding:10px 0}
  .hero-bottom{margin-top:25px;font-size:9px;letter-spacing:.1em}
  .hero-art{min-height:245px;height:clamp(235px,35svh,315px)}
  .hero-art:after{inset:15px}
  .hero-art .line-art{height:98%;max-height:345px;width:auto;max-width:100%}
  .art-corner{top:22px;right:24px;font-size:8px}
  .art-caption{bottom:20px;left:22px;font-size:8px;letter-spacing:.13em}
  .rule{padding:12px 0;font-size:9px;letter-spacing:.09em;gap:10px}
  .rule span:first-child{max-width:60%}
  .rule span:last-child{text-align:right}
  .intro-block{padding:54px 0 60px;gap:16px}
  .intro-block h2{margin-top:12px}
  .preface-copy p{font-size:16px;line-height:2.28;margin-bottom:22px;letter-spacing:.015em}
  .family-preface .serif-manuscript>p:not(.oral-note){font-size:16px;line-height:2.34;text-align:left}
  .preface-colophon{margin-top:25px}
  .dark-panel{padding:59px 0 67px}
  .section-heading{margin-bottom:27px}.section-heading h2{font-size:clamp(32px,8vw,45px);line-height:1.45}
  .section-heading p{font-size:13px;line-height:2.0;margin-top:12px}
  .theme-grid{display:flex;gap:12px;border:0;background:transparent;margin-right:-20px;padding:0 20px 9px 0;overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x mandatory;scroll-padding-inline:4px;-webkit-overflow-scrolling:touch;scrollbar-width:none}
  .theme-grid::-webkit-scrollbar{display:none}
  .theme-card{scroll-snap-align:start;flex:0 0 min(82vw,310px);min-height:225px;padding:23px;background:#214a3d;border:1px solid rgba(231,213,171,.28)}
  .theme-card:hover{background:#214a3d;transform:none}
  .theme-card h3{margin:21px 0 9px;font-size:29px}
  .theme-card p{font-size:13px;line-height:2}
  .story-section{padding:70px 0}
  .biography-section{padding:66px 0}
  .biography-grid{gap:17px;padding-top:33px}
  .biography-title h2{font-size:clamp(39px,10vw,53px);line-height:1.35}
  .biography-title h2 small{letter-spacing:.12em;overflow-wrap:anywhere}
  .biography-aside{font-size:13px;line-height:2.1}
  .biography-text h3{font-size:22px;margin-bottom:12px}
  .biography-text>p{font-size:16px;line-height:2.28;letter-spacing:.015em;margin-bottom:29px;text-align:left}
  .biography-text>blockquote{margin:18px 0 25px;padding:21px 22px;font-size:19px;line-height:2.05}
  .compiler-verdict{margin:30px 0 22px}
  .compiler-verdict p{font-size:17px;line-height:2.2}
  .chronicle-item{padding:30px 0;gap:9px}
  .chronicle-copy h3{font-size:clamp(25px,7vw,31px);line-height:1.48}
  .chronicle-copy p{font-size:15px;line-height:2.15}
  .earth{padding:66px 0}
  .origin{min-height:270px;padding:26px}
  .sources{padding:67px 0}
  .source-list p{gap:14px}
  .footer{padding:45px 0 calc(35px + env(safe-area-inset-bottom,0px))}
  .footer-title{font-size:34px}
  .footer-links a{min-height:44px;display:inline-flex;align-items:center}
  .backtotop{bottom:calc(83px + env(safe-area-inset-bottom,0px));right:13px;width:46px;height:46px}
  .reveal{opacity:1;transform:none;transition:none}
  .mobile-chapters{display:flex;position:fixed;left:0;right:0;bottom:0;z-index:48;height:calc(64px + env(safe-area-inset-bottom,0px));padding:6px max(10px,env(safe-area-inset-left,0px)) calc(7px + env(safe-area-inset-bottom,0px)) max(10px,env(safe-area-inset-right,0px));background:#f2eee5fa;border-top:1px solid #d4c5ae;box-shadow:0 -7px 24px #0b2b210c;gap:4px}
  .mobile-chapters a{min-width:0;flex:1;display:flex;align-items:center;justify-content:center;text-align:center;padding:7px 3px;min-height:44px;color:#675a46;font:500 12px/1.3 var(--serif);border-radius:3px;white-space:nowrap}
  .mobile-chapters a[aria-current="location"]{color:#f7f1e5;background:var(--green)}
  #about,#caiyun,#juwan,#chronicle,#origins,#sources{scroll-margin-top:calc(90px + env(safe-area-inset-top,0px))}
}