/* 매직넘버 사이트 공통 스타일 - 모든 페이지가 리그별 style.css 뒤에 불러온다.
   기존 디자인(검정 머리말 + 연두 포인트)을 그대로 쓰고, 여기에는 사이트 공통 부품(상단 바·푸터·광고 자리·
   설명 섹션)과 좁은 화면용 순위표 규칙만 둔다. */

/* ---------------------------------------------------------------- 리그 style.css 없이 site.css만 쓰는 페이지(메인·공통 페이지)의 기본값 */
html[data-sport="site"] {
    --bg: #f4f6fa; --surface: #ffffff; --surface-2: #f6f8fc; --text: #14203a; --muted: #5f6987;
    --line: #e2e6f0; --good: #16a34a; --bad: #dc2626; --radius: 16px;
    --brand: #6a8a00; --brand-soft: #f1f8d8; --navy-2: #1b3f8a;
    --shadow: 0 1px 2px rgba(10, 16, 40, .05), 0 8px 24px rgba(10, 16, 40, .06);
}
@media (prefers-color-scheme: dark) {
    html[data-sport="site"] {
        --bg: #0d1220; --surface: #151c2e; --surface-2: #1b2338; --text: #e8ecf6; --muted: #9aa3bf;
        --line: #283250; --good: #34d399; --bad: #f87171;
        --brand: #d4ff3f; --brand-soft: #2a3000; --navy-2: #8fb4ff;
        --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
    }
}
html[data-sport="site"] * { box-sizing: border-box; }
html[data-sport="site"] body {
    margin: 0; padding: 20px 16px 56px; background: var(--bg); color: var(--text); line-height: 1.6;
    font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
    -webkit-font-smoothing: antialiased;
}
html[data-sport="site"] .container { max-width: 980px; margin: 0 auto; }
:where(html[data-sport="site"]) a { color: var(--navy-2); }  /* :where로 우선순위를 낮춰 로고·카드 색을 덮지 않게 */
html[data-sport="site"] h1, html[data-sport="site"] h2, html[data-sport="site"] h3, html[data-sport="site"] p { margin-top: 0; }
html[data-sport="site"] h2 { font-size: 18px; font-weight: 800; margin-bottom: 10px; }
html[data-sport="site"] section { margin-bottom: 22px; }
.contact-mail { font-size: 18px; font-weight: 800; margin: 14px 0; }

/* 숫자는 자릿수를 맞춰서 표가 흔들리지 않게 */
body { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- 상단 바 (기존 메인 내비와 같은 검정 바) */
.site-bar { margin: -20px -16px 18px; background: #0a0b0e; border-bottom: 1px solid #1c1e25; }
.site-bar-in { max-width: 980px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; }
.site-logo { display: inline-flex; align-items: center; gap: 9px; color: #fff; text-decoration: none; font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.site-logo-badge { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 7px; background: #d4ff3f; color: #0a0b0e; }
.site-menu { display: flex; flex-wrap: wrap; gap: 2px; }
.site-menu a { padding: 6px 10px; border-radius: 8px; color: #e4e6ee; text-decoration: none; font-size: 13px; font-weight: 800; }
.site-menu a:hover { color: #fff; background: rgba(255,255,255,.06); }
.site-menu a.on { color: #d4ff3f; }

/* ---------------------------------------------------------------- 공통 푸터 */
.site-footer { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); text-align: center; font-size: 12px; color: var(--muted); line-height: 1.8; }
.site-footer-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 6px; }
.site-footer p { margin: 0; }
.site-footer-links a { color: var(--text); font-weight: 700; text-decoration: none; }
.site-footer-links a:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- 광고 자리: 코드가 없으면 아무것도 보이지 않는다 */
.ad-slot { margin: 24px 0; text-align: center; }
.ad-slot:empty { display: none; }

/* ---------------------------------------------------------------- 설명 글 */
.explain { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px; }
.explain h2 { font-size: 17px; }
.explain h3 { font-size: 15px; font-weight: 800; margin: 16px 0 6px; }
.explain p, .explain li { line-height: 1.8; }
.explain p { margin-bottom: 10px; }
.explain ul, .explain ol { padding-left: 20px; margin-bottom: 10px; }

/* ---------------------------------------------------------------- 좁은 화면: 순위표 보조 열은 숨겨서 가로 스크롤 없이 */
@media (max-width: 480px) {
    .standings-table .opt { display: none; }
    .standings-table th, .standings-table td { padding: 9px 4px; font-size: 13px; }
    .standings-table th { white-space: normal; word-break: keep-all; font-size: 11px; }
    .standings-table td.team-name { white-space: normal; }
    .standings-table td.team-name a { gap: 4px; }
    .magic-tag { padding: 2px 6px; font-size: 11px; }
}

/* 리그별 메인 순위표에서 좁은 화면에 숨길 보조 열 (열 번호 기준, 표 머리 순서와 같다) */
@media (max-width: 480px) {
    .st-kbo :is(th, td):is(:nth-child(3), :nth-child(6), :nth-child(9)),
    .st-kbo-sum :is(th, td):nth-child(6),
    .st-npb :is(th, td):is(:nth-child(3), :nth-child(6)),
    .st-kbl :is(th, td):is(:nth-child(5), :nth-child(6)),
    .st-vl :is(th, td):is(:nth-child(3), :nth-child(7), :nth-child(8)) { display: none; }
}

/* ---------------------------------------------------------------- 공통 페이지 제목 */
.page-title { font-size: clamp(22px, 4.6vw, 28px); font-weight: 800; letter-spacing: -.02em; margin-bottom: 14px; }
