/* Reading adapts to the available window, including foldable and split windows. */
@media(max-width:980px){
 body{height:100dvh;overflow:hidden}
 body .feed-layout,body.layout-extended .feed-layout{display:block!important;width:100%;max-width:none;margin:0!important;padding:0 0 calc(58px + env(safe-area-inset-bottom))!important;height:calc(100dvh - var(--shared-header-height,92px))!important;overflow:hidden}
 body .feed-center,body.layout-extended .feed-center{display:flex;width:100%;height:100%;min-height:0;padding:10px 10px 0!important;overflow:hidden}
 body #main-feed,body.layout-extended #main-feed{top:auto!important;width:100%!important;max-width:720px!important;height:100%!important;min-height:0!important;max-height:100%!important;margin:0 auto;aspect-ratio:auto!important;padding:7px!important;border-radius:24px}
 body .feed-screen{height:100%;min-height:0;padding:16px 14px 0!important;overflow:hidden;border-radius:17px}
 body .feed-fixed{flex:none;min-width:0}
 body .feed-fixed[hidden],body .feed-scroll[hidden],body #page-content[hidden]{display:none!important}
 body .feed-heading{display:flex!important;align-items:center!important;justify-content:space-between;gap:9px;min-height:52px!important;height:auto!important;padding:0 0 10px!important}
 body .feed-heading h2{font-size:clamp(20px,4.8vw,28px)!important;letter-spacing:-.6px;white-space:nowrap}
 body .feed-heading>div{min-width:0}
 body .feed-tabs{flex:none;margin:0;gap:8px}
 body .feed-tabs button{font-size:10px;white-space:nowrap}
 body .feed-compose-menu{display:none}
 body .feed-scroll,body.layout-extended .feed-scroll{flex:1 1 auto!important;height:auto!important;max-height:none!important;min-height:0;overflow:auto;overscroll-behavior-y:contain;padding:0 0 18px!important;margin:0!important}
 body #page-content{flex:1 1 auto;width:100%;height:auto!important;min-height:0;margin:0!important;padding:0 0 16px!important;overflow:auto}
 body .tablet-camera{display:none}
 body .left-rail,body.layout-extended .left-rail{position:fixed;inset:auto 0 0;width:100%;height:calc(58px + env(safe-area-inset-bottom));max-height:none;padding:0 0 env(safe-area-inset-bottom)!important;background:#fffffff5;border-top:1px solid #e2e6e2;z-index:25;overflow:hidden}
 body .left-rail>nav{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));height:58px;max-width:720px!important;padding:0 10px!important;margin:auto!important;gap:0}
 body .left-rail .nav-item{display:flex;flex-direction:column;align-items:center;justify-content:center;height:58px;min-width:0;margin:0;padding:7px 0;border:0;background:none;box-shadow:none;color:#859088;font-size:0}
 body .left-rail .nav-item>span{display:none}
 body .left-rail .nav-item svg{width:25px;height:25px}
 body .left-rail .nav-item.active{color:#294d3c;box-shadow:none;background:none}
 body .rail-profile,body .rail-foot,body .rail-link,body .right-rail{display:none!important}
 body .room-heading{padding:2px 0 14px;gap:10px;margin-bottom:12px}
 body .room-heading h1{font-size:24px;margin:5px 0}
 body .room-heading p{font-size:11px}
 body .room-shelf-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:22px 14px}
 body .room-shelf-book>strong{font-size:12px}
 body .shelf-cover{height:160px;padding-bottom:12px}
 body .shelf-cover img{max-height:145px}
 body.page-write .feed-layout,body.layout-extended.page-write .feed-layout{height:calc(var(--mobile-visible-height,100dvh) - var(--shared-header-height,92px))!important;padding:0!important}
 body.page-write .feed-center,body.layout-extended.page-write .feed-center{padding:8px!important}
 body.page-write #main-feed,body.layout-extended.page-write #main-feed{max-width:720px!important;height:min(100%,440px)!important;max-height:440px!important}
 body.page-write .feed-screen{padding:0!important}
 body.page-write #page-content{height:100%!important;padding:0!important;overflow:hidden!important}
 body.page-write .left-rail{display:none!important}
}
@media(max-width:420px){body .room-shelf-grid{grid-template-columns:repeat(2,minmax(0,1fr))}body .feed-tabs{gap:7px}body .feed-tabs button{font-size:9px}}
@media(max-width:350px){body .feed-heading h2{font-size:20px!important}body .feed-tabs{gap:5px}body .feed-tabs button{font-size:9px}}
@media(max-width:480px){
 body .post-head,body.layout-extended .post-head{display:grid!important;grid-template-columns:28px minmax(0,1fr)!important;align-items:center;gap:5px 7px;min-width:0}
 body .post-head>.avatar{width:28px;height:28px;grid-column:1;grid-row:1;flex:none}
 body .post-author{grid-column:2;grid-row:1;min-width:0}
 body .post-author strong{display:block!important;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px!important}
 body .post-author small{display:block;margin:1px 0 0!important;font-size:9px!important;white-space:nowrap}
 body .shared-reason{grid-column:1/-1;justify-self:start;max-width:100%;margin:2px 0!important;font-size:9px!important;white-space:normal}
 body .post-menu{grid-column:2;justify-self:end}
}
@media(max-width:350px){
 body .post-body,body.layout-extended .post-body{grid-template-columns:70px minmax(0,1fr);gap:10px}
 body .post-image,body .post-body .cover,body.layout-extended .post-image,body.layout-extended .post-body .cover{width:70px}
 body .post-actions{gap:6px!important}
 body .post-actions button{font-size:10px!important}
}
