﻿/* sticky 전략: aside(.custom-single-sidebar) 자체를 sticky 로.
   - 진짜 차단 원인: body 의 overflow-x:hidden 이 overflow-y:auto 를 강제 → body 가 스크롤 컨테이너가 되어
     viewport 스크롤로는 sticky 가 따라오지 않음. body 를 overflow:clip 으로 바꿔 스크롤 컨테이너화 차단.
   - cascade 충돌: style.css `.td-pb-row [class*="td-pb-span"]` (0,2,0) 후순위 로드 → 셀렉터 강화(0,3,0) + !important
   - row 는 flex(align-items: flex-start) → aside 는 자기 크기, 본문 컬럼이 row 높이 결정 → sticky 영역 확보 */
/* sticky 차단 진범: body 의 overflow:hidden auto → clip 으로 교체 (시각효과 동일, 스크롤 컨테이너 안 만듦).
   body_class() 정상화로 single 글에만 좁혀 적용 → 다른 페이지(home/archive 등) 가로 차단 의도 보존. */
body.single-post,
body.single {
    overflow-x: clip !important;
    overflow-y: visible !important;
}

@media (min-width: 769px) {

    /* 부모 체인 sticky 차단 요소(있다면) 무력화 */
    .custom-single-layout,
    .custom-single-layout .td-container,
    .custom-single-layout .tdc-row,
    .custom-single-layout .custom-single-row {
        overflow: visible !important;
    }

    .custom-single-layout .custom-single-row {
        display: flex;
        align-items: flex-start;
    }
    .custom-single-layout .custom-single-row > [class*="td-pb-span"] {
        float: none !important;
    }

    /* 셀렉터 강화(0,3,0) + !important: style.css 후순위 로드의 position:relative 를 확실히 이김 */
    .custom-single-layout .custom-single-row > .custom-single-sidebar {
        position: -webkit-sticky !important;
        position: sticky !important;
        top: 80px !important;
        align-self: flex-start !important;
        max-height: calc(100vh - 100px);
        overflow-y: auto;
        overflow-x: hidden;
        z-index: 10;
        scrollbar-width: thin;
        float: none !important;
    }
    .custom-single-layout .custom-single-sidebar > .sidebar-sticky-wrap,
    .custom-single-layout .custom-single-sticky {
        position: static !important;
        height: auto !important;
        top: auto !important;
    }
}

.tdi_77 .td-excerpt {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    column-count: initial;
}

.td-element-style {
    background-color: var(--title-color) !important;
}

body .tdi_76 .tdm-title {
    color: #fff;
}

/* 본문 소제목 폰트사이즈 내용(p)와 통일 */
.td-post-content h2,
.td-post-content h3 {
    font-weight: 600;
    font-size: 15px;
}

.reporter-card {
    margin: 24px 0;
    padding: 16px 18px;
    border: 1px solid #ccc;
    border-radius: 14px;
    background: #fff;
}

.reporter-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.reporter-card__profile {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.reporter-card__avatar {
    width: 48px;
    height: 48px;
    border-radius: 999px;
    object-fit: cover;
    flex: 0 0 auto;
}

.reporter-card__meta {
    min-width: 0;
}

.reporter-card__name {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    text-decoration: none;
    color: inherit;
    font-weight: 800;
    line-height: 1.2;
    font-size: 16px;
    flex-wrap: wrap;
}

.reporter-card__name:hover {
    text-decoration: underline;
}



.reporter-card__suffix {
    font-weight: 700;
    font-size: 13px;
    opacity: 0.75;
}

.reporter-card__email {
    color: #333;
    font-size: .8rem;
}


.reporter-card__actions {
    flex: 0 0 auto;
}

.reporter-card__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    padding: 0 16px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 800;
    font-size: 14px;
    background: #e63946;
    color: #fff;
    white-space: nowrap;
}

.reporter-card__btn:hover {
    filter: brightness(0.95);
}

.reporter-card .reporter-card__list {
    margin: 12px 0 0;
    padding: 0 0 0 18px;
}

.reporter-card__item {
    margin: 6px 0;
}

.reporter-card__link {
    text-decoration: none;
    color: inherit;
    font-size: 14px;
    line-height: 1.4;
}

.reporter-card__link:hover {
    text-decoration: underline;
}


.tdi_66 a {
    min-width: initial;
}

.tdb-tags li a {
    border: 1px solid #333;
    padding: 4px;
    border-radius: 6px;
    color: #666;
    font-weight: 500 !important;
    display: block;
}

