.market-layout{display:grid;grid-template-columns:260px minmax(0,1fr);gap:28px}.market-results{min-width:0}.marketplace button,.marketplace select,.marketplace input,.market-dialog button,.market-dialog input,.market-detail-actions button{font:inherit;font-size:14px;min-height:44px;border:1px solid #d8cfba;border-radius:4px;background:#fff;color:#35372e;padding:9px 12px}.marketplace button,.market-dialog button,.market-detail-actions button{cursor:pointer}.marketplace button[aria-pressed=true]{background:#806830;color:white}.marketplace button:disabled{opacity:.45;cursor:default}.marketplace :focus-visible,.market-dialog :focus-visible{outline:2px solid #907232;outline-offset:2px}.market-filters{border:1px solid #ddd6c4;background:#fff;padding:16px;align-self:start}.market-filters summary{cursor:pointer;font-weight:600;padding:10px 0}.market-filters form{display:grid;gap:16px}.market-filters label{display:grid;gap:5px;font-size:14px;margin-bottom:12px}.market-filters input,.market-filters select{width:100%;min-width:0}.market-filters fieldset{min-width:0;border:0;border-top:1px solid #e5dfd1;padding:14px 0;margin:0}.market-filters legend{font-size:14px;font-weight:600;padding-right:6px}.market-filters .market-range{display:grid;grid-template-columns:1fr 1fr;gap:8px}.market-filters .market-check{display:flex;flex-direction:row-reverse;justify-content:flex-end;align-items:center;gap:8px}.market-check input{width:18px;height:18px;min-height:18px;accent-color:#907232}.market-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-bottom:22px}.market-toolbar label{display:flex;align-items:center;gap:6px;font-size:14px}.marketplace .listing-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.market-card{border:1px solid #ddd6c4;background:white;overflow:hidden;border-radius:5px}.marketplace .market-card-photo{padding:0;border:0;display:block;width:100%;height:220px;background:#f6f5f0}.market-card-photo img{width:100%;height:100%;object-fit:cover;display:block}.market-card-body{padding:18px}.market-card-body h3{margin:8px 0;line-height:1.25;font-size:24px}.market-card-body h3 button{border:0;padding:0;text-align:left;font:inherit;min-height:44px}.market-card-body p{margin:10px 0}.market-card-body strong{color:#806830;font-size:20px}.market-kind{font-size:13px;letter-spacing:.06em;color:#806830}.market-specs{font-size:14px}.market-card-body small{font-size:12px;color:#67695e}.market-card-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}.market-card-actions button{flex:1;font-size:13px}.marketplace .market-list{display:block}.market-list .market-card{display:grid;grid-template-columns:200px minmax(0,1fr);margin-bottom:16px}.market-list .market-card-photo{height:100%;min-height:220px}.market-pager{display:flex;justify-content:center;align-items:center;gap:18px;margin-top:24px}.market-compare-bar{position:sticky;bottom:16px;z-index:5;background:#35372e;color:white;padding:16px;display:flex;gap:12px;align-items:center;justify-content:center;flex-wrap:wrap;margin-top:20px;box-shadow:0 5px 24px #0002}.market-map{height:540px;max-height:70dvh;min-height:320px;margin-top:12px}.market-map-wrap>div:first-child{display:flex;gap:8px;flex-wrap:wrap}.market-notice,.market-storage-note{font-size:14px;color:#6a6048}.market-notice:empty{display:none}.market-dialog{width:min(1100px,calc(100% - 24px));max-height:90dvh;border:1px solid #b99b52;border-radius:8px;padding:24px;color:#35372e;overflow:auto}.market-dialog::backdrop{background:#111b}.market-dialog h2{font-size:30px;margin:15px 0}.market-modal-close{float:right}.market-dialog input{display:block;max-width:100%;width:100%;margin:12px 0}.market-dialog form{max-width:500px}.market-table-wrap{overflow-x:auto}.market-table-wrap table{width:100%;border-collapse:collapse;text-align:left;min-width:600px;font-size:14px}.market-table-wrap td,.market-table-wrap th{min-width:150px;padding:14px;border:1px solid #e2dccb;vertical-align:top}.market-table-wrap thead{background:#35372e;color:#fff}.market-difference{background:#f7f1e4}.saved-list>div{display:flex;gap:12px;border-bottom:1px solid #ded8c9;padding:12px 0}.saved-list>div button:first-child{flex:1;text-align:left}.market-detail-actions{margin:16px 0}.marketplace [hidden],.market-dialog [hidden]{display:none!important}@media(max-width:1100px){.market-layout{grid-template-columns:220px minmax(0,1fr)}.marketplace .listing-grid{grid-template-columns:1fr}}@media(max-width:900px){.market-layout{grid-template-columns:1fr}.marketplace .listing-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.market-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}.market-filters form>details{max-height:55vh;overflow:auto}.market-filters form>details[open]{padding-right:10px}}@media(max-width:620px){.marketplace .listing-grid{grid-template-columns:1fr}.market-list .market-card{grid-template-columns:1fr}.market-list .market-card-photo{height:220px}.market-toolbar{gap:6px}.market-fields{grid-template-columns:1fr}.market-dialog{padding:16px}.marketplace .market-toolbar select{max-width:220px}}
@media print{body:has(#listing-dialog[open])>*{display:none!important}body:has(#listing-dialog[open])>#listing-dialog{display:block!important;position:static;width:100%;max-width:none;max-height:none;overflow:visible;border:0}#listing-dialog::backdrop{display:none}#listing-dialog .dialog-close,#listing-dialog .market-detail-actions,#listing-dialog .detail-section-nav,#listing-dialog .gallery-controls,#listing-dialog .gallery-thumbnails,#listing-dialog .decor-entry,#listing-dialog #listing-decoration-public,#listing-dialog #listing-videos-public,#listing-dialog #listing-map-public{display:none!important}#listing-dialog .listing-overview{display:block}#listing-dialog .listing-hero-photo{height:280px}#listing-dialog .spec-table>div{break-inside:avoid}}

.marketplace .market-layout-full{grid-template-columns:minmax(0,1fr)}

/* Keep the desktop toolbar intact; small screens get three deliberate rows. */
.market-collections,.market-view-controls{display:contents}

@media screen and (max-width:1100px){
 .marketplace{--market-stroke:#e7dfcf;--market-paper:#faf8f3;--market-accent:#80632d}
 .marketplace .market-layout-full{gap:0}
 .marketplace .market-toolbar{display:grid;grid-template-columns:minmax(0,1fr);gap:16px;margin:0 0 22px;padding:18px;background:var(--market-paper);border:1px solid var(--market-stroke);border-radius:16px}
 .marketplace .market-toolbar button,.marketplace .market-toolbar select{min-height:48px;border-radius:9px;font-size:14px;line-height:1.4;white-space:normal;min-width:0;max-width:100%;padding:11px 12px}
 .marketplace .market-collections{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;min-width:0}
 .marketplace .market-collections [data-price-watch]{grid-column:1/-1}
 .marketplace .market-toolbar .market-sort{display:grid;grid-template-columns:minmax(0,1fr);gap:6px;min-width:0;font-size:13px;font-weight:600;color:#69675d;line-height:1.4}
 .marketplace .market-sort select{width:100%;max-width:100%!important;background-color:#fff;color:#30352f;font-size:16px;font-weight:400}
 .marketplace .market-view-controls{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;padding:4px;background:#eee9dd;border-radius:11px;min-width:0;align-self:end}
 .marketplace .market-view-controls button{border-color:transparent;background:transparent;padding:10px 8px;min-height:44px}
 .marketplace .market-view-controls button[aria-pressed=true]{background:#fff;color:var(--market-accent);box-shadow:0 2px 5px #30352f0d;border-color:#e2d8c4;font-weight:600}
 .marketplace #portfolio-status{font-size:14px;line-height:1.6;margin:0 0 18px;color:#676b61}
 .marketplace .market-results .listing-grid{grid-template-columns:minmax(0,1fr);gap:20px}
 .marketplace .market-card{border:1px solid var(--market-stroke);border-radius:16px;background:#fff;box-shadow:0 4px 18px #30352f05;display:flex;flex-direction:column;min-width:0}
 .marketplace .market-card-photo{height:auto;min-height:0;aspect-ratio:4/3;border-radius:0;overflow:hidden;flex:0 0 auto;background:#efeee8}
 .marketplace .market-card-photo img{height:100%;width:100%;object-fit:cover}
 .marketplace .market-card-body{display:flex;flex-direction:column;flex:1;padding:20px;min-width:0}
 .marketplace .market-card-body .market-kind{font-size:12px;line-height:1.6;letter-spacing:.065em;margin:0 0 9px;color:var(--market-accent)}
 .marketplace .market-card-body h3{font-size:27px;line-height:1.18;margin:0 0 10px}
 .marketplace .market-card-body h3 button{color:#30352f;background:transparent;border:0;border-radius:0;padding:0;line-height:inherit;font-size:inherit;font-weight:500;min-height:48px;width:100%;overflow-wrap:anywhere}
 .marketplace .market-card-body .market-location{font-size:14px;line-height:1.6;color:#77796f;margin:0 0 14px;overflow-wrap:anywhere}
 .marketplace .market-card-body .market-price{display:block;font-size:23px;line-height:1.4;letter-spacing:-.025em;color:#80632d;margin:0 0 12px;overflow-wrap:anywhere}
 .marketplace .market-card-body .market-specs{font-size:13px;line-height:1.8;padding:12px 0;margin:0 0 12px;border-top:1px solid #eee9de;border-bottom:1px solid #eee9de;color:#62665e}
 .marketplace .market-card-body .market-reference{font-size:11px;line-height:1.6;color:#818278;overflow-wrap:anywhere;margin-top:auto;padding-top:6px}
 .marketplace .market-card-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:16px 0 0}
 .marketplace .market-card-actions button{min-width:0;min-height:48px;padding:10px 8px;border-color:var(--market-stroke);border-radius:9px;font-size:13px;line-height:1.45;white-space:normal;overflow-wrap:anywhere;background:#faf8f3;color:#4e554a}
 .marketplace .market-card-actions button[aria-pressed=true]{background:#80632d;color:#fff;border-color:#80632d}
 .marketplace .market-results .market-list{display:block}
 .marketplace .market-list .market-card{display:flex;margin-bottom:20px}
 .marketplace .market-pager{padding:0;gap:12px;flex-wrap:wrap;font-size:14px}
 .marketplace .market-pager button{min-height:48px;border-radius:9px}
 .marketplace .market-compare-bar{position:static;border-radius:12px;padding:18px;gap:10px;font-size:14px}
 .marketplace .market-compare-bar>span{flex-basis:100%;text-align:center}
 .marketplace .market-compare-bar button{min-height:48px;white-space:normal;flex:1 1 140px;border-radius:8px}
 .marketplace .market-storage-note{font-size:12px;line-height:1.7;padding:0 4px;margin-top:20px;color:#77796f}
 .marketplace .market-map-wrap>div:first-child{display:grid;grid-template-columns:1fr;gap:8px}
 .marketplace .market-map-wrap button{min-height:48px;border-radius:9px}
 .marketplace .market-map{border:1px solid var(--market-stroke);border-radius:12px;height:440px;max-height:65dvh;min-height:280px}

 /* Detail is a readable, scrollable sheet on the cover and inner displays. */
 #listing-dialog{width:calc(100% - 32px);max-width:960px;max-height:calc(100dvh - 32px);border:1px solid #e7dfcf;border-radius:18px;overscroll-behavior:contain;scrollbar-gutter:stable}
 #listing-dialog .dialog-close{display:block;top:12px;left:auto;margin:12px 12px -48px auto;width:48px;height:48px;line-height:1;border-radius:50%;background:#fff;box-shadow:0 2px 12px #30352f14;z-index:8}
 #listing-dialog #listing-detail{padding:0 24px 32px}
 #listing-dialog .listing-detail-heading{padding:24px 56px 24px 0;margin-bottom:22px}
 #listing-dialog .listing-detail-heading h2{font-size:32px;line-height:1.18;margin:10px 0 12px;overflow-wrap:anywhere}
 #listing-dialog .listing-detail-heading .eyebrow{font-size:12px;line-height:1.6;letter-spacing:.055em;margin:0}
 #listing-dialog .detail-location{font-size:14px;line-height:1.6}
 #listing-dialog .listing-overview{grid-template-columns:minmax(0,1fr);gap:22px}
 #listing-dialog .listing-hero-photo{border-radius:12px;overflow:hidden;background:#f6f4ee}
 #listing-dialog .listing-hero-photo img{height:clamp(260px,48vw,460px);object-fit:contain}
 #listing-dialog .gallery-controls{gap:8px;padding:12px 0}
 #listing-dialog .gallery-controls button{min-height:48px;border-radius:9px;padding:10px 12px;white-space:normal;font-size:14px}
 #listing-dialog .gallery-count{font-size:13px}
 #listing-dialog .gallery-thumbnails{gap:8px;scroll-padding:2px}
 #listing-dialog .gallery-thumbnails button{border-radius:8px;overflow:hidden;flex-basis:76px}
 #listing-dialog .gallery-hint{font-size:13px;line-height:1.7;margin:8px 0 0}
 #listing-dialog .listing-summary{padding:22px;border-radius:12px;border-color:#e7dfcf;background:#fcfbf8}
 #listing-dialog .listing-summary .detail-price{font-size:30px;line-height:1.3;margin-bottom:20px;letter-spacing:-.025em}
 #listing-dialog .summary-table{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:24px}
 #listing-dialog .spec-table{font-size:14px}
 #listing-dialog .spec-table>div{gap:12px;padding:12px 0;align-content:start}
 #listing-dialog .spec-table dt,#listing-dialog .spec-table dd{overflow-wrap:anywhere}
 #listing-dialog .detail-contact-link{min-height:48px;display:flex;align-items:center;padding:10px 14px;background:#fff;border:1px solid #e7dfcf;border-radius:9px;font-size:15px}
 #listing-dialog .market-card-actions.market-detail-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:22px 0}
 #listing-dialog .market-card-actions.market-detail-actions>button,#listing-dialog .market-card-actions.market-detail-actions>a{min-height:50px;border-radius:9px;padding:11px 12px;font-size:14px;line-height:1.5;min-width:0;overflow-wrap:anywhere}
 #listing-dialog .detail-section-nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding:18px 0 22px;margin-top:0}
 #listing-dialog .detail-section-nav button{min-height:48px;min-width:0;border-radius:9px;padding:10px 8px;font-size:14px;line-height:1.5;white-space:normal;overflow-wrap:anywhere;background:#faf8f3}
 #listing-dialog .listing-detail-section{padding:26px 0}
 #listing-dialog .listing-detail-section>h3{font-size:28px;line-height:1.2;margin:0 0 20px}
 #listing-dialog .spec-group{border-radius:12px;padding:20px;background:#fcfbf8}
 #listing-dialog .feature-tags li{border-radius:8px;font-size:13px;line-height:1.6;padding:10px 12px;max-width:100%;overflow-wrap:anywhere}
 .market-dialog{padding:24px;border-radius:16px;max-height:calc(100dvh - 24px);overscroll-behavior:contain}
 .market-dialog h2{font-size:30px;line-height:1.2;clear:both;padding-top:16px;overflow-wrap:anywhere}
 .market-dialog button,.market-dialog input{min-height:48px;border-radius:9px;font-size:16px;white-space:normal;overflow-wrap:anywhere}
 .market-table-wrap{max-width:100%;overscroll-behavior-x:contain}
}

@media screen and (min-width:600px) and (max-width:1100px){
 .marketplace .market-toolbar{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px;padding:20px}
 .marketplace .market-collections{grid-column:1/-1;grid-template-columns:repeat(3,minmax(0,1fr))}
 .marketplace .market-collections [data-price-watch]{grid-column:auto}
 .marketplace .market-results .listing-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
 .marketplace .market-card-body{padding:20px}
 .marketplace .market-card-body h3{font-size:25px}
 .marketplace .market-card-body .market-price{font-size:22px}
 .marketplace .market-list .market-card{display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr)}
 .marketplace .market-list .market-card-photo{height:100%;aspect-ratio:auto;min-height:280px}
 .marketplace .market-map-wrap>div:first-child{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media screen and (max-width:599px){
 #listing-dialog{width:100%;height:100dvh;max-height:100dvh;max-width:none;margin:0;border:0;border-radius:0;scrollbar-gutter:auto}
 #listing-dialog #listing-detail{padding:0 18px max(28px,env(safe-area-inset-bottom))}
 #listing-dialog .dialog-close{top:max(12px,env(safe-area-inset-top));margin-top:max(12px,env(safe-area-inset-top));margin-right:12px}
 #listing-dialog .listing-detail-heading{padding-top:max(24px,env(safe-area-inset-top));padding-right:52px;padding-bottom:20px;margin-bottom:18px}
 #listing-dialog .listing-detail-heading h2{font-size:29px}
 #listing-dialog .listing-hero-photo img{height:clamp(240px,72vw,380px)}
 #listing-dialog .listing-summary{padding:18px}
 #listing-dialog .summary-table,#listing-dialog .spec-groups{display:block}
 #listing-dialog .listing-summary .detail-price{font-size:28px}
 #listing-dialog .detail-section-nav{grid-template-columns:repeat(2,minmax(0,1fr))}
 #listing-dialog .spec-group{padding:18px}
 .market-dialog{padding:18px;width:calc(100% - 20px)}
}

@media screen and (max-width:359px){
 .marketplace .market-toolbar{padding:14px;gap:14px}
 .marketplace .market-card-body{padding:18px}
 .marketplace .market-card-actions{grid-template-columns:minmax(0,1fr)}
 #listing-dialog .market-card-actions.market-detail-actions{grid-template-columns:minmax(0,1fr)}
}
