html.lingling-user-theme body.mode-user .marketplace-surface[hidden],
html.lingling-user-theme body.mode-user .creator-layout[hidden],
.marketplace-detail-layer[hidden],
.marketplace-kind-tabs[hidden],
.marketplace-category-filter[hidden],
.marketplace-contact-copy[hidden] {
  display: none;
}

html.lingling-user-theme body.mode-user .marketplace-surface {
  grid-row: 3;
  min-width: 0;
  overflow-y: auto;
  padding: 26px max(24px, calc((100vw - 1580px) / 2)) 48px;
  background: var(--lingling-soft);
}

.marketplace-heading {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.marketplace-heading-copy {
  display: flex;
  gap: 8px 12px;
  flex-wrap: wrap;
  align-items: baseline;
}

.marketplace-heading h1 {
  margin: 0;
  color: var(--lingling-ink);
  font-size: 26px;
  line-height: 1.25;
  letter-spacing: 0;
}

.marketplace-heading p,
.marketplace-empty p,
.marketplace-detail-content p,
.marketplace-contact-copy p {
  margin: 0;
  color: var(--lingling-muted);
  font-size: 13px;
  line-height: 1.7;
}

.marketplace-owned-entry {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--lingling-line-strong);
  border-radius: 6px;
  color: var(--lingling-ink);
  background: #ffffff;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
}

.marketplace-owned-entry:hover {
  border-color: var(--lingling-ink);
}

.marketplace-controls {
  display: flex;
  gap: 24px;
  align-items: flex-end;
  justify-content: space-between;
  margin: 0 0 8px;
}

.marketplace-kind-tabs {
  display: flex;
  width: max-content;
  max-width: 100%;
  gap: 28px;
  overflow-x: auto;
  border-bottom: 1px solid var(--lingling-line);
  scrollbar-width: none;
}

.marketplace-kind-tabs::-webkit-scrollbar {
  display: none;
}

.marketplace-kind-tabs button {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 1px;
  border: 0;
  color: var(--lingling-muted);
  background: transparent;
  cursor: pointer;
  font: inherit;
  align-items: center;
  transition: color 160ms ease;
}

.marketplace-kind-tabs button strong {
  color: inherit;
  font-size: 14px;
  font-weight: 700;
}

.marketplace-kind-tabs button:hover {
  color: var(--lingling-ink);
}

.marketplace-kind-tabs button::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: var(--lingling-red);
  content: "";
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 180ms ease;
}

.marketplace-kind-tabs button.is-active {
  color: var(--lingling-red-deep);
}

.marketplace-kind-tabs button.is-active::after {
  transform: scaleX(1);
}

.marketplace-kind-tabs button:focus-visible {
  border-radius: 2px;
  outline: 2px solid var(--lingling-red);
  outline-offset: 3px;
}

.marketplace-tools {
  display: flex;
  min-width: 0;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
}

.marketplace-category-filter {
  display: block;
  color: var(--lingling-muted);
  font-size: 12px;
}

.marketplace-category-filter select {
  min-width: 128px;
  min-height: 36px;
  padding: 0 30px 0 8px;
  border: 0;
  border-bottom: 1px solid var(--lingling-line-strong);
  border-radius: 0;
  color: var(--lingling-ink);
  background: transparent;
  font: inherit;
}

.marketplace-category-filter select:focus {
  border-color: var(--lingling-red);
  outline: 2px solid rgba(238, 77, 45, 0.2);
  outline-offset: 2px;
}

.marketplace-workspace,
.marketplace-results {
  min-width: 0;
}

.marketplace-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding-top: 2px;
}

.marketplace-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #c8d2cd;
  border-radius: 7px;
  background: #ffffff;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.marketplace-card:hover,
.marketplace-card:focus-within {
  border-color: #aebbb5;
  box-shadow: 0 12px 28px rgba(23, 35, 31, 0.08);
  transform: translateY(-2px);
}

