/* ============================================================
   툴선반 — 공용 디자인 시스템 v2 (2026 리뉴얼)
   라이트/다크 테마 · 오로라 히어로 · 카테고리 컬러 · 스텝 카운터
   ============================================================ */

:root {
  --bg: #f5f6fb;
  --bg-grad: radial-gradient(1200px 500px at 50% -180px, rgba(101, 105, 235, 0.10), transparent 70%);
  --surface: #ffffff;
  --surface-2: #f1f2f9;
  --surface-3: #e8eaf4;
  --text: #161827;
  --text-2: #545970;
  --text-3: #8b8fa6;
  --border: #e3e5f0;
  --border-strong: #cdd0e2;
  --primary: #5154d8;
  --primary-2: #7c5cf0;
  --primary-3: #a78bfa;
  --primary-contrast: #ffffff;
  --primary-soft: rgba(81, 84, 216, 0.10);
  --grad-brand: linear-gradient(120deg, #5154d8 0%, #7c5cf0 55%, #f2705b 130%);
  --grad-primary: linear-gradient(120deg, #5154d8, #7c5cf0);
  --accent: #f2705b;
  --accent-soft: rgba(242, 112, 91, 0.12);
  --success: #17925a;
  --success-soft: rgba(23, 146, 90, 0.12);
  --danger: #e04248;
  --danger-soft: rgba(224, 66, 72, 0.11);
  --warning: #a3660f;
  --warning-soft: rgba(214, 145, 32, 0.15);
  --footer-bg: #15172a;
  --footer-text: #b9bdd4;
  --footer-text-2: #8e93b3;
  --footer-border: rgba(255, 255, 255, 0.09);
  --shadow-xs: 0 1px 2px rgba(22, 24, 39, 0.05);
  --shadow: 0 1px 2px rgba(22, 24, 39, 0.04), 0 10px 28px -14px rgba(22, 24, 39, 0.16);
  --shadow-lg: 0 2px 4px rgba(22, 24, 39, 0.05), 0 24px 52px -20px rgba(22, 24, 39, 0.28);
  --shadow-glow: 0 10px 30px -10px rgba(81, 84, 216, 0.45);
  --radius: 16px;
  --radius-sm: 11px;
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    "Apple SD Gothic Neo", "Malgun Gothic", "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", "D2Coding", Consolas, "Courier New", monospace;
  --header-h: 62px;
}

[data-theme="dark"] {
  --bg: #0b0d17;
  --bg-grad: radial-gradient(1200px 520px at 50% -180px, rgba(124, 92, 240, 0.16), transparent 70%);
  --surface: #141727;
  --surface-2: #1b1f33;
  --surface-3: #242943;
  --text: #eef0f8;
  --text-2: #a7abc4;
  --text-3: #6d7290;
  --border: #262b45;
  --border-strong: #333a5c;
  --primary: #8f92ff;
  --primary-2: #a78bfa;
  --primary-3: #c4b5fd;
  --primary-soft: rgba(143, 146, 255, 0.13);
  --grad-brand: linear-gradient(120deg, #8f92ff 0%, #c4b5fd 55%, #ff8f70 130%);
  --grad-primary: linear-gradient(120deg, #7c7ff2, #a78bfa);
  --accent: #ff8f70;
  --accent-soft: rgba(255, 143, 112, 0.14);
  --success: #3ecf8e;
  --success-soft: rgba(62, 207, 142, 0.14);
  --danger: #ff6b70;
  --danger-soft: rgba(255, 107, 112, 0.13);
  --warning: #e8b45a;
  --warning-soft: rgba(232, 180, 90, 0.14);
  --footer-bg: #0e1020;
  --footer-text: #a7abc4;
  --footer-text-2: #6d7290;
  --footer-border: rgba(255, 255, 255, 0.07);
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 30px -14px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.35), 0 26px 56px -20px rgba(0, 0, 0, 0.65);
  --shadow-glow: 0 10px 34px -12px rgba(143, 146, 255, 0.5);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 24px; }

body {
  margin: 0;
  font-family: var(--font);
  background-color: var(--bg);
  background-image: var(--bg-grad);
  background-repeat: no-repeat;
  color: var(--text);
  line-height: 1.65;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  text-size-adjust: 100%;
}

img, svg { vertical-align: middle; }

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

::selection { background: var(--primary-soft); color: var(--text); }

:focus-visible {
  outline: 2.5px solid var(--primary);
  outline-offset: 2px;
  border-radius: 5px;
}

.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--primary); color: #fff;
  padding: 10px 16px; border-radius: 0 0 10px 0; z-index: 400;
  font-weight: 700;
}
.skip-link:focus { left: 0; }

/* ---------- 스크롤 등장 애니메이션 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.reveal.in { opacity: 1; transform: none; }
.reveal:nth-child(2) { transition-delay: 0.05s; }
.reveal:nth-child(3) { transition-delay: 0.1s; }
.reveal:nth-child(4) { transition-delay: 0.15s; }

/* ---------- 헤더 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}
.site-header.scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-xs);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h); gap: 16px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 1.18rem; color: var(--text);
  letter-spacing: -0.02em;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 11px;
  background: var(--grad-brand);
  color: #fff; font-size: 1.08rem;
  box-shadow: 0 6px 16px -6px rgba(81, 84, 216, 0.55);
  transition: transform 0.2s;
}
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.05); }
.brand-sub { font-size: 0.68rem; font-weight: 600; color: var(--text-3); display: block; letter-spacing: 0.04em; }
.header-nav { display: flex; align-items: center; gap: 6px; }
.header-nav a {
  color: var(--text-2); font-weight: 600; font-size: 0.9rem;
  padding: 8px 13px; border-radius: 999px;
  transition: background 0.15s, color 0.15s;
}
.header-nav a:hover { background: var(--primary-soft); color: var(--primary); text-decoration: none; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 999px;
  background: var(--surface); border: 1.5px solid var(--border);
  color: var(--text-2); cursor: pointer; font-size: 1.02rem;
  box-shadow: var(--shadow-xs);
  transition: background 0.15s, color 0.15s, transform 0.15s, border-color 0.15s;
}
.icon-btn:hover { background: var(--primary-soft); color: var(--primary); border-color: color-mix(in srgb, var(--primary) 35%, var(--border)); transform: translateY(-1px); }
.icon-btn:active { transform: scale(0.93); }

/* ---------- 브레드크럼 ---------- */
.breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.8rem; font-weight: 600; color: var(--text-3);
  padding: 20px 0 0;
}
.breadcrumb a {
  color: var(--text-3); padding: 3px 9px; border-radius: 999px;
  transition: background 0.15s, color 0.15s;
}
.breadcrumb a:hover { background: var(--surface-2); color: var(--primary); text-decoration: none; }
.breadcrumb .sep { opacity: 0.5; }

