/**
 * Coinflip standalone (/coinflip)
 */

.new-pick-game-block-func {
    position: relative;
    font-family: 'Roboto Mono', sans-serif;
    display: block;
}

.magic-input-block {
    position: relative;
}

.high-low-toggle {
    display: flex;
    width: 2.25rem;
    height: 2.25rem;
    box-sizing: border-box;
    justify-content: center;
    align-items: center;
    border: 2px solid var(--secondary-btn-font-color-default-sec, #0D0C07);
    background: var(--section-mode-background-2, #FFFACD);
    box-shadow: -3px -3px 3px 0px rgba(0, 0, 0, 0.40) inset;
    cursor: pointer;
}

.high-low-toggle .dice-toggle-icon-classic {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.high-low-toggle .dice-toggle-icon-classic svg {
    display: block;
}

.high-low-toggle:hover {
    background: #FFF7B2;
}

.high-low-toggle:active,
.high-low-toggle.active {
    border-color: var(--accent-btn-fg-selected-acc, #AA9000);
    background: var(--accent-btn-bg-selected-acc, #FFF);
    box-shadow: 3px 3px 6px 0px rgba(0, 0, 0, 0.40) inset;
}

.high-low-toggle:active svg path,
.high-low-toggle.active svg path {
    fill: var(--accent-btn-fg-selected-acc, #AA9000);
}

.high-low-toggle.low .dice-toggle-icon-classic svg,
.high-low-toggle.highlow svg {
    transform: rotate(90deg);
}

.high-low-toggle.high .dice-toggle-icon-classic svg {
    transform: rotate(-90deg);
}

.high-low-new-pickers {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
}

.high-low-new-pickers-item {
    flex-direction: column;
    gap: 8px;
    width: 100%;
    flex: 1;
}

.high-low-new-pickers-txt {
    color: var(--section-mode-font-color-alt, #FFF);
    font-feature-settings: 'liga' off, 'clig' off;
    font-size: 13px;
    font-style: normal;
    font-weight: 300;
    line-height: 20px;
}

.high-low-new-pickers-txt.hide {
    display: none;
}

.high-low-win-num {
    display: grid;
}

.high-low-win-num-wrapper {
    width: 100%;
    display: flex;
    gap: 0.375rem;
    overflow-x: scroll;
    align-items: center;
}

.high-low-win-num-wrapper::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.high-low-win-num-wrapper {
    -ms-overflow-style: none;
    overflow: -moz-scrollbars-none;
}

.high-low-win-num-item {
    background: rgba(129, 129, 129, 0.1);
    padding: .3rem .75rem;
    position: relative;
}

.high-low-win-num-item:before {
    content: none;
}

.high-low-win-num-item.low:before {
    transform: none;
}

.high-low-win-num-item.hidden {
    opacity: 0;
}

.high-low-win-num-item p {
    color: #818181;
    text-align: center;
    font-size: 0.825rem;
    font-style: normal;
    font-weight: 600;
}

.high-low-win-num-item.green {
    background: rgba(40, 129, 64, 0.1);
}

.high-low-win-num-item.green:before {
    display: none;
}

.high-low-win-num-item.green p {
    color: var(--Success-800, #288140);
    position: relative;
    z-index: 1;
}

.high-low-win-num-item.green:after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            to right,
            var(--Success-800, #288140) 0 1px,
            transparent 1px calc(100% - 1px),
            var(--Success-800, #288140) calc(100% - 1px) 100%
        ),
        linear-gradient(
            to bottom,
            var(--Success-800, #288140) 0 1px,
            transparent 1px calc(100% - 1px),
            var(--Success-800, #288140) calc(100% - 1px) 100%
        );
    z-index: 0;
    pointer-events: none;
}

.high-low-win-num-item--coin {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem 0.5rem;
    min-width: 2rem;
}

.high-low-win-num-coin {
    width: 1.2rem;
    height: 1.2rem;
    object-fit: contain;
    display: block;
    transform: rotate(90deg);
}

.dice-toggle-coinflip-coin {
    display: none;
    width: 1.375rem;
    height: 1.375rem;
    object-fit: contain;
    pointer-events: none;
}

#numberglobal2.dice-coinflip-payout-display {
    cursor: default;
}

#numberglobal2.dice-coinflip-payout-display--label {
    border: none;
}

.dice-coinflip-emoji {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.75rem;
    line-height: 1;
    z-index: 5;
    pointer-events: none;
    animation: diceCoinflipEmojiFadeUp 1400ms ease-out forwards;
}

.dice-coinflip-static-coin {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 2.5rem;
    height: auto;
    max-height: 2.5rem;
    z-index: 4;
    pointer-events: none;
    transform-origin: center center;
}

.dice-coinflip-final-land--win {
    animation: diceCoinflipLandWinPop 650ms ease-out;
}

@keyframes diceCoinflipTossArc {
    0%   { bottom: 0%; transform: translate(-50%, -50%) rotate(90deg); }
    36%  { bottom: 50%; transform: translate(-50%, -50%) rotate(90deg); }
    100% { bottom: 0%; transform: translate(-50%, -50%) rotate(90deg); }
}

@keyframes diceCoinflipLandWinPop {
    0%   { bottom: 0%; filter: brightness(1); transform: translate(-50%, -50%) rotate(90deg) scale(1); }
    35%  { bottom: 0%; filter: brightness(1.65) drop-shadow(0 0 16px rgba(255, 185, 0, 0.5)); transform: translate(-50%, -50%) rotate(90deg) scale(1.05); }
    100% { bottom: 0%; filter: brightness(1); transform: translate(-50%, -50%) rotate(90deg) scale(1); }
}

.dice-coinflip-emoji.dice-coinflip-emoji-win {
    text-shadow: 0 0 8px rgba(255, 185, 0, 0.55);
}

.dice-coinflip-emoji.dice-coinflip-emoji-lose {
    text-shadow: 0 0 6px rgba(220, 220, 220, 0.35);
}

@keyframes diceCoinflipEmojiFadeUp {
    0%   { opacity: 0; transform: translate(-50%, -50%) translateY(12px) scale(0.92); }
    20%  { opacity: 1; transform: translate(-50%, -50%) translateY(0px) scale(1.06); }
    70%  { opacity: 1; transform: translate(-50%, -50%) translateY(-2px) scale(1.10); }
    100% { opacity: 0; transform: translate(-50%, -50%) translateY(-18px) scale(1.14); }
}

/* --- Standalone page: hide dice-classic chrome --- */
#diceGameRoot.coinflip-standalone .dice-classic-only,
#diceGameRoot.coinflip-standalone .dice-control,
#diceGameRoot.coinflip-standalone .dice-plane,
#diceGameRoot.coinflip-standalone .high-low-payout-slider,
#diceGameRoot.coinflip-standalone .cslider,
#diceGameRoot.coinflip-standalone #dice,
#diceGameRoot.coinflip-standalone #numberglobal,
#diceGameRoot.coinflip-standalone #payoutglobal {
    display: none !important;
}

/* dice.css reserves padding under the coin for the chance slider — drop that on standalone */
#diceGameRoot.coinflip-standalone .magic-gen-display {
    padding-bottom: 1rem !important;
}

#diceGameRoot.coinflip-standalone {
    --coinflip-coin-size: 3.25rem;
    --coinflip-feed-rows: 3;
    --coinflip-feed-item-size: 1.2rem;
    --coinflip-feed-item-pad: 0.4rem;
    --coinflip-feed-gap: 0.375rem;
}

/* History: fill left→right, wrap to next row (max 3), then scroll horizontally */
#diceGameRoot.coinflip-standalone .high-low-win-num {
    display: block;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

#diceGameRoot.coinflip-standalone .high-low-win-num::-webkit-scrollbar {
    width: 0;
    height: 0;
}

#diceGameRoot.coinflip-standalone .high-low-win-num-wrapper {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-content: flex-start;
    align-items: center;
    gap: var(--coinflip-feed-gap);
    height: calc(
        var(--coinflip-feed-rows) * (var(--coinflip-feed-item-size) + var(--coinflip-feed-item-pad))
        + (var(--coinflip-feed-rows) - 1) * var(--coinflip-feed-gap)
    );
    width: max-content;
    min-width: 100%;
    max-width: none;
    overflow: visible;
}

#diceGameRoot.coinflip-standalone .high-low-win-num-item--coin {
    flex-shrink: 0;
}

#diceGameRoot.coinflip-standalone .high-low-win-num-coin {
    width: var(--coinflip-feed-item-size);
    height: var(--coinflip-feed-item-size);
}

#diceGameRoot.coinflip-standalone .high-low-win-num-item--coin.openViewBet {
    cursor: pointer;
}

