/* Online Duel Counter HUD */
html:has(.tcg-counter-page.is-online-game),
body:has(.tcg-counter-page.is-online-game),
body:has(.tcg-counter-page.is-online-game) .public-main {
    background: #020815 !important;
    height: 100% !important;
    margin: 0 !important;
    max-width: none !important;
    overflow: hidden !important;
    padding: 0 !important;
    width: 100% !important;
}

/* Mobile final fit: fill the visible page area and keep the log/input row above browser chrome. */
@media (max-width: 700px) {
    html:has(.tcg-counter-page.is-online-game),
    body:has(.tcg-counter-page.is-online-game),
    body:has(.tcg-counter-page.is-online-game) .public-main {
        height: var(--tcg-vh, 100dvh) !important;
        max-height: var(--tcg-vh, 100dvh) !important;
        min-height: var(--tcg-vh, 100dvh) !important;
        overflow: hidden !important;
    }

    .tcg-counter-page.is-online-game,
    .tcg-counter-page.is-mobile-fit.is-online-game {
        --hud-gap: .22rem !important;
        height: var(--tcg-vh, 100dvh) !important;
        max-height: var(--tcg-vh, 100dvh) !important;
        min-height: var(--tcg-vh, 100dvh) !important;
        padding: .2rem .2rem .16rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-online-game-head,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-online-game-head {
        min-height: 3.18rem !important;
        margin-bottom: 0 !important;
    }

    .tcg-counter-page.is-online-game .tcg-counter-board,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-counter-board {
        gap: .22rem !important;
        grid-template-areas:
            "controls"
            "opponent"
            "you"
            "history"
            "footer" !important;
        grid-template-columns: minmax(0, 1fr) !important;
        grid-template-rows:
            minmax(9.65rem, 1.08fr)
            minmax(3.7rem, .38fr)
            minmax(9.8rem, 1.03fr)
            minmax(6.25rem, .78fr)
            0 !important;
        height: 100% !important;
        min-height: 0 !important;
        overflow: hidden !important;
    }

    .tcg-counter-page.is-online-game .tcg-center-panel,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-center-panel {
        gap: .24rem !important;
        grid-template-rows: 2.18rem 3.4rem minmax(0, 1fr) !important;
        padding: .24rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-round-card,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-round-card {
        height: 2.18rem !important;
        min-height: 2.18rem !important;
        padding: .28rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-timer,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-timer {
        column-gap: .4rem !important;
        grid-template-columns: minmax(6.25rem, .78fr) minmax(0, 1.22fr) !important;
        min-height: 3.4rem !important;
        padding: .26rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-timer strong,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-timer strong {
        font-size: clamp(1.18rem, 5vw, 1.72rem) !important;
    }

    .tcg-counter-page.is-online-game .tcg-timer-actions,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-timer-actions {
        column-gap: .36rem !important;
        grid-template-rows: repeat(2, minmax(1.34rem, 1fr)) !important;
        row-gap: .28rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-timer-actions button,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-timer-actions button {
        min-height: 1.34rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-tool-grid,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-tool-grid {
        gap: .26rem !important;
        padding: .24rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-tool,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-tool {
        grid-template-columns: 2.35rem minmax(0, 1fr) !important;
        min-height: 2.2rem !important;
        padding: .22rem .3rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-dice-stage,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-dice-stage,
    .tcg-counter-page.is-online-game .tcg-coin-stage,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-coin-stage {
        transform: scale(.72) !important;
        transform-origin: center !important;
    }

    .tcg-counter-page.is-online-game .tcg-tool strong,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-tool strong {
        height: 1.72rem !important;
        min-height: 1.72rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-top .tcg-player-inner,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-top .tcg-player-inner {
        grid-template-rows: .9rem minmax(0, 1fr) !important;
        padding: .28rem .42rem !important;
        row-gap: .16rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-bottom .tcg-player-inner,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-player-inner {
        grid-template-rows: .9rem minmax(2.35rem, 1fr) 3.45rem 1.66rem !important;
        padding: .28rem .42rem !important;
        row-gap: .2rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-player .tcg-player-name,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player .tcg-player-name {
        top: .16rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-player .tcg-lp-display,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player .tcg-lp-display {
        padding-top: .88rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-top .tcg-lp-display,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-top .tcg-lp-display {
        font-size: clamp(2.05rem, 8.6vw, 2.65rem) !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-bottom .tcg-lp-display,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-lp-display {
        font-size: clamp(2.18rem, 9.1vw, 2.86rem) !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-bottom .tcg-quick-row,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-quick-row {
        gap: .22rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-bottom .tcg-quick-row button,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-quick-row button,
    .tcg-counter-page.is-online-game .tcg-player-bottom .tcg-calc-input,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-calc-input,
    .tcg-counter-page.is-online-game .tcg-player-bottom .tcg-calc button,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-calc button {
        height: 1.66rem !important;
        max-height: 1.66rem !important;
        min-height: 1.66rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-history,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-history {
        min-height: 0 !important;
        padding: .32rem .38rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-history summary,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-history summary {
        margin-bottom: .12rem !important;
        min-height: 1.48rem !important;
        padding: .16rem .26rem .18rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-history summary > span:first-child,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-history summary > span:first-child {
        gap: .28rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-history summary button,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-history summary button {
        min-height: 1.36rem !important;
        padding: 0 .44rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-history ol,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-history ol {
        gap: .28rem !important;
        padding: .28rem .36rem .34rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-history li,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-history li {
        align-items: center !important;
        display: flex !important;
        gap: .28rem !important;
        min-height: 1.5rem !important;
        overflow: hidden !important;
        padding: .32rem .42rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-history li span,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-history li span {
        flex: 0 0 auto !important;
        display: inline !important;
        margin: 0 .28rem 0 0 !important;
    }

    .tcg-counter-page.is-online-game .tcg-history li strong,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-history li strong {
        display: block !important;
        flex: 1 1 auto !important;
        min-width: 0 !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }
}

/* Final mobile online-game balance: more usable log height without letting the browser bar cover controls. */
@media (max-width: 700px) {
    .tcg-counter-page.is-online-game,
    .tcg-counter-page.is-mobile-fit.is-online-game {
        --hud-gap: .2rem !important;
        padding: .18rem .2rem max(.28rem, env(safe-area-inset-bottom, 0px)) !important;
    }

    .tcg-counter-page.is-online-game .tcg-counter-board,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-counter-board {
        gap: .2rem !important;
        grid-template-areas:
            "controls"
            "opponent"
            "you"
            "history"
            "footer" !important;
        grid-template-rows:
            minmax(8.8rem, .95fr)
            minmax(3.45rem, .36fr)
            minmax(8.95rem, .95fr)
            minmax(9.4rem, 1.58fr)
            0 !important;
        min-height: 0 !important;
        overflow: hidden !important;
    }

    .tcg-counter-page.is-online-game .tcg-center-panel,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-center-panel {
        grid-template-rows: 2rem 3.18rem minmax(2.85rem, 1fr) !important;
        padding: .22rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-round-card,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-round-card {
        height: 2rem !important;
        min-height: 2rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-timer,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-timer {
        min-height: 3.18rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-top .tcg-player-inner,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-top .tcg-player-inner {
        grid-template-rows: .86rem minmax(0, 1fr) !important;
        padding: .24rem .42rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-bottom .tcg-player-inner,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-player-inner {
        grid-template-rows: .86rem minmax(2.1rem, 1fr) 3.18rem 1.5rem !important;
        padding: .24rem .42rem !important;
        row-gap: .24rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-bottom .tcg-quick-row,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-quick-row {
        gap: .3rem !important;
        grid-template-rows: repeat(2, minmax(1.5rem, 1fr)) !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-bottom .tcg-quick-row button,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-quick-row button,
    .tcg-counter-page.is-online-game .tcg-player-bottom .tcg-calc-input,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-calc-input,
    .tcg-counter-page.is-online-game .tcg-player-bottom .tcg-calc button,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-calc button {
        height: 1.5rem !important;
        max-height: 1.5rem !important;
        min-height: 1.5rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-history,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-history {
        display: grid !important;
        grid-template-rows: auto minmax(0, 1fr) !important;
        min-height: 0 !important;
        overflow: hidden !important;
    }

    .tcg-counter-page.is-online-game .tcg-history summary,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-history summary {
        min-height: 2rem !important;
        padding: .32rem .5rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-history ol,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-history ol {
        height: 100% !important;
        max-height: none !important;
        min-height: 0 !important;
        overflow-y: auto !important;
        padding: .34rem !important;
    }
}

/* Mobile duel log expansion: the log owns the remaining screen height and scrolls cleanly. */
@media (max-width: 700px) {
    .tcg-counter-page.is-online-game,
    .tcg-counter-page.is-mobile-fit.is-online-game {
        --hud-gap: .2rem !important;
        padding: .18rem .18rem max(.18rem, env(safe-area-inset-bottom, 0px)) !important;
    }

    .tcg-counter-page.is-online-game .tcg-online-game-head,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-online-game-head {
        min-height: 3.08rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-counter-board,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-counter-board {
        gap: .2rem !important;
        grid-template-areas:
            "controls"
            "opponent"
            "you"
            "history"
            "footer" !important;
        grid-template-rows:
            minmax(8.75rem, .9fr)
            minmax(3.35rem, .32fr)
            minmax(8.85rem, .92fr)
            minmax(9.25rem, 1.75fr)
            0 !important;
    }

    .tcg-counter-page.is-online-game .tcg-center-panel,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-center-panel {
        gap: .24rem !important;
        grid-template-rows: 2rem 3.15rem minmax(0, 1fr) !important;
        padding: .24rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-round-card,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-round-card {
        height: 2rem !important;
        min-height: 2rem !important;
        padding: .24rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-timer,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-timer {
        min-height: 3.15rem !important;
        padding: .22rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-top .tcg-player-inner,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-top .tcg-player-inner {
        grid-template-rows: .76rem minmax(0, 1fr) !important;
        padding: .22rem .36rem !important;
        row-gap: .16rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-bottom .tcg-player-inner,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-player-inner {
        grid-template-rows: .78rem minmax(2rem, 1fr) 2.9rem 1.44rem !important;
        padding: .22rem .36rem !important;
        row-gap: .16rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-top .tcg-lp-display,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-top .tcg-lp-display,
    .tcg-counter-page.is-online-game .tcg-player-bottom .tcg-lp-display,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-lp-display {
        font-size: clamp(1.95rem, 8.2vw, 2.55rem) !important;
        padding-top: .72rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-bottom .tcg-quick-row,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-quick-row {
        gap: .18rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-bottom .tcg-quick-row button,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-quick-row button,
    .tcg-counter-page.is-online-game .tcg-player-bottom .tcg-calc-input,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-calc-input,
    .tcg-counter-page.is-online-game .tcg-player-bottom .tcg-calc button,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-calc button {
        height: 1.44rem !important;
        max-height: 1.44rem !important;
        min-height: 1.44rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-history,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-history {
        min-height: 0 !important;
        padding: .34rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-history summary,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-history summary {
        margin-bottom: .18rem !important;
        min-height: 1.42rem !important;
        padding: .2rem .38rem .14rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-history ol,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-history ol {
        gap: .22rem !important;
        min-height: 0 !important;
        overflow: auto !important;
        padding: .2rem .38rem .34rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-history li,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-history li,
    .tcg-counter-page.is-online-game .tcg-history li:nth-child(n + 3),
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-history li:nth-child(n + 3) {
        display: flex !important;
        min-height: 1.34rem !important;
        padding: .24rem .36rem !important;
    }
}

/* Tail override for the online duel player panels. Keep this block at the end. */
.tcg-counter-page.is-online-game .tcg-player-head,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-head {
    display: contents !important;
}

.tcg-counter-page.is-online-game .tcg-player-head::before,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-head::before {
    align-self: stretch !important;
    background: linear-gradient(180deg, var(--tcg-player-color, #38bdf8), color-mix(in srgb, var(--tcg-player-color, #38bdf8) 34%, transparent)) !important;
    border-radius: 999px !important;
    clip-path: none !important;
    content: "" !important;
    display: block !important;
    filter: none !important;
    grid-area: stripe !important;
    height: 100% !important;
    justify-self: center !important;
    opacity: 1 !important;
    position: static !important;
    transform: none !important;
    width: .34rem !important;
}

.tcg-counter-page.is-online-game .tcg-player-head::after,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-head::after,
.tcg-counter-page.is-online-game .tcg-player-actions,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-actions {
    display: none !important;
}

.tcg-counter-page.is-online-game .tcg-player .tcg-player-inner::before,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player .tcg-player-inner::before {
    align-self: center !important;
    grid-area: role !important;
    margin: 0 !important;
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.tcg-counter-page.is-online-game .tcg-player .tcg-player-name,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player .tcg-player-name {
    align-items: center !important;
    background: rgba(3, 12, 30, .54) !important;
    border: 1px solid rgba(125, 211, 252, .16) !important;
    border-radius: 999px !important;
    display: flex !important;
    font-size: clamp(.58rem, 1.55vw, .82rem) !important;
    grid-area: name !important;
    grid-column: auto !important;
    grid-row: auto !important;
    height: 1rem !important;
    justify-content: center !important;
    justify-self: stretch !important;
    left: auto !important;
    line-height: 1 !important;
    max-height: 1rem !important;
    max-width: none !important;
    min-height: 1rem !important;
    min-width: 0 !important;
    overflow: hidden !important;
    padding: .12rem .48rem !important;
    pointer-events: none !important;
    position: static !important;
    right: auto !important;
    text-align: center !important;
    text-overflow: ellipsis !important;
    top: auto !important;
    transform: none !important;
    white-space: nowrap !important;
    width: 100% !important;
}

.tcg-counter-page.is-online-game .tcg-player-online-state,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-online-state {
    align-items: center !important;
    display: inline-flex !important;
    font-size: clamp(.44rem, 1.28vw, .64rem) !important;
    grid-area: status !important;
    height: 1rem !important;
    justify-content: center !important;
    justify-self: end !important;
    left: auto !important;
    line-height: 1 !important;
    max-width: 5.8rem !important;
    min-height: 1rem !important;
    min-width: 4.15rem !important;
    overflow: hidden !important;
    padding: 0 .34rem !important;
    position: static !important;
    top: auto !important;
    transform: none !important;
    white-space: nowrap !important;
}

.tcg-counter-page.is-online-game .tcg-lp-display,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-lp-display {
    display: grid !important;
    font-size: clamp(2.05rem, 8.2vw, 3rem) !important;
    grid-area: lp !important;
    grid-column: auto !important;
    grid-row: auto !important;
    height: 100% !important;
    line-height: .86 !important;
    min-height: 0 !important;
    overflow: hidden !important;
    padding: .08rem 0 0 !important;
    place-items: center !important;
}

.tcg-counter-page.is-online-game .tcg-player-top .tcg-player-inner,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-top .tcg-player-inner {
    grid-template-areas:
        "stripe role name status"
        "stripe lp lp lp" !important;
    grid-template-columns: .48rem minmax(4rem, .3fr) minmax(0, 1fr) minmax(4.3rem, auto) !important;
    grid-template-rows: 1rem minmax(0, 1fr) !important;
    padding: .3rem .42rem !important;
}

.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-player-inner,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-player-inner {
    grid-template-areas:
        "stripe role name status"
        "stripe lp lp lp"
        "quick quick quick quick"
        "calc calc calc calc" !important;
    grid-template-columns: .48rem minmax(4rem, .3fr) minmax(0, 1fr) minmax(4.3rem, auto) !important;
    grid-template-rows: 1rem minmax(2.15rem, 1fr) minmax(3.18rem, auto) minmax(1.56rem, auto) !important;
    padding: .3rem .42rem !important;
}

.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-quick-row,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-quick-row {
    display: grid !important;
    gap: .24rem !important;
    grid-area: quick !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-template-rows: repeat(2, minmax(1.42rem, 1fr)) !important;
    min-height: 0 !important;
}

.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-calc,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-calc {
    display: grid !important;
    gap: .24rem !important;
    grid-area: calc !important;
    grid-template-columns: minmax(0, 1fr) minmax(3.2rem, .16fr) minmax(3.2rem, .16fr) !important;
    min-height: 0 !important;
}

.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-calc button[data-calc-action="clear"],
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-calc button[data-calc-action="clear"] {
    display: none !important;
}

@media (min-width: 701px) {
    .tcg-counter-page.is-online-game,
    .tcg-counter-page.is-mobile-fit.is-online-game {
        max-width: min(100vw, 1170px) !important;
        width: min(100vw, 1170px) !important;
    }

    .tcg-counter-page.is-online-game .tcg-counter-board,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-counter-board {
        grid-template-rows: minmax(13rem, 1.02fr) minmax(7.2rem, .54fr) minmax(15.4rem, 1.16fr) minmax(9rem, .78fr) 0 !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-top .tcg-player-inner,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-top .tcg-player-inner {
        grid-template-columns: .64rem minmax(6rem, .28fr) minmax(0, 1fr) minmax(5.9rem, auto) !important;
        grid-template-rows: 1.35rem minmax(0, 1fr) !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-bottom .tcg-player-inner,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-player-inner {
        grid-template-columns: .64rem minmax(6rem, .28fr) minmax(0, 1fr) minmax(5.9rem, auto) !important;
        grid-template-rows: 1.35rem minmax(3.7rem, 1fr) minmax(4.9rem, auto) minmax(2.35rem, auto) !important;
    }

    .tcg-counter-page.is-online-game .tcg-lp-display,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-lp-display {
        font-size: clamp(4.45rem, 7.2vw, 6.35rem) !important;
    }
}

@media (max-width: 700px) {
    .tcg-counter-page.is-online-game,
    .tcg-counter-page.is-mobile-fit.is-online-game {
        font-size: clamp(12px, 3vw, 14px) !important;
        width: min(100vw, 520px) !important;
    }

    .tcg-counter-page.is-online-game .tcg-counter-board,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-counter-board {
        grid-template-rows: minmax(8.4rem, 1.02fr) minmax(3.55rem, .43fr) minmax(8.7rem, 1fr) minmax(4.8rem, .58fr) 0 !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-top .tcg-player-inner,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-top .tcg-player-inner {
        grid-template-columns: .38rem minmax(3.15rem, .26fr) minmax(0, 1fr) minmax(3.8rem, auto) !important;
        grid-template-rows: .9rem minmax(0, 1fr) !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-bottom .tcg-player-inner,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-player-inner {
        grid-template-columns: .38rem minmax(3.15rem, .26fr) minmax(0, 1fr) minmax(3.8rem, auto) !important;
        grid-template-rows: .9rem minmax(1.95rem, 1fr) minmax(3.08rem, auto) minmax(1.42rem, auto) !important;
    }

    .tcg-counter-page.is-online-game .tcg-player .tcg-player-name {
        font-size: .68rem !important;
        height: .88rem !important;
        max-height: .88rem !important;
        min-height: .88rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-online-state {
        font-size: .48rem !important;
        height: .88rem !important;
        max-width: 4.75rem !important;
        min-height: .88rem !important;
        min-width: 3.65rem !important;
    }
}

/* Absolute final override: player panels use one grid, no absolute status/name overlap. */
.tcg-counter-page.is-online-game .tcg-player,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player {
    min-height: 0 !important;
    overflow: hidden !important;
}

.tcg-counter-page.is-online-game .tcg-player .tcg-player-inner,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player .tcg-player-inner {
    column-gap: .36rem !important;
    min-height: 0 !important;
    overflow: hidden !important;
    position: relative !important;
    row-gap: .22rem !important;
}

.tcg-counter-page.is-online-game .tcg-player-head,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-head {
    display: contents !important;
}

.tcg-counter-page.is-online-game .tcg-player-head::before,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-head::before {
    align-self: stretch !important;
    background: linear-gradient(180deg, var(--tcg-player-color, #38bdf8), color-mix(in srgb, var(--tcg-player-color, #38bdf8) 34%, transparent)) !important;
    border: 1px solid color-mix(in srgb, var(--tcg-player-color, #38bdf8) 68%, white 18%) !important;
    border-radius: 999px !important;
    box-shadow: 0 0 .75rem color-mix(in srgb, var(--tcg-player-color, #38bdf8) 46%, transparent) !important;
    clip-path: none !important;
    content: "" !important;
    display: block !important;
    filter: none !important;
    grid-area: stripe !important;
    height: 100% !important;
    justify-self: center !important;
    min-height: 0 !important;
    opacity: 1 !important;
    transform: none !important;
    width: .34rem !important;
}

.tcg-counter-page.is-online-game .tcg-player-head::after,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-head::after,
.tcg-counter-page.is-online-game .tcg-player-actions,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-actions,
.tcg-counter-page.is-online-game .tcg-lp-badge,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-lp-badge {
    display: none !important;
}

.tcg-counter-page.is-online-game .tcg-player .tcg-player-inner::before,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player .tcg-player-inner::before {
    align-self: center !important;
    grid-area: role !important;
    justify-self: start !important;
    margin: 0 !important;
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.tcg-counter-page.is-online-game .tcg-player .tcg-player-name,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player .tcg-player-name {
    align-items: center !important;
    align-self: center !important;
    background: rgba(3, 12, 30, .54) !important;
    border: 1px solid rgba(125, 211, 252, .16) !important;
    border-radius: 999px !important;
    box-shadow: inset 0 0 .55rem rgba(125, 211, 252, .06), 0 0 .5rem rgba(56, 189, 248, .08) !important;
    color: #fff !important;
    display: flex !important;
    font-size: clamp(.58rem, 1.55vw, .82rem) !important;
    font-weight: 950 !important;
    grid-area: name !important;
    grid-column: auto !important;
    grid-row: auto !important;
    height: 1rem !important;
    justify-content: center !important;
    justify-self: stretch !important;
    left: auto !important;
    line-height: 1 !important;
    margin: 0 !important;
    max-height: 1rem !important;
    max-width: none !important;
    min-height: 1rem !important;
    min-width: 0 !important;
    overflow: hidden !important;
    padding: .12rem .48rem !important;
    pointer-events: none !important;
    position: static !important;
    right: auto !important;
    text-align: center !important;
    text-overflow: ellipsis !important;
    top: auto !important;
    transform: none !important;
    white-space: nowrap !important;
    width: 100% !important;
    z-index: auto !important;
}

.tcg-counter-page.is-online-game .tcg-player-online-state,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-online-state {
    align-items: center !important;
    align-self: center !important;
    display: inline-flex !important;
    font-size: clamp(.44rem, 1.28vw, .64rem) !important;
    gap: .18rem !important;
    grid-area: status !important;
    height: 1rem !important;
    justify-content: center !important;
    justify-self: end !important;
    left: auto !important;
    line-height: 1 !important;
    margin: 0 !important;
    max-height: 1rem !important;
    max-width: 5.8rem !important;
    min-height: 1rem !important;
    min-width: 4.15rem !important;
    overflow: hidden !important;
    padding: 0 .34rem !important;
    position: static !important;
    text-overflow: ellipsis !important;
    top: auto !important;
    transform: none !important;
    white-space: nowrap !important;
}

.tcg-counter-page.is-online-game .tcg-player-online-state::before,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-online-state::before {
    flex: 0 0 auto !important;
    height: .34rem !important;
    width: .34rem !important;
}

.tcg-counter-page.is-online-game .tcg-lp-display,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-lp-display {
    align-self: stretch !important;
    display: grid !important;
    font-size: clamp(2.05rem, 8.2vw, 3rem) !important;
    grid-area: lp !important;
    grid-column: auto !important;
    grid-row: auto !important;
    height: 100% !important;
    justify-self: stretch !important;
    line-height: .86 !important;
    min-height: 0 !important;
    overflow: hidden !important;
    padding: .08rem 0 0 !important;
    place-items: center !important;
    transform: none !important;
}

.tcg-counter-page.is-online-game .tcg-player-top .tcg-player-inner,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-top .tcg-player-inner {
    grid-template-areas:
        "stripe role name status"
        "stripe lp lp lp" !important;
    grid-template-columns: .48rem minmax(4rem, .3fr) minmax(0, 1fr) minmax(4.3rem, auto) !important;
    grid-template-rows: 1rem minmax(0, 1fr) !important;
    padding: .3rem .42rem !important;
}

.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-player-inner,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-player-inner {
    grid-template-areas:
        "stripe role name status"
        "stripe lp lp lp"
        "quick quick quick quick"
        "calc calc calc calc" !important;
    grid-template-columns: .48rem minmax(4rem, .3fr) minmax(0, 1fr) minmax(4.3rem, auto) !important;
    grid-template-rows: 1rem minmax(2.15rem, 1fr) minmax(3.18rem, auto) minmax(1.56rem, auto) !important;
    padding: .3rem .42rem !important;
}

.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-quick-row,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-quick-row {
    align-self: stretch !important;
    display: grid !important;
    gap: .24rem !important;
    grid-area: quick !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-template-rows: repeat(2, minmax(1.42rem, 1fr)) !important;
    min-height: 0 !important;
}

.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-calc,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-calc {
    align-self: stretch !important;
    display: grid !important;
    gap: .24rem !important;
    grid-area: calc !important;
    grid-template-columns: minmax(0, 1fr) minmax(3.2rem, .16fr) minmax(3.2rem, .16fr) !important;
    min-height: 0 !important;
}

.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-calc button[data-calc-action="clear"],
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-calc button[data-calc-action="clear"] {
    display: none !important;
}

.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-quick-row button,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-quick-row button,
.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-calc-input,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-calc-input,
.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-calc button,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-calc button {
    align-items: center !important;
    display: flex !important;
    font-size: clamp(.72rem, 2.45vw, .92rem) !important;
    height: 100% !important;
    justify-content: center !important;
    line-height: 1 !important;
    max-height: none !important;
    min-height: 0 !important;
    padding: .18rem .28rem !important;
}

.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-calc-input,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-calc-input {
    justify-content: flex-start !important;
    text-align: left !important;
}

@media (min-width: 701px) {
    .tcg-counter-page.is-online-game,
    .tcg-counter-page.is-mobile-fit.is-online-game {
        max-width: min(100vw, 1170px) !important;
        width: min(100vw, 1170px) !important;
    }

    .tcg-counter-page.is-online-game .tcg-counter-board,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-counter-board {
        grid-template-rows:
            minmax(13rem, 1.02fr)
            minmax(7.2rem, .54fr)
            minmax(15.4rem, 1.16fr)
            minmax(9rem, .78fr)
            0 !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-head::before,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-head::before {
        width: .46rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-top .tcg-player-inner,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-top .tcg-player-inner {
        grid-template-columns: .64rem minmax(6rem, .28fr) minmax(0, 1fr) minmax(5.9rem, auto) !important;
        grid-template-rows: 1.35rem minmax(0, 1fr) !important;
        padding: .58rem .76rem !important;
        row-gap: .42rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-bottom .tcg-player-inner,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-player-inner {
        grid-template-columns: .64rem minmax(6rem, .28fr) minmax(0, 1fr) minmax(5.9rem, auto) !important;
        grid-template-rows: 1.35rem minmax(3.7rem, 1fr) minmax(4.9rem, auto) minmax(2.35rem, auto) !important;
        padding: .58rem .76rem !important;
        row-gap: .42rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-player .tcg-player-name,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player .tcg-player-name,
    .tcg-counter-page.is-online-game .tcg-player-online-state,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-online-state {
        height: 1.24rem !important;
        max-height: 1.24rem !important;
        min-height: 1.24rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-online-state,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-online-state {
        max-width: 7rem !important;
        min-width: 5.25rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-lp-display,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-lp-display {
        font-size: clamp(4.45rem, 7.2vw, 6.35rem) !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-bottom .tcg-quick-row,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-quick-row {
        gap: .36rem !important;
        grid-template-rows: repeat(2, minmax(2.12rem, 1fr)) !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-bottom .tcg-calc,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-calc {
        gap: .36rem !important;
        grid-template-columns: minmax(0, 1fr) minmax(4.2rem, .14fr) minmax(4.2rem, .14fr) !important;
    }
}

@media (max-width: 700px) {
    html:has(.tcg-counter-page.is-online-game),
    body:has(.tcg-counter-page.is-online-game),
    body:has(.tcg-counter-page.is-online-game) .public-main {
        height: var(--tcg-vh, 100svh) !important;
        max-height: var(--tcg-vh, 100svh) !important;
        overflow: hidden !important;
    }

    .tcg-counter-page.is-online-game,
    .tcg-counter-page.is-mobile-fit.is-online-game {
        --hud-gap: .18rem !important;
        font-size: clamp(12px, 3vw, 14px) !important;
        height: var(--tcg-vh, 100svh) !important;
        max-height: var(--tcg-vh, 100svh) !important;
        min-height: var(--tcg-vh, 100svh) !important;
        overflow: hidden !important;
        padding: .18rem .18rem calc(.2rem + env(safe-area-inset-bottom, 0px)) !important;
        width: min(100vw, 520px) !important;
    }

    .tcg-counter-page.is-online-game .tcg-counter-board,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-counter-board {
        gap: .18rem !important;
        grid-template-rows:
            minmax(8.4rem, 1.02fr)
            minmax(3.55rem, .43fr)
            minmax(8.7rem, 1fr)
            minmax(4.8rem, .58fr)
            0 !important;
        min-height: 0 !important;
        overflow: hidden !important;
    }

    .tcg-counter-page.is-online-game .tcg-player .tcg-player-inner,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player .tcg-player-inner {
        column-gap: .26rem !important;
        row-gap: .18rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-head::before,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-head::before {
        width: .28rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-player .tcg-player-inner::before,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player .tcg-player-inner::before {
        font-size: .54rem !important;
        letter-spacing: .08em !important;
    }

    .tcg-counter-page.is-online-game .tcg-player .tcg-player-name,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player .tcg-player-name {
        font-size: .68rem !important;
        height: .88rem !important;
        max-height: .88rem !important;
        min-height: .88rem !important;
        padding: .08rem .34rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-online-state,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-online-state {
        font-size: .48rem !important;
        height: .88rem !important;
        max-height: .88rem !important;
        max-width: 4.75rem !important;
        min-height: .88rem !important;
        min-width: 3.65rem !important;
        padding: 0 .24rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-online-state::before,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-online-state::before {
        height: .28rem !important;
        width: .28rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-top .tcg-player-inner,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-top .tcg-player-inner {
        grid-template-columns: .38rem minmax(3.15rem, .26fr) minmax(0, 1fr) minmax(3.8rem, auto) !important;
        grid-template-rows: .9rem minmax(0, 1fr) !important;
        padding: .24rem .32rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-bottom .tcg-player-inner,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-player-inner {
        grid-template-columns: .38rem minmax(3.15rem, .26fr) minmax(0, 1fr) minmax(3.8rem, auto) !important;
        grid-template-rows: .9rem minmax(1.95rem, 1fr) minmax(3.08rem, auto) minmax(1.42rem, auto) !important;
        padding: .24rem .32rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-lp-display,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-lp-display {
        font-size: clamp(2rem, 8vw, 2.55rem) !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-bottom .tcg-quick-row,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-quick-row {
        gap: .2rem !important;
        grid-template-rows: repeat(2, minmax(1.34rem, 1fr)) !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-bottom .tcg-calc,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-calc {
        gap: .2rem !important;
        grid-template-columns: minmax(0, 1fr) minmax(2.65rem, .15fr) minmax(2.65rem, .15fr) !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-bottom .tcg-quick-row button,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-quick-row button,
    .tcg-counter-page.is-online-game .tcg-player-bottom .tcg-calc-input,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-calc-input,
    .tcg-counter-page.is-online-game .tcg-player-bottom .tcg-calc button,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-calc button {
        font-size: .72rem !important;
        padding: .1rem .18rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-history,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-history {
        min-height: 0 !important;
    }
}

/* Final online player panel repair: keep status, name, LP and controls in fixed grid tracks. */
.tcg-counter-page.is-online-game .tcg-player,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player {
    min-height: 0 !important;
    overflow: hidden !important;
}

.tcg-counter-page.is-online-game .tcg-player .tcg-player-inner,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player .tcg-player-inner {
    column-gap: .36rem !important;
    min-height: 0 !important;
    overflow: hidden !important;
    position: relative !important;
    row-gap: .22rem !important;
}

.tcg-counter-page.is-online-game .tcg-player-head,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-head {
    display: contents !important;
}

.tcg-counter-page.is-online-game .tcg-player-head::before,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-head::before {
    align-self: stretch !important;
    background: linear-gradient(180deg, var(--tcg-player-color, #38bdf8), color-mix(in srgb, var(--tcg-player-color, #38bdf8) 34%, transparent)) !important;
    border: 1px solid color-mix(in srgb, var(--tcg-player-color, #38bdf8) 68%, white 18%) !important;
    border-radius: 999px !important;
    box-shadow: 0 0 .75rem color-mix(in srgb, var(--tcg-player-color, #38bdf8) 46%, transparent) !important;
    clip-path: none !important;
    content: "" !important;
    display: block !important;
    filter: none !important;
    grid-area: stripe !important;
    height: 100% !important;
    justify-self: center !important;
    min-height: 0 !important;
    opacity: 1 !important;
    transform: none !important;
    width: .34rem !important;
}

.tcg-counter-page.is-online-game .tcg-player-head::after,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-head::after {
    display: none !important;
}

.tcg-counter-page.is-online-game .tcg-player .tcg-player-inner::before,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player .tcg-player-inner::before {
    align-self: center !important;
    grid-area: role !important;
    justify-self: start !important;
    margin: 0 !important;
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.tcg-counter-page.is-online-game .tcg-player .tcg-player-name,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player .tcg-player-name {
    align-items: center !important;
    align-self: center !important;
    background: rgba(3, 12, 30, .54) !important;
    border: 1px solid rgba(125, 211, 252, .16) !important;
    border-radius: 999px !important;
    box-shadow: inset 0 0 .55rem rgba(125, 211, 252, .06), 0 0 .5rem rgba(56, 189, 248, .08) !important;
    color: #fff !important;
    display: flex !important;
    font-size: clamp(.58rem, 1.55vw, .82rem) !important;
    font-weight: 950 !important;
    grid-area: name !important;
    height: 1rem !important;
    justify-content: center !important;
    justify-self: stretch !important;
    left: auto !important;
    line-height: 1 !important;
    margin: 0 !important;
    max-height: 1rem !important;
    max-width: none !important;
    min-height: 1rem !important;
    min-width: 0 !important;
    overflow: hidden !important;
    padding: .12rem .48rem !important;
    pointer-events: none !important;
    position: static !important;
    right: auto !important;
    text-align: center !important;
    text-overflow: ellipsis !important;
    top: auto !important;
    transform: none !important;
    white-space: nowrap !important;
    width: 100% !important;
    z-index: auto !important;
}

.tcg-counter-page.is-online-game .tcg-player-online-state,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-online-state {
    align-items: center !important;
    align-self: center !important;
    display: inline-flex !important;
    font-size: clamp(.44rem, 1.28vw, .64rem) !important;
    gap: .18rem !important;
    grid-area: status !important;
    height: 1rem !important;
    justify-content: center !important;
    justify-self: end !important;
    left: auto !important;
    line-height: 1 !important;
    margin: 0 !important;
    max-height: 1rem !important;
    max-width: 5.8rem !important;
    min-height: 1rem !important;
    min-width: 4.15rem !important;
    overflow: hidden !important;
    padding: 0 .34rem !important;
    position: static !important;
    text-overflow: ellipsis !important;
    top: auto !important;
    transform: none !important;
    white-space: nowrap !important;
}

.tcg-counter-page.is-online-game .tcg-player-online-state::before,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-online-state::before {
    flex: 0 0 auto !important;
    height: .34rem !important;
    width: .34rem !important;
}

.tcg-counter-page.is-online-game .tcg-lp-badge,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-lp-badge,
.tcg-counter-page.is-online-game .tcg-player-actions,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-actions {
    display: none !important;
}

.tcg-counter-page.is-online-game .tcg-lp-display,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-lp-display {
    align-self: stretch !important;
    display: grid !important;
    font-size: clamp(2.05rem, 8.2vw, 3rem) !important;
    grid-area: lp !important;
    height: 100% !important;
    justify-self: stretch !important;
    line-height: .86 !important;
    min-height: 0 !important;
    overflow: hidden !important;
    padding: .08rem 0 0 !important;
    place-items: center !important;
    transform: none !important;
}

.tcg-counter-page.is-online-game .tcg-player-top .tcg-player-inner,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-top .tcg-player-inner {
    grid-template-areas:
        "stripe role name status"
        "stripe lp lp lp" !important;
    grid-template-columns: .48rem minmax(4rem, .3fr) minmax(0, 1fr) minmax(4.3rem, auto) !important;
    grid-template-rows: 1rem minmax(0, 1fr) !important;
    padding: .3rem .42rem !important;
}

.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-player-inner,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-player-inner {
    grid-template-areas:
        "stripe role name status"
        "stripe lp lp lp"
        "quick quick quick quick"
        "calc calc calc calc" !important;
    grid-template-columns: .48rem minmax(4rem, .3fr) minmax(0, 1fr) minmax(4.3rem, auto) !important;
    grid-template-rows: 1rem minmax(2.15rem, 1fr) minmax(3.18rem, auto) minmax(1.56rem, auto) !important;
    padding: .3rem .42rem !important;
}

.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-quick-row,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-quick-row {
    align-self: stretch !important;
    display: grid !important;
    gap: .24rem !important;
    grid-area: quick !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-template-rows: repeat(2, minmax(1.42rem, 1fr)) !important;
    min-height: 0 !important;
}

.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-calc,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-calc {
    align-self: stretch !important;
    display: grid !important;
    gap: .24rem !important;
    grid-area: calc !important;
    grid-template-columns: minmax(0, 1fr) minmax(3.2rem, .16fr) minmax(3.2rem, .16fr) !important;
    min-height: 0 !important;
}

.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-calc button[data-calc-action="clear"],
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-calc button[data-calc-action="clear"] {
    display: none !important;
}

.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-quick-row button,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-quick-row button,
.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-calc-input,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-calc-input,
.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-calc button,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-calc button {
    align-items: center !important;
    display: flex !important;
    font-size: clamp(.72rem, 2.45vw, .92rem) !important;
    height: 100% !important;
    justify-content: center !important;
    line-height: 1 !important;
    max-height: none !important;
    min-height: 0 !important;
    padding: .18rem .28rem !important;
}

.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-calc-input,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-calc-input {
    justify-content: flex-start !important;
    text-align: left !important;
}

@media (min-width: 701px) {
    .tcg-counter-page.is-online-game {
        max-width: min(100vw, 1170px) !important;
        width: min(100vw, 1170px) !important;
    }

    .tcg-counter-page.is-online-game .tcg-counter-board,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-counter-board {
        grid-template-rows:
            minmax(13rem, 1.02fr)
            minmax(7.2rem, .54fr)
            minmax(15.4rem, 1.16fr)
            minmax(9rem, .78fr)
            0 !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-head::before,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-head::before {
        width: .46rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-top .tcg-player-inner,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-top .tcg-player-inner {
        grid-template-columns: .64rem minmax(6rem, .28fr) minmax(0, 1fr) minmax(5.9rem, auto) !important;
        grid-template-rows: 1.35rem minmax(0, 1fr) !important;
        padding: .58rem .76rem !important;
        row-gap: .42rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-bottom .tcg-player-inner,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-player-inner {
        grid-template-columns: .64rem minmax(6rem, .28fr) minmax(0, 1fr) minmax(5.9rem, auto) !important;
        grid-template-rows: 1.35rem minmax(3.7rem, 1fr) minmax(4.9rem, auto) minmax(2.35rem, auto) !important;
        padding: .58rem .76rem !important;
        row-gap: .42rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-player .tcg-player-name,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player .tcg-player-name,
    .tcg-counter-page.is-online-game .tcg-player-online-state,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-online-state {
        height: 1.24rem !important;
        max-height: 1.24rem !important;
        min-height: 1.24rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-online-state,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-online-state {
        max-width: 7rem !important;
        min-width: 5.25rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-lp-display,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-lp-display {
        font-size: clamp(4.45rem, 7.2vw, 6.35rem) !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-bottom .tcg-quick-row,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-quick-row {
        gap: .36rem !important;
        grid-template-rows: repeat(2, minmax(2.12rem, 1fr)) !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-bottom .tcg-calc,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-calc {
        gap: .36rem !important;
        grid-template-columns: minmax(0, 1fr) minmax(4.2rem, .14fr) minmax(4.2rem, .14fr) !important;
    }
}

@media (max-width: 700px) {
    html:has(.tcg-counter-page.is-online-game),
    body:has(.tcg-counter-page.is-online-game),
    body:has(.tcg-counter-page.is-online-game) .public-main {
        height: var(--tcg-vh, 100svh) !important;
        max-height: var(--tcg-vh, 100svh) !important;
        overflow: hidden !important;
    }

    .tcg-counter-page.is-online-game,
    .tcg-counter-page.is-mobile-fit.is-online-game {
        --hud-gap: .18rem !important;
        font-size: clamp(12px, 3vw, 14px) !important;
        height: var(--tcg-vh, 100svh) !important;
        max-height: var(--tcg-vh, 100svh) !important;
        min-height: var(--tcg-vh, 100svh) !important;
        overflow: hidden !important;
        padding: .18rem .18rem calc(.2rem + env(safe-area-inset-bottom, 0px)) !important;
        width: min(100vw, 520px) !important;
    }

    .tcg-counter-page.is-online-game .tcg-counter-board,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-counter-board {
        gap: .18rem !important;
        grid-template-rows:
            minmax(8.4rem, 1.02fr)
            minmax(3.55rem, .43fr)
            minmax(8.7rem, 1fr)
            minmax(4.8rem, .58fr)
            0 !important;
        min-height: 0 !important;
        overflow: hidden !important;
    }

    .tcg-counter-page.is-online-game .tcg-player .tcg-player-inner,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player .tcg-player-inner {
        column-gap: .26rem !important;
        row-gap: .18rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-head::before,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-head::before {
        width: .28rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-player .tcg-player-inner::before,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player .tcg-player-inner::before {
        font-size: .54rem !important;
        letter-spacing: .08em !important;
    }

    .tcg-counter-page.is-online-game .tcg-player .tcg-player-name,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player .tcg-player-name {
        font-size: .68rem !important;
        height: .88rem !important;
        max-height: .88rem !important;
        min-height: .88rem !important;
        padding: .08rem .34rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-online-state,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-online-state {
        font-size: .48rem !important;
        height: .88rem !important;
        max-height: .88rem !important;
        max-width: 4.75rem !important;
        min-height: .88rem !important;
        min-width: 3.65rem !important;
        padding: 0 .24rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-online-state::before,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-online-state::before {
        height: .28rem !important;
        width: .28rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-top .tcg-player-inner,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-top .tcg-player-inner {
        grid-template-columns: .38rem minmax(3.15rem, .26fr) minmax(0, 1fr) minmax(3.8rem, auto) !important;
        grid-template-rows: .9rem minmax(0, 1fr) !important;
        padding: .24rem .32rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-bottom .tcg-player-inner,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-player-inner {
        grid-template-columns: .38rem minmax(3.15rem, .26fr) minmax(0, 1fr) minmax(3.8rem, auto) !important;
        grid-template-rows: .9rem minmax(1.95rem, 1fr) minmax(3.08rem, auto) minmax(1.42rem, auto) !important;
        padding: .24rem .32rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-lp-display,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-lp-display {
        font-size: clamp(2rem, 8vw, 2.55rem) !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-bottom .tcg-quick-row,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-quick-row {
        gap: .2rem !important;
        grid-template-rows: repeat(2, minmax(1.34rem, 1fr)) !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-bottom .tcg-calc,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-calc {
        gap: .2rem !important;
        grid-template-columns: minmax(0, 1fr) minmax(2.65rem, .15fr) minmax(2.65rem, .15fr) !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-bottom .tcg-quick-row button,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-quick-row button,
    .tcg-counter-page.is-online-game .tcg-player-bottom .tcg-calc-input,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-calc-input,
    .tcg-counter-page.is-online-game .tcg-player-bottom .tcg-calc button,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-calc button {
        font-size: .72rem !important;
        padding: .1rem .18rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-history,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-history {
        min-height: 0 !important;
    }
}

/* Player panel hard reset: no overlapping status, equal color rail, clean LP and controls. */
.tcg-counter-page.is-online-game .tcg-player,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player {
    isolation: isolate !important;
}

.tcg-counter-page.is-online-game .tcg-player .tcg-player-inner,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player .tcg-player-inner {
    overflow: hidden !important;
    position: relative !important;
}

.tcg-counter-page.is-online-game .tcg-player-head,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-head {
    display: contents !important;
}

.tcg-counter-page.is-online-game .tcg-player-head::before,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-head::before {
    align-self: stretch !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .72), var(--tcg-player-color, #38bdf8) 48%, rgba(255, 255, 255, .28)) !important;
    border: 1px solid rgba(255, 255, 255, .4) !important;
    border-radius: 999px !important;
    box-shadow: 0 0 .9rem var(--tcg-player-color-soft, rgba(56, 189, 248, .22)) !important;
    content: "" !important;
    display: block !important;
    filter: none !important;
    grid-area: rail !important;
    height: 100% !important;
    justify-self: center !important;
    min-height: 0 !important;
    width: .46rem !important;
}

.tcg-counter-page.is-online-game .tcg-player-head::after,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-head::after {
    display: none !important;
}

.tcg-counter-page.is-online-game .tcg-player .tcg-player-inner::before,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player .tcg-player-inner::before {
    align-self: center !important;
    grid-area: role !important;
    justify-self: start !important;
    line-height: 1 !important;
    margin: 0 !important;
    padding-left: .08rem !important;
    z-index: 3 !important;
}

.tcg-counter-page.is-online-game .tcg-player .tcg-player-name,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player .tcg-player-name {
    align-items: center !important;
    background: rgba(3, 12, 30, .55) !important;
    border: 1px solid rgba(125, 211, 252, .16) !important;
    border-radius: 999px !important;
    box-shadow: 0 0 .65rem rgba(56, 189, 248, .1) !important;
    color: #fff !important;
    display: flex !important;
    font-size: clamp(.64rem, 1.9vw, .9rem) !important;
    font-weight: 950 !important;
    height: 1.05rem !important;
    justify-content: center !important;
    left: 50% !important;
    line-height: 1 !important;
    margin: 0 !important;
    max-width: min(40%, 13rem) !important;
    min-height: 1.05rem !important;
    min-width: 4.4rem !important;
    overflow: hidden !important;
    padding: .18rem .58rem !important;
    pointer-events: none !important;
    position: absolute !important;
    right: auto !important;
    text-align: center !important;
    text-overflow: ellipsis !important;
    top: .34rem !important;
    transform: translateX(-50%) !important;
    white-space: nowrap !important;
    z-index: 5 !important;
}

.tcg-counter-page.is-online-game .tcg-player-online-state,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-online-state {
    align-self: center !important;
    grid-area: state !important;
    justify-self: end !important;
    left: auto !important;
    max-width: 7.8rem !important;
    position: static !important;
    top: auto !important;
    transform: none !important;
    z-index: 4 !important;
}

.tcg-counter-page.is-online-game .tcg-player .tcg-lp-display,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player .tcg-lp-display {
    align-self: center !important;
    grid-area: lp !important;
    justify-self: stretch !important;
    line-height: .86 !important;
    min-height: 0 !important;
    overflow: visible !important;
    padding: 0 !important;
    position: relative !important;
    z-index: 2 !important;
}

.tcg-counter-page.is-online-game .tcg-player-top .tcg-player-inner,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-top .tcg-player-inner {
    column-gap: .4rem !important;
    grid-template-areas:
        "rail role state"
        "rail lp lp" !important;
    grid-template-columns: .56rem minmax(0, 1fr) minmax(5.8rem, auto) !important;
    grid-template-rows: 1.24rem minmax(0, 1fr) !important;
    padding: .42rem .56rem !important;
    row-gap: .16rem !important;
}

.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-player-inner,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-player-inner {
    column-gap: .4rem !important;
    grid-template-areas:
        "rail role state"
        "rail lp lp"
        "quick quick quick"
        "calc calc calc" !important;
    grid-template-columns: .56rem minmax(0, 1fr) minmax(5.8rem, auto) !important;
    grid-template-rows: 1.24rem minmax(0, 1fr) 3.68rem 1.74rem !important;
    padding: .42rem .56rem !important;
    row-gap: .2rem !important;
}

.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-quick-row,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-quick-row {
    align-self: stretch !important;
    display: grid !important;
    gap: .24rem !important;
    grid-area: quick !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-template-rows: repeat(2, minmax(0, 1fr)) !important;
    min-height: 0 !important;
}

.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-calc,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-calc {
    align-self: stretch !important;
    display: grid !important;
    gap: .24rem !important;
    grid-area: calc !important;
    grid-template-columns: minmax(0, 1fr) repeat(2, minmax(3rem, .16fr)) !important;
    min-height: 0 !important;
}

.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-quick-row button,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-quick-row button,
.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-calc-input,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-calc-input,
.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-calc button,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-calc button {
    height: 100% !important;
    max-height: none !important;
    min-height: 0 !important;
}

@media (min-width: 701px) {
    .tcg-counter-page.is-online-game {
        max-width: min(100vw, 780px) !important;
        width: min(100vw, 780px) !important;
    }

    .tcg-counter-page.is-online-game .tcg-counter-board,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-counter-board {
        grid-template-rows:
            minmax(13rem, 1fr)
            minmax(7.6rem, .58fr)
            minmax(15.4rem, 1.2fr)
            minmax(7.4rem, .62fr)
            0 !important;
    }

    .tcg-counter-page.is-online-game .tcg-player .tcg-player-name,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player .tcg-player-name {
        font-size: .82rem !important;
        height: 1.18rem !important;
        min-height: 1.18rem !important;
        top: .5rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-online-state,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-online-state {
        font-size: .66rem !important;
        min-height: 1.16rem !important;
        padding: .18rem .44rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-top .tcg-player-inner,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-top .tcg-player-inner {
        grid-template-rows: 1.38rem minmax(5.2rem, 1fr) !important;
        padding: .58rem .76rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-bottom .tcg-player-inner,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-player-inner {
        grid-template-rows: 1.38rem minmax(5.2rem, 1fr) 4.45rem 2.1rem !important;
        padding: .58rem .76rem !important;
        row-gap: .28rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-top .tcg-lp-display,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-top .tcg-lp-display,
    .tcg-counter-page.is-online-game .tcg-player-bottom .tcg-lp-display,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-lp-display {
        font-size: clamp(3.15rem, 7vw, 4.35rem) !important;
    }
}

@media (max-width: 700px) {
    .tcg-counter-page.is-online-game .tcg-counter-board,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-counter-board {
        grid-template-rows:
            minmax(9.4rem, 1.05fr)
            minmax(4.25rem, .46fr)
            minmax(10.1rem, 1.08fr)
            minmax(5.9rem, .7fr)
            0 !important;
    }

    .tcg-counter-page.is-online-game .tcg-player .tcg-player-name,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player .tcg-player-name {
        font-size: clamp(.58rem, 2vw, .72rem) !important;
        height: .96rem !important;
        max-width: min(38%, 8.5rem) !important;
        min-height: .96rem !important;
        min-width: 3.6rem !important;
        padding-inline: .42rem !important;
        top: .32rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-online-state,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-online-state {
        font-size: clamp(.42rem, 1.55vw, .56rem) !important;
        max-width: 5.9rem !important;
        min-height: .94rem !important;
        padding: .12rem .28rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-online-state::before,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-online-state::before {
        height: .32rem !important;
        width: .32rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-top .tcg-player-inner,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-top .tcg-player-inner {
        grid-template-columns: .46rem minmax(0, 1fr) minmax(4.4rem, auto) !important;
        grid-template-rows: 1.04rem minmax(0, 1fr) !important;
        padding: .32rem .42rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-bottom .tcg-player-inner,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-player-inner {
        grid-template-columns: .46rem minmax(0, 1fr) minmax(4.4rem, auto) !important;
        grid-template-rows: 1.04rem minmax(2.55rem, 1fr) 3.28rem 1.62rem !important;
        padding: .32rem .42rem !important;
        row-gap: .18rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-head::before,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-head::before {
        width: .38rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-top .tcg-lp-display,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-top .tcg-lp-display,
    .tcg-counter-page.is-online-game .tcg-player-bottom .tcg-lp-display,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-lp-display {
        font-size: clamp(2.08rem, 8.25vw, 2.62rem) !important;
        padding: 0 !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-bottom .tcg-quick-row,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-quick-row,
    .tcg-counter-page.is-online-game .tcg-player-bottom .tcg-calc,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-calc {
        gap: .18rem !important;
    }
}

@media (min-width: 701px) {
    .tcg-counter-page.is-online-game .tcg-counter-board,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-counter-board {
        grid-template-rows:
            minmax(13.6rem, 1.04fr)
            minmax(7.2rem, .62fr)
            minmax(14rem, 1.08fr)
            minmax(7.6rem, .72fr)
            0 !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-top .tcg-player-inner,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-top .tcg-player-inner {
        grid-template-rows: 1.1rem minmax(4.8rem, 1fr) !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-top .tcg-lp-display,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-top .tcg-lp-display {
        font-size: clamp(3.05rem, 6.7vw, 4.25rem) !important;
        padding-top: .72rem !important;
    }
}

body:has(.tcg-counter-page.is-online-game) .public-header,
body:has(.tcg-counter-page.is-online-game) .public-mobile-nav-toggle,
body:has(.tcg-counter-page.is-online-game) .public-mobile-sidebar,
body:has(.tcg-counter-page.is-online-game) .public-mobile-nav-backdrop,
.tcg-counter-page.is-online-game .tcg-counter-topbar,
.tcg-counter-page.is-online-game .tcg-mode-panel,
.tcg-counter-page.is-online-game .tcg-online-panel,
.tcg-counter-page.is-online-game .tcg-player-top .tcg-quick-row,
.tcg-counter-page.is-online-game .tcg-player-top .tcg-calc,
.tcg-counter-page.is-online-game .tcg-player-actions,
.tcg-counter-page.is-online-game .tcg-timer-actions [data-return-lobby] {
    display: none !important;
}

.tcg-counter-page.is-online-game,
.tcg-counter-page.is-online-game * {
    box-sizing: border-box !important;
}

.tcg-counter-page.is-online-game {
    --hud-bg: #020815;
    --hud-card: rgba(3, 14, 31, .9);
    --hud-card-soft: rgba(9, 25, 51, .74);
    --hud-border: rgba(102, 177, 255, .34);
    --hud-border-strong: rgba(17, 136, 255, .86);
    --hud-blue: #1688ff;
    --hud-cyan: #7dd3ff;
    --hud-gold: #ffc247;
    --hud-green: #37e784;
    --hud-red: #ff5b5b;
    --hud-text: #eff8ff;
    --hud-muted: #96acc8;
    --hud-gap: clamp(.55rem, .78vw, .8rem);
    background:
        radial-gradient(circle at 20% 0%, rgba(18, 116, 225, .18), transparent 28rem),
        radial-gradient(circle at 72% 28%, rgba(44, 186, 255, .12), transparent 34rem),
        linear-gradient(180deg, #071226 0%, #020815 64%, #01050d 100%) !important;
    color: var(--hud-text) !important;
    display: grid !important;
    font-family: "Segoe UI", Arial, sans-serif !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
    overflow: hidden !important;
    padding: var(--hud-gap) !important;
    position: relative !important;
    width: 100vw !important;
}

.tcg-counter-page.is-online-game::before {
    background-image:
        linear-gradient(rgba(125, 211, 255, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(125, 211, 255, .035) 1px, transparent 1px);
    background-size: 44px 44px;
    content: "";
    inset: 0;
    opacity: .55;
    pointer-events: none;
    position: absolute;
}

.tcg-counter-page.is-online-game button,
.tcg-counter-page.is-online-game input {
    font: inherit !important;
}

.tcg-counter-page.is-online-game .tcg-online-game-head {
    align-items: center !important;
    display: grid !important;
    gap: clamp(.6rem, 1vw, 1rem) !important;
    grid-template-columns: minmax(18rem, max-content) minmax(0, 1fr) max-content !important;
    min-height: 0 !important;
    position: relative !important;
    z-index: 2 !important;
}

.tcg-online-title-lockup {
    align-items: center;
    display: inline-flex;
    gap: .75rem;
    min-width: 0;
    text-transform: uppercase;
}

.tcg-online-title-lockup strong {
    color: #f9fcff;
    font-size: clamp(1.55rem, 2.2vw, 2.25rem);
    font-weight: 950;
    letter-spacing: .065em;
    line-height: 1;
    text-shadow: 0 0 .8rem rgba(92, 183, 255, .55);
    white-space: nowrap;
}

.tcg-online-crest {
    background:
        radial-gradient(circle at 50% 44%, rgba(190, 242, 255, .95), rgba(25, 147, 255, .42) 38%, transparent 39%),
        conic-gradient(from 45deg, transparent 0 7%, #7dd3ff 8% 13%, transparent 14% 24%, #1f9cff 25% 35%, transparent 36% 48%, #7dd3ff 49% 54%, transparent 55% 100%);
    clip-path: polygon(50% 0, 62% 24%, 92% 14%, 77% 45%, 96% 61%, 66% 67%, 50% 100%, 34% 67%, 4% 61%, 23% 45%, 8% 14%, 38% 24%);
    filter: drop-shadow(0 0 .75rem rgba(14, 165, 233, .75));
    flex: 0 0 auto;
    height: clamp(2.4rem, 3.7vw, 3.35rem);
    width: clamp(2.4rem, 3.7vw, 3.35rem);
}

.tcg-online-status-strip {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    min-width: 0;
}

.tcg-online-chip {
    align-items: center;
    background: rgba(5, 17, 36, .9);
    border: 1px solid var(--hud-border);
    border-radius: .42rem;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .035);
    color: #dcecff;
    display: inline-flex;
    font-size: clamp(.76rem, .9vw, .9rem);
    font-weight: 850;
    gap: .45rem;
    min-height: 2.45rem;
    padding: 0 .8rem;
    white-space: nowrap;
}

.tcg-online-chip svg {
    color: #a9dcff;
    height: 1rem;
    width: 1rem;
}

.tcg-online-dot {
    background: var(--hud-green);
    border-radius: 999px;
    box-shadow: 0 0 .85rem rgba(55, 231, 132, .82);
    height: .55rem;
    width: .55rem;
}

.tcg-counter-page.is-online-game .tcg-online-exit-game {
    align-items: center !important;
    background: linear-gradient(180deg, rgba(255, 194, 71, .22), rgba(255, 166, 0, .08)) !important;
    border: 1px solid rgba(255, 194, 71, .95) !important;
    border-radius: .48rem !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), 0 0 1.1rem rgba(255, 194, 71, .26) !important;
    color: #ffd36e !important;
    display: inline-flex !important;
    font-size: clamp(.8rem, .95vw, .95rem) !important;
    font-weight: 950 !important;
    gap: .55rem !important;
    justify-self: end !important;
    min-height: 2.9rem !important;
    padding: 0 1.15rem !important;
    white-space: nowrap !important;
}

.tcg-counter-page.is-online-game .tcg-counter-board {
    display: grid !important;
    gap: var(--hud-gap) !important;
    min-height: 0 !important;
    min-width: 0 !important;
    position: relative !important;
    z-index: 1 !important;
}

.tcg-counter-page.is-online-game .tcg-center-panel,
.tcg-counter-page.is-online-game .tcg-player,
.tcg-counter-page.is-online-game .tcg-history {
    background:
        linear-gradient(135deg, rgba(8, 23, 47, .94), rgba(2, 9, 21, .96)),
        radial-gradient(circle at 82% 45%, rgba(24, 107, 255, .17), transparent 21rem) !important;
    border: 1px solid var(--hud-border) !important;
    border-radius: .65rem !important;
    box-shadow:
        inset 0 0 0 1px rgba(125, 211, 252, .04),
        inset 0 0 2rem rgba(10, 88, 180, .1),
        0 .9rem 2.2rem rgba(0, 0, 0, .34) !important;
    min-height: 0 !important;
    min-width: 0 !important;
    overflow: hidden !important;
    position: relative !important;
}

.tcg-counter-page.is-online-game .tcg-center-panel::before,
.tcg-counter-page.is-online-game .tcg-player::before,
.tcg-counter-page.is-online-game .tcg-history::before {
    border: 1px solid rgba(22, 136, 255, .22);
    clip-path: polygon(0 0, 97% 0, 100% 18%, 100% 100%, 3% 100%, 0 82%);
    content: "";
    inset: .22rem;
    pointer-events: none;
    position: absolute;
}

.tcg-counter-page.is-online-game .tcg-center-panel {
    display: grid !important;
    grid-area: controls !important;
    gap: var(--hud-gap) !important;
    padding: clamp(.75rem, 1vw, 1rem) !important;
}

.tcg-counter-page.is-online-game .tcg-round-card,
.tcg-counter-page.is-online-game .tcg-tool-grid,
.tcg-counter-page.is-online-game .tcg-timer {
    background: rgba(3, 12, 27, .56) !important;
    border: 1px solid rgba(93, 161, 255, .24) !important;
    border-radius: .5rem !important;
    min-height: 0 !important;
    overflow: hidden !important;
}

.tcg-counter-page.is-online-game .tcg-round-card {
    align-items: center !important;
    display: grid !important;
    gap: .55rem !important;
    padding: .85rem !important;
}

.tcg-counter-page.is-online-game .tcg-round-card p,
.tcg-counter-page.is-online-game .tcg-timer span,
.tcg-counter-page.is-online-game .tcg-tool span:not(.tcg-dice-stage):not(.tcg-coin-stage) {
    color: #d7e9ff !important;
    font-size: clamp(.68rem, .8vw, .8rem) !important;
    font-weight: 950 !important;
    letter-spacing: .04em !important;
    line-height: 1 !important;
    margin: 0 !important;
    text-transform: uppercase !important;
}

.tcg-counter-page.is-online-game .tcg-round-card strong {
    color: #f8fbff !important;
    font-size: clamp(1rem, 1.25vw, 1.15rem) !important;
    font-weight: 900 !important;
}

.tcg-counter-page.is-online-game .tcg-reset,
.tcg-counter-page.is-online-game .tcg-timer-actions button,
.tcg-counter-page.is-online-game .tcg-quick-row button,
.tcg-counter-page.is-online-game .tcg-calc button,
.tcg-counter-page.is-online-game .tcg-calc-input,
.tcg-counter-page.is-online-game .tcg-history summary button {
    align-items: center !important;
    background: linear-gradient(180deg, rgba(10, 30, 62, .94), rgba(3, 12, 28, .94)) !important;
    border: 1px solid rgba(77, 145, 246, .36) !important;
    border-radius: .38rem !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06) !important;
    color: #ecf6ff !important;
    display: inline-flex !important;
    font-weight: 850 !important;
    justify-content: center !important;
    min-height: 2.45rem !important;
    min-width: 0 !important;
    overflow: hidden !important;
    padding: 0 .7rem !important;
    text-align: center !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.tcg-counter-page.is-online-game .tcg-reset:disabled {
    opacity: .55 !important;
}

.tcg-counter-page.is-online-game .tcg-tool-grid {
    display: grid !important;
    gap: .6rem !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    padding: .65rem !important;
}

.tcg-counter-page.is-online-game .tcg-tool {
    align-items: center !important;
    background: linear-gradient(180deg, rgba(10, 25, 50, .92), rgba(2, 10, 22, .95)) !important;
    border: 1px solid rgba(70, 139, 230, .28) !important;
    border-radius: .42rem !important;
    color: var(--hud-text) !important;
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) auto !important;
    height: 100% !important;
    justify-items: center !important;
    min-height: 0 !important;
    padding: .55rem !important;
    text-align: center !important;
}

.tcg-counter-page.is-online-game .tcg-tool > svg {
    color: #acd9ff !important;
    height: 1rem !important;
    width: 1rem !important;
}

.tcg-counter-page.is-online-game .tcg-tool strong {
    align-items: center;
    background: linear-gradient(180deg, rgba(17, 43, 80, .9), rgba(5, 16, 36, .9));
    border: 1px solid rgba(81, 157, 255, .35);
    border-radius: 999px;
    color: #d8eaff;
    display: inline-flex;
    font-size: clamp(.72rem, .85vw, .82rem);
    font-weight: 850;
    justify-content: center;
    min-height: 1.45rem;
    min-width: min(5.2rem, 88%);
    padding: 0 .65rem;
}

.tcg-counter-page.is-online-game .tcg-dice-stage,
.tcg-counter-page.is-online-game .tcg-coin-stage,
.tcg-counter-page.is-online-game .tcg-dice-cube,
.tcg-counter-page.is-online-game .tcg-dice-face,
.tcg-counter-page.is-online-game .tcg-coin-disc,
.tcg-counter-page.is-online-game .tcg-coin-face {
    height: clamp(2rem, 3vw, 3rem) !important;
    width: clamp(2rem, 3vw, 3rem) !important;
}

.tcg-counter-page.is-online-game .tcg-timer {
    align-items: center !important;
    display: grid !important;
    gap: clamp(.65rem, 1vw, 1.1rem) !important;
    padding: .85rem !important;
}

.tcg-counter-page.is-online-game .tcg-timer strong {
    color: #eef8ff !important;
    display: block !important;
    font-size: clamp(2.25rem, 4vw, 3.8rem) !important;
    font-weight: 300 !important;
    letter-spacing: .04em !important;
    line-height: 1 !important;
    text-shadow: 0 0 .4rem #fff, 0 0 1.2rem rgba(22, 136, 255, .9) !important;
}

.tcg-counter-page.is-online-game .tcg-timer-actions {
    display: grid !important;
    gap: .55rem !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    min-height: 0 !important;
}

.tcg-counter-page.is-online-game .tcg-timer-actions [data-timer-toggle] {
    background: linear-gradient(180deg, rgba(0, 104, 255, .8), rgba(8, 34, 78, .92)) !important;
    border-color: rgba(31, 164, 255, .9) !important;
    box-shadow: inset 0 0 1rem rgba(96, 165, 250, .25), 0 0 1rem rgba(22, 136, 255, .25) !important;
    color: #bfeaff !important;
}

.tcg-counter-page.is-online-game .tcg-player {
    display: flex !important;
}

.tcg-counter-page.is-online-game .tcg-player::after {
    background:
        radial-gradient(circle at 86% 52%, rgba(27, 112, 225, .34), transparent 14rem),
        linear-gradient(90deg, transparent 0%, rgba(20, 88, 190, .12) 70%, rgba(20, 88, 190, .24) 100%);
    content: "";
    inset: 0;
    opacity: .72;
    pointer-events: none;
    position: absolute;
}

.tcg-counter-page.is-online-game .tcg-player-inner {
    display: grid !important;
    gap: clamp(.6rem, 1vw, 1rem) !important;
    height: 100% !important;
    min-height: 0 !important;
    min-width: 0 !important;
    padding: clamp(.9rem, 1.55vw, 1.5rem) !important;
    position: relative !important;
    width: 100% !important;
    z-index: 1 !important;
}

.tcg-counter-page.is-online-game .tcg-player-head {
    display: grid !important;
    gap: .4rem !important;
    min-height: 0 !important;
}

.tcg-counter-page.is-online-game .tcg-player-head::before {
    background:
        radial-gradient(circle, rgba(167, 226, 255, .85), transparent 30%),
        conic-gradient(from 45deg, transparent 0 10%, #7dd3ff 12% 16%, transparent 18% 34%, #0ea5e9 36% 46%, transparent 48% 100%),
        linear-gradient(135deg, rgba(21, 174, 255, .34), rgba(6, 17, 39, .95));
    border: 1px solid rgba(44, 171, 255, .72);
    border-radius: 999px;
    box-shadow: inset 0 0 1rem rgba(125, 211, 252, .18), 0 0 1.35rem rgba(14, 165, 233, .42);
    content: "";
    display: block;
    height: clamp(4.4rem, 7.5vw, 6.9rem);
    width: clamp(4.4rem, 7.5vw, 6.9rem);
}

.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-player-head::before {
    background:
        radial-gradient(circle, rgba(222, 249, 255, .92), transparent 30%),
        conic-gradient(from 120deg, transparent 0 12%, #dff7ff 14% 18%, transparent 20% 36%, #38bdf8 38% 48%, transparent 50% 100%),
        linear-gradient(135deg, rgba(21, 174, 255, .34), rgba(6, 17, 39, .95));
}

.tcg-counter-page.is-online-game .tcg-player-name {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    color: #fff !important;
    display: block !important;
    font-size: clamp(1.45rem, 2.35vw, 2.1rem) !important;
    font-weight: 850 !important;
    height: auto !important;
    line-height: 1.05 !important;
    min-height: 0 !important;
    opacity: 1 !important;
    padding: 0 !important;
    pointer-events: none !important;
    text-align: left !important;
    text-shadow: 0 0 .8rem rgba(74, 163, 255, .42) !important;
    width: 100% !important;
}

.tcg-counter-page.is-online-game .tcg-player-head::after {
    border: 1px solid rgba(63, 155, 255, .5);
    border-radius: .42rem;
    color: #b7d8ff;
    content: "LP";
    display: inline-flex;
    font-size: .78rem;
    font-weight: 850;
    justify-content: center;
    justify-self: start;
    line-height: 1;
    padding: .28rem .55rem;
}

.tcg-counter-page.is-online-game .tcg-player-top .tcg-player-inner::before,
.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-player-inner::before {
    align-self: end;
    content: "OPPONENT";
    color: #83a4cf;
    font-size: .82rem;
    font-weight: 950;
    grid-area: role;
    letter-spacing: .08em;
    margin-bottom: -.15rem;
    text-transform: uppercase;
}

.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-player-inner::before {
    color: var(--hud-blue);
    content: "YOU";
}

.tcg-counter-page.is-online-game .tcg-lp-display {
    align-items: center !important;
    background: transparent !important;
    border: 0 !important;
    color: #f8fbff !important;
    display: flex !important;
    font-size: clamp(4rem, 7vw, 6rem) !important;
    font-weight: 300 !important;
    justify-content: center !important;
    letter-spacing: .055em !important;
    line-height: .9 !important;
    min-height: 0 !important;
    min-width: 0 !important;
    padding: 0 !important;
    text-align: center !important;
    text-shadow: 0 0 .45rem #fff, 0 0 1.15rem rgba(22, 136, 255, .94), 0 0 2.2rem rgba(22, 136, 255, .55) !important;
    width: 100% !important;
}

.tcg-counter-page.is-online-game .tcg-quick-row,
.tcg-counter-page.is-online-game .tcg-calc {
    display: grid !important;
    gap: clamp(.45rem, .75vw, .7rem) !important;
    min-height: 0 !important;
    min-width: 0 !important;
    width: 100% !important;
}

.tcg-counter-page.is-online-game .tcg-quick-row button[data-lp-delta^="-"] {
    color: var(--hud-red) !important;
}

.tcg-counter-page.is-online-game .tcg-quick-row button[data-lp-delta="100"],
.tcg-counter-page.is-online-game .tcg-quick-row button[data-lp-delta="500"],
.tcg-counter-page.is-online-game .tcg-quick-row button[data-lp-delta="1000"] {
    color: #32e982 !important;
}

.tcg-counter-page.is-online-game .tcg-calc-input {
    justify-content: flex-start !important;
    text-align: left !important;
}

.tcg-counter-page.is-online-game .tcg-history {
    display: grid !important;
    grid-area: history !important;
    grid-template-rows: auto minmax(0, 1fr) !important;
    padding: clamp(.8rem, 1vw, 1rem) !important;
}

.tcg-counter-page.is-online-game .tcg-history summary {
    align-items: center !important;
    border-bottom: 1px solid rgba(93, 161, 255, .22) !important;
    color: #ecf6ff !important;
    cursor: default !important;
    display: flex !important;
    font-size: clamp(.9rem, 1vw, 1rem) !important;
    font-weight: 950 !important;
    justify-content: space-between !important;
    line-height: 1 !important;
    margin-bottom: .7rem !important;
    min-height: 2.45rem !important;
    padding-bottom: .65rem !important;
    text-transform: uppercase !important;
}

.tcg-counter-page.is-online-game .tcg-history summary > span:first-child {
    align-items: center;
    display: inline-flex;
    gap: .45rem;
}

.tcg-counter-page.is-online-game .tcg-history summary svg {
    color: #bfeaff;
    height: 1rem;
    width: 1rem;
}

.tcg-counter-page.is-online-game .tcg-history-actions {
    align-items: center !important;
    display: inline-flex !important;
    gap: .45rem !important;
}

.tcg-counter-page.is-online-game .tcg-history summary button {
    min-height: 2rem !important;
    padding: 0 .75rem !important;
}

.tcg-counter-page.is-online-game .tcg-history ol {
    align-content: start !important;
    background: rgba(0, 6, 16, .38);
    border: 1px solid rgba(93, 161, 255, .18);
    border-radius: .45rem;
    display: grid !important;
    gap: .55rem !important;
    list-style: none !important;
    margin: 0 !important;
    min-height: 0 !important;
    overflow: auto !important;
    padding: .85rem !important;
}

.tcg-counter-page.is-online-game .tcg-history li {
    background: rgba(8, 18, 36, .68) !important;
    border: 1px solid rgba(93, 161, 255, .16) !important;
    border-left: .28rem solid var(--tcg-entry-color, var(--hud-blue)) !important;
    border-radius: .45rem !important;
    color: #f8fafc !important;
    padding: .55rem .65rem !important;
}

.tcg-counter-page.is-online-game .tcg-history li span {
    color: #8ea4bf !important;
    display: block !important;
    font-size: .75rem !important;
    margin-bottom: .25rem !important;
}

.tcg-counter-page.is-online-game .tcg-history li strong {
    display: block !important;
    font-size: .9rem !important;
    line-height: 1.25 !important;
}

@media (min-width: 981px) {
    .tcg-counter-page.is-online-game {
        grid-template-areas:
            "header"
            "board" !important;
        grid-template-rows: minmax(3.8rem, auto) minmax(0, 1fr) !important;
    }

    .tcg-counter-page.is-online-game .tcg-counter-board {
        grid-area: board !important;
        grid-template-areas:
            "controls history"
            "opponent history"
            "divider history"
            "you history"
            "footer footer" !important;
        grid-template-columns: minmax(0, 1fr) minmax(21rem, 25vw) !important;
        grid-template-rows: minmax(8.5rem, .23fr) minmax(8rem, .21fr) minmax(1.75rem, auto) minmax(13rem, .38fr) minmax(1.8rem, auto) !important;
    }

    .tcg-counter-page.is-online-game .tcg-counter-board::before {
        align-items: center;
        align-self: center;
        background: linear-gradient(90deg, transparent, rgba(22, 136, 255, .42), transparent);
        color: #1f97ff;
        content: "TURN 1 - YOUR TURN";
        display: flex;
        font-weight: 950;
        grid-area: divider;
        justify-content: center;
        letter-spacing: .08em;
        text-shadow: 0 0 .85rem rgba(22, 136, 255, .82);
    }

    .tcg-counter-page.is-online-game .tcg-counter-board::after {
        align-items: center;
        color: #a8b7ce;
        content: "Connected to duel server  |  Secure connection (TLS 1.3)";
        display: flex;
        font-size: .82rem;
        grid-area: footer;
        padding-inline: 1rem;
    }

    .tcg-counter-page.is-online-game .tcg-center-panel {
        grid-template-areas: "round tools timer" !important;
        grid-template-columns: minmax(14rem, .85fr) minmax(18rem, 1fr) minmax(24rem, 1.25fr) !important;
        grid-template-rows: minmax(0, 1fr) !important;
    }

    .tcg-counter-page.is-online-game .tcg-round-card {
        grid-area: round !important;
        grid-template-columns: minmax(0, 1fr) repeat(2, minmax(4.6rem, .72fr)) !important;
    }

    .tcg-counter-page.is-online-game .tcg-tool-grid {
        grid-area: tools !important;
    }

    .tcg-counter-page.is-online-game .tcg-timer {
        grid-area: timer !important;
        grid-template-columns: minmax(8rem, .58fr) minmax(0, 1fr) !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-top {
        grid-area: opponent !important;
        clip-path: polygon(0 0, 98% 0, 100% 16%, 100% 84%, 98% 100%, 0 100%) !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-bottom {
        border-color: rgba(22, 136, 255, .86) !important;
        box-shadow: inset 0 0 0 1px rgba(125, 211, 252, .1), 0 0 1.35rem rgba(0, 132, 255, .34) !important;
        grid-area: you !important;
        clip-path: polygon(0 0, 32% 0, 33.5% 6%, 66.5% 6%, 68% 0, 100% 0, 100% 100%, 0 100%) !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-top .tcg-player-inner,
    .tcg-counter-page.is-online-game .tcg-player-bottom .tcg-player-inner {
        align-items: center !important;
        grid-template-areas: "avatar role lp art" "avatar name lp art" "avatar badge lp art" !important;
        grid-template-columns: minmax(7rem, .16fr) minmax(13rem, .26fr) minmax(18rem, 1fr) minmax(9rem, .22fr) !important;
        grid-template-rows: minmax(0, .32fr) minmax(0, .42fr) minmax(0, .26fr) !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-bottom .tcg-player-inner {
        grid-template-areas:
            "avatar role lp art"
            "avatar name lp art"
            "avatar badge lp art"
            ". quick quick art"
            ". calc calc art" !important;
        grid-template-rows: minmax(0, .18fr) minmax(0, .24fr) minmax(0, .12fr) minmax(2.65rem, auto) minmax(2.9rem, auto) !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-head {
        display: contents !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-head::before {
        align-self: center;
        grid-area: avatar !important;
        justify-self: center;
    }

    .tcg-counter-page.is-online-game .tcg-player-head::after {
        grid-area: badge !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-name {
        align-self: start !important;
        grid-area: name !important;
    }

    .tcg-counter-page.is-online-game .tcg-lp-display {
        grid-area: lp !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-bottom .tcg-quick-row {
        grid-area: quick !important;
        grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-bottom .tcg-calc {
        grid-area: calc !important;
        grid-template-columns: minmax(0, 1fr) repeat(3, minmax(4.2rem, .15fr)) !important;
    }
}

@media (max-width: 980px) {
    body:has(.tcg-counter-page.is-online-game) {
        inset: 0 !important;
        position: fixed !important;
    }

    .tcg-counter-page.is-online-game {
        --hud-gap: clamp(.42rem, 1.4vw, .65rem);
        grid-template-areas:
            "header"
            "board" !important;
        grid-template-rows: auto minmax(0, 1fr) !important;
        height: var(--tcg-vh, 100dvh) !important;
        min-height: var(--tcg-vh, 100dvh) !important;
    }

    .tcg-counter-page.is-online-game .tcg-online-game-head {
        grid-template-areas:
            "brand exit"
            "chips chips" !important;
        grid-template-columns: minmax(0, 1fr) max-content !important;
        row-gap: .45rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-online-title-lockup {
        grid-area: brand !important;
    }

    .tcg-counter-page.is-online-game .tcg-online-title-lockup strong {
        font-size: clamp(1.05rem, 5.1vw, 1.8rem) !important;
    }

    .tcg-counter-page.is-online-game .tcg-online-crest {
        height: clamp(2rem, 8.5vw, 3rem);
        width: clamp(2rem, 8.5vw, 3rem);
    }

    .tcg-counter-page.is-online-game .tcg-online-status-strip {
        display: grid !important;
        gap: .45rem !important;
        grid-area: chips !important;
        grid-template-columns: .76fr 1.48fr .76fr !important;
    }

    .tcg-counter-page.is-online-game .tcg-online-chip {
        font-size: clamp(.7rem, 2.9vw, .88rem) !important;
        min-height: 2.45rem !important;
        overflow: hidden !important;
        padding-inline: .55rem !important;
        text-overflow: ellipsis !important;
    }

    .tcg-counter-page.is-online-game .tcg-online-exit-game {
        grid-area: exit !important;
        min-height: 2.85rem !important;
        padding-inline: .85rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-counter-board {
        grid-area: board !important;
        grid-template-areas:
            "controls"
            "opponent"
            "divider"
            "you"
            "history"
            "footer" !important;
        grid-template-columns: minmax(0, 1fr) !important;
        grid-template-rows: minmax(13rem, .3fr) minmax(7.4rem, .16fr) minmax(1.6rem, auto) minmax(16rem, .36fr) minmax(7rem, .16fr) minmax(1.4rem, auto) !important;
        height: 100% !important;
    }

    .tcg-counter-page.is-online-game .tcg-counter-board::before {
        align-items: center;
        align-self: center;
        background: linear-gradient(90deg, transparent, rgba(22, 136, 255, .56), transparent);
        color: #1f97ff;
        content: "TURN 1 - YOUR TURN";
        display: flex;
        font-size: clamp(.78rem, 3.2vw, .98rem);
        font-weight: 950;
        grid-area: divider;
        justify-content: center;
        letter-spacing: .08em;
        text-shadow: 0 0 .8rem rgba(22, 136, 255, .88);
    }

    .tcg-counter-page.is-online-game .tcg-counter-board::after {
        align-items: center;
        color: #a8b7ce;
        content: "Connected to duel server  |  Secure connection (TLS 1.3)";
        display: flex;
        font-size: clamp(.66rem, 2.4vw, .78rem);
        grid-area: footer;
        justify-content: center;
    }

    .tcg-counter-page.is-online-game .tcg-center-panel {
        grid-template-areas:
            "round round"
            "tools timer" !important;
        grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr) !important;
        grid-template-rows: minmax(3.4rem, auto) minmax(0, 1fr) !important;
        padding: .75rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-round-card {
        grid-area: round !important;
        grid-template-columns: minmax(0, 1fr) repeat(2, minmax(0, .7fr)) !important;
        padding: .65rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-tool-grid {
        grid-area: tools !important;
    }

    .tcg-counter-page.is-online-game .tcg-timer {
        grid-area: timer !important;
        grid-template-columns: minmax(0, 1fr) !important;
        grid-template-rows: auto minmax(0, 1fr) !important;
        padding: .65rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-timer strong {
        font-size: clamp(2rem, 8.5vw, 3.2rem) !important;
        text-align: center;
    }

    .tcg-counter-page.is-online-game .tcg-timer span {
        text-align: center;
    }

    .tcg-counter-page.is-online-game .tcg-reset,
    .tcg-counter-page.is-online-game .tcg-timer-actions button,
    .tcg-counter-page.is-online-game .tcg-quick-row button,
    .tcg-counter-page.is-online-game .tcg-calc button,
    .tcg-counter-page.is-online-game .tcg-calc-input {
        font-size: clamp(.78rem, 3vw, .94rem) !important;
        min-height: 0 !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-top {
        grid-area: opponent !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-bottom {
        border-color: rgba(22, 136, 255, .86) !important;
        box-shadow: inset 0 0 0 1px rgba(125, 211, 252, .1), 0 0 1.2rem rgba(0, 132, 255, .32) !important;
        grid-area: you !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-top .tcg-player-inner {
        align-items: center !important;
        grid-template-areas: "avatar role lp" "avatar name lp" "avatar badge lp" !important;
        grid-template-columns: minmax(4.6rem, .22fr) minmax(6.2rem, .34fr) minmax(0, 1fr) !important;
        grid-template-rows: minmax(0, .28fr) minmax(0, .44fr) minmax(0, .28fr) !important;
        padding: .75rem .85rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-bottom .tcg-player-inner {
        grid-template-areas:
            "avatar role lp"
            "avatar name lp"
            "avatar badge lp"
            "quick quick quick"
            "calc calc calc" !important;
        grid-template-columns: minmax(4.6rem, .22fr) minmax(6.2rem, .34fr) minmax(0, 1fr) !important;
        grid-template-rows: minmax(0, .14fr) minmax(0, .18fr) minmax(0, .12fr) minmax(5.8rem, .36fr) minmax(3.3rem, .2fr) !important;
        padding: .75rem .85rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-head {
        display: contents !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-head::before {
        align-self: center;
        grid-area: avatar !important;
        height: clamp(3.8rem, 13.5vw, 5.15rem) !important;
        justify-self: center;
        width: clamp(3.8rem, 13.5vw, 5.15rem) !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-head::after {
        grid-area: badge !important;
        font-size: .68rem !important;
        padding: .22rem .45rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-name {
        align-self: start !important;
        font-size: clamp(1.18rem, 4.8vw, 1.65rem) !important;
        grid-area: name !important;
    }

    .tcg-counter-page.is-online-game .tcg-lp-display {
        font-size: clamp(3rem, 13vw, 4.8rem) !important;
        grid-area: lp !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-bottom .tcg-quick-row {
        grid-area: quick !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        grid-template-rows: repeat(2, minmax(0, 1fr)) !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-bottom .tcg-calc {
        grid-area: calc !important;
        grid-template-columns: minmax(0, 1fr) repeat(2, minmax(2.8rem, .18fr)) !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-bottom .tcg-calc button[data-calc-action="clear"] {
        display: none !important;
    }

    .tcg-counter-page.is-online-game .tcg-history {
        grid-area: history !important;
        padding: .75rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-history summary {
        margin-bottom: .45rem !important;
        min-height: 2.1rem !important;
        padding-bottom: .4rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-history ol {
        padding: .6rem !important;
    }
}

@media (max-width: 520px) {
    .tcg-counter-page.is-online-game {
        --hud-gap: .35rem;
    }

    .tcg-counter-page.is-online-game .tcg-online-game-head {
        gap: .35rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-online-title-lockup {
        gap: .45rem;
    }

    .tcg-counter-page.is-online-game .tcg-online-title-lockup strong {
        font-size: clamp(.95rem, 4.6vw, 1.32rem) !important;
    }

    .tcg-counter-page.is-online-game .tcg-online-exit-game {
        min-height: 2.55rem !important;
        padding-inline: .7rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-online-exit-game span {
        display: none !important;
    }

    .tcg-counter-page.is-online-game .tcg-online-status-strip {
        grid-template-columns: .7fr 1.45fr .65fr !important;
    }

    .tcg-counter-page.is-online-game .tcg-online-chip {
        min-height: 2.15rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-counter-board {
        grid-template-rows: minmax(11rem, .27fr) minmax(6.8rem, .16fr) minmax(1.35rem, auto) minmax(15.5rem, .38fr) minmax(6.5rem, .16fr) minmax(1.2rem, auto) !important;
    }

    .tcg-counter-page.is-online-game .tcg-center-panel {
        grid-template-areas:
            "round"
            "timer"
            "tools" !important;
        grid-template-columns: minmax(0, 1fr) !important;
        grid-template-rows: minmax(2.25rem, auto) minmax(3.25rem, auto) minmax(0, 1fr) !important;
        padding: .45rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-round-card {
        grid-template-columns: minmax(0, 1fr) repeat(2, minmax(0, .8fr)) !important;
        padding: .45rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-round-card p {
        display: none !important;
    }

    .tcg-counter-page.is-online-game .tcg-tool-grid {
        padding: .4rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-tool {
        grid-template-columns: auto minmax(0, 1fr);
        grid-template-rows: minmax(0, 1fr);
        padding: .42rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-tool > svg,
    .tcg-counter-page.is-online-game .tcg-tool span:not(.tcg-dice-stage):not(.tcg-coin-stage) {
        display: none !important;
    }

    .tcg-counter-page.is-online-game .tcg-dice-stage,
    .tcg-counter-page.is-online-game .tcg-coin-stage,
    .tcg-counter-page.is-online-game .tcg-dice-cube,
    .tcg-counter-page.is-online-game .tcg-dice-face,
    .tcg-counter-page.is-online-game .tcg-coin-disc,
    .tcg-counter-page.is-online-game .tcg-coin-face {
        height: clamp(1.65rem, 6.4vw, 2.15rem) !important;
        width: clamp(1.65rem, 6.4vw, 2.15rem) !important;
    }

    .tcg-counter-page.is-online-game .tcg-tool strong {
        min-width: 3.5rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-timer {
        grid-template-columns: minmax(4.8rem, .62fr) minmax(0, 1fr) !important;
        grid-template-rows: minmax(0, 1fr) !important;
        padding: .45rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-timer strong {
        font-size: clamp(1.65rem, 7.2vw, 2.45rem) !important;
    }

    .tcg-counter-page.is-online-game .tcg-timer-actions {
        gap: .35rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-reset,
    .tcg-counter-page.is-online-game .tcg-timer-actions button,
    .tcg-counter-page.is-online-game .tcg-quick-row button,
    .tcg-counter-page.is-online-game .tcg-calc button,
    .tcg-counter-page.is-online-game .tcg-calc-input {
        border-radius: .34rem !important;
        font-size: clamp(.74rem, 3.15vw, .88rem) !important;
        padding-inline: .4rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-inner {
        gap: .35rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-top .tcg-player-inner {
        grid-template-columns: minmax(3.7rem, .22fr) minmax(5rem, .34fr) minmax(0, 1fr) !important;
        padding: .5rem .6rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-bottom .tcg-player-inner {
        grid-template-columns: minmax(3.7rem, .22fr) minmax(5rem, .34fr) minmax(0, 1fr) !important;
        grid-template-rows: minmax(0, .13fr) minmax(0, .16fr) minmax(0, .1fr) minmax(5.8rem, .41fr) minmax(3.05rem, .2fr) !important;
        padding: .5rem .6rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-head::before {
        height: clamp(3.2rem, 12vw, 4.2rem) !important;
        width: clamp(3.2rem, 12vw, 4.2rem) !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-name {
        font-size: clamp(1.02rem, 4.3vw, 1.42rem) !important;
    }

    .tcg-counter-page.is-online-game .tcg-lp-display {
        font-size: clamp(2.7rem, 11.8vw, 4.05rem) !important;
    }

    .tcg-counter-page.is-online-game .tcg-history summary {
        font-size: .82rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-history-actions {
        gap: .28rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-history summary button {
        min-height: 1.8rem !important;
        padding-inline: .45rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-history ol {
        gap: .35rem !important;
        padding: .45rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-history li {
        padding: .4rem .5rem !important;
    }
}

/* Unified active duel layout: every viewport uses the mobile-style stacked HUD. */
.tcg-counter-page.is-online-game,
.tcg-counter-page.is-mobile-fit.is-online-game {
    --hud-gap: clamp(.42rem, 1.4vw, .72rem) !important;
    align-content: stretch !important;
    display: grid !important;
    grid-template-areas:
        "header"
        "board" !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto minmax(0, 1fr) !important;
    height: var(--tcg-vh, 100dvh) !important;
    margin: 0 auto !important;
    max-height: var(--tcg-vh, 100dvh) !important;
    max-width: min(100vw, 430px) !important;
    min-height: var(--tcg-vh, 100dvh) !important;
    overflow: hidden !important;
    padding: var(--hud-gap) !important;
    width: 100vw !important;
}

.tcg-counter-page.is-online-game .tcg-online-game-head,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-online-game-head {
    align-items: center !important;
    display: grid !important;
    gap: .45rem !important;
    grid-area: header !important;
    grid-template-areas:
        "brand exit"
        "chips chips" !important;
    grid-template-columns: minmax(0, 1fr) max-content !important;
    margin: 0 !important;
    max-width: none !important;
    min-height: 0 !important;
    padding: 0 !important;
    width: 100% !important;
}

.tcg-counter-page.is-online-game .tcg-online-title-lockup,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-online-title-lockup {
    gap: clamp(.45rem, 1.5vw, .7rem) !important;
    grid-area: brand !important;
    min-width: 0 !important;
}

.tcg-counter-page.is-online-game .tcg-online-title-lockup strong,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-online-title-lockup strong {
    font-size: clamp(1rem, 4.5vw, 1.65rem) !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.tcg-counter-page.is-online-game .tcg-online-crest,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-online-crest {
    height: clamp(2.05rem, 7.2vw, 2.8rem) !important;
    width: clamp(2.05rem, 7.2vw, 2.8rem) !important;
}

.tcg-counter-page.is-online-game .tcg-online-status-strip,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-online-status-strip {
    display: grid !important;
    gap: .45rem !important;
    grid-area: chips !important;
    grid-template-columns: .72fr 1.48fr .72fr !important;
    width: 100% !important;
}

.tcg-counter-page.is-online-game .tcg-online-chip,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-online-chip {
    font-size: clamp(.68rem, 2.45vw, .86rem) !important;
    min-height: clamp(2.1rem, 7.4vw, 2.55rem) !important;
    overflow: hidden !important;
    padding-inline: .55rem !important;
    text-overflow: ellipsis !important;
}

.tcg-counter-page.is-online-game .tcg-online-exit-game,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-online-exit-game {
    grid-area: exit !important;
    min-height: clamp(2.45rem, 8vw, 2.95rem) !important;
    padding-inline: clamp(.7rem, 2.6vw, 1rem) !important;
}

.tcg-counter-page.is-online-game .tcg-counter-board,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-counter-board {
    display: grid !important;
    gap: var(--hud-gap) !important;
    grid-area: board !important;
    grid-template-areas:
        "controls"
        "opponent"
        "divider"
        "you"
        "history"
        "footer" !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: minmax(10.6rem, .27fr) minmax(6.5rem, .16fr) minmax(1.25rem, auto) minmax(15.2rem, .39fr) minmax(6.3rem, .16fr) minmax(1.05rem, auto) !important;
    height: 100% !important;
    margin: 0 !important;
    max-width: none !important;
    min-height: 0 !important;
    overflow: hidden !important;
    width: 100% !important;
}

.tcg-counter-page.is-online-game .tcg-counter-board::before,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-counter-board::before {
    align-items: center !important;
    align-self: stretch !important;
    background: linear-gradient(90deg, transparent, rgba(22, 136, 255, .56), transparent) !important;
    color: #1f97ff !important;
    content: "TURN 1 - YOUR TURN" !important;
    display: flex !important;
    font-size: clamp(.74rem, 2.8vw, .95rem) !important;
    font-weight: 950 !important;
    grid-area: divider !important;
    justify-content: center !important;
    letter-spacing: .08em !important;
    margin: 0 !important;
    min-height: 0 !important;
    text-shadow: 0 0 .8rem rgba(22, 136, 255, .88) !important;
}

.tcg-counter-page.is-online-game .tcg-counter-board::after,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-counter-board::after {
    align-items: center !important;
    color: #a8b7ce !important;
    content: "Connected to duel server  |  Secure connection (TLS 1.3)" !important;
    display: flex !important;
    font-size: clamp(.62rem, 2.2vw, .76rem) !important;
    grid-area: footer !important;
    justify-content: center !important;
    padding: 0 !important;
}

.tcg-counter-page.is-online-game .tcg-center-panel,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-center-panel {
    display: grid !important;
    gap: .45rem !important;
    grid-area: controls !important;
    grid-template-areas:
        "round"
        "timer"
        "tools" !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: minmax(2.2rem, auto) minmax(3.15rem, auto) minmax(0, 1fr) !important;
    min-height: 0 !important;
    order: initial !important;
    padding: .45rem !important;
}

.tcg-counter-page.is-online-game .tcg-round-card,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-round-card {
    display: grid !important;
    gap: .35rem !important;
    grid-area: round !important;
    grid-template-columns: minmax(0, 1fr) repeat(2, minmax(0, .8fr)) !important;
    min-height: 0 !important;
    padding: .45rem !important;
}

.tcg-counter-page.is-online-game .tcg-round-card p,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-round-card p {
    display: none !important;
}

.tcg-counter-page.is-online-game .tcg-tool-grid,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-tool-grid {
    display: grid !important;
    gap: .4rem !important;
    grid-area: tools !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    padding: .4rem !important;
}

.tcg-counter-page.is-online-game .tcg-tool,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-tool {
    display: grid !important;
    gap: .35rem !important;
    grid-template-columns: auto minmax(0, 1fr) !important;
    grid-template-rows: minmax(0, 1fr) !important;
    min-height: 0 !important;
    padding: .42rem !important;
}

.tcg-counter-page.is-online-game .tcg-tool > svg,
.tcg-counter-page.is-online-game .tcg-tool span:not(.tcg-dice-stage):not(.tcg-coin-stage),
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-tool > svg,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-tool span:not(.tcg-dice-stage):not(.tcg-coin-stage) {
    display: none !important;
}

.tcg-counter-page.is-online-game .tcg-dice-stage,
.tcg-counter-page.is-online-game .tcg-coin-stage,
.tcg-counter-page.is-online-game .tcg-dice-cube,
.tcg-counter-page.is-online-game .tcg-dice-face,
.tcg-counter-page.is-online-game .tcg-coin-disc,
.tcg-counter-page.is-online-game .tcg-coin-face,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-dice-stage,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-coin-stage,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-dice-cube,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-dice-face,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-coin-disc,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-coin-face {
    height: clamp(1.65rem, 5.8vw, 2.2rem) !important;
    width: clamp(1.65rem, 5.8vw, 2.2rem) !important;
}

.tcg-counter-page.is-online-game .tcg-tool strong,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-tool strong {
    min-width: 3.5rem !important;
}

.tcg-counter-page.is-online-game .tcg-timer,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-timer {
    display: grid !important;
    gap: .4rem !important;
    grid-area: timer !important;
    grid-template-columns: minmax(4.8rem, .62fr) minmax(0, 1fr) !important;
    grid-template-rows: minmax(0, 1fr) !important;
    min-height: 0 !important;
    padding: .45rem !important;
}

.tcg-counter-page.is-online-game .tcg-timer span,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-timer span {
    display: none !important;
}

.tcg-counter-page.is-online-game .tcg-timer strong,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-timer strong {
    align-self: center !important;
    font-size: clamp(1.65rem, 6.7vw, 2.55rem) !important;
    text-align: center !important;
}

.tcg-counter-page.is-online-game .tcg-timer-actions,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-timer-actions {
    display: grid !important;
    gap: .35rem !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-template-rows: repeat(2, minmax(0, 1fr)) !important;
}

.tcg-counter-page.is-online-game .tcg-reset,
.tcg-counter-page.is-online-game .tcg-timer-actions button,
.tcg-counter-page.is-online-game .tcg-quick-row button,
.tcg-counter-page.is-online-game .tcg-calc button,
.tcg-counter-page.is-online-game .tcg-calc-input,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-reset,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-timer-actions button,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-quick-row button,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-calc button,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-calc-input {
    border-radius: .34rem !important;
    font-size: clamp(.72rem, 2.85vw, .88rem) !important;
    min-height: 0 !important;
    padding-inline: .4rem !important;
}

.tcg-counter-page.is-online-game .tcg-player-top,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-top {
    grid-area: opponent !important;
    order: initial !important;
}

.tcg-counter-page.is-online-game .tcg-player-bottom,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom {
    border-color: rgba(22, 136, 255, .86) !important;
    box-shadow: inset 0 0 0 1px rgba(125, 211, 252, .1), 0 0 1.2rem rgba(0, 132, 255, .32) !important;
    grid-area: you !important;
    order: initial !important;
}

.tcg-counter-page.is-online-game .tcg-player-top .tcg-player-inner,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-top .tcg-player-inner {
    align-items: center !important;
    display: grid !important;
    gap: .35rem !important;
    grid-template-areas: "avatar role lp" "avatar name lp" "avatar badge lp" !important;
    grid-template-columns: minmax(3.7rem, .22fr) minmax(5rem, .34fr) minmax(0, 1fr) !important;
    grid-template-rows: minmax(0, .28fr) minmax(0, .44fr) minmax(0, .28fr) !important;
    height: 100% !important;
    padding: .5rem .6rem !important;
}

.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-player-inner,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-player-inner {
    display: grid !important;
    gap: .35rem !important;
    grid-template-areas:
        "avatar role lp"
        "avatar name lp"
        "avatar badge lp"
        "quick quick quick"
        "calc calc calc" !important;
    grid-template-columns: minmax(3.7rem, .22fr) minmax(5rem, .34fr) minmax(0, 1fr) !important;
    grid-template-rows: minmax(0, .13fr) minmax(0, .16fr) minmax(0, .1fr) minmax(5.6rem, .41fr) minmax(3rem, .2fr) !important;
    height: 100% !important;
    padding: .5rem .6rem !important;
}

.tcg-counter-page.is-online-game .tcg-player-head,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-head {
    display: contents !important;
}

.tcg-counter-page.is-online-game .tcg-player-head::before,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-head::before {
    align-self: center !important;
    grid-area: avatar !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .55), transparent 18%),
        linear-gradient(180deg, var(--tcg-player-color, #38bdf8), color-mix(in srgb, var(--tcg-player-color, #38bdf8) 45%, #020815)) !important;
    border: 1px solid color-mix(in srgb, var(--tcg-player-color, #38bdf8) 78%, #ffffff) !important;
    border-radius: 999px !important;
    box-shadow: 0 0 1rem var(--tcg-player-color-soft, rgba(56, 189, 248, .22)) !important;
    clip-path: none !important;
    height: 100% !important;
    justify-self: center !important;
    min-height: 3.2rem !important;
    width: clamp(.52rem, 1.8vw, .72rem) !important;
}

.tcg-counter-page.is-online-game .tcg-player-head::after,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-head::after {
    font-size: .68rem !important;
    grid-area: badge !important;
    padding: .22rem .45rem !important;
}

.tcg-counter-page.is-online-game .tcg-player-name,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-name {
    align-self: start !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    color: #fff !important;
    font-size: clamp(1.02rem, 4vw, 1.45rem) !important;
    grid-area: name !important;
    min-height: 0 !important;
    padding: 0 !important;
    text-align: left !important;
}

.tcg-counter-page.is-online-game .tcg-player-top .tcg-player-inner::before,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-top .tcg-player-inner::before,
.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-player-inner::before,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-player-inner::before {
    align-self: end !important;
    font-size: clamp(.62rem, 2.2vw, .82rem) !important;
    grid-area: role !important;
}

.tcg-counter-page.is-online-game .tcg-lp-display,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-lp-display {
    align-items: center !important;
    display: flex !important;
    font-size: clamp(2.7rem, 11vw, 4.25rem) !important;
    grid-area: lp !important;
    justify-content: center !important;
    min-height: 0 !important;
    padding: 0 !important;
}

.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-quick-row,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-quick-row {
    display: grid !important;
    gap: .38rem !important;
    grid-area: quick !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-template-rows: repeat(2, minmax(0, 1fr)) !important;
}

.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-calc,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-calc {
    display: grid !important;
    gap: .38rem !important;
    grid-area: calc !important;
    grid-template-columns: minmax(0, 1fr) repeat(2, minmax(2.8rem, .18fr)) !important;
}

.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-calc button[data-calc-action="clear"],
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-calc button[data-calc-action="clear"] {
    display: none !important;
}

.tcg-counter-page.is-online-game .tcg-history,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-history {
    display: grid !important;
    grid-area: history !important;
    grid-template-rows: auto minmax(0, 1fr) !important;
    order: initial !important;
    padding: .65rem !important;
}

.tcg-counter-page.is-online-game .tcg-history summary,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-history summary {
    font-size: clamp(.8rem, 2.6vw, .92rem) !important;
    margin-bottom: .4rem !important;
    min-height: 1.9rem !important;
    padding-bottom: .35rem !important;
}

.tcg-counter-page.is-online-game .tcg-history-actions,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-history-actions {
    gap: .28rem !important;
}

.tcg-counter-page.is-online-game .tcg-history summary button,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-history summary button {
    min-height: 1.75rem !important;
    padding-inline: .45rem !important;
}

.tcg-counter-page.is-online-game .tcg-history ol,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-history ol {
    gap: .35rem !important;
    max-height: none !important;
    padding: .45rem !important;
}

.tcg-counter-page.is-online-game .tcg-history li,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-history li {
    padding: .38rem .48rem !important;
}

.tcg-counter-page.is-online-game .tcg-history li:nth-child(n + 3),
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-history li:nth-child(n + 3) {
    display: none !important;
}

/* Compact color-only player cards. */
.tcg-counter-page.is-online-game .tcg-online-game-head,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-online-game-head {
    min-height: clamp(6.15rem, 21vw, 7.35rem) !important;
}

.tcg-counter-page.is-online-game .tcg-counter-board,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-counter-board {
    grid-template-rows: minmax(8.6rem, .24fr) minmax(5.75rem, .15fr) minmax(1.08rem, auto) minmax(13.8rem, .4fr) minmax(5.35rem, .16fr) minmax(.9rem, auto) !important;
}

.tcg-counter-page.is-online-game .tcg-center-panel,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-center-panel {
    grid-template-rows: minmax(1.95rem, auto) minmax(2.9rem, auto) minmax(0, 1fr) !important;
}

.tcg-counter-page.is-online-game .tcg-round-card > div,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-round-card > div {
    display: none !important;
}

.tcg-counter-page.is-online-game .tcg-round-card,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-round-card {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.tcg-counter-page.is-online-game .tcg-player::after,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player::after {
    display: none !important;
}

.tcg-counter-page.is-online-game .tcg-player-top .tcg-player-inner,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-top .tcg-player-inner {
    grid-template-areas:
        "avatar role lp"
        "avatar name lp"
        "avatar badge lp" !important;
    grid-template-columns: clamp(.55rem, 1.6vw, .75rem) minmax(6.8rem, .43fr) minmax(0, 1fr) !important;
    grid-template-rows: minmax(0, .28fr) minmax(0, .44fr) minmax(0, .28fr) !important;
    padding: .65rem .75rem !important;
}

.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-player-inner,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-player-inner {
    grid-template-areas:
        "avatar role lp"
        "avatar name lp"
        "avatar badge lp"
        "quick quick quick"
        "calc calc calc" !important;
    grid-template-columns: clamp(.55rem, 1.6vw, .75rem) minmax(6.8rem, .43fr) minmax(0, 1fr) !important;
    grid-template-rows: minmax(0, .12fr) minmax(0, .16fr) minmax(0, .09fr) minmax(5.3rem, .42fr) minmax(2.85rem, .21fr) !important;
    padding: .65rem .75rem !important;
}

.tcg-counter-page.is-online-game .tcg-player-name,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-name {
    align-self: center !important;
    font-size: clamp(1rem, 3.65vw, 1.28rem) !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.tcg-counter-page.is-online-game .tcg-lp-display,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-lp-display {
    font-size: clamp(2.65rem, 10.2vw, 3.65rem) !important;
    justify-content: flex-end !important;
    padding-right: .25rem !important;
    white-space: nowrap !important;
}

.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-quick-row,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-quick-row {
    gap: .42rem !important;
}

.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-quick-row button,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-quick-row button {
    min-height: 2.35rem !important;
}

.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-calc-input,
.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-calc button,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-calc-input,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-calc button {
    min-height: 2.45rem !important;
}

.tcg-counter-page.is-mobile-fit.is-online-game .tcg-counter-topbar,
.tcg-counter-page.is-online-game .tcg-counter-topbar {
    display: none !important;
    visibility: hidden !important;
}

.tcg-counter-page.is-mobile-fit.is-online-game .tcg-online-game-head span,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-online-game-head strong,
.tcg-counter-page.is-online-game .tcg-online-game-head span,
.tcg-counter-page.is-online-game .tcg-online-game-head strong {
    display: inline-flex !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.tcg-counter-page.is-mobile-fit.is-online-game .tcg-online-title-lockup strong,
.tcg-counter-page.is-online-game .tcg-online-title-lockup strong {
    display: block !important;
}

.tcg-counter-page.is-mobile-fit.is-online-game .tcg-online-chip span,
.tcg-counter-page.is-online-game .tcg-online-chip span {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.tcg-counter-page.is-mobile-fit.is-online-game .tcg-tool,
.tcg-counter-page.is-online-game .tcg-tool {
    align-items: center !important;
    grid-template-columns: minmax(2.4rem, auto) minmax(0, 1fr) !important;
}

.tcg-counter-page.is-mobile-fit.is-online-game .tcg-dice-stage,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-coin-stage,
.tcg-counter-page.is-online-game .tcg-dice-stage,
.tcg-counter-page.is-online-game .tcg-coin-stage {
    display: inline-grid !important;
    place-items: center !important;
}

.tcg-counter-page.is-mobile-fit.is-online-game .tcg-dice-cube,
.tcg-counter-page.is-online-game .tcg-dice-cube {
    background: linear-gradient(135deg, #eaf8ff, #8ed8ff 54%, #3b95ff) !important;
    border-radius: .35rem !important;
    box-shadow: 0 0 .8rem rgba(87, 190, 255, .8), inset 0 0 .55rem rgba(255, 255, 255, .82) !important;
}

.tcg-counter-page.is-mobile-fit.is-online-game .tcg-coin-disc,
.tcg-counter-page.is-online-game .tcg-coin-disc {
    background: radial-gradient(circle at 35% 30%, #fff2a8, #ffc247 45%, #b46b05 100%) !important;
    border: 1px solid #ffe28a !important;
    border-radius: 999px !important;
    box-shadow: 0 0 .85rem rgba(255, 194, 71, .75), inset 0 0 .55rem rgba(255, 255, 255, .55) !important;
}

.tcg-counter-page.is-mobile-fit.is-online-game .tcg-tool strong,
.tcg-counter-page.is-online-game .tcg-tool strong {
    justify-self: stretch !important;
}

@media (min-width: 760px) {
    .tcg-counter-page.is-online-game,
    .tcg-counter-page.is-mobile-fit.is-online-game {
        --hud-gap: .75rem !important;
        max-width: 520px !important;
        padding: .75rem !important;
    }
}

@media (max-width: 430px) {
    .tcg-counter-page.is-online-game,
    .tcg-counter-page.is-mobile-fit.is-online-game {
        --hud-gap: .32rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-online-title-lockup strong,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-online-title-lockup strong {
        font-size: clamp(.9rem, 4.2vw, 1.12rem) !important;
    }

    .tcg-counter-page.is-online-game .tcg-counter-board,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-counter-board {
        grid-template-rows: minmax(10.4rem, .26fr) minmax(6.1rem, .15fr) minmax(1.15rem, auto) minmax(14.4rem, .4fr) minmax(5.8rem, .16fr) minmax(1rem, auto) !important;
    }
}

/* Final authority: color-only compact online duel cards. */
.tcg-counter-page.is-online-game .tcg-online-game-head,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-online-game-head {
    min-height: clamp(6.2rem, 21vw, 7.35rem) !important;
}

.tcg-counter-page.is-online-game .tcg-counter-board,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-counter-board {
    grid-template-rows: minmax(8.45rem, .24fr) minmax(5.65rem, .15fr) minmax(1.05rem, auto) minmax(13.65rem, .4fr) minmax(5.25rem, .16fr) minmax(.9rem, auto) !important;
}

.tcg-counter-page.is-online-game .tcg-player::after,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player::after {
    display: none !important;
}

.tcg-counter-page.is-online-game .tcg-player-head,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-head {
    display: contents !important;
}

.tcg-counter-page.is-online-game .tcg-player-head::before,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-head::before {
    align-self: stretch !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .56), rgba(255, 255, 255, 0) 22%),
        linear-gradient(180deg, var(--tcg-player-color, #38bdf8), color-mix(in srgb, var(--tcg-player-color, #38bdf8) 42%, #020815)) !important;
    border: 1px solid color-mix(in srgb, var(--tcg-player-color, #38bdf8) 78%, #ffffff) !important;
    border-radius: 999px !important;
    box-shadow: 0 0 1rem var(--tcg-player-color-soft, rgba(56, 189, 248, .22)) !important;
    clip-path: none !important;
    grid-area: avatar !important;
    height: auto !important;
    justify-self: stretch !important;
    min-height: 0 !important;
    width: auto !important;
}

.tcg-counter-page.is-online-game .tcg-player-top .tcg-player-inner,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-top .tcg-player-inner {
    align-items: center !important;
    grid-template-areas:
        "avatar role lp"
        "avatar name lp"
        "avatar badge lp" !important;
    grid-template-columns: clamp(.5rem, 1.5vw, .7rem) minmax(6.8rem, .45fr) minmax(0, 1fr) !important;
    grid-template-rows: minmax(0, .3fr) minmax(0, .42fr) minmax(0, .28fr) !important;
    padding: .62rem .72rem !important;
}

.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-player-inner,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-player-inner {
    grid-template-areas:
        "avatar role lp"
        "avatar name lp"
        "avatar badge lp"
        "quick quick quick"
        "calc calc calc" !important;
    grid-template-columns: clamp(.5rem, 1.5vw, .7rem) minmax(6.8rem, .45fr) minmax(0, 1fr) !important;
    grid-template-rows: minmax(0, .12fr) minmax(0, .16fr) minmax(0, .09fr) minmax(5.15rem, .42fr) minmax(2.75rem, .21fr) !important;
    padding: .62rem .72rem !important;
}

.tcg-counter-page.is-online-game .tcg-player-name,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-name {
    align-self: center !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    color: #fff !important;
    font-size: clamp(.98rem, 3.45vw, 1.25rem) !important;
    font-weight: 900 !important;
    line-height: 1.05 !important;
    min-height: 0 !important;
    overflow: hidden !important;
    padding: 0 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.tcg-counter-page.is-online-game .tcg-player-top .tcg-player-inner::before,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-top .tcg-player-inner::before,
.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-player-inner::before,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-player-inner::before {
    align-self: end !important;
    font-size: clamp(.58rem, 2.1vw, .76rem) !important;
    line-height: 1 !important;
}

.tcg-counter-page.is-online-game .tcg-player-head::after,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-head::after {
    align-self: start !important;
    font-size: .64rem !important;
    grid-area: badge !important;
    padding: .18rem .42rem !important;
}

.tcg-counter-page.is-online-game .tcg-lp-display,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-lp-display {
    align-items: center !important;
    display: flex !important;
    font-size: clamp(2.55rem, 9.7vw, 3.55rem) !important;
    grid-area: lp !important;
    justify-content: flex-end !important;
    line-height: .86 !important;
    min-height: 0 !important;
    overflow: hidden !important;
    padding: 0 .2rem 0 0 !important;
    white-space: nowrap !important;
}

.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-quick-row button,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-quick-row button {
    min-height: 2.25rem !important;
}

.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-calc-input,
.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-calc button,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-calc-input,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-calc button {
    min-height: 2.35rem !important;
}

/* Final pass: give public tools more room and keep player panels compact. */
.tcg-counter-page.is-online-game .tcg-counter-board,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-counter-board {
    grid-template-rows: minmax(12.25rem, .34fr) minmax(4.55rem, .12fr) minmax(1rem, auto) minmax(11.35rem, .32fr) minmax(4.75rem, .15fr) minmax(.85rem, auto) !important;
}

.tcg-counter-page.is-online-game .tcg-center-panel,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-center-panel {
    gap: .55rem !important;
    grid-template-rows: minmax(2.45rem, auto) minmax(3.75rem, auto) minmax(5.35rem, 1fr) !important;
    padding: .52rem !important;
}

.tcg-counter-page.is-online-game .tcg-round-card,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-round-card {
    gap: .45rem !important;
    padding: .36rem !important;
}

.tcg-counter-page.is-online-game .tcg-timer,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-timer {
    gap: .45rem !important;
    grid-template-columns: minmax(5.6rem, .74fr) minmax(0, 1fr) !important;
    padding: .46rem !important;
}

.tcg-counter-page.is-online-game .tcg-timer strong,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-timer strong {
    font-size: clamp(1.8rem, 7.2vw, 2.65rem) !important;
}

.tcg-counter-page.is-online-game .tcg-tool-grid,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-tool-grid {
    gap: .5rem !important;
    height: 100% !important;
    min-height: 5.15rem !important;
    padding: .5rem !important;
}

.tcg-counter-page.is-online-game .tcg-tool,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-tool {
    align-items: center !important;
    display: flex !important;
    gap: .62rem !important;
    justify-content: center !important;
    min-height: 4.15rem !important;
    padding: .65rem .7rem !important;
}

.tcg-counter-page.is-online-game .tcg-tool > svg,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-tool > svg {
    display: none !important;
}

.tcg-counter-page.is-online-game .tcg-dice-stage,
.tcg-counter-page.is-online-game .tcg-coin-stage,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-dice-stage,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-coin-stage {
    display: inline-grid !important;
    flex: 0 0 2.55rem !important;
    height: 2.55rem !important;
    place-items: center !important;
    width: 2.55rem !important;
}

.tcg-counter-page.is-online-game .tcg-dice-stage > *,
.tcg-counter-page.is-online-game .tcg-coin-stage > *,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-dice-stage > *,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-coin-stage > * {
    display: none !important;
}

.tcg-counter-page.is-online-game .tcg-dice-stage::before,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-dice-stage::before {
    background:
        radial-gradient(circle at 28% 28%, #0b3d91 0 .13rem, transparent .15rem),
        radial-gradient(circle at 50% 50%, #0b3d91 0 .13rem, transparent .15rem),
        radial-gradient(circle at 72% 72%, #0b3d91 0 .13rem, transparent .15rem),
        linear-gradient(135deg, #f2fbff, #8fd8ff 55%, #338cff);
    border: 1px solid #c8f0ff;
    border-radius: .45rem;
    box-shadow: 0 0 .9rem rgba(87, 190, 255, .75), inset 0 0 .5rem rgba(255, 255, 255, .72);
    content: "";
    height: 2.35rem;
    transform: rotate(-6deg);
    width: 2.35rem;
}

.tcg-counter-page.is-online-game .tcg-coin-stage::before,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-coin-stage::before {
    align-items: center;
    background: radial-gradient(circle at 35% 28%, #fff2a8, #ffc247 48%, #a96608 100%);
    border: 1px solid #ffe28a;
    border-radius: 999px;
    box-shadow: 0 0 .9rem rgba(255, 194, 71, .72), inset 0 0 .55rem rgba(255, 255, 255, .5);
    color: #5a3200;
    content: "H";
    display: flex;
    font-weight: 950;
    height: 2.35rem;
    justify-content: center;
    width: 2.35rem;
}

.tcg-counter-page.is-online-game .tcg-tool strong,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-tool strong {
    align-items: center !important;
    border-radius: .4rem !important;
    display: inline-flex !important;
    flex: 1 1 auto !important;
    font-size: clamp(.9rem, 3.3vw, 1.05rem) !important;
    justify-content: center !important;
    line-height: 1 !important;
    min-height: 2.45rem !important;
    min-width: 0 !important;
    text-align: center !important;
    width: auto !important;
}

.tcg-counter-page.is-online-game .tcg-reset,
.tcg-counter-page.is-online-game .tcg-timer-actions button,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-reset,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-timer-actions button {
    font-size: clamp(.82rem, 3vw, .98rem) !important;
    min-height: 2.35rem !important;
}

.tcg-counter-page.is-online-game .tcg-player-top .tcg-player-inner,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-top .tcg-player-inner {
    grid-template-columns: clamp(.48rem, 1.35vw, .64rem) minmax(5.6rem, .42fr) minmax(0, 1fr) !important;
    padding: .48rem .66rem !important;
}

.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-player-inner,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-player-inner {
    grid-template-columns: clamp(.48rem, 1.35vw, .64rem) minmax(5.6rem, .42fr) minmax(0, 1fr) !important;
    grid-template-rows: minmax(0, .1fr) minmax(0, .15fr) minmax(0, .08fr) minmax(4.6rem, .43fr) minmax(2.45rem, .24fr) !important;
    padding: .5rem .66rem !important;
}

.tcg-counter-page.is-online-game .tcg-lp-display,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-lp-display {
    font-size: clamp(2.35rem, 8.8vw, 3.2rem) !important;
}

.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-quick-row,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-quick-row {
    gap: .36rem !important;
}

.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-quick-row button,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-quick-row button {
    min-height: 1.85rem !important;
}

.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-calc-input,
.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-calc button,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-calc-input,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-calc button {
    min-height: 1.95rem !important;
}

/* Final public controls spacing: make Reset/Undo and action buttons usable. */
.tcg-counter-page.is-online-game .tcg-center-panel,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-center-panel {
    gap: .68rem !important;
    grid-template-rows: minmax(2.85rem, auto) minmax(4.1rem, auto) minmax(5.35rem, 1fr) !important;
}

.tcg-counter-page.is-online-game .tcg-round-card,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-round-card {
    column-gap: .85rem !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    padding: .42rem !important;
}

.tcg-counter-page.is-online-game .tcg-round-card > div,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-round-card > div {
    display: none !important;
}

.tcg-counter-page.is-online-game .tcg-round-card .tcg-reset,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-round-card .tcg-reset {
    align-items: center !important;
    display: inline-flex !important;
    font-size: clamp(.9rem, 3.15vw, 1rem) !important;
    justify-content: center !important;
    min-height: 2.75rem !important;
    padding: 0 .8rem !important;
    width: 100% !important;
}

.tcg-counter-page.is-online-game .tcg-timer,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-timer {
    column-gap: .75rem !important;
    grid-template-columns: minmax(5.8rem, .7fr) minmax(0, 1fr) !important;
}

.tcg-counter-page.is-online-game .tcg-timer-actions,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-timer-actions {
    gap: .62rem !important;
}

.tcg-counter-page.is-online-game .tcg-timer-actions button,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-timer-actions button {
    align-items: center !important;
    display: inline-flex !important;
    font-size: clamp(.86rem, 3vw, .98rem) !important;
    justify-content: center !important;
    min-height: 2.55rem !important;
    padding: 0 .72rem !important;
    text-align: center !important;
}

.tcg-counter-page.is-online-game .tcg-tool-grid,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-tool-grid {
    gap: .8rem !important;
}

/* Public controls polish: keep reset/undo stable and prevent hidden room action from crowding the timer. */
.tcg-counter-page.is-online-game .tcg-timer-actions [data-return-lobby],
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-timer-actions [data-return-lobby] {
    display: none !important;
}

.tcg-counter-page.is-online-game .tcg-center-panel,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-center-panel {
    gap: .78rem !important;
    grid-template-rows: minmax(3.25rem, auto) minmax(4.35rem, auto) minmax(5.45rem, 1fr) !important;
}

.tcg-counter-page.is-online-game .tcg-round-card,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-round-card {
    align-items: stretch !important;
    column-gap: 1rem !important;
    min-height: 3.25rem !important;
    overflow: visible !important;
    padding: .48rem !important;
}

.tcg-counter-page.is-online-game .tcg-round-card .tcg-reset,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-round-card .tcg-reset {
    border-radius: .45rem !important;
    min-height: 2.35rem !important;
    padding: 0 .9rem !important;
}

.tcg-counter-page.is-online-game .tcg-timer-actions,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-timer-actions {
    column-gap: .78rem !important;
    row-gap: .62rem !important;
}

/* Public controls final alignment: give the timer buttons their own rows instead of letting them overlap. */
.tcg-counter-page.is-online-game .tcg-center-panel,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-center-panel {
    grid-template-rows: minmax(3.2rem, auto) minmax(5.35rem, auto) minmax(4.8rem, 1fr) !important;
}

.tcg-counter-page.is-online-game .tcg-timer,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-timer {
    min-height: 5.35rem !important;
    overflow: visible !important;
}

.tcg-counter-page.is-online-game .tcg-timer-actions,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-timer-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-template-rows: repeat(2, minmax(2.15rem, 1fr)) !important;
}

.tcg-counter-page.is-online-game .tcg-timer-actions button,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-timer-actions button {
    line-height: 1.05 !important;
    min-height: 2.15rem !important;
}

.tcg-counter-page.is-online-game .tcg-tool,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-tool {
    min-height: 3.72rem !important;
}

.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-player-inner,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-player-inner {
    grid-template-rows: minmax(0, .1fr) minmax(0, .13fr) minmax(0, .07fr) minmax(4.2rem, .42fr) minmax(2.35rem, .24fr) !important;
}

/* Reset/Undo are a simple action row in the mobile HUD. */
.tcg-counter-page.is-online-game .tcg-round-card,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-round-card {
    align-items: center !important;
    display: flex !important;
    gap: 1rem !important;
    height: 3.35rem !important;
    min-height: 3.35rem !important;
    padding: .48rem !important;
}

.tcg-counter-page.is-online-game .tcg-round-card .tcg-reset,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-round-card .tcg-reset {
    flex: 1 1 0 !important;
    height: 100% !important;
    min-height: 0 !important;
}

/* Compact mobile HUD header and give duel log more readable space. */
.tcg-counter-page.is-online-game .tcg-online-game-head,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-online-game-head {
    gap: .34rem !important;
    grid-template-areas:
        "brand exit"
        "chips chips" !important;
    min-height: 4.95rem !important;
}

.tcg-counter-page.is-online-game .tcg-online-title-lockup,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-online-title-lockup {
    align-items: center !important;
    justify-content: center !important;
}

.tcg-counter-page.is-online-game .tcg-online-title-lockup strong,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-online-title-lockup strong {
    font-size: clamp(1rem, 4vw, 1.28rem) !important;
    letter-spacing: .03em !important;
    line-height: 1 !important;
    text-align: center !important;
}

.tcg-counter-page.is-online-game .tcg-online-crest,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-online-crest {
    height: clamp(1.55rem, 5.8vw, 2rem) !important;
    width: clamp(1.55rem, 5.8vw, 2rem) !important;
}

.tcg-counter-page.is-online-game .tcg-online-status-strip,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-online-status-strip {
    gap: .34rem !important;
    grid-template-columns: .68fr 1.56fr .68fr !important;
}

.tcg-counter-page.is-online-game .tcg-online-chip,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-online-chip {
    font-size: clamp(.58rem, 2.05vw, .72rem) !important;
    line-height: 1 !important;
    min-height: clamp(1.55rem, 5.7vw, 1.9rem) !important;
    padding-inline: .42rem !important;
}

.tcg-counter-page.is-online-game .tcg-online-exit-game,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-online-exit-game {
    min-height: clamp(2.05rem, 7vw, 2.42rem) !important;
}

.tcg-counter-page.is-online-game .tcg-counter-board,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-counter-board {
    grid-template-rows: minmax(14.25rem, .35fr) minmax(5.35rem, .13fr) minmax(1.05rem, auto) minmax(12.9rem, .31fr) minmax(7.2rem, .18fr) minmax(.72rem, auto) !important;
}

.tcg-counter-page.is-online-game .tcg-history,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-history {
    min-height: 7.15rem !important;
}

.tcg-counter-page.is-online-game .tcg-history summary,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-history summary {
    min-height: 1.95rem !important;
    padding: .42rem .52rem .22rem !important;
}

.tcg-counter-page.is-online-game .tcg-history ol,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-history ol {
    gap: .3rem !important;
    padding: .28rem .55rem .5rem !important;
}

.tcg-counter-page.is-online-game .tcg-history li,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-history li {
    min-height: 1.3rem !important;
    padding: .28rem .42rem !important;
}

.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-quick-row button,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-quick-row button,
.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-calc-input,
.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-calc button,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-calc-input,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-calc button {
    min-height: 1.82rem !important;
}

.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-calc,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-calc {
    gap: .35rem !important;
}

/* Header centering and compact amount controls. */
.tcg-counter-page.is-online-game .tcg-online-game-head,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-online-game-head {
    grid-template-areas:
        "brand brand"
        "chips chips" !important;
    grid-template-columns: minmax(0, 1fr) !important;
    position: relative !important;
}

.tcg-counter-page.is-online-game .tcg-online-title-lockup,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-online-title-lockup {
    display: flex !important;
    grid-area: brand !important;
    justify-content: center !important;
    min-height: 1.8rem !important;
    padding: 0 6.6rem 0 2.4rem !important;
    position: relative !important;
    width: 100% !important;
}

.tcg-counter-page.is-online-game .tcg-online-crest,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-online-crest {
    left: .55rem !important;
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
}

.tcg-counter-page.is-online-game .tcg-online-exit-game,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-online-exit-game {
    position: absolute !important;
    right: 0 !important;
    top: 0 !important;
    z-index: 2 !important;
}

.tcg-counter-page.is-online-game .tcg-online-status-strip,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-online-status-strip {
    margin-top: .06rem !important;
}

.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-calc,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-calc {
    grid-template-columns: minmax(0, 1fr) 3.15rem 3.15rem !important;
    min-height: 2.45rem !important;
}

.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-calc-input,
.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-calc button,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-calc-input,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-calc button {
    height: 2.45rem !important;
    max-height: 2.45rem !important;
    min-height: 2.45rem !important;
}

/* User requested final compact HUD: smaller title, no mode chip, less dead space before log. */
.tcg-counter-page.is-online-game,
.tcg-counter-page.is-mobile-fit.is-online-game {
    --hud-gap: .28rem !important;
}

.tcg-counter-page.is-online-game .tcg-online-game-head,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-online-game-head {
    gap: .18rem !important;
    min-height: 3.82rem !important;
}

.tcg-counter-page.is-online-game .tcg-online-title-lockup,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-online-title-lockup {
    min-height: 1.45rem !important;
    padding: 0 6.1rem 0 2.1rem !important;
}

.tcg-counter-page.is-online-game .tcg-online-title-lockup strong,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-online-title-lockup strong {
    font-size: clamp(.86rem, 3.45vw, 1.05rem) !important;
}

.tcg-counter-page.is-online-game .tcg-online-crest,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-online-crest {
    background-size: cover !important;
    border-radius: .32rem !important;
    height: 1.45rem !important;
    object-fit: contain !important;
    width: 1.45rem !important;
}

.tcg-counter-page.is-online-game .tcg-online-exit-game,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-online-exit-game {
    border-radius: .45rem !important;
    font-size: clamp(.7rem, 2.55vw, .82rem) !important;
    min-height: 1.85rem !important;
    padding-inline: .64rem !important;
}

.tcg-counter-page.is-online-game .tcg-online-status-strip,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-online-status-strip {
    grid-template-columns: minmax(0, .62fr) minmax(0, 1.38fr) !important;
    margin-top: 0 !important;
}

.tcg-counter-page.is-online-game .tcg-online-chip,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-online-chip {
    font-size: clamp(.53rem, 1.92vw, .66rem) !important;
    min-height: 1.42rem !important;
    padding-inline: .34rem !important;
}

.tcg-counter-page.is-online-game .tcg-counter-board,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-counter-board {
    gap: .32rem !important;
    grid-template-rows: minmax(14.05rem, .37fr) minmax(5.05rem, .13fr) minmax(.68rem, auto) minmax(10.5rem, .28fr) minmax(7.7rem, .2fr) minmax(.58rem, auto) !important;
}

.tcg-counter-page.is-online-game .tcg-counter-board::before,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-counter-board::before {
    font-size: clamp(.58rem, 2.1vw, .74rem) !important;
    letter-spacing: .055em !important;
}

.tcg-counter-page.is-online-game .tcg-player-bottom,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom {
    min-height: 0 !important;
}

.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-player-inner,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-player-inner {
    grid-template-rows: minmax(0, .1fr) minmax(0, .12fr) minmax(0, .04fr) minmax(3.75rem, .4fr) minmax(2.25rem, .22fr) !important;
    padding: .42rem .58rem !important;
}

.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-quick-row button,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-quick-row button,
.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-calc-input,
.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-calc button,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-calc-input,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-calc button {
    height: 2.25rem !important;
    max-height: 2.25rem !important;
    min-height: 2.25rem !important;
}

.tcg-counter-page.is-online-game .tcg-history,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-history {
    min-height: 7.65rem !important;
}

/* Layout audit pass: remove dead rows, tighten rhythm, and let the log breathe. */
.tcg-counter-page.is-online-game,
.tcg-counter-page.is-mobile-fit.is-online-game {
    --hud-gap: .24rem !important;
    padding: .24rem !important;
}

.tcg-counter-page.is-online-game .tcg-online-game-head,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-online-game-head {
    gap: .14rem !important;
    min-height: 3.38rem !important;
}

.tcg-counter-page.is-online-game .tcg-online-title-lockup,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-online-title-lockup {
    min-height: 1.28rem !important;
    padding: 0 5.8rem 0 1.95rem !important;
}

.tcg-counter-page.is-online-game .tcg-online-title-lockup strong,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-online-title-lockup strong {
    font-size: clamp(.78rem, 3.15vw, .96rem) !important;
}

.tcg-counter-page.is-online-game .tcg-online-crest,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-online-crest {
    height: 1.25rem !important;
    left: .48rem !important;
    width: 1.25rem !important;
}

.tcg-counter-page.is-online-game .tcg-online-exit-game,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-online-exit-game {
    font-size: clamp(.62rem, 2.28vw, .74rem) !important;
    min-height: 1.62rem !important;
    padding-inline: .52rem !important;
}

.tcg-counter-page.is-online-game .tcg-online-status-strip,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-online-status-strip {
    gap: .24rem !important;
    grid-template-columns: minmax(0, .58fr) minmax(0, 1.42fr) !important;
}

.tcg-counter-page.is-online-game .tcg-online-chip,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-online-chip {
    border-radius: .28rem !important;
    font-size: clamp(.49rem, 1.78vw, .6rem) !important;
    min-height: 1.22rem !important;
    padding-inline: .28rem !important;
}

.tcg-counter-page.is-online-game .tcg-counter-board,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-counter-board {
    gap: .28rem !important;
    grid-template-areas:
        "controls"
        "opponent"
        "you"
        "history"
        "footer" !important;
    grid-template-rows: clamp(12.25rem, 25.2vh, 13.8rem) clamp(4.55rem, 9.6vh, 5.2rem) clamp(12.05rem, 24.2vh, 13.25rem) minmax(8.5rem, 1fr) .55rem !important;
}

.tcg-counter-page.is-online-game .tcg-counter-board::before,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-counter-board::before {
    display: none !important;
}

.tcg-counter-page.is-online-game .tcg-center-panel,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-center-panel {
    gap: .42rem !important;
    grid-template-rows: 2.65rem 4.45rem minmax(0, 1fr) !important;
    padding: .38rem !important;
}

.tcg-counter-page.is-online-game .tcg-round-card,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-round-card {
    height: 2.65rem !important;
    min-height: 2.65rem !important;
    padding: .36rem !important;
}

.tcg-counter-page.is-online-game .tcg-timer,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-timer {
    min-height: 4.45rem !important;
    padding: .38rem !important;
}

.tcg-counter-page.is-online-game .tcg-timer strong,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-timer strong {
    font-size: clamp(1.55rem, 6vw, 2.2rem) !important;
}

.tcg-counter-page.is-online-game .tcg-timer-actions,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-timer-actions {
    column-gap: .48rem !important;
    grid-template-rows: repeat(2, minmax(1.72rem, 1fr)) !important;
    row-gap: .4rem !important;
}

.tcg-counter-page.is-online-game .tcg-timer-actions button,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-timer-actions button {
    min-height: 1.72rem !important;
}

.tcg-counter-page.is-online-game .tcg-tool-grid,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-tool-grid {
    gap: .5rem !important;
    min-height: 0 !important;
    padding: .38rem !important;
}

.tcg-counter-page.is-online-game .tcg-tool,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-tool {
    min-height: 3.15rem !important;
    padding: .38rem .5rem !important;
}

.tcg-counter-page.is-online-game .tcg-player-top .tcg-player-inner,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-top .tcg-player-inner {
    padding: .4rem .58rem !important;
}

.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-player-inner,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-player-inner {
    grid-template-rows: minmax(0, .08fr) minmax(0, .1fr) minmax(0, .03fr) minmax(3.6rem, .39fr) minmax(2.18rem, .2fr) !important;
    padding: .38rem .54rem !important;
}

.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-quick-row,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-quick-row {
    gap: .3rem !important;
}

.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-quick-row button,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-quick-row button,
.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-calc-input,
.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-calc button,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-calc-input,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-calc button {
    height: 2.12rem !important;
    max-height: 2.12rem !important;
    min-height: 2.12rem !important;
}

.tcg-counter-page.is-online-game .tcg-history,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-history {
    min-height: 0 !important;
}

.tcg-counter-page.is-online-game .tcg-history summary,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-history summary {
    min-height: 1.7rem !important;
    padding: .34rem .5rem .18rem !important;
}

.tcg-counter-page.is-online-game .tcg-history ol,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-history ol {
    padding: .24rem .5rem .42rem !important;
}

/* Bottom player panel reflow: color stripe, clear identity row, centered LP, then controls. */
.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-player-inner,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-player-inner {
    column-gap: .42rem !important;
    grid-template-areas:
        "avatar role name"
        "avatar badge lp"
        "avatar . lp"
        "quick quick quick"
        "calc calc calc" !important;
    grid-template-columns: .55rem minmax(3.7rem, .28fr) minmax(0, 1fr) !important;
    grid-template-rows: minmax(.8rem, .09fr) minmax(1.15rem, .14fr) minmax(2.85rem, .25fr) minmax(4.35rem, .34fr) minmax(2.12rem, .18fr) !important;
    row-gap: .3rem !important;
}

.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-player-inner::before,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-player-inner::before {
    align-self: center !important;
    justify-self: start !important;
}

.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-player-name,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-player-name {
    align-self: center !important;
    font-size: clamp(.76rem, 2.8vw, .95rem) !important;
}

.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-player-head::after,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-player-head::after {
    align-self: start !important;
    justify-self: start !important;
}

.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-lp-display,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-lp-display {
    align-self: center !important;
    font-size: clamp(2.9rem, 12vw, 3.75rem) !important;
    justify-content: center !important;
    line-height: .82 !important;
}

/* Alignment pass: one visual centerline for controls, players, and log header. */
.tcg-counter-page.is-online-game .tcg-online-chip,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-online-chip {
    align-items: center !important;
    display: inline-flex !important;
    justify-content: center !important;
    text-align: center !important;
}

.tcg-counter-page.is-online-game .tcg-center-panel,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-center-panel {
    align-items: stretch !important;
}

.tcg-counter-page.is-online-game .tcg-round-card .tcg-reset,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-round-card .tcg-reset,
.tcg-counter-page.is-online-game .tcg-timer-actions button,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-timer-actions button {
    align-items: center !important;
    display: inline-flex !important;
    justify-content: center !important;
    line-height: 1 !important;
    text-align: center !important;
}

.tcg-counter-page.is-online-game .tcg-timer,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-timer {
    align-items: center !important;
    column-gap: .52rem !important;
    grid-template-columns: minmax(7.2rem, .78fr) minmax(0, 1.22fr) !important;
}

.tcg-counter-page.is-online-game .tcg-timer > div:first-child,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-timer > div:first-child {
    align-items: center !important;
    display: flex !important;
    height: 100% !important;
    justify-content: center !important;
    min-width: 0 !important;
}

.tcg-counter-page.is-online-game .tcg-timer-actions,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-timer-actions {
    align-items: stretch !important;
}

.tcg-counter-page.is-online-game .tcg-tool,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-tool {
    align-items: center !important;
    display: grid !important;
    grid-template-columns: 2.85rem minmax(0, 1fr) !important;
    justify-items: center !important;
}

.tcg-counter-page.is-online-game .tcg-dice-stage,
.tcg-counter-page.is-online-game .tcg-coin-stage,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-dice-stage,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-coin-stage {
    justify-self: center !important;
}

.tcg-counter-page.is-online-game .tcg-tool strong,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-tool strong {
    height: 2.08rem !important;
    justify-self: stretch !important;
    min-height: 2.08rem !important;
    width: 100% !important;
}

.tcg-counter-page.is-online-game .tcg-player-top .tcg-player-inner,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-top .tcg-player-inner {
    column-gap: .42rem !important;
    grid-template-areas:
        "avatar role name badge"
        "avatar lp lp lp" !important;
    grid-template-columns: .55rem auto minmax(0, 1fr) auto !important;
    grid-template-rows: 1.15rem minmax(0, 1fr) !important;
    row-gap: .22rem !important;
}

.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-player-inner,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-player-inner {
    column-gap: .42rem !important;
    grid-template-areas:
        "avatar role name badge"
        "avatar lp lp lp"
        "quick quick quick quick"
        "calc calc calc calc" !important;
    grid-template-columns: .55rem auto minmax(0, 1fr) auto !important;
    grid-template-rows: 1.1rem minmax(3.55rem, 1fr) 4.32rem 2.12rem !important;
    row-gap: .32rem !important;
}

.tcg-counter-page.is-online-game .tcg-player-top .tcg-player-inner::before,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-top .tcg-player-inner::before,
.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-player-inner::before,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-player-inner::before {
    align-self: center !important;
    line-height: 1 !important;
}

.tcg-counter-page.is-online-game .tcg-player-name,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-name {
    align-self: center !important;
    line-height: 1 !important;
}

.tcg-counter-page.is-online-game .tcg-player-head::after,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-head::after {
    align-self: center !important;
    justify-self: end !important;
    line-height: 1 !important;
}

.tcg-counter-page.is-online-game .tcg-lp-display,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-lp-display {
    align-self: center !important;
    justify-self: stretch !important;
    text-align: center !important;
}

.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-quick-row,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-quick-row,
.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-calc,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-calc {
    align-items: stretch !important;
}

.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-quick-row button,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-quick-row button,
.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-calc-input,
.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-calc button,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-calc-input,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-calc button {
    align-items: center !important;
    display: flex !important;
    justify-content: center !important;
}

.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-calc-input,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-calc-input {
    justify-content: flex-start !important;
}

.tcg-counter-page.is-online-game .tcg-history summary,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-history summary {
    align-items: center !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
}

.tcg-counter-page.is-online-game .tcg-history summary > span:first-child,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-history summary > span:first-child,
.tcg-counter-page.is-online-game .tcg-history-actions,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-history-actions {
    align-items: center !important;
    display: inline-flex !important;
}

/* Visual centering refinement: true centered title and readable player meta rows. */
.tcg-counter-page.is-online-game .tcg-online-title-lockup,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-online-title-lockup {
    justify-content: center !important;
    padding-inline: 2.2rem 5.9rem !important;
}

.tcg-counter-page.is-online-game .tcg-online-title-lockup strong,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-online-title-lockup strong {
    left: 50% !important;
    position: absolute !important;
    transform: translateX(-50%) !important;
    white-space: nowrap !important;
}

.tcg-counter-page.is-online-game .tcg-player-top .tcg-player-inner,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-top .tcg-player-inner {
    grid-template-areas:
        "avatar role name . badge"
        "avatar lp lp lp lp" !important;
    grid-template-columns: .55rem auto auto minmax(0, 1fr) auto !important;
}

.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-player-inner,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-player-inner {
    grid-template-areas:
        "avatar role name . badge"
        "avatar lp lp lp lp"
        "quick quick quick quick quick"
        "calc calc calc calc calc" !important;
    grid-template-columns: .55rem auto auto minmax(0, 1fr) auto !important;
}

.tcg-counter-page.is-online-game .tcg-player-top .tcg-player-inner::before,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-top .tcg-player-inner::before,
.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-player-inner::before,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-player-inner::before {
    justify-self: start !important;
}

.tcg-counter-page.is-online-game .tcg-player-name,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-name {
    justify-self: start !important;
    max-width: 8.5rem !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.tcg-counter-page.is-online-game .tcg-player-head::after,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-head::after {
    margin-left: .4rem !important;
}

/* Dice and coin controls should fill the tool row vertically while keeping content centered. */
.tcg-counter-page.is-online-game .tcg-tool-grid,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-tool-grid {
    align-items: stretch !important;
    grid-auto-rows: minmax(0, 1fr) !important;
}

.tcg-counter-page.is-online-game .tcg-tool,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-tool {
    align-self: stretch !important;
    height: 100% !important;
    min-height: 0 !important;
}

.tcg-counter-page.is-online-game .tcg-dice-stage,
.tcg-counter-page.is-online-game .tcg-coin-stage,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-dice-stage,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-coin-stage {
    align-self: center !important;
}

.tcg-counter-page.is-online-game .tcg-tool strong,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-tool strong {
    align-self: center !important;
}

/* Use the same storefront logo source as the home page in the online game header. */
.tcg-counter-page.is-online-game img.tcg-online-crest,
.tcg-counter-page.is-mobile-fit.is-online-game img.tcg-online-crest,
.tcg-counter-page.is-online-game .tcg-online-logo-rotator,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-online-logo-rotator,
.tcg-counter-page.is-online-game .tcg-online-logo-letter,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-online-logo-letter {
    background: linear-gradient(135deg, rgba(255, 255, 255, .08), rgba(22, 136, 255, .18)) !important;
    border: 1px solid rgba(125, 211, 255, .42) !important;
    border-radius: .34rem !important;
    clip-path: none !important;
    filter: drop-shadow(0 0 .45rem rgba(14, 165, 233, .55)) !important;
    overflow: hidden !important;
}

.tcg-counter-page.is-online-game img.tcg-online-crest,
.tcg-counter-page.is-mobile-fit.is-online-game img.tcg-online-crest {
    object-fit: contain !important;
    padding: .08rem !important;
}

.tcg-counter-page.is-online-game .tcg-online-logo-rotator,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-online-logo-rotator {
    display: block !important;
    position: absolute !important;
}

.tcg-counter-page.is-online-game .tcg-online-logo-slide,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-online-logo-slide {
    align-items: center !important;
    display: flex !important;
    inset: 0 !important;
    justify-content: center !important;
    opacity: 0 !important;
    position: absolute !important;
    transition: opacity .28s ease !important;
}

.tcg-counter-page.is-online-game .tcg-online-logo-slide.is-active,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-online-logo-slide.is-active {
    opacity: 1 !important;
}

.tcg-counter-page.is-online-game .tcg-online-logo-slide img,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-online-logo-slide img {
    display: block !important;
    height: 100% !important;
    max-width: 100% !important;
    object-fit: contain !important;
    padding: .08rem !important;
    width: 100% !important;
}

.tcg-counter-page.is-online-game .tcg-online-logo-letter,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-online-logo-letter,
.tcg-counter-page.is-online-game .tcg-online-logo-slide .brand-logo-letter,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-online-logo-slide .brand-logo-letter {
    align-items: center !important;
    color: #07111f !important;
    display: flex !important;
    font-size: .78rem !important;
    font-weight: 950 !important;
    justify-content: center !important;
}

.tcg-counter-page.is-online-game .tcg-online-logo-slide .brand-logo-letter,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-online-logo-slide .brand-logo-letter {
    background: #ffb833 !important;
    border-radius: .22rem !important;
    height: 100% !important;
    width: 100% !important;
}

/* Exit/regression fix: keep online duel cards clean on desktop and above mobile browser chrome. */
.tcg-counter-page.is-online-game {
    margin-inline: auto !important;
    max-width: min(100vw, 520px) !important;
}

.tcg-counter-page.is-online-game .tcg-player,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player,
.tcg-counter-page.is-online-game .tcg-player-top,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-top,
.tcg-counter-page.is-online-game .tcg-player-bottom,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom {
    clip-path: none !important;
    overflow: hidden !important;
}

.tcg-counter-page.is-online-game .tcg-player::before,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player::before,
.tcg-counter-page.is-online-game .tcg-player::after,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player::after {
    display: none !important;
}

.tcg-counter-page.is-online-game .tcg-lp-display,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-lp-display {
    align-items: center !important;
    display: flex !important;
    font-variant-numeric: tabular-nums !important;
    justify-content: center !important;
    letter-spacing: .02em !important;
    line-height: .82 !important;
    overflow: visible !important;
    place-self: center stretch !important;
    text-align: center !important;
    white-space: nowrap !important;
}

.tcg-counter-page.is-online-game .tcg-player-top .tcg-lp-display,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-top .tcg-lp-display {
    font-size: clamp(2.65rem, 10.4vw, 3.85rem) !important;
}

.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-lp-display,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-lp-display {
    font-size: clamp(2.75rem, 11vw, 3.9rem) !important;
}

@media (max-width: 700px) {
    .tcg-counter-page.is-online-game,
    .tcg-counter-page.is-mobile-fit.is-online-game {
        --tcg-bottom-browser-safe: max(4.65rem, env(safe-area-inset-bottom, 0px)) !important;
        height: var(--tcg-vh, 100dvh) !important;
        min-height: var(--tcg-vh, 100dvh) !important;
        padding-bottom: var(--tcg-bottom-browser-safe) !important;
    }

    .tcg-counter-page.is-online-game .tcg-counter-board,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-counter-board {
        grid-template-rows: clamp(11.75rem, 25vh, 13.2rem) clamp(4.35rem, 9vh, 4.95rem) clamp(11.55rem, 23vh, 12.8rem) minmax(6.85rem, 1fr) 0 !important;
    }

    .tcg-counter-page.is-online-game .tcg-counter-board::after,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-counter-board::after {
        display: none !important;
    }
}

/* Final alignment pass: player names stay centered on the LP axis, independent of side labels. */
.tcg-counter-page.is-online-game .tcg-player .tcg-player-inner,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player .tcg-player-inner {
    position: relative !important;
}

.tcg-counter-page.is-online-game .tcg-player .tcg-player-name,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player .tcg-player-name {
    background: rgba(3, 12, 30, .44) !important;
    border: 1px solid rgba(125, 211, 252, .16) !important;
    border-radius: 999px !important;
    box-sizing: border-box !important;
    box-shadow: 0 0 .75rem rgba(56, 189, 248, .1) !important;
    color: #fff !important;
    display: flex !important;
    font-size: clamp(.68rem, 2.1vw, .82rem) !important;
    font-weight: 950 !important;
    grid-area: 1 / 1 / 2 / -1 !important;
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
    height: 1rem !important;
    align-items: center !important;
    justify-content: center !important;
    justify-self: stretch !important;
    left: 50% !important;
    line-height: 1 !important;
    margin: 0 !important;
    max-height: 1rem !important;
    max-width: min(58%, 13rem) !important;
    min-height: 1rem !important;
    min-width: 4.2rem !important;
    overflow: hidden !important;
    padding: .2rem .62rem !important;
    pointer-events: none !important;
    position: absolute !important;
    right: auto !important;
    text-align: center !important;
    text-overflow: ellipsis !important;
    top: .12rem !important;
    transform: translateX(-50%) !important;
    white-space: nowrap !important;
    z-index: 4 !important;
}

.tcg-counter-page.is-online-game .tcg-player .tcg-lp-display,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player .tcg-lp-display {
    padding-top: 1.18rem !important;
}

.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-lp-display,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-lp-display {
    padding-top: 1.02rem !important;
}

.tcg-counter-page.is-online-game .tcg-player-top .tcg-lp-display,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-top .tcg-lp-display {
    font-size: clamp(2.25rem, 8.8vw, 2.85rem) !important;
}

.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-lp-display,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-lp-display {
    font-size: clamp(2.35rem, 9.2vw, 3.05rem) !important;
}

/* Mobile browser chrome fix: lay out inside the real visible height, not behind the bottom toolbar. */
@media (max-width: 700px) {
    html:has(.tcg-counter-page.is-online-game),
    body:has(.tcg-counter-page.is-online-game) {
        height: var(--tcg-safe-vh, var(--tcg-vh, 100dvh)) !important;
        max-height: var(--tcg-safe-vh, var(--tcg-vh, 100dvh)) !important;
        min-height: var(--tcg-safe-vh, var(--tcg-vh, 100dvh)) !important;
        overflow: hidden !important;
    }

    .tcg-counter-page.is-online-game,
    .tcg-counter-page.is-mobile-fit.is-online-game {
        box-sizing: border-box !important;
        height: var(--tcg-safe-vh, var(--tcg-vh, 100dvh)) !important;
        max-height: var(--tcg-safe-vh, var(--tcg-vh, 100dvh)) !important;
        min-height: var(--tcg-safe-vh, var(--tcg-vh, 100dvh)) !important;
        overflow: hidden !important;
        padding-bottom: .25rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-online-game-head,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-online-game-head {
        margin-bottom: .22rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-counter-board,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-counter-board {
        gap: .24rem !important;
        grid-template-rows:
            minmax(9.15rem, 1.42fr)
            minmax(3.55rem, .46fr)
            minmax(10.55rem, 1.52fr)
            minmax(4.75rem, .8fr)
            0 !important;
        min-height: 0 !important;
        overflow: hidden !important;
    }

    .tcg-counter-page.is-online-game .tcg-center-panel,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-center-panel {
        gap: .3rem !important;
        grid-template-rows: 2.32rem 3.72rem minmax(0, 1fr) !important;
        padding: .28rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-round-card,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-round-card {
        height: 2.32rem !important;
        min-height: 2.32rem !important;
        padding: .28rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-timer,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-timer {
        min-height: 3.72rem !important;
        padding: .26rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-timer strong,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-timer strong {
        font-size: clamp(1.32rem, 5.2vw, 1.9rem) !important;
    }

    .tcg-counter-page.is-online-game .tcg-timer-actions,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-timer-actions {
        gap: .28rem !important;
        grid-template-rows: repeat(2, minmax(1.42rem, 1fr)) !important;
    }

    .tcg-counter-page.is-online-game .tcg-timer-actions button,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-timer-actions button {
        min-height: 1.42rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-tool-grid,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-tool-grid {
        gap: .32rem !important;
        padding: .28rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-tool,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-tool {
        min-height: 2.45rem !important;
        padding: .24rem .35rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-dice-stage,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-dice-stage,
    .tcg-counter-page.is-online-game .tcg-coin-stage,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-coin-stage {
        transform: scale(.86) !important;
        transform-origin: center !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-top .tcg-player-inner,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-top .tcg-player-inner {
        padding: .34rem .52rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-bottom .tcg-player-inner,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-player-inner {
        grid-template-rows: 1rem minmax(2.95rem, 1fr) 3.85rem 1.72rem !important;
        padding: .34rem .48rem !important;
        row-gap: .22rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-bottom .tcg-quick-row,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-quick-row {
        gap: .24rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-bottom .tcg-quick-row button,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-quick-row button,
    .tcg-counter-page.is-online-game .tcg-player-bottom .tcg-calc-input,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-calc-input,
    .tcg-counter-page.is-online-game .tcg-player-bottom .tcg-calc button,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-calc button {
        height: 1.72rem !important;
        max-height: 1.72rem !important;
        min-height: 1.72rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-history summary,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-history summary {
        min-height: 1.5rem !important;
        padding: .24rem .42rem .12rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-history ol,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-history ol {
        padding: .18rem .42rem .28rem !important;
    }
}

/* Online presence and final scale pass. Keep this block last so earlier experimental sizing cannot win. */
.tcg-counter-page.is-online-game .tcg-player-online-state,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-online-state {
    align-items: center !important;
    background: rgba(4, 18, 38, .82) !important;
    border: 1px solid rgba(55, 231, 132, .42) !important;
    border-radius: 999px !important;
    box-shadow: 0 0 .65rem rgba(55, 231, 132, .14) !important;
    color: #b7ffd7 !important;
    display: inline-flex !important;
    font-size: clamp(.48rem, 1.7vw, .68rem) !important;
    font-weight: 950 !important;
    gap: .24rem !important;
    left: .92rem !important;
    letter-spacing: .045em !important;
    line-height: 1 !important;
    max-width: 8.6rem !important;
    min-height: .92rem !important;
    overflow: hidden !important;
    padding: .14rem .38rem !important;
    position: absolute !important;
    text-overflow: ellipsis !important;
    text-transform: uppercase !important;
    top: 1.2rem !important;
    white-space: nowrap !important;
    z-index: 6 !important;
}

.tcg-counter-page.is-online-game .tcg-player-online-state::before,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-online-state::before {
    background: #37e784 !important;
    border-radius: 999px !important;
    box-shadow: 0 0 .55rem rgba(55, 231, 132, .8) !important;
    content: "" !important;
    flex: 0 0 auto !important;
    height: .42rem !important;
    width: .42rem !important;
}

.tcg-counter-page.is-online-game .tcg-player.is-player-offline,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player.is-player-offline {
    border-color: rgba(255, 194, 71, .68) !important;
    box-shadow: inset 0 0 0 1px rgba(255, 194, 71, .08), 0 0 1.2rem rgba(255, 194, 71, .16) !important;
}

.tcg-counter-page.is-online-game .tcg-player.is-player-offline .tcg-player-online-state,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player.is-player-offline .tcg-player-online-state {
    background: rgba(42, 26, 4, .86) !important;
    border-color: rgba(255, 194, 71, .58) !important;
    box-shadow: 0 0 .75rem rgba(255, 194, 71, .18) !important;
    color: #ffd36e !important;
}

.tcg-counter-page.is-online-game .tcg-player.is-player-offline .tcg-player-online-state::before,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player.is-player-offline .tcg-player-online-state::before {
    background: #ffc247 !important;
    box-shadow: 0 0 .6rem rgba(255, 194, 71, .8) !important;
}

.tcg-counter-page.is-online-game .tcg-player.is-player-offline .tcg-lp-display,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player.is-player-offline .tcg-lp-display {
    opacity: .74 !important;
    text-shadow: 0 0 .35rem rgba(255, 255, 255, .7), 0 0 1rem rgba(255, 194, 71, .7) !important;
}

.tcg-counter-page.is-online-game .tcg-player .tcg-player-name,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player .tcg-player-name {
    top: .14rem !important;
}

.tcg-counter-page.is-online-game .tcg-player-top .tcg-player-inner,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-top .tcg-player-inner {
    grid-template-areas:
        "stripe role name status"
        "stripe lp lp lp" !important;
    grid-template-columns: .48rem minmax(4rem, .3fr) minmax(0, 1fr) minmax(4.3rem, auto) !important;
    grid-template-rows: 1rem minmax(0, 1fr) !important;
    padding: .38rem .54rem !important;
    row-gap: .24rem !important;
}

.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-player-inner,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-player-inner {
    grid-template-areas:
        "stripe role name status"
        "stripe lp lp lp"
        "quick quick quick quick"
        "calc calc calc calc" !important;
    grid-template-columns: .48rem minmax(4rem, .3fr) minmax(0, 1fr) minmax(4.3rem, auto) !important;
    grid-template-rows: 1rem minmax(2.15rem, 1fr) 3.18rem 1.56rem !important;
    padding: .38rem .54rem !important;
    row-gap: .24rem !important;
}

.tcg-counter-page.is-online-game .tcg-player-top .tcg-lp-display,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-top .tcg-lp-display,
.tcg-counter-page.is-online-game .tcg-player-bottom .tcg-lp-display,
.tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-lp-display {
    font-size: clamp(2.28rem, 9.4vw, 3.08rem) !important;
    padding-top: .86rem !important;
}

@media (min-width: 701px) {
    .tcg-counter-page.is-online-game,
    .tcg-counter-page.is-mobile-fit.is-online-game {
        --hud-gap: .36rem !important;
        font-size: clamp(15px, 1.08vw, 19px) !important;
        max-width: min(100vw, 1170px) !important;
        padding: .36rem !important;
        width: min(100vw, 1170px) !important;
    }

    .tcg-counter-page.is-online-game .tcg-online-game-head,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-online-game-head {
        min-height: 4.65rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-online-title-lockup strong,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-online-title-lockup strong {
        font-size: clamp(1.12rem, 1.42vw, 1.45rem) !important;
    }

    .tcg-counter-page.is-online-game .tcg-counter-board,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-counter-board {
        gap: .36rem !important;
        grid-template-areas:
            "controls"
            "opponent"
            "you"
            "history"
            "footer" !important;
        grid-template-columns: minmax(0, 1fr) !important;
        grid-template-rows:
            minmax(14.2rem, .98fr)
            minmax(6.2rem, .42fr)
            minmax(18.8rem, 1.3fr)
            minmax(7.2rem, .58fr)
            0 !important;
        height: 100% !important;
        min-height: 0 !important;
    }

    .tcg-counter-page.is-online-game .tcg-center-panel,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-center-panel {
        gap: .46rem !important;
        grid-template-rows: 3.15rem 5.25rem minmax(0, 1fr) !important;
        padding: .48rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-round-card,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-round-card {
        height: 3.15rem !important;
        min-height: 3.15rem !important;
        padding: .44rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-timer,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-timer {
        grid-template-columns: minmax(8rem, .82fr) minmax(0, 1.18fr) !important;
        min-height: 5.25rem !important;
        padding: .46rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-timer strong,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-timer strong {
        font-size: clamp(1.72rem, 3vw, 2.45rem) !important;
    }

    .tcg-counter-page.is-online-game .tcg-tool,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-tool {
        grid-template-columns: 3.3rem minmax(0, 1fr) !important;
        min-height: 3.45rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-online-state,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-online-state {
        font-size: .72rem !important;
        grid-area: status !important;
        height: 1.24rem !important;
        justify-self: end !important;
        left: auto !important;
        max-width: 7rem !important;
        min-height: 1.05rem !important;
        min-width: 5.25rem !important;
        position: static !important;
        top: auto !important;
        transform: none !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-top .tcg-player-inner,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-top .tcg-player-inner,
    .tcg-counter-page.is-online-game .tcg-player-bottom .tcg-player-inner,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-player-inner {
        padding: .56rem .72rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-bottom .tcg-player-inner,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-player-inner {
        grid-template-rows: 1.25rem minmax(4.6rem, 1fr) 5.4rem 2.35rem !important;
        row-gap: .32rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-bottom .tcg-quick-row,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-quick-row {
        gap: .36rem !important;
        grid-template-rows: repeat(2, minmax(2.1rem, 1fr)) !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-top .tcg-lp-display,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-top .tcg-lp-display,
    .tcg-counter-page.is-online-game .tcg-player-bottom .tcg-lp-display,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-lp-display {
        font-size: clamp(3.2rem, 7.8vw, 4.85rem) !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-bottom .tcg-quick-row button,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-quick-row button,
    .tcg-counter-page.is-online-game .tcg-player-bottom .tcg-calc-input,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-calc-input,
    .tcg-counter-page.is-online-game .tcg-player-bottom .tcg-calc button,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-calc button {
        height: 2.25rem !important;
        max-height: 2.25rem !important;
        min-height: 2.25rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-history li,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-history li {
        align-items: center !important;
        display: flex !important;
        gap: .56rem !important;
        min-height: 2.2rem !important;
        overflow: hidden !important;
        padding: .45rem .68rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-history li span,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-history li span {
        flex: 0 0 auto !important;
        margin: 0 !important;
    }

    .tcg-counter-page.is-online-game .tcg-history li strong,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-history li strong {
        color: #f8fbff !important;
        display: block !important;
        flex: 1 1 auto !important;
        min-width: 0 !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }
}

@media (max-width: 700px) {
    html:has(.tcg-counter-page.is-online-game),
    body:has(.tcg-counter-page.is-online-game),
    body:has(.tcg-counter-page.is-online-game) .public-main {
        height: var(--tcg-vh, 100dvh) !important;
        max-height: var(--tcg-vh, 100dvh) !important;
        min-height: var(--tcg-vh, 100dvh) !important;
        overflow: hidden !important;
    }

    .tcg-counter-page.is-online-game,
    .tcg-counter-page.is-mobile-fit.is-online-game {
        --hud-gap: .22rem !important;
        height: var(--tcg-vh, 100dvh) !important;
        max-height: var(--tcg-vh, 100dvh) !important;
        min-height: var(--tcg-vh, 100dvh) !important;
        padding: .2rem .2rem .16rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-counter-board,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-counter-board {
        gap: .22rem !important;
        grid-template-areas:
            "controls"
            "opponent"
            "you"
            "history"
            "footer" !important;
        grid-template-columns: minmax(0, 1fr) !important;
        grid-template-rows:
            minmax(9.65rem, 1.08fr)
            minmax(3.85rem, .4fr)
            minmax(9.95rem, 1.04fr)
            minmax(6.1rem, .76fr)
            0 !important;
        height: 100% !important;
        min-height: 0 !important;
        overflow: hidden !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-online-state,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-online-state {
        grid-area: status !important;
        height: .88rem !important;
        justify-self: end !important;
        left: auto !important;
        max-width: 4.75rem !important;
        min-height: .88rem !important;
        min-width: 3.65rem !important;
        position: static !important;
        top: auto !important;
        transform: none !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-top .tcg-player-inner,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-top .tcg-player-inner {
        grid-template-rows: .9rem minmax(0, 1fr) !important;
        padding: .28rem .42rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-bottom .tcg-player-inner,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-player-inner {
        grid-template-rows: .9rem minmax(2.34rem, 1fr) 3.42rem 1.66rem !important;
        padding: .28rem .42rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-player-top .tcg-lp-display,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-top .tcg-lp-display,
    .tcg-counter-page.is-online-game .tcg-player-bottom .tcg-lp-display,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-player-bottom .tcg-lp-display {
        font-size: clamp(2.12rem, 8.95vw, 2.78rem) !important;
        padding-top: .82rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-history li,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-history li {
        align-items: center !important;
        display: flex !important;
        gap: .28rem !important;
        min-height: 1.5rem !important;
        overflow: hidden !important;
        padding: .32rem .42rem !important;
    }

    .tcg-counter-page.is-online-game .tcg-history li span,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-history li span {
        display: inline !important;
        flex: 0 0 auto !important;
        margin: 0 .28rem 0 0 !important;
    }

    .tcg-counter-page.is-online-game .tcg-history li strong,
    .tcg-counter-page.is-mobile-fit.is-online-game .tcg-history li strong {
        display: block !important;
        flex: 1 1 auto !important;
        min-width: 0 !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }
}
