:root {
    color-scheme: dark;
    --bg: #101312;
    --surface: #181f1d;
    --surface-2: #202927;
    --surface-3: #111614;
    --line: #32413d;
    --text: #f4f1e8;
    --muted: #aab5af;
    --gold: #e2b84d;
    --gold-2: #9f6f19;
    --red: #ff7d7d;
    --green: #82d895;
    --blue: #8db7ff;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    background:
        linear-gradient(90deg, rgba(16, 19, 18, .94), rgba(16, 19, 18, .72)),
        url("https://images.unsplash.com/photo-1518709268805-4e9042af2176?auto=format&fit=crop&w=1800&q=80") center / cover fixed;
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
}

button,
input,
select,
textarea {
    font: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

.app-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    max-width: 100%;
    overflow-x: clip;
    padding: 20px 0 56px;
}

.navbar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 18px;
    border: 1px solid rgba(226, 184, 77, .24);
    border-radius: 8px;
    background: rgba(16, 19, 18, .88);
    backdrop-filter: blur(14px);
    padding: 10px 12px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
}

.brand-mark {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 8px;
    background: linear-gradient(180deg, var(--gold), var(--gold-2));
    color: #15110a;
    font-size: 13px;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.navbar > form {
    margin: 0;
}

.nav-menu-toggle {
    display: none;
    width: 42px;
    height: 38px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface-2);
    cursor: pointer;
    padding: 8px;
}

.nav-menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: var(--text);
}

.nav-menu-toggle span + span {
    margin-top: 4px;
}

.nav-links a,
.nav-button {
    min-height: 36px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    padding: 8px 10px;
}

.nav-links a:hover,
.nav-button:hover {
    border-color: var(--line);
    background: var(--surface-2);
    color: var(--text);
}

.auth-layout,
.dashboard-head,
.panel-grid,
.character-workspace {
    margin-top: 18px;
}

.auth-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
    align-items: center;
    gap: 28px;
    min-height: 620px;
}

.auth-copy h1,
.dashboard-head h1 {
    margin: 0;
    font-size: 48px;
    line-height: 1;
}

.auth-copy {
    max-width: 560px;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--gold);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.muted,
.section-title p,
.character-head p,
.summary span {
    color: var(--muted);
}

.muted {
    margin: 14px 0 0;
    font-size: 16px;
    line-height: 1.6;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h2 {
    margin-bottom: 18px;
    font-size: 22px;
}

h3 {
    margin-bottom: 4px;
    font-size: 22px;
}

.panel,
.character-card,
.summary,
.empty {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(24, 31, 29, .95);
    box-shadow: 0 18px 50px rgba(0, 0, 0, .3);
}

.panel,
.character-card,
.empty {
    padding: 20px;
}

.auth-card {
    min-height: 360px;
}

label {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.check-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.check-row input {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    min-height: 18px;
    padding: 0;
    accent-color: var(--gold);
}

.check-row span {
    line-height: 1.35;
}

input,
select,
textarea {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface-3);
    color: var(--text);
    padding: 10px 12px;
    outline: none;
}

input:disabled {
    color: #87928d;
    cursor: not-allowed;
    opacity: .82;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(226, 184, 77, .16);
}

button {
    min-height: 42px;
    border: 0;
    border-radius: 6px;
    background: linear-gradient(180deg, var(--gold), var(--gold-2));
    color: #17120a;
    cursor: pointer;
    font-weight: 800;
    padding: 10px 16px;
}

button:hover {
    filter: brightness(1.08);
}

.button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    border-radius: 6px;
    background: linear-gradient(180deg, var(--gold), var(--gold-2));
    color: #17120a;
    font-weight: 800;
    padding: 10px 16px;
}

.button-link.secondary {
    border: 1px solid var(--line);
    background: var(--surface-2);
    color: var(--text);
}

.download-page {
    margin-top: 18px;
}

.download-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.download-card {
    display: grid;
    gap: 18px;
    align-content: space-between;
    min-height: 260px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(24, 31, 29, .95);
    box-shadow: 0 18px 50px rgba(0, 0, 0, .3);
    padding: 20px;
}

