@media (max-width: 767px) {
  body.esnaf-store:has(.esnaf-dock) {
    padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  }

  .esnaf-store .esnaf-dock {
    inset: auto var(--esnaf-overlay-gutter, 0px) 0 0;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 3px;
    padding: 5px max(6px, env(safe-area-inset-right, 0px)) calc(5px + env(safe-area-inset-bottom, 0px)) max(6px, env(safe-area-inset-left, 0px));
    border-top: 1px solid #c8d6ca;
    background: #fff;
    box-shadow: 0 -3px 14px rgb(20 46 26 / 10%);
  }

  html.esnaf-keyboard-visible .esnaf-store .esnaf-dock {
    visibility: hidden;
    pointer-events: none;
  }

  .esnaf-store .esnaf-dock > :is(a,button) {
    --dock-label: #354039;
    --dock-surface: transparent;
    --dock-icon: #36473b;
    --dock-weight: 600;
    color: var(--dock-label);
    background: var(--dock-surface);
    font: var(--dock-weight) 12px/1.15 var(--esnaf-font);
    letter-spacing: -.015em;
    gap: 4px;
    min-height: 54px;
    padding: 5px 1px;
    border-radius: 15px;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
  }

  .esnaf-dock .esnaf-dock-icon {
    display: block;
    flex: 0 0 auto;
    width: 23px;
    height: 23px;
    color: var(--dock-icon);
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .esnaf-store .esnaf-dock > :is([aria-current="page"],[aria-expanded="true"]) {
    color: var(--dock-label);
    background: var(--dock-surface);
    --dock-label: #fff;
    --dock-surface: var(--esnaf-action);
    --dock-icon: #fff;
    --dock-weight: 700;
  }

  #esnaf-search[open] ~ .esnaf-dock > [aria-current="page"]:not([aria-controls="esnaf-search"]) {
    --dock-label: #354039;
    --dock-surface: transparent;
    --dock-icon: #36473b;
    --dock-weight: 600;
  }

  .esnaf-store .esnaf-dock > :focus-visible {
    outline: 2px solid var(--esnaf-action-hover);
    outline-offset: 1px;
  }
  .esnaf-store[data-esnaf-pointer-focus] .esnaf-dock > :focus { outline: none; }

  .esnaf-store .esnaf-dock > .esnaf-quick-cart-toggle {
    --dock-surface: #d81726;
    --dock-label: #fff;
    --dock-icon: #fff;
    --dock-weight: 700;
    gap: 2px;
    border: 0;
    font-size: 11px;
    line-height: 1.05;
  }

  .esnaf-quick-cart-toggle .esnaf-dock-icon {
    width: 18px;
    height: 18px;
  }

  .esnaf-store .esnaf-dock > .esnaf-quick-cart-toggle:is(:hover, [aria-expanded="true"]) {
    --dock-surface: #b80e1c;
  }

  .esnaf-quick-cart-toggle[aria-expanded="true"] .esnaf-dock-icon { transform: rotate(180deg); }

  body.esnaf-store:has(.esnaf-quick-cart:not([hidden])) {
    padding-bottom: calc(146px + env(safe-area-inset-bottom, 0px));
  }

  .esnaf-quick-cart {
    position: absolute;
    inset: auto 0 100%;
    height: 70px;
    box-sizing: border-box;
    border-top: 1px solid #e4dfdc;
    background: #fff;
    box-shadow: 0 -4px 15px rgb(20 46 26 / 12%);
  }

  .esnaf-quick-cart-empty {
    display: grid;
    place-items: center;
    height: 100%;
    margin: 0;
    color: #536157;
    font: 550 13px/1.2 var(--esnaf-font);
  }

  .esnaf-quick-cart-items {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 100%;
    margin: 0;
    padding: 4px max(12px, env(safe-area-inset-right)) 5px max(12px, env(safe-area-inset-left));
    list-style: none;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }

  .esnaf-quick-cart-items::-webkit-scrollbar { display: none; }
  .esnaf-quick-cart-items:focus-visible { outline-offset: -2px; }

  .esnaf-quick-cart-item {
    display: grid;
    justify-items: center;
    flex: 0 0 60px;
    min-width: 0;
    gap: 3px;
    color: var(--esnaf-ink);
    text-align: center;
  }

  .esnaf-quick-cart-photo {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    overflow: hidden;
    border: 1px solid #e1e9df;
    border-radius: 50%;
    background: #f2f6ef;
    color: var(--esnaf-action);
  }

  .esnaf-quick-cart-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .esnaf-quick-cart-name {
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font: 530 10px/1.3 var(--esnaf-font);
  }
}
