/* Bloomly V397: responsive corrections. Print artwork dimensions are preserved. */
@media screen {
 html { min-width:0!important; }
 body { min-width:0; }
 .cookie-banner {box-sizing:border-box!important;min-width:0!important;max-width:calc(100% - 24px)!important;left:12px!important;right:12px!important;width:auto!important;margin-inline:auto!important;overflow-wrap:anywhere;max-height:calc(100dvh - 24px);overflow:auto;}
 .cookie-banner p {min-width:0;}
 .cookie-actions {display:flex;flex-wrap:wrap;min-width:0;}
 .cookie-actions button {max-width:100%;white-space:normal;}
 .login-footer {box-sizing:border-box;width:100%;min-width:0;overflow-wrap:anywhere;}
 html body dialog:not([open]) {display:none!important;}
 html body dialog[open] {box-sizing:border-box!important;min-width:0!important;max-width:calc(100vw - 24px)!important;max-height:calc(100vh - 24px)!important;max-height:calc(100dvh - 24px)!important;overflow:auto;overscroll-behavior:contain;scroll-padding-block:16px;}
 dialog :is(input:not([type=checkbox]):not([type=radio]),select,textarea) {box-sizing:border-box;max-width:100%;min-width:0;}
 dialog :is(.category-dialog-card,.category-dialog-grid,.b388-panel,.b391-panel) {min-width:0;max-width:100%;}
 dialog :is(.category-dialog-actions,.bui-actions) {flex-wrap:wrap;}
 .bloomly-note-modal .bloomly-note-card {box-sizing:border-box;max-width:calc(100vw - 24px)!important;max-height:calc(100dvh - 24px)!important;min-height:0!important;}
 :is(.home-cart-dialog,.home-cart-panel,.bui-dialog,.cms-dialog) {box-sizing:border-box;max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);overflow:auto;overscroll-behavior:contain;}
 @media(max-width:850px) {
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=hidden]),select,textarea {font-size:16px;}
  .homepage-mixed .hero {grid-template-columns:minmax(0,1fr);}
  .homepage-mixed .hero-copy,.homepage-mixed .hero-visual {min-width:0;max-width:100%;}
  .homepage-mixed .hero-copy h1 {overflow-wrap:anywhere;}
  .homepage-mixed .hero-visual {overflow:hidden;}
  .homepage-mixed .hero-actions>a {box-sizing:border-box;max-width:100%;min-width:0;white-space:normal;}
 }
 @media(max-width:360px) {
  .homepage-mixed .hero {padding-inline:14px;gap:20px;}
  .homepage-mixed .hero h1 {font-size:clamp(30px,10vw,36px);letter-spacing:-1px;}
  .category-dialog {padding:14px!important;}
  .category-dialog-head {gap:8px;}
  .category-dialog-head h2 {font-size:20px;}
 }
 @media(max-height:500px) and (orientation:landscape) {
  html body dialog[open] {max-height:calc(100dvh - 12px)!important;}
  html body #b391-product .b391-photo {max-height:180px;}
  html body #zoneDialog .b388-list {max-height:110px;}
 }
}

/* V399: retain the approved desktop geometry; only adapt to the available space. */
@media screen and (min-width:851px){
 html body:is(.public-home-page,.how385-page,.notes-final-page,.register392,.signup396){--bl-content-max:1800px;}
 /* Product typography, card padding, menu, hero and controls remain in their original stylesheets. */
 html body.public-home-page #viewport #page #homeMarketProducts{grid-template-columns:repeat(8,minmax(0,1fr))!important;}
}
@media screen and (min-width:1101px) and (max-width:1350px){
 html body.public-home-page #viewport #page #homeMarketProducts{grid-template-columns:repeat(6,minmax(0,1fr))!important;}
}
@media screen and (min-width:851px) and (max-width:1100px){
 html body.public-home-page #viewport #page #homeMarketProducts{grid-template-columns:repeat(4,minmax(0,1fr))!important;}
 html body.public-home-page #viewport #page .utility{height:auto!important;min-height:44px!important;flex-wrap:wrap!important;}
 html body.public-home-page #viewport #page .utility .search-wrap{flex:1 1 200px!important;min-width:0!important;}
 html body.public-home-page #viewport #page .utility .filters{max-width:100%;flex-wrap:wrap!important;}
}
/* Close the 801–850px gap between the compact header and mobile typography. */
@media screen and (max-width:850px){
 html body.bl-site :is(.b386-header,.b392-header,.b396-header){box-sizing:border-box!important;display:flex!important;flex-wrap:wrap!important;height:auto!important;min-height:56px!important;gap:10px!important;padding:10px 14px!important;}
 html body.bl-site :is(.b386-header,.b392-header,.b396-header) :is(nav,.mainnav){order:3!important;position:static!important;flex:1 0 100%!important;width:100%!important;display:flex!important;flex-wrap:wrap!important;justify-content:center!important;gap:8px 16px!important;}
 html body.bl-site :is(.b386-header,.b392-header,.b396-header) :is(nav,.mainnav) a{font:600 14px/1.4 Arial,sans-serif!important;min-height:36px!important;display:inline-flex!important;align-items:center!important;}
 html body.bl-site :is(.b386-header,.b392-header,.b396-header) .actions{display:flex!important;flex-wrap:wrap!important;gap:8px!important;margin-left:auto!important;max-width:100%!important;}
 html body.bl-site :is(.b386-header,.b392-header,.b396-header) .actions a{font:600 12px/1.4 Arial,sans-serif!important;min-height:36px!important;height:auto!important;padding:8px 12px!important;}
}
