.market-root {
  --market-accent: var(--purple, #8b5cf6);
  --market-ink: color-mix(
    in srgb,
    var(--market-accent) 60%,
    var(--text, #111827)
  );
  --market-error: color-mix(
    in srgb,
    var(--red, #dc2626) 70%,
    var(--text, #111827)
  );
  --market-solid: var(--accent-strong, #7c3aed);
  --market-surface: var(--bg2, #fff);
  --market-soft: var(--accent-soft, #8b5cf61a);
  --market-line: var(--border, #1118270f);
  color: var(--text, #111827);
  font: inherit;
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 24px 32px;
  min-width: 0;
  --market-control: var(--bg3, #f1f2f7);
  --market-control-line: var(--border2, #1118271f);
  font-size: 15px;
  line-height: 1.55;
}
.market-root * {
  box-sizing: border-box;
}
.market-root [hidden] {
  display: none !important;
}
.market-root button,
.market-root input,
.market-root select,
.market-root textarea {
  font: inherit;
  color: inherit;
}
.market-root button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  border: 1px solid var(--market-control-line);
  background: var(--market-control);
  border-radius: 10px;
  padding: 8px 13px;
  min-height: 38px;
  font-size: 13px;
  line-height: 1.3;
  font-weight: 600;
}
.market-root button:hover {
  border-color: var(--market-control-line);
  background: var(--market-control);
  filter: brightness(0.96);
}
.market-root button:disabled {
  opacity: 0.55;
  cursor: default;
}
.market-root button.market-button-primary {
  background: var(--market-solid);
  border-color: var(--market-solid);
  color: var(--accent-contrast, #fff);
  font-weight: 600;
}
.market-root button.market-button-primary:hover {
  background: color-mix(in srgb, var(--market-solid) 90%, #000);
}
.market-root button.market-button-quiet {
  border-color: transparent;
  background: transparent;
  color: var(--text2, #475569);
}
.market-root button.market-button-quiet:hover {
  background: var(--market-soft);
  color: var(--text, #111827);
}
.market-root :focus-visible {
  outline: 2px solid var(--market-ink);
  outline-offset: 3px;
}
.market-root h1:focus {
  outline: none;
}
.market-icon {
  flex-shrink: 0;
  width: 19px;
  height: 19px;
  vertical-align: middle;
}
.market-page-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.market-page-heading h1 {
  font-size: clamp(23px, 3vw, 32px);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0;
  line-height: 1.25;
}
.market-content {
  display: grid;
  gap: 16px;
  min-width: 0;
}
.market-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.market-intro .market-muted {
  margin: 0;
}
.market-intro > button {
  flex-shrink: 0;
}
.market-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--market-line);
  padding-bottom: 0;
  min-height: 50px;
}
.market-tabs button {
  flex: 1;
  background: transparent;
  border-color: transparent;
  color: var(--text3, #64748b);
  position: relative;
  min-height: 50px;
  padding: 0 10px;
  font-size: 15px;
  border-radius: 0;
}
.market-tabs button[aria-current="page"] {
  background: transparent;
  color: var(--text, #111827);
  font-weight: 600;
}
.market-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.market-shortcuts {
  gap: 4px;
  margin: -4px 0 0;
}
.market-shortcuts button {
  padding: 8px 10px;
  min-height: 40px;
  font-size: 13px;
}
.market-search-bar {
  display: flex;
  align-items: center;
  position: relative;
}
.market-search-bar > .market-icon {
  position: absolute;
  left: 16px;
  color: var(--text3, #64748b);
  pointer-events: none;
}
.market-search-bar .market-field {
  width: 100%;
}
.market-search-bar .market-field > span:first-child {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.market-search-bar .market-field input {
  padding-left: 46px;
  min-height: 44px;
  font-size: 14px;
}
.market-filter-panel {
  padding-bottom: 12px;
  min-width: 0;
}
.market-browse-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
  border-bottom: 1px solid var(--market-line);
  margin-top: -8px;
}
.market-filter-actions {
  justify-content: flex-end;
}
.market-filter-actions button {
  font-size: 12px;
  padding: 8px;
  min-height: 40px;
}
.market-browse-controls:has(.market-filter-panel[open]) .market-filter-panel {
  grid-column: 1/-1;
}
.market-browse-controls:has(.market-filter-panel[open]) .market-filter-actions {
  grid-column: 1/-1;
  margin-top: -12px;
}
.market-filter-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  min-height: 40px;
  padding: 6px 0;
  list-style: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--text2, #475569);
}
.market-filter-toggle::-webkit-details-marker {
  display: none;
}
.market-filter-toggle::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  margin: -3px 8px 0;
}
.market-filter-panel[open] .market-filter-toggle::after {
  transform: rotate(225deg);
  margin-top: 4px;
}
.market-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 10px 0;
}
.market-field {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
}
.market-field input,
.market-field select,
.market-field textarea {
  min-width: 0;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--market-control-line);
  border-radius: 10px;
  background: var(--market-control);
  font-size: 14px;
  font-weight: 400;
  min-height: 44px;
  line-height: 1.55;
}
.market-field input::placeholder,
.market-field textarea::placeholder {
  color: var(--text3, #64748b);
}
.market-field textarea {
  min-height: 100px;
  resize: vertical;
  line-height: 1.6;
}
.market-field input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-height: 0;
  accent-color: var(--market-solid);
}
.market-field:has(input[type="checkbox"]) {
  display: flex;
  align-items: center;
  flex-direction: row-reverse;
  justify-content: flex-end;
  min-height: 44px;
}
.market-result-count {
  color: var(--text2, #475569);
  font-size: 13px;
  font-weight: 600;
  margin: 0;
}
.market-limit-note {
  margin: -10px 0 0;
  font-size: 12px;
}
.market-limit-note:empty,
.market-operation-status:empty {
  display: none;
}
.market-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.market-root button.market-listing {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0;
  padding: 0;
  text-align: left;
  overflow: hidden;
  border-radius: 16px;
  min-width: 0;
}
.market-listing > img,
.market-art {
  aspect-ratio: 4/3;
  height: auto;
  object-fit: cover;
  width: 100%;
  background: var(--market-soft);
}
.market-art {
  display: grid;
  place-content: center;
  color: var(--text3);
}
.market-art > .market-icon {
  width: 28px;
  height: 28px;
}
.market-listing-info {
  padding: 16px 18px;
  width: 100%;
  display: grid;
  gap: 8px;
}
.market-listing h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
  font-weight: 650;
}
.market-listing p {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text2, #475569);
}
.market-price {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text, #111827);
}
.market-listing .market-price {
  font-size: 20px;
}
.market-status {
  display: inline-block;
  width: fit-content;
  font-size: 11px;
  line-height: 1.5;
  font-weight: 600;
  color: var(--text2, #475569);
  text-transform: capitalize;
  padding: 3px 8px;
  border-radius: 5px;
  background: var(--market-control);
}
.market-muted {
  color: var(--text3, #64748b);
  font-size: 13px;
  line-height: 1.55;
}
.market-section-heading {
  display: grid;
  gap: 6px;
}
.market-section-heading h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.025em;
}
.market-section-heading p {
  margin: 0;
}
.market-root button.market-category {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 10px;
  padding: 18px;
  min-height: 150px;
  text-align: left;
  border-radius: 16px;
}
.market-category strong {
  font-size: 15px;
  font-weight: 650;
}
.market-category .market-muted {
  font-size: 12px;
}
.market-category-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  color: var(--market-ink);
  background: var(--market-soft);
}
.market-category-icon .market-icon {
  width: 23px;
  height: 23px;
}
.market-empty {
  grid-column: 1/-1;
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 48px 20px;
  text-align: center;
  border: 0;
  border-radius: 16px;
  color: var(--text3, #64748b);
}
.market-empty > .market-icon {
  width: 32px;
  height: 32px;
  color: var(--text3, #64748b);
}
.market-empty h3 {
  margin: 0;
  font-size: 17px;
}
.market-empty p {
  max-width: 380px;
  margin: 0;
}
.market-load-more {
  justify-self: center;
  min-width: 180px;
}
.market-error,
.market-field-error {
  color: var(--market-error);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 0;
}
.market-field-error {
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
}
.market-error:empty,
.market-field-error:empty {
  display: none;
}
.market-field [aria-invalid="true"] {
  border-color: var(--market-error);
}
.market-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.market-gallery {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  max-width: 100%;
  scroll-snap-type: x proximity;
  border-radius: 16px;
}
.market-gallery img {
  flex: 0 0 100%;
  width: 100%;
  height: 380px;
  object-fit: contain;
  background: var(--market-soft);
  border-radius: 16px;
  scroll-snap-align: start;
}
.market-detail-placeholder {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 12px;
  width: 100%;
  min-height: 340px;
  color: var(--text3, #64748b);
  background: var(--market-soft);
  font-size: 13px;
  border-radius: 16px;
}
.market-detail-placeholder .market-icon {
  width: 38px;
  height: 38px;
}
.market-detail-summary {
  display: grid;
  gap: 14px;
  min-width: 0;
}
.market-detail-summary h2 {
  margin: 0;
  font-size: clamp(23px, 2.4vw, 28px);
  line-height: 1.25;
  letter-spacing: -0.025em;
  font-weight: 700;
}
.market-detail-summary > .market-price {
  font-size: 28px;
}
.market-detail-summary p {
  margin: 0;
  font-size: 14px;
}
.market-detail-summary .market-actions {
  gap: 4px;
}
.market-contact-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.market-contact-actions .market-button-primary {
  grid-column: 1/-1;
}
.market-detail-information {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  margin-top: 8px;
}
.market-detail-information h3 {
  margin: 0 0 12px;
  font-size: 17px;
}
.market-detail-description p {
  font-size: 15px;
  line-height: 1.55;
  white-space: pre-wrap;
  margin-bottom: 12px;
}
.market-specs {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) 1.4fr;
  gap: 12px;
  font-size: 13px;
  margin: 0;
}
.market-specs dt {
  color: var(--text2, #475569);
  font-weight: 400;
}
.market-specs dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-weight: 500;
}
.market-card {
  padding: 18px;
  border: 1px solid var(--market-line);
  background: var(--market-surface);
  border-radius: 16px;
  overflow-wrap: anywhere;
}
.market-form {
  display: grid;
  gap: 16px;
  max-width: 820px;
  width: 100%;
}
.market-form-section {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--market-line);
  border-radius: 16px;
  background: var(--market-surface);
}
.market-form-section .market-section-heading h2 {
  font-size: 17px;
}
.market-form-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.market-form-columns > .market-form-columns,
.market-form-columns > .market-field:has(textarea),
.market-photo-picker,
.market-photo-preview {
  grid-column: 1/-1;
}
.market-photo-picker {
  padding: 14px;
  border: 1px dashed var(--market-line);
  border-radius: 12px;
  background: var(--market-control);
}
.market-photo-picker input {
  border: 0;
  padding: 0;
  background: transparent;
}
.market-photo-picker input::file-selector-button {
  font: inherit;
  color: var(--text, #111827);
  background: var(--market-surface);
  border: 1px solid var(--market-line);
  border-radius: 8px;
  padding: 9px 12px;
  margin-right: 12px;
  cursor: pointer;
}
.market-photo-count {
  justify-self: end;
  align-self: start;
  font-size: 12px;
  font-weight: 600;
  color: var(--text2, #475569);
}
.market-photo-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.market-photo-preview > div {
  display: grid;
  gap: 6px;
}
.market-photo-preview img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 10px;
}
.market-photo-preview button {
  min-height: 34px;
  font-size: 11px;
  padding: 6px 8px;
}
.market-form-actions {
  padding: 12px;
  justify-content: flex-end;
  background: var(--market-surface);
  border: 1px solid var(--market-line);
  border-radius: 16px;
  box-shadow: none;
}
.market-message {
  max-width: 85%;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--market-control);
  border: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.55;
}
.market-message.is-own {
  margin-left: auto;
  background: var(--market-soft);
}
.market-messages {
  display: grid;
  gap: 14px;
  max-height: 55vh;
  overflow: auto;
}
.market-root h2,
.market-root h3,
.market-root p {
  overflow-wrap: anywhere;
}
.market-alert {
  padding: 14px;
  border-radius: 12px;
  background: var(--market-soft);
  font-size: 13px;
  line-height: 1.55;
}
@media (prefers-reduced-motion: no-preference) {
  .market-root button {
    transition:
      background-color 120ms,
      border-color 120ms,
      color 120ms;
  }
  .market-root button.market-listing:hover,
  .market-root button.market-category:hover {
    transform: none;
  }
}
@media (max-width: 850px) {
  .market-detail-layout,
  .market-detail-information {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .market-gallery img {
    height: 330px;
  }
}
@media (max-width: 700px) {
  .market-root {
    padding: 12px 12px 32px;
  }
  .market-page-heading h1 {
    font-size: 23px;
  }
  .market-content {
    gap: 18px;
  }
  .market-intro {
    gap: 10px;
  }
  .market-intro .market-muted {
    font-size: 12px;
  }
  .market-intro > button {
    font-size: 12px;
    padding: 9px 12px;
  }
  .market-tabs {
    gap: 2px;
  }
  .market-tabs button {
    padding: 10px 4px;
    font-size: 13px;
  }
  .market-shortcuts {
    gap: 2px;
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-right: -4px;
  }
  .market-shortcuts button {
    flex-shrink: 0;
    padding: 8px;
    gap: 5px;
    font-size: 12px;
  }
  .market-shortcuts .market-icon {
    width: 16px;
    height: 16px;
  }
  .market-filters {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .market-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .market-listing-info {
    padding: 12px;
    gap: 6px;
  }
  .market-listing .market-price {
    font-size: 18px;
  }
  .market-listing h3 {
    font-size: 13px;
  }
  .market-listing p,
  .market-listing .market-status {
    font-size: 11px;
  }
  .market-root button.market-category {
    padding: 16px;
    min-height: 168px;
  }
  .market-category strong {
    font-size: 14px;
  }
  .market-gallery img {
    height: 300px;
  }
  .market-detail-summary h2 {
    font-size: 23px;
  }
  .market-detail-summary > .market-price {
    font-size: 26px;
  }
  .market-form-section {
    padding: 18px;
  }
  .market-form-columns {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .market-photo-count {
    justify-self: start;
  }
  .market-form-actions {
    padding: 10px;
  }
  .market-form-actions button {
    flex: 1;
  }
}
@media (max-width: 349px) {
  .market-grid {
    grid-template-columns: 1fr;
  }
  .market-shortcuts {
    flex-wrap: wrap;
  }
}

/* Native Market sharing, photo viewing and member summaries. */
.market-root .market-dialog {
  color: var(--text);
  background: var(--market-surface);
  border: 1px solid var(--market-control-line);
  border-radius: 20px;
  padding: 22px;
  width: min(540px, calc(100vw - 24px));
  max-height: 85dvh;
  margin: auto;
  overflow: auto;
  overscroll-behavior: contain;
  box-shadow: 0 24px 80px #0004;
}
.market-dialog::backdrop {
  background: #17112c80;
}
.market-dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.market-dialog-heading h2 {
  font-size: 21px;
}
.market-dialog-body {
  display: grid;
  gap: 14px;
  min-width: 0;
}
.market-dialog [role="status"] {
  margin-top: 12px;
  overflow-wrap: anywhere;
}
.market-share-picker:empty {
  display: none;
}
.market-share-picker {
  display: grid;
  gap: 12px;
}
.market-share-recipients {
  display: grid;
  gap: 8px;
  max-height: 35dvh;
  overflow: auto;
}
.market-root .market-share-recipients [aria-checked="true"] {
  border-color: var(--market-ink);
  background: var(--market-soft);
}
.market-root .market-gallery-open {
  display: grid;
  position: relative;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  background: var(--market-soft);
  width: 100%;
}
.market-gallery .market-gallery-open img {
  width: 100%;
  height: 360px;
  object-fit: contain;
}
.market-photo-caption {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgb(0 0 0 / 75%);
  color: #fff;
  padding: 6px 10px;
  border-radius: 12px;
  font-size: 12px;
}
.market-gallery-thumbnails {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px;
}
.market-root .market-gallery-thumbnails button {
  padding: 3px;
  flex: 0 0 64px;
}
.market-gallery-thumbnails button[aria-pressed="true"] {
  outline: 2px solid var(--market-ink);
  outline-offset: 1px;
}
.market-gallery .market-gallery-thumbnails img {
  width: 56px;
  height: 56px;
  object-fit: cover;
}
.market-root .market-photo-dialog {
  width: min(1100px, calc(100vw - 24px));
}
.market-photo-viewport {
  height: min(65dvh, 700px);
  overflow: auto;
  background: var(--bg);
  border-radius: 14px;
}
.market-photo-viewport img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.market-photo-viewport.is-zoomed img {
  width: 200%;
  height: 200%;
  max-width: none;
}
.market-quick-message {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--market-line);
  border-radius: 16px;
  background: var(--market-surface);
}
.market-quick-message h3 {
  font-size: 17px;
}
.market-summary-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.market-summary-stats > .market-muted {
  grid-column: 1 / -1;
}
.market-summary-stats .market-card {
  display: grid;
  gap: 5px;
  text-align: center;
  padding: 16px 10px;
}
.market-summary-stats strong {
  font-size: 24px;
  font-variant-numeric: tabular-nums;
}
.market-summary-stats span {
  font-size: 12px;
  color: var(--text2);
}
.market-seller-identity {
  display: grid;
  justify-items: center;
  gap: 12px;
}
.market-seller-identity img,
.market-seller-initial {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
}
.market-seller-initial {
  display: grid;
  place-items: center;
  background: var(--market-soft);
  font-size: 30px;
  color: var(--market-ink);
}
.market-root .market-inbox-card {
  display: flex;
  justify-content: flex-start;
  gap: 16px;
  padding: 16px;
  text-align: left;
}
.market-inbox-card > img,
.market-inbox-card > .market-art {
  width: 76px;
  height: 90px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
}
.market-inbox-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
  flex: 1;
  overflow-wrap: anywhere;
}
.market-inbox-copy > .market-price {
  font-size: 18px;
}
.market-unread-badge {
  padding: 2px 6px;
  border-radius: 12px;
  background: var(--market-solid);
  color: var(--accent-contrast, #fff);
  font-size: 11px;
}
@media (max-width: 700px) {
  .market-root .market-dialog {
    padding: 16px;
  }
  .market-gallery .market-gallery-open img {
    height: 300px;
  }
  .market-summary-stats {
    gap: 6px;
  }
  .market-inbox-card .market-status {
    max-width: 64px;
  }
}

.market-root .market-gallery {
  display: grid;
  overflow: hidden;
}

/* Shared typography and interaction primitives. */
.market-root h2 {
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -0.025em;
}
.market-root h3 {
  font-size: 17px;
  line-height: 1.25;
  letter-spacing: -0.025em;
}
.market-root p {
  line-height: 1.55;
}
.market-root .market-listing h3 {
  font-size: 15px;
  line-height: 1.4;
}
.market-root .market-detail-summary h2 {
  font-size: clamp(23px, 2.4vw, 28px);
}
.market-content > button {
  justify-self: start;
}
.market-tabs button[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: -1px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
}
.market-root .market-tabs button:hover {
  background: var(--market-control);
}
.market-root button[aria-pressed="true"]:not(.market-button-primary) {
  background: var(--market-soft);
  color: var(--market-ink);
  border-color: var(--accent-border);
}
.market-card > h2,
.market-card > h3 {
  margin: 0 0 10px;
}
.market-card > p {
  margin: 8px 0;
  font-size: 14px;
}
.market-card > .market-status {
  margin: 0 0 10px;
}
.market-card > .market-actions {
  margin-top: 12px;
}
.market-card > button + button {
  margin-left: 6px;
}
.market-root details.market-card > summary {
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
}
.market-root details.market-card[open] > summary {
  margin-bottom: 12px;
}
.market-content > .market-field {
  max-width: 820px;
  width: 100%;
}
.market-photo-preview > div {
  min-width: 0;
  max-width: 100%;
}
.market-photo-preview .market-actions {
  gap: 6px;
}
.market-photo-preview button {
  font-size: 12px;
}
.market-photo-preview input[type="file"],
.market-field input[type="file"] {
  max-width: 100%;
}
.market-root button.market-listing,
.market-root button.market-category,
.market-root button.market-inbox-card {
  background: var(--market-surface);
  border-color: var(--market-line);
}
.market-root .market-alert button {
  margin: 6px 0 0 8px;
}
/* These account accents need the darker shared fill for readable white labels.
   Ink keeps its existing theme-aware foreground rather than Space's fixed white. */
body:is(
    [data-accent="green"],
    [data-accent="orange"],
    [data-accent="teal"],
    [data-accent="sky"],
    [data-accent="amber"]
  )
  .market-root {
  --market-solid: var(--accent-dark);
}
@media (max-width: 700px) {
  .market-root button {
    min-height: 44px;
  }
  .market-root .market-field input:not([type="checkbox"]):not([type="file"]),
  .market-root .market-field select,
  .market-root .market-field textarea {
    font-size: 16px;
  }
  .market-root .market-listing h3 {
    font-size: 14px;
  }
  .market-root .market-card {
    padding: 16px;
  }
  .market-root .market-form-section {
    padding: 16px;
  }
  .market-root .market-tabs button {
    font-size: 13px;
  }
  .market-root .market-photo-preview button {
    min-height: 44px;
  }
}

/* Market presentation: quiet neutral surfaces, product-led cards and clear hierarchy.
   Account accents remain reserved for actions, selection and focus. */
.market-root {
  --text: #f2f1ed;
  --text2: #c4c5c7;
  --text3: #999da3;
  --market-canvas: #141517;
  --market-surface: #1c1e21;
  --market-control: #202226;
  --market-line: #303338;
  --market-control-line: #41454b;
  --market-hover: #282b2f;
  --market-soft: color-mix(
    in srgb,
    var(--market-accent) 10%,
    var(--market-surface)
  );
  background: var(--market-canvas);
  max-width: 1240px;
  padding: 36px 36px 64px;
  min-height: calc(100dvh - 80px);
}
body.light .market-root {
  --text: #252723;
  --text2: #555a55;
  --text3: #696e68;
  --market-canvas: #faf9f6;
  --market-surface: #fff;
  --market-control: #fff;
  --market-line: #e7e7e0;
  --market-control-line: #d8dbd3;
  --market-hover: #f1f2ec;
}
.main-wrap:has(> #marketPage[style*="display: block"]) {
  background: #141517;
}
body.light .main-wrap:has(> #marketPage[style*="display: block"]) {
  background: #faf9f6;
}
.market-page-heading {
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 20px;
}
.market-page-heading > button {
  margin-top: 23px;
}
.market-page-heading > button > .market-icon {
  width: 18px;
  height: 18px;
}
.market-eyebrow {
  display: block;
  margin-bottom: 10px;
  color: var(--text3);
  font-size: 10px;
  line-height: 1.4;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.market-page-heading h1 {
  font-size: clamp(28px, 3.2vw, 40px);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.12;
}
.market-root h2,
.market-root h3 {
  font-weight: 600;
  letter-spacing: -0.025em;
}
.market-content {
  gap: 22px;
}
.market-content > p {
  margin: 0;
  max-width: 760px;
}
.market-root button {
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 550;
  background: var(--market-surface);
}
.market-root button:hover {
  background: var(--market-hover);
  filter: none;
}
.market-root button.market-button-primary {
  padding-inline: 22px;
  font-weight: 600;
  box-shadow: 0 1px 2px #00000012;
}
.market-root button.market-button-quiet {
  background: transparent;
}
.market-intro {
  justify-content: flex-start;
  gap: 10px;
}
.market-intro > p {
  flex: 1;
  font-size: 15px;
  color: var(--text2);
}
.market-tabs {
  min-height: 48px;
  gap: 28px;
}
.market-tabs button {
  flex: 0 1 auto;
  min-width: 64px;
  min-height: 48px;
  padding: 0 4px;
  font-size: 14px;
  border-radius: 0;
  background: transparent;
}
.market-tabs button[aria-current="page"]::after {
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 0;
}
.market-shortcuts {
  gap: 4px;
  width: fit-content;
  max-width: 100%;
  margin: -8px 0 0;
  padding: 5px;
  border: 1px solid var(--market-line);
  border-radius: 14px;
  background: var(--market-surface);
  overflow: visible;
}
.market-shortcuts button {
  position: relative;
  gap: 9px;
  min-height: 44px;
  padding: 10px 14px;
  border: 0;
  border-radius: 9px;
  color: var(--text2);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  background: transparent;
}
.market-shortcuts button:hover,
.market-shortcuts button[aria-current="page"] {
  color: var(--text);
  background: var(--market-hover);
}
.market-shortcuts button[aria-current="page"] {
  font-weight: 600;
}
.market-shortcuts button:focus-visible {
  outline-offset: -2px;
}
.market-shortcuts .market-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  stroke-width: 1.75;
}
.market-shortcuts .market-unread-badge {
  margin-left: 0;
  font-size: 10px;
}
.market-shortcut-label {
  white-space: nowrap;
}
.market-search-bar input {
  box-shadow: 0 2px 5px #00000003;
  min-height: 52px !important;
  border-radius: 12px;
}
.market-browse-controls {
  margin-top: -14px;
}
.market-filter-panel {
  padding-bottom: 4px;
}
.market-filters {
  padding: 14px 0 8px;
  gap: 18px;
}
.market-field {
  gap: 8px;
  font-size: 12px;
  font-weight: 550;
}
.market-field input,
.market-field select,
.market-field textarea {
  border-radius: 8px;
  padding: 11px 13px;
  box-shadow: 0 1px 2px #00000003;
}
.market-field input:focus,
.market-field select:focus,
.market-field textarea:focus {
  border-color: var(--market-ink);
}
.market-result-count {
  font-size: 12px;
  font-weight: 500;
}
.market-grid {
  gap: 28px 22px;
}
.market-root button.market-listing {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.market-root button.market-listing:hover {
  background: transparent;
}
.market-listing > img,
.market-listing > .market-art {
  aspect-ratio: 1;
  border-radius: 14px;
  background: var(--market-hover);
}
.market-listing-info {
  padding: 15px 2px 0;
  gap: 7px;
}
.market-root .market-listing h3 {
  font-size: 15px;
  font-weight: 500;
}
.market-listing .market-price {
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.035em;
}
.market-listing p {
  color: var(--text3);
}
.market-status {
  padding: 4px 9px;
  border-radius: 6px;
  background: var(--market-hover);
  color: var(--text2);
  font-weight: 500;
  font-size: 11px;
}
.market-card,
.market-root button.market-category,
.market-root button.market-inbox-card {
  padding: 24px;
  border-radius: 14px;
  box-shadow: 0 2px 4px #00000002;
}
.market-root button.market-category {
  gap: 16px;
  min-height: 185px;
}
.market-category-icon {
  background: var(--market-hover);
  color: var(--text);
  border-radius: 50%;
  width: 44px;
  height: 44px;
}
.market-root button.market-category:hover,
.market-root button.market-inbox-card:hover {
  border-color: var(--market-control-line);
  background: var(--market-hover);
}
.market-detail-layout,
.market-detail-information {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 40px;
}
.market-gallery .market-gallery-open img {
  height: 440px;
  background: var(--market-hover);
}
.market-detail-placeholder {
  min-height: 440px;
  background: var(--market-hover);
}
.market-detail-summary {
  gap: 20px;
  padding-top: 4px;
}
.market-root .market-detail-summary h2 {
  font-size: clamp(26px, 2.8vw, 34px);
  line-height: 1.15;
  font-weight: 550;
}
.market-detail-summary > .market-price {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.04em;
}
.market-detail-information {
  padding-top: 24px;
  border-top: 1px solid var(--market-line);
}
.market-quick-message {
  padding: 22px;
  border-radius: 14px;
  gap: 16px;
}
.market-quick-message h3 {
  margin: 0;
}
.market-form {
  padding: 28px;
  max-width: 860px;
  gap: 20px;
  border: 1px solid var(--market-line);
  border-radius: 16px;
  background: var(--market-surface);
}
.market-form > button {
  justify-self: start;
}
.market-form:has(> .market-form-section) {
  max-width: 1100px;
  padding: 0;
  gap: 0;
  counter-reset: market-section;
}
.market-form-section {
  grid-template-columns: minmax(180px, 0.7fr) minmax(0, 1.65fr);
  gap: 36px;
  padding: 30px;
  border: 0;
  border-bottom: 1px solid var(--market-line);
  border-radius: 0;
  background: transparent;
  counter-increment: market-section;
}
.market-form-section > .market-section-heading {
  align-content: start;
  gap: 9px;
}
.market-form-section > .market-section-heading::before {
  content: counter(market-section, decimal-leading-zero);
  font-size: 11px;
  color: var(--text3);
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.market-form-section .market-section-heading h2 {
  font-size: 18px;
}
.market-form-section .market-muted {
  font-size: 12px;
}
.market-form-columns {
  gap: 20px 16px;
}
.market-photo-picker {
  min-height: 132px;
  align-content: center;
  padding: 24px;
  background: var(--market-canvas);
  border: 1px dashed var(--market-control-line);
}
.market-photo-picker > span:first-child {
  color: var(--text2);
}
.market-photo-count {
  padding-top: 2px;
  font-variant-numeric: tabular-nums;
}
.market-photo-preview:empty {
  display: none;
}
.market-form-actions {
  padding: 20px 30px;
  border: 0;
  background: transparent;
}
.market-form > .market-field:has(input[type="checkbox"]) {
  flex-direction: row;
  justify-content: space-between;
  min-height: 40px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--market-line);
  font-size: 14px;
}
.market-form > .market-field:has(input[type="checkbox"]) input {
  flex: 0 0 20px;
}
.market-card > .market-price {
  display: block;
  margin: 8px 0 18px;
  font-size: 30px;
}
.market-messages {
  min-height: 180px;
  padding: 24px;
  background: var(--market-surface);
  border: 1px solid var(--market-line);
  border-radius: 16px;
  align-content: start;
}
.market-message {
  padding: 12px 16px;
  background: var(--market-hover);
  border-radius: 14px 14px 14px 4px;
}
.market-message.is-own {
  border-radius: 14px 14px 4px 14px;
}
.market-message .market-muted {
  margin-top: 7px;
  font-size: 11px;
}
.market-empty {
  padding: 64px 24px;
  border: 1px solid var(--market-line);
  background: var(--market-surface);
}
.market-alert {
  border: 1px solid var(--market-line);
  background: var(--market-surface);
  padding: 18px 20px;
}
.market-root .market-dialog {
  padding: 28px;
  border-radius: 18px;
}
.market-dialog-heading h2 {
  margin: 0;
  font-size: 23px;
}
.market-dialog::backdrop {
  background: #11131599;
}
@media (max-width: 850px) {
  .market-root {
    padding: 26px 20px 48px;
  }
  .market-detail-layout,
  .market-detail-information {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .market-form-section {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .market-form-section > .market-section-heading::before {
    display: none;
  }
}
@media (max-width: 700px) {
  .market-root {
    padding: 22px 16px 48px;
  }
  .market-page-heading {
    gap: 10px;
    margin-bottom: 16px;
  }
  .market-page-heading h1 {
    font-size: 28px;
  }
  .market-page-heading > button {
    margin-top: 17px;
    padding-inline: 6px;
  }
  .market-eyebrow {
    font-size: 9px;
    margin-bottom: 8px;
  }
  .market-content {
    gap: 20px;
  }
  .market-root button {
    min-height: 44px;
  }
  .market-intro {
    flex-wrap: wrap;
  }
  .market-intro > p {
    flex-basis: 100%;
    font-size: 14px;
  }
  .market-intro > button {
    font-size: 12px;
  }
  .market-tabs {
    gap: 0;
    justify-content: space-between;
  }
  .market-tabs button {
    flex: 1;
    min-width: 0;
  }
  .market-shortcuts {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    width: 100%;
    gap: 2px;
    margin-right: 0;
    padding: 4px;
  }
  .market-shortcuts button {
    flex-direction: column;
    justify-content: flex-start;
    min-width: 0;
    min-height: 68px;
    padding: 10px 2px 6px;
    gap: 7px;
    font-size: 11px;
  }
  .market-shortcut-label {
    white-space: normal;
    text-align: center;
  }
  .market-shortcuts .market-icon {
    width: 21px;
    height: 21px;
  }
  .market-shortcuts .market-unread-badge {
    position: absolute;
    top: 3px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    font-size: 9px;
  }
  .market-grid {
    gap: 24px 14px;
  }
  .market-listing-info {
    padding: 12px 0 0;
  }
  .market-root .market-listing h3 {
    font-size: 14px;
  }
  .market-listing .market-price {
    font-size: 19px;
  }
  .market-listing > img,
  .market-listing > .market-art {
    border-radius: 10px;
  }
  .market-filters {
    gap: 16px 12px;
  }
  .market-root .market-card,
  .market-root button.market-category,
  .market-root button.market-inbox-card {
    padding: 20px;
  }
  .market-root button.market-category {
    min-height: 180px;
  }
  .market-gallery .market-gallery-open img {
    height: 320px;
  }
  .market-detail-placeholder {
    min-height: 300px;
  }
  .market-detail-information {
    padding-top: 20px;
  }
  .market-form {
    padding: 20px;
  }
  .market-form:has(> .market-form-section) {
    padding: 0;
  }
  .market-root .market-form-section {
    padding: 22px 20px;
  }
  .market-form-columns {
    gap: 18px;
  }
  .market-photo-picker {
    padding: 16px;
    min-height: 120px;
  }
  .market-form-actions {
    padding: 18px 20px;
  }
  .market-form-actions button {
    flex-basis: 40%;
  }
  .market-quick-message {
    padding: 20px;
  }
  .market-messages {
    padding: 16px;
  }
  .market-root .market-dialog {
    padding: 20px;
  }
}

/* Seller workspace: inventory first, with guidance alongside the empty state. */
.market-sell-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: -4px;
}
.market-sell-intro p {
  margin: 0;
  color: var(--text2);
  font-size: 15px;
}
.market-sell-intro > button {
  flex-shrink: 0;
}
.market-sell-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 32px;
  align-items: start;
  margin-top: 10px;
}
.market-sell-inventory {
  min-width: 0;
  display: grid;
  gap: 20px;
}
.market-sell-toolbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.market-sell-toolbar h2,
.market-sell-toolbar p {
  margin: 0;
}
.market-sell-toolbar p {
  font-size: 12px;
}
.market-sell-statuses {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.market-root .market-sell-statuses button {
  padding: 8px 11px;
  min-height: 38px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text2);
  gap: 8px;
}
.market-root .market-sell-statuses button[aria-pressed="true"] {
  background: var(--market-surface);
  border-color: var(--market-control-line);
  box-shadow: 0 1px 3px #00000008;
  color: var(--text);
  font-weight: 650;
}
.market-root .market-sell-statuses button:hover {
  background: var(--market-hover);
}
.market-sell-count {
  min-width: 22px;
  padding: 2px 5px;
  background: var(--market-hover);
  border-radius: 5px;
  font-size: 11px;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
}
.market-sell-results {
  display: grid;
  gap: 14px;
  min-width: 0;
}
.market-sell-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 44px 28px;
  min-height: 350px;
  border: 1px solid var(--market-line);
  border-radius: 16px;
  background: var(--market-surface);
}
.market-sell-empty-icon {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 18px;
  background: var(--market-soft);
  color: var(--market-ink);
  margin-bottom: 24px;
}
.market-sell-empty-icon .market-icon {
  width: 28px;
  height: 28px;
}
.market-root .market-sell-empty h3 {
  font-size: 23px;
  line-height: 1.25;
  margin: 0;
}
.market-sell-empty p {
  max-width: 390px;
  font-size: 14px;
  color: var(--text2);
  margin: 12px 0 24px;
}
.market-sell-empty > .market-muted {
  font-size: 11px;
  margin-top: 14px;
}
.market-sell-tips {
  padding: 24px 0 0 26px;
  border-left: 1px solid var(--market-line);
}
.market-sell-tips > .market-eyebrow {
  font-size: 9px;
  line-height: 1.6;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}
.market-sell-tips h2 {
  font-size: 20px;
  line-height: 1.3;
  margin: 0 0 26px;
}
.market-sell-tips ol {
  list-style: none;
  padding: 0;
  margin: 0 0 22px;
  counter-reset: sell-tip;
  display: grid;
  gap: 22px;
}
.market-sell-tips li {
  counter-increment: sell-tip;
  position: relative;
  padding-left: 28px;
}
.market-sell-tips li::before {
  content: counter(sell-tip, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 2px;
  font-size: 10px;
  color: var(--text3);
}
.market-sell-tips strong {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  display: block;
}
.market-sell-tips li p {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--text3);
  line-height: 1.65;
}
.market-root .market-sell-tips button {
  padding-left: 0;
}
.market-root .market-sell-card {
  padding: 20px;
  display: grid;
  gap: 18px;
}
.market-sell-card > .market-actions {
  margin: 0;
  padding-top: 16px;
  border-top: 1px solid var(--market-line);
}
.market-root .market-sell-card .market-listing {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 20px;
}
.market-sell-card .market-listing > img,
.market-sell-card .market-listing > .market-art {
  width: 100px;
  height: 110px;
  border-radius: 10px;
}
.market-sell-card .market-listing-info {
  padding: 0;
  align-content: start;
}
.market-sell-draft-summary {
  display: flex;
  gap: 18px;
  align-items: center;
  min-width: 0;
}
.market-sell-draft-summary > div:last-child {
  min-width: 0;
}
.market-sell-draft-summary h3 {
  margin: 8px 0;
}
.market-sell-draft-summary p {
  margin: 0;
  font-size: 12px;
}
.market-sell-draft-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 86px;
  flex-shrink: 0;
  border-radius: 10px;
  background: var(--market-hover);
  color: var(--text3);
}
.market-sell-draft-icon .market-icon {
  width: 26px;
  height: 26px;
}
@media (max-width: 1300px) {
  .market-sell-workspace {
    grid-template-columns: minmax(0, 1fr);
  }
  .market-sell-tips {
    padding: 24px;
    border: 1px solid var(--market-line);
    border-radius: 14px;
  }
  .market-sell-tips ol {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 10px;
  }
  .market-sell-tips h2 {
    margin-bottom: 20px;
  }
}
@media (max-width: 700px) {
  .market-sell-intro {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }
  .market-sell-intro p {
    font-size: 14px;
    max-width: 290px;
  }
  .market-sell-intro > button {
    width: 100%;
  }
  .market-sell-workspace {
    margin-top: 4px;
    gap: 24px;
  }
  .market-sell-inventory {
    gap: 16px;
  }
  .market-sell-toolbar {
    display: grid;
    gap: 6px;
  }
  .market-sell-statuses {
    flex-wrap: wrap;
    padding-bottom: 5px;
    gap: 4px;
  }
  .market-root .market-sell-statuses button {
    flex-shrink: 0;
    min-height: 44px;
    font-size: 12px;
    padding: 8px 10px;
  }
  .market-sell-empty {
    padding: 34px 22px;
    min-height: 320px;
  }
  .market-root .market-sell-empty h3 {
    font-size: 21px;
  }
  .market-sell-tips {
    padding: 22px;
  }
  .market-sell-tips ol {
    grid-template-columns: 1fr;
  }
  .market-root .market-sell-card {
    padding: 18px;
  }
  .market-root .market-sell-card .market-listing {
    grid-template-columns: 80px minmax(0, 1fr);
    gap: 16px;
  }
  .market-sell-card .market-listing > img,
  .market-sell-card .market-listing > .market-art {
    width: 80px;
    height: 100px;
  }
}

/* Listing detail: product, seller and contact information in a clear hierarchy. */
.market-page-heading.market-listing-heading {
  align-items: center;
  margin-bottom: 28px;
  gap: 24px;
}
.market-listing-heading > button {
  margin-top: 0;
}
.market-listing-heading .market-eyebrow {
  margin-bottom: 6px;
}
.market-listing-heading h1 {
  font-size: 22px;
  letter-spacing: -0.025em;
}
.market-listing-content {
  gap: 36px;
}
.market-listing-content .market-detail-layout {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 36px;
}
.market-listing-content .market-gallery {
  gap: 14px;
}
.market-listing-content .market-gallery-open {
  border-radius: 16px;
  border: 1px solid var(--market-line);
  background: var(--market-hover);
}
.market-listing-content .market-gallery-open img {
  height: auto;
  aspect-ratio: 1;
  min-height: 320px;
  max-height: 580px;
  border-radius: 0;
}
.market-listing-content .market-photo-caption {
  border-radius: 6px;
  font-size: 11px;
  padding: 8px 10px;
  bottom: 16px;
  left: 16px;
}
.market-listing-content .market-gallery-thumbnails {
  gap: 10px;
}
.market-listing-content .market-gallery-thumbnails button {
  border-radius: 9px;
  flex-basis: 72px;
}
.market-listing-content .market-gallery-thumbnails img {
  width: 64px;
  height: 64px;
  border-radius: 6px;
}
.market-listing-content .market-detail-placeholder {
  aspect-ratio: 1;
  min-height: 320px;
  border: 1px solid var(--market-line);
  border-radius: 16px;
  padding: 30px;
  text-align: center;
  gap: 14px;
}
.market-detail-placeholder > .market-icon {
  width: 42px;
  height: 42px;
  stroke-width: 1.2;
}
.market-detail-placeholder > strong {
  color: var(--text2);
  font-size: 15px;
  font-weight: 500;
}
.market-detail-placeholder > span {
  max-width: 250px;
  font-size: 12px;
}
.market-listing-content .market-detail-summary {
  gap: 20px;
  padding-top: 0;
}
.market-listing-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.market-listing-meta .market-status {
  border: 1px solid var(--market-line);
  background: var(--market-surface);
}
.market-listing-meta .market-status[data-status="active"]::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  margin-right: 6px;
  vertical-align: 2px;
}
.market-listing-meta .market-muted {
  font-size: 12px;
}
.market-root .market-listing-content .market-detail-summary h2 {
  font-size: clamp(26px, 2.7vw, 36px);
  line-height: 1.14;
  letter-spacing: -0.04em;
}
.market-listing-price-block {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
}
.market-listing-price-block .market-price {
  font-size: 32px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.035em;
}
.market-listing-price-block .market-muted {
  font-size: 12px;
}
.market-listing-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 0;
  padding: 18px 0;
  border-block: 1px solid var(--market-line);
}
.market-listing-facts dt {
  font-size: 11px;
  color: var(--text3);
  margin-bottom: 5px;
}
.market-listing-facts dd {
  font-size: 14px;
  font-weight: 500;
  margin: 0;
  overflow-wrap: anywhere;
}
.market-listing-seller {
  display: flex;
  gap: 12px;
  align-items: center;
}
.market-listing-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border: 1px solid var(--market-line);
  border-radius: 50%;
  background: var(--market-surface);
  font-size: 16px;
  color: var(--text2);
}
.market-listing-seller-copy {
  min-width: 0;
  flex: 1;
}
.market-listing-seller-copy p {
  font-size: 13px;
  font-weight: 550;
}
.market-listing-seller-copy .market-muted {
  font-size: 11px;
  display: block;
  margin-top: 4px;
}
.market-root .market-listing-seller button {
  font-size: 12px;
  padding-inline: 8px;
  flex-shrink: 0;
}
.market-listing-content .market-detail-summary > .market-actions {
  gap: 8px;
}
.market-listing-content .market-quick-message {
  padding: 24px;
  gap: 14px;
  box-shadow: 0 4px 16px #00000003;
}
.market-listing-content .market-quick-message > p {
  font-size: 12px;
  color: var(--text3);
}
.market-listing-content .market-quick-message textarea {
  min-height: 82px;
  background: var(--market-canvas);
}
.market-listing-content .market-contact-actions {
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.market-listing-content .market-contact-actions > button:first-child {
  grid-column: 1/-1;
  order: 1;
}
.market-listing-content
  .market-contact-actions
  > button:last-child:nth-child(2) {
  grid-column: 1/-1;
}
.market-root .market-listing-secondary {
  padding-top: 2px;
  gap: 6px;
}
.market-root .market-listing-secondary button {
  font-size: 12px;
  color: var(--text3);
  padding: 8px 10px;
}
.market-listing-content .market-detail-information {
  margin: 0;
  padding-top: 30px;
  gap: 36px;
}
.market-listing-content .market-detail-description {
  padding: 8px 0;
}
.market-listing-content .market-detail-description > p {
  margin: 0;
  line-height: 1.8;
  font-size: 14px;
}
.market-listing-condition-note {
  margin-top: 24px;
  padding: 20px;
  border: 1px solid var(--market-line);
  border-radius: 12px;
  background: var(--market-surface);
}
.market-listing-condition-note h4 {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
}
.market-listing-content .market-listing-condition-note p {
  margin: 0;
  font-size: 13px;
  color: var(--text2);
}
.market-listing-spec-card {
  padding: 24px;
}
.market-listing-spec-card .market-specs {
  gap: 0 24px;
}
.market-listing-spec-card dt,
.market-listing-spec-card dd {
  padding: 12px 0;
  border-bottom: 1px solid var(--market-line);
  font-size: 12px;
}
.market-listing-spec-card dt:last-of-type,
.market-listing-spec-card dd:last-child {
  border: 0;
  padding-bottom: 0;
}
.market-listing-availability {
  padding: 22px;
  border: 1px solid var(--market-line);
  border-radius: 12px;
  background: var(--market-surface);
}
.market-listing-availability h3 {
  margin: 0 0 8px;
}
.market-listing-availability p {
  color: var(--text2);
  font-size: 13px;
}
@media (max-width: 1000px) {
  .market-listing-content .market-detail-layout,
  .market-listing-content .market-detail-information {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .market-listing-content .market-gallery-open img {
    max-height: 520px;
  }
  .market-listing-content .market-detail-placeholder {
    min-height: 300px;
    max-height: 460px;
  }
}
@media (max-width: 700px) {
  .market-page-heading.market-listing-heading {
    gap: 18px;
    margin-bottom: 24px;
  }
  .market-listing-heading h1 {
    font-size: 20px;
  }
  .market-listing-heading > button {
    margin-top: 0;
  }
  .market-listing-content .market-gallery-open img {
    min-height: 260px;
  }
  .market-listing-content .market-detail-placeholder {
    min-height: 260px;
  }
  .market-listing-content .market-detail-summary {
    gap: 18px;
  }
  .market-listing-price-block .market-price {
    font-size: 30px;
  }
  .market-listing-seller {
    flex-wrap: wrap;
    gap: 10px;
  }
  .market-listing-seller-copy {
    flex-basis: calc(100% - 54px);
  }
  .market-root .market-listing-seller button {
    margin-left: 52px;
    min-height: 36px;
    padding: 4px 0;
  }
  .market-listing-content .market-quick-message {
    padding: 20px;
  }
  .market-listing-content .market-detail-information {
    padding-top: 24px;
  }
  .market-listing-condition-note {
    padding: 18px;
  }
}
/* Keep the description directly under the gallery on wide screens. */
@media (min-width: 1001px) {
  .market-listing-content:has(> .market-detail-layout) {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    grid-template-rows: max-content 1fr;
    gap: 28px 36px;
    align-items: start;
  }
  .market-listing-content > .market-detail-layout {
    display: contents;
  }
  .market-listing-content .market-detail-layout > .market-gallery {
    grid-column: 1;
    grid-row: 1;
  }
  .market-listing-content .market-detail-layout > .market-detail-summary {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
  .market-listing-content > .market-detail-information {
    grid-column: 1;
    grid-row: 2;
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .market-listing-content > h3,
  .market-listing-content > p {
    grid-column: 1 / -1;
  }
}

/* Offer and conversation flows share the same item-first presentation. */
.market-offer-content,
.market-conversation-content {
  gap: 24px;
}
.market-offer-intro {
  max-width: 680px;
  font-size: 14px;
}
.market-root .market-negotiation-item {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px;
}
.market-negotiation-item > img,
.market-negotiation-item > .market-art {
  width: 72px;
  height: 80px;
  flex-shrink: 0;
  border-radius: 10px;
  object-fit: cover;
  background: var(--market-hover);
  font-size: 26px;
}
.market-negotiation-item > div:not(.market-art) {
  flex: 1;
  min-width: 0;
}
.market-negotiation-item h2 {
  margin: 0 0 6px;
  font-size: 19px;
}
.market-negotiation-item .market-eyebrow {
  font-size: 9px;
  margin-bottom: 6px;
}
.market-negotiation-item p {
  margin: 0;
  font-size: 12px;
}
.market-negotiation-item > button {
  flex-shrink: 0;
}
.market-offer-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(250px, 1fr);
  gap: 28px;
  align-items: start;
}
.market-root .market-offer-form {
  padding: 0;
  gap: 0;
  max-width: none;
}
.market-offer-section {
  display: grid;
  gap: 18px;
  padding: 26px;
  border-bottom: 1px solid var(--market-line);
}
.market-offer-section h2 {
  font-size: 18px;
  margin: 0;
}
.market-offer-section > p {
  margin: -8px 0 0;
  font-size: 12px;
}
.market-offer-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.market-offer-fields > .market-muted,
.market-offer-fields > .market-alert,
.market-offer-fields > .market-field:has([aria-label="Your item to trade"]) {
  grid-column: 1/-1;
}
.market-offer-fields > .market-muted {
  margin: -8px 0 0;
  font-size: 12px;
}
.market-offer-fields > .market-field:has([aria-label="Amount"]) input {
  font-size: 24px;
  font-weight: 550;
  padding: 13px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.market-offer-fields:has([aria-label="Cash paid by"]:disabled)
  > .market-field:has([aria-label="Amount"]) {
  grid-column: 1/-1;
}
.market-offer-section textarea {
  min-height: 120px;
}
.market-offer-submit {
  display: grid;
  gap: 16px;
  padding: 24px 26px;
}
.market-offer-submit p {
  margin: 0;
  font-size: 12px;
}
.market-offer-submit > button {
  justify-self: end;
  min-width: 160px;
}
.market-offer-aside {
  display: grid;
  gap: 24px;
}
.market-root .market-offer-recap {
  display: grid;
  gap: 16px;
  padding: 26px;
}
.market-offer-recap .market-eyebrow {
  margin: 0;
}
.market-offer-recap > .market-price {
  font-size: 30px;
  letter-spacing: -0.035em;
  line-height: 1.2;
  margin: 0;
}
.market-offer-recap p {
  margin: 0;
  font-size: 12px;
  line-height: 1.7;
}
.market-offer-recap > p:last-child {
  padding-top: 16px;
  border-top: 1px solid var(--market-line);
}
.market-offer-trade-preview {
  color: var(--text);
  font-weight: 550;
}
.market-offer-next {
  padding: 0 8px;
}
.market-offer-next h3 {
  font-size: 16px;
  margin: 0 0 18px;
}
.market-offer-next ol {
  display: grid;
  gap: 16px;
  padding-left: 20px;
  margin: 0;
  color: var(--text2);
  font-size: 12px;
  line-height: 1.65;
}
.market-offer-next li {
  padding-left: 6px;
}
.market-offer-next button {
  margin-top: 18px;
}
.market-conversation-content {
  max-width: 1000px;
}
.market-chat-panel {
  min-width: 0;
  border: 1px solid var(--market-line);
  border-radius: 18px;
  background: var(--market-surface);
  overflow: hidden;
}
.market-root .market-chat-summary {
  display: flex;
  gap: 16px;
  align-items: center;
  border: 0;
  border-radius: 0;
  padding: 24px;
  box-shadow: none;
}
.market-chat-summary > img,
.market-chat-summary > .market-art {
  width: 58px;
  height: 68px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--market-hover);
  border-radius: 9px;
  font-size: 24px;
}
.market-chat-item-copy {
  flex: 1;
  min-width: 0;
}
.market-chat-summary .market-eyebrow {
  margin-bottom: 6px;
  font-size: 9px;
}
.market-chat-item-copy h2 {
  margin: 0 0 5px;
  font-size: 19px;
}
.market-chat-item-copy p {
  margin: 0;
  font-size: 13px;
}
.market-chat-summary > .market-status {
  flex-shrink: 0;
}
.market-chat-toolbar {
  padding: 0 24px 20px;
  gap: 8px;
  border-bottom: 1px solid var(--market-line);
}
.market-root .market-chat-toolbar button {
  min-height: 36px;
  font-size: 12px;
  padding: 8px 12px;
}
.market-chat-panel .market-messages {
  border: 0;
  border-radius: 0;
  min-height: 240px;
  max-height: 48dvh;
  padding: 26px;
  background: var(--market-canvas);
  gap: 14px;
}
.market-chat-panel .market-message {
  width: fit-content;
  max-width: 78%;
  background: var(--market-surface);
  border: 1px solid var(--market-line);
  padding: 12px 16px;
}
.market-chat-panel .market-message.is-own {
  background: var(--market-soft);
  border-color: transparent;
}
.market-chat-panel .market-message p {
  margin: 0;
}
.market-chat-panel .market-message small {
  display: block;
  margin-top: 8px;
  font-size: 10px;
}
.market-chat-panel .market-message img {
  max-width: 100% !important;
  border-radius: 8px;
  margin-top: 10px;
}
.market-chat-panel > .market-muted {
  margin: 0;
  padding: 10px 24px;
  background: var(--market-canvas);
  text-align: center;
  font-size: 10px;
}
.market-chat-empty {
  align-self: center;
  justify-self: center;
  text-align: center;
  max-width: 340px;
  padding: 30px 8px;
}
.market-chat-empty h3 {
  margin: 0 0 12px;
  font-size: 19px;
}
.market-chat-empty p {
  margin: 0;
  font-size: 13px;
  color: var(--text3);
}
.market-chat-events:empty {
  display: none;
}
.market-chat-events {
  padding: 16px 24px;
  gap: 10px;
}
.market-chat-composer {
  display: grid;
  gap: 16px;
  padding: 24px;
  border-top: 1px solid var(--market-line);
}
.market-chat-composer > .market-eyebrow {
  margin: 0;
  font-size: 9px;
}
.market-chat-suggestions {
  gap: 8px;
}
.market-root .market-chat-suggestions button {
  border-radius: 20px;
  padding: 7px 12px;
  min-height: 34px;
  font-size: 11px;
  background: var(--market-canvas);
}
.market-chat-composer textarea {
  min-height: 95px;
  background: var(--market-canvas);
}
.market-chat-composer > .market-button-primary {
  justify-self: end;
  min-width: 150px;
}
.market-chat-composer > p {
  margin: -8px 0 0;
  font-size: 11px;
}
.market-chat-composer .market-photo-preview:empty {
  display: none;
}
.market-chat-composer .market-field:has(input[type="file"]) {
  font-size: 11px;
}
.market-chat-composer input[type="file"] {
  border-style: dashed;
  padding: 10px;
  font-size: 12px;
}
@media (max-width: 1100px) {
  .market-offer-layout {
    grid-template-columns: 1fr;
  }
  .market-offer-aside {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}
@media (max-width: 700px) {
  .market-root .market-negotiation-item {
    padding: 18px;
    gap: 14px;
    flex-wrap: wrap;
  }
  .market-negotiation-item > img,
  .market-negotiation-item > .market-art {
    width: 56px;
    height: 64px;
  }
  .market-negotiation-item > div:not(.market-art) {
    flex-basis: calc(100% - 70px);
  }
  .market-negotiation-item h2 {
    font-size: 17px;
  }
  .market-negotiation-item > button {
    margin-left: 70px;
    padding: 0;
    min-height: 36px;
  }
  .market-offer-layout {
    gap: 22px;
  }
  .market-offer-fields,
  .market-offer-aside {
    grid-template-columns: 1fr;
  }
  .market-offer-section {
    padding: 22px 20px;
  }
  .market-offer-submit {
    padding: 20px;
  }
  .market-offer-submit > button {
    width: 100%;
  }
  .market-root .market-offer-recap {
    padding: 22px;
  }
  .market-root .market-chat-summary {
    padding: 20px;
    flex-wrap: wrap;
    gap: 12px;
  }
  .market-chat-summary > .market-status {
    margin-left: 70px;
  }
  .market-chat-item-copy {
    flex-basis: calc(100% - 70px);
  }
  .market-chat-item-copy h2 {
    font-size: 17px;
  }
  .market-chat-toolbar {
    padding: 0 18px 18px;
  }
  .market-root .market-chat-toolbar button {
    min-height: 44px;
  }
  .market-chat-panel .market-messages {
    min-height: 220px;
    padding: 20px 16px;
  }
  .market-chat-panel .market-message {
    max-width: 90%;
    padding: 11px 13px;
  }
  .market-chat-composer {
    padding: 20px;
  }
  .market-root .market-chat-suggestions button {
    min-height: 44px;
    text-align: left;
  }
  .market-chat-composer > .market-button-primary {
    width: 100%;
  }
}

/* Seller profile: identity and activity above listings and buyer feedback. */
.market-seller-content {
  gap: 32px;
}
.market-seller-profile {
  padding: 30px;
  border: 1px solid var(--market-line);
  border-radius: 18px;
  background: var(--market-surface);
}
.market-seller-profile .market-seller-identity {
  display: flex;
  align-items: center;
  gap: 22px;
}
.market-seller-profile .market-seller-identity > img,
.market-seller-profile .market-seller-identity > .market-art,
.market-seller-profile .market-seller-initial {
  width: 88px;
  height: 88px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid var(--market-line);
  background: var(--market-hover);
  color: var(--text2);
  font-size: 32px;
}
.market-seller-profile-copy {
  min-width: 0;
}
.market-seller-profile-copy .market-eyebrow {
  margin-bottom: 8px;
  font-size: 9px;
}
.market-root .market-seller-profile-copy h2 {
  margin: 0;
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: -0.035em;
}
.market-seller-profile-copy p {
  margin: 8px 0 0;
  font-size: 12px;
}
.market-seller-stats {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--market-line);
  gap: 0;
}
.market-seller-stats .market-card {
  padding: 0 24px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: left;
  gap: 6px;
}
.market-seller-stats .market-card:first-child {
  padding-left: 0;
}
.market-seller-stats .market-card + .market-card {
  border-left: 1px solid var(--market-line);
}
.market-seller-stats strong {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.035em;
}
.market-seller-stats span {
  font-size: 11px;
  color: var(--text3);
}
.market-seller-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 32px;
  align-items: start;
}
.market-seller-listings,
.market-seller-sidebar {
  min-width: 0;
}
.market-seller-section-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 22px;
}
.market-seller-section-heading h3 {
  margin: 0;
  font-size: 20px;
}
.market-seller-section-heading > span {
  font-size: 11px;
}
.market-seller-listings .market-grid {
  grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
  gap: 26px 20px;
}
.market-seller-reviews {
  padding: 24px;
  border: 1px solid var(--market-line);
  border-radius: 16px;
  background: var(--market-surface);
}
.market-seller-rating-overview {
  padding-bottom: 22px;
}
.market-seller-rating-overview > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.market-seller-rating-overview strong {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.04em;
}
.market-seller-rating-star {
  display: inline-flex;
  align-self: center;
  color: var(--market-ink);
}
.market-seller-rating-star > .market-icon {
  width: 22px;
  height: 22px;
  fill: currentColor;
}
.market-seller-rating-overview p {
  margin: 7px 0 0;
  font-size: 11px;
}
.market-seller-review {
  padding: 22px 0;
  border-top: 1px solid var(--market-line);
}
.market-seller-review:last-child {
  padding-bottom: 0;
}
.market-seller-review header {
  display: flex;
  align-items: center;
  gap: 9px;
}
.market-seller-review header > strong {
  min-width: 0;
  flex: 1;
  font-size: 12px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.market-review-initial {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: var(--market-hover);
  color: var(--text2);
  border-radius: 50%;
  font-size: 11px;
}
.market-seller-review .market-status {
  white-space: nowrap;
  font-size: 10px;
}
.market-seller-review p {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--text2);
  line-height: 1.75;
  white-space: pre-wrap;
}
.market-seller-review time {
  display: block;
  margin-top: 12px;
  font-size: 10px;
}
.market-seller-completion-note {
  padding: 0 10px;
  margin: 18px 0 0;
  font-size: 11px;
  line-height: 1.7;
}
.market-seller-empty {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 14px;
  min-height: 300px;
  padding: 36px 24px;
  border: 1px solid var(--market-line);
  border-radius: 16px;
  background: var(--market-surface);
  text-align: center;
}
.market-seller-empty > .market-icon {
  width: 30px;
  height: 30px;
  color: var(--text3);
  margin-bottom: 6px;
}
.market-seller-empty h4 {
  margin: 0;
  font-size: 17px;
  font-weight: 550;
  letter-spacing: -0.02em;
}
.market-seller-empty p {
  max-width: 300px;
  margin: 0;
  font-size: 13px;
  color: var(--text3);
}
.market-seller-review-empty {
  min-height: 220px;
  padding: 24px 0;
  border: 0;
}
.market-seller-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--market-line);
  padding-top: 22px;
}
.market-seller-controls h3 {
  margin: 0 0 6px;
  font-size: 14px;
}
.market-seller-controls p {
  margin: 0;
  font-size: 12px;
}
.market-seller-controls .market-actions {
  gap: 8px;
  flex-shrink: 0;
}
@media (max-width: 1100px) {
  .market-seller-layout {
    grid-template-columns: 1fr;
  }
  .market-seller-reviews {
    max-width: none;
  }
}
@media (max-width: 700px) {
  .market-seller-content {
    gap: 26px;
  }
  .market-seller-profile {
    padding: 22px 20px;
  }
  .market-seller-profile .market-seller-identity {
    gap: 16px;
    align-items: flex-start;
  }
  .market-seller-profile .market-seller-identity > img,
  .market-seller-profile .market-seller-identity > .market-art,
  .market-seller-profile .market-seller-initial {
    width: 64px;
    height: 64px;
    font-size: 24px;
  }
  .market-root .market-seller-profile-copy h2 {
    font-size: 24px;
  }
  .market-seller-profile-copy .market-eyebrow {
    font-size: 8px;
    letter-spacing: 0.1em;
  }
  .market-seller-profile-copy p {
    font-size: 11px;
  }
  .market-seller-stats {
    margin-top: 22px;
    padding-top: 20px;
  }
  .market-root .market-seller-stats .market-card {
    padding: 0 12px;
  }
  .market-root .market-seller-stats .market-card:first-child {
    padding-left: 0;
  }
  .market-root .market-seller-stats .market-card:last-child {
    padding-right: 0;
  }
  .market-seller-stats strong {
    font-size: 23px;
  }
  .market-seller-stats span {
    font-size: 10px;
  }
  .market-seller-listings .market-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 14px;
  }
  .market-seller-reviews {
    padding: 22px;
  }
  .market-seller-controls {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }
  .market-seller-controls .market-actions {
    flex-wrap: wrap;
  }
}