.download-card h2 {
    margin-bottom: 10px;
}

.download-subscription {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
    gap: 16px;
    align-items: center;
    border: 1px solid rgba(225, 164, 74, .3);
    border-radius: 8px;
    background: rgba(24, 31, 29, .95);
    box-shadow: 0 18px 50px rgba(0, 0, 0, .28);
    margin-top: 16px;
    padding: 20px;
}

.download-subscription h2 {
    margin-bottom: 8px;
}

.download-actions {
    display: grid;
    gap: 10px;
}

.download-locked {
    border: 1px solid rgba(255, 201, 120, .28);
    border-radius: 6px;
    background: rgba(255, 201, 120, .08);
    color: var(--gold);
    font-weight: 800;
    padding: 12px;
    text-align: center;
}

.copy-box {
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface-3);
    color: var(--gold);
    font-family: Consolas, monospace;
    font-weight: 800;
    margin: 12px 0;
    padding: 12px;
}

.mini-status {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    margin-top: 10px;
    min-height: 20px;
}

.admin-section {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(24, 31, 29, .95);
    box-shadow: 0 18px 50px rgba(0, 0, 0, .3);
    margin-top: 18px;
    padding: 20px;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 10px;
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--gold);
    font-size: 12px;
    text-transform: uppercase;
}

td {
    color: var(--muted);
    font-size: 13px;
}

.credit-history-table .credit-plus {
    color: #8ee6a8;
    font-weight: 800;
    white-space: nowrap;
}

.credit-history-table .credit-minus {
    color: #ff9c8a;
    font-weight: 800;
    white-space: nowrap;
}

.inline-form {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) auto;
    gap: 8px;
}

.inline-form input,
.inline-form button {
    min-height: 34px;
}

.flash {
    border-radius: 8px;
    margin-top: 16px;
    padding: 12px 14px;
    font-weight: 800;
}

.flash.success {
    border: 1px solid rgba(130, 216, 149, .45);
    background: rgba(26, 83, 44, .9);
    color: var(--green);
}

.flash.error {
    border: 1px solid rgba(255, 125, 125, .45);
    background: rgba(92, 30, 30, .9);
    color: var(--red);
}

.game-result-overlay {
    position: fixed;
    inset: 0;
    z-index: 2147483646;
    display: grid;
    place-items: center;
    background: rgba(0, 0, 0, .74);
    padding: 18px;
}

.game-result-dialog {
    width: min(480px, 100%);
    border: 1px solid rgba(226, 184, 77, .35);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(226, 184, 77, .15), transparent 42%),
        var(--surface);
    box-shadow: 0 26px 90px rgba(0, 0, 0, .62);
    padding: 24px;
    text-align: center;
}

.game-result-dialog.success {
    border-color: rgba(130, 216, 149, .45);
}

.game-result-dialog.error {
    border-color: rgba(255, 125, 125, .48);
}

.game-result-dialog h2 {
    margin-bottom: 10px;
    font-size: 32px;
}

.game-result-dialog p:not(.eyebrow) {
    color: var(--muted);
    line-height: 1.55;
}

.game-result-dialog button {
    margin-top: 10px;
}

.dashboard-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(420px, .85fr);
    align-items: end;
    gap: 18px;
}

.summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    background: var(--line);
}

.summary div {
    min-width: 0;
    background: rgba(24, 31, 29, .96);
    padding: 16px;
}

.summary span {
    display: block;
    font-size: 12px;
    font-weight: 800;
}

.summary strong {
    display: block;
    overflow-wrap: anywhere;
    margin-top: 5px;
    font-size: 18px;
}

.small-action {
    width: auto;
    min-width: 0;
    min-height: 24px;
    border: 1px solid rgba(226, 184, 77, .4);
    border-radius: 5px;
    background: transparent;
    color: var(--gold);
    font-size: 11px;
    line-height: 1;
    margin-top: 8px;
    padding: 4px 8px;
}

.ns-topup-overlay {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    z-index: 2147483647 !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(0, 0, 0, .72) !important;
    padding: 18px !important;
}

