@font-face{font-family:Pretendard;font-style:normal;font-weight:1 500;font-display:swap;src:url(/fonts/pretendard-400-latin.woff2) format("woff2");unicode-range:U+0000-00FF,U+0100-017F,U+0180-024F,U+2000-206F,U+2070-209F,U+20A0-20BF,U+2100-214F,U+2190-21FF,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:Pretendard;font-style:normal;font-weight:1 500;font-display:swap;src:url(/fonts/pretendard-400-ko.woff2) format("woff2");unicode-range:U+1100-11FF,U+3000-303F,U+3130-318F,U+A960-A97F,U+AC00-D7A3,U+D7B0-D7FF}
@font-face{font-family:Pretendard;font-style:normal;font-weight:501 650;font-display:swap;src:url(/fonts/pretendard-600-latin.woff2) format("woff2");unicode-range:U+0000-00FF,U+0100-017F,U+0180-024F,U+2000-206F,U+2070-209F,U+20A0-20BF,U+2100-214F,U+2190-21FF,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:Pretendard;font-style:normal;font-weight:501 650;font-display:swap;src:url(/fonts/pretendard-600-ko.woff2) format("woff2");unicode-range:U+1100-11FF,U+3000-303F,U+3130-318F,U+A960-A97F,U+AC00-D7A3,U+D7B0-D7FF}
@font-face{font-family:Pretendard;font-style:normal;font-weight:651 900;font-display:swap;src:url(/fonts/pretendard-800-latin.woff2) format("woff2");unicode-range:U+0000-00FF,U+0100-017F,U+0180-024F,U+2000-206F,U+2070-209F,U+20A0-20BF,U+2100-214F,U+2190-21FF,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:Pretendard;font-style:normal;font-weight:651 900;font-display:swap;src:url(/fonts/pretendard-800-ko.woff2) format("woff2");unicode-range:U+1100-11FF,U+3000-303F,U+3130-318F,U+A960-A97F,U+AC00-D7A3,U+D7B0-D7FF}
:root{--brand:#a5620f}
/* NearIMG — tokens and layout carried over from NearPDF's approved wireframe.
   Identity color comes from the chassis: kit injects :root{--brand:<accent>} (deep ochre
   #a5620f for nearimg) before this file, and --accent binds to it so the whole app
   differentiates through the uniform brand mechanism instead of a hard-coded hue. */
:root{
  --bg:#fafafa;
  --surface:#ffffff;
  --ink:#14171a;
  --ink-soft:#5b6470;
  --line:#e3e6ea;
  --accent:var(--brand);
  --accent-soft:#f7efe3;
  --ok:#2f7a55;
  --ad:#f4f5f7;
  --ad-line:#c9ced6;
}
*{box-sizing:border-box;}
body{
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font-family:'Pretendard',system-ui,-apple-system,'Apple SD Gothic Neo','Malgun Gothic',sans-serif;
  -webkit-font-smoothing:antialiased;
}
.mono{
  font-family:ui-monospace,'SFMono-Regular',Consolas,monospace;
  letter-spacing:-0.01em;
}
:lang(ko){word-break:keep-all; overflow-wrap:break-word;}
[hidden]{display:none !important;}
a{color:var(--accent);}

/* Screen-reader-only, but still focusable/announced */
.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;
}
:focus-visible{outline:2px solid var(--accent); outline-offset:2px;}

/* ================= HEADER ================= */
.page{max-width:1000px; margin:0 auto; padding:0 24px;}
.site-head{
  position:sticky; top:0; z-index:45;
  background:var(--bg);
  border-bottom:1px solid var(--line);
}
.head-inner{
  display:flex; align-items:center; justify-content:space-between;
  padding-top:13px; padding-bottom:13px;
}
.wordmark{font-weight:700; font-size:16px; letter-spacing:-0.02em;}
.wordmark a{color:inherit; text-decoration:none;}
.head-right{display:flex; align-items:center; gap:14px;}
@media (max-width:520px){ .head-right .mono{display:none;} }

