:root{color-scheme:light;--bg:#f2f2f7;--surface:#fff;--ink:#1c1c1e;--muted:#72727b;--line:#e5e5ea;--blue:#007aff;--soft:#edf5ff;font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text','Helvetica Neue','Microsoft YaHei',sans-serif}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);padding-bottom:105px;-webkit-tap-highlight-color:transparent}header{height:65px;max-width:1000px;margin:auto;padding:18px 24px;display:flex;align-items:center;justify-content:space-between}.brand{font-size:23px;font-weight:750;letter-spacing:-1px;text-decoration:none;color:var(--ink)}.badge{font-size:11px;color:#6e7783;background:#e7e9ee;border-radius:20px;padding:6px 10px}main{max-width:960px;margin:0 auto;padding:0 20px}.intro{padding:30px 6px}.intro h1{font-size:32px;letter-spacing:-1px}.connected #welcome{display:none}.panel{background:var(--surface);border-radius:24px;padding:24px;margin-bottom:18px;min-width:0}h2{font-size:28px;letter-spacing:-1px;margin:0 0 20px}h3{font-size:19px;letter-spacing:-.3px;margin:10px 0}p{line-height:1.6;font-size:14px;margin:10px 0;color:#5b5b65}.small{font-size:12px;color:var(--muted)}.titleRow,.row{display:flex;align-items:center;justify-content:space-between;gap:12px}.titleRow h2,.row h2{margin:0}.titleRow,.capturePanel>.row{margin-bottom:18px}.actions,.viewerActions,.captureActions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}button{appearance:none;font:inherit;font-size:14px;font-weight:600;min-height:46px;border:0;border-radius:14px;padding:12px 18px;background:var(--blue);color:#fff;cursor:pointer;transition:filter .15s}button:hover{filter:brightness(.96)}button:active{filter:brightness(.9)}button:disabled{opacity:.4;cursor:default}.secondary{background:#eef0f5;color:#34343b}.primary{background:var(--blue);color:white}.wide{width:100%;margin-top:12px}.back{background:none;color:var(--blue);padding:0;margin-bottom:15px;min-height:40px}.tool{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;width:60px;min-width:60px;height:62px;min-height:62px;padding:5px;background:none;color:var(--blue);font-size:10px;font-weight:500;border-radius:14px;line-height:14px}.tool .icon{width:24px;height:24px}.icon{width:24px;height:24px;display:inline-block;vertical-align:middle;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex:none}.tool span{line-height:14px}button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #a7d1ff;outline-offset:2px}label{font-size:13px;font-weight:500;color:#55555d;display:block;margin:12px 0 6px}input,select{font:inherit;font-size:16px;min-height:46px;border:1px solid var(--line);background:#f7f7fa;color:var(--ink);border-radius:12px;padding:11px 12px;width:100%;margin:0 0 10px}input[type=checkbox]{width:18px;min-height:18px;vertical-align:middle;margin:0 8px 0 0;accent-color:var(--blue)}input[type=range]{border:0;padding:0;min-height:30px;background:none;accent-color:var(--blue)}form{display:flex;gap:10px;align-items:center}form input{min-width:0;margin:0}#token{letter-spacing:5px}#notice{font-size:12px;padding:0 5px;overflow-wrap:anywhere}#notice:empty{display:none}.workflowNav{position:fixed;z-index:30;bottom:max(10px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);width:min(460px,calc(100% - 24px));height:72px;display:flex;justify-content:space-around;align-items:center;padding:6px;background:#ffffffed;backdrop-filter:blur(24px);border:1px solid #dddde5;border-radius:25px;box-shadow:0 5px 30px #0000000a}.workflowNav button{width:20%;height:58px;padding:5px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;background:none;color:#8e8e93;font-size:10px;line-height:14px;font-weight:500}.workflowNav button.active{color:var(--blue);background:#edf5ff}.workflowNav .icon{width:25px;height:25px}[hidden]{display:none!important}.segmented{display:flex;gap:3px;padding:4px;background:#eeeef3;border-radius:13px;margin:12px 0}.segmented button{flex:1;min-height:34px;padding:7px;background:none;color:#777780;border-radius:9px;font-size:13px}.segmented button[aria-pressed=true]{background:#fff;color:#1c1c1e;box-shadow:0 1px 5px #0002}details{border:1px solid var(--line);border-radius:14px;margin:12px 0;padding:0 14px}summary{cursor:pointer;padding:13px 0;font-size:13px;color:#42424c}details[open]{padding-bottom:10px}.range{display:grid;grid-template-columns:1fr 1fr;gap:12px}.range label,.range select{font-size:12px}.captureStage{position:relative;aspect-ratio:4/3;border-radius:20px;overflow:hidden;background:#171a21;color:white;display:flex;align-items:center;justify-content:center}.captureStage video{position:absolute;inset:0;object-fit:contain;width:100%;height:100%}#captureEmpty{text-align:center;padding:18px}#captureEmpty .scanGlyph{font-size:52px;color:#abb8d0}#captureEmpty strong{font-size:16px}#captureEmpty p{color:#aeb9cc;font-size:12px}.fullscreenButton{position:absolute;top:10px;right:10px;z-index:3;background:#151a2480;color:white;backdrop-filter:blur(15px);font-size:11px;padding:7px 11px;min-height:34px;border-radius:10px}.recordBadge{position:absolute;top:12px;left:12px;background:#1119;padding:6px 10px;border-radius:12px;display:flex;align-items:center;gap:7px;font-size:12px}.recordBadge span{width:8px;height:8px;background:#ff453a;border-radius:50%}.liveGuide{position:absolute;bottom:10px;left:10px;right:10px;text-align:center;color:white;background:#111a;padding:8px;border-radius:12px;font-size:12px}.captureActions{margin-top:14px}.captureActions button{flex:1;font-size:13px;padding:12px}.recordButton{background:#ff453a}.readiness{display:flex;align-items:center;gap:12px;margin:14px 0}.readiness b{font-size:13px}.readiness p{font-size:11px;margin:4px 0}.captureRing{flex:none;display:grid;place-items:center;width:54px;height:54px;border-radius:50%;background:conic-gradient(var(--blue) var(--ring,0%),#e5e5eb 0)}.captureRing span{width:44px;height:44px;background:#fff;border-radius:50%;display:grid;place-items:center;font-size:11px}.captureRing.ready{background:conic-gradient(#30b66d var(--ring,0%),#e5e5eb 0)}#captureFiles{margin:10px 0;font-size:12px;min-height:38px;padding:8px 12px}.warning{background:#fff4df;border:1px solid #f4d28c;border-radius:14px;padding:14px;font-size:13px}.warning p{font-size:12px}.warning label{color:#77551e}progress{display:block;width:100%;height:8px;border:0;border-radius:8px;overflow:hidden;background:#e6e9ee;accent-color:var(--blue);margin:15px 0}progress::-webkit-progress-bar{background:#e6e9ee}progress::-webkit-progress-value{background:var(--blue);border-radius:8px}.geometryStage{position:relative;margin-top:16px;height:390px;border-radius:20px;overflow:hidden;background:#111827}.geometryStage canvas{width:100%;height:100%;display:block;touch-action:none}.geometryStage>span{position:absolute;left:14px;top:12px;right:12px;font-size:11px;color:#b8c9e7;pointer-events:none}.legend{position:absolute;bottom:12px;left:14px;color:#b8c9e7;font-size:10px;pointer-events:none}.legend i{display:inline-block;width:6px;height:6px;background:#b0bbcc;border-radius:50%;margin:0 4px}.legend i:nth-of-type(2){background:#60a5fa;margin-left:10px}.conclusion{display:flex;gap:12px;align-items:flex-start;border-radius:16px;background:#f0f4f9;padding:16px;margin:16px 0}.conclusion>.icon{color:#738399}.conclusion.ready{background:#edf8f0}.conclusion.ready>.icon{color:#2b9f60}.conclusion.warning,.conclusion.review{background:#fff5e5}.conclusion b{font-size:14px}.conclusion p{font-size:12px;margin:5px 0}.trainingSettings{padding:8px 0}.parameterHead{display:flex;justify-content:space-between;align-items:center;font-size:12px}.parameterHead label{margin:8px 0}.parameterHead output{color:var(--blue)}.trainingSettings p{font-size:11px}.processingVisual{height:390px;border-radius:20px;background:radial-gradient(ellipse at 50% 60%,#172943,#0b121f 75%);position:relative;overflow:hidden}.processingVisual canvas{width:100%;height:100%;display:block}.processingVisual span{position:absolute;bottom:14px;left:14px;font-size:10px;color:#8d9caf}.cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.model{border:1px solid var(--line);border-radius:18px;padding:18px;background:#f8f9fc;overflow-wrap:anywhere}.model:before{content:'';display:block;height:75px;border-radius:12px;background:radial-gradient(circle at 35% 35%,#c3ddff,transparent 50%),linear-gradient(135deg,#f3f7fe,#dce3f0);margin-bottom:14px}.model strong{font-size:15px}.model p{font-size:11px}.model button{width:100%;background:#e7effb;color:var(--blue);font-size:12px;min-height:40px;padding:10px}.settingsList{margin-top:8px}.settingsList button{width:100%;min-height:62px;border-radius:0;display:flex;align-items:center;gap:13px;text-align:left;color:#303038;background:none;border-bottom:1px solid var(--line);font-weight:400}.settingsList button>.icon{color:var(--blue)}.settingsList button>span:last-child{margin-left:auto;color:#b3b3bc}.job,.upload{border-bottom:1px solid var(--line);padding:16px 0}.job strong{font-size:14px}.job p,.upload p{font-size:12px;overflow-wrap:anywhere}.jobActions{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}.jobActions button{font-size:12px;min-height:36px;padding:8px 12px;background:#eef1f6;color:#49556b}#reportImage{width:100%;border-radius:12px}#findings{padding-left:20px;font-size:13px;line-height:1.8}dialog{border:0;border-radius:25px;padding:20px;background:#fff;color:var(--ink);width:min(480px,calc(100% - 24px));max-height:85dvh;overflow:auto;box-shadow:0 15px 80px #0003}dialog::backdrop{background:#10141c55;backdrop-filter:blur(3px)}#actionSheet{margin:auto auto max(12px,env(safe-area-inset-bottom));}.sheetHandle{height:5px;width:38px;background:#d5d5dc;border-radius:3px;margin:-8px auto 12px}.sheetItem{width:100%;display:flex;align-items:center;gap:14px;background:#f4f5f8;color:#222631;text-align:left;margin:8px 0;font-weight:400;min-height:54px}.sheetItem .icon{color:var(--blue)}.sheetText{font-size:13px;line-height:1.7}.sheetText code{display:block;white-space:pre-wrap;overflow-wrap:anywhere;background:#f1f3f7;padding:10px;border-radius:10px;font-size:11px}pre{background:#101723;color:#cddbf0;padding:16px;border-radius:14px;max-height:60dvh;overflow:auto;white-space:pre-wrap;font-size:11px}#viewerPanel{border-radius:20px;overflow:hidden;background:#10141c;color:white}#viewerPage{margin-bottom:20px}.viewerHeading{display:flex;justify-content:space-between;align-items:center;padding:5px 14px}.viewerHeading h3{font-size:16px;overflow-wrap:anywhere}.viewerHeading .tool{color:#d5e6ff}#canvas{display:block;width:100%;height:55dvh;min-height:310px;touch-action:none;background:#10141c}.resultToolbar{display:grid;grid-template-columns:repeat(4,1fr);background:#1c2330;padding:8px;gap:5px}.resultToolbar .tool{width:100%;color:#d6e6ff}.viewerPanel>.small{padding:0 14px;color:#97a8c2;font-size:11px}.viewerPanel.expanded{position:fixed;inset:0;z-index:50;border-radius:0!important;height:100dvh;display:flex;flex-direction:column;padding-top:env(safe-area-inset-top)}.viewerPanel.expanded #canvas{flex:1;height:0;min-height:0}.viewerPanel.expanded .resultToolbar{padding-bottom:max(8px,env(safe-area-inset-bottom))}.viewerPanel.expanded>.small{display:none}.viewerExpanded{overflow:hidden}.captureStage.expanded{position:fixed;inset:0;z-index:55;aspect-ratio:auto;border-radius:0;width:100%;height:100dvh}.captureStage.expanded .fullscreenButton{top:max(15px,env(safe-area-inset-top))}.captureStopOverlay{display:none}.captureStage.expanded .captureStopOverlay{display:block;position:absolute;bottom:30px;left:50%;transform:translateX(-50%);background:#ff453a;z-index:6}#logDialog .titleRow{margin-bottom:0}#logDialog pre{margin-bottom:0}@media(min-width:800px){.capturePanel{max-width:640px;margin:0 auto}.captureStage{aspect-ratio:16/10}.cards{grid-template-columns:repeat(3,minmax(0,1fr))}.geometryStage{height:480px}}@media(max-width:600px){main{padding:0 12px}header{height:56px;padding:14px 20px}.panel{padding:20px 16px;border-radius:22px}h2{font-size:26px}.titleRow,.capturePanel>.row{margin-bottom:12px}.captureStage{aspect-ratio:4/3}.capturePanel #modeTip{font-size:11px}.geometryStage,.processingVisual{height:330px}.cards{gap:10px}.model{padding:14px}.model strong{font-size:13px}.tool{width:52px;min-width:52px;height:58px;min-height:58px}#pairForm input{width:50%}.range{gap:8px}}@media(prefers-reduced-motion:reduce){*{transition:none!important}}

/* Unified icon-over-caption actions and immersive capture. */
.actionIcon{display:inline-flex!important;flex-direction:column;align-items:center!important;justify-content:center!important;gap:6px;min-height:66px!important;text-align:center!important;line-height:1.3;font-size:12px!important;padding:10px 14px!important}.actionIcon>.icon{width:24px;height:24px}.actionIcon>span{display:block;margin:0!important}.actions,.captureActions,.jobActions{justify-content:center}.actions button{min-width:120px}.captureQuality{background:#edf5ff;border-radius:16px;padding:4px 14px;margin:12px 0}.captureQuality label{color:#007aff}.captureQuality select{background:white}.captureStage .readiness{position:absolute;z-index:4;left:12px;right:12px;bottom:70px;margin:0;background:#101827bb;border-radius:16px;padding:10px;color:white;pointer-events:none}.captureStage .readiness p{color:#dbe4f4}.captureStage .captureRing{color:#1c1c1e}.captureStage .readiness b{font-size:12px}.captureStage.expanded .readiness{bottom:max(160px,calc(env(safe-area-inset-bottom) + 140px));left:20px;right:20px}.captureStage.expanded .liveGuide{bottom:max(115px,calc(env(safe-area-inset-bottom) + 95px))}.captureStage.expanded .captureStopOverlay{bottom:max(25px,env(safe-area-inset-bottom))}.captureStage .fullscreenButton{max-width:90px}.captureStage .recordBadge{top:max(18px,env(safe-area-inset-top))}.settingsList .actionIcon{width:100%;}.sheetItem.actionIcon{min-height:68px}.captureActions .actionIcon{min-width:90px}.tourControl{padding:6px 10px}.tourControl select{margin-top:8px}

.settingsList button,.sheetItem{flex-direction:column;align-items:center;text-align:center;gap:6px;font-size:12px}.settingsList button>span:last-child{display:none}.viewerActions{justify-content:center}

[hidden]{display:none!important}
/* v6: explicit controls instead of assigning "more" to unrelated actions. */
button:not(.tool):not(.shutter):not(.modelCard)>svg{width:22px;height:22px;margin-right:7px}button:not(.tool):not(.shutter):not(.modelCard)>.buttonCaption{vertical-align:middle}.headerActions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex:none}.titleRow h2{flex:1;white-space:nowrap}.tool{height:76px;min-height:76px;gap:6px;padding:0;width:54px;min-width:54px;font-size:11px;background:transparent}.tool .iconPlate{width:48px;height:48px;display:flex;align-items:center;justify-content:center;border-radius:16px;background:#edf2f9;color:#1478e4}.tool .iconPlate .icon{width:27px;height:27px}.tool .buttonCaption{font-size:11px;line-height:16px}.tool:hover .iconPlate{background:#deebfc}.viewerHeading .iconPlate,.resultToolbar .iconPlate{background:#293448;color:#deebff}.resultToolbar .tool{width:100%;}.back{display:inline-flex;align-items:center;gap:4px;min-height:48px;padding:4px 8px;margin-left:-8px;font-size:16px}.back .icon{width:25px!important;height:25px!important;margin:0!important}.settingsList button{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:12px;font-size:15px;text-align:left;min-height:66px}.settingsList button>span:last-child{display:block;margin-left:auto}.sheetItem{flex-direction:row;align-items:center;justify-content:flex-start;text-align:left;font-size:14px}.sheetItem svg{margin-right:0!important}.captureStage.expanded .shutter{display:grid;place-items:center;width:76px;height:76px;min-height:76px;border-radius:50%;padding:6px;border:3px solid white;background:#ffffff26;bottom:max(48px,calc(env(safe-area-inset-bottom) + 32px));box-shadow:0 0 0 5px #0002}.shutterCore{display:block;width:58px;height:58px;border-radius:50%;background:#ff453a;transition:border-radius .15s,transform .15s}.isRecording .shutterCore{border-radius:9px;transform:scale(.55)}#shutterLabel{position:absolute;z-index:6;bottom:max(18px,env(safe-area-inset-bottom));left:0;right:0;text-align:center;color:white;font-size:12px;pointer-events:none}.captureStage.expanded .liveGuide{bottom:max(139px,calc(env(safe-area-inset-bottom) + 120px))}.captureStage.expanded .readiness{bottom:max(189px,calc(env(safe-area-inset-bottom) + 170px))}.fullscreenButton{display:flex;align-items:center;justify-content:center;gap:3px;max-width:120px!important}.fullscreenButton>.icon{width:18px!important;margin:0!important}.cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.modelCard{display:block;position:relative;aspect-ratio:3/4;width:100%;padding:0;min-height:0;border:0;border-radius:18px;overflow:hidden;text-align:left;background:#e3e9f2;color:white}.modelCard img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.modelCard .cardInfo{position:absolute;bottom:0;left:0;right:0;background:linear-gradient(transparent,#101827b8);padding:32px 12px 12px;display:block}.modelCard strong{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:14px;font-weight:600;line-height:1.5}.modelCard small{display:block;font-size:11px;opacity:.9;margin-bottom:3px}.modelCard .cardBadge{position:absolute;top:10px;left:10px;border-radius:10px;background:#fff9;color:#24507d;padding:6px;display:flex}.modelCard .cardBadge .icon{width:21px;height:21px}.modelCard:focus-visible{outline-offset:3px}.qrCards{display:grid;grid-template-columns:1fr;gap:18px}.qrCard{border:1px solid #e5e5ea;border-radius:18px;padding:16px;text-align:center}.qrCard img{display:block;width:200px;max-width:100%;margin:8px auto}.qrCard a{display:block;color:#007aff;overflow-wrap:anywhere;font-size:13px}.qrCard p{font-size:12px}.loadingModel{display:block;width:100%;height:6px;margin:10px 0}@media(min-width:700px){.cards{grid-template-columns:repeat(3,minmax(0,1fr))}.qrCards{grid-template-columns:repeat(2,minmax(0,1fr))}}[hidden]{display:none!important}

/* v7: centered pairing and consistently aligned navigation/actions. */
#welcome{text-align:center;padding:24px 12px 18px}#welcome h1{font-size:30px;margin:18px 0 8px}.pairEmblem{display:grid;place-items:center;width:84px;height:84px;margin:auto;border-radius:26px;background:linear-gradient(145deg,#e4efff,#d4e3ff);color:#007aff;box-shadow:0 12px 35px #007aff12}.pairEmblem .icon{width:46px;height:46px}#pair{max-width:430px;margin:0 auto 22px;text-align:center;padding:30px 24px}#pair h2{font-size:25px;margin-bottom:8px}#pairForm{display:flex;flex-direction:column;gap:14px;margin-top:24px}#pairForm #token{width:100%;height:60px;text-align:center;letter-spacing:7px;padding-left:19px;font-size:23px;font-variant-numeric:tabular-nums}#token::placeholder{letter-spacing:2px;font-size:16px}#pairForm button{width:100%;display:flex;align-items:center;justify-content:center;gap:8px;min-height:54px}#pairForm button svg{margin:0}#pair .pairFoot{font-size:12px;margin-top:22px;color:#8e8e93}body:not(.connected) #notice{text-align:center;max-width:430px;margin:12px auto}.trajectoryActions{display:grid;grid-template-columns:1fr 1fr;width:100%;gap:12px}.trajectoryActions button{min-width:0;width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;min-height:78px}.trajectoryActions button>svg{margin:0!important}.workflowNav button>.icon{margin:0!important;display:block;width:25px!important;height:25px!important}.workflowNav button>.buttonCaption{display:block;width:100%;text-align:center;line-height:14px}.workflowNav button{gap:5px}.compatAccess{margin-top:16px;border-top:1px solid #e5e5ea;padding-top:12px}.compatAccess summary{font-weight:600;color:#007aff}

.captureActions,#captureReview .viewerActions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;width:100%}.captureActions button,#captureReview .viewerActions button{min-width:0;width:100%;min-height:78px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:10px 6px;font-size:13px}.captureActions button>svg,#captureReview .viewerActions button>svg{margin:0!important}#captureReview{margin-top:10px}#geometryWait{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.geometryStage{background:radial-gradient(ellipse at 50% 60%,#123456,#080e20)}.geometryReveal{animation:geometryReveal 1.2s ease-out}@keyframes geometryReveal{from{opacity:0;filter:blur(8px);transform:scale(.96)}to{opacity:1;filter:blur(0);transform:scale(1)}}@media(prefers-reduced-motion:reduce){.geometryReveal{animation:none}}

.selectionMark{position:absolute;top:10px;right:10px;width:28px;height:28px;background:#ffffffd9;border:2px solid white;border-radius:8px;display:grid;place-items:center;box-shadow:0 1px 8px #0003}.selectionMark .icon{display:none;width:21px;height:21px}.selected .selectionMark{background:#007aff;color:white}.selected .selectionMark .icon{display:block}.modelCard.selected{outline:3px solid #007aff;outline-offset:2px}#selectionBar{position:sticky;bottom:94px;z-index:20;display:flex;align-items:center;gap:12px;background:#fffffff2;backdrop-filter:blur(16px);border:1px solid #e5e5ea;border-radius:20px;padding:8px 16px;margin-top:18px;box-shadow:0 8px 30px #0001}#selectionCount{flex:1;text-align:center;font-size:13px}button.danger{color:#d52d36;background:#fff0f0}.danger .iconPlate{color:#d52d36;background:#fff0f0}.deleteActions{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:22px}#deleteSyncLabel{padding:16px 10px;background:#f2f2f7;border-radius:12px;line-height:1.6}#deleteError{color:#d52d36}#library .headerActions{gap:6px}@media(max-width:400px){#library h2{font-size:23px}#library .titleRow{gap:6px}#library .headerActions .tool{min-width:48px;width:48px}}
/* Keep selection controls above the scene cover. */
.selectionMark{z-index:3;pointer-events:none}
