/* ============================================================
   Player dashboard styles (login / dashboard / character).
   Reuses base.css tokens (--gold, --bg-card, fonts, .btn, .tabs…).
   ============================================================ */

.dash-page {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    padding: 104px 24px 80px;
}
.dash-page .container { max-width: 1100px; margin: 0 auto; }

/* ─── Page heading ─── */
.dash-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 32px;
}
.dash-head h1 {
    font-family: var(--font-display);
    font-size: clamp(24px, 4vw, 36px);
    font-weight: 700;
    color: var(--gold-light);
}
.dash-head .dash-sub { color: var(--text-muted); font-size: 14px; margin-top: 4px; }

/* ─── Generic panel ─── */
.panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 24px;
    backdrop-filter: blur(8px);
}
.panel + .panel { margin-top: 24px; }
.panel-title {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 16px;
}

.empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: 40px 20px;
    font-size: 15px;
}
.notice {
    border-radius: 14px;
    padding: 16px 20px;
    font-size: 14px;
    line-height: 1.6;
}
.notice-warn { background: rgba(139, 34, 82, 0.08); border: 1px solid rgba(139, 34, 82, 0.25); color: #e4b8cb; }

/* ============================================================
   Login
   ============================================================ */
.auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 104px 20px 60px;
    position: relative;
    z-index: 1;
}
.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 36px 32px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}
.auth-card h1 {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 700;
    color: var(--gold-light);
    text-align: center;
    margin-bottom: 6px;
}
.auth-card .auth-desc {
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 26px;
    line-height: 1.6;
}
.auth-field { margin-bottom: 18px; }
.auth-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 7px;
    letter-spacing: 0.02em;
}
.auth-input {
    width: 100%;
    padding: 12px 14px;
    background: rgba(8, 6, 14, 0.55);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.auth-input:focus {
    outline: none;
    border-color: var(--border-hover);
    box-shadow: 0 0 0 3px rgba(212, 168, 83, 0.12);
}
.auth-card .btn { width: 100%; justify-content: center; margin-top: 6px; }
.auth-error {
    background: rgba(139, 34, 82, 0.12);
    border: 1px solid rgba(139, 34, 82, 0.35);
    color: #e8a9c0;
    border-radius: 10px;
    padding: 11px 14px;
    font-size: 13.5px;
    margin-bottom: 20px;
    text-align: center;
}
.auth-foot {
    margin-top: 22px;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.7;
}
.auth-foot a { color: var(--gold-light); text-decoration: none; }
.auth-foot a:hover { text-decoration: underline; }

/* ============================================================
   Dashboard — character cards
   ============================================================ */
.char-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}
.char-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 22px;
    transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}
.char-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--glow-gold);
    transform: translateY(-4px);
}
.char-card-top { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.char-avatar {
    width: 52px; height: 52px;
    flex-shrink: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(212,168,83,0.18), rgba(139,34,82,0.18));
    border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display);
    font-size: 22px; font-weight: 700; color: var(--gold-light);
}
.char-card-name { font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--text); }
.char-card-job { font-size: 13px; color: var(--gold); margin-top: 2px; }
.char-card-rows { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
.char-row { display: flex; justify-content: space-between; font-size: 13px; gap: 8px; }
.char-row .k { color: var(--text-muted); }
.char-row .v { color: var(--text); font-variant-numeric: tabular-nums; text-align: right; }
.char-online { display: inline-flex; align-items: center; gap: 6px; }
.char-online .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-muted); }
.char-online.is-online .dot { background: var(--success); box-shadow: 0 0 8px var(--success); }

/* ============================================================
   Character detail
   ============================================================ */
.char-hero { display: flex; align-items: center; gap: 18px; margin-bottom: 8px; }
.char-hero .char-avatar { width: 64px; height: 64px; font-size: 26px; }
.char-hero h1 { font-family: var(--font-display); font-size: clamp(22px, 4vw, 32px); color: var(--gold-light); }
.char-hero .sub { color: var(--gold); font-size: 14px; margin-top: 4px; }

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 12px;
}
.stat-box {
    background: rgba(8, 6, 14, 0.4);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    text-align: center;
}
.stat-box .label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); }
.stat-box .value { font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--gold-light); margin-top: 4px; }