/* ---------- 툴 헤더 ---------- */
.tool-head { padding: 24px 0 6px; }
.tool-head h1 {
  margin: 0 0 10px; font-size: 1.95rem; font-weight: 800; letter-spacing: -0.035em;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  line-height: 1.25;
}
.tool-head .tool-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 50px; height: 50px; border-radius: 15px; flex: none;
  background: var(--grad-primary);
  color: #fff; font-size: 1.45rem;
  box-shadow: var(--shadow-glow);
}
.tool-desc { margin: 0; color: var(--text-2); font-size: 1.03rem; max-width: 720px; }

.trust-badges {
  display: flex; flex-wrap: wrap; gap: 8px; list-style: none;
  padding: 0; margin: 16px 0 0;
}
.trust-badges li {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 0.78rem; font-weight: 700;
  padding: 6px 12px; border-radius: 999px;
  background: var(--success-soft); color: var(--success);
  border: 1px solid color-mix(in srgb, var(--success) 22%, transparent);
}
.trust-badges li::before { content: ""; width: 6px; height: 6px; border-radius: 999px; background: currentColor; }
.trust-badges li:nth-child(2) { background: var(--primary-soft); color: var(--primary); border-color: color-mix(in srgb, var(--primary) 22%, transparent); }
.trust-badges li:nth-child(3) { background: var(--accent-soft); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 22%, transparent); }

/* ---------- 툴 카드 ---------- */
.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  margin: 22px 0 36px;
  position: relative;
}
.tool-card::before {
  content: ""; position: absolute; top: 0; left: 24px; right: 24px; height: 1.5px;
  background: var(--grad-brand);
  border-radius: 999px;
  opacity: 0.65;
}

