/* Shared viewport and form safeguards. Screen-only: document print layouts are untouched. */
:root{--ob-visible-height:100vh;--ob-visible-top:0px}
@supports(height:100dvh){:root{--ob-visible-height:100dvh}}
@media screen and (max-width:1024px){
  :is(dialog.sheet,.modal-backdrop,.modal-layer,.ob-offer-layer){box-sizing:border-box!important;max-width:100%;overscroll-behavior:contain}
  :is(.modal-backdrop,.modal-layer,.ob-offer-layer){position:fixed!important;inset:var(--ob-visible-top) 0 auto!important;height:var(--ob-visible-height)!important;max-height:var(--ob-visible-height)!important;padding:8px!important;overflow:auto!important;align-items:center!important}
  :is(.modal-backdrop>.modal-card,.modal-layer>.modal,.ob-offer-layer>.ob-offer-dialog){box-sizing:border-box!important;width:100%!important;max-width:100%!important;min-width:0!important;height:auto!important;min-height:0!important;max-height:calc(var(--ob-visible-height) - 16px)!important;margin:auto!important;border-radius:14px!important;overflow:auto!important;transform:none!important}
  dialog.sheet{position:fixed!important;inset:var(--ob-visible-top) 0 auto!important;margin:0 auto!important;width:100%!important;max-width:100%!important;height:var(--ob-visible-height)!important;max-height:var(--ob-visible-height)!important;min-height:0!important;border-radius:0!important;display:block;overflow:auto!important;transform:none!important}
  dialog.sheet:not([open]){display:none!important}
  :is(.sheet,.modal-card,.modal,.ob-offer-dialog) :is(.sheet-body,.modal-body,.compact-module,.quiz-workspace,.quiz-stage,.bouquet-quiz){height:auto!important;max-height:none!important;min-height:0!important;min-width:0!important;overflow:visible!important;flex:0 0 auto!important}
  :is(.sheet-head,.modal-header,.modal>header){box-sizing:border-box;min-width:0;gap:12px!important;padding:14px max(14px,env(safe-area-inset-right)) 14px max(14px,env(safe-area-inset-left))!important;padding-top:max(14px,env(safe-area-inset-top))!important;align-items:flex-start!important}
  :is(.sheet-head,.modal-header,.modal>header) :is(h2,h3){font-size:clamp(18px,4vw,23px)!important;line-height:1.25!important;overflow-wrap:anywhere;margin:0}
  :is(.sheet-head,.modal-header,.modal>header)>div{min-width:0;flex:1}
  :is(.sheet-head,.modal-header,.modal>header) button{flex:0 0 auto;min-width:44px;min-height:44px}
  :is(.sheet-body,.modal-body){padding:16px!important;padding-bottom:max(24px,env(safe-area-inset-bottom))!important}
  :is(.modal-footer,.modal>footer,.detail-purchase,.order-submit-dock){position:static!important;min-width:0;flex-wrap:wrap;gap:10px!important;padding-bottom:max(16px,env(safe-area-inset-bottom))!important}
  :is(.sheet,.modal-card,.modal,.ob-offer-dialog) :is(form,fieldset,label,.field,.form-field){box-sizing:border-box;min-width:0;max-width:100%}
  :is(form,.sheet,.modal-card,.modal,.ob-offer-dialog) :is(input:not([type=checkbox]):not([type=radio]),select,textarea){box-sizing:border-box;min-width:0!important;max-width:100%!important;font-size:16px!important;scroll-margin-block:90px}
  :is(.sheet,.modal-card,.modal,.ob-offer-dialog) :is(button,.button,.btn){min-height:44px;max-width:100%;white-space:normal;overflow-wrap:anywhere}
  :is(.sheet,.modal-card,.modal,.ob-offer-dialog) :is(input[type=checkbox],input[type=radio]){flex-shrink:0}
  :is(.sheet,.modal-card,.modal,.ob-offer-dialog) :is(.table-wrap,.table-scroll,.inventory-table-wrap){max-width:100%;overflow-x:auto!important;-webkit-overflow-scrolling:touch}
  .bouquet-quiz-sheet .quiz-workspace{display:block!important}
  .bouquet-quiz-sheet .quiz-context{padding:16px!important}
  .bouquet-quiz-sheet .quiz-answer-summary{display:none}
  .bouquet-quiz-sheet .quiz-stage{padding:12px 0!important}
  .bouquet-quiz-sheet .quiz-step{box-sizing:border-box;width:100%;padding:18px!important}
  .bouquet-quiz-sheet .quiz-step-actions{display:flex;flex-wrap:wrap;gap:8px}
  .bouquet-result-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media screen and (max-width:600px){
  .bouquet-quiz-sheet .quiz-context>h3{font-size:18px!important;line-height:1.3!important;margin:8px 0!important}
  .bouquet-quiz-sheet .quiz-context>p{font-size:12px!important;line-height:1.45!important;margin:8px 0!important}
  .bouquet-quiz-sheet .quiz-context>.eyebrow{font-size:9px!important;letter-spacing:.08em}
  .bouquet-quiz-sheet .quiz-progress-card{margin-top:12px;padding:12px}
  .bouquet-quiz-sheet .quiz-step label{font-size:17px;margin-top:12px}
  :is(.sheet,.modal-card,.modal,.ob-offer-dialog) :is(.form-grid,.fields-grid,.grid-2,.quiz-grid,.ob-contact-grid,.ops-form-grid,.editor-grid){grid-template-columns:minmax(0,1fr)!important}
  :is(.sheet,.modal-card,.modal,.ob-offer-dialog) :is(.form-grid,.fields-grid,.grid-2,.ob-contact-grid,.ops-form-grid,.editor-grid)>*{grid-column:auto!important;min-width:0!important}
  .bouquet-result-grid{grid-template-columns:minmax(0,1fr)!important}
  :is(.modal-footer,.modal>footer){display:flex!important;flex-wrap:wrap!important}
  :is(.modal-footer,.modal>footer)>button{flex:1 1 130px!important;width:auto!important}
  .product-sheet .sheet-body{grid-template-columns:minmax(0,1fr)!important}
  .product-facts>div{flex-wrap:wrap}.product-facts dd{text-align:left;overflow-wrap:anywhere}
  .module-toolbar{flex-wrap:wrap}.module-toolbar>*{min-width:0!important;max-width:100%}
}
@media screen and (max-width:1024px) and (max-height:500px){
  :is(.sheet-head,.modal-header,.modal>header){position:static!important}
  .bouquet-quiz-sheet .quiz-context>h3,.bouquet-quiz-sheet .quiz-context>p:not(.eyebrow){display:none}
}
