.card:has(.card-link) { position: relative; }
.card-link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin-bottom: 8px;
}

.card-meta .catlabel {
  margin: 0;
  color: #385348;
  font-size: .8125rem;
  font-weight: 600;
  line-height: 1.4;
}

.card h3 {
  min-height: 2.8em;
  margin: 0 0 9px;
  font-size: .9375rem;
  font-weight: 750;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.cardbottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px 10px;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: #385348;
  font-size: .75rem;
  font-weight: 600;
  line-height: 1.4;
}

.cardbottom > :last-child { white-space: nowrap; }

.card-location {
  display: inline-flex;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.card-location-icon {
  flex: none;
  width: .875rem;
  height: .875rem;
  margin-top: .0875rem;
  fill: #ed1b24;
}

.card-status {
  padding: 4px 7px;
  border-radius: 6px;
  background: #edf2ed;
  font-size: .6875rem;
  font-weight: 800;
}

.card-status.status-approved { background: #e5f3d7; }
.card-status.status-pending { background: #fff0c3; }
.card-status.status-rejected { background: #ffe1dc; }

.card-price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 6px;
}

.card-price-row .price {
  min-width: 0;
  font-size: 1.125rem;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}
.card-price-row .price small { font-size: .75rem; }

@media (max-width: 620px) {
  .card h3 { font-size: .875rem; }
  .card-price-row .price { font-size: 1rem; }
  .cardbottom { margin-top: 12px; }
}

.card-price-row .fav {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  margin-inline-start: auto;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
}

.card-price-row .fav:hover { background: #eef5ee; }
.card-price-row .fav.saved { color: #d86747; }
.card-price-row .fav.saved svg { fill: currentColor; }
#market-home.listing-mode > :not(#listing-page), #listing-page[hidden] { display: none; }

#listing-page { padding: 24px 0 48px; }
.listing-trail { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; margin-bottom: 20px; color: #486359; }
.listing-trail a:hover { text-decoration: underline; }
#listing-back { color: var(--ink); font-weight: 800; }
.listing-columns { display: grid; grid-template-columns: minmax(0, 2fr) minmax(275px, 1fr); gap: 18px; align-items: start; }
.listing-media, .listing-summary { display: grid; gap: 18px; min-width: 0; }
.listing-box { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 20px; overflow-wrap: anywhere; }
.listing-box h1 { font-size: clamp(22px, 3vw, 30px); line-height: 1.2; margin: 8px 0 14px; }
.listing-box h2 { font-size: 16px; margin: 0 0 10px; }
.listing-box .detaildesc { margin: 0; white-space: pre-wrap; line-height: 1.7; }
.listing-box .gallery-main { width: 100%; height: clamp(220px, 45vw, 520px); object-fit: contain; background: #f2f5f1; }
.listing-no-photo { min-height: 190px; display: grid; place-items: center; background: #f2f5f1; border-radius: 10px; }
.listing-actions { display: grid; gap: 9px; margin-top: 18px; }
.listing-actions > * { text-align: center; }
.listing-meta { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 20px; }
.listing-meta .listing-number { margin: 0; }
.listing-seller { display: flex; align-items: center; gap: 12px; }
.listing-seller .icon { width: 36px; height: 36px; padding: 8px; border-radius: 50%; background: #e8f3ec; }
@media (max-width: 720px) {
  #listing-page { padding-top: 16px; }
  .listing-columns { display: flex; flex-direction: column; gap: 12px; }
  .listing-media, .listing-summary { display: contents; }
  .listing-columns .listing-box { width: 100%; padding: 14px; }
  .listing-description { order: 2; }
}

.listing-map-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(90px, 42%);
  align-items: center;
  gap: 12px;
  border-radius: 8px;
}
.listing-map-copy { min-width: 0; }
.listing-map-copy .icon { flex: 0 0 auto; width: 22px; height: 22px; padding: 0; background: none; }
.listing-map-action { display: inline-block; margin-top: 8px; color: var(--green); font-weight: 700; }
.listing-map-link:hover .listing-map-action { text-decoration: underline; }
.listing-map-thumbnail { display: block; width: 100%; height: auto; border-radius: 8px; }

.listing-author h2 { margin-bottom: 16px; }
.listing-author-avatar { flex: 0 0 auto; display: grid; place-items: center; width: 48px; height: 48px; background: #e1ecea; border-radius: 50%; }
.listing-author-avatar .icon { width: 26px; height: 26px; padding: 0; background: none; }
.listing-author .listing-seller strong { font-size: 18px; }
.listing-author-date { margin-top: 3px; color: #52695f; }
.listing-author-link { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 14px; padding: 10px 5px; border-radius: 8px; color: var(--ink); font-weight: 700; text-align: center; }
.listing-author-link:hover { background: #eef5ef; }
.listing-author-link span[aria-hidden] { font-size: 22px; line-height: 1; }

#author-profile, #author-filters, #author-views { display: none; }
.author-mode #market-home > :is(.hero,.home-categories,.promo,.trust),
.author-mode :is(.market-ad-rail,#chips,.demorow) { display: none; }
.author-mode #author-profile {
  display: block; background: #fff; margin: 24px 0 0; padding: 24px 20px 0;
  border-radius: 14px 14px 0 0; border-bottom: 1px solid var(--line);
}
.author-identity { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; padding-bottom: 28px; }
.author-identity .listing-author-avatar { width: 64px; height: 64px; }
.author-identity h1 { margin: 0 0 4px; font-size: 24px; overflow-wrap: anywhere; }
#author-date { color: #52695f; margin-top: 3px; }
#author-share { margin-inline-start: auto; }
.author-tab { display: inline-block; border-bottom: 3px solid var(--ink); padding: 10px 24px; font-weight: 800; }
.author-mode #results { display: grid; grid-template-columns: minmax(190px, 24%) minmax(0, 1fr); gap: 28px; padding-top: 22px; }
.author-mode #author-filters { display: block; }
#author-filters label { display: block; margin-bottom: 6px; }
#author-query { width: 100%; padding: 12px; border-radius: 8px; border: 1px solid var(--line); background: white; }
#author-filters h2 { margin: 28px 0 6px; font-size: 20px; }
#author-filters p { margin: 0 0 8px; color: #52695f; }
#author-categories button { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; text-align: start; border: 0; border-radius: 8px; padding: 10px; color: var(--ink); background: transparent; }
#author-categories button[aria-pressed="true"] { background: #e2efe8; font-weight: 800; }
#author-categories small { background: #f8e4a6; padding: 2px 7px; border-radius: 100px; }
.author-mode .listhead { display: flex; gap: 10px; flex-wrap: wrap; }
.author-mode .listhead > div:first-child { margin-inline-end: auto; }
.author-mode #author-views { display: flex; gap: 4px; }
#author-views button { font-size: 20px; line-height: 1; min-width: 36px; min-height: 36px; border: 0; border-radius: 6px; background: #fff; color: var(--ink); }
#author-views button[aria-pressed="true"] { background: #e2efe8; }
.author-mode #grid { grid-template-columns: 1fr; }
.author-mode.author-grid-mode #grid { grid-template-columns: repeat(auto-fit,minmax(min(100%, 220px),1fr)); }
.author-mode:not(.author-grid-mode) #grid .card { display: grid; grid-template-columns: minmax(95px, 22%) minmax(0,1fr); min-height: 132px; }
.author-mode:not(.author-grid-mode) #grid .photo { position: static; height: 100%; min-height: 132px; }
@media (max-width: 700px) {
  .author-mode #results { grid-template-columns: minmax(0,1fr); gap: 18px; }
  #author-filters h2 { margin-top: 14px; }
  .author-mode:not(.author-grid-mode) #grid .card { grid-template-columns: minmax(82px, 27%) minmax(0,1fr); }
}

.draft-preview-content { padding-top: 24px; padding-bottom: 24px; }
#draft-preview-title {
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  margin: 0 0 16px;
}
#draft-preview-title:focus { outline: none; }

.draft-preview-photo { padding: clamp(10px, 2vw, 20px); }
.draft-preview-photo .listing-gallery { margin-bottom: 0; }
.draft-gallery-stage { position: relative; }
.draft-gallery-stage .gallery-main {
  display: block;
  height: clamp(220px, 62vw, 540px);
  cursor: zoom-in;
}
.draft-gallery-control {
  position: absolute;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 2px 8px #12392f20;
}
.draft-gallery-control:hover:not(:disabled) { background: #e5f3e9; }
.draft-gallery-control:disabled { cursor: default; }
.draft-gallery-control svg { width: 20px; height: 20px; }
.draft-gallery-prev, .draft-gallery-next { top: calc(50% - 22px); }
.draft-gallery-prev { left: 8px; }
.draft-gallery-next { right: 8px; }
.draft-gallery-zoom { bottom: 8px; right: 8px; }

.draft-preview-details .draft-title {
  font-size: clamp(1.375rem, 3vw, 1.875rem);
  line-height: 1.2;
  margin: 8px 0 12px;
}
.draft-preview-details .price { font-size: 1.5rem; }
.draft-preview-details .detaildesc { margin-top: 14px; }
.draft-preview-phone { margin: 16px 0 0; }

.draft-preview-bar {
  position: sticky;
  z-index: 4;
  bottom: 0;
  border-top: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 -6px 18px #12392f12;
}
.draft-preview-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: 14px;
  padding-bottom: max(14px, env(safe-area-inset-bottom));
}
.draft-preview-notice { font-weight: 700; margin: 0; }
#draft-preview-progress, #draft-preview-error { margin: 5px 0 0; }
#draft-preview-progress:empty, #draft-preview-error:empty { display: none; }
.draft-preview-actions { display: flex; flex-shrink: 0; gap: 10px; }
.draft-preview-actions button { min-height: 44px; text-align: center; }

@media (max-width: 720px) {
  .draft-preview-content { padding-top: 16px; }
  .draft-preview-details { order: 0; }
  .draft-preview-bar-inner { flex-direction: column; align-items: stretch; gap: 8px; }
  .draft-preview-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .draft-preview-actions button { padding: 10px 6px; }
}

.listing-review {
  display: inline-grid;
  grid-template-columns: 8px minmax(0, 1fr);
  align-items: center;
  gap: 2px 7px;
  max-width: 100%;
  padding: 6px 9px;
  border-radius: 8px;
  background: #edf2ef;
  color: #3d5549;
  line-height: 1.35;
}
.listing-review::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.listing-review strong { font-size: .8125rem; }
.listing-review small { grid-column: 2; font-size: .75rem; color: inherit; }
.listing-review.review-approved { background: #e2f1e3; color: #245b3c; }
.listing-review.review-pending { background: #fff0cd; color: #704b12; }
.listing-review.review-rejected { background: #fbeae4; color: #903a2b; }
.cardbody > .listing-review { margin-bottom: 9px; }
.listing-review-detail, .customer-listings .listing-review { margin-top: 8px; }
#draft-preview-review-note { margin: 5px 0 0; }
#draft-preview-review-note:empty { display: none; }