/* ---------- 폼 요소 ---------- */
label.field-label {
  display: block; font-weight: 700; font-size: 0.88rem;
  color: var(--text); margin-bottom: 7px; letter-spacing: -0.01em;
}
.field-hint { font-size: 0.78rem; color: var(--text-3); margin: 5px 0 0; }

input[type="text"], input[type="number"], input[type="date"], input[type="search"],
select, textarea {
  width: 100%;
  font-family: var(--font);
  font-size: 0.98rem;
  color: var(--text);
  background: var(--surface);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}
textarea { resize: vertical; min-height: 130px; line-height: 1.6; }
input::placeholder, textarea::placeholder { color: var(--text-3); }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
}
input[type="date"] { min-height: 46px; }
input[type="number"] { font-variant-numeric: tabular-nums; }
select { cursor: pointer; }

.field-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px; margin-bottom: 18px;
}

/* ---------- 버튼 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font); font-weight: 700; font-size: 0.93rem;
  padding: 12px 22px; border-radius: 12px;
  border: 1.5px solid transparent; cursor: pointer;
  transition: transform 0.14s, box-shadow 0.14s, background 0.14s, color 0.14s, border-color 0.14s, filter 0.14s;
  user-select: none; text-decoration: none;
}
.btn:active { transform: translateY(1px) scale(0.985); }
.btn:hover { text-decoration: none; }
.btn-primary {
  background: var(--grad-primary);
  color: var(--primary-contrast);
  box-shadow: var(--shadow-glow);
}
.btn-primary:hover { filter: brightness(1.08) saturate(1.05); transform: translateY(-1px); }
.btn-secondary {
  background: var(--surface); border-color: var(--border-strong); color: var(--text);
  box-shadow: var(--shadow-xs);
}
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--primary); }
.btn-ghost:hover { background: var(--primary-soft); }
.btn-danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.btn-danger:hover { filter: brightness(1.05); }
.btn-sm { padding: 8px 14px; font-size: 0.83rem; border-radius: 10px; }
.btn-lg { padding: 15px 30px; font-size: 1.02rem; border-radius: 14px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }

/* ---------- 통계/결과 ---------- */
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px; margin: 20px 0;
}
.stat-box {
  background: linear-gradient(180deg, var(--surface-2), color-mix(in srgb, var(--surface-2) 55%, var(--surface)));
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  transition: transform 0.15s, border-color 0.15s;
}
.stat-box:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--primary) 30%, var(--border)); }
.stat-label { font-size: 0.75rem; font-weight: 800; color: var(--text-3); letter-spacing: 0.03em; }
.stat-value {
  font-size: 1.5rem; font-weight: 800; color: var(--text);
  font-variant-numeric: tabular-nums; letter-spacing: -0.02em;
  margin-top: 3px; overflow-wrap: anywhere;
}
.stat-value.primary {
  background: var(--grad-primary);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

.result-card {
  position: relative;
  background:
    radial-gradient(600px 200px at 12% 0%, var(--primary-soft), transparent 65%),
    var(--surface);
  border: 1.5px solid color-mix(in srgb, var(--primary) 30%, var(--border));
  border-radius: 18px;
  padding: 26px 28px; margin-top: 22px;
  overflow: hidden;
}
.result-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--grad-brand);
}
.result-card .result-label { font-size: 0.85rem; font-weight: 800; color: var(--text-2); letter-spacing: 0.01em; }
.result-card .result-value {
  font-size: clamp(1.75rem, 4vw, 2.6rem); font-weight: 800; letter-spacing: -0.03em;
  background: var(--grad-primary);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
  margin-top: 2px;
}
.result-sub { color: var(--text-2); font-size: 0.9rem; margin-top: 8px; }

