/* styles.css — 깔끔한 도구형 UI. 장식용 이모지 없이 절제된 디자인. */
:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --border: #e2e6ea;
  --text: #1c2127;
  --text-dim: #5a6473;
  --accent: #1f6feb;
  --accent-dark: #1858c4;
  --ok: #1a7f48;
  --warn: #9a6700;
  --error: #c0362c;
  --radius: 10px;
  --radius-sm: 7px;
  --shadow: 0 1px 2px rgba(20, 30, 45, .06), 0 4px 16px rgba(20, 30, 45, .05);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Malgun Gothic", "Apple SD Gothic Neo", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; }
a { color: var(--accent); }

/* ---------- 헤더 ---------- */
.app-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px; background: var(--surface); border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 38px; height: 38px; flex: 0 0 38px; }
.brand-mark img, .brand-mark svg { width: 38px; height: 38px; display: block; }
.brand-name { font-weight: 700; font-size: 16px; }
.brand-tag { font-size: 12.5px; color: var(--text-dim); }
.lang-btn {
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 600;
}
.lang-btn:hover { background: var(--surface-2); }

/* ---------- 프라이버시 배너 ---------- */
.privacy-banner {
  display: flex; align-items: center; gap: 9px; justify-content: center;
  padding: 9px 16px; font-size: 13px; color: #0c4a2e;
  background: #e8f6ee; border-bottom: 1px solid #cfead9;
}
.pb-icon { display: inline-flex; color: var(--ok); }

/* ---------- 레이아웃 ---------- */
.layout { display: flex; align-items: flex-start; max-width: 1180px; margin: 0 auto; padding: 22px; gap: 22px; }
.sidebar { width: 232px; flex: 0 0 232px; position: sticky; top: 22px; }
.content { flex: 1 1 auto; min-width: 0; }

.app-nav { display: flex; flex-direction: column; gap: 6px; }
.nav-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  text-align: left; border: 1px solid transparent; background: transparent;
  padding: 11px 13px; border-radius: var(--radius-sm); color: var(--text); font-size: 14px; font-weight: 500;
}
.nav-item:hover { background: var(--surface-2); }
.nav-item.active { background: var(--surface); border-color: var(--border); box-shadow: var(--shadow); color: var(--accent); font-weight: 700; }
.nav-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.nav-hint { font-size: 11px; color: var(--text-dim); font-weight: 400; line-height: 1.25; }
.nav-item.active .nav-hint { color: var(--text-dim); }
.nav-badge {
  font-size: 10.5px; font-weight: 600; color: var(--text-dim);
  background: var(--surface-2); border: 1px solid var(--border); padding: 1px 7px; border-radius: 999px;
}
.nav-item.active .nav-badge { background: var(--surface-2); }

