/* Mobile cart / MyINNO / full category menu audit. */
@media (max-width: 767px) {
  /* Common mobile spacing */
  body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .page-shell.cart-page,
  .mypage-orders-page { padding-bottom: 34px; }
  .top-button { right: 14px; bottom: 88px; width: 46px; height: 46px; }
  .mobile-dock { box-shadow: 0 -4px 18px rgb(0 0 0 / 6%); }
  .mobile-dock button.active,
  .mobile-dock button[aria-current="page"] { color: var(--purple); font-weight: 500; }

  /* Cart: remove the desktop negative-offset layout and rebuild the flow. */
  .cart-page > .container { width: calc(100% - 24px); }
  .cart-heading { padding: 24px 0 16px; }
  .cart-heading .page-title { font-size: 30px; line-height: 1.2; }
  .cart-toolbar { min-height: 44px; }
  .cart-toolbar .small-outline { height: 34px; padding: 0 13px; border-radius: 8px; }
  .cart-head { grid-template-columns: 30px minmax(0, 1fr); min-height: 48px; padding: 0 8px; font-size: 13px; }
  .cart-head span:nth-of-type(2),
  .cart-head span:last-child { display: none; }

  .cart-item {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 10px 8px;
    align-items: start;
    padding: 20px 0 24px;
  }
  .cart-item > .cart-check {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    justify-self: center;
  }
  .cart-item > .cart-check span { width: 24px; height: 24px; }
  .cart-product {
    grid-column: 2;
    grid-row: 1;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    min-width: 0;
  }
  .cart-product > img {
    width: 74px;
    height: 74px;
    border: 1px solid #eee;
    border-radius: 8px;
    background: #fff;
  }
  .cart-product-info { min-width: 0; }
  .cart-brand { margin-bottom: 4px; font-size: 11px; }
  .cart-product-title { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 8px; align-items: start; }
  .cart-product-title strong {
    min-width: 0;
    font-size: 15px;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }
  .cart-product-title b { font-size: 15px; line-height: 1.35; }
  .cart-product-info > small {
    margin-top: 4px;
    font-size: 11px;
    line-height: 1.4;
    white-space: normal;
  }

  .cart-option-strip,
  .cart-option-strip.cart-option-runtime-split {
    width: 100%;
    margin: 12px 0 0 !important;
    padding: 9px !important;
    border-radius: 9px;
    background: #f6f6f7;
  }
  .cart-option-strip.cart-option-runtime-split {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 8px !important;
  }
  .cart-option-runtime-list { gap: 7px; }
  .cart-option-runtime-item + .cart-option-runtime-item {
    margin-top: 0;
    padding-top: 7px;
    border-top-color: #e2e2e4;
  }
  .cart-option-runtime-row {
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas:
      "name name name"
      "qty memo remove";
    gap: 7px 8px;
    min-height: 0;
  }
  .cart-option-runtime-name {
    grid-area: name;
    overflow: visible;
    font-size: 12px;
    line-height: 1.4;
    text-overflow: clip;
    white-space: normal;
    word-break: keep-all;
    overflow-wrap: anywhere;
  }
  .cart-option-runtime-quantity {
    grid-area: qty;
    justify-self: start;
    width: 108px;
    height: 32px;
  }
  .cart-option-runtime-quantity button { width: 34px; min-width: 34px; height: 30px; }
  .cart-option-runtime-quantity output { min-width: 38px; font-size: 13px; }
  .cart-option-runtime-memo-button {
    grid-area: memo;
    justify-self: end;
    width: 34px;
    height: 32px;
    border: 1px solid #d5d5d7;
    border-radius: 5px;
    background: #fff;
    font-size: 18px;
  }
  .cart-option-runtime-remove-button {
    grid-area: remove;
    width: 66px;
    height: 32px;
    padding: 0 5px;
    border-radius: 5px;
    font-size: 10px;
  }
  .cart-option-runtime-memo-editor {
    margin-top: 7px;
    padding: 8px;
    border-radius: 6px;
  }
  .cart-option-runtime-memo-editor input { height: 34px; font-size: 12px; }
  .cart-option-runtime-split > .cart-product-remove-button {
    justify-self: end;
    width: 76px !important;
    min-width: 76px;
    height: 32px;
    margin-top: 1px;
    border-radius: 5px;
    font-size: 10px;
  }
  .cart-option-button {
    width: 100%;
    max-width: 190px;
    height: 40px;
    margin: 10px 0 0 !important;
    border-radius: 6px;
    font-size: 12px;
  }
  .cart-line-total {
    grid-column: 2;
    grid-row: 2;
    margin-top: 2px;
    padding-top: 12px;
    border-top: 1px dashed #e0e0e0;
    text-align: right;
  }
  .cart-line-total strong { font-size: 18px; }
  .cart-guide {
    margin-top: 28px;
    padding: 15px 14px;
    border-radius: 10px;
    background: #fafafa;
    font-size: 11px;
    line-height: 1.65;
  }
  .cart-guide li { min-height: 0; padding-left: 10px; }

  .cart-summary { gap: 12px; margin-top: 22px; }
  .delivery-card,
  .summary-card { padding: 19px 18px; border-radius: 13px; }
  .delivery-card { border-width: 1px; }
  .delivery-card h3,
  .summary-card h3 { font-size: 18px; }
  .delivery-card h3 { padding-bottom: 12px; }
  .delivery-countdown { gap: 12px; padding-top: 12px; }
  .delivery-countdown strong { font-size: 20px; }
  .summary-count { margin-top: 18px; }
  .summary-rows { margin-top: 18px; padding: 18px 0; }
  .summary-total { padding-top: 18px; }
  .summary-total strong { font-size: 22px; }
  .cart-order-button,
  .continue-button { height: 50px; border-radius: 10px; }

  /* MyINNO dashboard: keep the identity strong but stop benefit cards from stacking vertically. */
  .mypage-content h1 {
    margin-bottom: 18px;
    padding-bottom: 14px;
    font-size: 28px;
  }
  .member-overview {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    border-radius: 14px;
  }
  .member-card {
    grid-column: 1 / -1 !important;
    min-height: 156px;
    padding: 24px 26px;
  }
  .member-card h2 { margin-top: 10px; font-size: 24px; }
  .benefit-card,
  .benefit-card:last-child {
    grid-column: auto !important;
    min-height: 108px;
    padding: 16px 8px;
    border-top: 1px solid #eee;
    border-left: 1px solid #eee;
    text-align: center;
    font-size: 11px;
  }
  .benefit-card:first-of-type { border-left: 0; }
  .benefit-card strong { margin-top: 8px; font-size: 19px; white-space: nowrap; }
  .order-steps {
    display: flex;
    margin: 20px 0 34px;
    padding: 16px 0;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }
  .order-steps::-webkit-scrollbar { display: none; }
  .order-step { flex: 0 0 25%; min-width: 84px; scroll-snap-align: start; }
  .order-step strong { margin-top: 5px; font-size: 22px; }
  .content-heading { margin-top: 30px; }


}