.tdb-tags li a:hover {
    border: 1px solid #000;

}


.single-action-buttons {
    display: flex;
    gap: 12px;
    margin: 24px 0;
}

.action-btn {
    flex: 1;
    padding: 12px 0;
    border-radius: 6px;
    background: #fff;
    color: #111;
    font-size: 15px;
    border: 1px solid #111;
    cursor: pointer;
    transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.action-btn:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}


/* ============================================================
 * SNS 공유 아이콘 행 (상시 노출, 가로 나열) — 인트라 이식 2026-08-07
 * 브랜드 로고 = 인라인 SVG(fill:currentColor), 색은 .share-ico--* 로 지정.
 * ============================================================ */
.intra-share-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 26px 0 14px;
}
.intra-share-row__label {
    font-size: 13px;
    font-weight: 800;
    color: #374151;
    letter-spacing: .02em;
    margin-right: 2px;
}
.share-ico {
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #e8e8ee;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
    padding: 0;
    cursor: pointer;
    text-decoration: none;
    color: #4b5563;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.share-ico svg {
    width: 22px;
    height: 22px;
    display: block;
}
/* hidden 속성 존중 — .share-ico 의 display 가 UA [hidden] 을 덮어써서
   navigator.share 미지원 시 '더보기' 버튼이 죽은 채 노출되던 문제 방지 */
