/* Shared narrow-screen corrections for shopping and workspace pages. */
@media(max-width:760px){
  .market-workspace,.market-form,.panel,.checkout-layout,.checkout-review,.checkout-form,.market-form-grid>*{min-width:0}
  .market-form input:not([type=checkbox]):not([type=radio]),.market-form select,.market-form textarea,.cart-popup input:not([type=checkbox]):not([type=radio]),.cart-popup select,.cart-popup textarea{min-width:0;width:100%;max-width:100%;box-sizing:border-box;font-size:16px}
  .market-form fieldset,.cart-popup fieldset{min-inline-size:0;max-width:100%}
  .market-form label,.cart-popup label{min-width:0;overflow-wrap:anywhere}
  .cart-popup{box-sizing:border-box;width:calc(100vw - 24px);max-width:calc(100vw - 24px);max-height:calc(100dvh - 32px);margin:auto;overflow-y:auto}
  .cart-popup-body,.cart-line,.cart-delivery-group,.cart-delivery-group>*{min-width:0;max-width:100%;box-sizing:border-box}
  .cart-popup-head{gap:10px;padding:14px}.cart-popup-head>div{min-width:0}.cart-popup-head h2{font-size:18px;line-height:1.25}.cart-popup-head button{flex:0 0 44px;min-height:44px}
  .cart-popup-body{padding:12px}.cart-line{padding:12px;margin:10px 0}.cart-line h3{overflow-wrap:anywhere;font-size:17px}
  .cart-line .market-row{flex-wrap:wrap;gap:8px}.cart-line .market-row h3{flex:1;min-width:0}.cart-line .market-row form{margin:0}
  .cart-popup .cart-delivery-group{display:grid;grid-template-columns:minmax(0,1fr);padding:12px;gap:10px}
  .cart-popup .cart-auto-form{gap:10px}.cart-popup .cart-auto-form>label{margin:0}.quantity-stepper{grid-template-columns:44px minmax(0,1fr) 44px}.quantity-stepper button{min-height:44px}
  .checkout-review{padding:16px}.checkout-review h2,.checkout-form h2{font-size:24px;line-height:1.2}
  .checkout-order-line,.checkout-delivery-line{gap:12px;align-items:flex-start;flex-wrap:wrap}.checkout-order-line>div,.checkout-delivery-line>div{flex:1 1 145px;min-width:0;overflow-wrap:anywhere}
  .checkout-order-line>span,.checkout-delivery-line>span{white-space:nowrap;margin-left:auto}.cart-total,.checkout-discount-total{gap:10px;flex-wrap:wrap}.cart-total strong{white-space:nowrap;margin-left:auto}
  .checkout-form .payment-methods label{padding:12px;min-width:0}.payment-methods input{flex:0 0 auto}.payment-methods span{min-width:0}
  .checkout-form .button,.cart-popup .button{white-space:normal;text-align:center;min-height:44px;overflow-wrap:anywhere}
  .market-table-wrap{max-width:100%;overflow-x:auto;overscroll-behavior-x:contain}.market-table-wrap table{max-width:none}
  .market-page-heading{flex-wrap:wrap;gap:12px}.market-page-heading h1{min-width:0;overflow-wrap:anywhere}
  .member-app-mode main{padding-bottom:calc(88px + env(safe-area-inset-bottom))}
}
@media(max-width:560px){.market-form-grid{grid-template-columns:minmax(0,1fr)}.market-form{padding:16px}.market-form .market-row{flex-wrap:wrap}.market-form .market-row>*{min-width:0;max-width:100%}.market-tabs{max-width:100%;overflow-x:auto}.header-actions{gap:5px}.header .brand{flex-shrink:1;min-width:0}.header .brand img{max-width:100%;height:auto}}
@media(max-width:360px){.header:has(.cart-header-button) .brand img{width:80px}.header-actions .menu-toggle{max-width:90px}.header-actions .menu-toggle span{max-width:53px}.header-actions{gap:4px}.cart-header-button{width:36px;height:40px}.checkout-review h2,.checkout-form h2{font-size:22px}}
@media(max-width:760px){.checkout-form .payment-methods input[type=radio],.market-form input[type=checkbox],.market-form input[type=radio],.cart-popup input[type=checkbox],.cart-popup input[type=radio]{width:18px!important;min-width:18px;max-width:18px;height:18px;flex:0 0 18px;padding:0}.checkout-form .payment-methods label{display:flex;align-items:flex-start}.checkout-form .payment-methods span{flex:1;overflow-wrap:anywhere}.checkout-form .payment-methods input[type=radio]{margin:3px 0 0}}
@media(max-width:760px){.panel select,.panel textarea,.panel input:not([type=checkbox]):not([type=radio]){min-width:0;max-width:100%;box-sizing:border-box;font-size:16px}.panel select{width:100%}.panel label{min-width:0;overflow-wrap:anywhere}.panel fieldset{min-inline-size:0}}