.marketplace-card-select {
  display: grid;
  width: 100%;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.marketplace-card-select:focus-visible {
  outline: 2px solid var(--lingling-red);
  outline-offset: -2px;
}

.marketplace-card-image {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  aspect-ratio: auto;
  overflow: hidden;
  border-bottom: 1px solid #d8dfdc;
  background: #edf1ef;
}

.marketplace-card-image img {
  display: block;
  order: 2;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.marketplace-card.is-portrait-cover .marketplace-card-image img {
  aspect-ratio: 3 / 4;
  object-fit: contain;
}

.marketplace-card.is-portrait-cover .marketplace-image-fallback {
  aspect-ratio: 3 / 4;
}

.marketplace-card.is-service-cover-inset .marketplace-card-image {
  display: block;
  aspect-ratio: 3 / 4;
}

.marketplace-card.is-service-cover-inset .marketplace-card-image img,
.marketplace-card.is-service-cover-inset .marketplace-card-image .marketplace-image-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: contain;
}

.marketplace-card.is-service-cover-inset .marketplace-card-state {
  position: absolute;
  top: 0;
  left: 0;
  order: initial;
  height: 9.722%;
  min-height: 0;
  flex: none;
}

.marketplace-detail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.marketplace-card-image img.is-unavailable,
.marketplace-detail-image img.is-unavailable {
  display: none;
}

.marketplace-image-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #7a8681;
  background: repeating-linear-gradient(135deg, #edf1ef 0, #edf1ef 10px, #f5f7f6 10px, #f5f7f6 20px);
  font-size: 12px;
}

.marketplace-image-fallback[hidden] {
  display: none;
}

.marketplace-card-image .marketplace-image-fallback {
  position: static;
  order: 2;
  width: 100%;
  aspect-ratio: 1 / 1;
}

.marketplace-card-state {
  position: static;
  order: 1;
  z-index: 1;
  display: flex;
  width: 100%;
  height: 35px;
  min-height: 35px;
  flex: 0 0 35px;
  gap: 8px;
  padding: 0 10px;
  align-items: center;
  border: 0;
  color: #ffffff;
  text-align: left;
  background: #59635f;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.22);
}

.marketplace-card-state strong {
  color: inherit;
  font-size: 12px;
  line-height: 1.25;
  white-space: nowrap;
}

.marketplace-card-state-service {
  display: flex;
  min-width: 0;
  font-weight: 700;
}

.marketplace-card-state-service-name {
  overflow: hidden;
  min-width: 0;
  text-overflow: ellipsis;
}

.marketplace-card-state-service-suffix,
.marketplace-card-state-action {
  flex: 0 0 auto;
}

.marketplace-card-state-action {
  overflow: hidden;
  font-weight: 650;
  text-overflow: ellipsis;
}

.marketplace-card-state.has-service .marketplace-card-state-action {
  margin-left: auto;
}

.marketplace-card-state-divider {
  width: 1px;
  height: 14px;
  flex: 0 0 1px;
  background: rgba(255, 255, 255, 0.48);
}

.marketplace-card-state.is-ready {
  background: #18794e;
}

.marketplace-card-state.is-action {
  background: #a65d08;
}

.marketplace-card-state.is-exclusive {
  background: #b7311e;
}

.marketplace-card-state.is-muted {
  background: #59635f;
}

.marketplace-card-state.is-preview {
  background: #2563a6;
}

.marketplace-card-copy {
  display: grid;
  gap: 4px;
  min-height: 88px;
  padding: 11px 12px;
}

.marketplace-card-copy strong {
  overflow: hidden;
  color: var(--lingling-ink);
  font-size: 15px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.marketplace-card-copy small {
  display: -webkit-box;
  overflow: hidden;
  color: var(--lingling-muted);
  font-size: 12px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.marketplace-card footer {
  display: flex;
  gap: 10px;
  min-height: 46px;
  padding: 8px 10px;
  border-top: 1px solid var(--lingling-line);
  align-items: center;
  justify-content: space-between;
}

.marketplace-card-price {
  min-width: 0;
}

.marketplace-card-price strong {
  display: block;
  overflow: hidden;
  color: var(--lingling-ink);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.marketplace-card-action,
.marketplace-detail-action,
.marketplace-empty button {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--lingling-line-strong);
  border-radius: 5px;
  color: #53605b;
  background: #ffffff;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
}

.marketplace-card-action {
  flex: 0 0 auto;
  white-space: nowrap;
}

.marketplace-card-action.is-owned,
.marketplace-detail-action.is-owned,
.marketplace-detail-action.is-contact {
  border-color: var(--lingling-red);
  color: #ffffff;
  background: var(--lingling-red);
}

.marketplace-detail-action.is-unlock {
  border-color: rgba(216, 61, 32, 0.42);
  color: var(--lingling-red-deep);
  background: #fff7f4;
}

.marketplace-card-action:disabled,
.marketplace-detail-action:disabled {
  border-color: var(--lingling-line);
  color: var(--lingling-muted);
  background: #f4f6f5;
  cursor: not-allowed;
}

body.marketplace-detail-open {
  overflow: hidden;
}

.marketplace-detail-layer {
  position: fixed;
  z-index: 220;
  inset: 0;
  display: grid;
  padding: 24px;
  place-items: center;
}

.marketplace-detail-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14, 21, 18, 0.58);
  animation: marketplace-backdrop-in 160ms ease-out both;
}

.marketplace-detail-panel {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1080px, calc(100vw - 48px));
  max-height: calc(100svh - 48px);
  overflow: hidden;
  border: 1px solid var(--lingling-line);
  border-radius: 8px;
  outline: 0;
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(14, 21, 18, 0.28);
  animation: marketplace-detail-in 180ms ease-out both;
}

