/* =========================================================
   HubTools — 디자인 시스템
   ---------------------------------------------------------
   · 테마: html[data-theme="light" | "dark"]
   · 레이아웃: .wrap / .app-header / .site-footer
   · 카드: .cat-card(카테고리) / .tool-card(도구)
   · 도구 UI: .panel .field .input .btn .stat .result .seg ...
   ========================================================= */

*,
*::before,
*::after { box-sizing: border-box; }

:root {
  --bg: #f4f6f9;
  --bg-soft: #eef1f6;
  --surface: #ffffff;
  --surface-2: #f2f4f8;
  --surface-3: #e9edf3;
  --border: #e2e7ee;
  --border-strong: #cbd3df;
  --text: #0f172a;
  --text-2: #35414f;
  --muted: #5c6a7c;
  --faint: #8b97a7;
  --brand: #0f172a;
  --brand-text: #ffffff;
  --ring: rgba(15, 23, 42, 0.18);
  --ok: #0f766e;
  --warn: #b45309;
  --danger: #b91c1c;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 2px 6px rgba(15, 23, 42, 0.06), 0 16px 32px -20px rgba(15, 23, 42, 0.35);
  --shadow-lg: 0 24px 60px -30px rgba(15, 23, 42, 0.45);
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 26px;
  --maxw: 1140px;
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #0a0f18;
  --bg-soft: #0d131e;
  --surface: #121a26;
  --surface-2: #18212f;
  --surface-3: #1e2938;
  --border: #232f40;
  --border-strong: #33425a;
  --text: #f2f6fb;
  --text-2: #d3dce8;
  --muted: #93a1b4;
  --faint: #6f7d90;
  --brand: #f2f6fb;
  --brand-text: #0a0f18;
  --ring: rgba(242, 246, 251, 0.22);
  --ok: #34d399;
  --warn: #fbbf24;
  --danger: #f87171;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 2px 10px rgba(0, 0, 0, 0.35), 0 20px 40px -24px rgba(0, 0, 0, 0.8);
  --shadow-lg: 0 30px 70px -40px rgba(0, 0, 0, 0.9);
  color-scheme: dark;
}

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
img { max-width: 100%; display: block; }
::selection { background: var(--brand); color: var(--brand-text); }

:focus-visible {
  outline: 2px solid var(--border-strong);
  outline-offset: 2px;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 18px;
}

/* ---------- 헤더 ---------- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.app-header__inner {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 64px;
}

.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.brand__logo {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--brand);
  color: var(--brand-text);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.04em;
}

.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__name { font-weight: 700; font-size: 16px; letter-spacing: -0.01em; }
.brand__sub { font-size: 11px; color: var(--faint); }

.search {
  position: relative;
  flex: 1;
  max-width: 420px;
  margin-left: auto;
  min-width: 0;
}

.search__icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--faint);
  pointer-events: none;
  display: flex;
}

.search input {
  width: 100%;
  height: 38px;
  padding: 0 34px 0 34px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 13.5px;
}

.search input::placeholder { color: var(--faint); }
.search input:focus { outline: none; background: var(--surface); border-color: var(--border-strong); box-shadow: 0 0 0 3px var(--ring); }

.search kbd {
  position: absolute;
  right: 9px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--faint);
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 5px;
  padding: 1px 5px;
  line-height: 1.5;
}

.icon-btn {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-2);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.icon-btn:hover { background: var(--surface-3); border-color: var(--border-strong); }
.icon-btn:active { transform: scale(0.96); }
.lang-btn {
  width: auto;
  min-width: 38px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

html[data-theme="dark"] .icon-sun { display: none; }
html:not([data-theme="dark"]) .icon-moon { display: none; }

@media (max-width: 720px) {
  .brand__sub { display: none; }
  .app-header__inner { gap: 10px; height: 58px; }
  .search kbd { display: none; }
  .search input { padding-right: 12px; }
}

/* ---------- 메인 ---------- */
main {
  flex: 1;
  padding: 28px 0 56px;
}

.hero { padding: 14px 0 26px; }

.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(26px, 4.4vw, 40px);
  line-height: 1.18;
  letter-spacing: -0.035em;
  font-weight: 800;
}

.hero p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  max-width: 620px;
}

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.pill strong { color: var(--text); font-weight: 700; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
}

.section-head h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-head p { margin: 0; color: var(--muted); font-size: 12.5px; }

