.kahera-photo-editor{--pe-orange:#ea580c;--pe-ink:#332a25;--pe-muted:#73655b;border:1px solid #f2dfd1;border-radius:26px;padding:0;color:var(--pe-ink);background:#fffdfb;width:min(930px,calc(100vw - 28px));max-width:none;max-height:calc(100dvh - 28px);overflow:auto;box-shadow:0 6px 0 #dfcabc,0 28px 100px #23160c55;font-family:inherit;overscroll-behavior:contain;z-index:9999}.kahera-photo-editor::backdrop{background:#1d160ec9;backdrop-filter:blur(6px)}.kahera-photo-editor *{box-sizing:border-box}.kahera-photo-editor [hidden]{display:none!important}.kahera-photo-editor svg{height:20px;width:20px;flex-shrink:0}.pe-header{position:relative;padding:23px 26px 18px;border-bottom:1px solid #f0e4da}.pe-brand{display:flex;align-items:center;gap:9px;font-size:11px;font-weight:800;letter-spacing:.12em;color:#b64a0f}.pe-header h2{margin:12px 48px 7px 0;font-size:clamp(21px,3.6vw,29px);line-height:1.2;letter-spacing:-.025em}.pe-header p{margin:0;color:var(--pe-muted);font-size:13px;line-height:1.5}.pe-icon-button{position:absolute;right:16px;top:16px;padding:0!important;width:44px;height:44px}.pe-body{display:grid;grid-template-columns:minmax(0,1fr) 290px;align-items:start;gap:22px;padding:24px 26px}.pe-stage-wrap{min-width:0}.pe-stage{position:relative;aspect-ratio:1;overflow:hidden;border-radius:18px;border:1px solid #dbd4ce;background-color:#f9f9f9;background-image:linear-gradient(45deg,#dedede 25%,transparent 25%),linear-gradient(-45deg,#dedede 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#dedede 75%),linear-gradient(-45deg,transparent 75%,#dedede 75%);background-size:24px 24px;background-position:0 0,0 12px,12px -12px,-12px 0;box-shadow:inset 0 1px 5px #41322525}.pe-stage canvas{display:block;width:100%;height:100%;touch-action:none;cursor:grab;user-select:none}.pe-stage[data-mode=frame] canvas:active{cursor:grabbing}.pe-stage[data-mode=erase] canvas,.pe-stage[data-mode=restore] canvas{cursor:crosshair}.pe-stage.pe-white-preview{background:#fff}.pe-frame-guides{pointer-events:none;position:absolute;inset:0;background:linear-gradient(to right,transparent calc(33.333% - .5px),#ffffff80 calc(33.333% - .5px),#ffffff80 calc(33.333% + .5px),transparent calc(33.333% + .5px),transparent calc(66.666% - .5px),#ffffff80 calc(66.666% - .5px),#ffffff80 calc(66.666% + .5px),transparent calc(66.666% + .5px)),linear-gradient(to bottom,transparent calc(33.333% - .5px),#ffffff80 calc(33.333% - .5px),#ffffff80 calc(33.333% + .5px),transparent calc(33.333% + .5px),transparent calc(66.666% - .5px),#ffffff80 calc(66.666% - .5px),#ffffff80 calc(66.666% + .5px),transparent calc(66.666% + .5px))}.pe-brush-cursor{position:absolute;pointer-events:none;border:2px solid #fff;outline:1px solid #29231f;border-radius:50%;transform:translate(-50%,-50%);box-shadow:0 0 3px #0008}.pe-hint{font-size:12px;line-height:1.5;min-height:36px;margin:12px 2px 0;color:var(--pe-muted)}.pe-tools{display:flex;flex-direction:column;gap:17px}.kahera-photo-editor button{appearance:none;font-family:inherit;font-size:13px;font-weight:700;color:var(--pe-ink);background:linear-gradient(#fff,#fbf4ef);border:1px solid #e7d6c9;border-radius:12px;display:flex;align-items:center;justify-content:center;gap:7px;min-height:45px;padding:10px 12px;box-shadow:0 3px 0 #e8dcd3;cursor:pointer;transition:transform .15s,box-shadow .15s}.kahera-photo-editor button:active:not(:disabled){transform:translateY(2px);box-shadow:0 1px 0 #e8dcd3}.kahera-photo-editor button:disabled{opacity:.48;cursor:default}.kahera-photo-editor button:focus-visible,.kahera-photo-editor input:focus-visible{outline:3px solid #f99b53;outline-offset:3px}.pe-modes,.pe-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.pe-modes button{flex-direction:column;font-size:12px;min-height:67px;padding:10px 4px}.pe-modes button[aria-pressed=true]{background:linear-gradient(#fff4e6,#ffe7d2);border-color:#eda778;color:#b94b0b;box-shadow:0 3px 0 #e9bd9e}.pe-actions button{flex-direction:column;font-size:11px;padding:8px 4px;min-height:60px}.pe-range{margin:0!important;display:grid!important;grid-template-columns:1fr auto;gap:8px!important;font-size:12px;color:#54483f;font-weight:700}.pe-range output{color:#ad4107;font-variant-numeric:tabular-nums}.pe-range input[type=range]{grid-column:1/-1;width:100%;min-height:32px!important;padding:0!important;accent-color:var(--pe-orange);margin:0;cursor:pointer}.pe-cleanup{border:1px solid #f0ddce;background:#fff6ec;padding:15px;border-radius:16px;display:flex;flex-direction:column;gap:12px}.pe-cleanup h3{font-size:15px;margin:0}.pe-cleanup p{font-size:12px;color:#7b6554;line-height:1.5;margin:0}.pe-clean-button{font-size:12px!important;width:100%;background:#fff!important;color:#ae4309!important}.pe-white{display:flex!important;align-items:center;gap:10px!important;margin:0!important;font-size:12px!important;font-weight:600;line-height:1.5;cursor:pointer}.pe-white input{appearance:auto;width:20px!important;height:20px!important;min-height:20px!important;margin:0;accent-color:var(--pe-orange);flex-shrink:0}.pe-note{margin:0;font-size:11px;line-height:1.6;color:#7c6f65}.pe-footer{border-top:1px solid #f0e4da;padding:17px 26px 20px;background:#fffdfb;position:sticky;bottom:0;z-index:2}.pe-status{color:#6f6055;font-size:12px;line-height:1.5;margin:0 0 12px}.pe-footer>div{display:flex;justify-content:flex-end;gap:12px}.pe-footer button{min-width:120px;min-height:48px}.pe-save{background:linear-gradient(#f8791c,#e75709)!important;border-color:#d94c06!important;color:white!important;box-shadow:0 4px 0 #ad3d07!important}.pe-save:active:not(:disabled){box-shadow:0 1px 0 #ad3d07!important}.pe-cancel{background:white!important}@media(max-width:700px){.kahera-photo-editor{width:calc(100vw - 16px);max-height:calc(100dvh - 16px);border-radius:20px}.pe-header{padding:19px 18px 15px}.pe-body{grid-template-columns:1fr;gap:15px;padding:17px 18px}.pe-stage{max-width:380px;margin:auto;border-radius:15px}.pe-hint{text-align:center;min-height:0;margin-top:9px}.pe-tools{display:grid;grid-template-columns:1fr 1fr;gap:15px}.pe-modes{grid-column:1/-1}.pe-modes button{flex-direction:row;min-height:48px}.pe-range.pe-zoom,.pe-range.pe-brush{grid-column:1/-1}.pe-actions{grid-column:1/-1}.pe-actions button{flex-direction:row;min-height:44px}.pe-cleanup{grid-column:1/-1}.pe-white,.pe-note{grid-column:1/-1}.pe-footer{padding:13px 18px 17px}.pe-footer>div{display:grid;grid-template-columns:1fr 1fr;gap:10px}.pe-footer button{min-width:0}.pe-status{font-size:11px;margin-bottom:10px}}@media(prefers-reduced-motion:reduce){.kahera-photo-editor button{transition:none}}
