/* Shared density and interaction rules. Components keep their own layout and state. */
.post-title-line { align-items:flex-start; }
.post-title-line .post-title { white-space:normal;overflow-wrap:anywhere;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2; }
.post-title-line .post-comment-count { flex:none;line-height:1.8;padding-top:2px;font-variant-numeric:tabular-nums; }
.post .post-meta { flex-wrap:wrap;row-gap:3px; }
.post .post-author { display:flex;align-items:center;gap:5px;flex:1 1 130px;min-width:0; }
.post .post-author-name { min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis; }
.post .post-time,.post .meta-dot { flex:none;white-space:nowrap; }
.post .meta-right { flex:none;gap:8px;margin-left:auto; }
.post .post-labels { flex-wrap:wrap;row-gap:4px; }
.post .post-map-badge { max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.post.has-photo .post-thumb { align-self:start;object-fit:cover; }

/* Keep primary actions in place; secondary actions live in the existing dialog. */
.detail-article .detail-actions { display:flex;align-items:center;gap:6px;flex-wrap:wrap;padding-top:16px;margin-top:22px;border-top:1px solid #edf0f3; }
.detail-actions .action-button[data-action] { display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px;padding:8px 11px;border:0;border-radius:10px;background:transparent;color:#536174;font-size:13px;white-space:nowrap;box-shadow:none; }
.detail-actions .action-button[data-action]:hover { background:#f2f5f8; }
.detail-actions .action-button[data-action][aria-pressed="true"] { color:#2454ed;background:#eef3ff; }
.detail-actions .action-button[data-action]::before { content:"";display:block;flex:none;width:19px;height:19px;background:currentColor;mask:var(--action-icon) center/contain no-repeat;-webkit-mask:var(--action-icon) center/contain no-repeat; }
.detail-actions .action-button[data-action="more"] { margin-left:auto;width:44px;padding:0;font-size:0;flex:none; }
.detail-actions .action-button[data-action="more"][hidden] { display:none; }
.detail-actions .action-button[disabled] { opacity:.5;cursor:wait; }
.detail-meta .post-author-meta { min-width:0;flex-wrap:wrap;column-gap:7px;row-gap:3px; }
.detail-meta :is(.author-link,.post-author-name) { min-width:0;max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis; }
.detail-meta .post-meta-actions { flex:none;gap:8px; }
#detailTitle,.reader-stream-post h2 { overflow-wrap:anywhere; }

/* The homepage should show the community feed before the first swipe. */
#homeHub:not(.home-scoped) .home-feed-scope { display:none; }
#homeAreaNote[hidden] { display:none; }
.home-welcome { min-height:250px; }
.home-welcome-copy h2 { margin-top:16px; }
.home-welcome-copy>p { margin-bottom:16px; }
.home-topic-tabs button,#homeArea,#homeRememberArea,#homeClearScope { min-height:44px; }

/* One search surface for listings; the discussion board keeps the global search. */
#homeView.market-catalog>.search-wrap { display:none; }
.market-filter-heading>div,.market-card-body { min-width:0; }
.market-filter-heading h3 { font-size:24px;line-height:1.35;letter-spacing:-.7px; }
.market-filter-heading p { line-height:1.6; }
.market-card h3 { overflow-wrap:anywhere;line-height:1.5; }
.market-card-price { font-variant-numeric:tabular-nums;overflow-wrap:anywhere; }
.market-card-location { overflow-wrap:anywhere;white-space:normal;color:#65735e; }
.market-card-location span { flex:none;color:#65735e;font-size:10px; }
.market-card-specs { color:#65735e; }
.market-card-inquiry,.market-compare-add { min-height:44px; }
.market-save { width:44px;height:44px;min-height:44px; }
.market-filter-chips button,.market-scope button,.market-tabs button,.market-outline,#marketReset { min-height:44px; }
.market-compare { overflow-wrap:anywhere; }

/* Close controls remain reachable while a long form scrolls. */
.modal-backdrop:not(#dmModal)>.modal-sheet { --sheet-pad:24px;padding:var(--sheet-pad);padding-bottom:max(var(--sheet-pad),env(safe-area-inset-bottom));overscroll-behavior:contain;scroll-padding-top:80px; }
.modal-sheet>.modal-head { position:sticky;top:calc(-1 * var(--sheet-pad,24px));z-index:4;margin:calc(-1 * var(--sheet-pad,24px)) calc(-1 * var(--sheet-pad,24px)) 20px;padding:14px var(--sheet-pad,24px);background:#fff;border-bottom:1px solid #edf0f3;gap:12px; }
.modal-head strong { min-width:0;line-height:1.5;overflow-wrap:anywhere; }
.modal-head .icon-button { flex:none;min-width:44px;min-height:44px; }
.modal-sheet label,.modal-sheet form { min-width:0; }
.modal-sheet :is(input,textarea,select) { max-width:100%; }
#alertsView .alerts-tab,.activity-tools button,.activity-summary button { min-height:44px; }
#alertsView .notification-main { min-width:0;overflow-wrap:anywhere; }
#alertsView .notification-main b { font-size:14px; }
#alertsView .notification-main small,.activity-day { color:#647084; }
.activity-post-title { white-space:normal;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2; }
.activity-tools { flex-wrap:wrap; }

/* Messages: stable composer space, readable metadata and thumb-sized controls. */
#dmModal :is(.dm-icon,.dm-attach,.dm-send,.dm-message-menu),.dm-action-heading button { width:44px;height:44px;min-width:44px;min-height:44px;flex:none; }
#dmModal .dm-composer { gap:6px;padding:5px 6px 5px 12px;align-items:flex-end; }
#dmModal .dm-form textarea { padding:10px 0;min-height:44px;height:44px; }
#dmModal .dm-header { gap:8px; }
#dmModal .dm-heading strong { font-size:18px; }
#dmModal :is(.dm-preview,.dm-heading span,.dm-receipt,.dm-date,.dm-empty p) { color:#707080; }
#dmModal .dm-safety-top { align-items:center;gap:8px; }
#dmModal .dm-safety-top strong { min-width:0;line-height:1.55; }
#dmModal .dm-safety-top button { flex:none;min-height:44px; }
#dmModal .dm-safety-bar summary { min-height:44px;align-content:center;line-height:1.5; }
#dmModal .dm-message { max-width:90%; }
#dmModal .dm-message-tools { min-height:36px; }
#dmModal .dm-reaction { min-height:36px; }
#dmModal .dm-quick-questions { flex-wrap:nowrap;overflow-x:auto; }
#dmModal .dm-quick-questions button { flex:none;min-height:44px; }
:is(.detail-actions button,.market-save,.market-tabs button,.market-scope button,.home-topic-tabs button,.dm-icon,.dm-attach,.dm-send,.dm-message-menu,.alerts-tab):focus-visible { outline:2px solid #2454ed;outline-offset:3px; }

@media(max-width:600px) {
  .community-home-enabled #homeView .home-hub:not(.hidden) { margin-bottom:10px;padding:12px 16px 0; }
  .home-welcome { min-height:0;padding:14px;gap:9px;border-radius:15px; }
  .home-welcome-copy { padding:0; }
  .home-welcome-kicker { display:none; }
  .home-welcome-copy h2 { font-size:21px;line-height:1.4;letter-spacing:-.8px;margin:0 0 9px; }
  .home-welcome-actions { gap:7px;width:100%; }
  .home-welcome-actions>a,.home-welcome-actions>button { padding:8px 10px;font-size:11px; }
  .home-map-disclosure>summary { border:0;background:transparent;border-radius:8px;padding:7px 0; }
  .home-services { gap:6px;margin-top:9px; }
  .home-service { min-height:64px;padding:8px 3px;gap:5px;border-color:transparent;border-radius:10px; }
  .home-service-icon { width:30px;height:30px; }
  .home-neighbourhood-tools { margin:10px 0 4px;gap:6px; }
  .home-area-label { gap:7px;font-size:11px; }
  #homeArea { width:200px; }
  #homeAreaNote { font-size:11px; }
  .home-topic-tabs { gap:3px; }
  .home-topic-tabs button { padding:8px 11px; }
  .community-home-enabled #homeView .search-wrap { margin-bottom:8px;padding-inline:16px; }
  #latestList .post { padding:16px; }
  #latestList .post-title { font-size:15px;line-height:1.55; }
  #latestList .post-meta { font-size:11px;margin-top:7px; }
  .detail-article .detail-actions { gap:2px; }
  .detail-actions .action-button[data-action] { padding:7px;gap:5px;font-size:12px; }
  .detail-actions .action-button[data-action="more"] { font-size:0;padding:0; }
  .detail-meta .post-author-meta { flex-basis:100px; }
  .market-filter-heading { display:flex;align-items:center;gap:12px; }
  .market-filter-heading h3 { font-size:21px; }
  .market-filter-heading p,.market-kicker { display:none; }
  .market-filter-heading .market-create { flex:none;width:auto;min-height:44px;margin:0;padding:9px 12px;white-space:nowrap; }
  .market-tabs { margin-top:14px; }
  .market-toolbar { flex-wrap:wrap;gap:6px; }
  .market-scope { flex:1; }
  .market-scope button { padding:7px 9px; }
  .market-card h3 { font-size:14px; }
  .market-card-location { font-size:11px; }
  .market-card-price { font-size:17px; }
  .modal-backdrop:not(#dmModal)>.modal-sheet { --sheet-pad:18px; }
  .modal-head strong { font-size:18px; }
  #alertsView .alerts-hero { padding-top:18px; }
  #alertsView .alerts-hero h1 { font-size:23px; }
  .activity-summary { margin-bottom:12px;padding:12px; }
}
@media(max-width:360px) {
  #likeBtn,#commentFocusBtn { font-size:0;gap:5px;padding:7px; }
  #likeBtn span,#commentFocusBtn span { font-size:12px; }
  .home-welcome-copy h2 { font-size:20px; }
  .home-welcome-actions { gap:5px; }
  .home-welcome-actions>a,.home-welcome-actions>button { padding-inline:8px;font-size:10px; }
  #homeRememberArea { padding-inline:8px; }
  #homeView .market-discovery { grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
  .market-discovery .market-search-label { grid-column:1/-1; }
}

.detail-actions [data-action="like"] { --action-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M20.8%204.6a5.5%205.5%200%200%200-7.8%200L12%205.7l-1.1-1.1a5.5%205.5%200%200%200-7.8%207.8L12%2021l8.8-8.6a5.5%205.5%200%200%200%200-7.8Z%22%2F%3E%3C%2Fsvg%3E"); }
.detail-actions [data-action="comment"] { --action-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M21%2011.5a9%209%200%200%201-9%209%2010%2010%200%200%201-4-.9L3%2021l1.4-4.9A9%209%200%201%201%2021%2011.5Z%22%2F%3E%3C%2Fsvg%3E"); }
.detail-actions [data-action="save"] { --action-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M6%203h12v18l-6-4-6%204V3Z%22%2F%3E%3C%2Fsvg%3E"); }
.detail-actions [data-action="share"] { --action-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m14%204%207%207-7%207v-4c-5%200-8%202-11%206%200-9%205-12%2011-12V4Z%22%2F%3E%3C%2Fsvg%3E"); }
.detail-actions [data-action="more"] { --action-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%225%22%20cy%3D%2212%22%20r%3D%221%22%2F%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%221%22%2F%3E%3Ccircle%20cx%3D%2219%22%20cy%3D%2212%22%20r%3D%221%22%2F%3E%3C%2Fsvg%3E"); }
.detail-actions [data-action="link"] { --action-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m10%2013%204-4M8%2016l-1%201a3.5%203.5%200%200%201-5-5l5-5a3.5%203.5%200%200%201%205%200M16%208l1-1a3.5%203.5%200%200%201%205%205l-5%205a3.5%203.5%200%200%201-5%200%22%2F%3E%3C%2Fsvg%3E"); }

.feed-toolbar { gap:8px; }
.feed-toolbar .reader-feed-entry { flex:none;margin:0; }
.feed-toolbar .reader-feed-entry button { border:0;border-radius:8px;background:#f3f5f8;padding:7px 10px;font-size:12px;gap:4px; }
.feed-toolbar #latestMoreBtn { margin-left:auto;min-height:44px;white-space:nowrap; }
@media(max-width:600px) {
  .feed-toolbar .reader-feed-entry button { padding-inline:8px; }
  .feed-toolbar .home-feed-tabs { gap:16px; }
  .feed-toolbar #latestMoreBtn { font-size:11px; }
}
@media(max-width:360px) { .feed-toolbar .reader-feed-entry svg { display:none; } }

/* Keep guidance available without putting a second page above the listings. */
#homeView.market-feed #menuResultBanner>div { display:none; }
#homeView.market-feed #menuResultBanner { padding-bottom:10px; }
#homeView.market-feed #boardPublicGuide { margin:0;border:0;background:transparent; }
#homeView.market-feed #boardPublicGuide a { display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:44px;padding:8px 0;background:transparent; }
#homeView.market-feed #boardPublicGuide strong { font-size:12px;font-weight:500; }
#homeView.market-feed #boardPublicGuide small { display:none; }
#homeView.market-feed #boardPublicGuide .guide-free { flex:none;font-size:11px; }
details.car-picks { padding:0;margin:12px 0 20px;background:#fff;border-radius:12px; }
.car-picks-toggle { display:flex;align-items:center;gap:8px;min-height:52px;padding:12px 14px;list-style:none;cursor:pointer;font-size:13px;font-weight:600;color:#294867; }
.car-picks-toggle::-webkit-details-marker { display:none; }
.car-picks-toggle>span { margin-left:auto;font-size:11px;font-weight:400;color:#647084; }
.car-picks-toggle::after { content:'＋';font-size:18px; }
details.car-picks[open]>.car-picks-toggle::after { content:'−'; }
.car-picks-toggle:focus-visible { outline:2px solid #2454ed;outline-offset:2px;border-radius:12px; }
.car-picks-content { padding:4px 16px 16px; }
@media(max-width:600px) { #homeView.market-feed #menuResultBanner { padding-top:4px;padding-bottom:8px; } }

.post .meta-dot { margin:0; }
.top-actions .icon-button,.detail-topbar>.icon-button { min-width:44px;min-height:44px; }
#dmModal .dm-safety-top button { min-width:44px; }
#dmModal .dm-message-menu { color:#787080; }
#dmModal .dm-quick-questions { scrollbar-width:none; }
#dmModal .dm-quick-questions::-webkit-scrollbar { display:none; }
@media(max-width:360px) { #dmModal .dm-header-avatar { display:none; } }
