/* Listing feed and galleries */
.cars{grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;align-items:stretch}
.car{display:flex;flex-direction:column;min-width:0;background:var(--surface);border-radius:15px;overflow:hidden}
.car .car-image{height:190px;min-height:0;flex-shrink:0;isolation:isolate;touch-action:pan-y;background:var(--surface-alt)}
.car-image>img{width:100%;height:100%;object-fit:cover}
.car .car-content{display:flex;flex:1;flex-direction:column;padding:18px;min-width:0}
.car .car-title{display:block;margin:0;min-height:44px;height:44px}
.car .car-title button{font-size:16px;font-weight:700;line-height:22px;text-align:left;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;color:var(--ink)}
.car .car-subtitle{height:18px;font-size:11px;line-height:18px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:3px 0 10px;color:var(--text-secondary)}
.car .car-price{min-height:34px;height:34px;margin:0 0 12px;display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}
.car .car-price strong{font-size:25px;line-height:30px;letter-spacing:-.7px;white-space:nowrap}
.car .car-price small{font-size:9px}
.car .spec-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px 12px;font-size:11px;line-height:17px;padding:0 0 14px;margin:0;border-bottom:1px solid var(--line)}
.car .spec-grid>span{display:flex;align-items:center;gap:7px;min-width:0;white-space:nowrap}
.spec-grid b{font-weight:400;overflow:hidden;text-overflow:ellipsis}
.car .spec-grid svg{width:16px;height:16px;flex-shrink:0;color:#8499b5}
.car .car-desc,.collection-cards .car .car-desc{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;height:38px;min-height:38px;line-height:19px;margin:12px 0 8px;font-size:11px;overflow-wrap:anywhere;color:var(--text-secondary)}
.card-meta{height:25px;display:flex;align-items:flex-start;gap:6px;overflow:hidden;margin-bottom:8px;flex-shrink:0}
.card-meta .card-tags{display:flex;gap:4px;flex-wrap:nowrap;overflow:hidden;margin:0}
.card-meta .pill{font-size:9px;padding:4px 7px;white-space:nowrap}
.card-note-link{display:inline-flex;align-items:center;gap:4px;background:none;color:var(--text-secondary);font-size:10px;padding:2px 0;white-space:nowrap;margin-left:auto}
.card-note-link svg{width:13px;height:13px}
.car-footer{margin-top:auto;padding-top:3px}
.car .car-location{display:flex;align-items:center;gap:5px;height:18px;line-height:18px;margin:0 0 14px;font-size:11px;color:var(--text-secondary);min-width:0}
.car-location>span:first-of-type{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.car-location svg{width:14px;height:14px;flex-shrink:0}
.pin-marker{color:var(--blue);margin-left:auto}
.car .car-actions{display:flex;gap:7px;margin:0;align-items:center;min-width:0}
.car-actions .btn{flex:1;height:39px;min-height:39px;padding:8px 10px;font-size:11px;justify-content:center;white-space:nowrap}
.car-actions .icon-btn{width:37px;height:39px;flex-shrink:0}
.car-actions svg{width:17px;height:17px}
.photo-badge{font-size:10px;left:12px;top:12px;padding:5px 8px;background:#fffffff2;color:#35455d;border-radius:6px;max-width:calc(100% - 75px)}
.car-image .heart{top:10px;right:10px;width:35px;height:35px;z-index:3;background:#ffffffec;color:#74869d;border:0;backdrop-filter:blur(5px)}
.car-image .heart.active{color:#e65a75}
.gallery-arrow{position:absolute;top:50%;transform:translateY(-50%);width:31px;height:42px;display:flex;align-items:center;justify-content:center;background:#ffffffeb;color:#253b5a;border:0;border-radius:7px;z-index:3;box-shadow:0 2px 8px #14243d20;transition:opacity .15s}
.gallery-arrow svg{width:18px;height:18px}
.gallery-arrow.prev{left:9px}.gallery-arrow.prev svg{transform:rotate(180deg)}.gallery-arrow.next{right:9px}
.gallery-arrow:hover{background:#fff;color:#245cdb}
.photo-counter{position:absolute;bottom:10px;right:11px;background:#17253bbd;color:#fff;font-size:10px;padding:4px 7px;border-radius:5px;z-index:2;line-height:16px}
.photo-dots{position:absolute;bottom:15px;left:50%;transform:translateX(-50%);display:flex;gap:4px;z-index:2}
.photo-dots i{width:5px;height:5px;background:#ffffff80;border-radius:50%;box-shadow:0 1px 3px #18294260}.photo-dots i.active{background:#fff;width:15px;border-radius:4px}
.media-loading .photo-counter:before{content:'';display:inline-block;width:9px;height:9px;border:1px solid #ffffff70;border-top-color:#fff;border-radius:50%;animation:spin .7s linear infinite;margin-right:5px}
.feed-sentinel{min-height:85px;display:flex;justify-content:center;align-items:center;gap:9px;color:var(--text-secondary);font-size:11px;padding:20px}
.result-tools{display:flex;align-items:center;gap:10px}.feed-refreshing svg{animation:spin 2s linear infinite}
.cars.list-view{grid-template-columns:1fr}.list-view .car{display:grid;grid-template-columns:300px minmax(0,1fr)}.list-view .car-image{height:100%;min-height:290px}.list-view .car-content{padding:18px 22px}.list-view .car-title{height:auto;min-height:22px}.list-view .spec-grid{grid-template-columns:repeat(3,minmax(0,1fr));max-width:750px}.list-view .car-desc{max-width:850px}.list-view .car-actions{max-width:450px}
.detail-gallery{margin:0 0 22px}.detail-photo-stage{position:relative;background:var(--surface-alt);border-radius:12px;overflow:hidden}.detail-photo-stage .detail-image{width:100%;height:360px;object-fit:contain;margin:0;display:block;border-radius:0}.detail-photo-stage .gallery-arrow{opacity:1}.photo-thumbnails{display:flex;gap:7px;padding:10px 1px 3px;overflow-x:auto;scrollbar-width:thin}.photo-thumbnails button{width:64px;height:47px;padding:2px;flex-shrink:0;border:2px solid transparent;background:var(--surface-alt);border-radius:6px}.photo-thumbnails button.active{border-color:var(--blue)}.photo-thumbnails img{width:100%;height:100%;object-fit:cover;border-radius:3px}.gallery-loading:empty{display:none}
/* Clearly separated comparison columns */
.comparison-board{overflow-x:auto;background:transparent!important;border:0;border-radius:0;padding:0 0 15px;scrollbar-width:thin}
.comparison-board table{border-collapse:separate;border-spacing:12px 0;table-layout:fixed;min-width:0;width:max-content}
.comparison-board th,.comparison-board td{box-sizing:border-box;background:var(--surface);color:var(--ink);border:0;border-left:1px solid var(--line);border-right:1px solid var(--line);text-align:left;width:250px;min-width:250px;padding:17px 20px;font-size:12px;vertical-align:middle}
.comparison-board thead th{vertical-align:top;position:relative;padding:0 18px 22px;border-top:1px solid var(--line);border-radius:14px 14px 0 0;overflow:hidden}
.comparison-board thead th.compare-label-column{width:175px;min-width:175px;background:transparent;border:0;padding:28px 4px;vertical-align:bottom;color:var(--text-secondary)}
.compare-label-column span,.compare-label-column b{display:block}.compare-label-column span{font-size:11px;font-weight:400;margin-bottom:8px}.compare-label-column b{font-size:15px;color:var(--ink)}
.compare-color{height:5px;background:#5288ed;margin:0 -18px}.compare-car-head[data-column="1"] .compare-color{background:#41b397}.compare-car-head[data-column="2"] .compare-color{background:#ad80df}.compare-car-head[data-column="3"] .compare-color{background:#e7a54b}
.compare-photo{position:relative;margin:0 -18px 17px}.comparison-board .compare-photo img{width:100%;height:160px;object-fit:cover;margin:0;border-radius:0;display:block}.compare-photo .icon-btn{position:absolute;top:10px;right:10px;width:28px;height:28px;background:#fffffff0;color:#5e6c80}
.compare-car-head .source-word{font-size:10px}.compare-car-head h3{font-size:16px;line-height:23px;height:46px;overflow:hidden;margin:12px 0 5px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.compare-car-head p{font-size:11px;line-height:18px;color:var(--text-secondary);height:36px;margin:0 0 12px}.compare-price{display:block;font-size:22px;letter-spacing:-.5px;margin:0 0 15px}.compare-car-head .btn{width:100%;justify-content:center}
.comparison-board tbody th{width:175px;min-width:175px;background:transparent;border:0;color:var(--text-secondary);font-weight:500;padding:17px 4px;position:sticky;left:0;z-index:1;background:var(--bg)}
.comparison-board tbody td{border-top:1px solid var(--line);line-height:20px;overflow-wrap:anywhere}
.comparison-board tbody tr:nth-child(even) td{background:color-mix(in srgb,var(--surface) 82%,var(--surface-alt))}
.comparison-board tbody tr:last-child td{border-bottom:1px solid var(--line);border-radius:0 0 14px 14px;padding-bottom:22px}
.comparison-board td.best{color:#218360;background:color-mix(in srgb,var(--surface) 90%,#50c494)!important;font-weight:700}
/* Settings, saved searches and notices */
.source-health{margin-bottom:24px}.section-heading{display:flex;align-items:center;gap:13px;margin-bottom:16px}.section-heading>div{flex:1}.section-heading h3{margin:0 0 4px}.section-heading p{font-size:11px;color:var(--text-secondary);margin:0}.section-icon{display:flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:11px;background:var(--surface-alt);color:var(--blue);flex-shrink:0}.section-icon svg{width:21px;height:21px}
.source-health-row{display:flex;align-items:flex-start;gap:12px;border-top:1px solid var(--line);padding:18px 0}.source-health-row:last-child{padding-bottom:0}.source-health-row>div{flex:1}.source-health-row b{font-size:12px}.source-health-row p{font-size:11px;line-height:1.8;color:var(--text-secondary);margin:6px 0 0;max-width:780px}.health-dot{width:8px;height:8px;border-radius:50%;background:#e3a24f;flex-shrink:0;margin-top:5px}.source-health-ok{display:flex;gap:9px;color:#349675;font-size:12px;padding-top:5px}.source-health-ok svg{width:18px;height:18px}
.saved-search-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.saved-search-grid .search-card{display:flex;flex-direction:column;align-items:stretch;gap:0;margin:0;padding:22px;border:1px solid var(--line);border-radius:15px;background:var(--surface)}.search-card-top{display:flex;gap:14px;align-items:flex-start}.search-card-top>div{min-width:0}.search-card-top h3{font-size:15px;margin:2px 0 8px;overflow-wrap:anywhere}.search-card-top p{font-size:12px;line-height:1.8;color:var(--text-secondary);margin:0}.search-card-top .search-icon{width:40px;height:40px;flex-shrink:0;border-radius:11px}.search-source-row{display:flex;gap:15px;margin:22px 0}.search-source-row .source-word{font-size:10px}.search-monitor-row{display:flex;align-items:center;justify-content:space-between;border-top:1px solid var(--line);padding:17px 0;font-size:11px;color:var(--text-secondary);margin-top:auto}.search-card-footer{display:flex;justify-content:space-between;align-items:center;gap:10px;border-top:1px solid var(--line);padding-top:17px}.search-secondary-actions{display:flex;gap:5px}.search-secondary-actions .icon-btn{width:32px;height:34px}.search-secondary-actions svg{width:15px;height:15px}
.notification{border-radius:13px;border-left:3px solid transparent;margin-bottom:12px;transition:border-color .15s,background .15s}.notification.unread{border-left-color:var(--blue);background:color-mix(in srgb,var(--surface) 94%,#90b6ff)}.notification:hover{border-color:#a0b9e4}.notification-content{min-width:0}.notification-content p{overflow-wrap:anywhere}
.collection-toolbar{padding:18px;gap:14px}.collection-actions{margin:16px 0 22px}.section-card{box-shadow:0 3px 15px #16325203}.connection{gap:18px}.connection-info p{line-height:1.8;font-size:11px;color:var(--text-secondary)}
#toasts{pointer-events:none;display:flex;flex-direction:column;gap:10px;max-height:calc(100vh - 120px);overflow-y:auto;scrollbar-width:none}.toast{pointer-events:auto;margin:0;max-width:420px;width:calc(100vw - 48px);padding:16px;align-items:flex-start;background:#213650;color:#fff;border-color:#45607e}.toast.error{background:#29394e;border-color:#bc9058}.toast>svg{flex-shrink:0;margin-top:3px;color:#b4caff}.toast.error>svg{color:#f3c886}.toast-content{flex:1;min-width:0}.toast-content>span{display:block;font-size:12px;line-height:1.7}.toast-link{background:none;border:0;padding:0;margin-top:9px;color:#bbd3ff;font-size:11px;text-decoration:underline;text-underline-offset:3px}.toast-close{background:none;border:0;padding:0;color:#b5c4d8;flex-shrink:0}.toast-close svg{width:15px;height:15px}
@media(hover:hover){.car-image .gallery-arrow{opacity:0}.car-image:hover .gallery-arrow,.car-image:focus-within .gallery-arrow{opacity:1}}
@media(min-width:1800px){.cars{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:1250px){.cars{grid-template-columns:repeat(2,minmax(0,1fr))}.saved-search-grid{grid-template-columns:1fr}}
@media(max-width:760px){.cars{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.car .car-content{padding:15px}.car .car-image{height:180px}.car .car-title button{font-size:15px}.car .car-price strong{font-size:22px}.car .car-price small{display:none}.car .spec-grid{gap:8px;font-size:10px}.car-actions .icon-btn{width:32px}.car-actions .btn{font-size:10px}.list-view .car{grid-template-columns:200px minmax(0,1fr)}.list-view .spec-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.section-heading{flex-wrap:wrap}.section-heading>.btn{margin-left:53px}.source-health-row{flex-wrap:wrap}.source-health-row>.btn{margin-left:20px}.detail-photo-stage .detail-image{height:280px}.comparison-board th,.comparison-board td{width:225px;min-width:225px}.comparison-board tbody th,.comparison-board thead th.compare-label-column{width:120px;min-width:120px;font-size:11px}.result-bar{flex-wrap:wrap;gap:12px}.result-tools{margin-left:auto}.collection-toolbar{padding:16px}}
@media(max-width:580px){.cars{grid-template-columns:1fr}.car .car-image{height:225px}.car .car-content{padding:18px}.car .spec-grid{font-size:12px;gap:11px}.car .car-title button{font-size:17px}.car .car-price strong{font-size:26px}.car-actions .btn{font-size:12px}.car-actions .icon-btn{width:39px}.car .car-desc{font-size:12px}.car .car-title{height:auto;min-height:22px}.list-view .car{display:flex}.list-view .car-image{height:225px;min-height:0}.car .car-location{margin-bottom:15px}.result-bar select{max-width:168px}.search-card-footer{flex-wrap:wrap}.collection-toolbar{grid-template-columns:1fr 1fr}.toast{width:calc(100vw - 32px)}#toasts{right:16px;bottom:16px}.detail-photo-stage .detail-image{height:240px}}
:root[data-density=compact] .car .car-content{padding:15px}:root[data-density=compact] .car .car-image{height:170px}:root[data-density=compact] .car .car-price strong{font-size:22px}
:root[data-scale=large] .car .car-title{height:50px;min-height:50px}:root[data-scale=large] .car .car-title button{font-size:18px;line-height:25px}:root[data-scale=large] .car .spec-grid{font-size:13px}:root[data-scale=large] .car .car-desc{font-size:13px;height:44px;min-height:44px;line-height:22px}
[data-theme=dark] .comparison-board{background:transparent}[data-theme=dark] .comparison-board td.best{color:#8de0bc}[data-theme=dark] .photo-badge{background:#1b2939ed;color:#dce7fa}[data-theme=dark] .notification.unread{background:#22334c}[data-theme=dark] .car .spec-grid svg{color:#96aac7}

/* Card insertion must not turn the loader into a scroll anchor. */
#results,.feed-sentinel{overflow-anchor:none}
.compare-dock>div{display:flex;align-items:center;gap:6px;min-width:0;flex:1}
.compare-dock>div>svg{flex-shrink:0}
.compare-dock .compare-dock-close{flex-shrink:0;width:30px;height:30px;min-height:30px;padding:5px;color:#dce5f3;border:0;background:transparent}
.compare-dock .compare-dock-close:hover{color:white;background:#ffffff20}
.compare-dock>.btn{flex-shrink:0}
.comparison-hint{font-size:13px;line-height:1.7;color:var(--text-secondary);margin:-8px 0 24px}
.comparison-single{display:grid;grid-template-columns:minmax(0,320px) minmax(0,520px);gap:24px;align-items:start;max-width:880px}
.comparison-single>.compare-car-head{position:sticky;top:20px;padding:0 20px 20px;border:1px solid var(--line);border-radius:14px;overflow:hidden;background:var(--surface)}
.comparison-single .compare-color{margin:0 -20px}
.comparison-single .compare-photo{margin:0 -20px 18px}
.comparison-single .compare-photo img{display:block;width:100%;height:auto;aspect-ratio:4/3;max-height:240px;object-fit:cover}
.comparison-single .compare-car-head h3{height:auto;min-height:0}
.comparison-single .compare-car-head p{height:auto;min-height:0;margin-bottom:16px}
.comparison-specs{background:var(--surface);border:1px solid var(--line);border-radius:14px;overflow:hidden}
.comparison-specs h2{font-size:16px;margin:0;padding:21px 22px;border-bottom:1px solid var(--line)}
.comparison-specs dl{margin:0}
.comparison-specs dl>div{display:grid;grid-template-columns:minmax(115px,1fr) minmax(0,1.2fr);gap:18px;padding:14px 22px;border-bottom:1px solid var(--line);font-size:12px;line-height:1.6}
.comparison-specs dl>div:last-child{border-bottom:0}
.comparison-specs dl>div:nth-child(even){background:var(--surface-alt)}
.comparison-specs dt{color:var(--text-secondary)}
.comparison-specs dd{margin:0;color:var(--ink);font-weight:600;overflow-wrap:anywhere;white-space:pre-wrap}
@media(max-width:900px){.comparison-single{grid-template-columns:minmax(0,1fr);max-width:560px}.comparison-single>.compare-car-head{position:static}.comparison-single .compare-photo img{max-height:300px;aspect-ratio:4/3}.compare-dock{gap:10px}}
@media(max-width:520px){.compare-dock{padding:10px;gap:8px}.compare-dock .btn{padding:8px 10px;font-size:10px}.compare-dock .compare-dock-close{width:28px;height:28px}.comparison-specs h2{padding:18px}.comparison-specs dl>div{padding:13px 18px;gap:12px}.comparison-hint{font-size:12px}}