/* ---------- 카테고리 카드 (홈) ---------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
}

.cat-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  overflow: hidden;
}

.cat-card::after {
  content: "";
  position: absolute;
  inset: -40% -30% auto auto;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: var(--cat);
  opacity: 0.09;
  filter: blur(4px);
  pointer-events: none;
}

.cat-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.cat-card__top { display: flex; align-items: center; gap: 12px; }

.cat-card__icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: var(--cat-soft);
  color: var(--cat);
}

.cat-card__title { margin: 0; font-size: 16.5px; font-weight: 700; letter-spacing: -0.02em; }
.cat-card__count { font-size: 12px; color: var(--faint); }

.cat-card__desc {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cat-card__foot {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--faint);
}

.cat-card__more { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: var(--text-2); }

/* ---------- 도구 카드 ---------- */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 14px;
}

.tool-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.tool-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.tool-card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }

.tool-card__icon {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--cat-soft, var(--surface-2));
  color: var(--cat, var(--text-2));
}

.tool-card__title { margin: 2px 0 0; font-size: 14.5px; font-weight: 700; letter-spacing: -0.015em; }
.tool-card__desc {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tool-card__foot {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.tool-card__tags { display: flex; gap: 6px; flex-wrap: wrap; font-size: 10.5px; color: var(--faint); }
.tool-card__action { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--text); white-space: nowrap; }

/* ---------- 배지 / 칩 ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.badge--local { background: var(--brand); color: var(--brand-text); }
.badge--link { background: var(--surface-3); color: var(--muted); border: 1px solid var(--border); }
.badge--soft { background: var(--cat-soft, var(--surface-3)); color: var(--cat, var(--muted)); }
.badge--warn { background: rgba(180, 83, 9, 0.12); color: var(--warn); }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.chip:hover { background: var(--surface-2); color: var(--text); }
.chip.is-active { background: var(--brand); color: var(--brand-text); border-color: var(--brand); }

/* ---------- 도구 페이지 ---------- */
.crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--faint);
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--text); }

.tool-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.tool-head__icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--cat-soft, var(--surface-2));
  color: var(--cat, var(--text-2));
  flex-shrink: 0;
}

.tool-head h1 { margin: 0 0 4px; font-size: clamp(21px, 3vw, 27px); letter-spacing: -0.03em; font-weight: 800; }
.tool-head p { margin: 0; color: var(--muted); font-size: 13.5px; max-width: 680px; }
.tool-head__meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.panel + .panel { margin-top: 14px; }

/* ---------- 폼 ---------- */
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack--sm { gap: 8px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row--between { justify-content: space-between; }
.row--end { justify-content: flex-end; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }

@media (max-width: 640px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .panel { padding: 16px; border-radius: var(--r-md); }
  .cat-grid { grid-template-columns: 1fr; }
  .tool-grid { grid-template-columns: 1fr; }
  main { padding: 18px 0 44px; }
}

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label { font-size: 12px; font-weight: 700; color: var(--text-2); }
.field__hint { font-size: 11.5px; color: var(--faint); }

.input,
.textarea,
.select {
  width: 100%;
  padding: 9px 11px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--border-strong);
  box-shadow: 0 0 0 3px var(--ring);
}

.textarea { resize: vertical; min-height: 120px; line-height: 1.65; }
.textarea--mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.select { appearance: none; background-image: none; }

.input--num { font-variant-numeric: tabular-nums; }

.range {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 999px;
  background: var(--surface-3);
  outline: none;
}
.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--brand);
  border: 2px solid var(--surface);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}
.range::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--brand);
  cursor: pointer;
}

.input-color {
  width: 100%;
  height: 40px;
  padding: 4px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  cursor: pointer;
}

input[type="file"] { font-size: 13px; color: var(--muted); }