.progress-track {
  height: 9px; background: var(--surface-3); border-radius: 999px;
  overflow: hidden; margin: 6px 0 2px;
}
.progress-fill {
  height: 100%; border-radius: 999px;
  background: var(--grad-primary);
  transition: width 0.3s ease;
}
.progress-fill.full { background: linear-gradient(90deg, var(--danger), #ff9a5b); }

/* ---------- 체크박스/라디오/슬라이더 ---------- */
.check-row {
  display: flex; align-items: center; gap: 9px;
  font-size: 0.92rem; font-weight: 600; color: var(--text); cursor: pointer;
  padding: 6px 0; user-select: none;
}
.check-row input { width: 17px; height: 17px; accent-color: var(--primary); cursor: pointer; }

input[type="range"] { width: 100%; accent-color: var(--primary); cursor: pointer; height: 32px; }

/* ---------- 콘텐츠 섹션(사용법/FAQ) ---------- */
.content-section { margin: 0 0 38px; }
.content-section h2 {
  font-size: 1.28rem; font-weight: 800; letter-spacing: -0.025em;
  margin: 0 0 16px; display: flex; align-items: center; gap: 11px;
}
.content-section h2::before {
  content: ""; display: inline-block; width: 5px; height: 21px; flex: none;
  border-radius: 3px; background: var(--grad-brand);
}

/* 스텝 카운터 (사용법 등 ordered list) */
.content-section ol {
  list-style: none; counter-reset: step;
  padding: 0; color: var(--text-2);
}
.content-section ol > li {
  counter-increment: step;
  position: relative; padding-left: 46px; margin: 12px 0;
}
.content-section ol > li::before {
  content: counter(step);
  position: absolute; left: 0; top: 1px;
  width: 30px; height: 30px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.82rem; font-weight: 800; color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid color-mix(in srgb, var(--primary) 25%, transparent);
}
.content-section ol > li::after {
  content: ""; position: absolute; left: 15px; top: 34px; bottom: -12px;
  width: 1px; background: var(--border);
}
.content-section ol > li:last-child::after { display: none; }
.content-section ul { padding-left: 6px; color: var(--text-2); list-style: none; }
.content-section ul > li { margin: 9px 0; padding-left: 24px; position: relative; }
.content-section ul > li::before {
  content: ""; position: absolute; left: 4px; top: 0.62em;
  width: 7px; height: 7px; border-radius: 999px;
  background: var(--grad-primary);
}
.content-section li strong { color: var(--text); }
.content-section p { color: var(--text-2); }
.content-section p strong { color: var(--text); }

details.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0; margin-bottom: 10px; overflow: hidden;
  transition: border-color 0.18s, box-shadow 0.18s;
}
details.faq-item[open] {
  border-color: color-mix(in srgb, var(--primary) 30%, var(--border));
  box-shadow: var(--shadow);
}
details.faq-item summary {
  cursor: pointer; padding: 16px 50px 16px 19px;
  font-weight: 700; font-size: 0.95rem; color: var(--text);
  list-style: none; position: relative;
  transition: background 0.15s;
}
details.faq-item summary:hover { background: var(--surface-2); }
details.faq-item summary::-webkit-details-marker { display: none; }
details.faq-item summary::after {
  content: "+"; position: absolute; right: 18px; top: 50%;
  transform: translateY(-50%);
  width: 26px; height: 26px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: 600;
  color: var(--primary); background: var(--primary-soft);
  transition: transform 0.22s, content 0.22s;
}
details.faq-item[open] summary::after { content: "−"; transform: translateY(-50%) rotate(180deg); }
details.faq-item .faq-body { padding: 0 19px 17px; color: var(--text-2); font-size: 0.92rem; }

.notice {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--warning-soft); color: var(--warning);
  border: 1px solid color-mix(in srgb, var(--warning) 25%, transparent);
  border-radius: var(--radius-sm); padding: 13px 16px;
  font-size: 0.84rem; font-weight: 600; margin: 18px 0 0;
}
.notice.info { background: var(--primary-soft); color: var(--primary); border-color: color-mix(in srgb, var(--primary) 25%, transparent); }
.notice.danger { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 25%, transparent); }

/* ---------- 툴 그리드(메인/관련 도구) ---------- */
.section-title {
  font-size: 1.4rem; font-weight: 800; letter-spacing: -0.03em;
  margin: 48px 0 6px;
  display: flex; align-items: center; gap: 10px;
}
.section-desc { color: var(--text-2); margin: 0 0 18px; font-size: 0.95rem; }

