:root {
  --bg: #f0f4ff;
  --surface: #ffffff;
  --surface2: #f8faff;
  --primary: #0057ff;
  --primary-light: #dce8ff;
  --primary-dark: #003fcc;
  --text: #0f172a;
  --text-sub: #64748b;
  --text-muted: #94a3b8;
  --border: #e2e8f4;
  --border-hover: #93b4ff;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,87,255,0.08), 0 1px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 12px 40px rgba(0,87,255,0.12), 0 2px 8px rgba(0,0,0,0.06);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── 배경 장식 ── */
body::before {
  content: '';
  position: fixed;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0,87,255,0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  bottom: -150px;
  left: -150px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0,87,255,0.05) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ── 레이아웃 ── */
.page {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}

/* ── 헤더 ── */
.header {
  margin-bottom: 48px;
}

.header-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
  animation: fadeSlideDown 0.5s ease both;
}

.header-badge::before {
  content: '●';
  font-size: 7px;
  animation: pulse 2s ease infinite;
}

.header-title {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 12px;
  animation: fadeSlideDown 0.5s 0.05s ease both;
}

.header-title em {
  font-style: normal;
  color: var(--primary);
}

.header-desc {
  font-size: 15px;
  color: var(--text-sub);
  font-weight: 400;
  max-width: 460px;
  animation: fadeSlideDown 0.5s 0.1s ease both;
}

/* ── 통계 바 ── */
.stats-bar {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 28px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  animation: fadeSlideDown 0.5s 0.15s ease both;
}

.stat-item {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.stat-num {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 13px;
  color: var(--text-sub);
  font-weight: 500;
}

.stat-divider {
  width: 1px;
  height: 20px;
  background: var(--border);
}

.stat-updated {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ── 검색 ── */
.search-wrap {
  position: relative;
  margin-bottom: 24px;
  animation: fadeSlideDown 0.5s 0.2s ease both;
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 14px 16px 14px 46px;
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  outline: none;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,87,255,0.1), var(--shadow-sm);
}

.search-count {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  pointer-events: none;
}

/* ── 링크 그리드 ── */
.grid-wrap {
  animation: fadeSlideDown 0.5s 0.25s ease both;
}

.link-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}

.link-card {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 14px;
  font-size: 13.5px;
  font-weight: 500;
  transition: all 0.18s ease;
  position: relative;
  overflow: hidden;
}

.link-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--primary-light) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.link-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  color: var(--primary-dark);
}

.link-card:hover::before {
  opacity: 1;
}

.link-card:hover .link-arrow {
  transform: translateX(3px);
  color: var(--primary);
}

.link-icon {
  font-size: 15px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.link-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  position: relative;
  z-index: 1;
  line-height: 1.4;
}

.link-arrow {
  font-size: 14px;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform 0.18s ease, color 0.18s ease;
  position: relative;
  z-index: 1;
}

/* ── 빈 결과 ── */
.empty-state {
  display: none;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.empty-state-text {
  font-size: 15px;
}

/* ── 푸터 ── */
.footer {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-brand {
  font-size: 15px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.02em;
}

.footer-copy {
  font-size: 12px;
  color: var(--text-muted);
}

/* ── 스크롤 투 탑 ── */
.scroll-top {
  position: fixed;
  bottom: 28px;
  right: 24px;
  width: 44px;
  height: 44px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,87,255,0.3);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s, transform 0.25s;
  z-index: 100;
}

.scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.scroll-top:hover {
  background: var(--primary-dark);
}

/* ── 애니메이션 ── */
@keyframes fadeSlideDown {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

/* ── 반응형 ── */
@media (max-width: 600px) {
  .page { padding: 36px 16px 60px; }
  .link-list { grid-template-columns: 1fr; }
  .stats-bar { gap: 16px; }
  .stat-updated { width: 100%; margin-left: 0; }
}

/* -- 계층 색인 (2026-09-22) -- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-sub);
  margin-bottom: 18px;
}

.breadcrumb a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.breadcrumb a:hover { text-decoration: underline; }

.sido-group { margin-bottom: 40px; }

.sido-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary-light);
}

.sido-meta {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}

.link-count {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  border-radius: 999px;
  padding: 2px 8px;
  margin-left: 8px;
}

  