/* ---------- 도구 패널 ---------- */
.tool { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.tool h2 { margin: 0 0 6px; font-size: 20px; }
.tool-desc { margin: 0 0 18px; color: var(--text-dim); font-size: 14px; }

/* 드롭존 */
.dropzone {
  border: 2px dashed var(--border); border-radius: var(--radius); background: var(--surface-2);
  padding: 34px 20px; text-align: center; transition: border-color .15s, background .15s; outline: none;
}
.dropzone:hover, .dropzone:focus-visible { border-color: var(--accent); background: #eef4ff; }
.dropzone.dragover { border-color: var(--accent); background: #e6efff; }
.dz-icon { color: var(--accent); display: flex; justify-content: center; margin-bottom: 8px; }
.dz-prompt { margin: 0; font-weight: 600; }
.dz-hint { margin: 4px 0 0; font-size: 12.5px; color: var(--text-dim); }

/* 선택된 파일 목록 */
.filelist { margin-top: 18px; }
.filelist-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.fl-title { font-weight: 600; font-size: 14px; }
.fl-count { color: var(--text-dim); font-weight: 500; }
.btn-text { border: none; background: none; color: var(--accent); font-size: 13px; font-weight: 600; padding: 4px 6px; border-radius: 6px; }
.btn-text:hover { background: var(--surface-2); }
.filelist-body { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 10px; }
.file-card, .result-card {
  display: flex; align-items: center; gap: 10px; padding: 9px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--surface); position: relative;
}
.thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; background: var(--surface-2); flex: 0 0 44px; }
.thumb.doc { display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--accent); }
.thumb.checker { object-fit: contain; background-color: #fff; background-image: linear-gradient(45deg, #d8dde3 25%, transparent 25%), linear-gradient(-45deg, #d8dde3 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #d8dde3 75%), linear-gradient(-45deg, transparent 75%, #d8dde3 75%); background-size: 12px 12px; background-position: 0 0, 0 6px, 6px -6px, -6px 0; }
.file-meta { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.file-name { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-size { font-size: 11.5px; color: var(--text-dim); }
.save-badge { display: inline-block; font-size: 11.5px; font-weight: 700; color: var(--text-dim); }
.save-badge.good { color: var(--ok); }
.file-remove { border: none; background: none; color: var(--text-dim); font-size: 13px; padding: 4px 6px; border-radius: 6px; }
.file-remove:hover { color: var(--error); background: var(--surface-2); }

/* 옵션 */
.options { margin-top: 20px; display: flex; flex-direction: column; gap: 14px; max-width: 560px; }
.opt-row { display: flex; align-items: center; gap: 14px; }
.opt-label { width: 110px; flex: 0 0 110px; font-size: 13.5px; font-weight: 600; color: var(--text-dim); }
.check-inline { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-dim); cursor: pointer; user-select: none; }
.check-inline input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.select, .num, input[type="number"] {
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 10px; font-size: 14px;
  background: var(--surface); color: var(--text); min-width: 0;
}
.select { min-width: 200px; }
.num { width: 110px; }
.resize-fields label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--text-dim); }
.resize-fields { padding-left: 124px; gap: 18px; }
.range-wrap { display: flex; align-items: center; gap: 12px; }
.range { width: 220px; }
.idp-stage { margin-top: 18px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.idp-frame { border-radius: 8px; box-shadow: 0 2px 14px rgba(0,0,0,.14); background: #fff; cursor: grab; touch-action: none; }
.idp-frame.grabbing { cursor: grabbing; }
.idp-tip { font-size: 12.5px; color: var(--text-dim); margin: 0; }
.sign-stage { position: relative; display: inline-block; margin-top: 12px; touch-action: none; max-width: 100%; }
.sign-page { display: block; border: 1px solid var(--border); border-radius: 6px; box-shadow: 0 2px 12px rgba(0,0,0,.10); max-width: 100%; }
.sign-box { position: absolute; border: 1.5px dashed var(--accent); border-radius: 4px; cursor: move; box-sizing: border-box; background: rgba(31,111,235,.06); touch-action: none; }
.sign-box img { width: 100%; height: 100%; display: block; pointer-events: none; }
.sign-nav { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.sign-pageno { font-size: 13px; color: var(--text-dim); min-width: 56px; text-align: center; }
.sign-draw { display: flex; flex-direction: column; gap: 8px; }
.sign-pad { border: 1px solid var(--border); border-radius: 8px; background: #fff; touch-action: none; cursor: crosshair; max-width: 100%; }
.btn-ghost { border: 1px solid var(--border); background: var(--surface); border-radius: 8px; width: 38px; height: 34px; font-size: 18px; line-height: 1; cursor: pointer; color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); }
.hwp-view { margin-top: 16px; max-height: 560px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; background: #f3f4f6; padding: 10px; }
.hwp-view > * { margin-left: auto; margin-right: auto; box-shadow: 0 1px 8px rgba(0,0,0,.10); background: #fff; }
.range-val { font-size: 13px; font-weight: 600; color: var(--text); min-width: 28px; }

/* 액션 */
.actions { margin-top: 22px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.btn-primary {
  background: var(--accent); color: #fff; border: none; padding: 11px 22px; border-radius: var(--radius-sm);
  font-size: 14.5px; font-weight: 700;
}
.btn-primary:hover { background: var(--accent-dark); }
.btn-primary:disabled { opacity: .55; cursor: default; }
.btn-secondary { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); padding: 9px 16px; border-radius: var(--radius-sm); font-size: 13.5px; font-weight: 600; }
.btn-secondary:hover { background: #e6eaef; }
.btn-download { background: var(--accent); color: #fff; border: none; padding: 7px 13px; border-radius: 6px; font-size: 12.5px; font-weight: 600; flex: 0 0 auto; }
.btn-download:hover { background: var(--accent-dark); }

.status { font-size: 13.5px; color: var(--text-dim); }
.status.busy { color: var(--accent); }
.status.ok { color: var(--ok); font-weight: 600; }
.status.warn { color: var(--warn); }
.status.error { color: var(--error); font-weight: 600; }

/* 결과 */
.results { margin-top: 20px; display: flex; flex-direction: column; gap: 10px; }
.results:empty { margin-top: 0; }
.results-bar { margin-bottom: 4px; }
.result-card { max-width: 420px; }

/* 준비 중 */
.coming { padding: 30px 0; }
.coming-badge { display: inline-block; font-size: 12px; font-weight: 700; color: var(--accent); background: #eaf1ff; border: 1px solid #cfe0ff; padding: 4px 12px; border-radius: 999px; }

/* 푸터 */
.app-footer { margin-top: 16px; padding: 14px 4px; font-size: 12.5px; color: var(--text-dim); text-align: center; }

/* 텍스트 결과(예: PDF→텍스트) */
.tool-desc.small { font-size: 12.5px; margin: -6px 0 0; }
.num.wide { width: 200px; }
.text-result { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; background: var(--surface); }
.text-result-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.text-actions { display: flex; gap: 8px; }
.text-out { width: 100%; box-sizing: border-box; border: 1px solid var(--border); border-radius: 6px; padding: 10px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; resize: vertical; background: var(--surface-2); color: var(--text); }
.html-preview { border: 1px solid var(--border); border-radius: 6px; padding: 14px; background: #fff; max-height: 420px; overflow: auto; }
.html-preview img { max-width: 100%; height: auto; }
.html-preview table { border-collapse: collapse; }
.html-preview td, .html-preview th { border: 1px solid var(--border); padding: 4px 8px; }
.filelist-body.simple { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

/* 경고 박스(서버 경유 고지) */
.warn-box { display: flex; align-items: flex-start; gap: 10px; background: #fff7e6; border: 1px solid #ffe0a3; color: #7a5200; padding: 12px 14px; border-radius: var(--radius-sm); font-size: 13px; margin: 0 0 18px; }
.warn-icon { display: grid; place-items: center; width: 20px; height: 20px; flex: 0 0 20px; border-radius: 50%; background: #f0a500; color: #fff; font-weight: 800; font-size: 13px; }

/* ---------- 정적 콘텐츠(SEO/AdSense) · 이중언어 토글 ---------- */
.lang-en { display: none; }
html[lang="en"] .lang-ko { display: none; }
html[lang="en"] .lang-en { display: revert; }

.site-content { max-width: 1180px; margin: 0 auto; padding: 8px 22px 0; }
.content-section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px 28px; margin: 18px 0; }
.content-section h2 { margin: 0 0 12px; font-size: 21px; }
.content-section h3 { margin: 18px 0 6px; font-size: 16px; }
.content-section p { margin: 8px 0; color: #333a44; }
.content-section ul { margin: 8px 0; padding-left: 20px; color: #333a44; }
.content-section li { margin: 4px 0; }
.lead { font-size: 15.5px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 14px; }
.step { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px; }
.step .num { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; margin-bottom: 8px; }
.step h3 { margin: 0 0 4px; font-size: 15px; }
.step p { margin: 0; font-size: 13.5px; }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 12px; }
.feature { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; background: var(--surface); }
.feature h3 { margin: 0 0 4px; font-size: 15px; }
.feature p { margin: 0; font-size: 13.5px; }

.tool-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-top: 12px; }
.tool-card { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; }
.tool-card h3 { margin: 0 0 4px; font-size: 15px; color: var(--accent); }
.tool-card p { margin: 0; font-size: 13.5px; }

/* FAQ */
.faq-item { border-top: 1px solid var(--border); padding: 14px 0; }
.faq-item:first-of-type { border-top: none; }
.faq-item summary { font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; color: var(--accent); font-weight: 700; }
.faq-item[open] summary::after { content: '–'; }
.faq-item p { margin: 10px 0 0; color: #333a44; font-size: 14px; }

/* 광고 슬롯 */
.ad-slot { margin: 16px auto; text-align: center; min-height: 0; max-width: 1180px; padding: 0 22px; }
.ad-slot ins { display: block; }
.ad-label { font-size: 10.5px; color: #9aa3ad; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }

/* 사이트 푸터 */
.site-footer { max-width: 1180px; margin: 26px auto 0; padding: 22px; border-top: 1px solid var(--border); color: var(--text-dim); font-size: 13px; }
.site-footer .links { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 10px; }
.site-footer a { color: var(--text-dim); text-decoration: none; }
.site-footer a:hover { color: var(--accent); text-decoration: underline; }
.site-footer .copyright { font-size: 12px; }

/* 동의 배너 */
.consent { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: #1c2127; color: #eef1f5; padding: 14px 18px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: center; box-shadow: 0 -2px 14px rgba(0,0,0,.18); }
.consent p { margin: 0; font-size: 13px; max-width: 760px; }
.consent a { color: #8fc0ff; }
.consent .c-actions { display: flex; gap: 8px; }
.consent button { border: none; border-radius: 6px; padding: 8px 16px; font-size: 13px; font-weight: 600; cursor: pointer; }
.c-accept { background: var(--accent); color: #fff; }
.c-reject { background: #3a424d; color: #eef1f5; }

/* 법적/정보 페이지 */
.page-wrap { max-width: 820px; margin: 0 auto; padding: 28px 22px 0; }
.page-wrap h1 { font-size: 26px; margin: 0 0 6px; }
.page-wrap h2 { font-size: 18px; margin: 22px 0 6px; }
.page-wrap p, .page-wrap li { color: #333a44; line-height: 1.7; }
.page-wrap .updated { color: var(--text-dim); font-size: 13px; margin-bottom: 18px; }
.back-link { display: inline-block; margin-top: 8px; color: var(--accent); text-decoration: none; font-weight: 600; }

/* 랜딩 페이지 */
.landing-wrap { max-width: 920px; }
.landing-wrap h1 { font-size: 26px; margin: 0 0 8px; }
.landing-wrap .lead { color: #333a44; }
.crumbs { font-size: 12.5px; color: var(--text-dim); margin-bottom: 10px; }
.crumbs a { color: var(--text-dim); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.landing-tool { padding: 20px; margin: 18px 0; }
.tool-fallback { color: #333a44; line-height: 1.7; }
.tool-fallback p { margin: 0 0 8px; }
.tool-fallback-note { font-size: 13px; color: var(--text-dim); }
.landing-tool h2 { font-size: 15px; color: var(--text-dim); font-weight: 600; margin: 0 0 4px; }
.landing-tool .tool-desc { font-size: 13px; margin-bottom: 14px; }
.landing-wrap ol, .landing-wrap ul { line-height: 1.75; color: #333a44; padding-left: 20px; }
.landing-wrap li { margin: 5px 0; }
.conv-links { display: flex; flex-wrap: wrap; gap: 8px; }
.conv-links a { display: inline-block; border: 1px solid var(--border); border-radius: 999px; padding: 7px 14px; font-size: 13px; color: var(--accent); text-decoration: none; background: var(--surface); }
.conv-links a:hover { background: var(--surface-2); }

@media (max-width: 760px) {
  .steps { grid-template-columns: 1fr; }
  .site-content { padding: 8px 14px 0; }
  .content-section { padding: 18px; }
  .ad-slot { padding: 0 14px; }
}

/* ---------- 접근성·완성도 보강 ---------- */
/* 키보드 포커스 표시 */
.nav-item:focus-visible, .btn-primary:focus-visible, .btn-secondary:focus-visible,
.btn-download:focus-visible, .btn-text:focus-visible, .file-remove:focus-visible,
.file-move:focus-visible, .conv-links a:focus-visible, .back-link:focus-visible,
.site-footer a:focus-visible, .faq-item summary:focus-visible, .brand:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px;
}
.lang-btn:focus-visible, .dropzone:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(31, 111, 235, .35); }

/* 부드러운 상태 전환 */
.nav-item, .btn-primary, .btn-secondary, .btn-download, .btn-text, .lang-btn,
.file-remove, .file-move, .conv-links a, .site-footer a {
  transition: background-color .12s ease, color .12s ease, border-color .12s ease, box-shadow .12s ease;
}
.btn-primary:hover:not(:disabled) { background: var(--accent-dark); }

/* 헤더·배너를 본문(1180px 중앙) 기준선과 정렬 */
.app-header { padding-left: max(22px, calc((100% - 1180px) / 2)); padding-right: max(22px, calc((100% - 1180px) / 2)); }
.privacy-banner { padding-left: max(16px, calc((100% - 1180px) / 2)); padding-right: max(16px, calc((100% - 1180px) / 2)); }

/* 선택된 파일 액션(순서 ↑/↓, 삭제) */
.file-actions { display: flex; align-items: center; gap: 2px; flex: 0 0 auto; }
.file-move { border: none; background: none; color: var(--text-dim); font-size: 13px; line-height: 1; padding: 6px; border-radius: 6px; cursor: pointer; }
.file-move:hover { background: var(--surface-2); color: var(--text); }
.file-move:disabled { opacity: .3; cursor: default; }

/* 변환 중 입력 잠금 */
.busy .dropzone, .busy .filelist, .busy .btn-text, .busy .options { pointer-events: none; opacity: .6; }

/* 본문 바로가기(skip link) */
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0; font-weight: 600; }
.skip-link:focus { left: 0; }

/* ---------- 변환 시각화: 파일 배지 + 화살표 ---------- */
.conv-hero { display: flex; align-items: center; justify-content: center; gap: 20px; flex-wrap: wrap; margin: 4px 0 20px; padding: 18px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); }
.fmt-badge { display: flex; flex-direction: column; align-items: center; gap: 7px; }
.fmt-badge .doc { position: relative; width: 64px; height: 80px; background: #fff; border: 1px solid var(--border); border-radius: 9px; box-shadow: var(--shadow); display: flex; align-items: flex-end; overflow: hidden; }
.fmt-badge .doc::before { content: ''; position: absolute; top: 0; right: 0; border-style: solid; border-width: 0 18px 18px 0; border-color: transparent var(--surface-2) transparent transparent; }
.fmt-badge .tag { width: 100%; text-align: center; color: #fff; font-weight: 800; font-size: 12.5px; letter-spacing: .02em; padding: 5px 0; }
.fmt-badge .name { font-size: 12px; color: var(--text-dim); }
.conv-arrow { display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--accent); }
.conv-arrow svg { width: 32px; height: 32px; }
.conv-arrow .op { font-size: 11.5px; color: var(--text-dim); font-weight: 600; }

/* 홈 '어떻게 사용하나요' 단계 아이콘 */
.step-ico { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px; background: #eaf1ff; color: var(--accent); margin-bottom: 10px; }
.step-ico svg { width: 22px; height: 22px; }

/* QR 코드 생성 */
.qr-field { margin: 6px 0 16px; }
.qr-field > label { display: block; font-weight: 600; font-size: 13.5px; color: var(--text); margin-bottom: 6px; }
.qr-input { width: 100%; box-sizing: border-box; border: 1px solid var(--border); border-radius: 7px; padding: 10px; font-size: 14px; resize: vertical; background: var(--surface); color: var(--text); }
.color { width: 52px; height: 34px; padding: 2px; border: 1px solid var(--border); border-radius: 7px; background: #fff; cursor: pointer; }
.qr-result { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.qr-preview { border: 1px solid var(--border); border-radius: 8px; background: #fff; image-rendering: pixelated; }
.qr-actions { display: flex; gap: 8px; }

.hidden { display: none !important; }

/* 반응형: 좁은 화면에서는 사이드바를 상단 가로 탭으로 */
@media (max-width: 760px) {
  .layout { flex-direction: column; padding: 14px; gap: 14px; }
  .sidebar { width: 100%; flex: none; position: static; }
  .app-nav { flex-direction: row; flex-wrap: wrap; }
  .nav-item { flex: 1 1 auto; justify-content: center; }
  .nav-item.active { box-shadow: inset 0 -2px 0 var(--accent); }
  .nav-badge { display: none; }
  .nav-hint { display: none; }
  .tool { padding: 18px; }
  .opt-row { flex-direction: column; align-items: stretch; }
  .opt-label { width: auto; }
  .resize-fields { padding-left: 0; }
  .filelist-body { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  /* 폼 컨트롤 풀폭 + 터치 타깃 ≥40px */
  .select, .num, .num.wide, input[type="number"] { width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; }
  .range-wrap { width: 100%; }
  .range-wrap .range { flex: 1 1 auto; width: auto; min-width: 0; }
  .file-move, .file-remove { min-width: 40px; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
  .btn-text, .lang-btn, .btn-download, .btn-secondary { min-height: 40px; display: inline-flex; align-items: center; }
}