.share-ico[hidden] {
    display: none;
}
.share-ico:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, .16);
}
.share-ico:focus-visible {
    outline: 2px solid #111;
    outline-offset: 2px;
}
/* 브랜드 컬러 (카카오는 이슈데이 미구축으로 제외) */
.share-ico--x        { color: #000; }
.share-ico--facebook { color: #1877F2; }
.share-ico--line     { color: #06C755; }
.share-ico--telegram { color: #229ED9; }
.share-ico--linkedin { color: #0A66C2; }
.share-ico--threads  { color: #000; }
.share-ico--more     { color: #4b5563; }

@media (max-width: 520px) {
    .share-ico { width: 40px; height: 40px; }
    .share-ico svg { width: 20px; height: 20px; }
    .intra-share-row { gap: 8px; }
}

/* 플로팅 공유 패널(다크)에 복제되는 .share-ico — 패널 톤에 맞춰 흰 단색화 */
.floating-share-links .share-ico {
    background: rgba(255, 255, 255, .1);
    border-color: rgba(255, 255, 255, .18);
    color: #fff;
    box-shadow: none;
}
.floating-share-links .share-ico:hover {
    background: rgba(255, 255, 255, .2);
    box-shadow: none;
}


.tdi_50 {
    align-items: center;
    flex-wrap: wrap;
}


.meta-tools {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
}

.meta-tools.meta-tools-mobile-hidden {
    display: none !important;
}

.font-size-tool {
    position: relative;
}

.font-size-trigger,
.share-trigger {
    width: 42px;
    height: 42px;
    min-width: 44px;
    min-height: 44px;
    border: 1px solid #111;
    background: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    border-radius: 999px;
}

.font-size-trigger i {
    font-size: 15px;
}

.font-size-icon {
    display: block;
    width: 20px;
    height: 20px;
    background: center / contain no-repeat url("../assets/images/font-size-icon.svg");
}

.font-size-toggle {
    position: absolute;
    right: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    pointer-events: none;
    display: inline-flex;
    gap: 4px;
    align-items: center;
    transition: opacity 0.15s ease;
    padding: 5px;
    border-radius: 999px;
    background: rgba(17, 17, 17, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}

.font-size-toggle button {
    width: 34px;
    height: 34px;
    border: 1px solid #111;
    background: #fff;
    cursor: pointer;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    transition: all 0.15s ease;
    border-radius: 999px;
}

.font-size-toggle button[data-size="small"] {
    font-size: 14px;
    font-weight: 400;
}

.font-size-toggle button[data-size="large"] {
    font-size: 16px;
    font-weight: 700;
}

.meta-tools[data-font-size-open="true"] .font-size-toggle {
    opacity: 1;
    pointer-events: auto;
}

.meta-tools.is-open .font-size-toggle {
    opacity: 1;
    pointer-events: auto;
}

.meta-tools[data-font-size-open="true"] .font-size-trigger {
    background: #111;
    color: #fff;
}

.meta-tools.is-open .font-size-trigger {
    background: #111;
    color: #fff;
}

.meta-tools[data-font-size-open="true"] .font-size-icon,
.meta-tools.is-open .font-size-icon {
    background-image: url("../assets/images/font-size-icon-wh.svg");
}

.font-size-toggle button:hover {
    background: #ebeff5;
    border-color: #697589;
}

.font-size-toggle button.active {
    background: #111;
    color: #fff;
}



.floating-share-tool {
    position: relative;
}

.share-trigger {
    font-size: 16px;
}

.floating-share-panel {
    position: absolute;
    right: 0;
    bottom: calc(100% + 10px);
    width: max-content;
    min-width: 148px;
    padding: 10px;
    border: 1px solid rgba(17, 17, 17, 0.1);
    border-radius: 16px;
    background: rgba(17, 17, 17, 0.96);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
    opacity: 0;
    transform: translateY(8px) scale(0.96);
    transform-origin: bottom right;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.floating-share-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.floating-share-links:empty {
    display: none;
    margin-bottom: 0;
}

.floating-share-links .td-social-sharing-button {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    transition: background 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.floating-share-links .td-social-sharing-button:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.28);
    transform: translateY(-1px);
}

.floating-share-links .td-social-sharing-button i {
    font-size: 16px;
}

.floating-share-copy {
    width: 100%;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    transition: background 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.floating-share-copy:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.28);
    transform: translateY(-1px);
}

.floating-share-tool.is-open .share-trigger {
    background: #111;
    color: #fff;
}

.floating-share-tool.is-open .floating-share-panel {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.share-trigger:hover {
    background: #f5f5f5;
}


/* 스포츠 분석픽 카테고리 경고문구 - 파스텔 블루 */
.gamble-warning-box {
    position: relative;
    border: 1px solid rgba(120, 170, 220, 1);
    background: linear-gradient(0deg, #ffffff 0%, #f4f9ff 100%);
    padding: 18px 18px 18px 16px;
    margin: 28px 0;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.65;
    color: #333;
}

.gamble-warning-box strong {
    display: block;
    margin-bottom: 8px;
    font-size: 15px;
    font-weight: 700;
    color: #6fa8dc;
}

.gamble-warning-box .hotline {
    color: #6fa8dc;
    font-weight: 700;
    letter-spacing: 0.4px;
}

.article-copyright {
    text-align: right;
    margin-top: 35px;
    padding: 18px 0;
    font-size: 12.5px;
    color: #777;
    border-top: 1px solid #ececec;
    letter-spacing: -0.2px;
}


@media print {
    .meta-tools {
        display: none !important;
    }


    ins.adsbygoogle,
    .adsbygoogle,
    iframe[src*="googleads"],
    iframe[src*="doubleclick"],
    iframe[src*="googlesyndication"] {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        width: 0 !important;
    }
}




@media (max-width: 1024px) {
    .meta-tools {
        display: none;
    }

    #mobile-menu-btn-box.sticky .meta-tools {
        display: flex !important;
        position: static;
        right: auto;
        bottom: auto;
        z-index: auto;
        margin-bottom: .3rem;
    }

    #mobile-menu-btn-box.sticky .meta-tools .font-size-trigger,
    #mobile-menu-btn-box.sticky .meta-tools .share-trigger {
        width: 50px;
        height: 50px;
    }

    #mobile-menu-btn-box.sticky .meta-tools .font-size-toggle {
        right: calc(100% + 8px);
        top: 0;
        transform: none;
    }

    #mobile-menu-btn-box.sticky .meta-tools .floating-share-panel {
        right: 0;
        bottom: calc(100% + 8px);
        transform-origin: bottom right;
    }

    #mobile-menu-btn-box.sticky .meta-tools.meta-tools-slide-in .font-size-trigger,
    #mobile-menu-btn-box.sticky .meta-tools.meta-tools-slide-in .share-trigger {
        animation: slideDown .3s forwards;
    }
}

@media (max-width: 768px) {


    .custom-single-layout .custom-single-sticky {
        position: static !important;
        top: auto;
    }


    .reporter-card {
        padding: 14px 14px;
    }

    .reporter-card__top {
        gap: 10px;
    }

    .reporter-card__btn {
        height: 32px;
        padding: 0 14px;
        font-size: 13px;
    }


    .gamble-warning-box {
        font-size: 13px;
        padding: 15px 15px 15px 14px;
    }
}

@media (max-width: 480px) {
    .action-btn {
        font-size: 11px;
    }
}

.custom-single-layout .tdb-single-title .tdb-title-text,
.custom-single-layout #contents-title {
    font-size: 36px;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.custom-single-layout .td-post-content,
.custom-single-layout .td-post-content p,
.custom-single-layout .td-post-content li {

    line-height: 1.85;
    letter-spacing: -0.01em;
}

.custom-single-layout .tdb-breadcrumbs,
.custom-single-layout .tdb-breadcrumbs a,
.custom-single-layout .tdb_single_date,
.custom-single-layout .tdb_single_author .tdb-author-by,
.custom-single-layout .tdb_single_author .tdb-author-name {
    font-size: 14px;
}

.article-copyright {
    font-size: 13px;
}

/* ===== AEO summary / FAQ ===== */
.aeo-faq-box__title {
    margin: 0;
    color: #111;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.faq-item:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.faq-question {
    font-size: 18px;
}

.faq-item .faq-answer {
    margin: 0;
    color: #444;
    line-height: 1.8;
}

/* Related Post Thumbnails 플러그인 css*/
/* ===== Related Post Thumbnails ===== */

.relpost-thumb-container {
    margin: 40px 0 28px;
    padding-top: 24px;
    border-top: 1px solid #e9e9e9;
}

.relpost-thumb-container h3 {
    margin: 0 0 16px;
    font-weight: 800;
    line-height: 1.35;
    color: #111;
    letter-spacing: -0.02em;
}

/* 리스트 기본 초기화 */
#related_posts_thumbnails {
    margin: 0;
    padding: 0;
    list-style: none;
    display: block !important;
    width: 100% !important;
}

/* 한 줄씩 (플러그인 기본 inline-block/float 덮어쓰기) */
#related_posts_thumbnails li {
    display: flex !important;
    float: none !important;
    clear: both !important;
    width: 100% !important;
    max-width: 100% !important;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 0;
    margin: 0;
    border: 0;
    border-bottom: 1px solid #efefef;
    border-right: none !important;
    text-align: left;
    vertical-align: top;
}

/* 마지막 줄 밑줄 제거 */
#related_posts_thumbnails li:last-child {
    border-bottom: none;
}

/* 이미지 링크 */
#related_posts_thumbnails li>a:first-child {
    flex: 0 0 112px;
    width: 112px;
}

