/* imgtools 공용 스타일 — /imgmin/ 과 같은 생김새를 PC 폭(860px)에 맞춰 넓힘 */
*{margin:0;padding:0;box-sizing:border-box}
[hidden]{display:none!important}
body{font-family:'Noto Sans KR','Malgun Gothic',system-ui,-apple-system,'Segoe UI',sans-serif;background:#f6f7fb;color:#1e293b;line-height:1.6}
html[lang=en] body{font-family:system-ui,-apple-system,'Segoe UI',Roboto,sans-serif}
.wrap{max-width:860px;margin:0 auto;padding:18px 16px 40px}
a{color:#2563eb}
.vh{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
:focus-visible{outline:3px solid #93c5fd;outline-offset:2px}

.itnav{display:flex;gap:6px;overflow-x:auto;padding:10px 16px;background:#fff;border-bottom:1px solid #e9edf5;scrollbar-width:thin;justify-content:safe center}
.itnav a{flex:0 0 auto;padding:6px 12px;border-radius:999px;border:1px solid #e2e8f0;background:#fff;color:#475569;text-decoration:none;font-size:.8rem;font-weight:700;white-space:nowrap}
.itnav a:hover{border-color:#94a3b8}
.itnav a.on{background:#1e293b;border-color:#1e293b;color:#fff}

.hero{text-align:center;margin:6px 0 18px}
.hero h1{font-size:1.6rem;font-weight:800;letter-spacing:-.5px}
.hero p{color:#64748b;font-size:.9rem;margin-top:6px}
.hero .cnt{display:inline-block;margin-top:10px;background:#fff;border:1px solid #e2e8f0;border-radius:20px;padding:4px 14px;font-size:.75rem;color:#64748b}

.card{background:#fff;border:1px solid #e9edf5;border-radius:18px;padding:20px;margin-bottom:14px;box-shadow:0 2px 12px rgba(15,23,42,.05)}
.card h2{font-size:1rem;font-weight:800;margin-bottom:4px}

.drop{display:block;position:relative;border:2.5px dashed #cbd5e1;border-radius:16px;padding:30px 18px;text-align:center;cursor:pointer;transition:.15s;background:#fbfcfe}
.drop:hover{border-color:#94a3b8}
.drop.on{border-color:#2563eb;background:#eff6ff}
.drop:focus-within{border-color:#2563eb;box-shadow:0 0 0 3px #bfdbfe}
.drop .ic{font-size:2.1rem;line-height:1;display:block}
.drop b{display:block;margin-top:8px;font-size:1rem}
.drop span{display:block;margin-top:4px;font-size:.8rem;color:#94a3b8}
.drop.small{padding:14px}
.drop.small .ic{display:none}

.opt{margin-top:16px}
.opt .lb{font-size:.82rem;font-weight:700;color:#475569;margin-bottom:7px;display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.opt .lb small{font-weight:500;color:#94a3b8;font-size:.76rem}
.chips{display:flex;flex-wrap:wrap;gap:6px}
.chips button{border:1.5px solid #e2e8f0;background:#fff;border-radius:11px;padding:8px 13px;font:inherit;font-size:.83rem;font-weight:700;color:#64748b;cursor:pointer;transition:.12s}
.chips button:hover{border-color:#cbd5e1}
.chips button[aria-pressed=true],.chips button.on{background:#2563eb;border-color:#2563eb;color:#fff}
.row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.num{width:110px;border:1.5px solid #e2e8f0;border-radius:11px;padding:8px 11px;font:inherit;font-size:.95rem;font-weight:700;text-align:right;outline:none}
.num:focus,.txt:focus,select:focus{border-color:#2563eb}
.txt{border:1.5px solid #e2e8f0;border-radius:11px;padding:8px 11px;font:inherit;font-size:.9rem;outline:none;min-width:0}
select{border:1.5px solid #e2e8f0;border-radius:11px;padding:8px 10px;font:inherit;font-size:.88rem;background:#fff;outline:none}
.unit{font-size:.85rem;color:#64748b;font-weight:700}
.ck{display:flex;align-items:center;gap:7px;font-size:.85rem;color:#334155;cursor:pointer;margin-top:4px}
.ck.sub{margin-left:24px}
.ck input{width:17px;height:17px;accent-color:#2563eb}
.ck input:disabled+*,.ck:has(input:disabled){color:#94a3b8}
.range{display:flex;align-items:center;gap:10px}
.range input[type=range]{flex:1;max-width:320px;accent-color:#2563eb}
.range output{font-weight:800;min-width:46px;font-size:.92rem}
.hint{font-size:.78rem;color:#64748b;margin-top:6px}
.warnbox{background:#fffbeb;border:1px solid #fde68a;border-radius:11px;padding:10px 13px;font-size:.82rem;color:#92400e;margin-top:12px}
.errbox{background:#fef2f2;border:1px solid #fecaca;border-radius:11px;padding:10px 13px;font-size:.84rem;color:#991b1b;margin-top:12px}

.go{width:100%;margin-top:18px;padding:15px;border:0;border-radius:14px;background:#2563eb;color:#fff;font:inherit;font-size:1rem;font-weight:800;cursor:pointer;transition:.15s}
.go:hover{background:#1d4ed8}
.go:disabled{background:#cbd5e1;cursor:default}
.btn{border:1.5px solid #e2e8f0;background:#fff;border-radius:10px;padding:7px 12px;font:inherit;font-size:.8rem;font-weight:700;color:#334155;cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;gap:4px}
.btn:hover{border-color:#94a3b8}
.btn.pri{color:#2563eb}
.btn:disabled{opacity:.45;cursor:default}

.safe{display:flex;gap:9px;align-items:flex-start;background:#f0fdf4;border:1px solid #bbf7d0;border-radius:12px;padding:12px 14px;margin-top:14px;font-size:.82rem;color:#166534;line-height:1.55}
.safe b{font-weight:800}

/* 넣은 파일 목록 (처리 전) */
.queue{margin-top:14px}
.qi{display:flex;gap:10px;align-items:center;padding:8px 6px;border-top:1px solid #f1f5f9;border-radius:10px;background:#fff}
.qi:first-child{border-top:0}
.qi .th{width:46px;height:46px;border-radius:8px;background:#f1f5f9;flex:0 0 46px;object-fit:cover;border:1px solid #e9edf5;display:flex;align-items:center;justify-content:center;font-size:1.2rem;overflow:hidden}
.qi .th img,.qi .th canvas{width:100%;height:100%;object-fit:contain}
.qi .in{flex:1 1 120px;min-width:0}
.qi .qr{font-size:.74rem;display:flex;align-items:center;gap:5px;white-space:nowrap}
.qi .qr input{width:92px;padding:5px 8px;font-size:.8rem}
.qi .nm{font-size:.84rem;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.qi .dt{font-size:.76rem;color:#64748b}
.qi .ctl{display:flex;gap:4px;flex:0 0 auto}
.qi .ctl button{width:32px;height:32px;border:1.5px solid #e2e8f0;background:#fff;border-radius:9px;cursor:pointer;font-size:.85rem;color:#475569}
.qi .ctl button:hover{border-color:#94a3b8}
.qi .ctl button:disabled{opacity:.35;cursor:default}
.qi[draggable=true]{cursor:grab}
.qi.dragging{opacity:.4}
.qi.over{box-shadow:inset 0 3px 0 #2563eb}
.qhead{display:flex;justify-content:space-between;align-items:center;font-size:.82rem;color:#64748b;font-weight:700;margin-top:14px}

/* 결과 */
.rs{display:none}
.rs.show{display:block}
.sum{display:flex;gap:10px;align-items:center;flex-wrap:wrap;background:#eff6ff;border:1px solid #bfdbfe;border-radius:12px;padding:13px 15px;margin-bottom:13px;font-size:.88rem;color:#1e3a8a;font-weight:700}
.sum .big{font-size:1.1rem;font-weight:800}
.prog{height:6px;border-radius:3px;background:#dbeafe;overflow:hidden;flex-basis:100%}
.prog i{display:block;height:100%;width:0;background:#2563eb;transition:width .2s}
.it{display:flex;gap:12px;align-items:center;padding:11px 0;border-top:1px solid #f1f5f9}
.it:first-child{border-top:0}
.it .th{width:54px;height:54px;border-radius:10px;background:#f1f5f9;flex:0 0 54px;object-fit:cover;border:1px solid #e9edf5;display:flex;align-items:center;justify-content:center;font-size:1.3rem}
.it .in{flex:1;min-width:0}
.it .nm{font-size:.85rem;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.it .dt{font-size:.77rem;color:#64748b;margin-top:2px}
.it .dt b{color:#16a34a;font-weight:800}
.it .dt .warn{color:#b45309;font-weight:700}
.it .dt .bad{color:#dc2626;font-weight:700}
.it .dl{flex:0 0 auto;border:1.5px solid #e2e8f0;background:#fff;border-radius:10px;padding:8px 12px;font:inherit;font-size:.8rem;font-weight:700;color:#2563eb;cursor:pointer;text-decoration:none}
.it .dl:hover{border-color:#2563eb}
.it.busy .dt{color:#2563eb}
.zip{width:100%;margin-top:14px;padding:13px;border:0;border-radius:13px;background:#1e293b;color:#fff;font:inherit;font-size:.92rem;font-weight:800;cursor:pointer}
.zip:disabled{opacity:.6}
.again{width:100%;margin-top:8px;padding:12px;border:1.5px solid #e2e8f0;border-radius:13px;background:#fff;color:#64748b;font:inherit;font-size:.86rem;font-weight:700;cursor:pointer}

/* 허브 */
.tools{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:12px;margin-bottom:14px}
.tool{display:block;background:#fff;border:1px solid #e9edf5;border-radius:16px;padding:18px;text-decoration:none;color:inherit;box-shadow:0 2px 12px rgba(15,23,42,.05);transition:.15s}
.tool:hover{border-color:#93c5fd;transform:translateY(-2px)}
.tool .e{font-size:1.7rem;line-height:1}
.tool b{display:block;margin-top:8px;font-size:1rem}
.tool span{display:block;font-size:.82rem;color:#64748b;margin-top:2px}

/* 설명 */
.seo{background:#fff;border:1px solid #e9edf5;border-radius:18px;padding:22px 20px;margin-bottom:14px}
.seo h2{font-size:1.05rem;font-weight:800;margin-bottom:10px}
.seo h3{font-size:.93rem;font-weight:800;margin:18px 0 7px}
.seo p{font-size:.87rem;color:#475569;margin-bottom:9px}
.seo ul,.seo ol{margin:0 0 9px 20px;font-size:.87rem;color:#475569}
.seo li{margin-bottom:5px}
.seo table{width:100%;border-collapse:collapse;font-size:.83rem;margin:10px 0 12px}
.seo th,.seo td{border:1px solid #e9edf5;padding:7px 9px;text-align:left;vertical-align:top}
.seo th{background:#f8fafc;font-weight:700;color:#475569}
.seo .note{background:#fffbeb;border:1px solid #fde68a;border-radius:11px;padding:12px 14px;font-size:.83rem;color:#92400e;margin:12px 0}
.seo .lic{font-size:.76rem;color:#94a3b8}

.faq h2{margin-bottom:12px}
.faq details{border-top:1px solid #f1f5f9;padding:12px 0}
.faq details:first-of-type{border-top:0}
.faq summary{font-size:.9rem;font-weight:700;cursor:pointer;list-style:none;display:flex;gap:8px}
.faq summary::-webkit-details-marker{display:none}
.faq summary::before{content:'Q';color:#2563eb;font-weight:800}
.faq p{font-size:.85rem;color:#475569;margin:8px 0 0 18px}
.ad{text-align:center;margin:20px 0}

/* 자르기 편집기 */
.stage{position:relative;margin:14px auto 0;background:#0f172a url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Crect width='8' height='8' fill='%23e2e8f0'/%3E%3Crect x='8' y='8' width='8' height='8' fill='%23e2e8f0'/%3E%3C/svg%3E");border-radius:10px;touch-action:none;user-select:none;-webkit-user-select:none;overflow:hidden}
.stage canvas{display:block}
.cbox{position:absolute;border:2px solid #fff;box-shadow:0 0 0 9999px rgba(15,23,42,.55);cursor:move;outline:none}
.cbox:focus-visible{border-color:#60a5fa}
.cbox::before,.cbox::after{content:'';position:absolute;inset:0;pointer-events:none;border:1px solid rgba(255,255,255,.35)}
.cbox::before{left:33.33%;right:33.33%;border-top:0;border-bottom:0}
.cbox::after{top:33.33%;bottom:33.33%;border-left:0;border-right:0}
.hd{position:absolute;width:18px;height:18px;background:#fff;border:2px solid #2563eb;border-radius:4px;margin:-9px 0 0 -9px;z-index:2}
.hd[data-h=nw]{left:0;top:0;cursor:nwse-resize}.hd[data-h=ne]{left:100%;top:0;cursor:nesw-resize}
.hd[data-h=sw]{left:0;top:100%;cursor:nesw-resize}.hd[data-h=se]{left:100%;top:100%;cursor:nwse-resize}
.hd[data-h=n]{left:50%;top:0;cursor:ns-resize}.hd[data-h=s]{left:50%;top:100%;cursor:ns-resize}
.hd[data-h=w]{left:0;top:50%;cursor:ew-resize}.hd[data-h=e]{left:100%;top:50%;cursor:ew-resize}
.cinfo{text-align:center;font-size:.8rem;color:#64748b;margin-top:6px}
.cnum{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin-top:6px;max-width:460px}
.cnum label{font-size:.72rem;color:#64748b;font-weight:700}
.cnum input{width:100%;text-align:right}

/* PDF 페이지 격자 */
.pages{display:grid;grid-template-columns:repeat(auto-fill,minmax(118px,1fr));gap:10px;margin-top:12px}
.pg{position:relative;border:2px solid #e2e8f0;border-radius:10px;background:#fff;padding:6px 6px 4px;text-align:center;cursor:pointer;user-select:none}
.pg:focus-visible{outline:3px solid #93c5fd}
.pg.sel{border-color:#2563eb;background:#eff6ff}
.pg.off{opacity:.45}
.pg .pv{height:140px;display:flex;align-items:center;justify-content:center;background:#f8fafc;border-radius:6px;overflow:hidden;font-size:1.5rem;color:#94a3b8}
.pg .pv canvas{max-width:100%;max-height:100%;box-shadow:0 1px 4px rgba(0,0,0,.18);transition:transform .2s}
.pg .no{font-size:.76rem;font-weight:800;color:#475569;margin-top:4px;display:flex;align-items:center;justify-content:center;gap:5px}
.pg .no input{width:15px;height:15px;accent-color:#2563eb}
.pg .tools2{position:absolute;top:8px;right:8px;display:flex;gap:3px;opacity:0;transition:.12s}
.pg:hover .tools2,.pg:focus-within .tools2{opacity:1}
.pg .tools2 button{width:26px;height:26px;border-radius:7px;border:1px solid #cbd5e1;background:#fff;cursor:pointer;font-size:.8rem}
.pg.dragging{opacity:.35}
.pg.over{box-shadow:-4px 0 0 #2563eb}
@media (hover:none){.pg .tools2{opacity:1}}

@media(max-width:480px){
  .hero h1{font-size:1.35rem}
  .card{padding:16px}
  .it .th{width:44px;height:44px;flex:0 0 44px}
  .pages{grid-template-columns:repeat(auto-fill,minmax(96px,1fr))}
  .pg .pv{height:112px}
  .cnum{grid-template-columns:repeat(2,minmax(0,1fr))}
  .itnav{justify-content:flex-start}
  .qi{flex-wrap:wrap}
  .qi .qr{order:5;flex-basis:100%;padding-left:56px}
}