.marketplace-detail-toolbar {
  display: flex;
  min-height: 58px;
  padding: 0 18px 0 22px;
  border-bottom: 1px solid var(--lingling-line);
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
}

.marketplace-detail-toolbar > div {
  display: flex;
  gap: 10px;
  align-items: center;
}

.marketplace-detail-toolbar span {
  color: var(--lingling-ink);
  font-size: 13px;
  font-weight: 800;
}

.marketplace-detail-toolbar small {
  color: var(--lingling-muted);
  font-size: 11px;
}

.marketplace-detail-close {
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  place-items: center;
  color: var(--lingling-ink);
  background: #f1f4f2;
  cursor: pointer;
  font: inherit;
  font-size: 24px;
  line-height: 1;
}

.marketplace-detail-back {
  padding: 6px 0;
  border: 0;
  color: var(--lingling-red-deep);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.marketplace-detail-scroll {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: #98a49e #edf1ef;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

.marketplace-detail-scroll::-webkit-scrollbar {
  width: 10px;
}

.marketplace-detail-scroll::-webkit-scrollbar-track {
  background: #edf1ef;
}

.marketplace-detail-scroll::-webkit-scrollbar-thumb {
  border: 2px solid #edf1ef;
  border-radius: 8px;
  background: #98a49e;
}

.marketplace-detail-overview {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr);
  gap: 38px;
  padding: 30px;
  border-bottom: 1px solid var(--lingling-line);
  align-items: start;
}

.marketplace-detail-image {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 0;
  border-radius: 6px;
  background: #edf1ef;
  cursor: zoom-in;
}

.marketplace-detail-image.is-portrait-cover {
  aspect-ratio: 3 / 4;
}

.marketplace-detail-image.is-portrait-cover img {
  object-fit: contain;
}

.marketplace-detail-image:focus-visible,
.marketplace-detail-toolbar button:focus-visible {
  outline: 2px solid var(--lingling-red);
  outline-offset: 2px;
}

.marketplace-detail-summary {
  display: grid;
  gap: 14px;
  padding-top: 4px;
}

.marketplace-detail-head {
  display: flex;
  align-items: center;
}

.marketplace-detail-state {
  color: var(--lingling-muted);
  font-size: 12px;
  font-weight: 700;
}

.marketplace-detail-state.is-ready {
  color: #18794e;
}

.marketplace-detail-state.is-action {
  color: #9a5a08;
}

.marketplace-detail-state.is-exclusive {
  color: #b7311e;
}

.marketplace-detail-state.is-muted {
  color: #59635f;
}

.marketplace-detail-state.is-preview {
  color: #2563a6;
}

.marketplace-detail-summary h2 {
  margin: 0;
  color: var(--lingling-ink);
  font-size: 28px;
  line-height: 1.3;
  letter-spacing: 0;
}

.marketplace-detail-short {
  margin: 0;
  color: #53605b;
  font-size: 15px;
  line-height: 1.75;
}

.marketplace-detail-highlights {
  display: grid;
  gap: 10px;
  padding: 15px 0;
  border-top: 1px solid var(--lingling-line);
  border-bottom: 1px solid var(--lingling-line);
}

.marketplace-detail-highlights h3 {
  margin: 0;
  color: var(--lingling-ink);
  font-size: 13px;
  line-height: 1.4;
}

.marketplace-detail-highlights ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 18px;
  margin: 0;
  padding: 0;
  color: #4f5d57;
  font-size: 12px;
  line-height: 1.55;
  list-style: none;
}

