/* v4 reading refinements. Reuse site tokens; the journal cover wall is excluded.
 * Let text determine height instead of shrinking or clipping English content. */
body:not([data-research-view=overview]){font-optical-sizing:auto;-webkit-text-size-adjust:100%;text-size-adjust:100%}
.about-identity .identity-name-zh{font:inherit;color:inherit}
html[lang=en] .identity-name-zh{display:none}
body:not([data-research-view=overview]) :is(.page-head h1,.journal-heading h1,.about-identity a,.contact-email){overflow-wrap:break-word}

@media(max-width:980px){
 body:not([data-research-view=overview]) .topbar #portal-nav a{white-space:normal;line-height:1.4;overflow-wrap:break-word}
}
@media(max-width:700px){
 /* Native text inputs stay at 16px to avoid Safari's focus zoom. */
 body:not([data-research-view=overview]) :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]),select,textarea){font-size:1rem;min-width:0;max-width:100%;scroll-margin-block:116px 24px}
 body:not([data-research-view=overview]) :is(input[type=search],input[type=email],input[type=text],input:not([type]),select){min-height:44px}
 body:not([data-research-view=overview]) :is(.button,.cat-reset,.dialog-close,.journal-admin-toolbar button){min-height:44px}
 body:not([data-research-view=overview]) :is(.actions,.journal-admin-toolbar,.journal-detail-actions){flex-wrap:wrap;gap:10px}
 body:not([data-research-view=overview]) .footer{padding-bottom:max(20px,env(safe-area-inset-bottom));row-gap:12px}
 body:not([data-research-view=overview]) .footer nav{flex-wrap:wrap;gap:6px 18px}
 body:not([data-research-view=overview]) .footer nav a{min-height:44px;display:inline-flex;align-items:center;font-size:.75rem}
 body:not([data-research-view=overview]) .footer-thanks{font-size:.6875rem;line-height:1.7}
 body:not([data-research-view=overview]) .footer-thanks a{display:inline-block;min-height:24px;padding-block:2px}
 body[data-view=portal] #main{padding-block:18px;justify-content:center}
 body[data-view=portal] .module-grid{grid-auto-rows:1fr}
 body[data-view=portal] .module{height:auto;min-height:148px;padding:16px;gap:10px;overflow:visible}
 body[data-view=portal] .module-icon{position:static;display:grid;width:30px;height:30px}
 body[data-view=portal] .module h2{padding-left:0;display:block;min-height:0;font-size:1.0625rem;line-height:1.3;white-space:normal;overflow-wrap:normal;margin-bottom:6px}
 body[data-view=portal] .module [data-module-description]{display:block;overflow:visible;font-size:.75rem;line-height:1.5;-webkit-line-clamp:unset}
 body[data-view=portal] .footer{padding-top:8px;gap:6px 16px}
 body[data-view=portal] .footer-credit{gap:2px}
 body[data-view=portal] .footer nav{margin-left:0}
 body[data-view=portal] .footer small{font-size:.6875rem}
 body[data-view=login] .auth-panel,body[data-view=feedback] .form-width{padding:22px}
 body[data-view=login] .auth-panel h1,body[data-view=feedback] .page-head h1{font-size:clamp(1.75rem,7vw,2.25rem);line-height:1.15}
 body[data-view=login] .auth-panel .notice{overflow-wrap:break-word}
 body[data-view=account] :is(.account-profile,.identity-copy){min-width:0;overflow-wrap:break-word}
 body[data-view=account] .news-toolbar{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px}
 body[data-view=account] .news-toolbar>label:first-child{grid-column:1;grid-row:1;min-width:0;display:flex;align-items:center;gap:8px}
 body[data-view=account] .news-toolbar>label:first-child select{flex:1;min-width:0;width:100%}
 body[data-view=account] .news-toolbar .news-search{grid-column:1/-1;grid-row:2}
 body[data-view=account] .news-toolbar #news-count{grid-column:2;grid-row:1;margin:0;font-size:.75rem;white-space:nowrap}
 body[data-view=admin] .journal-admin-row{flex-wrap:wrap;align-items:flex-start}
 body[data-view=admin] .journal-admin-row>div{min-width:0;flex:1 1 180px}
 body[data-view=admin] .journal-admin-row .button{margin-left:auto}
 body[data-view=admin] :is(.data-row,.edit-grid,.journal-admin-toolbar)>*{min-width:0;max-width:100%}
 body[data-view=admin] .admin-sidebar nav a{white-space:normal;line-height:1.4}
 .academic-shell :is(.filter-toolbar,.filter-field){min-width:0}
 .academic-shell .filter-toolbar :is(input,select){width:100%;font-size:1rem;min-height:44px}
 .academic-shell .about-identity{min-width:0}
 .academic-shell .about-identity h2{line-height:1.3}
 .academic-shell .bio{font-size:1rem;line-height:1.75}
 .academic-shell .site-footer .footer-links a{min-height:44px;display:inline-flex;align-items:center}
}
@media(max-width:360px){
 body[data-view=portal] .module{padding:14px;min-height:154px}
 body[data-view=portal] .module h2{font-size:1rem}
 body[data-view=portal] .footer{align-items:flex-start}
 body[data-view=portal] .footer nav{width:100%}
 body[data-view=admin] .journal-admin-row .button{margin-left:0}
}
@media(max-width:700px) and (max-height:600px){
 body[data-view=portal] #main{justify-content:flex-start}
}
