/* ineedimg 공통 스타일 */
:root {
  --bg: #f6f6fa; --card: #fff; --text: #1a1c27; --muted: #646a7a; --line: #e3e4ee;
  --accent: #6246ea; --accent-2: #4f35d2; --accent-text: #fff; --soft: #efecff; --ok: #138a4b; --bad: #d23a3a;
  --shadow: 0 1px 2px rgba(25, 25, 60, .05), 0 10px 30px rgba(25, 25, 60, .06);
  --chk: #e6e6ee;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) { --bg: #0f1016; --card: #181a23; --text: #e8e9f0; --muted: #9a9fb0; --line: #2a2d3a;
    --accent: #8b78ff; --accent-2: #a294ff; --accent-text: #fff; --soft: #221f3a; --ok: #41c983; --bad: #f07272;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .25); --chk: #2b2d38; }
}
:root[data-theme=dark] { --bg: #0f1016; --card: #181a23; --text: #e8e9f0; --muted: #9a9fb0; --line: #2a2d3a;
  --accent: #8b78ff; --accent-2: #a294ff; --accent-text: #fff; --soft: #221f3a; --ok: #41c983; --bad: #f07272;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .25); --chk: #2b2d38; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.55;
  font-family: system-ui, -apple-system, "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; }
a { color: var(--accent); }
img, canvas { max-width: 100%; }
[hidden] { display: none !important; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* 머리말 */
.hdr { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.hdr .wrap { display: flex; align-items: center; gap: 12px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 19px; color: var(--text); text-decoration: none; letter-spacing: -.3px; }
.brand svg { width: 30px; height: 30px; flex: none; }
.brand em { font-style: normal; color: var(--accent); }
.hdr .sp { flex: 1; }
.lang { font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; padding: 7px 11px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); }
.lang:hover { color: var(--accent); border-color: var(--accent); }
.theme { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; padding: 0; }
.theme svg { width: 18px; height: 18px; }
.theme .sun { display: none; }
:root[data-dark] .theme .sun { display: block; } :root[data-dark] .theme .moon { display: none; }

/* 휴대폰 ≡ 메뉴 */
.menu { display: none; width: 38px; height: 38px; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; padding: 0; }
.menu svg { width: 20px; height: 20px; }
.menu .x, .menu[aria-expanded="true"] .bars { display: none; } .menu[aria-expanded="true"] .x { display: block; }
.mnav { position: absolute; left: 0; right: 0; top: 100%; background: var(--card); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); max-height: calc(100vh - 60px); overflow-y: auto; }
.mnav .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; height: auto; padding-top: 10px; padding-bottom: 12px; }
.mnav a { display: flex; align-items: center; gap: 8px; padding: 11px 10px; border-radius: 12px; font-size: 15px; font-weight: 600; color: var(--text); text-decoration: none; }
.mnav a svg { width: 18px; height: 18px; flex: none; color: var(--accent); }
.mnav a:hover { background: var(--soft); }
.mnav a[aria-current] { background: var(--soft); color: var(--accent); }
.mnav a.sub { grid-column: 1 / -1; color: var(--muted); font-weight: 500; font-size: 14px; }
@media (max-width: 720px) { .menu { display: grid; } .tnav { display: none; } }
@media (min-width: 721px) { .mnav { display: none; } }

/* 도구 메뉴 */
.tnav { border-bottom: 1px solid var(--line); background: var(--card); }
.tnav .wrap { position: relative; display: flex; gap: 6px; overflow-x: auto; padding-top: 8px; padding-bottom: 8px; scrollbar-width: none; }
.tnav .wrap::-webkit-scrollbar { display: none; }
.tnav a { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 99px; font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; white-space: nowrap; }
.tnav a svg { width: 16px; height: 16px; }
.tnav a:hover { color: var(--text); background: var(--soft); }
.tnav a[aria-current] { color: var(--accent-text); background: var(--accent); }