.lang-menu{position:relative;}
.lang-menu summary{
  list-style:none; cursor:pointer; user-select:none;
  font-size:12.5px; color:var(--ink);
  border:1px solid var(--line); border-radius:6px;
  padding:6px 26px 6px 12px; background:var(--surface); position:relative;
}
.lang-menu summary::-webkit-details-marker{display:none;}
.lang-menu summary::after{
  content:""; position:absolute; right:11px; top:50%;
  width:6px; height:6px;
  border-right:1.5px solid var(--ink-soft); border-bottom:1.5px solid var(--ink-soft);
  transform:translateY(-70%) rotate(45deg);
}
.lang-menu[open] summary{border-color:var(--accent);}
.lang-menu nav{
  position:absolute; right:0; top:calc(100% + 6px); z-index:55;
  display:flex; flex-direction:column; min-width:150px;
  background:var(--surface); border:1px solid var(--line); border-radius:8px;
  box-shadow:0 8px 24px rgba(20,23,26,.12); padding:6px;
}
.lang-menu nav a{padding:7px 10px; font-size:13px; color:var(--ink); text-decoration:none; border-radius:5px;}
.lang-menu nav a:hover{background:var(--accent-soft); color:var(--accent);}
.site-head .mono{font-size:12px; color:var(--ink-soft);}

/* ================= LANDING ================= */
.hero{padding:64px 0 20px; text-align:center;}
.hero h1{
  font-size:clamp(32px,5vw,52px); line-height:1.08; letter-spacing:-0.03em;
  font-weight:700; margin:0 0 18px; text-wrap:balance;
}
.hero p{font-size:17px; color:var(--ink-soft); max-width:520px; margin:0 auto 40px; line-height:1.55; text-wrap:pretty;}

.dropzone{
  max-width:640px; margin:0 auto;
  border:1.5px dashed var(--line); border-radius:12px; padding:56px 24px;
  text-align:center; background:var(--surface);
  transition:border-color .15s, background .15s;
}
.dropzone:hover, .dropzone:focus-within, .dropzone:focus-visible{border-color:var(--accent); background:var(--accent-soft);}
.screen.dragover .dropzone{border-color:var(--accent); background:var(--accent-soft);}
.screen.dragover{outline:2px dashed var(--accent); outline-offset:-10px;}
.dropzone .glyph{
  width:34px; height:34px; margin:0 auto 18px;
  border:1.5px solid var(--ink); border-radius:4px; position:relative;
}
.dropzone .glyph::after{
  content:""; position:absolute; left:50%; top:50%;
  width:12px; height:12px; border-left:1.5px solid var(--ink); border-bottom:1.5px solid var(--ink);
  transform:translate(-50%,-65%) rotate(-45deg);
}
.dropzone .primary{font-size:16px; font-weight:600; margin-bottom:6px;}
.dropzone .secondary{font-size:13px; color:var(--ink-soft); margin-bottom:18px;}
.browse-btn{
  background:var(--ink); color:#fff; border:none;
  padding:11px 22px; border-radius:6px; font-size:14px; font-weight:600; font-family:inherit; cursor:pointer;
}

.trust-line{text-align:center; margin:18px 0 0; font-size:12.5px; color:var(--ink-soft);}
.trust-line .mono{color:var(--ok);}

.tool-nav{display:flex; gap:8px; justify-content:center; flex-wrap:wrap; margin:26px auto 0; max-width:640px;}
.tool-nav a, .tool-nav .active{
  font-size:13px; text-decoration:none; padding:7px 14px; border-radius:999px;
  border:1px solid var(--line); color:var(--ink-soft); background:var(--surface);
}
.tool-nav a:hover{border-color:var(--accent); color:var(--accent);}
.tool-nav .active{background:var(--accent-soft); border-color:var(--accent); color:var(--accent); font-weight:600;}

.conv-nav{
  display:flex; gap:8px; justify-content:center; flex-wrap:wrap; align-items:center;
  margin:30px auto 0; max-width:680px;
}
.conv-nav .conv-label{font-size:12px; color:var(--ink-soft); text-transform:uppercase; letter-spacing:.06em; width:100%; text-align:center; margin-bottom:2px;}
.conv-nav a, .conv-nav .active{
  font-size:12.5px; text-decoration:none; padding:6px 12px; border-radius:999px;
  border:1px solid var(--line); color:var(--ink-soft); background:var(--surface); font-variant-numeric:tabular-nums;
}
.conv-nav a:hover{border-color:var(--accent); color:var(--accent);}
.conv-nav .active{background:var(--accent-soft); border-color:var(--accent); color:var(--accent); font-weight:600;}

