:root {
    --black: #020204;
    --void: #050508;
    --white: rgba(255, 255, 255, 0.96);
    --muted: rgba(255, 255, 255, 0.58);
    --faint: rgba(255, 255, 255, 0.12);

    --green: #00ff85;
    --green-glow: rgba(0, 255, 133, 0.36);

    --red: #ff174d;
    --red-dark: #5f0718;
    --red-glow: rgba(255, 23, 77, 0.42);

    --top-h: 9vh;

    --side-pad: clamp(12px, 2vw, 28px);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--black);
    color: var(--white);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

body {
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

button,
a {
    font-family: inherit;
}

.ror-shell {
    width: 100%;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.035), transparent 34%),
        linear-gradient(180deg, #050508 0%, #010102 100%);
    position: relative;
    overflow: hidden;
}

/* subtle luxury-noise layer */
.ror-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.22;
    background:
        linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.012) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: radial-gradient(circle at center, black 0%, transparent 72%);
}

/* =========================
   TOP ROW
========================= */

.ror-top-row {
    height: var(--top-h);
    min-height: 58px;
    padding: 10px var(--side-pad);
    display: grid;
    grid-template-columns: 1fr 1.25fr 1fr;
    align-items: center;
    gap: 12px;
    z-index: 5;
    border-bottom: 1px solid rgba(255, 255, 255, 0.075);
}

.ror-top-control,
.ror-balance-panel {
    height: 100%;
    min-height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.025);
    color: var(--white);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.16em;
    font-size: clamp(0.68rem, 1vw, 0.86rem);
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
}

.ror-value.balance-crediting {
    color: var(--green);

    text-shadow:
        0 0 12px rgba(0, 255, 133, 0.35),
        0 0 28px rgba(0, 255, 133, 0.18);

    transition:
        color 180ms ease,
        text-shadow 180ms ease;
}

.ror-top-control {
    transition: transform 140ms ease, background 180ms ease, border-color 180ms ease;
}

.ror-top-control:hover {
    background: rgba(255, 255, 255, 0.045);
    border-color: rgba(255, 255, 255, 0.22);
}

.ror-top-control:active {
    transform: translateY(1px) scale(0.99);
}

.ror-audio-button {
    position: relative;
    overflow: hidden;
}

.ror-audio-text {
    position: relative;
    z-index: 2;
}

.ror-audio-strike {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 4.8em;
    height: 2px;
    border-radius: 999px;
    background:
        linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.92) 16%,
            rgba(255, 255, 255, 0.98) 50%,
            rgba(255, 255, 255, 0.92) 84%,
            transparent 100%);
    transform:
        translate(-50%, -50%) scaleX(0.72);
    transform-origin: center;
    opacity: 0;
    transition:
        opacity 180ms ease,
        transform 180ms ease;
    pointer-events: none;
    z-index: 3;
}

.ror-audio-button.is-muted .ror-audio-strike {
    opacity: 1;
    transform:
        translate(-50%, -50%) scaleX(1);
}


.ror-balance-panel {
    flex-direction: column;
    gap: 3px;
    cursor: default;
}

.ror-label {
    color: var(--muted);
    font-size: clamp(0.58rem, 0.78vw, 0.72rem);
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    line-height: 1;
}

.ror-value {
    color: var(--white);
    font-size: clamp(0.95rem, 1.45vw, 1.3rem);
    font-weight: 950;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

/* =========================
   CENTER MARKET
========================= */

.ror-market-stage {
    flex: 1;
    min-height: 260px;
    position: relative;
    overflow: hidden;
    z-index: 2;
}

.ror-market-void {
    position: relative;
    isolation: isolate;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.035), transparent 38%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.008), rgba(255, 255, 255, 0.018));
}

.ror-market-void.is-cashout-active {
    background:
        radial-gradient(circle at 50% 50%,
            rgba(0, 255, 133, 0.045),
            rgba(0, 0, 0, 0.84) 72%),
        linear-gradient(180deg,
            rgba(0, 0, 0, 0.88),
            rgba(0, 0, 0, 0.96));

    transform: scale(0.985);

    transition:
        background 420ms ease,
        transform 420ms ease;
}