.marketplace-detail-highlights li {
  position: relative;
  min-width: 0;
  padding-left: 16px;
}

.marketplace-detail-highlights li::before {
  position: absolute;
  top: 0;
  left: 0;
  content: "✓";
  color: var(--lingling-red);
  font-weight: 800;
}

.marketplace-exclusive-context {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  padding: 13px 14px;
  border-top: 2px solid var(--lingling-red);
  border-bottom: 1px solid rgba(183, 49, 30, 0.2);
  background: #fff7f4;
  align-items: center;
}

.marketplace-exclusive-mark {
  display: grid;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  place-items: center;
  color: #ffffff;
  background: var(--lingling-red);
  font-size: 16px;
  font-weight: 800;
}

.marketplace-exclusive-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.marketplace-exclusive-copy strong {
  color: var(--lingling-ink);
  font-size: 14px;
}

.marketplace-exclusive-copy > span {
  color: #5f4a43;
  font-size: 12px;
  line-height: 1.55;
}

.marketplace-exclusive-link {
  padding: 7px 0;
  border: 0;
  color: var(--lingling-red-deep);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.marketplace-detail-price {
  display: grid;
  gap: 5px;
  padding: 15px 0;
  border-top: 1px solid var(--lingling-line);
  border-bottom: 1px solid var(--lingling-line);
}

.marketplace-detail-price span {
  color: var(--lingling-muted);
  font-size: 11px;
}

.marketplace-detail-price strong {
  color: var(--lingling-ink);
  font-size: 22px;
}

.marketplace-unlock-success {
  display: grid;
  gap: 4px;
  padding: 13px 15px;
  border-left: 3px solid #18794e;
  color: #145f3e;
  background: #f0f9f4;
}

.marketplace-unlock-success span {
  font-size: 12px;
}

.marketplace-detail-action {
  width: auto;
  min-height: 38px;
  padding-right: 16px;
  padding-left: 16px;
  font-size: 13px;
}

.marketplace-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.marketplace-detail-summary > .marketplace-detail-action {
  justify-self: end;
}

.marketplace-detail-action.is-trial {
  border-color: #18794e;
  color: #ffffff;
  background: #18794e;
}

.marketplace-contact-copy {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--lingling-line);
  border-radius: 6px;
  outline: 0;
  background: #f7f9f8;
}

.marketplace-contact-copy strong {
  color: var(--lingling-ink);
  font-size: 13px;
}

.marketplace-contact-copy p {
  color: var(--lingling-ink);
  white-space: pre-wrap;
}

.marketplace-detail-content {
  display: grid;
  gap: 0;
  padding: 0 30px 36px;
}

.marketplace-detail-content > section {
  min-width: 0;
  padding: 28px 0;
  border-bottom: 1px solid var(--lingling-line);
}

.marketplace-detail-content > :last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.marketplace-detail-content h3 {
  margin: 0 0 12px;
  color: var(--lingling-ink);
  font-size: 16px;
  line-height: 1.4;
}

.marketplace-detail-content > section > p {
  max-width: 760px;
  color: #4f5d57;
  font-size: 14px;
  line-height: 1.85;
  white-space: pre-wrap;
}

.marketplace-detail-example p {
  max-width: 760px;
  margin: 0;
  padding-left: 16px;
  border-left: 3px solid var(--lingling-red);
  color: var(--lingling-ink);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.7;
}

.marketplace-detail-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 2px 0;
}

.marketplace-detail-facts > div {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 8px 14px;
  border-left: 1px solid var(--lingling-line);
  font-size: 13px;
}

.marketplace-detail-facts > div:nth-child(odd) {
  padding-left: 0;
  border-left: 0;
}

.marketplace-detail-facts > div:nth-child(even) {
  padding-right: 0;
}

.marketplace-detail-facts dt {
  color: var(--lingling-muted);
}

.marketplace-detail-facts dd {
  margin: 0;
  color: var(--lingling-ink);
  overflow-wrap: anywhere;
  font-weight: 700;
  line-height: 1.55;
}