.ad-native{
  max-width:640px; margin:44px auto; padding:16px 18px; min-height:72px;
  background:var(--ad); border:1px solid var(--ad-line); border-radius:8px;
  display:flex; align-items:center; gap:14px;
}
.ad-native .tag, .ad-below .tag{
  font-size:10px; text-transform:uppercase; letter-spacing:.08em; color:var(--ink-soft);
  border:1px solid var(--ad-line); padding:2px 6px; border-radius:3px; flex-shrink:0;
}
.ad-native .body{font-size:13px; color:var(--ink-soft);}

.seo-block{border-top:1px solid var(--line); margin-top:56px; padding:44px 0;}
.seo-block h2{font-size:20px; margin:0 0 14px; text-wrap:balance;}
.seo-block p{font-size:14.5px; color:var(--ink-soft); line-height:1.7; max-width:680px; text-wrap:pretty;}
.faq-item{padding:16px 0; border-top:1px solid var(--line);}
.faq-item summary{font-size:14.5px; font-weight:600; cursor:pointer;}
.faq-item p{margin:10px 0 0;}

.site-foot{
  /* padding-block only — horizontal inset comes from the .page wrapper (landing) or the
     .page class on the legal footer itself; a `padding` shorthand here would zero the
     inline padding and clip "About" to the screen edge on legal pages. */
  border-top:1px solid var(--line); padding-block:28px 100px;
  display:flex; flex-direction:column; gap:12px;
  font-size:12.5px; color:var(--ink-soft);
}
.site-foot a{color:var(--ink-soft);}
.foot-links{display:flex; gap:16px; flex-wrap:wrap;}
.foot-note{margin:0; max-width:640px;}

.lang-suggest{
  display:flex; align-items:center; justify-content:center; gap:14px;
  background:var(--accent-soft); border-bottom:1px solid var(--line); padding:9px 16px; font-size:13px;
}
.lang-suggest a{color:var(--accent); font-weight:600; text-decoration:none;}
.lang-suggest button{background:none; border:none; color:var(--ink-soft); font-size:13px; cursor:pointer; padding:2px 6px; min-width:24px; min-height:24px;}

/* ================= WORKSPACE ================= */
.ws-shell{max-width:1100px; margin:0 auto; padding:0 24px 120px;}
.ws-head{
  display:flex; align-items:center; justify-content:space-between;
  padding:24px 0; border-bottom:1px solid var(--line);
}
.ws-head .left{display:flex; align-items:center; gap:14px;}
.ws-head-actions{display:flex; gap:8px;}
.back{font-size:13px; color:var(--ink-soft); text-decoration:none;}
.filecount{font-size:13px; font-weight:600;}
.skip-btn{
  background:transparent; border:1px solid var(--line); color:var(--ink);
  padding:9px 16px; border-radius:6px; font-family:inherit; font-size:13px; cursor:pointer;
}

/* Options bar */
.options{
  display:flex; flex-wrap:wrap; gap:18px 28px; align-items:flex-end;
  padding:20px 0 4px;
}
.opt-group{display:flex; flex-direction:column; gap:7px;}
.opt-group > label{font-size:12px; font-weight:600; color:var(--ink-soft);}
.opt-group select, .opt-group input[type=number], .opt-group input[type=text]{
  font-family:inherit; font-size:13px; padding:8px 10px;
  border:1px solid var(--line); border-radius:6px; background:var(--surface); color:var(--ink);
}
.opt-group input[type=number]{width:92px;}
.opt-group input[type=text]{width:150px;}
.opt-group input[type=range]{width:180px; accent-color:var(--accent);}
.toggle{
  font-family:inherit; font-size:12.5px; padding:8px 13px; border-radius:7px; cursor:pointer;
  background:var(--surface); border:1px solid var(--line); color:var(--ink);
}
.toggle[aria-pressed=true]{background:var(--accent-soft); border-color:var(--accent); color:var(--accent); font-weight:600;}
.adjust-row{display:flex; flex-wrap:wrap; gap:16px 20px; align-items:flex-end;}
/* Shared layout for option rows that mix inputs/selects/sliders (presets, watermark, meme, gif, flip, rename). */
.rowfields{display:flex; flex-wrap:wrap; gap:10px 12px; align-items:flex-end;}
.rowfields .w-text{width:150px; max-width:100%;}
.rowfields .w-num{width:70px;}
.adj{display:flex; flex-direction:column; gap:5px;}
.adj-lab{font-size:11.5px; color:var(--ink-soft);}
.adj-lab b{color:var(--accent); font-weight:600;}
.adj input[type=range]{width:130px;}
.opt-group input[type=color]{width:38px; height:34px; padding:2px; border:1px solid var(--line); border-radius:6px; background:var(--surface); cursor:pointer;}
.rename-example{font-size:12px; color:var(--ink-soft); align-self:center;}
.preset-dims{font-size:12px; color:var(--accent); align-self:center;}
.opt-group #opt-preset{max-width:240px;}
.resize-fields{display:inline-flex; align-items:center; gap:8px; font-size:13px; color:var(--ink-soft);}
.resize-fields .keep{display:inline-flex; align-items:center; gap:5px; font-size:12.5px;}
#opt-quality-val{color:var(--accent);}

