#market-favorites {
  position: fixed;
  inset: 0;
  z-index: 97;
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  background: #000000;
  opacity: 0;
  pointer-events: none;
  transform: translateX(16px);
  transition: opacity 180ms ease, transform 180ms ease;
  overflow: hidden;
}

#market-favorites.is-open {
  display: block;
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.market-favorites__inner {
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding:
    calc(22px + env(safe-area-inset-top))
    var(--page-margin)
    calc(122px + env(safe-area-inset-bottom));
  -webkit-overflow-scrolling: touch;
}

.market-favorites__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.market-favorites__eyebrow,
.market-favorites__hero-kicker,
.market-pin-modal__eyebrow {
  color: #7f828a;
  font-size: 12px;
  font-weight: 650;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.market-favorites__title {
  margin-top: 8px;
  color: #ffffff;
  font-size: clamp(34px, 7vw, 54px);
  font-weight: 560;
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.market-favorites__close,
.market-pin-modal__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: #15161a;
  color: #f5f5f6;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}

.market-favorites__close:hover,
.market-pin-modal__close:hover {
  background: #f5f5f6;
  color: #101010;
}

.market-favorites__close svg,
.market-pin-modal__close svg {
  width: 18px;
  height: 18px;
}

.market-favorites__notice,
.market-pin-modal__notice {
  display: none;
  margin-top: 18px;
  border-radius: 18px;
  background: #111f16;
  color: #8ee3ad;
  padding: 13px 15px;
  font-size: 13px;
  line-height: 1.35;
}

.market-favorites__notice.is-visible,
.market-pin-modal__notice.is-visible {
  display: block;
}

.market-favorites__content {
  margin-top: 24px;
}

.market-favorites__hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 18px;
  border-radius: 32px;
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.12), transparent 34%),
    #101113;
  padding: 24px;
  color: #ffffff;
}

.market-favorites__hero h2 {
  margin-top: 10px;
  color: #ffffff;
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 580;
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.market-favorites__hero p {
  max-width: 520px;
  margin-top: 12px;
  color: #90939b;
  font-size: 14px;
  line-height: 1.48;
}

.market-favorites__hero-count {
  display: grid;
  min-width: 104px;
  border-radius: 26px;
  background: #f5f5f6;
  color: #101010;
  padding: 18px;
  text-align: center;
}

.market-favorites__hero-count strong {
  font-size: 32px;
  font-weight: 650;
  line-height: 1;
  letter-spacing: -0.06em;
}

.market-favorites__hero-count span {
  margin-top: 6px;
  color: #62646b;
  font-size: 12px;
  font-weight: 650;
  line-height: 1;
}

.market-favorites__pin-list {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.market-favorites__pin-card {
  border-radius: 30px;
  background: #101113;
  padding: 14px;
}

.market-favorites__pin-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.market-favorites__pin-preview {
  display: grid;
  grid-template-columns: repeat(2, 34px);
  grid-template-rows: repeat(2, 34px);
  gap: 3px;
  overflow: hidden;
  width: 74px;
  height: 74px;
  border-radius: 22px;
  background: #191a1e;
}

.market-favorites__pin-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.market-favorites__pin-preview span {
  grid-column: 1 / -1;
  grid-row: 1 / -1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #f5f5f6;
  font-size: 28px;
}

.market-favorites__pin-copy {
  min-width: 0;
}

.market-favorites__pin-copy h3 {
  color: #ffffff;
  font-size: 22px;
  font-weight: 620;
  line-height: 1;
  letter-spacing: -0.04em;
}

.market-favorites__pin-copy p {
  margin-top: 8px;
  color: #858891;
  font-size: 13px;
  line-height: 1;
}

.market-favorites__products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.market-favorites__product {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 12px;
  border-radius: 24px;
  background: #15161a;
  padding: 10px;
}

.market-favorites__product-media {
  overflow: hidden;
  width: 78px;
  aspect-ratio: 1;
  border: 0;
  border-radius: 18px;
  background: #0c0d0e;
  padding: 0;
  cursor: pointer;
}

.market-favorites__product-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.market-favorites__product-body {
  min-width: 0;
}

.market-favorites__product-store {
  color: #858891;
  font-size: 11px;
  line-height: 1;
}

.market-favorites__product-title {
  overflow: hidden;
  margin-top: 7px;
  color: #ffffff;
  font-size: 16px;
  font-weight: 620;
  line-height: 1.1;
  letter-spacing: -0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-favorites__product-price {
  margin-top: 8px;
  color: #f5f5f6;
  font-size: 14px;
  font-weight: 650;
  line-height: 1;
}

.market-favorites__product-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}

.market-favorites__product-actions button {
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  line-height: 1;
  cursor: pointer;
}

.market-favorites__product-actions button:first-child {
  background: #f5f5f6;
  color: #101010;
}

.market-favorites__product-actions button:last-child {
  background: #202126;
  color: #d8d9de;
}

.market-favorites__empty-pin {
  margin-top: 14px;
  border-radius: 22px;
  background: #15161a;
  color: #858891;
  padding: 18px;
  font-size: 14px;
  line-height: 1.45;
}

.market-favorites__tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 0 auto 24px;
}

.market-favorites__tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  padding: 0 20px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
}

