/* ==========================================================================
   DonutMoon — dark casino theme
   ========================================================================== */
:root {
    /* Donut moon (blue) defaults; core.js Theme.apply() overwrites these with the active theme. */
    --bg: #070d1c;
    --bg2: #0a1224;
    --panel: #0f1830;
    --panel2: #16213d;
    --panel3: #1e2a4a;
    --line: #1a2542;
    --line2: #2a3a60;
    --text: #eaf2ff;
    --muted: #93a3c4;
    --dim: #61729a;
    --accent: #2f8bff;
    --accent2: #6aaeff;
    --accent-d: #2161b3;
    --on-accent: #ffffff;
    --gold: #ffb347;
    --gold-d: #cc8f39;
    --on-gold: #08090c;
    --green: #22c55e;
    --green-d: #15803d;
    --red: #ef4444;
    --red-d: #b91c1c;
    --blue: #3b82f6;
    --common: #9ca3af;
    --uncommon: #22c55e;
    --rare: #3b82f6;
    --epic: #a855f7;
    --legendary: #f59e0b;
    --mythic: #ef4444;
    --r: 14px;
    --r-sm: 9px;
    --font: 'Rubik', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --emoji: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif;
    --top: 74px;
    --chat-w: 300px;
    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: 14px;
    color: var(--text);
    background: radial-gradient(1100px 420px at 65% -220px, color-mix(in srgb, var(--accent) 9%, transparent), transparent 70%), var(--bg);
    background-attachment: fixed;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button, input, select {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
}

img {
    display: block;
}

h1, h2, h3, h4 {
    margin: 0;
    font-weight: 800;
    letter-spacing: .01em;
}

p {
    margin: 0;
    line-height: 1.5;
}

code {
    font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
    font-size: .92em;
    background: rgba(255,255,255,.06);
    padding: 1px 5px;
    border-radius: 5px;
    word-break: break-all;
}

::selection {
    background: var(--accent);
    color: var(--on-accent);
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* --- Icons ---------------------------------------------------------------- */
.ic {
    width: 1.15em;
    height: 1.15em;
    flex: none;
    vertical-align: -0.2em;
}

.px-art {
    display: block;
    color: #fff;
}

.emo {
    font-family: var(--emoji);
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-thumb {
    background: var(--line2);
    border-radius: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

.muted {
    color: var(--muted);
}

.dim {
    color: var(--dim);
}

.small {
    font-size: 12px;
}

.pos {
    color: var(--green);
}

.pos-r {
    color: var(--red);
}

.neg {
    color: var(--dim);
}

.r {
    text-align: right;
}

/* --- Coin & money ------------------------------------------------------- */
.coin {
    display: inline-block;
    flex: none;
    width: 16px;
    height: 16px;
    background: url('/casino/img/donut-128.png') center / contain no-repeat;
    vertical-align: -3px;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,.45));
}

.money {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 700;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.money.pos {
    color: var(--green);
}

.money.neg {
    color: var(--dim);
}

/* --- Buttons ------------------------------------------------------------ */
/* Pressable blocks: a darker bottom edge that flattens when clicked. */
.btn {
    --edge: rgba(0,0,0,.28);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 40px;
    padding: 0 18px;
    border: 0;
    border-radius: var(--r-sm);
    background: var(--panel3);
    color: var(--text);
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .05em;
    box-shadow: inset 0 -3px 0 var(--edge), inset 0 1px 0 rgba(255,255,255,.06);
    transition: transform .1s, filter .15s, background .15s, box-shadow .1s;
    white-space: nowrap;
}

.btn .ic {
    width: 16px;
    height: 16px;
}

.btn:hover:not(:disabled) {
    filter: brightness(1.1);
}

.btn:active:not(:disabled) {
    transform: translateY(2px);
    box-shadow: inset 0 -1px 0 var(--edge);
}

.btn:disabled {
    opacity: .5;
}

.btn.primary {
    background: linear-gradient(180deg, var(--accent2), var(--accent) 55%);
    color: var(--on-accent);
    --edge: var(--accent-d);
    box-shadow: inset 0 -3px 0 var(--edge), inset 0 1px 0 rgba(255,255,255,.3), 0 6px 18px color-mix(in srgb, var(--accent) 18%, transparent);
}

.btn.gold {
    background: linear-gradient(180deg, color-mix(in srgb, var(--gold) 70%, #fff), var(--gold) 60%);
    color: var(--on-gold);
    --edge: var(--gold-d);
    box-shadow: inset 0 -3px 0 var(--edge), inset 0 1px 0 rgba(255,255,255,.35);
}

.btn.green {
    background: linear-gradient(180deg, #34d399, var(--green) 60%);
    color: #04210f;
    --edge: var(--green-d);
}

.btn.red {
    background: linear-gradient(180deg, #f87171, var(--red) 60%);
    --edge: var(--red-d);
}

.btn.ghost {
    background: transparent;
    box-shadow: inset 0 0 0 1px var(--line2);
}

.btn.ghost:hover:not(:disabled) {
    background: color-mix(in srgb, var(--accent) 7%, transparent);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, var(--line2));
}

.btn.ghost:active:not(:disabled) {
    box-shadow: inset 0 0 0 1px var(--line2);
}

.btn.light {
    background: #f7f3ea;
    color: #16130c;
    --edge: #c9c1ad;
}

.btn.sm {
    height: 32px;
    padding: 0 12px;
    font-size: 12px;
}

.btn.lg {
    height: 50px;
    font-size: 15px;
}

.btn.block {
    width: 100%;
}

.icon-btn {
    width: 38px;
    height: 38px;
    border-radius: var(--r-sm);
    border: 0;
    background: var(--panel2);
    color: var(--text);
    display: inline-grid;
    place-items: center;
    font-size: 16px;
    box-shadow: inset 0 0 0 1px var(--line);
    transition: background .15s, color .15s;
}

.icon-btn .ic {
    width: 18px;
    height: 18px;
}

.icon-btn:hover {
    background: var(--panel3);
    color: var(--accent2);
}

.badge {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
    background: color-mix(in srgb, var(--accent) 18%, transparent);
    color: var(--accent2);
}

.badge.red {
    background: rgba(239, 68, 68, .16);
    color: #fca5a5;
}

.badge.gold {
    background: rgba(251, 191, 36, .16);
    color: var(--gold);
}

.badge.green {
    background: rgba(34, 197, 94, .16);
    color: #4ade80;
}

.badge.dim {
    background: rgba(255,255,255,.06);
    color: var(--muted);
}

.chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 28px;
    padding: 0 9px;
    border-radius: 7px;
    font-weight: 800;
    font-size: 12px;
    background: var(--panel3);
    animation: pop .25s ease-out;
}

.chip.green {
    background: rgba(34, 197, 94, .18);
    color: #4ade80;
}

.chip.red {
    background: rgba(239, 68, 68, .2);
    color: #fca5a5;
}

.chip.gold {
    background: rgba(251, 191, 36, .2);
    color: var(--gold);
}

.chip.purple {
    background: color-mix(in srgb, var(--accent) 22%, transparent);
    color: var(--accent2);
}

.chip.black {
    background: #2b2d3f;
    color: #cbd5e1;
}

.double-stage .chip.red, .dbl-window ~ .recent .chip.red {
    background: #dc2626;
    color: #fff;
}

.double-stage .chip.green {
    background: #16a34a;
    color: #fff;
}

.recent {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
    min-height: 28px;
}

/* --- Top bar ------------------------------------------------------------- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--top);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 16px;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}

.menu-btn {
    display: none;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-weight: 900;
    font-size: 19px;
    letter-spacing: .02em;
    flex: none;
}

.logo svg,
.logo img {
    width: 38px;
    height: 38px;
    object-fit: contain;
    filter: drop-shadow(0 0 8px color-mix(in srgb, var(--accent) 30%, transparent));
}

.nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 12px;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    height: 48px;
    padding: 0 16px;
    white-space: nowrap;
    border-radius: var(--r-sm);
    border: 0;
    background: none;
    color: var(--muted);
    font-weight: 800;
    font-size: 15.5px;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.nav-link .ic {
    width: 21px;
    height: 21px;
}

.owner-link {
    color: var(--gold);
}

.nav-link:hover {
    color: var(--text);
    background: rgba(255,255,255,.03);
}

.nav-link:hover .ic, .nav-link.active .ic {
    color: var(--accent);
}

.nav-link.active {
    color: var(--text);
    background: rgba(255,255,255,.03);
    box-shadow: inset 0 -2px 0 var(--accent);
}

.nav-games {
    position: relative;
}

.nav-settings {
    display: none;
}

#user-slot {
    display: flex;
    gap: 6px;
}

.nav-link .caret {
    width: 16px;
    height: 16px;
    margin-left: -2px;
}

.dropdown {
    position: absolute;
    top: 52px;
    left: 0;
    min-width: 220px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    padding: 8px;
    background: var(--panel2);
    border: 1px solid var(--line2);
    border-radius: var(--r);
    box-shadow: 0 20px 50px rgba(0,0,0,.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: .15s;
}

.nav-games.open .dropdown {
    opacity: 1;
    visibility: visible;
    transform: none;
}

@media (hover: hover) {
    .nav-games:hover .dropdown {
        opacity: 1;
        visibility: visible;
        transform: none;
    }
}

.dropdown a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 10px;
    border-radius: 8px;
    font-weight: 600;
    white-space: nowrap;
}

.dropdown a:hover {
    background: var(--panel3);
}

.dropdown .dd-art {
    width: 24px;
    height: 24px;
    flex: none;
}

.dropdown .dd-art svg {
    width: 100%;
    height: 100%;
    filter: none;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 14px;
    white-space: nowrap;
    flex: none;
    border-radius: 999px;
    font-weight: 800;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.race-pill {
    background: linear-gradient(90deg, color-mix(in srgb, var(--gold) 16%, transparent), color-mix(in srgb, var(--gold) 4%, transparent));
    color: var(--gold);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 30%, transparent);
    margin-left: auto;
}

.race-pill .ic {
    width: 16px;
    height: 16px;
}

.top-right {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.balance {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 4px 0 14px;
    border-radius: var(--r-sm);
    background: var(--panel);
    box-shadow: inset 0 0 0 1px var(--line2);
}

.balance .coin {
    width: 22px;
    height: 22px;
}

#bal {
    font-size: 15px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    min-width: 60px;
}

#bal.up {
    animation: flashUp .7s;
}

#bal.down {
    animation: flashDown .7s;
}

@keyframes flashUp {
    0% {
        color: var(--green);
        text-shadow: 0 0 12px var(--green);
    }

    100% {
        color: var(--text);
    }
}

@keyframes flashDown {
    0% {
        color: var(--red);
    }

    100% {
        color: var(--text);
    }
}

.wallet-btn {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 7px;
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, var(--accent2), var(--accent) 55%);
    color: var(--on-accent);
    box-shadow: inset 0 -2px 0 var(--accent-d);
}

.wallet-btn .ic {
    width: 18px;
    height: 18px;
    stroke-width: 2.6;
}

.wallet-btn:active {
    transform: translateY(1px);
    box-shadow: none;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 12px 0 5px;
    border-radius: var(--r-sm);
    background: var(--panel2);
    font-weight: 700;
}

.user-chip img, .player img, .msg img, .lobby-players img, .bp-head img, .my-race img {
    image-rendering: pixelated;
    border-radius: 6px;
}

.user-chip img {
    width: 30px;
    height: 30px;
}

/* --- Shell: chat + main -------------------------------------------------- */
.shell {
    display: flex;
    align-items: flex-start;
}

.chat {
    position: sticky;
    top: var(--top);
    width: var(--chat-w);
    height: calc(100vh - var(--top));
    display: none;
    flex-direction: column;
    flex: none;
    background: var(--bg2);
    border-right: 1px solid var(--line);
}

body.chat-open .chat {
    display: flex;
}

.chat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
}

.online-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--muted);
    font-weight: 600;
}

.online-pill i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 8px var(--green);
    animation: blink 2s infinite;
}

.online-pill b {
    color: var(--text);
}

@keyframes blink {
    50% {
        opacity: .4;
    }
}

.rain {
    margin: 12px;
    padding: 11px 12px;
    border-radius: var(--r-sm);
    background: linear-gradient(100deg, color-mix(in srgb, var(--gold) 14%, var(--panel)), var(--panel) 70%);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 28%, transparent);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.rain b {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

.rain .rain-title {
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 900;
}

.rain small {
    color: var(--muted);
    font-size: 12px;
}

.rain .rain-t {
    color: var(--text);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.rain.open {
    background: linear-gradient(90deg, rgba(34,197,94,.2), var(--panel));
    box-shadow: inset 0 0 0 1px rgba(34,197,94,.5);
    animation: glow 1.5s infinite alternate;
}

@keyframes glow {
    to {
        box-shadow: inset 0 0 0 1px rgba(34,197,94,.9), 0 0 18px rgba(34,197,94,.25);
    }
}

.rain-cloud {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--gold) 12%, transparent);
    color: var(--gold);
}

.rain-cloud .ic {
    width: 22px;
    height: 22px;
}

.chat-msgs {
    flex: 1;
    overflow-y: auto;
    padding: 4px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.msg {
    display: flex;
    gap: 9px;
    animation: slideIn .25s ease-out;
}

.msg img {
    width: 30px;
    height: 30px;
    flex: none;
}

.msg b {
    font-size: 12px;
    color: var(--accent2);
}

.msg p {
    font-size: 13px;
    color: color-mix(in srgb, var(--text) 82%, var(--panel));
    word-break: break-word;
}

.msg.me b {
    color: var(--gold);
}

.msg.system {
    display: block;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(34,197,94,.1);
    color: #86efac;
    font-size: 12px;
    font-weight: 600;
}

.chat-form {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid var(--line);
}

.chat-form input {
    flex: 1;
    min-width: 0;
    height: 36px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid var(--line2);
    background: var(--panel);
    outline: none;
}

.chat-form input:focus {
    border-color: var(--accent);
}

.chat-form .send-btn {
    width: 36px;
    padding: 0;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
}

@keyframes pop {
    from {
        transform: scale(.6);
        opacity: 0;
    }
}

.main-col {
    flex: 1;
    min-width: 0;
}

#view {
    min-height: calc(100vh - var(--top) - 200px);
}

.page {
    max-width: 1240px;
    margin: 0 auto;
    padding: 24px 24px 40px;
    animation: fadeIn .25s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
}

.page-head {
    margin-bottom: 20px;
}

.page-head h1 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 28px;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.page-head h1 .ic, .admin-head h1 .ic {
    width: 26px;
    height: 26px;
    color: var(--accent);
}

.admin-head h1 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.section {
    margin-top: 28px;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.section-head h2 {
    font-size: 18px;
    text-transform: uppercase;
}

.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--r);
}

/* --- Forms ------------------------------------------------------------------- */
.field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.field-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .04em;
}

.field-label b {
    color: var(--text);
}

.text-input, .select, .num-input, .amount-input {
    width: 100%;
    height: 42px;
    border-radius: var(--r-sm);
    background: var(--bg2);
    border: 1px solid var(--line2);
    outline: none;
    transition: border-color .15s;
}

.text-input {
    padding: 0 12px;
}

.text-input:focus, .select:focus, .num-input:focus-within, .amount-input:focus-within {
    border-color: var(--accent);
}

.select {
    padding: 0 10px;
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position: calc(100% - 17px) 18px, calc(100% - 12px) 18px;
    background-size: 5px 5px;
    background-repeat: no-repeat;
}

.select option {
    background: var(--panel2);
}

.amount-input {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 4px 0 12px;
}

.amount-input input {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: 0;
    background: none;
    outline: none;
    font-weight: 700;
    font-size: 15px;
    margin-left: 4px;
}

.amount-input button {
    height: 32px;
    min-width: 36px;
    padding: 0 8px;
    border: 0;
    border-radius: 7px;
    background: var(--panel3);
    font-weight: 700;
    font-size: 12px;
}

.amount-input button:hover:not(:disabled) {
    background: var(--line2);
}

.num-input {
    display: flex;
    align-items: center;
    padding: 0 12px;
}

.num-input input {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: 0;
    background: none;
    outline: none;
    font-weight: 700;
    font-size: 15px;
}

.num-input span {
    color: var(--muted);
    font-weight: 700;
}

.seg {
    display: flex;
    gap: 4px;
    padding: 4px;
    border-radius: var(--r-sm);
    background: var(--bg2);
    border: 1px solid var(--line2);
}

.seg button {
    flex: 1;
    height: 34px;
    border: 0;
    border-radius: 6px;
    background: none;
    color: var(--muted);
    font-weight: 700;
    font-size: 13px;
}

.seg button.on {
    background: var(--panel3);
    color: var(--text);
    box-shadow: inset 0 0 0 1px var(--line2);
}

.seg button:disabled {
    opacity: .5;
}

.switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 600;
    color: var(--muted);
    text-transform: none;
    letter-spacing: 0;
}

.switch input {
    display: none;
}

