/* Polivote 1000 — Phase 1 styles */
:root {
  /* 정당 중립 — 폴리보트 브랜드 틸 */
  --primary: #0d9488;        /* teal-600 */
  --primary-dark: #0f766e;   /* teal-700 */
  --primary-darker: #115e59; /* teal-800 */
  --primary-light: #ccfbf1;  /* teal-100 */
  --accent: #f97316;         /* orange-500 — 강조 (중립) */
  --accent-dark: #ea580c;    /* orange-600 */
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --danger: #b91c1c;
  --success: #047857;
  /* Spacing rhythm */
  --section-spacing-pc: 50px;
  --section-spacing-mo: 32px;
  --title-gap-pc: 40px;
  --title-gap-mo: 24px;
  /* Card tokens (unified) */
  --radius-card: 14px;
  --radius-card-lg: 18px;
  --shadow-card: 0 4px 12px -4px rgba(15,23,42,0.08);
  --shadow-card-hover: 0 14px 28px -10px rgba(15,23,42,0.18);
  /* Typography scale */
  --fs-h2: 26px;
  --fs-body: 17px;
  --fs-sub: 15px;
  --fs-caption: 13px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  font-size: 17px; /* base bumped for senior readability */
}

/* ============ Layout ============ */
.container { max-width: 1100px !important; margin-left: auto; margin-right: auto; padding-left: 20px; padding-right: 20px; width: 100%; }

/* ============ Header ============ */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 40;
}
.site-header { backdrop-filter: saturate(140%) blur(8px); background: rgba(255,255,255,0.92); box-shadow: 0 1px 0 rgba(15,23,42,0.04); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 92px; gap: 32px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 18px; color: var(--primary);
  text-decoration: none;
  transition: transform .2s ease;
}
.logo:hover { transform: translateY(-1px); }
.logo img { height: 70px; width: auto; display: block; }
.logo-mark {
  width: 32px; height: 32px; background: var(--primary); color: white;
  border-radius: 8px; display: grid; place-items: center; font-size: 17px;
}
.main-nav { display: flex; gap: 4px; align-items: center; flex-wrap: nowrap; }
.main-nav a {
  position: relative; white-space: nowrap;
  color: #334155; text-decoration: none; font-size: 15px; font-weight: 600;
  padding: 10px 16px; border-radius: 999px;
  letter-spacing: -0.01em;
  transition: color .2s, background .2s;
}
.main-nav a::after {
  content: ""; position: absolute; left: 50%; bottom: 4px; transform: translateX(-50%);
  width: 0; height: 2px; background: var(--primary); border-radius: 2px;
  transition: width .25s ease;
}
.main-nav a:hover { color: var(--primary); }
.main-nav a:hover::after { width: 24px; }
.main-nav a.active { color: var(--primary); font-weight: 700; }
.main-nav a.active::after { width: 24px; }
.main-nav .nav-divider {
  width: 1px; height: 18px; background: #e2e8f0; margin: 0 6px;
}
.main-nav a.nav-secondary {
  color: #64748b; font-size: 14px; font-weight: 500;
}
.main-nav a.nav-secondary:hover { color: var(--primary); }
.main-nav a.nav-secondary::after { display: none; }
.btn-primary {
  background: var(--primary-dark); color: white; border: none;
  padding: 12px 24px; border-radius: 8px; font-weight: 700; font-size: 16px;
  cursor: pointer; transition: background .2s; min-height: 48px;
}
.btn-primary:hover { background: var(--primary-darker); }
.btn-secondary {
  background: var(--surface); color: var(--primary); border: 1px solid var(--primary);
  padding: 8px 18px; border-radius: 8px; font-weight: 600; font-size: 14px;
  cursor: pointer;
}

/* D-카운트다운 배지 */
.dday-badge {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 6px 12px; border-radius: 99px;
  background: linear-gradient(90deg, #dc2626, #ef4444); color: white;
  font-size: 13px; font-weight: 700;
  box-shadow: 0 2px 6px rgba(220,38,38,0.3);
}
.dday-badge .pulse {
  width: 6px; height: 6px; border-radius: 50%; background: white;
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .35 } }