.ror-court-divider {
    position: absolute;

    width: 32%;

    left: 50%;
    top: 50%;

    height: 2px;

    z-index: 10;
    pointer-events: none;

    opacity: 0;

    transform:
        translateX(-50%) scaleX(0);

    transform-origin: center;

    transition:
        opacity 500ms ease,
        transform 700ms cubic-bezier(0.16, 1, 0.3, 1),
        background 260ms ease,
        box-shadow 260ms ease;

    background:
        linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.20) 15%,
            rgba(255, 255, 255, 0.52) 50%,
            rgba(255, 255, 255, 0.20) 85%,
            transparent 100%);

    box-shadow:
        0 0 14px rgba(255, 255, 255, 0.22),
        0 0 34px rgba(255, 255, 255, 0.08);
}

.ror-court-divider.is-visible {
    opacity: 1;
    transform:
        translateX(-50%) scaleX(1);
}

.ror-rally-atmosphere {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 50%;
    opacity: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse at center,
            rgba(0, 255, 133, 0.18) 0%,
            rgba(0, 255, 133, 0.06) 35%,
            transparent 75%);
    transition:
        opacity 320ms ease;
}

.ror-ruin-atmosphere {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 50%;
    opacity: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse at center,
            rgba(255, 23, 77, 0.18) 0%,
            rgba(255, 23, 77, 0.06) 35%,
            transparent 75%);
    transition:
        opacity 320ms ease;
}

.ror-rally-atmosphere.is-active {
    opacity: 1;
}

.ror-ruin-atmosphere.is-active {
    opacity: 1;
}

/* .ror-court-divider.is-visible {
    opacity: 1;
    transform: scaleX(1);
} */

.ror-background-words {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.02em;
    line-height: 0.9;
    width: 100%;
    pointer-events: none;
    z-index: 1;
    white-space: nowrap;
    text-align: center;
}

.ror-background-words.is-hidden {
    opacity: 0;
    transform:
        translate(-50%, -50%) scale(0.985);
    transition:
        opacity 260ms ease,
        transform 260ms ease;
}

.ror-background-word {
    font-size: clamp(1.4rem, 5vw, 5.6rem);
    font-weight: 950;
    letter-spacing: 0.22em;
    color: rgba(255, 255, 255, 0.035);
    transition:
        color 260ms ease,
        text-shadow 260ms ease,
        transform 260ms ease,
        opacity 260ms ease;
}

#rorOrWord {
    opacity: 0.34;
    font-size: clamp(1rem, 2.6vw, 2.2rem);
    letter-spacing: 0.16em;
    position: relative;
    top: 0.03em;
}

.ror-background-word.rally-glow {
    color: rgba(0, 255, 133, 0.24);

    text-shadow:
        0 0 14px rgba(0, 255, 133, 0.34),
        0 0 36px rgba(0, 255, 133, 0.18),
        0 0 72px rgba(0, 255, 133, 0.12);

    transform: scale(1.02);
}

.ror-background-word.or-glow {
    color: rgba(255, 255, 255, 0.16);

    text-shadow:
        0 0 10px rgba(255, 255, 255, 0.16),
        0 0 26px rgba(255, 255, 255, 0.10);

    transform: scale(1.01);
}

.ror-background-word.ruin-glow {
    color: rgba(255, 23, 77, 0.26);

    text-shadow:
        0 0 14px rgba(255, 23, 77, 0.36),
        0 0 38px rgba(255, 23, 77, 0.18),
        0 0 76px rgba(255, 23, 77, 0.12);

    transform: scale(1.02);
}

.ror-cashout-animation {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 3;
    opacity: 0;
    transform: scale(0.96);
    transition:
        opacity 260ms ease,
        transform 260ms ease;
}

.ror-cashout-animation.is-visible {
    opacity: 1;
    transform: scale(1);
}

.ror-audio-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 6;
    opacity: 0;
    background: rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(6px);
    transition:
        opacity 260ms ease;
}

.ror-audio-overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.ror-audio-wrap {
    width: min(92%, 760px);

    display: flex;
    flex-direction: column;

    gap: 18px;

    align-items: center;
    justify-content: center;

    opacity: 0;

    transform: scale(0.97);

    transition:
        opacity 260ms ease,
        transform 260ms ease;
}

.ror-audio-wrap.is-visible {
    opacity: 1;
    transform: scale(1);
}

