:root {
  --bg: #f4efe6;
  --bg-elev: #fffdf8;
  --ink: #1c1915;
  --muted: #6b6458;
  --line: #e4dccf;
  --navy: #1e2a44;
  --navy-2: #2c3d62;
  --gold: #c9892a;
  --gold-soft: #f3e2c2;
  --coral: #c45c3e;
  --green: #2f6d4f;
  --shadow: 0 12px 32px rgba(28, 25, 21, 0.08);
  --radius: 18px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html, body { min-height: 100%; }
body {
  font-family: Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
}
button, input, select, textarea { font-family: inherit; }
a { color: inherit; text-decoration: none; }
.skip {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip:focus {
  position: fixed;
  left: 8px;
  top: 8px;
  width: auto;
  height: auto;
  margin: 0;
  clip: auto;
  overflow: visible;
  background: #fff;
  padding: 8px 12px;
  z-index: 50;
  border-radius: 8px;
}
.app {
  display: grid;
  grid-template-columns: 270px 1fr;
  min-height: 100vh;
}
.sidebar {
  background: var(--navy);
  color: #f7f1e6;
  padding: 24px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px;
  background: transparent !important;
  border: 0;
  color: #f7f1e6;
  text-align: left;
  cursor: pointer;
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: none;
}
.bmi-tip {
  margin-top: 12px;
  font-size: 14px;
  color: var(--navy);
  line-height: 1.6;
}
.board-list { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.board-item h3 { font-size: 16px; margin: 4px 0 8px; }
.board-item p { color: var(--muted); white-space: pre-wrap; }
.board-meta { font-size: 12px; color: var(--muted); }
.tax-tips { margin: 0; padding-left: 18px; color: var(--muted); font-size: 14px; }
.tax-tips li { margin: 6px 0; }
.logo {
  width: 40px; height: 40px; border-radius: 12px; background: var(--gold);
  color: var(--navy); display: grid; place-items: center; font-weight: 800;
}
.brand h1 { font-size: 18px; font-weight: 800; letter-spacing: -0.03em; }
.brand p { font-size: 12px; color: #c9c2b4; }
.nav-search {
  width: 100%;
  border: 1px solid #46567a;
  background: #27354f;
  color: #fff;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13px;
}
.nav { display: flex; flex-direction: column; gap: 3px; overflow: auto; flex: 1; }
.nav button {
  border: 0; background: transparent; color: #ddd6c8; text-align: left;
  padding: 8px 10px; border-radius: 10px; cursor: pointer; font-size: 13px;
  display: flex; align-items: center; gap: 8px;
}
.nav button:hover, .nav button.active { background: rgba(255,255,255,0.08); color: #fff; }
.nav button.active { background: #36486f; }
.nav .ico { width: 20px; text-align: center; opacity: 0.85; }
.side-ad, .ad-slot {
  background: #f3eee4; border: 1px dashed #cbbfaa; color: #8a8072;
  border-radius: 12px; min-height: 90px; display: grid; place-items: center;
  text-align: center; font-size: 12px; overflow: hidden;
}
.side-ad {
  min-height: 220px; background: #27354f; border-color: #46567a; color: #b7c0d4; flex-shrink: 0;
}
.main { padding: 28px 32px 48px; }
.topbar {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 16px; margin-bottom: 18px;
}
.eyebrow {
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold); font-weight: 700;
}
.topbar h2 { font-size: 28px; letter-spacing: -0.04em; }
.clock {
  background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: 14px; padding: 10px 14px; min-width: 180px; text-align: right;
}
.clock .time { font-variant-numeric: tabular-nums; font-size: 20px; font-weight: 700; }
.clock .date { font-size: 12px; color: var(--muted); }
.ad-banner { margin: 0 0 22px; min-height: 100px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.card {
  background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.tool-card { padding: 18px; cursor: pointer; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.tool-card:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(28,25,21,0.12); }
.tool-card .mark {
  width: 42px; height: 42px; border-radius: 12px; background: var(--gold-soft);
  color: var(--navy); display: grid; place-items: center; font-weight: 800; margin-bottom: 12px;
}
.tool-card h3 { font-size: 16px; margin-bottom: 6px; }
.tool-card p { font-size: 13px; color: var(--muted); }
.panel { padding: 22px; }
.hidden { display: none !important; }
.desc { color: var(--muted); margin-bottom: 18px; max-width: 760px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 140px; }
.field label { font-size: 13px; color: var(--muted); font-weight: 600; }
input, select, textarea {
  border: 1px solid var(--line); background: #fff; border-radius: 12px;
  padding: 11px 12px; font-size: 15px; color: var(--ink); outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--gold); }
textarea { min-height: 180px; resize: vertical; width: 100%; }
.btn {
  border: 0; background: var(--navy); color: #fff; border-radius: 12px;
  padding: 11px 16px; cursor: pointer; font-weight: 700;
}
.btn:hover { background: var(--navy-2); }
.btn.gold { background: var(--gold); color: var(--navy); }
.btn.ghost { background: #efe8db; color: var(--ink); }
.btn.danger { background: var(--coral); }
.result {
  margin-top: 16px; padding: 16px; background: #f7f1e4;
  border-radius: 14px; border: 1px solid var(--gold-soft);
}
.result strong { font-size: 28px; letter-spacing: -0.04em; display: block; }
.kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-top: 12px; }
.kpi div { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.kpi span { display: block; color: var(--muted); font-size: 12px; }
.kpi b { font-size: 18px; }
.tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 7px 12px; cursor: pointer; font-size: 13px;
}
.chip.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.big {
  font-variant-numeric: tabular-nums; font-size: 48px; font-weight: 800;
  letter-spacing: -0.05em; text-align: center; margin: 8px 0 16px;
}
.checks { display: flex; gap: 12px; flex-wrap: wrap; margin: 8px 0 14px; }
.checks label { display: flex; gap: 6px; align-items: center; font-size: 14px; }
.pw { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; font-size: 18px; }
.table-wrap { overflow: auto; margin-top: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.footer {
  margin-top: 28px; color: var(--muted); font-size: 13px;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.toast {
  position: fixed; bottom: 20px; right: 20px; background: var(--navy); color: #fff;
  padding: 12px 16px; border-radius: 12px; display: none; z-index: 20;
}
.alarm-banner {
  display: none; background: var(--coral); color: #fff; padding: 12px 16px;
  border-radius: 12px; margin-bottom: 16px; align-items: center; justify-content: space-between; gap: 12px;
}
.mobile-nav { display: none; }
.faq { margin-top: 18px; }
.faq h3 { font-size: 16px; margin-bottom: 10px; }
.faq details {
  border-top: 1px solid var(--line); padding: 10px 0;
}
.faq summary { cursor: pointer; font-weight: 700; }
.faq p { color: var(--muted); margin-top: 6px; font-size: 14px; }
.seo-copy { margin-top: 16px; color: var(--muted); font-size: 14px; max-width: 760px; }
.calc-phone {
  width: 340px;
  max-width: 100%;
  background: #1a2236;
  border-radius: 28px;
  padding: 18px 14px 16px;
  box-shadow: 0 18px 40px rgba(28, 25, 21, 0.18);
}
.calc-mode { display: flex; gap: 8px; margin: 0 6px 4px; }
.calc-mode .chip { background: #2b3650; color: #ddd6c8; border-color: #46567a; }
.calc-mode .chip.on { background: var(--gold); color: var(--navy); border-color: var(--gold); }
.calc-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.calc-grid.sci {
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.calc-grid button {
  height: 52px;
  border-radius: 14px;
  padding: 0;
  font-size: 16px;
  font-weight: 700;
}
.calc-grid.sci button { height: 46px; font-size: 14px; border-radius: 12px; }
.calc-grid .btn.fn { background: #24314a; color: #f3e2c2; font-size: 13px; }
.calc-help { margin-top: 18px; max-width: 640px; }
.calc-help h3 { font-size: 16px; margin-bottom: 8px; }
.calc-help ul { padding-left: 18px; color: var(--muted); font-size: 14px; }
.calc-help li { margin: 6px 0; }
.calc-grid .btn.op {
  background: #c9892a;
  color: #1e2a44;
}
.calc-grid .btn.ghost {
  background: #2b3650;
  color: #f7f1e6;
}
.calc-grid .btn.gold {
  background: #f3e2c2;
  color: #1e2a44;
}
.calc-display {
  background: transparent;
  border: 0;
  color: #fff;
  padding: 18px 10px 16px;
  text-align: right;
  font-size: 36px;
  font-variant-numeric: tabular-nums;
  min-height: 64px;
  word-break: break-all;
}
.swatch {
  width: 100%; height: 88px; border-radius: 14px; border: 1px solid var(--line); margin-top: 8px;
}
.qr-box { margin-top: 14px; }
.qr-box img { width: 220px; height: 220px; background: #fff; border-radius: 12px; }
.home-lead { margin-bottom: 18px; max-width: 800px; }
.home-lead h1 { font-size: 30px; letter-spacing: -0.04em; margin: 6px 0 10px; }
.crumb { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .main { padding: 18px 16px 90px; }
  .mobile-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0;
    background: var(--navy); color: #fff; overflow-x: auto; gap: 4px; padding: 8px; z-index: 10;
  }
  .mobile-nav button {
    border: 0; background: transparent; color: #ddd6c8; white-space: nowrap;
    padding: 8px 10px; border-radius: 10px; font-size: 12px;
  }
  .mobile-nav button.active { background: #36486f; color: #fff; }
  .big { font-size: 36px; }
  .home-lead h1 { font-size: 24px; }
}
