:root {
  --brand: #1A56DB;
  --brand-dark: #1447B5;
  --brand-light: #EBF2FF;
  --bg: #F5F7FA;
  --surface: #fff;
  --text: #1A1F36;
  --text-muted: #6B7280;
  --border: #E5E8EB;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.07);
  --shadow: 0 2px 16px rgba(0,0,0,0.10);
  --warn: #F59E0B;
  --warn-light: #FFFBEB;
  --success: #059669;
}

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

body {
  font-family: -apple-system, 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); }

/* 비공식 최상단 배너 */
.disclaimer-top {
  background: #FEF3C7;
  border-bottom: 2px solid var(--warn);
  padding: 10px 20px;
  font-size: 13px;
  color: #92400E;
  text-align: center;
  line-height: 1.5;
}
.disclaimer-top a { color: #92400E; font-weight: 700; }

/* 레이아웃 */
.layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 16px 60px;
  display: flex;
  gap: 28px;
  align-items: flex-start;
}

.main-content { flex: 1; min-width: 0; }
.app-sidebar {
  width: 280px;
  flex-shrink: 0;
  position: sticky;
  top: 16px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.app-sidebar::-webkit-scrollbar { display: none; }
@media (max-width: 800px) {
  .layout { flex-direction: column; }
  .app-sidebar { display: none; }
}

/* 광고 */
.ad-wrap { margin: 20px 0; }
.ad-wrap-outer { max-width: 1100px; margin: 16px auto; padding: 0 16px; }

/* 헤더 (전체 너비 — 레이아웃 바깥) */
.main-header {
  background: linear-gradient(135deg, var(--brand) 0%, #2563EB 100%);
  color: #fff;
  padding: 36px 20px 32px;
  text-align: center;
}
.header-inner {
  max-width: 720px;
  margin: 0 auto;
}
.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 99px;
  margin-bottom: 14px;
  letter-spacing: 0.5px;
}
.main-header h1 {
  font-size: clamp(24px, 5vw, 34px);
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: -0.5px;
  margin-bottom: 10px;
}
.main-header h1 span { color: #93C5FD; }
.hero-sub {
  font-size: 15px;
  color: rgba(255,255,255,0.85);
  margin-bottom: 18px;
}
.hero-notice {
  background: rgba(0,0,0,0.2);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 13px;
  color: rgba(255,255,255,0.9);
  line-height: 1.6;
}
.hero-notice strong { color: #FCD34D; }

/* 공유하기 버튼 */
.btn-share {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  padding: 10px 22px;
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.4);
  border-radius: 99px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  backdrop-filter: blur(4px);
}
.btn-share:hover { background: rgba(255,255,255,0.25); }
.btn-share:active { transform: scale(0.97); }

/* 토스트 알림 */
.share-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: #1A1F36;
  color: #fff;
  padding: 12px 22px;
  border-radius: 99px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 9999;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  pointer-events: none;
}
.share-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* 섹션 */
.section {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.section-title {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 18px;
  color: var(--text);
}
.sub-title {
  font-size: 15px;
  font-weight: 700;
  margin: 18px 0 10px;
  color: var(--text);
}

/* 요약 그리드 */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.summary-card {
  background: var(--brand-light);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
}
.summary-icon { font-size: 24px; margin-bottom: 6px; }
.summary-label { font-size: 12px; color: var(--text-muted); font-weight: 600; margin-bottom: 4px; }
.summary-value { font-size: 16px; font-weight: 800; color: var(--brand); }
.summary-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* 정보 박스 */
.info-box {
  background: var(--brand-light);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 14px;
  margin-bottom: 16px;
}
.info-box.warning {
  background: var(--warn-light);
  border-left-color: var(--warn);
  color: #78350F;
  margin-top: 14px;
  margin-bottom: 0;
}

/* 계층 목록 */
.tier-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 4px; }
.tier {
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  border: 1.5px solid var(--border);
}
.tier-1 { background: #F0FDF4; border-color: #86EFAC; }
.tier-2 { background: #EFF6FF; border-color: #93C5FD; }
.tier-3 { background: var(--bg); }
.tier-badge { font-size: 11px; font-weight: 700; color: var(--text-muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.3px; }
.tier-name { font-size: 15px; font-weight: 700; color: var(--text); }
.tier-count { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

/* 테이블 */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
thead { background: var(--brand); color: #fff; }
th { padding: 10px 12px; text-align: left; font-weight: 700; }
td { padding: 10px 12px; border-bottom: 1px solid var(--border); }
tr:last-child td { border-bottom: none; }
tr:nth-child(even) td { background: var(--bg); }
td.amount { font-weight: 800; color: var(--brand); text-align: center; }
.table-note { font-size: 12px; color: var(--text-muted); margin-top: 8px; }

/* 하이라이트 박스 */
.highlight-box {
  background: #ECFDF5;
  border: 1.5px solid #6EE7B7;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 14px;
  margin-top: 14px;
  color: #065F46;
}
.highlight-box strong { font-size: 16px; }

/* 타임라인 */
.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline-item {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}
.timeline-item:last-child { border-bottom: none; }
.timeline-item.highlight .timeline-title { color: var(--brand); }
.timeline-date { font-size: 13px; font-weight: 700; color: var(--brand); min-width: 100px; flex-shrink: 0; padding-top: 2px; }
.timeline-title { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.timeline-desc { font-size: 13px; color: var(--text-muted); }

/* 신청 방법 */
.method-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.method-card {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 18px;
  text-align: center;
  border: 1.5px solid var(--border);
}
.method-icon { font-size: 28px; margin-bottom: 8px; }
.method-title { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.method-desc { font-size: 13px; color: var(--text-muted); line-height: 1.5; }

/* 외부 링크 */
.link-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.ext-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s, background 0.15s;
}
.ext-link:hover { border-color: var(--brand); background: var(--brand-light); }
.ext-icon { font-size: 22px; flex-shrink: 0; }
.ext-text { flex: 1; }
.ext-text strong { display: block; font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.ext-text span { font-size: 12px; color: var(--text-muted); }
.ext-arrow { color: var(--brand); font-weight: 700; }
.phone-info { font-size: 14px; color: var(--text-muted); padding: 12px 16px; background: var(--bg); border-radius: var(--radius-sm); }
.phone-info strong { color: var(--text); }

/* FAQ */
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:last-child { border-bottom: none; }
.faq-q {
  width: 100%;
  text-align: left;
  padding: 14px 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq-q .arrow { color: var(--text-muted); transition: transform 0.2s; font-size: 12px; flex-shrink: 0; }
.faq-q.open .arrow { transform: rotate(180deg); }
.faq-a {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
  padding: 0 0 14px;
  display: none;
}
.faq-a.open { display: block; }

/* 푸터 */
.footer {
  background: var(--text);
  color: rgba(255,255,255,0.6);
  text-align: center;
  padding: 32px 20px;
  font-size: 13px;
  line-height: 1.8;
}
.footer a { color: rgba(255,255,255,0.8); }
.footer strong { color: #FCD34D; }
.footer-copy { margin-top: 12px; font-size: 12px; color: rgba(255,255,255,0.4); }

/* 사이드바 CSS */
.sidebar-card { background: var(--surface); border-radius: var(--radius-sm); padding: 16px; margin-bottom: 16px; box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
.sidebar-card h3 { font-size: 14px; font-weight: 700; margin-bottom: 12px; padding-left: 8px; border-left: 3px solid var(--brand); color: var(--text); }
.sidebar-list { list-style: none; padding: 0; margin: 0; }
.sidebar-list li { margin-bottom: 6px; }
.sidebar-list a { display: flex; align-items: flex-start; text-decoration: none; color: var(--text); padding: 7px 8px; border-radius: 8px; transition: background .15s; }
.sidebar-list a:hover { background: var(--brand-light); }
.link-icon { margin-right: 8px; font-size: 15px; flex-shrink: 0; margin-top: 1px; }
.link-content { flex: 1; min-width: 0; }
.link-title { display: block; font-size: 13px; font-weight: 600; color: var(--brand); margin-bottom: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.link-desc { display: block; font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 반응형 */
@media (max-width: 768px) {
  .layout { flex-direction: column; }
  .sidebar-area { width: 100%; position: static; }
  .summary-grid { grid-template-columns: repeat(2, 1fr); }
  .method-grid { grid-template-columns: 1fr; }
  .timeline-date { min-width: 80px; font-size: 12px; }
  .hero { padding: 28px 20px 24px; }
}

@media (max-width: 480px) {
  .summary-grid { grid-template-columns: repeat(2, 1fr); }
}