.ror-audio-row {
    width: min(720px, 92%);

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 16px;

    padding: 14px 16px;

    border: 2px solid white;

    border-radius: 12px;

    background: rgba(255, 255, 255, 0.06);

    box-shadow:
        0 0 12px rgba(255, 255, 255, 0.25);
}

.ror-audio-row-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;

    gap: 4px;
}

.ror-audio-row-title {
    font-size: clamp(1.2rem, 2.4vw, 1.8rem);

    font-weight: 800;

    color: #fff;
}

.ror-audio-row-status {
    opacity: 0.9;

    font-size: clamp(0.95rem, 1.8vw, 1.1rem);

    color: rgba(255, 255, 255, 0.9);
}

.ror-audio-close-button {
    align-self: flex-end;
    width: 42px;
    height: 42px;
    border: 2px solid white;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: white;
    font-size: 1.6rem;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.18);
}

.ror-audio-close-button:hover {
    background: rgba(255, 255, 255, 0.12);
}

.ios-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    flex-shrink: 0;
}

.ios-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ios-switch .track {
    width: 58px;
    height: 32px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.18);
    position: relative;
    transition: background 180ms ease, box-shadow 180ms ease;
    box-shadow: inset 0 0 8px rgba(255, 255, 255, 0.05);
}

.ios-switch .knob {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.28),
        inset 0 0 3px rgba(255, 255, 255, 0.65);
    transition: transform 180ms ease;
}

.ios-switch input:checked+.track {
    background: rgba(0, 255, 133, 0.42);
    box-shadow:
        inset 0 0 8px rgba(255, 255, 255, 0.08),
        0 0 12px rgba(0, 255, 133, 0.24);
}

.ios-switch input:checked+.track .knob {
    transform: translateX(26px);
}

.ror-cashout-number {
    color: var(--green);
    font-weight: 1000;
    line-height: 1;
    text-align: center;
    font-variant-numeric: tabular-nums;
    text-shadow:
        0 0 18px rgba(0, 255, 133, 0.34),
        0 0 48px rgba(0, 255, 133, 0.18);
    transform: scale(0.92);
}

.ror-trendline-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    z-index: 2;
    pointer-events: none;
}

.ror-trendline-svg.is-hidden {
    opacity: 0;
    transform: scale(0.985);
    transition:
        opacity 260ms ease,
        transform 260ms ease;
}

.ror-trendline-path {
    fill: none;
    stroke: rgba(255, 255, 255, 0.94);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
    filter:
        drop-shadow(0 0 6px rgba(255, 255, 255, 0.32)) drop-shadow(0 0 18px rgba(255, 255, 255, 0.10));
}

.ror-trendline-tip {
    fill: #fff;
    filter:
        drop-shadow(0 0 8px rgba(255, 255, 255, 0.84)) drop-shadow(0 0 22px rgba(255, 255, 255, 0.24));
}

.ror-prompt-choice {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: auto;
}

.ror-button-choice {
    width: clamp(92px, 12vw, 136px);
    height: clamp(44px, 6vh, 58px);
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(0, 0, 0, 0.42);
    color: var(--white);
    font-size: clamp(0.8rem, 1vw, 1rem);
    font-weight: 950;
    letter-spacing: 0.18em;
    cursor: pointer;
    transition: transform 140ms ease, background 180ms ease, border-color 180ms ease;
}

.ror-button-choice:hover {
    background: rgba(255, 255, 255, 0.07);

    border-color: rgba(255, 255, 255, 0.34);

    box-shadow:
        0 0 18px rgba(255, 255, 255, 0.08);
}

.ror-button-choice:active {
    transform: scale(0.96);
}

.ror-button-choice.rally-selected {
    color: var(--green);
    border-color: rgba(0, 255, 133, 0.62);
    background: rgba(0, 255, 133, 0.10);

    box-shadow:
        0 0 14px rgba(0, 255, 133, 0.24),
        0 0 34px rgba(0, 255, 133, 0.10);
}

.ror-button-choice.ruin-selected {
    color: var(--red);
    border-color: rgba(255, 23, 77, 0.62);
    background: rgba(255, 23, 77, 0.10);

    box-shadow:
        0 0 14px rgba(255, 23, 77, 0.26),
        0 0 34px rgba(255, 23, 77, 0.12);
}

.ror-mobile-choice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.42em;
}

.ror-mobile-arrow {
    font-size: 1.1em;
    opacity: 0.92;
}