.switch i {
    width: 34px;
    height: 20px;
    border-radius: 20px;
    background: var(--line2);
    position: relative;
    transition: .2s;
}

.switch i::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    transition: .2s;
}

.switch input:checked + i {
    background: var(--accent);
}

.switch input:checked + i::after {
    left: 17px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 8px;
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    border-radius: var(--r-sm);
    background: var(--bg2);
    border: 1px solid var(--line);
}

.stat span {
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: .04em;
}

.stat b {
    font-size: 14px;
}

.tabs {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    border-radius: var(--r-sm);
    background: var(--panel);
    border: 1px solid var(--line);
    margin-bottom: 12px;
}

.tabs button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 14px;
    border: 0;
    border-radius: 6px;
    background: none;
    color: var(--muted);
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
}

.tabs button .ic {
    width: 15px;
    height: 15px;
}

.tabs button:hover {
    color: var(--text);
}

.tabs button.on {
    background: var(--panel3);
    color: var(--text);
    box-shadow: inset 0 -2px 0 var(--accent);
}

.tabs button.on .ic {
    color: var(--accent);
}

.copy-row {
    display: flex;
    gap: 8px;
}

.copy-row .text-input {
    flex: 1;
    min-width: 0;
}

.mono-box {
    padding: 10px 12px;
    border-radius: var(--r-sm);
    background: var(--bg2);
    border: 1px solid var(--line);
    font-family: ui-monospace, Consolas, monospace;
    font-size: 12px;
    word-break: break-all;
    line-height: 1.5;
}

.note {
    margin-top: 14px;
    padding: 10px 12px;
    border-radius: var(--r-sm);
    background: color-mix(in srgb, var(--accent) 10%, transparent);
    color: var(--accent2);
    font-size: 13px;
}

/* --- Tables --------------------------------------------------------------------- */
.table-wrap {
    overflow-x: auto;
    border-radius: var(--r);
}

table.bets {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 4px;
    min-width: 420px;
}

.bets th {
    padding: 6px 14px;
    font-size: 11px;
    color: var(--dim);
    text-transform: uppercase;
    letter-spacing: .05em;
    text-align: left;
}

.bets th.r {
    text-align: right;
}

.bets td {
    padding: 10px 14px;
    background: var(--panel);
    white-space: nowrap;
}

.bets td:first-child {
    border-radius: 10px 0 0 10px;
}

.bets td:last-child {
    border-radius: 0 10px 10px 0;
}

.bets tr.fresh td {
    animation: rowIn .45s ease-out;
}

.bets tr.mine td {
    background: color-mix(in srgb, var(--accent) 10%, transparent);
}

@keyframes rowIn {
    from {
        background: color-mix(in srgb, var(--accent) 25%, transparent);
    }
}

.bets .empty {
    text-align: center;
    color: var(--muted);
    padding: 24px;
}

.bet-game {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.bet-game .bg-art {
    width: 22px;
    height: 22px;
    flex: none;
}

.bet-game .bg-art svg {
    width: 100%;
    height: 100%;
    filter: none;
}

.player {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.player img {
    width: 24px;
    height: 24px;
}

/* --- Home ------------------------------------------------------------------------ */
.hero {
    position: relative;
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 26px 30px;
    background: linear-gradient(115deg, color-mix(in srgb, var(--accent) 15%, var(--panel)), var(--panel) 60%);
    border-color: color-mix(in srgb, var(--accent) 28%, var(--line));
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(360px 200px at 8% 50%, color-mix(in srgb, var(--gold) 14%, transparent), transparent 70%);
    pointer-events: none;
}

.hero-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 1;
    background: transparent;
}

.hero-mascot {
    flex: none;
    width: 140px;
    height: 140px;
    display: grid;
    place-items: center;
    animation: float 4s ease-in-out infinite;
}

.hero-mascot svg,
.hero-mascot img {
    width: 128px;
    height: 128px;
    filter: drop-shadow(0 12px 26px color-mix(in srgb, var(--accent) 35%, transparent));
}

@keyframes float {
    50% {
        transform: translateY(-8px);
    }
}

.hero-body {
    position: relative;
    z-index: 1;
    flex: 1;
}

.hero h1 {
    font-size: 24px;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.steps {
    list-style: none;
    counter-reset: s;
    padding: 0;
    margin: 18px 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.steps li {
    counter-increment: s;
    display: grid;
    grid-template-columns: 32px 1fr;
    column-gap: 12px;
    row-gap: 2px;
}

.steps li::before {
    content: counter(s);
    grid-row: span 2;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 800;
    background: var(--accent);
    color: var(--on-accent);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
}

.steps b {
    text-transform: uppercase;
    font-size: 13px;
}

.steps span {
    color: var(--muted);
    font-size: 13px;
}

.hero-cta {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.carousel {
    position: relative;
    margin-top: 22px;
    overflow: hidden;
    border-radius: var(--r);
}

.slides {
    display: flex;
    transition: transform .6s cubic-bezier(.6,.05,.3,1);
}

.banner {
    flex: 0 0 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 124px;
    padding: 22px 28px;
    border-radius: var(--r);
    background: linear-gradient(100deg, var(--c2) 35%, var(--c1));
    border: 1px solid color-mix(in srgb, var(--gold) 22%, transparent);
    overflow: hidden;
}

.banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(90deg, rgba(255,255,255,.025) 0 2px, transparent 2px 22px);
    pointer-events: none;
}

.banner h2 {
    font-size: 22px;
    text-transform: uppercase;
}

.banner p {
    color: rgba(255,255,255,.75);
    font-size: 13px;
    text-transform: uppercase;
    font-weight: 600;
    margin-top: 4px;
}

.banner-art {
    position: absolute;
    right: 200px;
    display: flex;
    gap: 6px;
    filter: drop-shadow(0 8px 20px rgba(0,0,0,.5));
}

.banner-art svg {
    width: 76px;
    height: 76px;
}

.banner .btn {
    position: relative;
    z-index: 1;
}

.dots {
    position: absolute;
    left: 28px;
    bottom: 10px;
    display: flex;
    gap: 6px;
}

.dots button {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: rgba(255,255,255,.3);
    transition: .3s;
}

.dots button.on {
    width: 22px;
    background: var(--gold);
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
    gap: 14px;
}

.game-card {
    position: relative;
    display: flex;
    flex-direction: column;
    aspect-ratio: 1080 / 1456; /* every card, with or without cover art, is the same size */
    border-radius: var(--r);
    overflow: hidden;
    background: radial-gradient(120% 70% at 50% 38%, color-mix(in srgb, var(--c1) 45%, transparent), transparent 70%), linear-gradient(180deg, color-mix(in srgb, var(--c2) 70%, var(--panel)), var(--panel) 92%);
    border: 1px solid var(--line);
    transition: transform .2s, box-shadow .2s, border-color .2s;
}

/* Faint block grid, like a Minecraft texture. */
.game-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px) 0 0 / 16px 16px, linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px) 0 0 / 16px 16px;
}

.game-card:hover {
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--accent) 60%, var(--line));
    box-shadow: 0 14px 30px rgba(0,0,0,.4), 0 0 24px color-mix(in srgb, var(--accent) 14%, transparent);
}

.gc-art {
    flex: 1;
    display: grid;
    place-items: center;
    position: relative;
}

.gc-art svg {
    width: 56%;
    max-width: 96px;
    height: auto;
    transition: transform .25s;
}

.gc-art .emo {
    font-size: 64px;
}

.game-card:hover .gc-art svg {
    transform: scale(1.08) translateY(-3px);
}

.gc-text {
    position: relative;
    padding: 0 12px 10px;
    text-align: center;
}

.gc-text b {
    display: block;
    font-size: 17px;
    font-weight: 900;
    text-transform: uppercase;
    text-shadow: 0 2px 0 rgba(0,0,0,.35);
}

.gc-text small {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: rgba(255,255,255,.7);
    letter-spacing: .05em;
}

.gc-live {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(0,0,0,.28);
    color: rgba(255,255,255,.8);
}

.gc-live i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 6px var(--green);
}

.reward-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.reward-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 18px;
    border-radius: var(--r);
    background: linear-gradient(160deg, var(--panel2), var(--panel));
    border: 1px solid var(--line);
    transition: .2s;
}

.reward-card:hover {
    border-color: color-mix(in srgb, var(--accent) 60%, var(--line));
    transform: translateY(-2px);
}

.reward-card .rc-ic {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    margin-bottom: 8px;
    border-radius: 11px;
    color: var(--gold);
    background: color-mix(in srgb, var(--gold) 12%, transparent);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 22%, transparent);
}

.reward-card .rc-ic .ic {
    width: 22px;
    height: 22px;
}

.reward-card b {
    text-transform: uppercase;
}

.reward-card small {
    color: var(--muted);
}

/* --- Game shell ------------------------------------------------------------------- */
.game-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.game-title {
    display: flex;
    align-items: center;
    gap: 14px;
}

.game-icon {
    width: 52px;
    height: 52px;
    flex: none;
    display: grid;
    place-items: center;
    border-radius: 12px;
    font-size: 28px;
    font-family: var(--emoji);
    background: linear-gradient(160deg, color-mix(in srgb, var(--c1) 60%, var(--panel)), var(--panel2));
    box-shadow: 0 6px 20px rgba(0,0,0,.35), inset 0 0 0 1px var(--line2);
}

.game-icon svg {
    width: 66%;
    height: 66%;
    filter: none;
}

.game-title h1 {
    font-size: 24px;
    text-transform: uppercase;
}

.game-title p {
    color: var(--muted);
    font-size: 13px;
    text-transform: uppercase;
    font-weight: 600;
}

.game-wrap {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 14px;
    align-items: stretch;
}

.game-wrap > * {
    min-width: 0;
}

.game-controls {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.game-stage {
    position: relative;
    min-height: 470px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: radial-gradient(600px 300px at 50% 0%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 70%), var(--panel);
}

.fair-line {
    margin-top: 10px;
    font-size: 12px;
    color: var(--dim);
    min-height: 18px;
}

.fair-line code {
    background: none;
    padding: 0;
    color: var(--muted);
}

.game-about {
    padding: 18px 20px;
}

.game-about h3 {
    font-size: 15px;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.game-about p {
    color: var(--muted);
}

.big-result {
    font-size: 22px;
    font-weight: 900;
    text-transform: uppercase;
    text-align: center;
    min-height: 32px;
    transition: color .2s;
}

.big-result.win {
    color: var(--green);
    text-shadow: 0 0 20px rgba(34,197,94,.4);
    animation: pop .3s;
}

.big-result.lose {
    color: var(--red);
}

.big-result.push {
    color: var(--gold);
}

.win-pop {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 20px 34px;
    border-radius: var(--r);
    background: rgba(12, 30, 20, .92);
    border: 2px solid var(--green);
    box-shadow: 0 0 40px rgba(34,197,94,.35);
    animation: pop .3s;
    pointer-events: none;
    z-index: 5;
}

.win-pop b {
    font-size: 34px;
    color: var(--green);
}

/* Coinflip */
.cf-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.cf-coin-wrap {
    perspective: 900px;
}

.cf-coin-wrap.hop {
    animation: hop 1.6s cubic-bezier(.3,.7,.4,1);
}

@keyframes hop {
    40% {
        transform: translateY(-70px) scale(1.12);
    }

    100% {
        transform: none;
    }
}

.coin3d {
    position: relative;
    width: 190px;
    height: 190px;
    transform-style: preserve-3d;
    transition: transform 1.6s cubic-bezier(.2,.75,.2,1);
}

.face {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    backface-visibility: hidden;
}

.face span {
    font-size: 80px;
    font-family: var(--emoji);
    filter: drop-shadow(0 4px 0 rgba(0,0,0,.25));
}

.face.heads {
    background: radial-gradient(circle at 35% 30%, #fff1b8, #fbbf24 45%, #b45309);
    box-shadow: inset 0 0 0 10px rgba(180, 83, 9, .6), inset 0 0 0 14px #fcd34d, 0 10px 40px rgba(251,191,36,.35);
}

.face.tails {
    transform: rotateY(180deg);
    background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--accent2) 40%, #fff), var(--accent) 45%, var(--accent-d));
    box-shadow: inset 0 0 0 10px color-mix(in srgb, var(--accent-d) 60%, transparent), inset 0 0 0 14px var(--accent2), 0 10px 40px color-mix(in srgb, var(--accent) 35%, transparent);
}

/* Dice */
.dice-stage {
    width: 100%;
    max-width: 640px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.dice-result {
    font-size: 64px;
    font-variant-numeric: tabular-nums;
}

.dice-track {
    position: relative;
    height: 56px;
    padding: 18px 16px;
    border-radius: 40px;
    background: var(--bg2);
    border: 1px solid var(--line2);
}

.dice-bar {
    height: 12px;
    border-radius: 8px;
}

.dice-track input[type=range] {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 13px;
    width: calc(100% - 32px);
    height: 24px;
    margin: 0;
    background: none;
    appearance: none;
    -webkit-appearance: none;
    cursor: grab;
}

.dice-track input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 28px;
    height: 28px;
    border-radius: 7px;
    background: linear-gradient(180deg, var(--accent2), var(--accent));
    border: 3px solid #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,.4);
}

.dice-track input[type=range]::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 7px;
    background: var(--accent);
    border: 3px solid #fff;
}

.dice-marker {
    position: absolute;
    top: -40px;
    left: calc(16px + (100% - 32px) * var(--p, 50) / 100);
    transform: translateX(-50%);
    opacity: 0;
    transition: left .35s cubic-bezier(.2,.8,.2,1), opacity .2s;
    pointer-events: none;
}

.dice-marker.show {
    opacity: 1;
}

.dice-marker b {
    display: block;
    padding: 5px 10px;
    border-radius: 8px;
    background: var(--panel3);
    font-size: 13px;
}

.dice-marker.win b {
    background: var(--green);
    color: #052e16;
}

.dice-marker.lose b {
    background: var(--red);
}

.dice-scale {
    display: flex;
    justify-content: space-between;
    padding: 0 16px;
    color: var(--dim);
    font-size: 12px;
    font-weight: 700;
    margin-top: -12px;
}

.dice-target {
    text-align: center;
}

.dice-target b {
    color: var(--text);
}

/* Limbo */
.limbo-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.limbo-num {
    font-size: clamp(56px, 9vw, 96px);
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}

.limbo-num.win {
    color: var(--green);
    text-shadow: 0 0 30px rgba(34,197,94,.4);
}

.limbo-num.lose {
    color: var(--red);
}

.limbo-target {
    font-weight: 700;
    text-transform: uppercase;
}

/* Double */
.double-bets {
    display: grid;
    gap: 8px;
}

.btn.dbl {
    height: 54px;
    justify-content: space-between;
    padding: 0 16px;
    text-transform: none;
    letter-spacing: 0;
}

.btn.dbl b {
    font-size: 15px;
    text-transform: uppercase;
}

.btn.dbl small {
    opacity: .8;
    font-weight: 600;
}

.btn.dbl.red {
    background: linear-gradient(180deg, #ef4444, #991b1b);
}

.btn.dbl.green {
    background: linear-gradient(180deg, #22c55e, #166534);
}

.btn.dbl.black {
    background: linear-gradient(180deg, #3f4257, #1d1f2c);
}

.double-stage {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 26px;
}

.dbl-window {
    position: relative;
    height: 96px;
    overflow: hidden;
    border-radius: 12px;
    background: var(--bg2);
    border: 1px solid var(--line2);
    -webkit-mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
    mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.dbl-strip {
    display: flex;
    gap: 4px;
    padding: 8px 0;
    will-change: transform;
}

.dbl-tile {
    flex: none;
    width: 80px;
    height: 80px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: 24px;
    font-weight: 900;
    box-shadow: inset 0 -4px 0 rgba(0,0,0,.25);
}

.dbl-tile.red {
    background: linear-gradient(180deg, #ef4444, #b91c1c);
}

.dbl-tile.black {
    background: linear-gradient(180deg, #3b3e52, #202231);
}

.dbl-tile.green {
    background: linear-gradient(180deg, #22c55e, #15803d);
}

.dbl-pointer {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 3px;
    margin-left: -1.5px;
    background: var(--gold);
    box-shadow: 0 0 12px var(--gold);
}

.dbl-pointer::before, .dbl-pointer::after {
    content: '';
    position: absolute;
    left: 50%;
    margin-left: -8px;
    border: 8px solid transparent;
}

.dbl-pointer::before {
    top: 0;
    border-top-color: var(--gold);
}

.dbl-pointer::after {
    bottom: 0;
    border-bottom-color: var(--gold);
}

.chip.black {
    background: #2b2d3f;
}

/* Mines */
.mines-stage {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
}

.mines-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    width: min(460px, 100%);
}

.mine-tile {
    aspect-ratio: 1;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--text) 13%, var(--panel)), color-mix(in srgb, var(--text) 7%, var(--panel)));
    box-shadow: inset 0 -5px 0 rgba(0,0,0,.3);
    display: grid;
    place-items: center;
    transition: transform .12s, background .15s;
}

.mine-tile span {
    font-size: clamp(22px, 4vw, 36px);
    font-family: var(--emoji);
}

.mine-tile.live:hover {
    transform: translateY(-3px);
    background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 30%, var(--panel3)), color-mix(in srgb, var(--accent) 16%, var(--panel2)));
}

.mine-tile:disabled {
    cursor: default;
}

.mine-tile.gem {
    background: color-mix(in srgb, var(--blue) 38%, var(--panel));
    box-shadow: none;
}

.mine-tile.bomb {
    background: color-mix(in srgb, var(--red) 42%, var(--panel));
}

.mine-tile.hit {
    box-shadow: none;
}

.mine-tile.dim {
    opacity: .45;
    box-shadow: none;
}

@keyframes flip {
    from {
        transform: rotateY(90deg) scale(.8);
    }
}

.shake {
    animation: shake .4s;
}

@keyframes shake {
    20%, 60% {
        transform: translateX(-8px);
    }

    40%, 80% {
        transform: translateX(8px);
    }
}

/* Towers */
.towers-stage {
    position: relative;
    width: 100%;
    display: grid;
    place-items: center;
}

.tower {
    width: min(520px, 100%);
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.t-row {
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: .55;
    transition: opacity .2s;
}

.t-row.active {
    opacity: 1;
}

.t-mult {
    width: 70px;
    flex: none;
    text-align: right;
    font-weight: 800;
    font-size: 13px;
    color: var(--muted);
}

.t-row.active .t-mult {
    color: var(--gold);
}

.t-cells {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(var(--cols), 1fr);
    gap: 7px;
}

.t-cell {
    height: 42px;
    border: 0;
    border-radius: 9px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--text) 13%, var(--panel)), color-mix(in srgb, var(--text) 7%, var(--panel)));
    box-shadow: inset 0 -4px 0 rgba(0,0,0,.3);
    display: grid;
    place-items: center;
}

