/* CENTRAL_EXPECTED_AXIS_NAME_OVERLAP_FIX_V1
 * Scoped to the one table tagged by name-fix.js after verifying both its
 * column headers and the "中央 ... 期待値軸馬" heading. Does not touch race cards.
 */
table.kcax-name-fix-v1 {
    table-layout: fixed !important;
    width: max(100%, 1510px) !important;
    min-width: 1510px !important;
}

/* Sixth column is the horse name; give it room and clip excessive length. */
table.kcax-name-fix-v1 th:nth-child(6),
table.kcax-name-fix-v1 td:nth-child(6) {
    box-sizing: border-box !important;
    width: 195px !important;
    min-width: 195px !important;
    max-width: 195px !important;
}
table.kcax-name-fix-v1 td:nth-child(6) {
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
    vertical-align: middle !important;
}
table.kcax-name-fix-v1 td:nth-child(6) > :is(span, a, strong, b, div) {
    display: block !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
}
/* Protect the adjacent numeric values from wrapping and intrusion. */
table.kcax-name-fix-v1 th:nth-child(7),
table.kcax-name-fix-v1 td:nth-child(7),
table.kcax-name-fix-v1 th:nth-child(8),
table.kcax-name-fix-v1 td:nth-child(8) {
    min-width: 110px !important;
    white-space: nowrap !important;
    text-align: center !important;
}
.kcax-name-scroll-v1 {
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
}

/* On narrow screens allow the name to occupy two lines without invading AI勝率. */
@media (max-width: 768px) {
    table.kcax-name-fix-v1 th:nth-child(6),
    table.kcax-name-fix-v1 td:nth-child(6) {
        width: 170px !important;
        min-width: 170px !important;
        max-width: 170px !important;
    }
    table.kcax-name-fix-v1 td:nth-child(6),
    table.kcax-name-fix-v1 td:nth-child(6) > :is(span, a, strong, b, div) {
        white-space: normal !important;
        overflow-wrap: anywhere !important;
        word-break: normal !important;
        line-height: 1.4 !important;
    }
    table.kcax-name-fix-v1 td:nth-child(6) > :is(span, a, strong, b, div) {
        display: -webkit-box !important;
        -webkit-box-orient: vertical !important;
        -webkit-line-clamp: 2;
        overflow: hidden !important;
    }
}