.ror-mobile-label {
    letter-spacing: 0.14em;
}

/* =========================================
   RALLY OR RUIN STORE OVERLAY
========================================= */

.ror-store-overlay {
    position: absolute;
    inset: 0;
    z-index: 20;
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms ease;
}

.ror-store-overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.ror-store-backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 50%,
            rgba(255, 255, 255, 0.03),
            transparent 40%),
        rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(8px);
}

.ror-store-content {
    position: absolute;
    inset: 0;
    z-index: 2;
    color: white;
    font-size: clamp(1.4rem, 3vw, 2.4rem);
    font-weight: 1000;
    letter-spacing: 0.18em;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px 20px;
    overflow-y: auto;
    overflow-x: hidden;
}

.ror-store-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 3;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
    color: white;
    font-size: 1.6rem;
    cursor: pointer;
}

.ror-store-close:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* =========================================
   TREASURE REWARD GRID
========================================= */

.ror-treasure-grid {
    width: min(100%, 760px);
    display: grid;
    gap: 16px;
    justify-content: center;
    align-content: center;
}

.ror-treasure-grid.normal-mode {
    grid-template-columns: repeat(4, 1fr);
    max-width: 760px;
}

.ror-treasure-grid.rescue-mode {
    grid-template-columns: repeat(4, 1fr);
    max-width: 760px;
}

.ror-treasure-item {
    position: relative;
    aspect-ratio: 1 / 1;
    border: none;
    border-radius: 18px;
    background:
        radial-gradient(circle at 50% 35%,
            rgba(255, 255, 255, 0.08),
            transparent 58%),
        rgba(255, 255, 255, 0.04);
    box-shadow:
        inset 0 0 12px rgba(255, 255, 255, 0.05),
        0 12px 26px rgba(0, 0, 0, 0.34);
    cursor: pointer;
    overflow: hidden;
    transition:
        transform 180ms ease,
        filter 180ms ease,
        opacity 180ms ease;
}

.ror-treasure-item:hover {
    transform:
        translateY(-6px) scale(1.03);
    filter: brightness(1.06);
}

.ror-treasure-item.is-redeemed {
    opacity: 0.28;
    filter: grayscale(1);
    transform: scale(0.96);
    cursor: default;
}

.ror-treasure-icon {
    position: absolute;
    inset: 14%;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    filter:
        drop-shadow(0 0 10px rgba(255, 255, 255, 0.18));
}

.ror-treasure-item.is-redeemed .ror-treasure-icon {
    opacity: 0.14;
}

.ror-treasure-value {
    position: absolute;
    left: 50%;
    bottom: 10px;
    transform: translateX(-50%);
    color: white;
    font-size:
        clamp(0.72rem, 1vw, 0.92rem);
    font-weight: 900;
    white-space: nowrap;
    text-shadow:
        0 0 10px rgba(255, 255, 255, 0.18);
}

/* =========================================
   TIMER
========================================= */

.ror-timer-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 10px;

    text-align: center;
}

.ror-timer-value {
    color: white;

    font-size:
        clamp(2rem, 6vw, 4rem);

    font-weight: 1000;

    letter-spacing: 0.14em;

    font-variant-numeric:
        tabular-nums;

    text-shadow:
        0 0 18px rgba(255, 255, 255, 0.12);
}

.ror-timer-caption {
    color: rgba(255, 255, 255, 0.58);

    font-size:
        clamp(0.7rem, 1vw, 0.9rem);

    font-weight: 900;

    letter-spacing: 0.18em;
}

/* =========================
   SHOW BUY COINS STORE
========================= */

.ror-buy-coins-wrap {
    width: min(100%, 760px);
    display: flex;
    justify-content: center;
    align-items: center;
}

.ror-buy-coins-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.ror-buy-coins-button {
    min-height: 120px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background:
        radial-gradient(circle at 50% 20%,
            rgba(255, 255, 255, 0.10),
            transparent 58%),
        rgba(255, 255, 255, 0.04);
    color: white;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition:
        transform 160ms ease,
        background 180ms ease,
        border-color 180ms ease,
        filter 180ms ease;
}