.cat-title {
  font-size: 1.04rem; font-weight: 800; letter-spacing: -0.02em;
  margin: 34px 0 4px; display: flex; align-items: center; gap: 8px;
  color: var(--text);
}
.cat-title .cat-count {
  font-size: 0.72rem; font-weight: 800; color: var(--primary);
  background: var(--primary-soft); border-radius: 999px; padding: 3px 9px;
}

.tool-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(244px, 1fr));
  gap: 16px; margin: 14px 0 10px;
}
.tool-card-link {
  display: flex; flex-direction: column; gap: 11px;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 21px;
  box-shadow: var(--shadow-xs);
  color: var(--text); text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s;
  position: relative; overflow: hidden;
}
.tool-card-link::after {
  content: "→"; position: absolute; right: 17px; top: 19px;
  width: 26px; height: 26px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  color: var(--primary); background: var(--primary-soft);
  opacity: 0; transform: translateX(-8px);
  transition: opacity 0.18s, transform 0.18s;
}
.tool-card-link:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
  text-decoration: none;
}
.tool-card-link:hover::after { opacity: 1; transform: none; }
.tool-card-link .tool-emoji {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 13px;
  background: var(--grad-primary); font-size: 1.32rem;
  box-shadow: 0 8px 18px -8px rgba(81, 84, 216, 0.5);
}
[data-category="doc"] .tool-emoji { background: linear-gradient(135deg, #5154d8, #818cf8); }
[data-category="dev"] .tool-emoji { background: linear-gradient(135deg, #0ea5e9, #22d3ee); }
[data-category="calc"] .tool-emoji { background: linear-gradient(135deg, #059669, #34d399); }
[data-category="daily"] .tool-emoji { background: linear-gradient(135deg, #f2705b, #fbbf24); }
.tool-card-link h3 { margin: 0; font-size: 1.04rem; font-weight: 800; letter-spacing: -0.01em; padding-right: 30px; }
.tool-card-link p { margin: 0; font-size: 0.84rem; color: var(--text-2); line-height: 1.6; }
.tool-card-link .tool-tag {
  align-self: flex-start;
  font-size: 0.7rem; font-weight: 800; color: var(--primary);
  background: var(--primary-soft); border-radius: 999px; padding: 4px 10px;
}

/* ---------- 히어로(메인) ---------- */
.hero {
  position: relative;
  padding: 78px 0 16px; text-align: center;
  overflow: visible;
}
.hero-glow {
  position: absolute; border-radius: 999px; filter: blur(70px);
  pointer-events: none; z-index: -1; opacity: 0.55;
}
.hero-glow.g1 {
  width: 480px; height: 340px; left: 50%; top: -120px; transform: translateX(-85%);
  background: radial-gradient(closest-side, rgba(124, 92, 240, 0.5), transparent);
  animation: float-a 9s ease-in-out infinite alternate;
}
.hero-glow.g2 {
  width: 440px; height: 320px; left: 50%; top: -60px; transform: translateX(-5%);
  background: radial-gradient(closest-side, rgba(242, 112, 91, 0.38), transparent);
  animation: float-b 11s ease-in-out infinite alternate;
}
[data-theme="dark"] .hero-glow { opacity: 0.4; }
@keyframes float-a { from { transform: translateX(-85%) translateY(0); } to { transform: translateX(-85%) translateY(26px); } }
@keyframes float-b { from { transform: translateX(-5%) translateY(10px); } to { transform: translateX(-5%) translateY(-20px); } }

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.8rem; font-weight: 800; letter-spacing: 0.01em;
  color: var(--primary);
  background: var(--surface);
  border: 1.5px solid color-mix(in srgb, var(--primary) 25%, var(--border));
  padding: 7px 15px; border-radius: 999px;
  box-shadow: var(--shadow-xs);
}
.hero h1 {
  font-size: clamp(2.1rem, 5.6vw, 3.3rem); font-weight: 800;
  letter-spacing: -0.045em; margin: 20px 0 16px; line-height: 1.2;
}
.hero h1 .grad {
  background: var(--grad-brand);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hero .hero-desc {
  color: var(--text-2); font-size: clamp(1rem, 2.4vw, 1.13rem);
  max-width: 640px; margin: 0 auto 26px;
}
.hero-stats {
  display: flex; justify-content: center; gap: clamp(18px, 5vw, 52px);
  margin: 0 0 28px; flex-wrap: wrap;
}
.hero-stat { text-align: center; }
.hero-stat strong {
  display: block; font-size: 1.55rem; font-weight: 800; letter-spacing: -0.03em;
  background: var(--grad-primary);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hero-stat span { font-size: 0.78rem; font-weight: 600; color: var(--text-3); }
.hero-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-bottom: 34px; }

.hero-badges {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
}
.hero-badge {
  font-size: 0.8rem; font-weight: 700;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-2); padding: 6px 13px; border-radius: 999px;
  box-shadow: var(--shadow-xs);
}

.search-wrap { position: relative; max-width: 480px; margin: 6px auto 8px; }
.search-wrap .search-icon {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  color: var(--text-3); pointer-events: none; font-size: 0.95rem;
}
.search-wrap input {
  padding-left: 44px; padding-top: 14px; padding-bottom: 14px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  background: var(--surface);
}
.search-wrap input:focus { box-shadow: 0 0 0 4px var(--primary-soft), var(--shadow); }

/* ---------- 특징 카드 ---------- */
.feature-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px; margin: 18px 0;
}
.feature-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px 24px;
  box-shadow: var(--shadow-xs);
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}
.feature-card:hover {
  transform: translateY(-3px); box-shadow: var(--shadow);
  border-color: color-mix(in srgb, var(--primary) 30%, var(--border));
}
.feature-card .feature-emoji {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 14px; font-size: 1.5rem;
  background: var(--primary-soft);
}
.feature-card:nth-child(2) .feature-emoji { background: var(--accent-soft); }
.feature-card:nth-child(3) .feature-emoji { background: var(--success-soft); }
.feature-card h3 { margin: 14px 0 7px; font-size: 1.02rem; font-weight: 800; letter-spacing: -0.01em; }
.feature-card p { margin: 0; font-size: 0.87rem; color: var(--text-2); }

/* ---------- 테이블 ---------- */
.table-wrap { overflow-x: auto; margin: 14px 0; border-radius: var(--radius-sm); }
table.data-table {
  width: 100%; border-collapse: collapse;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); overflow: hidden;
  font-size: 0.9rem;
}
.data-table th, .data-table td {
  padding: 11px 15px; text-align: left;
  border-bottom: 1px solid var(--border);
}
.data-table th {
  background: var(--surface-2); font-size: 0.74rem;
  color: var(--text-2); font-weight: 800; white-space: nowrap;
  letter-spacing: 0.05em; text-transform: uppercase;
}
.data-table tbody tr { transition: background 0.12s; }
.data-table tbody tr:hover { background: var(--surface-2); }
.data-table tr:last-child td { border-bottom: none; }
.data-table td.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- 토스트 ---------- */
.toast-container {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  z-index: 300; display: flex; flex-direction: column; gap: 8px;
  align-items: center; pointer-events: none;
}
.toast {
  background: var(--text); color: var(--bg);
  font-size: 0.88rem; font-weight: 700;
  padding: 12px 22px; border-radius: 999px;
  box-shadow: var(--shadow-lg);
  animation: toast-in 0.24s cubic-bezier(0.22, 0.61, 0.36, 1);
  max-width: min(90vw, 420px);
}
.toast.success { background: var(--success); color: #fff; }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

/* ---------- 푸터 ---------- */
.site-footer {
  background:
    radial-gradient(700px 260px at 85% 0%, rgba(124, 92, 240, 0.14), transparent 65%),
    var(--footer-bg);
  margin-top: 56px; padding: 46px 0 36px;
  color: var(--footer-text);
}
.footer-inner {
  display: flex; flex-wrap: wrap; justify-content: space-between;
  gap: 30px; align-items: flex-start;
}
.footer-brand {
  font-weight: 800; font-size: 1.12rem; margin-bottom: 10px;
  color: #fff; letter-spacing: -0.02em;
}
.footer-desc { color: var(--footer-text-2); font-size: 0.83rem; max-width: 400px; margin: 0; }
.footer-links { display: flex; flex-direction: column; gap: 2px; }
.footer-links a {
  color: var(--footer-text); font-size: 0.9rem; font-weight: 600;
  padding: 6px 12px; margin-left: -12px; border-radius: 999px;
  transition: background 0.15s, color 0.15s;
}
.footer-links a:hover { background: rgba(255, 255, 255, 0.08); color: #fff; text-decoration: none; }
.footer-bottom {
  margin-top: 30px; padding-top: 20px;
  border-top: 1px solid var(--footer-border);
  color: var(--footer-text-2); font-size: 0.78rem;
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between;
}

/* ---------- 모달(뽑기 결과 등) ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 250;
  background: rgba(10, 12, 22, 0.62);
  backdrop-filter: blur(6px);
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; animation: toast-in 0.22s ease; }
.modal-box {
  background: var(--surface); border-radius: 22px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg); padding: 38px;
  max-width: 480px; width: 100%; text-align: center;
  max-height: 86vh; overflow-y: auto;
}
.modal-box h2 { margin: 0 0 8px; font-size: 1.45rem; letter-spacing: -0.03em; }

/* ---------- 코드/모노 영역 ---------- */
.mono { font-family: var(--mono); }
.code-box {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px 16px;
  font-family: var(--mono); font-size: 0.84rem;
  overflow-x: auto; white-space: pre-wrap; overflow-wrap: anywhere;
  color: var(--text);
}

/* ---------- 칩(단위/특수문자 카테고리) ---------- */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chip {
  font-family: var(--font); font-size: 0.85rem; font-weight: 700;
  padding: 8px 16px; border-radius: 999px; cursor: pointer;
  background: var(--surface); color: var(--text-2);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-xs);
  transition: all 0.15s;
}
.chip:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-1px); }
.chip.active {
  background: var(--grad-primary); border-color: transparent;
  color: var(--primary-contrast);
  box-shadow: var(--shadow-glow);
}

/* ---------- 특수문자 그리드 ---------- */
.char-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr));
  gap: 8px;
}
.char-btn {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; background: var(--surface);
  border: 1.5px solid var(--border); border-radius: 11px;
  cursor: pointer; color: var(--text);
  transition: all 0.13s; padding: 0;
}
.char-btn:hover {
  border-color: var(--primary); background: var(--primary-soft);
  transform: translateY(-3px);
  box-shadow: 0 8px 16px -8px rgba(81, 84, 216, 0.45);
}
.char-btn:active { transform: scale(0.9); }

