/* Ratio page refinements. Loaded only for ratio pages. */
/* Ratio styles moved from global style.css. */
.ratio-my-result {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 16px 0;
}

.ratio-my-result > div {
    padding: 16px;
    border-radius: 8px;
    border: 1px solid rgba(22, 209, 195, .2);
    background:
        linear-gradient(180deg, rgba(11, 33, 70, .86), rgba(4, 18, 41, .94)),
        linear-gradient(90deg, var(--game-prize-soft), var(--game-interactive-soft));
    text-align: center;
}

.ratio-my-label {
    display: block;
    color: var(--game-muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.ratio-my-result strong {
    display: block;
    margin-top: 5px;
    color: var(--game-prize);
    font-family: var(--font-number);
    font-size: clamp(22px, 4vw, 34px);
}

.ratio-promo-banner {
    position: relative;
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    margin: 12px 0 18px;
    padding: 16px 18px;
    border-radius: 8px;
    border: 1px solid rgba(255, 187, 0, .42);
    background:
        linear-gradient(135deg, rgba(255, 187, 0, .22), rgba(255, 122, 26, .13) 44%, rgba(22, 209, 195, .12)),
        rgba(6, 25, 55, .9);
    box-shadow:
        0 16px 38px rgba(0, 0, 0, .28),
        inset 0 1px 0 rgba(255, 255, 255, .08);
    overflow: hidden;
}

.ratio-promo-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    border-left: 4px solid var(--game-prize);
    pointer-events: none;
}

.ratio-promo-banner::after {
    content: "";
    position: absolute;
    right: -52px;
    top: -70px;
    width: 170px;
    height: 170px;
    border-radius: 50%;
    border: 1px solid rgba(255, 187, 0, .24);
    background: radial-gradient(circle, rgba(255, 187, 0, .18), transparent 62%);
    pointer-events: none;
}

.ratio-promo-gift {
    position: relative;
    z-index: 1;
    display: flex;
    width: 62px;
    height: 62px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid rgba(255, 187, 0, .36);
    background: rgba(255, 187, 0, .13);
    font-size: 34px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}

.ratio-promo-content {
    position: relative;
    z-index: 1;
}

.ratio-promo-title {
    color: var(--game-prize);
    font-family: var(--font-game);
    font-size: 22px;
    font-weight: 500;
    line-height: 1.1;
}

.ratio-promo-text {
    margin-top: 6px;
    color: rgba(255, 255, 255, .92);
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
}

.ratio-promo-text strong,
.ratio-promo-prize {
    color: var(--game-prize);
}

.ratio-promo-prize {
    margin-top: 7px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 900;
}

/* Rating board */
.game_ratio .quiz-main-answer {
    max-width: 1080px;
    margin-left: auto;
    margin-right: auto;
}

.game_ratio .panel {
    position: relative;
    padding: 14px;
    overflow: hidden;
    border: 1px solid rgba(22, 209, 195, .24);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(9, 30, 65, .66), rgba(3, 14, 32, .86)),
        linear-gradient(90deg, rgba(255, 187, 0, .06), rgba(22, 209, 195, .07));
    box-shadow:
        0 18px 46px rgba(0, 0, 0, .32),
        inset 0 1px 0 rgba(255, 255, 255, .06);
}

.game_ratio .panel::before {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    top: 13px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--game-prize), var(--game-interactive), transparent);
    opacity: .65;
    pointer-events: none;
}

.ratio-board {
    position: relative;
    width: 100%;
    display: table;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0 8px;
    overflow: visible;
    background: transparent !important;
    box-shadow: none;
    border: 0;
}

.ratio-board thead,
.ratio-board tbody {
    width: 100%;
}

.ratio-board thead {
    position: sticky;
    top: 0;
    z-index: 3;
}

.ratio-board thead tr {
    background:
        linear-gradient(90deg, rgba(22, 209, 195, .22), rgba(255, 187, 0, .12), rgba(41, 53, 91, .65)) !important;
    box-shadow:
        inset 0 -1px 0 rgba(255, 255, 255, .08),
        0 8px 18px rgba(0, 0, 0, .16);
}

.ratio-board thead tr,
.ratio-board tbody tr {
    width: 100%;
}