.ns-topup-dialog {
    width: min(920px, 100%) !important;
    max-height: min(760px, calc(100vh - 36px)) !important;
    overflow: auto !important;
    border: 1px solid var(--line) !important;
    border-radius: 8px !important;
    background: var(--surface) !important;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .55) !important;
    padding: 20px !important;
}

.ns-topup-dialog.compact {
    width: min(440px, 100%) !important;
}

.ns-topup-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 16px;
    padding-bottom: 14px;
}

.ns-topup-head h2 {
    margin-bottom: 0;
}

.ns-topup-close {
    min-height: 36px;
    background: var(--surface-2);
    color: var(--text);
}

.topup-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.topup-option {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-3);
    padding: 16px;
}

.topup-option h3 {
    margin-bottom: 10px;
}

.conversion-preview {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-3);
    margin: 10px 0 16px;
    padding: 14px;
}

.conversion-preview span,
.conversion-preview strong {
    display: block;
}

.conversion-preview span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.conversion-preview strong {
    color: var(--gold);
    font-size: 22px;
    margin-top: 4px;
}

.panel-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.webshop {
    margin-top: 18px;
}

.earn-page {
    margin-top: 18px;
    min-width: 0;
    max-width: 100%;
    overflow-x: clip;
    overflow-y: visible;
}

.earn-balance {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(24, 31, 29, .95);
    padding: 16px;
}

.earn-balance span,
.earn-balance strong {
    display: block;
}

.earn-balance span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.earn-balance strong {
    color: var(--gold);
    font-size: 26px;
    margin-top: 4px;
}

.earn-balance small {
    display: block;
    color: var(--muted);
    font-weight: 700;
    margin-top: 6px;
}

.cpx-wall {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(24, 31, 29, .95);
    min-height: 420px;
    padding: 14px;
}

.cpx-wall-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    border-bottom: 1px solid var(--line);
    margin-bottom: 12px;
    padding-bottom: 12px;
}

.cpx-wall-head h3 {
    margin-bottom: 4px;
}

.cpx-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.cpx-status-badge,
 .cpx-live-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(226, 184, 77, .35);
    border-radius: 999px;
    color: var(--text);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .04em;
    padding: 8px 12px;
    text-transform: uppercase;
}

.cpx-status-badge:empty {
    display: none;
}

.cpx-status-badge::before,
.cpx-live-check::before {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .28);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, .05);
}

.cpx-status-badge[data-state="live"],
.cpx-live-check[data-state="live"] {
    border-color: rgba(99, 220, 161, .45);
    color: #d8ffe7;
}

.cpx-status-badge[data-state="live"]::before,
.cpx-live-check[data-state="live"]::before {
    background: #63dca1;
    box-shadow: 0 0 0 4px rgba(99, 220, 161, .18);
}

.cpx-status-badge[data-state="checking"],
.cpx-live-check[data-state="checking"] {
    border-color: rgba(126, 200, 255, .42);
    color: #d7efff;
}

.cpx-status-badge[data-state="checking"]::before,
.cpx-live-check[data-state="checking"]::before {
    background: #7ec8ff;
    box-shadow: 0 0 0 4px rgba(126, 200, 255, .18);
}

.cpx-status-badge[data-state="error"],
.cpx-live-check[data-state="error"] {
    border-color: rgba(255, 127, 127, .4);
    color: #ffd7d7;
}

.cpx-status-badge[data-state="error"]::before,
.cpx-live-check[data-state="error"]::before {
    background: #ff7f7f;
    box-shadow: 0 0 0 4px rgba(255, 127, 127, .16);
}

.cpx-wall-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.cpx-wall-actions .button-link.secondary,
.cpx-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface-2);
    color: var(--text);
    cursor: pointer;
    font-weight: 800;
    padding: 8px 10px;
    white-space: nowrap;
}

.cpx-toggle-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.cpx-toggle-track {
    position: relative;
    width: 34px;
    height: 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
    transition: background .18s ease;
    flex: 0 0 auto;
}

.cpx-toggle-track::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: #f5efe3;
    transition: transform .18s ease;
}

