:root {
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --primary: #2563eb; /* 로열 블루 */
    --primary-hover: #1d4ed8;
    --badge-blue: #0284c7;
    --badge-red: #e11d48;
    --badge-purple: #7c3aed;
    --border-color: #e2e8f0;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --card-hover-shadow: 0 12px 24px -4px rgba(37, 99, 235, 0.12);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Pretendard', sans-serif; }
body { background-color: var(--bg-main); color: var(--text-main); line-height: 1.6; }

/* Header */
.site-header { background: #ffffff; border-bottom: 1px solid var(--border-color); position: sticky; top: 0; z-index: 50; }
.header-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; height: 70px; display: flex; align-items: center; justify-content: space-between; }
.site-logo { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text-main); font-size: 1.25rem; font-weight: 800; }
.logo-mark { font-size: 1.4rem; }
.logo-badge { background: #eff6ff; color: var(--primary); font-size: 0.72rem; font-weight: 800; padding: 3px 8px; border-radius: 4px; border: 1px solid #bfdbfe; }
.site-nav .nav-list { display: flex; list-style: none; gap: 24px; }
.nav-link { color: #475569; text-decoration: none; font-weight: 600; font-size: 0.95rem; transition: color 0.2s; }
.nav-link:hover, .nav-link.active { color: var(--primary); }

/* Hero */
.grid-hero-section { background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%); color: #ffffff; padding: 55px 20px 45px; text-align: center; }
.hero-container { max-width: 860px; margin: 0 auto; }
.hero-pill { display: inline-flex; align-items: center; gap: 6px; background: rgba(37, 99, 235, 0.2); border: 1px solid rgba(37, 99, 235, 0.4); color: #93c5fd; padding: 4px 14px; border-radius: 20px; font-size: 0.82rem; font-weight: 800; margin-bottom: 16px; }
.hero-title { font-size: 2.25rem; font-weight: 900; line-height: 1.3; margin-bottom: 12px; letter-spacing: -0.5px; }
.hero-desc { font-size: 1rem; color: #cbd5e1; line-height: 1.6; }

/* Page Wrapper */
.main-content { min-height: calc(100vh - 350px); }
.page-wrapper { max-width: 1200px; margin: 0 auto; padding: 40px 20px 60px; }
.section-header { margin-bottom: 24px; }
.section-header h2 { font-size: 1.45rem; font-weight: 800; color: var(--text-main); letter-spacing: -0.5px; }
.section-header p { color: var(--text-muted); font-size: 0.92rem; margin-top: 4px; }

/* 🌟 레퍼런스 이미지 완벽 반영: 가로 3열 랭킹 카드 그리드 (PC 기준) 🌟 */
.reference-3col-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 50px; align-items: stretch; }
.ref-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 14px; padding: 24px 20px 20px; display: flex; flex-direction: column; justify-content: space-between; box-shadow: var(--card-shadow); position: relative; transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s; }
.ref-card:hover { transform: translateY(-3px); box-shadow: var(--card-hover-shadow); border-color: #93c5fd; }

/* 상단 원형 랭킹 뱃지 */
.ref-rank-circle { position: absolute; top: 16px; left: 16px; width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 900; color: #ffffff; background: #0284c7; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.ref-rank-circle.rank-1 { background: #2563eb; }
.ref-rank-circle.rank-2 { background: #0284c7; }
.ref-rank-circle.rank-3 { background: #059669; }
.ref-rank-circle.rank-4 { background: #ea580c; }
.ref-rank-circle.rank-5 { background: #e11d48; }
.ref-rank-circle.rank-etc { background: #0f172a; }

/* 로고 영역 */
.ref-logo-wrap { width: 100%; height: 60px; display: flex; align-items: center; justify-content: center; margin: 10px 0 12px; padding: 4px; }
.ref-logo-wrap img { max-width: 140px; max-height: 52px; object-fit: contain; }

/* 타이틀 및 서브텍스트 */
.ref-title-box { text-align: center; margin-bottom: 16px; }
.ref-site-name { font-size: 1.15rem; font-weight: 800; color: #0f172a; margin-bottom: 4px; }
.ref-tagline { font-size: 0.8rem; color: #64748b; line-height: 1.4; }

/* 메타 정보 3종 (오픈, 혜택, 이벤트) */
.ref-meta-group { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; background: #f8fafc; border-radius: 8px; padding: 12px; border: 1px solid #f1f5f9; }
.meta-row { display: flex; align-items: flex-start; gap: 8px; font-size: 0.78rem; color: #334155; line-height: 1.45; }
.meta-badge { font-size: 0.68rem; font-weight: 800; padding: 1px 6px; border-radius: 4px; color: #ffffff; flex-shrink: 0; margin-top: 1px; }
.meta-badge.blue { background: var(--badge-blue); }
.meta-badge.red { background: var(--badge-red); }
.meta-badge.purple { background: var(--badge-purple); }

/* 하단 풀와이드 라운드 버튼 */
.btn-ref-action { width: 100%; background: var(--primary); color: #ffffff; text-align: center; text-decoration: none; font-size: 0.9rem; font-weight: 800; padding: 11px 0; border-radius: 20px; display: block; transition: background 0.2s, box-shadow 0.2s; box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.3); }
.btn-ref-action:hover { background: var(--primary-hover); box-shadow: 0 6px 10px -1px rgba(37, 99, 235, 0.4); }

/* 🌟 스펙 4각 비교 매트릭스 테이블 🌟 */
.section-block { margin-top: 40px; margin-bottom: 40px; }
.spec-matrix-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--border-color); border-radius: 12px; overflow: hidden; box-shadow: var(--card-shadow); }
.spec-matrix-table th { background: #f8fafc; padding: 14px 16px; font-size: 0.85rem; font-weight: 700; color: #475569; border-bottom: 1px solid var(--border-color); }
.spec-matrix-table td { padding: 13px 16px; font-size: 0.88rem; border-bottom: 1px solid #f1f5f9; color: #334155; text-align: center; }
.spec-matrix-table td:nth-child(2) { text-align: left; font-weight: 700; color: #0f172a; }

/* 🌟 Q&A 아코디언 컴포넌트 🌟 */
.faq-accordion-wrap { display: flex; flex-direction: column; gap: 10px; }
.faq-item { background: #ffffff; border: 1px solid var(--border-color); border-radius: 8px; overflow: hidden; box-shadow: var(--card-shadow); }
.faq-question { padding: 16px 20px; font-weight: 800; font-size: 0.95rem; color: #0f172a; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.faq-question:hover { background: #f8fafc; }
.faq-answer { padding: 0 20px 16px; font-size: 0.88rem; color: #475569; line-height: 1.7; border-top: 1px solid #f8fafc; display: none; }
.faq-item.active .faq-answer { display: block; }
.faq-toggle-icon { font-size: 0.8rem; color: #64748b; transition: transform 0.2s; }
.faq-item.active .faq-toggle-icon { transform: rotate(180deg); }

/* 클린 테이블 게시판 (슬러그 태그 제거) */
.clean-board-wrap { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 12px; overflow: hidden; margin-bottom: 40px; box-shadow: var(--card-shadow); }
.clean-board-table { width: 100%; border-collapse: collapse; text-align: left; }
.clean-board-table th { background: #f8fafc; padding: 14px 20px; font-size: 0.88rem; font-weight: 700; color: #475569; border-bottom: 1px solid var(--border-color); }
.clean-board-table td { padding: 14px 20px; font-size: 0.92rem; border-bottom: 1px solid #f1f5f9; color: var(--text-main); }
.clean-board-table tbody tr:last-child td { border-bottom: none; }
.clean-board-table tbody tr:hover { background: #f8fafc; }
.td-board-num { width: 60px; text-align: center; color: var(--primary); font-weight: 700; }
.td-board-title a { color: var(--text-main); text-decoration: none; font-weight: 600; display: block; }
.td-board-title a:hover { color: var(--primary); text-decoration: underline; }
.td-board-date { width: 110px; text-align: center; color: var(--text-muted); font-size: 0.82rem; }

/* 🌟 심층 SEO 콘텐츠 박스 🌟 */
.seo-content-box { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 12px; padding: 36px; margin-bottom: 50px; line-height: 1.85; color: #334155; font-size: 0.95rem; box-shadow: var(--card-shadow); }
.seo-content-box h2 { font-size: 1.35rem; font-weight: 800; margin-bottom: 14px; color: var(--text-main); }
.seo-content-box h3 { font-size: 1.1rem; font-weight: 700; margin: 24px 0 10px; color: var(--primary); }
.seo-content-box ul { margin: 10px 0 18px 24px; }
.seo-content-box li { margin-bottom: 6px; }

/* Article & Static View */
.article-view { background: var(--bg-card); padding: 40px; border-radius: 12px; border: 1px solid var(--border-color); box-shadow: var(--card-shadow); }
.article-title { font-size: 1.75rem; font-weight: 800; margin-bottom: 12px; color: var(--text-main); }
.article-meta { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 24px; border-bottom: 1px solid var(--border-color); padding-bottom: 16px; }
.article-body { font-size: 1.02rem; line-height: 1.85; color: #334155; }
.article-body h2 { font-size: 1.3rem; font-weight: 800; margin: 28px 0 12px; color: var(--text-main); }
.article-body p { margin-bottom: 16px; }

/* Detailed Footer */
.site-footer { background: #0f172a; color: #94a3b8; padding: 50px 20px 30px; border-top: 1px solid #1e293b; }
.footer-container { max-width: 1200px; margin: 0 auto; }
.footer-top { display: flex; justify-content: space-between; gap: 40px; margin-bottom: 40px; flex-wrap: wrap; }
.footer-brand h3 { color: #ffffff; font-size: 1.2rem; font-weight: 800; margin-bottom: 8px; }
.footer-slogan { font-size: 0.88rem; color: #cbd5e1; margin-bottom: 8px; }
.footer-desc { max-width: 400px; font-size: 0.82rem; line-height: 1.5; color: #64748b; }
.footer-links-grid { display: flex; gap: 50px; }
.footer-col h4 { color: #ffffff; font-size: 0.92rem; font-weight: 700; margin-bottom: 12px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: #94a3b8; text-decoration: none; font-size: 0.85rem; transition: color 0.2s; }
.footer-col a:hover { color: #ffffff; }
.footer-bottom { border-top: 1px solid #1e293b; padding-top: 24px; font-size: 0.8rem; text-align: center; color: #64748b; }
.disclaimer-text { margin-top: 6px; font-size: 0.74rem; color: #475569; }

/* Responsive Mobile (PC 3열 -> 태블릿 2열 -> 모바일 1열) */
@media screen and (max-width: 960px) {
    .reference-3col-grid { grid-template-columns: repeat(2, 1fr); }
}
@media screen and (max-width: 640px) {
    .header-container { height: auto; padding: 12px 16px; flex-direction: column; align-items: flex-start; gap: 12px; }
    .site-nav { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .site-nav .nav-list { display: flex; gap: 16px; white-space: nowrap; padding-bottom: 4px; }
    
    .grid-hero-section { padding: 36px 16px 30px; }
    .hero-title { font-size: 1.45rem; }
    .page-wrapper { padding: 20px 14px 40px; }
    
    .reference-3col-grid { grid-template-columns: 1fr; }
    .clean-board-wrap, .spec-matrix-table { overflow-x: auto; }
    .clean-board-table { min-width: 440px; }
    .spec-matrix-table { min-width: 480px; }
    .article-view { padding: 20px 16px; }
    .footer-links-grid { gap: 30px; }
}