.xap-prediction {
    line-height: 1.6;
}

.xap-prediction .xap-table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0 18px;
    font-size: 15px;
    table-layout: fixed;
    border: 1px solid #ddd;
}

.xap-prediction .xap-table th,
.xap-prediction .xap-table td {
    border-bottom: 1px solid #ddd;
    border-right: 1px solid #ddd;
    padding: 5px 6px;
    text-align: center;
    vertical-align: middle;
    word-break: break-word;
}

.xap-prediction .xap-table th {
    background: #f5f5f5;
    font-weight: 700;
}

.xap-prediction .xap-table td:last-child,
.xap-prediction .xap-table th:last-child {
    border-right: none;
}

.xap-prediction .xap-kq th {
    width: 80px;
    font-size: 12px;
    color: #333;
    white-space: nowrap;
}

.xap-prediction .xap-kq td {
    text-align: left;
    padding: 0;
}

.xap-prediction .xap-kq .xap-row.prize-db th {
    background: #d32f2f;
    color: #fff;
    font-weight: 900;
}

.xap-prediction .xap-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 8px 0;
    font-size: 26px;
    font-weight: 700;
    color: #0f172a;
}

.xap-prediction .xap-num.is-db {
    color: #f21616;
    font-size: 30px;
}

.xap-prediction .xap-num.is-red {
    color: #f21616;
}

.xap-prediction .xap-row.prize-g7 .xap-num {
    color: #d32f2f;
    font-weight: 900;
}

.xap-prediction .xap-kq .xap-row.prize-db td,
.xap-prediction .xap-kq .xap-row.prize-g1 td {
    text-align: center;
}

.xap-prediction .xap-num-grid {
    display: grid;
    width: 100%;
}

.xap-prediction .xap-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.xap-prediction .xap-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.xap-prediction .xap-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.xap-prediction .xap-num-grid .xap-num {
    border-right: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
}

.xap-prediction .xap-grid-2 .xap-num:nth-child(2n),
.xap-prediction .xap-grid-3 .xap-num:nth-child(3n),
.xap-prediction .xap-grid-4 .xap-num:nth-child(4n) {
    border-right: none;
}

.xap-prediction .xap-grid-2 .xap-num:nth-last-child(-n+2),
.xap-prediction .xap-grid-3 .xap-num:nth-last-child(-n+3),
.xap-prediction .xap-grid-4 .xap-num:nth-last-child(-n+4) {
    border-bottom: none;
}

.xap-prediction .xap-crumb {
    background: #f8e57d;
    color: #0b3d91;
    font-weight: 700;
    text-align: center;
    padding: 9px 12px;
    border: 1px solid #cfd4da;
    border-bottom: none;
    font-size: 16px;
}

.xap-prediction .xap-section-title {
    background: #f21616;
    color: #fff;
    padding: 8px 12px;
    font-weight: 700;
    margin: 14px 0;
}

.xap-prediction .xap-red {
    color: #f21616;
}

.xap-prediction .xap-table .is-red {
    color: #f21616;
    font-weight: 700;
}

.xap-prediction .xap-region-special-table td,
.xap-prediction .xap-region-special-table th {
    text-align: left;
}

.xap-prediction .xap-region-special-table .xap-col-day {
    width: 160px;
    vertical-align: middle;
}

.xap-prediction .xap-region-special-table .xap-col-province {
    width: 190px;
}

.xap-prediction .xap-stars {
    list-style: none;
    padding-left: 0;
    margin-left: 0;
}

.xap-prediction .xap-stars li {
    margin: 4px 0;
    font-size: 18px;
}

.xap-prediction .xap-stars li::before {
    content: "★";
    color: #f59e0b;
    margin-right: 6px;
}

.xap-prediction .xap-links {
    margin-top: 8px;
}

.xap-prediction .xap-region-card {
    margin-bottom: 12px;
}

.xap-prediction .xap-region-head {
    background: #f57c00;
    color: #fff;
    text-align: center;
    padding: 8px 10px;
    font-size: 14px;
    font-weight: 700;
    border: 1px solid #ddd;
    border-bottom: none;
}

.xap-prediction .xap-region-kq .xap-col-label {
    width: 64px;
    white-space: nowrap;
    font-size: 12px;
}

.xap-prediction .xap-region-kq thead th {
    font-size: 22px;
    font-weight: 800;
    color: #111827;
    background: #f5f5f5;
}

.xap-prediction .xap-region-kq .xap-col-label.is-db {
    background: #d32f2f;
    color: #fff;
    font-weight: 900;
}

.xap-prediction .xap-region-kq .xap-region-cell {
    padding: 0;
}

.xap-prediction .xap-region-kq .xap-cell-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 50px;
    padding: 6px 0;
}

.xap-prediction .xap-region-kq .xap-row-num {
    min-height: auto;
    padding: 0;
    line-height: 1.15;
}

.xap-prediction .xap-region-kq .xap-region-cell.is-g8 .xap-row-num {
    color: #d32f2f;
}

.xap-prediction .xap-region-kq .xap-region-cell.is-db .xap-row-num {
    color: #d32f2f;
    font-weight: 900;
}

.xap-prediction h2 {
    font-size: 24px;
    margin-top: 20px;
    margin-bottom: 10px;
}

.xap-prediction h3 {
    font-size: 20px;
    margin-top: 16px;
}

.xap-prediction p,
.xap-prediction li {
    font-size: 17px;
}

@media (max-width: 768px) {
    .xap-prediction .xap-table {
        font-size: 12px;
    }

    .xap-prediction .xap-num {
        min-height: 38px;
        font-size: 14px;
    }

    .xap-prediction .xap-num.is-db {
        font-size: 16px;
    }

    .xap-prediction h2 {
        font-size: 23px;
    }

    .xap-prediction h3 {
        font-size: 20px;
    }

    .xap-prediction p,
    .xap-prediction li {
        font-size: 14px;
    }

    .xap-prediction .xap-stars li {
        font-size: 14px;
    }

    .xap-prediction .xap-crumb {
        font-size: 17px;
    }

    .xap-prediction .xap-region-head {
        font-size: 12px;
        padding: 6px 8px;
    }

    .xap-prediction .xap-region-kq thead th {
        font-size: 14px;
    }

    .xap-prediction .xap-region-kq .xap-cell-list {
        min-height: 38px;
        gap: 1px;
    }
}