#diceGameRoot.coinflip-standalone .high-low-win-num-item--coin.openViewBet:hover {
    filter: brightness(1.08);
}

#diceGameRoot.coinflip-standalone .high-low-win-num-item--coin.high-low-win-num-item--multi {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.2rem 0.5rem;
    min-width: auto;
}

#diceGameRoot.coinflip-standalone .high-low-win-num-coin--match {
    filter: brightness(1.12) drop-shadow(0 0 2px rgba(40, 129, 64, 0.55));
}

@media screen and (max-width: 750px) {
    #diceGameRoot.coinflip-standalone {
        --coinflip-coin-size: 2.75rem;
        --coinflip-feed-rows: 2;
    }
}

/* Coin stage only (pick controls live in .coinflip-board-meta below) */
#diceGameRoot.coinflip-standalone .magic-gen-display {
    padding-top: 2.5rem;
    padding-bottom: 1rem;
    position: relative;
    flex-direction: column;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    gap: 0.5rem;
}

#diceGameRoot.coinflip-standalone .high-low-game-board {
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

#diceGameRoot.coinflip-standalone .high-low-game-board .magic-gen-display {
    align-self: center;
}

/* Mirror dice coinflip-mode coin stage (also keyed off .coinflip-standalone alone) */
#diceGameRoot.coinflip-standalone .magic-center-disp-block:has(.coinflip-coin-stage[data-coin-count="1"]) {
    --coinflip-slot-size: 3.25rem;
    --coinflip-stage-gap: 0.35rem;
}

