/* ============================================
 * 황금연휴 계산기 — mobile.css (C-3 모바일 v2)
 * 핵심: 박스 크기/패딩/마진 대폭 축소 → 스크롤 최소화
 * ============================================ */

@media (max-width: 768px) {

    body { font-size: 14px; }

    /* ── 헤더 ── */
    .c3-header-inner { height: 44px; padding: 0 14px; }
    .c3-logo-icon { width: 24px; height: 24px; font-size: 11px; border-radius: 6px; }
    .c3-logo-text { font-size: 14px; }
    .c3-nav a:not(.c3-nav-cta) { display: none; }
    .c3-nav-cta { padding: 4px 12px !important; font-size: 11px !important; }

    .c3-container { padding: 0 14px; }

    /* ── 히어로 → 1컬럼, 컴팩트 ── */
    .c3-hero-grid { grid-template-columns: 1fr; gap: 8px; margin: 10px 0 14px; }
    .c3-hero-left { padding: 2px 0; }
    .c3-hero-eyebrow { font-size: 11px; margin-bottom: 4px; }
    .c3-hero-title { font-size: 24px; letter-spacing: -0.8px; margin-bottom: 6px; }
    .c3-hero-desc { font-size: 13px; margin-bottom: 12px; line-height: 1.4; }
    .c3-hero-buttons { flex-direction: column; gap: 6px; }
    .c3-hero-buttons a { width: 100%; text-align: center; padding: 10px; font-size: 13px; }
    .c3-hero-stats { grid-template-columns: 1fr 1fr; gap: 6px; }

    /* ── 색상 블록 — 핵심 컴팩트 ── */
    .c3-block-blue,
    .c3-block-dark { padding: 12px 14px; border-radius: 10px; }
    .c3-block-num { font-size: 22px !important; letter-spacing: -1px; }
    .c3-block-label { font-size: 10px; margin-top: 1px; }
    .c3-block-gray { padding: 10px 14px; border-radius: 10px; }
    .c3-block-gray .c3-block-num,
    .c3-block-gray div[style*="font-size:28px"],
    .c3-block-gray div[style*="font-size:26px"] { font-size: 20px !important; }
    .c3-block-white { padding: 12px; border-radius: 10px; }
    .c3-block-full { /* 유지 */ }

    /* ── 연휴 카드 (2x2 → 1열) ── */
    .c3-period-grid { grid-template-columns: 1fr; gap: 5px; }
    .c3-period-card { padding: 12px; gap: 4px; border-radius: 10px; }
    .c3-period-rank { font-size: 16px; }
    .c3-period-date { font-size: 10px; }
    .c3-period-title { font-size: 13px; }
    .c3-period-sub { font-size: 11px; }

    /* ── 리스트 카드 ── */
    .c3-list-card { padding: 10px 12px; gap: 8px; border-radius: 10px; }
    .c3-list-rank { width: 24px; height: 24px; font-size: 11px; border-radius: 6px; }

    /* ── 피처 그리드 ── */
    .c3-feature-grid { grid-template-columns: 1fr; gap: 5px; }
    .c3-feature-card {
        padding: 10px 12px; border-radius: 10px;
        display: flex; align-items: center; text-align: left; gap: 10px;
    }
    .c3-feature-icon { font-size: 18px; margin-bottom: 0; flex-shrink: 0; }
    .c3-feature-title { font-size: 12px; }
    .c3-feature-desc { font-size: 11px; }

    /* ── 바로가기 ── */
    .c3-quick { padding: 10px; border-radius: 10px; }
    .c3-quick-title { font-size: 12px; margin-bottom: 5px; }
    .c3-quick-tags { gap: 4px; }
    .c3-quick-tag { padding: 5px 9px; font-size: 11px; border-radius: 6px; }

    /* ── 통계 행 ── */
    .c3-stats-row { grid-template-columns: repeat(2, 1fr); gap: 5px; margin-bottom: 10px; }
    .c3-stat-card { padding: 8px 6px; border-radius: 8px; }
    .c3-stat-num { font-size: 18px; }
    .c3-stat-label { font-size: 9px; }

    /* ── 히어로 배너 (서브페이지) ── */
    .c3-hero-banner { padding: 14px 12px; border-radius: 10px; margin-bottom: 10px; }
    .c3-hero-banner h1 { font-size: 17px; margin-bottom: 3px; line-height: 1.3; }
    .c3-hero-banner p { font-size: 11px; }
    .c3-hero-banner .c3-chip { font-size: 9px; padding: 2px 6px; }

    /* ── 섹션 제목 ── */
    .c3-section-title { font-size: 16px; }
    .c3-section-header { margin-bottom: 8px; }
    .c3-section-link { font-size: 11px; }

    /* ── 브레드크럼 ── */
    .c3-breadcrumb { margin-bottom: 6px; }
    .c3-breadcrumb ol { font-size: 10px; gap: 3px; }

    /* ── 칩 ── */
    .c3-chip { padding: 2px 6px; font-size: 10px; border-radius: 4px; }

    /* ── 버튼 ── */
    .c3-btn-primary, .c3-btn-secondary, .c3-btn-dark {
        padding: 10px 16px; font-size: 13px; border-radius: 8px;
    }

    /* ── 풋터 ── */
    .c3-footer { margin-top: 20px; padding: 14px; }
    .c3-footer-grid { grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
    .c3-footer-grid > div:first-child { grid-column: 1 / -1; }
    .c3-footer-title { font-size: 11px; margin-bottom: 3px; }
    .c3-footer-link { font-size: 11px; padding: 1px 0; }
    .c3-footer-copy { font-size: 10px; padding-top: 10px; }

    /* ── 광고 ── */
    .ad-desktop-only { display: none !important; height: 0 !important; margin: 0 !important; padding: 0 !important; overflow: hidden !important; }
    .ad-container-safe { margin: 6px 0; }
    .ad-container-safe.ad-empty, .ad-footer-container.ad-empty { max-height: 0 !important; margin: 0 !important; padding: 0 !important; }
    .ad-footer-container { margin: 4px auto; }
    .ad-notice { font-size: 9px; }

    /* ── prose (SEO) ── */
    section.prose { font-size: 12px; }
    section.prose h2 { font-size: 14px; margin-bottom: 5px; }
    section.prose h3 { font-size: 13px; }
    section.prose p { margin-bottom: 6px; line-height: 1.5; }

    /* ── 테이블 ── */
    .c3-block-white table { font-size: 12px; }
    .c3-block-white table th { padding: 5px 8px; font-size: 10px; }
    .c3-block-white table td { padding: 5px 8px; font-size: 11px; }

    /* ─────────────────────────────────────
     * 인라인 style 오버라이드 (핵심!)
     * EJS에 인라인으로 들어간 padding/margin 축소
     * ───────────────────────────────────── */

    /* 마진 일괄 축소 */
    section[style*="margin-bottom:40px"] { margin-bottom: 16px !important; }
    section[style*="margin-bottom:32px"] { margin-bottom: 14px !important; }
    section[style*="margin-bottom:24px"] { margin-bottom: 12px !important; }
    div[style*="margin-bottom:24px"] { margin-bottom: 10px !important; }
    div[style*="margin-bottom:16px"] { margin-bottom: 8px !important; }

    /* gap 축소 */
    div[style*="gap:10px"] { gap: 5px !important; }
    div[style*="gap:8px"] { gap: 4px !important; }
    div[style*="gap:12px"] { gap: 6px !important; }

    /* 인라인 패딩 축소 */
    .c3-block-white[style*="padding:24px"],
    div[style*="padding:24px"] { padding: 12px !important; }
    .c3-block-white[style*="padding:28px"],
    section[style*="padding:28px"] { padding: 14px !important; }
    div[style*="padding:20px"] { padding: 10px !important; }
    div[style*="padding:32px"] { padding: 16px !important; }

    /* 연도 카드 */
    .c3-block-blue[style*="padding:32px"],
    .c3-block-dark[style*="padding:32px"] { padding: 16px 14px !important; }
    div[style*="font-size:36px"] { font-size: 26px !important; }
    div[style*="font-size:40px"] { font-size: 28px !important; }

    /* 효율 점수 큰 숫자 */
    div[style*="font-size:36px"][style*="color:#0066ff"] { font-size: 28px !important; }

    /* 달력 */
    div[style*="aspect-ratio:1"] { font-size: 11px !important; border-radius: 6px !important; }
    div[style*="aspect-ratio:1"] div[style*="font-size:8px"] { font-size: 7px !important; }

    /* 날짜별 상세 아이템 */
    div[style*="padding:10px 12px"][style*="border-radius:10px"] { padding: 6px 8px !important; border-radius: 7px !important; }

    /* 공휴일 카드 */
    div[style*="padding:12px"][style*="background:#fff1f0"] { padding: 8px 10px !important; }
    div[style*="width:36px"][style*="height:36px"] { width: 28px !important; height: 28px !important; font-size: 12px !important; }

    /* 계산기 */
    input[type="date"] { padding: 10px !important; font-size: 13px !important; }

    /* 히어로 배너 칩들 */
    div[style*="display:flex"][style*="gap:8px"][style*="margin-bottom"] { gap: 4px !important; margin-bottom: 6px !important; }
}

/* ── 초소형 (< 380px) ── */
@media (max-width: 380px) {
    .c3-hero-title { font-size: 20px; }
    .c3-block-num { font-size: 18px !important; }
    .c3-hero-banner h1 { font-size: 15px; }
    .c3-stat-num { font-size: 16px; }
    .c3-list-card { padding: 8px 10px; }
    .c3-list-rank { width: 20px; height: 20px; font-size: 10px; }
    .c3-period-card { padding: 10px; }
    .c3-section-title { font-size: 14px; }
    .c3-quick-tag { padding: 4px 8px; font-size: 10px; }
}