.cpx-toggle-input:checked + .cpx-toggle-track {
    background: linear-gradient(180deg, var(--gold), var(--gold-2));
}

.cpx-toggle-input:checked + .cpx-toggle-track::after {
    transform: translateX(16px);
}

.cpx-toggle-label {
    display: inline-flex;
    align-items: center;
    line-height: 1;
    white-space: nowrap;
}

.cpx-notify-dock {
    display: block;
    align-items: center;
    /* border: 1px solid rgba(99, 220, 161, .2);
    border-radius: 8px;
    background: rgba(99, 220, 161, .04); */
    margin-bottom: 12px;
    padding: 8px;
}

#notification2 {
    min-height: 0;
}

#cpxFullscreen {
    position: relative;
    min-height: 320px;
    max-width: 100%;
    overflow: visible;
}

#cpxFullscreen > div,
#cpxFullscreen > section,
#cpxFullscreen > article {
    max-width: 100% !important;
}

/* CPX keeps fixed launcher/popup wrappers mounted off-screen. Clamp them to
   the viewport so hidden states do not extend the page's scrollable area. */
body .cpx_uqnxd_5,
body .cpx_uqnxd_6 {
    max-width: 100vw !important;
    max-height: 100dvh !important;
}

body .cpx_uqnxd_5 {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100dvh !important;
    overflow: clip !important;
}

body .cpx_uqnxd_6 {
    left: auto !important;
    right: 0 !important;
    width: min(500px, 100vw) !important;
    contain: layout paint !important;
    overflow: hidden !important;
}

/* CPX also has an internal React modal flow for qualification questions.
   Promote it to a real viewport overlay instead of rendering inside the
   fullscreen survey widget box. */
body .cpx_uqnxd_47 {
    position: fixed !important;
    inset: 0 !important;
    z-index: 2147483646 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 16px !important;
    background: rgba(0, 0, 0, .72) !important;
}

body .cpx_uqnxd_48 {
    position: fixed !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: min(960px, calc(100vw - 32px)) !important;
    max-width: 100% !important;
    max-height: calc(100dvh - 32px) !important;
    margin: 0 !important;
    overflow: auto !important;
    border-radius: 8px !important;
}

body .cpx_uqnxd_49 {
    position: sticky !important;
    top: 0 !important;
    z-index: 2 !important;
}

body .cpx_uqnxd_48 input,
body .cpx_uqnxd_48 select,
body .cpx_uqnxd_48 textarea {
    background: #ffffff !important;
    color: #1f2321 !important;
    caret-color: #1f2321 !important;
}

body .cpx_uqnxd_48 input::placeholder,
body .cpx_uqnxd_48 textarea::placeholder {
    color: rgba(31, 35, 33, .55) !important;
}

/* Keep the embedded CPX widget readable in the dark panel after requesting
   darker text colors for the CPX-hosted survey popup/iframe flow. */
#cpxFullscreen .cpx_uqnxd_4,
#cpxFullscreen .cpx_uqnxd_61,
#cpxFullscreen .cpx_uqnxd_63,
#cpxFullscreen .cpx_uqnxd_64,
#cpxFullscreen .cpx_uqnxd_71,
#cpxFullscreen .cpx_uqnxd_73,
#cpxFullscreen .cpx_uqnxd_74,
#cpxFullscreen .cpx_uqnxd_75,
#cpxFullscreen .cpx_uqnxd_82,
#cpxFullscreen .cpx_uqnxd_85,
#cpxFullscreen .cpx_uqnxd_86,
#cpxFullscreen .cpx_uqnxd_87,
#cpxFullscreen .cpx_uqnxd_89,
#cpxFullscreen .cpx_uqnxd_90 {
    color: var(--text) !important;
}

#cpxFullscreen .cpx_uqnxd_69,
#cpxFullscreen .cpx_uqnxd_88 {
    fill: var(--text) !important;
}

#cpxFullscreen .cpx_uqnxd_65,
#cpxFullscreen .cpx_uqnxd_66 {
    fill: #e2b84d !important;
}

.cpx-fallback {
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid var(--line);
    margin-top: 10px;
    padding-top: 10px;
}

