/* Listing detail + agency page (DESIGN_V2 section 4). Page-scoped classes only (ls-*). Tokens from pt.css; never redefines kit classes.
   Mobile first: phone is the base, 900px+ is the two-column desktop layout. */
.ls { --ls-gap: 56px; --ls-bar-h: 72px; font-family: var(--pt-font); }
.ls-page { padding-bottom: 16px; }
.ls-crumbs { margin: 12px 0 4px; }
.ls-crumbs a, .ls-crumbs span { display: inline-flex; align-items: center; min-height: 44px; }
.ls svg.pt-icon { width: 20px; height: 20px; stroke-width: 1.75; }

/* ---------- head ---------- */
.ls { display: flex; flex-direction: column; }
.ls > .ls-galwrap { order: -1; margin-bottom: 20px; }
.ls-ainote { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; color: var(--pt-text-2); font-size: .8125rem; }
.ls-head { margin: 0 0 16px; }
.ls-head__row { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; }
.ls-head__text { min-width: 0; }
.ls-title { margin: 0; font-family: var(--pt-font-display, var(--pt-font)); font-size: 1.875rem; line-height: 1.15; font-weight: 800; letter-spacing: -.02em; color: var(--pt-text); text-wrap: balance; }
.ls-place { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; color: var(--pt-text-2); font-size: 1rem; }
.ls-place .pt-icon { color: var(--pt-primary); }
.ls-head__actions { display: flex; gap: 8px; flex: none; }
.ls-action { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 44px; min-height: 44px; padding: 0 14px; border: 1px solid var(--pt-border); border-radius: var(--pt-r-pill); background: var(--pt-surface); color: var(--pt-text); font: inherit; font-weight: 600; font-size: .9375rem; cursor: pointer; transition: border-color .16s var(--pt-ease), background .16s var(--pt-ease), box-shadow .16s var(--pt-ease); }
.ls-action:hover { border-color: var(--pt-border-strong); background: var(--pt-surface-2); }
.ls-action:focus-visible { outline: 3px solid var(--pt-ring); outline-offset: 2px; }
.ls-action--heart { padding: 0; width: 44px; border-radius: 50%; }
.ls-action--heart[aria-pressed="true"] { color: var(--pt-primary); border-color: var(--pt-primary-soft-2); background: var(--pt-primary-soft); }
.ls-action--heart[aria-pressed="true"] svg { fill: currentColor; }
.ls-action span { display: none; }
.ls-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.ls-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border-radius: var(--pt-r-pill); background: var(--pt-surface-3); color: var(--pt-text); font-size: .875rem; font-weight: 600; }
.ls-chip svg.pt-icon { width: 16px; height: 16px; color: var(--pt-text-2); }
.ls-chip--type { background: var(--pt-surface); border: 1px solid var(--pt-border); font-weight: 500; color: var(--pt-text-2); }
.ls-chip--info { background: var(--pt-info-bg); color: var(--pt-info); } .ls-chip--info svg.pt-icon { color: inherit; }
.ls-chip--ok { background: var(--pt-success-bg); color: var(--pt-success); }
.ls-chip--warn { background: var(--pt-warning-bg); color: var(--pt-warning); }
.ls-chip--sold { background: var(--pt-sold-bg); color: var(--pt-sold); }
.ls-head__price { display: flex; align-items: baseline; gap: 10px; margin-top: 14px; }
.ls-price { font-family: var(--pt-font-display, var(--pt-font)); font-weight: 800; letter-spacing: -.02em; color: var(--pt-text); font-variant-numeric: tabular-nums; font-size: 1.75rem; line-height: 1.1; }
.ls-price--lg { font-size: 2.25rem; }
.ls-head__price--bar { display: none; }
.ls-price__note { color: var(--pt-text-2); font-size: .875rem; }

/* ---------- gallery: one markup. phone = swipe track, desktop = 1 + 4 grid ---------- */