/* ---------- 버튼 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 15px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 650;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
  white-space: nowrap;
}

.btn:hover { background: var(--surface-3); border-color: var(--border-strong); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn--primary { background: var(--brand); color: var(--brand-text); border-color: var(--brand); }
.btn--primary:hover { opacity: 0.9; background: var(--brand); border-color: var(--brand); }
.btn--soft { background: var(--cat-soft, var(--surface-2)); color: var(--cat, var(--text)); border-color: transparent; }
.btn--danger { background: rgba(185, 28, 28, 0.1); color: var(--danger); border-color: transparent; }
.btn--ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn--ghost:hover { background: var(--surface-2); color: var(--text); }
.btn--sm { padding: 6px 10px; font-size: 12px; border-radius: 8px; }
.btn--block { width: 100%; }

/* ---------- 통계 / 결과 ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }

.stat {
  padding: 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  text-align: center;
}

.stat__label { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--faint); font-weight: 700; }
.stat__value { display: block; margin-top: 3px; font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }

.result {
  padding: 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.result--accent { background: var(--cat-soft, var(--surface-2)); border-color: transparent; }
.result__label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--faint); font-weight: 700; }
.result__main { font-size: 26px; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; margin: 2px 0; }
.result__sub { font-size: 12.5px; color: var(--muted); }
.result__list { margin: 8px 0 0; padding-left: 18px; color: var(--muted); font-size: 13px; }
.result__list li { margin: 3px 0; }

.kv { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--border); font-size: 13px; }
.kv:last-child { border-bottom: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }

.hint { font-size: 12px; color: var(--muted); line-height: 1.6; }
.small { font-size: 11.5px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }

.notice {
  display: flex;
  gap: 9px;
  padding: 11px 13px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}
.notice--warn { border-color: rgba(180, 83, 9, 0.3); background: rgba(180, 83, 9, 0.08); color: var(--warn); }
.notice svg { flex-shrink: 0; margin-top: 1px; }

/* ---------- 세그먼트 탭 ---------- */
.seg {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border-radius: 11px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
.seg::-webkit-scrollbar { display: none; }
.seg__btn {
  padding: 6px 13px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
}
.seg__btn.is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

/* ---------- 캔버스 / 미리보기 ---------- */
.checker {
  background-color: #fff;
  background-image:
    linear-gradient(45deg, #e6e9ef 25%, transparent 25%, transparent 75%, #e6e9ef 75%),
    linear-gradient(45deg, #e6e9ef 25%, transparent 25%, transparent 75%, #e6e9ef 75%);
  background-size: 16px 16px;
  background-position: 0 0, 8px 8px;
}

.canvas-wrap {
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  overflow: hidden;
  display: inline-block;
  max-width: 100%;
}
.canvas-wrap canvas { max-width: 100%; height: auto; display: block; }

.dropzone {
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--r-md);
  padding: 22px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  background: var(--surface-2);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--cat, var(--border-strong)); background: var(--cat-soft, var(--surface-3)); }
.dropzone strong { color: var(--text); }

.preview-box {
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: #000;
  overflow: hidden;
  position: relative;
  height: 132px;
  display: flex;
  align-items: center;
}

.marquee {
  display: inline-block;
  white-space: nowrap;
  will-change: transform;
  animation: marquee var(--marquee-speed, 12s) linear infinite;
}

@keyframes marquee {
  0% { transform: translateX(100vw); }
  100% { transform: translateX(-100%); }
}

.led-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  cursor: pointer;
  overflow: hidden;
}
.led-fullscreen[hidden] { display: none; }