.earn-provider {
    overflow: hidden;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(24, 31, 29, .95);
    margin-top: 16px;
    padding: 14px;
}

.earn-provider-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    border-bottom: 1px solid var(--line);
    margin-bottom: 12px;
    padding-bottom: 12px;
}

.earn-provider-head h3 {
    margin-bottom: 4px;
}

.earn-frame {
    display: block;
    width: 100%;
    min-height: 720px;
    border: 0;
    border-radius: 8px;
    background: #101513;
}

.tapjoy-shell {
    position: relative;
    z-index: 6;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(16, 19, 18, .52);
    padding: 14px;
}

.tapjoy-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.tapjoy-pill {
    border: 1px solid rgba(226, 184, 77, .28);
    border-radius: 999px;
    color: var(--gold);
    font-size: 12px;
    font-weight: 800;
    padding: 6px 10px;
}

.tapjoy-stage {
    position: relative;
    z-index: 6;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    min-height: 160px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 8px;
    background: #101513;
    overflow: hidden;
    transition: min-height .2s ease;
}

.tapjoy-stage.is-active {
    min-height: 720px;
}

.tapjoy-stage:empty::before {
    content: "Tapjoy will open here when you click Open Tapjoy.";
    display: grid;
    min-height: 160px;
    place-items: center;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
    padding: 18px;
    text-align: center;
}

.tapjoy-stage iframe,
.tapjoy-stage > div,
.tapjoy-stage canvas,
.tapjoy-stage * {
    max-width: 100% !important;
}

.tapjoy-stage iframe {
    display: block;
    width: 100% !important;
    min-width: 100% !important;
    border: 0;
}

.subscription-status-grid,
.shop-plan-grid {
    display: grid;
    gap: 14px;
}

.subscription-status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.shop-plan-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.subscription-status-card,
.shop-plan-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(24, 31, 29, .95);
    box-shadow: 0 18px 50px rgba(0, 0, 0, .3);
    padding: 18px;
}

.subscription-status-card span,
.shop-plan-card small {
    color: var(--muted);
    display: block;
    font-size: 13px;
    font-weight: 800;
}

.subscription-status-card strong {
    color: var(--gold);
    display: block;
    margin-top: 8px;
}

.subscription-tip {
    border: 1px solid rgba(126, 200, 255, .26);
    border-radius: 8px;
    background: rgba(126, 200, 255, .08);
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
    margin-top: 14px;
    padding: 14px;
}

.subscription-tip strong,
.plan-warning {
    color: var(--gold);
}

.shop-plan-grid {
    margin-top: 14px;
}

.shop-app-group {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(16, 19, 18, .52);
    margin-top: 14px;
    padding: 16px;
}

.shop-app-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 14px;
}

.shop-app-head h3 {
    margin-bottom: 0;
}

.shop-app-head span {
    border: 1px solid rgba(226, 184, 77, .38);
    border-radius: 999px;
    color: var(--gold);
    font-size: 12px;
    font-weight: 800;
    padding: 7px 10px;
}

.shop-plan-card {
    display: grid;
    gap: 12px;
}

.shop-plan-card.unavailable {
    opacity: .72;
}

.shop-plan-card button:disabled {
    cursor: not-allowed;
    filter: grayscale(.5);
    opacity: .65;
}

.shop-plan-card h3 {
    margin-bottom: 0;
}

.shop-plan-card p {
    color: var(--muted);
    margin: 0;
}

.shop-plan-card > strong {
    color: var(--gold);
    font-size: 28px;
}

.games-hub {
    margin-top: 18px;
}

.game-card-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.game-select-card {
    min-height: 220px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(226, 184, 77, .14), transparent 42%),
        rgba(24, 31, 29, .95);
    box-shadow: 0 18px 50px rgba(0, 0, 0, .3);
    display: grid;
    align-content: start;
    gap: 12px;
    padding: 18px;
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.game-select-card:hover {
    border-color: rgba(226, 184, 77, .7);
    background:
        linear-gradient(180deg, rgba(226, 184, 77, .22), transparent 48%),
        rgba(24, 31, 29, .98);
    transform: translateY(-3px);
}