.marketplace-detail-delivery ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 22px;
  margin: 0;
  padding: 0;
  color: #4f5d57;
  font-size: 13px;
  list-style: none;
}

.marketplace-detail-delivery li::before {
  margin-right: 8px;
  content: "✓";
  color: var(--lingling-red);
  font-weight: 800;
}

.marketplace-detail-related > div {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--lingling-line);
}

.marketplace-detail-related > header {
  margin-bottom: 12px;
}

.marketplace-detail-related > header h3 {
  margin-bottom: 5px;
}

.marketplace-detail-related > header p {
  max-width: 760px;
  margin: 0;
  color: var(--lingling-muted);
  font-size: 12px;
  line-height: 1.65;
}

.marketplace-detail-related button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  min-width: 0;
  padding: 13px 0;
  border: 0;
  border-bottom: 1px solid var(--lingling-line);
  color: var(--lingling-ink);
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.marketplace-detail-related button:hover strong {
  color: var(--lingling-red);
}

.marketplace-detail-related strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.marketplace-detail-related span {
  color: var(--lingling-muted);
  font-size: 12px;
  white-space: nowrap;
}

.marketplace-detail-related.is-service-catalog > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  border-top: 0;
}

.marketplace-detail-related.is-service-catalog > header {
  display: flex;
  gap: 18px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 16px;
}

.marketplace-detail-related.is-service-catalog > header > div {
  min-width: 0;
}

.marketplace-detail-related.is-service-catalog > header > strong {
  flex: 0 0 auto;
  color: var(--lingling-red-deep);
  font-size: 12px;
}

.marketplace-detail-related.is-service-catalog button {
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 10px;
  min-height: 118px;
  padding: 10px;
  border: 1px solid var(--lingling-line);
  border-radius: 6px;
  background: #ffffff;
}

.marketplace-related-thumb {
  display: grid;
  width: 68px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid var(--lingling-line);
  border-radius: 5px;
  place-items: center;
  color: var(--lingling-muted);
  background: #f3f5f4;
  font-size: 10px;
  white-space: normal;
}

.marketplace-related-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.marketplace-related-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
  white-space: normal;
}

.marketplace-related-copy small {
  display: -webkit-box;
  overflow: hidden;
  color: var(--lingling-muted);
  font-size: 11px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.marketplace-related-copy em {
  color: #53605b;
  font-size: 10px;
  font-style: normal;
  line-height: 1.4;
}

.marketplace-related-access {
  padding: 4px 7px;
  border: 1px solid var(--lingling-line-strong);
  border-radius: 4px;
  color: #53605b;
  background: #f7f9f8;
  font-size: 11px;
  font-weight: 700;
}

.marketplace-detail-related.is-service-catalog .marketplace-related-access {
  grid-column: 2;
  justify-self: start;
}

.marketplace-related-access.is-exclusive {
  border-color: rgba(183, 49, 30, 0.32);
  color: #a62b19;
  background: #fff7f4;
}

.lightbox.marketplace-overlay {
  z-index: 260;
}

.lightbox.marketplace-image-overlay {
  padding: 16px;
}

.lightbox-panel.image-panel.marketplace-image-viewer {
  width: min(1400px, calc(100vw - 32px));
  height: calc(100dvh - 32px);
  max-height: none;
  grid-template-rows: auto minmax(0, 1fr);
  border-radius: 8px;
}

.marketplace-image-viewer .lightbox-head {
  min-height: 58px;
  padding: 12px 18px;
  background: #ffffff;
}

.marketplace-image-viewer .lightbox-head button {
  display: grid;
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 50%;
  place-items: center;
  font-size: 21px;
  line-height: 1;
}

.marketplace-image-viewer-scroll {
  min-height: 0;
  overflow: auto;
  padding: 20px;
  background: #eef1ef;
  overscroll-behavior: contain;
}

.lightbox-panel.image-panel.marketplace-image-viewer .marketplace-image-viewer-scroll img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: none;
  margin: 0 auto;
  padding: 0;
  object-fit: initial;
  background: #ffffff;
}

.marketplace-contact-dialog {
  width: min(620px, calc(100vw - 32px));
  grid-template-rows: auto minmax(0, 1fr);
  border-radius: 8px;
  outline: 0;
}