/* ---------- 퀴즈 ---------- */
.quiz-progress { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.quiz-progress > i { display: block; height: 100%; width: 0; background: var(--cat, var(--brand)); border-radius: 999px; transition: width 0.25s ease; }

.quiz-q { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; margin: 0; }

.quiz-opt {
  display: block;
  width: 100%;
  text-align: left;
  padding: 13px 15px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 550;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease;
}
.quiz-opt:hover { border-color: var(--cat, var(--border-strong)); background: var(--cat-soft, var(--surface-3)); }
.quiz-opt:active { transform: scale(0.995); }

/* ---------- 빈 상태 ---------- */
.empty { text-align: center; padding: 44px 18px; color: var(--muted); }
.empty svg { color: var(--faint); margin-bottom: 10px; }
.empty h3 { margin: 0 0 6px; font-size: 15px; color: var(--text); }
.empty p { margin: 0; font-size: 13px; }

/* ---------- 푸터 ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 22px 0 28px;
  font-size: 12.5px;
  color: var(--muted);
}
.site-footer__inner { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.site-footer strong { color: var(--text); }
.site-footer a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.site-footer a:hover { color: var(--text); }

/* ---------- 토스트 ---------- */
.toast-host {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 120;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  width: max-content;
  max-width: 92vw;
}

.toast {
  padding: 9px 15px;
  border-radius: 999px;
  background: var(--brand);
  color: var(--brand-text);
  font-size: 12.5px;
  font-weight: 650;
  box-shadow: var(--shadow-lg);
  animation: toast-in 0.2s ease;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- 유틸 ---------- */
.hidden { display: none !important; }
.stack > * { min-width: 0; }
hr.sep { border: 0; border-top: 1px solid var(--border); margin: 4px 0; }

/* ---------- 인쇄 (이력서) ---------- */
@media print {
  body { background: #fff; }
  body * { visibility: hidden; }
  .resume-paper, .resume-paper * { visibility: visible; }
  .resume-paper {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    box-shadow: none !important;
    border: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #fff !important;
    color: #000 !important;
  }
}

/* ---------- 색상 팔레트 ---------- */
.acc-amber { --cat: #d97706; --cat-soft: rgba(217, 119, 6, 0.13); }
.acc-emerald { --cat: #059669; --cat-soft: rgba(5, 150, 105, 0.13); }
.acc-violet { --cat: #7c3aed; --cat-soft: rgba(124, 58, 237, 0.13); }
.acc-sky { --cat: #0284c7; --cat-soft: rgba(2, 132, 199, 0.13); }
.acc-rose { --cat: #e11d48; --cat-soft: rgba(225, 29, 72, 0.12); }
.acc-indigo { --cat: #4f46e5; --cat-soft: rgba(79, 70, 229, 0.13); }
.acc-teal { --cat: #0d9488; --cat-soft: rgba(13, 148, 136, 0.13); }
.acc-orange { --cat: #ea580c; --cat-soft: rgba(234, 88, 12, 0.13); }

html[data-theme="dark"] .acc-amber { --cat: #fbbf24; --cat-soft: rgba(251, 191, 36, 0.14); }
html[data-theme="dark"] .acc-emerald { --cat: #34d399; --cat-soft: rgba(52, 211, 153, 0.14); }
html[data-theme="dark"] .acc-violet { --cat: #a78bfa; --cat-soft: rgba(167, 139, 250, 0.16); }
html[data-theme="dark"] .acc-sky { --cat: #38bdf8; --cat-soft: rgba(56, 189, 248, 0.14); }
html[data-theme="dark"] .acc-rose { --cat: #fb7185; --cat-soft: rgba(251, 113, 133, 0.15); }
html[data-theme="dark"] .acc-indigo { --cat: #818cf8; --cat-soft: rgba(129, 140, 248, 0.16); }
html[data-theme="dark"] .acc-teal { --cat: #2dd4bf; --cat-soft: rgba(45, 212, 191, 0.14); }
html[data-theme="dark"] .acc-orange { --cat: #fb923c; --cat-soft: rgba(251, 146, 60, 0.15); }

/* ---------------- 첫 방문 언어 선택 ---------------- */
html.has-lang-gate,
html.has-lang-gate body { overflow: hidden; }

.lang-gate {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(10, 15, 24, 0.58);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: langFade 0.18s ease-out;
}

@keyframes langFade { from { opacity: 0; } to { opacity: 1; } }

.lang-gate__card {
  width: 100%;
  max-width: 440px;
  padding: 30px 26px 24px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
}

.lang-gate__logo {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 14px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--brand-text);
  background: var(--brand);
  border-radius: 13px;
}

.lang-gate__title { margin: 0; font-size: 21px; letter-spacing: -0.02em; }
.lang-gate__sub { margin: 3px 0 20px; font-size: 14px; color: var(--muted); }

.lang-gate__options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.lang-gate__btn {
  display: grid;
  gap: 2px;
  padding: 16px 12px;
  font: inherit;
  color: var(--text);
  text-align: center;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}

.lang-gate__btn strong { font-size: 16px; font-weight: 700; }
.lang-gate__btn span { font-size: 12px; color: var(--muted); }

.lang-gate__btn:hover { border-color: var(--brand); transform: translateY(-1px); }
.lang-gate__btn:active { transform: translateY(0); }
.lang-gate__btn:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }

.lang-gate__hint {
  margin: 18px 0 0;
  font-size: 11.5px;
  line-height: 1.65;
  color: var(--faint);
}
.lang-gate__hint b { color: var(--muted); font-weight: 600; }

@media (max-width: 420px) {
  .lang-gate__options { grid-template-columns: 1fr; }
  .lang-gate__card { padding: 26px 18px 20px; }
}
