@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+KR:wght@400;500;600;700&family=Outfit:wght@500;600;700;800&display=swap');

* { box-sizing: border-box; }

:root {
  /* Warm Modernity: deep navy trust + caramel-gold warmth */
  --bg: #0b0f17;
  --card: #161f30;
  --border: #253046;
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --accent: #d97706;
  --accent-dark: #b45309;
  --shadow: rgba(0, 0, 0, 0.45);
  --font-body: "IBM Plex Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --font-display: "Outfit", var(--font-body);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #fafaf9;
    --card: #ffffff;
    --border: #e7e2da;
    --text: #1c1917;
    --muted: #78716c;
    --muted-2: #57534e;
    --accent: #b45309;
    --accent-dark: #78350f;
    --shadow: rgba(28, 25, 23, 0.07);
  }
}

:root[data-theme="light"] {
  --bg: #fafaf9;
  --card: #ffffff;
  --border: #e7e2da;
  --text: #1c1917;
  --muted: #78716c;
  --muted-2: #57534e;
  --accent: #b45309;
  --accent-dark: #78350f;
  --shadow: rgba(28, 25, 23, 0.07);
}

:root[data-theme="dark"] {
  --bg: #0b0f17;
  --card: #161f30;
  --border: #253046;
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --accent: #d97706;
  --accent-dark: #b45309;
  --shadow: rgba(0, 0, 0, 0.45);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  letter-spacing: -0.01em;
  line-height: 1.6;
  transition: background-color 0.15s ease, color 0.15s ease;
}

a { color: var(--accent); }
a:hover { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 0.18em; }

a:focus-visible,
button:focus-visible,
select:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--border);
  background: var(--card);
  background: color-mix(in srgb, var(--card) 92%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.site-header .inner {
  max-width: 840px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.brand {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
}
.site-nav {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
  align-items: center;
}
.site-nav a {
  color: var(--muted);
  text-decoration: none;
}
.site-nav a:hover,
.site-nav a.active {
  color: var(--accent);
}

.theme-toggle {
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  border-radius: 999px;
  width: 2.1rem;
  height: 2.1rem;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--accent); }

main {
  max-width: 840px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
}

.page-title { font-size: 1.75rem; line-height: 1.25; margin: 0 0 0.5rem; }
.page-lead { color: var(--muted); margin: 0 0 2rem; }

article h2 { font-size: 1.25rem; margin-top: 2rem; }
article h3 { font-size: 1.05rem; margin-top: 1.5rem; }
article p, article li { color: var(--text); }
article ul, article ol { padding-left: 1.25rem; }

.card {
  padding: 1.5rem 1.75rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--card);
  box-shadow: 0 10px 30px var(--shadow);
  margin-bottom: 1.5rem;
}

.guide-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.92rem;
}
.guide-table th, .guide-table td {
  padding: 0.65rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.guide-table th:last-child, .guide-table td:last-child {
  text-align: right;
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
}
.guide-table tbody tr:last-child td { border-bottom: none; }

.faq-item { margin-bottom: 1.25rem; }
.faq-item dt { font-weight: 600; margin-bottom: 0.35rem; }
.faq-item dd { margin: 0; color: var(--muted); }

.site-footer {
  border-top: 1px solid var(--border);
  color: var(--muted-2);
  font-size: 0.82rem;
  text-align: center;
  padding: 2rem 1.5rem 2.5rem;
}
.site-footer nav {
  margin-bottom: 0.75rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}
.site-footer nav a { color: var(--muted); text-decoration: none; }
.site-footer nav a:hover { color: var(--accent); }

.post-category-badge {
  display: inline-block;
  font-size: 0.72rem;
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border));
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  margin-bottom: 0.5rem;
}

.ad-slot {
  margin: 2rem 0;
  padding: 0.75rem;
  border: 1px dashed var(--border);
  border-radius: 0.5rem;
  text-align: center;
  color: var(--muted-2);
  font-size: 0.75rem;
}

@media (max-width: 640px) {
  .site-header .inner { padding: 0.85rem 1rem; flex-wrap: nowrap; }
  .brand { font-size: 1rem; }
  .site-nav {
    gap: 0.85rem;
    font-size: 0.82rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .site-nav::-webkit-scrollbar { display: none; }
  main { padding: 1.75rem 1rem 2.25rem; }
  .page-title { font-size: 1.4rem; }
  .card { padding: 1.25rem 1.1rem; }
  table { display: block; overflow-x: auto; }
}

@media (max-width: 380px) {
  .site-nav { gap: 0.6rem; font-size: 0.78rem; }
}
