/* Shared layout corrections, loaded after each page's component styles.
   Keep overflow visible: resolve the grid sizing instead of hiding content. */
main,main>*,article,aside,figure,fieldset{min-width:0}
img,video,iframe{max-width:100%}
main p,main li,main dd,main figcaption,main small,main h1,main h2,main h3,
footer p,footer a,.privacy-choice p{overflow-wrap:anywhere}
main input,main select,main textarea{max-width:100%;min-width:0}
/* A reading page has only two paired cells: contents navigation and article.
   Every other direct child is a full-width row, including future additions. */
.care-reading>:not(.season-toc):not(.wiki-copy){grid-column:1/-1;width:100%;min-width:0}
.care-reading>.season-toc{grid-column:1;grid-row:auto}
.care-reading>.wiki-copy{grid-column:2;grid-row:auto}
.wiki-layout>.care-videos{grid-column:1/-1}
.care-videos{min-width:0;max-width:100%;width:100%;grid-column:1/-1}
.care-video-grid,.library-main>.care-videos .care-video-grid{
 grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr))
}
.care-video-grid.care-video-grid-single{grid-template-columns:minmax(0,1fr)}
.care-video-card>div{min-width:0}
@media(min-width:701px){
 .care-video-grid-single>.care-video-card{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr);align-items:start}
}
.care-video-card .eyebrow{white-space:normal;overflow-wrap:anywhere;line-height:1.65}
.care-video-card h3{font-size:clamp(22px,2.1vw,28px);line-height:1.3}
.care-video-play span{max-width:calc(100% - 24px);text-align:center;justify-content:center;line-height:1.4;padding:10px 18px}
.wiki-layout>*{min-width:0}
.library-card,.browse-card,.guide-glance article,.commerce-answers article{min-width:0}
.season-table-wrap,.comparison-scroll,.tree-size-scroll,.care-table{min-width:0;max-width:100%;overflow-x:auto}
.home-section-heading,.home-row-heading{flex-wrap:wrap}
.home-section-heading>*,.home-row-heading>*,.home-season>div{min-width:0}
.home-row-heading>a{white-space:normal}
.privacy-choice>div{min-width:0}
.privacy-choice-actions{flex-wrap:wrap}
.mpf-share-dialog{overflow-wrap:anywhere}
/* Collapse the article/shop pair before either column becomes cramped. */
@media(max-width:1000px){
 .wiki-layout{grid-template-columns:minmax(0,1fr);gap:32px}
 .wiki-layout>.wiki-shop{position:static;max-width:560px;width:100%;justify-self:center}
}
@media(max-width:900px){
 .care-reading>.season-toc,.care-reading>.wiki-copy{grid-column:auto}
}
@media(max-width:600px){
 .care-videos{padding:18px}
 .care-video-card>div{padding:18px}
 .wiki-tile{grid-template-columns:minmax(0,100px) minmax(0,1fr)}
 .wiki-tile>div{padding:16px}
 .wiki-tile h2{font-size:22px;line-height:1.35}
 .wiki-mini-order{flex-wrap:wrap}
 .wiki-mini-order>div{min-width:0;flex:1 1 170px;padding:18px}
 .guide-glance h2,.commerce-answers>h2{font-size:28px;line-height:1.3}
 .home-hero{height:auto;max-height:none;grid-template-rows:auto}
 .home-hero-copy{align-self:start}
}
@media(max-width:420px){
 body>header.atelier-header{gap:10px;padding:10px 16px;grid-template-columns:minmax(0,1fr) auto}
 .atelier-header .brand-logo{max-width:100%;width:145px;height:70px}
 .mobile-menu summary{padding:10px 12px;gap:8px;min-height:44px}
 .mobile-menu nav{max-width:calc(100vw - 32px)}
 .home-hero{grid-template-columns:minmax(0,1fr);height:auto;max-height:none}
 .home-hero .hero-photo{height:300px}
 .home-hero .hero-photo img{height:100%;min-height:0}
 .home-heritage{grid-template-columns:minmax(0,1fr);gap:20px}
 .home-heritage>img{max-width:200px;height:145px}
 .home-season{align-items:flex-start;gap:10px}
 .home-season>img{flex:0 0 52px;width:52px;height:64px}
 .browse-controls{grid-template-columns:minmax(0,1fr)}
 .browse-controls>label:first-child{grid-column:auto}
 .mpf-share-dialog .share-copy{grid-template-columns:minmax(0,1fr)}
 .share-copy label{grid-column:auto}
 .share-networks,.share-apps{grid-template-columns:minmax(0,1fr)}
 .privacy-choice-actions{grid-template-columns:minmax(0,1fr)}
 .order-page h1{font-size:clamp(34px,11vw,46px);line-height:1.15}
}

/* Request summaries can contain a full price-confirmation sentence. */
.summary-items li{min-width:0;align-items:flex-start;flex-wrap:wrap}
.summary-items li>span{min-width:0;flex:1 1 160px}
.summary-items li>b{white-space:normal;overflow-wrap:anywhere;flex:0 1 190px;text-align:right}
.step-actions>div{min-width:0}
.step-total{line-height:1.35;overflow-wrap:anywhere}
.rating-dialog,.easy-picker{box-sizing:border-box;max-width:calc(100vw - 28px);max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px);overflow-y:auto;overscroll-behavior:contain}
.easy-picker .picker-heading{display:flex;align-items:flex-start;gap:16px;min-width:0}
.easy-picker .picker-heading>h2{flex:1;min-width:0;overflow-wrap:anywhere}
.easy-picker .picker-heading>button,.dialog-close{flex:none;min-width:44px;min-height:44px}
.easy-picker input{box-sizing:border-box;max-width:100%}
.easy-picker .picker-products{min-width:0}
.easy-picker .picker-products>*{min-width:0}
/* Keep browser controls readable when an iPhone focuses a field. */
@media(max-width:700px){
 .order-page input:not([type=checkbox]),.order-page select,.order-page textarea,
 .browse-controls input[type=search],.browse-controls select{font-size:16px}
 .easy-order .step-actions,.stepped-order .step-actions{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px 12px}
 .easy-order .step-actions>div,.stepped-order .step-actions>div{grid-column:1/-1;margin:0;display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:4px 14px;min-width:0}
 .easy-order .step-total,.stepped-order .step-total{font-size:16px;min-width:0;text-align:right;flex:1 1 180px}
 .easy-order .step-next,.stepped-order .step-next{grid-column:2;min-width:0;max-width:100%;min-height:44px;white-space:normal}
 .easy-order .step-back,.stepped-order .step-back{grid-column:1;grid-row:2;min-height:44px;justify-self:start}
 body.stepped-order{padding-bottom:var(--mpf-order-actions-height,160px)}
 html:has(body.stepped-order){scroll-padding-bottom:calc(var(--mpf-order-actions-height,160px) + 24px)}
 .stepped-order :is(input,select,textarea,button){scroll-margin-bottom:calc(var(--mpf-order-actions-height,160px) + 24px)}
 .easy-order .maison-footer{padding-bottom:24px}
 .live-design-heading{flex-wrap:wrap}
 .live-pill{white-space:normal}
 .summary-items li>b{flex-basis:100%;text-align:left}
 .easy-choice-grid button{overflow-wrap:anywhere}
}
@media(max-width:420px){
 .easy-choice-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
/* A fixed action bar would consume too much of a landscape keyboard viewport. */
@media(max-width:700px) and (max-height:480px){
 .easy-order .step-actions,.stepped-order .step-actions{position:static;padding:12px 0;margin-top:20px;box-shadow:none}
 body.stepped-order{padding-bottom:0}
}