.ror-buy-coins-button:hover {
    transform:
        translateY(-5px) scale(1.03);
    background:
        radial-gradient(circle at 50% 20%,
            rgba(255, 255, 255, 0.15),
            transparent 58%),
        rgba(255, 255, 255, 0.065);
    border-color:
        rgba(255, 255, 255, 0.32);
    filter:
        brightness(1.08);
}

.ror-buy-coins-button:active {
    transform:
        scale(0.98);
}

.ror-buy-coins-price {
    font-size:
        clamp(0.8rem, 1.1vw, 1rem);
    font-weight: 1000;
    letter-spacing: 0.08em;
}

.ror-buy-coins-amount {
    color: rgba(255, 255, 255, 0.72);
    font-size:
        clamp(0.62rem, 0.9vw, 0.78rem);
    font-weight: 900;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    text-align: center;
}

#checkout-loading {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
}

.checkout-loading-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(8px);
}

.checkout-loading-spinner {
    position: absolute;
    left: 50%;
    top: 50%;
    transform:
        translate(-50%, -50%);
    color: white;
    font-size:
        clamp(1rem, 2vw, 1.6rem);
    font-weight: 1000;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

/* =========================
   BOTTOM PANEL
========================= */

.ror-bottom-panel {
    align-items: center;
    min-height: 88px;
    display: grid;
    padding: 8px var(--side-pad) 11px;
    gap: 10px;
    grid-template-columns: 1fr 1.22fr 1fr;
    grid-template-rows: auto auto;
    grid-template-areas:
        "coins winnings cashout"
        "bets bets bets";
    z-index: 5;
    border-top: 1px solid rgba(255, 255, 255, 0.075);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.012), rgba(255, 255, 255, 0.035));
}

.ror-winnings-panel {
    grid-area: winnings;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    position: relative;
    isolation: isolate;
    height: 56px;
}

.ror-winnings-panel::before {
    content: "";
    position: absolute;
    inset: -2px -8px;
    z-index: -1;
    pointer-events: none;
    opacity: 0.75;
    background:
        radial-gradient(circle at 50% 50%,
            rgba(0, 255, 133, 0.075),
            rgba(255, 255, 255, 0.018) 36%,
            transparent 68%);
}

.ror-winnings-value {
    color: var(--green);
    font-size: clamp(0.9rem, 1.7vw, 1.6rem);
    font-weight: 1000;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    text-shadow:
        0 0 12px rgba(0, 255, 133, 0.22),
        0 0 34px rgba(0, 255, 133, 0.10);
}

.ror-cash-out-button {
    grid-area: cashout;
    width: 100%;
    height: 56px;
    margin: 0;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 16px;
    background:
        radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.14), transparent 54%),
        linear-gradient(180deg, rgba(255, 23, 77, 0.74), rgba(95, 7, 24, 0.96));
    color: white;
    font-size: clamp(0.95rem, 1.5vw, 1.25rem);
    font-weight: 1000;
    letter-spacing: 0.18em;
    cursor: pointer;
    box-shadow:
        inset 0 0 16px rgba(255, 255, 255, 0.08),
        0 0 22px rgba(255, 23, 77, 0.20);
    transition: transform 140ms ease, filter 180ms ease, box-shadow 180ms ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;

}

.ror-cashout-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.ror-cashout-title {
    display: block;
    font-size: inherit;
    font-weight: inherit;
    line-height: 1;
}

.ror-cashout-risk {
    display: none;
    margin-top: 2px;
    white-space: nowrap;
    text-align: center;
    font-size: 0.48em;
    opacity: 0.82;
}

.ror-cash-out-button.is-tempting .ror-cashout-risk {
    opacity: 0.82;
    display: block;
    transform:
        translateY(0);
    animation:
        riskGlow 2.8s ease-in-out infinite;
}

@keyframes riskGlow {

    0% {
        opacity: 0.65;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.65;
    }

}

.ror-cash-out-button:hover {
    filter: brightness(1.07);
    box-shadow:
        inset 0 0 16px rgba(255, 255, 255, 0.11),
        0 0 30px rgba(255, 23, 77, 0.30);
}

.ror-cash-out-button:active {
    transform: translateY(1px) scale(0.99);
}

.ror-cash-out-button.is-tempting {
    animation:
        rorCashoutPulse 1.1s ease-in-out infinite;

    border-color: rgba(255, 255, 255, 0.42);

    box-shadow:
        inset 0 0 18px rgba(255, 255, 255, 0.10),
        0 0 22px rgba(255, 23, 77, 0.34),
        0 0 48px rgba(255, 23, 77, 0.20);

    filter: brightness(1.06);
}