/* 제목 */
.head { padding: 28px 0 18px; }
.head h1 { font-size: clamp(25px, 4.4vw, 34px); line-height: 1.25; margin: 0 0 8px; letter-spacing: -.5px; }
.head p { margin: 0; color: var(--muted); font-size: 16px; max-width: 720px; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.badges span { font-size: 12.5px; font-weight: 600; color: var(--accent); background: var(--soft); border-radius: 99px; padding: 4px 10px; }

/* 카드·입력 */
.box { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px; box-shadow: var(--shadow); margin-bottom: 16px; }
.drop { display: block; width: 100%; border: 2px dashed var(--line); border-radius: 16px; padding: 38px 16px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.drop:hover, .drop.on { border-color: var(--accent); background: var(--soft); }
.drop svg { display: block; margin: 0 auto 8px; width: 44px; height: 44px; color: var(--accent); }
.drop b { display: block; font-size: 18px; margin-bottom: 4px; }
.drop span { display: block; color: var(--muted); font-size: 14px; }
.drop span.desk { display: inline; }
@media (hover: none) and (pointer: coarse) { .drop span.desk { display: none; } }   /* 터치 기기엔 끌어다 놓기·붙여넣기 안내가 필요 없어요 */
.drop .pick { display: inline-block; margin-top: 12px; background: var(--accent); color: var(--accent-text); font-weight: 700; padding: 10px 20px; border-radius: 12px; font-size: 15px; }
.drop.mini { padding: 12px; } .drop.mini svg, .drop.mini b, .drop.mini span:not(.pick) { display: none; } .drop.mini .pick { margin: 0; padding: 8px 16px; font-size: 14px; }

.opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px 16px; margin-top: 16px; }
.f { display: grid; gap: 6px; align-content: start; font-size: 13.5px; color: var(--muted); font-weight: 600; }
.f .row { display: flex; gap: 8px; align-items: center; color: var(--text); font-weight: 500; }
input[type=text], input[type=number], select { font: inherit; font-size: 15px; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; width: 100%; min-width: 0; }
input[type=number] { -moz-appearance: textfield; } input::-webkit-outer-spin-button, input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input[type=range] { width: 100%; accent-color: var(--accent); }
input[type=color] { width: 44px; height: 38px; padding: 2px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); cursor: pointer; flex: none; }
label.ck { display: inline-flex; gap: 6px; align-items: center; font-weight: 500; color: var(--text); cursor: pointer; }
input[type=checkbox] { accent-color: var(--accent); width: 17px; height: 17px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button, .chip { font: inherit; font-size: 14px; font-weight: 600; border: 1px solid var(--line); background: var(--bg); color: var(--text); border-radius: 10px; padding: 8px 12px; cursor: pointer; }
.seg button[aria-pressed=true], .chip[aria-pressed=true] { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn { font: inherit; font-size: 15px; font-weight: 700; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-text); border-radius: 12px; padding: 10px 18px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.btn:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn.sub { background: var(--card); color: var(--text); border-color: var(--line); }
.btn.sub:hover { border-color: var(--accent); color: var(--accent); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.sm { font-size: 13.5px; padding: 7px 12px; border-radius: 10px; }
.acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.muted { color: var(--muted); } .ok { color: var(--ok); } .bad { color: var(--bad); }
.note { font-size: 13.5px; color: var(--muted); margin: 10px 0 0; }
.checker { background-color: var(--card); background-image: linear-gradient(45deg, var(--chk) 25%, transparent 25%), linear-gradient(-45deg, var(--chk) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, var(--chk) 75%), linear-gradient(-45deg, transparent 75%, var(--chk) 75%);
  background-size: 20px 20px; background-position: 0 0, 0 10px, 10px -10px, -10px 0; }
.prog { margin-top: 14px; } .bar { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; } .bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.prog p { margin: 6px 0 0; font-size: 14px; color: var(--muted); }

/* 여러 장 결과 목록 */
.sum { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.sum b { font-size: 16px; }
.files { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.files li { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 14px; }
.files img { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; background: var(--bg); }
.files .nm { font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.files .mt { font-size: 13px; color: var(--muted); }
.files .mt b { color: var(--ok); }
.files .mt b.up { color: var(--bad); }
.files .x { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 18px; padding: 4px 8px; }

/* 편집 화면 */
.stage { position: relative; margin: 0 auto; width: fit-content; max-width: 100%; border-radius: 12px; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.stage canvas { display: block; max-width: 100%; max-height: 70vh; width: auto; height: auto; }
.tools { display: grid; gap: 12px; margin-top: 14px; }
.tr { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 14px; }
.tr > b { min-width: 64px; font-size: 13px; color: var(--muted); }
@media (max-width: 520px) { .tr > b { min-width: 100%; } }

/* 설명 */
.doc { margin: 34px 0 10px; }
.doc h2 { font-size: 22px; margin: 0 0 14px; letter-spacing: -.3px; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 0 0 30px; padding: 0; list-style: none; counter-reset: s; }
.steps li { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px 16px 16px 54px; position: relative; font-size: 14.5px; counter-increment: s; }
.steps li::before { content: counter(s); position: absolute; left: 16px; top: 15px; width: 26px; height: 26px; border-radius: 50%; background: var(--soft); color: var(--accent); font-weight: 800; display: grid; place-items: center; font-size: 14px; }
.steps b { display: block; margin-bottom: 2px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 0 16px; margin-bottom: 8px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 14px 0; font-size: 15px; }
.faq details p { margin: 0 0 14px; font-size: 14.5px; color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.tc { display: block; text-decoration: none; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px; transition: border-color .15s, transform .15s; }
.tc:hover { border-color: var(--accent); transform: translateY(-2px); }
.tc .ic { width: 44px; height: 44px; border-radius: 13px; background: var(--soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 12px; }
.tc .ic svg { width: 23px; height: 23px; }
.tc h3 { margin: 0 0 4px; font-size: 16.5px; }
.tc p { margin: 0; font-size: 13.5px; color: var(--muted); }

/* 홈 */
.hero { padding: 44px 0 26px; text-align: center; }
.hero h1 { font-size: clamp(30px, 6vw, 46px); line-height: 1.18; margin: 0 0 12px; letter-spacing: -1px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p { color: var(--muted); font-size: 17px; margin: 0 auto; max-width: 620px; }
.hero .badges { justify-content: center; }
.feat { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 30px 0; }
.feat div { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; font-size: 14px; color: var(--muted); }
.feat b { display: block; color: var(--text); font-size: 15.5px; margin-bottom: 4px; }
.page { max-width: 760px; } .page h2 { font-size: 19px; margin: 26px 0 8px; } .page p, .page li { font-size: 15px; }

/* 꼬리말·언어 안내 */
.ftr { border-top: 1px solid var(--line); margin-top: 46px; padding: 26px 0 40px; font-size: 13.5px; color: var(--muted); }
.ftr .wrap { display: grid; gap: 10px; }
.ftr nav { display: flex; flex-wrap: wrap; gap: 6px 16px; } .ftr a { color: var(--muted); text-decoration: none; } .ftr a:hover { color: var(--accent); }
.langbar { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 30; display: flex; gap: 10px; align-items: center; background: var(--text); color: var(--bg); padding: 10px 12px 10px 16px; border-radius: 14px; font-size: 14px; box-shadow: var(--shadow); max-width: calc(100% - 32px); }
.langbar { width: max-content; } .langbar span { flex: 1; } .langbar a { color: var(--bg); font-weight: 700; white-space: nowrap; } .langbar button { border: 0; background: none; color: var(--bg); cursor: pointer; font-size: 17px; padding: 0 4px; }