.market-favorites__tab--muted {
  background: #15161a;
  color: #8f9299;
}

.market-favorites__tab--active {
  background: #25262b;
  color: #f5f5f6;
}

.market-favorites__tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #f5f5f6;
  color: #111111;
  padding: 0 6px;
  font-size: 11px;
  line-height: 1;
}

.market-favorites__pin-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: 100%;
  margin: 0 auto;
  gap: 18px;
}

.market-favorites__pin-card {
  position: relative;
  overflow: hidden;
  border-radius: 46px;
  background: #101113;
  color: #f5f5f6;
  padding: 22px;
}

.market-favorites__card-tools {
  position: absolute;
  left: 28px;
  top: 28px;
  z-index: 3;
  display: flex;
  gap: 10px;
}

.market-favorites__tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #f5f5f6;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
}

.market-favorites__tool svg {
  width: 21px;
  height: 21px;
}

.market-favorites__pin-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  width: 100%;
  min-height: 0;
  aspect-ratio: 4 / 5;
  border: 0;
  border-radius: 36px;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.market-favorites__pin-visual:disabled {
  cursor: default;
}

.market-favorites__pin-visual > img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 34px;
  object-fit: cover;
}

.market-favorites__pin-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 34px;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.08), transparent 28%),
    #191a1e;
  color: rgba(255, 255, 255, 0.22);
  font-size: 84px;
  line-height: 1;
}

.market-favorites__pin-visual .market-favorites__pin-preview {
  position: absolute;
  right: 26px;
  top: 26px;
  z-index: 2;
  grid-template-columns: repeat(3, 28px);
  grid-template-rows: 28px;
  width: auto;
  height: auto;
  border-radius: 999px;
  background: rgba(10, 10, 11, 0.62);
  padding: 6px;
  backdrop-filter: blur(18px);
}

.market-favorites__pin-visual .market-favorites__pin-preview img {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  object-fit: cover;
}

.market-favorites__pin-visual .market-favorites__pin-preview span {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.52);
  font-size: 18px;
}

.market-favorites__pin-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 520px;
  margin: 22px auto 0;
  text-align: center;
}

.market-favorites__pin-copy h3 {
  color: #f5f5f6;
  overflow: hidden;
  width: 100%;
  font-size: clamp(18px, 1.8vw, 28px);
  font-weight: 760;
  line-height: 0.95;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-favorites__pin-copy p {
  max-width: 420px;
  margin-top: 12px;
  color: #8f9299;
  font-size: 14px;
  line-height: 1.45;
}

@media (min-width: 1600px) {
  .market-favorites__pin-list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.market-favorites__pin-cta {
  min-height: 46px;
  margin-top: 22px;
  border: 0;
  border-radius: 999px;
  background: #f5f5f6;
  color: #101010;
  padding: 0 24px;
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  line-height: 1;
  cursor: pointer;
}

.market-favorites__pin-cta:disabled {
  background: #1d1e22;
  color: #666a73;
  cursor: default;
}

.market-favorites__products {
  display: flex;
  gap: 10px;
  margin-top: 24px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.market-favorites__products::-webkit-scrollbar {
  display: none;
}

.market-favorites__product {
  grid-template-columns: 64px minmax(132px, 1fr);
  flex: 0 0 min(86%, 360px);
  align-items: center;
  border-radius: 28px;
  background: #17181b;
  padding: 10px;
  color: #f5f5f6;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.market-favorites__product-media {
  width: 64px;
  border-radius: 20px;
  background: #202126;
}

.market-favorites__product-store {
  color: #858891;
}

.market-favorites__product-title {
  color: #f5f5f6;
}

.market-favorites__product-price {
  color: #f5f5f6;
}

.market-favorites__product-actions {
  grid-template-columns: minmax(0, 1fr) auto;
}

.market-favorites__product-actions button:first-child {
  background: #111111;
  color: #ffffff;
}

.market-favorites__product-actions button:last-child {
  min-width: 82px;
  background: #25262b;
  color: #cfd1d6;
}

.market-favorites__pin-detail {
  width: 100%;
}

.market-favorites__pin-detail-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: min(100%, 1120px);
  margin: 0 auto 24px;
}

.market-favorites__pin-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  background: #15161a;
  color: #cfd1d6;
  padding: 0 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  line-height: 1;
}

.market-favorites__pin-back svg {
  width: 16px;
  height: 16px;
  color: #858891;
}

.market-favorites__pin-detail-count {
  color: #858891;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
}

.market-favorites__pin-detail-heading {
  width: min(100%, 1120px);
  margin: 0 auto 24px;
}

.market-favorites__pin-detail-heading h2 {
  color: #f5f5f6;
  font-size: clamp(34px, 7vw, 64px);
  font-weight: 620;
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.market-favorites__pin-detail-heading p {
  margin-top: 12px;
  color: #858891;
  font-size: 14px;
  line-height: 1.45;
}

.market-favorites__pin-grid {
  display: flex;
  align-items: flex-start;
  width: min(100%, 1120px);
  margin: 0 auto;
}

.market-favorites__pin-grid-column {
  flex: 1 1 0;
  min-width: 0;
}

.market-favorites__pin-grid-item {
  padding: 0 8.4% 16.8%;
}

.market-favorites__pin-grid-link {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.market-favorites__pin-grid-link span {
  position: relative;
  display: block;
  overflow: hidden;
  width: 100%;
  background: #111111;
}

.market-favorites__pin-grid-link img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.market-favorites__pin-detail-empty {
  width: min(100%, 620px);
  margin: 0 auto;
  border-radius: 28px;
  background: #101113;
  color: #8f9299;
  padding: 24px;
  text-align: center;
  font-size: 14px;
  line-height: 1.45;
}

#market-pin-modal {
  position: fixed;
  inset: 0;
  z-index: 180;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
}

#market-pin-modal.is-open {
  display: flex;
  pointer-events: auto;
}

.market-pin-modal__scrim {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.74);
  opacity: 0;
  transition: opacity 180ms ease;
}