#diceGameRoot.coinflip-standalone .magic-center-disp-block:has(.coinflip-coin-stage[data-coin-count="2"]) {
    --coinflip-slot-size: 2.85rem;
    --coinflip-stage-gap: 0.3rem;
}

#diceGameRoot.coinflip-standalone .magic-center-disp-block:has(.coinflip-coin-stage[data-coin-count="3"]) {
    --coinflip-slot-size: 2.5rem;
    --coinflip-stage-gap: 0.28rem;
}

#diceGameRoot.coinflip-standalone .magic-center-disp-block:has(.coinflip-coin-stage[data-coin-count="4"]) {
    --coinflip-slot-size: 2.15rem;
    --coinflip-stage-gap: 0.22rem;
}

#diceGameRoot.coinflip-standalone .magic-center-disp-block:has(.coinflip-coin-stage[data-coin-count="5"]) {
    --coinflip-slot-size: 1.85rem;
    --coinflip-stage-gap: 0.18rem;
}

#diceGameRoot.coinflip-standalone .magic-center-disp-block {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* ≥ ½ coin clearance between outer coins and box edge (uses active slot size). */
    --coinflip-stage-inner-pad: calc(var(--coinflip-slot-size, var(--coinflip-coin-size, 3.25rem)) / 2);
    padding-inline: var(--coinflip-stage-inner-pad);
    padding-block: calc(var(--coinflip-stage-inner-pad) * 0.35);
    width: fit-content;
    max-width: min(100%, 18rem);
    margin-inline: auto;
    align-self: center;
    height: 8.5rem;
    font-size: 3rem;
    overflow: visible;
    box-sizing: border-box;
}

#diceGameRoot.coinflip-standalone .coinflip-coin-stage {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    justify-content: center;
    gap: var(--coinflip-stage-gap, 0.35rem);
    width: max-content;
    max-width: 100%;
    height: 100%;
    flex: 1 1 auto;
    min-height: 0;
    position: relative;
    z-index: 4;
    overflow: visible;
}

#diceGameRoot.coinflip-standalone .coinflip-coin-slot {
    position: relative;
    flex: 0 0 auto;
    width: var(--coinflip-slot-size, var(--coinflip-coin-size, 3.25rem));
    height: 100%;
    min-height: var(--coinflip-coin-size, 3.25rem);
    overflow: visible;
}

#diceGameRoot.coinflip-standalone .coinflip-coin-stage[data-coin-count="2"] {
    --coinflip-slot-size: 2.85rem;
    --coinflip-stage-gap: 0.3rem;
}

#diceGameRoot.coinflip-standalone .coinflip-coin-stage[data-coin-count="3"] {
    --coinflip-slot-size: 2.5rem;
    --coinflip-stage-gap: 0.28rem;
}

#diceGameRoot.coinflip-standalone .coinflip-coin-stage[data-coin-count="4"] {
    --coinflip-slot-size: 2.15rem;
    --coinflip-stage-gap: 0.22rem;
}

#diceGameRoot.coinflip-standalone .coinflip-coin-stage[data-coin-count="5"] {
    --coinflip-slot-size: 1.85rem;
    --coinflip-stage-gap: 0.18rem;
}

#diceGameRoot.coinflip-standalone .magic-center-disp-block .coinflip-coin-slot .dice-coinflip-static-coin,
#diceGameRoot.coinflip-standalone .magic-center-disp-block > .dice-coinflip-static-coin {
    position: absolute;
    left: 50%;
    top: auto;
    bottom: 0%;
    width: var(--coinflip-slot-size, var(--coinflip-coin-size, 3.25rem));
    max-width: var(--coinflip-slot-size, var(--coinflip-coin-size, 3.25rem));
    max-height: var(--coinflip-slot-size, var(--coinflip-coin-size, 3.25rem));
    transform: translate(-50%, -50%) rotate(90deg);
    margin: 0;
}