/* 알림 벨 */
.notif-btn {
  position: relative; background: transparent; border: none; cursor: pointer;
  padding: 8px; border-radius: 50%; transition: background .2s;
  font-size: 20px; line-height: 1; color: var(--text);
}
.notif-btn:hover { background: var(--bg); }
.notif-badge {
  position: absolute; top: 4px; right: 4px;
  background: var(--danger); color: white;
  width: 16px; height: 16px; border-radius: 50%;
  font-size: 10px; font-weight: 700; line-height: 16px; text-align: center;
}
.header-actions { display: flex; align-items: center; gap: 10px; }
@media (max-width: 768px) {
  .dday-badge { display: none; }
}
.mobile-only { display: none; }
@media (max-width: 768px) {
  .main-nav { display: none; }
  .mobile-only { display: inline-flex; }
  /* 모바일에서 중복 버튼 숨김 — 좌측 하단 "📝 시민·후보자 공약등록" 핀 하나만 남김 */
  .header-actions .btn-accent,
  .header-actions .notif-btn,
  .fab { display: none !important; }
}

/* btnMyPledge: 모바일에서만 표시 (데스크톱은 헤더의 "참여하기" 버튼으로 대체) */
@media (min-width: 769px) {
  #btnMyPledge { display: none !important; }
}

/* ============ Featured pledges horizontal scroll ============ */
.fp-scroll { scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent; }
.fp-scroll::-webkit-scrollbar { height: 8px; }
.fp-scroll::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
.fp-scroll::-webkit-scrollbar-track { background: transparent; }

/* About 페이지에서는 캠페인 소개 토글 헤더가 브레드크럼과 중복되어 숨김 */
body[data-page="about"] #intro-toggle > summary { display: none; }
body[data-page="about"] #intro-toggle { border: none; background: transparent; box-shadow: none; }
body[data-page="about"] #intro-toggle .st-body { border-top: none; padding: 0; }

/* ============ Multi-page routing ============ */
.page-only { display: none !important; }
body[data-page="home"] .page-only.home,
body[data-page="forum"] .page-only.forum,
body[data-page="market"] .page-only.market,
body[data-page="about"] .page-only.about { display: revert !important; }
/* Active nav highlight */
body[data-page="forum"] .main-nav a[href*="1000-forum"],
body[data-page="market"] .main-nav a[href*="1000-market"],
body[data-page="about"] .main-nav a[href*="1000-about"] { color: var(--primary); font-weight: 800; }
body[data-page="forum"] .main-nav a[href*="1000-forum"]::after,
body[data-page="market"] .main-nav a[href*="1000-market"]::after,
body[data-page="about"] .main-nav a[href*="1000-about"]::after { width: 24px; }

/* ============ Jump Nav (mobile sticky) ============ */
.jump-nav { display: none; }
@media (max-width: 768px) {
  .jump-nav {
    position: sticky; top: 0; z-index: 30;
    display: flex; gap: 6px; overflow-x: auto;
    padding: 8px 12px;
    background: rgba(255,255,255,0.95); backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    scrollbar-width: none;
  }
  .jump-nav::-webkit-scrollbar { display: none; }
  .jump-nav a {
    flex-shrink: 0; white-space: nowrap;
    padding: 6px 11px; border-radius: 999px;
    background: #f1f5f9; color: #334155;
    font-size: 12px; font-weight: 700; text-decoration: none;
    border: 1px solid transparent;
    transition: background .15s, color .15s, border-color .15s;
  }
  .jump-nav a:hover, .jump-nav a:active {
    background: rgba(13,148,136,0.10); color: var(--primary); border-color: rgba(13,148,136,0.25);
  }
}
/* 활성 페이지 강조 */
body[data-page="forum"]  .jump-nav a[href*="forum"],
body[data-page="market"] .jump-nav a[href*="market"],
body[data-page="about"]  .jump-nav a[href*="about"] {
  background: var(--primary); color: white; border-color: var(--primary);
}

