/* 2.1.1: Scoped editorial width and compact sidebars. Loaded after existing layout styles. */
body.wag211-content #main.wrap{width:calc(100% - 40px);max-width:1400px;margin-inline:auto}
body.wag211-content .wag-reading{grid-template-columns:minmax(0,1fr) clamp(220px,18vw,240px);gap:20px;align-items:start}
body.wag211-content .wag-reading:not(:has(.wag-reading-rail)){grid-template-columns:minmax(0,1fr);justify-content:stretch}
body.wag211-content .wag-main,body.wag211-content .wag210-main,body.wag211-content .archive-layout>div{min-width:0;width:100%}
body.wag211-content .wag-main .entry-content{max-width:none;width:100%}
body.wag211-content .wag-main h1{max-width:none}
body.wag211-content .wag-main .article-image{display:block;width:100%;height:auto;object-fit:contain}
body.wag211-content .wag-reading-rail{width:100%;min-width:0;gap:12px;padding:0;max-height:none;overflow:visible;align-self:start;position:static}
body.wag211-content .wag-rail-panel{border-radius:10px;box-shadow:none}
body.wag211-content .wag-rail-panel>header{padding:12px;gap:8px}
body.wag211-content .wag-rail-panel h2{font-size:16px;line-height:1.3}
body.wag211-content .wag-rail-panel header p{font-size:11px;line-height:1.4}
body.wag211-content .wag-icon{width:28px;height:28px;padding:5px;border-radius:7px}
body.wag211-content .wag-rail-scroll{min-height:0;max-height:300px;padding:0 8px 0 11px;scrollbar-gutter:auto;overscroll-behavior-y:auto}
body.wag211-content .wag-rail-card{grid-template-columns:48px minmax(0,1fr);gap:8px;padding:10px 0}
body.wag211-content .wag-thumb{width:48px;height:48px;border-radius:6px}
body.wag211-content .wag-rail-card strong{font-size:13px;line-height:1.4;display:block;overflow:visible}
body.wag211-content .wag-card-summary{font-size:11px;line-height:1.45;margin:4px 0}
body.wag211-content .wag-rail-card small{font-size:11px}
body.wag211-content .wag-rail-more{padding:9px 12px;font-size:12px}
body.wag211-content .wag210-layout{grid-template-columns:minmax(0,1fr) clamp(220px,18vw,240px);gap:20px}
body.wag211-content .wag210-sidebar{width:100%;min-width:0}
body.wag211-content .wag210-trending{padding:13px;border-radius:10px;margin-bottom:14px}
body.wag211-content .wag210-trending h2{font-size:21px;line-height:1.25}
body.wag211-content .wag210-scroll{max-height:320px;padding-right:3px;overscroll-behavior-y:auto}
body.wag211-content .wag210-post.is-compact{gap:8px;padding:10px 0}
body.wag211-content .wag210-post.is-compact .wag210-photo{width:48px}
body.wag211-content .wag210-post.is-compact img{width:48px;height:48px}
body.wag211-content .wag210-post.is-compact h3{font-size:13px}
body.wag211-content .wag210-ad{padding:14px;margin-bottom:14px;border-radius:10px}
body.wag211-content .wag210-ad h3{font-size:22px;margin:14px 0 9px}
body.wag211-content .wag210-ad p{font-size:12px;margin-bottom:10px}
body.wag211-content .wag210-ad a{padding:9px;font-size:12px;white-space:normal}
body.wag211-content .wag210-heading{gap:12px}
body.wag211-content .wag210-grid{gap:14px}
body.wag211-content .archive-layout{grid-template-columns:minmax(0,1fr) clamp(220px,18vw,240px);gap:20px;align-items:start}
body.wag211-content .archive-sidebar{padding-left:14px;min-width:0}
body.wag211-content .archive-sidebar h2{font-size:20px}
body.wag211-content .archive-sidebar section{margin-bottom:20px}
body.wag211-content .archive-grid{gap:16px}
body.wag211-content .wag-reading:has(>.wag-reading-rail:empty){grid-template-columns:minmax(0,1fr)}
body.wag211-content .wag-reading-rail:empty{display:none}
@media(max-width:1000px){
 body.wag211-content #main.wrap{width:calc(100% - 32px)}
 body.wag211-content .wag-reading,body.wag211-content .wag210-layout,body.wag211-content .archive-layout{grid-template-columns:minmax(0,1fr);gap:22px}
 body.wag211-content .wag-reading-rail,body.wag211-content .wag210-sidebar{display:grid;position:static;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:8px}
 body.wag211-content .wag210-trending{grid-column:1/-1}
 body.wag211-content .wag210-ad{margin-bottom:0}
 body.wag211-content .archive-sidebar{display:block;border-left:0;border-top:1px solid #dce6d5;padding:20px 0 0}
 body.wag211-content .wag-rail-scroll{max-height:280px}
}
@media(max-width:600px){
 body.wag211-content #main.wrap{width:calc(100% - 28px)}
 body.wag211-content .wag-reading-rail,body.wag211-content .wag210-sidebar{grid-template-columns:minmax(0,1fr)}
 body.wag211-content .wag210-heading{flex-wrap:wrap}
 body.wag211-content .wag210-scroll-controls button{min-width:44px;min-height:44px}
 body.wag211-content .wag-rail-more{min-height:44px;align-items:center}
}