/* Heads / tails / alternate / random — centered in bottom board row */
#diceGameRoot.coinflip-standalone .coinflip-board-meta .dice-coinflip-pick-block {
    position: static;
    top: auto;
    right: auto;
    bottom: auto;
    transform: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    align-self: end;
    gap: 0;
    width: auto;
    max-width: 100%;
    z-index: 1;
}

#diceGameRoot.coinflip-standalone .coinflip-pick-rows {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375rem;
}

#diceGameRoot.coinflip-standalone .coinflip-pick-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
}

#diceGameRoot.coinflip-standalone .dice-coinflip-pick-block .high-low-toggle,
#diceGameRoot.coinflip-standalone .dice-coinflip-pick-block .high-low-toggle:hover,
#diceGameRoot.coinflip-standalone .dice-coinflip-pick-block .high-low-toggle:active,
#diceGameRoot.coinflip-standalone .dice-coinflip-pick-block .high-low-toggle.active {
    width: auto;
    height: auto;
    min-width: 0;
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
}

#diceGameRoot.coinflip-standalone .dice-coinflip-pick-block .high-low-toggle:not(.active) .dice-toggle-coinflip-coin {
    opacity: 0.5;
}

#diceGameRoot.coinflip-standalone .dice-coinflip-pick-block .high-low-toggle .dice-toggle-icon-classic {
    display: none !important;
}

#diceGameRoot.coinflip-standalone .coinflip-board-meta .dice-coinflip-pick-block .dice-toggle-coinflip-coin {
    display: block;
    width: 2.25rem;
    height: 2.25rem;
    object-fit: contain;
    transform: rotate(90deg);
}

#diceGameRoot.coinflip-standalone .dice-coinflip-pick-block .high-low-toggle.active .dice-toggle-coinflip-coin {
    filter: brightness(1.12) drop-shadow(0 0 3px rgba(170, 144, 0, 0.45));
}

/* Alternate / random: same chrome as dice (not coin-sized pickers) */
#diceGameRoot.coinflip-standalone .dice-coinflip-pick-block .high-low-toggle.highlow,
#diceGameRoot.coinflip-standalone .dice-coinflip-pick-block .high-low-toggle.random {
    display: flex;
    width: 2.25rem;
    height: 2.25rem;
    box-sizing: border-box;
    justify-content: center;
    align-items: center;
    border: 2px solid var(--secondary-btn-font-color-default-sec, #0D0C07);
    background: var(--section-mode-background-2, #FFFACD);
    box-shadow: -3px -3px 3px 0 rgba(0, 0, 0, 0.4) inset;
    cursor: pointer;
}

#diceGameRoot.coinflip-standalone .dice-coinflip-pick-block .high-low-toggle.highlow:hover,
#diceGameRoot.coinflip-standalone .dice-coinflip-pick-block .high-low-toggle.random:hover {
    background: #fff7b2;
}

#diceGameRoot.coinflip-standalone .dice-coinflip-pick-block .high-low-toggle.highlow:active,
#diceGameRoot.coinflip-standalone .dice-coinflip-pick-block .high-low-toggle.highlow.active,
#diceGameRoot.coinflip-standalone .dice-coinflip-pick-block .high-low-toggle.random:active,
#diceGameRoot.coinflip-standalone .dice-coinflip-pick-block .high-low-toggle.random.active {
    border-color: var(--accent-btn-fg-selected-acc, #aa9000);
    background: var(--accent-btn-bg-selected-acc, #fff);
    box-shadow: 3px 3px 6px 0 rgba(0, 0, 0, 0.4) inset;
}

#diceGameRoot.coinflip-standalone .dice-coinflip-pick-block .high-low-toggle.highlow svg,
#diceGameRoot.coinflip-standalone .dice-coinflip-pick-block .high-low-toggle.random svg {
    display: block;
}

#diceGameRoot.coinflip-standalone .dice-coinflip-pick-block .high-low-toggle.highlow:active svg path,
#diceGameRoot.coinflip-standalone .dice-coinflip-pick-block .high-low-toggle.highlow.active svg path,
#diceGameRoot.coinflip-standalone .dice-coinflip-pick-block .high-low-toggle.random:active svg path,
#diceGameRoot.coinflip-standalone .dice-coinflip-pick-block .high-low-toggle.random.active svg path {
    fill: var(--accent-btn-fg-selected-acc, #aa9000);
}

#diceGameRoot.coinflip-standalone .dice-coinflip-pick-block .high-low-toggle.highlow svg {
    transform: rotate(90deg);
}

