/* Shared text-flow safeguards for the museum and Order Studio. */
.museum :where(h1,h2,h3,p,li,dt,dd,summary,figcaption,strong,small,label,a,button,pre){overflow-wrap:anywhere}
.museum h1,.museum h2,.museum h3{line-height:1.2}
.museum :where(p,li,dd,summary,label){line-height:1.55}
.museum :where(.hero-text,.detail-copy,.product-purchase,.basket-item-main,.basket-item-end,.footer-columns>div,.section-top>div,.viewer-header>div,.viewer-footer>div,.studio-heading>div,.section-label>div){min-width:0}
.product-layout{grid-template-columns:minmax(0,1.05fr) minmax(0,1fr)}
.product-options{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.product-options select,.quantity-control{min-width:0;max-width:100%}
.basket-item{grid-template-columns:135px minmax(0,1fr) 130px}
.basket-item-end strong{max-width:100%}
.archive-row{grid-template-columns:minmax(0,.8fr) minmax(0,2.2fr) minmax(0,1.2fr) 24px}
.archive-id{line-height:1.2}
.footer-columns{flex-wrap:wrap;gap:24px}
.footer-columns>div{flex:1 1 130px;min-width:0}
.museum-button,.viewer-control,.viewer-buy button,.viewer-buy a{white-space:normal;max-width:100%}
.museum-button{min-width:0;line-height:1.5;text-align:left}
.product-image-note{flex-wrap:wrap;gap:10px}
.product-image-note span{white-space:normal}
.picture-caption{flex-wrap:wrap;line-height:1.5}
.product-photo>span,.detail-image span{max-width:calc(100% - 40px);line-height:1.5}
.viewer-header{align-items:flex-start}
.viewer-toolbar,.viewer-paging,.viewer-footer,.viewer-buy{flex-wrap:wrap}
.viewer-footer>div{max-width:100%;flex:1 1 220px}
.viewer-shell{overflow-y:auto}
.viewer-stage{min-height:min(30vh,220px)}
.viewer-close{flex-shrink:0}
.book-choice{white-space:normal;text-align:left;line-height:1.4}
.manuscript-picker,.passage-picker{flex-wrap:wrap}
.manuscript-picker select,.passage-picker select,.codex-book-form select{min-width:0;max-width:100%}
.studio .stat-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
.studio .finance-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.studio .material-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.studio .order-row{grid-template-columns:minmax(0,1fr) auto}
.studio .order-row>*{min-width:0;white-space:normal}
.studio .order-detail dl{grid-template-columns:minmax(70px,.75fr) minmax(0,1fr)}
.studio .finance-line{align-items:flex-start}
.studio .finance-line span{flex:1;min-width:0}
.studio .finance-line strong{flex-shrink:0;white-space:nowrap}
.studio .stat strong{font-size:clamp(1.75rem,3vw,2.5rem)}
.studio .section-label{flex-wrap:wrap;align-items:flex-start}
.studio .message-preview pre{overflow-wrap:anywhere;white-space:pre-wrap}
@media(max-width:1100px){.product-layout{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}}
@media(max-width:1050px){.studio .stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){
 .product-layout{grid-template-columns:minmax(0,1fr)}
 .basket-item{grid-template-columns:90px minmax(0,1fr) 74px}
 .viewer-buy button{flex:1 1 150px;min-height:44px}
 .viewer-buy a{flex:0 1 auto}
 .book-navigation{flex-wrap:wrap;overflow:visible}
 .book-choice{flex:0 1 auto;max-width:100%}
 .viewer-control{min-height:44px}
}
@media(max-width:700px){
 .studio-header{height:auto;flex-direction:column;align-items:flex-start;gap:12px}
 .studio-header .museum-brand{min-width:0;max-width:100%}
 .studio-header-right{display:flex;flex-wrap:wrap;text-align:left;gap:12px;width:100%}
 .studio-header-right .demo-pill{flex-basis:100%;margin:0}
 .studio .stat-grid,.studio .finance-grid,.studio .material-grid{grid-template-columns:minmax(0,1fr)}
 .studio .product-line{grid-template-columns:45px minmax(0,1fr) 60px;gap:10px}
}
@media(max-width:640px){
 .museum-header{height:auto;min-height:76px;padding-block:12px;flex-wrap:wrap;gap:12px}
 .museum-brand{flex:1 1 180px;min-width:0;max-width:100%}
 .museum-brand .brand-text{min-width:0;line-height:1.25}
 .museum-menu{margin-left:auto;flex-shrink:0;max-width:100%;white-space:normal}
 .archive-row{grid-template-columns:minmax(0,1fr);gap:8px}
 .archive-row>*{grid-column:1;grid-row:auto}
 .archive-id{font-size:24px}
 .archive-arrow:empty{display:none}
 .detail-copy h1{font-size:clamp(2rem,9vw,4rem)}
 .product-purchase h1{font-size:clamp(2rem,9vw,3.25rem)}
 .footer-columns>div{flex-basis:110px}
 .tab-controls button{min-width:0;line-height:1.5}
}
@media(max-width:480px){
 .basket-item{grid-template-columns:80px minmax(0,1fr);padding-bottom:24px}
 .basket-item-end{position:static;grid-column:2;flex-wrap:wrap;gap:12px;justify-content:flex-start;align-items:center}
 .basket-item-end label{margin-left:0}
 .product-options{grid-template-columns:minmax(0,1fr)}
 .product-options label[for=quantity]{grid-column:1;grid-row:3}
 .quantity-control{grid-column:1;grid-row:4}
 .product-options select{grid-column:1;grid-row:2}
}

.museum-header{height:auto;min-height:94px;flex-wrap:wrap;padding-block:16px}
.header-search input,.search-large-field input,.studio .toolbar label{min-width:0}
.search-large-field button{white-space:normal;line-height:1.5}
.museum-shop-products .carousel-footer{flex-wrap:wrap}
.museum-shop-products .carousel-footer p,.shop-intro a,.workshop-outro .museum-button{white-space:normal}
@media(max-width:920px){.museum-header{min-height:76px}}
@media(max-width:640px){.museum-header{padding-block:12px}}

.replica-price-line{display:flex;flex-wrap:wrap;gap:8px 16px;align-items:baseline;padding:18px 20px;background:#eee6d8;border:1px solid #cabba5;font-size:16px;line-height:1.6;margin:0 0 24px}.replica-price-line small{font-size:14px}.replica-shipping{display:block;font-size:14px;line-height:1.5;margin-top:6px}.museum-shop-products .product-bottom>span{font-size:15px;line-height:1.5}.viewer-buy{align-items:center}.viewer-buy>div{flex:1 1 220px;min-width:0}.viewer-buy label{display:flex;flex-direction:column;gap:6px;font-size:14px;line-height:1.4;max-width:100%}.viewer-buy select{font:16px var(--sans);padding:10px;border:1px solid #b8aa96;min-height:44px;max-width:100%;min-width:0;background:#faf7f0}.viewer-buy small{font-size:14px;line-height:1.5}.product-add #selected-price{font:inherit;letter-spacing:inherit}.product-add{justify-content:center;text-align:center;gap:8px}.viewer-buy button{font-size:14px}.product-price strong{font-size:clamp(18px,2vw,24px);line-height:1.5}@media(max-width:760px){.viewer-buy label{flex:1 1 180px}.viewer-buy>div{flex-basis:100%}.replica-price-line{padding:16px}}
