:root{font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#162330;background:#f6f8fa;--brand:#0056d6;--muted:#667582;--line:#e1e7ed}*{box-sizing:border-box}[hidden]{display:none!important}body{margin:0;padding-bottom:80px}a{color:inherit}.top{height:72px;padding:4px max(16px,calc((100vw - 920px)/2));display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);background:#fff}.brand{text-decoration:none;font-size:23px;font-weight:700;letter-spacing:-1px}.brand span{font-size:9px;letter-spacing:1.7px;font-weight:600;display:block;color:var(--muted);margin-top:2px}main{max-width:920px;margin:auto;padding:4px}.intro{padding:38px 20px 24px;max-width:600px}.eyebrow,.step{font-size:10px;letter-spacing:1.5px;color:var(--muted);font-weight:650}h1{font-size:clamp(34px,6vw,48px);letter-spacing:-1.6px;line-height:1.08;margin:12px 0 16px;font-weight:600}h2{font-size:19px;letter-spacing:-.4px;margin:0 0 12px}p{color:var(--muted);font-size:14px;line-height:1.6;margin:10px 0 16px}.panel{background:#fff;border:1px solid var(--line);border-radius:18px;padding:22px;margin:12px 4px}.sectionTitle{display:flex;align-items:center;justify-content:space-between;gap:12px}.sectionTitle h2{margin:0}.grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.wide{grid-column:1/-1}label{display:block;font-size:12px;font-weight:550;line-height:1.5;margin:10px 0}input,select,textarea{font:inherit;font-size:16px;font-weight:400;width:100%;min-width:0;min-height:44px;border:1px solid #ced7df;border-radius:10px;background:#fff;color:inherit;padding:10px 12px;margin-top:6px}textarea{resize:vertical}input:focus-visible,select:focus-visible,textarea:focus-visible,button:focus-visible,a:focus-visible{outline:3px solid #9bc4ff;outline-offset:2px}button,.textlink{font:inherit;font-size:13px;font-weight:600;border-radius:10px;min-height:44px;padding:10px 16px;cursor:pointer;border:1px solid var(--line);background:white;color:inherit}button:disabled{cursor:not-allowed;opacity:.55}.primary{background:var(--brand);border-color:var(--brand);color:#fff}.quiet{border-color:transparent;background:transparent;color:var(--muted);padding:8px}.actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-top:12px}.textlink{border:none;color:var(--brand);text-decoration:none}.check{display:flex;gap:10px;align-items:flex-start;font-weight:400;font-size:13px;margin:18px 0}.check input{width:18px;height:18px;min-height:0;flex:0 0 18px;margin:1px 0;accent-color:var(--brand)}.inputAction{display:flex;gap:6px;align-items:center}.inputAction input{flex:1}.scan{position:relative;overflow:hidden;padding:10px;margin:6px 0 0;background:#edf4ff;color:var(--brand);border-radius:8px;font-size:12px;flex:none;cursor:pointer;min-height:44px;display:flex;align-items:center}.scan input{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%;height:100%}.muted{color:var(--muted);font-weight:400}.small{font-size:11px;color:var(--muted);line-height:1.65}.notice,#message:not(:empty){margin:12px 4px;padding:14px 18px;border:1px solid #cddff6;border-radius:12px;background:#edf4ff;font-size:13px;line-height:1.5}.resultHead{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.pill{font-size:10px;color:#376080;background:#eff5f9;border-radius:20px;padding:6px 10px;white-space:nowrap}.value{font-size:44px;font-weight:550;letter-spacing:-1.7px;margin:8px 0 3px}.metrics{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:22px 0}.metric{border:1px solid var(--line);border-radius:12px;padding:16px}.metric strong{display:block;font-size:25px;font-weight:550;letter-spacing:-.5px;margin-top:5px}.metric span{font-size:11px;color:var(--muted)}.breakdown{width:100%;border-collapse:collapse;font-size:13px}.breakdown td{padding:12px 0;border-top:1px solid var(--line);vertical-align:top}.breakdown td:last-child{text-align:right;white-space:nowrap;padding-left:12px}.breakdown small{display:block;color:var(--muted);font-size:11px;line-height:1.5;margin-top:4px}.savedRow{display:flex;justify-content:space-between;align-items:center;padding:12px 0;border-top:1px solid var(--line);gap:8px}.savedRow button:first-child{text-align:left;border:none;padding-left:0;flex:1}.savedRow small{display:block;font-weight:400;color:var(--muted);margin-top:4px}.principles{padding:30px 24px}.rewardNote{display:flex;gap:24px;font-size:12px;color:var(--muted)}.rewardNote strong{color:#162330;display:block;font-size:23px;font-weight:550;margin-bottom:5px}.bottom{position:fixed;bottom:0;left:0;right:0;display:flex;justify-content:center;gap:4px;padding:4px 4px max(4px,env(safe-area-inset-bottom));background:rgba(255,255,255,.98);border-top:1px solid var(--line);z-index:10}.bottom a{padding:14px 12px;text-decoration:none;font-size:11px;border-radius:9px;min-height:44px}.bottom [aria-current]{color:var(--brand);background:#edf4ff}footer{padding:4px 24px 24px;display:flex;gap:20px;flex-wrap:wrap}footer a{color:var(--muted);font-size:11px;padding:10px 0}.adjustment{border-top:1px solid var(--line);padding:12px 0;display:grid;grid-template-columns:1fr 1fr;gap:8px}.adjustment label{margin:0}.adjustment .wide{grid-column:1/-1}details{margin:18px 0}summary{font-size:13px;cursor:pointer;padding:10px 0}ul{padding-left:18px;font-size:12px;color:var(--muted);line-height:1.7}#authPanel{max-width:500px}#result:focus{outline:none}@media(max-width:480px){.panel{padding:18px 14px;border-radius:14px}.intro{padding:28px 14px 14px}.grid{gap:8px 10px}.sectionTitle{align-items:flex-start}.step{font-size:8px}.value{font-size:38px}.metric{padding:12px}.metric strong{font-size:23px}.resultHead{flex-direction:column}.rewardNote{gap:20px}.bottom a{padding:14px 10px}.breakdown{font-size:12px}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}
#vehicleCapture{width:min(960px,calc(100vw - 16px));max-height:calc(100dvh - 16px);padding:16px;border:1px solid #263d51;border-radius:20px;background:#101b26;color:#f3f7fc;overflow:auto}#vehicleCapture::backdrop{background:#06111de0}.captureTop{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}.captureTop h2{margin:5px 0 0;font-size:18px}.captureBrand{font-size:10px;letter-spacing:3px;color:#9ab6ca}.captureTop button{color:#f3f7fc;background:transparent;border-color:#405267;font-size:22px}.captureView{aspect-ratio:16/10;position:relative;overflow:hidden;border-radius:14px;background:#050b11}.captureView video{width:100%;height:100%;object-fit:contain}.captureGuide{position:absolute;inset:18% 9%;pointer-events:none}.captureGuide i{position:absolute;width:38px;height:38px;border-color:#a9d8ff;border-style:solid;border-width:0;filter:drop-shadow(0 0 4px #072945)}.captureGuide i:nth-child(1){top:0;left:0;border-top-width:2px;border-left-width:2px;border-radius:12px 0 0}.captureGuide i:nth-child(2){top:0;right:0;border-top-width:2px;border-right-width:2px;border-radius:0 12px 0 0}.captureGuide i:nth-child(3){bottom:0;left:0;border-bottom-width:2px;border-left-width:2px;border-radius:0 0 0 12px}.captureGuide i:nth-child(4){bottom:0;right:0;border-bottom-width:2px;border-right-width:2px;border-radius:0 0 12px}.captureAxis{position:absolute;left:8%;right:8%;top:60%;border-top:1px solid #ffffff40}.captureHud{position:absolute;top:14px;left:14px;right:14px;display:flex;justify-content:space-between;font-size:10px;letter-spacing:1.4px;text-shadow:0 1px 4px #000}.captureHud span{background:#091829c9;padding:7px 10px;border-radius:20px}.captureCaption{position:absolute;bottom:12px;left:16px;right:16px;padding:10px 12px;background:#061421c9;border-radius:10px}.captureCaption strong{display:block;font-size:14px}.captureCaption span{display:block;font-size:11px;color:#bfcedb;margin-top:4px}#captureCountdown{position:absolute;top:38%;left:0;right:0;text-align:center;font-size:40px;font-weight:500;text-shadow:0 2px 10px #000}.captureControls{display:flex;gap:8px;flex-wrap:wrap;align-items:end}.captureControls label{margin:0;flex:1;min-width:160px}.captureControls button{margin:0}.capturePhotos{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:14px}.capturePhotos figure{margin:0;min-width:0}.capturePhotos img{display:block;width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:9px}.capturePhotos figcaption{font-size:11px;padding:6px 0}.capturePhotos button{min-height:36px;padding:4px 8px;font-size:11px}#capturePlayback{width:100%;max-height:260px;margin-top:14px;border-radius:12px}#vehicleCapture p{color:#b6c6d5;font-size:12px}#vehicleCapture .primary{background:#c7e4ff;color:#102739;border-color:#c7e4ff}#vehicleCapture a{color:#c7e4ff}#captureSummary img{width:80px;height:60px;object-fit:cover;border-radius:8px;margin:4px}.captureNoticeWarn{color:#ffd69d!important}@media(orientation:landscape) and (max-height:600px){#vehicleCapture{padding:12px max(20px,env(safe-area-inset-left))}.captureView{max-height:52dvh;aspect-ratio:2}.captureControls{padding:8px 16px}.captureCaption{bottom:6px;padding:5px 10px}.captureGuide{inset:18% 16%}}@media(max-width:400px){.capturePhotos{grid-template-columns:repeat(2,1fr)}.captureControls button{flex:1}.captureView{aspect-ratio:4/3}.captureCaption span{display:none}}
#vehicleCapture button:not(.primary):not(#closeCapture),#vehicleCapture select{background:#203448;color:#ecf5ff;border-color:#405267}#vehicleCapture select option{background:#203448;color:#ecf5ff}
/* Consistent compact controls; retain comfortable touch targets. */
button,.textlink,.scan,.quiet,.capturePhotos button{padding:5px;min-height:44px;min-width:44px}
#vehicleCapture,#scanner{margin:8px auto auto;width:min(560px,calc(100vw - 16px));max-height:calc(100dvh - 16px);padding:12px;border:1px solid #263d51;border-radius:16px;background:#101b26;color:#f3f7fc;overflow:auto}
#scanner::backdrop{background:#06111de0}
.captureView,.scannerView{position:relative;width:100%;aspect-ratio:1;max-height:none;overflow:hidden;border-radius:12px;background:#050b11}
.captureView video,.scannerView video{display:block;width:100%;height:100%;object-fit:cover}
.captureGuide{inset:9%}.capturePhotos img{aspect-ratio:1}#captureSummary img{height:80px}
#scannerGuide{position:absolute;left:6%;right:6%;top:40%;height:20%;border:2px solid #c7e4ff;border-radius:10px;box-shadow:0 0 0 100vmax #0007;pointer-events:none}
#scannerGuide span{position:absolute;bottom:calc(100% + 10px);left:0;font-size:12px;background:#101b26;padding:5px;border-radius:5px}
#scanner[data-kind="miles"] #scannerGuide{left:18%;right:18%;top:35%;height:30%}
#scanner p{color:#b6c6d5}#scanner button:not(.primary){background:#203448;color:#ecf5ff;border-color:#405267}
@media(orientation:landscape) and (max-height:600px){.captureView,.scannerView{width:min(100%,65dvh);margin:auto;aspect-ratio:1;max-height:none}.captureGuide{inset:9%}}
/* Capture controls stay legible at narrow widths. */
.captureControls{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:stretch}
.captureControls label{grid-column:1/-1;min-width:0;width:100%}
.captureControls select{width:100%}.captureControls button{font-size:12px;line-height:1.35;overflow-wrap:normal;white-space:normal;min-width:0}
#captureSummary:not(:empty){display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
#captureSummary img{display:block;width:100%;height:auto;aspect-ratio:1;object-fit:cover;margin:0;border-radius:10px}
#decodedVehicle:not(:empty){font-size:18px;font-weight:600;color:var(--fg,#162330);margin:12px 0}
#scanner .actions{position:sticky;bottom:-12px;background:#101b26;padding:8px 0;margin:0;z-index:2}
#scanReading{width:100%;min-height:44px}
@media(orientation:landscape) and (max-height:600px){
 #scanner[open]{display:grid;grid-template-columns:minmax(0,1fr) minmax(190px,.65fr);gap:8px 16px;align-content:start;width:min(850px,calc(100vw - 24px));padding:10px 16px}
 #scanner .captureTop{grid-column:1/-1;margin:0}#scanner .captureTop h2{margin:0}
 #scanner .scannerView{grid-column:1;grid-row:2/4;width:100%;height:min(60dvh,240px);aspect-ratio:auto;margin:0}
 #scannerHint{grid-column:2;grid-row:2;margin:0;font-size:12px}
 #scanner .actions{grid-column:2;grid-row:3;position:static;align-self:end;padding:0}
}
.captureControls{grid-template-columns:repeat(2,minmax(0,1fr))}
#captureSummary img,.capturePhotos img{cursor:zoom-in}
#captureSummary img:focus-visible,.capturePhotos img:focus-visible{outline:3px solid #9bc4ff;outline-offset:2px}
#imageViewer{width:min(1000px,calc(100vw - 16px));max-height:calc(100dvh - 16px);padding:12px;margin:auto;background:#101b26;color:#f3f7fc;border:1px solid #405267;border-radius:16px;overflow:auto}
#imageViewer::backdrop{background:#06111ded}
#imageViewer img{display:block;max-width:100%;max-height:calc(100dvh - 160px);width:auto;height:auto;margin:auto;object-fit:contain}
#imageViewer button{background:#203448;color:#ecf5ff;border-color:#405267}
#imageViewer .actions{justify-content:space-between}#imageViewerCount{font-size:12px;color:#bfcedb}
.vehicleShare{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:20px;padding:16px;border:1px solid #cbbd98;border-radius:14px;background:#13232e;color:#f5f2eb}
.vehicleShare div>span{display:block;font-size:9px;letter-spacing:2px;color:#d6c49c}.vehicleShare strong{display:block;font-size:16px;font-weight:500;margin-top:5px}
.vehicleShare button{background:transparent;border:1px solid #bbaa84;color:#f5f2eb;white-space:nowrap}.vehicleShare button span{padding-left:8px;color:#d6c49c}
.sharedGallery{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.sharedGallery img{display:block;width:100%;aspect-ratio:1;object-fit:cover;border-radius:10px}.sharedVideo{width:100%;max-height:70dvh}#ownerVehicles .savedRow{flex-wrap:wrap}#ownerVehicles .savedRow p{margin:4px 0}#ownerVehicles .actions{margin:0}
.rewardNote>span{flex:1;line-height:1.6}.rewardNote small{display:block;font-size:11px;margin-top:8px}.rewardNote strong{margin:4px 0}.buyerActions{padding:0 20px 12px}.dealerCode{font-size:16px;font-weight:650;overflow-wrap:anywhere;letter-spacing:.6px;color:#162330}#dealerQR{display:block;max-width:220px;height:auto;margin:12px 0}#optionalVehicle>p{padding:0 16px}

/* Invitation-only typography and aligned touch targets. */
.invitationPage .intro{max-width:540px;padding:32px 20px;margin:0 auto}
.invitationPage h1{font-size:clamp(28px,7vw,38px);line-height:1.18;letter-spacing:-1px;margin:18px 0 28px;text-wrap:balance}
.invitationPage .actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:0 0 12px}
.invitationPage .textlink{display:flex;align-items:center;justify-content:center;min-height:48px;padding:5px;font-size:13px;line-height:1.3;text-align:center;border:1px solid var(--line);border-radius:10px}
.invitationPage .invitationJoin{width:100%;background:var(--brand);color:#fff;border-color:var(--brand)}
.invitationPage .small{text-align:center;margin:14px 0 0;font-size:12px}
@media(max-width:340px){.invitationPage .actions{grid-template-columns:1fr}}

.invitationPage h1{font-size:clamp(24px,6vw,30px);margin-bottom:12px}
.invitationDescription{font-size:13px;line-height:1.6;margin:0 0 24px}
#invitationInventory{margin-top:24px}.invitationViewport{overflow:hidden;border-radius:12px}#invitationTrack{display:flex;width:max-content;gap:12px;animation:invitationSlide 45s linear infinite}#invitationInventory:hover #invitationTrack,#invitationInventory:focus-within #invitationTrack,#invitationInventory.paused #invitationTrack{animation-play-state:paused}
.invitationCard{display:block;width:230px;flex:none;border:1px solid var(--line);border-radius:12px;background:white;overflow:hidden;text-decoration:none}.invitationCard img{width:100%;aspect-ratio:4/3;object-fit:cover;display:block}.invitationCard strong{display:block;padding:10px 10px 0;font-size:13px}.invitationCard p{padding:0 10px;font-size:11px;line-height:1.5;overflow-wrap:anywhere;margin:6px 0 12px}#pauseInventory{font-size:11px;display:block;margin-left:auto}
@keyframes invitationSlide{to{transform:translateX(calc(-50% - 6px))}}
@media(prefers-reduced-motion:reduce){#invitationTrack{animation:none}.invitationViewport{overflow-x:auto}#invitationTrack [aria-hidden=true]{display:none}#pauseInventory{display:none}}

/* Referral controls and saved vehicles: contained, aligned, readable on phones. */
#shareLinkFallback{display:none!important}
.buyerActions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:0 4px 16px;padding:0 14px}
.buyerActions .textlink{display:flex;align-items:center;justify-content:center;text-align:center;min-height:46px;padding:5px;font-size:13px;line-height:1.3;border:1px solid var(--line)}
#optionalVehicle{margin:8px 4px 16px}#optionalVehicle>summary{padding:12px 14px;font-size:14px}
#garagePanel .sectionTitle{align-items:center;margin-bottom:12px}#garagePanel .sectionTitle h2{font-size:20px}#garageRefresh{font-size:12px;min-height:40px;padding:5px 10px}
#ownerVehicles .savedRow{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;padding:16px 0;align-items:start}
#ownerVehicles .savedRow>div:first-child{min-width:0}#ownerVehicles .savedRow strong{display:block;font-size:15px;line-height:1.4;overflow-wrap:anywhere}
#ownerVehicles .savedRow .small{font-size:11px;line-height:1.7;overflow-wrap:anywhere;margin-top:6px}
#ownerVehicles .actions{display:flex;gap:8px;align-self:center}#ownerVehicles .actions button{flex:none!important;text-align:center!important;border:1px solid var(--line)!important;padding:5px 10px!important;font-size:12px}
#ownerVehicles .actions button:first-child{color:var(--brand);background:#edf4ff}
#referralPanel{margin-top:12px}#ownerReferralCount{margin:8px 0}#refereeStatus:empty{display:none}
.buyerChat{display:inline-flex;align-items:center;justify-content:center;flex:none;width:42px;height:42px;border-radius:50%;border:1px solid #c6dafa;background:#edf4ff;color:var(--brand);text-decoration:none;animation:buyerChatPulse 2.8s ease-out infinite}
.buyerChat:hover{background:#dfeeff}.buyerChat:focus-visible{outline:3px solid #9bc4ff;outline-offset:3px}
@keyframes buyerChatPulse{0%,100%{box-shadow:0 0 0 0 #0056d600}35%{box-shadow:0 0 0 6px #0056d619}70%{box-shadow:0 0 0 10px #0056d600}}
@media(max-width:540px){#ownerVehicles .savedRow{grid-template-columns:minmax(0,1fr)}#ownerVehicles .actions{justify-content:flex-end}#garagePanel{padding:18px 14px}.buyerActions{gap:8px}}
@media(max-width:340px){.buyerActions{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){.buyerChat{animation:none}}

#ownerVehicles .savedRow .small span{display:block}

.tradeTracking{grid-column:1/-1;border-top:1px solid var(--line);padding-top:12px}.tradeTracking>strong{font-size:14px!important}.tradeTracking details{margin:8px 0}.referralBuyer{display:flex;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid var(--line);font-size:12px}.referralBuyer strong{color:#162330}.referralBuyer span{text-align:right}.inviteEmailPreview{background:#f6f8fa;border:1px solid var(--line);border-radius:12px;padding:20px;margin-top:16px}.inviteEmailPreview>span{font-size:9px;letter-spacing:1.5px;color:var(--muted)}.inviteEmailPreview h3{font-size:22px;line-height:1.2;letter-spacing:-.5px}.inviteEmailPreview p{font-size:12px}.inviteEmailPreview>strong{display:inline-block;background:var(--brand);color:white;border-radius:8px;padding:12px;font-size:12px}

.buyerBrand{display:inline-flex;align-items:center;gap:12px}.buyerBrand img{width:40px;height:40px;object-fit:contain}.inviteWordmark,.brand .inviteWordmark{display:inline;font-size:28px;letter-spacing:-1px;font-weight:700;color:#0056d6;margin:0}.inviteWordmark b{color:#6590ee;font-weight:inherit}
#inviteDialog{width:min(580px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto;border:1px solid var(--line);border-radius:16px;padding:20px;color:#162330;background:white}#inviteDialog::backdrop{background:#13233099}.inviteDialogTop{display:flex;align-items:center;justify-content:space-between;gap:12px}.inviteDialogTop h2{margin:0;color:#0056d6}.inviteDialogTop button{font-size:24px}.inviteEmailPreview p:empty{display:none}#inviteDialog .inviteEmailPreview h3{color:#0056d6}@media(max-width:420px){#inviteDialog .grid{grid-template-columns:1fr}#inviteDialog{padding:16px}}

#inviteDialog .actions{display:flex;flex-wrap:wrap;gap:8px}#inviteDialog .actions button{display:inline-flex;align-items:center;justify-content:center;gap:7px;white-space:nowrap;flex:0 1 auto;font-size:12px;line-height:1.3;padding:5px 10px}#inviteDialog .actions button svg{width:16px;height:16px;flex:none;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}

#inviteDialog .invitationFields{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px}#inviteDialog .invitationFields label{min-width:0;font-size:12px}#inviteDialog .invitationFields input{min-width:0;width:100%;font-size:14px}#inviteDialog [hidden]{display:none!important}#inviteDialog .inviteEmailPreview h3{font-size:18px;line-height:1.45;font-weight:600;letter-spacing:0;margin:14px 0}

.referral-center:not(.signed-in) .intro,.referral-center:not(.signed-in) .buyerActions,.referral-center:not(.signed-in) #workspace,.referral-center:not(.signed-in) #buyerAccount,.referral-center:not(.signed-in) #garagePanel,.referral-center:not(.signed-in) .principles,.referral-center:not(.signed-in) footer,.referral-center:not(.signed-in) .buyerChat{display:none!important}
.referral-center:not(.signed-in) main{max-width:460px;padding-top:36px}#authPanel h2{font-size:22px;line-height:1.4;font-weight:600}#authPanel .actions{display:flex;align-items:center;gap:8px}#authPanel button{display:inline-flex;align-items:center;justify-content:center;gap:6px}#authPanel [hidden]{display:none!important}.profileCredentials{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:16px 0}.profileCredentials div{min-width:0}.profileCredentials .credentialLabel{font-size:11px;color:var(--muted)}.profileCredentials span:not(.credentialLabel){margin:4px 0;font-size:13px;overflow-wrap:anywhere}#managedAccount a{margin-left:12px}#invitePreviewReason strong{font-weight:700}

.profileCredentials>div{display:flex;align-items:baseline;gap:6px;flex-wrap:wrap}.profileCredentials .credentialLabel::after{content:":"}

#centerProfile{display:inline-flex;align-items:center;gap:6px;padding:5px 10px;border:1px solid var(--line);border-radius:999px;background:white;color:inherit;font:600 13px/16px system-ui;box-shadow:0 1px 2px #0001}
#centerProfile::after{content:'';width:5px;height:5px;border:solid currentColor;border-width:0 1px 1px 0;transform:rotate(45deg)}
#centerProfile[aria-expanded=true]::after{transform:rotate(225deg)}
#profileTray{max-width:440px;margin:12px auto}
.signed-in #profileTray{max-width:340px;margin:8px 4px 8px auto;padding:12px;background:white;border:1px solid var(--line);border-radius:12px;box-shadow:0 8px 24px #0001}
.referral-center:not(.signed-in) #centerAccountDetails{display:none}
#profileTray #signout{margin-top:8px}

.signed-in #profileTray{width:min(320px,calc(100% - 16px));padding:12px;border-radius:13px}
#centerProfile{color:var(--brand)}
#profileHeading{font-size:16px;font-weight:650;margin:0 0 10px}
#centerAccountDetails .profileCredentials{display:grid;grid-template-columns:1fr;gap:6px;margin:8px 0}
#centerAccountDetails .profileCredentials>div,#accountChoice,#profileName{padding:7px 10px;border:1px solid var(--line);border-radius:8px;background:#fff}
#centerAccountDetails .profileCredentials span{margin:0}
#centerAccountDetails .profileActions{display:flex;gap:8px;margin-top:10px}
#centerAccountDetails .profileActions button{flex:1;margin:0}
#profileTray #signout{width:100%;color:#b53535;border:1px solid #d35353;background:white}

.signed-in #profileTray{position:absolute;top:64px;right:max(8px,calc((100vw - 920px)/2));z-index:100;margin:0;max-height:calc(100dvh - 82px);overflow:auto}

/* Referral profile uses the consultant dashboard dimensions. */
.signed-in #profileTray{box-sizing:border-box;width:min(440px,calc(100% - 16px));max-width:none;padding:8px 0;border-radius:12px}
#centerAccountDetails>:not(.profileCredentials),#profileTray>#signout{margin-inline:8px}
#profileTray>#signout{width:calc(100% - 16px)}
#centerAccountDetails .profileCredentials{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:8px 0}
#centerAccountDetails .profileCredentials>div{box-sizing:border-box;height:100px;overflow:auto;padding:8px;border-radius:12px;display:flex;flex-direction:column;align-items:flex-start;align-content:flex-start;justify-content:flex-start;flex-wrap:nowrap;gap:4px}
#centerAccountDetails .profileCredentials .credentialLabel{font-size:11px;font-weight:600}
#centerAccountDetails .credentialLabel::after{content:none}
#centerAccountDetails .profileCredentials span:not(.credentialLabel){font-size:9px;line-height:1.35;overflow-wrap:anywhere}
#profileTray button{min-height:32px;padding:5px 8px;border-radius:8px;font-size:12px;line-height:1.35}
.dashboard-referral.signed-in #profileTray{position:static;width:100%;max-height:none;margin:8px 0;overflow:visible}
.dashboard-referral.signed-in main{padding-inline:8px}
.dashboard-referral .dashboard-verification{display:none}
.dashboard-referral.signed-in .dashboard-verification{display:inline-flex;align-items:center;min-height:32px;font-size:12px;color:var(--brand)}

#inviteDialog .actions button,#inviteDialog #closeInviteDialog{
  height:35.2px;min-height:35.2px;box-sizing:border-box;padding-block:2px;
}
#inviteDialog .actions{row-gap:1.6px}
#inviteDialog #inviteType{height:22px;min-height:22px;box-sizing:border-box;padding-block:0;line-height:1.15}

/* Compact Referral Center and shared account navigation. */
.referral-center .intro{max-width:none;padding:16px 12px 8px}
.referral-center .intro>p:not(#decodedVehicle):not(#shareStatus){display:none}
.referral-center .vehicleShare{margin-top:8px;padding:12px;border-color:var(--line);background:#fff;color:var(--brand);border-radius:12px}
.referral-center .vehicleShare div>span{display:none}
.referral-center .vehicleShare strong{font-size:15px;margin:0}
.referral-center .vehicleShare button{background:var(--brand);border-color:var(--brand);color:#fff}
.referral-center .vehicleShare button span{color:inherit}
.referral-center .buyerActions{padding:0 12px 8px;gap:8px}
.referral-center .buyerActions .textlink{min-height:36px;font-size:12px;border-radius:8px}
.referral-center .principles{padding:8px 12px}
.referral-center .principles details{margin:0}
.referral-center .rewardNote{flex-direction:column;gap:12px}
.referral-center.signed-in #profileTray{position:static;width:auto;max-width:520px;max-height:none;margin:12px auto;padding:16px;overflow:visible;box-shadow:none;border-radius:12px}
#centerAccountDetails .profileCredentials{grid-template-columns:1fr;gap:0;margin:8px 0 12px}
#centerAccountDetails .profileCredentials>div{height:auto;min-height:36px;padding:8px 0;flex-direction:row;align-items:baseline;flex-wrap:wrap;gap:6px 12px;border:0;border-bottom:1px solid var(--line);border-radius:0}
#centerAccountDetails .profileCredentials .credentialLabel{width:64px;flex:none;font-size:11px;font-weight:500}
#centerAccountDetails .profileCredentials span:not(.credentialLabel){font-size:12px;line-height:1.5}
#centerAccountDetails .consultantDetail{flex-basis:100%;padding-left:76px;color:var(--muted)}
#centerAccountDetails>:not(.profileCredentials){margin-inline:0}
#profileTray #signout{margin-inline:0;width:100%}
#profileTray .check{font-size:12px;margin:12px 0}
.referral-center .bottom>:is(a,button),.referral-center .bottom #centerProfile{display:flex;flex:1;max-width:160px;min-width:0;min-height:48px;align-items:center;justify-content:center;flex-direction:column;gap:4px;padding:5px;border:0;border-radius:8px;box-shadow:none;background:transparent;color:var(--muted);font:500 10px/1.3 system-ui;text-decoration:none}
.referral-center .bottom svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.referral-center .bottom #centerProfile::after{display:none}
.referral-center .bottom #centerProfile[aria-expanded=true]{color:var(--brand);background:#edf4ff}
#profileTray,#buyerAccount,#optionalVehicle{scroll-margin-top:12px}