#diceGameRoot.coinflip-standalone .magic-center-disp-block .dice-coinflip-static-coin.dice-coinflip-bob,
#diceGameRoot.coinflip-standalone .coinflip-coin-slot .dice-coinflip-static-coin.dice-coinflip-bob {
    animation: diceCoinflipTossArc var(--coinflip-toss-ms, 810ms) cubic-bezier(0.45, 0.02, 0.55, 1) forwards;
}

/* Multiplier + last-100 row (inside cream game board) */
#diceGameRoot.coinflip-standalone .global-number-two-block.high-low-new-pickers.coinflip-board-meta {
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
}

#diceGameRoot.coinflip-standalone .coinflip-board-meta .high-low-new-pickers-item {
    width: 100%;
    flex: none;
}

#diceGameRoot.coinflip-standalone .coinflip-board-meta .magic-input-block {
    width: 100%;
}

#diceGameRoot.coinflip-standalone .coinflip-board-meta .magic-input-block.coinflip-board-meta-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: end;
    gap: 0.75rem;
    box-sizing: border-box;
    padding: 0.875rem;
    min-height: 3.25rem;
    width: 100%;
}

#diceGameRoot.coinflip-standalone .coinflip-board-meta .coinflip-board-meta-multi {
    grid-column: 1;
    justify-self: start;
    align-self: end;
    flex: 0 0 auto;
}

#diceGameRoot.coinflip-standalone .coinflip-board-meta .dice-coinflip-pick-block {
    grid-column: 2;
    justify-self: center;
}

#diceGameRoot.coinflip-standalone .coinflip-board-meta .coinflip-board-meta-stats {
    grid-column: 3;
    justify-self: end;
    align-self: end;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    min-width: 0;
}

#diceGameRoot.coinflip-standalone .coinflip-board-meta .high-low-new-pickers-item:first-child .high-low-new-pickers-txt {
    display: none;
}

#diceGameRoot.coinflip-standalone .coinflip-board-meta #numberglobal2.dice-coinflip-payout-display,
#diceGameRoot.coinflip-standalone .coinflip-board-meta .coinflip-board-meta-multi #numberglobal2 {
    width: auto;
    flex: 0 0 auto;
    box-sizing: border-box;
    padding: 0;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    min-height: 0;
    border: none;
    background: transparent;
    cursor: default;
}

#diceGameRoot.coinflip-standalone .coinflip-board-meta .dice-coinflip-multi-text {
    font-family: "Public Pixel", monospace;
    font-size: 22px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: -0.9px;
    line-height: 1.1;
    color: #FFE22E;
    text-shadow: 1px 1px 0 #8A5A00;
    text-align: left;
    margin: 0;
}

/* View bet: final coin result + player pick (heads/tails), read-only */
#diceGameRoot.coinflip-standalone.coinflip-viewbet-static .high-low-win-num {
    display: none !important;
}

#diceGameRoot.coinflip-standalone .coinflip-board-meta.coinflip-viewbet-picks-row .magic-input-block.coinflip-board-meta-inner {
    grid-template-columns: 1fr;
    justify-items: center;
}

#diceGameRoot.coinflip-standalone .coinflip-board-meta.coinflip-viewbet-picks-row .dice-coinflip-pick-block {
    grid-column: 1;
    justify-self: center;
}

.coinflip-viewbet-popup .coinflip-viewbet-picks-row .high-low-toggle {
    pointer-events: none;
    cursor: default;
}

#diceGameRoot.coinflip-standalone .coinflip-board-meta .high-low-new-pickers-txt {
    color: var(--section-mode-font-color-alt, #fff);
}

main .new-games-mobile-flex:has(#diceGameRoot.coinflip-standalone) .new-pick-game-block-right-content {
    gap: 0;
}

.new-pick-game-block-wrapper:has(#diceGameRoot.coinflip-standalone) {
    gap: 0;
}

#diceGameRoot.coinflip-standalone.new-pick-game-block-func {
    background: var(--section-mode-background-1, #ffffe0);
}

