/* Shared consumer presentation. No image or storage behavior is changed. */
html:root{--flow-space:24px;--bg:#FFFFFF;--card:#FFFFFF;--text:var(--core-text);--muted:var(--core-muted);--line:var(--core-border);--accent:var(--core-blue);--success:var(--core-success)}*{box-sizing:border-box}body{margin:0}html{scroll-padding-top:24px}body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--core-text);background:#fff}button,a,input,textarea,summary{touch-action:manipulation}button,input,textarea{font:inherit}button,a{ -webkit-tap-highlight-color:transparent}button:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid var(--core-blue);outline-offset:3px}button:disabled{cursor:not-allowed;opacity:.5}[hidden]{display:none!important}.flow-page{max-width:760px;margin:auto;padding:calc(16px + env(safe-area-inset-top)) 20px calc(32px + env(safe-area-inset-bottom));line-height:1.5}.flow-title{display:grid!important;grid-template-columns:minmax(64px,1fr) minmax(0,3fr) minmax(44px,1fr);align-items:center;gap:8px;margin:0 0 24px!important}.flow-title h1{font-size:1.2rem!important;line-height:1.3;text-align:center;margin:0!important;overflow-wrap:anywhere}.flow-title>button:first-child{justify-self:start;padding:8px;background:transparent;color:var(--core-blue)}.flow-close{justify-self:end;display:grid;place-items:center;min-width:44px;min-height:44px;border:0;background:transparent;color:var(--core-muted);text-decoration:none;font-size:26px}.flow-steps{margin:24px 0}.flow-steps p{color:var(--core-muted);font-size:.875rem;margin:0 0 12px}.flow-steps ol{display:flex;list-style:none;padding:0;margin:0}.flow-steps li{display:flex;align-items:center;flex:1}.flow-steps li:last-child{flex:0}.flow-steps li span{width:12px;height:12px;border-radius:50%;background:var(--core-border);flex:none}.flow-steps li:not(:last-child):after{content:'';height:2px;background:var(--core-border);flex:1;margin:0 6px}.flow-steps li.active span,.flow-steps li.complete:after{background:var(--core-blue)}.flow-confirm{box-sizing:border-box;border:1px solid var(--core-border);border-radius:24px;padding:24px;width:calc(100% - 32px);max-width:440px;max-height:calc(100dvh - 32px);overflow:auto;margin:auto;color:var(--core-text);background:white;box-shadow:0 20px 60px #17212f20}.flow-confirm::backdrop,dialog::backdrop{background:#17212f66}.flow-confirm h2{margin:0 0 16px;font-size:1.3rem}.flow-credit{font-size:1.8rem;font-weight:700;margin:12px 0;color:var(--core-blue)}.flow-confirm p{line-height:1.5}.flow-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:24px}.flow-actions>*{flex:1;min-width:100px}.flow-processing{background:var(--core-surface);border:1px solid var(--core-border);border-radius:20px;padding:24px;margin:24px 0}.flow-processing h2{font-size:1.3rem;margin:0 0 12px}.flow-processing p{color:var(--core-muted);line-height:1.5}.flow-progress-value{display:flex;gap:12px;align-items:center;font-variant-numeric:tabular-nums}.flow-progress-value progress{flex:1;min-width:0;width:100%;accent-color:var(--core-blue);height:12px}.flow-progress-value span{min-width:3ch}.flow-result img,.flow-image,canvas{max-width:100%;height:auto;border-radius:18px}.flow-result{margin:24px 0}.flow-result h2{font-size:1.3rem}.flow-result .core-primary{width:100%;margin-top:16px}.flow-prompt-chips{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0}.flow-prompt-chips button{border:1px solid var(--core-border);background:var(--core-surface);color:var(--core-text);border-radius:12px;padding:10px 12px;min-height:44px}.flow-page textarea{display:block;box-sizing:border-box;width:100%;border:1px solid var(--core-border);border-radius:12px;padding:16px;font-size:1rem;line-height:1.5;resize:vertical;scroll-margin:100px 0 140px}.flow-page label{display:block;margin:16px 0 8px}.flow-page h2{font-size:1.4rem;line-height:1.3}.flow-page #continue,.flow-page #run{width:100%;margin-top:24px}.flow-page #history button{display:block;width:100%;text-align:left;margin:12px 0}.flow-page #stage{margin:24px 0}.flow-page #photo{display:block;width:100%;height:auto}.flow-page #source-actions{display:flex;gap:12px;flex-wrap:wrap}.flow-page #source-actions>*{flex:1}.flow-page #add-photo{width:100%;min-height:240px;border:1px dashed var(--core-border);background:var(--core-surface);color:var(--core-text);border-radius:20px;font-size:1.2rem}.flow-page dialog:not(.flow-confirm){box-sizing:border-box;border:1px solid var(--core-border);border-radius:24px;padding:24px;width:calc(100% - 32px);max-width:600px;max-height:85dvh;overflow:auto;margin:auto}.flow-page dialog header{display:flex;align-items:center;justify-content:space-between;gap:12px}.flow-page dialog>button{display:block;width:100%;margin:12px 0}.flow-page #purchased-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.flow-page #purchased-list img{width:100%;height:auto;border-radius:12px}.flow-page #status{overflow-wrap:anywhere}.core-tool-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.core-tool-grid .core-card{display:flex;flex-direction:column;gap:8px}.core-tool-grid .core-secondary{margin-top:auto}.core-tool-grid h3{font-size:1.1rem}body:has(dialog[open]) #primary-navigation{display:none!important}#app .btn,dialog .btn{background:var(--core-blue);color:white;border-radius:12px;min-height:44px;border:0;box-shadow:none}#app .btn.secondary,dialog .btn.secondary{background:var(--core-surface);color:var(--core-text);border:1px solid var(--core-border)}#app input:not([type=checkbox]):not([type=file]),#app select,#app textarea{border:1px solid var(--core-border);border-radius:12px;background:#fff;color:var(--core-text);min-height:44px;font-size:1rem}dialog:not(.photo-preview){border-color:var(--core-border);border-radius:24px;color:var(--core-text);background:white}dialog button{min-height:44px}.core-page .core-card{box-shadow:none}.core-page .core-primary,.core-page .core-secondary{white-space:normal}.core-page .core-row-copy{min-width:0;overflow-wrap:anywhere}.core-price{flex-wrap:wrap}.flow-page #review-source{border-radius:18px}.flow-page .actions{display:flex;gap:12px;flex-wrap:wrap}.flow-page .actions>*{flex:1}.flow-page #review .actions{flex-direction:column-reverse}#app:has(.capture-page)>.flow-header,#app[data-screen="enhance"]>.flow-header{display:none!important}.capture-page>.core-page-header{display:none}.capture-page .flow-title{margin-top:24px!important}.core-page .core-warning{color:var(--core-warning)}.core-page .core-error{color:var(--core-error)}.cl-rootBox,.cl-card{font-family:inherit!important}.cl-formButtonPrimary{background:var(--core-blue)!important}.cl-card{border:1px solid var(--core-border)!important;border-radius:20px!important;box-shadow:none!important}@media(max-width:520px){.core-tool-grid{grid-template-columns:1fr}.core-tool-grid .core-card{display:grid;grid-template-columns:1fr auto;align-items:center}.core-tool-grid .core-card h3,.core-tool-grid .core-card p{margin:0}.core-tool-grid .core-card a,.core-tool-grid .core-card button{grid-column:2;grid-row:1/3}.flow-page{padding-inline:20px}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;animation:none!important;transition:none!important}}

#app[data-screen="account-settings"],#app[data-screen="legal"]{max-width:760px;padding:24px 20px calc(32px + env(safe-area-inset-bottom))}#app[data-screen="account-settings"] h1,#app[data-screen="legal"] h1{font-size:1.75rem}#app[data-screen="account-settings"] .card,#app[data-screen="legal"] .card{border:1px solid var(--core-border);background:#fff;border-radius:20px;box-shadow:none;padding:24px}#app .flow-title~h2{font-size:1.4rem}.photo-lightbox{max-width:900px;width:calc(100% - 24px);max-height:90dvh;overflow:auto;padding:16px}.photo-lightbox header{display:flex;justify-content:space-between;align-items:center;gap:16px}.photo-lightbox img{max-width:100%;height:auto}.export-sheet{max-height:85dvh;overflow:auto;width:calc(100% - 32px);max-width:520px;padding:24px}.export-options{display:grid;gap:12px}.export-options .btn{white-space:normal}.core-dialog{max-height:85dvh;overflow:auto}.capture-page .flow-title button{min-width:44px}#app .photo-preview{max-width:100%;height:auto}.bottom-navigation button{min-width:0!important}.bottom-navigation span{font-size:max(.7rem,11px)}
.core-list-row{flex-wrap:wrap;column-gap:16px;row-gap:8px}.core-list-row>span{min-width:0;overflow-wrap:anywhere}.core-list-row>strong{flex-shrink:0}.core-pack{flex-wrap:wrap;gap:12px}.core-section-heading{flex-wrap:wrap;gap:12px}.flow-title .core-secondary{font-size:.875rem}.flow-page small{color:var(--core-muted)}

#app .page-title-row,#app>.flow-header,#app>h1{background:#fff;color:var(--core-text)}#app .flow-header button{color:var(--core-blue)}#app .card{border:1px solid var(--core-border);border-radius:20px;background:#fff;box-shadow:none}#app .camera-label{background:var(--core-blue);color:white;border-radius:12px;min-height:48px}#app .secondary-camera{background:var(--core-surface);color:var(--core-blue)}.core-project-row .project-thumb{flex:none;width:72px;height:54px}.flow-page #status:not(:empty){padding:12px 16px;background:var(--core-surface);border-radius:12px}.flow-page .core-warning{padding:16px;border-radius:12px;background:#fff9e9}.core-dialog .core-page-header h2{overflow-wrap:anywhere}#app .profile-form input{width:100%;min-width:0}#app .profile-heading{flex-wrap:wrap}
.core-auth-page{background:#fff;max-width:480px;margin:0 auto;padding:calc(32px + env(safe-area-inset-top)) 20px 32px;box-shadow:none}.core-auth-page h1{font-size:1.75rem;margin-bottom:24px}.core-auth-page .cl-rootBox,.core-auth-page .cl-cardBox{max-width:100%;width:100%}.core-auth-page .cl-card{padding:24px}.core-auth-page .cl-formFieldInput{min-height:44px}.core-auth-page .cl-footer{background:var(--core-surface)}

/* Photo-first preview: content-sized, centered, with one close action. */
dialog.enhancement-preview{position:fixed;inset:0;margin:auto;width:calc(100% - 32px);max-width:820px;height:fit-content;max-height:calc(100dvh - 48px - env(safe-area-inset-top) - env(safe-area-inset-bottom));padding:0;border:0;border-radius:24px;background:#fff;color:var(--core-text);overflow:auto;box-shadow:0 16px 64px #17212f26}
dialog.enhancement-preview::backdrop{background:rgb(23 33 47 / .5)}
dialog.enhancement-preview .enhancement-preview-header{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;align-items:center;gap:8px;padding:12px 12px 8px;margin:0}
.enhancement-preview-header h1{grid-column:2;margin:0;font-size:16px;font-weight:600;text-align:center;line-height:1.4}
.enhancement-preview-header button{grid-column:3;display:grid;place-items:center;min-width:44px;min-height:44px;padding:0;border:0;border-radius:50%;background:var(--core-surface,#F5F7FA);color:var(--core-muted,#5D6878)}
.enhancement-preview-header button:focus:not(:focus-visible){outline:none}
.enhancement-preview-image{display:flex;align-items:center;justify-content:center;margin:4px 12px 12px;overflow:hidden;border-radius:14px;background:#F5F7FA}
dialog.enhancement-preview .enhancement-preview-image img{display:block;width:100%;height:auto;max-height:60dvh;object-fit:contain;margin:0;border-radius:0}
.enhancement-preview-footer{padding:0 16px 20px;text-align:center}
.enhancement-preview-footer p{margin:4px 0 12px;font-size:13px;line-height:1.5;color:var(--core-muted,#5D6878)}
.enhancement-preview-footer button{width:100%;white-space:normal;min-height:48px}
@media(max-width:360px){dialog.enhancement-preview{width:calc(100% - 24px)}.enhancement-preview-footer{padding-inline:12px}}

/* Matching approved first-step upload panels. Existing inputs and handlers retained. */
.approved-upload-page #add-photo{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;width:100%;min-height:240px;height:clamp(240px,38dvh,360px);padding:24px;border:0;border-radius:20px;background:#F5F7FA;color:#5D6878;font-size:1.0625rem;box-shadow:none}.approved-upload-page #add-photo .approved-upload-icon{width:72px;height:72px;flex:none;color:#9ba3af}.approved-upload-page #add-photo span{font-size:1.0625rem;color:#5D6878}.approved-upload-page #step-title{text-align:center;font-size:1.5rem;margin:24px 0}.approved-upload-page .approved-upload-cost{font-size:.875rem;color:#5D6878;text-align:center;margin:18px 0}.approved-upload-page:has(#add-photo[hidden]) .approved-upload-cost{display:none}.approved-upload-page #continue{min-height:48px;border-radius:12px}.approved-upload-page:not(:has(#add-photo[hidden])) #continue{margin-top:28px}.approved-upload-page .flow-title{margin-bottom:24px}.approved-upload-page #add-photo:focus-visible{outline:3px solid #0052cc;outline-offset:3px}

/* Soft raised surfaces: a fine highlight, short shadow, and tactile press. */
.core-primary,.core-secondary,#app .btn,dialog .btn,.flow-prompt-chips button,.capture-modes button,[data-room],[data-style]{box-shadow:inset 0 1px 0 #ffffff80,0 2px 4px #17212f14;transition:box-shadow .15s ease,transform .15s ease}
.core-primary,#app .btn:not(.secondary),dialog .btn:not(.secondary){background:linear-gradient(180deg,#1680ff,#0065ed);border:1px solid #0062e5;box-shadow:inset 0 1px 0 #ffffff55,0 3px 6px #0065ed24}
.core-secondary,#app .btn.secondary,dialog .btn.secondary,.flow-prompt-chips button{background:linear-gradient(180deg,#fff,#f5f7fb);border:1px solid #dfe4ec}
.project-filters{border:1px solid #edf0f5;box-shadow:inset 0 1px 3px #17212f06;gap:5px}
.project-filters button{box-shadow:none;background:transparent;border:1px solid transparent;border-radius:11px}
.project-filters button[aria-pressed=true],.capture-modes button[aria-pressed=true],[data-room][aria-pressed=true],.flow-prompt-chips button[aria-pressed=true]{background:linear-gradient(180deg,#fff,#eaf2ff);color:#0054c6;border-color:#dce7f8;box-shadow:inset 0 1px 0 #fff,0 2px 5px #233e6824}
[data-style][aria-pressed=true]{box-shadow:0 0 0 2px #0875ff,0 4px 10px #0065ed22}
#primary-navigation .nav-item.is-active{background:linear-gradient(180deg,#f7fbff,#e6efff);box-shadow:inset 0 1px 0 #fff,0 2px 4px #17212f14;border:1px solid #e0eafd;border-radius:12px}
#primary-navigation .nav-item.nav-capture{background:linear-gradient(180deg,#1680ff,#0065ed);color:white;box-shadow:inset 0 1px 0 #ffffff66,0 3px 6px #0065ed26;border:1px solid #0062e5;border-radius:14px}
:is(.core-primary,.core-secondary,#app .btn,dialog .btn,.flow-prompt-chips button,.capture-modes button,[data-room],[data-style]):not(:disabled):active{transform:translateY(1px);box-shadow:inset 0 2px 4px #17212f18}
:is(.core-primary,.core-secondary,#app .btn,dialog .btn,.capture-modes button):disabled{background:#f3f5f8;color:#758091;box-shadow:none;border-color:#e4e8ef;transform:none}
.approved-projects .project-menu[open]{padding:0;border:0;background:transparent;box-shadow:none;border-radius:0;z-index:8}
.project-menu summary{border-radius:50%;color:#586475;letter-spacing:2px}
.project-menu summary::-webkit-details-marker{display:none}
.project-menu[open] summary{background:#edf3fc;color:#0065ed;box-shadow:inset 0 1px 0 #fff,0 1px 3px #17212f12}
.project-menu-panel{position:absolute;right:0;top:48px;width:min(200px,calc(100vw - 48px));padding:5px;background:rgba(255,255,255,.98);border:1px solid #e2e7ef;border-radius:16px;box-shadow:0 12px 32px #17212f24,0 2px 6px #17212f0c;overflow:hidden}
.project-menu .project-menu-panel button{display:flex;align-items:center;justify-content:space-between;gap:20px;width:100%;min-height:48px;margin:0;padding:12px 14px;background:transparent;border:0;border-radius:10px;color:#17212f;font:500 16px/1.4 -apple-system,BlinkMacSystemFont,sans-serif;text-align:left;cursor:pointer}
.project-menu-panel button+button{border-top:1px solid #edf0f5!important;border-radius:0 0 10px 10px!important}
.project-menu .project-menu-panel [data-delete]{color:#d72c36}
.project-menu-panel svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex:none}
.project-menu .project-menu-panel button:hover,.project-menu .project-menu-panel button:focus-visible{background:#f1f5fb}
.project-menu .project-menu-panel button:active{background:#e7eef8}
@media(prefers-reduced-motion:reduce){:is(.core-primary,.core-secondary,#app .btn,dialog .btn,.flow-prompt-chips button,.capture-modes button,[data-room],[data-style]):active{transform:none}}

.approved-projects .project-open{padding-right:48px}
.project-menu-up .project-menu-panel{top:auto;bottom:48px}

.project-photo-error{font-size:.8125rem;line-height:1.5;color:#b32630;overflow-wrap:anywhere;margin:10px 0 0!important}

/* Override legacy .photo-lightbox button rules: downloads must stay visible. */
dialog.enhancement-preview .enhancement-preview-footer .core-primary{background:linear-gradient(180deg,#1680ff,#0065ed);color:#fff;border:1px solid #0062e5;font-weight:600}
dialog.enhancement-preview .enhancement-preview-footer .core-secondary{background:#fff;color:#006aff;border:1px solid #dfe4ec;font-weight:600;margin-top:10px}
dialog.enhancement-preview .enhancement-preview-footer button:disabled{background:#edf0f5;color:#5d6878;border-color:#dfe4ec}
.enhancement-preview-footer [data-download-status]:empty{display:none}

/* Download confirmation: clear total, then Confirm left / Cancel right. */
dialog.export-sheet{color:var(--core-text);background:#fff;padding:24px;border-radius:24px}
dialog.export-sheet h2{margin:0 0 16px;font-size:22px;line-height:1.3}
dialog.export-sheet [role="status"]{color:var(--core-text);font-size:17px;line-height:1.5;margin:0 0 6px}
dialog.export-sheet .export-balance{color:var(--core-muted);font-size:14px;line-height:1.5;margin:0 0 24px}
dialog.export-sheet .export-balance:empty{display:none}
dialog.export-sheet .export-actions{display:grid;grid-template-columns:1fr 1fr;align-items:stretch;gap:12px;margin-top:24px}
dialog.export-sheet .export-options{display:block;flex:1;min-width:0}
dialog.export-sheet .export-options:empty{display:none}
dialog.export-sheet .export-actions>.core-secondary{flex:1;min-width:0}
dialog.export-sheet .export-actions button{width:100%;min-height:48px;margin:0;padding:12px;border-radius:12px;font-size:16px;font-weight:600}
dialog.export-sheet .export-actions .core-primary{background:linear-gradient(180deg,#1680ff,#0065ed);color:#fff;border:1px solid #0062e5}
dialog.export-sheet .export-actions .core-secondary{background:#fff;color:var(--core-blue);border:1px solid var(--core-border)}
dialog.export-sheet .export-actions button:focus:not(:focus-visible){outline:none}

dialog.export-sheet h2:focus{outline:none}