/* 이미지 */
#related_posts_thumbnails .relpost-post-image {
    display: block;
    width: 112px;
    height: 72px;
    margin: 0 !important;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.18s ease, opacity 0.18s ease;
}

/* 제목 링크 영역 */
#related_posts_thumbnails .relpost_content {
    display: block;
    flex: 1;
    min-width: 0;
    text-decoration: none;
}

/* span 불필요 여백 방지 */
#related_posts_thumbnails .rpth_list_content {
    display: block;
}

/* 제목 */
#related_posts_thumbnails .relpost_card_title {
    margin: 0;
    font-weight: 600;
    line-height: 1.55;
    color: #111;
    letter-spacing: -0.02em;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 링크 hover */
#related_posts_thumbnails .relpost_content:hover .relpost_card_title {
    color: #333;
}

/* 이미지 hover */
#related_posts_thumbnails li>a:first-child:hover img {
    opacity: 0.92;
    transform: scale(1.02);
}

/* 모바일 */
@media (max-width: 768px) {

    .aeo-faq-box,
    .relpost-thumb-container {
        margin: 28px 0 16px;
    }

    .faq-item {
        padding: 15px 0;
    }

    .faq-question {
        font-size: 16px !important;
    }

    .faq-question::before {
        font-size: 13px;
    }

    .faq-item .faq-answer {
        font-size: 14px;
        line-height: 1.75;
    }

    .relpost-thumb-container {
        padding-top: 20px;
    }

    .relpost-thumb-container h3 {
        font-size: 17px;
        margin-bottom: 14px;
    }

    #related_posts_thumbnails li {
        gap: 12px;
        padding: 14px 0;
    }

    #related_posts_thumbnails li>a:first-child {
        flex: 0 0 92px;
        width: 92px;
    }

    #related_posts_thumbnails .relpost-post-image {
        width: 92px;
        height: 60px;
        border-radius: 8px;
    }

    #related_posts_thumbnails .relpost_card_title {
        font-size: 14px;
        line-height: 1.5;
    }
}

@media (max-width: 480px) {

    .faq-item {
        padding: 14px 0;
    }

    .faq-question {
        font-size: 15px;
    }

    .faq-item .faq-answer {
        font-size: 13.5px;
    }

    .relpost-thumb-container {
        padding: 18px 16px 8px;
    }

    #related_posts_thumbnails li>a:first-child {
        flex: 0 0 84px;
        width: 84px;
    }

    #related_posts_thumbnails .relpost-post-image {
        width: 84px;
        height: 56px;
    }

    #related_posts_thumbnails .relpost_card_title {
        font-size: 13.5px;
    }
}

