:root {
  --bg: #f7f8fc;
  --surface: #ffffff;
  --surface-2: #eef1f8;
  --ink: #141a2e;
  --ink-2: #4a5270;
  --ink-3: #8a91aa;
  --line: #e1e5f0;
  --brand: #4f46e5;
  --brand-2: #06b6d4;
  --accent: #f43f5e;
  --live: #10b981;
  --soon: #f59e0b;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(20, 26, 46, .04), 0 8px 24px rgba(20, 26, 46, .06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0f1c; --surface: #131a2c; --surface-2: #1b2338; --ink: #eef1fa;
    --ink-2: #b4bbd3; --ink-3: #7a83a1; --line: #263049;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0f1c; --surface: #131a2c; --surface-2: #1b2338; --ink: #eef1fa;
  --ink-2: #b4bbd3; --ink-3: #7a83a1; --line: #263049;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Pretendard Variable", Pretendard, -apple-system, "Segoe UI", "Malgun Gothic", sans-serif;
  line-height: 1.6; -webkit-font-smoothing: antialiased; word-break: keep-all;
}
a { color: inherit; text-decoration: none; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* header */
.header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
}
.header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 12px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.02em; font-size: 1.15rem; }
.logo-mark {
  width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); font-size: .95rem;
}
.logo small { display: block; font-size: .62rem; font-weight: 500; color: var(--ink-3); letter-spacing: .08em; }
.nav { display: flex; gap: 8px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; transition: .15s;
}
.btn:hover { border-color: var(--brand); color: var(--brand); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); color: #fff; }
.icon-btn { width: 38px; height: 38px; padding: 0; justify-content: center; }

/* hero */
.hero { padding: 72px 0 40px; text-align: center; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% -10% auto; height: 520px; z-index: -1;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--brand) 18%, transparent), transparent),
              radial-gradient(closest-side at 70% 40%, color-mix(in srgb, var(--brand-2) 16%, transparent), transparent);
}
.eyebrow {
  display: inline-block; padding: 5px 12px; border-radius: 999px; font-size: .72rem; font-weight: 700;
  letter-spacing: .14em; color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent);
}
.hero h1 { font-size: clamp(2rem, 5.4vw, 3.4rem); line-height: 1.2; letter-spacing: -.035em; margin: 18px 0 14px; }
.grad { background: linear-gradient(90deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--ink-2); max-width: 640px; margin: 0 auto; font-size: 1.04rem; }
.stats { display: flex; justify-content: center; gap: 28px; margin-top: 28px; flex-wrap: wrap; }
.stat b { display: block; font-size: 1.5rem; letter-spacing: -.02em; }
.stat span { font-size: .8rem; color: var(--ink-3); }

/* search + chips */
.toolbar { position: sticky; top: 64px; z-index: 10; background: var(--bg); padding: 14px 0; border-bottom: 1px solid var(--line); }
.search {
  display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 0 14px; max-width: 520px; margin: 0 auto 12px;
}
.search input { flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; padding: 11px 0; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; justify-content: center; flex-wrap: wrap; }
.chip {
  white-space: nowrap; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); font-size: .85rem; font-weight: 600; color: var(--ink-2); cursor: pointer;
}
.chip.active, .chip:hover { border-color: var(--brand); color: var(--brand); }

/* sections */
.section { padding: 40px 0 8px; }
.section-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.tag {
  font-size: .7rem; font-weight: 800; letter-spacing: .12em; padding: 4px 9px; border-radius: 6px;
  background: var(--ink); color: var(--bg);
}
.section-head h2 { font-size: 1.25rem; margin: 0; letter-spacing: -.02em; }
.section-head p { margin: 0; color: var(--ink-3); font-size: .9rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.card {
  position: relative; display: flex; flex-direction: column; gap: 10px; padding: 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); transition: transform .15s, border-color .15s;
}
a.card:hover { transform: translateY(-3px); border-color: var(--brand); }
.card .ico { font-size: 1.6rem; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px; background: var(--surface-2); }
.card h3 { margin: 0; font-size: 1.05rem; letter-spacing: -.01em; }
.card p { margin: 0; color: var(--ink-2); font-size: .88rem; flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags span { font-size: .72rem; padding: 3px 8px; border-radius: 6px; background: var(--surface-2); color: var(--ink-2); }
.card-foot { display: flex; justify-content: space-between; align-items: center; padding-top: 6px; border-top: 1px dashed var(--line); }
.go { font-weight: 700; font-size: .86rem; color: var(--brand); }
.status { font-size: .7rem; font-weight: 800; letter-spacing: .06em; }
.status.live { color: var(--live); }
.status.soon { color: var(--soon); }
.card.soon { opacity: .72; }
.empty { text-align: center; color: var(--ink-3); padding: 40px 0; display: none; }

/* about / contact */
.band {
  margin: 56px 0 0; padding: 40px; border-radius: 24px; color: #fff;
  background: linear-gradient(135deg, #312e81, #4f46e5 50%, #0891b2);
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; align-items: center;
}
.band h2 { margin: 0 0 8px; font-size: 1.6rem; letter-spacing: -.02em; }
.band p { margin: 0; opacity: .88; }
.band ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.band li { background: rgba(255,255,255,.12); padding: 12px 14px; border-radius: 12px; font-size: .92rem; }
.footer { padding: 40px 0; color: var(--ink-3); font-size: .85rem; text-align: center; }

/* tool pages */
.tool-head { padding: 40px 0 20px; }
.tool-head .back { font-size: .88rem; color: var(--ink-3); }
.tool-head h1 { margin: 10px 0 6px; font-size: 1.8rem; letter-spacing: -.03em; }
.tool-head p { margin: 0; color: var(--ink-2); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.two { display: grid; grid-template-columns: 340px 1fr; gap: 16px; align-items: start; }
label.f { display: block; font-size: .82rem; font-weight: 700; color: var(--ink-2); margin: 12px 0 6px; }
label.f:first-child { margin-top: 0; }
input.in, textarea.in, select.in {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg); color: var(--ink); font: inherit;
}
input.in:focus, textarea.in:focus, select.in:focus { outline: 2px solid color-mix(in srgb, var(--brand) 35%, transparent); border-color: var(--brand); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--surface-2); border-radius: 12px; padding: 14px; }
.kpi span { font-size: .76rem; color: var(--ink-3); }
.kpi b { display: block; font-size: 1.3rem; letter-spacing: -.02em; }
table.t { width: 100%; border-collapse: collapse; font-size: .86rem; }
table.t th, table.t td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
table.t th:first-child, table.t td:first-child { text-align: left; }
table.t th { color: var(--ink-3); font-weight: 700; font-size: .78rem; }
.scroll-x { overflow-x: auto; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); opacity: 0;
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-size: .88rem;
  transition: .2s; pointer-events: none; z-index: 50;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 820px) {
  .band { grid-template-columns: 1fr; padding: 28px 22px; }
  .two { grid-template-columns: 1fr; }
  .nav .hide-sm { display: none; }
  .hero { padding: 52px 0 28px; }
  .chips { justify-content: flex-start; flex-wrap: nowrap; }
}
