/* PC라인 — 기존 style.css 전체 교체용. 외부 폰트·라이브러리 불필요. */
:root {
  --page-width: 1080px;
  --page-bg: #fff;
  --text: #24292f;
  --muted: #545c65;
  --accent: #245c88;
  --accent-hover: #17476d;
  --line: #d8dde2;
  --soft: #f5f6f7;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; }
body { margin: 0; background: var(--page-bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", "Malgun Gothic", sans-serif; font-size: 16px; line-height: 1.75; overflow-wrap: anywhere; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, summary { -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; height: auto; vertical-align: middle; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
[hidden] { display: none !important; }
::selection { background: #d9e8f5; color: #172d40; }
.inner, .content { width: min(var(--page-width), calc(100% - 64px)); margin-inline: auto; }

/* 헤더: 큰 배경 버튼 대신 명확한 밑줄 메뉴 */
.header { background: var(--page-bg); border-bottom: 1px solid var(--line); }
.header > .inner { min-height: 86px; display: flex; align-items: center; justify-content: space-between; gap: 36px; }
.header > .inner > br { display: none; }
.logo { flex: 0 1 auto; }
.logo a { display: inline-flex; align-items: center; padding-block: 12px; }
.logo img { width: 102px; max-width: 100%; height: auto; }
.menu { align-self: stretch; }
.menu ul { height: 100%; display: flex; align-items: stretch; gap: 32px; list-style: none; margin: 0; padding: 0; }
.menu li { display: flex; }
.menu a { display: flex; align-items: center; min-height: 48px; padding: 20px 2px 17px; border-bottom: 3px solid transparent; color: #343a41; font-size: 16px; font-weight: 600; white-space: nowrap; transition: color .15s, border-color .15s; }
.menu a:hover, .menu a[aria-current="page"], .menu a[aria-current="location"] { color: var(--accent); border-bottom-color: var(--accent); }
.burger { display: none; }

.content { padding-block: 34px 56px; min-height: 55vh; }
.post { min-width: 0; }
.post-header { margin-bottom: 28px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.post-title { margin: 0; color: #20262c; font-size: 28px; font-weight: 700; letter-spacing: -.035em; line-height: 1.45; word-break: keep-all; overflow-wrap: anywhere; }
.post-meta, .post-date, .breadcrumb, .breadcrumbs { font-size: 14px; color: var(--muted); }
.post-meta { margin-top: 10px; }
.breadcrumb, .breadcrumbs { margin-bottom: 14px; }
.breadcrumb ol, .breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; list-style: none; }

/* 순위: 3열, 카드 내부 장식은 줄이고 정보 간격 확보 */
.post-list { margin-bottom: 48px; }
.ranking-title { margin: 0 0 12px; padding: 0 0 12px; border-bottom: 2px solid #303c48; font-size: 22px; line-height: 1.5; letter-spacing: -.025em; }
.ranking-guide { max-width: none; margin: 0 0 24px; color: #444d56; font-size: 15px; line-height: 1.75; }
.ranking-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 0; padding: 0; list-style: none; }
.ranking-item { min-width: 0; margin: 0; padding: 0; border: 1px solid #cbd2d9; border-radius: 6px; background: #fff; }
.ranking-card { display: flex; flex-direction: column; height: 100%; min-width: 0; padding: 22px 24px 24px; }
.ranking-card-header { margin: 0; padding: 0; border: 0; }
.ranking-position { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin: 0 0 14px; color: #233f55; font-size: 21px; font-weight: 750; line-height: 1.5; }
.ranking-score { color: var(--muted); font-size: 12px; font-weight: 400; }
.ranking-logo-link { display: flex; justify-content: center; align-items: center; min-height: 100px; margin: 0 0 14px; padding: 10px; border: 1px solid transparent; border-radius: 4px; background: #fff; transition: border-color .18s, background-color .18s; }
.ranking-logo { display: block; width: 240px; height: 80px; max-width: 100%; object-fit: contain; transition: transform .18s ease; }
.ranking-name { margin: 0 0 8px; font-size: 21px; font-weight: 700; line-height: 1.4; letter-spacing: -.025em; }
.ranking-tags { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 0; padding: 0; list-style: none; }
.ranking-tags li { padding: 0; color: #3d596f; font-size: 13px; font-weight: 600; line-height: 1.6; }
.ranking-tags li + li { padding-left: 12px; border-left: 1px solid #cdd5dc; }
.ranking-summary { margin: 14px 0 18px; color: #424b54; font-size: 14px; font-weight: 400; line-height: 1.75; word-break: keep-all; overflow-wrap: anywhere; }
.ranking-benefits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 0 0 20px; padding-block: 15px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ranking-benefits > div { min-width: 0; }
.ranking-benefits dt { margin: 0 0 4px; color: var(--muted); font-size: 13px; }
.ranking-benefits dd { margin: 0; color: #243a4b; font-size: 17px; font-weight: 700; line-height: 1.5; }
.ranking-features { flex-grow: 1; margin-bottom: 22px; }
.ranking-features h4 { margin: 0 0 9px; color: #303840; font-size: 14px; font-weight: 700; }
.ranking-features ul { margin: 0; padding-left: 18px; color: #37414a; font-size: 14px; line-height: 1.8; }
.ranking-features li + li { margin-top: 5px; }
.ranking-features li::marker { color: #6c7883; }
.ranking-link { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 48px; margin-top: auto; padding: 11px 16px; border: 1px solid var(--accent); border-radius: 7px; background: var(--accent); color: #fff; font-size: 15px; font-weight: 600; line-height: 1.5; transition: background-color .18s, border-color .18s; }
.ranking-link-arrow { font-size: 19px; font-weight: 400; transition: transform .18s; }
.ranking-link:active { background: #123b5c; }
.ranking-notice { margin: 20px 0 0; color: var(--muted); font-size: 13px; line-height: 1.8; }

/* 본문 제목: 작은 장식 대신 전체 구분선과 일정한 여백 */
.post-content { font-size: 16px; line-height: 1.9; }
.post-content h2 { margin: 42px 0 18px; padding-bottom: 12px; border-bottom: 2px solid #475767; color: #253442; font-size: 23px; font-weight: 700; letter-spacing: -.025em; line-height: 1.5; word-break: keep-all; overflow-wrap: anywhere; }
.post-content > h2:first-child, .post-content > section:first-child > h2:first-child { margin-top: 0; }
.post-content h3 { margin: 28px 0 12px; padding-left: 12px; border-left: 3px solid #71899c; color: #293846; font-size: 19px; font-weight: 700; line-height: 1.6; }
.post-content h4 { margin: 24px 0 10px; font-size: 17px; color: #303d49; }
.post-content p { margin: 0 0 18px; }
.post-content a { color: #245981; text-decoration: underline; text-decoration-color: #93adbf; text-underline-offset: 4px; }
.post-content a:hover { color: #133f60; text-decoration-color: currentColor; }
.post-content ul, .post-content ol { padding-left: 26px; margin: 16px 0 22px; }
.post-content li { padding-left: 3px; }
.post-content li + li { margin-top: 8px; }
.post-content li::marker { color: #475f72; font-weight: 600; }
.post-content strong { color: #222d37; font-weight: 700; }
.post-content dt { font-weight: 700; margin-top: 16px; }
.post-content dd { margin: 6px 0 18px; }
.post-content blockquote { margin: 24px 0; padding: 16px 22px; border-left: 3px solid #7b8e9d; background: var(--soft); }
.post-content blockquote p:last-child { margin-bottom: 0; }
.post-content pre { overflow-x: auto; padding: 18px; background: var(--soft); font-size: 14px; }
.post-content figure { margin: 24px 0; }
.post-content figcaption { color: var(--muted); font-size: 14px; }
.table-wrap { width: 100%; overflow-x: auto; margin: 22px 0; overscroll-behavior-inline: contain; }
.post-content table { width: 100%; border-collapse: collapse; margin: 22px 0; font-size: 15px; line-height: 1.8; }
.table-wrap table { margin: 0; }
.post-content caption { padding: 0 0 10px; text-align: left; color: var(--muted); font-size: 14px; }
.post-content th, .post-content td { padding: 15px 18px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.post-content thead th { background: #eef1f3; color: #273b4b; font-weight: 700; }
.post-content tbody th { background: #fafbfc; font-weight: 600; }
.post-content details { margin: 0; padding: 0; border-bottom: 1px solid var(--line); }
.post-content summary { padding: 18px 6px; cursor: pointer; font-weight: 600; color: #2b3d4b; line-height: 1.7; }
.post-content summary::marker { color: #557389; }
.post-content details > p { margin: 0; padding: 0 6px 20px; color: #3d4851; }
.post-content details[open] summary { color: var(--accent); }
.post-content .guide-links { list-style: none; padding: 0; border-top: 1px solid var(--line); }
.post-content .guide-links li { margin: 0; padding: 16px 0; border-bottom: 1px solid var(--line); }

/* 이용 정보 목록은 세로형 목록으로 */
.board-list { margin-top: 30px; }
.board-total { color: var(--muted); font-size: 14px; margin: 0 0 12px; }
.board-list > ul { list-style: none; margin: 0; padding: 0; border-top: 2px solid #475767; }
.board-list > ul > li { margin: 0; border-bottom: 1px solid var(--line); }
.board-card { display: flex; align-items: flex-start; gap: 24px; padding: 24px 12px; }
.board-card > div { min-width: 0; }
.board-card h2 { margin: 0 0 8px; color: #293e4e; font-size: 19px; line-height: 1.5; }
.board-card p { margin: 0 0 10px; color: #46515a; font-size: 15px; line-height: 1.8; }
.board-card time { color: var(--muted); font-size: 13px; }
.board-card img { width: 140px; aspect-ratio: 16/10; object-fit: cover; border-radius: 3px; }
.board-card:hover { background: #f7f8f9; }
.board-card:hover h2 { text-decoration: underline; text-underline-offset: 4px; }
.pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 30px 0 0; }
.pagination a, .pagination span, .pagination strong { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 40px; padding: 5px 12px; border: 1px solid var(--line); border-radius: 3px; font-size: 14px; }
.pagination [aria-current="page"], .pagination strong { background: var(--accent); color: #fff; border-color: var(--accent); }

/* 푸터는 본문과 같은 배경, 모든 항목 가운데 정렬 */
.footer { background: var(--page-bg); color: #46515a; border-top: 1px solid var(--line); text-align: center; }
.footer > .inner { display: flex; flex-direction: column; align-items: center; gap: 16px; padding-block: 30px 36px; }
.footer-nav ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 26px; list-style: none; margin: 0; padding: 0; }
.footer-nav a { display: inline-flex; align-items: center; min-height: 40px; color: #35424d; font-size: 14px; }
.footer-nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer p { margin: 0; color: var(--muted); font-size: 13px; }

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .ranking-logo-link:hover { background: #fafbfc; border-color: var(--line); }
  .ranking-logo-link:hover .ranking-logo { transform: scale(1.04); }
  .ranking-link:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
  .ranking-link:hover .ranking-link-arrow { transform: translate(2px, -2px); }
}
@media (max-width: 1080px) {
  .ranking-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .menu ul { gap: 22px; }
}
@media (max-width: 700px) {
  .inner, .content { width: calc(100% - 32px); }
  .header > .inner { min-height: 72px; flex-wrap: wrap; gap: 0; }
  .logo { max-width: calc(100% - 64px); }
  .logo img { width: 102px; }
  .menu { width: 100%; }
  .menu ul { gap: 20px; flex-wrap: wrap; }
  .menu a { min-height: 48px; padding: 12px 0 10px; font-size: 15px; }
  /* JS가 없으면 메뉴는 그대로 보입니다. */
  .header.nav-ready .burger { display: flex; width: 44px; height: 44px; padding: 11px; flex-direction: column; justify-content: center; gap: 5px; border: 1px solid #bdc6cd; border-radius: 4px; background: #fff; }
  .burger span { display: block; width: 20px; height: 2px; background: #334653; transition: transform .15s, opacity .15s; }
  .burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .header.nav-ready .menu { display: none; }
  .header.nav-ready.menu-open .menu { display: block; border-top: 1px solid var(--line); }
  .content { padding-block: 24px 38px; }
  .post-header { margin-bottom: 22px; padding-bottom: 16px; }
  .post-title { font-size: 23px; }
  .ranking-title { font-size: 20px; }
  .ranking-guide { font-size: 14px; }
  .ranking-list { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .ranking-card { padding: 20px; }
  .ranking-summary { margin-block: 12px 16px; }
  .post-list { margin-bottom: 36px; }
  .post-content h2 { font-size: 21px; margin-top: 34px; }
  .post-content h3 { font-size: 18px; }
  .post-content th, .post-content td { padding: 12px; }
  .table-wrap table { min-width: 560px; }
  .board-card { padding: 20px 0; gap: 14px; }
  .board-card h2 { font-size: 18px; }
  .board-card img { width: 90px; }
  .footer-nav ul { gap: 4px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media print {
  .header, .footer, .burger { display: none; }
  .content { width: 100%; padding: 0; }
  .ranking-list { display: block; }
  .ranking-item { break-inside: avoid; margin-bottom: 16px; }
  .table-wrap { overflow: visible; }
}


/* 랭킹 간격·폭 통합 설정. 공식 사이트 버튼은 원래 스타일 유지. */
:root { --page-width: 1080px; }

.header > .inner { min-height: 74px; }
.content { padding-block: 26px 36px; }
.post-header { margin-bottom: 22px; padding-bottom: 16px; }
.post-list { margin-bottom: 32px; }
.ranking-title { margin-bottom: 10px; padding-bottom: 10px; }
.ranking-guide { margin-bottom: 18px; }

/* 카드 상단만 순위별 포인트 색상 적용 */
.ranking-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.ranking-item {
  border: 1px solid #cbd2d9;
  border-top: 3px solid #cbd2d9;
  border-radius: 10px;
  background: #fff;
}
.ranking-item:nth-child(1) { border-top-color: #2b6488; }
.ranking-item:nth-child(2) { border-top-color: #607c8d; }
.ranking-item:nth-child(3) { border-top-color: #a07a48; }
.ranking-card { padding: 16px; }
.ranking-position { margin-bottom: 10px; font-size: 20px; }
.ranking-score { font-size: 11px; }

/* 로고는 진한 테두리를 가진 버튼 형태 */
.ranking-logo-link {
  min-height: 88px;
  margin-bottom: 10px;
  padding: 6px 10px;
  border: 1px solid #939fa9;
  border-radius: 7px;
  background: #fff;
}
.ranking-logo { width: 216px; height: 72px; object-fit: contain; }
.ranking-name { margin-bottom: 6px; font-size: 20px; }
.ranking-tags { gap: 5px; }
.ranking-tags li,
.ranking-tags li + li {
  padding: 2px 7px;
  border: 0;
  border-radius: 3px;
  background: #edf1f4;
  color: #405665;
  font-size: 12px;
  font-weight: 500;
}
.ranking-summary {
  margin: 10px 0 12px;
  padding-top: 10px;
  border-top: 1px solid #e0e4e8;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.65;
}
.ranking-benefits {
  gap: 10px;
  margin-bottom: 12px;
  padding: 11px 12px;
  border: 0;
  border-radius: 5px;
  background: #f3f5f7;
}
.ranking-benefits > div + div { padding-left: 10px; border-left: 1px solid #d5dce2; }
.ranking-benefits dt { margin-bottom: 3px; font-size: 12px; }
.ranking-benefits dd { font-size: 16px; line-height: 1.5; }
.ranking-features { flex-grow: 0; margin-bottom: 12px; }
.ranking-features h4 { margin-bottom: 5px; font-size: 13px; }
.ranking-features ul { font-size: 13px; line-height: 1.65; padding-left: 17px; }
.ranking-features li + li { margin-top: 3px; }
.ranking-link { margin-top: 0; }
.ranking-notice { margin-top: 14px; }
.footer > .inner { gap: 8px; padding-block: 22px 26px; }

@media (hover: hover) {
  .ranking-logo-link:hover { border-color: #526a7c; background: #fafbfc; }
}
@media (min-width: 701px) and (max-width: 980px) {
  .ranking-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .header > .inner { min-height: 66px; }
  .content { padding-block: 20px 30px; }
  .post-header { margin-bottom: 18px; padding-bottom: 14px; }
  .ranking-list { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .ranking-card { padding: 16px; }
  .ranking-summary { margin-block: 10px 12px; }
}


/* H1: 소제목의 아래 구분선과 구별되는 제목 영역 */
.post-header {
    margin-bottom: 24px;
    padding: 16px 20px;
    border: 0;
    border-left: 4px solid #245c88;
    border-radius: 0 5px 5px 0;
    background: #f3f5f7;
}
.post-title {
    margin: 0;
    color: #263746;
    line-height: 1.45;
}
@media (max-width: 700px) {
    .post-header {
        margin-bottom: 20px;
        padding: 13px 15px;
    }
}


/* 모바일 펼침 메뉴 가운데 정렬 */
@media (max-width: 700px) {
    .header .menu ul {
        justify-content: center;
        gap: 0 20px;
    }
    .header .menu li {
        justify-content: center;
    }
    .header .menu a {
        justify-content: center;
        text-align: center;
    }
}


/* 404 및 오류 페이지 — common.php의 abort_page()용 */
.error-page { min-height: 100vh; display: flex; flex-direction: column; }
.error-page .error-content { display: flex; align-items: center; justify-content: center; flex: 1; min-height: 55vh; padding-block: 56px; }
.error-panel { width: 100%; max-width: 700px; margin: 0 auto; padding: 40px 28px; text-align: center; }
.error-code { margin: 0 0 16px; color: #245c88; font-size: clamp(64px, 10vw, 104px); font-weight: 750; line-height: 1; letter-spacing: -.04em; }
.error-title { margin: 0 0 18px; padding: 0; border: 0; background: none; color: #263746; font-size: 26px; font-weight: 700; line-height: 1.5; word-break: keep-all; overflow-wrap: anywhere; }
.error-description { margin: 0 0 8px; color: #37414a; font-size: 16px; line-height: 1.8; word-break: keep-all; }
.error-help { margin: 0; color: #545c65; font-size: 14px; line-height: 1.8; word-break: keep-all; }
.error-home { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 48px; margin-top: 26px; padding: 11px 22px; border: 1px solid #245c88; border-radius: 4px; background: #245c88; color: #fff; font-size: 15px; font-weight: 600; text-decoration: none; transition: background-color .18s, border-color .18s; }
.error-home:hover { background: #17476d; border-color: #17476d; color: #fff; }
.error-home:focus-visible { outline: 3px solid #245c88; outline-offset: 4px; }
.error-page .footer { margin-top: auto; }
@media (max-width: 700px) {
    .error-page .error-content { padding-block: 32px; }
    .error-panel { padding: 26px 4px; }
    .error-title { font-size: 22px; }
    .error-description { font-size: 15px; }
}