
:root{
  --bg:#f5f7fb;
  --panel:#ffffff;
  --panel-2:#f8fafc;
  --text:#111827;
  --muted:#667085;
  --line:#e5e7eb;
  --accent:#111827;
  --accent-soft:#eef2ff;
  --danger:#b42318;
  --success:#067647;
  --shadow:0 16px 50px rgba(17,24,39,.08);
  --radius:20px;
}
*{box-sizing:border-box}
[hidden]{display:none!important}
:focus-visible{outline:3px solid #6366f1;outline-offset:3px}
button:disabled{cursor:default}
.search{display:grid;gap:8px;font-size:13px;color:var(--muted);max-width:480px}
.search input{padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:white;width:100%}
.back-btn{text-decoration:none;display:inline-block}
.frame-sub label{display:flex;align-items:center;gap:6px}
.result-meta{overflow-wrap:anywhere}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}
html,body{margin:0;min-height:100%;background:var(--bg);color:var(--text);font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI","Apple SD Gothic Neo","Noto Sans KR",sans-serif}
button,input,select{font:inherit}
button{cursor:pointer}
body{min-height:100vh}
.topbar{
  height:74px;display:flex;align-items:center;justify-content:space-between;
  padding:0 max(24px,calc((100vw - 1180px)/2));background:rgba(255,255,255,.92);
  border-bottom:1px solid var(--line);position:sticky;top:0;z-index:50;backdrop-filter:blur(12px)
}
.brand{display:flex;gap:11px;align-items:center;border:0;background:transparent;padding:0;text-align:left;color:var(--text)}
.brand-mark{width:40px;height:40px;border-radius:13px;display:grid;place-items:center;background:#111827;color:#fff;font-weight:800}
.brand strong{display:block;font-size:16px;line-height:1.1}
.brand small{display:block;margin-top:4px;color:var(--muted);font-size:12px}
.privacy-pill{font-size:12px;color:#344054;background:#f2f4f7;border:1px solid #eaecf0;border-radius:999px;padding:8px 12px}
.shell{width:min(1180px,calc(100% - 32px));margin:34px auto 48px}
.hero{display:flex;align-items:end;justify-content:space-between;gap:24px;margin-bottom:24px}
.hero h1{font-size:clamp(30px,5vw,48px);line-height:1.05;margin:0 0 10px;letter-spacing:-.04em}
.hero p{margin:0;color:var(--muted);font-size:15px}
.stat{font-size:13px;color:var(--muted);white-space:nowrap}
.category{margin-top:32px}
.category-head{display:flex;align-items:center;gap:8px;margin-bottom:12px}
.category-head h2{font-size:16px;margin:0}
.category-head span{font-size:12px;color:var(--muted)}
.tool-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.tool-card{
  border:1px solid var(--line);background:var(--panel);border-radius:18px;padding:18px;
  text-align:left;min-height:148px;box-shadow:0 1px 2px rgba(16,24,40,.03);
  transition:.18s ease;position:relative;overflow:hidden
}
.tool-card:not([disabled]):hover{transform:translateY(-2px);box-shadow:var(--shadow);border-color:#d0d5dd}
.tool-card[disabled]{cursor:default;opacity:.85;color:var(--text);background:#fafbfd}
.tool-icon{width:42px;height:42px;border-radius:13px;display:grid;place-items:center;background:#f2f4f7;font-size:21px;margin-bottom:16px}
.tool-card h3{font-size:16px;margin:0 0 6px}
.tool-card p{font-size:13px;line-height:1.55;color:var(--muted);margin:0;padding-right:52px}
.badge{position:absolute;right:14px;top:14px;border-radius:999px;font-size:11px;padding:5px 8px;background:#f2f4f7;color:#475467}
.badge.live{background:#ecfdf3;color:var(--success)}
.tool-page-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px}
.crumb{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:13px}
.back-btn{border:1px solid var(--line);background:#fff;border-radius:12px;padding:9px 12px;color:#344054}
.tool-title h1{margin:5px 0 0;font-size:31px;letter-spacing:-.03em}
.workspace{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(320px,.7fr);gap:18px;align-items:start}
.panel{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);box-shadow:0 1px 2px rgba(16,24,40,.03)}
.panel-head{padding:18px 20px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:10px}
.panel-head h2{font-size:15px;margin:0}
.panel-body{padding:20px}
.dropzone{
  border:1.5px dashed #cbd5e1;border-radius:18px;padding:34px 20px;text-align:center;background:#fbfcfe;
  transition:.15s ease
}
.dropzone.dragover{border-color:#111827;background:#f8fafc}
.dropzone .big{font-size:28px;margin-bottom:7px}
.dropzone strong{display:block;font-size:15px;margin-bottom:4px}
.dropzone p{margin:0 0 14px;color:var(--muted);font-size:13px}
.primary,.secondary,.ghost,.danger-btn{
  border-radius:12px;padding:10px 14px;border:1px solid transparent;font-weight:650;font-size:13px
}
.primary{background:#111827;color:#fff}
.primary:disabled{opacity:.45;cursor:not-allowed}
.secondary{background:#fff;border-color:var(--line);color:#344054}
.ghost{background:#f8fafc;border-color:#eef2f6;color:#475467}
.danger-btn{background:#fff;border-color:#fecdca;color:var(--danger)}
.frame-list{display:grid;gap:10px;margin-top:16px}
.frame-card{
  display:grid;grid-template-columns:74px minmax(0,1fr) auto;gap:12px;align-items:center;
  padding:10px;border:1px solid var(--line);border-radius:14px;background:#fff
}
.frame-card.dragging{opacity:.45}
.thumb{width:74px;height:58px;object-fit:cover;border-radius:10px;background:#f2f4f7}
.frame-meta{min-width:0}
.frame-name{font-size:13px;font-weight:650;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.frame-sub{display:flex;gap:8px;align-items:center;margin-top:8px;color:var(--muted);font-size:12px;flex-wrap:wrap}
.frame-sub input{width:82px;border:1px solid var(--line);border-radius:9px;padding:6px 8px;background:#fff}
.frame-actions{display:flex;gap:6px}
.icon-btn{width:34px;height:34px;border-radius:9px;border:1px solid var(--line);background:#fff;color:#475467}
.icon-btn.danger{color:var(--danger)}
.empty{padding:34px;text-align:center;color:var(--muted);font-size:13px}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.field{display:grid;gap:7px}
.field.full{grid-column:1/-1}
.field label{font-size:12px;color:#475467;font-weight:650}
.field select,.field input[type="number"],.field input[type="text"]{
  width:100%;border:1px solid var(--line);background:#fff;border-radius:11px;padding:10px 11px;color:var(--text)
}
.inline{display:flex;gap:8px;align-items:center}
.resizer .panel,.resizer .panel-body{min-width:0}
.check-field{display:flex;align-items:center;gap:8px;font-size:13px;line-height:1.5}
.check-field input{flex:none;width:18px;height:18px}
.preset-buttons{display:flex;gap:6px;flex-wrap:wrap}
.preset-buttons .ghost{padding:7px 9px;font-size:12px}
.quality-controls{display:flex;align-items:center;gap:10px;min-width:0}
.quality-controls input[type="range"]{width:100%;min-width:0;flex:1}
.quality-controls input[type="number"]{width:78px;flex:none}
.resize-result{display:flex;gap:10px;align-items:center;padding-top:10px;margin-top:10px;border-top:1px solid var(--line);font-size:12px;line-height:1.7;overflow-wrap:anywhere}
.resize-result .thumb{flex:none;object-fit:contain}
.resize-error{font-size:12px;color:var(--danger);margin-top:8px;overflow-wrap:anywhere}
.resize-progress{margin-top:14px}
.resize-progress progress{width:100%;height:12px;accent-color:var(--accent)}
.resize-card .frame-actions{flex-wrap:wrap;justify-content:flex-end}
.compressor .panel,.compressor .panel-body{min-width:0}
.compressor .frame-actions{flex-wrap:wrap;justify-content:flex-end}
.compressor #compressSummary{white-space:pre-line}
.compression-warning,.compression-target-status{margin-top:5px;color:#865400}
.compression-purpose a{color:inherit}
.compressor .field small{font-size:12px;color:var(--muted);line-height:1.5}
.compressor .inline input{min-width:0;flex:1}
.compressor .inline select{width:90px;flex:none}
.converter .panel,.converter .panel-body{min-width:0}
.converter .frame-actions{flex-wrap:wrap;justify-content:flex-end}
.converter #convertSummary{white-space:pre-line}
.converter .field small{font-size:12px;color:var(--muted);line-height:1.5}
.converter .notice a{color:inherit}
.converter input[type="color"]{width:100%;height:42px;border:1px solid var(--line);border-radius:11px;background:#fff;padding:4px}
.editor .panel,.editor .panel-body{min-width:0}
.edit-stage{position:relative;overflow:hidden;user-select:none;touch-action:none;background:repeating-conic-gradient(#eee 0% 25%,#fff 0% 50%) 0/20px 20px;margin:18px auto}
.edit-stage canvas{display:block;width:100%;height:auto}
.edit-crop{position:absolute;border:2px solid white;outline:1px solid #111;box-shadow:0 0 0 10000px #0007;cursor:move;touch-action:none}
.edit-grid{position:absolute;inset:0;background:linear-gradient(to right,transparent 33.1%,#fff9 33.1% 33.5%,transparent 33.5% 66.4%,#fff9 66.4% 66.8%,transparent 66.8%),linear-gradient(to bottom,transparent 33.1%,#fff9 33.1% 33.5%,transparent 33.5% 66.4%,#fff9 66.4% 66.8%,transparent 66.8%);pointer-events:none}
.edit-handle{position:absolute;width:30px;height:30px;background:#fff;border:2px solid #111;border-radius:7px;padding:0;z-index:2}
.edit-handle.nw{left:0;top:0;cursor:nwse-resize}.edit-handle.ne{right:0;top:0;cursor:nesw-resize}.edit-handle.sw{left:0;bottom:0;cursor:nesw-resize}.edit-handle.se{right:0;bottom:0;cursor:nwse-resize}
.edit-preview,.edit-result img{display:block;max-width:100%;max-height:300px;object-fit:contain;background:repeating-conic-gradient(#eee 0% 25%,#fff 0% 50%) 0/20px 20px;border:1px solid var(--line);border-radius:10px}
.edit-preview-title{font-size:14px}
.edit-coordinates{display:grid;grid-template-columns:1fr 1fr;gap:8px}.edit-coordinates label{display:grid;gap:5px}
.editor .field small{font-size:12px;line-height:1.5;color:var(--muted)}
.editor input[type="color"]{height:42px;width:100%}
.preview-box{aspect-ratio:4/3;background:#101828;border-radius:16px;overflow:hidden;display:grid;place-items:center;position:relative}
.preview-box canvas,.preview-box img{max-width:100%;max-height:100%;width:100%;height:100%;object-fit:contain}
.preview-label{position:absolute;left:10px;bottom:10px;background:rgba(0,0,0,.55);color:#fff;font-size:11px;border-radius:999px;padding:5px 8px}
.progress-wrap{margin-top:14px;display:none}
.progress-track{height:9px;border-radius:999px;background:#eef2f6;overflow:hidden}
.progress-bar{height:100%;width:0;background:#111827;transition:width .15s}
.progress-text{font-size:12px;color:var(--muted);margin-top:7px}
.action-stack{display:grid;gap:9px;margin-top:14px}
.notice{font-size:12px;line-height:1.55;color:#475467;background:#f8fafc;border:1px solid #eef2f6;border-radius:12px;padding:11px 12px;margin-top:14px}
.result-meta{font-size:12px;color:var(--muted);margin-top:8px}
.footer{display:flex;justify-content:center;gap:8px;padding:20px;color:#98a2b3;font-size:12px}
.toast{position:fixed;right:20px;bottom:20px;background:#111827;color:#fff;border-radius:12px;padding:11px 14px;font-size:13px;box-shadow:var(--shadow);z-index:100;animation:toastIn .18s ease}
@keyframes toastIn{from{transform:translateY(8px);opacity:0}to{transform:none;opacity:1}}
@media (max-width:900px){
  .tool-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .workspace{grid-template-columns:1fr}
}
@media (max-width:600px){
  .topbar{padding:0 16px;height:66px}.privacy-pill{display:none}.shell{width:min(100% - 20px,1180px);margin-top:20px}
  .hero{align-items:start;flex-direction:column}.tool-grid{grid-template-columns:1fr}
  .form-grid{grid-template-columns:1fr}.field.full{grid-column:auto}.frame-card{grid-template-columns:62px minmax(0,1fr)}
  .thumb{width:62px;height:52px}.frame-actions{grid-column:1/-1;justify-content:flex-end}
}
