/* 유즈킷 — 블로그 글자수·금칙어·썸네일 도구
   외부 폰트·아이콘·스크립트를 불러오지 않는 자체 완결형 스타일시트 */

:root {
  --bg: #f5f7fc;
  --bg-soft: #eef1f9;
  --card: #ffffff;
  --ink: #141b2d;
  --ink-2: #38415a;
  --muted: #68718a;
  --line: #e2e6f0;
  --line-strong: #cdd4e4;
  --brand: #3b5bfd;
  --brand-dark: #2b45d6;
  --brand-soft: #eef1ff;
  --ok: #0a8f52;
  --warn: #b45309;
  --danger: #c2413b;
  --radius: 16px;
  --radius-sm: 11px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 14px 32px -18px rgba(16, 24, 40, .28);
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui,
          "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  word-break: keep-all;
  overflow-wrap: break-word;
}

h1, h2, h3 { line-height: 1.3; letter-spacing: -.02em; margin: 0 0 .5em; font-weight: 800; }
h1 { font-size: clamp(1.5rem, 3.9vw, 2.3rem); }
h2 { font-size: clamp(1.2rem, 2.4vw, 1.55rem); margin-top: 0; }
h3 { font-size: 1.02rem; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; }
canvas { display: block; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.note { color: var(--muted); font-size: .84rem; margin: .5em 0 0; }
.note.warn { color: var(--warn); }
.tiny { font-size: .8rem; }
.muted { color: var(--muted); }
a.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: #fff; color: var(--brand-dark); font-weight: 700; padding: 10px 16px;
  border-radius: 0 0 10px 0;
}
a.skip:focus { left: 0; }

/* ---------------- 자체 헤더(통합 배포 시 공통 헤더로 교체됨) ---------------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-head .head-in { display: flex; align-items: center; gap: 16px; height: 64px; }
.site-head .brand, .site-foot .brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; }
.brand-txt { display: flex; flex-direction: column; line-height: 1.05; }
.brand-txt strong { font-size: 1rem; letter-spacing: -.01em; }
.brand-txt span { font-size: .64rem; color: var(--muted); letter-spacing: .08em; }
.head-nav { display: flex; gap: 18px; margin-left: 10px; }
.head-nav a { color: var(--ink-2); font-size: .92rem; font-weight: 600; }

.btn {
  --btn-bg: #fff; --btn-fg: var(--ink); --btn-bd: var(--line-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 16px; border-radius: 11px; border: 1px solid var(--btn-bd);
  background: var(--btn-bg); color: var(--btn-fg); font-weight: 700; font-size: .92rem;
  cursor: pointer; transition: background .15s, border-color .15s, transform .1s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { --btn-bg: var(--brand); --btn-fg: #fff; --btn-bd: transparent; box-shadow: 0 8px 18px -10px rgba(59, 91, 253, .9); }
.btn-primary:hover:not(:disabled) { background: var(--brand-dark); }
.btn-ghost { --btn-fg: var(--ink-2); --btn-bd: transparent; --btn-bg: transparent; }
.btn-sm { padding: 7px 11px; font-size: .82rem; border-radius: 9px; }
.link-btn {
  border: 0; background: none; color: var(--brand); font-weight: 700;
  font-size: .84rem; cursor: pointer; padding: 0; text-decoration: underline;
}

/* ---------------- 히어로 ---------------- */
.hero { padding: 42px 0 8px; }
.eyebrow {
  display: inline-block; margin: 0 0 10px; padding: 4px 10px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand-dark);
  font-size: .76rem; font-weight: 800; letter-spacing: .02em;
}
.hero h1 { margin-bottom: 14px; }
.h1-sub { display: block; margin-top: 6px; font-size: .5em; font-weight: 700; color: var(--ink-2); letter-spacing: -.01em; }
.lead { max-width: 860px; color: var(--ink-2); font-size: 1rem; }
.hero-badges { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 18px 0 0; }
.hero-badges li {
  padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line);
  font-size: .82rem; font-weight: 700; color: var(--ink-2); box-shadow: var(--shadow-sm);
}