.bar { margin-bottom: 14px; }
.bar-head { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.bar-head .lbl { color: var(--text-muted); }
.bar-head .num { color: var(--text); font-variant-numeric: tabular-nums; }
.bar-track { height: 10px; border-radius: 6px; background: rgba(8,6,14,0.6); border: 1px solid var(--border); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 6px; }
.bar-fill.hp { background: linear-gradient(90deg, #8b2252, #c44570); }
.bar-fill.sp { background: linear-gradient(90deg, #3a5ba0, #5b8dd9); }

.kv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px 24px; }
.kv { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid rgba(212,168,83,0.06); font-size: 14px; }
.kv .k { color: var(--text-muted); }
.kv .v { color: var(--text); text-align: right; }

/* ─── Item grid / chips (inventory, equipment, storage) ─── */
.item-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}
.item-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: rgba(8, 6, 14, 0.4);
    border: 1px solid var(--border);
    border-radius: 10px;
    position: relative;
    min-width: 0;
}
.item-icon { width: 24px; height: 24px; flex-shrink: 0; image-rendering: pixelated; }
.item-amount {
    position: absolute;
    left: 24px; top: 6px;
    font-size: 10px;
    background: rgba(8,6,14,0.85);
    color: var(--gold-light);
    border-radius: 4px;
    padding: 0 3px;
    line-height: 1.4;
}
.item-name { font-size: 13px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-refine { color: var(--gold-light); font-weight: 700; }
.item-unident { color: var(--crimson-light); font-size: 11px; }
.item-cards { display: inline-flex; gap: 2px; margin-left: auto; flex-shrink: 0; }
.item-card { width: 16px; height: 16px; image-rendering: pixelated; opacity: 0.9; }

.equip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}

.back-link { display: inline-flex; align-items: center; gap: 7px; color: var(--text-muted); font-size: 14px; text-decoration: none; margin-bottom: 20px; transition: color 0.2s; }
.back-link:hover { color: var(--gold-light); }

@media (max-width: 600px) {
    .char-card-rows { grid-template-columns: 1fr; }
    .item-grid, .equip-grid { grid-template-columns: 1fr; }
}

/* Donation balance card on the dashboard header */
.dash-balance { text-align: right; }
.dash-balance-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.dash-balance-val { font-family: var(--font-display); font-size: 24px; font-weight: 700; color: var(--gold-light); margin: 2px 0 8px; }
.dash-balance-val span { font-size: 14px; color: var(--text-muted); }

/* Donation shop */
.notice-ok { background: rgba(93,186,95,0.08); border: 1px solid rgba(93,186,95,0.3); color: #bfe6c0; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.shop-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px;
    padding: 18px; text-align: center;
    transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}
.shop-card:hover { border-color: var(--border-hover); box-shadow: var(--glow-gold); transform: translateY(-3px); }
.shop-icon { width: 48px; height: 48px; image-rendering: pixelated; margin-bottom: 10px; }
.shop-name { font-weight: 600; color: var(--text); font-size: 14px; }
.shop-cat { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin: 2px 0 8px; }
.shop-price { font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--gold-light); margin-bottom: 12px; }
.shop-buy-form { margin: 0; }
.shop-buy-form .btn { width: 100%; justify-content: center; }

/* Roulette (CS:GO reel) */
.rl-panel { overflow: hidden; }
.rl-recipient { margin-bottom: 16px; }
.rl-recipient label { display: block; font-size: 13px; color: var(--text-muted); margin-bottom: 6px; }
.rl-reel-wrap { position: relative; overflow: hidden; border: 1px solid var(--border); border-radius: 12px; background: rgba(8,6,14,0.5); padding: 12px 0; }
.rl-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); z-index: 2; }
.rl-reel { display: flex; gap: 8px; will-change: transform; }
.rl-cell { flex: 0 0 96px; width: 96px; height: 96px; border-radius: 10px; background: var(--bg-card); border: 1px solid var(--border); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; }
.rl-cell img { width: 32px; height: 32px; image-rendering: pixelated; }
.rl-cell span { font-size: 10px; line-height: 1.2; color: var(--text-muted); padding: 0 4px; max-height: 24px; overflow: hidden; }
.rl-rare { border-color: #5b8dd9; } .rl-rare span { color: #9dbff0; }
.rl-epic { border-color: #a256d0; } .rl-epic span { color: #cf9bf0; }
.rl-legendary { border-color: var(--gold); box-shadow: 0 0 12px rgba(212,168,83,0.4); } .rl-legendary span { color: var(--gold-light); }
.rl-actions { text-align: center; margin-top: 18px; }
.rl-result { margin-top: 18px; text-align: center; padding: 14px; border-radius: 12px; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 16px; color: var(--text); }
.rl-result img { width: 32px; height: 32px; image-rendering: pixelated; }
.rl-result.rl-rare { border-color: #5b8dd9; }
.rl-result.rl-epic { border-color: #a256d0; }
.rl-result.rl-legendary { border-color: var(--gold); box-shadow: 0 0 16px rgba(212,168,83,0.5); }

/* Roulette: fast toggle + modals */
.rl-fast { display: inline-flex; align-items: center; gap: 6px; color: var(--text-muted); font-size: 13px; cursor: pointer; margin-left: 12px; }
.rl-fast input { accent-color: var(--gold); }
.rl-modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(8,6,14,0.78); backdrop-filter: blur(4px); opacity: 0; transition: opacity 0.13s; }
.rl-modal.rl-modal-show { opacity: 1; }
.rl-modal[hidden] { display: none; }
.rl-modal-box { background: var(--bg-card); border: 1px solid var(--border); border-radius: 20px; padding: 28px; max-width: 420px; width: 100%; text-align: center; box-shadow: var(--shadow); transform: scale(0.9); transition: transform 0.16s cubic-bezier(0.2,1.2,0.3,1); }
.rl-modal-show .rl-modal-box { transform: scale(1); }
.rl-modal-title { font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--gold-light); margin-bottom: 18px; }
.rl-modal-actions { margin-top: 22px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.rl-win-prize { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.rl-win-img { width: 64px; height: 64px; image-rendering: pixelated; }
.rl-win-name { font-size: 18px; font-weight: 700; color: var(--text); }
.rl-win-rar { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); }
.rl-win-box.rl-rare { border-color: #5b8dd9; } .rl-win-box.rl-rare .rl-win-rar { color: #9dbff0; }
.rl-win-box.rl-epic { border-color: #a256d0; } .rl-win-box.rl-epic .rl-win-rar { color: #cf9bf0; }
.rl-win-box.rl-legendary { border-color: var(--gold); box-shadow: 0 0 30px rgba(212,168,83,0.5); } .rl-win-box.rl-legendary .rl-win-rar { color: var(--gold-light); }
.rl-prizes-list { max-height: 50vh; overflow-y: auto; text-align: left; display: flex; flex-direction: column; gap: 6px; }
.rl-prow { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; background: rgba(8,6,14,0.4); border: 1px solid var(--border); }
.rl-prow img { width: 28px; height: 28px; image-rendering: pixelated; }
.rl-prow-name { flex: 1; font-size: 13px; color: var(--text); }
.rl-prow-pct { font-variant-numeric: tabular-nums; color: var(--gold-light); font-size: 13px; font-weight: 600; }
.rl-prow.rl-rare { border-color: #5b8dd9; } .rl-prow.rl-epic { border-color: #a256d0; } .rl-prow.rl-legendary { border-color: var(--gold); }

/* Prizes modal: wider + card grid */
.rl-modal-box.rl-wide { max-width: 680px; }
.rl-prizes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; max-height: 60vh; overflow-y: auto; padding: 4px 2px; }
.rl-pcard { background: rgba(8,6,14,0.4); border: 1px solid var(--border); border-radius: 12px; padding: 12px 10px; text-align: center; transition: border-color 0.15s, transform 0.15s; }
.rl-pcard:hover { transform: translateY(-2px); }
.rl-pcard img { width: 40px; height: 40px; image-rendering: pixelated; }
.rl-pcard-name { font-size: 12px; line-height: 1.3; color: var(--text); margin: 6px 0 4px; min-height: 30px; display: flex; align-items: center; justify-content: center; }
.rl-pcard-pct { font-family: var(--font-display); font-size: 16px; font-weight: 700; color: var(--gold-light); }
.rl-pcard.rl-rare { border-color: #5b8dd9; }
.rl-pcard.rl-epic { border-color: #a256d0; }
.rl-pcard.rl-legendary { border-color: var(--gold); box-shadow: 0 0 12px rgba(212,168,83,0.3); }

/* Roulette: confetti canvas + loading spinner */
.rl-confetti { position: fixed; inset: 0; pointer-events: none; z-index: 300; }
.rl-spinner { width: 44px; height: 44px; border: 4px solid var(--border); border-top-color: var(--gold); border-radius: 50%; margin: 24px auto; animation: rl-spin 0.7s linear infinite; }
@keyframes rl-spin { to { transform: rotate(360deg); } }

/* ===== Knowledge base ===== */
.kb-searchbar { margin-bottom: 14px; }
.kb-search { width: 100%; max-width: 520px; font-size: 16px; }
.kb-hint { color: var(--text-muted); font-size: 14px; padding: 18px 2px; }
.kb-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.kb-card { display: flex; align-items: center; gap: 12px; text-align: left; background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 12px; cursor: pointer; transition: border-color 0.15s, transform 0.15s; font: inherit; color: inherit; }
.kb-card:hover { border-color: var(--border-hover); transform: translateY(-2px); }
.kb-card-icon { width: 36px; height: 36px; image-rendering: pixelated; flex-shrink: 0; }
.kb-card-info { min-width: 0; }
.kb-card-name { font-weight: 600; color: var(--text); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kb-card-meta { font-size: 12px; color: var(--text-muted); }
.kb-empty { color: var(--text-muted); padding: 30px; text-align: center; grid-column: 1 / -1; }
.kb-modal-box { text-align: left; position: relative; max-height: 86vh; overflow-y: auto; }
.kb-close { position: absolute; top: 12px; right: 16px; background: none; border: none; color: var(--text-muted); font-size: 26px; line-height: 1; cursor: pointer; padding: 0; }
.kb-close:hover { color: var(--text); }
.kb-d-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; padding-right: 30px; }
.kb-d-icon { width: 48px; height: 48px; image-rendering: pixelated; }
.kb-d-name { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--gold-light); }
.kb-d-meta { font-size: 13px; color: var(--text-muted); }
.kb-d-stats { display: flex; flex-wrap: wrap; gap: 8px; }
.kb-stat { background: rgba(8,6,14,0.4); border: 1px solid var(--border); border-radius: 8px; padding: 5px 10px; font-size: 13px; color: var(--text); }
.kb-stat b { color: var(--text-muted); font-weight: 600; margin-right: 5px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.03em; }
.kb-d-sec { margin-top: 16px; }
.kb-d-sec-t { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--gold); margin-bottom: 8px; font-weight: 700; }
.kb-script { background: rgba(8,6,14,0.55); border: 1px solid var(--border); border-radius: 10px; padding: 12px; font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 12.5px; color: #bfe6c0; white-space: pre-wrap; word-break: break-word; margin: 0; }
.kb-drops { display: flex; flex-direction: column; gap: 6px; }
.kb-drop { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; background: rgba(8,6,14,0.4); border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; }
.kb-drop-mob { font-weight: 600; color: var(--text); font-size: 13px; }
.kb-drop-rate { color: var(--gold-light); font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 600; }
.kb-drop-maps { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.kb-map { font-size: 11px; color: var(--text-muted); background: rgba(255,255,255,0.04); border-radius: 5px; padding: 2px 7px; }
.kb-map-none { font-style: italic; }
.kb-nodrops { color: var(--text-muted); font-size: 13px; font-style: italic; }

/* KB: human-readable effect list + raw script toggle */
.kb-effects { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 5px; }
.kb-effects li { font-size: 13.5px; color: var(--text); line-height: 1.45; }
.kb-effects code { background: rgba(8,6,14,0.55); border-radius: 4px; padding: 1px 5px; font-size: 12px; color: #bfe6c0; }
.kb-raw { margin-top: 10px; }
.kb-raw summary { cursor: pointer; font-size: 12px; color: var(--text-muted); list-style: revert; }
.kb-raw summary:hover { color: var(--gold-light); }
.kb-raw .kb-script { margin-top: 8px; }

/* ===== Roulette: hide empty result + app-like mobile ===== */
.rl-result[hidden] { display: none; }   /* .rl-result sets display:flex, so [hidden] needs this */
.rl-select { max-width: 280px; }

/* "Fast spin" as a toggle switch */
.rl-fast { user-select: none; }
.rl-fast input {
    appearance: none; -webkit-appearance: none; flex: 0 0 auto; margin: 0;
    width: 42px; height: 24px; border-radius: 999px; background: var(--border);
    position: relative; cursor: pointer; transition: background 0.2s;
}
.rl-fast input:checked { background: var(--gold); }
.rl-fast input::after {
    content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px;
    border-radius: 50%; background: #fff; transition: transform 0.2s;
}
.rl-fast input:checked::after { transform: translateX(18px); }

/* ===== Roulette as a mobile app ===== */
@media (max-width: 600px) {
    /* lean header: title + compact balance, no subtitle/labels */
    .dash-page { padding: 84px 16px 96px; }                 /* bottom room for the pinned Spin bar */
    .back-link { font-size: 13px; }
    .dash-head { margin-bottom: 14px; gap: 10px; align-items: flex-start; }
    .dash-head h1 { font-size: 24px; }
    .dash-sub { display: none; }
    .dash-balance { display: flex; flex-direction: row; align-items: center; gap: 10px; text-align: left; }
    .dash-balance-label { display: none; }
    .dash-balance-val { font-size: 17px; margin: 0; }
    .dash-balance .btn { margin: 0; padding: 7px 12px; font-size: 13px; }

    /* seamless body — no box around the wheel */
    .rl-panel { background: transparent; border: none; padding: 0; backdrop-filter: none; margin-top: 6px !important; }
    .rl-recipient label { font-size: 12px; }
    .rl-select { max-width: none; width: 100%; height: 46px; font-size: 16px; }
    .rl-reel-wrap { margin-top: 14px; border-radius: 14px; }

    /* secondary actions: a compact row under the reel (not big buttons) */
    .rl-actions { flex-direction: row; align-items: stretch; gap: 10px; margin-top: 16px; }
    #rlPrizes { flex: 1; height: 46px; font-size: 14px; justify-content: center;
        background: rgba(255,255,255,0.05); border-color: var(--border-hover); }
    .rl-fast { flex: 0 0 auto; height: 46px; margin: 0; padding: 0 14px; gap: 8px;
        border: 1px solid var(--border); border-radius: 12px; background: rgba(8,6,14,0.4); font-size: 13px; }

    /* primary CTA pinned to the bottom of the screen */
    #rlSpin { position: fixed; left: 16px; right: 16px; bottom: 16px; width: auto;
        height: 58px; font-size: 18px; font-weight: 700; z-index: 60;
        box-shadow: 0 10px 30px rgba(0,0,0,0.55), 0 0 26px rgba(212,168,83,0.32); }

    .rl-history { display: none; }                          /* hide recent wins on mobile */

    /* win / prizes modal: centered card with an edge gap + glow */
    .rl-modal { padding: 22px; align-items: center; }
    .rl-modal-box { padding: 24px 18px; max-height: 86vh; max-width: 420px; width: 100%;
        border-radius: 16px; box-shadow: 0 0 60px rgba(212,168,83,0.40), 0 24px 60px rgba(0,0,0,0.65); }
    .rl-modal-actions { flex-direction: column-reverse; gap: 10px; }
    .rl-modal-actions .btn { width: 100%; height: 50px; justify-content: center; }
    .rl-prizes-grid { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
}

/* ===== Reel: Gifty-style center highlight + rarity glow ===== */
.rl-reel-wrap::after {
    content: ''; position: absolute; top: 6px; bottom: 6px; left: 50%; width: 102px;
    transform: translateX(-50%); border: 2px solid var(--gold-light); border-radius: 14px;
    box-shadow: 0 0 26px rgba(212,168,83,0.5), inset 0 0 16px rgba(212,168,83,0.12);
    pointer-events: none; z-index: 3;
}
.rl-cell.rl-rare      { box-shadow: 0 0 12px rgba(91,141,217,0.35); }
.rl-cell.rl-epic      { box-shadow: 0 0 14px rgba(162,86,208,0.40); }
.rl-cell.rl-legendary { box-shadow: 0 0 18px rgba(212,168,83,0.55); }

/* ============================================================
   Roulette — premium "case opening" redesign (overrides above)
   ============================================================ */
.rl-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin-bottom: 22px; }
.rl-header h1 { font-family: var(--font-display); font-size: clamp(26px, 5vw, 38px); font-weight: 900; color: var(--gold-light); }

.rl-balance-cap {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 8px 8px 8px 16px; border-radius: 999px;
    background: linear-gradient(135deg, rgba(212,168,83,0.16), rgba(139,34,82,0.12));
    border: 1px solid rgba(212,168,83,0.4);
    box-shadow: 0 0 30px rgba(212,168,83,0.18), inset 0 1px 0 rgba(255,255,255,0.06);
}
.rl-bal-ic { color: var(--gold-light); font-size: 16px; }
.rl-bal-val { font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--gold-light); white-space: nowrap; }
.rl-bal-val i { font-size: 11px; color: var(--text-muted); font-style: normal; margin-left: 2px; }
.rl-bal-plus {
    display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px;
    border-radius: 50%; background: linear-gradient(135deg, var(--gold-light), var(--gold)); color: #1a1208;
    font-size: 20px; font-weight: 700; text-decoration: none; line-height: 1; flex: 0 0 auto;
    box-shadow: 0 2px 10px rgba(212,168,83,0.4);
}
.rl-bal-plus:hover { filter: brightness(1.1); }

.rl-stage { position: relative; }
.rl-recipient { margin-bottom: 18px; }
.rl-recipient label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 8px; }
.rl-select {
    width: 100%; max-width: 340px; height: 48px; padding: 0 14px;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
    color: var(--text); font-family: var(--font-body); font-size: 15px;
}

/* reel arena with faded edges */
.rl-reel-wrap {
    position: relative; overflow: hidden; padding: 18px 0; border-radius: 18px;
    background: radial-gradient(ellipse at 50% 50%, rgba(212,168,83,0.10), transparent 70%), rgba(8,6,14,0.6);
    border: 1px solid var(--border);
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14%, #000 86%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 14%, #000 86%, transparent 100%);
}
.rl-reel { display: flex; gap: 8px; will-change: transform; }

/* neon pointers top + bottom (reset the old line pointer) */
.rl-pointer { position: absolute; left: 50%; transform: translateX(-50%); z-index: 4; width: 0; height: 0; background: none; pointer-events: none; }
.rl-pointer-top { top: 0; border-left: 9px solid transparent; border-right: 9px solid transparent; border-top: 13px solid var(--gold-light); filter: drop-shadow(0 0 6px var(--gold)); }
.rl-pointer-bot { bottom: 0; border-left: 9px solid transparent; border-right: 9px solid transparent; border-bottom: 13px solid var(--gold-light); filter: drop-shadow(0 0 6px var(--gold)); }
.rl-reel-wrap::after {
    content: ''; position: absolute; top: 10px; bottom: 10px; left: 50%; width: 104px;
    transform: translateX(-50%); border-radius: 14px; border: none;
    box-shadow: 0 0 0 2px var(--gold-light), 0 0 26px rgba(212,168,83,0.5);
    pointer-events: none; z-index: 3;
}

/* chips row */
.rl-actions { display: flex; flex-direction: row; align-items: stretch; gap: 10px; margin-top: 16px; }
.rl-chip {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 46px; padding: 0 16px; margin: 0; border-radius: 12px; cursor: pointer;
    background: var(--bg-card); border: 1px solid var(--border); color: var(--text);
    font-family: inherit; font-size: 14px; font-weight: 600; width: auto;
}
#rlPrizes { flex: 1; }
.rl-chip:hover { border-color: var(--border-hover); }

/* primary CTA */
.rl-spin-btn {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; height: 58px; margin-top: 20px; border: none; cursor: pointer; box-shadow: none;
    border-radius: 16px; font-family: var(--font-display); font-weight: 700; color: #1a1208;
    background: linear-gradient(135deg, #f5d98a, var(--gold) 55%, #b8862f);
    box-shadow: 0 10px 28px rgba(212,168,83,0.4); transition: transform 0.1s, filter 0.2s;
}
.rl-spin-btn:hover { filter: brightness(1.05); }
.rl-spin-btn:active { transform: scale(0.97); }
.rl-spin-btn:disabled { opacity: 0.55; cursor: default; box-shadow: none; }
.rl-spin-label { font-size: 18px; }
.rl-spin-cost { font-size: 15px; opacity: 0.78; }

@media (max-width: 600px) {
    .dash-page { padding: 80px 16px 100px; }
    .rl-header { margin-bottom: 16px; }
    .rl-header h1 { font-size: 26px; }
    .rl-balance-cap { padding: 7px 7px 7px 14px; }
    .rl-bal-val { font-size: 16px; }
    .rl-select { max-width: none; }
    .rl-spin-btn { position: fixed; left: 16px; right: 16px; bottom: 16px; width: auto; margin: 0; z-index: 60;
        box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 26px rgba(212,168,83,0.4); }
    .rl-history { display: none; }
    .rl-modal { padding: 22px; align-items: center; }
    .rl-modal-box { padding: 24px 18px; max-width: 420px; width: 100%; border-radius: 16px; max-height: 86vh;
        box-shadow: 0 0 60px rgba(212,168,83,0.40), 0 24px 60px rgba(0,0,0,0.65); }
    .rl-modal-actions { flex-direction: column-reverse; gap: 10px; }
    .rl-modal-actions .btn { width: 100%; height: 50px; justify-content: center; }
}

/* ============================================================
   App bottom tab bar — clearance for dashboard pages.
   The bar's own styles live in base.css (the partial loads on
   every page); only the dashboard-specific spacing stays here.
   ============================================================ */
@media (max-width: 600px) {
    /* clearance for the fixed bar */
    .dash-page { padding-bottom: 80px; }
    /* roulette: float the Spin button just above the tab bar */
    .rl-spin-btn { bottom: calc(58px + 12px) !important; }
    .dash-page:has(.rl-spin-btn) { padding-bottom: 150px; }
}

/* App view (logged-in): the bottom tab bar replaces the site footer on mobile */
@media (max-width: 600px) {
    body.app-shell .footer { display: none; }
}

/* Roulette pool tabs (Classic / Summer Season) */
.rl-tabs { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.rl-tab {
    padding: 8px 18px; border-radius: 999px; text-decoration: none;
    font-weight: 600; font-size: .92rem; line-height: 1;
    color: #9aa3b2; border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.03); transition: color .15s, border-color .15s, background .15s;
}
.rl-tab:hover { color: #fff; border-color: rgba(212,168,83,.5); }
.rl-tab.active {
    color: #1a1208; background: linear-gradient(135deg, #f5d98a, #d4a853);
    border-color: #d4a853;
}
