/* Home sections size against their own column, including custom book/mosaic layouts. */
#magExtra>.theme-block,#magExtra>.mx-pair>.theme-block{container:home-section / inline-size;min-width:0;max-width:100%}
#magExtra .theme-block :is(.editor-mosaic,.editor-list,.editor-lead,.lib-grid,.lib-card,.lib-card-body,.lib-card-actions,.mx-mosaic,.mx-copy){min-width:0;max-width:100%}
#magExtra .theme-block .editor-mosaic.has-single-item{grid-template-columns:minmax(0,1fr)}
#magExtra .theme-block .editor-mosaic.has-single-item>.editor-lead{order:0}
#magExtra .theme-block .editor-mosaic.has-single-item>.editor-lead{display:grid;grid-template-columns:minmax(0,.95fr) minmax(0,1fr);column-gap:18px;align-items:start}
#magExtra .theme-block .editor-mosaic.has-single-item>.editor-lead>.media{grid-column:1;grid-row:1/span 4;align-self:stretch;min-height:220px;max-height:320px;height:100%}
#magExtra .theme-block .editor-mosaic.has-single-item>.editor-lead>:not(.media){grid-column:2}
#magExtra>.mx-pair>.theme-block:has(>.editor-mosaic.has-single-item){align-self:start}
#magExtra .theme-block.hide-block-images .editor-mosaic.has-single-item>.editor-lead{display:block}
#magExtra .theme-block .lib-grid{--home-card-min:max(180px,calc((100% - (var(--block-columns,3) - 1)*16px)/var(--block-columns,3)));display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,var(--home-card-min)),1fr));gap:16px;align-items:stretch}
#magExtra .theme-block .lib-card-actions{flex-wrap:nowrap;gap:7px}
#magExtra .theme-block .lib-card-actions .lib-link{display:flex;align-items:center;justify-content:space-between;gap:4px;min-width:0;line-height:1.6;overflow-wrap:normal;word-break:normal}
#magExtra .theme-block .lib-card-actions :is(.lib-save,.ico){flex-shrink:0}
#magExtra .theme-block .lib-cover-stage{aspect-ratio:1.35;max-height:220px}
#magExtra .theme-block .lib-cover{max-width:100%;max-height:100%;object-fit:contain}
@container home-section (max-width:620px){
 #magExtra .theme-block .editor-mosaic{grid-template-columns:minmax(0,1fr);gap:12px}
 #magExtra .theme-block .editor-mosaic-reverse>.editor-lead{order:0}
 #magExtra .theme-block .editor-mosaic-reverse>.editor-list{order:1}
 #magExtra .theme-block .editor-mosaic.has-single-item>.editor-lead{display:block}
 #magExtra .theme-block .editor-mosaic.has-single-item>.editor-lead>.media{height:clamp(180px,48cqw,280px);min-height:0;max-height:280px;aspect-ratio:16/9}
 #magExtra .theme-block .mx-mosaic{grid-template-columns:minmax(0,1fr)}
 #magExtra .theme-block .mx-lead{grid-template-columns:minmax(0,1fr)}
 #magExtra .theme-block .lib-grid{gap:12px;--home-card-min:max(180px,calc((100% - (var(--block-columns,3) - 1)*12px)/var(--block-columns,3)))}
}
