#photo-straightener{width:min(1080px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:hidden;border:1px solid #cbd8cc;border-radius:14px;padding:24px;color:#18342c;background:#fff}
#photo-straightener[open]{display:flex;flex-direction:column}.photo-body{min-height:0;overflow:auto;padding-right:4px}.photo-heading,.photo-actions{flex-shrink:0}
#photo-straightener::backdrop{background:#102c24b8}
.photo-heading{display:flex;align-items:center;justify-content:space-between;gap:16px}.photo-heading h2{margin:0;font-size:24px}.photo-heading button{font-size:22px;min-width:44px}
#photo-instructions{font-size:16px;max-width:65ch}.photo-columns{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:24px}.photo-columns section{min-width:0}.photo-columns h3{font-size:17px;margin:6px 0 12px}
.photo-source{position:relative;line-height:0;background:#e5ebe6;margin:24px 20px;width:fit-content;max-width:calc(100% - 40px);user-select:none;-webkit-user-select:none}.photo-source img{display:block;width:auto;height:auto;max-width:100%;max-height:52vh;object-fit:contain}
#photo-corners{position:absolute;inset:0;width:100%;height:100%;overflow:visible;touch-action:none}#photo-corners polygon{fill:#173c3230;stroke:#fff;stroke-width:2;vector-effect:non-scaling-stroke;pointer-events:none}#photo-corners [data-corner]{cursor:grab;outline:none}#photo-corners circle{fill:#1d503b;stroke:#fff;stroke-width:3;vector-effect:non-scaling-stroke}#photo-corners text{fill:#fff;font-weight:750;pointer-events:none}#photo-corners [data-corner]:focus circle{fill:#135b91;stroke:#ffd65c;stroke-width:4}
.photo-proportions{display:grid;gap:6px;font-size:15px;font-weight:650}.photo-proportions select{width:100%;padding:10px;border:1px solid #bdcdbf;border-radius:7px;background:#fff;color:#18342c;font:inherit;font-weight:400}.photo-hint{font-size:13px;color:#536b5c;line-height:1.5}#photo-result{display:flex;align-items:center;justify-content:center;min-height:120px;background:#edf1ed;border:1px solid #dce3dc;border-radius:8px;padding:12px}#photo-result canvas{display:block;max-width:100%;max-height:43vh;width:auto;height:auto;object-fit:contain;box-shadow:0 2px 10px #173c3220}.photo-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:10px;padding:16px 0 0}.photo-actions .button{font-size:15px;min-height:44px}.photo-actions #photo-reset{margin-right:auto}
@media(max-width:650px){#photo-straightener{padding:16px}.photo-columns{grid-template-columns:1fr;gap:12px}.photo-heading h2{font-size:21px}.photo-source img{max-height:38vh}#photo-result canvas{max-height:30vh}.photo-actions .button{flex:1}.photo-actions #photo-reset{flex-basis:100%;margin:0}}