.t-cell span {
    font-family: var(--emoji);
    font-size: 20px;
}

.t-row.active .t-cell:not(:disabled) {
    background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 45%, var(--panel3)), color-mix(in srgb, var(--accent) 25%, var(--panel2)));
    box-shadow: inset 0 -4px 0 rgba(0,0,0,.3), 0 0 0 1px var(--accent2);
}

.t-row.active .t-cell:not(:disabled):hover {
    transform: translateY(-2px);
    filter: brightness(1.15);
}

.t-cell.safe {
    background: linear-gradient(180deg, #14532d, #0f3d22) !important;
    box-shadow: inset 0 0 0 2px var(--green) !important;
    animation: flip .3s;
}

.t-cell.bomb {
    background: linear-gradient(180deg, #4c1d1d, #2a1010) !important;
}

.t-cell.hit {
    box-shadow: inset 0 0 0 2px var(--red), 0 0 20px rgba(239,68,68,.5) !important;
}

.t-cell.dim {
    opacity: .5;
    box-shadow: none !important;
    animation: none;
}

/* Crash */
.crash-stage {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-self: stretch;
}

.crash-history {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow: hidden;
}

.crash-canvas-wrap {
    position: relative;
    flex: 1;
    min-height: 380px;
    border-radius: 12px;
    background: var(--bg2);
    border: 1px solid var(--line);
    overflow: hidden;
}

.crash-canvas-wrap canvas {
    position: absolute;
    inset: 0;
}

.crash-center {
    position: absolute;
    left: 50%;
    top: 42%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
}

.crash-mult {
    display: block;
    font-size: clamp(44px, 7vw, 76px);
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 4px 20px rgba(0,0,0,.5);
}

.crash-mult.waiting {
    font-size: 28px;
    text-transform: uppercase;
    color: var(--muted);
}

.crash-mult.crashed {
    color: var(--red);
}

.crash-sub {
    color: var(--muted);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: .05em;
}

.crash-players {
    border-top: 1px solid var(--line);
    padding-top: 12px;
}

.cp-head {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 8px;
}

.cp-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 240px;
    overflow-y: auto;
}

.cp-row {
    display: grid;
    grid-template-columns: 1fr auto 56px;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 8px;
    background: var(--bg2);
    font-size: 12px;
}

.cp-row > span:last-child {
    text-align: right;
    font-weight: 800;
}

.cp-row .player img {
    width: 20px;
    height: 20px;
}

.cp-row.won {
    background: rgba(34,197,94,.1);
}

.cp-row.lost {
    opacity: .55;
}

.cp-row.mine {
    box-shadow: inset 0 0 0 1px var(--accent);
}

/* Plinko */
.plinko-stage {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.plinko-board {
    width: 100%;
    max-width: 700px;
}

.plinko-board canvas {
    display: block;
    width: 100%;
}

.plinko-slots {
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: 700px;
    margin-top: -4px;
}

.p-slot {
    width: calc(var(--sp) - 4px);
    margin: 0 2px;
    height: 30px;
    border-radius: 6px;
    display: grid;
    place-items: center;
    font-size: clamp(8px, calc(var(--sp) * .24), 12px);
    font-weight: 900;
    color: #1a1027;
    background: var(--slot);
    box-shadow: inset 0 -3px 0 rgba(0,0,0,.25);
}

.p-slot.hit {
    animation: slotHit .35s;
}

@keyframes slotHit {
    40% {
        transform: translateY(6px);
        filter: brightness(1.4);
    }
}

/* Blackjack */
.bj-actions {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
}

.bj-stage {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 26px;
}

.bj-hand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.bj-label {
    font-weight: 800;
    text-transform: uppercase;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.bj-score {
    min-width: 30px;
    padding: 3px 8px;
    border-radius: 6px;
    background: var(--panel3);
    color: var(--text);
    text-align: center;
}

.bj-score:empty {
    display: none;
}

.bj-cards {
    display: flex;
    min-height: 132px;
}

.pcard {
    position: relative;
    width: 92px;
    height: 130px;
    margin-left: -34px;
    border-radius: 10px;
    background: #fbfbff;
    color: #1a1b2e;
    box-shadow: 0 8px 22px rgba(0,0,0,.45);
    display: grid;
    place-items: center;
}

.pcard:first-child {
    margin-left: 0;
}

.pcard.red {
    color: #dc2626;
}

.pcard b {
    position: absolute;
    top: 7px;
    left: 9px;
    font-size: 18px;
    font-weight: 900;
}

.pcard b.flip {
    top: auto;
    left: auto;
    bottom: 7px;
    right: 9px;
    transform: rotate(180deg);
}

.pcard i {
    font-style: normal;
    font-size: 40px;
}

.pcard.back {
    background: repeating-linear-gradient(45deg, var(--accent) 0 8px, var(--accent-d) 8px 16px);
    border: 4px solid #fbfbff;
}

.pcard.deal {
    animation: deal .3s ease-out;
}

@keyframes deal {
    from {
        transform: translate(60px, -80px) rotate(12deg);
        opacity: 0;
    }
}

/* --- Cases ----------------------------------------------------------------------------- */
.case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}

.case-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px 16px 16px;
    border-radius: var(--r);
    background: radial-gradient(160px 120px at 50% 30%, color-mix(in srgb, var(--c1) 45%, transparent), transparent 70%), var(--panel);
    border: 1px solid var(--line);
    transition: .2s;
    text-align: center;
}

.case-card:hover {
    transform: translateY(-4px);
    border-color: var(--c1);
}

.cc-art {
    font-size: 72px;
    font-family: var(--emoji);
    filter: drop-shadow(0 10px 18px rgba(0,0,0,.5));
    transition: transform .25s;
}

.case-card:hover .cc-art {
    transform: scale(1.08) rotate(-5deg);
}

.case-card b {
    font-size: 15px;
    text-transform: uppercase;
}

.cc-loot {
    display: flex;
    gap: 6px;
}

.cc-loot span {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 7px;
    font-family: var(--emoji);
    font-size: 16px;
    background: var(--bg2);
    border-bottom: 2px solid var(--common);
}

.cc-loot .uncommon {
    border-color: var(--uncommon);
}

.cc-loot .rare {
    border-color: var(--rare);
}

.cc-loot .epic {
    border-color: var(--epic);
}

.cc-loot .legendary {
    border-color: var(--legendary);
}

.cc-loot .mythic {
    border-color: var(--mythic);
}

.case-top {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.case-title {
    display: flex;
    align-items: center;
    gap: 14px;
}

.case-title h1 {
    font-size: 24px;
    text-transform: uppercase;
}

.case-art {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    font-size: 36px;
    font-family: var(--emoji);
    background: linear-gradient(160deg, var(--c1), var(--c2));
}

.case-open {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.reels {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.reel {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: var(--bg2);
    border: 1px solid var(--line);
}

.reel-x {
    height: 150px;
    -webkit-mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
    mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.reel-y {
    height: 250px;
    -webkit-mask: linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent);
    mask: linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent);
}

.reel-strip {
    display: flex;
    will-change: transform;
}

.reel-x .reel-strip {
    padding: 10px 0;
}

.reel-y .reel-strip {
    flex-direction: column;
}

.reel-line {
    position: absolute;
    background: var(--gold);
    box-shadow: 0 0 12px var(--gold);
    z-index: 2;
}

.reel-x .reel-line {
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    margin-left: -1px;
}

.reel-y .reel-line {
    left: 0;
    right: 0;
    top: 50%;
    height: 2px;
    margin-top: -1px;
}

.r-item {
    --rc: var(--common);
    flex: none;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    border-radius: 10px;
    text-align: center;
    overflow: hidden;
    background: radial-gradient(80px 60px at 50% 35%, color-mix(in srgb, var(--rc) 30%, transparent), transparent 75%), var(--panel2);
    border-bottom: 3px solid var(--rc);
}

.r-item.uncommon {
    --rc: var(--uncommon);
}

.r-item.rare {
    --rc: var(--rare);
}

.r-item.epic {
    --rc: var(--epic);
}

.r-item.legendary {
    --rc: var(--legendary);
}

.r-item.mythic {
    --rc: var(--mythic);
}

.reel-x .r-item {
    width: 120px;
    height: 130px;
    margin: 0 4px;
}

.reel-y .r-item {
    height: 104px;
    margin: 4px 8px;
}

.r-item .e {
    font-size: 44px;
    font-family: var(--emoji);
    line-height: 1.1;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,.4));
}

.reel-y .r-item .e {
    font-size: 38px;
}

.r-item small {
    font-size: 11px;
    color: var(--muted);
    font-weight: 600;
    max-width: 100%;
    padding: 0 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.r-item b {
    font-size: 12px;
}

.r-item.won {
    box-shadow: 0 0 0 2px var(--rc), 0 0 30px color-mix(in srgb, var(--rc) 60%, transparent);
    animation: wonPulse 1s ease-in-out 2;
}

@keyframes wonPulse {
    50% {
        transform: scale(1.06);
    }
}

.r-item.mini {
    width: 96px;
    height: 100px;
}

.r-item.mini .e {
    font-size: 32px;
}

.case-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.case-count .seg {
    width: 220px;
}

.case-result {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.case-result:empty {
    display: none;
}

.won-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.loot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.loot {
    --rc: var(--common);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 16px 10px 12px;
    border-radius: 12px;
    text-align: center;
    background: radial-gradient(90px 70px at 50% 30%, color-mix(in srgb, var(--rc) 25%, transparent), transparent 75%), var(--panel);
    border: 1px solid var(--line);
    border-bottom: 3px solid var(--rc);
}

.loot.uncommon {
    --rc: var(--uncommon);
}

.loot.rare {
    --rc: var(--rare);
}

.loot.epic {
    --rc: var(--epic);
}

.loot.legendary {
    --rc: var(--legendary);
}

.loot.mythic {
    --rc: var(--mythic);
}

.loot .e {
    font-size: 42px;
    font-family: var(--emoji);
}

.loot b {
    font-size: 13px;
}

.loot small {
    color: var(--muted);
    font-weight: 700;
}

/* --- Battles ----------------------------------------------------------------------------- */
.battle-create {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.battle-create h3 {
    text-transform: uppercase;
    font-size: 16px;
}

.bc-grid {
    display: grid;
    grid-template-columns: 1.4fr .6fr 1.4fr 1fr;
    gap: 14px;
    align-items: end;
}

.bc-grid.two {
    grid-template-columns: 1fr 1fr;
}

.bc-grid .switch {
    height: 42px;
}

.bc-foot {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
}

.lobbies {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lobby {
    display: grid;
    grid-template-columns: 110px 1fr auto 120px auto;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    border-radius: 12px;
    background: var(--panel);
    border: 1px solid var(--line);
    animation: slideIn .3s;
}

.lobby-cases {
    display: flex;
    gap: 4px;
    font-family: var(--emoji);
    font-size: 24px;
    overflow: hidden;
}

.lobby-players {
    display: flex;
    gap: 6px;
}

.lobby-players img, .slot-empty {
    width: 30px;
    height: 30px;
    border-radius: 7px;
}

.slot-empty {
    display: inline-block;
    border: 2px dashed var(--line2);
}

.lobby-cost {
    text-align: right;
}

.battle-head {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    flex-wrap: wrap;
}

.bh-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.bh-cases {
    display: flex;
    gap: 4px;
    font-family: var(--emoji);
    font-size: 22px;
}

.bh-cases span {
    opacity: .35;
    transition: .2s;
}

.bh-cases span.on {
    opacity: 1;
    transform: scale(1.2);
}

.bh-status {
    font-weight: 800;
    text-transform: uppercase;
    color: var(--gold);
}

.battle-cols {
    display: grid;
    grid-template-columns: repeat(var(--n), 1fr);
    gap: 12px;
    margin-top: 14px;
}

.bcol {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    border-radius: var(--r);
    background: var(--panel);
    border: 1px solid var(--line);
    border-top: 3px solid var(--accent);
    transition: .3s;
    min-width: 0;
}

.bcol.team-1 {
    border-top-color: var(--blue);
}

.bcol.team-2 {
    border-top-color: var(--green);
}

.bcol.team-3 {
    border-top-color: var(--gold);
}

.bcol.winner {
    border-color: var(--green);
    box-shadow: 0 0 30px rgba(34,197,94,.25);
}

.bcol.loser {
    opacity: .6;
}

.bp-head {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    font-weight: 700;
    min-width: 0;
}

.bp-head img {
    width: 30px;
    height: 30px;
}

.bp-head b {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bp-total {
    text-align: center;
    font-size: 18px;
}

.bp-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
    gap: 6px;
}

.bp-items .r-item.mini {
    width: auto;
    height: 92px;
}

.bp-items .r-item.mini .e {
    font-size: 28px;
}

.battle-result {
    margin-top: 16px;
}

.br-card {
    padding: 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
    animation: pop .3s;
}

.br-card.win {
    border-color: var(--green);
    background: linear-gradient(180deg, rgba(34,197,94,.12), var(--panel));
}

.br-card.lose {
    border-color: var(--line2);
}

.br-title {
    font-size: 24px;
    font-weight: 900;
    text-transform: uppercase;
}

.br-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 6px;
}

/* --- Rewards ----------------------------------------------------------------------------- */
.rewards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}

.rw {
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rw h3 {
    text-transform: uppercase;
    font-size: 16px;
}

.rw-art {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: var(--gold);
    background: color-mix(in srgb, var(--gold) 12%, transparent);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 22%, transparent);
}

.rw-art .ic {
    width: 26px;
    height: 26px;
}

.rw-action, .promo-form, .rw .copy-row {
    margin-top: auto;
}

.rw-amount {
    font-size: 22px;
    margin-bottom: 8px;
}

.promo-form {
    display: flex;
    gap: 8px;
}

.promo-form input {
    flex: 1;
    min-width: 0;
    text-transform: uppercase;
}

/* --- Race ------------------------------------------------------------------------------------ */
.race-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 26px 28px;
    background: linear-gradient(120deg, color-mix(in srgb, var(--gold) 18%, var(--panel)), var(--panel) 60%);
    border-color: color-mix(in srgb, var(--gold) 35%, var(--line));
}

.race-hero h1 {
    font-size: 30px;
    text-transform: uppercase;
    margin: 8px 0 4px;
}

.race-timer {
    text-align: center;
    padding: 14px 20px;
    border-radius: 12px;
    background: rgba(0,0,0,.3);
}

.race-timer small {
    display: block;
    color: var(--muted);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
}

.race-timer b {
    font-size: 24px;
    font-variant-numeric: tabular-nums;
    color: var(--gold);
}

.podium {
    display: grid;
    grid-template-columns: 1fr 1.1fr 1fr;
    gap: 14px;
    align-items: end;
    margin: 22px 0;
}

.pod {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 22px 12px 16px;
    border-radius: var(--r);
    background: var(--panel);
    border: 1px solid var(--line);
    text-align: center;
}

.pod.p1 {
    padding-top: 34px;
    border-color: #a16207;
    background: linear-gradient(180deg, rgba(251,191,36,.14), var(--panel));
}

.pod.p2 {
    border-color: #64748b;
}

.pod.p3 {
    border-color: #9a3412;
}

.pod.mine {
    box-shadow: 0 0 0 2px var(--accent);
}

.pod img {
    width: 56px;
    height: 56px;
    image-rendering: pixelated;
    border-radius: 10px;
}

.pod .medal {
    position: absolute;
    top: -16px;
    font-size: 30px;
    font-family: var(--emoji);
}

.pod b {
    font-size: 15px;
}

.pod-prize {
    margin-top: 4px;
    padding: 5px 12px;
    border-radius: 8px;
    background: rgba(34,197,94,.12);
}

.my-race {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    margin-bottom: 14px;
    border-color: var(--accent-d);
}

.my-race img {
    width: 40px;
    height: 40px;
}

.race-table td:first-child {
    width: 50px;
    font-weight: 800;
    color: var(--muted);
}

/* --- Fairness ---------------------------------------------------------------------------------- */
.fair-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px;
}

.fair-grid > .panel {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.fair-grid .field, .fair-grid .bc-grid > * {
    min-width: 0;
}

.fair-grid h3, .fair-explain h3 {
    text-transform: uppercase;
    font-size: 15px;
}

.prev {
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-top: 1px solid var(--line);
    padding-top: 14px;
}

.prev:empty {
    display: none;
}

.prev h4 {
    font-size: 13px;
    text-transform: uppercase;
    color: var(--muted);
}

.verify-out {
    min-height: 70px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
}

.verify-out b {
    color: var(--gold);
    font-size: 15px;
}

.fair-explain {
    margin-top: 14px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* --- Profile ------------------------------------------------------------------------------------ */
.profile-head {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px;
    flex-wrap: wrap;
}

.big-avatar {
    width: 72px;
    height: 72px;
    image-rendering: pixelated;
    border-radius: 14px;
    box-shadow: 0 0 0 3px var(--accent);
}

.profile-head h1 {
    font-size: 26px;
}

.profile-actions {
    margin-left: auto;
    display: flex;
    gap: 8px;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-top: 14px;
}

.stat-card {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stat-card small {
    color: var(--muted);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
}

.stat-card b {
    font-size: 18px;
}

.danger-zone {
    margin-top: 28px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border-color: rgba(239,68,68,.3);
}

/* --- Modal & toasts ------------------------------------------------------------------------------ */
.modal-back {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 16px;
    background: rgba(5, 5, 15, .7);
    backdrop-filter: blur(4px);
    animation: fadeIn .2s;
}

.modal {
    width: min(440px, 100%);
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    border-radius: 16px;
    background: var(--panel);
    border: 1px solid var(--line2);
    box-shadow: 0 30px 80px rgba(0,0,0,.6);
    animation: pop .2s ease-out;
}

.modal.wide {
    width: min(760px, 100%);
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid var(--line);
}

.modal-head h3 {
    text-transform: uppercase;
    font-size: 16px;
}

.modal-body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.wallet-bal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-radius: 12px;
    background: var(--bg2);
    margin-bottom: 14px;
}

.wallet-bal small {
    color: var(--muted);
    font-weight: 700;
    text-transform: uppercase;
}

.wallet-bal b {
    font-size: 20px;
}

.wallet .tabs {
    width: 100%;
}

.wallet .tabs button {
    flex: 1;
}

.wallet-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.topups {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.signin {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.signin-preview {
    display: flex;
    align-items: center;
    gap: 12px;
}

.signin-preview img {
    width: 56px;
    height: 56px;
    image-rendering: pixelated;
    border-radius: 10px;
}

#toasts {
    --fx: 32px;
    --fy: 16px;
    --tw: 360px;
    --tf: 13px;
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-end;
    pointer-events: none;
    max-width: calc(100vw - 32px);
}

/* Toast: icon / avatar, optional title, message, amount. --tc is the accent colour of the type. */
.toast {
    --tc: var(--gold);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 1em;
    width: var(--tw);
    max-width: 100%;
    padding: .9em 2.6em .95em .85em;
    font-size: var(--tf);
    border-radius: 1.1em;
    background:
        linear-gradient(100deg, color-mix(in srgb, var(--tc) 20%, transparent), transparent 55%),
        color-mix(in srgb, var(--panel2) 78%, transparent);
    -webkit-backdrop-filter: blur(16px) saturate(1.5);
    backdrop-filter: blur(16px) saturate(1.5);
    border: 1px solid color-mix(in srgb, var(--tc) 38%, var(--line2));
    box-shadow: 0 16px 40px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.04) inset, 0 0 26px color-mix(in srgb, var(--tc) 18%, transparent);
    pointer-events: auto;
    cursor: pointer;
    animation: toastIn .38s cubic-bezier(.2,.9,.25,1.15);
    transition: opacity .3s, transform .3s;
}


/* soft light behind the icon */
.toast .t-glow {
    position: absolute;
    left: -2em;
    top: 50%;
    width: 7em;
    height: 7em;
    margin-top: -3.5em;
    border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--tc) 40%, transparent), transparent 68%);
    opacity: .55;
    pointer-events: none;
}