/* ---------- body ---------- */
.ls-grid { display: block; }
.ls-main { min-width: 0; }
.ls-aside { min-width: 0; margin-top: 8px; }
.ls-section { padding: 28px 0; border-top: 1px solid var(--pt-border); }
.ls-main > .ls-section:first-child { border-top: 0; padding-top: 24px; }
.ls-h2 { margin: 0 0 16px; font-family: var(--pt-font-display, var(--pt-font)); font-size: 1.375rem; line-height: 1.25; font-weight: 700; letter-spacing: -.02em; color: var(--pt-text); }
.ls-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; }
.ls-fact { display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 12px; align-items: center; min-width: 0; padding: 12px; border: 1px solid var(--pt-border); border-radius: var(--pt-r); background: var(--pt-surface); }
.ls-fact dt { display: contents; }
.ls-fact__ic { grid-row: 1 / 3; display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: var(--pt-r-sm); background: var(--pt-surface-3); color: var(--pt-text); }
.ls-fact__l { font-size: .8125rem; line-height: 1.3; color: var(--pt-text-2); align-self: end; }
.ls-fact dd { margin: 2px 0 0; align-self: start; font-weight: 700; font-size: .9375rem; line-height: 1.3; color: var(--pt-text); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ls-prose { color: var(--pt-text); font-size: 1rem; line-height: 1.7; }
.ls-prose p { max-width: 68ch; }
.ls-prose.is-clamped { max-height: 232px; overflow: hidden; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.ls-more { display: inline-flex; align-items: center; min-height: 44px; margin-top: 8px; padding: 0; border: 0; background: none; color: var(--pt-text); font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.ls-more[hidden] { display: none; }
.ls-more:focus-visible { outline: 3px solid var(--pt-ring); outline-offset: 2px; border-radius: 4px; }
.ls-features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; margin: 0; padding: 0; list-style: none; }
.ls-features li { display: flex; align-items: center; gap: 12px; min-width: 0; font-size: .9375rem; line-height: 1.35; }
.ls-features__ic { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--pt-success-bg); color: var(--pt-success); }
.ls-features__ic svg.pt-icon { width: 16px; height: 16px; stroke-width: 2.25; }
.ls-map { width: 100%; height: 320px; min-height: 0; border: 0; border-radius: var(--pt-r-xl); overflow: hidden; background: var(--pt-surface-3); box-shadow: inset 0 0 0 1px var(--pt-border); }
.ls-map .maplibregl-ctrl-group button { width: 44px; height: 44px; }
/* Street View button (a map control, top-left) */
.ls-map .pt-sv-ctrl { margin: 10px 0 0 10px; }
.pt-sv { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 12px; border-radius: 999px;
  background: var(--pt-surface, #fff); color: var(--pt-text, #1f2328); font: 600 .875rem/1 var(--pt-font, inherit);
  text-decoration: none; box-shadow: 0 1px 2px rgba(0,0,0,.18), 0 0 0 1px var(--pt-border, rgba(0,0,0,.08)); }
.pt-sv:hover { background: var(--pt-surface-2, #f6f6f6); color: var(--pt-primary, #cf1f1d); }
.pt-sv:focus-visible { outline: 2px solid var(--pt-primary, #cf1f1d); outline-offset: 2px; }
.pt-sv .pt-icon { width: 20px; height: 20px; flex: none; }
.ls-map__note { display: flex; gap: 8px; align-items: flex-start; margin: 12px 0 0; color: var(--pt-text-2); font-size: .875rem; }
.ls-map__note svg.pt-icon { width: 18px; height: 18px; margin-top: 1px; }

/* ---------- contact card ---------- */
.ls-card { display: flex; flex-direction: column; gap: 16px; padding: 24px; border: 1px solid var(--pt-border); border-radius: var(--pt-r-xl); background: var(--pt-surface); box-shadow: var(--pt-shadow-2); }
.ls-card__price { padding-bottom: 16px; border-bottom: 1px solid var(--pt-border); }
.ls-card__sub { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; color: var(--pt-text-2); font-size: .9375rem; font-variant-numeric: tabular-nums; }
.ls-tag { padding: 0 8px; border-radius: var(--pt-r-pill); background: var(--pt-surface-3); color: var(--pt-text); font-size: .8125rem; font-weight: 600; line-height: 22px; }
.ls-seller { display: flex; align-items: center; gap: 12px; }
.ls-avatar { display: grid; place-items: center; flex: none; width: 52px; height: 52px; border-radius: 50%; background: var(--pt-primary-soft); color: var(--pt-primary-600); font-family: var(--pt-font-display, var(--pt-font)); font-size: 1.25rem; font-weight: 800; overflow: hidden; box-shadow: 0 0 0 1px var(--pt-border); }
.ls-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ls-seller__name { font-weight: 700; font-size: 1rem; line-height: 1.3; overflow-wrap: anywhere; }
.ls-seller__name a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; min-height: 24px; }
.ls-seller__name a:hover { text-decoration: underline; }
.ls-seller__kind { color: var(--pt-text-2); font-size: .875rem; }
.ls-link { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; margin-top: -8px; color: var(--pt-primary-500); font-size: .9375rem; font-weight: 600; text-decoration: none; }
.ls-link:hover { text-decoration: underline; }
.ls-link svg.pt-icon { width: 16px; height: 16px; }
.ls-phonebtn { gap: 8px; font-variant-numeric: tabular-nums; }
.ls-phonebtn__hint { color: inherit; font-weight: 500; font-size: .875rem; padding-left: 8px; border-left: 1px solid currentColor; line-height: 1.1; }
.ls-help { margin: 0; color: var(--pt-text-2); font-size: .8125rem; line-height: 1.45; }
.ls-help--guest, .ls-help--note { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: var(--pt-r-sm); background: var(--pt-surface-2); border: 1px solid var(--pt-border); font-size: .8125rem; }
.ls-help svg.pt-icon { width: 16px; height: 16px; margin-top: 1px; flex: none; }
.ls-help a { color: var(--pt-primary-500); font-weight: 600; }
.ls-form { display: flex; flex-direction: column; gap: 12px; padding-top: 16px; border-top: 1px solid var(--pt-border); }
.ls-form.is-collapsed { display: none; }
.ls-msgbtn[hidden] { display: none; }
.ls-form__title { margin: 0; font-size: 1rem; font-weight: 700; }
.ls-card__more { display: flex; flex-direction: column; gap: 4px; align-items: stretch; }
.ls-card__more .as-askpt-open { width: 100%; }
.ls-report { display: flex; justify-content: center; }
.ls-report .as-linkbtn { color: var(--pt-text-2); font-size: .875rem; }

/* ---------- phone sticky bar (kit .pt-actionbar, phones only) ---------- */
.ls-bar { gap: 10px; }
.ls-bar .pt-actionbar__price { display: flex; flex-direction: column; }
.ls-bar .pt-actionbar__price small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ls-bar .pt-btn { flex: 0 0 auto; padding-inline: 18px; }
.ls-bar .ls-bar__call { width: 48px; padding-inline: 0; }

/* ---------- sheet (phone reveal): bottom sheet on phones, centred modal on desktop ---------- */
.ls-sheet { border: 0; padding: 0; width: 100%; max-width: 480px; max-height: 90vh; margin: auto auto 0; border-radius: var(--pt-r-xl) var(--pt-r-xl) 0 0; background: var(--pt-surface); color: var(--pt-text); box-shadow: var(--pt-shadow-3); }
.ls-sheet::backdrop { background: var(--pt-overlay); }
.ls-sheet[open] { animation: ls-up .2s var(--pt-ease); }
@keyframes ls-up { from { transform: translateY(24px); opacity: 0; } }
.ls-sheet__box { display: flex; flex-direction: column; gap: 16px; padding: 8px 20px calc(24px + env(safe-area-inset-bottom)); }
.ls-sheet__grab { align-self: center; width: 40px; height: 4px; border-radius: 4px; background: var(--pt-border-strong); margin-bottom: 4px; }
.ls-sheet__head { display: flex; align-items: center; justify-content: space-between; }
.ls-sheet__head h2 { margin: 0; font-size: 1.25rem; font-weight: 700; }
.ls-iconbtn { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--pt-surface-3); color: var(--pt-text); cursor: pointer; }
.ls-iconbtn:focus-visible { outline: 3px solid var(--pt-ring); outline-offset: 2px; }

/* ---------- similar ---------- */
.ls-similar { margin-top: 24px; padding-top: 40px; }

/* ---------- agency ---------- */
.ag-cover { position: relative; height: 128px; margin: 0 calc(var(--pt-gutter, 20px) * -1); background:
  radial-gradient(circle at 10% 130%, var(--pt-red-100) 0 22%, transparent 23%),
  radial-gradient(circle at 88% -30%, var(--pt-primary-soft) 0 30%, transparent 31%),
  linear-gradient(120deg, var(--pt-surface-3), var(--pt-surface-2)); border-bottom: 1px solid var(--pt-border); }
.ag-cover::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(var(--pt-border-strong) 1px, transparent 1.4px); background-size: 22px 22px; opacity: .35; -webkit-mask-image: linear-gradient(90deg, transparent, #000 40%, #000 60%, transparent); mask-image: linear-gradient(90deg, transparent, #000 40%, #000 60%, transparent); }
.ag-top { display: grid; gap: 20px; margin-top: -48px; position: relative; }
.ag-logo { display: grid; place-items: center; width: 96px; height: 96px; border-radius: 28px; border: 4px solid var(--pt-surface); background: var(--pt-primary-soft); color: var(--pt-primary-600); font-family: var(--pt-font-display, var(--pt-font)); font-size: 2.25rem; font-weight: 800; overflow: hidden; box-shadow: var(--pt-shadow-2); }
.ag-logo img { width: 100%; height: 100%; object-fit: cover; background: var(--pt-surface); }
.ag-info { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ag-name { margin: 0; font-family: var(--pt-font-display, var(--pt-font)); font-size: 1.75rem; line-height: 1.2; font-weight: 800; letter-spacing: -.02em; }
.ag-meta { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; color: var(--pt-text-2); font-size: .9375rem; }
.ag-meta .pt-icon { width: 18px; height: 18px; }
.ag-meta__item { display: inline-flex; gap: 6px; align-items: center; }
.ag-about { margin: 0; max-width: 68ch; color: var(--pt-text); line-height: 1.7; }
.ag-card { display: flex; flex-direction: column; gap: 12px; padding: 24px; border: 1px solid var(--pt-border); border-radius: var(--pt-r-xl); background: var(--pt-surface); box-shadow: var(--pt-shadow-2); }
.ag-card h2 { margin: 0; font-size: 1.125rem; font-weight: 700; }
.ag-card .as-askpt-open, .ag-card .pt-btn { width: 100%; }
.ag-stats { display: flex; gap: 24px; margin: 0; padding: 0 0 12px; border-bottom: 1px solid var(--pt-border); }
.ag-stat strong { display: block; font-family: var(--pt-font-display, var(--pt-font)); font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.ag-stat span { color: var(--pt-text-2); font-size: .8125rem; }
.ag-listings { margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--pt-border); }
.ag-listings .pt-grid { margin-top: 20px; }
.ag-empty { display: grid; justify-items: center; gap: 12px; padding: 56px 16px; border: 1px dashed var(--pt-border-strong); border-radius: var(--pt-r-xl); color: var(--pt-text-2); text-align: center; }
.ag-empty svg { width: 56px; height: 56px; color: var(--pt-border-strong); }

/* ---------- >= 600px ---------- */
@media (min-width: 600px) {
  .ls-title { font-size: 2.25rem; }
  .ls-facts { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
  .ls-action span { display: inline; }
  .ls-sheet { margin: auto; border-radius: var(--pt-r-xl); }
  .ls-sheet__grab { display: none; }
  .ls-map { height: 380px; }
}

/* ---------- >= 900px: two columns, 1+4 gallery, sticky contact card ---------- */
@media (min-width: 900px) {
  .ls-crumbs { margin-top: 8px; }
  .ls-head { margin-bottom: 20px; }
  .ls-title { font-size: 2.25rem; }
  .ls-head__price { display: none; }
  .ls { display: block; }
    .ls-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 0 var(--ls-gap); align-items: start; }
  .ls-aside { position: sticky; top: calc(var(--pt-header-h, 72px) + 20px); margin-top: 24px; max-height: calc(100vh - var(--pt-header-h, 72px) - 40px); overflow-y: auto; scrollbar-width: thin; border-radius: var(--pt-r-xl); }
  .ls-section { padding: 36px 0; }
  .ls-main > .ls-section:first-child { padding-top: 32px; }
  .ls-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ls-map { height: 400px; }
  .ls-similar { margin-top: 32px; padding-top: 56px; }
  .ag-top { grid-template-columns: auto minmax(0, 1fr) 340px; align-items: start; gap: 28px; margin-top: -56px; }
  .ag-cover { height: 168px; margin: 0; border-radius: var(--pt-r-xl); border: 1px solid var(--pt-border); overflow: hidden; }
  .ag-logo { width: 120px; height: 120px; font-size: 2.75rem; border-radius: 32px; }
  .ag-info { padding-top: 64px; }
  .ag-card { margin-top: 72px; }
  .ag-name { font-size: 2.25rem; }
}
@media (min-width: 1200px) { .ls-grid { grid-template-columns: minmax(0, 1fr) 400px; } }
@media (prefers-reduced-motion: reduce) { .ls-gal__btn img, .ls-action { transition: none; } .ls-sheet[open] { animation: none; } }
@media print { .ls-bar, .ls-sheet { display: none !important; } }

.ls-h3 { margin: 16px 0 8px; font-size: 1rem; font-weight: 700; color: var(--pt-text); }