.game-select-card span {
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    border-radius: 8px;
    background: linear-gradient(180deg, var(--gold), var(--gold-2));
    color: #15110a;
    font-weight: 900;
}

.game-select-card strong {
    font-size: 24px;
}

.game-select-card small {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
}

.game-fullscreen {
    width: calc(100vw - 32px);
    min-height: calc(100vh - 122px);
    margin: 18px 0 0 calc(50% - 50vw + 16px);
    border: 1px solid rgba(226, 184, 77, .24);
    border-radius: 8px;
    background:
        radial-gradient(circle at 18% 20%, rgba(226, 184, 77, .18), transparent 32%),
        linear-gradient(135deg, rgba(17, 22, 20, .98), rgba(24, 31, 29, .96));
    box-shadow: 0 24px 80px rgba(0, 0, 0, .45);
    padding: 18px;
}

.game-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.game-topbar h2 {
    margin: 0;
    text-align: right;
}

.game-stage {
    display: grid;
    grid-template-columns: minmax(320px, .85fr) minmax(340px, 1fr);
    align-items: stretch;
    gap: 18px;
    min-height: calc(100vh - 220px);
}

.game-hero,
.game-bet-panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(16, 19, 18, .66);
    padding: 22px;
}

.game-hero {
    display: grid;
    align-content: center;
    justify-items: center;
    text-align: center;
}

.game-emblem {
    display: grid;
    width: 180px;
    height: 180px;
    place-items: center;
    border: 2px solid rgba(226, 184, 77, .45);
    border-radius: 8px;
    background: linear-gradient(180deg, var(--gold), var(--gold-2));
    color: #15110a;
    font-size: 44px;
    font-weight: 900;
    box-shadow: 0 18px 48px rgba(0, 0, 0, .38);
}

.game-hero p {
    max-width: 360px;
    margin: 18px auto 0;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.5;
}

.game-bet-panel {
    display: grid;
    align-content: center;
    gap: 18px;
}

.game-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.game-bet-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.bet-card {
    margin: 0;
}

.bet-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.bet-card span {
    display: grid;
    min-height: 104px;
    align-content: center;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-3);
    cursor: pointer;
    padding: 14px;
}

.bet-card small,
.bet-card em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
}

.bet-card strong {
    color: var(--text);
    font-size: 20px;
}

.bet-card input:checked + span {
    border-color: rgba(226, 184, 77, .85);
    background: linear-gradient(180deg, rgba(226, 184, 77, .22), rgba(159, 111, 25, .16));
}

.gold-character-field[hidden] {
    display: none;
}

.game-choice-row,
.game-rule-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.game-choice {
    margin: 0;
}

.game-choice input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.game-choice span,
.game-rule-strip span,
.game-card-display,
.slot-preview span {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-3);
}

.game-choice span {
    display: grid;
    min-height: 66px;
    place-items: center;
    color: var(--text);
    cursor: pointer;
    font-size: 18px;
    font-weight: 900;
}

.game-choice input:checked + span {
    border-color: rgba(226, 184, 77, .85);
    background: linear-gradient(180deg, rgba(226, 184, 77, .24), rgba(159, 111, 25, .18));
}

.game-card-display {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 18px;
}

.game-card-display span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.game-card-display strong {
    font-size: 64px;
    line-height: 1;
}

.game-rule-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.game-rule-strip span {
    color: var(--muted);
    padding: 14px;
    text-align: center;
}

.slot-preview {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.slot-preview span {
    display: grid;
    min-height: 92px;
    place-items: center;
    color: var(--gold);
    font-size: 42px;
    font-weight: 900;
}

.game-play-button {
    min-height: 58px;
    font-size: 18px;
}

.blackjack-table {
    align-content: stretch;
}

.blackjack-row {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-3);
    display: grid;
    gap: 10px;
    padding: 14px;
}

.blackjack-row.active {
    border-color: rgba(226, 184, 77, .85);
    background: linear-gradient(180deg, rgba(226, 184, 77, .16), rgba(17, 22, 20, .86));
}