.toast .t-ic {
    position: relative;
    flex: none;
    width: 2.8em;
    height: 2.8em;
    display: grid;
    place-items: center;
    border-radius: .85em;
    color: #fff;
    background: linear-gradient(145deg, color-mix(in srgb, var(--tc) 95%, #fff), color-mix(in srgb, var(--tc) 55%, #000));
    box-shadow: 0 6px 16px color-mix(in srgb, var(--tc) 45%, transparent), inset 0 1px 0 rgba(255,255,255,.35);
}

.toast .t-ic svg {
    width: 1.5em;
    height: 1.5em;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.toast .t-ic.has-img {
    background: var(--panel3);
    box-shadow: 0 0 0 2px var(--tc), 0 6px 16px color-mix(in srgb, var(--tc) 45%, transparent);
}

.toast .t-ic img {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    image-rendering: pixelated;
}

.toast .t-badge {
    position: absolute;
    right: -.55em;
    bottom: -.55em;
    width: 1.55em;
    height: 1.55em;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--tc);
    color: #000;
    border: 2px solid var(--panel2);
}

.toast .t-badge svg { width: .9em; height: .9em; stroke-width: 3; }
.toast .t-emoji { font-size: 1.5em; line-height: 1; }
.toast .t-ic { animation: tipPop .7s ease-out; }

.toast .t-main {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: .2em;
    line-height: 1.35;
}

.toast .t-title {
    font-size: .8em;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--tc);
}

.toast .t-msg { font-size: 1em; font-weight: 600; color: var(--text); word-break: break-word; }
.toast .t-title + .t-msg { font-weight: 500; color: color-mix(in srgb, var(--text) 80%, var(--panel2)); }

.toast .t-amt {
    align-self: flex-start;
    margin-top: .25em;
    padding: .25em .7em;
    border-radius: 999px;
    font-size: 1.05em;
    font-weight: 800;
    color: var(--tc);
    background: color-mix(in srgb, var(--tc) 14%, transparent);
    border: 1px solid color-mix(in srgb, var(--tc) 35%, transparent);
    font-variant-numeric: tabular-nums;
}

.toast .t-amt .coin { width: 1em; height: 1em; }

.toast .t-count {
    position: absolute;
    right: 2.4em;
    top: .65em;
    padding: .05em .55em;
    border-radius: 999px;
    font-size: .85em;
    font-weight: 800;
    color: #0b1220;
    background: var(--tc);
}

.toast .t-count[hidden] { display: none; }
.toast .t-count.pop { animation: toastPop .25s ease-out; }

/* gold shimmer sweeps over tips */
.toast::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.22) 50%, transparent 65%);
    transform: translateX(-120%);
    animation: toastShine 1.6s .3s ease-out 2;
    pointer-events: none;
}

.toast .t-x {
    position: absolute;
    right: .5em;
    top: .5em;
    width: 1.8em;
    height: 1.8em;
    border: 0;
    border-radius: .5em;
    background: none;
    color: var(--muted);
    font-size: 1.25em;
    line-height: 1;
    cursor: pointer;
    opacity: .55;
}

.toast:hover .t-x { opacity: 1; background: rgba(255,255,255,.1); }

/* time left */
.toast .t-bar {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: 100%;
    background: linear-gradient(90deg, var(--tc), color-mix(in srgb, var(--tc) 40%, transparent));
    transform-origin: left;
    animation: toastBar var(--ms, 4s) linear forwards;
}

#toasts[data-bar="off"] .toast .t-bar { display: none; }

.toast.out {
    opacity: 0;
    transform: translate(var(--fx), var(--fy)) scale(.96);
    pointer-events: none;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translate(var(--fx), var(--fy)) scale(.94);
    }
}

@keyframes toastBar {
    to { transform: scaleX(0); }
}

@keyframes toastPop {
    50% { transform: scale(1.35); }
}

@keyframes toastShine {
    to { transform: translateX(120%); }
}

@keyframes tipPop {
    0% { transform: scale(.4) rotate(-20deg); }
    60% { transform: scale(1.25) rotate(8deg); }
    100% { transform: scale(1) rotate(0); }
}

@media (max-width: 700px) {
    #toasts { left: 12px !important; right: 12px !important; align-items: stretch !important; max-width: none; }
    #toasts { bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
    .toast { width: auto; max-width: none; }
}

.reduce-motion .toast, .reduce-motion .toast .t-ic, .reduce-motion .toast::after { animation: none; transition: none; }
.reduce-motion .toast .t-bar { animation: none; display: none; }
@media (prefers-reduced-motion: reduce) {
    .toast, .toast .t-ic, .toast::after { animation: none; }
}

/* --- Chat commands: suggestions, hint line, tips in the chat ------------------------------------ */
.chat-form { position: relative; }

.chat-assist {
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: calc(100% - 4px);
    z-index: 30;
    border-radius: 12px;
    border: 1px solid var(--line2);
    background: var(--panel2);
    box-shadow: 0 -10px 30px rgba(0,0,0,.45);
    overflow: hidden;
}

.chat-suggest { max-height: 248px; overflow-y: auto; padding: 4px; }
.chat-suggest[hidden], .chat-hint[hidden] { display: none; }

