/* Final storefront pass: equal category tiles, deliberate desktop scale, and a mobile-first rail. */
html,
body {
  overflow-x: hidden !important;
}

body.ld-shop .ld-shop-shell,
body.ld-shop .tokyo-footer-wrap {
  width: min(1160px, 82vw) !important;
}

body.ld-shop .ld-category-bar {
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 8px !important;
  padding: 12px !important;
  overflow: hidden !important;
}

body.ld-shop .ld-category-bar .tokyo-category-link,
body.ld-shop .ld-category-bar .tokyo-category-link.is-active {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 72px !important;
  height: 72px !important;
  padding: 10px 12px !important;
  display: grid !important;
  grid-template-columns: 40px minmax(0, 1fr) auto !important;
  grid-template-rows: 1fr !important;
  align-items: center !important;
  gap: 10px !important;
  overflow: hidden !important;
  border: 1px solid #dfe7f1 !important;
  border-radius: 12px !important;
  color: #526176 !important;
  background: #fbfdff !important;
  box-shadow: none !important;
  transform: none !important;
}

body.ld-shop .ld-category-bar .tokyo-category-link:hover {
  border-color: #b9d2f3 !important;
  background: #f5f9ff !important;
}

body.ld-shop .ld-category-bar .tokyo-category-link.is-active {
  color: #fff !important;
  border-color: #1769e8 !important;
  background: linear-gradient(135deg, #1769e8, #347df2) !important;
  box-shadow: 0 7px 16px rgba(23, 105, 232, .16) !important;
}

body.ld-shop .ld-category-bar .tokyo-category-image,
body.ld-shop .ld-category-bar .tokyo-category-link.is-active .tokyo-category-image {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  padding: 4px !important;
  display: block !important;
  object-fit: contain !important;
  border: 1px solid #d8e3ef !important;
  border-radius: 10px !important;
  background: #fff !important;
}

body.ld-shop .ld-category-bar .tokyo-category-name,
body.ld-shop .ld-category-bar .tokyo-category-count {
  min-width: 0 !important;
  align-self: center !important;
}

body.ld-shop .ld-category-bar .tokyo-category-name {
  overflow: hidden !important;
  color: inherit !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.ld-shop .ld-category-bar .tokyo-category-count,
body.ld-shop .ld-category-bar .tokyo-category-link.is-active .tokyo-category-count {
  min-width: 24px !important;
  width: 24px !important;
  height: 24px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #6e7d91 !important;
  border-radius: 999px !important;
  background: #eef2f6 !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  line-height: 24px !important;
}

body.ld-shop .ld-category-bar .tokyo-category-link.is-active .tokyo-category-count {
  color: #1769e8 !important;
  background: #fff !important;
}

body.ld-shop .ld-product-grid {
  grid-template-columns: repeat(4, 250px) !important;
  justify-content: start !important;
  gap: 16px !important;
  padding: 18px !important;
}

body.ld-shop .ld-product-card {
  width: 250px !important;
  height: 250px !important;
}

body.ld-shop .ld-product-image img,
body.ld-shop .ld-product-image.is-uploaded img,
body.ld-shop .ld-product-image.is-gemini-wordmark img,
body.ld-shop .ld-product-image.is-chatgpt-wordmark img,
body.ld-shop .ld-product-image.is-claude-wordmark img,
body.ld-shop .ld-product-image.is-codex-wordmark img,
body.ld-shop .ld-product-image.is-relay-wordmark img,
body.ld-shop .ld-product-image.is-relay-symbol img {
  max-width: 86% !important;
  max-height: 148px !important;
}

@media (min-width: 761px) and (max-width: 1149px) {
  body.ld-shop .ld-shop-shell,
  body.ld-shop .tokyo-footer-wrap {
    width: calc(100% - 32px) !important;
  }

  body.ld-shop .ld-product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  body.ld-shop .ld-product-card {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 !important;
  }
}

@media (max-width: 760px) {
  body.ld-shop .ld-shop-shell,
  body.ld-shop .tokyo-footer-wrap {
    width: 100% !important;
  }

  body.ld-shop .ld-category-bar {
    display: flex !important;
    gap: 6px !important;
    padding: 8px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-width: none !important;
  }

  body.ld-shop .ld-category-bar::-webkit-scrollbar {
    display: none !important;
  }

  body.ld-shop .ld-category-bar .tokyo-category-link,
  body.ld-shop .ld-category-bar .tokyo-category-link.is-active {
    flex: 0 0 calc((100vw - 52px) / 4) !important;
    width: calc((100vw - 52px) / 4) !important;
    min-width: calc((100vw - 52px) / 4) !important;
    min-height: 78px !important;
    height: 78px !important;
    padding: 5px 4px !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 34px 16px 16px !important;
    justify-items: center !important;
    align-content: center !important;
    gap: 0 !important;
    border-radius: 10px !important;
    text-align: center !important;
  }

  body.ld-shop .ld-category-bar .tokyo-category-image,
  body.ld-shop .ld-category-bar .tokyo-category-link.is-active .tokyo-category-image {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    padding: 3px !important;
    border-radius: 8px !important;
  }

  body.ld-shop .ld-category-bar .tokyo-category-name {
    width: 100% !important;
    font-size: 10px !important;
    line-height: 17px !important;
  }

  body.ld-shop .ld-category-bar .tokyo-category-count,
  body.ld-shop .ld-category-bar .tokyo-category-link.is-active .tokyo-category-count {
    width: 18px !important;
    min-width: 18px !important;
    height: 16px !important;
    font-size: 9px !important;
    line-height: 16px !important;
  }

  body.ld-shop .ld-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    padding: 10px !important;
  }

  body.ld-shop .ld-product-card {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 !important;
  }

  body.ld-shop .ld-product-image img,
  body.ld-shop .ld-product-image.is-uploaded img,
  body.ld-shop .ld-product-image.is-gemini-wordmark img,
  body.ld-shop .ld-product-image.is-chatgpt-wordmark img,
  body.ld-shop .ld-product-image.is-claude-wordmark img,
  body.ld-shop .ld-product-image.is-codex-wordmark img,
  body.ld-shop .ld-product-image.is-relay-wordmark img,
  body.ld-shop .ld-product-image.is-relay-symbol img {
    max-width: 90% !important;
    max-height: 92px !important;
  }
}

@media (max-width: 350px) {
  body.ld-shop .ld-category-bar .tokyo-category-link,
  body.ld-shop .ld-category-bar .tokyo-category-link.is-active {
    flex-basis: 78px !important;
    width: 78px !important;
    min-width: 78px !important;
  }
}

body.ld-shop .ld-store-header-actions > .ld-store-header-button,
body.ld-shop .ld-store-header-actions > .ld-member-entry {
  min-width: 0 !important;
  max-width: 100% !important;
  color: #111827 !important;
  font-size: 15px !important;
  font-weight: 850 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

body.ld-shop .ld-store-header-actions > .ld-store-header-button svg,
body.ld-shop .ld-store-header-actions > .ld-member-entry svg {
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  color: currentColor !important;
  stroke-width: 2.2 !important;
}

body.ld-shop .ld-category-bar .tokyo-category-link,
body.ld-shop .ld-category-bar .tokyo-category-link.is-active {
  box-sizing: border-box !important;
  min-width: 0 !important;
  height: 84px !important;
  min-height: 84px !important;
  grid-template-columns: 48px minmax(0, 1fr) 30px !important;
  gap: 10px !important;
  padding: 10px 12px !important;
}

body.ld-shop .ld-category-bar .tokyo-category-image,
body.ld-shop .ld-category-bar .tokyo-category-link.is-active .tokyo-category-image {
  width: 48px !important;
  height: 48px !important;
  min-width: 48px !important;
  min-height: 48px !important;
  padding: 4px !important;
  object-fit: contain !important;
}

body.ld-shop .ld-category-bar .tokyo-category-name {
  min-width: 0 !important;
  overflow: hidden !important;
  color: #111827 !important;
  font-size: 15px !important;
  font-weight: 850 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.ld-shop .ld-category-bar .tokyo-category-link.is-active .tokyo-category-name {
  color: #fff !important;
}

body.ld-shop .ld-category-bar .tokyo-category-count,
body.ld-shop .ld-category-bar .tokyo-category-link.is-active .tokyo-category-count {
  width: 30px !important;
  min-width: 30px !important;
  height: 26px !important;
  font-size: 12px !important;
  line-height: 26px !important;
}

@media (max-width: 760px) {
  body.ld-shop .ld-store-header-actions {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  body.ld-shop .ld-store-header-actions > .ld-store-header-button,
  body.ld-shop .ld-store-header-actions > .ld-member-entry {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 46px !important;
    height: 46px !important;
    padding-inline: 6px !important;
    gap: 6px !important;
    font-size: 13px !important;
  }

  body.ld-shop .ld-store-header-actions > .ld-store-header-button svg,
  body.ld-shop .ld-store-header-actions > .ld-member-entry svg {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
  }

  body.ld-shop .ld-category-bar {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    grid-auto-rows: 88px !important;
    gap: 7px !important;
    padding: 9px !important;
    overflow: visible !important;
    box-sizing: border-box !important;
  }

  body.ld-shop .ld-category-bar .tokyo-category-link,
  body.ld-shop .ld-category-bar .tokyo-category-link.is-active {
    width: 100% !important;
    min-width: 0 !important;
    height: 88px !important;
    min-height: 88px !important;
    flex: none !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 46px 19px 18px !important;
    padding: 3px 2px !important;
    gap: 1px !important;
    align-content: center !important;
    justify-items: center !important;
    text-align: center !important;
  }

  body.ld-shop .ld-category-bar .tokyo-category-image,
  body.ld-shop .ld-category-bar .tokyo-category-link.is-active .tokyo-category-image {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    padding: 3px !important;
  }

  body.ld-shop .ld-category-bar .tokyo-category-name {
    width: 100% !important;
    min-width: 0 !important;
    color: #111827 !important;
    font-size: 12px !important;
    font-weight: 850 !important;
    line-height: 19px !important;
    text-align: center !important;
  }

  body.ld-shop .ld-category-bar .tokyo-category-link.is-active .tokyo-category-name {
    color: #fff !important;
  }

  body.ld-shop .ld-category-bar .tokyo-category-count,
  body.ld-shop .ld-category-bar .tokyo-category-link.is-active .tokyo-category-count {
    width: auto !important;
    min-width: 22px !important;
    height: 18px !important;
    padding: 0 5px !important;
    font-size: 10px !important;
    line-height: 18px !important;
  }
}

@media (max-width: 350px) {
  body.ld-shop .ld-category-bar .tokyo-category-link,
  body.ld-shop .ld-category-bar .tokyo-category-link.is-active {
    height: 82px !important;
    min-height: 82px !important;
    grid-template-rows: 42px 18px 17px !important;
  }

  body.ld-shop .ld-category-bar {
    grid-auto-rows: 82px !important;
  }

  body.ld-shop .ld-category-bar .tokyo-category-image,
  body.ld-shop .ld-category-bar .tokyo-category-link.is-active .tokyo-category-image {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
  }
}

body.ld-shop .ld-store-header-actions {
  min-width: 0 !important;
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 9px !important;
}

body.ld-shop .ld-store-header-actions > .ld-store-header-button,
body.ld-shop .ld-store-header-actions > .ld-member-entry {
  min-width: 0 !important;
  min-height: 44px !important;
  padding: 0 14px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  overflow: hidden !important;
  color: #111827 !important;
  border-color: #cfdbea !important;
  border-radius: 11px !important;
  background: #fff !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.ld-shop .ld-store-header-actions > .ld-store-header-button:hover,
body.ld-shop .ld-store-header-actions > .ld-member-entry:hover {
  color: #1769e8 !important;
  border-color: #9fc1ef !important;
  background: #f7faff !important;
}

body.ld-shop .ld-store-header-actions > .ld-store-header-button svg,
body.ld-shop .ld-store-header-actions > .ld-member-entry svg {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  color: currentColor !important;
  stroke-width: 2.1 !important;
}

body.ld-shop .ld-category-bar .tokyo-category-image,
body.ld-shop .ld-category-bar .tokyo-category-link.is-active .tokyo-category-image {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  padding: 4px !important;
}

body.ld-shop .ld-category-bar .tokyo-category-name {
  color: #26364c !important;
  font-size: 14px !important;
}

body.ld-shop .ld-category-bar .tokyo-category-link.is-active .tokyo-category-name {
  color: #fff !important;
}

@media (max-width: 760px) {
  body.ld-shop .ld-store-profile {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 12px !important;
    grid-template-columns: 56px minmax(0, 1fr) !important;
    grid-template-areas: "logo title" "actions actions" !important;
    gap: 10px 11px !important;
    overflow: hidden !important;
  }

  body.ld-shop .ld-store-avatar {
    width: 54px !important;
    height: 54px !important;
    min-width: 54px !important;
    border-radius: 12px !important;
  }

  body.ld-shop .ld-store-title h1 {
    min-width: 0 !important;
    overflow: hidden !important;
    color: #111827 !important;
    font-size: 18px !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body.ld-shop .ld-store-header-actions {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  body.ld-shop .ld-store-header-actions > .ld-store-header-button,
  body.ld-shop .ld-store-header-actions > .ld-member-entry {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 44px !important;
    padding: 0 8px !important;
    gap: 7px !important;
    border-radius: 10px !important;
    color: #111827 !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    grid-column: auto !important;
  }

  body.ld-shop .ld-store-header-actions > .ld-store-header-button svg,
  body.ld-shop .ld-store-header-actions > .ld-member-entry svg {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
  }

  body.ld-shop .ld-category-bar .tokyo-category-link,
  body.ld-shop .ld-category-bar .tokyo-category-link.is-active {
    flex: 0 0 calc((100vw - 52px) / 4) !important;
    width: calc((100vw - 52px) / 4) !important;
    min-width: calc((100vw - 52px) / 4) !important;
    min-height: 84px !important;
    height: 84px !important;
    grid-template-rows: 40px 18px 17px !important;
  }

  body.ld-shop .ld-category-bar .tokyo-category-image,
  body.ld-shop .ld-category-bar .tokyo-category-link.is-active .tokyo-category-image {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
  }

  body.ld-shop .ld-category-bar .tokyo-category-name {
    color: #1f2d42 !important;
    font-size: 11px !important;
    font-weight: 850 !important;
  }

  body.ld-shop .ld-category-bar .tokyo-category-link.is-active .tokyo-category-name {
    color: #fff !important;
  }

  body.ld-shop .ld-category-bar {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    grid-auto-rows: 78px !important;
    gap: 6px !important;
    padding: 8px !important;
    overflow: hidden !important;
  }

  body.ld-shop .ld-category-bar .tokyo-category-link,
  body.ld-shop .ld-category-bar .tokyo-category-link.is-active {
    width: 100% !important;
    min-width: 0 !important;
    height: 78px !important;
    min-height: 78px !important;
    flex: none !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 38px 17px 15px !important;
    padding: 1px 3px !important;
    align-content: center !important;
    justify-items: center !important;
    gap: 0 !important;
    box-sizing: border-box !important;
  }

  body.ld-shop .ld-category-bar .tokyo-category-image,
  body.ld-shop .ld-category-bar .tokyo-category-link.is-active .tokyo-category-image {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    padding: 3px !important;
  }

  body.ld-shop .ld-category-bar .tokyo-category-name {
    width: 100% !important;
    min-width: 0 !important;
    color: #1f2d42 !important;
    font-size: 11px !important;
    line-height: 18px !important;
    text-align: center !important;
  }

  body.ld-shop .ld-category-bar .tokyo-category-link.is-active .tokyo-category-name {
    color: #fff !important;
  }

  body.ld-shop .ld-category-bar .tokyo-category-count,
  body.ld-shop .ld-category-bar .tokyo-category-link.is-active .tokyo-category-count {
    width: auto !important;
    min-width: 18px !important;
    height: 16px !important;
    padding: 0 4px !important;
    font-size: 9px !important;
    line-height: 16px !important;
  }
}

@media (max-width: 350px) {
  body.ld-shop .ld-store-header-actions > .ld-store-header-button,
  body.ld-shop .ld-store-header-actions > .ld-member-entry {
    padding-inline: 5px !important;
    gap: 5px !important;
    font-size: 11px !important;
  }
}

@media (max-width: 760px) {
  body.ld-shop .ld-store-header-actions > .ld-store-header-button,
  body.ld-shop .ld-store-header-actions > .ld-member-entry {
    color: #111827 !important;
    font-size: 13px !important;
    font-weight: 850 !important;
  }

  body.ld-shop .ld-store-header-actions > .ld-store-header-button svg,
  body.ld-shop .ld-store-header-actions > .ld-member-entry svg {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
  }

  body.ld-shop .ld-category-bar {
    grid-auto-rows: 88px !important;
    gap: 7px !important;
    padding: 9px !important;
  }

  body.ld-shop .ld-category-bar .tokyo-category-link,
  body.ld-shop .ld-category-bar .tokyo-category-link.is-active {
    box-sizing: border-box !important;
    height: 88px !important;
    min-height: 88px !important;
    grid-template-rows: 44px 20px 18px !important;
    align-content: start !important;
    padding: 0 2px !important;
    gap: 0 !important;
    overflow: hidden !important;
  }

  body.ld-shop .ld-category-bar .tokyo-category-image,
  body.ld-shop .ld-category-bar .tokyo-category-link.is-active .tokyo-category-image {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    padding: 3px !important;
  }

  body.ld-shop .ld-category-bar .tokyo-category-name {
    color: #111827 !important;
    font-size: 12px !important;
    font-weight: 900 !important;
    line-height: 20px !important;
  }

  body.ld-shop .ld-category-bar .tokyo-category-link.is-active .tokyo-category-name {
    color: #fff !important;
  }

  body.ld-shop .ld-category-bar .tokyo-category-count,
  body.ld-shop .ld-category-bar .tokyo-category-link.is-active .tokyo-category-count {
    min-width: 22px !important;
    height: 18px !important;
    padding: 0 5px !important;
    font-size: 10px !important;
    line-height: 18px !important;
  }
}

@media (max-width: 350px) {
  body.ld-shop .ld-category-bar {
    grid-auto-rows: 82px !important;
  }

  body.ld-shop .ld-category-bar .tokyo-category-link,
  body.ld-shop .ld-category-bar .tokyo-category-link.is-active {
    box-sizing: border-box !important;
    height: 82px !important;
    min-height: 82px !important;
    grid-template-rows: 40px 18px 17px !important;
    align-content: start !important;
    padding: 0 2px !important;
    gap: 0 !important;
    overflow: hidden !important;
  }

  body.ld-shop .ld-category-bar .tokyo-category-image,
  body.ld-shop .ld-category-bar .tokyo-category-link.is-active .tokyo-category-image {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
  }

  body.ld-shop .ld-category-bar .tokyo-category-name {
    font-size: 11px !important;
    line-height: 18px !important;
  }
}
