.photo-editor{position:fixed;inset:0;z-index:100500;background:#fffaf6;display:grid;place-items:center;color:#604d40;-webkit-user-select:none;user-select:none;overscroll-behavior:none}
.pe-shell{width:min(100%,540px);height:100%;height:100dvh;max-height:100%;display:flex;flex-direction:column;overflow:hidden;background:#fffaf6;padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px);box-sizing:border-box}
.pe-header{display:grid;grid-template-columns:64px minmax(0,1fr) 64px;align-items:center;gap:8px;padding:12px 14px;flex-shrink:0}
.pe-header h2{margin:0;font-size:16px;color:#604d40;line-height:1.5}.pe-header>div{text-align:center}.pe-header small{font-size:10px;color:#ac9684}.photo-editor button{font:inherit;cursor:pointer;min-height:42px;border:0;border-radius:13px;background:transparent;color:#917b69;font-size:13px;padding:8px 10px;font-weight:650}.pe-header .pe-done{background:#d98570;color:#fff}.pe-done:disabled{opacity:.6}
.pe-stage{flex:1 1 0;min-height:110px;position:relative;overflow:hidden;background:#22201e;margin:0 10px;border-radius:18px;isolation:isolate}.pe-stage canvas{display:block;touch-action:none;cursor:grab}.pe-stage canvas:active{cursor:grabbing}.pe-gesture{position:absolute;bottom:10px;left:50%;transform:translateX(-50%);background:#13110f99;border:1px solid #ffffff20;color:#fffcf2;font-size:10px;padding:6px 12px;border-radius:20px;pointer-events:none;white-space:nowrap}
.pe-tools{flex-shrink:0;padding:12px 14px 10px}.pe-ratios{display:flex;gap:6px;align-items:center;justify-content:center;margin:0 0 8px}.pe-ratios button{flex:1;font-size:12px;background:#f4ebe3;color:#9e8774;min-width:0;padding:8px 5px}.pe-ratios button[aria-pressed=true]{background:#e9c8b7;color:#714c38}
.pe-actions{display:flex;justify-content:space-between;gap:6px}.pe-actions button{flex:1;background:#fffdfb;border:1px solid #eee0d5;white-space:nowrap;font-size:12px}.pe-actions span{font-size:19px;vertical-align:-1px;margin-right:4px}.pe-actions button[aria-expanded=true]{color:#ad674d;background:#fff0e5}
.pe-zoom,.pe-angle{display:flex;align-items:center;gap:10px;margin:10px 0 0;font-size:11px;color:#a48d7a}.pe-zoom>span{min-width:32px}.pe-angle>span{white-space:nowrap}.pe-tools input[type=range]{min-width:0;flex:1;accent-color:#ca8c70;height:28px;padding:0}.pe-tools output{min-width:38px;text-align:right;font-size:11px}.pe-angle[hidden]{display:none}.pe-error{font-size:12px;color:#c15b49;margin:0;text-align:center}.pe-error:not(:empty){padding:7px 0}
@media(max-height:540px){.pe-header{padding:5px 12px}.pe-header small{display:none}.pe-tools{padding:6px 12px}.pe-zoom{margin-top:2px}.pe-ratios{margin-bottom:3px}.pe-tools button{min-height:34px;padding:4px}.pe-actions span{font-size:16px}.pe-gesture{display:none}}
@media(prefers-reduced-motion:reduce){.photo-editor *{scroll-behavior:auto}}