.cs-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 9px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.cs-item img { width: 24px; height: 24px; flex: none; border-radius: 6px; image-rendering: pixelated; }
.cs-item .cs-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.cs-item mark { background: none; color: var(--gold); font-weight: 800; }
.cs-item.on, .cs-item:hover { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.cs-item.cmd { flex-direction: column; align-items: flex-start; gap: 1px; }
.cs-item.cmd small { color: var(--muted); font-weight: 500; }
.cs-item .badge { height: 16px; font-size: 9px; padding: 0 5px; }

.chat-hint {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    padding: 8px 12px;
    font-size: 12px;
    border-top: 1px solid var(--line);
    background: color-mix(in srgb, var(--panel) 60%, var(--panel2));
}

.chat-suggest[hidden] + .chat-hint { border-top: 0; }
.chat-hint .ok { color: #86efac; }
.chat-hint .bad { color: #fca5a5; }
.chat-hint .warn { color: #fcd34d; }
.chat-hint .muted { color: var(--muted); }
.chat-hint .money { font-weight: 800; }
.chat-hint .chips { display: flex; gap: 6px; flex-wrap: wrap; }

.chip-btn {
    padding: 3px 9px;
    border-radius: 99px;
    border: 1px solid var(--line2);
    background: var(--panel3);
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.chip-btn:hover { border-color: var(--gold); color: var(--gold); }

.msg .nm { cursor: pointer; }
.msg.me .nm { cursor: default; }
.msg .nm:hover { text-decoration: underline; }

.msg.system.tip {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(90deg, rgba(255,179,71,.16), rgba(255,179,71,.04));
    border: 1px solid rgba(255,179,71,.28);
    color: var(--text);
}

.msg.system.tip.mine { border-color: var(--gold); background: linear-gradient(90deg, rgba(255,179,71,.3), rgba(255,179,71,.08)); }
.msg.system.tip .tip-ic { flex: none; display: grid; place-items: center; color: var(--gold); }
.msg.system.tip .tip-ic .ic { width: 16px; height: 16px; }
.msg.system.tip b { color: var(--gold); }

.tip-confirm { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.tip-confirm img { width: 56px; height: 56px; border-radius: 12px; image-rendering: pixelated; }
.tip-confirm p { font-size: 16px; }
.tip-confirm .tc-actions { display: flex; gap: 10px; margin-top: 6px; }

/* --- Footer & misc --------------------------------------------------------------------------------- */
.footer {
    max-width: 1240px;
    margin: 40px auto 0;
    padding: 30px 24px 26px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 24px;
    border-top: 1px solid var(--line);
}

.footer h4 {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 10px;
    letter-spacing: .06em;
}

.footer a:not(.logo) {
    display: block;
    padding: 4px 0;
    color: var(--muted);
    font-size: 13px;
}

.footer a:not(.logo):hover {
    color: var(--accent2);
}

.f-brand p {
    margin-top: 10px;
    font-size: 13px;
    max-width: 360px;
}

.f-legal {
    grid-column: 1 / -1;
    font-size: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.empty-page {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding-top: 80px;
}

.empty-page .big {
    font-size: 80px;
    font-family: var(--emoji);
}

/* --- Cash desk & auth ------------------------------------------------------------------------------------ */
.modal.cashdesk {
    width: min(460px, 100%);
    background: var(--bg2);
}

.cashdesk .modal-head {
    border-bottom: 0;
    padding-bottom: 4px;
}

.cashdesk .modal-head h3 {
    font-size: 20px;
}

.cd {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cd-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    padding: 5px;
    border-radius: 10px;
    background: var(--bg);
    border: 1px solid var(--line);
}

.cd-tabs button {
    height: 40px;
    border: 0;
    border-radius: 7px;
    background: none;
    color: var(--muted);
    font-weight: 800;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.cd-tabs button.on {
    background: var(--panel3);
    color: var(--text);
    box-shadow: inset 0 -2px 0 var(--accent);
}

.cd-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cd-methods {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.cd-method {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    background: var(--panel2);
    border: 1px solid var(--line);
}

.cd-method.on {
    border-color: var(--accent);
    box-shadow: inset 0 0 0 1px var(--accent);
}

.cd-method span {
    font-size: 30px;
    font-family: var(--emoji);
}

.cd-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--muted);
    letter-spacing: .05em;
}

.cd-row .money {
    color: var(--text);
    font-size: 14px;
}

.cd-foot {
    text-align: center;
    font-size: 12px;
    color: var(--muted);
}

.cd-foot a {
    color: var(--accent2);
    text-decoration: underline;
}

.cd-promo {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.auth-tabs {
    width: 100%;
}

.auth-tabs button {
    flex: 1;
}

.boot-error {
    max-width: 480px;
    margin: 120px auto;
    text-align: center;
    padding: 16px;
}

.boot-error h1 {
    margin-bottom: 10px;
}

.empty-box {
    padding: 18px;
    text-align: center;
}

.empty-pod {
    opacity: .55;
}

.battle-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.battle-actions:empty {
    display: none;
}

.bc-grid.three {
    grid-template-columns: repeat(3, 1fr);
}

.pw-form {
    margin-top: 28px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: flex-start;
}

.pw-form .bc-grid {
    width: 100%;
}

.msg {
    position: relative;
}

.msg-del {
    position: absolute;
    right: 0;
    top: 0;
    border: 0;
    background: none;
    color: var(--red);
    opacity: 0;
    font-size: 12px;
}

.msg-del .ic {
    width: 14px;
    height: 14px;
}

.msg:hover .msg-del {
    opacity: .8;
}

.msg b .badge {
    height: 16px;
    font-size: 9px;
    padding: 0 5px;
    vertical-align: 1px;
}

/* --- Admin --------------------------------------------------------------------------------------------- */
.theme-presets {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 10px;
}

.theme-preset {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--r-sm);
    border: 1px solid var(--line2);
    background: var(--pb);
    color: var(--pt);
    font-weight: 700;
    text-align: left;
}

.theme-preset.on {
    box-shadow: 0 0 0 2px var(--pa);
}

.tp-swatch {
    display: flex;
    flex: none;
}

.tp-swatch i {
    width: 16px;
    height: 28px;
}

.tp-swatch i:nth-child(1) {
    background: var(--pa);
    border-radius: 6px 0 0 6px;
}

.tp-swatch i:nth-child(2) {
    background: var(--pg);
}

.tp-swatch i:nth-child(3) {
    background: var(--pp);
    border-radius: 0 6px 6px 0;
}

.color-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-weight: 600;
}

.color-ctl {
    display: flex;
    align-items: center;
    gap: 8px;
}

.color-ctl input[type=color] {
    width: 44px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--line2);
    border-radius: 8px;
    background: none;
    cursor: pointer;
}

.theme-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 14px;
    border-radius: var(--r-sm);
    background: var(--bg);
    border: 1px solid var(--line);
}

input[type=range].t-rad {
    width: 100%;
    accent-color: var(--accent);
}

.admin-toolbar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-toolbar .text-input {
    flex: 1;
    min-width: 180px;
}

.admin-toolbar .select {
    width: auto;
    min-width: 160px;
}

.admin-stats {
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    margin: 0 0 14px;
}

.admin-log {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    max-height: 360px;
    overflow-y: auto;
}

.admin-chat {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 480px;
    overflow-y: auto;
}

.ac-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    background: var(--bg2);
    font-size: 13px;
    flex-wrap: wrap;
}

.ac-row .ac-text {
    flex: 1;
    min-width: 160px;
    word-break: break-word;
}

.ac-row.deleted {
    opacity: .5;
}

.admin-save {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
}

.admin-user {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.admin-user .stat-grid {
    margin: 0;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
}

.announce {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 16px;
    text-align: center;
    font-weight: 700;
    font-size: 13px;
    color: var(--on-accent);
    background: linear-gradient(90deg, var(--accent-d), var(--accent), var(--accent-d));
}

.announce[hidden] {
    display: none;
}

.admin-auth {
    max-width: 420px;
    margin: 40px auto;
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: center;
}

.admin-auth h1 {
    font-size: 22px;
    text-transform: uppercase;
}

.admin-lock {
    font-size: 44px;
    font-family: var(--emoji);
}

.admin-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    text-align: left;
    margin-top: 6px;
}

.admin-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.admin-head h1 {
    font-size: 26px;
    text-transform: uppercase;
}

.admin-tabs {
    display: flex;
    flex-wrap: wrap;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: 14px;
}

.admin-card {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.admin-card.wide {
    grid-column: 1 / -1;
}

.admin-card h3 {
    text-transform: uppercase;
    font-size: 15px;
}

.admin-player {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-player img {
    width: 48px;
    height: 48px;
    image-rendering: pixelated;
    border-radius: 10px;
}

.admin-btns {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.admin-btns.col {
    flex-direction: column;
}

.admin-btns .btn {
    flex: 1;
}

.admin-games {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px;
}

.admin-game {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--r-sm);
    background: var(--bg2);
    border: 1px solid var(--line);
    cursor: pointer;
}

.admin-game b {
    flex: 1;
}

.game-icon.sm {
    width: 34px;
    height: 34px;
    font-size: 18px;
    border-radius: 8px;
}

/* --- Settings ---------------------------------------------------------------------------------------------- */
.set-mode {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    padding: 16px 20px;
    margin-bottom: 14px;
    border-color: color-mix(in srgb, var(--accent) 30%, var(--line));
}

.set-mode b {
    text-transform: uppercase;
    font-size: 14px;
}

/* --- Responsive ------------------------------------------------------------------------------------ */
@media (max-width: 1280px) {
    .bc-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 1180px) {
    .race-pill span {
        display: none;
    }

    .nav-link {
        padding: 0 11px;
        font-size: 14px;
    }

    .topbar {
        gap: 10px;
    }

    .nav {
        margin-left: 0;
    }
}

@media (max-width: 1040px) {
    .logo span {
        display: none;
    }
}

@media (max-width: 1100px) {
    body.chat-open .chat {
        position: fixed;
        top: var(--top);
        left: 0;
        z-index: 40;
        box-shadow: 20px 0 60px rgba(0,0,0,.6);
    }

    .reward-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 920px) {
    .menu-btn {
        display: inline-grid;
    }

    .nav {
        display: none;
        position: fixed;
        top: var(--top);
        left: 0;
        right: 0;
        z-index: 45;
        flex-direction: column;
        align-items: stretch;
        margin: 0;
        padding: 10px 16px 16px;
        background: var(--bg2);
        border-bottom: 1px solid var(--line);
        box-shadow: 0 20px 40px rgba(0,0,0,.5);
    }

    body.nav-open .nav {
        display: flex;
    }

    .nav-settings {
        display: inline-flex;
    }

    .settings-btn {
        display: none;
    }

    .nav-link {
        width: 100%;
        height: 44px;
    }

    .dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        box-shadow: none;
        margin: 4px 0;
    }

    .nav-games.open .dropdown {
        display: grid;
    }

    .race-pill span {
        display: none;
    }

    .game-wrap {
        grid-template-columns: minmax(0, 1fr);
    }

    .game-stage {
        min-height: 380px;
        order: -1;
    }

    .fair-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .footer {
        grid-template-columns: 1fr 1fr;
    }

    .f-brand {
        grid-column: 1 / -1;
    }

    .banner-art {
        right: 24px;
        top: 14px;
        opacity: .85;
    }

    .banner-art svg {
        width: 48px;
        height: 48px;
    }

    .banner {
        flex-direction: column;
        align-items: flex-start;
    }

    .lobby {
        grid-template-columns: auto 1fr auto;
    }

    .lobby-players {
        grid-column: 1 / 3;
    }

    .lobby-cost {
        text-align: left;
    }

    .battle-cols {
        grid-template-columns: repeat(min(var(--n), 2), 1fr);
    }
}

@media (max-width: 640px) {
    :root {
        --top: 58px;
    }

    .topbar {
        gap: 8px;
        padding: 0 12px;
    }

    .logo span {
        display: none;
    }

    .user-chip span {
        display: none;
    }

    .user-chip {
        padding: 0 5px;
    }

    .race-pill {
        padding: 0 10px;
    }

    #bal {
        min-width: 0;
        font-size: 14px;
    }

    .page {
        padding: 16px 16px 30px;
    }

    .hero {
        flex-direction: column;
        align-items: flex-start;
        padding: 22px 18px;
        gap: 10px;
    }

    .hero-mascot {
        width: 70px;
        height: 70px;
    }

    .hero-mascot svg,
    .hero-mascot img {
        width: 64px;
        height: 64px;
    }

    .steps {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .game-grid {
        grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
        gap: 10px;
    }

    .gc-art .emo {
        font-size: 44px;
    }

    .gc-text b {
        font-size: 13px;
    }

    .gc-live {
        display: none;
    }

    .reward-row {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .hide-sm {
        display: none;
    }

    .bets td, .bets th {
        padding: 9px 8px;
    }

    table.bets {
        min-width: 0;
    }

    .game-head .btn {
        display: none;
    }

    .game-stage {
        padding: 14px;
    }

    .dice-result {
        font-size: 48px;
    }

    .coin3d {
        width: 150px;
        height: 150px;
    }

    .stat-grid {
        grid-template-columns: 1fr 1fr;
    }

    .podium {
        grid-template-columns: 1fr;
    }

    .pod.p1 {
        order: -1;
    }

    .race-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer {
        grid-template-columns: 1fr 1fr;
        padding: 24px 16px;
    }

    .bc-grid, .bc-grid.two {
        grid-template-columns: 1fr;
    }

    .bc-foot {
        justify-content: space-between;
    }

    .battle-cols {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .bcol {
        padding: 8px;
    }

    .reel-y .r-item .e {
        font-size: 30px;
    }

    .pcard {
        width: 70px;
        height: 100px;
        margin-left: -26px;
    }

    .pcard i {
        font-size: 30px;
    }

    .danger-zone {
        flex-direction: column;
        align-items: flex-start;
    }

    .profile-actions {
        margin-left: 0;
    }
}

/* --- Withdraw ------------------------------------------------------------------------------------- */
.wd-amount {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 48px;
    padding: 0 6px 0 12px;
    border-radius: var(--r-sm);
    background: var(--bg2);
    box-shadow: inset 0 0 0 1px var(--line2);
}

.wd-amount:focus-within {
    box-shadow: inset 0 0 0 1px var(--accent);
}

.wd-amount .coin {
    width: 22px;
    height: 22px;
    flex: none;
}

.wd-amt {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: 0;
    background: none;
    color: var(--text);
    font: inherit;
    font-weight: 800;
    font-size: 16px;
    outline: none;
}

.wd-amount button {
    flex: none;
    height: 34px;
    padding: 0 9px;
    border: 0;
    border-radius: 8px;
    background: var(--panel3);
    color: var(--muted);
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
}

.wd-amount button:hover {
    color: var(--text);
}

.wd-amount button[data-m="clear"] {
    background: none;
}

.cd-withdraw {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
}

.cd-withdraw .field, .cd-withdraw p {
    min-width: 0;
}

.cd-recent {
    margin-top: 18px;
}

.cd-recent h4 {
    margin: 0 0 6px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted);
}

.cd-wd {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    border-top: 1px solid var(--line);
    font-size: 13px;
}

.cd-wd .muted {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* --- Settings ------------------------------------------------------------------------------------- */
.set-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}

.set-card {
    padding: 18px;
}

.set-card h3 {
    margin: 0 0 6px;
}

.set-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-top: 1px solid var(--line);
    cursor: default;
}

.set-card h3 + .set-row {
    border-top: 0;
}

.set-row b {
    display: block;
}

.set-row small {
    display: block;
    margin-top: 2px;
    line-height: 1.4;
}

.set-row input[type="range"] {
    width: 140px;
    accent-color: var(--accent);
}

.toggle {
    appearance: none;
    flex: none;
    width: 44px;
    height: 24px;
    border-radius: 999px;
    background: var(--panel3);
    box-shadow: inset 0 0 0 1px var(--line2);
    position: relative;
    cursor: pointer;
    transition: background .15s;
}

.toggle::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--muted);
    transition: transform .15s, background .15s;
}

.toggle:checked {
    background: var(--accent);
}

.toggle:checked::after {
    transform: translateX(20px);
    background: var(--on-accent, #fff);
}

.toggle:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after {
    animation-duration: 0s !important;
    animation-delay: 0s !important;
    transition-duration: 0s !important;
}

/* --- Rain captcha --------------------------------------------------------------------------------- */
.rc-form {
    display: grid;
    gap: 12px;
}

.rc-img {
    display: grid;
    place-items: center;
    padding: 10px;
    border-radius: var(--r-sm);
    background: var(--bg2);
    box-shadow: inset 0 0 0 1px var(--line2);
}

.rc-img svg {
    width: 100%;
    max-width: 300px;
    height: auto;
}

.rc-form .text-input {
    text-transform: uppercase;
    letter-spacing: .3em;
    font-weight: 800;
    text-align: center;
}

/* --- Admin: bot ------------------------------------------------------------------------------------- */
.bot-card {
    display: grid;
    gap: 12px;
    align-content: start;
}

.bot-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bot-head img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    image-rendering: pixelated;
}

.bot-head > div {
    flex: 1;
    min-width: 0;
}

.bot-head .muted {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bot-code {
    display: grid;
    gap: 4px;
    padding: 12px;
    border-radius: var(--r-sm);
    background: color-mix(in srgb, var(--gold) 10%, transparent);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 35%, transparent);
}

.bot-code code {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: .15em;
    color: var(--gold);
}

.bot-opts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    font-size: 13px;
}

.bot-opts label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.bot-log {
    max-height: 220px;
    overflow: auto;
    padding: 10px;
    border-radius: var(--r-sm);
    background: var(--bg2);
    font: 12px/1.5 ui-monospace, Consolas, monospace;
    overflow-wrap: anywhere;
}

.bot-log-error {
    color: #fca5a5;
}

.bot-log-self {
    color: var(--gold);
}

.bot-log-system {
    color: var(--muted);
}

/* --- Shared --------------------------------------------------------------------------------------- */
.quick-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: -4px;
}

.quick-row button {
    flex: 1;
    min-width: 48px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    background: var(--panel3);
    color: var(--muted);
    font: inherit;
    font-weight: 800;
    font-size: 12px;
    cursor: pointer;
}

.quick-row button:hover {
    color: var(--text);
}

.turbo-row {
    border-top: 0;
    padding: 4px 0;
}

/* --- Upgrader --------------------------------------------------------------------------------------- */
.upg-stage {
    display: grid;
    justify-items: center;
    gap: 14px;
    padding: 24px 12px;
}

.upg-wheel {
    position: relative;
    width: min(320px, 80vw);
    aspect-ratio: 1;
}

.upg-wheel svg {
    width: 100%;
    height: 100%;
}

.upg-track {
    fill: none;
    stroke: var(--panel3);
    stroke-width: 18;
}

.upg-zone {
    fill: none;
    stroke: var(--gold);
    stroke-width: 18;
    stroke-linecap: butt;
    transition: stroke-dasharray .25s;
    filter: drop-shadow(0 0 6px color-mix(in srgb, var(--gold) 60%, transparent));
}

.upg-pointer {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.upg-pointer i {
    position: absolute;
    left: 50%;
    top: 2%;
    width: 0;
    height: 0;
    transform: translateX(-50%);
    border-left: 11px solid transparent;
    border-right: 11px solid transparent;
    border-top: 22px solid var(--text);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,.6));
}

.upg-center {
    position: absolute;
    inset: 22%;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 2px;
    border-radius: 50%;
    background: var(--panel2);
    box-shadow: inset 0 0 0 1px var(--line2);
    text-align: center;
}

.upg-chance {
    font-size: 30px;
    font-weight: 900;
}

.upg-for {
    font-size: 13px;
}

.upg-wheel.win .upg-center {
    box-shadow: inset 0 0 0 2px #4ade80, 0 0 30px rgba(74, 222, 128, .25);
}

.upg-wheel.lose .upg-center {
    box-shadow: inset 0 0 0 2px #f87171;
}

/* --- Slide ------------------------------------------------------------------------------------------ */
.slide-stage {
    display: grid;
    gap: 14px;
    padding: 18px;
}

.slide-top {
    display: grid;
    gap: 8px;
}

.slide-status {
    font-size: 18px;
}

.slide-bar {
    height: 6px;
    border-radius: 99px;
    background: var(--panel3);
    overflow: hidden;
}

.slide-bar i {
    display: block;
    height: 100%;
    width: 0;
    background: var(--accent);
    transition: width .1s linear;
}

.slide-reel {
    position: relative;
    overflow: hidden;
    height: 96px;
    border-radius: var(--r);
    background: var(--bg2);
    box-shadow: inset 0 0 0 1px var(--line2);
}

.slide-strip {
    display: flex;
    height: 100%;
    will-change: transform;
}

.s-tile {
    box-sizing: border-box;
    flex: none;
    width: 96px;
    height: 100%;
    display: grid;
    place-items: center;
    border-right: 1px solid var(--line);
    font-weight: 900;
    font-size: 17px;
}

.slide-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    transform: translateX(-50%);
    background: var(--gold);
    box-shadow: 0 0 12px var(--gold);
}

.slide-reel.done .slide-line {
    background: var(--text);
}

.m1 {
    color: #9ca3af;
}

.m15 {
    color: #60a5fa;
}

.m2 {
    color: #4ade80;
}

.m3 {
    color: #c084fc;
}

.m10 {
    color: #fbbf24;
}

.s-tile.m10 {
    background: rgba(251, 191, 36, .08);
}

.s-tile.m3 {
    background: rgba(192, 132, 252, .06);
}

.s-chip {
    background: var(--panel3);
}

.m1-t {
    color: #9ca3af;
}

.m15-t {
    color: #60a5fa;
}

.m2-t {
    color: #4ade80;
}

.m3-t {
    color: #c084fc;
}

.m10-t {
    color: #fbbf24;
}

.slide-players {
    display: grid;
    gap: 6px;
}

.sp-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.slide-players .cp-row {
    grid-template-columns: 1fr auto auto auto;
}

/* --- Roulette --------------------------------------------------------------------------------------- */
.rl-stage {
    display: grid;
    gap: 14px;
    padding: 18px;
}

.rl-reel {
    position: relative;
    overflow: hidden;
    height: 72px;
    border-radius: var(--r);
    background: var(--bg2);
    box-shadow: inset 0 0 0 1px var(--line2);
}

.rl-strip {
    display: flex;
    height: 100%;
    will-change: transform;
}

.rl-tile {
    box-sizing: border-box;
    flex: none;
    width: 72px;
    height: 100%;
    display: grid;
    place-items: center;
    font-weight: 900;
    font-size: 20px;
    border-right: 1px solid rgba(0,0,0,.35);
    color: #fff;
}

.rl-tile.red, .rl-cell.red, .rl-h.red, .rl-num.red {
    background: #c62828;
}

.rl-tile.black, .rl-cell.black, .rl-h.black, .rl-num.black {
    background: #1f2229;
}

.rl-tile.green, .rl-cell.green, .rl-h.green, .rl-num.green {
    background: #15803d;
}

.rl-result {
    text-align: center;
    font-weight: 700;
    min-height: 26px;
}

.rl-num {
    display: inline-grid;
    place-items: center;
    min-width: 30px;
    height: 26px;
    padding: 0 6px;
    border-radius: 6px;
    color: #fff;
}

.rl-h {
    color: #fff;
}

.rl-board-wrap {
    overflow-x: auto;
    padding-bottom: 4px;
}

.rl-board {
    display: grid;
    grid-template-columns: 44px repeat(12, minmax(34px, 1fr)) 48px;
    grid-template-rows: repeat(3, 42px) 38px 38px;
    gap: 3px;
    min-width: 600px;
}

.rl-cell {
    position: relative;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 6px;
    background: var(--panel3);
    color: #fff;
    font: inherit;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    transition: filter .1s, box-shadow .1s;
}