.ratio-board thead th {
    padding: 13px 12px !important;
    border: 0 !important;
    white-space: nowrap;
    vertical-align: middle;
    color: var(--game-interactive) !important;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.ratio-board tbody tr {
    position: relative;
    background:
        linear-gradient(90deg, rgba(11, 33, 70, .86), rgba(4, 18, 41, .9));
    box-shadow:
        0 10px 24px rgba(0, 0, 0, .24),
        inset 0 1px 0 rgba(255, 255, 255, .025);
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.ratio-board tbody tr::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 0 999px 999px 0;
    background: rgba(22, 209, 195, .3);
    opacity: .8;
}

.ratio-board tbody tr:hover {
    transform: translateY(-2px);
    background:
        linear-gradient(90deg, rgba(14, 45, 88, .94), rgba(5, 23, 52, .98)) !important;
    box-shadow: 0 14px 30px rgba(0, 0, 0, .34), 0 0 0 1px rgba(22, 209, 195, .18);
}

.ratio-board tbody td {
    padding: 12px 14px !important;
    border: 0 !important;
    vertical-align: middle;
}

.ratio-board th,
.ratio-board td {
    text-align: left !important;
}

.ratio-board th:nth-child(1),
.ratio-board td:nth-child(1),
.ratio-board th:last-child,
.ratio-board td:last-child {
    text-align: center !important;
}

.ratio-board th:nth-child(1),
.ratio-board td:nth-child(1) {
    width: 9%;
}

.ratio-board th:nth-child(2),
.ratio-board td:nth-child(2) {
    width: 47%;
}

.ratio-board th:nth-child(3),
.ratio-board td:nth-child(3) {
    width: 16%;
    text-align: right !important;
    font-variant-numeric: tabular-nums;
}

.ratio-board th:nth-child(4),
.ratio-board td:nth-child(4) {
    width: 28%;
    text-align: center !important;
}

.ratio-board th:last-child,
.ratio-board td:last-child {
    width: 28%;
}

.ratio-board:has(tbody td:nth-child(5)) th:nth-child(1),
.ratio-board:has(tbody td:nth-child(5)) td:nth-child(1) {
    width: 8%;
}

.ratio-board:has(tbody td:nth-child(5)) th:nth-child(2),
.ratio-board:has(tbody td:nth-child(5)) td:nth-child(2) {
    width: 38%;
}

.ratio-board:has(tbody td:nth-child(5)) th:nth-child(3),
.ratio-board:has(tbody td:nth-child(5)) td:nth-child(3),
.ratio-board:has(tbody td:nth-child(5)) th:nth-child(4),
.ratio-board:has(tbody td:nth-child(5)) td:nth-child(4) {
    width: 15%;
    text-align: right !important;
}

.ratio-board:has(tbody td:nth-child(5)) th:nth-child(5),
.ratio-board:has(tbody td:nth-child(5)) td:nth-child(5) {
    width: 24%;
    text-align: center !important;
}

.ratio-board .td-content-wrapper,
.ratio-board .td-content,
.ratio-board .ratio_item {
    width: 100%;
}

.ratio-board .td-content-wrapper {
    display: flex;
    align-items: center;
}

.ratio-place-cell .td-content-wrapper,
.ratio-achievement-cell .td-content-wrapper {
    justify-content: center;
}

.ratio-field-msisdn .td-content-wrapper {
    justify-content: flex-start;
}

.ratio-field-balls .td-content-wrapper,
.ratio-field-time_game .td-content-wrapper {
    justify-content: flex-end;
}

.ratio-field-msisdn .ratio_item {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ratio-board tbody td:first-child {
    border-radius: 8px 0 0 8px;
}

.ratio-board tbody td:last-child {
    border-radius: 0 8px 8px 0;
}

.ratio-place {
    display: inline-flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(22, 209, 195, .12);
    border: 1px solid rgba(22, 209, 195, .28);
    color: var(--game-interactive) !important;
    font-weight: 900;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16);
}

.ratio-rank-1 .ratio-place,
.ratio-rank-2 .ratio-place,
.ratio-rank-3 .ratio-place {
    color: #061220 !important;
    border-color: rgba(255, 255, 255, .28);
}

.ratio-rank-1 .ratio-place {
    background: linear-gradient(135deg, #fff35b, var(--game-prize));
    box-shadow: 0 0 18px rgba(255, 187, 0, .42), inset 0 1px 0 rgba(255, 255, 255, .34);
}

.ratio-rank-2 .ratio-place {
    background: linear-gradient(135deg, #ffffff, #aebfd8);
}

.ratio-rank-3 .ratio-place {
    background: linear-gradient(135deg, #ffc17a, #c97831);
}

.ratio-rank-1 {
    background:
        linear-gradient(90deg, rgba(255, 187, 0, .26), rgba(255, 187, 0, .08) 28%, rgba(4, 18, 41, .94)) !important;
}

.ratio-rank-1::before {
    background: var(--game-prize) !important;
    box-shadow: 0 0 18px rgba(255, 187, 0, .48);
}

.ratio-rank-2 {
    background:
        linear-gradient(90deg, rgba(174, 191, 216, .2), rgba(4, 18, 41, .92)) !important;
}

.ratio-rank-2::before {
    background: #dce8ff !important;
}

.ratio-rank-3 {
    background:
        linear-gradient(90deg, rgba(255, 122, 26, .18), rgba(4, 18, 41, .92)) !important;
}

.ratio-rank-3::before {
    background: #ffb45f !important;
}

.ratio-current-player {
    outline: 2px solid rgba(22, 209, 195, .6);
    outline-offset: 2px;
}

.ratio-current-player .ratio-place::after {
    content: "\0412\044b";
    position: absolute;
    transform: translate(18px, -22px);
    padding: 2px 7px;
    border-radius: 999px;
    color: #061220;
    background: var(--game-interactive);
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}

.ratio-field-balls .ratio_item,
.ratio-field-time_game .ratio_item {
    display: inline-flex;
    min-width: 94px;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 187, 0, .18);
    background: rgba(255, 187, 0, .08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
}

.ratio-field-balls .ratio_item {
    color: var(--game-prize) !important;
}

.ratio-field-time_game .ratio_item {
    color: var(--game-interactive) !important;
    border-color: rgba(22, 209, 195, .18);
    background: rgba(22, 209, 195, .08);
}

.ratio-achievement-cell svg {
    filter: drop-shadow(0 0 8px rgba(255, 187, 0, .32));
}

.ratio-achievement-cell .ratio_item {
    display: inline-flex;
    min-width: 42px;
    justify-content: center;
}

@media (max-width: 768px) {
    .game_ratio .panel {
        padding: 8px;
        overflow-x: auto;
    }

    .ratio-board {
        min-width: 620px;
        border-spacing: 0 6px;
    }

    .ratio-board thead th,
    .ratio-board tbody td {
        padding: 10px 8px !important;
    }

    .ratio-place {
        width: 32px;
        height: 32px;
    }

    .ratio-promo-banner {
        grid-template-columns: 48px minmax(0, 1fr);
        gap: 10px;
        padding: 12px;
    }

    .ratio-promo-gift {
        width: 44px;
        height: 44px;
        font-size: 25px;
    }

    .ratio-promo-title {
        font-size: 18px;
    }

    .ratio-promo-text,
    .ratio-promo-prize {
        font-size: 13px;
    }
}

.ratio-board .ratio-place-cell {
    padding-left: 18px !important;
    padding-right: 6px !important;
}

.ratio-board .ratio-field-msisdn {
    padding-left: 10px !important;
    text-align: left !important;
}

.ratio-board .ratio-field-msisdn .td-content-wrapper,
.ratio-board .ratio-field-msisdn .td-content,
.ratio-board .ratio-field-msisdn .ratio_item,
.ratio-board .ratio-field-msisdn .ratio_item > div {
    display: block;
    width: auto;
    max-width: 100%;

}

.ratio-board .ratio-field-msisdn .ratio_item > div {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ratio-board .ratio-field-balls {
    text-align: right !important;
}

.ratio-board .ratio-field-balls .td-content-wrapper {
    justify-content: flex-end;
}

.ratio-board .ratio-field-balls .ratio_item {
    width: auto;
    min-width: 98px;
    margin-left: auto;
    font-variant-numeric: tabular-nums;
}

.ratio-board .ratio-achievement-cell,
.ratio-board .ratio-achievement-cell .td-content,
.ratio-board .ratio-achievement-cell .ratio_item,
.ratio-board .ratio-achievement-cell .ratio_item > div {
    text-align: center !important;
}

.ratio-board .ratio-achievement-cell svg {
    width: 24px;
    height: 24px;
}

.ratio-board .ratio-achievement-cell .ratio_item {
    width: auto;
    min-width: 52px;
    justify-content: center;
}

/* Rating table tournament polish: keep badges compact and columns disciplined */
.ratio-board .ratio-place-cell .td-content-wrapper,
.ratio-board .ratio-place-cell .td-content,
.ratio-board .ratio-place-cell .ratio_item {
    width: auto !important;
}

.ratio-board .ratio-place {
    display: inline-flex !important;
    width: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
    height: 38px !important;
    flex: 0 0 38px !important;
    border-radius: 50% !important;
    margin: 0 auto;
}

.ratio-board .ratio-field-msisdn {
    width: auto;
}

.ratio-board .ratio-field-msisdn .ratio_item {
    width: auto !important;
    min-width: 0 !important;
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
}

.ratio-board .ratio-field-balls .ratio_item {
    width: 104px !important;
    min-width: 104px !important;
    max-width: 104px !important;
}

.ratio-board .ratio-achievement-cell .td-content-wrapper,
.ratio-board .ratio-achievement-cell .td-content,
.ratio-board .ratio-achievement-cell .ratio_item {
    width: auto !important;
}

/* Stable tournament layout: header and rows use the same grid columns */
.ratio-board {
    display: block !important;
    table-layout: auto !important;
    border-spacing: 0 !important;
}

.ratio-board thead,
.ratio-board tbody {
    display: block !important;
    width: 100% !important;
}

.ratio-board thead {
    margin-bottom: 8px;
}

.ratio-board tbody {
    display: grid !important;
    gap: 8px;
}

.ratio-board thead tr,
.ratio-board tbody tr {
    display: grid !important;
    grid-template-columns: 96px minmax(0, 1fr) 140px 150px;
    align-items: center;
    width: 100% !important;
}

.ratio-board thead tr:has(th:nth-child(5)),
.ratio-board tbody tr:has(td:nth-child(5)) {
    grid-template-columns: 86px minmax(0, 1fr) 130px 110px 140px;
}

.ratio-board thead th,
.ratio-board tbody td {
    display: flex !important;
    align-items: center;
    width: auto !important;
    min-width: 0;
}

.ratio-board thead th:nth-child(1),
.ratio-board tbody td:nth-child(1),
.ratio-board thead th:last-child,
.ratio-board tbody td:last-child {
    justify-content: center;
    text-align: center !important;
}

.ratio-board thead th:nth-child(2),
.ratio-board tbody td:nth-child(2) {
    justify-content: flex-start;
    text-align: left !important;
}

.ratio-board thead th:nth-child(2) {
    padding-left: 12px !important;
}

.ratio-board thead th:nth-child(3),
.ratio-board tbody td:nth-child(3),
.ratio-board thead tr:has(th:nth-child(5)) th:nth-child(4),
.ratio-board tbody tr:has(td:nth-child(5)) td:nth-child(4) {
    justify-content: flex-end;
    text-align: right !important;
}

.ratio-board thead tr:has(th:nth-child(5)) th:nth-child(5),
.ratio-board tbody tr:has(td:nth-child(5)) td:nth-child(5) {
    justify-content: center;
    text-align: center !important;
}

.ratio-board .ratio-place-cell {
    padding-left: 10px !important;
    padding-right: 10px !important;
}

.ratio-board .ratio-field-msisdn {
    padding-left: 12px !important;
    padding-right: 12px !important;
}

.ratio-board .ratio-field-balls {
    padding-left: 10px !important;
    padding-right: 10px !important;
}

.ratio-board .ratio-achievement-cell {
    padding-left: 10px !important;
    padding-right: 10px !important;
    overflow: hidden;
}

.ratio-board .ratio-achievement-cell .ratio_item > div {
    display: inline-flex;
    max-width: 58px;
    align-items: center;
    justify-content: center;
    gap: 4px;
    overflow: hidden;
    white-space: nowrap;
}

.ratio-board .ratio-achievement-cell svg,
.ratio-board .ratio-achievement-cell .rael-datatable-icon {
    flex: 0 0 auto;
}

/* Premium rating board */
.game_ratio .quiz-main-answer {
    max-width: 1120px !important;
    padding: 0 0 16px !important;
    border-radius: 20px;
    background: #080d1c;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.48);
    overflow: hidden;
    font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
}

.game_ratio .quiz-header {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 18px 14px !important;
    padding: 18px 0 14px !important;
    color: #d4af37;
    font-family: "Russo One", Inter, sans-serif;
    font-size: 22px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.game_ratio .quiz-header::before {
    content: "🏆";
    font-family: "Segoe UI Emoji", "Apple Color Emoji", sans-serif;
    font-size: 22px;
}

.game_ratio .quiz-header::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.4), transparent);
}

.game_ratio h3 {
    margin: 0 18px 14px !important;
    padding: 0 !important;
    color: #6878b0;
    font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 12px;
    letter-spacing: 0.06em;
}

.game_ratio .ratio-promo-banner {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin: 0 14px 14px;
    padding: 14px 16px;
    border: 1px solid rgba(212, 175, 55, 0.22);
    border-radius: 14px;
    background: #0d1228;
    box-shadow: none;
    overflow: hidden;
}

.game_ratio .ratio-promo-banner::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.55), transparent);
}