/* Match the mobile menu runtime and base panel breakpoint. */
@media (max-width: 900px) {
  /* Full mobile category menu */
  .mobile-menu-panel { background: #fff; }
  .mobile-menu-head {
    position: sticky;
    top: 0;
    z-index: 2;
    height: 64px;
    padding: 0 16px;
    box-shadow: 0 1px 0 rgb(255 255 255 / 8%);
  }
  .mobile-menu-head img { width: 116px; }
  .mobile-menu-close { width: 40px; height: 40px; }
  .mobile-menu-body {
    height: calc(100% - 64px);
    padding: 0 0 calc(76px + env(safe-area-inset-bottom));
    overflow: hidden;
  }
  .mobile-taxonomy-shell {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    height: 100%;
    min-height: 0;
  }
  .mobile-taxonomy-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 58px;
    padding: 0 16px;
    border-bottom: 1px solid #e7e7e7;
    background: #fff;
  }
  .mobile-taxonomy-top strong { font-size: 18px; font-weight: 600; }
  .mobile-taxonomy-top span { color: #8b8b8b; font-size: 11px; }
  .mobile-taxonomy-layout {
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr);
    min-height: 0;
    overflow: hidden;
  }
  .mobile-taxonomy-primary {
    overflow-y: auto;
    overscroll-behavior: contain;
    border-right: 1px solid #e6e6e6;
    background: #f4f4f5;
  }
  .mobile-taxonomy-primary button {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 52px;
    padding: 9px 12px;
    border: 0;
    border-bottom: 1px solid #e8e8e9;
    color: #656565;
    background: transparent;
    text-align: left;
    font-size: 12px;
    line-height: 1.3;
  }
  .mobile-taxonomy-primary button.active {
    color: var(--purple);
    background: #fff;
    font-weight: 600;
    box-shadow: inset 3px 0 0 var(--purple);
  }
  .mobile-taxonomy-detail {
    min-width: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 16px 14px 26px;
    background: #fff;
  }
  .mobile-taxonomy-detail-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 2px solid #222;
  }
  .mobile-taxonomy-detail-head strong { min-width: 0; font-size: 18px; line-height: 1.3; }
  .mobile-taxonomy-all {
    flex: 0 0 auto;
    height: 32px;
    padding: 0 10px;
    border: 1px solid var(--purple);
    border-radius: 7px;
    color: var(--purple);
    background: #fff;
    font-size: 11px;
  }
  .mobile-taxonomy-secondary { border-bottom: 1px solid #ececec; }
  .mobile-taxonomy-secondary > button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 47px;
    padding: 0 3px;
    border: 0;
    color: #252525;
    background: #fff;
    text-align: left;
    font-size: 13px;
    font-weight: 500;
  }
  .mobile-taxonomy-secondary > button span:last-child {
    color: #999;
    font-size: 18px;
    transition: transform .16s ease;
  }
  .mobile-taxonomy-secondary.open > button span:last-child { transform: rotate(90deg); }
  .mobile-taxonomy-leaves {
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    padding: 0 0 12px;
  }
  .mobile-taxonomy-secondary.open .mobile-taxonomy-leaves { display: grid; }
  .mobile-taxonomy-leaves button {
    min-height: 38px;
    padding: 7px 8px;
    border: 1px solid #e2e2e2;
    border-radius: 7px;
    color: #666;
    background: #fafafa;
    text-align: left;
    font-size: 11px;
    line-height: 1.3;
  }
  .mobile-taxonomy-empty {
    padding: 30px 10px;
    color: #929292;
    text-align: center;
    font-size: 12px;
  }
  .mobile-taxonomy-member {
    padding: 12px 14px 14px;
    border-top: 1px solid #e5e5e5;
    background: #fff;
  }
  .mobile-taxonomy-member > strong {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
  }
  .mobile-taxonomy-member-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }
  .mobile-taxonomy-member-links button,
  .mobile-taxonomy-member-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 6px;
    border: 1px solid #e0e0e0;
    border-radius: 7px;
    color: #555;
    background: #fff;
    text-align: center;
    font-size: 10px;
    line-height: 1.25;
  }
}

@media (max-width: 390px) {
  .cart-product { grid-template-columns: 66px minmax(0, 1fr); gap: 10px; }
  .cart-product > img { width: 66px; height: 66px; }
  .cart-product-title { grid-template-columns: 1fr; }
  .cart-product-title b { justify-self: start; }
  .cart-option-runtime-row { grid-template-columns: minmax(0, 1fr) auto auto; }
  .mobile-taxonomy-layout { grid-template-columns: 96px minmax(0, 1fr); }
  .mobile-taxonomy-primary button { padding-right: 8px; padding-left: 10px; font-size: 11px; }
}