.rl-cell:hover {
    filter: brightness(1.25);
}

.rl-cell.out.red, .rl-cell.out.black {
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.15);
}

.rl-cell.hit {
    box-shadow: 0 0 0 2px var(--gold), 0 0 14px var(--gold);
}

.rl-chip {
    position: absolute;
    right: 2px;
    top: 2px;
    min-width: 20px;
    height: 18px;
    padding: 0 4px;
    border-radius: 9px;
    background: var(--gold);
    color: #1a1205;
    font-style: normal;
    font-size: 10px;
    font-weight: 900;
    display: grid;
    place-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,.5);
}

.rl-chip[hidden] {
    display: none;
}

/* --- Two-factor code dialog ----------------------------------------------------------------------- */
.code-form {
    display: grid;
    gap: 12px;
    justify-items: center;
    text-align: center;
}

.code-icon {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: color-mix(in srgb, var(--accent) 18%, transparent);
    color: var(--accent);
}

.code-icon .ic {
    width: 28px;
    height: 28px;
}

.code-form p {
    margin: 0;
}

.code-input {
    width: 100%;
    text-align: center;
    font-size: 28px;
    font-weight: 900;
    letter-spacing: .2em;
    height: 60px;
}

.s-account .copy-row {
    margin-top: 4px;
}

/* --- Blackjack table ---------------------------------------------------------------------------------- */
.bj-stage {
    gap: 14px;
    padding: 0;
}

.bj-table {
    position: relative;
    width: 100%;
    display: grid;
    justify-items: center;
    gap: 10px;
    padding: 26px 16px 22px;
    border-radius: 28px 28px 50% 50% / 28px 28px 22% 22%;
    background: radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--accent) 30%, var(--bg)) 0%, color-mix(in srgb, var(--accent) 10%, var(--bg)) 55%, var(--bg) 100%);
    box-shadow: inset 0 0 0 3px color-mix(in srgb, var(--gold) 70%, transparent), inset 0 0 60px rgba(0,0,0,.55), 0 14px 40px rgba(0,0,0,.4);
    overflow: hidden;
}

.bj-table .bj-label {
    padding: 4px 6px 4px 12px;
    border-radius: 999px;
    background: rgba(0,0,0,.35);
    color: var(--text);
    font-size: 12px;
    letter-spacing: .08em;
}

.bj-table .bj-score {
    border-radius: 999px;
    background: rgba(255,255,255,.12);
}

.bj-table .bj-score:empty {
    display: inline-block;
    min-width: 0;
    padding: 0;
}

.bj-arc {
    width: min(560px, 100%);
    height: auto;
    margin: -6px 0 -18px;
}

.bj-arc text {
    font: 800 13px Rubik, system-ui, sans-serif;
    letter-spacing: .14em;
    fill: color-mix(in srgb, var(--gold) 75%, transparent);
}

.bj-msg {
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(0,0,0,.45);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
    font-weight: 700;
    font-size: 14px;
    text-align: center;
}

.bj-msg.win {
    color: #4ade80;
    box-shadow: inset 0 0 0 1px rgba(74,222,128,.4);
}

.bj-msg.lose {
    color: #f87171;
}

.bj-msg.push {
    color: var(--gold);
}

.pcard.back {
    background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 55%, #1a1030), color-mix(in srgb, var(--accent) 25%, #0d0818));
    border: 3px solid #fbfbff;
    box-shadow: inset 0 0 0 3px color-mix(in srgb, var(--gold) 80%, transparent), 0 8px 22px rgba(0,0,0,.45);
}

.pback {
    width: 56%;
    display: grid;
    place-items: center;
}

.pback svg,
.pback img {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,.5));
}

.bj-actions {
    grid-template-columns: 1fr 1fr;
}

.bj-actions .bj-double {
    grid-column: 1 / -1;
}

.bj-actions .btn {
    height: 46px;
}

.bj-info {
    display: grid;
    gap: 0;
    border-radius: var(--r-sm);
    background: var(--bg2);
    box-shadow: inset 0 0 0 1px var(--line2);
}

.bj-info div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    font-size: 12px;
    border-top: 1px solid var(--line);
}

.bj-info div:first-child {
    border-top: 0;
}

.bj-info span {
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .05em;
    font-weight: 700;
}

.bj-last {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 0 4px;
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 800;
}

/* --- Deposit -------------------------------------------------------------------------------------- */
.dp-cmd {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 10px 10px 14px;
    border-radius: var(--r-sm);
    background: var(--bg2);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 40%, transparent);
}

.dp-cmd code {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 15px;
    font-weight: 700;
    color: var(--gold);
    background: none;
}

.dp-cmd.off {
    opacity: .45;
    pointer-events: none;
}

.text-input.sm {
    height: 32px;
    width: 110px;
    font-size: 12px;
}

/* --- Manual / Auto tabs, auto box ----------------------------------------------------------------- */
.mode-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 5px;
    border-radius: var(--r-sm);
    background: var(--bg);
    box-shadow: inset 0 0 0 1px var(--line);
}

.mode-tabs button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 42px;
    border: 0;
    border-radius: 8px;
    background: none;
    color: var(--muted);
    font: inherit;
    font-weight: 800;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .04em;
    cursor: pointer;
}

.mode-tabs button .ic {
    width: 18px;
    height: 18px;
}

.mode-tabs button.on {
    background: var(--panel3);
    color: var(--text);
    box-shadow: inset 0 -2px 0 var(--accent);
}

.mode-tabs button:disabled:not(.on) {
    opacity: .5;
    cursor: not-allowed;
}

.auto-box {
    display: grid;
    gap: 10px;
}

.auto-box[hidden] {
    display: none;
}

/* --- Roulette v2 ------------------------------------------------------------------------------------ */
.chip-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    justify-items: center;
    gap: 8px;
}

.poker-chip {
    --c: #14b8a6;
    position: relative;
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    display: grid;
    place-items: center;
    background: repeating-conic-gradient(from 8deg, #fff 0 14deg, var(--c) 14deg 45deg);
    box-shadow: 0 4px 0 color-mix(in srgb, var(--c) 55%, #000), 0 6px 14px rgba(0,0,0,.45);
    transition: transform .12s;
}

.poker-chip span {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--c);
    box-shadow: inset 0 0 0 2px rgba(255,255,255,.55);
    color: #fff;
    font-weight: 900;
    font-size: 11px;
    text-shadow: 0 1px 2px rgba(0,0,0,.5);
}

.poker-chip.teal {
    --c: #14b8a6;
}

.poker-chip.purple {
    --c: #7c3aed;
}

.poker-chip.orange {
    --c: #f59e0b;
}

.poker-chip.red {
    --c: #e11d48;
}

.poker-chip:hover {
    transform: translateY(-2px);
}

.poker-chip.on {
    transform: translateY(-3px);
    outline: 2px solid var(--gold);
    outline-offset: 3px;
}

.rl-sum {
    min-height: 46px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 14px;
    border-radius: var(--r-sm);
    background: var(--bg2);
    box-shadow: inset 0 0 0 1px var(--line2);
    font-weight: 800;
    text-transform: uppercase;
    font-size: 13px;
    color: var(--muted);
}

.rl-tools {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.rl-tools .btn .ic {
    width: 16px;
    height: 16px;
}

.rl-hint {
    margin: 0;
    text-align: center;
    font-weight: 700;
    font-size: 13px;
}

.rl2 {
    display: grid;
    gap: 14px;
    padding: 16px;
}

.rl-top {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(20px, 6vw, 80px);
    flex-wrap: wrap;
    padding: 14px;
    border-radius: var(--r);
    background: radial-gradient(80% 120% at 30% 50%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%);
}

.rl-wheel-wrap {
    position: relative;
    width: min(290px, 70vw);
    aspect-ratio: 1;
}

.rl-wheel {
    width: 100%;
    height: 100%;
    display: block;
}

.rl-rim {
    fill: color-mix(in srgb, var(--gold) 35%, #1b1530);
}

.pk.red {
    fill: #c62828;
}

.pk.black {
    fill: #1b1e26;
}

.pk.green {
    fill: #15803d;
}

.pk {
    stroke: color-mix(in srgb, var(--gold) 70%, #000);
    stroke-width: .6;
}

.rl-wheel text {
    fill: #fff;
    font: 800 7.5px Rubik, system-ui, sans-serif;
    text-anchor: middle;
    dominant-baseline: middle;
}

.rl-inner {
    fill: #12141b;
    stroke: color-mix(in srgb, var(--gold) 70%, #000);
    stroke-width: 1.2;
}

.rl-cone {
    fill: #1c1f29;
    stroke: rgba(255,255,255,.06);
    stroke-width: 6;
}

.rl-cross path {
    stroke: color-mix(in srgb, var(--gold) 85%, #000);
    stroke-width: 3.5;
    stroke-linecap: round;
}

.rl-knob {
    fill: var(--gold);
    filter: drop-shadow(0 0 6px color-mix(in srgb, var(--gold) 70%, transparent));
}

.rl-pointer {
    position: absolute;
    left: 50%;
    top: -6px;
    z-index: 2;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 11px solid transparent;
    border-right: 11px solid transparent;
    border-top: 16px solid var(--accent);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,.6));
}

.rl-ball {
    position: absolute;
    left: 50%;
    top: 6.5%;
    width: 11px;
    height: 11px;
    margin-left: -5.5px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #fff, #c9ced8);
    box-shadow: 0 2px 4px rgba(0,0,0,.6);
    z-index: 2;
}

.rl-ball[hidden] {
    display: none;
}

.rl-res {
    display: grid;
    justify-items: center;
    gap: 12px;
    min-width: 200px;
}

.rl-res-label {
    color: var(--muted);
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
    font-size: 13px;
}

.rl-res-ball {
    width: 104px;
    height: 104px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 44px;
    font-weight: 900;
    color: var(--muted);
    box-shadow: inset 0 0 0 4px var(--line2);
}

.rl-res-ball.red, .rl-res-ball.black, .rl-res-ball.green {
    color: #fff;
    box-shadow: inset 0 0 0 4px rgba(255,255,255,.18), 0 0 30px rgba(0,0,0,.4);
    animation: pop .3s;
}

.rl-res-ball.red {
    background: #c62828;
}

.rl-res-ball.black {
    background: #1b1e26;
}

.rl-res-ball.green {
    background: #15803d;
}

.rl-res-ball.spin {
    border-top: 4px solid var(--accent);
    box-shadow: inset 0 0 0 4px var(--line2);
    animation: spin 0.9s linear infinite;
}

.rl-res-msg {
    min-height: 32px;
    padding: 7px 14px;
    border-radius: 8px;
    background: rgba(0,0,0,.3);
    font-weight: 700;
    font-size: 13px;
}

.rl-res-msg:empty {
    visibility: hidden;
}

.rl2 .rl-board-wrap {
    padding: 12px;
    border-radius: var(--r);
    background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--accent) 10%, transparent));
    box-shadow: inset 0 0 0 1px var(--line);
}

.rl2 .rl-board {
    grid-template-rows: repeat(3, 46px) 40px 40px;
    gap: 4px;
}

.rl2 .rl-cell {
    font-size: 14px;
}

.rl2 .rl-cell.dozen, .rl2 .rl-cell.out:not(.red):not(.black), .rl2 .rl-cell.col {
    background: var(--panel2);
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
}

.rl2 .rl-cell.out.red {
    background: #c62828;
}

.rl2 .rl-cell.out.black {
    background: #1b1e26;
}

.rl-h.won {
    box-shadow: inset 0 -3px 0 #4ade80;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* --- Mines v2 ------------------------------------------------------------------------------------- */
.mines-seg {
    display: grid;
    grid-template-columns: repeat(4, 1fr) 1.2fr;
    gap: 4px;
    padding: 5px;
    border-radius: var(--r-sm);
    background: var(--bg);
    box-shadow: inset 0 0 0 1px var(--line);
}

.mines-seg button {
    height: 40px;
    border: 0;
    border-radius: 8px;
    background: none;
    color: var(--muted);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.mines-seg button.on {
    background: var(--panel3);
    color: var(--text);
}

.mines-seg button[data-n="custom"] {
    border-left: 1px solid var(--line2);
    border-radius: 0 8px 8px 0;
}

.mines-custom {
    margin-top: 6px;
}

.mines-custom[hidden] {
    display: none;
}

.mines-progress {
    min-height: 54px;
    display: grid;
    place-items: center;
    padding: 10px 12px;
    border-radius: var(--r-sm);
    background: var(--bg2);
    box-shadow: inset 0 0 0 1px var(--line);
    color: var(--muted);
    font-weight: 800;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
    text-align: center;
}

.mines-progress.live {
    grid-template-columns: 1fr 1fr;
    gap: 8px 14px;
    place-items: stretch;
    text-transform: none;
    letter-spacing: 0;
}

.mines-progress.live div {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.mines-progress.live span {
    color: var(--muted);
}

.mines-progress.live b {
    color: var(--text);
}

.mines-stage {
    position: relative;
    padding: 26px 12px;
    overflow: hidden;
    border-radius: var(--r);
}

.mines-grid {
    position: relative;
    width: min(560px, 100%);
    padding: 16px;
    gap: 12px;
    border-radius: 18px;
    background: color-mix(in srgb, var(--bg) 70%, var(--panel));
    box-shadow: inset 0 0 0 1px var(--line);
}

.mine-tile {
    position: relative;
    border-radius: 14px;
    background: var(--panel2);
    box-shadow: none;
    transition: background .15s;
    animation: none;
}

.mine-tile.live:hover, .mine-tile:not(:disabled):not(.gem):not(.bomb):hover {
    transform: none;
    background: var(--panel3);
}

.mine-tile.picked {
    box-shadow: inset 0 0 0 2px var(--accent);
}

.rb-stats {
    display: grid;
    gap: 6px;
    margin-bottom: 10px;
}

.rb-stats > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rb-stats .rw-amount {
    margin-bottom: 0;
}


/* ---- DonutMoon: home page trust elements ------------------------------------------------ */
.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--accent2);
    background: color-mix(in srgb, var(--accent) 14%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent) 32%, transparent);
}

.hero-kicker .ic {
    width: 14px;
    height: 14px;
}

.hero p.muted {
    max-width: 640px;
}

.btn.lg {
    min-height: 44px;
}

.trust-bar {
    list-style: none;
    margin: 16px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.trust-bar li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--r);
}

.trust-bar .ic {
    flex: none;
    width: 30px;
    height: 30px;
    padding: 6px;
    border-radius: 9px;
    color: var(--accent2);
    background: color-mix(in srgb, var(--accent) 16%, transparent);
}

.trust-bar b {
    display: block;
    font-size: 13px;
}

.trust-bar small {
    display: block;
    margin-top: 1px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}

.faq {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.faq details {
    padding: 14px 16px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--r);
    align-self: start;
}

.faq details[open] {
    border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
}

.faq summary {
    cursor: pointer;
    font-weight: 600;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.faq summary::-webkit-details-marker {
    display: none;
}

.faq summary::after {
    content: '+';
    flex: none;
    font-size: 20px;
    line-height: 1;
    color: var(--accent2);
}

.faq details[open] summary::after {
    content: '\2212';
}

.faq details p {
    margin: 10px 0 0;
    font-size: 13px;
    line-height: 1.55;
}

.faq details a {
    color: var(--accent2);
    text-decoration: underline;
}

@media (max-width: 900px) {
    .trust-bar {
        grid-template-columns: repeat(2, 1fr);
    }

    .faq {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .trust-bar {
        grid-template-columns: 1fr;
    }
}


/* ---- Game cards with cover art ------------------------------------------------------------ */
.game-card.has-cover {
    background: var(--panel);
}

.game-card.has-cover::before {
    display: none;
}

.gc-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}

.game-card.has-cover:hover .gc-cover {
    transform: scale(1.05);
}

.game-card.has-cover .gc-live {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 1;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(5, 9, 20, .62);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: #fff;
}


/* ---- Mines: diamond and TNT tile icons ----------------------------------------------------- */
.mine-tile span {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
}

.mine-ico {
    width: 74%;
    height: 74%;
    object-fit: contain;
    pointer-events: none;
    user-select: none;
}

.mine-tile.bomb .mine-ico {
    width: 82%;
    height: 82%;
}

/* ---- Maintenance mode ------------------------------------------------------------------------ */
.maint-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background: radial-gradient(900px 400px at 50% -100px, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%), var(--bg);
}

.maint-card {
    width: min(460px, 100%);
    padding: 36px 28px;
    text-align: center;
    border-radius: var(--r);
    background: var(--panel);
    box-shadow: inset 0 0 0 1px var(--line);
}

.maint-card h1 {
    margin: 14px 0 8px;
    font-size: 24px;
}

.maint-card .admin-btns {
    justify-content: center;
    margin-top: 22px;
}

.maint-ico {
    width: 56px;
    height: 56px;
    margin: 0 auto;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: color-mix(in srgb, var(--accent) 18%, var(--panel2));
    color: var(--accent2);
}