.marketplace-contact-dialog .lightbox-head {
  padding: 18px 20px;
}

.marketplace-contact-dialog .lightbox-head > div {
  display: grid;
  gap: 3px;
}

.marketplace-contact-dialog .lightbox-head small {
  color: var(--lingling-muted);
  font-size: 11px;
}

.marketplace-contact-dialog .lightbox-head strong {
  color: var(--lingling-ink);
  font-size: 15px;
}

.marketplace-contact-dialog .lightbox-head button {
  display: grid;
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 50%;
  place-items: center;
  font-size: 21px;
  line-height: 1;
}

.marketplace-contact-dialog-body {
  display: grid;
  gap: 22px;
  max-height: min(70svh, 620px);
  padding: 24px;
  overflow-y: auto;
}

.marketplace-contact-dialog-body.has-qr {
  grid-template-columns: 190px minmax(0, 1fr);
  align-items: start;
}

.marketplace-contact-qr {
  display: grid;
  gap: 9px;
  justify-items: center;
}

.marketplace-contact-qr img {
  width: 190px;
  aspect-ratio: 1;
  padding: 8px;
  border: 1px solid var(--lingling-line);
  border-radius: 6px;
  object-fit: contain;
  background: #ffffff;
}

.marketplace-contact-qr span {
  color: var(--lingling-muted);
  font-size: 11px;
  text-align: center;
}

.marketplace-contact-instructions {
  display: grid;
  gap: 11px;
}

.marketplace-contact-instructions > span {
  color: var(--lingling-muted);
  font-size: 11px;
}

.marketplace-contact-instructions p {
  margin: 0;
  color: var(--lingling-ink);
  font-size: 14px;
  line-height: 1.75;
  white-space: pre-wrap;
}

.marketplace-contact-instructions small {
  color: var(--lingling-muted);
  font-size: 11px;
  line-height: 1.6;
}

.marketplace-detail-gallery {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}

.marketplace-detail-gallery > button {
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: zoom-in;
}

.marketplace-detail-gallery img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--lingling-line);
}

@media (max-width: 760px) {
  .lightbox.marketplace-image-overlay {
    padding: 0;
  }

  .lightbox-panel.image-panel.marketplace-image-viewer {
    width: 100vw;
    height: 100dvh;
    border-radius: 0;
  }

  .marketplace-image-viewer-scroll {
    padding: 10px;
  }
}

.marketplace-pagination {
  display: flex;
  min-height: 64px;
  gap: 18px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--lingling-line);
  align-items: center;
  justify-content: space-between;
}

.marketplace-pagination[hidden] {
  display: none;
}

.marketplace-pagination-summary {
  color: var(--lingling-muted);
  font-size: 12px;
}

.marketplace-pagination-summary strong {
  color: var(--lingling-ink);
}

.marketplace-pagination-controls {
  display: flex;
  gap: 5px;
  align-items: center;
}

.marketplace-pagination-controls button {
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--lingling-line);
  border-radius: 5px;
  place-items: center;
  color: var(--lingling-ink);
  background: #ffffff;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
}

.marketplace-pagination-controls button:hover:not(:disabled) {
  border-color: var(--lingling-ink);
}

.marketplace-pagination-controls button.is-active {
  border-color: var(--lingling-ink);
  color: #ffffff;
  background: var(--lingling-ink);
}

.marketplace-pagination-controls button:disabled {
  cursor: default;
  opacity: 0.35;
}

.marketplace-pagination-ellipsis {
  width: 22px;
  color: var(--lingling-muted);
  text-align: center;
}

.marketplace-empty {
  display: grid;
  min-height: 220px;
  gap: 10px;
  grid-column: 1 / -1;
  padding: 28px;
  border: 1px dashed var(--lingling-line-strong);
  border-radius: 6px;
  place-content: center;
  justify-items: center;
  text-align: center;
}

.marketplace-setting-toggle.is-enabled {
  border-color: rgba(238, 77, 45, 0.36);
  background: #fff7f4;
}

