/* Shared small-screen reading and touch layout. */
html{-webkit-text-size-adjust:100%}
@media(max-width:720px){
 body{overflow-wrap:break-word}
 input,select,textarea{font-size:16px!important}
 button,summary{min-height:44px}
 .reader-top,.library-top{gap:10px;padding:10px 14px;min-height:64px;height:auto;flex-wrap:wrap}
 .reader-top a,.library-top a{display:flex;align-items:center;min-height:44px;line-height:1.4}
 .reader-top .brand{font-size:10px;letter-spacing:.3px;flex:1;min-width:0}
 .publication main{padding:22px 16px!important;max-width:100%;min-width:0}
 .publication .reader-title{font-size:clamp(26px,7vw,34px)!important;line-height:1.3;margin:14px 0 20px}
 .publication main>p{font-size:15px;line-height:1.8}
 .publication .citation{padding:16px;font-size:15px;line-height:1.8;margin:18px 0;border-radius:8px}
 .publication .citation h2{font-size:21px;line-height:1.4;margin:0 0 14px}
 .publication .citation p{margin:0 0 14px;text-align:justify}
 .publication .citation p:last-child{margin-bottom:0}
 .publication .source-status{background:transparent;border:1px solid #d7ddce;padding:12px 14px}
 .source-status summary{display:flex;align-items:center;gap:8px;font-size:14px;font-weight:600;cursor:pointer}
 .source-status summary::after{content:'＋';margin-left:auto;font-size:20px}
 .source-status[open] summary::after{content:'−'}
 .publication .jump-links{gap:8px;margin:20px 0;flex-wrap:wrap}
 .publication .jump-links a{display:flex;align-items:center;justify-content:center;min-height:44px;padding:10px 14px;font-size:14px;margin:0}
 .publication .article-body{max-width:100%;min-width:0;font-size:17px}
 .publication .article-body h2{font-size:21px;margin-top:28px;padding-top:20px}
 .publication .article-body details{font-size:15px}
 .publication .chapter-nav{gap:12px}
 .publication .chapter-nav a{font-size:14px;min-height:44px}
 .catalog{padding:22px 16px}.catalog h1{font-size:32px}.catalog .intro{font-size:16px;line-height:1.8}
 .shelf{grid-template-columns:64px minmax(0,1fr);gap:14px;padding:18px 14px;align-items:start}
 .shelf>div{min-width:0}.shelf h2{font-size:23px;line-height:1.35;margin:6px 0 12px}
 .shelf p{font-size:15px;line-height:1.8}.shelf b{font-size:14px;display:block;padding-top:8px}.shelf small{font-size:10px;letter-spacing:.5px}
 .shelf .collection-icon{align-self:start;margin-top:8px}.source-note{font-size:14px;padding:16px;line-height:1.8}
 .reader-grid{display:block}.reader-grid aside{display:none;position:fixed;top:64px;bottom:0;height:auto;width:min(350px,92vw);z-index:5;overscroll-behavior:contain}
 body.menu-open .reader-grid aside{display:block}.small-menu{display:inline-block;min-height:44px}
 .reader-grid .viewer{padding:12px 10px}.viewer-title{font-size:14px;line-height:1.7}
 .tools{position:static;display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:10px}
 .tools #previous{grid-column:1;grid-row:1}.tools #next{grid-column:2;grid-row:1}
 .tools #jump{grid-column:1/-1;justify-content:center;flex-wrap:wrap;font-size:14px}
 .tools #zoom{grid-column:1/-1}.tools button{min-height:44px;font-size:14px}.tools input{min-height:44px;width:64px}
 .page-area{padding:3px;min-height:160px}.page-area.zoomed .page-image{width:240%}.page-state{font-size:13px}
 .page-bottom a{font-size:14px;min-height:44px}.viewer details{font-size:15px}.viewer summary{padding:10px 0}
 .reader-layout main{padding:22px 16px}.reader-layout .chapter-tools{flex-wrap:wrap;font-size:13px}.chapter-tools button{min-width:44px}
 .reader-layout .article-body{font-size:var(--reading-size,18px)}
 .reader-layout .search-box input{font-size:16px}.reader-layout .toc-link,#toc a{font-size:14px;min-height:44px}
 body.mobile-flow,html:has(body.mobile-flow){height:auto;overflow:auto;overscroll-behavior:auto}
 body.mobile-flow .screen{height:auto;min-height:100svh;padding:8px;gap:10px}
 body.mobile-flow .bar.top{position:sticky;top:0;z-index:8;background:var(--bg);padding:6px}
 body.mobile-flow .pills{display:flex;overflow-x:auto;gap:6px;scrollbar-width:thin;justify-content:flex-start}
 body.mobile-flow .pill{flex:0 0 auto;min-height:44px;padding:10px 14px;font-size:13px;white-space:nowrap}
 body.mobile-flow .grid{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:160px auto;flex:none}
 body.mobile-flow .id,body.mobile-flow .core{height:auto;overflow:visible;min-height:0}
 body.mobile-flow .core{padding:22px 18px}body.mobile-flow .core h1{font-size:30px}
 body.mobile-flow .sub{font-size:13px;line-height:1.6}body.mobile-flow .figs{font-size:12px;flex-wrap:wrap}
 body.mobile-flow .lead{height:auto!important;max-height:none!important;overflow:visible!important;columns:1!important;font-size:16px;line-height:1.85}
 body.mobile-flow .entry-link span{font-size:14px}body.mobile-flow #pager{display:none}
 body.mobile-flow .bar.bot{padding:12px;min-height:44px}body.mobile-flow .wm{display:none}
 body.lab-reading .pills{display:flex;overflow-x:auto;justify-content:flex-start}.lab-reading .pill{flex:0 0 auto;min-height:44px;padding:8px 12px;font-size:12px}
 body.lab-reading .screen{height:100dvh;padding-bottom:max(8px,env(safe-area-inset-bottom))}
}
@media(max-width:720px){
 .shelf{row-gap:8px}.shelf>div:last-child{display:contents}
 .shelf>img,.shelf>.book-symbol,.shelf>.front-cover{grid-column:1;grid-row:1/3}
 .shelf small,.shelf h2{grid-column:2}.shelf h2{margin:0;align-self:start}
 .shelf p,.shelf b{grid-column:1/-1}.shelf p{margin:8px 0 0}
 .library-top{flex-wrap:nowrap}.library-top>strong{font-size:10px;letter-spacing:.4px}
 .library-top #expand{font-size:0;min-width:44px;justify-content:center}.library-top #expand::after{content:'↗';font-size:22px}
}
