:root{--page:#fbf9f5;--ink:#202b3a;--muted:#727782;--line:#e9e3da;--surface:#fffefa;--accent:#b47a4f;--dark:#243242;--soft:#f4f0e9;--green:#416955;--red:#a4413b}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--page);color:var(--ink);font:15px/1.55 "Paperlogy","Noto Sans KR",system-ui,sans-serif}
button,input,select{font:inherit}
button{cursor:pointer}
button:disabled{cursor:not-allowed;opacity:.5}
a{color:inherit}
.wrap{width:min(1120px,calc(100% - 40px));margin-inline:auto}
.site-header{position:sticky;top:0;z-index:20;background:rgba(251,249,245,.96);border-bottom:1px solid var(--line);backdrop-filter:blur(10px)}
.head-row{height:72px;display:flex;align-items:center;justify-content:space-between;gap:14px}
.brand{display:block;min-width:0}
.brand img{display:block;width:auto;height:36px;max-width:65vw;object-fit:contain;object-position:left center}
.back{display:inline-flex;min-height:44px;align-items:center;color:#5e6873;text-decoration:none;font-size:13px}
.hero{max-width:800px;padding:40px 0 24px}
.eyebrow,.step-label{margin:0;color:var(--accent);font-size:11px;font-weight:800;letter-spacing:.1em}
h1{margin:8px 0 12px;font-size:clamp(30px,5vw,48px);line-height:1.14;letter-spacing:-.045em}
h2{margin:0;font-size:20px;line-height:1.3;letter-spacing:-.025em}
h3{margin:0;font-size:16px}
.lede{max-width:680px;margin:0;color:#4e5966;font-size:16px}
.privacy-promise{display:flex;align-items:center;gap:8px;margin:15px 0 0;color:var(--green);font-size:13px;font-weight:700}
.privacy-promise span{display:grid;width:22px;height:22px;place-items:center;border-radius:50%;background:#e6efe8}
.panel{min-width:0;border:1px solid var(--line);border-radius:16px;background:var(--surface);box-shadow:0 4px 20px rgba(50,43,34,.035)}
.upload-panel{padding:20px}
.section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
.section-heading>div{display:grid;gap:3px}
.quiet{margin:5px 0;color:var(--muted);font-size:12px}
.drop-zone{position:relative;display:flex;min-height:188px;flex-direction:column;align-items:center;justify-content:center;gap:8px;margin-top:15px;padding:20px;border:2px dashed #d4cbbd;border-radius:14px;background:#fdfbf7;text-align:center}
.drop-zone.dragged,.drop-zone:focus-visible{border-color:var(--accent);background:#f5eee4;outline:3px solid rgba(180,122,79,.16);outline-offset:2px}
.upload-icon{display:grid;width:38px;height:38px;place-items:center;border-radius:50%;background:#efe7dc;color:var(--accent);font-size:22px;font-weight:700}
.drop-zone strong{font-size:16px}
.drop-hint{color:var(--muted);font-size:12px}
.button{display:inline-flex;min-height:44px;align-items:center;justify-content:center;gap:7px;padding:9px 15px;border:1px solid transparent;border-radius:10px;font-size:13px;font-weight:700;text-align:center;transition:background .15s,border-color .15s,color .15s}
.button.primary{background:var(--dark);color:white}
.button.primary:hover:not(:disabled){background:#34485a}
.button.secondary{border-color:#d9d3ca;background:var(--surface);color:var(--ink)}
.button.secondary:hover:not(:disabled){background:var(--soft)}
.status{min-height:22px;margin:10px 2px 0;color:var(--muted);font-size:12px}
.status.error{color:var(--red);font-weight:650}
.status.success{color:var(--green)}
.image-summary{padding:10px 12px;border-radius:10px;background:var(--soft);font-size:12px;color:#4d5660}
.image-summary[hidden],.editor[hidden],.output-preview[hidden],.cover-options[hidden],.quality-control[hidden]{display:none!important}
.visually-hidden{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.editor{display:grid;gap:14px;margin-top:14px}
.editor-panel{padding:14px}
.edit-toolbar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 12px;margin-bottom:10px}
.toolbar-group{display:flex;align-items:center;gap:6px}
.icon-button{width:44px;min-width:44px;padding:0;font-size:20px}
.toolbar-divider{width:1px;height:24px;margin:0 3px;background:var(--line)}
.zoom-value{min-width:44px;color:var(--muted);font-size:12px;text-align:center;font-variant-numeric:tabular-nums}
.compare-button{min-width:110px}
.stage-tools{display:grid;grid-template-columns:repeat(8,minmax(60px,1fr));gap:4px;padding:3px 1px 9px}
.tool-button{display:flex;min-width:0;min-height:48px;flex-direction:column;align-items:center;justify-content:center;gap:1px;padding:4px 3px;border:1px solid transparent;border-radius:10px;background:transparent;color:#59626d;font-size:11px;white-space:nowrap}
.tool-button span:first-child{font-size:18px;line-height:1.2}
.tool-button svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.tool-button:hover{background:var(--soft)}
.tool-button.active{border-color:#dbc5ad;background:#f3e9dc;color:#61452e;font-weight:750}
.tool-button.delete-tool{color:var(--red)}
.tool-button.delete-tool.active{border-color:#e8cfcc;background:#fbefed}
.quick-effect-controls{display:grid;grid-template-columns:minmax(160px,.8fr) minmax(180px,1fr) minmax(180px,.9fr) minmax(150px,.7fr);align-items:end;gap:8px 14px;padding:2px 2px 10px}
.quick-effect-controls .field-label{margin:3px 0 4px}
.quick-effect-controls select{min-height:42px}
.quick-effect-controls input[type="range"]{margin:1px 0 4px}
.quick-effect-controls .color-row{min-height:42px}
.quick-effect-controls .cover-options[hidden]{display:none}
#brushControls[hidden]{display:none!important}
.stage{position:relative;display:flex;height:min(62vh,720px);min-height:300px;align-items:center;justify-content:center;overflow:hidden;border:1px solid #d9d4cc;border-radius:12px;background-color:#f2f0ec;background-image:linear-gradient(45deg,#e6e3de 25%,transparent 25%),linear-gradient(-45deg,#e6e3de 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#e6e3de 75%),linear-gradient(-45deg,transparent 75%,#e6e3de 75%);background-size:20px 20px;background-position:0 0,0 10px,10px -10px,-10px 0}
.editor-surface{position:absolute;top:50%;left:50%;display:grid;place-items:center;max-width:100%;max-height:100%;transform:translate(calc(-50% + var(--pan-x,0px)),calc(-50% + var(--pan-y,0px))) scale(var(--zoom,1));transform-origin:center;will-change:transform}
#workCanvas{display:block;width:auto;height:auto;max-width:min(100%,1000px);max-height:min(62vh,720px);touch-action:none;cursor:crosshair;box-shadow:0 3px 16px rgba(24,31,40,.22)}
.editing-overlay{position:absolute;inset:0;display:block;width:100%;height:100%;max-width:100%;max-height:100%;pointer-events:none}
.editor-surface[data-tool="select"] #workCanvas{cursor:default}
.editor-surface[data-tool="brush"] #workCanvas,.editor-surface[data-tool="eraser"] #workCanvas{cursor:none}
.editor-surface[data-tool="pan"] #workCanvas{cursor:grab}
.editor-surface[data-dragging="true"][data-tool="pan"] #workCanvas{cursor:grabbing}
.stage-hint{height:0;overflow:hidden;margin:0;color:var(--muted);font-size:11px;opacity:0;transition:opacity .18s}
.stage-hint.visible{height:auto;min-height:18px;margin:5px 2px 0;opacity:1}
.stage-footer{display:flex;justify-content:space-between;gap:12px;padding:8px 2px 0;color:var(--muted);font-size:11px}
.touch-guide{position:absolute;z-index:3;display:none;width:16px;height:16px;border-radius:50%;background:transparent;pointer-events:none;transform:translate(-50%,-50%)}
.touch-guide::before{content:"";position:absolute;left:50%;top:100%;width:1px;height:23px;background:#fff;box-shadow:0 0 0 1px rgba(26,38,52,.8);transform:translateX(-50%)}
.touch-guide::after{content:"";position:absolute;inset:0;border:1px solid #fff;border-radius:50%;background:linear-gradient(#1d2b3a,#1d2b3a) center/1px 12px no-repeat,linear-gradient(#1d2b3a,#1d2b3a) center/12px 1px no-repeat;box-shadow:0 0 0 1px rgba(26,38,52,.92)}
.touch-guide.brush-guide::after{background:transparent;border:1px solid #fff;box-shadow:0 0 0 1px rgba(26,38,52,.92)}
.touch-guide.visible{display:block}
.touch-guide.below::before{top:auto;bottom:100%}
.editor-columns{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px}
.settings-panel,.regions-panel{padding:18px}
.settings-panel>.quiet{margin-top:5px;margin-bottom:12px}
.field-label{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:13px 0 6px;font-size:12px;font-weight:700}
.field-label output{color:var(--muted);font-size:11px;font-weight:550;font-variant-numeric:tabular-nums}
select{display:block;width:100%;min-height:44px;padding:8px 34px 8px 11px;border:1px solid #d9d3ca;border-radius:9px;background:#fffefa;color:var(--ink)}
input[type="range"]{display:block;width:100%;min-height:24px;margin:4px 0;accent-color:var(--accent);touch-action:pan-y}
input[type="color"]{width:48px;min-width:48px;height:44px;padding:3px;border:1px solid #d9d3ca;border-radius:8px;background:var(--surface)}
.color-row{display:flex;align-items:center;gap:10px;color:var(--muted);font-size:12px}
.sensitive-note{margin:13px 0;padding:10px 11px;border-left:3px solid var(--accent);border-radius:0 8px 8px 0;background:#f6f0e7;color:#5e5145;font-size:11px}
.selected-actions{display:flex;min-height:44px;align-items:center;justify-content:space-between;gap:8px;border-top:1px solid var(--line);margin-top:12px;padding-top:9px}
.selected-actions[hidden]{display:none!important}
.selected-actions .quiet{margin:0}
.text-button{min-height:44px;padding:6px 8px;border:0;border-radius:8px;background:transparent;color:#59626d;font-size:12px;font-weight:700}
.text-button:hover:not(:disabled){background:var(--soft)}
.text-button.danger{color:var(--red)}
.section-heading.compact{align-items:center}
.section-heading.compact .step-label{margin-bottom:3px}
.section-heading.compact h2{font-size:19px}
.region-list{display:grid;gap:7px;margin:12px 0 0;padding:0;list-style:none}
.region-item{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:5px;padding:5px;border:1px solid var(--line);border-radius:10px;background:#fff}
.region-item.selected{border-color:#c69b73;background:#fcf7f0}
.region-select{display:flex;min-width:0;min-height:44px;align-items:center;gap:9px;padding:5px 6px;border:0;border-radius:7px;background:transparent;color:var(--ink);text-align:left}
.region-select:hover{background:rgba(180,122,79,.08)}
.region-number{display:grid;width:26px;height:26px;flex:none;place-items:center;border-radius:50%;background:#ece8e1;color:#525a62;font-size:12px;font-weight:750}
.selected .region-number{background:#ead7c2;color:#5c3c22}
.region-description{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:650}
.region-delete{width:44px;height:44px;min-width:44px;min-height:44px;border:1px solid transparent;border-radius:8px;background:transparent;color:#727782;font-size:18px}
.region-delete:hover{border-color:#e8cfcc;background:#fbefed;color:var(--red)}
.editor-columns .quiet#emptyRegions{padding:10px 0}
.export-panel{display:grid;grid-template-columns:minmax(0,1fr) minmax(230px,320px);gap:12px 24px;padding:20px}
.export-copy .quiet{max-width:560px}
.export-controls{display:grid;align-content:start;gap:2px}
.export-controls .field-label{margin-top:4px}
.export-controls .button{width:100%;margin-top:10px}
#qualityControl{margin-top:3px}
#qualityControl[hidden]{display:none}
.output-preview{grid-column:1/-1;margin-top:8px;padding:14px;border:1px solid var(--line);border-radius:12px;background:#fbfaf7}
.preview-heading{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin-bottom:10px}
.preview-heading .quiet{margin:0}
#outputImage{display:block;max-width:100%;max-height:420px;margin:0 auto;border:1px solid var(--line);border-radius:8px;background:white;object-fit:contain}
.preview-actions{display:flex;justify-content:center;flex-wrap:wrap;gap:8px;margin-top:13px}
.privacy-note{margin:16px 0;padding:15px 17px;border:1px solid #e6ded2;border-radius:13px;background:#f5f0e8;color:#5a5a56;font-size:12px}
.privacy-note strong{color:#394b42}
.how-it-works{max-width:820px;margin:34px auto 25px}
.how-it-works h2,.related-tools h2{font-size:19px}
.how-it-works ol{display:grid;gap:5px;padding-left:22px;color:#4e5966;font-size:13px}
.how-it-works>p{color:var(--muted);font-size:12px}
.related-tools{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px;padding:15px 0 34px;border-top:1px solid var(--line)}
.related-tools h2{width:100%;margin-bottom:1px}
.related-tools a{color:#536271;font-size:12px;text-underline-offset:3px}
.related-tools a:hover{color:var(--accent)}
.site-footer{border-top:1px solid var(--line);padding:18px 0;color:var(--muted);font-size:11px}
.site-footer a{text-underline-offset:3px}
:where(button,input,select,a):focus-visible{outline:3px solid rgba(180,122,79,.48);outline-offset:2px}
@media(max-width:760px){
  .wrap{width:calc(100% - 32px)}
  .head-row{height:64px}
  .brand img{height:32px}
  .hero{padding:29px 0 18px}
  .lede{font-size:14px}
  .editor-columns{grid-template-columns:1fr}
  .stage{height:min(48svh,520px);min-height:260px}
  #workCanvas{max-height:min(48svh,520px)}
  .export-panel{grid-template-columns:1fr}
  .export-controls{max-width:none}
}
@media(max-width:600px){
  .section-heading{align-items:flex-start;flex-direction:column;gap:4px}
  .upload-panel{padding:15px}
  .drop-zone{min-height:172px;padding:16px 10px}
  .edit-toolbar{display:grid;grid-template-columns:1fr;gap:5px}
  .toolbar-group{justify-content:flex-start}
  .edit-toolbar>.toolbar-group:last-child{justify-content:flex-end}
  .quick-effect-controls{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:5px 10px;padding:0 0 8px}
  #effectControl{grid-column:1/-1}
  .stage-tools{grid-template-columns:repeat(4,minmax(0,1fr));gap:3px;margin-inline:-2px}
  .tool-button{min-height:48px;font-size:10px}
  #coverOptions{grid-column:1/-1}
  .stage-footer{font-size:10px}
  .stage-footer span:last-child{max-width:52%;text-align:right}
  .settings-panel,.regions-panel{padding:15px}
  .export-panel{padding:16px}
  .preview-heading{align-items:flex-start;flex-direction:column;gap:2px}
}
@media(max-width:360px){
  .wrap{width:calc(100% - 24px)}
  .hero{padding-top:25px}
  h1{font-size:29px}
  .drop-zone strong{font-size:14px}
  .stage{min-height:245px}
  .quick-effect-controls{gap:4px 7px}
  .quick-effect-controls .field-label{font-size:11px}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{transition:none!important}}
