.sg-camera{padding:0;border:0;max-width:none;max-height:none;width:100vw;height:100dvh;background:#080b0e;color:white;overflow:hidden}
.sg-camera::backdrop{background:#000}
.sg-camera video{width:100%;height:100%;object-fit:contain;background:#050607}
.sg-camera-bar{position:absolute;top:0;left:0;right:0;padding:max(16px,env(safe-area-inset-top)) 20px 18px;display:flex;justify-content:space-between;align-items:center;background:#0009;z-index:2}
.sg-camera button{color:white;background:#171b20b3;border:1px solid #fff5;border-radius:28px;padding:10px 16px;cursor:pointer}
.sg-camera-guide{position:absolute;pointer-events:none;inset:20% 7% 23%;display:grid;place-items:center}
.sg-camera-guide svg{width:100%;height:100%;max-width:1000px;stroke:#fffb;fill:none;stroke-width:2.5;filter:drop-shadow(0 1px 3px #000)}
.sg-camera-hint{position:absolute;left:10%;right:10%;bottom:20%;text-align:center;text-shadow:0 2px 5px #000}
.sg-camera-bottom{position:absolute;bottom:0;left:0;right:0;min-height:120px;padding:20px 20px max(20px,env(safe-area-inset-bottom));background:#000b;display:flex;justify-content:space-around;align-items:center}
.sg-camera .sg-shutter{width:72px;height:72px;border-radius:50%;background:#fff8ed;border:5px double #292a2a;box-shadow:0 0 0 2px white;padding:0}
.sg-camera-error{position:absolute;inset:25% 10%;background:#171b20e8;padding:25px;border-radius:18px;text-align:center;z-index:3}
.sg-camera-error[hidden]{display:none}
.sg-camera-error p{line-height:1.7}
.sg-vin-check{position:absolute;inset:20% 6% 20%;background:#1b1b18f5;padding:30px;z-index:5;border-radius:20px;overflow:auto}
.sg-vin-check[hidden]{display:none}
.sg-vin-check input{width:100%;font:20px monospace;letter-spacing:2px;padding:14px;color:#fff;background:#ffffff18;border:1px solid #fff8}
.sg-vin-check img{max-height:130px;max-width:100%;object-fit:contain}
.sg-vin-check button{margin:16px 10px 0 0}
.sg-camera [hidden]{display:none!important}
body:has(.sg-camera[open]){overflow:hidden}
@media(max-width:700px){.sg-camera-guide{inset:24% 3% 26%}}
dialog.sg-camera{--sg-bar:calc(64px + env(safe-area-inset-top,0px));--sg-bottom:calc(128px + env(safe-area-inset-bottom,0px));position:fixed!important;inset:0!important;margin:0!important;width:100vw!important;height:100dvh!important;max-width:none!important;max-height:none!important;padding:0!important;border:0!important;border-radius:0!important;transform:none!important;box-shadow:none!important;backdrop-filter:none!important;background:#080b0f!important}
dialog.sg-camera video{position:absolute;top:var(--sg-bar);left:0;width:100%;height:calc(100% - var(--sg-bar) - var(--sg-bottom));object-fit:cover}
dialog.sg-camera .sg-camera-bar{height:var(--sg-bar);box-sizing:border-box;padding:env(safe-area-inset-top,0px) 18px 0;align-items:center;background:#080b0f;gap:12px}
dialog.sg-camera .sg-camera-bar strong{font-size:17px;font-weight:600;letter-spacing:.04em}
dialog.sg-camera button{appearance:none!important;min-height:44px;border-radius:50%!important;padding:10px!important;background:#ffffff12!important;border:1px solid #ffffff28!important;box-shadow:none!important;backdrop-filter:none!important;font-size:14px;color:#fff!important}
dialog.sg-camera button::before,dialog.sg-camera button::after{display:none!important}
dialog.sg-camera .sg-camera-bar button{min-width:44px;height:44px;line-height:1}
dialog.sg-camera .sg-camera-bar button:first-child{border:0!important;border-radius:8px!important;background:none!important;padding:8px 0!important}
dialog.sg-camera .sg-camera-guide{inset:calc(var(--sg-bar) + 24px) 10px calc(var(--sg-bottom) + 104px);margin:0;align-content:center}
dialog.sg-camera .sg-camera-guide svg{display:block;width:100%;height:auto;max-height:100%;aspect-ratio:3/2;stroke:#ffffffe0;fill:none;stroke-width:1.6;stroke-linejoin:round;stroke-linecap:round;filter:drop-shadow(0 2px 2px #000a)}
dialog.sg-camera .sg-camera-guide .body{stroke-width:3;stroke:#fff}
dialog.sg-camera .sg-camera-guide .guide-corners{stroke:#fba451;stroke-width:3.5}
dialog.sg-camera .sg-camera-guide .guide-text{fill:#fff;stroke:none;font:14px monospace;text-anchor:middle}
dialog.sg-camera .sg-camera-guide .vin-text{font-size:25px;letter-spacing:3px}
dialog.sg-camera .sg-camera-hint{bottom:calc(var(--sg-bottom) + 17px);left:22px;right:22px;margin:0;padding:10px 14px;border-radius:12px;background:#071015b8;border:1px solid #ffffff25;font-size:13px;line-height:1.6;text-align:center;z-index:1}
dialog.sg-camera .sg-camera-reference{position:absolute;left:16px;bottom:calc(var(--sg-bottom) + 78px);display:flex;align-items:center;gap:8px;pointer-events:none;color:#fff;font-size:10px;text-shadow:0 1px 2px #000}
dialog.sg-camera .sg-camera-reference img{width:64px;height:43px;object-fit:contain;background:#10181bc9;border:1px solid #ffffff50;border-radius:7px}
dialog.sg-camera .sg-camera-bottom{height:var(--sg-bottom);min-height:0;box-sizing:border-box;bottom:0;padding:14px 24px calc(14px + env(safe-area-inset-bottom,0px));background:#080b0f;display:grid;grid-template-columns:1fr 96px 1fr;justify-items:center;align-items:center;gap:15px}
dialog.sg-camera .sg-shutter{width:76px!important;height:76px!important;min-height:76px!important;padding:0!important;border:5px solid #20262b!important;outline:2px solid #fff!important;outline-offset:3px;box-shadow:none!important;background:#fff!important;border-radius:50%!important;opacity:1!important;transform:none!important}
dialog.sg-camera .sg-camera-bottom>[data-album],dialog.sg-camera .sg-camera-bottom>[data-flip]{width:58px;height:58px;padding:5px!important;font-size:12px}
dialog.sg-camera .sg-camera-error{inset:calc(var(--sg-bar) + 30px) 24px auto;padding:22px;z-index:5}
dialog.sg-camera .sg-vin-check{top:calc(var(--sg-bar) + 12px);bottom:20px;z-index:8}
dialog.sg-camera .sg-camera-error button,dialog.sg-camera .sg-vin-check button{border-radius:10px!important;padding:10px 14px!important}
@media(max-height:560px) and (orientation:landscape){dialog.sg-camera{--sg-bar:48px;--sg-bottom:0px}
dialog.sg-camera video{height:calc(100% - var(--sg-bar));width:calc(100% - 116px)}
dialog.sg-camera .sg-camera-bottom{top:var(--sg-bar);right:0;left:auto;bottom:0;width:116px;height:auto;grid-template-columns:1fr;padding:12px;gap:10px}
dialog.sg-camera .sg-camera-guide{inset:60px 126px 62px 12px}
dialog.sg-camera .sg-camera-hint{right:128px;bottom:8px;padding:5px;font-size:11px}
dialog.sg-camera .sg-camera-reference{display:none}}/* Fine projected model contours, compact availability notice, no generic cartoon. */
dialog.sg-camera .sg-camera-guide>svg{stroke-width:1!important;filter:drop-shadow(0 1px 2px #0007)!important}
dialog.sg-camera .guide-corners{stroke:#ffd19a!important;stroke-width:1.25!important;opacity:.8}
dialog.sg-camera .sg-camera-error{position:absolute!important;inset:auto!important;top:calc(var(--sg-bar) + 10px)!important;left:50%!important;transform:translateX(-50%)!important;width:min(560px,calc(100% - 32px))!important;box-sizing:border-box!important;background:#182024d9!important;border:1px solid #ffffff25!important;border-radius:14px!important;padding:12px 16px!important;text-align:center!important;z-index:4}
dialog.sg-camera .sg-camera-error h3{font-size:14px;font-weight:500;line-height:1.4;margin:0 0 5px}
dialog.sg-camera .sg-camera-error p{font-size:11px;line-height:1.5;margin:0 0 8px}
dialog.sg-camera .sg-camera-error button{font-size:11px;padding:7px 13px;min-height:34px;border-radius:20px}
dialog.sg-camera .sg-camera-bar strong{font-size:14px;font-weight:500}
dialog.sg-camera .sg-camera-reference{display:none!important}
/* Outline alignment over the live camera, with a separate angle badge. */
dialog.sg-camera .sg-camera-guide{inset:calc(var(--sg-bar) + 122px) 12px calc(var(--sg-bottom) + 70px);overflow:visible}
dialog.sg-camera .sg-camera-guide>.sg-alignment-outline{max-width:1000px;width:100%;height:100%;filter:drop-shadow(0 1px 2px #000a)!important}
dialog.sg-camera .sg-camera-guide .guide-corners{stroke:white!important;stroke-width:2.6!important;opacity:.95}
dialog.sg-camera .sg-angle-hud{position:absolute;left:50%;top:-106px;transform:translateX(-50%);display:flex;align-items:center;gap:12px;max-width:calc(100vw - 40px);padding:8px 17px 8px 8px;border:1px solid #ffffff4d;border-radius:60px;background:#17202785;backdrop-filter:blur(8px);box-shadow:0 3px 20px #0002;white-space:nowrap}
dialog.sg-camera .sg-angle-map{width:68px;height:68px;flex:none}
dialog.sg-camera .sg-angle-map svg{width:100%;height:100%;max-height:none;aspect-ratio:1;filter:none;stroke:none}
dialog.sg-camera .sg-angle-hud>div:not(.sg-angle-map){display:grid;gap:5px}
dialog.sg-camera .sg-angle-hud span{font-size:10px;letter-spacing:.12em;color:#ffffff8f}
dialog.sg-camera .sg-angle-hud strong{font-size:15px;line-height:1.4;font-weight:500;color:white}
dialog.sg-camera .sg-angle-hud>img{width:86px;height:60px;object-fit:contain;margin-left:2px}
dialog.sg-camera .sg-camera-error{top:auto!important;bottom:calc(var(--sg-bottom) + 67px)!important;background:#172027e8!important}
@media(max-width:500px){dialog.sg-camera .sg-angle-hud{gap:8px;padding-right:12px}dialog.sg-camera .sg-angle-map{width:56px;height:56px}dialog.sg-camera .sg-angle-hud strong{font-size:13px}dialog.sg-camera .sg-angle-hud>img{width:65px;height:52px}dialog.sg-camera .sg-camera-guide{inset:calc(var(--sg-bar) + 116px) 8px calc(var(--sg-bottom) + 70px)}}
@media(max-height:560px) and (orientation:landscape){dialog.sg-camera .sg-camera-guide{inset:60px 126px 50px 12px}dialog.sg-camera .sg-angle-hud{left:10px;top:2px;transform:none;padding:3px 10px 3px 3px;gap:5px}dialog.sg-camera .sg-angle-map{width:36px;height:36px}dialog.sg-camera .sg-angle-hud>img{display:none}dialog.sg-camera .sg-angle-hud span{display:none}dialog.sg-camera .sg-angle-hud strong{font-size:11px}dialog.sg-camera .sg-camera-error{bottom:60px!important;max-width:420px}}
/* The outline itself is the alignment guide; no corner brackets. */
dialog.sg-camera .guide-corners{display:none!important}
dialog.sg-camera .sg-camera-guide{inset:calc(var(--sg-bar) + 108px) 0 calc(var(--sg-bottom) + 46px)}
dialog.sg-camera .sg-camera-guide>.sg-alignment-outline{max-width:1180px!important;transform:scale(1.16);transform-origin:center}
dialog.sg-camera[data-angle=vin] .sg-camera-guide>.sg-alignment-outline{transform:scale(1.05)}
@media(max-width:760px){dialog.sg-camera .sg-camera-guide{inset:calc(var(--sg-bar) + 100px) 0 calc(var(--sg-bottom) + 44px)}dialog.sg-camera .sg-camera-guide>.sg-alignment-outline{transform:scale(1.16)}}
@media(max-height:560px) and (orientation:landscape){dialog.sg-camera .sg-camera-guide{inset:56px 120px 42px 0}dialog.sg-camera .sg-camera-guide>.sg-alignment-outline{transform:scale(1.1)}}
@media(max-width:760px) and (orientation:portrait){dialog.sg-camera .sg-angle-hud{top:-92px}}
dialog.sg-camera:is([data-angle=driver],[data-angle=backseat],[data-angle=odometer]) .sg-camera-guide>.sg-alignment-outline{transform:scale(1.02)}
/* Keep alignment art inside a safe area instead of scaling it beyond the preview. */
dialog.sg-camera{--sg-safe:1cm}
dialog.sg-camera .sg-camera-guide{inset:calc(var(--sg-bar) + var(--sg-safe)) calc(var(--sg-safe) + env(safe-area-inset-right,0px)) calc(var(--sg-bottom) + var(--sg-safe)) calc(var(--sg-safe) + env(safe-area-inset-left,0px))!important}
dialog.sg-camera .sg-camera-guide>.sg-alignment-outline{width:100%!important;height:100%!important;max-width:none!important;max-height:100%!important;transform:none!important}
dialog.sg-camera .sg-angle-hud{position:fixed!important;top:calc(var(--sg-bar) + 2px)!important;left:calc(var(--sg-safe) + env(safe-area-inset-left,0px))!important;transform:none!important;padding:0 8px!important;gap:7px;height:32px;border:0;background:transparent}
dialog.sg-camera .sg-angle-map{width:30px!important;height:30px!important}
dialog.sg-camera .sg-angle-hud strong{font-size:12px!important}
dialog.sg-camera .sg-angle-hud span,dialog.sg-camera .sg-angle-hud>img{display:none!important}
dialog.sg-camera button:not(.sg-shutter){border-radius:24px!important;background:linear-gradient(155deg,#c4814938,#241b16b0)!important;border:1px solid #f2bd7d9c!important;box-shadow:inset 0 1px 3px #ffe5c26b!important;color:#fff0dc!important}
dialog.sg-camera .sg-zoom{position:absolute;right:24px;bottom:calc(var(--sg-bottom) + 8px);z-index:3;display:flex;gap:10px;align-items:center;padding:7px 12px;border-radius:22px;background:#121819d9;color:#fff0dc;font-size:12px}
dialog.sg-camera .sg-zoom input{width:130px;accent-color:#ff9b35}
dialog.sg-camera .sg-rotate-hint{position:absolute;inset:var(--sg-bar) 0 var(--sg-bottom);z-index:4;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:16px;padding:24px;background:#0a1012e8;text-align:center}
dialog.sg-camera .sg-rotate-hint strong{font-size:22px;color:#ffc17b}
dialog.sg-camera .sg-rotate-hint span{font-size:14px;line-height:1.6}
dialog.sg-camera .sg-shutter:disabled{opacity:.35!important}
@media(orientation:landscape) and (max-height:560px){dialog.sg-camera{--sg-bar:44px;--sg-bottom:70px}dialog.sg-camera .sg-camera-bottom{height:var(--sg-bottom);padding:7px 20px;grid-template-columns:1fr 80px 1fr}dialog.sg-camera .sg-shutter{width:48px!important;height:48px!important;min-height:48px!important}dialog.sg-camera .sg-camera-hint{bottom:calc(var(--sg-bottom) + 4px);left:var(--sg-safe);right:auto;max-width:42%;font-size:10px;padding:4px 8px}dialog.sg-camera .sg-zoom{right:var(--sg-safe);bottom:calc(var(--sg-bottom) + 4px);padding:4px 10px}dialog.sg-camera .sg-zoom input{width:100px}}
/* A sideways guide works even with phone orientation locked. */
dialog.sg-camera .sg-rotate-hint{display:none!important}
dialog.sg-camera .sg-camera-guide{container-type:size;pointer-events:none}
dialog.sg-camera .sg-camera-guide>.sg-alignment-outline{object-fit:contain!important}
dialog.sg-camera.sg-guide-sideways .sg-camera-guide>.sg-alignment-outline{position:absolute!important;left:50%!important;top:50%!important;width:100cqh!important;height:100cqw!important;max-width:none!important;max-height:none!important;transform:translate(-50%,-50%) rotate(90deg)!important}
dialog.sg-camera .sg-zoom{pointer-events:none;font-size:12px}
dialog.sg-camera .sg-zoom input{display:none!important}
dialog.sg-camera video{touch-action:none}
