.photo-dialog{width:min(1100px,calc(100vw - 24px));max-height:calc(100dvh - 24px);padding:0;border:2px solid var(--plum);border-radius:5px;background:var(--paper);color:var(--plum);box-shadow:0 10px 0 #d8c5ae;overflow:auto}
.photo-dialog::backdrop{background:#241930b8;backdrop-filter:blur(3px)}
.photo-sheet{padding:clamp(16px,3vw,30px)}
.photo-heading{display:flex;gap:18px;justify-content:space-between;align-items:start;margin-bottom:18px}.photo-heading h2{font-family:Fraunces,Georgia,serif;font-size:clamp(26px,3vw,38px);line-height:1.08;margin:2px 0 9px}.photo-heading p{margin:0;max-width:680px;color:var(--muted);line-height:1.5;font-size:14px}.photo-heading .photo-eyebrow{font-size:11px;font-weight:800;letter-spacing:.14em;color:var(--plum);margin-bottom:9px}.photo-icon-button{flex:none;width:44px;height:44px;padding:0;border:2px solid var(--plum);border-radius:50%;background:var(--paper);font-size:28px;line-height:1}
.photo-compare{display:grid;grid-template-columns:1fr 1fr;gap:16px}.photo-compare figure{min-width:0;margin:0}.photo-stage{height:clamp(190px,27vw,320px);display:flex;align-items:center;justify-content:center;border:2px solid var(--plum);border-radius:4px;overflow:hidden;background:#fff}.photo-source-stage{position:relative;background:linear-gradient(45deg,#f3f1ea 25%,transparent 25%),linear-gradient(-45deg,#f3f1ea 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#f3f1ea 75%),linear-gradient(-45deg,transparent 75%,#f3f1ea 75%),#fff;background-size:20px 20px;background-position:0 0,0 10px,10px -10px,-10px 0;touch-action:none;cursor:grab}.photo-source-stage:active{cursor:grabbing}.photo-stage img,.photo-stage canvas{display:block;max-width:100%;max-height:100%;object-fit:contain}.photo-crop-frame{position:absolute;display:block;border:2px dashed #fff;outline:2px solid var(--plum);box-shadow:0 0 0 999px #38294d45;pointer-events:none}.photo-result-stage{background:var(--paper)}.photo-result-stage canvas{image-rendering:auto}.photo-compare figcaption{font-size:12px;font-weight:700;margin:7px 2px 0;color:var(--plum-light)}
.photo-tools{margin-top:17px;padding:17px;border:1px solid var(--line);border-radius:4px;background:var(--paper)}.photo-tool-row{display:grid;grid-template-columns:1fr 1fr auto;gap:12px;align-items:end}.photo-tool-row label,.photo-control{font-size:12px;font-weight:700}.photo-tool-row select{display:block;width:100%;min-height:44px;margin-top:5px;padding:7px 10px;border:1.5px solid var(--plum-light);border-radius:4px;background:#fff;color:var(--plum)}.photo-tool-row button{min-height:44px;padding:8px 14px;border:1.5px solid var(--plum);border-radius:4px;background:var(--biscuit);color:var(--plum)}.photo-auto{display:flex;align-items:flex-start;gap:10px;margin-top:15px;padding:10px 12px;background:var(--ground);border-radius:4px;font-size:13px;font-weight:800}.photo-auto input{width:20px;height:20px;accent-color:var(--plum);flex:none;margin:0}.photo-auto small{display:block;margin-top:3px;font-size:11px;line-height:1.4;font-weight:400}.photo-auto[data-inactive=true]{opacity:.55;background:var(--cream)}.photo-sliders{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px 18px;margin-top:18px}.photo-control{display:grid;grid-template-columns:1fr auto;gap:5px;align-items:center}.photo-control output{color:var(--plum-light);font-variant-numeric:tabular-nums}.photo-control input{grid-column:1/-1;width:100%;min-height:28px;accent-color:#704c83}.photo-status{min-height:24px;margin:13px 2px 8px;font-size:13px;line-height:1.5;color:var(--muted)}.photo-status[data-error=true]{color:#9b2648;font-weight:700}.photo-actions{display:flex;justify-content:flex-end;gap:10px}.photo-actions button{min-height:46px;padding:10px 18px;border:2px solid var(--plum);border-radius:4px;background:var(--paper);color:var(--plum)}.photo-actions .photo-apply{background:var(--action);border-color:var(--action);color:#fff;font-weight:800;box-shadow:3px 3px 0 #d8c5ae}.photo-actions .photo-apply:disabled{box-shadow:none}
@media(max-width:680px){.photo-dialog{width:calc(100vw - 12px);max-height:calc(100dvh - 12px);border-radius:18px}.photo-sheet{padding:14px}.photo-compare{gap:8px}.photo-stage{height:180px}.photo-tool-row{grid-template-columns:1fr 1fr}.photo-tool-row button{grid-column:1/-1}.photo-sliders{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.photo-compare figcaption{font-size:11px}.photo-heading h2{font-size:26px}}
@media(max-width:420px){.photo-compare{grid-template-columns:1fr}.photo-stage{height:160px}.photo-sliders{grid-template-columns:1fr 1fr}.photo-heading p{font-size:12px}}

.photo-tool-row{grid-template-columns:1fr 1fr 1fr auto}.photo-primary{grid-template-columns:1fr 1fr}.photo-heading .photo-eyebrow{display:none}.photo-heading h2{font-family:inherit;font-weight:700;font-size:25px;line-height:1.2;margin:0 0 8px}.photo-heading p{font-size:13px}.photo-sheet{padding:20px}.photo-tools{padding:12px;margin-top:10px}.photo-tools details{margin-top:12px;font-size:12px}.photo-tools summary{min-height:38px;cursor:pointer;display:flex;align-items:center}.photo-tools #photo-reset{display:inline-flex;gap:6px;align-items:center;font-size:12px;background:transparent;border:0;padding:8px 0;min-height:36px}.photo-actions{position:sticky;bottom:0;background:var(--paper);padding:10px 0 0}.photo-actions .photo-apply{box-shadow:none}.photo-stage{border:1px solid var(--line)}.photo-control input{min-height:36px}.photo-auto{margin-top:8px;padding:8px;font-size:12px}.photo-tool-row label[hidden]{display:none}@media(max-width:680px){.photo-tool-row{grid-template-columns:1fr 1fr}.photo-tool-row button{grid-column:auto}.photo-primary{grid-template-columns:1fr 1fr}.photo-sheet{padding:14px}.photo-heading h2{font-size:23px}.photo-actions button{padding:8px 12px}.photo-compare{grid-template-columns:1fr 1fr}.photo-stage{height:165px}.photo-compare figcaption{font-size:10px}}

.photo-result-stage canvas{width:100%;height:100%;object-fit:contain}.photo-heading h2{font-family:inherit;font-size:24px;line-height:1.2;font-weight:700;letter-spacing:-.02em}.photo-icon-button{display:flex;align-items:center;justify-content:center;border:0;background:transparent}
