@font-face{font-family:Editor;src:local('Arial')}*{box-sizing:border-box} :root{font-family:Editor,Arial,sans-serif;color:#20231e;background:#f5f6f2;font-size:16px;--lime:#effb72;--line:#dedfd8;--muted:#66695f}body{margin:0}button,input{font:inherit}button,a,input{ -webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{cursor:default;opacity:.42}button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid #4e5fd6;outline-offset:5px}button{color:inherit}.topbar{max-width:1512px;margin:auto;display:flex;align-items:center;gap:24px;padding:26px 48px;border-bottom:1px solid var(--line)}.brand{font-size:2rem;letter-spacing:-2px;color:inherit;text-decoration:none;font-weight:900}.brand-dot{color:#687500}.header-note{margin-left:auto;font-size:.9rem;color:var(--muted)}.button{padding:14px 22px;border:1px solid #20231e;border-radius:10px;font-weight:700;min-height:48px;transition:background .15s,transform .15s}.button:active:not(:disabled){transform:translateY(1px)}.primary{background:var(--lime)}.primary:hover:not(:disabled){background:#e3f158}.secondary{background:transparent;border-color:#d1d3c8}.secondary:hover{background:#fff}main{max-width:1416px;margin:auto;padding:36px 48px 0}.intro{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin-bottom:30px}.eyebrow{font-size:.75rem;letter-spacing:.14em;font-weight:700;margin:0 0 12px}h1{font-size:clamp(2rem,3.1vw,3rem);letter-spacing:-.055em;line-height:1.08;margin:0}h1 span{color:#808476}.intro>p{color:var(--muted);line-height:1.65;margin:0 0 4px}.editor{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:22px;align-items:start}.workspace,.controls{background:#fff;border:1px solid var(--line);border-radius:16px;overflow:hidden}.workspace-bar{min-height:58px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 22px}.workspace-bar>span{font-size:.75rem;font-weight:700;letter-spacing:.1em}.text-button{background:none;border:0;text-decoration:underline;text-underline-offset:4px;font-size:.875rem;padding:8px 0}.stage{position:relative;background:#eef0e9;min-height:520px;display:flex;align-items:center;justify-content:center;overflow:hidden}.stage.dragging{outline:4px dashed #86972c;outline-offset:-10px;background:#f4f9d9}.stage.has-photo{min-height:0}.empty{display:flex;flex-direction:column;align-items:center;text-align:center;padding:48px 20px}.upload-symbol{width:70px;height:70px;display:grid;place-items:center;background:var(--lime);border:1px solid #d6e070;border-radius:22px;font-size:2.8rem;line-height:1;transform:rotate(-7deg);margin-bottom:24px}.empty h2{font-size:1.4rem;letter-spacing:-.04em;margin:0 0 8px}.empty p{font-size:1rem;line-height:1.6;color:var(--muted);margin:0 0 24px}.file-help{font-size:.75rem;color:var(--muted);margin-top:14px;line-height:1.5}.demo-button{margin-top:35px;display:flex;align-items:center;gap:12px;background:none;border:0;padding:6px;text-decoration:underline;text-underline-offset:4px;font-size:.875rem}.demo-button img{object-fit:cover;border-radius:50%;border:2px solid white}.workspace-footer{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:52px;padding:12px 20px;font-size:.875rem;color:var(--muted)}#status{line-height:1.5}#status.error{color:#a02535}.controls{padding:24px}.controls-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.controls h2{font-size:1.1rem;letter-spacing:-.03em;margin:0}.controls h3{font-size:1rem;margin:0}fieldset{border:0;padding:0;margin:0;min-width:0}fieldset:disabled{opacity:.48}.control-group{border-top:1px solid var(--line);margin-top:20px;padding-top:20px}.section-title{display:flex;align-items:center;gap:10px;margin-bottom:20px}.number{font-size:.75rem;background:#f0f1ea;border-radius:5px;padding:5px;font-weight:700}.range-label{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:.875rem;margin:18px 0 10px;line-height:1.4}.range-label output,.range-label>span:last-child:not(:first-child){color:var(--muted);font-size:.8rem;font-variant-numeric:tabular-nums}input[type=range]{display:block;width:100%;height:24px;appearance:none;background:transparent;margin:0;touch-action:pan-y;cursor:pointer}input[type=range]::-webkit-slider-runnable-track{height:5px;border-radius:8px;background:#e1e4d8}input[type=range]::-webkit-slider-thumb{appearance:none;height:20px;width:20px;border:3px solid white;border-radius:50%;background:#292e23;box-shadow:0 0 0 1px #292e23;margin-top:-7px}input[type=range]::-moz-range-track{height:5px;border-radius:8px;background:#e1e4d8}input[type=range]::-moz-range-thumb{height:14px;width:14px;border:3px solid white;border-radius:50%;background:#292e23;box-shadow:0 0 0 1px #292e23}.range-ends{display:flex;justify-content:space-between;color:var(--muted);font-size:.75rem;margin-top:4px}.colors{display:flex;gap:9px;flex-wrap:wrap;padding:4px 2px}.swatch{background:var(--swatch);width:35px;height:35px;border:3px solid #fff;box-shadow:0 0 0 1px #ddd;border-radius:50%;font-size:1.5rem;display:grid;place-items:center;padding:0}.swatch[aria-pressed=true]{box-shadow:0 0 0 2px #262b21}.original{background:#f1f2ed}.small-note{font-size:.75rem;line-height:1.5;color:var(--muted);margin:13px 0 22px}.download{width:100%;display:flex;justify-content:space-between;align-items:center}.download-note{font-size:.75rem;text-align:center;color:var(--muted);margin:10px 0 0}footer{display:flex;justify-content:space-between;gap:16px;padding:24px 0;color:var(--muted);font-size:.8rem;line-height:1.5}#result{width:100%;max-height:690px;object-fit:contain;display:block;background:#e7e9e0}#anchors{position:absolute;pointer-events:none}#anchors button{position:absolute;transform:translate(-50%,-50%);pointer-events:auto;border:2px solid #fff;background:#24291d;color:var(--lime);width:38px;height:38px;border-radius:50%;box-shadow:0 1px 8px #0008;touch-action:none;cursor:move}.manual-help{font-size:.875rem;line-height:1.5;padding:0 20px 16px;margin:0;color:var(--muted)}.busy{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:16px;background:#f5f6f2e8;padding:24px;text-align:center}.spinner{height:28px;width:28px;border:3px solid #d9dec7;border-top-color:#424a2f;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}[hidden]{display:none!important}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media(min-width:1250px){.stage{min-height:570px}}@media(max-width:950px){main{padding:28px 24px 0}.topbar{padding:20px 24px}.editor{grid-template-columns:minmax(0,1fr) 300px;gap:16px}.controls{padding:20px}.intro>p{font-size:.9rem}.stage{min-height:500px}}@media(max-width:720px){.header-note{display:none}.topbar{padding:16px 20px}.topbar>.button{margin-left:auto;font-size:.875rem;padding:10px 15px}.brand{font-size:1.8rem}main{padding:24px 16px 0}.intro{display:block;margin-bottom:24px}.intro>p{margin:14px 0 0;font-size:.9rem}.intro>p br{display:none}.editor{grid-template-columns:1fr}.stage{min-height:380px}.empty{padding:32px 18px}.empty h2{font-size:1.25rem}.controls{padding:22px}.control-group{padding-top:16px}.controls h2{font-size:1.2rem}.workspace-bar{padding:10px 16px}.workspace-footer{padding:12px 16px;align-items:start}.workspace-footer .text-button{min-width:110px}.range-label{font-size:1rem}.swatch{height:42px;width:42px}.small-note,.download-note{font-size:.8rem}footer{font-size:.75rem;flex-wrap:wrap;gap:6px}#result{max-height:65vh}}@media(prefers-reduced-motion:reduce){*{animation-duration:0s!important;transition:none!important}}

/* Once a photo is open, only the settings scroll; the complete image stays in view. */
.controls{padding:0;display:flex;flex-direction:column;min-height:0}
.controls-heading{padding:20px 24px;flex-shrink:0}
.settings-scroll{padding:0 24px;min-height:0;overflow-y:auto;overscroll-behavior-y:contain;scrollbar-gutter:stable;scroll-padding:16px}
.settings-scroll:focus-visible{outline:2px solid #4e5fd6;outline-offset:-3px}
.control-group:first-of-type{margin-top:0}
.save-actions{padding:16px 24px;border-top:1px solid var(--line);flex-shrink:0;background:#fff}
.download{justify-content:center}
body.editing{height:100vh;height:100dvh;overflow:hidden;display:flex;flex-direction:column}
.editing .topbar{width:100%;padding-top:14px;padding-bottom:14px;flex-shrink:0}
.editing main{width:100%;min-height:0;flex:1;margin:0 auto;padding-top:16px;padding-bottom:16px;display:flex;flex-direction:column}
.editing .intro,.editing main>footer{display:none}
.editing .editor{flex:1;min-height:0;align-items:stretch;grid-template-rows:minmax(0,1fr)}
.editing .workspace{display:grid;grid-template-rows:auto minmax(0,1fr) auto auto;min-height:0;min-width:0}
.editing .stage{min-height:0;width:100%;height:100%}
.editing #result{position:absolute;inset:0;width:100%;height:100%;max-height:none;object-fit:contain;background:#eef0e9}
.editing .controls{min-width:0;min-height:0}
.editing .settings-scroll{flex:1}
.editing .workspace-footer{min-height:44px;max-height:90px;padding:8px 16px;align-items:center}
.editing #status{max-height:4.5em;overflow:auto}
.editing #manual{flex-shrink:0}
.editing .manual-help{max-height:5em;overflow:auto;padding-bottom:8px;font-size:.8rem}
@media(max-width:720px){
  .editing .topbar{padding:8px 16px}
  .editing main{padding:8px}
  .editing .editor{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1.1fr) minmax(0,1fr);gap:8px}
  .editing .workspace-bar{min-height:40px;padding:4px 12px}
  .editing .workspace-footer{padding:4px 12px;min-height:36px;max-height:60px;gap:8px}
  .editing .workspace-footer #status{font-size:.75rem;line-height:1.35;max-height:2.7em}
  .editing .workspace-footer #manual{font-size:.75rem;min-width:0}
  .editing .controls-heading{padding:8px 16px}
  .editing .controls h2{font-size:1rem}
  .editing .settings-scroll{padding:0 16px}
  .editing .save-actions{padding:8px 16px}
  .editing .save-actions .button{min-height:44px;padding:10px}
  .editing .download-note{margin:5px 0 0}
  .editing .manual-help{font-size:.75rem;max-height:3.5em}
}
@media(max-height:500px) and (min-width:600px){
  .editing .editor{grid-template-columns:minmax(0,1fr) minmax(270px,.8fr);grid-template-rows:minmax(0,1fr)}
  .editing .topbar{padding-top:4px;padding-bottom:4px}
  .editing .workspace-footer{max-height:55px}
}
.header-actions{display:flex;align-items:center;gap:10px}
.save-actions{display:grid;gap:8px}
.save-actions .download-note{margin:0;text-align:center}
.save-actions .button{width:100%;font-size:.875rem}
#saved-dialog{width:min(720px,calc(100% - 24px));max-height:calc(100dvh - 32px);padding:24px;border:1px solid var(--line);border-radius:16px;color:inherit;background:#fff;overflow:auto}
#saved-dialog::backdrop{background:#161b16aa}
.dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:16px}
.dialog-heading h2{margin:0;font-size:1.25rem}
.storage-note,#saved-status{color:var(--muted);font-size:.875rem;line-height:1.6}
.saved-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:16px}
.saved-card{border:1px solid var(--line);border-radius:10px;padding:10px;display:flex;flex-direction:column;align-items:center;gap:6px}
.saved-open{border:0;background:none;padding:0;width:100%;text-align:left;display:grid;gap:10px;font-size:.875rem;line-height:1.5}
.saved-open img{width:100%;height:180px;object-fit:contain;background:#eef0e9;border-radius:5px}
@media(max-width:720px){
 .header-actions{margin-left:auto;gap:6px}
 .header-actions .button{font-size:.8rem;min-height:40px;padding:8px 10px}
 .editing .save-actions{grid-template-columns:1fr 1fr;gap:6px;padding:8px 12px}
 .editing .save-actions .button{font-size:.8rem;padding:8px;line-height:1.3}
 .editing .save-actions .download-note{grid-column:1/-1;font-size:.75rem}
 #saved-dialog{padding:16px}
}