.new-pick-game-block-wrapper:has(#diceGameRoot.coinflip-standalone) > .high-low-picker-win {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Risk 1–5 — separate row below game board (plinko-style 24px gutter) */
.new-pick-game-block-wrapper:has(#diceGameRoot.coinflip-standalone) .coinflip-below-game-btns {
    width: 100%;
    max-width: 100%;
    margin-top: 24px;
    box-sizing: border-box;
}

.new-pick-game-block-wrapper:has(#diceGameRoot.coinflip-standalone) .coinflip-below-game-btns .v4-plinko-btns-base {
    width: 100%;
    gap: 0;
}

.new-pick-game-block-wrapper:has(#diceGameRoot.coinflip-standalone) .coinflip-risk-bottom-slot {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0;
    display: block;
}

.coinflip-below-game-btns .coinflip-risk-wrap {
    display: flex;
    gap: 4px;
    width: 100%;
    max-width: 100%;
    margin: 0;
    box-sizing: border-box;
    border: 1px solid var(--foreground, #0D0C07);
}

.coinflip-below-game-btns .coinflip-risk-wrap .v3-line-bingo-risk-block {
    flex: 1 0 0;
}

.coinflip-below-game-btns .coinflip-risk-wrap .v3-line-bingo-risk-block p {
    color: var(--foreground, #0d0c07);
    margin: 0;
    white-space: nowrap;
}

.coinflip-below-game-btns .coinflip-risk-wrap .v3-line-bingo-risk-block p span.infoValueElement {
    font-size: 20px;
    font-weight: 700;
}

.coinflip-below-game-btns .coinflip-risk-wrap.is-coinflip-ludicrous .v3-line-bingo-risk-block {
    border-color: var(--Danger-900, #7a0a2e);
}

.coinflip-below-game-btns .coinflip-risk-wrap.is-coinflip-ludicrous .v3-line-bingo-risk-block p span.infoValueElement {
    font-size: 15px;
    letter-spacing: 0.02em;
    text-transform: none;
    color: var(--Danger-900, #7a0a2e);
}

.coinflip-below-game-btns .coinflip-risk-wrap:not(.is-coinflip-ludicrous) .v3-line-bingo-risk-block-value svg path {
    fill: #0d0c07;
}

.coinflip-below-game-btns .coinflip-risk-wrap.is-coinflip-ludicrous .v3-line-bingo-risk-block-value svg path {
    fill: #d62828;
}

/* Stake chip row (when relocated from bet box) sits above risk — same as dice */
.new-pick-game-block-wrapper:has(#diceGameRoot.coinflip-standalone) .high-low-picker-win .game-card-picks {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    width: 100%;
    max-width: 100%;
    margin: 0;
    gap: 0;
    box-sizing: border-box;
    border: 1px solid var(--foreground, #0D0C07);
}

.new-pick-game-block-wrapper:has(#diceGameRoot.coinflip-standalone) .high-low-picker-win .game-card-picks > .pick-select-btn {
    flex: 1 1 0;
    min-width: 0;
    width: auto !important;
    max-width: none !important;
    margin: 0;
    border-radius: 0;
    border: none;
    box-shadow: inset -1px 0 0 var(--foreground, #0D0C07);
}

.new-pick-game-block-wrapper:has(#diceGameRoot.coinflip-standalone) .high-low-picker-win .game-card-picks > .pick-select-btn:last-child {
    box-shadow: none;
}

/* Global last-100 — same row as 1.95x multiplier */
#diceGameRoot.coinflip-standalone .coinflip-board-meta .coinflip-global-stats {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem 0.75rem;
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    pointer-events: none;
}

.coinflip-global-stats__label {
    margin: 0;
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--muted-foreground, #6b6862);
    line-height: 1.2;
    white-space: nowrap;
}

.coinflip-global-stats__rows {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.coinflip-global-stats__row {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    line-height: 1.2;
    color: var(--foreground, #0d0c07);
}

.coinflip-global-stats__coin {
    width: 1.125rem;
    height: 1.125rem;
    object-fit: contain;
    flex-shrink: 0;
    transform: rotate(90deg);
}

.coinflip-global-stats__value {
    font-family: "Roboto Mono", ui-monospace, monospace;
    font-size: 0.6875rem;
    font-weight: 600;
    white-space: nowrap;
}

.coinflip-global-stats__row:first-of-type .coinflip-global-stats__value {
    color: #8a6f00;
}

.coinflip-global-stats__row:last-of-type .coinflip-global-stats__value {
    color: #5a5a5a;
}

/* Tablet/mobile: full-width bet card (betting-interface.css keeps max-width: 344px). */
@media screen and (max-width: 1100px) {
    main .new-games-mobile-flex:has(#diceGameRoot.coinflip-standalone) {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "game"
            "picker"
            "rewards";
        gap: 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        align-items: stretch;
        box-shadow: none;
    }

    main .new-games-mobile-flex:has(#diceGameRoot.coinflip-standalone) .new-pick-game-block-right-wrapper,
    main .new-games-mobile-flex:has(#diceGameRoot.coinflip-standalone) .new-pick-game-block-right-content {
        display: contents;
    }

    main .new-games-mobile-flex:has(#diceGameRoot.coinflip-standalone) .new-quick-pick-game-block {
        grid-area: game;
        min-width: 0;
    }

    main .new-games-mobile-flex:has(#diceGameRoot.coinflip-standalone) .new-pick-picker {
        grid-area: picker;
        gap: 0;
        width: 100%;
        max-width: none;
        min-width: 0;
        align-self: stretch;
        box-sizing: border-box;
        margin: 0;
        padding: 0;
        background: #262624;
    }

    main .new-games-mobile-flex:has(#diceGameRoot.coinflip-standalone) .new-pick-picker .new-pick-picker-game.black-0-card {
        padding: 0 !important;
        margin: 0;
        gap: 0;
        width: 100%;
        max-width: none;
        box-sizing: border-box;
        box-shadow: none !important;
    }

    main .new-games-mobile-flex:has(#diceGameRoot.coinflip-standalone) .new-pick-picker-game > .new-pick-picker-game-img {
        display: none !important;
        margin: 0 !important;
        padding: 0 !important;
        min-height: 0;
        max-height: 0;
        flex: 0 0 0;
        overflow: hidden;
        border: 0;
    }

    main .new-games-mobile-flex:has(#diceGameRoot.coinflip-standalone) .new-pick-game-block-right-placement.desk.rewardsPDP {
        grid-area: rewards;
        min-width: 0;
        display: flex !important;
        position: relative !important;
        visibility: visible !important;
        top: auto !important;
        left: auto;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 0 !important;
        margin: 0 !important;
        box-shadow: none !important;
        z-index: 1;
    }

    main:has(#diceGameRoot.coinflip-standalone) .games-win-boards-wrap .rewardsPDP.mob {
        display: none !important;
        min-height: 0 !important;
        height: 0 !important;
        max-height: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: hidden !important;
        border: 0 !important;
    }

    main .new-games-mobile-flex:has(#diceGameRoot.coinflip-standalone) #baseVariationGame,
    main .new-games-mobile-flex:has(#diceGameRoot.coinflip-standalone) #baseVariationGame .input-picks-wrapper,
    main .new-games-mobile-flex:has(#diceGameRoot.coinflip-standalone) #baseVariationGame .manual-bet-card,
    main .new-games-mobile-flex:has(#diceGameRoot.coinflip-standalone) .new-pick-picker-game > .game-card-picks {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        margin-left: 0;
        margin-right: 0;
    }

    main .new-games-mobile-flex:has(#diceGameRoot.coinflip-standalone) #baseVariationGame,
    main .new-games-mobile-flex:has(#diceGameRoot.coinflip-standalone) #baseVariationGame .input-picks-wrapper {
        margin: 0;
        padding: 0;
        gap: 0;
    }

    main .new-games-mobile-flex:has(#diceGameRoot.coinflip-standalone) #baseVariationGame .manual-bet-fields-row > .global-input-block.pad-4-12,
    main .new-games-mobile-flex:has(#diceGameRoot.coinflip-standalone) #baseVariationGame .manual-bet-fields-row > .global-input-block {
        display: none !important;
    }

    main .new-games-mobile-flex:has(#diceGameRoot.coinflip-standalone) #baseVariationGame .manual-bet-card.card-input-block {
        border: none;
        box-shadow: none;
    }

    main .new-games-mobile-flex:has(#diceGameRoot.coinflip-standalone) #baseVariationGame .manual-bet-place-btn {
        border: 1px solid var(--foreground, #0D0C07);
        border-radius: 0;
        box-sizing: border-box;
        flex: 0 0 57.142857%;
        width: 57.142857%;
        max-width: 57.142857%;
        min-width: 0;
        box-shadow: none;
        margin: 0;
    }

    main .new-games-mobile-flex:has(#diceGameRoot.coinflip-standalone) #baseVariationGame .manual-bet-fields-row {
        flex: 0 0 42.857143%;
        width: 42.857143%;
        max-width: 42.857143%;
        min-width: 0;
    }

    main .new-games-mobile-flex:has(#diceGameRoot.coinflip-standalone) #baseVariationGame .manual-bet-fields-row > .bet-box-mob-border {
        border: 1px solid var(--foreground, #0D0C07);
        border-left-width: 0;
        border-radius: 0;
        box-sizing: border-box;
        margin: 0;
    }

    main .new-games-mobile-flex:has(#diceGameRoot.coinflip-standalone) #baseVariationGame .new-pick-picker-bet-place {
        margin: 0;
    }

    main .new-games-mobile-flex:has(#diceGameRoot.coinflip-standalone) .coinflip-below-game-btns,
    main .new-games-mobile-flex:has(#diceGameRoot.coinflip-standalone) .coinflip-below-game-btns .v4-plinko-btns-base,
    .new-pick-game-block-wrapper:has(#diceGameRoot.coinflip-standalone) .coinflip-below-game-btns {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
        margin-left: 0;
        margin-right: 0;
        margin-top: 0;
        padding: 0;
        gap: 0;
    }

    .new-pick-game-block-wrapper:has(#diceGameRoot.coinflip-standalone) .coinflip-below-game-btns .v4-plinko-btns-base {
        gap: 0;
    }

    .new-pick-game-block-wrapper:has(#diceGameRoot.coinflip-standalone) .coinflip-risk-bottom-slot {
        margin: 0;
        padding: 0;
    }

    main .new-games-mobile-flex:has(#diceGameRoot.coinflip-standalone) .coinflip-below-game-btns .coinflip-risk-wrap,
    .coinflip-below-game-btns .coinflip-risk-wrap {
        gap: 0;
        margin: 0;
    }

    #diceGameRoot.coinflip-standalone .coinflip-board-meta.global-number-two-block.high-low-new-pickers {
        padding: 0;
        gap: 0.125rem;
    }

    #diceGameRoot.coinflip-standalone .coinflip-board-meta .magic-input-block.coinflip-board-meta-inner {
        padding: 0.875rem;
        gap: 0.5rem;
    }

    #diceGameRoot.coinflip-standalone .coinflip-board-meta .coinflip-board-meta-stats {
        gap: 0.5rem;
    }
}

@media screen and (max-width: 750px) {
    .new-pick-game-block-wrapper:has(#diceGameRoot.coinflip-standalone) {
        gap: 0;
    }

    #diceGameRoot.coinflip-standalone .magic-gen-display {
        padding-top: 0.85rem;
        padding-bottom: 0.75rem;
    }

    #diceGameRoot.coinflip-standalone .magic-center-disp-block {
        height: 6.75rem;
        width: fit-content;
        max-width: min(100%, 18rem);
        margin-inline: auto;
        align-self: center;
        font-size: 2rem;
    }

    #diceGameRoot.coinflip-standalone .magic-center-disp-block .dice-coinflip-static-coin {
        width: var(--coinflip-coin-size, 2.75rem);
        max-height: var(--coinflip-coin-size, 2.75rem);
    }

    #diceGameRoot.coinflip-standalone .coinflip-pick-rows {
        gap: 0.375rem;
    }

    .new-pick-game-block-wrapper:has(#diceGameRoot.coinflip-standalone) > .high-low-picker-win {
        margin-top: 0;
        padding-top: 0;
        padding-bottom: 0;
    }

    #diceGameRoot.coinflip-standalone .coinflip-board-meta.global-number-two-block.high-low-new-pickers {
        background: none;
        padding: 0;
    }

    #diceGameRoot.coinflip-standalone .coinflip-board-meta .high-low-new-pickers-txt {
        color: var(--muted-foreground, #999894);
        position: absolute;
        z-index: 5;
        left: 0.875rem;
        top: 0.25rem;
        pointer-events: none;
    }

    #diceGameRoot.coinflip-standalone .coinflip-board-meta .magic-input-block.coinflip-board-meta-inner {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        align-items: stretch;
        padding: 0.875rem;
        gap: 0.5rem;
    }

    #diceGameRoot.coinflip-standalone .coinflip-board-meta .coinflip-board-meta-multi,
    #diceGameRoot.coinflip-standalone .coinflip-board-meta .dice-coinflip-pick-block,
    #diceGameRoot.coinflip-standalone .coinflip-board-meta .coinflip-board-meta-stats {
        grid-column: 1;
        justify-self: stretch;
    }

    #diceGameRoot.coinflip-standalone .coinflip-board-meta .dice-coinflip-pick-block {
        justify-content: center;
    }

    #diceGameRoot.coinflip-standalone .coinflip-board-meta .coinflip-board-meta-stats {
        justify-content: flex-start;
    }

    #diceGameRoot.coinflip-standalone .coinflip-board-meta .coinflip-global-stats {
        justify-content: flex-start;
        width: 100%;
    }

    #diceGameRoot.coinflip-standalone .coinflip-board-meta .dice-coinflip-multi-text {
        font-size: 18px;
        letter-spacing: -0.72px;
    }

    .new-pick-game-block-wrapper:has(#diceGameRoot.coinflip-standalone) .dice-mobile-manual-bet-slot:empty,
    .new-pick-game-block-wrapper:has(#diceGameRoot.coinflip-standalone) .dice-mobile-game-card-picks-slot:empty {
        display: none;
    }

    .new-pick-game-block-wrapper:has(#diceGameRoot.coinflip-standalone) .coinflip-below-game-btns {
        margin-top: 0;
    }
}
