*{box-sizing:border-box}body{margin:0;background:#f5f6f1;color:#193f40;font:14px "Segoe UI",system-ui,sans-serif}header{height:50px;display:flex;align-items:center;justify-content:space-between;padding:0 24px;border-bottom:1px solid #d0dad1;background:#fff}header span{font-size:10px;letter-spacing:1.4px}.brand{font-size:21px;color:#193f40;text-decoration:none}.brand strong{color:#147b74}main{max-width:1360px;margin:auto;padding:14px 24px}h1{font-size:23px;margin:0}h2{font-size:18px;margin:0}h3{font-size:18px}.intro{display:flex;align-items:baseline;gap:20px}.intro p{font-size:12px;margin:0;color:#55706a}.safety-details{font-size:11px;color:#55706a;margin:8px 0}.safety-details summary{cursor:pointer}.safety-details p{margin:6px 0}#owner-costs{display:flex;gap:20px;align-items:center;font-size:12px;margin:8px 0}#owner-costs .hint{margin:0;font-size:10px}.action-bar{position:sticky;top:0;z-index:10;background:#fffef9;border:1px solid #c9d8cf;border-radius:12px;padding:10px 12px;box-shadow:0 3px 12px #193f4010}.action-row{display:flex;gap:10px;align-items:center}.action-row>a{font-size:12px;color:#147b74}.action-row #convert{margin-left:auto;min-width:200px}.button,button,select{font:inherit}button,.button{cursor:pointer;min-height:42px;border:1px solid #9db5a7;background:#fff;color:#245b50;border-radius:7px;padding:8px 12px;font-size:13px;font-weight:600}.button{display:inline-flex;align-items:center;justify-content:center;text-decoration:none}.primary{background:#147b74;color:#fff;border-color:#147b74}.secondary{background:#fff}.button input[type=file]{position:absolute;width:1px;height:1px;opacity:0}button:disabled{opacity:.45;cursor:not-allowed}select{min-height:40px;border:1px solid #afc3b6;background:#fff;border-radius:6px;color:#193f40;padding:5px}.detail-label{display:flex;align-items:center;gap:6px}.confirm-row{display:flex;align-items:center;gap:20px;margin-top:8px}.accept{display:flex;align-items:center;gap:7px;font-size:12px;white-space:nowrap}.accept input{width:18px;height:18px;accent-color:#147b74}#convert-help{font-size:11px;margin:0;color:#795233;line-height:1.3}#convert-help[data-ready=true]{color:#147b74}.workspace{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-top:14px}.image-panel{min-width:0;padding:12px;background:#fff;border:1px solid #d1ddd3;border-radius:12px}.panel-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:42px;margin-bottom:8px}.panel-heading p{font-size:12px;margin:4px 0 0;color:#617570}.lock-badge{font-size:10px;border:1px solid #bdd3c5;background:#edf6ef;padding:6px 8px;border-radius:20px;white-space:nowrap}.image-toolbar{display:flex;align-items:center;justify-content:center;gap:5px;margin-bottom:8px;min-height:44px;flex-wrap:wrap}.image-toolbar button{min-width:40px;min-height:40px;padding:6px;font-size:16px}.image-toolbar button[id^=reset]{font-size:11px;padding:6px 8px}.image-toolbar output{font-size:12px;min-width:38px;text-align:center}.image-toolbar label{font-size:11px}.image-toolbar select{font-size:11px;min-height:38px;width:95px}.image-viewport{position:relative;height:clamp(260px,calc(100dvh - 400px),480px);max-width:100%;aspect-ratio:1;margin:auto;overflow:hidden;background:#f1f3ed;border:1px solid #d1ddd3;border-radius:8px}.image-viewport canvas{display:block;width:100%;height:100%;touch-action:none;background:#fff;cursor:grab}.image-viewport canvas:active{cursor:grabbing}.crop-ring{position:absolute;inset:0;border:2px solid #a46546;border-radius:50%;pointer-events:none}.crop-ring:after{content:"";position:absolute;inset:5.55556%;border:1px dashed #a46546;border-radius:50%}#empty,#result-empty{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;pointer-events:none;color:#728579;padding:20px}#result-empty p{font-size:13px}.image-hint{font-size:11px;line-height:1.4;text-align:center;margin:8px 0 0;color:#526d65}.result-label{display:block;font-size:9px;text-align:center;margin-top:4px;color:#6e7566}.feedback{font-size:12px;margin:9px 0;min-height:16px;color:#795233}.sheet-bar{display:flex;gap:20px;align-items:center;justify-content:space-between;padding:12px 16px;background:#eaf0e8;border:1px solid #cedbce;border-radius:12px}.sheet-bar strong{font-size:12px}.slots{display:flex;gap:8px;margin-top:6px}.slots button{position:relative;padding:2px;width:48px;height:48px;min-height:48px;border-radius:8px}.slots img{width:100%;height:100%;border-radius:50%}.slots span{position:absolute;right:0;bottom:0;background:#fff;border:1px solid #b7cabc;border-radius:5px;padding:0 4px;font-size:10px}.slots button[aria-pressed=true]{border:2px solid #147b74}.slots button.filled{background:#d6e8da}.sheet-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.example-details{margin:20px 0}.example-details>summary{cursor:pointer;color:#147b74;font-weight:600;padding:10px}.style-picker{border:0;margin:12px 0;padding:0}.style-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.style-card{padding:12px;border:2px solid #d4ded4;border-radius:10px;background:white}.style-card img{display:block;width:100%;aspect-ratio:1;object-fit:contain}.style-card span{font-size:12px}.style-card:has(input:checked){border-color:#147b74}.hint{font-size:12px;color:#5e766b;line-height:1.5}.page-actions{display:flex;gap:12px;align-items:center}#whole-sheet{display:block;width:100%;max-width:650px;height:auto;margin:20px auto;background:white}.test-controls{border-top:1px solid #cedbce;padding:20px 0;margin-top:20px;font-size:12px}.test-controls button{margin:4px}.gallery-card{display:inline-flex;flex-direction:column;width:180px;margin:12px}.gallery-card img{width:100%}main>details:last-child{font-size:12px;line-height:1.6;margin:20px 0}footer{text-align:center;padding:16px;font-size:10px;color:#687e73}.generation-overlay{position:fixed;inset:0;z-index:100;background:#193f40c9;display:grid;place-items:center;padding:24px}#generation-status{background:#fff;padding:30px;border:3px solid #147b74;border-radius:16px;max-width:500px;text-align:center;line-height:1.6}.spinner{display:inline-block;width:40px;height:40px;border:4px solid #c5dace;border-top-color:#147b74;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.spinner{animation:none}}[hidden]{display:none!important}[aria-disabled=true]{pointer-events:none}button:focus-visible,a:focus-visible,select:focus-visible,canvas:focus-visible,label:focus-within{outline:2px solid #2673a6;outline-offset:2px}@media(max-width:1050px){main{padding:12px}.intro p{display:none}.action-row{gap:6px}.action-row #convert{min-width:150px}.image-toolbar{gap:3px}.image-toolbar button{min-width:36px}.image-toolbar label{display:none}.sheet-bar{gap:8px}.sheet-actions .button{font-size:12px}}@media(max-width:700px){header{padding:0 14px;height:46px}.brand{font-size:18px}header span{font-size:8px}main{padding:10px}h1{font-size:20px}.safety-details{font-size:10px}#owner-costs{flex-wrap:wrap;gap:4px 14px}#owner-costs .hint{display:none}.action-bar{padding:8px;top:0}.action-row{flex-wrap:wrap;gap:6px}.action-row .button{min-height:40px;padding:7px 9px;font-size:12px}.action-row #convert{min-width:0;margin-left:0;flex:1}.action-row>a{font-size:11px}.detail-label{font-size:12px}.detail-label select{font-size:12px;min-height:40px}.confirm-row{display:block;margin-top:6px}.accept{font-size:11px}#convert-help{font-size:10px;margin:4px 0 0}.workspace{grid-template-columns:1fr;gap:12px;margin-top:12px}.image-panel{padding:10px}.image-viewport{width:100%;height:auto;max-width:min(100%,370px);aspect-ratio:1}.image-toolbar{gap:4px}.image-toolbar button{min-width:38px;min-height:42px}.image-toolbar label{display:none}.panel-heading{scroll-margin-top:180px}.panel-heading h2{font-size:17px}.panel-heading p{font-size:11px}.panel-heading .button{font-size:11px;min-height:40px}.lock-badge{font-size:9px}.sheet-bar{display:block;padding:12px}.sheet-actions{justify-content:start;margin-top:12px}.sheet-actions .button{flex:1 1 45%;min-height:44px}.slots button{width:52px;height:52px}.style-cards{grid-template-columns:repeat(2,minmax(0,1fr))}.page-actions{flex-wrap:wrap}#sheet-view{scroll-margin-top:180px}}@media print{.style-picker,.action-bar,.workspace{display:none!important}}

/* Keep the working surface near the top; the brand already names this studio. */
.intro{display:none}header{height:44px}main{padding-top:8px}.image-viewport{height:clamp(250px,calc(100dvh - 405px),480px)}@media(max-width:700px){.image-viewport{height:auto}.image-panel{scroll-margin-top:190px}.action-row #sample{font-size:11px}.action-row #convert{min-height:42px}}

@media(max-width:1050px){.image-toolbar label{display:inline-flex;align-items:center;gap:4px}}@media(max-width:700px){.image-toolbar{position:sticky;top:calc(var(--action-height,180px) + 4px);z-index:5;background:white;border-radius:8px;padding:4px 0}.image-hint{font-size:11px}}

.image-toolbar{position:relative;margin-top:16px}.inspection-label{position:absolute;top:-15px;left:0;right:0;font-size:11px;line-height:13px;font-weight:650;color:#376452;text-align:center}@media(max-width:700px){.image-toolbar{position:sticky;top:calc(var(--action-height,180px) + 18px)}}

/* Guided, compact workspace. Print buffers are independent of these guides. */
main{max-width:1200px}.next-step{font-size:12px;font-weight:650;line-height:1.4;margin:0 0 8px;color:#743a32}.next-required{outline:2px solid #b84b43!important;outline-offset:3px;animation:next-cue 2.8s ease-in-out infinite}@keyframes next-cue{0%,100%{box-shadow:0 0 0 1px #b84b4320}50%{box-shadow:0 0 0 6px #b84b432b}}@media(prefers-reduced-motion:reduce){.next-required{animation:none;box-shadow:none}}
#convert-help{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.confirm-row{margin-top:6px}.panel-tools{min-height:48px;display:flex;align-items:center;justify-content:center;margin:0 0 6px}.image-toolbar{margin:0;min-height:40px}.panel-heading{margin-bottom:6px}.guide-note{font-size:11px;line-height:1.5;color:#52685e;text-align:center;margin:0}.image-panel{padding:10px}.workspace{gap:12px;margin-top:10px}.circle-guides{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible}.circle-guides circle{fill:none;stroke:#252525;stroke-width:4}.circle-guides .visible-guide{stroke-width:2;stroke-dasharray:10 10}.image-viewport{border:0;border-radius:0;background:white}.image-viewport #result,.image-viewport #original-view{touch-action:pan-y;cursor:default}.image-viewport #result:active,.image-viewport #original-view:active{cursor:default}#empty{border:0;border-radius:50%;background:transparent;color:#285b4d;pointer-events:auto;cursor:pointer;width:100%;height:100%;padding:24px;gap:8px}#empty strong{font-size:20px}#empty span{font-size:12px;font-weight:400}#empty.next-required{outline-offset:-5px}#result-empty{padding:14px}#result-empty h3{margin:8px 0}#result-empty p{margin:6px 0}.style-cards{align-items:start;gap:10px}.style-card{padding:10px;min-height:0;height:auto}.style-card img{width:100%;height:auto;aspect-ratio:1;object-fit:contain;margin:8px 0}.style-card span{display:block;line-height:1.4}.example-details{margin:12px 0}.style-picker{margin:8px 0}.feedback{margin:6px 0;min-height:0}.feedback:empty{display:none}.sheet-bar{padding:10px 12px}.safety-details{margin:5px 0}#owner-costs{margin:6px 0}.image-panel,.panel-heading,#examples-heading,#detail-examples,#sheet-title,#edit-slot-title{scroll-margin-top:calc(var(--action-height,130px) + 18px)}
@media(max-width:700px){.next-step{font-size:11px;margin-bottom:6px}.action-bar{padding:8px}.panel-tools{min-height:40px}.image-toolbar{position:static;padding:0}.image-panel{padding:9px}.image-viewport{max-width:min(100%,350px)}.style-card{padding:8px}.style-card img{height:auto}.panel-heading .button{font-size:10px;padding:7px}.guide-note{font-size:10px}.workspace{gap:10px}}

.next-required:focus-visible{outline-color:#193f40!important}#source-title{scroll-margin-top:calc(var(--action-height,130px) + 18px)}

/* Ordered workflow: only its next action receives a red cue. */
.workflow-steps{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:24px}.workflow-step{position:relative;min-width:0;padding:8px;border:1px solid #d1ddd3;border-radius:9px;background:#fff}.workflow-step h3{display:flex;align-items:center;gap:7px;font-size:14px;margin:0 0 8px}.workflow-step h3>span{display:grid;place-items:center;border-radius:50%;width:23px;height:23px;background:#edf1ed}.workflow-step small{margin-left:auto;font-size:10px;color:#53776b}.workflow-step.completed h3>span{background:#d7ece1;color:#225a46}.workflow-step.completed small:before{content:'✓ '}.workflow-step .button{font-size:12px;padding:7px;min-height:40px}.workflow-step .accept{white-space:normal;line-height:1.4;min-height:40px}.workflow-step .accept input{flex-shrink:0}.workflow-step select{width:100%}.workflow-step a{display:inline-block;margin-top:5px;font-size:11px;color:#147b74}.workflow-step #convert{width:100%}.action-bar{padding:12px 16px;overflow:visible}.next-required{outline:2px solid #b84b43!important;outline-offset:2px;animation:wide-next-cue 3.6s ease-in-out infinite;z-index:1}@keyframes wide-next-cue{0%,100%{box-shadow:0 0 35px 15px #b84b4312}50%{box-shadow:0 0 35px 15px #b84b434a}}.next-required:focus-visible{outline-color:#b84b43!important}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}#replacement-choice{padding:12px;border:1px solid #d1ddd3;border-radius:8px;margin:12px 0}#replacement-choice p{font-size:12px}.image-viewport{height:clamp(250px,calc(100dvh - 435px),460px)}
@media(prefers-reduced-motion:reduce){.next-required{animation:none;box-shadow:0 0 35px 15px #b84b4330}}
@media(max-width:700px){#editing-view{display:flex;flex-direction:column;gap:12px}#editing-view>.workspace{display:contents}.workspace>.image-panel:first-child{order:0}.action-bar{order:1;position:static;padding:16px}.workspace>.image-panel:nth-child(2){order:2}#editing-view>.feedback,#editing-view>.sheet-bar,#editing-view>.example-details,#editing-view>#replacement-choice{order:3}.workflow-steps{grid-template-columns:1fr;gap:24px}.workflow-step{padding:12px}.workflow-step .button{min-height:44px}.workflow-step .accept{min-height:44px}.workflow-step h3{font-size:16px}.workflow-step a{font-size:12px}.image-viewport{height:auto}.image-panel,.panel-heading,#source-title,#examples-heading,#detail-examples,#sheet-title,#edit-slot-title,.workflow-step{scroll-margin-top:16px}.image-toolbar{position:static}.panel-heading{flex-wrap:wrap}}


@media(max-width:700px){#editing-view{overflow-anchor:none}.next-step{min-height:4.2em}}

/* Compact guidance stays beside source-only adjustment controls. */
.source-tools{flex-direction:column;gap:5px}#adjust-guidance{font-size:12px;line-height:1.4;color:#365e54;margin:0;text-align:center;width:100%}
@media(min-width:701px){.workspace:has(#adjust-guidance:not([hidden])) .panel-tools{min-height:84px}}
@media(max-width:700px){.source-tools{min-height:0}#adjust-guidance{font-size:12px;line-height:1.4}}

#step-photo #prepare-next{display:block;width:100%;margin-top:6px}

/* Compact Letter-sheet selector; positions and cut-circle size come from geometry.json. */
.slots{display:block;position:relative;width:200px;max-width:100%;margin:8px 0 0;background:#fff;border:1px solid #b9c9bd;border-radius:2px;box-shadow:0 2px 5px #193f4014}
.slots button{position:absolute;transform:translate(-50%,-50%);height:auto;min-height:0;aspect-ratio:1;border-radius:50%;border:1px dashed #8da397;padding:2px;background:white}
.slots button.filled{background:white;border-style:solid}.slots button[aria-pressed=true]{border:2px solid #147b74;outline:3px solid #9cd1c8;outline-offset:3px}
.slots button:not(.filled):after{content:'Empty';position:absolute;inset:0;display:grid;place-items:center;font-size:11px;font-weight:400;color:#657e71;pointer-events:none}
.slots img{display:block;width:100%;height:100%;aspect-ratio:1}.slots span{z-index:1;right:5px;bottom:3px}

/* Shared private-review navigation: sticky header, normal-flow footer. */
body>.site-header{position:sticky;top:0;z-index:40;height:auto;min-height:78px;display:flex;flex-wrap:wrap;gap:10px 24px;align-items:center;justify-content:space-between;padding:8px max(16px,calc((100vw - 1260px)/2));background:#fffdf8;border-bottom:1px solid #d0dad1}
.site-header .brand{display:flex;align-items:center;gap:8px;text-decoration:none;line-height:1;color:#193f40;flex-shrink:0}
.site-header .brand img{width:50px;height:50px;object-fit:contain}
.site-header .brand strong{font-size:21px;white-space:nowrap;letter-spacing:0;text-transform:none}
.site-header .brand span{letter-spacing:0;font-size:inherit}
.site-header .brand small{display:block;font-size:11px;margin-top:5px;color:#55706a}
.site-header .red{color:#c92742}.site-header .orange{color:#b36516}.site-header .green{color:#087460}.site-header .blue{color:#2557ab}
.site-header nav{display:flex;flex-wrap:wrap;gap:4px 16px;align-items:center}
.site-header nav a{display:inline-flex;align-items:center;min-height:40px;font-size:14px;font-weight:700;color:#193f40;text-decoration:none}
.site-header nav a:hover{text-decoration:underline}.site-header a:focus-visible,.shared-site-footer a:focus-visible{outline:3px solid #147b74;outline-offset:3px}
.site-header>span{display:none}
.shared-site-footer{position:static;display:flex;flex-wrap:wrap;gap:12px 24px;align-items:center;justify-content:center;padding:28px 20px;margin-top:28px;background:#fffdf8;border-top:1px solid #d0dad1;font-size:13px;line-height:1.5;color:#193f40}
.shared-site-footer a{color:#193f40;overflow-wrap:anywhere}.shared-site-footer nav{display:flex;gap:16px;flex-wrap:wrap}
html{scroll-padding-top:var(--site-header-height,150px)}
@media(max-width:700px){.site-header{padding:8px 14px;gap:4px}.site-header .brand img{width:40px;height:40px}.site-header .brand strong{font-size:18px}.site-header nav{width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 8px}.site-header nav a{font-size:13px;min-height:34px}.shared-site-footer{align-items:flex-start;flex-direction:column;gap:12px;font-size:12px}}

/* Keep the navigation and conversion controls from overlapping. */
.action-bar{top:var(--site-header-height,78px)}
.image-panel,.panel-heading,#examples-heading,#detail-examples,#sheet-title,#edit-slot-title,#source-title{scroll-margin-top:calc(var(--site-header-height,78px) + var(--action-height,130px) + 18px)}
@media(max-width:700px){.action-bar{position:static}.image-panel,.panel-heading,#examples-heading,#detail-examples,#sheet-title,#edit-slot-title,#source-title{scroll-margin-top:calc(var(--site-header-height,130px) + 18px)}}

/* Finished pictures require an explicit Step 1 choice before another draft. */
.workflow-step.awaiting-photo{background:#ecefed;color:#626f6b;border-color:#c8ceca}.workflow-step.awaiting-photo h3>span{background:#dce1de;color:#626f6b}.workflow-step.awaiting-photo select{background:#e2e7e3;color:#626f6b}.style-card:has(input:disabled){opacity:.55}

/* Separate sibling controls avoid nested buttons and double picker activation. */
#empty-photo-actions{display:none}
@media(max-width:700px){#empty{display:none}#empty-photo-actions{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;pointer-events:none}#empty-photo-actions button{pointer-events:auto;min-height:44px;width:min(68%,210px);padding:10px 8px;font-size:14px;background:#fff}}
