:root{--ink:#193b39;--muted:#6d7d77;--line:#dce5dd;--paper:#fafbf6;--green:#176353}*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font:16px/1.7 system-ui,sans-serif}a{color:var(--green);text-decoration:none}a:hover{text-decoration:underline}header{display:flex;justify-content:space-between;align-items:center;padding:22px 5%;border-bottom:1px solid var(--line);background:#fff}nav{display:flex;gap:24px}.brand{font-size:24px;font-weight:750}.brand small{display:block;font-size:10px;letter-spacing:3px;color:var(--muted)}main{max-width:1250px;margin:auto;padding:40px 28px}h1{font-size:clamp(28px,4vw,46px);line-height:1.3;font-weight:650}h2{font-size:24px}p{overflow-wrap:anywhere}.eyebrow{letter-spacing:3px;font-size:12px;color:var(--green)}.hero{padding:20px 0 35px;max-width:850px}.muted,small{color:var(--muted)}input,textarea,select,button{font:inherit}input,textarea,select{padding:11px 14px;border:1px solid var(--line);border-radius:8px;background:white;max-width:100%;width:100%}textarea{min-height:120px}button,.button{border:0;border-radius:8px;background:var(--green);color:white;padding:11px 20px;cursor:pointer;display:inline-block}button:disabled{opacity:.5;cursor:wait}.secondary{background:#e7eee6;color:var(--ink)}.danger{background:#a44639}.toolbar{display:flex;gap:12px;flex-wrap:wrap;margin-bottom:28px}.toolbar input{flex:1;min-width:180px}.tabs{display:flex;gap:8px;flex-wrap:wrap}.tabs button.active{background:var(--ink);color:white}.grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px;margin-top:25px}.card,.panel{background:white;border:1px solid var(--line);border-radius:14px;padding:24px}.card{display:flex;flex-direction:column;gap:12px}.card h2{margin:0;font-size:21px}.cover{height:200px;background:#e8eee3;border-radius:8px;display:flex;align-items:center;justify-content:center;overflow:hidden;font-size:60px}.cover img{width:100%;height:100%;object-fit:contain}.card .button{margin-top:auto;text-align:center}.layout{display:grid;grid-template-columns:280px minmax(0,1fr);gap:34px;margin-top:24px}.toc{align-self:start;position:sticky;top:20px;max-height:80vh;overflow:auto}.toc a{display:block;padding:9px 12px;border-radius:6px;font-size:14px}.toc a.current{background:#e7eee6;font-weight:bold}.reading{background:white;border:1px solid var(--line);border-radius:14px;padding:35px 45px;min-width:0}.content{font-size:18px;line-height:1.95}.content img{max-width:100%;height:auto;display:block;margin:24px auto}.content table{display:block;overflow:auto}.content h1{font-size:30px}.content h2{font-size:24px}.content p{margin:1em 0}.chapter-nav{display:flex;justify-content:space-between;gap:15px;margin:30px 0 0}.form{display:grid;gap:16px}.admin-grid{display:grid;grid-template-columns:1fr 1fr;gap:24px}.admin-row{padding:15px 0;border-bottom:1px solid var(--line)}.admin-row .toolbar{margin:12px 0 0}.result{display:block;padding:20px;background:white;border:1px solid var(--line);margin-bottom:12px;border-radius:10px}.result p{margin-bottom:0;color:var(--muted)}#notice{position:fixed;bottom:20px;left:50%;transform:translateX(-50%);background:var(--ink);color:white;padding:12px 24px;border-radius:8px;display:none;max-width:90vw}.answer{white-space:pre-wrap}.sources a{display:block}.mobile-toc{display:none}@media(max-width:850px){.grid{grid-template-columns:repeat(2,minmax(0,1fr))}.admin-grid{grid-template-columns:1fr}.layout{grid-template-columns:220px minmax(0,1fr)}.reading{padding:25px}}@media(max-width:600px){header{padding:16px 20px;gap:15px}.brand{font-size:20px}.brand small{font-size:8px}nav{gap:12px;font-size:13px}main{padding:24px 16px}.grid{grid-template-columns:1fr}.layout{display:block}.toc{position:static;max-height:260px;margin-bottom:20px;display:none}.toc.open{display:block}.mobile-toc{display:block;margin:16px 0}.reading{padding:22px 18px}.content{font-size:17px}.hero{padding-top:0}.chapter-nav .button{padding:10px 12px;font-size:14px}}
/* Flight editorial theme, built on Tabler UI */
:root{--ink:#152d3b;--muted:#73808a;--line:#e2e7e9;--paper:#f7f8fa;--green:#175b6f;--tblr-primary:#175b6f;--tblr-primary-rgb:23,91,111}body{font-family:Inter,"PingFang SC","Microsoft YaHei",system-ui,sans-serif;background:var(--paper)}header{height:96px;padding:0 max(5%,calc((100vw - 1440px)/2));background:#fff}.brand{display:flex;align-items:center;gap:12px;flex-wrap:wrap;font-weight:700;letter-spacing:1px}.brand small{margin-left:12px;font-size:9px;letter-spacing:2px}.brand-symbol{display:inline-grid;place-items:center;width:42px;height:42px;border-radius:50%;background:#153a4a;color:#fff;font-size:30px}nav a{font-size:14px;font-weight:550}nav a:last-child{padding:8px 16px;border:1px solid var(--line);border-radius:5px}main{max-width:1440px;padding:55px 48px}.shelf-page{max-width:none;padding:0}.hero{position:relative;max-width:none;min-height:650px;margin:0;background:linear-gradient(90deg,rgba(10,29,43,.95),rgba(10,29,43,.55) 46%,rgba(10,29,43,.03)),url('/static/skyline.svg') center 48%/cover;color:#fff;padding:105px max(6%,calc((100vw - 1260px)/2)) 110px;overflow:hidden}.hero-copy{max-width:760px}.hero .eyebrow{color:#bdcfda;letter-spacing:4px;font-size:11px}.hero h1{font-size:clamp(42px,5.2vw,76px);font-weight:600;letter-spacing:1px;line-height:1.24;margin:26px 0}.hero p{color:#c7d4dc;line-height:1.95;font-size:17px}.hero-cta{margin-top:28px;background:#fff;color:#203b48;padding:14px 25px;border-radius:4px;font-weight:600;min-width:225px;display:inline-flex;justify-content:space-between;gap:35px}.hero-cta:hover{color:#203b48;background:#f0ede5}.hero-caption{position:absolute;bottom:28px;left:6%;right:6%;display:flex;justify-content:space-between;border-top:1px solid #ffffff30;padding-top:18px;color:#c0cdd3;font-size:10px;letter-spacing:2px}.collection{max-width:1360px;margin:auto;padding:76px 48px 100px;scroll-margin-top:30px}.collection-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:35px}.collection h2{font-size:32px;font-weight:600;margin:12px 0;letter-spacing:1px}.collection h2 span{font-size:13px;display:block;color:var(--muted);margin-top:12px;font-weight:400;letter-spacing:0}.collection-count{font-size:36px;font-weight:300;color:#6b7f8b}.collection-count small{display:block;font-size:11px;letter-spacing:1px}.searchbar{align-items:center;padding:8px 8px 8px 24px;border:1px solid var(--line);border-radius:8px;background:#fff;margin-bottom:28px;box-shadow:0 5px 20px #233f4e04}.searchbar>span{font-size:26px;color:#768a95}.searchbar input{border:0;background:transparent;box-shadow:none;font-size:14px}.searchbar button{border-radius:5px;font-size:13px;padding:13px 22px}.tabs{gap:24px;border-bottom:1px solid var(--line);padding-bottom:0}.tabs button{background:none;border-radius:0;padding:14px 2px;color:var(--muted);font-size:14px;border-bottom:2px solid transparent}.tabs button.active{background:none;color:var(--ink);border-color:var(--green)}.tabs small{font-size:10px;border-radius:4px;background:#e9edef;padding:2px 5px;margin-left:8px}.grid{margin-top:34px;gap:28px}.resource-card{border-radius:8px;padding:0;overflow:hidden;box-shadow:0 8px 30px #19344305;gap:0;transition:transform .2s,box-shadow .2s}.resource-card:hover{transform:translateY(-4px);box-shadow:0 15px 40px #19344312}.cover{position:relative;border-radius:0;height:300px;padding:24px;background:linear-gradient(130deg,#dbe6e7,#edf0ec)}.cover img{filter:drop-shadow(8px 12px 12px #132e3a30);max-height:100%;width:auto;max-width:85%;object-fit:contain}.cover-label{position:absolute;top:15px;left:18px;font-size:10px;letter-spacing:1px;color:#446370}.card-copy{padding:28px;display:flex;flex-direction:column;flex:1}.resource-meta{display:flex;gap:16px;font-size:11px;letter-spacing:1px;color:#748993;margin-bottom:16px}.resource-meta span:first-child{color:#276b7d}.resource-card h2{font-size:23px;line-height:1.55;margin:0 0 12px}.resource-card h2 a{color:var(--ink)}.card-copy>.muted{font-size:13px}.card-copy p{font-size:14px;line-height:1.9;color:var(--muted);margin-top:24px}.resource-link{margin-top:auto;padding-top:20px;border-top:1px solid var(--line);display:flex;justify-content:space-between;font-size:13px;font-weight:600}.grid.single{grid-template-columns:1fr}.grid.single .resource-card{display:grid;grid-template-columns:360px 1fr;max-width:100%;min-height:350px}.grid.single .cover{height:100%;min-height:350px}.grid.single .card-copy{padding:40px 46px}.grid.single h2{font-size:28px;max-width:650px}.empty-state{grid-column:1/-1;padding:50px 0;color:var(--muted)}.inner-page>h1{max-width:1000px;font-size:clamp(30px,4vw,46px);margin:30px 0 20px}.layout{grid-template-columns:290px minmax(0,1fr);gap:40px;margin-top:40px}.toc{border-radius:6px;padding:24px 15px}.toc strong{display:block;letter-spacing:2px;font-size:12px;margin:0 12px 18px}.toc a{padding:11px 12px;color:#657887}.toc a.current{background:#edf3f5;color:#16566d}.reading{border-radius:6px;padding:50px 60px;box-shadow:0 12px 40px #243a4704}.reading>#content>h2{font-size:30px;padding-bottom:24px;border-bottom:1px solid var(--line);margin-bottom:35px}.content{font-size:18px;line-height:2.05;color:#344a57}.content h1{line-height:1.5}.content img{border-radius:3px}.admin-page{max-width:1320px}.admin-grid{gap:28px}.panel{border-radius:8px;padding:28px}.panel h2{font-size:20px;font-weight:600;margin:0 0 16px}.admin-page .panel{box-shadow:0 4px 20px #1b394705}.admin-page .form{gap:14px}.btn-primary{background:var(--green);border-color:var(--green)}footer{display:flex;justify-content:space-between;gap:20px;border-top:1px solid var(--line);padding:32px 6%;background:#fff;font-size:16px}footer small{font-size:11px;letter-spacing:1px;align-self:center}a:focus-visible,button:focus-visible{outline:3px solid #e9a46b;outline-offset:4px}@media(max-width:1000px){.brand small{display:none}.collection{padding:55px 32px 70px}.grid.single .resource-card{grid-template-columns:300px 1fr}.grid.single .card-copy{padding:32px}.reading{padding:35px}.hero{min-height:600px}.layout{grid-template-columns:240px minmax(0,1fr);gap:24px}}@media(max-width:600px){header{height:78px;padding:0 18px}.brand{font-size:18px;gap:8px}.brand-symbol{width:30px;height:30px;font-size:22px}nav{gap:10px}nav a{font-size:11px}nav a:last-child{padding:6px 9px}.hero{min-height:280px;padding:36px 20px 44px;background-position:65% center}.hero h1{font-size:26px;margin:12px 0 10px;line-height:1.3}.hero p{font-size:13px;line-height:1.6}.hero .eyebrow{font-size:9px;letter-spacing:2px}.hero-cta{font-size:12px;padding:10px 18px;min-width:0;margin-top:16px}.hero-caption{display:none}.collection{padding:40px 20px 60px}.collection h2{font-size:25px}.collection-count{font-size:28px}.collection-count small{font-size:9px}.searchbar{padding-left:12px;gap:5px;flex-wrap:nowrap}.searchbar input{min-width:0;padding:10px 5px;font-size:12px}.searchbar button{font-size:11px;padding:11px;white-space:nowrap}.tabs{gap:15px}.tabs button{font-size:12px}.tabs small{margin-left:5px}.grid.single .resource-card{display:flex}.grid.single .cover{height:310px;min-height:0}.grid.single .card-copy{padding:25px}.grid.single h2{font-size:23px}.layout{display:block}.reading{padding:25px 19px}.reading>#content>h2{font-size:24px}.content{font-size:17px}.panel{padding:22px}.admin-page .toolbar h1{font-size:28px}footer{flex-direction:column;padding:25px 20px;gap:8px}footer small{align-self:flex-start;font-size:9px}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}
.admin-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:30px}.admin-heading h1{font-size:38px;margin:12px 0}.admin-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:24px;margin-bottom:28px}.admin-stats .panel{display:flex;justify-content:space-between;align-items:center}.admin-stats strong{font-size:32px;font-weight:500}.admin-resource{display:flex;align-items:center;gap:20px;padding:22px 0;border-top:1px solid var(--line)}.admin-thumbnail{width:55px;height:72px;flex:none;background:#edf2f3;border-radius:5px;display:grid;place-items:center}.admin-thumbnail img{max-width:100%;max-height:100%;object-fit:contain}.admin-resource-info{flex:1;min-width:0}.admin-resource-info strong{display:block;overflow-wrap:anywhere}.admin-resource-info small{display:block;margin-top:6px}.admin-actions{display:flex;gap:8px;flex-wrap:wrap}.admin-actions button,.admin-actions a{font-size:12px;padding:8px 13px}.login-panel{max-width:500px;margin:40px auto}.editor-dialog{width:min(1100px,94vw);max-height:92vh;padding:0;border:1px solid var(--line);border-radius:12px;color:var(--ink);background:#fff;box-shadow:0 25px 100px #10293544}.editor-dialog::backdrop{background:#10293599;backdrop-filter:blur(4px)}.dialog-heading{display:flex;justify-content:space-between;align-items:center;padding:24px 32px;border-bottom:1px solid var(--line);position:sticky;top:0;background:white;z-index:3}.dialog-heading h2{margin:7px 0 0;font-size:25px}.dialog-body{padding:30px 32px}.form label,.chapter-form>label{display:grid;gap:7px;font-size:13px;font-weight:550}.field-pair{display:grid;grid-template-columns:1fr 1fr;gap:20px}.metadata-form textarea{min-height:90px}.cover-editor{display:flex;gap:25px;align-items:center}.cover-editor>div:last-child{flex:1}.cover-editor p{font-size:12px}#cover-preview{width:120px;height:150px;display:grid;place-items:center;flex:none;background:#edf2f3;font-size:12px;color:var(--muted);border-radius:6px}#cover-preview img{max-height:100%;max-width:100%;object-fit:contain}.editor-savebar{display:flex;justify-content:space-between;align-items:center;gap:15px;padding:20px 0 0;margin-top:16px;border-top:1px solid var(--line);font-size:12px}.chapter-manager{margin-top:36px;border-top:1px solid var(--line);padding-top:28px}.chapter-row{display:flex;gap:15px;align-items:center;padding:16px 0;border-bottom:1px solid var(--line)}.chapter-row strong{flex:1;min-width:0;font-size:14px}.chapter-number{font-size:12px;color:var(--muted)}.editor-controls{display:flex;align-items:center;justify-content:space-between;margin:25px 0 15px;font-size:12px}.editor-controls button{padding:8px 14px;font-size:12px}.ql-toolbar.ql-snow{border-color:var(--line);border-radius:6px 6px 0 0;padding:12px;background:#f7f9fa}.ql-container.ql-snow{border-color:var(--line);border-radius:0 0 6px 6px;font:16px/1.9 system-ui,sans-serif}.ql-editor{min-height:400px;max-height:58vh;overflow:auto;padding:24px}.ql-editor img{max-width:100%;height:auto}.ql-toolbar button{padding:3px;border-radius:0;background:transparent;display:inline-block;color:inherit}.ql-toolbar button:disabled{opacity:.4}.ql-toolbar select{width:auto;padding:0}.ql-tooltip input{width:auto}.ql-editor h1{font-size:28px}.ql-editor h2{font-size:23px}.ql-editor p{margin:0}.ql-toolbar .ql-picker{font-size:13px}#body-preview{padding:25px;border:1px solid var(--line);border-radius:6px;min-height:400px}#body-preview img{max-width:100%}.answer:not(:empty){margin-top:25px;padding-top:20px;border-top:1px solid var(--line)}[hidden]{display:none!important}@media(max-width:650px){.admin-heading{align-items:flex-start}.admin-heading h1{font-size:28px}.admin-heading p{font-size:12px}.admin-stats{gap:10px}.admin-stats .panel{padding:15px;display:block}.admin-stats strong{display:block}.admin-resource{flex-wrap:wrap;gap:12px}.admin-actions{width:100%;justify-content:flex-end}.chapter-row{flex-wrap:wrap}.chapter-row .admin-actions{width:100%}.editor-dialog{width:96vw;max-height:95vh}.dialog-heading{padding:18px}.dialog-body{padding:20px 16px}.field-pair{grid-template-columns:1fr;gap:15px}.cover-editor{align-items:flex-start;gap:15px}#cover-preview{width:85px;height:115px}.editor-savebar{align-items:flex-start;flex-direction:column}.editor-savebar button{width:100%}.ql-editor{padding:18px;min-height:340px}.ql-toolbar.ql-snow{padding:8px}.ql-toolbar .ql-formats{margin-right:8px!important}}
.pdf-reading-controls{display:flex;gap:10px;align-items:center;flex-wrap:wrap;padding:15px 0;margin-bottom:20px;border-bottom:1px solid var(--line);font-size:12px}.pdf-reading-controls button{padding:8px 13px;font-size:12px}.pdf-reading-controls button.active{background:var(--green);color:white}.pdf-reading-controls small{margin-left:auto}.pdf-page{margin:30px 0 45px}.pdf-page-label{font-size:11px;color:var(--muted);letter-spacing:1px;padding-bottom:10px;border-bottom:1px solid var(--line)}.pdf-reader .pdf-text{display:none}.pdf-reader.pdf-text-mode .pdf-text{display:block}.pdf-reader.pdf-text-mode .pdf-original{display:none}.pdf-original{margin:15px 0}.content .pdf-original img{width:100%;margin:0;border:1px solid #eef0f1}.pdf-text p{margin:1em 0}.pdf-reader .content{line-height:2}@media(max-width:600px){.pdf-reading-controls small{width:100%;margin:0}.pdf-reader:not(.pdf-text-mode) .pdf-original{margin-left:-15px;margin-right:-15px}}
/* PDF books are read as flowing text; original pages are optional source links. */
.pdf-reflow-page{margin:0 0 28px}.pdf-source-row{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:32px 0 20px;padding-bottom:8px;border-bottom:1px solid var(--line);font:11px/1.6 system-ui,sans-serif;color:#8a98a0}.pdf-source-link{color:#7d8e98;font-size:11px}.pdf-reflow-page h3{font-size:21px;margin:30px 0 16px;font-weight:600;color:var(--ink)}.pdf-reflow-page p{margin:1em 0;text-align:start;overflow-wrap:anywhere}.pdf-reflow-page .muted{font-size:13px}.content:has(.pdf-reflow-page){max-width:760px;margin:0 auto;line-height:2.05}.content:has(.pdf-reflow-page) p{letter-spacing:.02em}@media(max-width:600px){.pdf-reflow-page h3{font-size:20px}.pdf-source-row{margin-top:25px}.content:has(.pdf-reflow-page){font-size:17px;line-height:1.95}}
.book-editorial{max-width:760px;margin:auto;font-size:18px;line-height:2.05;color:#344a57}.book-editorial>h3{font-size:25px;font-weight:600;line-height:1.5;color:var(--ink);margin:52px 0 22px;padding-top:10px}.book-editorial>h3:first-child{margin-top:5px}.book-editorial>p{margin:0 0 22px;letter-spacing:.02em}.book-figure{margin:35px auto 42px;padding:22px;background:#f8fafb;border:1px solid #e6ecef;border-radius:8px;text-align:center}.content .book-figure img{display:block;max-height:650px;max-width:100%;width:auto;height:auto;margin:0 auto 15px;object-fit:contain}.book-figure figcaption{max-width:650px;margin:auto;color:#71828c;font-size:13px;line-height:1.85;text-align:left}.compact-figure{max-width:380px}.book-equations{padding:25px 28px;margin:32px 0;background:#eff5f6;border-left:3px solid var(--green);border-radius:5px}.book-equations h3{font-size:20px;margin:0 0 15px}.book-equations p{font-size:16px;margin:12px 0;line-height:1.8}.section-links{margin:0 0 32px;padding:18px 22px;border:1px solid var(--line);background:#f7f9fa;border-radius:6px}.section-links summary{font-size:13px;font-weight:600;cursor:pointer}.section-links a{display:block;padding:5px 0;font-size:13px}.book-editorial h3{scroll-margin-top:25px}@media(max-width:600px){.book-editorial{font-size:17px;line-height:1.95}.book-editorial>h3{font-size:22px;margin-top:38px}.book-figure{padding:12px;margin:28px 0}.book-figure figcaption{font-size:12px}.book-equations{padding:18px}.book-equations p{font-size:14px}}
/* Persistent reading tools and site-wide discovery */
header{position:relative;z-index:20;gap:24px}.global-search-container{position:relative;flex:1;max-width:410px}#global-search{display:flex;align-items:center;background:#f4f7f8;border:1px solid var(--line);border-radius:7px}#global-search input{border:0;background:transparent;font-size:13px;padding:10px 14px;min-width:0}#global-search button{background:transparent;color:var(--ink);font-size:24px;padding:3px 12px}#search-suggestions{position:absolute;top:calc(100% + 8px);left:0;right:0;background:#fff;border:1px solid var(--line);border-radius:8px;padding:12px;box-shadow:0 15px 40px #18394d20;max-height:380px;overflow:auto;z-index:100}#search-suggestions>a{display:block;padding:10px;border-bottom:1px solid var(--line);font-size:13px}#search-suggestions small{display:block;font-size:10px;margin-top:4px}.suggest-all{font-weight:600}.suggest-term{display:inline-block;font-size:11px;padding:7px 9px;margin:8px 5px 0 0;background:#edf3f5;border-radius:4px}.related-terms{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:18px 0 28px;font-size:12px}.related-terms button{font-size:12px;padding:6px 11px}mark{background:#fff0bf;color:#174657;border-radius:3px;padding:0 2px}.reader-page .reading{padding-top:0;overflow:visible}.reading-bar{position:sticky;top:0;z-index:12;display:flex;align-items:center;justify-content:space-between;gap:20px;background:#fffffffa;backdrop-filter:blur(12px);margin:0 -60px 32px;padding:20px 60px;border-bottom:1px solid var(--line);box-shadow:0 5px 15px #1e3c4e05}.reading-bar>div{min-width:0}.reading-bar small{font-size:10px;letter-spacing:2px}.reading-bar h2{font-size:23px;line-height:1.5;margin:4px 0;overflow-wrap:anywhere}.reading-bar>button{font-size:12px;padding:10px 14px;white-space:nowrap}.reading-bar #pinned-section{font-size:12px;color:var(--muted);display:block;line-height:1.6}.reading-bar #pinned-section:empty{display:none}.reader-page .toc{top:16px;max-height:calc(100vh - 32px)}.heading-selected{background:#edf4f5;box-shadow:-5px 0 0 var(--green);padding-left:12px}.section-links a.active{font-weight:600;color:var(--ink)}.content h1,.content h2,.content h3,.content h4{scroll-margin-top:160px;cursor:pointer}#assistant-launch{position:fixed;right:28px;bottom:25px;z-index:50;border-radius:28px;padding:15px 23px;box-shadow:0 7px 25px #17384830;font-size:14px}#reading-assistant{position:fixed;top:18px;right:18px;bottom:18px;width:420px;z-index:70;display:flex;flex-direction:column;background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:0 15px 70px #102d4533;overflow:hidden}.assistant-heading{display:flex;justify-content:space-between;align-items:center;padding:18px 20px;border-bottom:1px solid var(--line)}.assistant-heading small{font-size:9px;letter-spacing:1px}.assistant-heading h2{font-size:21px;margin:5px 0 0}.assistant-heading button{padding:7px 12px;font-size:20px}.assistant-tools{display:flex;gap:8px;padding:12px 16px}.assistant-tools select{font-size:12px;padding:8px;min-width:0}.assistant-tools button{font-size:11px;padding:7px 10px;white-space:nowrap}#chat-service-state{margin:0 16px 10px;font-size:11px;color:var(--muted)}.assistant-context{margin:0 16px 12px;background:#f2f6f7;border-radius:6px;padding:10px 12px}.assistant-context strong{display:block;font-size:11px;font-weight:550;max-height:44px;overflow:auto}.assistant-context small{display:block;font-size:10px;margin-top:4px}#chat-selection{font-size:11px;line-height:1.6;margin-top:8px;padding-top:8px;border-top:1px solid var(--line);max-height:80px;overflow:auto}.assistant-prompts{display:flex;flex-wrap:wrap;gap:6px;margin:0 16px 10px}.assistant-prompts button{font-size:10px;padding:6px 9px}#deep-chat-host{flex:1;min-height:150px;overflow:hidden}.chat-bottom{display:flex;justify-content:space-between;align-items:center;padding:10px 16px;border-top:1px solid var(--line);font-size:10px;color:var(--muted);gap:8px}.chat-bottom button{font-size:10px;padding:6px 8px}.assistant-open #assistant-launch{display:none}@media(min-width:1250px){.assistant-open .reader-page{max-width:calc(100% - 450px);margin-left:0;padding-left:35px;padding-right:28px}.assistant-open .reader-page .layout{grid-template-columns:220px minmax(0,1fr);gap:24px}.assistant-open .reader-page .reading{padding-left:28px;padding-right:28px}.assistant-open .reading-bar{margin-left:-28px;margin-right:-28px;padding-left:28px;padding-right:28px}}@media(max-width:1000px){header{gap:16px}.global-search-container{max-width:280px}.reading-bar{margin-left:-35px;margin-right:-35px;padding-left:35px;padding-right:35px}}@media(max-width:650px){header{height:auto;min-height:78px;flex-wrap:wrap;padding:16px 18px;gap:12px}.global-search-container{order:3;max-width:none;flex-basis:100%}header nav{margin-left:auto}.brand{flex:none}.reading-bar{margin-left:-19px;margin-right:-19px;padding:14px 19px;gap:10px}.reading-bar h2{font-size:18px}.reading-bar>button{font-size:10px;padding:8px 10px}.reader-page .reading{padding-top:0}.reader-page .toc{position:static;max-height:300px}.reading-bar #pinned-section{font-size:11px}.book-heading h1{font-size:26px;line-height:1.45}#reading-assistant{inset:10px;width:auto;border-radius:12px;max-height:calc(100dvh - 20px)}.assistant-open{overflow:hidden}#assistant-launch{right:18px;bottom:18px;padding:12px 18px;font-size:12px}.related-terms{gap:6px}.assistant-heading{padding:14px 16px}.assistant-context{margin-bottom:8px}.assistant-tools{padding-top:8px}.assistant-prompts{margin-bottom:6px}#deep-chat-host{min-height:120px}}
/* Keep the pinned title readable without consuming a phone screen. */
.reading-bar h2,.reading-bar #pinned-section{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
.ai-config-layout{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);gap:28px;align-items:start}.ai-config-layout .form label{gap:8px}.ai-config-badge{padding:10px 15px;background:#f5efe1;color:#81612b;border-radius:8px;white-space:nowrap}.ai-config-badge.ready{background:#e8f4ec;color:#287344}.ai-check{display:flex!important;flex-direction:row!important;align-items:center}.ai-check input{width:auto!important}.ai-test-result{white-space:pre-wrap;overflow-wrap:anywhere;background:#f2f5f6;border-radius:8px;padding:18px;margin:18px 0;min-height:100px}.ai-test-result.success{background:#e8f4ec;color:#286343}@media(max-width:800px){.ai-config-layout{grid-template-columns:1fr}.ai-config-layout .admin-actions{flex-wrap:wrap}}
/* Streaming chat workspace and enlarged reading mode. */
.assistant-window-actions{display:flex;align-items:center;gap:8px}.assistant-window-actions button{font-size:12px;padding:8px 10px}.assistant-context summary{font-size:12px;font-weight:600;cursor:pointer;overflow-wrap:anywhere}.assistant-context small{display:block;margin-top:7px}.assistant-context #chat-clear-selection{font-size:11px;padding:4px 8px;margin-top:6px}.assistant-context #chat-selection{max-height:90px;overflow:auto}.chat-bottom{flex-direction:column;align-items:stretch;gap:8px}.chat-utility-actions{display:flex;flex-wrap:wrap;gap:6px}.chat-utility-actions button{font-size:11px;padding:6px 9px}#reading-assistant.expanded{inset:20px;width:auto;max-height:calc(100dvh - 40px);box-shadow:0 0 0 100vmax #102d4570,0 15px 70px #102d4533}.assistant-maximized{overflow:hidden}#reading-assistant.expanded #deep-chat-host{width:min(100%,1100px);align-self:center}#reading-assistant.expanded .assistant-prompts,#reading-assistant.expanded .assistant-context,#reading-assistant.expanded .chat-bottom{padding-left:max(20px,calc((100% - 1100px)/2));padding-right:max(20px,calc((100% - 1100px)/2))}#reading-assistant.expanded .assistant-tools{justify-content:flex-start}#reading-assistant.expanded .assistant-tools select{max-width:520px}#reading-assistant.expanded .assistant-heading{padding:18px 24px}@media(max-width:700px){#reading-assistant.expanded{inset:0;border-radius:0;max-height:100dvh}.assistant-heading h2{font-size:18px}.assistant-window-actions{gap:4px}.assistant-window-actions button{padding:7px}.chat-bottom{padding:10px 14px}.assistant-context{padding:10px 14px}.assistant-prompts{padding:8px 12px}#reading-assistant.expanded .assistant-heading{padding:14px}#reading-assistant.expanded .assistant-context,#reading-assistant.expanded .assistant-prompts,#reading-assistant.expanded .chat-bottom{padding-left:14px;padding-right:14px}}
/* Bound chrome separately so the message list and composer always get space. */
#reading-assistant{box-sizing:border-box;max-height:none;max-width:none;min-width:0;min-height:0;isolation:isolate}
#reading-assistant .assistant-heading{flex:0 0 auto;min-width:0;padding:12px 16px;cursor:grab;touch-action:none;user-select:none;gap:8px}
#reading-assistant .assistant-heading>div:first-child{min-width:0}
#reading-assistant .assistant-heading h2{font-size:18px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#reading-assistant .assistant-heading small{font-size:8px}
#reading-assistant .assistant-window-actions{flex-shrink:0}
#reading-assistant .assistant-window-actions button{padding:6px 8px;font-size:12px}
#reading-assistant.moving .assistant-heading{cursor:grabbing}
#reading-assistant .assistant-top{flex:0 1 auto;min-height:0;max-height: min(190px,30%);overflow:auto;overscroll-behavior:contain}
#reading-assistant #deep-chat-host{position:relative;flex:1 1 0;min-height:0;width:100%;align-self:stretch;overflow:hidden}
#reading-assistant #deep-chat-host>deep-chat{position:absolute;inset:0;display:block;max-width:100%;max-height:100%}
#reading-assistant .chat-bottom{flex:0 0 auto;min-width:0;padding:8px 12px;gap:5px}
#reading-assistant .assistant-context summary{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
#reading-assistant .assistant-context{margin-bottom:6px}
#reading-assistant .assistant-prompts{padding:0}
#reading-assistant.expanded{max-height:none}
#reading-assistant.expanded #deep-chat-host{width:100%;align-self:stretch}
#reading-assistant.expanded .assistant-context,#reading-assistant.expanded .assistant-prompts,#reading-assistant.expanded .chat-bottom{padding-left:12px;padding-right:12px}
#reading-assistant.compact .assistant-top{max-height:100px}
.chat-resize{position:absolute;z-index:90;touch-action:none}
.chat-resize-e{right:0;top:65px;bottom:18px;width:6px;cursor:ew-resize}
.chat-resize-s{bottom:0;left:0;right:18px;height:6px;cursor:ns-resize}
.chat-resize-se{right:0;bottom:0;width:20px;height:20px;cursor:nwse-resize;background:linear-gradient(135deg,transparent 55%,#91a6ad 56%,#91a6ad 61%,transparent 62%,transparent 72%,#91a6ad 73%,#91a6ad 78%,transparent 79%)}
#reading-assistant.expanded .chat-resize{display:none}
@media(max-height:460px){#reading-assistant .assistant-top{max-height:65px}#reading-assistant .assistant-heading{padding:7px 12px}#reading-assistant .assistant-heading small{display:none}#reading-assistant .chat-bottom{padding:5px 10px}#reading-assistant #chat-save-state{display:none}}
/* Members, chapter discussion and anchored notes. */
#member-menu{font-size:12px;padding:7px 12px;max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.community-dialog{width:min(600px,94vw);max-height:90dvh;padding:0;border:1px solid var(--line);border-radius:12px;color:var(--ink);background:#fff;overflow:auto}.community-dialog::backdrop{background:#10293590}.community-dialog .dialog-heading h2{font-size:22px}.community-dialog .form label{display:grid;gap:7px;font-size:14px}.community-dialog input,.community-dialog textarea,.community-dialog select{width:100%;border:1px solid var(--line);border-radius:6px;padding:10px;font:inherit}.community-dialog textarea{min-height:110px}.community-dialog .form{display:grid;gap:16px}.community-dialog #member-error,.community-error{color:#a44336;font-size:13px;overflow-wrap:anywhere}.member-password{margin:24px 0}.member-password summary{cursor:pointer}.member-password form{margin-top:14px}.community-section{border-top:1px solid var(--line);margin-top:40px;padding-top:28px}.community-section h3{font-size:22px;margin:0}.annotation-toolbar,.comments-heading{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:18px}.annotation-toolbar>div{flex:1}.annotation-toolbar small{display:block;font-size:12px;color:var(--muted);margin-top:8px}.annotation-toolbar button,.comments-heading button{font-size:12px;padding:8px 12px}.comments-heading{margin-top:32px}.comments-heading h3{flex:1}.comments-heading span{font-size:12px;color:var(--muted)}.reader-comment,.reader-note{padding:18px 0;border-bottom:1px solid var(--line);font-size:14px;scroll-margin-top:170px}.reader-comment p,.reader-note p{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.8;margin:12px 0}.comment-meta{display:flex;align-items:center;flex-wrap:wrap;gap:10px}.comment-meta strong{font-size:13px}.comment-meta time,.comment-meta small{font-size:11px;color:var(--muted)}.reader-note blockquote,.annotation-quote{white-space:pre-wrap;overflow-wrap:anywhere;border-left:3px solid #e3bf6f;background:#fff7df;padding:12px 16px;margin:12px 0;font-size:13px;max-height:180px;overflow:auto}.reader-note.note-selected{background:#fff7df;border-radius:6px}.community-section .admin-actions{justify-content:flex-start}.community-section #comment-login{font-size:13px;color:var(--muted)}#comment-reply{font-size:12px;padding:10px 14px;background:#edf4f5;border-radius:6px}mark.reader-annotation{background:#fff0ad;color:inherit;border-bottom:2px solid #d6a847;cursor:pointer}mark.reader-annotation:focus-visible{outline:2px solid #175b6f}.selection-annotation-button{position:fixed;bottom:22px;left:24px;z-index:55;padding:12px 18px;box-shadow:0 6px 25px #102d4530;border-radius:24px;font-size:13px}.content .annotated-image{position:relative;display:block;width:fit-content;max-width:100%;margin:24px auto;line-height:0}.content .annotated-image>img{display:block;margin:0;max-width:100%;height:auto}.content .annotation-image-box{position:absolute;min-width:0;min-height:0;margin:0;padding:2px;border:2px solid #d99c2c;border-radius:3px;background:#ffe09d35;color:#825911;font:12px/1 system-ui;text-align:left;overflow:hidden;z-index:2}.image-annotation-mode img{outline:3px dashed #1f7283;outline-offset:3px;cursor:crosshair}.image-annotation-mode .annotation-image-box{pointer-events:none}.annotation-dialog{width:min(850px,94vw)}.annotation-canvas{position:relative;display:block;width:fit-content;max-width:100%;margin:auto;line-height:0;touch-action:none;cursor:crosshair}.annotation-canvas img{display:block;max-width:100%;max-height:55dvh;height:auto;width:auto;user-select:none;pointer-events:none}.annotation-draft-box{position:absolute;border:2px solid #d99c2c;background:#ffe09d45;pointer-events:none}.member-table{overflow:auto}.member-table table{width:100%;min-width:620px}.member-table th,.member-table td{padding:14px;border-bottom:1px solid var(--line);font-size:13px}.member-table td small{display:block;color:var(--muted);margin-top:5px}.member-table select{min-width:100px;font-size:12px;padding:7px}.member-table button{font-size:11px;padding:7px 10px;margin:3px}@media(max-width:700px){.community-dialog .dialog-heading{padding:16px}.community-dialog .dialog-body{padding:20px 16px}.community-section h3{font-size:19px}.annotation-toolbar>div{flex-basis:100%}#member-menu{max-width:115px}.selection-annotation-button{left:12px;bottom:12px;font-size:12px}.reader-comment .admin-actions,.reader-note .admin-actions{width:auto}.comment-meta{gap:6px}}
.reading-actions{display:flex;align-items:center;gap:8px;flex-shrink:0}.reading-actions button{font-size:12px;padding:8px 11px;white-space:nowrap}@media(max-width:700px){.reading-actions{flex-direction:column;gap:5px}.reading-actions button{font-size:10px;padding:6px 8px}}

/* Responsive embedded video and editor preview. */
.video-section{margin:0 0 24px}.video-player{width:100%;aspect-ratio:16/9;background:#101b23;border-radius:12px;overflow:hidden}.video-player iframe,.video-player video{width:100%;height:100%;display:block;border:0;object-fit:contain}.video-section>p{font-size:13px;margin-top:10px}.video-import{padding:16px;border:1px solid var(--border,#dbe4e8);border-radius:12px}.video-import[hidden]{display:none}.video-import .video-section{max-width:640px;margin-bottom:0}.video-import [role=status]{font-size:14px}

/* Reader preferences and personal library. */
.reader-tools{padding:14px 0 18px;border-bottom:1px solid var(--line);margin-bottom:20px}.reading-preferences,.reading-progress-tools{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.reading-preferences button,.reading-progress-tools button{padding:7px 11px;font-size:13px}.reading-preferences label{display:flex;align-items:center;gap:7px;font-size:13px;margin:0}.reading-preferences select{width:auto;padding:6px 10px}.reading-progress-tools{margin-top:10px;font-size:12px;color:var(--muted)}.reading .content{font-size:var(--reading-font-size,18px)}.library-card-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.library-card-actions .button,.library-card-actions button{font-size:13px;padding:7px 11px}.member-filter-toolbar{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-bottom:20px}.member-filter-toolbar input{flex:1;min-width:160px}.member-filter-toolbar select{width:auto}.member-table tr[hidden]{display:none}.assistant-tools{flex-wrap:wrap}
body[data-reading-theme="sepia"] .reader-page .reading{background:#f5eedc;color:#403529}body[data-reading-theme="sepia"] .reader-page .reading-bar{background:#f5eedc}body[data-reading-theme="night"] .reader-page .reading{background:#17242b;color:#e1e9e8;--muted:#aebebb;--line:#395158}body[data-reading-theme="night"] .reader-page .reading-bar{background:#17242b;color:#e1e9e8;border-color:#395158}body[data-reading-theme="night"] .reader-page .reading a{color:#8ed3c3}body[data-reading-theme="night"] .reader-page .reading .muted,body[data-reading-theme="night"] .reader-page .reading small{color:#aebebb}body[data-reading-theme="night"] .reader-page .reading .section-links,body[data-reading-theme="night"] .reader-page .reading .reader-note,body[data-reading-theme="night"] .reader-page .reading .comment-item{background:#20343b;color:#e1e9e8}body[data-reading-theme="night"] .reader-page .reading input,body[data-reading-theme="night"] .reader-page .reading textarea,body[data-reading-theme="night"] .reader-page .reading select{background:#20343b;color:#e1e9e8;border-color:#395158}@media(max-width:700px){header nav{gap:10px;flex-wrap:wrap}.reading-preferences{gap:6px}.member-filter-toolbar select{width:100%}.library-card-actions .button{max-width:100%;overflow-wrap:anywhere}.reader-tools{margin-bottom:14px}}
.reading .book-editorial{font-size:inherit;color:inherit}body[data-reading-theme="night"] .reader-page .reading{--ink:#e1e9e8}body[data-reading-theme="night"] .reader-page .reading .secondary{background:#314951;color:#e1e9e8}body[data-reading-theme="night"] .reader-page .reading .reader-note blockquote{background:#344b55;color:#e1e9e8}body[data-reading-theme="night"] .reader-page .reading mark{color:#253740}@media(max-width:700px){header{height:auto;min-height:88px;flex-wrap:wrap;padding:14px 18px;gap:12px}header nav{margin-left:auto;justify-content:flex-end}header .global-search-container{order:3;flex-basis:100%;max-width:none}}
/* Calm reading layout: compact navigation, modal settings, mobile directory. */
.reader-page .layout{grid-template-columns:240px minmax(0,1fr);gap:28px;align-items:start}
.reader-page .reading,.assistant-open .reader-page .reading{padding:0 36px 36px;min-width:0}
.reader-page .reading-bar,.assistant-open .reader-page .reading-bar{margin:0 -36px 24px;padding:12px 24px;gap:12px;align-items:center}
.reader-page .reading-bar>div:first-of-type{flex:1;min-width:0}
.reader-page .reading-bar small{display:none}
.reader-page #pinned-title{font-size:18px;line-height:1.45;margin:0;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.reader-page #pinned-section{font-size:12px;line-height:1.5;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.reader-page #pinned-section:empty{display:none}
.reader-page .reading-actions{flex-direction:row;flex-shrink:0;gap:6px}
.reader-page .reading-actions button{min-height:40px;padding:8px 10px;font-size:12px}
.reader-page .content{line-height:1.95;overflow-wrap:anywhere}
.reader-page .book-editorial{max-width:none;line-height:1.95}
.reader-page .content p{margin:0 0 1.25em;text-align:justify}
.reader-page .content ul,.reader-page .content ol{margin:0 0 1.5em;padding-left:24px}
.reader-page .content li{margin-bottom:8px;line-height:1.75}
.reader-page .content h3{font-size:1.35rem;font-weight:650;color:#173848;margin:2em 0 .8em;padding-bottom:8px;border-bottom:1px solid var(--line)}
.reader-page .content h4{font-size:1.15rem;font-weight:600;color:#235263;margin:1.5em 0 .6em}
.reader-page .content img{max-width:100%;height:auto}
.reader-page .content table{display:block;max-width:100%;overflow-x:auto}
.reader-page .content pre{white-space:pre-wrap;overflow-wrap:anywhere}
.reader-page .section-links{margin:0 0 28px;padding:16px 20px;border:1px solid var(--line);background:#f8faf9;border-radius:10px}
.reader-page .section-links summary{font-size:13px;font-weight:600;cursor:pointer;color:#175b6f}
.reader-page .section-links a{display:inline-block;margin:6px 8px 2px 0;padding:4px 12px;background:#fff;border:1px solid var(--line);border-radius:6px;font-size:12px;color:#344a57;text-decoration:none}
.reader-page .section-links a:hover,.reader-page .section-links a.active{background:#e6f3ef;color:#126452;border-color:#8dbbab}
.reader-page .chapter-nav{gap:16px;margin-top:40px}
.reader-page .chapter-nav a{min-height:48px;display:inline-flex;align-items:center;justify-content:center}
.reader-settings,.reader-directory{border:0;border-radius:20px;width:min(520px,calc(100vw - 32px));max-height:85dvh;padding:24px;color:#243b45;background:#fff;box-shadow:0 24px 80px #102c3d55;overflow:auto}
.reader-settings::backdrop,.reader-directory::backdrop{background:#102c3d80;backdrop-filter:blur(3px)}
.reader-sheet-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:20px}
.reader-sheet-heading h2{font-size:20px;margin:0}
.reader-settings .reader-tools{margin:0;padding:0;border:0}
.reader-settings .reading-preferences{gap:12px}
.reader-settings button,.reader-settings select,.reader-directory button{min-height:44px}
.reader-settings .reading-progress-tools{margin-top:24px;gap:12px}
.reader-settings #reading-progress-state{flex-basis:100%}
.reader-directory-links>strong{display:none}
.reader-directory-links a{display:block;padding:14px 12px;border-bottom:1px solid #e4ecec;line-height:1.6;color:#314b56}
.reader-directory-links a.current{background:#e6f3ef;color:#126452;border-radius:8px;font-weight:600}
@media(max-width:760px){
 body:has(.reader-page)>header{min-height:60px;padding:12px 16px}
 body:has(.reader-page)>header .global-search-container{order:3;width:100%;flex-basis:100%}
 body:has(.reader-page)>header nav{gap:10px;font-size:12px}
 .reader-page.inner-page{padding:0 0 80px;max-width:100%}
 .reader-page .book-heading{padding:20px 20px 8px;margin:0}
 .reader-page .book-heading h1{font-size:22px;line-height:1.5;margin:12px 0 8px}
 .reader-page .book-heading p{font-size:12px;margin-bottom:16px}
 .reader-page .layout,.assistant-open .reader-page .layout{display:block}
 .reader-page #toc{display:none!important}
 .reader-page .reading,.assistant-open .reader-page .reading{border:0;border-radius:0;padding:0 22px 28px;box-shadow:none}
 .reader-page .reading-bar,.assistant-open .reader-page .reading-bar{margin:0 -22px 24px;padding:10px 12px;gap:8px;flex-wrap:wrap}
 .reader-page .mobile-toc{display:block;margin:0;padding:8px 10px;min-height:40px;font-size:12px;flex-shrink:0}
 .reader-page .reading-bar>div:first-of-type{flex-basis:calc(100% - 85px);width:0}
 .reader-page #pinned-title{font-size:15px}
 .reader-page .reading-actions{display:flex;flex-direction:row;width:100%;justify-content:flex-end;border-top:1px solid #dce7e766;padding-top:6px}
 .reader-page .reading-actions button{flex:1;min-height:36px;padding:6px;font-size:12px}
 .reader-page .content,.reader-page .book-editorial{line-height:1.9;letter-spacing:.015em}
 .reader-page .content h2,.reader-page .content h3{font-size:1.25em;margin-top:1.8em}
 .reader-page .section-links{padding:12px 14px;margin-bottom:24px;font-size:14px}
 .reader-page .chapter-nav{display:flex;justify-content:space-between}
 body:has(.reader-page) #assistant-launch{display:none}
 .reader-directory{margin:0 0 0 auto;width:min(88vw,380px);height:100dvh;max-height:100dvh;border-radius:18px 0 0 18px;padding:20px 16px calc(20px + env(safe-area-inset-bottom))}
 .reader-settings{padding:20px;max-height:80dvh}
 #reading-assistant{border-radius:0!important;max-width:none!important;max-height:none!important;padding-bottom:env(safe-area-inset-bottom)}
 #reading-assistant .assistant-heading{cursor:default;padding:12px 14px;touch-action:auto}
 #reading-assistant .assistant-heading small,#chat-reset,#chat-expand,#reading-assistant .chat-resize{display:none}
 #reading-assistant .assistant-heading h2{font-size:18px}
 #reading-assistant .assistant-context:not([open]){margin:0}
 #reading-assistant .assistant-prompts{display:none}
 #reading-assistant .assistant-tools{flex-wrap:wrap;gap:6px}
 #reading-assistant .assistant-tools select{flex-basis:100%;min-height:40px}
 #reading-assistant .assistant-tools button{min-height:36px;flex:1}
 body.assistant-open:has(.reader-page){overflow:hidden}
}
@media(max-width:380px){.reader-page .reading,.assistant-open .reader-page .reading{padding-left:18px;padding-right:18px}.reader-page .reading-bar,.assistant-open .reader-page .reading-bar{margin-left:-18px;margin-right:-18px}}

/* Keep checkbox controls interactive when styling ordinary text fields. */
.form input[type=checkbox],.form input[type=radio]{appearance:auto;-webkit-appearance:auto;width:20px!important;height:20px;min-width:20px;padding:0;margin:0;flex:none;cursor:pointer;accent-color:var(--green)}
.password-rule-option{min-height:48px;padding:12px 14px;gap:12px!important;border:1px solid var(--line);border-radius:8px;cursor:pointer;user-select:none}
.password-rule-option:has(input:checked){background:#e8f4ec;border-color:#8dbbab}
.password-rule-option:focus-within{outline:2px solid var(--green);outline-offset:2px}
/* Hidden role-gated navigation must stay hidden despite global link styles. */
#admin-entry[hidden]{display:none!important}

.version-list{display:grid;gap:8px}.version-row{display:flex;flex-direction:column;align-items:flex-start;text-align:left;gap:4px;width:100%}.version-row span{font-size:13px;font-weight:400}.version-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:16px}.version-preview{margin-top:20px;border-top:1px solid var(--line);padding-top:16px}.version-preview .content{max-height:45vh;overflow:auto;margin-bottom:16px}.version-state{min-height:24px}

.selection-annotation-button{display:flex;gap:8px;padding:6px;background:#fff;border:1px solid var(--line);max-width:calc(100vw - 24px)}.selection-annotation-button[hidden]{display:none!important}.selection-annotation-button button{font-size:13px;padding:9px 12px;border-radius:20px;white-space:nowrap}.selection-annotation-button button[hidden]{display:none!important}.ai-revision-dialog{width:min(850px,94vw)}.ai-revision-dialog #revision-result{display:grid;gap:12px}.ai-revision-dialog #revision-result[hidden]{display:none}.revision-context-preview{max-height:260px;overflow:auto;background:#f4f7f8;border-radius:8px;padding:12px}.revision-context-preview pre{white-space:pre-wrap;font:13px/1.7 system-ui}.revision-reference{display:flex!important;align-items:center;gap:10px!important;padding:8px 0}.revision-reference input{width:18px!important;min-width:18px;height:18px;margin:0}.ai-revision-dialog textarea{white-space:pre-wrap}
#revise-selection[hidden]{display:none!important}
@media(max-width:700px){.selection-annotation-button{bottom:calc(82px + env(safe-area-inset-bottom));flex-wrap:wrap}}

.annotation-popover{position:fixed;z-index:65;width:min(350px,calc(100vw - 24px));max-height:70dvh;display:flex;flex-direction:column;background:#fff;color:#20343b;border:1px solid #d7dee2;border-left:4px solid #d6a847;border-radius:10px;box-shadow:0 12px 40px #10293530;font:14px/1.6 system-ui}.annotation-popover .annotation-card-heading{position:static;height:auto;min-height:0;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;border-bottom:1px solid #d7dee2;background:transparent}.annotation-card-heading button{padding:3px 10px;font-size:20px}.annotation-card-notes{overflow:auto;overscroll-behavior:contain;padding:0 16px}.annotation-card-note{padding:16px 0;border-bottom:1px solid #d7dee2}.annotation-card-note:last-child{border-bottom:0}.annotation-card-note p{white-space:pre-wrap;overflow-wrap:anywhere;margin:12px 0}.annotation-card-note blockquote{margin:10px 0;padding:8px 12px;border-left:3px solid #d6a847;background:#fff7df;white-space:pre-wrap;overflow-wrap:anywhere;max-height:100px;overflow:auto;font-size:12px}.annotation-card-note .admin-actions{justify-content:flex-start;gap:8px}.annotation-card-note button{font-size:12px;padding:6px 10px}mark.reader-annotation.annotation-active{background:#ffda74;outline:2px solid #d6a847}.annotation-image-box.annotation-active{outline:3px solid #d6a847}body[data-reading-theme="night"] .annotation-popover{background:#20343b;color:#e1e9e8;border-color:#587078}body[data-reading-theme="night"] .annotation-card-note blockquote{background:#344b55}body[data-reading-theme="night"] .annotation-popover .secondary{background:#314951;color:#e1e9e8}@media(max-width:700px){.annotation-popover{left:12px;bottom:max(12px,env(safe-area-inset-bottom));top:auto;width:calc(100vw - 24px);max-height:55dvh}}

/* Optimal desktop reading layout: balanced width and comfortable line length */
@media(min-width:761px){
 .reader-page.inner-page{max-width:1320px;margin:0 auto;padding:32px 24px 48px}
 .reader-page .layout{grid-template-columns:250px minmax(0,1fr);gap:28px;margin-top:28px}
 .reader-page .reading,.assistant-open .reader-page .reading{padding:0 38px 38px}
 .reader-page .reading-bar,.assistant-open .reader-page .reading-bar{margin:0 -38px 26px;padding:14px 24px}
 .reader-page .book-editorial{max-width:none}
}
@media(min-width:1250px){.assistant-open .reader-page.inner-page{max-width:calc(100% - 450px);padding-left:24px;padding-right:20px}.assistant-open .reader-page .layout{grid-template-columns:220px minmax(0,1fr);gap:20px}}
@media(max-width:760px){
 .reader-page .reading,.assistant-open .reader-page .reading{padding-left:16px;padding-right:16px}
 .reader-page .reading-bar,.assistant-open .reader-page .reading-bar{margin-left:-16px;margin-right:-16px}
 .reader-page .book-editorial{max-width:none}
}

/* Main navigation has its own layout; the account is separate from destinations. */
body>header.site-header,body:has(.reader-page)>header.site-header{display:grid;grid-template-columns:auto minmax(190px,1fr) auto auto;align-items:center;gap:24px;height:auto;min-height:80px;padding:16px max(24px,calc((100vw - 1712px)/2));background:#fff;border-bottom:1px solid #dfe7e9}
header.site-header .brand{display:flex;gap:10px;flex-wrap:nowrap;letter-spacing:0;white-space:nowrap;color:#193b49;text-decoration:none}
header.site-header .brand-symbol{width:36px;height:36px;font-size:28px;flex:none;background:#175b6f}
header.site-header .brand-copy{display:grid;gap:2px;line-height:1.25}
header.site-header .brand-copy strong{font-size:20px;font-weight:750}
header.site-header .brand small{display:block;margin:0;font-size:8px;letter-spacing:1.2px;color:#798b93}
header.site-header .global-search-container{min-width:0;width:100%;max-width:460px;justify-self:center;order:initial}
header.site-header #global-search{border:1px solid #e1e8ea;background:#f5f8f9;border-radius:24px;transition:border-color .15s,box-shadow .15s}
header.site-header #global-search:focus-within{border-color:#76a4b0;box-shadow:0 0 0 3px #175b6f12}
header.site-header #global-search input{padding:9px 16px;font-size:13px;min-height:42px;min-width:0}
header.site-header #global-search button{padding:4px 14px;font-size:23px;min-height:42px}
header.site-header .site-nav{display:flex;gap:4px;align-items:center;flex-wrap:nowrap;margin:0;white-space:nowrap}
header.site-header .site-nav a{display:flex;align-items:center;justify-content:center;min-height:42px;padding:9px 12px;border:0;border-radius:8px;color:#62757f;font-size:14px;font-weight:550;text-decoration:none}
header.site-header .site-nav a:hover{background:#f2f6f7;color:#175b6f}
header.site-header .site-nav a[aria-current=page]{background:#eaf3f3;color:#175b6f;font-weight:700}
header.site-header .header-account{padding-left:20px;border-left:1px solid #e3e9eb;min-width:0}
header.site-header #member-menu{display:block;position:relative;max-width:170px;min-height:42px;padding:9px 25px 9px 42px;border:0;border-radius:24px;background:#f4f7f8;color:#274852;font-size:13px;line-height:24px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;box-shadow:none}
header.site-header #member-menu::before{content:attr(data-avatar);position:absolute;left:7px;top:7px;display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:#dfecea;color:#175b6f;font-size:13px;font-weight:700}
header.site-header #member-menu::after{content:'⌄';position:absolute;right:10px;top:8px;color:#6f858e;font-size:15px}
header.site-header #member-menu[data-signed-in=false]{background:#175b6f;color:#fff;padding-right:14px}
header.site-header #member-menu[data-signed-in=false]::before{background:#ffffff24;color:#fff}
header.site-header #member-menu[data-signed-in=false]::after{display:none}
header.site-header #member-menu:hover{filter:brightness(.96)}
@media(max-width:1100px){
 body>header.site-header,body:has(.reader-page)>header.site-header{grid-template-columns:auto minmax(160px,1fr) auto;gap:10px 20px;padding:14px 24px}
 header.site-header .header-account{grid-column:3;grid-row:1;padding-left:0;border:0}
 header.site-header .site-nav{grid-column:1/-1;grid-row:2;justify-content:center;padding-top:4px}
 header.site-header .brand small{display:none}
}
@media(max-width:768px){
 header.site-header{display:none!important}
}
.mobile-bottom-nav{display:none}
.forum-fab{display:none}
@media(max-width:768px){
 .mobile-bottom-nav{display:flex;position:fixed;bottom:0;left:0;right:0;height:calc(54px + env(safe-area-inset-bottom));z-index:95;background:rgba(255,255,255,0.92);backdrop-filter:blur(20px) saturate(180%);-webkit-backdrop-filter:blur(20px) saturate(180%);border-top:1px solid rgba(0,0,0,0.06);padding-bottom:env(safe-area-inset-bottom);box-shadow:0 -3px 14px rgba(0,0,0,0.03)}
 .mobile-bottom-nav a,.mobile-bottom-nav a:last-child{border:0!important;background:transparent!important;padding:4px 0 0!important;border-radius:0!important;box-shadow:none!important;flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;color:#8c9da6;text-decoration:none;font-size:10.5px;font-weight:550;transition:color .15s,transform .12s;-webkit-tap-highlight-color:transparent;position:relative}
 .mobile-bottom-nav a:active{transform:scale(0.92)}
 .mobile-bottom-nav .mobile-nav-icon{width:21px;height:21px;stroke:currentColor;transition:transform .15s ease}
 .mobile-bottom-nav a[aria-current=page]{color:var(--accent);font-weight:650}
 .mobile-bottom-nav a[aria-current=page] .mobile-nav-icon{transform:translateY(-1px)}
 .mobile-bottom-nav a[aria-current=page]::after{content:'';position:absolute;bottom:2px;width:14px;height:3px;background:var(--accent);border-radius:2px}
 body.reader-immersive .mobile-bottom-nav,body.image-viewer-open .mobile-bottom-nav,.flight-room-fullscreen .mobile-bottom-nav{display:none!important}
 body.reader-immersive main{padding:0!important}
 main{padding:calc(14px + env(safe-area-inset-top, 0px)) 14px calc(76px + env(safe-area-inset-bottom))!important}
 footer{display:none!important}
 .shelf-page .hero{display:none!important}
 #assistant-launch{position:fixed!important;width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;padding:0!important;border-radius:50%!important;background:linear-gradient(135deg,#175b6f 0%,#20768e 100%)!important;color:#fff!important;font-size:0!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;box-shadow:0 4px 16px rgba(23,91,111,0.38),0 2px 6px rgba(0,0,0,0.12)!important;border:1.5px solid rgba(255,255,255,0.25)!important;bottom:calc(68px + env(safe-area-inset-bottom))!important;right:14px!important;z-index:89!important;transition:transform .15s ease,box-shadow .15s ease!important;-webkit-tap-highlight-color:transparent!important}
 #assistant-launch:active{transform:scale(0.92)!important}
 #assistant-launch::before{content:'✦';font-size:20px!important;line-height:1;color:#fff;filter:drop-shadow(0 0 3px rgba(255,255,255,0.6))}
 .forum-fab{position:fixed;right:14px;bottom:calc(68px + env(safe-area-inset-bottom));z-index:90;display:inline-flex;align-items:center;justify-content:center;gap:6px;height:44px;padding:0 18px;border-radius:22px;background:var(--accent);color:#fff;font-size:13px;font-weight:600;box-shadow:0 4px 16px rgba(23,91,111,0.35);border:1px solid rgba(255,255,255,0.2);cursor:pointer;transition:transform .15s;text-decoration:none}
 .forum-fab:active{transform:scale(0.95)}
 .forum-back,.book-heading>a:first-child{display:inline-flex;align-items:center;gap:6px;padding:6px 14px;background:#eaf3f5;color:var(--accent);border-radius:20px;font-size:13px;font-weight:600;text-decoration:none;margin-bottom:14px}
 .forum-back:active,.book-heading>a:first-child:active{transform:scale(0.96)}
 .searchbar{display:flex!important;align-items:center!important;background:#f1f4f6!important;border:1px solid rgba(0,0,0,0.04)!important;border-radius:20px!important;padding:4px 4px 4px 14px!important;box-shadow:none!important;margin-bottom:14px!important;transition:background .2s,border-color .2s}
 .searchbar:focus-within{background:#fff!important;border-color:var(--accent)!important;box-shadow:0 2px 10px rgba(23,91,111,0.12)!important}
 .searchbar span{color:#8c9ca6!important;font-size:15px!important;margin-right:2px}
 .searchbar input{font-size:13px!important;padding:6px 4px!important;background:transparent!important;border:none!important;color:var(--ink)!important}
 .searchbar input::placeholder{color:#8c9ca6!important}
 .searchbar button{border-radius:16px!important;padding:6px 14px!important;font-size:12px!important;font-weight:600!important;background:var(--accent)!important;color:#fff!important;border:none!important;box-shadow:0 2px 6px rgba(23,91,111,0.2)!important}
 .tabs{display:flex!important;gap:8px!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch!important;scrollbar-width:none!important;border-bottom:0!important;padding-bottom:4px!important}
 .tabs::-webkit-scrollbar{display:none}
 .tabs button{flex:0 0 auto!important;border-radius:20px!important;padding:6px 14px!important;font-size:12.5px!important;font-weight:550!important;border:1px solid #e2e8ea!important;background:#fff!important;color:#5c707a!important}
 .tabs button.active{background:var(--accent)!important;color:#fff!important;border-color:var(--accent)!important;box-shadow:0 2px 8px rgba(23,91,111,0.22)!important}
 .forum-card{padding:16px!important;border-radius:14px!important;margin-bottom:12px!important;border:1px solid #e8eef0!important;background:#fff!important;box-shadow:0 1px 4px rgba(16,41,53,0.03)!important}
 .forum-card:active{transform:scale(0.985)!important;background:#fafcfc!important}
 .forum-card h2{font-size:16px!important;line-height:1.4!important;margin:8px 0 6px!important}
 .forum-excerpt{font-size:13px!important;line-height:1.55!important;color:#647781!important;margin-bottom:10px!important;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
 .forum-card-bottom{padding-top:10px!important;margin-top:10px!important;border-top:1px solid #f0f3f5!important;font-size:11px!important;color:#8c9da6!important}
 #personal-cards{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:20px 11px!important}
 .resource-section-tabs{display:flex!important;background:#edf2f5!important;border-radius:12px!important;padding:4px!important;gap:4px!important;margin:12px 0 16px!important;border:1px solid var(--line)!important}
 .resource-section-tabs button{flex:1!important;display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:center!important;gap:8px!important;padding:10px 8px!important;border:0!important;border-radius:8px!important;background:transparent!important;color:var(--muted)!important;box-shadow:none!important;min-height:42px!important}
 .resource-section-tabs button span{flex-direction:row!important;gap:6px!important;align-items:center!important}
 .resource-section-tabs button strong{font-size:14px!important;font-weight:600!important}
 .resource-section-tabs button small{display:none!important}
 .resource-section-tabs button b{font-size:12px!important;font-weight:600!important;padding:2px 7px!important;border-radius:10px!important;background:rgba(21,45,59,0.06)!important;color:var(--ink)!important}
 .resource-section-tabs button[aria-pressed=true]{background:#fff!important;color:var(--accent)!important;box-shadow:0 2px 8px rgba(21,45,59,0.08)!important}
 .resource-section-tabs button[aria-pressed=true] b{background:var(--accent-soft)!important;color:var(--accent)!important}
}

.reader-image-frame{position:relative;width:fit-content;max-width:100%;margin:24px auto}.reader-image-frame img{display:block;max-width:100%;height:auto;margin:0;cursor:zoom-in}.reader-image-frame .annotated-image{margin:0}.reader-image-frame [role=button]:focus-visible{outline:3px solid #3192a5;outline-offset:3px}.image-annotation-mode .reader-image-frame img{cursor:crosshair}
body.image-viewer-open{overflow:hidden}.image-viewer{width:calc(100vw - 24px);height:calc(100dvh - 24px);max-width:none;max-height:none;padding:0;border:1px solid #455963;border-radius:14px;background:#101e27;color:#eff6f6;overflow:hidden}.image-viewer[open]{display:flex;flex-direction:column}.image-viewer::backdrop{background:#09131de8}.image-viewer-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 18px;background:#20323d;border-bottom:1px solid #40545c}.image-viewer-toolbar h2{flex:1;min-width:0;font-size:16px;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#eff6f6}.image-viewer-actions{display:flex;align-items:center;gap:8px}.image-viewer-actions button{min-width:42px;min-height:42px;padding:8px 12px;background:#354a55;color:#fff;font-size:13px}.image-viewer-actions output{min-width:48px;text-align:center;font-size:13px}.image-viewer-viewport{position:relative;flex:1;min-height:0;overflow:hidden;touch-action:none;overscroll-behavior:contain;outline-offset:-3px}.image-viewer-viewport img{position:absolute;top:0;left:0;max-width:none;max-height:none;margin:0;transform-origin:0 0;pointer-events:none;user-select:none}.image-viewer-viewport.image-is-zoomed{cursor:grab}.image-viewer-viewport.image-is-zoomed:active{cursor:grabbing}.image-viewer-status{position:absolute;top:40%;left:0;width:100%;text-align:center;color:#d5e2e7}.image-viewer-status[hidden]{display:none}.image-viewer-hint{margin:0;padding:10px 16px;font-size:12px;text-align:center;color:#bed0d7;background:#20323d}.revision-preview-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:12px}.revision-preview-heading button{font-size:12px;padding:6px 10px}.revision-rendered.content{max-height:46dvh;overflow:auto;overscroll-behavior:contain;border:1px solid #d9e4e6;border-radius:8px;background:#fff;color:#344a57;padding:20px;font-size:var(--reading-font-size,18px);line-height:1.95}.revision-rendered:empty{display:none}.revision-rendered h1,.revision-rendered h2,.revision-rendered h3{line-height:1.5}.revision-rendered p{margin:0 0 1.35em}.revision-rendered table{width:100%;max-width:100%;overflow:auto}.revision-rendered td,.revision-rendered th{padding:10px;border:1px solid #dce5e7}.revision-rendered img{max-width:100%;height:auto}.revision-rendered code{white-space:pre-wrap;overflow-wrap:anywhere}
@media(max-width:700px){.image-viewer{width:100vw;height:100dvh;border:0;border-radius:0;max-height:100dvh}.image-viewer-toolbar{padding:10px 12px;gap:8px;flex-wrap:wrap}.image-viewer-toolbar h2{flex-basis:100%;font-size:14px}.image-viewer-actions{width:100%;justify-content:space-between;gap:4px}.image-viewer-actions button{padding:8px;min-height:42px}.image-viewer-hint{padding:8px 12px calc(8px + env(safe-area-inset-bottom));font-size:11px}.revision-rendered.content{padding:14px;max-height:45dvh}}
.reader-page .content table,.revision-rendered table{border-collapse:collapse}.reader-page .content td,.reader-page .content th,.revision-rendered td,.revision-rendered th{padding:10px;border:1px solid var(--line,#dce5e7);vertical-align:top}.reader-page .content th,.revision-rendered th{font-weight:700}.reader-page .content h5,.reader-page .content h6{scroll-margin-top:160px;cursor:pointer;line-height:1.5}body[data-reading-theme=night] .revision-rendered.content{background:#17242b;color:#e1e9e8;--line:#395158}body[data-reading-theme=sepia] .revision-rendered.content{background:#f5eedc;color:#403529}

/* Learning community */
.community-home{max-width:1400px;padding-top:36px}.forum-hero{display:flex;align-items:center;justify-content:space-between;gap:32px;padding:36px 40px;margin-bottom:30px;background:linear-gradient(120deg,#e7f2ed,#eef4f8);border:1px solid #dfe9e6;border-radius:18px}.forum-hero h1{font-size:38px;line-height:1.4;color:#203d49;margin:12px 0 14px;letter-spacing:1px}.forum-hero p{margin:0;color:#62787f;font-size:15px}.forum-hero-actions{display:grid;gap:12px;min-width:185px}.forum-hero-actions button,.forum-hero-actions a{min-height:46px;text-align:center;font-size:14px}.forum-layout,.forum-topic-layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:28px;align-items:start}.forum-main{min-width:0}.forum-filter{padding:22px;background:#fff;border:1px solid var(--line);border-radius:12px;margin-bottom:18px}.forum-tabs{display:flex;gap:8px;flex-wrap:wrap}.forum-tabs button{font-size:14px;padding:9px 13px;background:#f3f6f7;color:#647b84}.forum-tabs button.active,.forum-sort button.active{background:#175b6f;color:#fff}.forum-search{display:flex;gap:8px;margin:18px 0}.forum-search input{min-width:0;flex:1;font-size:14px;background:#f7f9fa}.forum-search button{font-size:13px;white-space:nowrap}.forum-sort{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.forum-sort label{display:flex;gap:8px;align-items:center;font-size:12px;color:#71818a}.forum-sort select{width:auto;padding:7px 9px;font-size:12px}.forum-sort button{padding:7px 10px;font-size:12px}.forum-card{padding:24px;background:#fff;border:1px solid var(--line);border-radius:12px;margin-bottom:16px;transition:border-color .15s}.forum-card:hover{border-color:#bfd3d8}.forum-card-meta{display:flex;align-items:center;gap:10px;font-size:12px;flex-wrap:wrap}.forum-card-meta time{margin-left:auto;color:#89979d;font-size:11px}.forum-category{display:inline-block;padding:3px 9px;border-radius:5px;background:#eaf3f7;color:#386679;font-size:11px;font-weight:650}.forum-category.tech{background:#e8f0fe;color:#1d4ed8}.forum-category.trade{background:#fef3e2;color:#b45309}.forum-category.companion{background:#e6f8f3;color:#0d7a63}.forum-category.note{background:#edf5ec;color:#467244}.forum-category.practice{background:#fff3e6;color:#986a31}.forum-question-state{display:inline-block;padding:2px 7px;border-radius:4px;font-size:11px;font-weight:600;background:#f1f5f7;color:#60737c}.forum-question-state.open{background:#edf7ed;color:#2e7d32}.forum-question-state.resolved{background:#f3f4f6;color:#808b96}.forum-question-state.trade.open{background:#fff8ee;color:#c25e00;border:1px solid #ffd8a8}.forum-question-state.companion.open{background:#e8f7f5;color:#0f766e;border:1px solid #b2dfdb}.forum-card h2{font-size:22px;line-height:1.5;margin:14px 0 10px;overflow-wrap:anywhere}.forum-card h2 a{color:#233f4c}.forum-excerpt{color:#6c8089;font-size:14px;line-height:1.8;white-space:pre-wrap;margin:0 0 16px}.forum-source{display:inline-block;max-width:100%;padding:6px 10px;background:#f0f5f6;border-radius:6px;color:#527783;font-size:12px;overflow-wrap:anywhere}.forum-card-bottom{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-top:18px;margin-top:18px;border-top:1px solid #edf0f1;font-size:12px}.forum-card-bottom>a{font-size:12px;color:#64808b}.forum-author{display:inline-flex;align-items:center;gap:8px;color:#526d79}.forum-avatar{display:inline-grid;place-items:center;flex:none;width:30px;height:30px;border-radius:50%;background:#e4efed;color:#286b60;font-size:13px;font-weight:650}.forum-sidebar{display:grid;gap:18px}.forum-sidebar .panel{padding:22px;border-radius:12px}.forum-sidebar h2{font-size:17px;line-height:1.5;margin:0 0 18px;color:#294753}.forum-sidebar p{font-size:13px;line-height:1.9;color:#72828a}.forum-sidebar small{font-size:11px;line-height:1.8;display:block}.forum-sidebar a{font-size:13px}.forum-overview>a{display:block;margin-top:20px}.forum-guide p strong{color:#385b67}.forum-overview #forum-stats{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;margin:12px 0 16px}.forum-overview #forum-stats>div{display:grid;gap:4px}.forum-overview strong{font-size:25px;color:#2d5664;font-weight:600}.forum-overview span{font-size:10px;color:#7c9098}.forum-reading-item{display:block;border-bottom:1px solid #e7eeee;padding:12px 0}.forum-reading-item:first-child{padding-top:0}.forum-reading-item:last-child{border-bottom:0}.forum-reading-item strong{font-size:12px;color:#3d6572}.forum-reading-item p{margin:8px 0;max-height:72px;overflow:hidden}.forum-context{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;border:1px solid #d5e4e9;background:#eef6f8;border-radius:8px;margin-bottom:18px;color:#38687a;font-size:13px}.forum-context button{font-size:11px;padding:6px 8px;flex-shrink:0}.forum-empty{padding:48px 24px;background:#fff;border:1px dashed #c5d8dc;border-radius:12px;text-align:center}.forum-empty>span{font-size:45px;color:#86a5ac}.forum-empty h2{font-size:22px;color:#355a67;margin:16px 0}.forum-empty p{font-size:14px;color:#7f929a}.forum-empty button{font-size:13px;margin-top:12px}.forum-editor{width:min(780px,94vw)}.forum-editor details{padding:14px;background:#f5f8f8;border-radius:8px}.forum-editor details label{margin-top:14px}.forum-quote-preview{padding:14px;background:#f3f8f7;border-radius:8px}.forum-quote-preview[hidden]{display:none}.forum-quote-preview strong{font-size:12px}.forum-quote-preview blockquote,.forum-quoted{white-space:pre-wrap;overflow-wrap:anywhere;border-left:3px solid #97beb3;padding:12px 16px;margin:12px 0;background:#eff6f3;font-size:14px}.forum-quote-preview button{font-size:11px;padding:6px 10px}.forum-back{display:inline-block;font-size:13px;margin-bottom:24px}.forum-topic{max-width:1400px}.forum-topic-content{padding:34px;min-width:0;border-radius:12px}.forum-topic-content>h1{font-size:32px;line-height:1.5;margin:18px 0 24px;color:#254551}.forum-topic-author{display:flex;align-items:center;gap:10px;margin-bottom:22px;font-size:13px}.forum-topic-author>div{display:grid;gap:4px}.forum-topic-author small{font-size:11px}.forum-topic-author .forum-avatar{width:38px;height:38px}.forum-topic-content>.forum-source{margin-bottom:18px}.forum-body.content{font-size:16px;line-height:1.9;color:#385361;overflow-wrap:anywhere}.forum-body p{margin:12px 0}.forum-body h1,.forum-body h2,.forum-body h3{font-size:22px;line-height:1.5}.forum-body table{max-width:100%;overflow:auto;display:block;border-collapse:collapse}.forum-body td,.forum-body th{padding:9px;border:1px solid #dce5e7}.forum-body code{white-space:pre-wrap}.forum-post-actions{display:flex;gap:8px;flex-wrap:wrap;margin:28px 0;padding-top:22px;border-top:1px solid var(--line)}.forum-post-actions button{font-size:12px;padding:8px 12px}.forum-replies{margin-top:34px;border-top:1px solid var(--line);padding-top:26px}.forum-replies-heading{display:flex;justify-content:space-between;align-items:center}.forum-replies-heading h2{font-size:22px;margin:0}.forum-replies-heading span{font-size:12px;color:#7d919a}.forum-reply{padding:24px 0;border-bottom:1px solid #e4ecee}.forum-reply-meta{display:flex;align-items:center;gap:9px;font-size:13px;margin-bottom:14px}.forum-reply-meta time{font-size:11px;color:#83969e;margin-left:auto}.forum-reply .forum-body{font-size:15px}.forum-reply .admin-actions{margin-top:14px}.forum-topic #forum-reply-form{margin-top:26px}.forum-reply-submit{display:flex;gap:8px;flex-wrap:wrap}.forum-reply-context{font-size:12px;color:#507987;background:#eef5f7;padding:10px;border-radius:6px}.forum-reply-context[hidden]{display:none}.forum-report{margin-bottom:18px}.forum-report pre{white-space:pre-wrap;font-size:13px;max-height:250px;overflow:auto;padding:16px;background:#f4f7f8}.forum-report details{margin-bottom:20px}
@media(max-width:1000px){.forum-layout,.forum-topic-layout{grid-template-columns:minmax(0,1fr) 260px;gap:20px}.forum-hero{padding:28px}.forum-hero h1{font-size:32px}.community-home,.forum-topic{padding:28px 24px}.forum-topic-content{padding:24px}}
@media(max-width:760px){
 .community-home,.forum-topic{padding:16px 14px calc(76px + env(safe-area-inset-bottom))!important}
 .forum-hero{display:block;padding:14px 16px;border-radius:12px;margin-bottom:12px;background:linear-gradient(135deg,#e9f4f1,#edf4f8);border:1px solid #dce8e5}
 .forum-hero h1{font-size:18px;letter-spacing:0;margin:4px 0 4px;line-height:1.35;color:var(--ink)}
 .forum-hero p{font-size:11.5px;line-height:1.5;color:var(--muted)}
 .forum-hero-actions{display:none!important}
 .forum-layout,.forum-topic-layout{display:block}
 .forum-sidebar{margin-top:20px}
 .forum-filter{padding:12px 14px;border-radius:12px;margin-bottom:14px}
 .forum-tabs{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important;gap:8px!important;-webkit-overflow-scrolling:touch!important;scrollbar-width:none!important;padding-bottom:4px!important;margin-bottom:12px!important}
 .forum-tabs::-webkit-scrollbar{display:none}
 .forum-tabs button{flex:0 0 auto!important;font-size:13px!important;white-space:nowrap!important;padding:7px 15px!important;min-height:34px!important;border-radius:17px!important;background:#fff!important;border:1px solid var(--line)!important;color:var(--ink)!important}
 .forum-tabs button.active{background:var(--accent)!important;color:#fff!important;border-color:var(--accent)!important;font-weight:600!important}
 .forum-card{padding:14px 16px;border-radius:12px;margin-bottom:12px}
 .forum-card h2{font-size:16px;line-height:1.45;margin:8px 0 6px}
 .forum-excerpt{font-size:13px;line-height:1.6;margin:4px 0 10px;-webkit-line-clamp:2;display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden}
 .forum-source{font-size:11px;padding:3px 8px;border-radius:5px}
 .forum-card-bottom{gap:8px;align-items:center;flex-wrap:nowrap;padding-top:10px;margin-top:10px}
 .forum-card-bottom>a{margin-left:auto;font-size:11px}
 .forum-topic-content{padding:18px 16px;border-radius:12px}
 .forum-topic-content>h1{font-size:22px;line-height:1.4;margin:12px 0 16px}
 .forum-body.content{font-size:16px}
 .forum-topic .forum-sidebar{margin-top:20px}
 .forum-context{flex-wrap:wrap;padding:10px 12px;gap:8px}
 .forum-context button{margin-left:auto}
 .forum-search{margin:10px 0;gap:6px;display:flex!important;align-items:center!important;background:#f1f4f6!important;border:1px solid rgba(0,0,0,0.04)!important;border-radius:20px!important;padding:3px 3px 3px 12px!important}
 .forum-search input{height:32px!important;padding:2px 4px!important;font-size:12.5px!important;background:transparent!important;border:none!important}
 .forum-search button{padding:5px 12px!important;height:30px!important;font-size:11.5px!important;border-radius:15px!important;background:var(--accent)!important;color:#fff!important;border:none!important}
 .forum-empty{padding:28px 16px}
 .forum-empty h2{font-size:18px}
 .forum-sort{display:flex;flex-wrap:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none;gap:6px;align-items:center;padding-bottom:2px}
 .forum-sort::-webkit-scrollbar{display:none}
 .forum-sort label{font-size:11px;flex:0 0 auto}
 .forum-sort select{height:30px;font-size:11px;padding:2px 6px;border-radius:15px}
 .forum-sort button{height:30px;padding:2px 10px;font-size:11px;border-radius:15px;flex:0 0 auto;white-space:nowrap}
 .forum-sidebar .panel{padding:16px}

 /* Mobile Knowledge Shelf Refactoring */
 .collection{padding:16px 0 32px}
 .collection-heading{margin-bottom:14px;display:flex;align-items:center;justify-content:space-between;gap:8px}
 .collection-heading h2{font-size:20px;margin:0}
 .collection-heading h2 span{font-size:12px;margin-top:4px}
 .collection-header-right{display:flex;align-items:center;gap:8px}
 .collection-header-right a.button{display:none!important}
 .collection-count{font-size:20px;font-weight:500;color:var(--muted)}
 .collection-count small{display:none!important}
 .searchbar{padding:6px 6px 6px 14px;border-radius:22px;margin-bottom:16px}
 .searchbar input{font-size:13px;padding:6px 4px}
 .searchbar button{padding:8px 14px;font-size:12px;border-radius:18px}
 .tabs{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important;gap:8px!important;border-bottom:0!important;padding-bottom:6px!important;-webkit-overflow-scrolling:touch!important;scrollbar-width:none!important}
 .tabs::-webkit-scrollbar{display:none}
 .tabs button{flex:0 0 auto!important;padding:7px 15px!important;border-radius:20px!important;background:#fff!important;border:1px solid var(--line)!important;font-size:13px!important;font-weight:550!important;color:var(--muted)!important;display:inline-flex!important;align-items:center!important;gap:6px!important;border-bottom:1px solid var(--line)!important}
 .tabs button.active{background:var(--accent)!important;color:#fff!important;border-color:var(--accent)!important}
 .tabs button small{background:rgba(0,0,0,0.06)!important;color:inherit!important;padding:1px 6px!important;border-radius:10px!important;margin-left:2px!important;font-size:11px!important}
 .tabs button.active small{background:rgba(255,255,255,0.22)!important;color:#fff!important}
 .grid{grid-template-columns:1fr!important;gap:12px!important;margin-top:16px!important}
 .resource-card{display:flex!important;flex-direction:row!important;padding:12px!important;gap:12px!important;border-radius:12px!important;background:#fff!important;border:1px solid var(--line)!important;box-shadow:var(--shadow-panel)!important;align-items:stretch!important;transition:transform .15s}
 .resource-card:active{transform:scale(0.99)}
 .resource-card .cover{width:86px!important;min-width:86px!important;height:120px!important;min-height:120px!important;flex:0 0 86px!important;border-radius:6px!important;padding:3px!important;background:linear-gradient(135deg,#e4edef,#f0f4f2)!important;display:flex!important;align-items:center!important;justify-content:center!important}
 .resource-card .cover img{max-height:100%!important;max-width:100%!important;object-fit:contain!important;filter:drop-shadow(2px 4px 6px rgba(18,45,58,0.22))!important;border-radius:2px}
 .resource-card .cover-label{display:none!important}
 .resource-card .card-copy{padding:0!important;display:flex!important;flex-direction:column!important;min-width:0!important;flex:1!important}
 .resource-card .resource-meta{display:flex!important;gap:6px!important;align-items:center!important;margin-bottom:3px!important;font-size:11px!important}
 .resource-card .resource-meta span:first-child{color:var(--accent);font-weight:600}
 .resource-card h2{font-size:15px!important;font-weight:650!important;line-height:1.35!important;margin:0 0 3px!important;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
 .resource-card h2 a{color:var(--ink)}
 .resource-card .card-copy>.muted{font-size:11px!important;margin-bottom:2px!important}
 .resource-card .card-copy p{font-size:12px!important;line-height:1.5!important;color:var(--muted)!important;margin:2px 0 0!important;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
 .resource-card .resource-link{margin-top:auto!important;padding-top:4px!important;border-top:0!important;font-size:12px!important;color:var(--accent)!important;font-weight:600!important}

 /* WeChat Read 3-Column Grid Mode (Default on Mobile) */
 .shelf-grid-mode #cards,
 .collection:not(.shelf-list-mode) #cards,
 .shelf-grid-mode #personal-cards,
 .personal-page:not(.shelf-list-mode) #personal-cards{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:20px 11px!important;margin-top:14px!important}
 .shelf-grid-mode #cards.single,
 .collection:not(.shelf-list-mode) #cards.single{grid-template-columns:repeat(3,minmax(0,1fr))!important}
 .shelf-grid-mode #cards .resource-card,
 .collection:not(.shelf-list-mode) #cards .resource-card,
 .shelf-grid-mode #personal-cards .card,
 .personal-page:not(.shelf-list-mode) #personal-cards .card{display:flex!important;flex-direction:column!important;background:transparent!important;border:0!important;box-shadow:none!important;padding:0!important;margin:0!important;align-items:stretch!important;min-width:0!important}
 .shelf-grid-mode #cards .cover,
 .collection:not(.shelf-list-mode) #cards .cover,
 .shelf-grid-mode #personal-cards .cover,
 .personal-page:not(.shelf-list-mode) #personal-cards .cover{position:relative!important;width:100%!important;min-width:0!important;max-width:100%!important;height:auto!important;min-height:0!important;flex:none!important;aspect-ratio:1/1.42!important;border-radius:3px 7px 7px 3px!important;padding:0!important;overflow:hidden!important;background:linear-gradient(135deg,#e4edef,#f0f4f2)!important;box-shadow:inset 3px 0 5px rgba(0,0,0,0.22),inset -1px 0 2px rgba(255,255,255,0.4),0 6px 14px rgba(21,45,59,0.13)!important;display:flex!important;align-items:center!important;justify-content:center!important;transition:transform .12s ease!important}
 .shelf-grid-mode #cards .cover:active,
 .collection:not(.shelf-list-mode) #cards .cover:active,
 .shelf-grid-mode #personal-cards .cover:active,
 .personal-page:not(.shelf-list-mode) #personal-cards .cover:active{transform:scale(0.96)!important}
 .shelf-grid-mode #cards .cover::before,
 .collection:not(.shelf-list-mode) #cards .cover::before,
 .shelf-grid-mode #personal-cards .cover::before,
 .personal-page:not(.shelf-list-mode) #personal-cards .cover::before{content:'';position:absolute;left:0;top:0;bottom:0;width:7px;background:linear-gradient(90deg,rgba(0,0,0,0.24) 0%,rgba(255,255,255,0.26) 45%,rgba(0,0,0,0.06) 100%);pointer-events:none;z-index:2}
 .shelf-grid-mode #cards .cover::after,
 .collection:not(.shelf-list-mode) #cards .cover::after,
 .shelf-grid-mode #personal-cards .cover::after,
 .personal-page:not(.shelf-list-mode) #personal-cards .cover::after{content:'';position:absolute;right:0;top:0;bottom:0;width:2px;background:linear-gradient(90deg,rgba(0,0,0,0.02),rgba(0,0,0,0.12));pointer-events:none;z-index:2}
 .shelf-grid-mode #cards .cover img,
 .collection:not(.shelf-list-mode) #cards .cover img,
 .shelf-grid-mode #personal-cards .cover img,
 .personal-page:not(.shelf-list-mode) #personal-cards .cover img{width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;object-fit:cover!important;display:block!important;border-radius:0!important;filter:none!important}
 .shelf-grid-mode #cards .card-copy,
 .collection:not(.shelf-list-mode) #cards .card-copy{padding:0!important;margin-top:6px!important;display:flex!important;flex-direction:column!important;min-width:0!important}
 .shelf-grid-mode #cards h2,
 .collection:not(.shelf-list-mode) #cards h2,
 .shelf-grid-mode #personal-cards h2,
 .personal-page:not(.shelf-list-mode) #personal-cards h2{font-size:13px!important;font-weight:600!important;line-height:1.4!important;min-height:2.8em!important;margin:7px 0 2px!important;color:var(--ink)!important;display:-webkit-box!important;-webkit-line-clamp:2!important;-webkit-box-orient:vertical!important;overflow:hidden!important;word-break:break-all!important}
 .shelf-grid-mode #cards h2 a,
 .collection:not(.shelf-list-mode) #cards h2 a,
 .shelf-grid-mode #personal-cards h2 a,
 .personal-page:not(.shelf-list-mode) #personal-cards h2 a{color:var(--ink)!important;text-decoration:none!important}
 .shelf-grid-mode #cards .card-copy>.muted,
 .collection:not(.shelf-list-mode) #cards .card-copy>.muted,
 .shelf-grid-mode #personal-cards .card>.muted,
 .personal-page:not(.shelf-list-mode) #personal-cards .card>.muted{display:block!important;font-size:11px!important;color:var(--muted)!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;margin:0!important;line-height:1.45!important;padding-bottom:1px!important}
 .shelf-grid-mode #cards .cover-label,
 .collection:not(.shelf-list-mode) #cards .cover-label,
 .shelf-grid-mode #cards .resource-meta,
 .collection:not(.shelf-list-mode) #cards .resource-meta,
 .shelf-grid-mode #cards .resource-tags,
 .collection:not(.shelf-list-mode) #cards .resource-tags,
 .shelf-grid-mode #cards .card-copy p,
 .collection:not(.shelf-list-mode) #cards .card-copy p,
 .shelf-grid-mode #cards .resource-link,
 .collection:not(.shelf-list-mode) #cards .resource-link,
 .shelf-grid-mode #cards .library-card-actions,
 .collection:not(.shelf-list-mode) #cards .library-card-actions,
 .shelf-grid-mode #personal-cards .library-card-actions,
 .personal-page:not(.shelf-list-mode) #personal-cards .library-card-actions,
 .shelf-grid-mode #personal-cards a[href^="#book/"]:last-child,
 .personal-page:not(.shelf-list-mode) #personal-cards a[href^="#book/"]:last-child{display:none!important}
 .reader-page .reading{padding-bottom:calc(80px + env(safe-area-inset-bottom))!important}
}
/* Keep the library hero legible when it is reached from the community. */
.hero h1{color:#fff}

/* WeChat Read & Mobile Bookshelf Components */
.collection-header-right{display:flex;align-items:center;gap:10px}
.shelf-view-toggle{display:inline-flex;align-items:center;padding:2px;background:#edf2f5;border-radius:8px;border:1px solid var(--line)}
.shelf-view-toggle button{display:inline-flex;align-items:center;justify-content:center;width:32px;height:28px;padding:0;border:0;border-radius:6px;background:transparent;color:var(--muted);cursor:pointer;font-size:15px;line-height:1;transition:all .15s ease}
.shelf-view-toggle button:hover{color:var(--ink)}
.shelf-view-toggle button.active,.shelf-view-toggle button[aria-pressed=true]{background:#fff;color:var(--accent);box-shadow:0 1px 4px rgba(21,45,59,0.08)}
@media(min-width:769px){
 .shelf-view-toggle{display:none!important}
}

.wechat-recent-read{display:flex;align-items:center;gap:12px;background:linear-gradient(135deg,#f2f8f9 0%,#ffffff 100%);border:1px solid #d9e6e8;border-radius:14px;padding:12px 14px;margin-bottom:16px;box-shadow:0 3px 10px rgba(21,45,59,0.05);position:relative;overflow:hidden}
.wechat-recent-read::before{content:'';position:absolute;left:0;top:0;bottom:0;width:4px;background:var(--accent)}
.wechat-recent-cover{flex:0 0 46px;width:46px;aspect-ratio:1/1.42;border-radius:2px 5px 5px 2px;overflow:hidden;box-shadow:inset 2px 0 3px rgba(0,0,0,0.22),0 3px 8px rgba(0,0,0,0.14);background:linear-gradient(135deg,#e0ebed,#edf2ec);display:flex;align-items:center;justify-content:center}
.wechat-recent-cover img{width:100%;height:100%;object-fit:cover;display:block}
.wechat-recent-info{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
.wechat-recent-badge{font-size:11px;font-weight:650;color:var(--accent);letter-spacing:0.2px}
.wechat-recent-info h3{font-size:14px;font-weight:650;line-height:1.35;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.wechat-recent-info h3 a{color:var(--ink);text-decoration:none}
.wechat-recent-info p{font-size:12px;color:var(--muted);margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.wechat-recent-progress{width:100%;max-width:180px;height:4px;background:#e5edf0;border-radius:2px;overflow:hidden;margin-top:2px}
.wechat-recent-bar{height:100%;background:var(--accent);border-radius:2px}
.wechat-recent-btn{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;padding:6px 14px;background:var(--accent);color:#fff;border-radius:16px;font-size:12px;font-weight:600;text-decoration:none;box-shadow:0 2px 6px rgba(23,91,111,0.22);white-space:nowrap;transition:transform .1s}
.wechat-recent-btn:active{transform:scale(0.96)}

.wechat-shelf-header{display:flex;align-items:center;justify-content:space-between;gap:12px;background:linear-gradient(135deg,#f4f8f9 0%,#ffffff 100%);border:1px solid #d9e6e8;border-radius:14px;padding:12px 14px;margin-bottom:14px;box-shadow:0 2px 8px rgba(21,45,59,0.04);position:relative;overflow:hidden}
.wechat-shelf-header::before{content:'';position:absolute;left:0;top:0;bottom:0;width:4px;background:var(--accent)}
.wechat-shelf-header-left{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
.wechat-shelf-badge{font-size:11px;font-weight:650;color:var(--accent);letter-spacing:0.2px}
.wechat-shelf-header-left h3{font-size:14px;font-weight:650;line-height:1.35;margin:0;color:var(--ink)}
.wechat-shelf-header-left p{font-size:12px;color:var(--muted);margin:0;line-height:1.4}
.wechat-shelf-icon{flex:0 0 36px;width:36px;height:36px;border-radius:50%;background:#eaf3f5;color:var(--accent);display:flex;align-items:center;justify-content:center;font-size:18px;font-weight:bold}

.mobile-profile-unlogged{background:#fff;border:1px solid var(--line);border-radius:16px;padding:24px 18px;text-align:center;box-shadow:0 2px 10px rgba(0,0,0,0.03);margin-bottom:16px}
.mobile-profile-avatar-placeholder{width:56px;height:56px;margin:0 auto 12px;border-radius:50%;background:linear-gradient(135deg,#e3eef1,#d0e4e8);color:var(--accent);display:flex;align-items:center;justify-content:center;font-size:24px}
.mobile-profile-unlogged h2{font-size:18px;font-weight:700;margin:0 0 6px;color:var(--ink)}
.mobile-profile-unlogged p{font-size:13px;line-height:1.5;margin:0 auto 16px;max-width:280px}
.mobile-profile-login-btn{display:inline-flex;align-items:center;justify-content:center;width:100%;max-width:240px;height:42px;background:var(--accent);color:#fff;border:none;border-radius:21px;font-size:14px;font-weight:600;box-shadow:0 3px 10px rgba(23,91,111,0.25);cursor:pointer;transition:transform .12s}
.mobile-profile-login-btn:active{transform:scale(0.97)}
.mobile-profile-features{margin-top:20px;padding-top:16px;border-top:1px solid #edf2f5;display:flex;flex-direction:column;gap:12px;text-align:left}
.mobile-profile-feature-item{display:flex;align-items:center;gap:12px}
.mobile-profile-feature-item .feature-icon{font-size:20px;flex:0 0 28px;text-align:center}
.mobile-profile-feature-item div{flex:1;min-width:0;display:flex;flex-direction:column}
.mobile-profile-feature-item strong{font-size:13px;color:var(--ink)}
.mobile-profile-feature-item small{font-size:11px;color:var(--muted)}

.mobile-profile-header-card{background:linear-gradient(135deg,#ffffff 0%,#f5f9fa 100%);border:1px solid #d9e6e8;border-radius:16px;padding:16px;margin-bottom:16px;box-shadow:0 2px 10px rgba(21,45,59,0.04)}
.mobile-profile-user-info{display:flex;align-items:center;gap:14px;margin-bottom:14px}
.mobile-profile-avatar{width:48px;height:48px;border-radius:50%;background:linear-gradient(135deg,#175b6f,#247c94);color:#fff;display:flex;align-items:center;justify-content:center;font-size:20px;font-weight:bold;box-shadow:0 2px 8px rgba(23,91,111,0.25);flex:0 0 48px}
.mobile-profile-names{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.mobile-profile-name-row{display:flex;align-items:center;gap:8px}
.mobile-profile-name-row strong{font-size:16px;font-weight:700;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mobile-profile-badge{display:inline-flex;align-items:center;padding:2px 8px;border-radius:10px;font-size:10.5px;font-weight:600;background:#eef5f6;color:var(--accent)}
.mobile-profile-badge.admin{background:linear-gradient(135deg,#fef3c7,#fde68a);color:#92400e;border:1px solid rgba(245,158,11,0.3)}
.mobile-profile-stats{display:flex;align-items:center;justify-content:space-around;background:#fff;border:1px solid #edf2f5;border-radius:12px;padding:10px 0}
.mobile-profile-stat-item{flex:1;display:flex;flex-direction:column;align-items:center;gap:2px;text-decoration:none;color:inherit}
.mobile-profile-stat-item strong{font-size:17px;font-weight:700;color:var(--ink)}
.mobile-profile-stat-item small{font-size:11px;color:var(--muted)}
.mobile-profile-stat-item.link strong{color:var(--accent)}
.mobile-profile-stat-divider{width:1px;height:24px;background:#e5edf0}

.mobile-profile-section-card{background:#fff;border:1px solid var(--line);border-radius:14px;padding:14px 16px;margin-bottom:16px;box-shadow:0 1px 4px rgba(0,0,0,0.02)}
.mobile-profile-section-card h3{font-size:14px;font-weight:650;margin:0 0 10px;color:var(--ink)}
.mobile-profile-action-row{display:flex;gap:8px;flex-wrap:wrap}
.mobile-profile-action-row button{flex:1;min-width:100px;font-size:12px;padding:8px 12px;border-radius:10px}


/* Reviewed beginner guide: native, selectable tables and fractions. */
.beginner-layout .book-table-wrap{max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;margin:28px 0;border:1px solid var(--line);border-radius:8px;scrollbar-gutter:stable}
.reader-page .beginner-layout .book-table-wrap table{display:table;width:100%;overflow:visible;margin:0;font-size:.9em;line-height:1.7}
.beginner-layout caption{caption-side:top;text-align:left;font-weight:700;padding:14px 16px;color:inherit;background:var(--paper,#f3f7f8)}
.reader-page .beginner-layout .book-table-wrap th,.reader-page .beginner-layout .book-table-wrap td{padding:12px 16px;min-width:100px;text-align:left;border:1px solid var(--line);vertical-align:middle}
.beginner-layout .book-table-wrap thead th{background:#edf4f5;color:#294b57;white-space:nowrap}
.beginner-layout .book-table-wrap tbody th{font-weight:600;white-space:nowrap}
.beginner-layout .book-table-wrap tbody tr:nth-child(even){background:#78909c08}
.beginner-layout .book-math{font-family:Georgia,'Times New Roman',serif;font-size:1.5em;line-height:2.1;text-align:center;overflow-x:auto;white-space:nowrap;padding:12px 0;letter-spacing:.05em}
.book-fraction{display:inline-flex;flex-direction:column;vertical-align:middle;text-align:center;line-height:1.35;margin:0 .2em;letter-spacing:normal}
.book-fraction>span:first-child{border-bottom:1px solid currentColor;padding:0 .2em .12em}
.book-fraction>span:last-child{padding:.12em .2em 0}
.beginner-layout .book-equations{background:#78909c0d;color:inherit}
.beginner-layout .book-symbols{font-size:.88em;line-height:1.85}
.beginner-layout .book-bullets{margin:20px 0 28px;padding-left:1.5em}
.beginner-layout .book-bullets li{padding-left:.25em;margin:.6em 0}
.beginner-layout .verified-diagram{background:#fff;color:#344a57}
.beginner-layout .diagram-transcript{text-align:left;font-size:14px;line-height:1.8;border-top:1px solid #e3eaed;margin-top:16px;padding-top:12px}
.beginner-layout .diagram-transcript summary{cursor:pointer;color:#52707c}
.beginner-layout .diagram-transcript p{margin:.75em 0}
.beginner-layout .book-source-pages{margin:40px 0 20px;border-top:1px solid var(--line);padding-top:18px;font:14px/1.8 system-ui,sans-serif}
.beginner-layout .book-source-pages summary{cursor:pointer;font-weight:600}
.beginner-layout .book-source-pages a{display:inline-block;padding:6px 12px;margin:4px;border:1px solid var(--line);border-radius:5px}
.reader-page .beginner-layout img.windsock-symbol{display:block;width:auto;height:54px;max-width:120px;margin:auto;background:white}
body[data-reading-theme=night] .beginner-layout .book-table-wrap thead th{background:#29424b;color:#e1e9e8}
body[data-reading-theme=night] .beginner-layout caption{background:#29424b}
body[data-reading-theme=sepia] .beginner-layout .book-table-wrap thead th,body[data-reading-theme=sepia] .beginner-layout caption{background:#eae0c9;color:#403529}
@media(max-width:600px){.reader-page .beginner-layout .book-table-wrap table{font-size:15px}.reader-page .beginner-layout .book-table-wrap td,.reader-page .beginner-layout .book-table-wrap th{padding:10px 12px;min-width:95px}.beginner-layout .book-math{font-size:1.35em}.beginner-layout .book-equations{padding:16px 12px}.beginner-layout .book-source-pages a{padding:8px 12px}}
.reader-page .beginner-layout .book-math{text-align:center}
.beginner-layout .book-fraction{white-space:nowrap}
.beginner-layout .book-table-wrap:has(th:nth-child(3)):not(:has(th:nth-child(4))) table{min-width:540px}
.beginner-layout .book-table-wrap:has(th:nth-child(4)):not(:has(th:nth-child(5))) table{min-width:480px}
.beginner-layout .book-table-wrap:has(th:nth-child(6)) table{min-width:920px}
.reader-page .beginner-layout .book-table-wrap:has(th:nth-child(6)) td:nth-child(5){min-width:290px}
.beginner-layout .table-scroll-hint{font:13px/1.6 system-ui,sans-serif;color:var(--muted);margin:24px 0 -16px}

.community-inbox{font-size:12px;white-space:nowrap}.header-account{flex-wrap:wrap}.my-community .forum-tabs{flex-wrap:wrap;margin-bottom:20px}.notification-unread{border-left:4px solid var(--accent,#2c7565)}.notification-target{outline:2px solid #2c7565;outline-offset:4px}.chapter-discussions{margin-bottom:24px}.chapter-discussions h3{margin:0}.chapter-discussions .forum-reading-item small{display:block;margin-top:6px}@media(max-width:760px){.my-community .forum-replies-heading{flex-wrap:wrap}.community-inbox{font-size:11px}}

body.image-viewer-open{overflow-anchor:none}

.forum-draft-status{display:flex;align-items:center;gap:12px;justify-content:space-between;flex-wrap:wrap;background:var(--surface,#f3f5f4);padding:12px;border-radius:8px}.forum-template{align-self:flex-start}.forum-image-picker{padding:14px;border:1px solid #dbe1df;border-radius:10px;min-width:0}.forum-image-previews,.forum-image-gallery{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:12px 0}.forum-image-previews figure{margin:0;min-width:0}.forum-image-previews img{width:100%;height:120px;object-fit:cover;border-radius:8px}.forum-image-previews button{width:100%;margin-top:6px}.forum-image-gallery img{display:block;width:100%;height:auto;max-height:340px;object-fit:contain;background:#f1f3f2;border-radius:8px}.forum-image-gallery .reader-image-frame{min-width:0;margin:0}.forum-image-picker input[type=file]{max-width:100%}@media(max-width:760px){.forum-image-previews,.forum-image-gallery{grid-template-columns:repeat(2,minmax(0,1fr))}.forum-draft-status{font-size:12px}.forum-image-previews img{height:100px}}

.forum-pending-images:not([hidden]){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:12px}.forum-pending-images figure{margin:0}.forum-pending-images img{width:100%;height:100px;object-fit:contain}.forum-pending-images figure div{display:flex;gap:8px;flex-wrap:wrap}


/* Reviewed beginner guide: native, selectable tables and fractions. */
.beginner-layout .book-table-wrap{max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;margin:28px 0;border:1px solid var(--line);border-radius:8px;scrollbar-gutter:stable}
.reader-page .beginner-layout .book-table-wrap table{display:table;width:100%;overflow:visible;margin:0;font-size:.9em;line-height:1.7}
.beginner-layout caption{caption-side:top;text-align:left;font-weight:700;padding:14px 16px;color:inherit;background:var(--paper,#f3f7f8)}
.reader-page .beginner-layout .book-table-wrap th,.reader-page .beginner-layout .book-table-wrap td{padding:12px 16px;min-width:100px;text-align:left;border:1px solid var(--line);vertical-align:middle}
.beginner-layout .book-table-wrap thead th{background:#edf4f5;color:#294b57;white-space:nowrap}
.beginner-layout .book-table-wrap tbody th{font-weight:600;white-space:nowrap}
.beginner-layout .book-table-wrap tbody tr:nth-child(even){background:#78909c08}
.beginner-layout .book-math{font-family:Georgia,'Times New Roman',serif;font-size:1.5em;line-height:2.1;text-align:center;overflow-x:auto;white-space:nowrap;padding:12px 0;letter-spacing:.05em}
.book-fraction{display:inline-flex;flex-direction:column;vertical-align:middle;text-align:center;line-height:1.35;margin:0 .2em;letter-spacing:normal}
.book-fraction>span:first-child{border-bottom:1px solid currentColor;padding:0 .2em .12em}
.book-fraction>span:last-child{padding:.12em .2em 0}
.beginner-layout .book-equations{background:#78909c0d;color:inherit}
.beginner-layout .book-symbols{font-size:.88em;line-height:1.85}
.beginner-layout .book-bullets{margin:20px 0 28px;padding-left:1.5em}
.beginner-layout .book-bullets li{padding-left:.25em;margin:.6em 0}
.beginner-layout .verified-diagram{background:#fff;color:#344a57}
.beginner-layout .diagram-transcript{text-align:left;font-size:14px;line-height:1.8;border-top:1px solid #e3eaed;margin-top:16px;padding-top:12px}
.beginner-layout .diagram-transcript summary{cursor:pointer;color:#52707c}
.beginner-layout .diagram-transcript p{margin:.75em 0}
.beginner-layout .book-source-pages{margin:40px 0 20px;border-top:1px solid var(--line);padding-top:18px;font:14px/1.8 system-ui,sans-serif}
.beginner-layout .book-source-pages summary{cursor:pointer;font-weight:600}
.beginner-layout .book-source-pages a{display:inline-block;padding:6px 12px;margin:4px;border:1px solid var(--line);border-radius:5px}
.reader-page .beginner-layout img.windsock-symbol{display:block;width:auto;height:54px;max-width:120px;margin:auto;background:white}
body[data-reading-theme=night] .beginner-layout .book-table-wrap thead th{background:#29424b;color:#e1e9e8}
body[data-reading-theme=night] .beginner-layout caption{background:#29424b}
body[data-reading-theme=sepia] .beginner-layout .book-table-wrap thead th,body[data-reading-theme=sepia] .beginner-layout caption{background:#eae0c9;color:#403529}
@media(max-width:600px){.reader-page .beginner-layout .book-table-wrap table{font-size:15px}.reader-page .beginner-layout .book-table-wrap td,.reader-page .beginner-layout .book-table-wrap th{padding:10px 12px;min-width:95px}.beginner-layout .book-math{font-size:1.35em}.beginner-layout .book-equations{padding:16px 12px}.beginner-layout .book-source-pages a{padding:8px 12px}}
.reader-page .beginner-layout .book-math{text-align:center}
.beginner-layout .book-fraction{white-space:nowrap}
.beginner-layout .book-table-wrap:has(th:nth-child(3)):not(:has(th:nth-child(4))) table{min-width:540px}
.beginner-layout .book-table-wrap:has(th:nth-child(4)):not(:has(th:nth-child(5))) table{min-width:480px}
.beginner-layout .book-table-wrap:has(th:nth-child(6)) table{min-width:920px}
.reader-page .beginner-layout .book-table-wrap:has(th:nth-child(6)) td:nth-child(5){min-width:290px}
.beginner-layout .table-scroll-hint{font:13px/1.6 system-ui,sans-serif;color:var(--muted);margin:24px 0 -16px}

.community-inbox{font-size:12px;white-space:nowrap}.header-account{flex-wrap:wrap}.my-community .forum-tabs{flex-wrap:wrap;margin-bottom:20px}.notification-unread{border-left:4px solid var(--accent,#2c7565)}.notification-target{outline:2px solid #2c7565;outline-offset:4px}.chapter-discussions{margin-bottom:24px}.chapter-discussions h3{margin:0}.chapter-discussions .forum-reading-item small{display:block;margin-top:6px}@media(max-width:760px){.my-community .forum-replies-heading{flex-wrap:wrap}.community-inbox{font-size:11px}}

body.image-viewer-open{overflow-anchor:none}

.forum-draft-status{display:flex;align-items:center;gap:12px;justify-content:space-between;flex-wrap:wrap;background:var(--surface,#f3f5f4);padding:12px;border-radius:8px}.forum-template{align-self:flex-start}.forum-image-picker{padding:14px;border:1px solid #dbe1df;border-radius:10px;min-width:0}.forum-image-previews,.forum-image-gallery{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:12px 0}.forum-image-previews figure{margin:0;min-width:0}.forum-image-previews img{width:100%;height:120px;object-fit:cover;border-radius:8px}.forum-image-previews button{width:100%;margin-top:6px}.forum-image-gallery img{display:block;width:100%;height:auto;max-height:340px;object-fit:contain;background:#f1f3f2;border-radius:8px}.forum-image-gallery .reader-image-frame{min-width:0;margin:0}.forum-image-picker input[type=file]{max-width:100%}@media(max-width:760px){.forum-image-previews,.forum-image-gallery{grid-template-columns:repeat(2,minmax(0,1fr))}.forum-draft-status{font-size:12px}.forum-image-previews img{height:100px}}

.forum-pending-images:not([hidden]){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:12px}.forum-pending-images figure{margin:0}.forum-pending-images img{width:100%;height:100px;object-fit:contain}.forum-pending-images figure div{display:flex;gap:8px;flex-wrap:wrap}

.forum-curation-badge{display:inline-block;font-size:12px;font-weight:600;padding:4px 8px;border-radius:5px;background:#e8eef3;color:#29516c}.forum-curation-badge.featured{background:#fff1d7;color:#785514}.forum-card-meta{flex-wrap:wrap}.chapter-discussions .forum-curation-badge{margin-right:4px}

.my-community .forum-tabs a[aria-current=page]{background:#155d70;color:#fff;border-color:#155d70}

/* Immersive mode preserves document scrolling and native text/image gestures. */
body.reader-immersive{background:#fff}
body.reader-immersive>.site-header,body.reader-immersive>footer,.reader-immersive .reader-page .book-heading,.reader-immersive .reader-page #toc,.reader-immersive .reader-page .reading-bar,.reader-immersive .reader-page .community-section,.reader-immersive #assistant-launch{display:none!important}
.reader-immersive .reader-page.inner-page,.reader-immersive.assistant-open .reader-page{max-width:100%;padding:0;margin:0}
.reader-immersive .reader-page .layout,.reader-immersive.assistant-open .reader-page .layout{display:block;margin:0}
.reader-immersive .reader-page .reading,.reader-immersive.assistant-open .reader-page .reading{max-width:960px;margin:auto;border:0;border-radius:0;box-shadow:none;padding:calc(24px + env(safe-area-inset-top)) max(20px,env(safe-area-inset-right)) calc(88px + env(safe-area-inset-bottom)) max(20px,env(safe-area-inset-left));min-height:100dvh}
.reader-immersive .reader-page .content{overflow-wrap:anywhere}
.reader-immersive .reader-page .content h1,.reader-immersive .reader-page .content h2,.reader-immersive .reader-page .content h3,.reader-immersive .reader-page .content h4{scroll-margin-top:24px}
.immersive-reader-chrome{position:fixed;inset:0;pointer-events:none;z-index:60;color:#193b39}
.immersive-reader-chrome[hidden],.immersive-reader-menu[hidden]{display:none}
.immersive-top,.immersive-bottom{position:absolute;left:0;right:0;background:#fffffff5;backdrop-filter:blur(12px);box-shadow:0 0 20px #102c3d18;pointer-events:auto}
.immersive-top{top:0;display:flex;align-items:center;gap:12px;padding:calc(10px + env(safe-area-inset-top)) max(14px,env(safe-area-inset-right)) 10px max(14px,env(safe-area-inset-left));border-bottom:1px solid #dce5dd}
.immersive-top strong{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:14px}
.immersive-reader-chrome button,.immersive-reader-chrome a{min-height:44px;font-size:12px;padding:8px 12px}
.immersive-top button{flex-shrink:0;background:#e7eee6;color:#193b39}
.immersive-bottom{bottom:0;padding:12px max(14px,env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) max(14px,env(safe-area-inset-left));border-top:1px solid #dce5dd}
.immersive-reader-status{display:flex;align-items:center;gap:12px;font-size:12px;margin-bottom:8px;flex-wrap:wrap}
.immersive-reader-status small{font-size:11px;margin-left:auto}
.immersive-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.immersive-actions button{padding:8px 4px}
.immersive-extra{display:flex;gap:8px;flex-wrap:wrap;align-items:center;justify-content:center;margin-top:8px}
.immersive-extra button{background:#e7eee6;color:#193b39}
.immersive-extra a{display:inline-flex;align-items:center}
.immersive-reader-menu{position:fixed;right:max(14px,env(safe-area-inset-right));bottom:calc(14px + env(safe-area-inset-bottom));z-index:60;min-height:44px;font-size:12px;padding:10px 16px;border-radius:24px;box-shadow:0 4px 16px #102c3d22;opacity:.92}
body.reader-immersive[data-reading-theme=sepia]{background:#f5eedc}
body.reader-immersive[data-reading-theme=night]{background:#17242b}
body[data-reading-theme=sepia] .immersive-top,body[data-reading-theme=sepia] .immersive-bottom{background:#f5eedcf5}
body[data-reading-theme=night] .immersive-top,body[data-reading-theme=night] .immersive-bottom{background:#17242bf5;color:#e1e9e8;border-color:#395158}
body[data-reading-theme=night] .immersive-reader-chrome small{color:#aebebb}
body[data-reading-theme=night] .immersive-reader-chrome a{color:#8ed3c3}
@media(max-width:760px){.immersive-top{gap:8px;flex-wrap:wrap}.immersive-top strong{order:-1;flex-basis:100%;font-size:15px}.immersive-reader-status small{margin-left:0;flex-basis:100%}.reader-immersive .reader-page .book-editorial{max-width:none}}

@media(max-width:760px){.reader-page .reading-actions{flex-wrap:wrap}.reader-page .reading-actions button{flex:1 1 90px}}

html:has(body.reader-immersive){overscroll-behavior-x:none}

/* Reader figures allow full diagram details; natural aspect ratio preserved. */
.reader-page .content img{display:block;margin:16px auto;max-width:100%;height:auto;max-height:min(85vh,900px);object-fit:contain;border-radius:6px}
@media(max-width:760px){.reader-page .content img{max-width:100%;height:auto;max-height:min(80vh,600px)}}
.reader-page .content figure{margin:22px auto;text-align:center;max-width:100%}
.reader-page .content figure img{margin:0 auto}
.reader-page .content figcaption{margin-top:8px;font-size:0.9rem;color:#5c6f79;text-align:center;line-height:1.5}
.reader-page .content [style*="grid-template-columns"] figure{margin:0}
.reader-page .content [style*="grid-template-columns"] figure img{max-height:360px;width:100%}

.reader-image-frame.image-awaiting-load{min-height:96px;background:#f3f5f4;border-radius:8px;display:flex;align-items:center;justify-content:center}
.reader-image-frame.image-awaiting-load img{opacity:0.85}
body[data-reading-theme=night] .reader-image-frame.image-awaiting-load{background:#20343b}

.reader-page .content,.reader-page .book-editorial{font-family:var(--reading-font-family,system-ui,sans-serif)!important;line-height:var(--reading-line-height,1.9)!important}.reader-page .content p,.reader-page .content li{line-height:inherit!important}body[data-reading-indent=true] .reader-page .content p{text-indent:2em!important}body[data-reading-indent=true] .reader-page .content :is(td,th,li,blockquote,figcaption,figure) p{text-indent:0!important}.reader-settings .reading-preferences>label{flex:1 1 130px;display:flex;flex-direction:column;align-items:stretch;gap:6px;font-size:13px}.reading-setting-hint{flex-basis:100%;font-size:12px;line-height:1.6}

body[data-reading-indent=false] .reader-page .content p{text-indent:0!important}.reader-page .content :is(p,li,h1,h2,h3,h4,h5,h6,td,th){font-family:inherit!important}

.reader-settings .reader-sheet-heading{position:sticky;top:0;background:inherit;z-index:2;padding:8px 0}

.reading-size-controls{display:flex;gap:12px;align-items:center;flex-basis:100%}.reading-size-controls>span{font-size:13px}.reader-settings .reading-preferences label>select{width:100%;min-width:0;font-size:14px}

/* Art of Paragliding: display the reviewed redraw when available. */
.reader-page[data-resource-id="art-of-paragliding-zh-20261014"] .art-image-pair{grid-template-columns:minmax(0,1fr)}
.reader-page[data-resource-id="art-of-paragliding-zh-20261014"] .art-image-pair>.art-image-cell:first-child{display:none}

/* Art of Paragliding: keep the reading view free of supplemental image notes. */
.reader-page[data-resource-id="art-of-paragliding-zh-20261014"] figure>figcaption{display:none}

/* Administrator page-view report. */
.access-filters{display:flex;align-items:end;gap:12px;flex-wrap:wrap}.access-filters label{display:flex;flex-direction:column;gap:5px;font-size:12px;flex:1 1 150px;min-width:0}.access-filters input,.access-filters select{width:100%;min-height:40px}.access-stats{grid-template-columns:repeat(4,minmax(0,1fr));margin:20px 0}.access-table-wrap{overflow:auto}.access-table{border-collapse:collapse;min-width:740px;width:100%;font-size:13px}.access-table th,.access-table td{padding:12px 10px;border-bottom:1px solid #e3e9ec;vertical-align:top;text-align:left}.access-table small,.access-popular small{display:block;font-size:11px;color:#72818a;margin-top:4px;overflow-wrap:anywhere}.access-ip{font-family:monospace;max-width:260px;overflow-wrap:anywhere}.access-pages{display:flex;align-items:center;justify-content:center;gap:16px;margin-top:16px;font-size:13px}.access-popular{margin-bottom:20px}.access-popular>div{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.access-popular>div>div{display:flex;justify-content:space-between;gap:12px;background:#f3f7f8;padding:10px;border-radius:7px;font-size:13px}.access-popular strong{white-space:nowrap}@media(max-width:760px){.access-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.access-popular>div{grid-template-columns:1fr}.access-filters label{flex-basis:calc(50% - 12px)}.access-table-wrap{margin:0 -10px}}
.access-view-tabs{display:flex;gap:8px;margin-bottom:16px}.access-region-panel{margin-bottom:20px}.access-region-head{display:flex;gap:14px;align-items:center;flex-wrap:wrap}.access-region-head h2{flex:1;margin:0}.access-region-head label{font-size:12px;display:flex;align-items:center;gap:6px}.access-region-head select{width:auto;min-height:36px;font-size:12px}.access-region-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 12px;margin:14px 0;font-size:13px}.access-region-row>span{overflow-wrap:anywhere}.access-region-row strong{font-size:12px;white-space:nowrap}.access-region-row meter{grid-column:1/-1;width:100%;height:12px;accent-color:#19758b}.access-details[hidden],.access-region-panel[hidden],.access-popular[hidden]{display:none!important}@media(max-width:760px){.access-region-head label{flex:1}.access-region-head h2{flex-basis:100%}.access-region-row{font-size:12px}.access-region-row strong{font-size:11px}}
.access-filter-panel{margin:0 0 18px}.access-filter-details>summary{cursor:pointer;font-weight:600;font-size:14px}.access-filter-details[open] .access-filters{margin-top:14px}.access-method{margin-top:10px;font-size:12px;color:#6a7f8b}.access-method summary{cursor:pointer}.access-filter-panel [data-access-status]{font-size:12px;margin:10px 0 0}.access-stats{margin:0 0 18px}.access-filter-details summary::marker{color:#19758b}

/* Subjects supplement media types; parent selection includes every child. */
.resource-subject-filter{margin:20px 0 8px;padding:16px 18px;background:#fff;border:1px solid var(--line);border-radius:12px}.resource-subject-heading{display:flex;gap:14px;align-items:center}.resource-subject-heading>strong{font-size:13px;white-space:nowrap}.resource-subject-heading select{width:auto;max-width:100%;min-width:210px;padding:8px 12px;font-size:13px}.resource-subject-chips{display:flex;flex-wrap:wrap;gap:7px;margin-top:12px}.resource-subject-chips button{font-size:12px;padding:6px 11px;min-height:34px}.resource-subject-chips button[aria-pressed=true]{background:#175b6f;color:#fff;border-color:#175b6f}.resource-meta{flex-wrap:wrap;gap:8px 16px}.resource-meta .resource-subject-label{color:#175b6f;font-size:11px;background:#eaf3f5;border-radius:5px;padding:1px 5px}.resource-category-picker{border:1px solid var(--line);padding:16px;border-radius:10px;min-width:0}.resource-category-picker legend{float:none;width:auto;font-size:14px;font-weight:650;padding:0 6px;margin:0}.resource-category-picker>.muted{font-size:12px;margin:0 0 12px}.resource-category-picker [data-category-checks]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.resource-category-picker [data-category-checks]>label{display:flex;align-items:center;gap:8px;font-size:13px;min-width:0;padding:7px;background:#f6f9fa;border-radius:6px}.resource-category-picker input[type=checkbox]{width:18px;height:18px;flex:none;padding:0}.resource-category-picker [data-category-checks] span{overflow-wrap:anywhere}.resource-category-picker details{margin-top:14px}.resource-category-picker summary{cursor:pointer;font-size:13px;color:#175b6f;font-weight:600}.resource-category-create{display:grid;gap:10px;margin-top:12px}.resource-category-create label{font-size:13px}.resource-category-create p{font-size:12px;margin:0}.resource-category-create button{justify-self:start}@media(max-width:600px){.resource-subject-filter{padding:14px}.resource-subject-heading{align-items:flex-start;flex-direction:column;gap:8px}.resource-subject-heading select{width:100%;min-width:0}.resource-subject-chips button{font-size:12px;min-height:38px}.resource-category-picker{padding:12px}.resource-category-picker [data-category-checks]{grid-template-columns:1fr}}

/* Knowledge and equipment are separate primary collections. */
.resource-section-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:22px 0 26px}.resource-section-tabs button{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:19px 22px;border:1px solid var(--line);background:#fff;color:var(--ink);text-align:left;border-radius:12px}.resource-section-tabs button span{display:flex;flex-direction:column;gap:3px}.resource-section-tabs strong{font-size:20px}.resource-section-tabs small{font-size:12px}.resource-section-tabs b{font-size:22px;font-weight:600}.resource-section-tabs button[aria-pressed=true]{background:#175b6f;border-color:#175b6f;color:#fff;box-shadow:0 5px 16px #175b6f19}.resource-section-tabs button[aria-pressed=true] small{color:#e2f0f4}.resource-section-tabs button:focus-visible{outline:3px solid #edaa53;outline-offset:3px}@media(max-width:600px){.resource-section-tabs{gap:9px;margin:18px 0}.resource-section-tabs button{padding:14px 12px;gap:6px}.resource-section-tabs strong{font-size:18px}.resource-section-tabs small{font-size:11px;line-height:1.5}.resource-section-tabs b{font-size:18px}}

.resource-tags{display:flex;flex-wrap:wrap;gap:6px;margin:7px 0}.resource-tag{display:inline-block;max-width:100%;padding:3px 9px;border-radius:7px;background:#eaf3f5;color:#175b6f;font-size:12px;overflow-wrap:anywhere}.resource-tag:hover{background:#d7ebee}.resource-tag-editor{min-width:0;border:1px solid var(--line);border-radius:10px;padding:16px}.resource-tag-editor legend{float:none;width:auto;font-size:14px;font-weight:650;padding:0 6px;margin:0}.resource-tag-editor p{font-size:12px;margin:0 0 10px}.resource-tag-editor [data-tag-values]{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:8px}.resource-tag-editor [data-tag-error]{color:#a44639;margin-top:5px}.resource-tag-editor label{display:block;font-size:13px}.resource-tag-editor input{margin-top:5px}#resource-tag-filter{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:16px 0}#resource-tag-filter:empty{display:none}.resource-tag-filter{display:flex;align-items:center;gap:12px;font-size:13px;margin:0}.resource-tag-filter select{width:auto;min-width:180px;max-width:260px;padding:7px 10px}#resource-tag-filter button{padding:7px 10px;font-size:12px}.book-heading .resource-tags{margin:10px 0}@media(max-width:600px){.resource-tag-editor{padding:12px}.resource-tag-filter{flex:1}.resource-tag-filter select{min-width:0;flex:1;max-width:100%}}

/* Mobile Admin Entry Card on Personal Shelf */
.mobile-admin-entry-card{margin:16px 0 24px;padding:16px 18px;background:linear-gradient(135deg,#f0f7f8 0%,#e6f1f4 100%);border:1px solid #cce1e7;border-radius:12px;box-shadow:0 2px 8px rgba(23,91,111,0.06)}
.mobile-admin-entry-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
.mobile-admin-entry-title{display:flex;align-items:center;gap:10px}
.mobile-admin-icon{font-size:20px;line-height:1}
.mobile-admin-entry-title strong{font-size:15px;color:#175b6f;display:block}
.mobile-admin-entry-title small{font-size:11px;color:#5d7580;display:block}
.mobile-admin-enter-btn{font-size:12px;font-weight:600;color:#fff;background:#175b6f;border-radius:6px;padding:6px 12px;text-decoration:none;display:inline-flex;align-items:center;white-space:nowrap}
.mobile-admin-enter-btn:active{opacity:0.85}
.mobile-admin-quick-links{display:flex;flex-wrap:wrap;gap:8px}
.mobile-admin-chip{display:inline-flex;align-items:center;gap:4px;font-size:12px;color:#2c4e59;background:rgba(255,255,255,0.88);border:1px solid #d2e4e9;border-radius:20px;padding:5px 11px;text-decoration:none;font-weight:500;transition:all .15s}
.mobile-admin-chip:active{background:#175b6f;color:#fff;border-color:#175b6f}
@media(min-width:769px){.mobile-admin-entry-card{display:none!important}}

/* Mobile Admin Navigation Bar */
.admin-mobile-nav{display:block!important;width:100%;margin-bottom:20px;background:#fff;border:1px solid var(--line,#e2e8ea);border-radius:12px;padding:12px 14px;box-shadow:0 2px 8px rgba(0,0,0,0.03)}
.admin-mobile-top{display:flex!important;width:100%;align-items:center;justify-content:space-between;margin-bottom:10px;padding-bottom:10px;border-bottom:1px solid #edf2f4}
.admin-exit-link{font-size:13px;color:#175b6f;font-weight:600;text-decoration:none;display:inline-flex;align-items:center;gap:4px}
.admin-exit-link:active{opacity:0.7}
.admin-mobile-top-right{display:flex;align-items:center;gap:8px}
.admin-mobile-badge{font-size:11px;font-weight:700;padding:2px 8px;background:#eef6f8;color:#175b6f;border-radius:10px;border:1px solid #cce1e7}
.admin-mobile-logout{font-size:11px;color:#b02a37;background:#fdf2f2;border:1px solid #f5c2c7;border-radius:6px;padding:2px 8px;cursor:pointer}
.admin-nav-tabs{display:flex!important;flex-wrap:nowrap!important;width:100%;gap:8px;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none;padding:2px 0}
.admin-nav-tabs::-webkit-scrollbar{display:none}
.admin-nav-tab{flex:0 0 auto!important;display:inline-flex!important;align-items:center;justify-content:center;padding:7px 14px!important;min-height:32px;font-size:13px!important;font-weight:550;color:#4b636d!important;background:#f2f6f7!important;border:1px solid #dbe6e8!important;border-radius:20px!important;text-decoration:none!important;white-space:nowrap!important;transition:all .15s}
.admin-nav-tab:active,.admin-nav-tab.active{background:#175b6f!important;color:#fff!important;border-color:#175b6f!important;font-weight:600;box-shadow:0 2px 6px rgba(23,91,111,0.2)}
@media(min-width:769px){.admin-mobile-nav{display:none!important}}

/* Mobile Admin Pages & Components Refactoring */
@media(max-width:768px){
  .admin-page{padding-top:14px;padding-bottom:calc(76px + env(safe-area-inset-bottom))}
  .admin-page .admin-heading{flex-direction:column;align-items:flex-start;gap:6px;margin-bottom:16px}
  .admin-page .admin-heading h1{font-size:24px;margin:2px 0 6px}
  .admin-page .admin-heading .admin-actions{display:none}
  .admin-page .admin-heading a[href^="/admin#"]{display:inline-flex;align-items:center;padding:4px 10px;background:#eef4f6;color:#175b6f;border-radius:6px;font-size:12px;text-decoration:none;margin-bottom:4px}
  .admin-page .admin-stats{grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:18px}
  .admin-page .admin-stats .panel{padding:10px 12px;display:flex;flex-direction:column;align-items:flex-start;gap:4px;border-radius:8px}
  .admin-page .admin-stats small{font-size:11px;color:var(--muted,#667e86)}
  .admin-page .admin-stats strong{font-size:20px;font-weight:700;color:#175b6f}
  .admin-page .admin-grid{grid-template-columns:1fr;gap:16px;margin-top:18px!important}
  .admin-resource{display:grid;grid-template-columns:50px 1fr;grid-gap:12px;padding:14px;margin-bottom:12px;background:#f8fafb;border:1px solid var(--line,#e2e8ea);border-radius:10px;align-items:start}
  .admin-thumbnail{width:50px;height:65px;border-radius:4px}
  .admin-resource-info strong{font-size:15px;line-height:1.4}
  .admin-resource-info small{font-size:12px;color:var(--muted,#667e86)}
  .admin-resource .admin-actions{grid-column:1/-1;display:flex;gap:8px;margin-top:4px;padding-top:8px;border-top:1px dashed var(--line,#e2e8ea)}
  .admin-resource .admin-actions button,.admin-resource .admin-actions a{flex:1 1 0;text-align:center;padding:7px 8px;font-size:12px;min-height:36px;display:inline-flex;align-items:center;justify-content:center}
  .member-table{overflow:visible!important;padding:0!important;background:transparent!important;border:none!important}
  .member-table .member-filter-toolbar{display:flex;flex-direction:column;gap:10px;padding:14px;background:#fff;border:1px solid var(--line,#e2e8ea);border-radius:12px;margin-bottom:14px}
  .member-table .member-filter-toolbar input{width:100%!important;min-width:0!important}
  .member-table .member-filter-toolbar select{width:100%!important;min-width:0!important}
  .member-table table,.member-table tbody{display:block!important;width:100%!important;min-width:0!important}
  .member-table thead{display:none!important}
  .member-table tr[data-member-id]{display:flex!important;flex-direction:column!important;gap:10px!important;padding:16px!important;margin-bottom:14px!important;background:#fff!important;border:1px solid var(--line,#e2e8ea)!important;border-radius:12px!important;box-sizing:border-box!important;width:100%!important;box-shadow:0 1px 3px rgba(0,0,0,0.03)}
  .member-table td{display:flex!important;align-items:center!important;justify-content:space-between!important;padding:0!important;border:none!important;font-size:13px!important;width:100%!important;box-sizing:border-box!important}
  .member-table td:nth-child(1){padding-bottom:10px!important;border-bottom:1px dashed var(--line,#e2e8ea)!important}
  .member-table td:nth-child(1) strong{font-size:16px;color:var(--ink,#102935)}
  .member-table td:nth-child(1) small{margin-top:0;font-size:12px;color:var(--muted,#667e86)}
  .member-table td:nth-child(2)::before{content:"注册时间";color:var(--muted,#667e86);font-size:12px;font-weight:500}
  .member-table td:nth-child(3)::before{content:"账号角色";color:var(--muted,#667e86);font-size:12px;font-weight:500}
  .member-table td:nth-child(3) select{width:auto!important;min-width:110px!important;padding:4px 8px;font-size:13px}
  .member-table td:nth-child(4)::before{content:"当前状态";color:var(--muted,#667e86);font-size:12px;font-weight:500}
  .member-table td:nth-child(5){margin-top:6px!important;padding-top:12px!important;border-top:1px solid var(--line,#e2e8ea)!important;display:flex!important;gap:8px!important;flex-wrap:wrap!important;justify-content:flex-end!important}
  .member-table td:nth-child(5) button{font-size:12px!important;padding:7px 12px!important;flex:1 1 auto!important;min-height:36px!important;text-align:center!important;margin:0!important}
  .member-table button[data-approve-member]{background:#0d7a63!important;color:#fff!important;font-weight:600!important}
  .ai-config-layout{grid-template-columns:1fr;gap:16px}
  .editor-dialog{width:100vw;max-width:100vw;height:100vh;max-height:100vh;border-radius:0;border:none;margin:0;display:flex;flex-direction:column}
  .editor-dialog .dialog-heading{padding:14px 16px;position:sticky;top:0;z-index:10;background:#fff;border-bottom:1px solid var(--line,#e2e8ea)}
  .editor-dialog .dialog-body{flex:1;overflow-y:auto;padding:16px;-webkit-overflow-scrolling:touch}
  .editor-dialog .editor-savebar{position:sticky;bottom:0;background:#fff;padding:12px 16px;margin:16px -16px -16px;border-top:1px solid var(--line,#e2e8ea);box-shadow:0 -4px 12px rgba(0,0,0,0.05);z-index:5}
  .editor-dialog .field-pair{grid-template-columns:1fr;gap:12px}
  .editor-dialog .cover-editor{flex-direction:column;align-items:flex-start;gap:12px}
  .chapter-row{display:grid;grid-template-columns:28px 1fr;grid-gap:8px 10px;padding:12px;margin-bottom:8px;background:#f8fafb;border:1px solid var(--line,#e2e8ea);border-radius:8px;align-items:center}
  .chapter-number{font-weight:700;color:#175b6f}
  .chapter-row strong{font-size:14px;line-height:1.4}
  .chapter-row .admin-actions{grid-column:1/-1;display:flex;gap:6px;flex-wrap:wrap;padding-top:8px;border-top:1px dashed var(--line,#e2e8ea)}
  .chapter-row .admin-actions button{flex:1 1 auto;min-height:32px;padding:5px 8px;font-size:11px}
}


/* Chapter lookup remains local and preserves the reader's directory browsing position. */
.reader-directory-search{position:sticky;top:0;z-index:2;background:#fff;padding:10px 0 12px;margin-bottom:8px;border-bottom:1px solid #e4ecec}
.reader-directory-search label{display:block;font-size:12px;font-weight:600}
.reader-directory-search input{display:block;width:100%;min-width:0;margin-top:6px;font-size:14px;padding:9px 10px;min-height:42px}
.reader-directory-search-actions{display:flex;align-items:center;justify-content:space-between;gap:6px;margin-top:8px}
.reader-directory-search-actions small{font-size:11px}
.reader-directory-search-actions button{font-size:11px;padding:6px 8px;min-height:36px;white-space:nowrap}
.reader-directory-search p{font-size:12px;margin:12px 0 0}
.reader-directory-links a[hidden],.toc a[hidden]{display:none!important}

.reader-directory-header{position:sticky;top:-24px;z-index:3;background:#fff;padding-top:8px}
.reader-directory-header .reader-sheet-heading{margin-bottom:8px}
.reader-directory-header .reader-directory-search{position:static}
@media(max-width:760px){.reader-directory-header{top:-20px}}

.reader-load-status{position:fixed;left:50%;top:calc(12px + env(safe-area-inset-top));transform:translateX(-50%);z-index:100;width:max-content;max-width:calc(100vw - 24px);display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:12px 16px;border:1px solid #b8d5dc;border-radius:12px;background:#fff;color:#193b39;box-shadow:0 8px 30px #102c3d22;font-size:13px}
.reader-load-status[hidden]{display:none}.reader-load-status button{min-height:40px;padding:8px 12px;font-size:12px}.reader-load-status span{flex:1 1 180px}
.immersive-chapter-jump{display:flex;align-items:center;justify-content:center;gap:8px;margin-top:10px;padding-top:10px;border-top:1px solid #dce5dd}.immersive-chapter-jump[hidden]{display:none}.immersive-chapter-jump span{font-size:11px}.immersive-chapter-jump button{background:#e7eee6;color:#193b39}
.immersive-more{margin-top:8px;font-size:12px}.immersive-more summary{min-height:40px;display:flex;align-items:center;justify-content:center;cursor:pointer}.immersive-more summary::after{content:' ▾';margin-left:6px}.immersive-more[open] summary::after{content:' ▴'}
.immersive-bottom{max-height:60dvh;overflow-y:auto}.immersive-top [data-action=close]{margin-left:auto}
@media(max-width:760px){.immersive-top{flex-wrap:nowrap}.immersive-top strong{order:0;flex-basis:auto;font-size:13px}.immersive-top button{padding:8px}.immersive-top [data-action=native]{display:none}.immersive-reader-status small{font-size:10px}.immersive-chapter-jump button{flex:1}}

body[data-reading-theme=night] .reader-load-status{background:#17242b;color:#e1e9e8;border-color:#395158}

.reader-settings-preview{position:sticky;top:76px;z-index:1;background:#fff;color:#243b45;border:1px solid #dce5dd;border-radius:10px;padding:10px 12px;margin-bottom:16px;max-height:170px;overflow:auto}
.reader-settings-preview small{display:block;color:#6d7d77;font:11px/1.4 system-ui,sans-serif;margin-bottom:6px}
.reader-settings-preview p{margin:0;font-family:var(--reading-font-family,system-ui,sans-serif);font-size:var(--reading-font-size,18px);line-height:var(--reading-line-height,1.9);overflow-wrap:anywhere}
.reader-settings-preview[data-indent=true] p{text-indent:2em}
.reader-settings-preview[data-theme=sepia]{background:#f5eedc;color:#403529}
.reader-settings-preview[data-theme=night]{background:#17242b;color:#e1e9e8;border-color:#395158}
.reader-settings-preview[data-theme=night] small{color:#aebebb}
.reading-reset-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding-top:16px;margin-top:16px;border-top:1px solid #e4ecec}
.reading-reset-row small{font-size:12px;flex:1 1 180px}
@media(max-width:760px){.reader-settings-preview{max-height:148px;top:76px}.reader-settings .reader-sheet-heading{margin-bottom:12px}}

/* Readable tables: a local horizontal scroller without changing source text. */
.reader-page .content .reader-table-shell{max-width:100%;min-width:0;margin:20px 0;--table-readable-width:0px}
.reader-table-shell::before{content:attr(data-hint);display:block;min-height:24px;font:12px/24px system-ui,sans-serif;color:var(--muted);text-align:right}
.reader-table-shell[data-wide=false]::before{visibility:hidden}
.reader-table-scroll{max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin;border-radius:6px}
.reader-table-scroll:focus-visible{outline:2px solid #328b96;outline-offset:3px}
.reader-page .content .reader-table-scroll>table{display:table;overflow:visible;max-width:none;width:100%;min-width:var(--table-readable-width);margin:0}
.reader-page .content .reader-table-scroll td,.reader-page .content .reader-table-scroll th{overflow-wrap:break-word}
body[data-reading-theme=night] .reader-table-shell::before{color:#a9c2c6}
body[data-reading-theme=sepia] .reader-table-shell::before{color:#74654d}
@media print{.reader-table-shell::before{display:none}.reader-table-scroll{overflow:visible}.reader-page .content .reader-table-scroll>table{min-width:0}}

/* Single reading mode with a permanent way back to the shelf. */
.immersive-reader-shortcuts{position:fixed;right:max(14px,env(safe-area-inset-right));bottom:calc(14px + env(safe-area-inset-bottom));z-index:60;display:flex;align-items:center;gap:8px}
.immersive-reader-shortcuts .immersive-reader-menu{position:static}
.immersive-shelf-link{min-height:44px;display:inline-flex;align-items:center;padding:10px 14px;font-size:12px;border-radius:24px;box-shadow:0 4px 16px #102c3d22}
body:has(.immersive-reader-chrome:not([hidden])) .immersive-reader-shortcuts,body.image-viewer-open .immersive-reader-shortcuts,body.assistant-open .immersive-reader-shortcuts{display:none}
.reader-immersive .reader-page .reader-discussion-visible .community-section{display:block!important}
.reader-immersive .reader-page>.mobile-toc{display:none!important}

/* Gesture-first reading; the keyboard menu appears only when tab-focused. */
.immersive-reader-shortcuts:not(:focus-within){width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;pointer-events:none}

/* Thin reading progress and end-of-chapter navigation. */
.reader-immersive .reader-page .reading{overflow-anchor:none}
.reader-progress-line{position:fixed;top:0;left:0;right:0;height:2px;background:transparent;z-index:61;pointer-events:none}
.reader-progress-line>span{display:block;width:100%;height:100%;background:#328b96;transform:scaleX(0);transform-origin:left}
body.image-viewer-open .reader-progress-line{display:none}
.reader-page .chapter-nav.reader-chapter-end{display:grid;grid-template-columns:repeat(var(--chapter-end-columns,3),minmax(0,1fr));gap:12px;padding-top:24px;border-top:1px solid var(--line)}
.reader-end-heading{grid-column:1/-1;font-size:14px;color:var(--muted);text-align:center;margin-bottom:6px}
.reader-chapter-end a{font-size:14px;padding:10px}
body[data-reading-theme=night] .reader-progress-line>span{background:#7ac5cb}
@media(max-width:480px){.reader-page .chapter-nav.reader-chapter-end{gap:8px}.reader-chapter-end a{font-size:12px;padding:8px 4px}}

.reader-lookup-actions{display:flex;gap:8px;flex-wrap:wrap}.reader-lookup-actions button{font-size:12px;padding:8px 12px}.immersive-bottom>.reader-lookup-actions{justify-content:center;margin-top:10px}
.reader-find-panel{position:fixed;top:12px;bottom:auto;margin:0 auto;width:min(580px,calc(100vw - 24px));max-height:45dvh;overflow:auto;border:1px solid var(--line);border-radius:12px;background:#fff;color:#193b39;padding:14px;z-index:90;box-shadow:0 8px 28px #102c3d25}
.reader-lookup-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.reader-lookup-heading button{font-size:12px;padding:8px 10px}.reader-find-label{display:block;font-size:12px}.reader-find-label input{display:block;margin-top:6px}.reader-find-actions{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:10px;font-size:12px}.reader-find-actions button{padding:8px 12px}.reader-find-panel [data-excerpt]{font-size:12px;line-height:1.6;margin:8px 0 0;max-height:4.8em;overflow:auto}
.reader-position-dialog{width:min(600px,calc(100vw - 24px));max-height:80dvh;overflow:auto;border:1px solid var(--line);border-radius:12px;background:#fff;color:#193b39;padding:18px}.reader-position-dialog::backdrop{background:#10293580}.reader-position-dialog p{font-size:13px}.reader-position-row{display:flex;gap:8px;margin-top:10px;align-items:start}.reader-position-row button:first-child{flex:1;text-align:left;overflow-wrap:anywhere}.reader-position-row button{font-size:13px;padding:10px}
::highlight(reader-find){background:#ffec99;color:#182e34}::highlight(reader-find-active){background:#eeab43;color:#17242b}
body[data-reading-theme=night] .reader-find-panel,body[data-reading-theme=night] .reader-position-dialog{background:#17242b;color:#e1e9e8;--line:#395158}
body[data-reading-theme=sepia] .reader-find-panel,body[data-reading-theme=sepia] .reader-position-dialog{background:#f5eedc;color:#403529}
.immersive-reader-shortcuts[hidden],.reader-progress-line[hidden]{display:none!important}
@media(max-width:760px){.reader-find-panel{top:calc(8px + env(safe-area-inset-top));padding:12px}.reader-lookup-heading{gap:6px}.reader-position-dialog{padding:14px}}
/* Search stays above the match instead of inheriting mobile bottom-sheet layout. */
.reader-find-panel{top:calc(8px + env(safe-area-inset-top))!important;bottom:auto!important;left:0!important;right:0!important;margin:0 auto!important;width:min(580px,calc(100vw - 24px))!important;max-width:calc(100vw - 24px)!important;max-height:45dvh!important;border-radius:12px!important}
.reader-find-panel::before{display:none!important}

.reader-visit-note{display:block;color:var(--muted);font-size:11px;padding:6px 10px}
#toc a[data-read-state]:not([data-read-state=""])::after,.reader-directory-links a[data-read-state]:not([data-read-state=""])::after{content:attr(data-read-state);display:inline-block;font-size:10px;font-weight:500;line-height:1.5;padding:1px 6px;margin-left:6px;border-radius:8px;color:#55727b;background:#edf3f4;white-space:nowrap;vertical-align:middle}
#toc a[data-read-state="正在读"]::after,.reader-directory-links a[data-read-state="正在读"]::after{background:#dbeee8;color:#185c4a}
body[data-reading-theme=night] .reader-directory-links a[data-read-state]::after{background:#29424b;color:#c5e0df}

/* Native In-Article Physics Simulator Styles */
.article-native-simulator{margin:32px 0;border:1px solid #334155;border-radius:12px;background:#0f172a;color:#f8fafc;overflow:hidden;box-shadow:0 8px 30px rgba(0,0,0,0.32);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif}
.native-sim-header{padding:14px 20px;background:#1e293b;border-bottom:1px solid #334155;display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:10px}
.native-sim-title{display:flex;align-items:center;gap:10px}
.native-sim-title strong{font-size:15px;color:#f8fafc;font-weight:600}
.native-sim-subtitle{font-size:12px;color:#94a3b8;margin-left:4px}
.native-sim-badge{font-size:12px;font-weight:600;padding:4px 12px;border-radius:20px;transition:all 0.25s ease}
.native-sim-badge.safe{background:rgba(34,197,94,0.18);color:#4ade80;border:1px solid rgba(34,197,94,0.35)}
.native-sim-badge.warning{background:rgba(245,158,11,0.18);color:#fbbf24;border:1px solid rgba(245,158,11,0.35)}
.native-sim-badge.danger{background:rgba(239,68,68,0.22);color:#f87171;border:1px solid rgba(239,68,68,0.45);animation:pulse-danger 1.5s infinite}
@keyframes pulse-danger{0%,100%{opacity:1}50%{opacity:0.75}}

.native-sim-body{display:flex;flex-direction:row;gap:20px;padding:20px}
.native-sim-canvas-box{flex:1 1 56%;min-width:0;background:#0b1120;border:1px solid #1e293b;border-radius:10px;position:relative;overflow:hidden;display:flex;align-items:center;justify-content:center}
.native-sim-canvas-box canvas{width:100%;height:auto;display:block;aspect-ratio:4/3;background:#0b1120}

.native-sim-controls{flex:1 1 44%;min-width:280px;display:flex;flex-direction:column;gap:14px}
.native-sim-presets-wrap{display:flex;flex-direction:column;gap:6px}
.native-sim-section-label{font-size:12px;color:#94a3b8;font-weight:600;text-transform:uppercase;letter-spacing:0.5px}
.native-sim-presets{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.native-sim-preset-btn{background:#1e293b;border:1px solid #334155;border-radius:8px;padding:8px 10px;font-size:12.5px;color:#cbd5e1;cursor:pointer;display:flex;align-items:center;gap:6px;transition:all 0.2s}
.native-sim-preset-btn:hover{background:#334155;color:#f8fafc;border-color:#475569}
.native-sim-preset-btn.active{background:rgba(56,189,248,0.14);border-color:#38bdf8;color:#38bdf8;font-weight:600}

.native-sim-slider-group{display:flex;flex-direction:column;gap:5px}
.native-sim-slider-label{display:flex;justify-content:space-between;align-items:center;font-size:13px;color:#e2e8f0}
.native-sim-val-pill{font-size:12px;font-weight:700;color:#38bdf8;background:rgba(56,189,248,0.12);padding:2px 8px;border-radius:6px;font-family:monospace}
.native-sim-slider-group input[type=range]{width:100%;height:6px;border-radius:3px;background:#334155;outline:none;-webkit-appearance:none;cursor:pointer;margin:4px 0}
.native-sim-slider-group input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:18px;height:18px;border-radius:50%;background:#38bdf8;cursor:pointer;box-shadow:0 0 8px rgba(56,189,248,0.6);border:2px solid #ffffff}
.native-sim-slider-group input[type=range]::-moz-range-thumb{width:18px;height:18px;border-radius:50%;background:#38bdf8;cursor:pointer;border:2px solid #ffffff}
.native-sim-slider-scale{display:flex;justify-content:space-between;font-size:11px;color:#64748b}

.native-sim-metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.native-sim-metric-card{background:#1e293b;border:1px solid #334155;border-radius:8px;padding:8px 10px;text-align:center;display:flex;flex-direction:column;gap:3px}
.native-sim-metric-card .metric-title{font-size:11px;color:#94a3b8}
.native-sim-metric-card .metric-value{font-size:16px;font-weight:700;color:#f8fafc;font-family:monospace}
.native-sim-metric-card .metric-note{font-size:10px;color:#64748b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

.native-sim-banner{padding:10px 14px;border-radius:8px;font-size:12.5px;line-height:1.5;transition:all 0.25s ease}
.native-sim-banner strong{font-weight:700}

@media(max-width:860px){
 .native-sim-body{flex-direction:column;padding:14px;gap:16px}
 .native-sim-canvas-box canvas{aspect-ratio:4/3}
 .native-sim-controls{min-width:auto}
}
@media(max-width:480px){
 .native-sim-header{padding:10px 14px}
 .native-sim-presets{grid-template-columns:1fr}
 .native-sim-metrics{grid-template-columns:1fr 1fr}
 .native-sim-metric-card:last-child{grid-column:span 2}
}

/* Magazine article editorial layout and typography */
.magazine-article{max-width:860px;margin:0 auto;color:var(--ink,#152d3b);line-height:1.95}
.magazine-header{margin-bottom:28px;padding-bottom:20px;border-bottom:1px solid var(--line,#e2e7e9)}
.magazine-badge{display:inline-flex;align-items:center;gap:8px;padding:4px 12px;background:#eef5f4;color:#175b6f;border:1px solid #cce0dd;border-radius:4px;font-size:12px;font-weight:600;letter-spacing:.5px;margin-bottom:14px}
.magazine-header h1{font-size:clamp(25px,3.8vw,36px);font-weight:750;line-height:1.35;color:#0e222d;margin:0 0 14px 0}
.magazine-deck{font-size:16.5px;line-height:1.85;color:#435b67;margin:0 0 18px 0;padding-left:14px;border-left:3.5px solid #1a6d83}
.magazine-byline{display:flex;flex-wrap:wrap;align-items:center;gap:14px;font-size:12.5px;color:#72848f;padding-top:8px}
.magazine-hero{margin:24px 0 32px 0;border-radius:8px;overflow:hidden;box-shadow:0 8px 24px rgba(21,45,59,.08);background:#f0f4f5}
.magazine-hero img{width:100%;height:auto;display:block;max-height:540px;object-fit:cover}
.magazine-hero figcaption,.magazine-figure figcaption{padding:10px 14px;font-size:12.5px;line-height:1.6;color:#637782;background:#f7fafb;border-top:1px solid #e7eeef;text-align:left}
.magazine-figure{margin:28px auto;border-radius:8px;overflow:hidden;border:1px solid #e5ecee;background:#f7fafb;max-width:100%}
.magazine-figure img{width:100%;height:auto;display:block;max-height:500px;object-fit:contain;background:#edf2f4}
.magazine-pullquote{position:relative;margin:32px 0;padding:20px 24px 20px 36px;background:linear-gradient(135deg,#f3f8f9 0%,#edf4f5 100%);border-left:4px solid #1a6d83;border-radius:0 8px 8px 0;font-size:17.5px;line-height:1.8;color:#123746;font-style:italic}
.magazine-pullquote::before{content:"“";position:absolute;top:8px;left:10px;font-size:40px;line-height:1;color:#1a6d83;font-family:Georgia,serif;opacity:.35}
.magazine-pullquote cite{display:block;margin-top:8px;font-size:12.5px;font-weight:600;font-style:normal;color:#45626f;text-align:right}
.magazine-sidebar{margin:28px 0;padding:18px 22px;background:#f4f8f7;border:1px solid #d8e5e1;border-radius:8px}
.magazine-sidebar-title{font-size:14.5px;font-weight:700;color:#155b4b;margin-bottom:8px}
.magazine-sidebar p{font-size:15px;line-height:1.8;margin:6px 0;color:#334d47}
.magazine-body p{font-size:17px;line-height:1.95;margin:1.25em 0;color:#273e4a;text-align:justify}
.magazine-body h3{font-size:19px;font-weight:700;color:#123241;margin:32px 0 14px 0;padding-bottom:8px;border-bottom:1px solid #e5ecee;display:flex;align-items:center;gap:8px}
.magazine-body h3::before{content:"";display:inline-block;width:4px;height:17px;background:#175b6f;border-radius:2px}
.magazine-gallery-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:18px;margin:28px 0}
.magazine-gallery-card{border-radius:8px;overflow:hidden;border:1px solid #e2e8ea;background:#fff;box-shadow:0 4px 12px rgba(0,0,0,.03)}
.magazine-gallery-card img{width:100%;height:240px;object-fit:cover;display:block}
.magazine-gallery-caption{padding:12px 14px;font-size:12.5px;line-height:1.6;color:#556b77}
@media(max-width:760px){
 .magazine-header h1{font-size:22px}
 .magazine-deck{font-size:14.5px}
 .magazine-body p{font-size:16px;line-height:1.85}
 .magazine-pullquote{padding:16px 18px 16px 28px;font-size:15.5px}
 .magazine-hero img,.magazine-figure img{max-height:300px}
 .magazine-gallery-grid{grid-template-columns:1fr}
}