/* ---------- 복사 목록 ---------- */
.copy-list {
  display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; min-height: 30px;
}
.copy-list .char-chip {
  font-size: 1.1rem; background: var(--surface-2);
  border: 1px dashed var(--border-strong); border-radius: 9px;
  padding: 4px 11px; cursor: pointer;
  transition: border-color 0.14s, background 0.14s;
}
.copy-list .char-chip:hover { border-color: var(--primary); background: var(--primary-soft); }

/* ---------- 파일 드롭존 ---------- */
.dropzone {
  border: 2px dashed var(--border-strong); border-radius: var(--radius);
  padding: 46px 20px; text-align: center; cursor: pointer;
  color: var(--text-2); background: var(--surface-2);
  transition: border-color 0.18s, background 0.18s, transform 0.18s;
}
.dropzone:hover, .dropzone.dragover {
  border-color: var(--primary); background: var(--primary-soft);
  color: var(--primary);
  transform: scale(1.005);
}
.dropzone .dz-emoji { font-size: 2.2rem; display: block; margin-bottom: 10px; }

.file-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 13px 16px; margin-top: 10px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.file-card:hover { border-color: color-mix(in srgb, var(--primary) 30%, var(--border)); box-shadow: var(--shadow-xs); }
.file-card img { width: 56px; height: 56px; object-fit: cover; border-radius: 9px; border: 1px solid var(--border); }
.file-card .file-meta { flex: 1; min-width: 0; }
.file-card .file-name {
  font-weight: 700; font-size: 0.9rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.file-card .file-sub { font-size: 0.78rem; color: var(--text-2); font-variant-numeric: tabular-nums; }
.save-badge { font-weight: 800; font-size: 0.92rem; font-variant-numeric: tabular-nums; }
.save-badge.good { color: var(--success); }
.save-badge.bad { color: var(--danger); }

/* ---------- 슬롯(뽑기) ---------- */
.slot-window {
  background: var(--surface-2); border: 1.5px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  height: 88px; position: relative; margin: 18px 0;
}
.slot-window::before, .slot-window::after {
  content: ""; position: absolute; left: 0; right: 0; height: 24px; z-index: 2;
  pointer-events: none;
}
.slot-window::before { top: 0; background: linear-gradient(180deg, var(--surface-2), transparent); }
.slot-window::after { bottom: 0; background: linear-gradient(0deg, var(--surface-2), transparent); }
.slot-track {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px;
}
.slot-item {
  font-size: 1.6rem; font-weight: 800; height: 88px; display: flex; align-items: center;
  background: var(--grad-primary);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  letter-spacing: -0.02em;
}
.slot-highlight-line {
  position: absolute; top: 50%; left: 14px; right: 14px; height: 2.5px;
  background: var(--grad-brand); opacity: 0.6; z-index: 3; border-radius: 999px;
}

/* ---------- 분할 뷰(HTML 뷰어) ---------- */
.split-view { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pane { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pane-label {
  font-size: 0.75rem; font-weight: 800; color: var(--text-2);
  text-transform: uppercase; letter-spacing: 0.07em;
  display: flex; justify-content: space-between; align-items: center;
}
.editor-wrap {
  display: flex; border: 1.5px solid var(--border-strong); border-radius: var(--radius-sm);
  overflow: hidden; background: var(--surface);
  transition: border-color 0.18s, box-shadow 0.18s;
}
.editor-wrap:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.line-gutter {
  padding: 12px 9px 12px 0; text-align: right; flex: none;
  color: var(--text-3); font-family: var(--mono); font-size: 0.82rem;
  line-height: 1.6; background: var(--surface-2);
  border-right: 1px solid var(--border);
  user-select: none; min-width: 42px; overflow: hidden;
  max-height: 420px; overflow-y: hidden;
}
.editor-wrap textarea {
  border: none; border-radius: 0; resize: vertical;
  font-family: var(--mono); font-size: 0.82rem; line-height: 1.6;
  min-height: 420px; white-space: pre; overflow-wrap: normal; overflow-x: auto;
}
.editor-wrap textarea:focus { box-shadow: none; }
.preview-frame {
  width: 100%; min-height: 420px; border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm); background: #fff;
}
[data-theme="dark"] .preview-frame { background: #fff; }
.mobile-tabs { display: none; gap: 8px; }

/* ---------- 스택 바(급여) ---------- */
.stack-bar {
  display: flex; height: 36px; border-radius: 999px; overflow: hidden;
  background: var(--surface-3); margin: 16px 0 10px;
  min-width: 200px;
}
.stack-seg { transition: width 0.45s cubic-bezier(0.22, 0.61, 0.36, 1); min-width: 0; }
.stack-seg span {
  display: none; font-size: 0.68rem; font-weight: 800; color: #fff;
  line-height: 36px; white-space: nowrap; overflow: hidden;
}
.legend-row { display: flex; flex-wrap: wrap; gap: 13px; font-size: 0.78rem; font-weight: 600; color: var(--text-2); }
.legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }

/* ---------- 반응형 ---------- */
@media (max-width: 720px) {
  .tool-head h1 { font-size: 1.55rem; }
  .tool-head .tool-icon { width: 44px; height: 44px; font-size: 1.3rem; border-radius: 13px; }
  .tool-card { padding: 20px; }
  .split-view { grid-template-columns: 1fr; }
  .mobile-tabs { display: flex; margin-bottom: 4px; }
  .split-view.hide-src .pane-src { display: none; }
  .split-view.hide-preview .pane-preview { display: none; }
  .hero { padding-top: 48px; }
  .hero-actions .btn { width: 100%; }
  .header-inner { height: 56px; }
  .stat-value { font-size: 1.28rem; }
  .slot-item { font-size: 1.3rem; }
  .content-section ol > li { padding-left: 42px; }
  .result-card { padding: 20px; }
  .footer-inner { flex-direction: column; gap: 22px; }
}

@media (max-width: 480px) {
  .header-nav a[href*="privacy"] { display: none; }
  .hero-stats { gap: 20px; }
}

/* ---------- 모션 최소화 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  .hero-glow { animation: none; }
}