@keyframes marketplace-backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes marketplace-detail-in {
  from { opacity: 0; transform: translateY(12px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (min-width: 1680px) {
  .marketplace-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  .marketplace-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .marketplace-detail-panel {
    width: min(920px, calc(100vw - 40px));
  }

  .marketplace-detail-overview {
    grid-template-columns: minmax(260px, 0.85fr) minmax(0, 1.15fr);
    gap: 28px;
    padding: 26px;
  }

  .marketplace-detail-related.is-service-catalog > div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  html.lingling-user-theme body.mode-user .marketplace-surface {
    padding: 24px 18px 56px;
  }

  .marketplace-heading {
    align-items: start;
  }

  .marketplace-heading-copy {
    display: grid;
    gap: 4px;
  }

  .marketplace-heading h1 {
    font-size: 24px;
  }

  .marketplace-owned-entry {
    flex: 0 0 auto;
  }

  .marketplace-kind-tabs {
    gap: 22px;
  }

  .marketplace-controls {
    display: grid;
    gap: 16px;
    margin-bottom: 20px;
  }

  .marketplace-tools {
    justify-content: flex-start;
  }

  .marketplace-category-filter {
    display: block;
  }

  .marketplace-category-filter select {
    width: auto;
  }

  .marketplace-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .marketplace-detail-layer {
    padding: 0;
  }

  .marketplace-detail-panel {
    width: 100%;
    height: 100svh;
    max-height: none;
    border: 0;
    border-radius: 0;
  }

  .marketplace-detail-overview {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    padding: 20px;
  }

  .marketplace-detail-image {
    width: min(100%, 420px);
    justify-self: center;
  }

  .marketplace-detail-summary h2 {
    font-size: 24px;
  }

  .marketplace-detail-content {
    padding: 0 20px 40px;
  }

  .marketplace-exclusive-context {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .marketplace-exclusive-link {
    grid-column: 2;
    justify-self: start;
  }

  .marketplace-detail-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .marketplace-detail-facts > div,
  .marketplace-detail-facts > div:first-child,
  .marketplace-detail-facts > div:last-child {
    padding: 12px 14px;
    border-top: 1px solid var(--lingling-line);
    border-left: 0;
  }

  .marketplace-detail-facts > div:nth-child(odd) {
    padding-left: 0;
    border-left: 0;
  }

  .marketplace-detail-facts > div:nth-child(even) {
    padding-right: 0;
    border-left: 1px solid var(--lingling-line);
  }

  .marketplace-detail-facts > div:nth-child(-n + 2) {
    padding-top: 0;
    border-top: 0;
  }

  .marketplace-detail-highlights ul {
    grid-template-columns: minmax(0, 1fr);
  }

  .marketplace-detail-delivery ul {
    grid-template-columns: minmax(0, 1fr);
  }

  .marketplace-detail-related button {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .marketplace-detail-related.is-service-catalog button {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 10px;
  }

  .marketplace-detail-related.is-service-catalog > div {
    grid-template-columns: minmax(0, 1fr);
  }

  .marketplace-detail-related.is-service-catalog > header {
    align-items: start;
    flex-direction: column;
  }

  .marketplace-detail-related.is-service-catalog .marketplace-related-access {
    grid-column: 2;
    justify-self: start;
  }

  .marketplace-related-thumb {
    width: 52px;
    grid-row: 1 / span 2;
  }

  .marketplace-detail-related span {
    white-space: normal;
  }

  .marketplace-pagination {
    align-items: flex-start;
  }

  .marketplace-contact-dialog-body.has-qr {
    grid-template-columns: minmax(0, 1fr);
  }

  .marketplace-contact-qr img {
    width: min(210px, 100%);
  }
}

@media (max-width: 460px) {
  .marketplace-heading {
    display: grid;
  }

  .marketplace-owned-entry {
    justify-self: start;
  }

  .marketplace-detail-facts {
    grid-template-columns: minmax(0, 1fr);
  }

  .marketplace-detail-facts > div,
  .marketplace-detail-facts > div:first-child,
  .marketplace-detail-facts > div:last-child,
  .marketplace-detail-facts > div:nth-child(odd),
  .marketplace-detail-facts > div:nth-child(even),
  .marketplace-detail-facts > div:nth-child(-n + 2) {
    padding: 12px 0;
    border-top: 1px solid var(--lingling-line);
    border-left: 0;
  }

  .marketplace-detail-facts > div:first-child {
    padding-top: 0;
    border-top: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .marketplace-card,
  .marketplace-detail-backdrop,
  .marketplace-detail-panel {
    animation: none;
    transition: none;
  }
}
