:root{--bg:#f6f4ef;--surface:#fffdf9;--line:#ded8cf;--text:#2e3437;--muted:#747d82;--green:#4f9278;--dark:#39745e;--soft:#e9f2ed;--accent:#0bc9b5}*{box-sizing:border-box}[hidden]{display:none!important}body{margin:0;background:var(--bg);color:var(--text);font:14px/1.5 Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}button,input,select,textarea{font:inherit}button,a,input,select,textarea{touch-action:manipulation}button{min-height:40px;padding:8px 12px;border:1px solid var(--line);border-radius:9px;background:var(--surface);color:var(--text);cursor:pointer;font-weight:650;font-size:12px}button:hover:not(:disabled){border-color:var(--green);background:var(--soft)}button:disabled{opacity:.4;cursor:default}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #0bc9b580;outline-offset:2px}.primary{background:var(--green);border-color:var(--green);color:#fff}.primary:hover:not(:disabled){background:var(--dark);color:#fff}.danger{color:#b64c39}.sitebar{padding:14px max(24px,calc((100vw - 1480px)/2));display:flex;align-items:center;gap:22px;border-bottom:1px solid var(--line)}.brand{display:flex;align-items:center;text-decoration:none;font-size:23px;letter-spacing:-1px;font-weight:850;color:#0a2943}.brand>b{display:grid;place-items:center;width:34px;height:34px;margin-right:10px;background:var(--accent);color:#fff;border-radius:10px;font-size:21px}.brand>span{color:var(--accent)}.product-label{font-size:10px;color:var(--muted);letter-spacing:2px;border-left:1px solid var(--line);padding-left:22px}.back{margin-left:auto;color:var(--dark);text-decoration:none;font-size:12px;font-weight:700}main{max-width:1528px;margin:auto;padding:26px 24px}.intro{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px}.eyebrow{font-size:10px;letter-spacing:1.8px;font-weight:850;color:var(--dark)}h1{font-size:32px;letter-spacing:-1.2px;margin:4px 0}p{margin:5px 0;color:var(--muted)}.intro p{font-size:13px}.local-badge{font-size:11px;padding:8px 12px;border-radius:20px;background:var(--soft);color:var(--dark)}.studio{border:1px solid var(--line);border-radius:19px;background:var(--surface);box-shadow:0 14px 45px #2d39300b;overflow:hidden}.topbar{display:flex;align-items:center;gap:8px;padding:12px;border-bottom:1px solid var(--line);flex-wrap:wrap}.file-actions{display:flex;gap:6px}.topbar input{flex:1;min-width:95px;width:140px;max-width:230px;border:0;background:transparent;font-size:12px;padding:6px;color:var(--muted)}.history{display:flex;gap:3px;margin-left:auto}.history button{min-width:36px;font-size:21px;line-height:1;padding:5px}.workspace{display:grid;grid-template-columns:80px minmax(0,1fr) 300px;min-height:630px}.tools{padding:10px 6px;display:flex;flex-direction:column;gap:4px;border-right:1px solid var(--line);background:#fbfaf7}.tool{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:3px;min-height:57px;padding:6px 2px;border:0;background:transparent;font-size:10px;color:#67716d;flex-shrink:0}.tool .ico{font-size:20px;line-height:1.2;font-weight:550}.tool.active{color:var(--dark);background:var(--soft)}.center{display:flex;flex-direction:column;min-width:0;background:#f0eee9}.canvas-header{display:flex;justify-content:space-between;padding:12px 15px;font-size:10px;color:#778079}.viewport{position:relative;flex:1;min-height:400px;overflow:hidden;touch-action:none;outline:none}.viewport:focus-visible{outline:2px solid var(--green);outline-offset:-2px}#canvas-wrap{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);background-color:#fff;background-image:linear-gradient(45deg,#e6e8e5 25%,transparent 25%),linear-gradient(-45deg,#e6e8e5 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#e6e8e5 75%),linear-gradient(-45deg,transparent 75%,#e6e8e5 75%);background-size:20px 20px;background-position:0 0,0 10px,10px -10px,-10px 0;box-shadow:0 7px 35px #1b302826}#scene{display:block;width:100%;height:100%}#overlay{position:absolute;left:0;top:0;width:100%;height:100%;touch-action:none}.canvas-footer{display:flex;align-items:center;justify-content:space-between;gap:7px;padding:9px 12px;min-height:54px;font-size:10px;color:var(--muted)}.canvas-footer>div{display:flex;gap:4px}.canvas-footer button{min-height:32px;padding:5px 8px;font-size:11px}.canvas-footer #save-state{max-width:145px}.quick{display:flex;align-items:center;justify-content:center;gap:5px;padding:8px;flex-wrap:wrap;background:var(--surface);border-top:1px solid var(--line);z-index:3}.quick>span{max-width:120px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:11px;margin-right:8px}.quick button{min-height:32px;font-size:10px;padding:5px 9px}.inspector{border-left:1px solid var(--line);padding:19px;overflow-y:auto;max-height:760px;min-width:0}.panel-head{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:18px}.panel-head h2{margin:3px 0 0;font-size:20px;letter-spacing:-.6px}.panel-head .ico{display:grid;place-items:center;background:var(--soft);color:var(--dark);border-radius:10px;width:36px;height:36px;font-size:21px}.hint{font-size:11px;color:var(--muted);margin:9px 0 13px;line-height:1.6}.section-label{font-size:10px;font-weight:850;letter-spacing:1px;text-transform:uppercase;color:var(--dark);margin:20px 0 9px}.field{display:block;font-size:11px;font-weight:700;color:#64716b;margin-bottom:12px}.field input:not([type=range]):not([type=checkbox]),.field select,.field textarea{display:block;width:100%;margin-top:5px;border:1px solid var(--line);border-radius:8px;padding:8px;background:#fff;color:var(--text);min-height:39px;font-size:12px}.field input[type=color]{height:40px;padding:3px!important}.field input[type=range]{display:block;width:100%;margin:12px 0;accent-color:var(--green)}.field .value{float:right;font-weight:500}.field textarea{min-height:78px;resize:vertical}.check{display:flex;align-items:center;gap:7px;font-size:11px;color:#61716a;margin:9px 0 12px}.check input{accent-color:var(--green);width:16px;height:16px}.row{display:flex;gap:7px;margin:8px 0}.row>*{flex:1;min-width:0}.row .field{margin-bottom:0}.wide{width:100%;margin:6px 0}.grid2,.grid3{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin:8px 0}.grid3{grid-template-columns:repeat(3,minmax(0,1fr))}.chip.active,.filter-card.active{background:var(--soft);border-color:var(--green);color:var(--dark)}.filter-card{min-height:74px;text-align:left;padding:8px;display:flex;flex-direction:column;gap:7px;font-size:10px}.filter-card .preview{height:34px;width:100%;border-radius:6px;background:linear-gradient(155deg,#c0d8cf 40%,#507e6b 40%,#507e6b 65%,#31594f 65%)}.shape-card{min-height:66px;font-size:20px}.shape-card small{display:block;font-size:10px;font-weight:500}.layer-list{display:flex;flex-direction:column;gap:6px}.layer{display:flex;align-items:center;gap:4px;border:1px solid var(--line);border-radius:10px;padding:5px;background:white}.layer.selected{border-color:var(--green);background:var(--soft)}.layer>.pick{border:0;background:transparent;flex:1;min-width:0;text-align:left;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:11px}.layer>.tiny{padding:4px;min-width:32px;min-height:34px;border:0;background:transparent;font-size:12px}.template{text-align:left;padding:12px}.template b{display:block;font-size:12px}.template small{font-weight:400;color:var(--muted);font-size:10px}.palette{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0}.palette button{width:27px;height:27px;min-height:27px;border-radius:50%;padding:0;background:var(--swatch);border:2px solid #d8d9d2}.ai-card{background:linear-gradient(135deg,#e9f2ed,#f9f6ef);border:1px solid #cee0d5;border-radius:13px;padding:13px;margin:14px 0}.ai-card h3{font-size:14px;margin:0 0 5px}.ai-card p{font-size:11px}.notice,.busybar{display:flex;align-items:center;gap:9px;padding:10px 14px;margin-bottom:12px;border:1px solid #bed5c6;border-radius:12px;background:var(--soft);font-size:12px}.notice>span,.busybar>span{flex:1}.bottom-note{display:flex;justify-content:space-between;gap:12px;margin-top:13px;color:var(--muted);font-size:10px}.bottom-note #status{color:var(--dark);font-size:12px;max-width:65%}#status.error{color:#b34c3d}.bottom-note>span:last-child{max-width:260px;text-align:right}footer{display:flex;justify-content:space-between;border-top:1px solid var(--line);padding:20px 24px;color:var(--muted);font-size:11px}#drop-hint{position:absolute;inset:12px;display:grid;place-items:center;border:2px dashed var(--green);border-radius:16px;background:#e9f2edf0;color:var(--dark);font-size:22px;pointer-events:none}kbd{font-family:inherit;border:1px solid var(--line);padding:1px 4px;border-radius:4px}summary{cursor:pointer;font-size:11px;font-weight:700;color:var(--dark)}details{margin-top:16px}.tool-note{padding:12px;border:1px solid var(--line);border-radius:10px;font-size:11px;color:var(--muted)}
@media(max-width:1100px){.workspace{grid-template-columns:70px minmax(0,1fr)}.inspector{grid-column:1/-1;border-top:1px solid var(--line);border-left:0;max-height:unset}.inspector>.panel-body{max-width:700px;margin:auto}.viewport{height:52vh;min-height:340px;flex:none}.center{min-height:510px}.tools{max-height:630px;overflow:auto}.topbar .save-label{font-size:10px}.topbar input{max-width:150px}.canvas-footer #save-state{max-width:160px}}
@media(max-width:640px){.sitebar{padding:12px 16px}.brand{font-size:21px}.product-label{display:none}main{padding:18px 0}.intro{padding:0 16px;margin-bottom:16px}.intro h1{font-size:26px}.intro p{font-size:11px}.local-badge{display:none}.eyebrow{font-size:9px}.studio{border-radius:0;border-left:0;border-right:0}.topbar{gap:6px;padding:9px}.topbar .file-actions{width:100%;display:grid;grid-template-columns:.65fr 1.4fr 1.2fr 1fr;gap:5px}.topbar button{padding:7px 8px;font-size:10px;min-height:36px}.topbar input{min-width:65px;width:90px;flex:1;max-width:none;font-size:11px}.topbar .history{margin-left:0}.topbar .history button{font-size:20px;min-width:30px}.topbar .save-label{display:none}.workspace{display:flex;flex-direction:column;min-height:0}.tools{order:0;flex-direction:row;border-right:0;border-bottom:1px solid var(--line);padding:5px 7px;overflow-x:auto;gap:3px;position:sticky;top:0;z-index:10;background:#fffdf9;scrollbar-width:thin}.tool{width:62px;min-height:51px;font-size:9px}.tool .ico{font-size:19px}.center{order:1;min-height:0}.canvas-header{padding:8px 12px}.viewport{height:40vh;min-height:240px;max-height:470px}.inspector{order:2;padding:18px 16px 24px}.panel-head{margin-bottom:14px}.panel-head h2{font-size:19px}.canvas-footer{padding:7px 9px;flex-wrap:wrap}.canvas-footer #save-state{display:none}.quick>span{max-width:70px;margin-right:0}.quick button{font-size:10px;padding:5px 7px}.bottom-note{padding:0 14px;display:block}.bottom-note #status{max-width:100%;display:block}.bottom-note>span:last-child{display:block;text-align:left;max-width:none;margin-top:6px}.notice,.busybar{margin:0 10px 10px;flex-wrap:wrap}.notice>span{width:100%;flex:auto}.row button{min-height:44px}.field input[type=range]{height:20px}footer{padding-bottom:calc(20px + env(safe-area-inset-bottom))}}
fieldset{border:0;padding:0;margin:0;min-width:0}fieldset:disabled{opacity:.5}.notice button{min-height:36px}.busybar{position:sticky;top:0;z-index:20}.studio[aria-busy=true]{opacity:.7;pointer-events:none}

/* Recovery and crop controls remain visible at every size. */
#save-state.error{color:#a33c28;font-weight:700}
@media(max-width:640px){.canvas-footer #save-state{display:block;flex:1 1 100%;max-width:none;font-size:11px}.inspector [data-crop-mode]{min-height:44px}}

/* Photo packet 2: scoped to the photo editor; thumbnail layout unchanged. */

.photo-editor .sitebar{padding-top:8px;padding-bottom:8px}
.photo-editor .sitebar .brand{display:block;width:180px;height:40px;font-size:0;background:url('/assets/snipycut-logo.svg') left center/contain no-repeat}
.photo-editor .intro{margin-bottom:12px}
.photo-editor .intro h1{font-size:25px;margin:0}
.photo-editor .intro p{font-size:12px}
.photo-editor .intro .eyebrow{display:none}
.photo-editor main{padding-top:14px}
.photo-editor button{min-height:44px}
.photo-editor .canvas-footer button,.photo-editor .quick button,.photo-editor .layer>.tiny,.photo-editor .history button,.photo-editor .notice button{min-width:44px;min-height:44px}
.photo-editor .palette button{width:44px;height:44px;min-height:44px}
.photo-editor .field input:not([type=range]):not([type=checkbox]),.photo-editor .field select,.photo-editor .field textarea{min-height:44px;font-size:14px}
.photo-editor .field input[type=range]{min-height:32px}
.photo-editor .check{min-height:44px}
.photo-editor .check input{width:20px;height:20px}
.photo-editor .workspace{min-height:min(720px,calc(100dvh - 180px))}
.photo-editor .viewport{min-height:350px}
.photo-editor .panel-actions{display:flex;gap:4px}
.photo-editor .panel-actions button{padding:0;min-width:36px;min-height:36px}
.photo-editor .panel-actions [aria-pressed=true]{background:var(--soft);color:var(--dark)}
.photo-editor .sheet-grip{display:none}
.photo-editor .is-panel-hidden .workspace{grid-template-columns:80px minmax(0,1fr)}
.photo-editor .is-panel-hidden #inspector{display:none}
@media(min-width:1101px){
.photo-editor .workspace{grid-template-columns:76px minmax(0,1fr) 286px}
.photo-editor .inspector{max-height:calc(100dvh - 195px);padding:16px}
.photo-editor .viewport{height:calc(100dvh - 300px);max-height:850px}
.photo-editor .tools{max-height:calc(100dvh - 195px);overflow-y:auto}
.photo-editor .tool{min-height:50px}
.photo-editor .topbar{gap:6px;padding:8px}
.photo-editor .topbar .save-label{font-size:11px}
.photo-editor .is-panel-hidden .workspace{grid-template-columns:76px minmax(0,1fr)}}
@media(min-width:641px) and (max-width:1100px){
.photo-editor .workspace{grid-template-columns:70px minmax(0,1fr)}
.photo-editor .is-panel-hidden .workspace{grid-template-columns:70px minmax(0,1fr)}
.photo-editor .viewport{height:55dvh}
.photo-editor .inspector{max-height:38dvh}
.photo-editor .center{min-height:0}}
@media(max-width:640px){
.photo-editor .sitebar{gap:10px;padding:7px 12px}
.photo-editor .sitebar .brand{width:135px;height:33px}
.photo-editor .back{font-size:11px;min-height:44px;display:flex;align-items:center}
.photo-editor .intro{padding:0 12px;margin-bottom:8px}
.photo-editor .intro h1{font-size:20px}
.photo-editor .intro p{display:none}
.photo-editor main{padding:8px 0}
.photo-editor .topbar{padding:7px;gap:4px}
.photo-editor .topbar button{min-height:44px;font-size:11px}
.photo-editor .topbar .history button{min-width:38px}
.photo-editor .topbar input{min-height:44px;max-width:120px}
.photo-editor .topbar .file-actions{grid-template-columns:.7fr 1.4fr 1.2fr 1fr}
.photo-editor .workspace,.photo-editor .is-panel-hidden .workspace{display:flex;min-height:0}
.photo-editor .tools{position:relative;top:auto}
.photo-editor .tool{min-height:52px;width:62px}
.photo-editor .viewport{height:calc(100dvh - 290px);min-height:240px;max-height:700px}
.photo-editor .canvas-header{padding:6px 10px}
.photo-editor .canvas-footer{padding:4px 7px}
.photo-editor .quick{padding:4px;gap:3px}
.photo-editor .quick button{min-width:44px;min-height:44px}
.photo-editor .quick>span{display:none}
.photo-editor .inspector{position:fixed;left:0;right:0;bottom:0;z-index:50;height:var(--sheet-height,38dvh);min-height:120px;max-height:65dvh;overflow-y:auto;overscroll-behavior:contain;background:var(--surface);border:1px solid var(--line);border-radius:18px 18px 0 0;box-shadow:0 -8px 35px #20322c22;padding:0 16px calc(12px + env(safe-area-inset-bottom))}
.photo-editor .inspector .panel-head{position:sticky;top:0;background:var(--surface);padding:5px 0;z-index:2;align-items:center}
.photo-editor .panel-head h2{font-size:17px}
.photo-editor .panel-actions button{min-width:44px;min-height:44px}
.photo-editor .panel-actions [data-act=pin-panel]{display:none}
.photo-editor .sheet-grip{display:block;height:22px;position:relative;touch-action:none;cursor:ns-resize}
.photo-editor .sheet-grip:before{content:"";position:absolute;left:calc(50% - 20px);top:8px;width:40px;height:4px;border-radius:4px;background:#9ca9a2}
.photo-editor .mobile-panel-open{padding-bottom:var(--sheet-height,38dvh)}
.photo-editor .is-panel-hidden.mobile-panel-open{padding-bottom:0}
.photo-editor .field input:not([type=range]):not([type=checkbox]),.photo-editor .field select,.photo-editor .field textarea{font-size:16px}
.photo-editor .bottom-note{padding:0 12px}
.photo-editor .canvas-footer #save-state{font-size:10px}
}
@media(prefers-reduced-motion:reduce){
.photo-editor *{scroll-behavior:auto!important;transition:none!important}}

.photo-editor .layer .pick{display:flex;align-items:center;gap:6px;min-height:44px}.photo-editor .layer-thumb{width:38px;height:32px;object-fit:contain;flex:none;background:#eceeea;border-radius:4px}.photo-editor .layer .tiny{min-width:34px}.photo-editor .layer{padding:3px;gap:2px}.photo-editor .layer[draggable=true]{cursor:grab}
@media(max-width:640px){.photo-editor .layer .tiny{min-width:44px}}

.photo-editor .field .range-number{float:right;width:70px!important;min-height:34px!important;margin-top:-7px!important;padding:4px 7px!important}.photo-editor .field input[type=range]{clear:both}.photo-editor .filter-card .preview{object-fit:cover;height:54px;background:none}.photo-editor .template img{display:block;width:100%;height:90px;object-fit:contain;border-radius:6px;margin-bottom:6px}.photo-editor .export-preview{display:block;max-width:100%;max-height:180px;object-fit:contain;background:repeating-conic-gradient(#e1e5df 0 25%,#fff 0 50%) 0/16px 16px;border-radius:8px;margin:12px auto}

.photo-editor #photo-language{min-width:44px;min-height:44px;padding:6px;margin-left:8px}.photo-editor .photo-progress{flex:0 0 70px;width:70px;height:5px;border-radius:5px;background:linear-gradient(90deg,#bfdbcc,var(--green),#bfdbcc);background-size:200% 100%;animation:photo-progress 1.5s linear infinite}.photo-editor .busybar{position:fixed;top:8px;left:50%;transform:translateX(-50%);z-index:100;max-width:calc(100vw - 24px);width:550px;box-shadow:0 8px 30px #20322c22}.photo-editor .hint,.photo-editor .field,.photo-editor .check{color:#4f6058}.photo-editor .canvas-header{color:#526059}.photo-editor .tool{color:#4f6058}.photo-editor .range-number{color:#2e3437!important}.photo-editor .sheet-grip:focus-visible{outline:3px solid #39745e;outline-offset:-3px}.photo-editor .bottom-note>span:last-child{color:#526059}
@keyframes photo-progress{to{background-position:-200% 0}}
@media(prefers-reduced-motion:reduce){.photo-editor .photo-progress{animation:none}}

/* An explicit, discoverable inspector pin on desktop, tablet and phone. */
.photo-editor .panel-actions{flex-shrink:0;align-items:center}
.photo-editor .panel-head>div:first-child{min-width:0}
.photo-editor .panel-actions .panel-pin{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-width:44px;min-height:44px;padding:0 8px;font-size:11px}
.photo-editor .panel-pin svg{flex:0 0 18px;transition:transform .15s}
.photo-editor .panel-pin[aria-pressed=true]{background:#39745e;color:#fff;border-color:#39745e}
.photo-editor .panel-pin[aria-pressed=false] svg{transform:rotate(35deg)}
.photo-editor .panel-head .eyebrow{letter-spacing:1px}
@media(max-width:640px){.photo-editor .panel-actions [data-act=pin-panel]{display:inline-flex}}
@media(prefers-reduced-motion:reduce){.photo-editor .panel-pin svg{transition:none}}

/* Keep contextual actions in the persistent view bar so selection never resizes the preview. */
.photo-editor .canvas-footer{display:flex;flex-wrap:nowrap;justify-content:flex-start;gap:10px;height:62px;min-height:62px;flex:0 0 62px;overflow-x:auto;overflow-y:hidden;border-top:1px solid var(--line);padding:8px 12px}
.photo-editor .canvas-footer>button,.photo-editor .canvas-footer>.view-controls{flex-shrink:0}
.photo-editor .canvas-footer>.view-controls{display:flex;align-items:center;gap:4px}
.photo-editor .canvas-footer>.quick{display:flex;flex:1 0 280px;align-items:center;justify-content:flex-end;flex-wrap:nowrap;gap:5px;min-width:280px;height:44px;padding:0;border:0;background:transparent}
.photo-editor .canvas-footer>.quick[hidden]{display:flex!important;visibility:hidden;pointer-events:none}
.photo-editor .canvas-footer .quick>span{display:block;min-width:0;max-width:120px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.photo-editor .canvas-footer .quick button{flex-shrink:0;white-space:nowrap}
.photo-editor .canvas-footer #save-state{position:absolute!important;width:1px;height:1px;min-width:0;max-width:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
@media(max-width:900px){.photo-editor .canvas-footer .quick>span{display:none}.photo-editor .canvas-footer{gap:7px;padding:8px}.photo-editor .canvas-footer>.quick{flex-basis:250px;min-width:250px}}
