:root {
  --bg: #0b1120;
  --bg-elev: #111827;
  --card: #161f32;
  --card-2: #1e293b;
  --border: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --accent-2: #22c55e;
  --amber: #f59e0b;
  --rose: #f43f5e;
  --purple: #a78bfa;
  --radius: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 17, 32, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.08rem;
  color: var(--text);
  text-decoration: none !important;
}
.brand-badge {
  background: linear-gradient(135deg, #38bdf8, #2563eb);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 8px;
}
.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.main-nav a {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 10px;
  transition: all 0.15s ease;
  text-decoration: none !important;
}
.main-nav a:hover {
  color: var(--text);
  background: rgba(148, 163, 184, 0.12);
}
.main-nav a.active {
  color: #0b1120;
  background: var(--accent);
  font-weight: 800;
}

/* Container */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 20px 64px;
}

/* Hero */
.hero {
  margin-bottom: 24px;
}
.hero-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.28);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.hero h1 {
  font-size: clamp(1.45rem, 2.8vw, 2.05rem);
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 8px;
}
.hero p {
  color: var(--muted);
  font-size: 0.96rem;
}

/* Ad Slot (CLS-safe) */
.ad-slot {
  min-height: 96px;
  border: 1.5px dashed rgba(148, 163, 184, 0.28);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--muted);
  font-size: 0.84rem;
  padding: 14px;
  margin: 18px 0 24px;
}

/* Cards & Grid */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 20px;
  align-items: start;
}
@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; }
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.card + .card { margin-top: 20px; }
.card-title {
  font-size: 1.08rem;
  font-weight: 800;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* Preset / Pill buttons */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.pill-btn {
  background: var(--card-2);
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 8px 13px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}
.pill-btn:hover { color: var(--text); border-color: rgba(56, 189, 248, 0.5); }
.pill-btn.active {
  background: rgba(56, 189, 248, 0.16);
  color: var(--accent);
  border-color: var(--accent);
}

/* Controls */
.control-group {
  margin-bottom: 18px;
}
.control-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.control-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}
.control-val-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}
.step-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card-2);
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.step-btn:hover { border-color: var(--accent); color: var(--accent); }
.val-badge {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--accent);
  min-width: 86px;
  text-align: right;
}

/* Exact-aligned Range Slider (20px thumb) */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #273449;
  outline: none;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid #0b1120;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.45);
  cursor: pointer;
}
input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid #0b1120;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.45);
  cursor: pointer;
}
.ticks {
  position: relative;
  height: 22px;
  margin-top: 6px;
}
.tick {
  position: absolute;
  transform: translateX(-50%);
  font-size: 0.74rem;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
}
.tick:hover { color: var(--accent); }

/* Inputs & Selects */
.input-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 560px) {
  .input-grid { grid-template-columns: 1fr; }
}
.field label {
  display: block;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 6px;
}
.field input[type="number"],
.field select,
.field input[type="text"],
.field input[type="email"],
.field textarea {
  width: 100%;
  background: var(--card-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.94rem;
  font-weight: 600;
  outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent);
}
.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  font-size: 0.86rem;
  color: var(--muted);
  cursor: pointer;
}
.checkbox-row input { margin-top: 3px; accent-color: var(--accent); }

/* KPI Boxes */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
.kpi-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.kpi-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 720px) {
  .kpi-grid.cols-4, .kpi-grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
}
.kpi {
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  position: relative;
}
.kpi.winner {
  border-color: var(--accent-2);
  background: rgba(34, 197, 94, 0.08);
}
.kpi-top {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.win-tag {
  background: var(--accent-2);
  color: #052e16;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
}
.kpi-num {
  font-size: 1.28rem;
  font-weight: 800;
  color: var(--text);
}
.kpi-sub {
  font-size: 0.77rem;
  color: var(--muted);
  margin-top: 4px;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-top: 12px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
th, td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: right;
  white-space: nowrap;
}
th:first-child, td:first-child { text-align: left; }
th {
  background: rgba(15, 23, 42, 0.75);
  color: var(--muted);
  font-weight: 700;
}
tr:last-child td { border-bottom: none; }

/* SVG Chart Wrapper */
.chart-box {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  margin-top: 14px;
}
.chart-box h3 {
  font-size: 0.94rem;
  font-weight: 800;
  margin-bottom: 10px;
}
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 8px;
}
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

/* Info / Guide Section (SEO & AdSense Content) */
.guide-section {
  margin-top: 32px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}
.guide-section h2 {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 12px;
}
.guide-section h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
  margin: 18px 0 8px;
}
.guide-section p, .guide-section li {
  color: #cbd5e1;
  font-size: 0.93rem;
}
.guide-section ul { padding-left: 20px; margin-bottom: 10px; }
.guide-section li { margin-bottom: 6px; }

/* Accordion FAQ */
details {
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 16px;
  margin-top: 10px;
}
summary {
  font-weight: 700;
  font-size: 0.93rem;
  cursor: pointer;
  color: var(--text);
}
details p {
  margin-top: 10px;
  color: #cbd5e1;
  font-size: 0.89rem;
}

/* Primary Action Button */
.action-btn {
  background: linear-gradient(135deg, #38bdf8, #2563eb);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
}
.action-btn:hover { opacity: 0.92; }

/* Notice banner */
.notice-box {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fde68a;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 0.85rem;
  margin-top: 14px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-elev);
  padding: 28px 20px;
  margin-top: 40px;
}
.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 0.84rem;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--text); }