@keyframes rorCashoutPulse {
    0% {
        transform: scale(1);
        box-shadow:
            inset 0 0 18px rgba(255, 255, 255, 0.08),
            0 0 18px rgba(255, 23, 77, 0.20),
            0 0 34px rgba(255, 23, 77, 0.10);
    }

    50% {
        transform: scale(1.035);

        box-shadow:
            inset 0 0 22px rgba(255, 255, 255, 0.12),
            0 0 34px rgba(255, 23, 77, 0.42),
            0 0 64px rgba(255, 23, 77, 0.28);
    }

    100% {
        transform: scale(1);

        box-shadow:
            inset 0 0 18px rgba(255, 255, 255, 0.08),
            0 0 18px rgba(255, 23, 77, 0.20),
            0 0 34px rgba(255, 23, 77, 0.10);
    }
}

.ror-bets-panel {
    grid-area: bets;
    display: flex;
    flex-direction: column;
    min-height: 0;
    gap: 0;
}

.ror-bet-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    grid-template-rows: 1fr;
    gap: 5px;
    align-items: center;
}

.ror-bet-button {
    min-width: 0;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    background: rgba(255, 255, 255, 0.025);
    color: rgba(255, 255, 255, 0.82);
    font-size: clamp(0.66rem, 1.05vw, 0.98rem);
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
    transition: transform 140ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease;
    position: relative;
    overflow: hidden;
    height: clamp(34px, 4.2vh, 46px);
}

.ror-bet-button:hover {
    background: rgba(255, 255, 255, 0.055);
    border-color: rgba(255, 255, 255, 0.24);
    color: white;
}

.ror-bet-button:active {
    transform: scale(0.97);
}

.ror-bet-button.is-selected {
    color: white;
    border-color: rgba(255, 255, 255, 0.58);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.095), rgba(255, 255, 255, 0.038));
    box-shadow:
        inset 0 0 12px rgba(255, 255, 255, 0.075),
        0 0 16px rgba(255, 255, 255, 0.10);
    transform: translateY(-1px);
}

.ror-bet-button.is-selected::before {
    content: "";
    position: absolute;
    left: 22%;
    right: 22%;
    top: 6px;
    height: 1px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.52);
}

.ror-coins-button {
    grid-area: coins;
    width: 100%;
    margin: 0;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.025);
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(0.72rem, 1vw, 0.9rem);
    font-weight: 950;
    letter-spacing: 0.18em;
    cursor: pointer;
    transition: transform 140ms ease, background 180ms ease, border-color 180ms ease;
    height: 56px;
}

.ror-coins-button:hover {
    background: rgba(255, 255, 255, 0.052);
    border-color: rgba(255, 255, 255, 0.24);
}

.ror-coins-button:active {
    transform: translateY(1px) scale(0.99);
}

/* =========================
   MOBILE PORTRAIT
========================= */