.blackjack-row span,
.blackjack-row small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.blackjack-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.blackjack-cards b {
    display: grid;
    width: 52px;
    height: 70px;
    place-items: center;
    border: 1px solid rgba(226, 184, 77, .38);
    border-radius: 8px;
    background: #f4f1e8;
    color: #1d1710;
    font-size: 24px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, .25);
}

.blackjack-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.blackjack-actions button:disabled {
    cursor: not-allowed;
    filter: grayscale(1);
    opacity: .45;
}

.game-emblem.is-playing {
    animation-duration: .78s;
    animation-timing-function: cubic-bezier(.2, .7, .2, 1);
}

.game-emblem-flip-coin.is-playing {
    animation-name: coinFlip;
}

.game-emblem-higher-lower.is-playing,
.game-emblem-blackjack.is-playing {
    animation-name: cardDeal;
}

.game-emblem-slot.is-playing {
    animation-name: slotShake;
}

@keyframes coinFlip {
    0% {
        transform: rotateY(0) scale(1);
    }
    50% {
        transform: rotateY(720deg) scale(1.08);
    }
    100% {
        transform: rotateY(1440deg) scale(1);
    }
}

@keyframes cardDeal {
    0% {
        transform: translateY(0) rotate(0);
    }
    35% {
        transform: translateY(-18px) rotate(-4deg);
    }
    70% {
        transform: translateY(8px) rotate(3deg);
    }
    100% {
        transform: translateY(0) rotate(0);
    }
}

@keyframes slotShake {
    0%, 100% {
        transform: translateX(0);
    }
    15%, 45%, 75% {
        transform: translateX(-8px);
    }
    30%, 60%, 90% {
        transform: translateX(8px);
    }
}

.section-title {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
    align-items: end;
    gap: 16px;
    margin-bottom: 12px;
}

.section-title h2 {
    margin-bottom: 0;
}

.character-picker {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 10px;
}

.character-picker label {
    margin-bottom: 0;
}

.character-list-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.select-character-card {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(24, 31, 29, .92);
    padding: 12px;
    transition: border-color .15s ease, background .15s ease, transform .15s ease;
}

.select-character-card:hover,
.select-character-card.active {
    border-color: rgba(226, 184, 77, .78);
    background: rgba(32, 41, 39, .98);
}

.select-character-card:hover {
    transform: translateY(-1px);
}

.character-avatar {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 8px;
    background: var(--surface-3);
    color: var(--gold);
    font-weight: 900;
}

.select-character-card strong,
.select-character-card small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.select-character-card small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.character-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 18px;
    padding-bottom: 16px;
}

.custom-color-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(24, 31, 29, .95);
    box-shadow: 0 18px 50px rgba(0, 0, 0, .3);
    margin-top: 16px;
    padding: 20px;
}

.color-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.color-input {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
}

.color-input input[type="color"] {
    min-height: 42px;
    padding: 3px;
}

.hex-field {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 0;
}

.hex-field .hex-input {
    width: 100%;
    padding-right: 34px;
}

.clear-color {
    position: absolute;
    top: 50%;
    right: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    min-width: 22px;
    height: 22px;
    min-height: 22px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    margin: 0;
    padding: 0;
    transform: translateY(-50%);
}

.clear-color:hover {
    background: var(--surface-2);
    color: var(--text);
}

.name-color-preview {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-3);
    margin-bottom: 16px;
    padding: 18px;
    overflow-x: auto;
}

.name-color-preview span,
.name-color-preview strong {
    display: block;
}

.name-color-preview span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.time-remaining {
    color: var(--accent);
    display: inline-block;
    font-size: 12px;
    font-weight: 800;
    margin-left: 6px;
}

.name-color-preview strong {
    display: inline-block;
    max-width: 100%;
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 40px;
    font-weight: 700;
    line-height: 1;
    margin-top: 8px;
    overflow-wrap: normal;
    background-size: 200% 100%;
    white-space: nowrap;
    text-shadow:
        0 1px 0 #3b1909,
        1px 0 0 #3b1909,
        -1px 0 0 #3b1909,
        0 -1px 0 #3b1909,
        1px 1px 0 #3b1909,
        -1px 1px 0 #3b1909,
        1px -1px 0 #3b1909,
        -1px -1px 0 #3b1909,
        0 3px 0 rgba(75, 33, 13, 0.65);
}

