/* Comparison uses the existing warm palette in both themes. */
.scmp-add,#scmpBar button,#scmpDialog button{font:inherit;font-size:13px;font-weight:650;cursor:pointer;border:1px solid var(--warm-edge);background:var(--warm-card);color:var(--warm-text);border-radius:10px;min-height:44px;padding:8px 12px}
.scmp-add{display:flex;align-items:center;justify-content:center;gap:8px;margin:0 12px 12px;width:calc(100% - 24px)}
.scmp-add svg{width:18px;height:18px;flex:none}
.scmp-add[aria-pressed=true]{background:var(--warm-tint);color:var(--warm-link);border-color:var(--warm-accent-border)}
.scmp-add:focus-visible,#scmpBar button:focus-visible,#scmpDialog :focus-visible{outline:2px solid var(--warm-accent-border);outline-offset:3px}
#scmpBar{position:fixed;right:clamp(12px,3vw,36px);bottom:20px;z-index:90;display:flex;align-items:center;gap:12px;padding:10px 12px;background:var(--warm-panel);color:var(--warm-text);border:1px solid var(--warm-edge);border-radius:14px;box-shadow:0 6px 24px #0002;font-size:13px}
#scmpBar[hidden],body:has(.vehicle-view:not([hidden])) #scmpBar{display:none!important}
#scmpBar button,.scmp-foot button{background:var(--warm-gold,#d6a45f)!important;color:var(--warm-gold-ink,#191714)!important;border-color:transparent!important}
#scmpDialog{position:fixed;inset:0;margin:auto;box-sizing:border-box;width:min(1240px,calc(100% - 32px));max-width:none;max-height:calc(100dvh - 32px);padding:0;border:1px solid var(--warm-edge);border-radius:18px;background:var(--warm-panel);color:var(--warm-text);overflow:auto;font:inherit;overscroll-behavior:contain}
#scmpDialog:not([open]){display:none}
#scmpDialog::backdrop{background:#0009}
#scmpDialog .scmp-head,#scmpDialog .scmp-tools,#scmpDialog .scmp-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 20px;border-bottom:1px solid var(--warm-edge)}
#scmpDialog h2{margin:0;font-size:clamp(18px,2.1vw,25px);line-height:1.2}
#scmpDialog p{margin:6px 0 0;color:var(--warm-muted);font-size:13px;line-height:1.5}
#scmpDialog .scmp-note,#scmpDialog .scmp-empty{padding:10px 20px}
.scmp-tools label{display:flex;align-items:center;gap:8px;font-size:14px;min-height:44px;cursor:pointer}
.scmp-tools input{accent-color:var(--warm-link);width:18px;height:18px}
#scmpDialog button:disabled{opacity:.55;cursor:not-allowed}
.scmp-scroll{overflow:auto;max-height:calc(100dvh - 255px);min-height:100px;padding:0 12px;overscroll-behavior:contain}
.scmp-scroll table{border-collapse:separate;border-spacing:0;width:100%;font-size:14px;table-layout:auto}
.scmp-scroll th,.scmp-scroll td{padding:12px;border-bottom:1px solid var(--warm-edge);border-right:1px solid var(--warm-edge);text-align:left;vertical-align:top;min-width:190px;overflow-wrap:anywhere}
.scmp-scroll th:first-child{position:sticky;left:0;z-index:1;min-width:130px;max-width:160px;background:var(--warm-panel);color:var(--warm-muted)}
.scmp-scroll thead th{background:var(--warm-raised)}
.scmp-vehicle{display:grid;gap:6px;max-width:260px;min-width:0}
.scmp-vehicle img,.scmp-no-photo{display:block;width:100%;aspect-ratio:16/10;object-fit:cover;background:var(--warm-card);border-radius:9px}
.scmp-no-photo{display:grid;place-items:center;font-size:12px;color:var(--warm-muted)}
.scmp-vehicle small,.scmp-vehicle span,.scmp-best small{font-size:12px;color:var(--warm-muted)}
.scmp-vehicle strong{font-size:15px;line-height:1.35}
.scmp-best{background:var(--warm-tint);color:var(--warm-link);font-weight:650}
.scmp-best small{display:block;margin-top:3px;color:var(--warm-link);font-weight:500}
#scmpDialog .scmp-foot{justify-content:flex-end;border-bottom:0;border-top:1px solid var(--warm-edge)}
@media(max-width:767px){#scmpBar{bottom:calc(76px + env(safe-area-inset-bottom,0px));right:12px;max-width:calc(100% - 24px)}#scmpDialog{width:calc(100% - 12px);max-height:calc(100dvh - 12px);border-radius:14px}#scmpDialog .scmp-head,#scmpDialog .scmp-tools,#scmpDialog .scmp-foot{padding:12px}#scmpDialog .scmp-note{padding:8px 12px}.scmp-scroll{padding:0;max-height:calc(100dvh - 268px)}.scmp-scroll th,.scmp-scroll td{min-width:150px;padding:9px;font-size:13px}.scmp-scroll th:first-child{min-width:100px;max-width:110px}.scmp-vehicle strong{font-size:14px}}

/* Keep the table visible instead of filling the viewport with controls. */
#scmpDialog[open]{display:flex;flex-direction:column}
#scmpDialog .scmp-head,#scmpDialog .scmp-tools,#scmpDialog .scmp-foot,#scmpDialog .scmp-note{flex:0 0 auto}
#scmpDialog .scmp-head,#scmpDialog .scmp-tools,#scmpDialog .scmp-foot{padding-block:10px}
#scmpDialog .scmp-note{padding-block:6px;margin-top:0}
#scmpDialog [data-scmp-notice]:empty{display:none}
#scmpDialog .scmp-scroll{flex:1 1 auto;min-height:100px;max-height:none}
.scmp-vehicle img,.scmp-no-photo{max-height:108px;aspect-ratio:16/9}
.scmp-vehicle span:empty{display:none}
@media(max-width:767px){.scmp-vehicle img,.scmp-no-photo{max-height:76px}.scmp-scroll th:first-child{min-width:100px;max-width:116px}.scmp-vehicle{gap:4px}#scmpDialog .scmp-note{font-size:12px;line-height:1.35}}