.ws-layout{display:grid; grid-template-columns:1fr 220px; gap:28px; padding-top:20px;}
.thumb-grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(140px,1fr)); gap:16px;}
.thumb{
  aspect-ratio:1/1; background:var(--surface); border:1px solid var(--line);
  border-radius:8px; position:relative; cursor:grab; overflow:hidden;
}
.thumb img{
  position:absolute; inset:0; width:100%; height:100%;
  object-fit:contain; background:#f0f1f3; z-index:0; padding:6px;
  transition:transform .15s ease;
}
.thumb-info{
  position:absolute; left:0; right:0; bottom:0; z-index:1;
  font-size:10.5px; color:#fff; padding:5px 8px;
  background:linear-gradient(transparent, rgba(20,23,26,.72));
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.thumb.dragging{opacity:.35; cursor:grabbing;}
.thumb:active{cursor:grabbing;}
.thumb:focus-visible{outline:2px solid var(--accent); outline-offset:2px;}
.thumb-controls{position:absolute; top:5px; right:5px; z-index:2; display:none; gap:3px; flex-wrap:wrap; justify-content:flex-end; max-width:calc(100% - 10px);}
.thumb:hover .thumb-controls, .thumb:focus-within .thumb-controls{display:flex;}
.thumb-controls button{
  font-family:inherit; font-size:12px; line-height:1; width:24px; height:24px; padding:0;
  background:rgba(255,255,255,.94); border:1px solid var(--line); border-radius:5px; color:var(--ink); cursor:pointer;
}
.thumb-controls button:hover{border-color:var(--accent); color:var(--accent);}
@media (hover:none){ .thumb-controls{display:flex;} }

.ad-side{
  position:sticky; top:24px; align-self:start; width:220px; height:600px;
  background:var(--ad); border:1px solid var(--ad-line); border-radius:8px;
}

.ws-actionbar{
  position:fixed; left:0; right:0; bottom:0;
  background:var(--surface); border-top:1px solid var(--line);
  padding:16px 24px; display:flex; justify-content:center; z-index:40;
}
.action-btn{
  background:var(--accent); color:#fff; border:none;
  padding:13px 34px; border-radius:7px; font-size:15px; font-weight:600; font-family:inherit; cursor:pointer;
}
.action-btn:disabled{opacity:.55; cursor:progress;}

.ad-anchor{
  position:fixed; left:0; right:0; bottom:64px; z-index:39;
  background:var(--ad); border-top:1px solid var(--ad-line); min-height:50px;
}
@media (min-width:761px){ .ad-anchor{display:none !important;} }

/* ================= DIALOG OVERLAYS (zoom + crop) ================= */
.overlay{
  position:fixed; inset:0; z-index:70; background:rgba(20,23,26,.82);
  display:flex; align-items:center; justify-content:center; flex-direction:column;
}
.zoom-overlay{cursor:zoom-out;}
.zoom-overlay img{
  max-width:92vw; max-height:86vh; width:auto; height:auto;
  background:var(--surface); border-radius:4px; box-shadow:0 10px 40px rgba(0,0,0,.45);
}
.ov-close{
  position:fixed; top:14px; right:16px; width:36px; height:36px; border-radius:50%;
  background:rgba(255,255,255,.12); border:1px solid rgba(255,255,255,.35); color:#fff; font-size:15px; cursor:pointer;
}

/* Crop */
.crop-stage{position:relative; max-width:88vw; max-height:74vh; line-height:0;}
.crop-stage img{max-width:88vw; max-height:74vh; width:auto; height:auto; user-select:none; -webkit-user-drag:none;}
.redact-canvas{max-width:88vw; max-height:74vh; cursor:crosshair; touch-action:none; border-radius:2px;}
.redact-hint{color:rgba(255,255,255,.8); font-size:12.5px; margin-right:6px;}
.crop-box{
  position:absolute; border:1px solid #fff; box-shadow:0 0 0 9999px rgba(20,23,26,.55);
  cursor:move; touch-action:none;
}
.crop-handle{
  position:absolute; width:14px; height:14px; background:#fff; border:1px solid var(--accent);
  border-radius:2px; touch-action:none;
}
.crop-handle.nw{left:-7px; top:-7px; cursor:nwse-resize;}
.crop-handle.ne{right:-7px; top:-7px; cursor:nesw-resize;}
.crop-handle.se{right:-7px; bottom:-7px; cursor:nwse-resize;}
.crop-handle.sw{left:-7px; bottom:-7px; cursor:nesw-resize;}
.crop-toolbar{
  display:flex; gap:8px; flex-wrap:wrap; justify-content:center; align-items:center;
  margin-top:18px; padding:0 16px;
}
.crop-ratio{
  font-family:inherit; font-size:12.5px; padding:7px 12px; border-radius:6px; cursor:pointer;
  background:rgba(255,255,255,.12); border:1px solid rgba(255,255,255,.3); color:#fff;
}
.crop-ratio[aria-pressed=true]{background:#fff; color:var(--ink); font-weight:600;}
.crop-cancel{
  font-family:inherit; font-size:13px; padding:9px 18px; border-radius:6px; cursor:pointer;
  background:transparent; border:1px solid rgba(255,255,255,.4); color:#fff; margin-left:6px;
}
.crop-apply{
  font-family:inherit; font-size:13px; font-weight:600; padding:9px 20px; border-radius:6px; cursor:pointer;
  background:var(--accent); border:1px solid var(--accent); color:#fff;
}

/* ================= DOWNLOAD ================= */
.dl-shell{max-width:640px; margin:0 auto; padding:80px 24px 60px; text-align:center;}
.dl-check{width:46px; height:46px; margin:0 auto 22px; border:1.5px solid var(--ok); border-radius:50%; position:relative;}
.dl-check::after{
  content:""; position:absolute; left:32%; top:48%;
  width:6px; height:12px; border-right:2px solid var(--ok); border-bottom:2px solid var(--ok);
  transform:translate(-50%,-60%) rotate(45deg);
}
.dl-shell h1{font-size:26px; margin:0 0 10px; letter-spacing:-0.02em;}
.dl-shell h1:focus{outline:none;}
.dl-stats{font-size:13px; color:var(--ink-soft); margin-bottom:36px;}
.download-btn{
  background:var(--ink); color:#fff; border:none;
  padding:15px 40px; border-radius:7px; font-size:16px; font-weight:600; font-family:inherit; cursor:pointer; margin-bottom:8px;
}
.dl-filesize{font-size:12px; color:var(--ink-soft); margin-bottom:14px;}
.dl-again{margin:0 0 44px;}
.dl-again a{font-size:13px;}
.other-tools{border-top:1px solid var(--line); padding-top:28px; margin-bottom:40px;}
.other-tools p{font-size:12px; color:var(--ink-soft); margin:0 0 14px; text-transform:uppercase; letter-spacing:.06em;}
.tool-links{display:flex; gap:10px; justify-content:center; flex-wrap:wrap;}
.tool-links a{font-size:13px; color:var(--ink); text-decoration:none; border:1px solid var(--line); padding:8px 14px; border-radius:6px;}
.ad-below{
  margin:0 auto 36px; max-width:560px; min-height:120px;
  background:var(--ad); border:1px solid var(--ad-line); border-radius:8px; padding:22px; font-size:12px; color:var(--ink-soft);
}

/* ================= LEGAL PAGES ================= */
.legal{max-width:760px; padding-top:40px; padding-bottom:80px;}
.legal h1{font-size:28px; letter-spacing:-0.02em; margin:0 0 24px;}
.legal h2{font-size:17px; margin:28px 0 8px;}
.legal p, .legal li{font-size:14.5px; line-height:1.7; color:var(--ink-soft);}
.legal ol{padding-left:20px;}
.legal li{margin-bottom:10px;}
.legal .legal-block{background:var(--surface); border:1px solid var(--line); border-radius:8px; padding:16px 18px; line-height:1.9;}

/* ================= RESPONSIVE ================= */
@media (max-width:760px){
  .ws-layout{grid-template-columns:1fr;}
  .ad-side{display:none !important;}
  .ws-actionbar{padding-bottom:calc(16px + env(safe-area-inset-bottom));}
}
@media (prefers-reduced-motion:reduce){
  *{transition:none !important;}
}