.name-color-preview strong.is-gradient-name {
    color: transparent;
    -webkit-text-fill-color: transparent;
    -webkit-text-stroke: 1px #3b1909;
    -webkit-background-clip: text;
    background-clip: text;
    text-shadow: none;
}

@media (max-width: 520px) {
    .name-color-preview strong {
        font-size: 32px;
    }
}

@keyframes nameColorFlow {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 100% 50%;
    }
}

.plan-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 8px 0 16px;
}

.plan-option {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-3);
    cursor: pointer;
    gap: 4px;
    margin-bottom: 0;
    padding: 12px;
}

.plan-option input {
    width: auto;
    min-height: 0;
}

.plan-option span,
.plan-option strong {
    display: block;
}

.plan-option strong {
    color: var(--gold);
}

.stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.stats span {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    padding: 6px 10px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.wide {
    grid-column: 1 / -1;
}

.skill-slots {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.skill-slots > span {
    grid-column: 1 / -1;
    color: var(--blue);
    font-size: 13px;
    font-weight: 800;
}

.empty {
    color: var(--muted);
}

@media (max-width: 900px) {
    .navbar,
    .auth-layout,
    .dashboard-head,
    .panel-grid,
    .section-title,
    .character-picker,
    .summary,
    .form-grid,
    .skill-slots,
    .color-grid,
    .game-card-grid,
    .game-stage,
    .game-bet-cards,
    .game-form-grid,
    .game-rule-strip,
    .blackjack-actions,
    .plan-row,
    .subscription-status-grid,
    .shop-plan-grid,
    .download-grid,
    .download-subscription,
    .cpx-wall-head,
    .cpx-notify-dock,
    .earn-provider-head,
    .topup-options {
        grid-template-columns: 1fr;
    }

    .ns-topup-head {
        flex-direction: column;
    }

    .tapjoy-shell {
        padding: 10px;
    }

    .tapjoy-stage {
        min-height: 160px;
    }

    .tapjoy-stage.is-active {
        min-height: 560px;
    }

    .auth-layout {
        align-items: start;
        min-height: auto;
    }

    .auth-copy h1,
    .dashboard-head h1 {
        font-size: 36px;
    }

    .nav-links {
        justify-content: flex-start;
    }

    .navbar {
        align-items: stretch;
        gap: 10px;
        grid-template-columns: minmax(0, 1fr) auto;
        padding: 10px;
    }

    .brand {
        min-width: 0;
    }

    .brand > span:last-child {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .nav-links {
        display: none;
        grid-column: 1 / -1;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .nav-links.is-open {
        display: grid;
    }

    .nav-menu-toggle {
        display: grid;
    }

    .cpx-wall-actions .button-link.secondary,
    .cpx-toggle {
        width: 100%;
        white-space: normal;
    }

    .cpx-toggle-label {
        white-space: normal;
    }

    body .cpx_uqnxd_5 {
        width: 100% !important;
        max-width: 100% !important;
        height: 100% !important;
        max-height: 100% !important;
    }

    body .cpx_uqnxd_6 {
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    body .cpx_uqnxd_48 {
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: calc(100vw - 24px) !important;
        max-width: calc(100vw - 24px) !important;
        max-height: calc(100dvh - 24px) !important;
    }

    .nav-links a,
    .nav-button {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 38px;
        padding: 8px;
        text-align: center;
    }

    .navbar > form,
    .navbar > form .nav-button {
        width: 100%;
    }

    .navbar > form {
        display: none;
        grid-column: 1 / -1;
    }

    .navbar:has(.nav-links.is-open) > form {
        display: block;
    }

    .character-head {
        align-items: stretch;
        flex-direction: column;
    }

    .stats {
        justify-content: flex-start;
    }

    .game-fullscreen {
        width: 100%;
        min-height: auto;
        margin-left: 0;
    }

    .game-stage {
        min-height: auto;
    }

    .game-topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .game-topbar h2 {
        text-align: left;
    }
}