/* ---------------- 도구 카드 ---------------- */
.tool {
  margin-top: 26px; padding: 0 0 26px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.tool-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  padding: 14px 18px; border-bottom: 1px solid var(--line); background: var(--bg-soft);
}
.tabs { display: flex; gap: 6px; }
.tab {
  border: 1px solid var(--line-strong); background: #fff; color: var(--ink-2);
  padding: 9px 15px; border-radius: 999px; font-weight: 800; font-size: .9rem; cursor: pointer;
}
.tab.is-on { background: var(--brand); border-color: transparent; color: #fff; box-shadow: 0 8px 18px -12px rgba(59, 91, 253, .9); }
.privacy-note { margin: 0 0 0 auto; color: var(--ink-2); font-size: .82rem; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.privacy-note .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(10, 143, 82, .12); }

.panel { padding: 18px; }
.panel > * + * { margin-top: 16px; }

/* 편집기 */
.bt-editor { border: 1px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; background: #fff; }
.editor-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: 10px 12px; background: var(--bg-soft); border-bottom: 1px solid var(--line);
}
.editor-label { font-weight: 800; font-size: .92rem; }
.editor-hint { color: var(--muted); font-size: .8rem; }
.editor-actions { margin-left: auto; display: flex; gap: 6px; }
.editor-area {
  display: block; width: 100%; border: 0; padding: 14px 16px; resize: vertical;
  font-family: var(--font); font-size: .98rem; line-height: 1.75; color: var(--ink);
  min-height: 240px; background: #fff;
}
.editor-area:focus { outline: 2px solid rgba(59, 91, 253, .35); outline-offset: -2px; }
.editor-foot { margin: 0; padding: 8px 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: .78rem; background: #fff; }

/* 통계 카드 */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.stat {
  padding: 12px 13px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #fff, #fbfcff);
}
.stat b { display: block; font-size: 1.28rem; font-weight: 800; letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat span { display: block; margin-top: 2px; color: var(--muted); font-size: .78rem; font-weight: 600; }

/* 게이지 */
.gauges { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gauge { padding: 13px 15px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.gauge-head { display: flex; justify-content: space-between; gap: 10px; font-size: .86rem; margin-bottom: 8px; }
.gauge-head b { font-size: .88rem; }
.gauge-head span { color: var(--muted); font-weight: 700; }
.gauge-bar { position: relative; height: 10px; border-radius: 999px; background: #eef1f7; overflow: hidden; }
.gauge-bar i { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, #94a6ff, var(--brand)); transition: width .25s ease; }
.gauge-scale { display: flex; justify-content: space-between; margin-top: 5px; color: var(--muted); font-size: .72rem; font-variant-numeric: tabular-nums; }
.gauge[data-status="short"] .gauge-bar i { background: linear-gradient(90deg, #f9b976, var(--warn)); }
.gauge[data-status="good"] .gauge-bar i { background: linear-gradient(90deg, #6ee7b7, var(--ok)); }
.gauge[data-status="long"] .gauge-bar i,
.gauge[data-status="too-long"] .gauge-bar i { background: linear-gradient(90deg, #fca5a5, var(--danger)); }

/* 점수 */
.result-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 12px; align-items: stretch; }
.score-box {
  display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff;
}
.score-num { display: flex; align-items: baseline; gap: 2px; }
.score-num b { font-size: 2.2rem; font-weight: 900; letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: var(--ok); }
.score-num span { font-size: .8rem; color: var(--muted); font-weight: 700; }
.score-box[data-tone="warn"] .score-num b { color: var(--warn); }
.score-box[data-tone="danger"] .score-num b { color: var(--danger); }
.score-txt strong { display: block; font-size: .95rem; }
.score-txt p { margin: 2px 0 8px; color: var(--muted); font-size: .8rem; }
.score-track { height: 8px; border-radius: 999px; background: #eef1f7; overflow: hidden; }
.score-track i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #94a6ff, var(--brand)); transition: width .25s ease; }

.sum-list {
  list-style: none; margin: 0; padding: 10px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff;
}
.sum-list li { text-align: center; padding: 6px 4px; border-radius: 9px; background: var(--bg-soft); }
.sum-list b { display: block; font-size: 1.15rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.sum-list span { font-size: .74rem; color: var(--muted); font-weight: 700; }
.sum-danger b { color: var(--danger); }
.sum-warn b { color: var(--warn); }
.sum-note b { color: var(--ink-2); }
.sum-total b { color: var(--brand-dark); }

/* 결과 카드 */
.panel-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.panel-card { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.card-title { margin: 0 0 10px; font-size: .96rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tag {
  padding: 3px 8px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark);
  font-size: .7rem; font-weight: 800; letter-spacing: 0;
}
.issue-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 268px; overflow: auto; }
.issue {
  display: flex; justify-content: space-between; gap: 10px; align-items: baseline;
  padding: 8px 10px; border-radius: 9px; background: #f7f8fc; border-left: 3px solid var(--line-strong);
}
.issue-3 { border-left-color: var(--danger); background: #fdf4f3; }
.issue-2 { border-left-color: var(--warn); background: #fdf8f1; }
.issue-1 { border-left-color: #93a3bd; }
.issue-word { font-weight: 800; font-size: .9rem; }
.issue-meta { color: var(--muted); font-size: .78rem; text-align: right; }
.issue-none { color: var(--muted); font-size: .84rem; padding: 6px 2px; list-style: none; }

.custom-box { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.custom-box label { display: block; font-size: .8rem; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; }
.custom-row { display: flex; gap: 6px; }
.custom-row input {
  flex: 1 1 auto; min-width: 0; padding: 8px 10px; border: 1px solid var(--line-strong);
  border-radius: 9px; font-family: inherit; font-size: .88rem;
}
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; padding: 0; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px;
  border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark); font-size: .8rem; font-weight: 700;
}
.chip-x {
  border: 0; background: rgba(43, 69, 214, .12); color: var(--brand-dark);
  width: 18px; height: 18px; border-radius: 50%; cursor: pointer; line-height: 1; font-size: .8rem;
}
.chips .issue-none { background: none; padding: 2px; }

/* 하이라이트 */
.preview-card { margin-top: 12px; }
.hl-box {
  border: 1px solid var(--line); border-radius: 9px; background: #fcfdff;
  padding: 14px 16px; max-height: 340px; overflow: auto;
  white-space: pre-wrap; font-size: .92rem; line-height: 1.85; color: var(--ink-2);
}
.hl-banned { background: #ffe1dd; color: #a51f16; border-radius: 3px; box-shadow: inset 0 -2px 0 rgba(194, 65, 59, .45); }
.hl-repeat { background: #fff1c9; color: #7a4a06; border-radius: 3px; box-shadow: inset 0 -2px 0 rgba(180, 83, 9, .35); }
.hl-empty { color: var(--muted); }
.status-line { min-height: 1.3em; margin-top: 12px; }

/* ---------------- 썸네일 ---------------- */
.thumb-grid { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 18px; align-items: start; }
.thumb-controls { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.field-set { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px 14px; margin: 0; background: #fff; }
.field-set legend { padding: 0 6px; font-size: .84rem; font-weight: 800; color: var(--brand-dark); }
.field-set > label, .field > label { display: block; font-size: .8rem; font-weight: 700; color: var(--ink-2); margin: 10px 0 5px; }
.field-set > label:first-of-type { margin-top: 2px; }
.field { display: block; min-width: 0; }
.field > label em { font-style: normal; color: var(--muted); font-weight: 600; }
input[type="text"], select {
  width: 100%; padding: 9px 10px; border: 1px solid var(--line-strong); border-radius: 9px;
  font-family: inherit; font-size: .9rem; color: var(--ink); background: #fff;
}
input[type="text"]:focus, select:focus, input[type="color"]:focus, input[type="range"]:focus {
  outline: 2px solid rgba(59, 91, 253, .35); outline-offset: 1px;
}
input[type="color"] { width: 100%; height: 36px; padding: 2px; border: 1px solid var(--line-strong); border-radius: 9px; background: #fff; }
input[type="range"] { width: 100%; accent-color: var(--brand); }
input[type="file"] { width: 100%; font-size: .82rem; padding: 6px 0; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.checks { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.check { font-size: .84rem; color: var(--ink-2); display: flex; align-items: center; gap: 7px; }
.check input { accent-color: var(--brand); }

.thumb-preview { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.canvas-frame {
  border: 1px solid var(--line); border-radius: var(--radius-sm); background:
    repeating-conic-gradient(#f4f6fb 0% 25%, #ffffff 0% 50%) 50% / 20px 20px;
  padding: 12px; display: flex; align-items: center; justify-content: center;
}
.thumb-canvas { width: auto; height: auto; max-width: 100%; max-height: 460px; object-fit: contain; border-radius: 8px; box-shadow: 0 10px 30px -18px rgba(16, 24, 40, .45); }
.thumb-actions { display: grid; grid-template-columns: 1.3fr 1fr; gap: 10px; align-items: end; }
.thumb-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.thumb-buttons .btn-primary { flex: 1 1 190px; }

/* ---------------- 본문 섹션 ---------------- */
.section { margin-top: 44px; }
.section > h2 { margin-bottom: 14px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; counter-reset: step; }
.steps li { padding: 16px 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); }
.steps b { display: block; margin-bottom: 6px; font-size: .96rem; color: var(--brand-dark); }
.steps p { margin: 0; color: var(--ink-2); font-size: .9rem; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; margin-bottom: 18px; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--bg-soft); font-size: .82rem; color: var(--ink-2); font-weight: 800; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }

.cat-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; list-style: none; padding: 0; margin: 0 0 8px; }
.cat-list li { padding: 11px 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: .88rem; color: var(--ink-2); }
.cat-list b { display: block; color: var(--ink); margin-bottom: 2px; }

.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.checklist li {
  position: relative; padding: 12px 14px 12px 42px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-sm); font-size: .92rem; color: var(--ink-2);
}
.checklist li::before {
  content: "✓"; position: absolute; left: 14px; top: 11px; width: 20px; height: 20px;
  border-radius: 50%; background: var(--brand-soft); color: var(--brand-dark);
  font-size: .74rem; font-weight: 900; display: flex; align-items: center; justify-content: center;
}
.checklist b { color: var(--ink); }

.faq { display: grid; gap: 8px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0 16px; }
.faq summary {
  cursor: pointer; padding: 13px 0; font-weight: 800; font-size: .95rem;
  list-style: none; display: flex; justify-content: space-between; gap: 12px; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brand); font-weight: 900; font-size: 1.1rem; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 14px; color: var(--ink-2); font-size: .92rem; }

.more-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.more-list li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; }
.more-list a { font-weight: 800; font-size: .92rem; }
.more-list span { display: block; margin-top: 3px; color: var(--muted); font-size: .82rem; }

/* ---------------- 푸터 ---------------- */
.site-foot { margin-top: 56px; background: #0f1425; color: #c9d2e6; }
.site-foot .foot-in { display: flex; flex-wrap: wrap; gap: 24px; padding-top: 34px; padding-bottom: 22px; justify-content: space-between; }
.site-foot .brand-txt strong { color: #fff; }
.foot-note { margin: 12px 0 0; color: #8e9ab5; font-size: .84rem; max-width: 620px; }
.foot-col { display: flex; flex-direction: column; gap: 6px; }
.foot-col b { color: #fff; font-size: .86rem; margin-bottom: 2px; }
.foot-col a { color: #a9b6d0; font-size: .84rem; }
.foot-base { border-top: 1px solid rgba(255, 255, 255, .08); padding: 14px 20px 24px; color: #7c88a5; font-size: .78rem; text-align: center; }

/* ---------------- 좁은 화면 ---------------- */
@media (max-width: 900px) {
  .thumb-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .panel-cards, .result-grid, .gauges, .steps, .cat-list, .more-list { grid-template-columns: 1fr; }
  .sum-list { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 560px) {
  .hero { padding-top: 30px; }
  .tool-head { flex-direction: column; align-items: stretch; }
  .privacy-note { margin: 0; }
  .panel { padding: 12px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat b { font-size: 1.1rem; }
  .sum-list { grid-template-columns: repeat(2, 1fr); }
  .thumb-actions { grid-template-columns: 1fr; }
  .thumb-canvas { max-height: 340px; }
  .row2 { grid-template-columns: 1fr; }
}
