/* Additive touch rules for the public homepage, storefront and administrator UI. */
@media (max-width:760px),(any-pointer:coarse){
  :root{--lcb-touch-target:44px}
  .home-surface :is(.button,.tab,.plan-more,.close),
  .home-surface .nav> a,.home-surface .nav-menu>button,.home-surface .popover a,
  .app-shell button,.app-shell :is(.button,.icon-button,.nav-item),
  .modal-panel :is(button,.button,.icon-button),
  .store-shell :is(button,.button,.icon-button),.store-shell .store-header>.button,
  .login-page :is(button,.button),
  :is(.lcb-share-modal,.lcb-file-modal,.lcb-code-output) button{
    min-height:var(--lcb-touch-target)!important;min-width:44px;touch-action:manipulation
  }
  .home-surface .close,.app-shell .icon-button,.store-shell .icon-button,.modal-panel .icon-button{
    width:var(--lcb-touch-target)!important;height:var(--lcb-touch-target)!important;flex-shrink:0
  }
  :is(.app-shell,.store-shell,.login-page,.modal-panel,.lcb-share-modal,.lcb-file-modal,.lcb-code-output)
  :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea){
    min-height:var(--lcb-touch-target)!important;font-size:16px!important;max-width:100%
  }
  .app-shell :is(.header-actions,.section-toolbar,.modal-footer),
  .store-shell :is(.store-header,.order-page-heading),
  .home-surface :is(.hero-actions,.modal-actions){gap:8px;flex-wrap:wrap}
  .home-surface{padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right)}
  .home-surface .top{padding-top:env(safe-area-inset-top)}
  .home-surface .top-inner{flex-wrap:wrap;gap:8px 12px;padding-block:8px}
  .home-surface .nav{flex:1 1 auto;justify-content:flex-end;flex-wrap:wrap;gap:8px}
  .home-surface .nav-menu>button{padding-inline:10px}
  .home-surface .tabs{flex-wrap:wrap;gap:8px}
  .home-surface .plan-more{align-self:flex-start;padding:8px 4px;font-size:14px}
  .home-surface .tooltip{width:44px;height:44px;flex:0 0 44px;font-size:14px}
  .home-surface .toast{right:max(12px,env(safe-area-inset-right));bottom:max(12px,env(safe-area-inset-bottom));max-width:calc(100vw - 24px)}
  .app-shell .topbar{padding-left:max(12px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right));min-height:calc(50px + env(safe-area-inset-top))}
  .app-shell .page-section{padding-left:max(16px,env(safe-area-inset-left));padding-right:max(16px,env(safe-area-inset-right))}
  .app-shell .sidebar{padding-left:max(14px,env(safe-area-inset-left))}
  .store-shell .store-header{height:auto;min-height:60px;padding:8px max(14px,env(safe-area-inset-right)) 8px max(14px,env(safe-area-inset-left));padding-top:max(8px,env(safe-area-inset-top))}
  .store-shell :is(.store-main,.order-main){padding-bottom:max(48px,env(safe-area-inset-bottom))}
  .modal-layer,
  :is(.lcb-share-modal,.lcb-file-modal){padding:max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))}
  .home-surface .modal,.modal-panel,.product-editor-modal,
  :is(.lcb-share-panel,.lcb-file-panel,.lcb-code-output){
    min-height:0;max-height:calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom))!important;
    overflow-y:auto;overscroll-behavior:contain
  }
  .modal-panel :is(.modal-header,.modal-footer){flex-shrink:0}
  .modal-panel .modal-body{min-height:0;overflow-y:auto}
  .app-shell :is(.lcb-code-pagination-controls,.lcb-message-row-actions){gap:8px;flex-wrap:wrap}
}
@media (any-pointer:coarse){:root{--lcb-touch-target:48px}}
@media (max-height:540px) and (orientation:landscape){
  .modal-layer,.lcb-share-modal,.lcb-file-modal{align-items:flex-start;overflow-y:auto}
  .home-surface .modal,.modal-panel,.product-editor-modal,.lcb-share-panel,.lcb-file-panel,.lcb-code-output{
    min-height:0;max-height:calc(100dvh - 16px - env(safe-area-inset-top) - env(safe-area-inset-bottom))!important;overflow-y:auto
  }
  .modal-layer{padding-top:max(8px,env(safe-area-inset-top));padding-bottom:max(8px,env(safe-area-inset-bottom))}
  .login-page{align-items:flex-start;overflow-y:auto;padding-top:max(12px,env(safe-area-inset-top));padding-bottom:max(12px,env(safe-area-inset-bottom))}
}
