.photo-editor{box-sizing:border-box;width:min(780px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto;padding:20px;border:1px solid var(--line,#666);border-radius:14px;background:var(--panel,#fff);color:var(--text,#222);box-shadow:0 20px 80px #0006}.photo-editor::backdrop{background:#0009}.photo-editor header,.photo-editor footer,.photo-editor-controls{display:flex;gap:12px;align-items:center;justify-content:space-between;flex-wrap:wrap}.photo-editor header h2{margin:0;font-size:1.3rem}.photo-editor p{line-height:1.5}.photo-editor canvas{display:block;max-width:100%;margin:12px auto;touch-action:none;cursor:move;outline-offset:3px}.photo-editor button{min-height:44px;padding:9px 16px;border:1px solid var(--line,#aaa);border-radius:7px;background:var(--panel,#fff);color:inherit;cursor:pointer}.photo-editor button:active{filter:brightness(.9)}.photo-editor-fields{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.photo-editor label{display:flex;flex-direction:column;gap:6px}.photo-editor input{max-width:100%;box-sizing:border-box;min-height:38px}.photo-editor input[type=range]{width:180px}.photo-editor details{margin:12px 0}.photo-editor footer{justify-content:flex-end}.photo-upload-preview{margin:10px 0;display:flex;gap:10px;align-items:center;flex-wrap:wrap}.photo-upload-preview[hidden]{display:none}.photo-upload-preview img{width:90px;height:70px;object-fit:contain;border:1px solid var(--line,#aaa)}.photo-upload-preview button{padding:10px;min-height:44px}.photo-upload-preview small{flex-basis:100%;overflow-wrap:anywhere}@media(max-width:500px){.photo-editor{padding:14px}.photo-editor-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.photo-editor-controls{justify-content:flex-start}.photo-editor footer button{flex:1}.photo-editor-controls label{width:100%}.photo-editor input[type=range]{width:100%}}
.photo-editor{background:var(--surface,#fff);color:var(--text,#222)}
.photo-editor button,.photo-upload-preview button{background:var(--surface,#fff);color:var(--text,#222);border:1px solid var(--line,#aaa)}
.photo-editor button[data-apply]{background:#146bc2;color:#fff;border-color:#146bc2}
.photo-editor button:hover,.photo-upload-preview button:hover{background:var(--canvas,#eee);color:var(--text,#222)}
.photo-editor button[data-apply]:hover{background:#10589f;color:#fff}
.photo-upload-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:8px 0}.photo-upload-actions small{flex-basis:100%}.photo-upload-items{display:grid;gap:8px;min-width:0}.photo-upload-items .photo-upload-preview{margin:0;padding:8px;border:1px solid var(--line,#aaa);border-radius:10px}.photo-upload-actions input[data-camera-picker][hidden]{display:none!important}