#market-pin-modal.is-open .market-pin-modal__scrim {
  opacity: 1;
}

.market-pin-modal__sheet {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  width: min(100% - 24px, 500px);
  max-height: min(82vh, 720px);
  margin: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 34px;
  background: #101113;
  padding: 18px;
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.62);
  transform: translateY(18px);
  transition: transform 180ms ease;
  overflow-y: auto;
}

#market-pin-modal.is-open .market-pin-modal__sheet {
  transform: translateY(0);
}

.market-pin-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.market-pin-modal__title {
  margin-top: 8px;
  color: #ffffff;
  font-size: 26px;
  font-weight: 620;
  line-height: 1;
  letter-spacing: -0.05em;
}

.market-pin-modal__product-card {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border-radius: 24px;
  background: #15161a;
  padding: 10px;
}

.market-pin-modal__product-card img {
  width: 74px;
  aspect-ratio: 1;
  border-radius: 18px;
  object-fit: cover;
}

.market-pin-modal__product-store {
  color: #858891;
  font-size: 11px;
  line-height: 1;
}

.market-pin-modal__product-title {
  overflow: hidden;
  margin-top: 7px;
  color: #ffffff;
  font-size: 17px;
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: -0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-pin-modal__product-price {
  margin-top: 8px;
  color: #f5f5f6;
  font-size: 14px;
  font-weight: 650;
  line-height: 1;
}

.market-pin-modal__create {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.market-pin-modal__create input {
  min-width: 0;
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  background: #1a1b1f;
  color: #f5f5f6;
  padding: 0 17px;
  font: inherit;
  font-size: 14px;
  outline: 0;
}

.market-pin-modal__create button {
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  background: #f5f5f6;
  color: #101010;
  padding: 0 18px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.market-pin-modal__list {
  display: grid;
  gap: 8px;
}

.market-pin-modal__pin-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 0;
  border-radius: 22px;
  background: #15161a;
  color: #ffffff;
  padding: 10px;
  text-align: left;
  cursor: pointer;
}

.market-pin-modal__pin-row:disabled {
  cursor: default;
  opacity: 0.76;
}

.market-pin-modal__pin-thumb {
  overflow: hidden;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: #22242a;
}

.market-pin-modal__pin-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.market-pin-modal__pin-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.market-pin-modal__pin-copy strong {
  overflow: hidden;
  color: #ffffff;
  font-size: 15px;
  font-weight: 650;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-pin-modal__pin-copy span {
  color: #858891;
  font-size: 12px;
  line-height: 1;
}

.market-pin-modal__pin-action {
  border-radius: 999px;
  background: #22242a;
  color: #d9dbe0;
  padding: 9px 11px;
  font-size: 12px;
  font-weight: 650;
  line-height: 1;
}

.market-pin-modal__pin-row.is-saved .market-pin-modal__pin-action {
  background: #f5f5f6;
  color: #101010;
}