.game_ratio .ratio-promo-gift {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 11px;
    background: rgba(212, 175, 55, 0.12);
    font-size: 22px;
}

.game_ratio .ratio-promo-title {
    margin-bottom: 4px;
    color: #d4af37;
    font-family: "Russo One", Inter, sans-serif;
    font-size: 14px;
    letter-spacing: 0.02em;
}

.game_ratio .ratio-promo-text {
    margin-bottom: 5px;
    color: #4a5a80;
    font-size: 12px;
    line-height: 1.6;
}

.game_ratio .ratio-promo-text strong,
.game_ratio .ratio-promo-prize {
    color: #d4af37;
    font-weight: 800;
}

.game_ratio .ratio-promo-prize {
    font-size: 12px;
}

.game_ratio .ratio-my-result {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 0 14px 14px;
    padding: 0;
    border: 0!important;
    background: transparent;
    box-shadow: none;
}

.game_ratio .ratio-my-result > div {
    padding: 14px 12px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 13px;
    background: #0d1228;
    text-align: center;
}

.game_ratio .ratio-my-result > div:first-child {
    border-color: rgba(212, 175, 55, 0.25);
}

.game_ratio .ratio-my-label {
    display: block;
    margin-bottom: 8px;
    color: #3a4a70;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.game_ratio .ratio-my-result strong {
    color: #d4af37;
    font-family: "Russo One", Inter, sans-serif;
    font-size: 30px;
    line-height: 1;
}

