:root{font-family:Inter,Segoe UI,Arial,sans-serif;color:#19313b;background:#f6f2e9}
*{box-sizing:border-box}
body{margin:0;min-height:100dvh;display:flex;flex-direction:column;overflow-x:hidden;overflow-y:auto}
.appHeader{position:relative;padding:10px 24px;background:#102f3c;color:#f8f2e2;display:flex;align-items:center;gap:26px;justify-content:space-between;min-height:67px}
.brand{display:flex;align-items:center;gap:10px;flex:none}
.brandMark{width:49px;height:44px;fill:#ffcf74;stroke:#ffcf74;stroke-width:2;stroke-linejoin:round}
.brandMark .brandPlane{fill:#2d8297;stroke:#bce5e2}
.brandMark .brandFront{fill:#102f3c;stroke:#ffcf74}
.brandMark .brandRay{fill:none;stroke:#ffcf74;stroke-width:1.6}
.appHeader h1{font-size:clamp(1.45rem,2.4vw,2.1rem);margin:0;letter-spacing:-.035em}
.headerMessage{display:flex;align-items:center;gap:10px;margin-left:auto}
.headerMessage p{margin:0;color:#ffcf74;font-weight:700;letter-spacing:.025em;font-size:clamp(.85rem,1.25vw,1.05rem);white-space:nowrap}
.headerInfoButton{display:grid;place-items:center;flex:none;width:26px;height:26px;padding:0;border:1px solid #a8c8cb;border-radius:50%;background:transparent;color:#d5eeea;font-size:.87rem;font-style:italic;font-family:Georgia,serif;line-height:1}
.headerInfoButton:hover,.headerInfoButton[aria-expanded="true"]{background:#2a6b78;color:#fff}
.aboutPopup{position:absolute;z-index:1400;right:18px;top:calc(100% - 2px);width:min(350px,calc(100vw - 24px));padding:12px 14px 14px;background:#fffefa;color:#19313b;border:1px solid #a7c4c5;border-radius:0 0 11px 11px;box-shadow:0 14px 32px #102f3c55}
.aboutPopup[hidden]{display:none}
.aboutPopupHead{display:flex;align-items:center;justify-content:space-between;gap:12px}
.aboutPopupHead strong{font-size:.88rem}
.aboutPopupHead button{font-size:1.2rem;padding:1px 6px;line-height:1}
.aboutPopup p{margin:8px 0 0;font-size:.84rem;line-height:1.45;color:#47616a}
.eyebrow{text-transform:uppercase;letter-spacing:.16em;font-size:.7rem;color:#f6bc72;font-weight:700}
main{width:100%;max-width:1900px;margin:0 auto;padding:14px;display:flex;flex-direction:column;gap:14px}
.workspace>section{background:white;border:1px solid #ded9cb;border-radius:11px;box-shadow:0 4px 22px #1b30380b;min-width:0}
.floatingPalette{position:fixed;top:85px;left:24px;z-index:1200;width:min(345px,calc(100vw - 24px));max-height:min(78dvh,720px);overflow:auto;background:#fffefa;border:1px solid #b9ccca;border-radius:12px;box-shadow:0 18px 55px #102f3c55}
.floatingPalette[hidden]{display:none!important}
.paletteHead{position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between;min-height:43px;padding:5px 9px 5px 15px;background:#e8f3f1;border-bottom:1px solid #bbd1d0;cursor:move;touch-action:none;user-select:none}
.paletteHead h2{font-size:.94rem;margin:0;color:#163b47}
.paletteClose{font-size:1.3rem;line-height:1;padding:2px 7px;background:transparent;border:0;color:#31505a;cursor:pointer}
.paletteClose:hover{background:#d4e7e4}
.paletteTrigger[aria-expanded="true"]{background:#11788f!important;color:#fff!important;border-color:#11788f!important}
.frontPalette{width:min(640px,calc(100vw - 24px));height:min(80dvh,770px);display:flex;flex-direction:column;overflow:hidden}
.frontPaletteHead{flex:none;gap:12px}
.frontPaletteHead h2{white-space:nowrap;min-width:0;overflow:hidden;text-overflow:ellipsis}
.frontPaletteHead .frontHeadActions{margin-left:auto}
.frontPaletteHead #frontCaption{font-size:.69rem;color:#547079;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:160px}
.frontPalette .frontWrap{min-height:0;flex:1;margin:8px;background:#f6f2e9}
.frontPalette canvas{display:block;max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain}
.srOnly{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.stepContent{padding:12px 15px 16px}
.hint{font-size:.82rem;color:#53636a;line-height:1.45;margin:0 0 10px}
.small{font-size:.78rem;color:#69787e;margin-top:9px}
.row,.fieldrow{display:flex;gap:9px}
.fieldrow>*{flex:1;min-width:0}
.fieldrow label{font-size:.77rem}
.floatingPalette label{display:block;font-weight:650;margin:9px 0;color:#304650}
.floatingPalette label span{font-weight:400;color:#789}
input[type=number],input[type=range],select{display:block;width:100%;margin-top:6px}
input[type=number],select{padding:8px;border:1px solid #b7c6c8;border-radius:7px;font:inherit;color:#19313b;background:white}
input[type=range]{accent-color:#0f7896}
button,.upload{border:1px solid #aac0c2;background:#edf5f2;border-radius:8px;padding:9px 11px;font:inherit;font-size:.8rem;font-weight:700;color:#1e444b;cursor:pointer}
button:hover,.upload:hover{background:#dceeed}
button:disabled{opacity:.46;cursor:not-allowed}
.buttons{flex-wrap:wrap}
.buttons button{flex:1}
.upload{display:inline-block!important}
.upload input{position:absolute;opacity:0;width:1px;height:1px}
.primary{background:#11788f;color:white;border-color:#11788f;width:100%;padding:12px}
.primary:hover{background:#0c6278}
.check{display:flex!important;align-items:center;gap:8px;font-size:.8rem}
.check input{accent-color:#0f7896}
.status{margin-top:10px;border-radius:8px;padding:10px;font-size:.8rem;line-height:1.4}
.viewerPathButton{width:100%;background:#dff1ed;border-color:#6ca9a6}
.groundModeSwitch{padding:7px 9px;background:#e7f1e9;border-radius:7px}
.placementGroup{margin:13px 0 12px;padding:8px 9px 4px;border-top:1px solid #c4d7d6;border-bottom:1px solid #e0e8e6}
.placementGroup label{margin:4px 0 8px}
.groundMode .uprightOnly{display:none!important}
.advancedGeometry{margin-top:10px;border:0!important;border-top:1px solid #e0e8e7!important;border-radius:0!important;box-shadow:none!important;padding-top:7px;overflow:visible!important}
.advancedGeometry summary{padding:4px 0!important;font-size:.77rem!important;color:#526b72;background:none!important;border:0!important}
.advancedGeometry label{margin:7px 0 0}
.neutral{background:#edf2f2;color:#47616a}
.good{background:#e3f3e6;color:#23593c}
.bad{background:#fff0e8;color:#a1442d}
.workspace{--scene-width:50%;min-width:0;height:max(650px,calc(100dvh - 130px));flex:none;display:grid;grid-template-columns:minmax(0,calc(var(--scene-width) - 8px)) 16px minmax(0,1fr);gap:0;align-items:stretch}
.workspace>section{padding:12px;min-height:0;display:flex;flex-direction:column}
.panelSplitter{display:grid;place-items:center;cursor:col-resize;touch-action:none;user-select:none;outline:none}
.panelSplitter:hover,.panelSplitter:focus-visible,.resizingPanels .panelSplitter{background:#d6e8e5}
.splitterGrip{width:5px;height:66px;border-radius:9px;background:#9cb8b9;box-shadow:inset 0 0 0 1px #fff7}
.panelSplitter:hover .splitterGrip,.panelSplitter:focus-visible .splitterGrip,.resizingPanels .splitterGrip{background:#11788f}
.resizingPanels{user-select:none;cursor:col-resize}
.workspace h2{font-size:.96rem;margin:0}
.panelHead{display:flex;justify-content:space-between;gap:8px;align-items:baseline;min-height:37px}
.panelHead span{font-size:.72rem;color:#6b7a7e;text-align:right}
.viewerHead{align-items:center;flex-wrap:nowrap}
.viewerHead h2{flex:none}
.viewerHeadActions{display:flex;align-items:center;gap:6px;flex-wrap:nowrap;justify-content:flex-end;white-space:nowrap;margin-left:auto}
.walkPlay{display:inline-flex;align-items:center;gap:3px;padding:3px 6px;font-size:.72rem;white-space:nowrap;background:#e8f1ef}
.walkPlay svg{width:16px;height:16px;fill:currentColor}
.walkPlay[aria-pressed="true"]{background:#11788f;color:#fff;border-color:#11788f}
.viewerFullscreenButton{width:26px;height:26px;padding:3px;display:grid;place-items:center;background:#e8f1ef}
.viewerFullscreenButton svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.viewerIconButton{width:26px;height:26px;padding:3px;display:grid;place-items:center;background:#e8f1ef}
.viewerIconButton svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.frontHeadActions{display:flex;align-items:center;gap:7px;min-width:0}
.nightSwitch{display:inline-flex;align-items:center;gap:4px;font-size:.72rem;cursor:pointer;white-space:nowrap;color:#30464d}
.nightSwitch input{position:absolute;width:1px;height:1px;opacity:0}
.nightSwitchTrack{width:29px;height:17px;border-radius:20px;background:#acbbc0;position:relative;transition:background .2s}
.nightSwitchThumb{position:absolute;top:2px;left:2px;width:13px;height:13px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #2336;transition:transform .2s}
.nightSwitch input:checked+.nightSwitchTrack{background:#11788f}
.nightSwitch input:checked+.nightSwitchTrack .nightSwitchThumb{transform:translateX(12px)}
.nightSwitch input:focus-visible+.nightSwitchTrack{outline:2px solid #11788f;outline-offset:2px}
.sourceWrap,.frontWrap,.threeStage{flex:1;min-height:0;border-radius:8px;display:flex;align-items:center;justify-content:center;overflow:hidden}
.sourceWrap{position:relative;background:repeating-conic-gradient(#e9e8e3 0% 25%,#f5f4f0 0% 50%) 50%/18px 18px}
.sourceToolbar,.sourceZoom{position:absolute;z-index:4;left:7px;background:#f9f9f2e9;border:1px solid #ffffffb0;border-radius:9px;box-shadow:0 2px 12px #102f3c33;backdrop-filter:blur(5px)}
.sourceToolbar{top:8px;display:flex;flex-direction:column;gap:4px;padding:5px;width:36px}
.sourceToolbar button{width:26px;height:27px;padding:0;display:grid;place-items:center;font-size:19px;line-height:1;background:#fffef8}
.sourceToolbar button.active{background:#11788f;border-color:#11788f;color:white}
.sourceToolbar .toolbarDivider{width:22px}
.sourceZoom{bottom:8px;display:flex;flex-direction:column;align-items:center;gap:2px;padding:6px 3px;width:36px;font-size:.75rem;font-weight:700;color:#34515a}
.sourceZoom input{appearance:slider-vertical;writing-mode:vertical-lr;direction:rtl;width:22px;height:115px;margin:0;accent-color:#11788f}
.sourceZoom output{font-size:.55rem;white-space:nowrap}
.frontWrap{background:#f6f2e9}
.threeStage{position:relative;background:#cbddea;touch-action:none;cursor:grab}
.threeStage:active{cursor:grabbing}
.threeStage>canvas{position:absolute;inset:0;width:100%!important;height:100%!important;max-width:none;max-height:none;object-fit:fill}
.walkPhotoSetting{padding:5px 0 8px;border-bottom:1px solid #d8e3e1}
.photoMoment{position:absolute;inset:0;z-index:6;overflow:hidden;display:flex;align-items:center;justify-content:center;background:#071a27a3;cursor:default;animation:photoBackdrop .32s ease-out both}
.photoMoment[hidden]{display:none}
.phoneDialog{height:min(94%,600px);max-width:calc(100% - 18px);aspect-ratio:.55;filter:drop-shadow(0 18px 28px #07151cba);animation:phoneRise .48s cubic-bezier(.18,.8,.22,1.03) both}
.phoneBezel{position:relative;box-sizing:border-box;width:100%;height:100%;padding:10px 7px 8px;border:3px solid #64727b;border-radius:31px;background:#101820;box-shadow:inset 0 0 0 2px #273740,0 0 0 1px #101820}
.phoneCamera{position:absolute;z-index:2;top:12px;left:50%;width:8px;height:8px;transform:translateX(-50%);border-radius:50%;background:#0b1319;box-shadow:0 0 0 2px #36434a}
.phoneScreen{position:relative;width:100%;height:100%;overflow:hidden;border-radius:22px;background:#152f3e}
.phoneScreen>img{display:block;width:100%;height:100%;object-fit:cover}
.phonePrompt{position:absolute;z-index:1;left:10px;right:10px;bottom:15px;box-sizing:border-box;display:flex;flex-direction:column;align-items:center;gap:5px;padding:13px 11px 12px;border-radius:15px;background:#f4f7f9f5;box-shadow:0 7px 24px #08182791;color:#18313b;text-align:center}
@keyframes photoBackdrop{from{background:#071a2700}to{background:#071a27a3}}
@keyframes phoneRise{from{transform:translateY(115%) scale(.94);opacity:.8}to{transform:translateY(0) scale(1);opacity:1}}
.phonePromptIcon{font-size:19px;line-height:1;color:#087e91}
.phonePrompt strong{font-size:14px}
.phonePrompt>span:not(.phonePromptIcon){font-size:12px}
.phoneActions{display:flex;gap:5px;width:100%;margin-top:5px}
.phoneActions button{min-width:0;min-height:44px;flex:1;padding:8px 3px;border-radius:7px;font-size:12px;line-height:1.1;touch-action:manipulation}
.phoneActions #saveWalkPhoto{color:#fff;background:#0f8092;border-color:#0f8092}
.phoneActions #saveWalkPhoto:hover{background:#0b6877}
@media(prefers-reduced-motion:reduce){.photoMoment,.phoneDialog{animation:none}}
.threeToolbar{position:absolute;z-index:3;top:9px;left:9px;display:flex;flex-direction:column;align-items:center;gap:4px;width:43px;padding:5px;background:#f9f9f2e8;border:1px solid #ffffffa8;border-radius:10px;box-shadow:0 2px 12px #102f3c33;backdrop-filter:blur(5px)}
.threeToolbarHandle{width:31px;height:23px;display:grid;place-items:center;cursor:grab;touch-action:none;color:#45616a;border-radius:5px}
.threeToolbarHandle:hover,.threeToolbarHandle:focus-visible{background:#dcebec;outline:none}
.threeToolbarHandle:active{cursor:grabbing}
.threeToolbar button{width:31px;height:31px;display:grid;place-items:center;padding:4px;background:#fffef8}
.threeToolbar svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.threeToolbarHandle svg circle{fill:currentColor;stroke:none}
.threeToolbarHandle svg{transform:rotate(90deg)}
.toolbarDivider{width:23px;height:1px;margin:2px 0;background:#b5c8c9}
.threeToolbar button.active{background:#11788f;border-color:#11788f;color:white}
.threeBadge{position:absolute;z-index:3;bottom:9px;left:9px;right:9px;border-radius:7px;background:#102f3cbb;color:white;padding:6px 8px;font-size:.7rem;pointer-events:none}
.previewHint{font-size:.7rem;line-height:1.3;color:#69787e;margin:6px 0 0}
.sidePanel:fullscreen,.sidePanel.viewerFullscreen{position:fixed;inset:0;box-sizing:border-box;width:100vw;height:100dvh;max-width:none;max-height:none;z-index:1000;background:#f7f5ed;border-radius:0;padding:12px 16px;display:flex;flex-direction:column}
.sidePanel:fullscreen .threeStage,.sidePanel.viewerFullscreen .threeStage{flex:1;height:auto;min-height:0}
.workspace canvas{display:block;max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain}
.sourceWrap #sourceCanvas{position:relative;z-index:1;pointer-events:none;box-shadow:0 0 0 1px #b4bec0;transform-origin:center center}
#sourceFrameOverlay{position:absolute;inset:0;z-index:2;width:100%;height:100%;overflow:visible;touch-action:none;cursor:crosshair;pointer-events:all}
footer{padding:6px 20px 14px;text-align:center;color:#65777a;font-size:.76rem}
@media(max-width:950px){.workspace{height:auto;display:grid;grid-template-columns:1fr;gap:12px}.panelSplitter{display:none}.sourceWrap,.threeStage{flex:none;height:min(65vh,650px)}}
@media(max-width:480px){header{padding:16px}.panelHead{min-height:0;margin-bottom:8px}.floatingPalette{left:8px;top:70px;width:calc(100vw - 16px);max-height:75dvh}.viewerHead h2{font-size:.79rem}.viewerHeadActions{gap:3px}.nightSwitch>span:last-child,.walkPlay .playLabel{display:none}.walkPlay{padding:3px}.viewerIconButton,.viewerFullscreenButton{width:25px;height:25px}}
@media(max-width:720px){.appHeader{gap:9px;padding:9px 13px}.brandMark{width:34px;height:33px}.headerMessage p{font-size:.75rem}}
@media(max-width:530px){.appHeader{flex-wrap:wrap}.headerMessage{width:100%;justify-content:flex-end;margin-top:-4px}}