@media (max-width: 1024px) {

    .custom-single-layout .tdb-single-title .tdb-title-text,
    .custom-single-layout #contents-title {
        font-size: 32px !important;
    }

}

@media (max-width: 767px) {

    .custom-single-layout .tdb-single-title .tdb-title-text,
    .custom-single-layout #contents-title {
        font-size: 28px !important;
    }

    .custom-single-layout .td-post-content,
    .custom-single-layout .td-post-content p,
    .custom-single-layout .td-post-content li {
        line-height: 1.8 !important;
    }


    .custom-single-layout .tdb-breadcrumbs,
    .custom-single-layout .tdb-breadcrumbs a,
    .custom-single-layout .tdb_single_date,
    .custom-single-layout .tdb_single_author .tdb-author-by,
    .custom-single-layout .tdb_single_author .tdb-author-name {
        font-size: 13px !important;
    }
}

@media (max-width: 480px) {

    .custom-single-layout .tdb-single-title .tdb-title-text,
    .custom-single-layout #contents-title {
        font-size: 24px !important;
    }

    .custom-single-layout .td-post-content,
    .custom-single-layout .td-post-content p,
    .custom-single-layout .td-post-content li {
        line-height: 1.75 !important;
    }

    .custom-single-layout .tdb-breadcrumbs,
    .custom-single-layout .tdb-breadcrumbs a,
    .custom-single-layout .tdb_single_date,
    .custom-single-layout .tdb_single_author .tdb-author-by,
    .custom-single-layout .tdb_single_author .tdb-author-name {
        font-size: 12px !important;
    }
}

/* ============================================================
 * 단일 글 상단 스크롤 게이지 바 (read-progress)
 *  - position: fixed (DOM 위치 무관)
 *  - 본문(.td-post-content) 스크롤 진행률 표시
 * ============================================================ */
.isu-read-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: transparent;
    z-index: 9998;
    pointer-events: none;
}
.isu-read-progress__bar {
    display: block;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #111 0%, #3a7bd5 100%);
    transition: width 120ms linear;
}
@media print {
    .isu-read-progress { display: none !important; }
}


/* ===== 출처 · 원문 (참고 자료 목록 — AEO 확장 메타박스 _aeo_sources) ===== */
.intra-sources {
    margin: 28px 0;
    padding: 14px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
}
.intra-sources__title {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 700;
    color: #111827;
}
.intra-sources__list {
    margin: 0;
    padding-left: 20px;
    font-size: 13px;
    color: #374151;
    line-height: 1.7;
}
.intra-sources__list li { margin: 2px 0; }
.intra-sources__list a {
    color: #2563eb;
    text-decoration: underline;
    word-break: break-all;
}

/* ============================================================
 * 본문 표(table) — 기본 디자인 + 모바일 가로 스크롤
 *
 * 프리즘이 넣는 본문 표는 클래스 없는 <table><caption><thead><tbody> 구조라
 * 테마 스타일이 사실상 없었다. 그래서 열이 많은 표(세리에 A 순위표 10열)가
 * 모바일에서 열 폭이 min-content 까지 눌려 「나폴리」가 나/폴/리 로,
 * 「10」이 1/0 으로 세로로 쪼개졌다.
 *   - word-break: keep-all → 한글·숫자가 글자 단위로 끊기지 않음 (근본 원인)
 *   - ≤767px 에서는 표 자체를 가로 스크롤 영역으로 전환해 넘치는 열을 밀어서 봄
 *   - caption 은 sticky 로 왼쪽에 고정 — 가로로 밀어도 표 제목이 남는다
 *
 * 위키 본문(.imw-prose)은 intrawiki-layout.css 가 정본이므로 :not() 으로 제외한다
 * (이 파일은 is_single() 에서 로드돼 위키 단일 페이지에도 걸린다).
 *
 * ⚠ 매거진 3사 공통 (파츠 공유가 아니라 개별 이식) — 한 곳을 고치면 나머지 2사도 같이 고친다.
 *   · 인트라매거진  themes/intra-v2/custom-parts/css/article-enhancements.css (§17)
 *   · 이슈데이      themes/isunew-clear/custom-parts/css/custom-single.css (이 섹션)
 *   · 케이팝포스트  themes/kpop-clear/custom-parts/css/custom-single.css (말미)
 * ============================================================ */