.game_ratio .ratio-my-result > div:nth-child(3) strong {
    color: #e8eaf6;
}

.game_ratio .panel {
    margin: 0 14px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow-x: auto;
}

.game_ratio .panel::before {
    display: none !important;
}

.ratio-board {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    border: 0 !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
}

.ratio-board thead,
.ratio-board tbody {
    display: block !important;
    width: 100% !important;
}

.ratio-board thead {
    margin-bottom: 0 !important;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 0;
    border-radius: 10px 10px 0 0;
    background: #0d1228;
}

.ratio-board tbody {
    display: block !important;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0 0 14px 14px;
    overflow: hidden;
}

.ratio-board thead tr,
.ratio-board tbody tr {
    display: grid !important;
    grid-template-columns: 52px minmax(0, 1fr) 100px 104px;
    align-items: center;
    width: 100% !important;
    margin: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.ratio-board thead tr:has(th:nth-child(5)),
.ratio-board tbody tr:has(td:nth-child(5)) {
    grid-template-columns: 52px minmax(0, 1fr) 100px 90px 110px;
}

.ratio-board tbody tr {
    position: relative;
    padding: 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 0.15s ease;
}

.ratio-board tbody tr:last-child {
    border-bottom: 0;
}

.ratio-board tbody tr:hover {
    transform: none !important;
    background: rgba(212, 175, 55, 0.03) !important;
    box-shadow: none !important;
}

.ratio-board tbody tr::before {
    display: none !important;
}

.ratio-board tbody tr.ratio-current-player {
    background: rgba(212, 175, 55, 0.04) !important;
    outline: none;
}

.ratio-board tbody tr.ratio-current-player::after {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #d4af37;
}

.ratio-board thead th,
.ratio-board tbody td {
    display: flex !important;
    align-items: center;
    width: auto !important;
    min-width: 0;
    padding: 12px 14px !important;
    border: 0 !important;
    text-align: left !important;
}

.ratio-board thead th {
    padding-top: 9px !important;
    padding-bottom: 9px !important;
}

.ratio-board thead th .data-table-header-text {
    color: #3a4a70;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    white-space: nowrap;
}

.ratio-board thead th:nth-child(3),
.ratio-board tbody td:nth-child(3),
.ratio-board thead tr:has(th:nth-child(5)) th:nth-child(4),
.ratio-board tbody tr:has(td:nth-child(5)) td:nth-child(4),
.ratio-board thead th:last-child,
.ratio-board tbody td:last-child {
    justify-content: flex-end !important;
    text-align: right !important;
}

.ratio-board thead th:first-child,
.ratio-board tbody td:first-child {
    justify-content: center !important;
    text-align: center !important;
}

.ratio-board thead th:nth-child(2),
.ratio-board tbody td:nth-child(2) {
    justify-content: flex-start !important;
    padding-left: 8px !important;
}

.ratio-board .td-content-wrapper,
.ratio-board .td-content,
.ratio-board .ratio_item {
    width: 100% !important;
    max-width: 100% !important;
}

.ratio-board .td-content-wrapper {
    display: flex !important;
    align-items: center;
}

.ratio-board .ratio-place-cell,
.ratio-board .ratio-place-cell .td-content-wrapper {
    justify-content: center !important;
}

.ratio-board .ratio-place {
    position: relative;
    display: inline-flex !important;
    width: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    height: 34px !important;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 50% !important;
    color: #3a4a70 !important;
    background: #0d1228 !important;
    box-shadow: none !important;
    font-family: "Russo One", Inter, sans-serif;
    font-size: 14px;
    line-height: 1;
}

.ratio-rank-1 .ratio-place {
    color: #d4af37 !important;
    border-color: #d4af37 !important;
    background: rgba(212, 175, 55, 0.15) !important;
}

.ratio-rank-2 .ratio-place {
    color: #a0a8c0 !important;
    border-color: #a0a8c0 !important;
    background: rgba(180, 180, 200, 0.1) !important;
}

.ratio-rank-3 .ratio-place {
    color: #cd7f32 !important;
    border-color: #cd7f32 !important;
    background: rgba(180, 100, 40, 0.12) !important;
}

.ratio-current-player .ratio-place::after {
    content: "\0412\044b";
    position: absolute;
    top: -7px;
    right: -6px;
    transform: none;
    padding: 1px 4px;
    border-radius: 3px;
    color: #fff;
    background: #5b78ff;
    font-family: Inter, "Segoe UI", sans-serif;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ratio-board .ratio-field-msisdn .ratio_item {
    display: flex !important;
    align-items: center;
    gap: 10px;
    color: #c8d0f0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    overflow: hidden;
}

.ratio-board .ratio-field-msisdn .ratio_item::before {
    content: "person";
    display: inline-flex;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    color: #3a4a70;
    background: #0d1228;
    font-family: "Material Symbols Outlined";
    font-feature-settings: "liga";
    -webkit-font-feature-settings: "liga";
    font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 24;
    font-size: 16px;
    line-height: 1;
}

.ratio-rank-1 .ratio-field-msisdn .ratio_item::before {
    color: #d4af37;
    border-color: rgba(212, 175, 55, 0.3);
    background: rgba(212, 175, 55, 0.15);
}

.ratio-rank-2 .ratio-field-msisdn .ratio_item::before {
    color: #a0a8c0;
    border-color: rgba(160, 168, 192, 0.2);
    background: rgba(160, 168, 192, 0.1);
}

.ratio-rank-3 .ratio-field-msisdn .ratio_item::before {
    color: #cd7f32;
    border-color: rgba(205, 127, 50, 0.25);
    background: rgba(180, 100, 40, 0.12);
}

.ratio-board .ratio-field-msisdn .ratio_item > div {
    min-width: 0;
    overflow: hidden;
    color: inherit;
    font-size: 14px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ratio-board .ratio-player-name,
.ratio-board .ratio-player-time {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ratio-board .ratio-player-time {
    margin-top: 4px;
    color: #16d1c3;
    font-family: Inter, Arial, sans-serif;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0;
}

.ratio-current-player .ratio-field-msisdn .ratio_item > div {
    color: #e8eaf6;
}

.ratio-board .ratio-field-balls .td-content-wrapper,
.ratio-board .ratio-field-time_game .td-content-wrapper,
.ratio-board .ratio-achievement-cell .td-content-wrapper {
    justify-content: flex-end !important;
}

.ratio-board .ratio-field-balls .ratio_item,
.ratio-board .ratio-field-time_game .ratio_item {
    display: inline-flex !important;
    width: auto !important;
    min-width: 60px !important;
    max-width: none !important;
    justify-content: center;
    padding: 5px 12px !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 7px !important;
    background: #0a0f20 !important;
    box-shadow: none !important;
    font-family: "Russo One", Inter, sans-serif;
    font-size: 14px;
}

.ratio-board .ratio-field-balls .ratio_item {
    color: #d4af37 !important;
}

.ratio-rank-2 .ratio-field-balls .ratio_item {
    color: #a0a8c0 !important;
}

.ratio-rank-3 .ratio-field-balls .ratio_item {
    color: #cd7f32 !important;
}

.ratio-board .ratio-field-time_game .ratio_item {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    color: #5b8fff !important;
    min-width: 72px !important;
    border-color: rgba(22, 209, 195, 0.26) !important;
    color: #16d1c3 !important;
    background: rgba(22, 209, 195, 0.08) !important;
}

.ratio-board .ratio-field-time_game .ratio_item::before {
    content: '⏱';
    color: #16d1c3;
    font-size: 13px;
    line-height: 1;
}

.ratio-board .ratio-achievement-cell {
    justify-content: flex-end !important;
    padding-right: 14px !important;
    overflow: visible !important;
}

.ratio-board .ratio-achievement-cell .ratio_item,
.ratio-board .ratio-achievement-cell .ratio_item > div {
    display: inline-flex !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100px !important;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    color: #d4af37 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    overflow: hidden;
}

.ratio-board .ratio-achievement-cell svg,
.ratio-board .ratio-achievement-cell .rael-datatable-icon {
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
    filter: none;
}

/* Rating board responsive alignment */
.game_ratio .panel {
    overflow: visible !important;
}

.ratio-board thead {
    position: relative !important;
    overflow: hidden;
}

.ratio-board thead tr {
    min-height: 44px;
}

.ratio-board thead th,
.ratio-board tbody td {
    box-sizing: border-box;
}

.ratio-board thead th:nth-child(1),
.ratio-board tbody td:nth-child(1) {
    padding-left: 10px !important;
    padding-right: 10px !important;
}

.ratio-board thead th:nth-child(2),
.ratio-board tbody td:nth-child(2) {
    padding-left: 8px !important;
}

.ratio-board thead th:nth-child(3),
.ratio-board tbody td:nth-child(3),
.ratio-board thead th:nth-child(4),
.ratio-board tbody td:nth-child(4),
.ratio-board thead th:nth-child(5),
.ratio-board tbody td:nth-child(5) {
    padding-left: 8px !important;
    padding-right: 14px !important;
}

.ratio-board thead tr:not(:has(th:nth-child(5))),
.ratio-board tbody tr:not(:has(td:nth-child(5))) {
    grid-template-columns: 58px minmax(0, 1fr) 112px 118px !important;
}

.ratio-board thead tr:has(th:nth-child(5)),
.ratio-board tbody tr:has(td:nth-child(5)) {
    grid-template-columns: 58px minmax(0, 1fr) 112px 96px 118px !important;
}

.ratio-board thead th:first-child,
.ratio-board tbody td:first-child {
    justify-content: center !important;
}

.ratio-board thead th:nth-child(2),
.ratio-board tbody td:nth-child(2) {
    justify-content: flex-start !important;
}

.ratio-board thead th:nth-child(n+3),
.ratio-board tbody td:nth-child(n+3) {
    justify-content: flex-end !important;
}

.ratio-board thead th .data-table-header-text {
    display: block;
    width: 100%;
    overflow: hidden;
    color: #3a4a70 !important;
    text-overflow: ellipsis;
}

.ratio-board thead th:first-child .data-table-header-text {
    text-align: center;
}

.ratio-board thead th:nth-child(2) .data-table-header-text {
    text-align: left;
}

.ratio-board thead th:nth-child(n+3) .data-table-header-text {
    text-align: right;
}

@media (max-width: 768px) {
    .game_ratio.quiz_container {
        padding-left: 8px;
        padding-right: 8px;
    }

    .game_ratio .quiz-main-answer {
        overflow: visible;
    }

    .game_ratio .quiz-header {
        margin: 0 12px 12px !important;
        font-size: 20px;
    }

    .game_ratio h3 {
        margin: 0 12px 12px !important;
        line-height: 1.35;
    }

    .game_ratio .ratio-promo-banner {
        margin-left: 10px;
        margin-right: 10px;
        padding: 12px;
    }

    .game_ratio .panel {
        margin: 0 10px !important;
        overflow: visible !important;
    }

    .ratio-board {
        min-width: 0 !important;
        width: 100% !important;
    }

    .ratio-board thead {
        display: none !important;
    }

    .ratio-board tbody {
        display: grid !important;
        gap: 10px;
        border: 0 !important;
        border-radius: 0;
        overflow: visible;
    }

    .ratio-board tbody tr,
    .ratio-board tbody tr:has(td:nth-child(5)),
    .ratio-board tbody tr:not(:has(td:nth-child(5))) {
        display: grid !important;
        grid-template-columns: 46px minmax(0, 1fr);
        gap: 8px 10px;
        width: 100% !important;
        padding: 12px !important;
        border: 1px solid rgba(255, 255, 255, 0.06);
        border-radius: 14px;
        background: #0d1228 !important;
    }

    .ratio-board tbody tr.ratio-current-player {
        border-color: rgba(212, 175, 55, 0.28);
    }

    .ratio-board tbody td {
        display: flex !important;
        width: auto !important;
        min-width: 0;
        padding: 0 !important;
        justify-content: flex-start !important;
        text-align: left !important;
    }

    .ratio-board tbody td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 5px;
        color: #3a4a70;
        font-size: 9px;
        font-weight: 800;
        letter-spacing: 0.12em;
        line-height: 1;
        text-transform: uppercase;
    }

    .ratio-board tbody td .td-content-wrapper {
        width: 100%;
    }

    .ratio-board tbody td:nth-child(1) {
        grid-column: 1;
        grid-row: 1 / span 2;
        align-items: flex-start;
        justify-content: center !important;
    }

    .ratio-board tbody td:nth-child(1)::before {
        display: none;
    }

    .ratio-board tbody td:nth-child(2) {
        grid-column: 2;
        grid-row: 1;
        align-items: center;
        padding-top: 2px !important;
    }

    .ratio-board tbody td:nth-child(2)::before {
        display: none;
    }

    .ratio-board tbody td:nth-child(3),
    .ratio-board tbody td:nth-child(4),
    .ratio-board tbody td:nth-child(5) {
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start !important;
    }

    .ratio-board tbody td:nth-child(3) {
        grid-column: 2;
        grid-row: 2;
    }

    .ratio-board tbody tr:has(td:nth-child(5)) td:nth-child(3),
    .ratio-board tbody tr:has(td:nth-child(5)) td:nth-child(4),
    .ratio-board tbody tr:has(td:nth-child(5)) td:nth-child(5) {
        grid-row: 2;
    }

    .ratio-board tbody tr:has(td:nth-child(5)) td:nth-child(3) {
        grid-column: 2;
        justify-self: start;
    }

    .ratio-board tbody tr:has(td:nth-child(5)) td:nth-child(4) {
        grid-column: 2;
        justify-self: center;
        margin-left: min(34vw, 132px);
    }

    .ratio-board tbody tr:has(td:nth-child(5)) td:nth-child(5) {
        grid-column: 2;
        justify-self: end;
    }

    .ratio-board tbody tr:not(:has(td:nth-child(5))) td:nth-child(4) {
        grid-column: 2;
        grid-row: 2;
        justify-self: end;
    }

    .ratio-board .ratio-place {
        width: 34px !important;
        min-width: 34px !important;
        max-width: 34px !important;
        height: 34px !important;
    }

    .ratio-board .ratio-field-msisdn .ratio_item {
        gap: 9px;
    }

    .ratio-board .ratio-field-msisdn .ratio_item > div {
        font-size: 14px;
    }

    .ratio-board .ratio-field-balls .ratio_item,
    .ratio-board .ratio-field-time_game .ratio_item {
        min-width: 56px !important;
        padding: 5px 10px !important;
        font-size: 13px;
    }

    .ratio-board .ratio-achievement-cell .td-content-wrapper,
    .ratio-board .ratio-achievement-cell .ratio_item,
    .ratio-board .ratio-achievement-cell .ratio_item > div {
        justify-content: flex-start !important;
    }
}

/* Ratio mobile refinements moved from global style.css. */
@media (max-width: 768px) {
    .game_ratio .quiz-main-answer {
        border-radius: 14px;
    }

    .game_ratio .ratio-my-result {
        grid-template-columns: 1fr;
    }

    .game_ratio .panel {
        margin: 0 8px !important;
    }

    .ratio-board {
        min-width: 620px !important;
    }

    .ratio-board thead tr,
    .ratio-board tbody tr,
    .ratio-board thead tr:has(th:nth-child(5)),
    .ratio-board tbody tr:has(td:nth-child(5)) {
        grid-template-columns: 52px minmax(170px, 1fr) 90px 80px 100px;
    }

    .ratio-board thead tr:not(:has(th:nth-child(5))),
    .ratio-board tbody tr:not(:has(td:nth-child(5))) {
        grid-template-columns: 52px minmax(190px, 1fr) 90px 100px;
    }
}

/* Final ratio table guard: keep score, time and achievements visible. */
.ratio-page-title {
    padding-top: 20px;
    padding-bottom: 20px;
}

.ratio-period-title {
    padding-top: 20px;
}

.ratio-board-header-row {
    position: sticky;
    top: 0;
    z-index: 1;
    background-color: #041224;
}

.ratio-board-heading {
    text-align: center !important;
}

.ratio-lowercase {
    text-transform: lowercase;
}

.ratio-place-wrapper,
.ratio-place-text {
    text-align: center;
}

.ratio-achievement-cell {
    padding: 10px 15px;
}

.game_ratio:not(.game_ratio_sms) .ratio-board thead tr:has(th:nth-child(5)),
.game_ratio:not(.game_ratio_sms) .ratio-board tbody tr:has(td:nth-child(5)) {
    grid-template-columns: 78px minmax(230px, 1.5fr) minmax(108px, .55fr) minmax(118px, .55fr) minmax(112px, .5fr) !important;
}

.game_ratio:not(.game_ratio_sms) .ratio-board .ratio-field-time_game {
    display: flex !important;
    min-width: 118px !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.game_ratio:not(.game_ratio_sms) .ratio-board .ratio-field-time_game .td-content-wrapper {
    justify-content: center !important;
}

.game_ratio:not(.game_ratio_sms) .ratio-board .ratio-field-time_game .ratio_item {
    display: inline-flex !important;
    min-width: 84px !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    color: #16d1c3 !important;
    background: rgba(22, 209, 195, .1) !important;
    border: 1px solid rgba(22, 209, 195, .28) !important;
}

.game_ratio:not(.game_ratio_sms) .ratio-board .ratio-field-time_game .ratio_item::before {
    content: '⏱';
    color: #16d1c3;
    font-size: 13px;
    line-height: 1;
}

@media (max-width: 760px) {
    .game_ratio:not(.game_ratio_sms) .ratio-board tbody tr:has(td:nth-child(5)) {
        grid-template-columns: 58px minmax(0, 1fr) !important;
    }

    .game_ratio:not(.game_ratio_sms) .ratio-board .ratio-field-time_game {
        min-width: 0 !important;
    }
}