@media (max-width: 640px) and (orientation: portrait) {
    :root {
        --top-h: 14vh;
        --side-pad: 10px;
    }

    .ror-top-row {
        min-height: 104px;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr 0.85fr;
        grid-template-areas:
            "balance balance"
            "assets audio";
        gap: 7px;
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .ror-assets-button {
        grid-area: assets;
    }

    .ror-balance-panel {
        grid-area: balance;
    }

    .ror-audio-button {
        grid-area: audio;
    }

    .ror-top-control,
    .ror-balance-panel {
        border-radius: 14px;
        letter-spacing: 0.1em;
        font-size: 0.58rem;
    }

    .ror-value {
        font-size: 0.98rem;
    }

    .ror-market-stage {
        min-height: 235px;
    }

    .ror-prompt-choice {
        gap: 9px;
    }

    .ror-button-choice {
        width: 76px;
        height: 42px;
        font-size: 0.66rem;
        letter-spacing: 0.12em;
    }

    .ror-bottom-panel {
        min-height: 260px;
        padding: 12px 10px 14px;
        grid-template-columns: 1fr;
        grid-template-rows: 0.62fr 0.68fr 0.52fr 1.72fr;
        grid-template-areas:
            "winnings"
            "cashout"
            "coins"
            "bets";
        gap: 7px;
    }

    .ror-cash-out-button {
        min-height: 42px;
        border-radius: 16px;
    }

    .ror-cashout-risk {
        font-size: 0.50em;
    }

    .ror-coins-button {
        width: 100%;
        min-height: 38px;
        border-radius: 14px;
    }

    .ror-bet-grid {
        grid-template-columns: repeat(5, 1fr);
        grid-template-rows: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }

    .ror-bet-button {
        height: auto;
        border-radius: 11px;
        font-size: 0.62rem;
        min-height: 46px;

    }

    .ror-bet-button.is-selected::before {
        content: "";
        position: absolute;
        left: 20%;
        right: 20%;
        top: 4px;
        height: 1.5px;
        opacity: 0.72;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.52);
    }

    .ror-bets-panel {
        gap: 7px;
    }

    .ror-winnings-value {
        font-size: clamp(1.3rem, 3.2vw, 2.7rem);
    }

    .ror-background-word {
        font-size: clamp(2.2rem, 12vw, 4.8rem);
        letter-spacing: 0.14em;
    }

    #rorOrWord {
        font-size: clamp(1rem, 5vw, 1.8rem);
        opacity: 0.30;
        letter-spacing: 0.22em;
    }

    .ror-store-content {
        align-items: flex-start;
    }

    .ror-treasure-grid.normal-mode,
    .ror-treasure-grid.rescue-mode {
        grid-template-columns:
            repeat(2, 1fr);
        max-width: 320px;
        gap: 12px;
    }

    .ror-buy-coins-grid {
        grid-template-columns:
            repeat(2, 1fr);
        max-width: 320px;
        gap: 12px;
    }

    .ror-buy-coins-button {
        min-height: 96px;
    }

}

/* =========================
   SHORT LANDSCAPE
========================= */

@media (orientation: landscape) and (max-height: 500px) {
    :root {
        --top-h: 12vh;
        --side-pad: 8px;
    }

    .ror-top-row {
        min-height: 36px;
        padding: 4px 8px;
        gap: 6px;
    }

    .ror-top-control,
    .ror-balance-panel {
        min-height: 28px;
        border-radius: 9px;
        font-size: 0.42rem;
        letter-spacing: 0.08em;
    }

    .ror-label {
        font-size: 0.34rem;
    }

    .ror-value {
        font-size: 0.52rem;
    }

    .ror-market-stage {
        min-height: 0;
    }

    .ror-button-choice {
        width: 64px;
        height: 28px;
        font-size: 0.42rem;
    }

    .ror-bottom-panel {
        min-height: 0;
        padding: 4px 8px 5px;
        grid-template-columns: 1fr 1.22fr 1fr;
        grid-template-rows: 0.62fr 0.92fr;
        grid-template-areas:
            "coins winnings cashout"
            "bets bets bets";
        row-gap: 5px;
        column-gap: 3px;
        align-items: center;
    }

    .ror-winnings-value {
        font-size: 1rem;
    }

    .ror-winnings-panel {
        height: 24px;
        min-height: 24px;
    }

    .ror-cash-out-button {
        min-height: 24px;
        border-radius: 10px;
        font-size: 0.5rem;
        height: 24px;
    }

    .ror-cashout-risk {
        display: none;
    }

    .ror-coins-button {
        border-radius: 9px;
        font-size: 0.42rem;
        height: 24px;
        min-height: 24px;
    }

    .ror-bet-grid {
        gap: 3px;
    }

    .ror-bet-button {
        border-radius: 8px;
        font-size: 0.38rem;
        min-height: 24px;
    }

    .ror-treasure-grid.normal-mode,
    .ror-treasure-grid.rescue-mode {
        grid-template-columns:
            repeat(4, 1fr);
        max-width: 320px;
        gap: 8px;
    }

    .ror-treasure-value {
        font-size: 0.34rem;
    }

    .ror-buy-coins-grid {
        grid-template-columns:
            repeat(5, 1fr);
        max-width: 520px;
        gap: 8px;
    }

    .ror-buy-coins-button {
        min-height: 58px;
        border-radius: 10px;
        gap: 4px;
    }

    .ror-buy-coins-price {
        font-size: 0.44rem;
    }

    .ror-buy-coins-amount {
        font-size: 0.34rem;
    }

}