/* Retain the approved RED Motors system. Changes here implement the R9 review only. */
html body :is(#root,.r12-chrome) .r8-heart-trail,html body :is(#root,.r12-chrome) .r8-heart-comet{display:none!important;animation:none!important}
/* Uniform linear distance along an actual rounded rectangle, rather than a rotating cone. */
.r5-comet-ring{padding:0!important;overflow:visible!important;mask:none!important;-webkit-mask:none!important;inset:-1px!important;pointer-events:none}
.r5-comet-ring>i{display:none!important}
.r5-comet-ring .r9-comet-rail{position:absolute!important;inset:0;width:100%!important;height:100%!important;overflow:visible;fill:none;stroke-width:1.4;stroke-linecap:round;filter:none!important;animation:none!important}
.r9-comet-rail rect{fill:none;animation:r9-rail-travel linear infinite;stroke-linecap:round}
.r9-comet-tail{stroke:#d36a51;opacity:.65}
.r9-comet-head{stroke:#ffb28a;filter:drop-shadow(0 0 2px #f56a3f)}
@keyframes r9-rail-travel{to{stroke-dashoffset:calc(var(--rail-length) * -1)}}
html body :is(#root,.r12-chrome) .r5-segment button{position:relative;isolation:isolate;border:1px solid transparent!important;background:transparent!important;overflow:visible}
html body :is(#root,.r12-chrome) .r5-segment button[aria-pressed=true]{background:transparent!important;border-color:#ffffff26!important;box-shadow:none!important}
html body :is(#root,.r12-chrome) .r5-segment button>.r5-comet-ring{display:block}
/* The field popup is above the app chrome; it cannot hide behind Enter Planet. */
.r9-filter-scrim{z-index:300!important;padding:24px 0;background:#0008!important;backdrop-filter:blur(8px)}
.r9-filter-scrim .rm-sheet{align-self:flex-start!important;height:auto!important;max-height:calc(100dvh - 48px)!important;border:1px solid #ffffff20!important;border-radius:28px!important;background:rgba(12,12,14,.88)!important;gap:18px!important;overflow:auto}
.r9-filter-scrim .r8-preferences-sheet{margin-top:64px!important;max-height:calc(100dvh - 112px)!important;padding-top:12px!important}
.r9-filter-scrim .rm-sheet>header{flex-shrink:0}
.r9-filter-scrim .btn{border-radius:999px!important;border:1px solid #ffffff28;background:#ffffff04;color:#fff;min-height:42px;position:relative;isolation:isolate}
.r9-filter-scrim .rm-sheet-actions{margin-top:14px}
.r9-control-frame{position:relative;border-radius:999px;isolation:isolate;background:#ffffff03}
.r9-control-frame>.r5-comet-ring{opacity:0;transition:opacity 160ms ease}
.r9-control-frame:focus-within>.r5-comet-ring,.r9-control-frame[data-active=true]>.r5-comet-ring{opacity:1}
.r9-select-trigger,.r9-filter-scrim .r9-control-frame>input{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:48px;padding:12px 17px!important;background:transparent!important;border:1px solid #ffffff25!important;outline:none!important;border-radius:999px!important;color:#eee!important;font:inherit;box-shadow:none!important;cursor:pointer}
.r9-filter-scrim .r9-control-frame>input{cursor:text}
.r9-select-options{position:absolute;left:0;right:0;top:calc(100% + 6px);padding:7px;z-index:10;background:#111114;border:1px solid #ffffff25;border-radius:22px;box-shadow:0 12px 32px #0009;max-height:220px;overflow:auto}
.r9-select:has(.r9-select-options){z-index:15}
.r9-select-options button{display:flex;align-items:center;justify-content:space-between;width:100%;padding:11px 13px;min-height:42px;border:0;background:none;color:#ddd;text-align:left;font:inherit;border-radius:999px!important;cursor:pointer}
.r9-select-options button[aria-selected=true],.r9-select-options button[data-highlight=true]{background:#b8465326;color:#ed9da6}
html body :is(#root,.r12-chrome) .rm21-stats{display:flex!important;flex-wrap:nowrap!important;gap:6px!important;padding:0!important;background:none!important;border:0!important;margin:22px 0!important}
html body :is(#root,.r12-chrome) :is(.rm21-stats,.rm21-status-row,.r6-spec-badges,.rm23-card-status)>.rm23-condition{display:inline-flex;align-items:center;border:1px solid #ffffff22;border-radius:999px;background:#ffffff05;color:#ddd;text-transform:uppercase;font-size:10px!important;line-height:1.3;padding:6px 9px!important;letter-spacing:.025em!important;white-space:nowrap!important;font-weight:400}
html body :is(#root,.r12-chrome) .rm-car-actions{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:12px!important}
html body :is(#root,.r12-chrome) .rm-car-actions>.btn{width:100%!important;min-width:0!important;min-height:46px!important;margin:0!important;box-sizing:border-box}
html body :is(#root,.r12-chrome) .r6-gallery-model{top:9px!important;right:9px!important;background:#00000012!important;border-color:#ffffff40!important}
html body :is(#root,.r12-chrome) :is(.r6-gallery-prev,.r6-gallery-next){background:#00000012!important;border-color:#ffffff30!important}
.r6-gallery>iframe{width:100%;height:100%;border:0;display:block;background:#000}
/* Price help is anchored to the whole price row so it remains inside the screen. */
html body :is(#root,.r12-chrome) .rm21-price{position:relative}
html body :is(#root,.r12-chrome) .r5-tax-hint{position:static;align-self:flex-start;margin-top:1px}
html body :is(#root,.r12-chrome) .r5-tax-hint>button{position:relative;width:24px;height:24px;border:0!important;background:none!important;font-size:7px!important;color:#aaa;min-height:0;padding:0}
html body :is(#root,.r12-chrome) .r5-tax-hint>button:before{content:'';position:absolute;width:10px;height:10px;border:1px solid #ffffff65;border-radius:50%}
html body :is(#root,.r12-chrome) .r5-tax-copy{left:0!important;right:auto!important;top:calc(100% + 8px)!important;width:min(280px,calc(100vw - 48px))!important;box-sizing:border-box;z-index:30}
/* No duplicate rectangle behind the desktop message field. */
@media(min-width:900px){html body :is(#root,.r12-chrome) :is(.composer,.composer-container,.chat-composer,.conversation__composer){background:transparent!important;border:0!important;box-shadow:none!important;backdrop-filter:none!important}html body :is(#root,.r12-chrome) .r5-selected-cars img{height:clamp(140px,14vw,210px)!important;object-fit:contain!important;background:#000;border-radius:12px}.r5-selected-cars{gap:16px!important}html body :is(#root,.r12-chrome) .discover-desk .rm23-price{margin-top:22px!important;margin-bottom:auto!important;align-self:flex-start;padding:10px 14px;border:1px solid #ffffff1c;border-radius:16px;background:#ffffff04}html body :is(#root,.r12-chrome) .discover-desk .rm23-price strong{font-size:21px!important;font-weight:400!important}html body :is(#root,.r12-chrome) .discover-desk .r6-spec-badges{flex-wrap:wrap;display:flex;gap:7px!important}}
/* The orbital button has a feathered veil, no cropped black disc. */
html body :is(#root,.r12-chrome) .r5-planet-entry{overflow:visible!important;background:transparent!important}
html body :is(#root,.r12-chrome) .r5-planet-entry:before{content:'';position:absolute;inset:-90px;pointer-events:none;background:var(--r6-veil);z-index:-1}
html body :is(#root,.r12-chrome) .r5-planet-entry>.r6-sphere{mask-image:radial-gradient(circle,#000 0%,#000 29%,transparent 39%);-webkit-mask-image:radial-gradient(circle,#000 0%,#000 29%,transparent 39%)}
/* White arrow at rest; a muted red response on hover and on send, never a perpetual sweep. */
html body :is(#root,.r12-chrome) .composer__send>svg:not(.r9-comet-rail){animation:none!important;transition:filter 160ms ease,stroke 160ms ease}
html body :is(#root,.r12-chrome) .r5-send-sweep{display:none!important;animation:none!important}
html body :is(#root,.r12-chrome) .composer__send:active>svg:not(.r9-comet-rail){stroke:#d96974!important;filter:drop-shadow(0 0 7px #b84653)}
@media(hover:hover) and (pointer:fine){html body :is(#root,.r12-chrome) .composer__send:hover>svg:not(.r9-comet-rail){stroke:#c95c69!important;filter:drop-shadow(0 0 5px #b8465380)}}
html body :is(#root,.r12-chrome) .composer__mic--recording{color:#b84653!important;border-color:#b84653!important;background:#b846531c!important;box-shadow:0 0 12px #b8465325}
@media(max-width:899px){
 /* The feed now scrolls behind both veils, just like Shortlist, instead of being clipped between them. */
 html body :is(#root,.r12-chrome) .discover{position:fixed!important;inset:0!important;height:100dvh!important;box-sizing:border-box;padding-top:56px!important;padding-bottom:64px!important;scroll-padding-top:56px!important;background:#000!important;z-index:0}
 html body :is(#root,.r12-chrome) .discover__media-open{mask-image:linear-gradient(to bottom,transparent 0%,#000 19%,#000 62%,transparent 100%)!important;-webkit-mask-image:linear-gradient(to bottom,transparent 0%,#000 19%,#000 62%,transparent 100%)!important}
 html body :is(#root,.r12-chrome) .rm24-centre>.r6-sphere{width:86px!important;min-width:86px!important;height:86px!important}
 html body :is(#root,.r12-chrome) :is(.rm21-stats,.rm21-status-row,.r6-spec-badges,.rm23-card-status)>.rm23-condition{font-size:9px!important;padding:6px 8px!important;letter-spacing:0!important}
 html body :is(#root,.r12-chrome) .discover__cta-row{margin-top:10px!important}
 .r9-filter-scrim{padding-top:0}
 .r9-filter-scrim .rm-sheet{width:100%;margin-top:74px;max-height:calc(100dvh - 100px)!important;padding:18px 22px 24px!important}
 .r9-filter-scrim .r8-preferences-sheet{margin-top:74px!important}
}
@media(prefers-reduced-motion:reduce){.r9-comet-rail rect{animation:none!important}.r9-control-frame>.r5-comet-ring{transition:none}}
html body :is(#root,.r12-chrome) .composer__send .r5-comet-ring .r9-comet-rail{width:100%!important;height:100%!important;stroke:none!important;opacity:1!important}
html body :is(#root,.r12-chrome) .composer__send.r9-send-flash>svg:not(.r9-comet-rail){stroke:url(#r9-send-ink)!important;filter:drop-shadow(0 0 8px #b84653)!important}
@media(hover:hover) and (pointer:fine){html body :is(#root,.r12-chrome) .composer__send:hover>svg:not(.r9-comet-rail){stroke:url(#r9-send-ink)!important}}
@media(min-width:900px){html body :is(#root,.r12-chrome) .discover-desk .r6-spec-badges .rm23-condition{font-size:10px!important;padding:6px 9px!important}}
@media(max-width:899px){
 html body :is(#root,.r12-chrome) .discover__media-open{mask:none!important;-webkit-mask:none!important}
 html body :is(#root,.r12-chrome) .discover__media-open>.discover__media{height:auto!important;max-height:100%!important;top:50%!important;bottom:auto!important;transform:translateY(-50%);object-fit:contain!important;mask-image:linear-gradient(to bottom,transparent 0%,#000 19%,#000 68%,transparent 100%)!important;-webkit-mask-image:linear-gradient(to bottom,transparent 0%,#000 19%,#000 68%,transparent 100%)!important}
}
@media(min-width:900px){html body :is(#root,.r12-chrome) .composer-dock{background:transparent!important;background-image:none!important;border:0!important;box-shadow:none!important;backdrop-filter:none!important}html body :is(#root,.r12-chrome) .composer-dock:before,html body :is(#root,.r12-chrome) .composer-dock:after{display:none!important}}
html body :is(#root,.r12-chrome) .r5-selected-cars{grid-template-columns:repeat(var(--selected-count,3),minmax(0,1fr))}
html body :is(#root,.r12-chrome) .r3-detail :is(.rm21-stats,.rm21-status-row)>.rm23-condition{font-size:11px!important;padding:7px 9px!important}
html body :is(#root,.r12-chrome) .r5-tax-copy{left:var(--hint-left,0px)!important;width:min(240px,calc(100vw - 32px))!important}
@media(max-width:360px){html body :is(#root,.r12-chrome) .r3-detail :is(.rm21-stats,.rm21-status-row)>.rm23-condition{font-size:10px!important;padding:6px 7px!important}}
/* Keep the approved photographic framing, including portrait detail shots. */
html body :is(#root,.r12-chrome) .r6-gallery>img{object-fit:contain!important}
html body :is(#root,.r12-chrome) .r7-gallery-modes{background:#00000012!important;border-color:#ffffff30!important}
html body :is(#root,.r12-chrome) .r7-gallery-modes button[aria-pressed=true]{background:#ffffff08!important}
@media(min-width:900px){html body :is(#root,.r12-chrome) .discover-desk .discover__media{object-fit:contain!important}}
.r9-filter-scrim .r8-preferences-sheet>header{justify-content:flex-end;border-bottom:0;padding-bottom:0;margin-bottom:0}
