/* A photo task has its own navigation; editor and project menus do not leak into it. */
#workspace-project-actions{display:none}
body.selection-workspace.mobile-nav-open #workspace-project-actions{display:block}
body:not(.selection-workspace) #mobile-menu{display:none!important}
body.workspace-photo .app-nav,body.workspace-photo #mobile-toolbar,
body.workspace-photo #context-actions,body.workspace-photo #workspace-project-actions{display:none!important}
body.workspace-photo{--photo-footer-height:76px;background:#f3f6fa;padding:0}
body.workspace-photo #photo-screen{max-width:900px;margin:0 auto;padding:0 16px calc(var(--photo-footer-height) + env(safe-area-inset-bottom) + 16px);min-height:100dvh}
body.workspace-photo .photo-heading{height:56px;min-height:56px;gap:10px;justify-content:flex-start}
body.workspace-photo .photo-heading .eyebrow{display:none}
body.workspace-photo .photo-heading h1{font-size:18px;letter-spacing:-.3px;margin:0;color:#263a53}
body.workspace-photo #photo-exit{border:0;background:transparent;min-width:44px;min-height:44px;padding:6px 9px;font-size:13px;border-radius:9px;color:#385779}
body.workspace-photo #photo-help{margin-left:auto;min-width:44px;min-height:44px;height:44px;background:transparent;border:1px solid #dbe4ef;border-radius:10px;font-size:17px}
body.workspace-photo .photo-steps{border-radius:0;padding:0;gap:12px;background:none;border-bottom:1px solid #dce5f0;min-height:42px}
body.workspace-photo .photo-steps button{font-size:11px;font-weight:550;min-height:42px;border-radius:0;padding:0 3px;gap:5px;box-shadow:none;background:none;color:#7a8aa0;border:0;border-bottom:2px solid transparent}
body.workspace-photo .photo-steps button.active{background:none;border-bottom-color:#2868d5;color:#215dbb;box-shadow:none}
body.workspace-photo .photo-steps button.done{color:#496a65}
body.workspace-photo .photo-steps b{width:18px;height:18px;font-size:10px;background:#e6edf6}
body.workspace-photo .photo-task{padding:12px 0 10px}
body.workspace-photo .photo-task h2{font-size:19px;line-height:1.25;margin:0 0 5px;letter-spacing:-.35px;color:#20354f}
body.workspace-photo .photo-task p{font-size:12px;line-height:1.45;margin:0;color:#6b7c91}
body.workspace-photo .photo-stage{border:1px solid #d3deeb;border-radius:13px;background:#e8eef5}
body.workspace-photo .photo-flow-footer{left:0;right:0;bottom:0;height:calc(var(--photo-footer-height) + env(safe-area-inset-bottom));padding:10px max(16px,calc((100vw - 868px)/2)) calc(10px + env(safe-area-inset-bottom));z-index:40;gap:10px;background:#fff;box-shadow:none;backdrop-filter:none;border-top:1px solid #d9e2ed}
body.workspace-photo .photo-flow-footer #photo-prev{width:auto;min-width:76px;min-height:48px;font-size:13px;padding:8px 14px;background:#f5f8fc;border:1px solid #dbe4ef;color:#405c7e;flex:0 0 auto}
body.workspace-photo .photo-flow-footer>div{display:none}
body.workspace-photo .photo-flow-footer:has(#photo-next:disabled)>div{display:block}
body.workspace-photo .photo-flow-footer #photo-footer-label{display:none}
body.workspace-photo .photo-flow-footer #photo-footer-status{font-size:11px;line-height:1.35;max-height:42px;color:#6d7f97;margin:0}
body.workspace-photo .photo-flow-footer #photo-next{margin-left:auto;min-height:48px;font-size:13px;padding:10px 18px;white-space:nowrap;min-width:150px;border-radius:10px}
body.workspace-photo #toast{bottom:calc(var(--photo-footer-height) + env(safe-area-inset-bottom) + 10px)}
/* Step two gives space to the photo; editing controls are explicitly opened. */
body.workspace-photo:has(#photo-content[data-step="2"]:not([hidden])){overflow:hidden}
body.workspace-photo:has(#photo-content[data-step="2"]:not([hidden])) #app{height:100dvh;overflow:hidden}
body.workspace-photo:has(#photo-content[data-step="2"]:not([hidden])) #photo-screen{height:100dvh;min-height:0;display:flex;flex-direction:column;padding-bottom:calc(var(--photo-footer-height) + env(safe-area-inset-bottom) + 12px)}
body.workspace-photo #photo-content[data-step="2"]{display:grid;flex:1;min-height:0;grid-template-rows:42px auto minmax(0,1fr) 50px;gap:8px}
body.workspace-photo #photo-content[data-step="2"]>.photo-task{padding:4px 0 5px}
body.workspace-photo #photo-content[data-step="2"]>.photo-stage{height:100%;min-height:0;grid-row:3;grid-column:1}
body.workspace-photo #photo-content[data-step="2"]>[data-photo-panel="2"]{grid-row:4;grid-column:1;padding:0;display:flex;align-items:center;justify-content:center;min-height:0}
body.workspace-photo #photo-outline-open{min-height:44px;min-width:160px;padding:9px 18px;font-size:13px;font-weight:600;background:#fff;color:#315d9e;border:1px solid #b9cde9;border-radius:10px;box-shadow:0 2px 4px #17385a06}
body.workspace-photo #photo-outline-tools{display:none;position:fixed;z-index:50;left:max(12px,calc((100vw - 868px)/2));right:max(12px,calc((100vw - 868px)/2));bottom:calc(var(--photo-footer-height) + env(safe-area-inset-bottom) + 8px);max-height:42dvh;overflow:auto;overscroll-behavior:contain;background:#fff;border:1px solid #c8d8ec;border-radius:15px;padding:0 14px 12px;box-shadow:0 -8px 38px #17385a24;scroll-padding-top:56px}
body.workspace-photo.photo-outline-tools-open #photo-outline-tools{display:block}
body.workspace-photo .photo-outline-tools-heading{position:sticky;top:0;z-index:1;background:#fff;display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:52px;margin:0 -14px 10px;padding:4px 14px;border-bottom:1px solid #e4ebf4}
body.workspace-photo .photo-outline-tools-heading h3,body.workspace-photo .photo-outline-tools-heading strong{font-size:15px;font-weight:650;letter-spacing:-.2px;margin:0;color:#284667}
body.workspace-photo #photo-outline-close{min-height:44px;min-width:68px;font-size:12px;padding:8px 12px;background:#edf3fc;color:#2c5ca1;border:1px solid #c9d9ef;border-radius:9px}
body.workspace-photo #photo-outline-tools .photo-shapes{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
body.workspace-photo #photo-outline-tools .photo-shapes button{min-height:46px;font-size:12px;padding:10px 8px;background:#f7f9fd;border:1px solid #dae4f0;color:#4d6789}
body.workspace-photo #photo-outline-tools .photo-shapes button.active{color:#1e59b4;background:#eaf1ff;border-color:#8cafe8}
body.workspace-photo #photo-outline-tools .photo-toolbar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin:12px 0}
body.workspace-photo #photo-outline-tools .photo-toolbar button{min-height:44px;font-size:12px;padding:8px;background:#fff;color:#526c8e;border:1px solid #d6e0ee}
body.workspace-photo #photo-outline-tools .photo-hint{font-size:12px;line-height:1.5;margin:10px 0;color:#627a99}
body.workspace-photo #photo-outline-tools #photo-outline-status{font-size:11px;margin:8px 0 0;color:#457263}
body.workspace-photo #photo-content[data-step="3"] .photo-stage{height:160px}
body.workspace-photo #photo-content[data-step="3"]:has(#photo-calibration-controls:not([hidden])) .photo-stage{height:270px}
body.workspace-photo #photo-content[data-step="4"] #photo-model-preview{height:clamp(260px,48dvh,500px)}
@media(min-width:900px){
 body.workspace-photo #photo-content[data-step="2"]{grid-template-rows:42px auto minmax(0,1fr) 50px}
 body.workspace-photo #photo-outline-tools{max-height:48dvh}
}
@media(max-width:380px){
 body.workspace-photo #photo-screen{padding-left:12px;padding-right:12px}
 body.workspace-photo .photo-flow-footer{padding-left:12px;padding-right:12px;gap:7px}
 body.workspace-photo .photo-flow-footer #photo-next{min-width:135px;padding:10px 12px;font-size:12px}
 body.workspace-photo .photo-flow-footer #photo-prev{min-width:68px;padding:8px 11px}
 body.workspace-photo .photo-steps{gap:4px}
}
@media(max-height:520px) and (min-width:550px){
 body.workspace-photo{--photo-footer-height:66px}
 body.workspace-photo .photo-heading{height:44px;min-height:44px}
 body.workspace-photo #photo-content[data-step="2"]{grid-template-columns:minmax(0,1fr) 230px;grid-template-rows:42px minmax(0,1fr) 50px;column-gap:14px;row-gap:6px}
 body.workspace-photo #photo-content[data-step="2"]>.photo-steps{grid-column:1/-1;grid-row:1}
 body.workspace-photo #photo-content[data-step="2"]>.photo-stage{grid-column:1;grid-row:2/4}
 body.workspace-photo #photo-content[data-step="2"]>.photo-task{grid-column:2;grid-row:2;align-self:start;padding-top:7px}
 body.workspace-photo #photo-content[data-step="2"]>.photo-task h2{font-size:17px}
 body.workspace-photo #photo-content[data-step="2"]>[data-photo-panel="2"]{grid-column:2;grid-row:3}
 body.workspace-photo #photo-outline-tools{max-height:calc(100dvh - 84px);left:auto;right:12px;bottom:calc(var(--photo-footer-height) + 7px);width:340px;max-width:50vw}
}

body.workspace-photo #toast{pointer-events:none}
body.workspace-photo #photo-content[data-step="2"]>[data-photo-panel="2"]{gap:8px}
body.workspace-photo #photo-auto-open,body.workspace-photo #photo-outline-open{min-width:0;flex:1;min-height:46px;padding:8px;font-size:12px}
#photo-auto-panel{position:fixed;z-index:45;left:12px;right:12px;bottom:calc(76px + env(safe-area-inset-bottom));max-height:38dvh;overflow:auto;background:#fff;padding:12px;border:1px solid #bed2eb;border-radius:14px;box-shadow:0 -5px 22px #10254322}
#photo-auto-status{font-size:12px;line-height:1.4;margin:0 0 10px;color:#335170}
.photo-auto-brushes,.photo-auto-actions{display:flex;gap:6px;margin:7px 0;flex-wrap:wrap}
#photo-auto-panel button{min-height:44px;flex:1;padding:8px 10px;font-size:12px;white-space:nowrap}
#photo-auto-panel button[aria-pressed=true]{background:#e9f1ff;border-color:#77a4e5}
#photo-mark-foreground{color:#007d52}#photo-mark-background{color:#b22d42}
#photo-auto-panel small{font-size:10px;line-height:1.3;color:#6a7c92;display:block}
body.photo-auto-active #photo-content[data-step="2"]>[data-photo-panel="2"],body.photo-auto-active .photo-flow-footer{visibility:hidden}
body.photo-auto-active #photo-auto-panel{bottom:12px;max-height:36dvh}
body.photo-auto-active #photo-task-description{color:#4c729b}
body.photo-auto-active #photo-exit,body.photo-auto-active .photo-steps,body.photo-auto-active #photo-help{pointer-events:none;opacity:.5}
@media(max-height:520px) and (min-width:550px){body.photo-auto-active #photo-auto-panel{left:auto;right:12px;top:52px;bottom:12px;width:330px;max-height:none}body.photo-auto-active #photo-content[data-step="2"]{grid-template-columns:minmax(0,1fr) 330px;grid-template-rows:42px minmax(0,1fr) 0}body.photo-auto-active #photo-content[data-step="2"]>.photo-task{display:none}}

body.photo-auto-active #photo-outline-tools{display:none!important}
