:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --text-main: #0f172a;
  --text-body: #334155;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --border-subtle: #f1f5f9;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --font-mono: "JetBrains Mono", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Pretendard Variable", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: var(--bg);
  color: var(--text-body);
  line-height: 1.8;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}

.site-nav {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
}
.nav-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.brand-title {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text-main);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.brand-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.nav-back-link {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}
.nav-back-link:hover {
  color: var(--text-main);
}

.disclaimer-box {
  background: #ffffff;
  border: 1px solid var(--border);
  border-left: 3px solid #64748b;
  border-radius: 6px;
  padding: 14px 18px;
  margin: 20px 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.disclaimer-box strong { color: var(--text-main); }
.disclaimer-box.home-center {
  max-width: 760px;
  margin: 24px auto 0 auto;
  text-align: left;
}

.ad-placeholder {
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.ad-home-top { min-height: 100px; margin: 32px 0; }
.ad-home-bottom { min-height: 140px; margin: 40px 0 20px 0; }
.ad-article-top { min-height: 100px; margin: 24px 0; }
.ad-article-toc { min-height: 100px; margin: 24px 0 36px 0; }
.ad-article-mid { min-height: 120px; margin: 36px 0; }
.ad-sidebar-sticky { min-height: 600px; }
.ad-single-top { min-height: 100px; margin: 24px 0; }
.ad-single-bottom { min-height: 250px; margin: 32px 0; }

.site-domain-link {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid rgba(37, 99, 235, 0.3);
  padding-bottom: 1px;
  transition: color 0.15s, border-bottom-color 0.15s;
}
.site-domain-link:hover {
  color: var(--accent-hover);
  border-bottom-color: var(--accent-hover);
}

.hub-container {
  max-width: 1140px;
  margin: 40px auto 60px auto;
  padding: 0 20px;
}
.hub-hero {
  text-align: center;
  margin-bottom: 28px;
}
.hub-hero h1 {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}
.hub-hero p {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.6;
}

.directory-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 36px 0;
}
.service-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  text-decoration: none;
  color: inherit;
}
.service-card:hover {
  transform: translateY(-4px);
  border-color: #cbd5e1;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.05);
}
.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.route-badge {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  background: #eff6ff;
  padding: 3px 8px;
  border-radius: 4px;
}
.stat-badge {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: #f1f5f9;
  padding: 3px 8px;
  border-radius: 4px;
}
.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 12px;
  line-height: 1.4;
  letter-spacing: -0.01em;
}
.card-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
  flex-grow: 1;
}
.card-foot {
  border-top: 1px solid #f1f5f9;
  padding-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}
.update-time {
  font-size: 0.78rem;
  color: #94a3b8;
}
.action-text {
  color: var(--accent);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.15s;
}
.service-card:hover .action-text { gap: 8px; }

.article-wrap {
  max-width: 1140px;
  margin: 36px auto 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 44px;
}
.main-column { max-width: 760px; }
.header-area { margin-bottom: 24px; }
.header-area h1 {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.35;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.header-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 16px;
}
.header-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
  color: #94a3b8;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.header-meta span strong { color: var(--text-muted); }

.toc-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px 22px;
  margin: 24px 0;
}
.toc-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 12px;
}
.toc-items {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 16px;
  font-size: 0.88rem;
}
.toc-items a { color: var(--text-body); text-decoration: none; }
.toc-items a:hover { color: var(--accent); text-decoration: underline; }

.site-entry {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 22px 24px;
  margin: 24px 0;
}
.site-entry-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 8px;
}
.site-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}
.site-order-num {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--text-muted);
}
.link-group {
  display: flex;
  align-items: center;
  gap: 10px;
}
.detail-memo-link {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  background: #f1f5f9;
  padding: 2px 7px;
  border-radius: 4px;
}
.detail-memo-link:hover { color: var(--text-main); background: #e2e8f0; }
.site-desc-text {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text-body);
  text-align: justify;
}
.site-ref-note {
  margin-top: 12px;
  font-size: 0.82rem;
  color: var(--text-muted);
  border-top: 1px dashed #f1f5f9;
  padding-top: 8px;
}
.site-ref-note a { color: var(--text-muted); text-decoration: underline; }

.sidebar-col { display: flex; flex-direction: column; }
.sticky-ad-wrapper { position: sticky; top: 24px; }

.single-wrap {
  max-width: 860px;
  margin: 40px auto 80px auto;
  padding: 0 20px;
}
.single-kicker {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 6px;
}
.single-title {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 12px;
}
.single-sub {
  color: var(--text-muted);
  font-size: 0.95rem;
}
.site-card-detail {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px 28px;
  margin: 28px 0;
}
.detail-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 16px;
  margin-bottom: 20px;
}
.status-tag-active {
  font-size: 0.75rem;
  font-weight: 700;
  color: #15803d;
  background: #dcfce7;
  padding: 3px 8px;
  border-radius: 4px;
}
.status-tag-error {
  font-size: 0.75rem;
  font-weight: 700;
  color: #b91c1c;
  background: #fee2e2;
  padding: 3px 8px;
  border-radius: 4px;
}
.direct-box {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  margin: 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.domain-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: block;
}
.domain-name {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-main);
  font-size: 1.05rem;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: #ffffff;
  padding: 36px 20px;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 60px;
}
.footer-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.footer-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  margin-left: 16px;
}
.footer-links a:hover { color: var(--text-main); }
.footer-legal-notice {
  font-size: 0.75rem;
  color: #94a3b8;
  line-height: 1.6;
  border-top: 1px solid var(--border-subtle);
  padding-top: 16px;
}

@media (max-width: 960px) { .directory-grid { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .article-wrap { grid-template-columns: 1fr; }
  .sidebar-col { display: none; }
  .toc-items { grid-template-columns: 1fr; }
}