.maint-ico svg {
    width: 28px;
    height: 28px;
}

.maint-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    background: color-mix(in srgb, var(--gold) 22%, var(--bg));
    color: var(--gold);
}

.maint-bar a {
    color: inherit;
    text-decoration: underline;
}

.maint-card-admin.on {
    box-shadow: inset 0 0 0 1px var(--gold);
}

/* ---- Case page (opening layout) ------------------------------------------------------------------ */
.case-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    margin-bottom: 14px;
}

.case-bar > b {
    font-size: 15px;
}

.case-bar-r {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.flip-x {
    transform: scaleX(-1);
}

.case-open {
    padding: 22px 22px 18px;
    gap: 14px;
}

.case-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.case-hero h1 {
    margin: 0;
    font-size: 22px;
}

.case-art.lg {
    width: 92px;
    height: 92px;
    border-radius: 18px;
    font-size: 54px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}

.case-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 18px;
    font-size: 12px;
    color: var(--muted);
}

.case-stats .coin, .case-stats b {
    color: var(--text);
}

.case-page .reel {
    background: color-mix(in srgb, var(--bg) 75%, var(--panel));
}

.case-page .reel-x {
    height: 190px;
}

.case-page .reel-x .r-item {
    height: 160px;
}

.case-page .reels.multi .reel-x {
    height: 128px;
}

.case-page .reels.multi .reel-x .r-item {
    height: 102px;
}

.case-page .reels.multi .reel-x .r-item .e {
    font-size: 34px;
}

.case-page .reel-line {
    background: var(--accent);
    box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 60%, transparent);
}

.reel-pt {
    position: absolute;
    left: 50%;
    width: 0;
    height: 0;
    margin-left: -8px;
    z-index: 3;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
}

.reel-pt.top {
    top: 0;
    border-top: 10px solid var(--accent);
}

.reel-pt.bot {
    bottom: 0;
    border-bottom: 10px solid var(--accent);
}

.reel-y .reel-pt {
    display: none;
}

.case-status {
    text-align: center;
    font-size: 13px;
}

.case-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 10px;
    border-radius: var(--r-sm);
    background: color-mix(in srgb, var(--bg) 70%, var(--panel));
    box-shadow: inset 0 0 0 1px var(--line);
}

.case-controls .case-count .seg {
    width: 190px;
}

.case-fast {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 13px;
    color: var(--gold);
    cursor: pointer;
}

.case-fast span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.case-controls-r {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.open-price {
    margin-left: 8px;
    padding: 3px 8px;
    border-radius: 7px;
    background: rgba(0, 0, 0, .22);
}

.loot {
    position: relative;
    border-bottom-width: 0;
    padding-bottom: 16px;
    overflow: hidden;
}

.loot::after {
    content: '';
    position: absolute;
    left: 14%;
    right: 14%;
    bottom: 0;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: var(--rc);
}

.loot-chance {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 2px 6px;
    border-radius: 6px;
    font-style: normal;
    font-size: 10px;
    font-weight: 700;
    color: var(--muted);
    background: color-mix(in srgb, var(--bg) 70%, transparent);
}

.loot small {
    font-weight: 500;
}

@media (max-width: 700px) {
    .case-controls-r {
        margin-left: 0;
        width: 100%;
    }
    .case-controls-r .open-btn {
        flex: 1;
    }
    .case-controls .case-count .seg {
        width: 150px;
    }
}

/* ---- Case page v2: one card (case + price + controls on top, wide reel below) + "Case contents" ----------- */
.case-page.v2 .cp-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.cp-bar-r { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.cp-card { padding: 0; overflow: hidden; border-radius: 16px; }
.cp-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; flex-wrap: wrap; }
.cp-id { display: flex; align-items: center; gap: 14px; min-width: 0; }
.cp-art { flex: none; width: 70px; height: 58px; display: grid; place-items: center; font-size: 50px; line-height: 1; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .45)); }
.cp-info { min-width: 0; }
.cp-title { display: flex; align-items: center; gap: 10px; }
.cp-name { margin: 0; font-size: 20px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-star { padding: 0; border: 0; background: none; color: var(--muted); font-size: 17px; line-height: 1; cursor: pointer; }
.cp-star:hover, .cp-star.on { color: var(--gold); }
.cp-sub { display: flex; align-items: center; gap: 10px; margin-top: 6px; font-weight: 700; font-size: 14px; }
.cp-free { padding: 2px 10px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .08em; background: var(--gold); color: var(--on-gold); }

/* risk: four dashes (2 = low, 3 = medium, 4 = high) */
.rk-dash { --rc: #facc15; display: inline-flex; gap: 3px; }
.rk-dash[data-risk="low"] { --rc: #22c55e; }
.rk-dash[data-risk="high"] { --rc: #ef4444; }
.rk-dash i { width: 16px; height: 3px; border-radius: 2px; background: var(--line2); }
.rk-dash i.on { background: var(--rc); }

.cp-ctl { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cp-count .seg { display: flex; gap: 2px; padding: 4px; border-radius: 10px; background: color-mix(in srgb, var(--bg) 70%, var(--panel)); }
.cp-count .seg button { min-width: 34px; height: 30px; padding: 0 8px; border: 0; border-radius: 8px; background: none; color: var(--muted); font: 600 14px var(--font); cursor: pointer; }
.cp-count .seg button.on { background: var(--panel3); color: var(--text); }
.cp-count .seg button:disabled { cursor: default; opacity: .6; }

.cp-demo { padding: 0 8px; border: 0; background: none; color: var(--muted); font: 500 14px var(--font); cursor: pointer; }
.cp-demo:hover:not(:disabled) { color: var(--text); }
.cp-demo:disabled { opacity: .5; cursor: default; }
.cp-open { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 20px; border: 0; border-radius: 10px; background: var(--accent); color: var(--on-accent); font: 700 15px var(--font); box-shadow: 0 3px 0 var(--accent-d); cursor: pointer; transition: filter .15s, transform .1s; }
.cp-open:hover:not(:disabled) { filter: brightness(1.1); }
.cp-open:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 var(--accent-d); }
.cp-open:disabled { opacity: .55; cursor: default; }
.cp-open.ready { background: var(--gold); color: var(--on-gold); box-shadow: 0 3px 0 var(--gold-d); animation: cpGlow 1.8s ease-in-out infinite; }
.cp-t { font-variant-numeric: tabular-nums; }
.cp-status { padding: 8px 20px 12px; color: var(--muted); font-size: 13px; text-align: center; }
.cp-fast { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; cursor: pointer; }
.cp-fast span { display: inline-flex; align-items: center; gap: 4px; }

@keyframes cpGlow { 50% { box-shadow: 0 0 22px color-mix(in srgb, var(--gold) 55%, transparent); } }

/* free daily case: countdown strip under the header */
.cp-cd { display: flex; align-items: center; gap: 12px; padding: 10px 20px; border-top: 1px solid var(--line); font-size: 13px; }
.cp-cd-t { font-variant-numeric: tabular-nums; }
.cp-cd.ready .cp-cd-t { color: var(--gold); }
.cp-cd-bar { flex: 1; height: 4px; border-radius: 2px; background: var(--line2); overflow: hidden; }
.cp-cd-bar i { display: block; height: 100%; width: 0; background: var(--gold); }

/* reel stage */
.cp-stage { --tile: 104px; position: relative; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 55%, var(--panel)); }
.cp-stage[data-n="2"] { --tile: 88px; }
.cp-stage[data-n="3"] { --tile: 72px; }
.cp-stage[data-n="4"] { --tile: 60px; }
.cp-stage .reels { display: flex; flex-direction: column; min-width: 0; }
.case-page.v2 .reel-v2 { display: flex; align-items: center; height: auto; min-height: calc(var(--tile) + 76px); border: 0; border-radius: 0; background: transparent; }
.cp-stage:not([data-n="1"]) .reel-v2 { min-height: calc(var(--tile) + 36px); }
.case-page.v2 .reel-v2 + .reel-v2 { border-top: 1px solid var(--line); }
.reel-v2 .reel-strip { flex: none; padding: 0; align-items: center; }
.reel-v2 .rt { flex: none; display: grid; place-items: center; width: var(--tile); height: var(--tile); margin: 0 8px; opacity: .6; transition: opacity .35s, transform .35s, filter .35s; }
.reel-v2 .rt .e { font-size: calc(var(--tile) * .46); line-height: 1; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .5)); }
.reel-v2.done .rt { opacity: .25; }
.reel-v2.done .rt.won { opacity: 1; transform: scale(1.18); filter: drop-shadow(0 0 14px var(--rc, var(--accent))); }
.reel-v2 .rt.uncommon { --rc: var(--uncommon); }
.reel-v2 .rt.rare { --rc: var(--rare); }
.reel-v2 .rt.epic { --rc: var(--epic); }
.reel-v2 .rt.legendary { --rc: var(--legendary); }
.reel-v2 .rt.mythic { --rc: var(--mythic); }
.case-page.v2 .reel-v2 .reel-pt { margin-left: -9px; border-left-width: 9px; border-right-width: 9px; opacity: .95; }
.case-page.v2 .reel-v2 .reel-pt.top { border-top: 11px solid var(--accent2); }
.case-page.v2 .reel-v2 .reel-pt.bot { border-bottom: 11px solid var(--accent2); }

/* pictures: image icons scale with the font size of the place they are in */
.ico { width: 1em; height: 1em; object-fit: contain; image-rendering: pixelated; user-select: none; -webkit-user-drag: none; }

/* Case contents */
.cp-contains { margin-top: 30px; }
.cp-contains .section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cp-contains h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 16px; font-weight: 500; }
.cp-contains h2::before { content: ''; width: 3px; height: 18px; border-radius: 2px; background: var(--accent); }
.cc-sort { min-width: 150px; }
.cc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 14px; }
.cc { --rc: var(--common); display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 10px 14px; border-radius: 10px; text-align: center; background: color-mix(in srgb, var(--bg) 65%, var(--panel)); border: 1px solid var(--line); border-bottom: 3px solid var(--rc); }
.cc.uncommon { --rc: var(--uncommon); }
.cc.rare { --rc: var(--rare); }
.cc.epic { --rc: var(--epic); }
.cc.legendary { --rc: var(--legendary); }
.cc.mythic { --rc: var(--mythic); }
.cc > .e { font-size: 38px; line-height: 1; filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .5)); }
.cc-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 600; color: var(--text); }
.cc-row { display: flex; align-items: center; gap: 8px; }
.cc-val { font-size: 13px; }
.cc-pct { padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; color: var(--muted); background: var(--panel3); }
.cp-meta { margin-top: 12px; font-size: 12px; }

@media (max-width: 700px) {
    .cp-head { padding: 12px 14px; }
    .cp-ctl { width: 100%; justify-content: space-between; }
    .cp-open { flex: 1; justify-content: center; }
    .cp-stage { --tile: 84px; }
    .cp-stage[data-n="2"] { --tile: 72px; }
    .cp-stage[data-n="3"] { --tile: 60px; }
    .cp-stage[data-n="4"] { --tile: 50px; }
    .case-page.v2 .reel-v2 { min-height: calc(var(--tile) + 56px); }
    .cc-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
    .cp-fast span { font-size: 12px; }
}

/* daily card on the case list */
.case-card {
    position: relative;
}

.case-card.daily {
    border-color: color-mix(in srgb, var(--gold) 55%, var(--line));
}

.cc-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
    background: var(--gold);
    color: var(--on-gold);
}

.dc-status {
    font-variant-numeric: tabular-nums;
}

.dc-status.ready {
    animation: cpGlow 1.8s ease-in-out infinite;
}

/* Fixed risk meter (L / M / H): display only, the level is set per case. green = low, yellow = medium, red = high. */
.risk-meter {
    --rc: #facc15;
    width: 100%;
    padding: 4px 8px 0;
    pointer-events: none;
}

