/* Keep the controls in view while a long cart scrolls independently. */
.cart-drawer{
  --cart-top-space:max(22px,env(safe-area-inset-top,0px));
  --cart-bottom-space:max(22px,env(safe-area-inset-bottom,0px));
  top:var(--cart-top-space);
  display:flex;
  flex-direction:column;
  visibility:hidden;
  max-height:calc(100vh - var(--cart-top-space) - var(--cart-bottom-space));
  max-height:calc(100dvh - var(--cart-top-space) - var(--cart-bottom-space));
  overflow:hidden;
}
.cart-drawer.open{visibility:visible}
.cart-drawer>:not(#cartItems){flex-shrink:0}
#cartItems{
  flex:0 1 auto;
  min-height:0;
  overflow-y:auto;
  overscroll-behavior-y:contain;
  -webkit-overflow-scrolling:touch;
  touch-action:pan-y;
  scrollbar-width:thin;
  scrollbar-color:rgba(53,41,45,.3) transparent;
}
#cartItems:focus-visible{outline:1px solid var(--ink,#35292d);outline-offset:2px}
#cartItems::-webkit-scrollbar{width:4px}
#cartItems::-webkit-scrollbar-thumb{border-radius:4px;background:rgba(53,41,45,.3)}
#cartItems .cart-item{gap:12px}
#cartItems .cart-item>span{min-width:0;overflow-wrap:break-word}
#cartItems .cart-item>b{flex:0 0 auto;text-align:right}
@media(max-height:420px){
  .cart-drawer{
    --cart-top-space:max(10px,env(safe-area-inset-top,0px));
    --cart-bottom-space:max(10px,env(safe-area-inset-bottom,0px));
    padding:14px;
  }
  .cart-drawer .cart-welcome{font-size:10px;line-height:1.4;margin-top:8px}
  .cart-drawer .cart-total{padding-top:10px;margin-top:8px}
  .cart-drawer .drawer-check{margin-top:10px}
}
