:root{color-scheme:dark;--bg:#09151b;--panel:#102029;--line:#28404a;--muted:#a3b7bf;--text:#edf5f3;--accent:#d7ff77;--cyan:#68d5d0;--warn:#f1c27a;--danger:#ffafa1}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font:15px/1.55 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}button,input,select{font:inherit}button,a,input,select,summary,canvas{outline-offset:4px}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible,canvas:focus-visible{outline:3px solid var(--accent)}a{color:inherit}button,select{cursor:pointer}button{border:1px solid #43606b;border-radius:7px;padding:11px 14px;background:#182d38;color:var(--text);font-weight:650}button:hover:not(:disabled){background:#26424f}button:disabled{opacity:.45;cursor:not-allowed}button.primary{background:var(--accent);color:#162212;border-color:var(--accent)}button.primary:hover:not(:disabled){background:#e8ffb4}.full{width:100%;margin-top:16px;display:flex;align-items:center;justify-content:space-between}input,select{width:100%;border:1px solid #405c68;border-radius:6px;padding:9px 10px;background:#0b1a22;color:var(--text);min-height:44px}input[type=checkbox]{width:18px;min-height:18px;accent-color:var(--accent)}label{display:block;font-size:12px;color:#c4d6d8;font-weight:650;letter-spacing:.02em}label>input,label>select{margin-top:5px}.masthead{max-width:1440px;padding:25px 40px;display:flex;align-items:center;justify-content:space-between;margin:auto;border-bottom:1px solid var(--line)}.brand{display:flex;gap:10px;align-items:center;text-decoration:none;font-size:19px;font-weight:850;letter-spacing:.17em}.brand svg{width:37px;height:37px;stroke:var(--accent);fill:none;stroke-width:3}.brand small{font-size:9px;letter-spacing:.25em;color:var(--muted);display:block}.header-actions{display:flex;gap:25px;align-items:center;font-size:13px}.header-actions a{text-underline-offset:4px}.local-pill,.badge{font-size:10px;letter-spacing:.12em;font-weight:750;border:1px solid var(--line);border-radius:40px;padding:6px 10px;color:var(--muted)}.local-pill::before{content:"";display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--accent);margin-right:8px}main{max-width:1440px;margin:auto;padding:40px}.intro{display:flex;justify-content:space-between;align-items:end;margin-bottom:30px;gap:24px}.intro h1{font-size:clamp(32px,4.5vw,60px);font-weight:700;letter-spacing:-.055em;line-height:1.07;margin:10px 0 16px}.intro p:not(.eyebrow){max-width:650px;color:#b4c9cd;margin:0;font-size:16px}.intro .intro-note{font-size:12px!important;text-align:right;flex-shrink:0;color:var(--muted)}.eyebrow,.step{font-size:10px;letter-spacing:.18em;font-weight:750;color:var(--accent);margin:0 0 8px}.workspace{display:grid;grid-template-columns:305px minmax(0,1fr);gap:22px;align-items:start}.sidebar,.main-column{display:flex;flex-direction:column;gap:18px;min-width:0}.panel{border:1px solid var(--line);border-radius:12px;background:var(--panel);overflow:hidden}.sidebar .panel{padding:22px}h2{font-size:21px;letter-spacing:-.035em;font-weight:650;line-height:1.25;margin:0 0 12px}h3{font-size:17px;letter-spacing:-.02em}p{margin:0 0 14px}.muted,.small{color:var(--muted);font-size:13px}.small{font-size:12px}.file-button{display:flex;align-items:center;justify-content:space-between;background:#1e3741;border:1px dashed #78929a;border-radius:7px;padding:13px;color:var(--text);font-size:13px;cursor:pointer}.file-input{position:absolute;width:1px;height:1px;min-height:0;overflow:hidden;opacity:0}.source-panel:focus-within .file-button{border-color:var(--accent)}.file-alternative{font-size:12px;color:var(--muted);margin:13px 0}.file-alternative summary{cursor:pointer}.file-alternative input{font-size:11px;max-width:100%;padding:6px}.file-alternative p{margin:8px 0}.status-text{margin:14px 0 0;font-size:13px;color:#c6d6d8;white-space:pre-line;overflow-wrap:anywhere}.status-text[data-tone=error]{color:var(--danger)}.status-text[data-tone=good]{color:var(--accent)}.coordinates{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.coordinates input{padding:9px 6px}.coordinates label{font-size:10px}.policy{display:grid;gap:12px;margin-top:14px}.synthetic-option{background:#3b3021;border:1px solid #795f31;padding:12px;border-radius:7px;margin-top:15px}.synthetic-option label{display:flex;align-items:center;gap:8px;color:#f7d69e}.synthetic-option input{margin:0;flex-shrink:0}.synthetic-option p{font-size:11px;color:#f1d2a3;margin:8px 0 0}.text-button{background:none;border-color:transparent;color:var(--muted)}.panel-heading{display:flex;justify-content:space-between;align-items:start;gap:15px;padding:22px 24px 0}.panel-heading h2{margin-bottom:0}.panel-heading .step{color:var(--muted);font-size:9px}.map-panel{background:#10232a}.empty-map{height:330px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;background-image:linear-gradient(#26414a42 1px,transparent 1px),linear-gradient(90deg,#26414a42 1px,transparent 1px);background-size:40px 40px;margin-top:18px}.empty-marker{width:64px;height:64px;border:1px solid #54716d;border-radius:50%;display:grid;place-items:center;color:var(--accent);font-size:28px;box-shadow:0 0 0 14px #b5ff6e06}.empty-map h3{font-weight:500;margin:25px 0 8px}.empty-map p{font-size:13px;color:var(--muted)}#coverageMap{width:100%;height:auto;display:block;margin-top:18px;touch-action:manipulation;cursor:crosshair;background:#0d1c24}.legend{display:flex;gap:18px;flex-wrap:wrap;padding:15px 24px 0;font-size:10px;color:#becfd2}.legend span{display:flex;align-items:center;gap:6px}.legend i{display:inline-block;width:9px;height:9px;border-radius:2px}.observed{background:#68d5d0}.inferred{background:#dda754}.unknown{background:#a97882}.unavailable{background:#667482}.map-caption{font-size:11px;color:var(--muted);padding:13px 24px 18px;margin:0}.preview-stage{position:relative;height:340px;margin:20px 24px 0;border:1px solid #2c4551;border-radius:7px;overflow:hidden}#meshCanvas{display:block;width:100%;height:100%;touch-action:none}.preview-empty{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;pointer-events:none;color:var(--muted);font-size:13px;text-align:center;padding:20px}.preview-empty span{font-size:55px;color:#4b6972;line-height:1}.preview-empty p{margin-top:15px}.preview-synthetic{position:absolute;top:12px;left:12px;background:#4c3826ef;color:#ffe2ab;padding:6px 10px;border-radius:4px;font-size:10px;letter-spacing:.08em;pointer-events:none}.result-panel>.status-text,.preview-help,.adoption-note,.download-actions,.load-failures{margin-left:24px;margin-right:24px}.preview-help{margin-top:8px;font-size:11px}.facts{display:grid;grid-template-columns:140px minmax(0,1fr);font-size:12px;gap:9px 18px;margin:22px 24px}.facts dt{color:var(--muted)}.facts dd{margin:0;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}.download-actions{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:20px}.download-actions button{font-size:12px}.load-failures{background:#3a2b25;border-left:2px solid var(--warn);padding:10px 14px;font-size:12px;color:#f2d4ac;overflow-wrap:anywhere}.load-failures p{margin:0 0 4px}.adoption-note{border-top:1px solid var(--line);padding-top:15px;padding-bottom:4px;font-size:12px;color:var(--muted)}.adoption-note strong{color:#ccdcd9}.provenance{padding:20px 24px;font-size:13px}.provenance summary{cursor:pointer;font-weight:650}.provenance .facts{margin:18px 0}.source-item{border-top:1px solid var(--line);padding-top:14px;margin-top:14px;overflow-wrap:anywhere}.source-item h3{font-size:13px}.source-item p{font-size:12px;color:var(--muted);margin-bottom:8px}.badge[data-tone=qa]{color:#ffdea5;border-color:#705731;background:#3b2d1d}.badge[data-tone=good]{color:var(--accent);border-color:#5a7446}footer{max-width:1440px;margin:0 auto;display:flex;justify-content:space-between;padding:10px 40px 35px;font-size:10px;letter-spacing:.1em;color:#829da5;gap:20px}.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}[hidden]{display:none!important}
@media(max-width:900px){main{padding:30px 22px}.masthead{padding:20px 22px}.workspace{grid-template-columns:265px minmax(0,1fr);gap:16px}.intro-note{display:none}.sidebar .panel{padding:18px}.preview-stage{height:280px;margin-left:18px;margin-right:18px}.facts{grid-template-columns:110px 1fr;gap:8px 12px}.legend{gap:10px}.panel-heading{padding:18px 18px 0}}
@media(max-width:680px){.workspace{grid-template-columns:1fr}.masthead{padding:16px}.brand{font-size:15px;letter-spacing:.12em}.brand svg{width:30px}.header-actions{gap:10px;font-size:12px}.local-pill{display:none}main{padding:24px 16px}.intro{margin-bottom:22px}.intro p:not(.eyebrow){font-size:14px}.intro h1{font-size:42px}.sidebar .panel{padding:20px}.source-panel .muted{max-width:440px}.policy{grid-template-columns:1fr 1fr}.preview-stage{height:300px}.empty-map{height:260px}.legend{padding-left:18px;padding-right:18px}.facts{margin-left:18px;margin-right:18px}.result-panel>.status-text,.preview-help,.adoption-note,.download-actions,.load-failures{margin-left:18px;margin-right:18px}footer{padding:10px 16px 25px;flex-direction:column;gap:7px}.coordinates label{font-size:12px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto}}

#inspectionControls{margin-top:20px;padding-top:18px;border-top:1px solid var(--line)}
#captureControls{display:grid;grid-template-columns:1fr auto;align-items:center;gap:8px 14px;margin:16px 24px;padding:14px;border:1px solid var(--line);border-radius:7px;background:#0b1a22}#captureControls label{grid-column:1/-1}#captureFrame{grid-column:1/-1;min-height:28px;padding:0;accent-color:var(--accent)}#captureTime{font-variant-numeric:tabular-nums;color:var(--muted);font-size:13px}#orbitButton{font-size:12px;padding:8px 12px}

.preview-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap;justify-content:flex-end}.preview-actions button{font-size:12px;padding:7px 11px}#comparePhotoButton{min-height:44px;flex-shrink:0}#comparePhotoButton[aria-pressed="true"]{border-color:var(--accent);color:var(--accent)}
.result-panel:fullscreen{display:flex;flex-direction:column;background:var(--bg);border:0;border-radius:0;overflow:hidden;padding:0 0 12px}
.result-panel:fullscreen .panel-heading{padding:12px 16px 0;align-items:center;flex-shrink:0}
.result-panel:fullscreen .panel-heading .step{display:none}
.result-panel:fullscreen .panel-heading h2{font-size:17px}
.result-panel:fullscreen .preview-stage{flex:1;min-height:0;height:auto;margin:12px 16px 0}
.result-panel:fullscreen #captureControls{flex-shrink:0;grid-template-columns:auto minmax(80px,1fr) auto auto;gap:12px;margin:10px 16px 0;padding:8px 12px}
.result-panel:fullscreen #captureControls label,.result-panel:fullscreen #captureFrame{grid-column:auto}
.result-panel:fullscreen>.status-text,.result-panel:fullscreen .preview-help,.result-panel:fullscreen .facts,.result-panel:fullscreen .download-actions,.result-panel:fullscreen .load-failures,.result-panel:fullscreen .adoption-note{display:none}
@media(max-width:680px){.result-panel:fullscreen .panel-heading h2{display:none}.result-panel:fullscreen .preview-actions{width:100%;justify-content:space-between}.result-panel:fullscreen #captureControls{grid-template-columns:1fr auto}.result-panel:fullscreen #captureControls label,.result-panel:fullscreen #captureFrame{grid-column:1/-1}.result-panel:fullscreen .preview-stage{margin:8px 8px 0}}

#estimatedQueryImage{position:absolute;left:50%;top:0;height:100%;width:auto;max-width:none;transform:translateX(-50%);background:#0b171e;pointer-events:none}#estimatedQueryImage[hidden]{display:none}#estimatedFrame{max-width:240px}#captureControls{flex-wrap:wrap}
.archive-button{margin-bottom:10px;background:var(--accent);color:#162212;border-style:solid;border-color:var(--accent)}
#sourcePhotoPane{position:relative;overflow:hidden;min-width:0;height:100%;background:#0b171e}#sourcePhoto{display:block;height:100%;width:100%;object-fit:contain}#sourcePhotoPane span{position:absolute;top:8px;left:8px;background:#0b171ecc;padding:5px 8px;font-size:12px}.comparing-source .preview-stage{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:minmax(0,1fr)}.comparing-source #meshCanvas{width:100%;height:100%;min-width:0}
/* The verified photo is ready before a slow source-camera draw. Do not imply
   that the old reconstructed pixels match its newly selected viewpoint. */
.comparison-view-pending #meshCanvas{opacity:.22}
.comparison-view-pending #recordedMeshLabel::after{content:' · aligning camera';color:#f3d3a2}
.comparison-view-pending #captureViewUpdating{display:block}
/* A lost WebGL context must not also make the original photograph unusable. */
.source-photo-only .preview-stage{display:block}
.source-photo-only #meshCanvas,.source-photo-only #recordedMeshLabel{display:none}
.source-photo-only #sourcePhotoPane{width:100%;height:100%}
/* Do not split the interactive scene until its comparison photograph is visible. */
.comparing-source .preview-stage:has(> #sourcePhotoPane[hidden]){grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr)}
.result-panel:fullscreen #captureControls{grid-template-columns:auto minmax(80px,1fr) auto auto auto}@media(max-width:680px){.result-panel:fullscreen #captureControls{grid-template-columns:1fr auto}.result-panel:fullscreen #captureControls label,.result-panel:fullscreen #captureFrame{grid-column:1/-1}}
@media(max-width:680px){.comparing-source .preview-stage{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) minmax(0,1fr)}}

@media(max-width:680px){#loadEstimatedFrames,#estimatedFrame,#toggleEstimatedSource{grid-column:1/-1;max-width:none;width:100%;font-size:13px;padding:8px 10px;min-height:40px}}

.preview-stage.estimated-comparison{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);background:#080f13}
#estimatedPhotoPane{position:relative;margin:0;min-width:0;min-height:0;grid-column:2;grid-row:1;display:flex;align-items:center;justify-content:center;border-left:1px solid var(--line)}#estimatedPhotoPane[hidden]{display:none}
.estimated-comparison #estimatedQueryImage{position:static;transform:none;max-width:none;object-fit:contain}.estimated-comparison #meshCanvas{grid-column:1;grid-row:1;min-width:0;min-height:0;align-self:center;justify-self:center}
#estimatedPhotoPane figcaption,#estimatedMeshLabel,#recordedMeshLabel{position:absolute;top:10px;left:12px;padding:4px 8px;background:#09151bd9;color:var(--text);font-size:11px;z-index:1}#recordedMeshLabel{display:none}.comparing-source #recordedMeshLabel{display:block}
@media(max-width:680px){.preview-stage.estimated-comparison{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) minmax(0,1fr);height:520px}.estimated-comparison #meshCanvas{grid-column:1;grid-row:1}#estimatedPhotoPane{grid-column:1;grid-row:2;border-left:0;border-top:1px solid var(--line)}.result-panel:fullscreen .preview-stage.estimated-comparison{height:auto}}

/* A verified photograph can be inspected without an accepted camera pose. */
.preview-stage.estimated-comparison.estimated-photo-only{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr)}
.estimated-photo-only #estimatedPhotoPane{grid-column:1;grid-row:1;border:0}
.estimated-photo-only #estimatedMeshLabel,.estimated-photo-only #recordedMeshLabel{display:none}

.comparing-estimated #captureControls>label,.comparing-estimated #captureFrame{display:none}

@media(max-width:680px){#loadEstimatedArchive,#loadEstimatedFrames{grid-column:auto;max-width:none;width:100%;font-size:13px;padding:8px 10px;min-height:40px}}

/* A refused estimate must explain why the registered view is unavailable. */
.result-panel:fullscreen>#previewStatus[data-tone="error"]{display:block;flex-shrink:0;margin:10px 16px 0;overflow-wrap:anywhere}

@media(max-width:680px){#captureControls,.result-panel:fullscreen #captureControls{grid-template-columns:repeat(2,minmax(0,1fr))}#captureControls>button{min-width:0;min-height:44px;padding:8px 6px;font-size:12px}}
.semantic-evidence{margin:18px 24px;padding-top:16px;border-top:1px solid var(--line);font-size:12px;overflow-wrap:anywhere}
.semantic-evidence h3{margin:0}.semantic-evidence label{margin-top:14px}.semantic-evidence input{margin:6px 0 14px;font-size:12px}
.semantic-evidence table{width:100%;border-collapse:collapse;margin:14px 0;font-size:11px;table-layout:fixed}
.semantic-evidence th,.semantic-evidence td{text-align:left;vertical-align:top;padding:7px 5px;border-bottom:1px solid var(--line)}
.semantic-evidence details p{white-space:pre-line;margin-top:10px}
.result-panel:fullscreen .semantic-evidence{display:none}
@media(max-width:680px){.semantic-evidence{margin:16px 18px}.semantic-evidence th,.semantic-evidence td{padding:6px 3px}}

/* A recorded capture opens on its photographed surface; area checks remain available. */
#positionDetails>summary{cursor:pointer;font-size:12px;color:var(--muted);margin-bottom:12px}
/* The capture opener explicitly reveals its preview; later native controls must
   not keep an old chooser scroll anchor above the user-selected scene. */
.capture-view{overflow-anchor:none}
.capture-view .intro{display:none}.capture-view main{padding-top:24px}
.capture-view .main-column>#previewPanel{order:-1}.capture-view .main-column>.map-panel{order:2}.capture-view .main-column>#provenancePanel{order:3}
.capture-view .preview-stage{height:clamp(360px,58vh,740px)}
.capture-view #selectionPanel{display:flex;flex-direction:column}.capture-view #positionDetails{order:2;margin-top:18px}.capture-view #inspectionControls{margin-top:0;padding-top:0;border-top:0}.capture-view #selectionStatus{display:none}
.capture-view #captureControls{grid-template-columns:minmax(0,1fr) auto;gap:8px 12px}
@media(max-width:680px){.capture-view main{padding:12px 8px}.capture-view .workspace{display:flex;flex-direction:column}.capture-view .main-column{order:0;width:100%}.capture-view .sidebar{order:1;width:100%}.capture-view .preview-stage{height:clamp(280px,49vh,580px);margin-left:8px;margin-right:8px}.capture-view #captureControls{margin:10px 8px;padding:10px}.capture-view .panel-heading{padding:14px 12px 0}.capture-view .panel-heading .step{display:none}.capture-view .preview-actions{gap:8px}.capture-view #previewPanel:not(:fullscreen) .preview-actions .badge{display:none}}
.capture-view .result-panel:fullscreen .preview-stage{height:auto}

#captureCameraControl{grid-column:1/-1;display:flex;align-items:center;gap:12px}#captureCameraControl label{margin:0;flex:0 0 auto}#captureCamera{min-width:0;flex:1}.comparing-estimated #captureCameraControl{display:none}

.result-panel:fullscreen #captureCameraControl{grid-column:1/3}@media(max-width:680px){.result-panel:fullscreen #captureCameraControl{grid-column:1/-1}}

/* Keep frame inspection primary; manual estimates remain a keyboard-accessible fallback. */
#estimatedCameraControls{grid-column:1/-1;display:grid;grid-template-columns:minmax(160px,1fr) auto minmax(150px,auto);align-items:start;gap:6px 12px;min-width:0}
#estimatedCameraControls #estimatedFrame{grid-column:1;grid-row:1;max-width:none;min-width:0;width:100%}
#estimatedCameraControls #toggleEstimatedSource{grid-column:2;grid-row:1;min-height:44px;white-space:nowrap}
#estimatedFramesStatus{grid-column:1/-1;grid-row:2;min-width:0;color:var(--muted);font-size:12px;line-height:1.4;overflow-wrap:anywhere}
#estimatedFramesStatus[data-tone=error]{color:var(--danger)}
#estimatedImport{grid-column:3;grid-row:1;min-width:0}
#estimatedImport summary{cursor:pointer;color:var(--muted);font-size:12px;min-height:44px;padding:11px 0}
#estimatedImport summary:hover{color:var(--text)}
#estimatedImport .estimated-import-actions{display:flex;flex-wrap:wrap;gap:8px;padding-bottom:6px}
#estimatedImport button{flex:1;min-height:44px;font-size:12px;padding:8px 10px}
@media(max-width:680px){
 #estimatedCameraControls{grid-template-columns:minmax(0,1fr) auto;gap:6px 8px}
 #estimatedCameraControls #estimatedFrame,#estimatedCameraControls #toggleEstimatedSource{font-size:12px;min-height:44px;padding:8px}
 #estimatedImport{grid-column:1/-1;grid-row:3}
 #estimatedImport summary{min-height:36px;padding:8px 0}
 #estimatedImport .estimated-import-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* The verified source photograph fills the existing stage until native opening completes. */
.opening-source #sourcePhotoPane{position:absolute;inset:0}.opening-source #meshCanvas{visibility:hidden}
.opening-source #fullscreenButton,.opening-source .preview-help{display:none}
@media(max-width:680px){
  .capture-view .opening-source:not(:fullscreen) .preview-stage{
    height:auto;
    aspect-ratio:var(--recorded-photo-ratio,16 / 9)
  }
}


/* A place to open is the primary decision; import machinery is secondary. */
#hostedCaptureChoices{display:grid;gap:9px;margin-top:15px}
#hostedCaptureChoices .small{margin:0}
.capture-choice{display:flex;width:100%;min-height:80px;flex-direction:column;align-items:flex-start;justify-content:center;text-align:left;gap:5px;padding:14px 15px;border-color:#4f7477;background:#19363b}
.capture-choice:hover:not(:disabled){background:#274e50;border-color:var(--accent)}
.capture-choice-title{font-size:14px;line-height:1.25;color:var(--text)}
.capture-choice-detail{font-size:11px;line-height:1.45;color:#b4cbc9;font-weight:450}
.local-capture-import{margin-top:20px;border-top:1px solid var(--line);padding-top:15px}
.local-capture-import>summary{cursor:pointer;color:var(--text);font-size:13px;font-weight:650;min-height:44px;display:list-item;list-style-position:inside;padding:10px 4px}
.local-capture-import[open]>summary{margin-bottom:12px}
.local-capture-import .file-button{margin:8px 0}
.local-capture-import>p:last-child{margin-bottom:5px}

/* Before a package is opened, do not make visitors scroll through two empty
   inspection surfaces. The actual coverage and preview return with real data. */
.workspace:has(#mapEmpty:not([hidden])):has(#previewEmpty:not([hidden])){
  grid-template-columns:minmax(0,1fr);
}
.workspace:has(#mapEmpty:not([hidden])):has(#previewEmpty:not([hidden])) .main-column{display:none}
.workspace:has(#mapEmpty:not([hidden])):has(#previewEmpty:not([hidden])) .sidebar{
  width:100%;max-width:950px;margin-inline:auto
}
.workspace:has(#mapEmpty:not([hidden])):has(#previewEmpty:not([hidden])) .source-panel{padding:28px}
.workspace:has(#mapEmpty:not([hidden])):has(#previewEmpty:not([hidden])) #sourceTitle{font-size:clamp(23px,3vw,32px)}
.workspace:has(#mapEmpty:not([hidden])):has(#previewEmpty:not([hidden])) #hostedCaptureChoices{
  grid-template-columns:repeat(3,minmax(0,1fr));gap:13px;margin-top:22px
}
.workspace:has(#mapEmpty:not([hidden])):has(#previewEmpty:not([hidden])) .capture-choice{
  min-height:124px;justify-content:space-between
}
@media(max-width:680px){
  .workspace:has(#mapEmpty:not([hidden])):has(#previewEmpty:not([hidden])) .source-panel{padding:20px}
  .workspace:has(#mapEmpty:not([hidden])):has(#previewEmpty:not([hidden])) #hostedCaptureChoices{
    grid-template-columns:minmax(0,1fr);margin-top:17px
  }
  .workspace:has(#mapEmpty:not([hidden])):has(#previewEmpty:not([hidden])) .capture-choice{
    min-height:85px;gap:5px;justify-content:center
  }
}


/* Three photographed places replace generic file-selection tiles. */
.capture-choice{padding:0;gap:0;align-items:stretch;overflow:hidden}
.capture-choice-image{display:block;width:100%;height:145px;object-fit:cover;background:#10242a;border-bottom:1px solid #54716d}
@media(min-width:1101px){.workspace:has(#mapEmpty:not([hidden])):has(#previewEmpty:not([hidden])) #hostedCaptureChoices{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(min-width:681px) and (max-width:1100px){.workspace:has(#mapEmpty:not([hidden])):has(#previewEmpty:not([hidden])) #hostedCaptureChoices{grid-template-columns:repeat(2,minmax(0,1fr))}}
.capture-choice-copy:only-child{grid-column:1/-1}
.capture-choice-copy{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:5px;padding:13px 14px;min-height:88px}
.workspace:has(#mapEmpty:not([hidden])):has(#previewEmpty:not([hidden])) .capture-choice{
  min-height:0;justify-content:start
}
.capture-view .capture-choice{display:grid;grid-template-columns:78px minmax(0,1fr);min-height:78px}
.capture-view .capture-choice-image{width:78px;height:100%;min-height:78px;border-bottom:0;border-right:1px solid #54716d}
.capture-view .capture-choice-copy{min-height:78px;padding:9px 11px}
.capture-view .capture-choice-detail{font-size:10px}
@media(max-width:680px){
  .workspace:has(#mapEmpty:not([hidden])):has(#previewEmpty:not([hidden])) .capture-choice{
    display:grid;grid-template-columns:112px minmax(0,1fr);min-height:104px
  }
  .workspace:has(#mapEmpty:not([hidden])):has(#previewEmpty:not([hidden])) .capture-choice-image{
    width:112px;height:104px;border-bottom:0;border-right:1px solid #54716d
  }
  .workspace:has(#mapEmpty:not([hidden])):has(#previewEmpty:not([hidden])) .capture-choice-copy{
    min-height:104px;padding:9px 11px;justify-content:center
  }
}

/* In a captured place, the picture is the product. Package-internal
   validation, comparison and forensic panels do not enter the ride UI. */
.capture-view .map-panel,
.capture-view #positionDetails,
.capture-view #semanticEvidence,
.capture-view #resultFacts,
.capture-view #downloadActions,
.capture-view #loadFailures,
.capture-view #provenancePanel,
.capture-view #estimatedPhotoPane,
.capture-view #estimatedMeshLabel,
.capture-view #previewBadge {
  display: none !important;
}
.capture-view .adoption-note {max-width:68ch;line-height:1.55}

/* A captured place with one recorded surface needs neither an asset picker
   nor developer controls under the viewer. A failed view retains its retry. */
.capture-view:has(#meshCanvas[data-mesh-count]:not([data-mesh-count="0"]))
  #selectionPanel[data-single-capture-surface="true"] {display:none}
.capture-view #estimatedImport,
.capture-view .preview-help {display:none}
#hostedCaptureChoices .capture-choice:not(:has(.capture-choice-image)) {
  display:flex;flex-direction:column;justify-content:center;min-height:94px;
}
#hostedCaptureChoices .capture-choice:not(:has(.capture-choice-image)) .capture-choice-copy {
  min-height:94px;justify-content:center;padding:14px 16px;
}

/* Retain the prior complete view while its resized replacement prepares. */
#meshCanvas{object-fit:contain}
#captureViewUpdating{display:none;position:absolute;top:12px;right:12px;z-index:2;padding:5px 9px;border-radius:4px;background:#09151be8;color:var(--text);font-size:12px;pointer-events:none}
.preview-stage:has(#meshCanvas[data-splat-appearance="updating"]) #captureViewUpdating{display:block}
/* Keep recovery next to the stopped preview and inside its normal gutters. */
#retryCaptureButton{align-self:flex-start;margin:8px 24px 12px}
.result-panel:fullscreen>#retryCaptureButton{flex-shrink:0;margin:8px 16px 0}
@media(max-width:680px){#retryCaptureButton{margin-left:18px;margin-right:18px}}

/* On phones, comparing a captured place should show two usable frames,
   not squeeze both into the single-view viewport height. */
@media(max-width:680px){.comparing-source:not(:fullscreen) .preview-stage{height:clamp(280px,calc(100svh - 280px),640px)}}

/* Keep fullscreen for viewing while the available appearance controls stay visible. */
.result-panel:fullscreen #estimatedCameraControls:not(:has(#estimatedFrame:not([hidden]),#toggleEstimatedSource:not([hidden]))){display:none}
.result-panel:fullscreen #captureControls{row-gap:6px}

/* On first open, use the capture's real source thumbnail rather than a blank WebGL frame.
   This is not geometry and disappears as soon as a source/native view is usable. */
.opening-photo-preview{position:absolute;inset:0;z-index:3;margin:0;background:#0b171e;display:flex;flex-direction:column;pointer-events:none}
.opening-photo-preview img{display:block;flex:1;width:100%;height:0;min-height:0;object-fit:contain}
.opening-photo-preview figcaption{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 12px;background:#122730;color:#e8f2ed;font-size:12px}
.opening-photo-preview figcaption span{color:#b4c9cd;font-size:11px}

/* The captured place is the destination; coverage comes after the view. */
.main-column > .result-panel{order:-1}

/* The source-bound GPS route is useful for choosing recorded camera positions.
   The capture remains a 3D picture, with the waypoint map directly beneath it. */
.capture-view.geographic-route .map-panel{display:block!important}
.capture-view.geographic-route .map-panel .legend{display:none}
.capture-view.geographic-route #coverageMap{cursor:pointer}

/* When graphics fail, the original is the entire view, not a tall empty 3D
   viewport. Keep its verified natural aspect at real desktop/phone sizes. */
#previewPanel.source-photo-only:not(:fullscreen) .preview-stage{height:auto;aspect-ratio:var(--recorded-photo-ratio,16 / 9)}
#previewPanel.comparing-source.source-photo-only #recordedMeshLabel{display:none}

/* A captured place should use the available desktop screen, not letterbox its
   two compared views inside the general-purpose 1440px Workbench layout.
   Leave the preparation page and narrower screens at their existing widths. */
@media(min-width:1100px){
  .capture-view :is(main,.masthead,footer){max-width:1800px}
  .capture-view .workspace{grid-template-columns:300px minmax(0,1fr);gap:20px}
}

/* An opened captured place is a scene, not a camera-calibration workbench.
   Recorded-frame and Look around controls remain; unregistered/estimated
   frame inspection stays available in the local package-review route. */
.capture-view #estimatedCameraControls{display:none}

/* One current captured place: an in-flight switch does not de-select the
   room still on screen. Both states remain readable on small phones. */
.capture-choice.is-current{border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent)}
.capture-choice.is-opening{border-color:var(--cyan)}
.capture-choice-state{font-size:11px;font-weight:750;line-height:1.3;color:var(--accent)}
.capture-choice.is-opening .capture-choice-state{color:var(--cyan)}
.capture-choice-state[hidden]{display:none}


/* Walking is part of the captured place, not another renderer or view mode.
   Direct touch movement uses the same bounded native/sensor contact as WASD. */
.capture-travel-pad[hidden],.capture-travel-help[hidden]{display:none!important}
.capture-travel-pad{position:absolute;z-index:4;right:12px;bottom:12px;display:grid;grid-template-columns:repeat(3,46px);grid-template-rows:repeat(3,46px);gap:3px;align-items:stretch;justify-items:stretch;touch-action:none;user-select:none;-webkit-user-select:none}
.capture-travel-pad button{margin:0;padding:0;min-width:46px;min-height:46px;border:1px solid #c5dbdf8c;border-radius:10px;background:#0d232bdb;color:#f5ffef;font-size:27px;line-height:1;touch-action:none;-webkit-tap-highlight-color:transparent;box-shadow:0 2px 12px #0007}
.capture-travel-pad button:active,.capture-travel-pad button.moving{background:#d7ff77;color:#172311;border-color:#d7ff77}
.capture-travel-pad .travel-forward{grid-column:2;grid-row:1}
.capture-travel-pad .travel-left{grid-column:1;grid-row:2}
.capture-travel-pad .travel-right{grid-column:3;grid-row:2}
.capture-travel-pad .travel-back{grid-column:2;grid-row:3}
.capture-travel-pad .travel-pad-center{grid-column:2;grid-row:2;align-self:center;justify-self:center;color:#d8f0e3;background:#122630df;border-radius:6px;padding:6px 3px;font-size:9px;letter-spacing:.08em;font-weight:800;pointer-events:none}
.capture-travel-help{margin:7px 24px 0;font-size:12px;color:#a9c3c7}
@media(hover:hover) and (pointer:fine) and (min-width:681px){.capture-travel-pad{display:none!important}}
@media(max-width:680px){.capture-travel-pad{right:10px;bottom:10px;grid-template-columns:repeat(3,48px);grid-template-rows:repeat(3,48px)}.capture-travel-help{margin-left:10px;margin-right:10px}}
