@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@700;800;900&family=Zen+Maru+Gothic:wght@700;900&display=swap');
:root{--ink:#254d43;--paper:#f7f5ed;--muted:#747c71;--line:#dedfd3;--gold:#b48b48}*{box-sizing:border-box}html{scroll-behavior:smooth;scroll-padding-top:30px}body{margin:0;background:var(--paper);color:var(--ink);font-family:'Zen Maru Gothic','Noto Sans TC',sans-serif;font-weight:700}a{color:inherit;text-decoration:none}button,input{font:inherit}button,a,input{ -webkit-tap-highlight-color:transparent}button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid #bd7e30;outline-offset:5px}header{max-width:1240px;margin:auto;padding:26px 40px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}.brand{display:flex;gap:12px;align-items:center;font-size:23px;font-weight:900}.logo{width:43px;height:43px;display:grid;place-items:center;background:var(--ink);color:#f2e8c9;border-radius:12px;font-size:27px}.brand small{display:block;font:9px sans-serif;letter-spacing:2px;margin-top:4px}header nav{display:flex;gap:34px;font-size:14px}header nav a:first-child{border-bottom:2px solid var(--ink);padding-bottom:8px}header nav span{color:var(--gold)}main{max-width:1160px;margin:auto}.hero{padding:64px 0 58px;display:grid;grid-template-columns:1.2fr 1fr;gap:40px;align-items:center}.eyebrow{font:bold 11px sans-serif;letter-spacing:2.5px;color:var(--muted)}.eyebrow i{display:inline-block;width:7px;height:7px;background:#b38d4b;border-radius:50%;margin-right:8px}h1{font-size:clamp(32px,3.5vw,48px);line-height:1.55;letter-spacing:2px;margin:22px 0 18px;font-weight:900}h1 span{color:#a67a3d}.hero p{color:var(--muted);font-size:15px;line-height:1.9}.primary{display:inline-flex;gap:38px;background:var(--ink);color:var(--paper);border-radius:8px;padding:15px 22px;margin-top:19px;font-size:14px;box-shadow:0 4px 0 #173a31}.primary:hover{background:#376454}.hero-note{font-size:11px;letter-spacing:1.5px;color:#969b8e;margin-top:22px}.vignette{height:330px;position:relative;max-width:410px;width:100%;justify-self:center}.arch{position:absolute;inset:0 24px 28px;background:#e7e8db;border-radius:180px 180px 5px 5px;overflow:hidden}.sun{position:absolute;background:#f4f1df;width:130px;height:130px;border-radius:50%;top:34px;left:68px}.draw-book{position:absolute;bottom:37px;border-radius:6px 4px 2px 2px;box-shadow:inset 6px 0 #ffffff18,inset -5px 0 #00000012,5px 3px 7px #26362a22;writing-mode:vertical-rl;display:flex;align-items:center;justify-content:center;color:#eae4c9;letter-spacing:4px;font:700 12px Georgia;}.b1{height:154px;width:55px;left:67px;background:#385b4d;transform:rotate(-9deg)}.b2{height:180px;width:66px;left:127px;background:#b78a54;font:900 17px 'Zen Maru Gothic';letter-spacing:4px}.b3{height:146px;width:45px;left:197px;background:#7c8870}.mini-shelf{position:absolute;bottom:23px;left:20px;right:20px;height:16px;background:#b78e63;border-bottom:5px solid #96704b;box-shadow:0 9px 12px #51503b22}.plant{position:absolute;right:28px;bottom:38px;width:64px;text-align:center}.plant span{display:block;font-size:90px;color:#596e48;line-height:.8;transform:rotate(-20deg)}.plant div{height:46px;background:#cfb590;clip-path:polygon(5% 0,95% 0,80% 100%,20% 100%)}.stamp{position:absolute;right:0;top:10px;width:82px;height:82px;border:1px solid #a9ac8c;border-radius:50%;display:grid;place-content:center;text-align:center;font:10px/1.7 Georgia;letter-spacing:2px;transform:rotate(14deg);color:#677955;background:#f7f5ed99}.art-caption{position:absolute;bottom:0;left:0;right:0;text-align:center;font:9px sans-serif;letter-spacing:3px;color:#909783}.collection{border-top:1px solid var(--line);padding:35px 0 50px}.section-top{display:flex;align-items:center;justify-content:space-between;gap:20px}h2{font-size:26px;letter-spacing:1px;margin:10px 0}#count{font-size:11px;letter-spacing:0;margin-left:15px;color:var(--muted);vertical-align:middle}.search{display:flex;align-items:center;border:1px solid #d9ddd1;background:#fffdf7;border-radius:9px;padding:10px 13px;gap:9px}.search>span{font:27px Georgia}.search input{border:0;background:none;min-width:0;width:225px;outline:none;color:var(--ink);font-size:12px}.search kbd{font-size:11px;border:1px solid var(--line);padding:1px 5px;color:#9b9e92}.filters{display:flex;gap:8px;margin:25px 0;flex-wrap:wrap}.filters button{border:1px solid var(--line);padding:8px 17px;color:#778071;background:transparent;border-radius:30px;cursor:pointer;font-size:12px}.filters button[aria-pressed=true]{color:var(--paper);background:var(--ink);border-color:var(--ink)}.shelf-heading{display:flex;justify-content:space-between;font-size:11px;color:#7e8677;margin:0 4px 17px}.shelf-heading span:first-child{color:var(--ink)}.bookcase{background:linear-gradient(180deg,#eeeee3,#e8e6d7);border:1px solid #e0dfcf;border-radius:10px 10px 3px 3px;box-shadow:inset 0 7px 16px #666c4610}.books{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:36px;padding:27px 40px 0;min-height:251px;align-items:end}.book{display:flex;position:relative;flex-direction:column;justify-content:space-between;min-height:229px;padding:23px 20px 18px 25px;color:#f6f0db;background:var(--book);border-radius:4px 10px 5px 3px;border-right:6px solid #e7e2d0;box-shadow:inset 6px 0 #ffffff0b,inset 9px 0 #00000015,7px 0 0 -3px #b8b59d,9px 5px 13px #40452e26;transform-origin:bottom;transition:transform .2s,box-shadow .2s}.book:hover{transform:translateY(-9px) rotate(-2deg);box-shadow:inset 6px 0 #ffffff0b,10px 12px 14px #40452e30}.book:before{content:'';position:absolute;inset:11px 10px 11px 16px;border:1px solid #ffffff29;pointer-events:none}.book .number{font:10px Georgia;letter-spacing:2px;opacity:.65}.book h3{font-size:23px;line-height:1.5;max-width:150px;letter-spacing:2px;margin:18px 0 8px}.book small{font-size:10px;opacity:.7;letter-spacing:1px}.book-bottom{font-size:10px;display:flex;justify-content:space-between;align-items:center;margin-top:28px}.book-bottom b{font-size:22px;font-weight:400}.book-space{min-height:205px;align-self:center;display:grid;place-content:center;text-align:center;color:#9d9f89;font-size:11px;line-height:2}.book-space span{font:36px Georgia;color:#b6b8a1;margin-bottom:12px}.shelf-edge{height:21px;background:linear-gradient(#c6a47b 0 5px,#b18a60 5px 17px,#a17d56 17px);box-shadow:0 10px 13px -6px #594c3b66;border-radius:0 0 3px 3px}.library-note{display:flex;align-items:center;gap:17px;border:1px dashed #cbd0be;padding:20px 23px;margin-top:36px;border-radius:9px}.note-icon{font:25px Georgia;display:grid;place-items:center;width:40px;height:40px;border-radius:50%;background:#e8ebdf;flex-shrink:0}.library-note strong{font-size:13px}.library-note p{font-size:11px;color:var(--muted);margin:7px 0 0;line-height:1.8}.note-end{margin-left:auto;white-space:nowrap;font-size:10px;color:#929981}footer{max-width:1240px;margin:auto;border-top:1px solid var(--line);padding:28px 40px 35px;display:flex;align-items:center;justify-content:space-between;gap:20px;font-size:11px;color:var(--muted)}.footer-brand{font-size:15px;color:var(--ink)}footer div span{margin-left:24px}footer p{font-size:10px}#reader{padding:40px 0 75px;min-height:70vh}.back{font-size:13px}.reader-layout{display:grid;grid-template-columns:240px 1fr;gap:48px;margin-top:40px}.reader-layout aside{align-self:start;position:sticky;top:24px}.reader-layout aside p{color:var(--muted);font-size:12px}#toc{display:grid;gap:13px;font-size:13px;margin-top:30px}article{background:#fffdf7;border:1px solid var(--line);border-radius:12px;padding:42px;box-shadow:0 7px 20px #28473805;line-height:2;font-size:15px}article h1{font-size:32px;line-height:1.4;margin-top:0}article h2{font-size:22px;margin-top:34px}article p,article li{color:#617060}article ul,article ol{padding-left:23px}article .label{font-size:10px;color:#a07b45;letter-spacing:2px}article section{scroll-margin-top:30px}#empty{text-align:center;font-size:14px;padding:20px;color:var(--muted)}.skip{position:absolute;top:-100px;padding:10px;background:white;z-index:10}.skip:focus{top:5px}[hidden]{display:none!important}@media(min-width:1400px){.hero{padding-top:70px;padding-bottom:65px}}@media(max-width:1240px){main{margin:0 40px}}@media(max-width:850px){.books{gap:23px;padding-left:25px;padding-right:25px;grid-template-columns:repeat(3,minmax(0,1fr))}.book-space{display:none}.hero{gap:0}.vignette{transform:scale(.85)}h1{font-size:36px}.note-end{display:none}footer{flex-wrap:wrap}.reader-layout{grid-template-columns:180px 1fr;gap:20px}article{padding:25px}}@media(max-width:600px){header{padding:20px}.brand{font-size:18px}.brand small{font-size:7px}.logo{width:35px;height:35px}header nav{gap:15px;font-size:11px}header nav a:first-child{display:none}main{margin:0 22px}.hero{grid-template-columns:1fr;padding:35px 0 30px;gap:20px}h1{font-size:34px;margin-top:16px}.hero p{font-size:13px}.hero-note{display:none}.vignette{height:255px;max-width:330px;transform:none}.arch{inset:0 0 25px}.stamp{right:-7px;width:65px;height:65px}.section-top{display:block}.search{margin-top:18px}.search input{width:100%}.filters{gap:6px}.filters button{padding:7px 12px}.books{grid-template-columns:repeat(2,minmax(0,1fr));gap:27px 20px;padding:22px 20px 0}.book{min-height:210px;padding:19px 13px 16px 23px}.book h3{font-size:20px}.book:last-of-type{margin-bottom:0}.shelf-heading{font-size:10px}.library-note{padding:16px 14px;align-items:start}.library-note p{font-size:11px}footer{padding:24px 22px;gap:12px}footer div{width:100%;line-height:2}footer div span{display:block;margin-left:0}footer p{margin:0}.reader-layout{display:block;margin-top:25px}.reader-layout aside{position:static;margin-bottom:25px}#toc{display:flex;flex-wrap:wrap;font-size:11px;gap:12px}article{padding:23px;font-size:14px}article h1{font-size:28px}}@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*{transition:none!important}}

/* Bookshelf-first homepage and separate guide navigation. */
.collection{border-top:0;padding-top:38px}.empty-shelf{grid-column:1/-1;display:grid!important;min-height:224px}.guide-links{display:flex;flex-wrap:wrap;gap:20px;border-top:1px solid var(--line);margin-top:35px;padding-top:22px;font-size:13px}

.section-top{margin-bottom:25px}
/* Learning chapters and source references. */
.reader-layout{grid-template-columns:220px minmax(0,1fr);gap:30px}.reader-layout aside{max-height:calc(100vh - 50px);overflow:auto;padding-right:8px}article{min-width:0}#toc{gap:10px;font-size:12px}article h3{font-size:17px;margin:25px 0 12px}.source-note{font-size:11px;color:#8c957f;letter-spacing:.5px}.table-wrap{width:100%;overflow-x:auto;margin:18px 0;border:1px solid var(--line);border-radius:8px}article table{width:100%;border-collapse:collapse;font-size:13px;line-height:1.85;min-width:480px}article th{text-align:left;background:#e8ecdf;color:var(--ink);padding:12px;vertical-align:top}article td{padding:12px;vertical-align:top;border-top:1px solid var(--line);color:#52634f}article td:first-child{font-weight:900;min-width:125px}article tr:nth-child(even){background:#f7f7f0}.clinical-note{background:#f2eddd;border-left:3px solid #b48b48;border-radius:0 8px 8px 0;padding:16px 19px;font-size:13px;margin:20px 0;line-height:1.95}article a{text-decoration:underline;text-underline-offset:3px;overflow-wrap:anywhere}.references{font-size:12px;line-height:1.8}.references li{padding:7px 0;overflow-wrap:anywhere}article section+section{border-top:1px solid var(--line);margin-top:40px;padding-top:10px}@media(max-width:600px){.reader-layout{display:block}.reader-layout aside{max-height:none;overflow:visible}#toc{display:grid;grid-template-columns:1fr 1fr;gap:12px}.table-wrap{margin:15px 0}article{padding:20px}article table{font-size:12px}}
.lab-calculator{background:#eef1e6;border:1px solid #cdd6c1;border-radius:12px;padding:22px;margin:22px 0 30px}.calculator-heading h3{margin:0 0 7px}.calculator-heading p,.calc-note{font-size:12px;line-height:1.8}.calc-select-label{display:block;font-size:13px;margin:18px 0 5px}.lab-calculator select{width:100%;padding:12px;border:1px solid #b8c5af;background:#fffdf7;border-radius:7px;color:var(--ink);font:inherit;font-size:14px}.calc-formula{font-size:13px;overflow-wrap:anywhere}.calc-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}.calc-fields label{font-size:13px}.calc-fields label span{display:block;font-size:11px;color:#68765d}.calc-fields input{display:block;width:100%;min-width:0;padding:11px;background:#fffdf7;border:1px solid #b8c5af;border-radius:6px;color:var(--ink);font-size:16px}.calc-actions{display:flex;gap:10px;margin:18px 0}.calc-actions button{border:1px solid var(--ink);background:var(--ink);color:#fffdf7;border-radius:6px;padding:9px 15px;cursor:pointer;font-size:13px}.calc-actions button[type=reset]{background:transparent;color:var(--ink)}#calc-result{background:#fffdf7;border-radius:7px;padding:16px;font-size:17px;line-height:1.8;overflow-wrap:anywhere}.calc-note{margin-bottom:0}@media(max-width:600px){.lab-calculator{padding:15px}.calc-fields{grid-template-columns:1fr}#calc-result{font-size:15px}}

article .cbc-table{min-width:720px}article .cbc-table th:nth-child(1){width:12%}article .cbc-table th:nth-child(2){width:24%}article .cbc-table td:nth-child(2){color:var(--ink)}
/* Larger reading type and unified electrolyte chapter. */
article{font-size:17px}article table{font-size:15px}article h2{font-size:24px}article h3{font-size:20px}.clinical-note{font-size:15px}.source-note{font-size:12px}.references{font-size:14px}#toc{font-size:14px}.electro-subsection{margin-top:32px}.electro-subsection>h3{padding:12px 15px;background:#e8ecdf;border-left:4px solid #77816a;border-radius:0 7px 7px 0}.electro-table{min-width:680px}.electro-table td:nth-child(2){min-width:150px;color:var(--ink)}.electro-table td ul{margin:0;padding-left:18px}.calculator-heading p,.calc-note{font-size:14px}.calc-fields label,.calc-select-label,.calc-formula{font-size:15px}.calc-fields label span{font-size:13px}@media(max-width:600px){article{font-size:16px}article table{font-size:14px}article h2{font-size:23px}article h3{font-size:19px}.clinical-note{font-size:14px}#toc{font-size:13px}.references{font-size:13px}}

.reference-disclosure{border:1px solid var(--line);border-radius:9px;background:#f7f7ef;margin:18px 0}.reference-disclosure>summary{cursor:pointer;padding:16px 18px;font-size:16px;color:var(--ink)}.reference-disclosure>summary:focus-visible{outline:3px solid #b48b48;outline-offset:3px}.reference-disclosure[open]>summary{border-bottom:1px solid var(--line)}.reference-content{padding:6px 20px 20px}.reference-content h3{margin-top:22px}

.other-sites{border-top:1px solid var(--line);padding:30px 0 45px}.resource-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin-top:22px}.resource-link{display:flex;align-items:center;gap:16px;border:1px solid #d5dacb;background:#fffdf7;border-radius:10px;padding:24px;transition:background .2s}.resource-link:hover{background:#edf0e3}.resource-number{font:16px Georgia;color:var(--gold)}.resource-link strong{display:block;font-size:17px}.resource-link small{display:block;font:12px sans-serif;color:var(--muted);margin-top:8px;overflow-wrap:anywhere}.resource-link>span:nth-child(2){min-width:0}.external-mark{margin-left:auto;font-size:23px;color:var(--gold)}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media(max-width:600px){.resource-links{grid-template-columns:1fr}.resource-link{padding:20px}.other-sites{padding-top:25px}}

/* Library borrowing cards for external medical resources. */
.resource-link.library-card{display:flex;flex-direction:column;align-items:stretch;gap:0;padding:0;position:relative;overflow:hidden;border:1px solid #c9b994;border-radius:12px;background:#f5eedb;box-shadow:0 4px 0 #ded3b9,0 8px 18px #3e492a0b;transition:transform .2s,box-shadow .2s}
.resource-link.library-card:nth-child(2){background:#edf0e3;border-color:#b7c3ac}
.library-card:hover{transform:translateY(-4px);box-shadow:0 4px 0 #ded3b9,0 12px 22px #3e492a18}
.card-top{display:flex;justify-content:space-between;gap:15px;background:#254d43;color:#f5eedb;padding:13px 21px;font-size:12px;letter-spacing:1px}
.library-card:nth-child(2) .card-top{background:#64745b}
.card-id{font:11px/1.8 monospace;white-space:nowrap}
.resource-link.library-card>.card-body{min-width:0;display:block;padding:23px 23px 16px}
.card-kicker{display:block;font:10px sans-serif;letter-spacing:2px;color:#8a7e61;margin-bottom:13px}
.resource-link.library-card strong{font-size:24px;line-height:1.5;letter-spacing:1px;margin:0 0 20px;font-weight:900}
.card-rule{display:flex;gap:22px;border-top:1px solid #c8bfa666;padding:10px 0;font-size:13px}
.card-rule>span{color:#8b826d;flex-shrink:0}
.card-rule b{font-weight:700}
.card-bottom{display:flex;align-items:center;justify-content:space-between;gap:20px;border-top:1px dashed #b7ac92;margin:0 23px;padding:17px 0 20px}
.card-barcode{width:95px;height:26px;opacity:.55;background:repeating-linear-gradient(90deg,#254d43 0 2px,transparent 2px 4px,#254d43 4px 5px,transparent 5px 8px,#254d43 8px 12px,transparent 12px 14px,#254d43 14px 15px,transparent 15px 18px);flex-shrink:0}
.card-enter{font-size:12px;white-space:nowrap}
.card-enter>span{margin-left:8px;font-size:18px}
@media(max-width:600px){.resource-link.library-card strong{font-size:22px}.card-top{padding:12px 18px;font-size:11px}.resource-link.library-card>.card-body{padding:20px 18px 12px}.card-bottom{margin:0 18px}.card-rule{font-size:13px}}
@media(prefers-reduced-motion:reduce){.library-card:hover{transform:none}}

/* Native mobile chapter picker; retain desktop chapter links. */
.mobile-toc{display:none}
@media(max-width:600px){#toc{display:none}.mobile-toc{display:block;margin-top:20px}.mobile-toc label{display:block;font-size:14px;margin-bottom:8px;color:var(--ink)}.mobile-toc select{display:block;width:100%;max-width:100%;padding:12px;border:1px solid #b8c5af;border-radius:8px;background:#fffdf7;color:var(--ink);font:inherit;font-size:16px;min-height:48px}.mobile-toc select:focus-visible{outline:3px solid #b48b48;outline-offset:3px}}

/* PDF-style grouped pathogen map. */
article .pathogen-table{table-layout:fixed;min-width:720px}
.pathogen-table .kind-col{width:13%}.pathogen-table .genus-col{width:24%}
article .pathogen-table thead th{background:#254d43;color:#fffdf7;border-color:#254d43}
article .pathogen-table .pathogen-group th{background:#dfe8dc;color:#254d43;padding:10px 12px;border-top:1px solid #bdccba;letter-spacing:.4px}
article .pathogen-table td,article .pathogen-table .pathogen-kind{border:1px solid #d0dacb;padding:12px;vertical-align:top}
article .pathogen-table .pathogen-kind{background:#edf1e8;font-size:14px;overflow-wrap:anywhere}
.pathogen-kind span{font-size:13px;font-weight:700}
article .pathogen-table td:first-of-type{font-weight:700}
article .pathogen-table strong{color:#254d43}
article .pathogen-table tr:nth-child(even){background:#f6f8f1}
article .pathogen-table tr:nth-child(odd){background:#fffdf7}
@media(max-width:600px){article .pathogen-table{min-width:680px}.pathogen-wrap{border-radius:7px}}

/* Source-PDF tables: readable type, original column proportions and group rows. */
.pdf-table-block{margin:30px 0 38px;min-width:0}
.pdf-table-block>h3{border-left:5px solid #bea13b;padding:4px 0 4px 13px;color:#18324f;line-height:1.6}
.pdf-table-block .source-note{margin:6px 0;color:#697581}
.table-scroll-hint{font-size:12px;color:#74816f;margin:5px 0}
.pdf-table-wrap{border-color:#d7dfe6;background:#fff;border-radius:7px;overscroll-behavior-x:contain}
.pdf-table-wrap:focus-visible{outline:3px solid #b48b48;outline-offset:3px}
article .pdf-table{table-layout:fixed;min-width:840px;font-size:15px;line-height:1.85;color:#263d52}
article .pdf-table.wide-pdf-table{min-width:1100px}
article .pdf-table.spectrum-table{min-width:1500px;font-size:15px;line-height:1.7}
article .pdf-table th,article .pdf-table td{padding:12px 10px;border:1px solid #dce3e9;vertical-align:top;overflow-wrap:anywhere;min-width:0;color:#34495e;font-weight:700}
article .pdf-table thead th{background:#162e4c;color:#fff;vertical-align:middle;font-weight:900}
article .pdf-table tbody th{background:#f0f4f8;color:#18324f;font-weight:900;text-align:left}
article .pdf-table tbody tr{background:#fff}
article .pdf-table tbody tr:nth-child(even){background:#f4f6f9}
article .pdf-table .pdf-group th{background:#e4eaf3;color:#152f4d;letter-spacing:.5px;padding:9px 12px}
article .pdf-table td:first-child{font-weight:700;min-width:0}
article .spectrum-table .spectrum-cell{text-align:center;vertical-align:middle;font-weight:900}
article .pdf-table .spectrum-positive{color:#20734b}
article .pdf-table .spectrum-negative{color:#8c5e58}
article .pdf-table .spectrum-variable{color:#927018}
.pdf-table-wrap:has(.spectrum-table){max-height:75vh;overflow:auto}
article .spectrum-table thead th{position:sticky;top:0;z-index:2}
article .spectrum-table tbody th:first-child{position:sticky;left:0;z-index:1;background:#edf2f7;box-shadow:2px 0 0 #ced8e2}
article .spectrum-table thead th:first-child{left:0;z-index:3}
.correction-mark{color:#a05b2d;font-size:.8em;margin-left:3px}
.table-footnote{font-size:13px;line-height:1.8;color:#776a50}
.study-summary{border:1px solid #d8dfd0;border-radius:8px;margin:24px 0;background:#f4f5eb}
.study-summary>summary{padding:14px 17px;cursor:pointer;font-size:16px;list-style:none}
.study-summary>summary::-webkit-details-marker{display:none}
.study-summary>summary::after{content:'＋';float:right}
.study-summary[open]>summary::after{content:'－'}
.study-summary>summary:focus-visible{outline:3px solid #b48b48;outline-offset:2px}
.study-summary-content{padding:5px 18px 20px;border-top:1px solid #d8dfd0;min-width:0}
@media(max-width:600px){.pdf-table-block{margin:24px 0 30px}article .pdf-table{font-size:15px;min-width:780px}.pdf-table-block>h3{font-size:19px}.study-summary-content{padding:4px 12px 16px}.table-scroll-hint{font-size:12px}.pdf-table-wrap:has(.spectrum-table){max-height:70vh}}

/* Unified palette for every antibiotics table, including study summaries. */
article table.abx-table{color:#263d52}
article table.abx-table th,article table.abx-table td{border-color:#dce3e9;color:#34495e}
article table.abx-table thead th{background:#162e4c;color:#fff;border-color:#dce3e9}
article table.abx-table tbody tr:nth-child(odd){background:#fff}
article table.abx-table tbody tr:nth-child(even){background:#f4f6f9}
article table.abx-table tbody th,article table.abx-table tbody td:first-child{background:#f0f4f8;color:#18324f}
article table.abx-table .pdf-group th,article table.abx-table .pathogen-group th{background:#e4eaf3;color:#152f4d;border-color:#dce3e9}
article table.abx-table .pathogen-kind{background:#f0f4f8;color:#18324f}
article table.abx-table strong{color:#18324f}
article table.abx-table .spectrum-positive{color:#20734b}
article table.abx-table .spectrum-negative{color:#8c5e58}
article table.abx-table .spectrum-variable{color:#927018}

/* Compact borrowing cards: four slots on tablet/desktop, two on phones. */
.resource-links{grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;align-items:stretch}
.resource-link.library-card{min-width:0;border-radius:9px}
.library-card .card-top{padding:9px 12px;gap:4px 8px;flex-wrap:wrap;font-size:10px;letter-spacing:0;line-height:1.6}
.library-card .card-id{font-size:9px}
.resource-link.library-card>.card-body{padding:14px 12px 10px;flex:1}
.library-card .card-kicker{font-size:8px;letter-spacing:1px;margin-bottom:9px}
.resource-link.library-card strong{font-size:18px;line-height:1.5;letter-spacing:0;margin:0 0 12px;min-height:3em;overflow-wrap:anywhere}
.library-card .card-rule{display:block;padding:7px 0;font-size:13px;line-height:1.65}
.library-card .card-rule>span{display:block;font-size:10px;margin-bottom:2px}
.library-card .card-rule b{display:block;overflow-wrap:anywhere}
.library-card .card-bottom{margin:0 12px;padding:10px 0 12px;gap:7px;flex-wrap:wrap}
.library-card .card-barcode{width:46px;height:18px}
.library-card .card-enter{font-size:10px;white-space:normal}
.library-card .card-enter>span{font-size:13px;margin-left:3px}
@media(max-width:767px){
 .resource-links{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
 .resource-link.library-card strong{font-size:16px}
 .library-card .card-top{padding:8px 10px}
 .resource-link.library-card>.card-body{padding:12px 10px 8px}
 .library-card .card-bottom{margin:0 10px}
}

/* Frosted iOS-style website entry buttons within the card links. */
.library-card .card-bottom{display:grid;grid-template-columns:1fr;gap:10px}
.library-card .card-barcode{width:58px;height:14px;opacity:.4}
.library-card .card-enter{
 display:flex;align-items:center;justify-content:center;min-height:44px;width:100%;
 padding:9px 10px;border:1px solid rgba(255,255,255,.8);border-radius:14px;
 background:linear-gradient(145deg,rgba(255,255,255,.68),rgba(255,255,255,.28));
 color:#254d43;font-size:13px;font-weight:900;line-height:1.4;white-space:nowrap;
 -webkit-backdrop-filter:blur(14px) saturate(160%);backdrop-filter:blur(14px) saturate(160%);
 box-shadow:inset 0 1px 0 rgba(255,255,255,.85),0 3px 10px rgba(37,77,67,.1);
 transition:background .18s,box-shadow .18s,transform .18s;
}
.library-card:hover .card-enter,.library-card:focus-visible .card-enter{
 background:linear-gradient(145deg,rgba(255,255,255,.88),rgba(255,255,255,.5));
 box-shadow:inset 0 1px 0 rgba(255,255,255,.95),0 4px 12px rgba(37,77,67,.16);
}
.library-card:active .card-enter{transform:scale(.97)}
@media(prefers-reduced-transparency:reduce){.library-card .card-enter{background:#f5f7f2;backdrop-filter:none;-webkit-backdrop-filter:none}}
@media(prefers-reduced-motion:reduce){.library-card .card-enter{transition:none}.library-card:active .card-enter{transform:none}}

/* Muted slate-blue palette for the ACLS borrowing card. */
.resource-link.library-card:nth-child(3){background:#e9eef0;border-color:#b6c5c9;color:#36535b;box-shadow:0 4px 0 #cdd9dc,0 8px 18px #354c550b}
.library-card:nth-child(3) .card-top{background:#526f79;color:#f7f5ed}
.library-card:nth-child(3) .card-kicker,.library-card:nth-child(3) .card-rule>span{color:#65777b}
.library-card:nth-child(3) .card-rule{border-color:#bccbd166}
.library-card:nth-child(3) .card-bottom{border-color:#a9bbc2}
.library-card:nth-child(3) .card-enter{color:#36535b}
.library-card:nth-child(3):hover{box-shadow:0 4px 0 #cdd9dc,0 12px 22px #354c5518}

/* Translucent refresh control beside the guide. */
header nav{align-items:center}
.refresh-page{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:44px;height:44px;padding:0;border:1px solid rgba(255,255,255,.82);border-radius:14px;background:linear-gradient(145deg,rgba(255,255,255,.65),rgba(255,255,255,.2));color:var(--ink);cursor:pointer;-webkit-backdrop-filter:blur(12px) saturate(160%);backdrop-filter:blur(12px) saturate(160%);box-shadow:inset 0 1px 0 #ffffffbf,0 3px 12px #254d4310;transition:background .18s,transform .18s}
.refresh-page:hover{background:rgba(255,255,255,.75)}
.refresh-page:active{transform:scale(.94)}
.refresh-page:focus-visible{outline:3px solid #b48b48;outline-offset:3px}
@media(max-width:600px){header nav{gap:10px}.refresh-page{border-radius:13px}}
@media(prefers-reduced-transparency:reduce){.refresh-page{background:#f5f7f2;backdrop-filter:none;-webkit-backdrop-filter:none}}
@media(prefers-reduced-motion:reduce){.refresh-page{transition:none}.refresh-page:active{transform:none}}

/* Circular refresh control on all screen sizes. */
header nav .refresh-page{border-radius:50%}

/* Laboratory handbook tables, retaining the source content and grouping. */
article .lab-source-table{table-layout:fixed;min-width:820px;font-size:15px;line-height:1.9}
article .lab-source-table th,article .lab-source-table td{padding:13px 12px;vertical-align:top;border:1px solid #d0dacb;overflow-wrap:anywhere;min-width:0}
article .lab-source-table thead th{background:#254d43;color:#fffdf7;font-weight:900}
article .lab-source-table tbody th{background:#edf1e8;color:#254d43;text-align:left;font-weight:900}
article .lab-source-table tbody td{color:#52634f;font-weight:700}
article .lab-source-table .reference-range{background:#f4f6ed;color:#254d43}
article .lab-source-table tbody tr:nth-child(odd){background:#fffdf7}
article .lab-source-table tbody tr:nth-child(even){background:#f7f8f1}
article .source-bullets{padding-left:20px;margin:0}
article .source-bullets li{margin:0 0 7px;color:inherit}
article .source-bullets li:last-child{margin-bottom:0}
.source-new{display:inline-block;background:#ead58c;color:#57461b;padding:0 4px;margin-left:4px;border-radius:3px;font:bold 10px/1.7 sans-serif;vertical-align:middle}
.lab-source-wrap:focus-visible{outline:3px solid #b48b48;outline-offset:3px}
@media(max-width:600px){article .lab-source-table{font-size:15px;min-width:780px}}

/* Original PDF emphasis, limited to lab interpretation cells. */
article .lab-source-table td .pdf-bold-highlight {
  color: inherit;
  font-weight: 800;
  background: linear-gradient(transparent 18%, rgba(250, 220, 90, .48) 18%, rgba(250, 220, 90, .48) 94%, transparent 94%);
  padding: 0 .04em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* Full-text search results and in-reader matches. */
.search-results{margin:20px 0 28px}
#search-status{color:#52634f;font-weight:800}
#search-result-list{list-style:none;margin:0;padding:0;display:grid;gap:12px}
.search-result{display:block;padding:18px 20px;background:#fffdf7;border:1px solid #d0dacb;border-radius:14px;color:#254d43;text-decoration:none;overflow-wrap:anywhere}
.search-result:hover{background:#f3f4e9;border-color:#70866b}
.search-result:focus-visible{outline:3px solid #b48b48;outline-offset:3px}
.search-result-book{display:block;font-size:13px;color:#66745c;margin-bottom:5px}
.search-result strong{font-size:18px}
.search-result p{font-size:15px;line-height:1.7;margin:8px 0;color:#495449}
.search-result-go{font-size:13px;font-weight:800}
.search-result mark,article .search-hit{background:#f8df88;color:inherit;border-radius:3px;box-decoration-break:clone;-webkit-box-decoration-break:clone}
article .search-hit:focus{outline:2px solid #b48b48;outline-offset:3px}
@media(max-width:600px){.search-result{padding:14px}.search-result strong{font-size:17px}}

/* Drug adverse-effects handbook: source tables, callouts and original bold text. */
.drug-source-wrap{width:100%;overflow-x:auto;margin:18px 0 26px;border:1px solid #d0dacb;border-radius:9px;-webkit-overflow-scrolling:touch}
article .drug-source-table{min-width:740px}
.drug-source-content h3.drug-question{margin:38px 0 20px;padding:12px 15px;background:#e8ecdf;border-left:4px solid #68758a;border-radius:0 7px 7px 0}
.drug-source-content h4{font-size:18px;line-height:1.7;margin:26px 0 12px}
.drug-source-content .drug-callout-label{color:#85682f;font-size:14px;font-weight:900;letter-spacing:1px;margin:18px 0 0;padding:12px 18px 0;background:#f4efdf;border-left:3px solid #b48b48}
.drug-source-content .drug-callout-label+p{margin:0 0 20px;padding:10px 18px 16px;background:#f4efdf;border-left:3px solid #b48b48;border-radius:0 0 8px 0}
article .drug-source-content mark.pdf-bold-highlight{color:inherit;font-weight:900;background:linear-gradient(transparent 18%,rgba(250,220,90,.48) 18%,rgba(250,220,90,.48) 94%,transparent 94%);padding:0 .04em;-webkit-box-decoration-break:clone;box-decoration-break:clone}
@media(max-width:600px){article .drug-source-table{min-width:720px;font-size:15px}.drug-source-content h4{font-size:17px}}

/* Blood sugar handbook: source flow diagrams in a responsive reading order. */
.sugar-flow{list-style:none;display:flex;flex-wrap:wrap;gap:22px;margin:22px 0 28px;padding:0;align-items:stretch}
.sugar-flow li{position:relative;flex:1 1 130px;padding:14px 16px;background:#edf1e8;border:1px solid #cbd6c4;border-radius:9px;font-size:15px;line-height:1.8;color:#254d43}
.sugar-flow li:not(:last-child)::after{content:'→';position:absolute;right:-19px;top:calc(50% - 14px);color:#66745c;font-size:18px}
.sugar-source-content h3{margin:28px 0 14px;padding-left:12px;border-left:3px solid #b48b48}
.sugar-source-content .source-note{margin-bottom:24px}
@media(max-width:600px){.sugar-flow{display:block}.sugar-flow li{margin-bottom:23px}.sugar-flow li:not(:last-child)::after{content:'↓';right:calc(50% - 7px);top:auto;bottom:-27px}}

/* Shared visitor count in the existing library footer. */
footer .visit-counter{margin:12px 0 0;font-size:13px;color:var(--ink);font-variant-numeric:tabular-nums}
footer .visit-counter span{display:inline;margin:0}
footer .visit-counter [hidden]{display:none}

footer .visit-counter-number{height:20px;width:auto;vertical-align:middle;border-radius:4px;display:inline-block}
footer .visit-counter-retry{border:0;border-bottom:1px solid currentColor;background:transparent;color:inherit;font:inherit;cursor:pointer;padding:0 2px}

/* Up to ten books per mobile shelf; two covers visible at a time. */
.shelf-row{display:contents}
.mobile-shelf-hint{display:none}
@media(max-width:600px){
 .books{display:block;padding:0;min-height:0}
 .shelf-row{display:grid;grid-auto-flow:column;grid-auto-columns:calc((100% - 16px)/2);grid-template-columns:none;gap:16px;padding:22px 16px 12px;overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x mandatory;scroll-padding-inline:16px;-webkit-overflow-scrolling:touch;align-items:stretch;scrollbar-width:thin;scrollbar-color:#b18a60 #e8e6d7}
 .shelf-row:not(:last-child){border-bottom:12px solid #b18a60}
 .shelf-row .book{min-width:0;min-height:230px;scroll-snap-align:start;scroll-snap-stop:normal;padding:19px 12px 16px 20px}
 .shelf-row .book h3{font-size:20px;letter-spacing:1px;overflow-wrap:anywhere}
 .shelf-row .book small{font-size:9px;letter-spacing:.5px;overflow-wrap:anywhere}
 .shelf-row .book:hover{transform:none}
 .desktop-shelf-hint{display:none}
 .mobile-shelf-hint{display:inline}
}

/* Touch devices retain the translucent controls without live backdrop filtering. */
@media(hover:none) and (pointer:coarse){
 .refresh-page,.library-card .card-enter{-webkit-backdrop-filter:none;backdrop-filter:none}
}

/* Source-faithful drug directory and its on-demand local search. */
.drug-name-finder{padding:22px;background:#edf1e8;border:1px solid #cbd6c4;border-radius:12px;margin:18px 0 26px}
.drug-name-finder>label{display:block;font-size:20px;font-weight:900;margin-bottom:12px}
.drug-name-search-controls{display:flex;gap:10px;align-items:stretch}
.drug-name-search-controls input{min-width:0;flex:1;background:#fffdf7;border:1px solid #b8c5af;border-radius:8px;padding:12px;color:var(--ink);font-size:16px}
.drug-name-finder button{border:1px solid #b8c5af;border-radius:8px;padding:9px 13px;background:#fffdf7;color:var(--ink);cursor:pointer;font:inherit;font-size:14px}
#drug-name-search-help,#drug-name-status{font-size:14px;line-height:1.8}
article .drug-name-result{border:1px solid #d0dacb;border-radius:10px;background:#fffdf7;padding:18px;margin:16px 0 0}
.drug-name-result-top{display:flex;justify-content:space-between;gap:12px;align-items:baseline}
article .drug-name-result h3{margin:0;font-size:19px;overflow-wrap:anywhere}
.drug-name-result-top>span{font-size:12px;white-space:nowrap;color:var(--muted)}
.drug-name-result dl{margin:14px 0}
.drug-name-result dl>div{display:grid;grid-template-columns:115px minmax(0,1fr);gap:12px;padding:9px 0;border-top:1px solid #e4e7dc;font-size:15px;line-height:1.8}
.drug-name-result dt{font-weight:900}.drug-name-result dd{margin:0;overflow-wrap:anywhere;color:#52634f}
.drug-name-more{display:block;width:100%;margin-top:15px}
article .drug-name-table{min-width:980px;line-height:1.8}
article .drug-name-table tbody th{min-width:0;word-break:normal}
article .drug-name-table td:first-child{min-width:0}
.drug-name-table tr:focus{outline:3px solid #b48b48;outline-offset:-3px;background:#f8efcf}
@media(max-width:600px){.drug-name-finder{padding:14px}.drug-name-result-top{display:block}.drug-name-result dl>div{grid-template-columns:82px minmax(0,1fr);gap:8px}.drug-name-search-controls{flex-wrap:wrap}.drug-name-search-controls input{flex-basis:100%}article .drug-name-result{padding:13px}article .drug-name-table{min-width:950px;font-size:14px}}

/* Keep source medication doses on a single line, with horizontal table scrolling. */
article .drug-name-table{table-layout:auto}
article .drug-name-table .drug-dose{white-space:nowrap;overflow-wrap:normal;word-break:normal}

/* Rounded, Google-inspired local medication search. */
.drug-name-finder{padding:8px 0 20px;background:transparent;border:0;border-radius:0}
.drug-name-finder>label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.drug-name-search-controls{display:flex;flex-wrap:nowrap;align-items:center;gap:12px;min-height:54px;padding:0 16px;background:#fff;border:1px solid #dadce0;border-radius:30px;box-shadow:0 1px 3px rgba(60,64,67,.08)}
.drug-name-search-controls:hover,.drug-name-search-controls:focus-within{box-shadow:0 1px 6px rgba(32,33,36,.22);border-color:transparent}
.drug-name-search-controls:focus-within{outline:2px solid #d7e5dc;outline-offset:2px}
.drug-search-icon{flex:0 0 20px;width:20px;height:20px;color:#80868b}
.drug-name-search-controls input{flex:1 1 0;min-width:0;width:0;border:0;border-radius:0;background:transparent;padding:14px 0;box-shadow:none;outline:none;font-size:16px;color:#202124}
.drug-name-search-controls input:focus{outline:none;box-shadow:none}
.drug-name-search-controls input::-webkit-search-cancel-button{-webkit-appearance:none}
.drug-name-search-controls #drug-name-clear{flex:0 0 32px;width:32px;height:32px;display:grid;place-items:center;padding:0;border:0;border-radius:50%;background:transparent;color:#70757a;font:26px/1 Arial,sans-serif}
.drug-name-search-controls #drug-name-clear:hover{background:#f1f3f4}
#drug-name-search-help,#drug-name-status{color:#70757a}
article .drug-name-table td,article .drug-name-table th,
article .drug-name-result h3,.drug-name-result dd{overflow-wrap:normal;word-break:normal;hyphens:none}
.drug-name-result dd{min-width:0;overflow-x:auto}
.drug-name-result-top{min-width:0}
article .drug-name-result h3{min-width:0;overflow-x:auto}
@media(max-width:600px){.drug-name-search-controls{gap:8px;padding:0 12px}.drug-name-search-controls input{font-size:16px;flex-basis:0}}

/* Hide idle search instructions; retain feedback after a query. */
#drug-name-status:empty,.drug-name-finder:has(#drug-name-search:placeholder-shown) #drug-name-status{display:none}
article .drug-name-table{font-size:17px}
.drug-name-result dl>div{font-size:17px}
@media(max-width:600px){article .drug-name-table{font-size:16px}.drug-name-result dl>div{font-size:16px}}

/* Give supplementary notes enough room without compressing drug names or doses. */
article .drug-name-detail-table{min-width:1250px}
article .drug-name-detail-table .drug-supplement{min-width:360px;width:33%}

/* Symptom handbook: original tables and source-bold highlights. */
article .symptom-source-table{table-layout:auto;min-width:760px;font-size:17px;line-height:1.85}
article .symptom-source-table td,article .symptom-source-table th{overflow-wrap:normal;word-break:normal;hyphens:none}
.symptom-source-content h3{margin:28px 0 14px;padding-left:12px;border-left:3px solid #b48b48}
.symptom-source-content p{line-height:1.95}
.symptom-search-result{display:block;margin-top:14px}
#symptom-status{font-size:14px;color:var(--muted);line-height:1.8}
#symptom-status:empty{display:none}
.drug-name-search-controls #symptom-clear{flex:0 0 32px;width:32px;height:32px;display:grid;place-items:center;padding:0;border:0;border-radius:50%;background:transparent;color:#70757a;font:26px/1 Arial,sans-serif}
.drug-name-search-controls #symptom-clear:hover{background:#f1f3f4}
@media(max-width:600px){article .symptom-source-table{font-size:16px;min-width:720px}}

/* Handbook part and topic hierarchy. */
article .symptom-part{margin-top:48px;padding-top:12px;border-top:2px solid #b48b48}
article .symptom-part>h2{font-size:29px;color:var(--ink);margin:12px 0}
article .symptom-subsection>h3{font-size:23px;margin:30px 0 18px;color:var(--ink)}
.symptom-source-content h4{font-size:19px;margin:26px 0 12px;padding-left:12px;border-left:3px solid #b48b48}
#toc .toc-part{font-weight:900;margin-top:16px;color:var(--ink)}
#toc .toc-subsection{padding-left:14px}
@media(max-width:600px){article .symptom-part>h2{font-size:26px}article .symptom-subsection>h3{font-size:22px}.symptom-source-content h4{font-size:18px}}

/* Keep the symptom handbook's first column and header rows free of highlights. */
article .symptom-source-table .symptom-first-column mark,
article .symptom-source-table thead mark{background:none;padding:0;color:inherit}

/* ABG: preserve source diagrams and natural prose wrapping. */
.abg-source-figure{margin:24px 0;max-width:100%;overflow-x:auto;background:#fff;border:1px solid #d0dacb;border-radius:10px;padding:12px}
.abg-source-figure a{display:block;min-width:540px}
.abg-source-figure img{display:block;width:100%;height:auto}
article .abg-source-table{font-size:17px;min-width:820px;table-layout:auto}
article .abg-source-table th,article .abg-source-table td{overflow-wrap:normal;word-break:normal;hyphens:none}
article .abg-source-content .pdf-bold-highlight{padding:0}
@media(max-width:600px){article .abg-source-table{font-size:16px}}

/* ABG written practice and source answer reveal. */
.abg-practice-card{margin:28px 0;padding:24px;border:1px solid #cdd7cc;border-radius:16px;background:#fffdf7}
.abg-practice-card h3{margin-top:0}
.abg-practice-data{padding:2px 16px;margin:16px 0;background:#eef2e9;border-radius:10px}
.abg-practice-form label{display:block;margin:18px 0 10px;font-weight:900}
.abg-practice-form textarea{display:block;box-sizing:border-box;width:100%;resize:vertical;min-height:150px;border:1px solid #b7c5b6;border-radius:12px;padding:14px;background:#fff;color:#254d43;font:inherit;font-size:16px;line-height:1.8}
.abg-practice-form textarea:focus-visible,.abg-practice-actions button:focus-visible{outline:3px solid #b48b48;outline-offset:3px}
.abg-practice-form textarea[readonly]{background:#f3f4ed}
.abg-practice-actions{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-top:16px}
.abg-practice-actions button{border:1px solid #254d43;border-radius:999px;padding:12px 20px;background:#254d43;color:#fffdf7;font:inherit;font-size:16px;cursor:pointer}
.abg-practice-actions .abg-practice-reset{color:#254d43;background:#edf1e8;border-color:#cdd7cc}
.abg-practice-status{font-size:14px;color:#52634f}
.abg-practice-solution{margin-top:24px;padding-top:8px;border-top:1px solid #cdd7cc}
.abg-practice-card [hidden]{display:none!important}
@media(max-width:600px){.abg-practice-card{padding:16px}.abg-practice-actions button{width:100%}}


.abg-practice-form fieldset{border:0;padding:0;margin:0;min-width:0}
.abg-practice-form legend{font-weight:800;font-size:1.1em;margin-bottom:12px}
.abg-quiz-progress{font-size:14px;color:#52634f}
.abg-quiz-options{display:grid;gap:10px}
.abg-quiz-options label{display:flex;align-items:baseline;gap:12px;margin:0;padding:14px;border:1px solid #cdd7cc;border-radius:12px;font-weight:400;cursor:pointer;line-height:1.6}
.abg-quiz-options label:has(input:checked){background:#edf3e6;border-color:#254d43}
.abg-quiz-options input{flex-shrink:0;accent-color:#254d43}
.abg-quiz-options label:focus-within{outline:2px solid #b48b48;outline-offset:2px}
.abg-quiz-review li{margin-bottom:18px}.abg-quiz-review p{margin:6px 0}

/* Floating iOS-inspired glass control, including iPhone safe-area spacing. */
.back-to-top{position:fixed;right:calc(22px + env(safe-area-inset-right,0px));bottom:calc(22px + env(safe-area-inset-bottom,0px));z-index:100;width:52px;height:52px;display:grid;place-items:center;padding:0;border:1px solid rgba(255,255,255,.72);border-radius:50%;color:#254d43;background:rgba(255,255,255,.46);-webkit-backdrop-filter:blur(18px) saturate(160%);backdrop-filter:blur(18px) saturate(160%);box-shadow:0 6px 22px rgba(37,77,67,.12),inset 0 1px 1px rgba(255,255,255,.8);cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:manipulation;transition:transform .18s ease,background .18s ease,box-shadow .18s ease}
.back-to-top:active{transform:scale(.92);background:rgba(255,255,255,.65)}
.back-to-top:focus-visible{outline:3px solid #b48b48;outline-offset:4px}
@media(hover:hover){.back-to-top:hover{background:rgba(255,255,255,.66);box-shadow:0 8px 26px rgba(37,77,67,.18),inset 0 1px 1px rgba(255,255,255,.85)}}
@media(max-width:600px){.back-to-top{width:48px;height:48px;right:calc(16px + env(safe-area-inset-right,0px));bottom:calc(16px + env(safe-area-inset-bottom,0px))}}
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){.back-to-top{background:rgba(250,249,243,.94)}}
@media(prefers-reduced-motion:reduce){.back-to-top{transition:none}}

/* Header navigation and server-backed version history. */
header .header-actions{display:flex;align-items:center;gap:10px;flex-wrap:nowrap}
header .header-actions>a{border-bottom:0;margin:0}
header .header-actions .version-link{display:block;font-size:14px;white-space:nowrap;color:var(--ink);padding:10px 6px}
header .header-actions .header-icon{display:grid;place-items:center;position:relative;flex:0 0 40px;width:40px;height:42px;background:none;border:0;padding:0;color:var(--ink);cursor:pointer;box-shadow:none}
.admin-indicator{position:absolute;right:3px;top:4px;width:7px;height:7px;background:#467d57;border:2px solid #f8f6ef;border-radius:50%}
.header-actions :focus-visible{outline:3px solid #b48b48;outline-offset:3px}
#version-page{max-width:900px;margin:30px auto 80px;padding:28px 32px;border:1px solid #d7dece;border-radius:18px;background:#fffdf7}
.version-heading{display:flex;align-items:center;justify-content:space-between;gap:16px}.version-heading h1{font-size:30px;margin:10px 0}.version-updated,.version-hint{color:var(--muted);font-size:14px}
.version-content{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.95;font-size:17px}
#version-page button,#admin-google-login,#admin-logout{font:inherit;color:#fffdf7;background:#254d43;border:1px solid #254d43;border-radius:999px;padding:10px 22px;cursor:pointer}
#version-page button:disabled,#admin-dialog button:disabled{opacity:.5;cursor:wait}
#version-form label,#admin-form label{display:block;font-weight:700;margin:16px 0 10px}
#version-draft{box-sizing:border-box;width:100%;resize:vertical;min-height:360px;font:inherit;font-size:16px;line-height:1.8;color:#254d43;padding:16px;border:1px solid #b7c5b6;border-radius:12px;background:white}
.version-editor-actions{display:flex;gap:12px;margin-top:18px}#version-page #version-cancel{color:#254d43;background:transparent}
#version-status:empty,#version-updated:empty,#admin-status:empty{display:none}
#admin-dialog{box-sizing:border-box;width:min(400px,calc(100% - 32px));border:1px solid rgba(255,255,255,.8);border-radius:24px;padding:28px;color:#254d43;background:rgba(250,249,243,.96);box-shadow:0 20px 70px rgba(37,77,67,.18)}
#admin-dialog::backdrop{background:rgba(28,45,37,.28);-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px)}
#admin-dialog h2{margin:8px 0 20px;font-size:24px}.admin-login-help{margin:0 0 16px;line-height:1.7;color:var(--muted);font-size:15px}#admin-google-login{width:100%;margin:4px 0 8px}
#admin-dialog .dialog-close{position:absolute;top:12px;right:12px;width:36px;height:36px;border:0;background:transparent;color:#52634f;font-size:26px;cursor:pointer}
#version-page [hidden],#admin-dialog [hidden],.admin-indicator[hidden]{display:none!important}
@media(max-width:600px){header{flex-wrap:wrap;gap:14px}header .header-actions{margin-left:auto;gap:7px}header .header-actions .version-link{display:block;font-size:13px}#version-page{padding:22px 18px;margin-top:20px}.version-content{font-size:16px}}

header .header-actions .header-icon svg{width:23px;height:23px}

/* Mobile-only two-row header; desktop navigation remains unchanged. */
@media(max-width:600px){
 header{position:relative}
 header>.brand{flex:0 0 calc(100% - 80px);justify-content:flex-start}
 header .header-actions{flex:0 0 100%;justify-content:flex-end;margin-left:0;gap:0}
 header .header-actions .version-link{position:absolute;right:20px;top:20px;min-height:35px;display:flex;align-items:center;font-size:12px;padding:8px 0}
 header .header-actions .header-icon svg{width:20px;height:20px}
}
