:root {
  color-scheme: light;
  --page: #f6f7f9;
  --surface: #fff;
  --ink: #222;
  --muted: #888;
  --line: #eee;
  --accent: #f6339a;
  --rose: #ff2357;
  --accent-light: #fb64b6;
  --accent-soft: #fff1f7;
  --pink: #db2777;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", Arial, sans-serif;
  font-size: 16px;
  line-height: 24px;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; }
button, a, summary { touch-action: manipulation; }
button { border: 0; color: inherit; background: none; cursor: pointer; }
button:disabled { cursor: default; opacity: .45; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible {
  outline: 2px solid #f5a4cb;
  outline-offset: 2px;
}

.site-shell { width: 100%; max-width: 448px; min-height: 100dvh; margin: 0 auto; }
.site-header {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  min-height: 86px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  color: #fff;
  background: linear-gradient(90deg, var(--accent), var(--rose));
  box-shadow: 0 2px 5px #00000012;
}
.brand { min-width: 0; }
.brand h1 { margin: 0; font-size: 20px; line-height: 28px; font-weight: 700; }
.brand p { margin: 0; color: #fff; font-size: 12px; line-height: 18px; }
.header-mark { display: none; }
.site-header.compact { min-height: 68px; justify-content: flex-start; gap: 12px; }
.site-header.compact .brand p { display: none; }
.site-header.compact h1 { margin: 0; font-size: 18px; line-height: 26px; font-weight: 600; }
.header-back { display: inline-grid; width: 28px; height: 32px; flex: 0 0 28px; place-items: center; color: #fff; font-size: 28px; line-height: 1; }
main { min-height: 50vh; padding: 16px; }
main:focus { outline: none; }

.panel {
  margin: 0 0 16px;
  padding: 16px;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 1px 2px #00000012;
}
.quick-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 12px; }
.quick-nav a, .quick-nav button { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 8px 0; font-size: 11px; line-height: 16.5px; }
.quick-nav svg { width: 28px; height: 28px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.region summary { display: flex; align-items: center; justify-content: space-between; list-style: none; cursor: pointer; font-size: 14px; line-height: 20px; font-weight: 600; }
.region summary::-webkit-details-marker { display: none; }
.region-toggle { flex: 0 0 auto; padding: 6px 16px; border: 1px solid var(--accent-light); border-radius: 20px; color: var(--accent); font-size: 14px; line-height: 20px; font-weight: 400; }
.region[open] .region-toggle::after { content: "收起"; }
.region:not([open]) .region-toggle::after { content: "选择地区"; }
.location-grid, .region-city-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.location-grid a, .location-grid span, .region-city-grid a, .region-city-grid span { min-width: 0; overflow: hidden; font-size: 14px; line-height: 20px; text-overflow: ellipsis; white-space: nowrap; }
.location-grid a.active, .region-city-grid a.active { color: var(--accent); font-weight: 600; }
.region-disabled { color: #ccc; }
.region-reselect { margin: 16px 0 4px; color: #888; font-size: 12px; line-height: 18px; }
.region-reselect summary { display: list-item; cursor: pointer; color: #888; font-size: 12px; line-height: 18px; font-weight: 400; }
.region-reselect[open] > :not(summary) { margin-top: 10px; }
.city-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.city-bar a { padding: 5px 10px; border-radius: 18px; background: #f7f7f8; font-size: 12px; line-height: 18px; }
.city-bar .active { color: var(--pink); background: var(--accent-soft); }
.breadcrumb { margin: 0 0 12px; color: #777; font-size: 12px; line-height: 20px; }
.breadcrumb a { color: #555; }
.breadcrumb span { margin: 0 4px; }
.area-title { margin: 2px 0 12px; font-size: 18px; line-height: 26px; font-weight: 600; }

.section-label { display: flex; align-items: center; justify-content: space-between; margin: 0 0 8px; font-size: 14px; line-height: 20px; font-weight: 600; }
.promotion-heading { display: flex; min-width: 0; align-items: center; gap: 8px; }
.featured-label { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 16px; color: #8d6120; background: #fef3c6; font-size: 12px; line-height: 18px; font-weight: 600; }
.section-note { color: var(--muted); font-size: 12px; line-height: 18px; font-weight: 400; }
.section-label > .ad-label { flex: 0 0 auto; margin-left: 8px; }
.feature-card, .listing-card {
  position: relative;
  display: flex;
  overflow: hidden;
  margin: 0 0 12px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 4px #00000014;
}
.feature-card { border: 1px solid #e5cf9c; background: linear-gradient(110deg, #fffaf0, #fff); }
.feature-card img { width: 112px; height: 112px; flex: 0 0 112px; object-fit: cover; }
.feature-body { position: relative; display: flex; min-width: 0; flex: 1; flex-direction: column; justify-content: space-between; padding: 14px; }
.feature-body.has-compensation { padding-top: 36px; }
.feature-body h3 { overflow: hidden; margin: 4px 0 0; font-size: 16px; line-height: 24px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.feature-body p { display: -webkit-box; overflow: hidden; margin: 4px 0 0; color: #666; font-size: 12px; line-height: 19.5px; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.feature-body .location { display: block; margin: 0; color: #9a6a22; font-size: 11px; line-height: 16px; }
.feature-body .summary { margin-top: 4px; }
.ad-label { color: #9a6a22; font-size: 11px; line-height: 16px; }
.feature-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.feature-bottom small { color: #956d36; font-size: 12px; line-height: 16px; white-space: nowrap; }
.price { color: var(--pink); font-size: 14px; font-weight: 600; }
.listing-card { gap: 0; border-radius: 16px; }
.listing-card img { width: 96px; height: 96px; flex: 0 0 96px; object-fit: cover; }
.listing-body { position: relative; display: flex; min-width: 0; flex: 1; flex-direction: column; justify-content: space-between; padding: 12px; }
.listing-body.has-compensation { padding-top: 36px; }
.location { overflow: hidden; margin: 0 0 2px; color: #999; font-size: 12px; line-height: 18px; text-overflow: ellipsis; white-space: nowrap; }
.listing-body .location { margin: 0; }
.listing-body h3 { overflow: hidden; margin: 4px 0 0; font-size: 14px; line-height: 20px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.listing-age { margin-left: 6px; color: #888; font-size: 12px; font-weight: 400; }
.address { min-width: 0; }
.listing-body p.address { overflow: hidden; margin: 0; color: #888; font-size: 12px; line-height: 18px; text-overflow: ellipsis; white-space: nowrap; }
.summary { display: -webkit-box; overflow: hidden; margin: 4px 0 0; color: #777; font-size: 12px; line-height: 18px; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.listing-date { margin-top: 4px; color: #aaa; font-size: 12px; line-height: 16px; }
.listing-bottom { display: flex; align-items: center; justify-content: space-between; gap: 5px; margin-top: auto; }
.listing-bottom .price { font-size: 14px; font-weight: 700; }
.compensation-badge { position: absolute; top: 8px; right: 10px; color: #956d36; font-size: 10px; line-height: 16px; white-space: nowrap; }
.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 20px 0; }
.pagination a, .pagination span { display: grid; min-width: 32px; height: 34px; place-items: center; padding: 0 7px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 12px; }
.pagination .active { color: #fff; border-color: var(--accent); background: var(--accent); }
.pagination .disabled { color: #c8c8c8; }
.empty { padding: 36px 12px; text-align: center; }
.empty h2 { font-size: 16px; }
.empty p { color: var(--muted); font-size: 13px; }
.text-link { color: var(--pink); font-size: 13px; }

.back { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 16px; padding: 5px 0; color: var(--pink); font-size: 13px; }
.detail-panel { overflow: hidden; padding: 0; }
.detail-gallery { position: relative; }
.detail-cover { width: 100%; height: 260px; object-fit: cover; }
.photo-open { display: block; width: 100%; padding: 0; }
.photo-thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 10px 12px; }
.photo-thumb { width: 54px; height: 54px; flex: 0 0 54px; overflow: hidden; padding: 0; border: 2px solid transparent; border-radius: 6px; opacity: .72; }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.photo-thumb.active { border-color: var(--accent); opacity: 1; }
.photo-nav { position: absolute; top: 50%; display: grid; width: 36px; height: 36px; place-items: center; transform: translateY(-50%); border-radius: 50%; color: #fff; background: #0007; }
.photo-nav[hidden], .photo-modal-count[hidden] { display: none; }
.photo-nav.photo-prev { left: 10px; }
.photo-nav.photo-next { right: 10px; }
.photo-count { position: absolute; right: 12px; bottom: 12px; padding: 2px 8px; border-radius: 12px; color: #fff; background: #0008; font-size: 11px; line-height: 18px; }
.detail-content { padding: 0; }
.detail-section, .safety-section { margin: 0 0 12px; padding: 16px; border-radius: 16px; background: #fff; box-shadow: 0 1px 2px #00000012; }
.detail-section:last-child, .safety-section:last-child { margin-bottom: 0; }
.detail-section h3, .safety-section h2 { margin-top: 0; }
.detail-content h2 { margin: 6px 0 12px; font-size: 21px; line-height: 30px; }
.detail-price { margin-bottom: 14px; color: var(--pink); font-size: 22px; font-weight: 700; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; }
.tags span { padding: 2px 9px; border-radius: 16px; color: var(--pink); background: var(--accent-soft); font-size: 12px; line-height: 18px; }
.info-grid { margin: 20px 0; padding-top: 16px; border-top: 1px solid var(--line); }
.info-row { display: flex; gap: 10px; margin-bottom: 10px; font-size: 13px; line-height: 22px; }
.info-row dt { width: 65px; flex: 0 0 65px; color: #999; }
.info-row dd { min-width: 0; margin: 0; }
.detail-content h3, .article h2 { margin: 22px 0 12px; font-size: 17px; line-height: 24px; }
.description, .article p, .article li { color: #555; font-size: 14px; line-height: 1.9; }
.primary { display: block; width: 100%; padding: 12px 18px; border-radius: 10px; color: #fff; background: linear-gradient(90deg, var(--accent), var(--rose)); font-size: 14px; font-weight: 600; }
.detail-note { margin: 16px 0 0; color: #999; font-size: 11px; line-height: 1.7; }
.article h1 { margin: 0 0 16px; font-size: 22px; line-height: 30px; }
.article ul { padding-left: 20px; list-style: disc; }
.safety-section { margin: 0 0 20px; }
.safety-section h2 { margin: 0 0 8px; }
.safety-section li { margin: 0 0 5px; }
.article .primary { margin-top: 24px; text-align: center; }
.noscript { padding: 30px; text-align: center; }
.is-safety .site-header { min-height: 60px; padding: 16px; gap: 12px; }
.is-safety .site-header h1 { font-size: 18px; line-height: 28px; font-weight: 700; }
.safety-back { font-size: 16px; line-height: 24px; color: #ffffffe6; }
.is-safety main { padding: 16px 16px 40px; }
.safety-template { overflow-wrap: anywhere; }
.safety-warning, .safety-questions section { padding: 16px; border-radius: 16px; background: #fff; box-shadow: 0 1px 2px #0000000d; }
.safety-warning { border: 1px solid #ffe2e2; }
.safety-warning-heading { display: flex; align-items: flex-start; gap: 12px; }
.safety-shield { display: flex; flex: 0 0 40px; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 50%; background: #ffe2e2; font-size: 20px; }
.safety-warning h2 { margin: 0; padding-top: 4px; color: #101828; font-size: 18px; line-height: 28px; font-weight: 700; }
.safety-warning ul { display: grid; gap: 12px; margin: 16px 0 0; padding: 0; list-style: none; }
.safety-warning li { display: flex; gap: 12px; padding: 12px; border-radius: 12px; color: #364153; background: #fef2f2; font-size: 14px; line-height: 24px; }
.safety-number { display: flex; flex: 0 0 24px; width: 24px; height: 24px; align-items: center; justify-content: center; border-radius: 50%; color: #e7000b; background: #ffe2e2; font-size: 12px; line-height: 16px; font-weight: 700; }
.safety-copy { min-width: 0; }
.safety-questions { display: grid; gap: 16px; margin-top: 16px; }
.safety-questions h2 { margin: 0; color: #101828; font-size: 16px; line-height: 24px; font-weight: 700; }
.safety-questions p { margin: 12px 0 0; color: #4a5565; font-size: 14px; line-height: 28px; }

dialog { position: fixed; width: calc(100% - 40px); max-width: 352px; padding: 28px 24px 20px; border: 0; border-radius: 18px; background: #fff; text-align: center; box-shadow: 0 18px 60px #0003; }
dialog::backdrop { background: #11182799; }
#cooperation-dialog { width: calc(100% - 48px); max-width: 320px; padding: 20px; border-radius: 16px; color: #364153; font-size: 14px; line-height: 22.75px; overflow-wrap: anywhere; box-shadow: 0 20px 25px #0000001a; }
#cooperation-dialog::backdrop { background: #0006; }
#cooperation-dialog h2 { margin: 0; color: #1e2939; font-size: 14px; line-height: 22.75px; font-weight: 700; }
#cooperation-description { margin: 8px 0 0; color: #6a7282; font-size: 12px; line-height: 16px; }
.cooperation-contacts { display: grid; gap: 8px; margin-top: 12px; color: var(--accent); }
.cooperation-contacts p { margin: 0; }
#cooperation-close { display: block; width: 100%; margin-top: 16px; padding: 8px; border-radius: 8px; color: #fff; background: var(--accent); font-size: 14px; line-height: 20px; font-weight: 700; }
.dialog-close { position: absolute; top: 7px; right: 9px; width: 40px; height: 40px; color: #999; font-size: 28px; line-height: 36px; }
.qr-heading { display: inline-block; margin: 8px 0; padding: 4px 12px; border-radius: 20px; color: var(--pink); background: var(--accent-soft); font-size: 11px; }
dialog h2 { margin: 10px 0; font-size: 20px; line-height: 28px; }
#qr-name { margin: 0 0 15px; color: #777; font-size: 13px; line-height: 20px; }
#qr-code { display: grid; width: 224px; max-width: 100%; aspect-ratio: 1; place-items: center; margin: 0 auto; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
#qr-code svg { display: block; width: 100%; height: auto; }
.qr-hint { margin: 14px 0 20px; color: #777; font-size: 12px; }
#qr-feedback { min-height: 18px; margin: 12px 0 0; color: #777; font-size: 11px; line-height: 18px; overflow-wrap: anywhere; }
#photo-dialog { width: calc(100% - 24px); max-width: 800px; padding: 0; background: #111; }
#large-photo, .photo-stage img { width: 100%; max-height: 85dvh; object-fit: contain; }
.photo-stage { position: relative; display: grid; min-height: 180px; place-items: center; }
.photo-prev, .photo-next { position: absolute; top: 50%; width: 40px; height: 40px; transform: translateY(-50%); border-radius: 50%; color: #fff; background: #0008; }
.photo-prev { left: 10px; }
.photo-next { right: 10px; }
.photo-modal-count { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); padding: 2px 8px; border-radius: 12px; color: #fff; background: #0008; font-size: 11px; }
#photo-dialog .dialog-close { z-index: 1; border-radius: 50%; color: #fff; background: #0008; }
body:has(dialog[open]) { overflow: hidden; }

@media (max-width: 360px) {
  .location-grid, .region-city-grid { column-gap: 8px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