/* ============ Collapsible section toggle ============ */
.section-toggle {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin: 14px auto;
  overflow: hidden;
  transition: box-shadow .2s;
}
.section-toggle[open] { box-shadow: 0 6px 24px -10px rgba(15,23,42,0.10); }
.section-toggle > summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px;
  font-weight: 700;
  user-select: none;
  transition: background .15s;
}
.section-toggle > summary::-webkit-details-marker { display: none; }
.section-toggle > summary:hover { background: #f8fafc; }
.section-toggle .st-title {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 17px; color: #0f172a; font-weight: 800;
}
.section-toggle .st-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 8px;
  background: rgba(13,148,136,0.10); font-size: 17px;
}
.section-toggle .st-meta {
  flex: 1; color: var(--text-muted); font-size: 13px; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.section-toggle .st-chev {
  color: var(--text-muted); font-size: 16px;
  transition: transform .2s;
}
.section-toggle[open] > summary .st-chev { transform: rotate(180deg); }
.section-toggle .st-body {
  padding: 4px 20px 20px;
  border-top: 1px solid var(--border);
  margin-top: 0;
}
@media (max-width: 640px) {
  .section-toggle > summary { padding: 14px 16px; gap: 8px; }
  .section-toggle .st-title { font-size: 15px; }
  .section-toggle .st-meta { font-size: 12px; }
  .section-toggle .st-body { padding: 4px 14px 16px; }
}

/* ============ Hero ============ */
.hero {
  position: relative;
  background-color: #ffffff;
  color: var(--text);
  padding: 72px 0 64px;
  text-align: center;
  overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  width: auto; height: auto; border-radius: 0;
  filter: none; opacity: 1; top: 0; right: 0; bottom: 0; left: 0;
  background-color: transparent;
  background-image:
    linear-gradient(rgba(13,148,136,0.20) 1.5px, transparent 1.5px),
    linear-gradient(90deg, rgba(13,148,136,0.20) 1.5px, transparent 1.5px);
  background-size: 44px 44px;
  background-position: -1px -1px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 80%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 80%, transparent 100%);
  z-index: 0;
}
.hero::before {
  content: ""; position: absolute; pointer-events: none; z-index: 0;
  width: 420px; height: 420px; border-radius: 50%;
  filter: blur(80px);
  background: #ccfbf1; top: -120px; left: -120px; opacity: 0.35;
}
.hero > .container { position: relative; z-index: 1; }
@media (max-width: 640px) {
  .hero { padding: 48px 0 40px; background-size: 28px 28px; }
}
.hero-badge {
  display: inline-block; padding: 6px 14px; background: var(--primary-light);
  border-radius: 99px; font-size: 12px; font-weight: 700;
  color: var(--primary-dark);
  border: 1px solid rgba(13,148,136,0.25); margin-bottom: 18px;
}
.hero h1 {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-weight: 900; line-height: 1.15; margin: 0 0 18px;
  letter-spacing: -0.02em;
  color: var(--text);
}
.hero h1 .hero-sub {
  font-size: clamp(20px, 3.6vw, 34px);
  font-weight: 700; color: var(--text-muted);
  letter-spacing: -0.01em;
}
.hero h1 .hero-main {
  font-size: clamp(30px, 5.8vw, 56px);
  font-weight: 900; line-height: 1.15;
}
.hero p {
  max-width: 660px; margin: 0 auto 40px;
  color: var(--text-muted); font-size: 18px; line-height: 1.7;
}
.hero-stats {
  display: grid; grid-template-columns: auto repeat(3, 1fr);
  align-items: center; gap: 16px;
  max-width: 820px; margin: 0 auto;
  padding-top: 28px; border-top: 1px solid var(--border);
}
.hero-stat { text-align: center; }
.hero-stat .num {
  font-size: clamp(26px, 5vw, 38px); font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--primary);
}
.hero-stat .label { font-size: 14px; color: var(--text-muted); margin-top: 6px; }
.hero-dday {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  padding: 12px 20px; border-radius: 999px;
  background: linear-gradient(135deg,#dc2626,#ef4444); color: #fff;
  font-weight: 800; font-size: 18px; letter-spacing: -0.01em;
  box-shadow: 0 6px 16px -4px rgba(220,38,38,0.45);
}
.hero-dday .pulse {
  width: 8px; height: 8px; border-radius: 50%; background: #fff;
  animation: pulse 1.4s ease-in-out infinite;
}
@media (max-width: 640px) {
  .hero-stats {
    grid-template-columns: auto repeat(3, 1fr);
    gap: 8px; padding-top: 18px;
  }
  .hero-dday { padding: 8px 12px; font-size: 13px; }
  .hero-stat .num { font-size: 22px; }
  .hero-stat .label { font-size: 11px; margin-top: 2px; }
}

/* ============ Sections ============ */
section { padding: var(--section-spacing-pc) 0; }
@media (max-width: 640px) {
  section { padding: var(--section-spacing-mo) 0; }
  .container { padding: 0 16px; }
}
.section-title {
  display: flex; align-items: baseline; gap: 10px;
  margin: 0 0 var(--title-gap-pc);
  font-size: 26px; font-weight: 800; letter-spacing: -0.01em;
}
@media (max-width: 640px) {
  .section-title { margin-bottom: var(--title-gap-mo); }
}
.section-title .icon { font-size: 26px; }
.section-sub { color: var(--text-muted); font-size: 16px; margin: -24px 0 32px; line-height: 1.6; }

/* Full-bleed section bands (alternating backgrounds via pseudo-element) */
.section-band-white,
.section-band-tint,
.section-band-gray {
  position: relative;
}
.section-band-white::before,
.section-band-gray::before,
.section-band-tint::before {
  content: ""; position: absolute;
  top: 0; bottom: 0;
  left: 50%; transform: translateX(-50%);
  width: 100vw; z-index: -1;
}
.section-band-white::before { background: var(--surface); }
.section-band-gray::before  { background: #f1f5f9; }
.section-band-tint::before  { background: #f0fdfa; }

/* ============ Cards Grid ============ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}
@media (max-width: 640px) {
  .card-grid { grid-template-columns: 1fr; gap: 14px; }
}

/* ============ Pledge Card ============ */
.pledge-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 20px;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-card);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.pledge-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--primary-light);
}
.pledge-card-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px;
}
.tag-badge {
  display: inline-block; padding: 5px 12px; border-radius: 99px;
  font-size: 13px; font-weight: 700;
  background: var(--primary-light); color: var(--primary);
}
.tag-badge.green { background: #d1fae5; color: #065f46; }
.tag-badge.amber { background: #fef3c7; color: #92400e; }
.tag-badge.rose  { background: #ffe4e6; color: #be123c; }
.tag-badge.purple{ background: #ede9fe; color: #6d28d9; }
.tag-badge.sky   { background: #e0f2fe; color: #075985; }
.like-icon {
  background: transparent; border: none; cursor: pointer;
  color: var(--text-muted); font-size: 22px;
  transition: color .2s; min-width: 36px; min-height: 36px;
  display: inline-grid; place-items: center;
}
.like-icon:hover, .like-icon.active { color: var(--danger); }
.pledge-title {
  font-size: 19px; font-weight: 700; margin: 0 0 10px;
  line-height: 1.4; color: var(--text);
}
.pledge-desc {
  font-size: 15px; color: var(--text-muted); margin: 0 0 16px;
  line-height: 1.6; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pledge-hashtags { font-size: 14px; color: var(--text-muted); margin-bottom: 16px; }
.pledge-hashtags span { margin-right: 8px; }
.pledge-foot {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 14px; border-top: 1px solid var(--border);
  font-size: 14px; color: var(--text-muted);
}
.pledge-foot-stats { display: flex; gap: 16px; }
.pledge-foot-stats span b { color: var(--text); }
.pledge-foot a {
  color: var(--primary); text-decoration: none; font-weight: 600;
}
.pledge-foot a:hover { text-decoration: underline; }
.manifesto-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 4px;
  font-size: 10px; font-weight: 700;
  margin-left: 6px;
}
.manifesto-pill.empathy   { background: #ffe4e6; color: #be123c; }
.manifesto-pill.reviewing { background: #fef3c7; color: #92400e; }
.manifesto-pill.refining  { background: #e0f2fe; color: #075985; }
.manifesto-pill.adopted   { background: #d1fae5; color: #065f46; }

/* ============ List View ============ */
.card-list { display: flex; flex-direction: column; gap: 10px; }
.card-list .pledge-card {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
}
.card-list .pledge-card-head { display: contents; }
.card-list .pledge-card-head .like-icon { order: 99; }
.card-list .pledge-title { margin: 0; font-size: 15px; }
.card-list .pledge-desc {
  font-size: 13px; margin: 2px 0 0;
  -webkit-line-clamp: 1;
  display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden;
}
.card-list .pledge-hashtags { display: none; }
.card-list .pledge-foot {
  border-top: none; padding-top: 0;
  display: flex; gap: 12px; align-items: center;
  white-space: nowrap;
}
.card-list .list-main { min-width: 0; }
@media (max-width: 640px) {
  .card-list .pledge-card { grid-template-columns: auto 1fr; }
  .card-list .pledge-foot { grid-column: 1 / -1; justify-content: space-between; }
  .card-list .pledge-card-head .like-icon { grid-column: 2; justify-self: end; }
}

/* ============ View Toggle ============ */
.view-toggle {
  display: inline-flex; background: var(--bg); border-radius: 8px; padding: 3px;
  margin-left: auto;
}
.view-toggle button {
  background: transparent; border: none; padding: 6px 10px; cursor: pointer;
  border-radius: 6px; font-size: 13px; color: var(--text-muted);
  display: inline-flex; align-items: center; gap: 4px;
}
.view-toggle button.active { background: var(--surface); color: var(--primary); box-shadow: 0 1px 2px rgba(0,0,0,0.05); }

/* ============ "+ Add" Card ============ */
.add-card {
  background: transparent;
  border: 2px dashed var(--border);
  border-radius: 14px;
  padding: 20px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; min-height: 160px;
  cursor: pointer; color: var(--text-muted);
  transition: border-color .2s, color .2s, background .2s;
}
.add-card:hover {
  border-color: var(--primary); color: var(--primary);
  background: var(--primary-light);
}
.add-card .plus { font-size: 28px; line-height: 1; margin-bottom: 8px; }
.add-card-title { font-weight: 700; font-size: 14px; }
.add-card-sub { font-size: 12px; margin-top: 4px; }

/* ============ Candidate Card ============ */
.candidate-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  align-items: stretch;
}
@media (max-width: 1100px) { .candidate-row { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 880px)  { .candidate-row { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px)  { .candidate-row { grid-template-columns: repeat(2, 1fr); gap: 12px; } }
@media (max-width: 380px)  { .candidate-row { grid-template-columns: 1fr; } }
.candidate-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-card); padding: 14px 12px 12px;
  text-align: center; transition: box-shadow .2s, border-color .2s;
  color: var(--text); display: flex; flex-direction: column; gap: 8px;
  height: 100%;
  box-shadow: var(--shadow-card);
}
.candidate-card .cand-head { flex: 1; }
.candidate-card .cand-link { margin-top: auto; }
.candidate-card:hover { box-shadow: 0 8px 16px -8px rgba(15,23,42,0.15); }
.candidate-card.open { border-color: var(--primary); box-shadow: 0 8px 20px -10px rgba(13,148,136,0.35); }
.candidate-card .cand-head {
  background: transparent; border: none; padding: 6px 4px 4px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  width: 100%; color: inherit;
}
.candidate-card .cand-head:hover .cand-name { color: var(--primary); }
.cand-link {
  display: block; font-size: 12px; color: var(--primary); font-weight: 700;
  text-decoration: none; padding: 8px 10px; border-radius: 8px;
  background: var(--primary-light); text-align: center;
  border: 1px solid transparent; transition: background .15s, border-color .15s;
  margin-top: 4px;
}
.cand-link:hover { background: #99f6e4; border-color: var(--primary); }
.cand-link-btn { width: 100%; cursor: pointer; font-family: inherit; }
.cand-avatar {
  position: relative;
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, #5eead4, #0d9488);
  color: white; font-weight: 800; font-size: 22px;
  display: grid; place-items: center; margin: 0 auto 10px;
}
.cand-verify {
  position: absolute; right: -2px; bottom: -2px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--primary); color: white;
  display: grid; place-items: center; font-size: 11px;
  border: 2px solid var(--surface);
}
.cand-name { font-weight: 700; font-size: 14px; margin: 0 0 4px; }
.cand-party {
  display: inline-block; font-size: 11px; padding: 2px 8px;
  background: var(--primary-light); color: var(--primary);
  border-radius: 99px; margin-bottom: 4px;
}
.cand-meta { font-size: 11px; color: var(--text-muted); }
.cand-stat { margin-top: 6px; font-size: 11px; color: var(--text-muted); }
.cand-stat b { color: var(--success); }

/* ============ Filter Bar ============ */
.filter-bar {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 10px 14px; margin-bottom: 24px;
  flex-wrap: wrap;
}
.filter-bar .search-wrap {
  flex: 1; display: flex; align-items: center; gap: 6px;
  background: var(--bg); padding: 6px 12px; border-radius: 8px;
  min-width: 200px;
}
.filter-bar .search-wrap input {
  border: none; outline: none; background: transparent; flex: 1; font-size: 13px;
}
.filter-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  padding: 8px 14px; border-radius: 99px; font-size: 14px; font-weight: 500;
  background: var(--bg); color: var(--text-muted); border: 1px solid transparent;
  cursor: pointer; transition: all .2s; min-height: 36px;
}
.chip:hover { background: var(--primary-light); color: var(--primary); }
.chip.active { background: var(--primary); color: white; }
.chip b { font-weight: 700; }

/* ============ Footer ============ */
.site-footer {
  background: #0f172a; color: #94a3b8; padding: 56px 0 32px;
  margin-top: 80px;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px;
}
.footer-sites {
  display: flex; gap: 12px; margin-top: 16px; flex-wrap: wrap;
}
.footer-sites a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12); border-radius: 99px;
  font-size: 12px; color: #cbd5e1;
  transition: background .2s, border-color .2s, color .2s;
}
.footer-sites a:hover { background: rgba(13,148,136,0.18); border-color: var(--primary); color: white; }
.footer-grid h4 { color: white; font-size: 14px; font-weight: 700; margin: 0 0 14px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; font-size: 13px; }
.footer-grid ul li { margin-bottom: 8px; }
.footer-grid a { color: #94a3b8; text-decoration: none; transition: color .2s; }
.footer-grid a:hover { color: white; }
.footer-brand p { font-size: 13px; line-height: 1.7; max-width: 360px; }
.footer-bottom {
  display: flex; justify-content: space-between;
  margin-top: 40px; padding-top: 24px; border-top: 1px solid #1e293b;
  font-size: 12px;
}
.footer-bottom .links a { margin-left: 18px; }
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; gap: 12px; align-items: flex-start; }
  .footer-bottom .links a { margin: 0 12px 0 0; }
}

/* ============ Modals & Bottom Sheet ============ */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(15,23,42,0.5);
  z-index: 50; display: none; align-items: center; justify-content: center;
  padding: 16px;
}
.modal-overlay.show { display: flex; }
.modal {
  background: var(--surface); border-radius: 16px; padding: 24px;
  width: 100%; max-width: 440px; max-height: 90vh; overflow-y: auto;
  position: relative;
}
/* 공약 상세는 거의 전체화면 */
#detailModal .modal {
  max-width: min(960px, 95vw) !important;
  max-height: 92vh;
}

/* === Like 버튼 (top-right of card) === */
.like-btn {
  background: #fff; border: 1.5px solid #e2e8f0; border-radius: 999px;
  width: 38px; height: 38px; cursor: pointer; font-size: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #64748b; transition: all .15s ease; padding: 0;
}
.like-btn:hover { background: #fef2f2; border-color: #ef4444; color: #ef4444; transform: scale(1.06); }
.like-btn.active { background: #ef4444; border-color: #ef4444; color: #fff; }
.like-btn.active span { font-size: 0; line-height: 1; }
.like-btn.active span::before { content: "♥"; font-size: 18px; }

/* 카드 하단의 좋아요/의견 인라인 버튼 */
.like-inline, .comment-inline {
  background: transparent; border: 1.5px solid transparent; border-radius: 999px;
  padding: 4px 10px; font-size: 13px; font-weight: 600; color: var(--text-muted);
  cursor: pointer; display: inline-flex; align-items: center; gap: 5px;
  transition: all .15s ease; font-family: inherit;
}
.like-inline:hover { background: #fef2f2; color: #ef4444; border-color: #fecaca; }
.like-inline.active { background: #fef2f2; color: #ef4444; border-color: #ef4444; }
.like-inline.active span::before { content: "♥"; }
.like-inline.active span { font-size: 0; }
.like-inline.active span::before { font-size: 14px; }
.comment-inline:hover { background: #ecfeff; color: #0891b2; border-color: #a5f3fc; }
.like-inline b, .comment-inline b { font-weight: 700; }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.modal-head h3 { margin: 0; font-size: 18px; font-weight: 800; }
.modal-close {
  background: transparent; border: none; font-size: 24px; cursor: pointer;
  color: var(--text-muted); line-height: 1;
}
.modal-step-bar {
  display: flex; gap: 4px; margin-bottom: 20px;
}
.modal-step-bar > div {
  flex: 1; height: 4px; border-radius: 2px; background: var(--border);
  transition: background .3s;
}
.modal-step-bar > div.active { background: var(--primary); }

label { display: block; font-size: 12px; font-weight: 700; color: var(--text-muted); margin: 0 0 6px; }
input, select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: 8px; font-size: 14px; font-family: inherit;
  margin-bottom: 14px; background: var(--surface);
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--primary); outline-offset: -1px; border-color: var(--primary);
}
textarea { resize: vertical; min-height: 80px; }

@media (max-width: 640px) {
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal {
    max-width: 100%; max-height: 92vh;
    border-radius: 20px 20px 0 0;
    animation: slideUp .25s ease-out;
  }
  @keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
  .modal::before {
    content: ""; display: block;
    width: 40px; height: 4px; border-radius: 2px;
    background: var(--border);
    margin: 0 auto 12px;
  }
}

/* ============ Toast ============ */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: #0f172a; color: white; padding: 12px 20px;
  border-radius: 99px; font-size: 13px; z-index: 60;
  display: none; box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.toast.show { display: block; }

/* ============ Utilities ============ */
.btn-block { width: 100%; padding: 12px; font-size: 14px; }
.btn-row { display: flex; gap: 8px; }
.btn-row > button { flex: 1; }
.btn-ghost {
  background: transparent; color: var(--text); border: 1px solid var(--border);
  padding: 10px 16px; border-radius: 8px; font-weight: 600; cursor: pointer;
}
.help-text { font-size: 12px; color: var(--text-muted); padding: 10px;
  background: var(--bg); border-radius: 8px; margin-bottom: 14px; }
.help-text.amber { background: #fef3c7; color: #92400e; }

/* ============ Filter scroll (mobile horizontal swipe) ============ */
.filter-scroll {
  display: flex; gap: 8px; align-items: center;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; padding-bottom: 4px;
  scroll-snap-type: x proximity;
}
.filter-scroll::-webkit-scrollbar { display: none; }
.filter-scroll > * { flex-shrink: 0; scroll-snap-align: start; }
.filter-scroll > button { min-height: 40px; }
@media (min-width: 768px) {
  .filter-scroll { flex-wrap: wrap; overflow: visible; }
}

/* ============ Accent CTA ============ */
.btn-accent {
  background: var(--accent); color: white; border: none;
  padding: 14px 28px; border-radius: 10px;
  font-weight: 800; font-size: 16px; cursor: pointer;
  min-height: 48px;
  box-shadow: 0 6px 16px -4px rgba(249,115,22,0.45);
  transition: transform .15s, box-shadow .15s, background .2s;
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
}
.btn-accent:hover { background: var(--accent-dark); transform: translateY(-1px); box-shadow: 0 10px 22px -6px rgba(249,115,22,0.55); }

/* ============ Floating Action Button (mobile) ============ */
.fab {
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 45;
  background: var(--accent); color: white; border: none;
  padding: 14px 22px; border-radius: 99px;
  font-weight: 800; font-size: 15px; cursor: pointer;
  box-shadow: 0 14px 30px -6px rgba(249,115,22,0.55);
  display: none; align-items: center; gap: 6px;
  min-height: 52px;
}
.fab:hover { background: var(--accent-dark); }
@media (max-width: 768px) {
  .fab { display: inline-flex; }
}

/* ============ Safe-area for fixed UI ============ */
.modal { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
@media (max-width: 640px) {
  .modal { padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
}

/* ============ Touch target floor (action buttons) ============ */
.btn-secondary, .btn-ghost, .btn-block, .btn-outline { min-height: 48px; }
.filter-tag { min-height: 40px; }

/* ============ Outline / Ghost variants ============ */
.btn-outline {
  background: transparent; color: var(--primary-dark);
  border: 1.5px solid var(--primary);
  padding: 12px 20px; border-radius: 8px;
  font-weight: 700; cursor: pointer;
}
.btn-outline:hover { background: var(--primary-light); }

/* ============ First-visit Intro Overlay ============ */
.intro-overlay {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(15,23,42,0.55);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px; overflow-y: auto;
  animation: introFade .25s ease-out;
}
.intro-overlay[hidden] { display: none !important; }
@keyframes introFade { from { opacity: 0 } to { opacity: 1 } }
.intro-card {
  background: var(--surface);
  border-radius: 20px;
  width: 100%; max-width: 880px;
  padding: 36px 32px 28px;
  box-shadow: 0 30px 80px -10px rgba(15,23,42,0.45);
  animation: introPop .3s cubic-bezier(.2,.8,.2,1);
}
@keyframes introPop { from { transform: translateY(20px) scale(.97); opacity: 0 } to { transform: none; opacity: 1 } }
.intro-head { text-align: center; margin-bottom: 24px; }
.intro-badge {
  display: inline-block; padding: 6px 14px; background: var(--primary-light);
  border-radius: 99px; font-size: 12px; font-weight: 700;
  color: var(--primary-dark); border: 1px solid rgba(13,148,136,0.25);
  margin-bottom: 14px;
}
.intro-head h2 {
  font-size: clamp(20px, 3.4vw, 28px); font-weight: 800;
  color: var(--text-muted); line-height: 1.4; margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.intro-head h2 .intro-emph {
  display: block; color: var(--text); font-size: clamp(26px, 4.8vw, 38px);
  font-weight: 900; margin-top: 4px;
}
.intro-sub { color: var(--text-muted); font-size: 15px; margin: 0; }
.intro-tracks {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  margin-bottom: 18px;
}
@media (max-width: 640px) {
  .intro-tracks { grid-template-columns: 1fr; gap: 12px; }
  .intro-card { padding: 28px 20px 20px; border-radius: 16px; }
}
.intro-track {
  text-align: left; cursor: pointer; font-family: inherit;
  border-radius: 16px; padding: 22px 20px;
  border: 2px solid; transition: transform .15s, border-color .15s, box-shadow .15s;
  display: flex; flex-direction: column;
}
.intro-track:hover { transform: translateY(-2px); }
.intro-track-citizen {
  background: #fff1f2; border-color: #fecdd3;
}
.intro-track-citizen:hover { border-color: #f43f5e; box-shadow: 0 14px 28px -10px rgba(244,63,94,0.35); }
.intro-track-candidate {
  background: #ecfdf5; border-color: #a7f3d0;
}
.intro-track-candidate:hover { border-color: #10b981; box-shadow: 0 14px 28px -10px rgba(16,185,129,0.35); }
.intro-icon { font-size: 36px; margin-bottom: 10px; }
.intro-track-title { font-size: 20px; font-weight: 800; margin-bottom: 6px; color: var(--text); }
.intro-track-citizen .intro-track-title { color: #9f1239; }
.intro-track-candidate .intro-track-title { color: #065f46; }
.intro-track-desc { font-size: 14px; color: var(--text-muted); margin: 0 0 12px; line-height: 1.55; }
.intro-track ul { list-style: none; padding: 0; margin: 0 0 16px; font-size: 13px; color: var(--text); line-height: 1.7; }
.intro-track ul li::before { content: "✓ "; color: var(--primary); font-weight: 800; }
.intro-cta {
  margin-top: auto;
  display: inline-block; padding: 10px 16px; border-radius: 10px;
  font-weight: 800; font-size: 14px; color: white; text-align: center;
}
.intro-cta-citizen { background: #f43f5e; }
.intro-cta-candidate { background: #10b981; }
.intro-skip {
  display: block; margin: 4px auto 0; background: transparent; border: none;
  color: var(--text-muted); font-size: 14px; font-weight: 600;
  cursor: pointer; padding: 10px 16px; min-height: 44px;
}
.intro-skip:hover { color: var(--text); text-decoration: underline; }

/* Hidden but accessible */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
