
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css");

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color: transparent; }

:root {
  --bg: #fafafa;
  --card: #ffffff;
  --text: #18181b;
  --text-2: #3f3f46;
  --muted: #71717a;
  --border: #e4e4e7;
  --border-soft: #f4f4f5;
  --primary: #0f172a;
  --accent: #3b82f6;
  --accent-light: #eff6ff;
  --accent-dark: #1d4ed8;
  --success: #10b981;
  --warn: #f59e0b;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --radius: 12px;
  --radius-lg: 16px;
}

html { scroll-behavior: smooth; }
body {
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", "Noto Sans KR", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss06";
  letter-spacing: -0.01em;
}

/* HEADER */
header {
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.container { max-width: 880px; margin: 0 auto; padding: 0 24px; }
.header-inner {
  padding: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--text); }
.brand-mark {
  width: 36px; height: 36px;
  background: var(--primary);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 700; font-size: 17px;
}
.brand-name { font-weight: 700; font-size: 1.05rem; letter-spacing: -0.025em; }
.brand-sub { font-size: 0.76rem; color: var(--muted); margin-top: 1px; }

/* NAV */
nav {
  background: #fff;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 99;
  -webkit-overflow-scrolling: touch;
}
nav::-webkit-scrollbar { display: none; }
nav .container { display: flex; gap: 2px; padding: 8px 24px; }
nav a {
  padding: 8px 13px;
  font-size: 0.85rem;
  color: var(--muted);
  border-radius: 7px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s;
  flex-shrink: 0;
}
nav a:hover { background: var(--border-soft); color: var(--text); }
nav a.active { background: var(--primary); color: white; }

main { padding: 36px 0 80px; min-height: 60vh; }

/* HERO */
.hero { margin-bottom: 28px; }
.hero h1 {
  font-size: 1.95rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.2;
  margin-bottom: 10px;
}
.hero .desc {
  color: var(--muted);
  font-size: 1rem;
  max-width: 640px;
}
.breadcrumb {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 10px;
}
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { margin: 0 6px; }

/* CARD */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.card h2 {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.card > p.lead {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 20px;
}

/* FORM */
.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
label {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  margin-bottom: 7px;
  color: var(--text-2);
}
input, select, textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.97rem;
  font-family: inherit;
  background: white;
  color: var(--text);
  transition: all 0.15s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .row-2, .row-3 { grid-template-columns: 1fr; } }

.btn {
  width: 100%;
  padding: 13px 20px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  font-family: inherit;
  margin-top: 8px;
  transition: all 0.15s;
  letter-spacing: -0.01em;
}
.btn:hover { background: #1e293b; }
.btn:active { transform: scale(0.99); }

/* RESULT */
.result {
  background: var(--accent-light);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 20px;
  display: none;
}
.result.show { display: block; animation: fade 0.25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.result-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 7px 0;
  border-bottom: 1px dashed #cbd5e1;
  font-size: 0.92rem;
}
.result-row:last-child { border-bottom: none; }
.result-row span:first-child { color: #334155; }
.result-row span:last-child { font-weight: 600; color: var(--accent-dark); font-variant-numeric: tabular-nums; }
.result-main {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent-dark);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

/* HOME GRID */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 22px;
}
.tool-tile {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-decoration: none;
  color: var(--text);
  display: block;
  transition: all 0.2s;
  position: relative;
}
.tool-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -8px rgba(0,0,0,0.12);
  border-color: var(--accent);
}
.tool-tile .icon {
  font-size: 1.6rem;
  margin-bottom: 8px;
  display: block;
}
.tool-tile h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}
.tool-tile p {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
}

/* PROSE (설명 콘텐츠) */
.prose {
  font-size: 0.96rem;
  color: var(--text-2);
  line-height: 1.8;
}
.prose h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin: 28px 0 12px;
  letter-spacing: -0.02em;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-soft);
}
.prose h2:first-child { margin-top: 0; }
.prose h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin: 22px 0 8px;
  letter-spacing: -0.015em;
}
.prose p { margin-bottom: 14px; }
.prose ul, .prose ol { margin: 10px 0 14px 22px; }
.prose li { margin-bottom: 5px; }
.prose strong { color: var(--text); font-weight: 600; }
.prose code {
  background: var(--border-soft);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em;
}
.prose blockquote {
  border-left: 3px solid var(--accent);
  padding: 2px 16px;
  margin: 16px 0;
  color: var(--muted);
  background: var(--accent-light);
  border-radius: 0 8px 8px 0;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 0.9rem;
}
.prose th, .prose td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.prose th {
  background: var(--border-soft);
  font-weight: 600;
  color: var(--text);
}

/* RELATED */
.related {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.related h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 12px;
}
.related-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}
.related-list a {
  display: block;
  padding: 10px 14px;
  background: var(--border-soft);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-2);
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.15s;
}
.related-list a:hover { background: var(--accent-light); color: var(--accent-dark); }

/* AUTHOR/META */
.meta-box {
  background: var(--border-soft);
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 22px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.meta-box strong { color: var(--text-2); font-weight: 600; }

/* FOOTER */
footer {
  background: #18181b;
  color: #a1a1aa;
  padding: 40px 0 32px;
  text-align: center;
  font-size: 0.85rem;
}
footer .brand-mark { margin: 0 auto 12px; background: rgba(255,255,255,0.1); }
footer p { margin-bottom: 10px; }
footer a { color: #d4d4d8; margin: 0 8px; text-decoration: none; }
footer a:hover { color: white; }
.footer-links { margin-top: 6px; font-size: 0.82rem; }

/* RESPONSIVE */
@media (max-width: 560px) {
  .container { padding: 0 18px; }
  .hero h1 { font-size: 1.55rem; }
  .card { padding: 22px 20px; }
  .tool-grid { grid-template-columns: 1fr; }
  nav .container { padding: 8px 18px; }
}