.risk-meter[data-risk="low"] { --rc: #22c55e; }
.risk-meter[data-risk="medium"] { --rc: #facc15; }
.risk-meter[data-risk="high"] { --rc: #ef4444; }

.rm-track {
    position: relative;
    height: 4px;
    border-radius: 2px;
    background: color-mix(in srgb, var(--rc) 22%, var(--line2));
}

.rm-track i {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: calc(var(--p, .5) * 100%);
    border-radius: 2px;
    background: var(--rc);
}

.rm-track b {
    position: absolute;
    top: 50%;
    left: calc(var(--p, .5) * 100%);
    width: 5px;
    height: 18px;
    border-radius: 3px;
    background: #fff;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--rc) 35%, transparent);
}

.rm-l {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

.rm-l span {
    width: 28px;
    text-align: center;
    color: var(--dim);
    font: 700 10px var(--font);
}

.rm-l span:first-child { text-align: left; }
.rm-l span:last-child { text-align: right; }
.rm-l span.on { color: var(--rc); }

.cc-price {
    display: flex;
    justify-content: center;
}

.case-card .risk-meter { margin-top: 4px; }

/* Coinflip: the coin faces are pictures (gold D = heads, blue D = tails) */
.coin3d .face,
.coin3d .face.heads,
.coin3d .face.tails {
    background: none;
    box-shadow: none;
}

.coin3d .face img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
    filter: drop-shadow(0 12px 18px rgba(0,0,0,.45));
}

.seg button.cf-side {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.cf-mini {
    width: 22px;
    height: 22px;
    flex: none;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
}

.chip.cf-chip {
    padding: 3px;
    background: var(--bg2);
}

.chip.cf-chip .cf-mini {
    width: 24px;
    height: 24px;
}

.banner-photo {
    min-height: 180px;
    background: linear-gradient(90deg, rgba(0,0,0,.75) 0%, rgba(0,0,0,.35) 55%, rgba(0,0,0,.1) 100%), var(--bg) right center / cover no-repeat;
}

.banner-photo h2 {
    position: relative;
    z-index: 1;
    max-width: 18ch;
    font-size: 28px;
    line-height: 1.15;
    text-shadow: 0 2px 12px rgba(0,0,0,.7);
}

/* Towers: castle-board look over a fantasy scene */
.towers-stage {
    min-height: 560px;
    padding: 46px 12px 40px;
    border-radius: 12px;
    overflow: hidden;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 300' preserveAspectRatio='none'%3E%3Cpath d='M0 300V190l50-40 40 30 60-90 50 80 70-50 40 70 80-30V300z' fill='%2314121c'/%3E%3Cpath d='M800 300V170l-60-70-50 60-40-40-70 90-60-30-50 70-70-20V300z' fill='%2314121c'/%3E%3Cpath d='M0 300V240l90-30 80 20 120-25 110 25 120-20 130 25 150-30V300z' fill='%230d0b12'/%3E%3Cpath d='M0 262l90-20 80 14 120-16 110 18 120-14 130 16 150-18' stroke='%23ff7a1a' stroke-width='3' fill='none' opacity='.8'/%3E%3C/svg%3E") bottom / 100% 48% no-repeat,
        radial-gradient(ellipse 70% 38% at 50% 100%, #ff8a1f 0, #c2410c 35%, transparent 75%),
        radial-gradient(ellipse 40% 30% at 85% 30%, rgba(190, 40, 60, .35), transparent 70%),
        linear-gradient(#11163a, #2b2d63 55%, #43304f);
}

.tower {
    position: relative;
    width: min(430px, 100%);
    padding: 10px;
    gap: 8px;
    background: #20242b;
    border: 6px solid #4a5363;
    border-top-width: 0;
    border-radius: 0 0 14px 14px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .55);
}

/* stone battlements on top */
.tower::before {
    content: '';
    position: absolute;
    left: -6px;
    right: -6px;
    top: -26px;
    height: 32px;
    background:
        repeating-linear-gradient(90deg, transparent 0 58px, rgba(0, 0, 0, .25) 58px 60px),
        linear-gradient(#8591a3, #5b6577);
    -webkit-mask: linear-gradient(#000 0 0) bottom / 100% 16px no-repeat, repeating-linear-gradient(90deg, #000 0 40px, transparent 40px 50px) top / 100% 16px no-repeat;
    mask: linear-gradient(#000 0 0) bottom / 100% 16px no-repeat, repeating-linear-gradient(90deg, #000 0 40px, transparent 40px 50px) top / 100% 16px no-repeat;
    border-radius: 10px 10px 0 0;
}

/* stone base */
.tower::after {
    content: '';
    position: absolute;
    left: -6px;
    right: -6px;
    bottom: -14px;
    height: 14px;
    border-radius: 0 0 14px 14px;
    background:
        repeating-linear-gradient(90deg, transparent 0 58px, rgba(0, 0, 0, .25) 58px 60px),
        linear-gradient(#5b6577, #434b59);
}

.tower .t-row {
    opacity: 1;
    gap: 0;
}

.tower .t-mult {
    display: none;
}

.tower .t-cells {
    gap: 8px;
}

.tower .t-cell {
    height: 38px;
    border-radius: 5px;
    background: #2d3239;
    box-shadow: none;
}

.tower .t-row:not(.active) .t-cell:disabled {
    background: #2d3239;
}


/* Custom dropdowns (js/select.js) */
.dd {
    display: contents;
}

.dd-native {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.dd-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    text-align: left;
    font-weight: 700;
    cursor: pointer;
    background-image: none;
}

.dd-label {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.dd-chev {
    flex: none;
    display: grid;
    place-items: center;
    color: var(--muted);
    transition: transform .15s;
}

.dd-btn.open {
    border-color: var(--accent);
}

.dd-btn.open .dd-chev {
    transform: rotate(180deg);
}

.dd-menu {
    position: fixed;
    z-index: 100000;
    overflow-y: auto;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: var(--panel2);
    border: 1px solid var(--line2);
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, .55);
    animation: dd-in .12s ease-out;
}

@keyframes dd-in {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
}

.dd-menu.up {
    animation-name: dd-in-up;
}

@keyframes dd-in-up {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
}

.dd-opt {
    padding: 10px 12px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
}

.dd-opt.hl {
    background: var(--panel3);
}

.dd-opt.on {
    color: var(--accent2);
}

.dd-opt.off {
    opacity: .4;
    cursor: not-allowed;
}


/* Referrals page */
.referrals .ref-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ref-link,
.ref-cta,
.ref-how,
.ref-list {
    padding: 20px 22px;
}

.ref-link {
    border-color: color-mix(in srgb, var(--gold) 35%, var(--line));
    background: linear-gradient(115deg, color-mix(in srgb, var(--gold) 10%, var(--panel)), var(--panel) 65%);
}

.ref-link-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.ref-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
    font-size: 13px;
    color: var(--gold);
}

.ref-url {
    font-weight: 700;
}

.ref-by {
    margin-top: 10px;
}

.ref-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.ref-stat {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 18px;
}

.ref-stat > span:first-child {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.ref-stat > b {
    font-size: 22px;
}

.ref-stat .btn {
    margin-top: auto;
}

.ref-claim {
    border-color: color-mix(in srgb, var(--gold) 30%, var(--line));
}

.ref-how h3,
.ref-list h3,
.ref-cta h3 {
    margin-bottom: 12px;
}

.ref-cta .hero-cta {
    margin-top: 14px;
}

.ref-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.ref-steps li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.ref-steps li > span {
    flex: none;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-weight: 900;
    color: #1a1204;
    background: var(--gold);
}

.ref-steps li > div > b {
    display: block;
}

.ref-steps small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    line-height: 1.45;
}

.ref-steps code {
    white-space: nowrap;
    padding: 1px 5px;
    border-radius: 5px;
    background: var(--bg2);
}

.ref-player {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}

.ref-player img {
    width: 24px;
    height: 24px;
    border-radius: 6px;
}

.ref-invite {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--r-sm);
    font-size: 14px;
    background: color-mix(in srgb, var(--gold) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--gold) 35%, transparent);
}

.ref-invite .ic {
    flex: none;
    color: var(--gold);
}

@media (max-width: 900px) {
    .ref-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .ref-steps {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .ref-stats {
        grid-template-columns: 1fr;
    }
}


/* --- Minecraft verification (Settings) + Cash desk gate ----------------------------------------------- */
.v-steps { margin: 0 0 10px; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; }
.s-verify .dp-cmd, .s-verify .admin-btns { margin: 10px 0; }
.mc-face { border-radius: 8px; image-rendering: pixelated; flex: none; }
.cd-verify { display: grid; gap: 10px; padding: 8px 0; }

/* --- Phones & touch: less GPU work, no iOS input zoom, no 300 ms tap delay ------------------------------ */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { overscroll-behavior-y: none; }
a, button, .btn, [data-signin], [data-signup] { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
@media (max-width: 900px), (pointer: coarse) {
    input, select, textarea, .text-input { font-size: 16px; }
    * { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
    body { padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
}
.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after { scroll-behavior: auto !important; }

/* --- Admin: items --------------------------------------------------------------------------------------- */
.ai-thumb { width: 36px; height: 36px; object-fit: contain; image-rendering: pixelated; border-radius: 6px; background: var(--panel3); }
.ai-formbox:not(:empty) { margin: 14px 0; }
.ai-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; align-items: end; }
.ai-prev { display: flex; align-items: center; min-height: 64px; }
.ai-prev img { width: 64px; height: 64px; object-fit: contain; image-rendering: pixelated; border-radius: 8px; background: var(--panel3); }
.ai-case-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.ai-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin: 12px 0; }
.ai-opt { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 60%, var(--panel)); cursor: pointer; }
.ai-opt:has(input:checked) { border-color: var(--accent); }
.ai-on { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ai-on b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.ai-on small { font-size: 12px; color: var(--muted); }
.ai-sum { margin: 6px 0 12px; }
.admin-card h3 { display: flex; align-items: center; gap: 8px; }


/* Image-only promo banner (artwork has the text baked in) */
.banner.banner-img {
    padding: 0;
    min-height: 0;
    display: block;
    background: #0a0f2e;
}

.banner.banner-img::before {
    display: none;
}

.banner.banner-img img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 2170 / 725;
    object-fit: cover;
}

/* ===== Dynamic cases: pictures of any size/format, banners, rarities with any color, admin case manager ===== */
/* Pictures keep their proportions inside the card (no stretching), whatever size or format was uploaded. */
.cc-art .case-img, .cp-art .case-img, .lobby-cases .case-img, .bh-cases .case-img {
    width: 1em;
    height: 1em;
    object-fit: contain;
}

.case-card.featured { border-color: color-mix(in srgb, var(--gold) 45%, transparent); }

.case-card.featured .cc-tag { background: linear-gradient(90deg, #f5c04a, #c9922a); color: #1a1205; }

.cp-desc { margin-top: 6px; color: rgba(255, 255, 255, .72); font-size: 13px; max-width: 60ch; }

.cp-card.has-banner {
    background:
        linear-gradient(90deg, rgba(8, 10, 30, .92) 0%, rgba(8, 10, 30, .6) 55%, rgba(8, 10, 30, .25) 100%),
        var(--banner) center / cover no-repeat;
}

/* An item with its own rarity color (--rc comes from the item). */
.cc.custom, .rt.custom, .r-item.custom { --rc: #94a3b8; } /* the item's own color (inline --rc) wins when it has one */

.r-item.custom { border-color: var(--rc); box-shadow: inset 0 -26px 30px -22px var(--rc); }

.cc > img.e { object-fit: contain; max-width: 100%; max-height: 54px; }

.ac-list .ai-thumb, .ac-editor .ai-thumb { image-rendering: auto; }

.cc-more { grid-column: 1 / -1; justify-self: center; }

.empty-note { margin-top: 14px; }

/* Admin: case manager */
.ac-pics { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 12px 0 4px; }

.ac-prev { display: grid; place-items: center; min-height: 96px; max-height: 160px; border: 1px dashed rgba(255, 255, 255, .15); border-radius: 10px; margin: 6px 0; overflow: hidden; }

.ac-prev img { max-width: 100%; max-height: 150px; object-fit: contain; }

.ac-flags { display: flex; flex-wrap: wrap; gap: 14px; align-items: end; margin: 12px 0; }

.ac-items { display: grid; gap: 6px; margin: 8px 0; max-height: 440px; overflow: auto; }

.ac-row { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 8px; background: rgba(255, 255, 255, .03); }

.ac-n { width: 28px; text-align: right; color: var(--muted, #8b93b8); font-size: 12px; }

.ac-nm { flex: 1; min-width: 0; display: grid; }

.ac-nm small { color: var(--muted, #8b93b8); }

.ac-w { width: 90px; }

.ac-ch { min-width: 58px; text-align: right; }

.ai-emoji { display: inline-grid; place-items: center; width: 36px; height: 36px; font-size: 22px; }

.ac-modal { position: fixed; inset: 0; z-index: 1000; background: rgba(4, 6, 20, .78); display: grid; place-items: center; padding: 16px; overflow: auto; }

.ac-modal-in { width: min(960px, 100%); max-height: 92vh; overflow: auto; }

.ac-modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }

.ac-prev-grid { display: grid; grid-template-columns: 220px 1fr; gap: 14px; align-items: start; margin-bottom: 14px; }

@media (max-width: 700px) {
    .ac-prev-grid { grid-template-columns: 1fr; }
    .case-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}
.case-img { image-rendering: auto; }

/* Lazy-loaded game / admin pages: spinner while the script downloads */
.game-loading { display: grid; place-items: center; min-height: 50vh; }
.game-loading i { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line2, rgba(255,255,255,.12)); border-top-color: var(--accent, #f59e0b); animation: bootSpin .7s linear infinite; }
@keyframes bootSpin { to { transform: rotate(360deg); } }

/* ---- Crash: v2 ---- */
.crash-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 30px; }
.crash-top .crash-history { flex: 1; min-width: 0; }
.crash-hstat { flex: none; font-size: 12px; font-weight: 700; white-space: nowrap; }
.crash-canvas-wrap { will-change: transform; background: radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--bg2) 82%, #1e2a6b) 0%, var(--bg2) 70%); }
.crash-canvas-wrap.flash::after { content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; box-shadow: inset 0 0 90px 10px rgba(239, 68, 68, .55); animation: crashFlash .7s ease-out forwards; }
@keyframes crashFlash { from { opacity: 1; } to { opacity: 0; } }
.crash-mult { transition: color .25s, text-shadow .25s; text-shadow: 0 4px 24px rgba(0, 0, 0, .55); }
.crash-mult[data-tier="2"] { color: #facc15; text-shadow: 0 0 28px rgba(250, 204, 21, .45); }
.crash-mult[data-tier="3"] { color: #4ade80; text-shadow: 0 0 30px rgba(74, 222, 128, .5); }
.crash-mult[data-tier="4"] { color: #22d3ee; text-shadow: 0 0 32px rgba(34, 211, 238, .55); }
.crash-mult[data-tier="5"] { color: #c084fc; text-shadow: 0 0 36px rgba(192, 132, 252, .65); }
.crash-mult.crashed { color: var(--red); text-shadow: 0 0 30px rgba(239, 68, 68, .55); }
.crash-mult.bump { animation: crashBump .38s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes crashBump { 0% { transform: scale(1); } 40% { transform: scale(1.14); } 100% { transform: scale(1); } }
.crash-win { position: absolute; left: 50%; bottom: 16%; transform: translateX(-50%); padding: 8px 18px; border-radius: 999px; font-weight: 800; font-size: 18px; color: #052e16; background: linear-gradient(135deg, #facc15, #4ade80); box-shadow: 0 8px 30px rgba(74, 222, 128, .4); opacity: 0; pointer-events: none; white-space: nowrap; }
.crash-win .money { color: inherit; }
.crash-win.show { animation: crashWin 2.2s ease-out forwards; }
@keyframes crashWin { 0% { opacity: 0; transform: translate(-50%, 14px) scale(.85); } 12% { opacity: 1; transform: translate(-50%, 0) scale(1.06); } 22% { transform: translate(-50%, 0) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -10px); } }
.crash-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, .06); pointer-events: none; }
.crash-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #f97316, #facc15); transition: width .12s linear; }
.crash-presets { display: flex; gap: 6px; margin: -4px 0 12px; }
.crash-presets button { flex: 1; height: 28px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg2); color: var(--muted); font: 700 12px var(--font); cursor: pointer; transition: color .15s, border-color .15s, background .15s; }
.crash-presets button:hover { color: var(--text); border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--bg2)); }
.crash-btn:disabled { opacity: .7; cursor: progress; }
.crash-hint { margin-top: 8px; text-align: center; }
.crash-hint kbd { padding: 1px 7px; border-radius: 5px; border: 1px solid var(--line2, var(--line)); border-bottom-width: 2px; background: var(--bg2); font: 700 11px var(--font); }
.crash-session { margin-top: 6px; text-align: center; font-variant-numeric: tabular-nums; }
.crash-session .pos { color: var(--green, #22c55e); }
.crash-session .neg { color: var(--red, #ef4444); }
.cp-row { transition: background .25s, opacity .25s; }
.cp-row.won .pos { color: var(--green, #22c55e); }
@media (max-width: 700px) {
  .crash-canvas-wrap { min-height: 300px; }
  .crash-hstat { display: none; }
  .crash-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .crash-mult.bump, .crash-canvas-wrap.flash::after { animation: none; }
  .crash-win.show { animation-duration: 3s; }
}

/* Crash: newest result stays fully visible (chips no longer shrink), the oldest fade out; the players header was being restyled by the case page's .cp-head */
.crash-history .chip { flex: none; }
.crash-history { -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
.crash-players .cp-head { padding: 0; flex-wrap: nowrap; gap: 8px; align-items: center; }
.crash-mult.waiting { white-space: nowrap; }
@media (max-width: 700px) { .crash-mult.waiting { font-size: 22px; } }

/* ---- Admin > Security (public/casino/js/admin-security.js) ---- */
.sec-pill { display: inline-block; padding: 1px 9px; border-radius: 99px; font: 600 12px/1.6 ui-monospace, monospace; border: 1px solid currentColor; }
.sec-pill.LOW, .sec-score.LOW, .sec-arc.LOW, .sec-alert.LOW { color: #46c2a0; }
.sec-pill.MEDIUM, .sec-score.MEDIUM, .sec-arc.MEDIUM, .sec-alert.MEDIUM { color: #e8b84a; }
.sec-pill.HIGH, .sec-score.HIGH, .sec-arc.HIGH, .sec-alert.HIGH { color: #f08a4b; }
.sec-pill.CRITICAL, .sec-score.CRITICAL, .sec-arc.CRITICAL, .sec-alert.CRITICAL { color: #ef4b6c; }
.sec-score { font: 600 16px ui-monospace, monospace; }
.sec-tile { text-align: left; cursor: pointer; border-left: 3px solid currentColor; }
.sec-tile.LOW { color: #46c2a0; } .sec-tile.MEDIUM { color: #e8b84a; } .sec-tile.HIGH { color: #f08a4b; } .sec-tile.CRITICAL { color: #ef4b6c; }
.sec-tile small { color: var(--muted, #8d95aa); }
.sec-alert { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 10px 14px; margin-top: 8px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .08); border-left: 3px solid currentColor; cursor: pointer; }
.sec-alert > div, .sec-alert b { color: var(--text, #e7e9f0); }
.sec-alert:hover, .sec-row:hover { background: rgba(255, 255, 255, .04); }
.sec-row { cursor: pointer; }
.sec-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.sec-bar input[type=search] { min-width: 240px; }
.sec-head { display: flex; gap: 20px; align-items: center; margin: 12px 0; }
.sec-head text { font: 600 30px ui-monospace, monospace; fill: currentColor; }
.sec-ring { fill: none; stroke: rgba(255, 255, 255, .12); stroke-width: 10; }
.sec-arc { fill: none; stroke: currentColor; stroke-width: 10; stroke-linecap: round; }
.sec-sig { display: grid; grid-template-columns: 1fr auto; gap: 3px 10px; margin: 8px 0; }
.sec-sig i { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.sec-sig u { display: block; height: 100%; background: #8796ff; }
.sec-sig.hot u { background: #f08a4b; }
.sec-list { list-style: none; margin: 0; padding: 0; }
.sec-list li { padding: 7px 0; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.sec-note { width: 100%; min-height: 70px; margin: 8px 0; resize: vertical; }
.sec-btns { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.sec-detail > .btn { margin-bottom: 6px; }

/* ---- Admin > Stats (public/casino/js/admin-stats.js) ---- */
.st-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.st-bar .tabs { margin: 0; }
.st-stamp { margin-left: auto; }
.st-card.ok { border-left: 3px solid #46c2a0; }
.st-card.warn { border-left: 3px solid #e8b84a; }
.st-card.bad { border-left: 3px solid #ef4b6c; }
.st-chart { width: 100%; height: 220px; display: block; }
.st-chart rect.pos { fill: #46c2a0; }
.st-chart rect.neg { fill: #ef4b6c; }
.st-chart .zero { stroke: rgba(255, 255, 255, .25); stroke-width: 1; }
.st-chart text { fill: var(--muted, #8d95aa); font: 11px ui-monospace, monospace; }
.st-pill { display: inline-block; padding: 1px 9px; border-radius: 99px; font: 600 12px/1.6 ui-monospace, monospace; border: 1px solid currentColor; white-space: nowrap; }
.st-pill.ok { color: #46c2a0; } .st-pill.warn { color: #e8b84a; } .st-pill.bad { color: #ef4b6c; }
.st-pill.few, .st-pill.none { color: var(--muted, #8d95aa); }
.st-note { padding: 10px 14px; border-radius: 10px; border: 1px solid currentColor; margin: 8px 0; }
.st-note.ok { color: #46c2a0; } .st-note.warn { color: #e8b84a; } .st-note.bad { color: #ef4b6c; }
.st-note b { color: inherit; }
.st-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.st-calc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin: 12px 0; }
.st-calc-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted, #8d95aa); }
@media (max-width: 900px) { .st-two { grid-template-columns: 1fr; } .st-stamp { margin-left: 0; } }