.td-post-content:not(.imw-prose) table {
    width: 100%;
    margin: var(--space-5, 20px) 0 var(--space-6, 24px);
    border-collapse: collapse;
    border-spacing: 0;
    font-size: var(--fs-md, 14px);
    line-height: 1.55;
}

.td-post-content:not(.imw-prose) table caption {
    caption-side: top;
    padding: 0 0 var(--space-2, 8px);
    text-align: left;
    font-size: var(--fs-base, 13px);
    font-weight: var(--fw-medium, 500);
    color: inherit;
    opacity: 0.72;
    word-break: keep-all;
}

.td-post-content:not(.imw-prose) table th,
.td-post-content:not(.imw-prose) table td {
    padding: 9px 10px;
    border: 1px solid rgba(128, 128, 128, 0.35);
    vertical-align: middle;
    text-align: left;
    word-break: keep-all;
    overflow-wrap: normal;
}

/* ⚠ 배경만 반투명 회색으로 얹고 글자색은 절대 건드리지 않는다.
   케이팝포스트 기사 본문은 다크(#0f1115·#141824 · 글자 흰색)라, 밝은 배경색을 깔면
   사이트의 흰 글자가 흰 배경 위에 얹혀 셀이 통째로 안 보였다 (2026-10-12 실측).
   회색 반투명은 밝은 본문에서도 어두운 본문에서도 같은 방향으로 작동한다.
   헤더 줄바꿈은 막지 않는다 — 긴 비교축 제목이 있는 표가 본문 폭을 넘겨서는 안 된다. */
.td-post-content:not(.imw-prose) table thead th {
    background: rgba(128, 128, 128, 0.14);
    font-weight: var(--fw-semibold, 600);
    text-align: center;
}

.td-post-content:not(.imw-prose) table tbody tr:nth-child(even) {
    background: rgba(128, 128, 128, 0.07);
}

/* 열이 5개 이상이면 기록·순위표로 보고 숫자 열을 가운데 정렬.
   :has 미지원 브라우저는 왼쪽 정렬로 떨어질 뿐 기능 영향은 없다. */
.td-post-content:not(.imw-prose) table:has(tr > *:nth-child(5)) th,
.td-post-content:not(.imw-prose) table:has(tr > *:nth-child(5)) td {
    text-align: center;
}

/* 모바일 — 표를 가로 스크롤 영역으로 */
@media (max-width: 767px) {
    .td-post-content:not(.imw-prose) table {
        display: block;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
        font-size: var(--fs-base, 13px);
    }

    .td-post-content:not(.imw-prose) table caption {
        display: block;
        position: sticky;
        left: 0;
    }

    .td-post-content:not(.imw-prose) table th,
    .td-post-content:not(.imw-prose) table td {
        padding: 7px 8px;
    }

    /* 기록·순위표는 셀이 짧다 — 줄바꿈 대신 가로로 밀어서 본다 */
    .td-post-content:not(.imw-prose) table:has(tr > *:nth-child(5)) th,
    .td-post-content:not(.imw-prose) table:has(tr > *:nth-child(5)) td {
        white-space: nowrap;
    }

    /* 4열 이하는 블록화를 되돌린다 — display:block 은 안쪽 표를 shrink-to-fit 으로
       만들어 2열 표가 본문 폭의 1/3 만 차지했다 (2026-10-12 실측).
       :has 미지원 브라우저는 위의 전체 블록화가 그대로 남아 안전망이 된다. */
    @supports selector(:has(*)) {
        .td-post-content:not(.imw-prose) table:not(:has(tr > *:nth-child(5))) {
            display: table;
            overflow: visible;
        }

        /* 표를 display:table 로 되돌렸으면 caption 도 같이 되돌려야 한다.
           block 인 채로 두면 표 내부 요소 사이로 밀려 헤더 행과 본문 사이에
           끼어 보인다 (2026-10-12 실화면 검수에서 3사 모두 확인). */
        .td-post-content:not(.imw-prose) table:not(:has(tr > *:nth-child(5))) caption {
            display: table-caption;
            position: static;
        }
    }
}

/* 인쇄 — 표는 스크롤 없이 전부 펼친다 */
@media print {
    .td-post-content:not(.imw-prose) table {
        display: table;
        overflow: visible;
    }
    .td-post-content:not(.imw-prose) table:has(tr > *:nth-child(5)) th,
    .td-post-content:not(.imw-prose) table:has(tr > *:nth-child(5)) td {
        white-space: normal;
    }
}
