.bj-page {
    --bj-ink: #173d3a;
    --bj-muted: #647875;
    --bj-cream: #fffaf0;
    --bj-paper: #ffffff;
    --bj-aqua: #dff4ec;
    --bj-teal: #176d64;
    --bj-teal-dark: #104e49;
    --bj-orange: #ee8b55;
    --bj-line: #d9e5df;
    width: min(1120px, 100%);
    margin: 0 auto;
    color: var(--bj-ink);
    font-family: "Source Sans Pro", "Source Sans 3", Arial, sans-serif;
}

.bj-page *,
.bj-page *::before,
.bj-page *::after {
    box-sizing: border-box;
}

.bj-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 26px 28px;
    margin: 2px 0 14px;
    border: 1px solid var(--bj-line);
    border-radius: 22px;
    background: var(--bj-cream);
    overflow: hidden;
    position: relative;
}

.bj-hero::after {
    content: "";
    width: 180px;
    height: 180px;
    position: absolute;
    right: -90px;
    bottom: -105px;
    border: 22px solid rgba(23, 109, 100, .08);
    border-radius: 50%;
}

.bj-hero-copy {
    position: relative;
    z-index: 1;
    max-width: 680px;
}

.bj-eyebrow,
.bj-kicker,
.bj-strip-label,
.bj-balance-label {
    display: block;
    color: var(--bj-teal);
    font-size: 12px;
    line-height: 1.25;
    font-weight: 800;
    letter-spacing: .085em;
    text-transform: uppercase;
}

.bj-eyebrow {
    margin-bottom: 8px;
}

.bj-eyebrow span {
    display: inline-block;
    margin-right: 4px;
    font-size: 18px;
    vertical-align: -2px;
}

.bj-hero h1 {
    margin: 0;
    color: var(--bj-ink);
    font-size: clamp(30px, 5vw, 52px);
    line-height: .98;
    letter-spacing: -.04em;
}

.bj-hero p {
    margin: 12px 0 0;
    max-width: 620px;
    color: var(--bj-muted);
    font-size: clamp(16px, 2.2vw, 19px);
    line-height: 1.5;
}

.bj-balance-card {
    min-width: 172px;
    padding: 18px 20px 15px;
    border: 1px solid #bdd9cf;
    border-radius: 18px;
    background: var(--bj-paper);
    box-shadow: 0 8px 24px rgba(17, 75, 69, .08);
    position: relative;
    z-index: 1;
}

.bj-balance-card strong {
    display: inline-block;
    margin-top: 4px;
    font-size: 34px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.bj-balance-unit {
    display: inline-block;
    margin-left: 3px;
    color: var(--bj-muted);
    font-size: 13px;
}

.bj-chip-stack {
    height: 24px;
    margin-top: 10px;
    position: relative;
}

.bj-chip-stack i {
    display: block;
    width: 44px;
    height: 12px;
    position: absolute;
    left: 0;
    border: 3px dashed rgba(255, 255, 255, .9);
    border-radius: 50%;
    background: var(--bj-orange);
    box-shadow: 0 1px 0 #b96238;
}

.bj-chip-stack i:nth-child(1) { top: 12px; }
.bj-chip-stack i:nth-child(2) { top: 6px; left: 5px; background: var(--bj-teal); box-shadow: 0 1px 0 var(--bj-teal-dark); }
.bj-chip-stack i:nth-child(3) { top: 0; left: 1px; }

.bj-entertainment-notice {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 2px 14px;
    color: #5d6e6a;
    font-size: 13px;
    line-height: 1.4;
}

.bj-entertainment-notice span {
    color: var(--bj-orange);
    font-size: 10px;
}

.bj-login-card {
    display: grid;
    grid-template-columns: auto minmax(0, 620px);
    justify-content: center;
    align-items: center;
    gap: 26px;
    min-height: 330px;
    padding: 42px 28px;
    border: 1px solid var(--bj-line);
    border-radius: 22px;
    background: var(--bj-paper);
    text-align: left;
}

.bj-login-turtle {
    display: grid;
    width: 112px;
    height: 112px;
    place-items: center;
    border-radius: 50%;
    background: var(--bj-aqua);
    font-size: 58px;
}

.bj-login-card h2,
.bj-panel h2,
.bj-table-heading h2,
.bj-modal h2 {
    margin: 3px 0 9px;
    color: var(--bj-ink);
    font-size: clamp(24px, 3vw, 31px);
    line-height: 1.1;
}

.bj-login-card p {
    margin: 0 0 22px;
    color: var(--bj-muted);
    font-size: 17px;
    line-height: 1.55;
}

.bj-primary-link,
.bj-secondary-link {
    display: inline-flex;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 800;
    text-decoration: none !important;
}

.bj-primary-link {
    margin-right: 9px;
    background: var(--bj-teal);
    color: #fff !important;
}

.bj-primary-link:hover { background: var(--bj-teal-dark); }
.bj-secondary-link { color: var(--bj-teal) !important; }

.bj-day-strip {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 12px;
    padding: 14px 18px;
    border: 1px solid #c7dfd6;
    border-radius: 14px;
    background: var(--bj-aqua);
}

.bj-day-strip strong {
    display: block;
    margin-top: 3px;
    color: var(--bj-ink);
    font-size: 16px;
}

.bj-day-strip strong + span {
    display: block;
    margin-top: 2px;
    color: var(--bj-muted);
    font-size: 13px;
}

.bj-day-countdown { text-align: right; }
.bj-day-countdown strong { font-variant-numeric: tabular-nums; }

.bj-announcement {
    display: flex;
    min-height: 50px;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding: 11px 16px;
    border: 1px solid var(--bj-line);
    border-radius: 14px;
    background: #fff;
    color: var(--bj-ink);
    font-size: 15px;
    font-weight: 700;
}

.bj-announcement.is-success { border-color: #91cdb0; background: #effaf4; }
.bj-announcement.is-warning { border-color: #edc282; background: #fff7e8; }
.bj-announcement.is-error { border-color: #e5aaa5; background: #fff2f1; color: #8a2f29; }
.bj-announcement-icon {
    display: inline-flex;
    width: 1.15em;
    height: 1em;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    line-height: 1;
    transform: translateY(-1px);
}
#blackjack-announcement-text { min-width: 0; flex: 1 1 auto; }
.bj-announcement a {
    margin-left: auto;
    color: var(--bj-teal) !important;
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
}

.bj-table-shell,
.bj-panel {
    border: 1px solid var(--bj-line);
    border-radius: 20px;
    background: var(--bj-paper);
    box-shadow: 0 12px 34px rgba(27, 68, 62, .055);
}

.bj-table-shell {
    padding: 18px;
}

.bj-table-heading,
.bj-panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.bj-table-heading h2,
.bj-panel-heading h2 {
    margin-bottom: 0;
}

.bj-help-button,
.bj-text-button,
.bj-leaderboard-tabs button {
    min-height: 44px;
    border: 1px solid #b8d3ca;
    border-radius: 10px;
    background: #fff;
    color: var(--bj-teal-dark);
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    font-weight: 800;
}

.bj-help-button,
.bj-text-button { padding: 9px 14px; }
.bj-help-button:hover,
.bj-text-button:hover,
.bj-leaderboard-tabs button:hover { border-color: var(--bj-teal); background: #f1faf7; }

.bj-screen-warning {
    display: none;
    margin: 14px 0;
    padding: 12px 14px;
    border-left: 4px solid var(--bj-orange);
    background: #fff8ef;
    color: #685747;
    font-size: 14px;
    line-height: 1.5;
}

.bj-screen-warning.is-open { display: block; }

.bj-game-canvas {
    width: 100%;
    height: clamp(570px, 70vh, 680px);
    min-height: 570px;
    margin-top: 16px;
    overflow: hidden;
    border: 0;
    border-radius: 16px;
    background: #07191d;
    box-shadow: inset 0 0 0 1px #b6d7ce;
    touch-action: manipulation;
}

.bj-game-canvas canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.bj-keyboard-hint {
    padding: 10px 2px 0;
    color: var(--bj-muted);
    font-size: 12px;
    text-align: center;
}

.bj-keyboard-hint kbd {
    display: inline-block;
    min-width: 22px;
    padding: 2px 5px;
    border: 1px solid #cbd8d3;
    border-bottom-width: 2px;
    border-radius: 5px;
    background: #fff;
    color: var(--bj-ink);
    font-family: inherit;
    font-weight: 800;
}

.bj-lower-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(270px, .65fr);
    gap: 16px;
    margin-top: 16px;
}

.bj-panel { padding: 20px; }

.bj-leaderboard-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 7px;
    margin: 18px 0 14px;
}

.bj-leaderboard-tabs button {
    padding: 8px 6px;
}

.bj-leaderboard-tabs button[aria-selected="true"] {
    border-color: var(--bj-teal);
    background: var(--bj-teal);
    color: #fff;
}

.bj-leaderboard-tabs button:disabled,
.bj-leaderboard-tabs button:disabled:hover {
    border-color: #d7dfdd;
    background: #edf1f0;
    box-shadow: none;
    color: #96a29f;
    cursor: not-allowed;
    filter: grayscale(1);
    opacity: .62;
}

.bj-leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.bj-leaderboard-table th,
.bj-leaderboard-table td {
    padding: 11px 8px;
    border-top: 1px solid #e3ebe7;
    text-align: left;
}

.bj-leaderboard-table th:last-child,
.bj-leaderboard-table td:last-child { text-align: right; }
.bj-leaderboard-table th { color: var(--bj-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.bj-leaderboard-table a { color: var(--bj-teal) !important; font-weight: 800; }
.bj-rank { width: 42px; color: var(--bj-muted); font-variant-numeric: tabular-nums; }
.bj-leaderboard-body { overflow-x: auto; }
.bj-leaderboard-explanation {
    margin: 14px 0 8px;
    color: var(--bj-muted);
    font-size: 14px;
    line-height: 1.45;
}
.bj-leaderboard-table .bj-score-number {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.bj-leaderboard-table th:nth-child(3),
.bj-leaderboard-table th:nth-child(4),
.bj-leaderboard-table th:nth-child(5),
.bj-leaderboard-table td:nth-child(3),
.bj-leaderboard-table td:nth-child(4),
.bj-leaderboard-table td:nth-child(5) {
    text-align: center;
}
.bj-leaderboard-table .bj-record {
    text-align: center;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.bj-leaderboard-table tr.is-current-player td {
    background: #fff3ba;
    color: #5c4510;
    font-weight: 900;
}

.bj-payout-list {
    margin: 17px 0;
}

.bj-payout-list div {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 9px 0;
    border-bottom: 1px solid #e5ece8;
}

.bj-payout-list dt { font-weight: 700; }
.bj-payout-list dd { margin: 0; color: var(--bj-teal); font-weight: 800; }
.bj-rules-panel p { color: var(--bj-muted); font-size: 14px; line-height: 1.55; }
.bj-rules-panel h3 { margin: 19px 0 7px; color: var(--bj-teal-dark); font-size: 18px; }
.bj-rules-list { margin: 8px 0 0; padding-left: 22px; color: var(--bj-muted); font-size: 14px; line-height: 1.55; }
.bj-rules-list li + li { margin-top: 7px; }
.bj-screen-warning .bj-rules-list { margin: 0; color: inherit; }
.bj-muted { color: var(--bj-muted); }
.bj-error-card { padding: 15px; color: #8a2f29; background: #fff2f1; }

.bj-modal[hidden] { display: none; }
.bj-modal {
    display: grid;
    position: fixed;
    z-index: 10050;
    inset: 0;
    place-items: center;
    padding: 18px;
}

.bj-modal-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgba(9, 37, 34, .72);
    cursor: pointer;
}

.bj-modal-card {
    width: min(680px, 100%);
    max-height: min(760px, 88vh);
    padding: 24px;
    overflow: auto;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .28);
    position: relative;
}

.bj-modal-close {
    display: grid;
    width: 44px;
    height: 44px;
    position: absolute;
    top: 10px;
    right: 10px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: #edf5f2;
    color: var(--bj-ink);
    cursor: pointer;
    font-size: 29px;
}

.bj-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 9px;
    margin: 18px 0;
}

.bj-stat-grid div {
    padding: 12px;
    border: 1px solid var(--bj-line);
    border-radius: 10px;
    background: #f8fbfa;
}

.bj-stat-grid span { display: block; color: var(--bj-muted); font-size: 12px; }
.bj-stat-grid strong { display: block; margin-top: 3px; font-size: 24px; }
.bj-history { width: 100%; border-collapse: collapse; font-size: 13px; }
.bj-history th, .bj-history td { padding: 8px 5px; border-top: 1px solid var(--bj-line); text-align: right; }
.bj-history th:first-child, .bj-history td:first-child { text-align: left; }

body.dark-mode .bj-page,
.dark_mode .bj-page {
    --bj-ink: #e7f4ef;
    --bj-muted: #aebfba;
    --bj-cream: #183835;
    --bj-paper: #142d2b;
    --bj-aqua: #1b4742;
    --bj-line: #365b56;
}

body.dark-mode .bj-balance-card,
body.dark-mode .bj-announcement,
body.dark-mode .bj-help-button,
body.dark-mode .bj-text-button,
body.dark-mode .bj-leaderboard-tabs button,
.dark_mode .bj-balance-card,
.dark_mode .bj-announcement,
.dark_mode .bj-help-button,
.dark_mode .bj-text-button,
.dark_mode .bj-leaderboard-tabs button { background: #142d2b; }

body.dark-mode .bj-leaderboard-tabs button:disabled,
body.dark-mode .bj-leaderboard-tabs button:disabled:hover,
.dark_mode .bj-leaderboard-tabs button:disabled,
.dark_mode .bj-leaderboard-tabs button:disabled:hover {
    border-color: #364946;
    background: #202d2b;
    color: #71827e;
    opacity: .58;
}

@media (max-width: 760px) {
    .bj-hero { align-items: stretch; padding: 20px; }
    .bj-hero-copy { min-width: 0; }
    .bj-balance-card { min-width: 142px; padding: 14px; }
    .bj-balance-card strong { font-size: 29px; }
    .bj-lower-grid { grid-template-columns: 1fr; }
    .bj-game-canvas { height: 620px; min-height: 620px; }
}

@media (max-width: 540px) {
    .bj-page { width: calc(100% + 16px); margin-left: -8px; }
    .bj-hero { display: block; margin-top: 0; border-radius: 16px; }
    .bj-hero h1 { max-width: 330px; }
    .bj-balance-card { display: inline-block; min-width: 160px; margin-top: 18px; }
    .bj-day-strip { display: block; border-radius: 12px; }
    .bj-day-countdown { margin-top: 12px; text-align: left; }
    .bj-announcement { align-items: flex-start; flex-wrap: wrap; }
    .bj-announcement a { width: 100%; margin-left: 30px; }
    .bj-table-shell { padding: 10px; border-radius: 16px; }
    .bj-table-heading { padding: 5px 4px 0; }
    .bj-help-button { padding: 8px 10px; }
    .bj-game-canvas { height: 600px; min-height: 600px; border-radius: 12px; }
    .bj-keyboard-hint { display: none; }
    .bj-lower-grid { gap: 12px; margin-top: 12px; }
    .bj-panel { padding: 16px 13px; border-radius: 16px; }
    .bj-leaderboard-tabs { grid-template-columns: repeat(2, 1fr); }
    .bj-login-card { grid-template-columns: 1fr; padding: 28px 20px; text-align: center; }
    .bj-login-turtle { width: 90px; height: 90px; margin: 0 auto; font-size: 47px; }
    .bj-primary-link, .bj-secondary-link { display: flex; margin: 7px 0; }
    .bj-stat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 350px) {
    .bj-page { width: calc(100% + 22px); margin-left: -11px; }
    .bj-hero { padding: 17px 14px; }
    .bj-table-heading h2 { font-size: 23px; }
    .bj-help-button { font-size: 12px; }
    .bj-game-canvas { height: 590px; min-height: 590px; }
}

@media (orientation: landscape) and (max-height: 650px) and (min-width: 600px) {
    .bj-game-canvas { height: 520px; min-height: 520px; }
}

@media (prefers-reduced-motion: reduce) {
    .bj-page *, .bj-page *::before, .bj-page *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* Game information and launch page */
.bj-info-page {
    padding: 22px 0 34px;
}

.bj-landing-card {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(260px, .65fr);
    gap: clamp(28px, 6vw, 72px);
    min-height: 470px;
    align-items: center;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: clamp(30px, 6vw, 70px);
    border: 1px solid #174f49;
    border-radius: 30px;
    background:
        radial-gradient(circle at 8% 5%, rgba(255, 202, 117, .19), transparent 28%),
        radial-gradient(circle at 95% 95%, rgba(91, 216, 190, .22), transparent 32%),
        linear-gradient(145deg, #123f3b 0%, #0b2927 100%);
    box-shadow: 0 22px 60px rgba(11, 49, 45, .20);
    color: #fff;
}

.bj-landing-main,
.bj-credit-status,
.bj-landing-fine-print {
    position: relative;
    z-index: 2;
}

.bj-landing-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    color: #a8e2d6;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.bj-landing-turtle {
    display: inline-flex;
    width: 37px;
    height: 37px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    font-size: 23px;
    line-height: 1;
}

.bj-landing-card h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(52px, 8vw, 86px);
    line-height: .9;
    letter-spacing: -.055em;
}

.bj-landing-tagline {
    margin: 17px 0 8px;
    color: #d9ece8;
    font-size: clamp(19px, 2.4vw, 25px);
    line-height: 1.3;
}

.bj-landing-community {
    margin: 0 0 28px;
    color: #cce4de;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
}

.bj-play-button {
    display: flex;
    width: min(100%, 420px);
    min-height: 82px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 25px;
    border: 3px solid rgba(255, 255, 255, .55);
    border-radius: 20px;
    background: linear-gradient(135deg, #ffbc65, #f28b54);
    box-shadow: 0 13px 28px rgba(0, 0, 0, .22);
    color: #173d3a !important;
    font-size: clamp(24px, 3.5vw, 35px);
    font-weight: 900;
    line-height: 1;
    text-decoration: none !important;
    transition: transform .16s ease, filter .16s ease, box-shadow .16s ease;
}

.bj-play-button:hover,
.bj-play-button:focus {
    box-shadow: 0 17px 34px rgba(0, 0, 0, .28);
    filter: brightness(1.06);
    transform: translateY(-2px);
}

.bj-play-button > span:last-child {
    font-size: 1.25em;
}

.bj-credit-status {
    display: flex;
    min-height: 245px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 27px 22px;
    border: 1px solid rgba(211, 238, 231, .34);
    border-radius: 24px;
    background: rgba(255, 255, 255, .10);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .13);
    text-align: center;
    backdrop-filter: blur(5px);
}

.bj-credit-status.is-ready {
    border-color: rgba(255, 211, 132, .72);
    background: linear-gradient(160deg, rgba(255, 199, 105, .20), rgba(255, 255, 255, .10));
}

.bj-credit-status-icon {
    display: grid;
    width: 56px;
    height: 56px;
    margin-bottom: 15px;
    place-items: center;
    border-radius: 50%;
    background: #ffd184;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .18);
    color: #174b46;
    font-size: 27px;
    font-weight: 900;
}

.bj-credit-status-label {
    color: #a9dcd2;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.bj-credit-status > strong {
    display: block;
    margin-top: 8px;
    color: #fff;
    font-size: clamp(25px, 3vw, 33px);
    line-height: 1.08;
}

.bj-credit-countdown {
    font-variant-numeric: tabular-nums;
    letter-spacing: .035em;
}

.bj-credit-status p {
    margin: 11px 0 0;
    color: #c6ddd8;
    font-size: 14px;
    line-height: 1.4;
}

.bj-landing-fine-print {
    grid-column: 1 / -1;
    margin: -15px 0 0;
    color: rgba(213, 232, 227, .68);
    font-size: 12px;
    text-align: center;
}

.bj-landing-suit {
    position: absolute;
    z-index: 0;
    color: rgba(255, 255, 255, .035);
    font-family: Georgia, serif;
    font-size: 180px;
    line-height: 1;
    pointer-events: none;
    transform: rotate(-13deg);
}

.bj-landing-suit-one { top: -34px; right: 35%; }
.bj-landing-suit-two { right: -32px; bottom: -45px; color: rgba(242, 139, 84, .07); transform: rotate(18deg); }
.bj-landing-suit-three { left: -35px; bottom: -68px; transform: rotate(12deg); }

/* Standalone, full-viewport play surface */
html {
    height: 100%;
}

body.bj-play-body {
    min-width: 300px;
    min-height: 100%;
    margin: 0;
    background: #102a43;
}

.bj-fullscreen-page {
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    height: 100vh;
    height: 100dvh;
    min-height: 620px;
    padding: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
    display: flex;
    flex-direction: column;
    gap: 9px;
    overflow: hidden;
    background:
        radial-gradient(circle at 12% 12%, rgba(255, 113, 133, .22), transparent 25%),
        radial-gradient(circle at 88% 88%, rgba(84, 214, 196, .20), transparent 28%),
        #102a43;
}

.bj-play-topbar {
    display: flex;
    min-height: 58px;
    flex: 0 0 auto;
    align-items: center;
    gap: 18px;
    padding: 7px 10px 7px 14px;
    border: 1px solid rgba(255, 209, 102, .55);
    border-radius: 16px;
    background: linear-gradient(110deg, #182d49 0%, #173c51 52%, #25315a 100%);
    box-shadow: 0 8px 24px rgba(4, 19, 34, .22), inset 0 -2px 0 rgba(255, 209, 102, .16);
    color: #fff;
}

.bj-play-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #ffe08a !important;
    font-size: 18px;
    text-decoration: none !important;
    white-space: nowrap;
}

.bj-play-brand > span {
    display: inline-flex;
    width: 1.15em;
    height: 1em;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    line-height: 1;
    transform: translateY(-1px);
}

.bj-play-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.bj-play-nav button,
.bj-play-nav a {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, .32);
    border-radius: 10px;
    background: rgba(255, 255, 255, .10);
    color: #fff !important;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none !important;
    box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .13);
    transition: transform .15s ease, filter .15s ease, background .15s ease;
}

.bj-play-nav button:nth-child(1) { background: rgba(183, 166, 255, .22); }
.bj-play-nav button:nth-child(2) { background: rgba(85, 214, 194, .20); }
.bj-play-nav button:nth-child(3) { background: rgba(255, 189, 91, .20); }
.bj-play-nav a { background: rgba(255, 113, 133, .20); }
.bj-play-nav button:hover,
.bj-play-nav a:hover { background: rgba(255, 255, 255, .20); filter: brightness(1.12); transform: translateY(-1px); }

.bj-fullscreen-table {
    position: relative;
    display: flex;
    min-height: 0;
    flex: 1 1 auto;
    flex-direction: column;
    padding: 9px;
    border: 1px solid rgba(240, 207, 121, .72);
    border-radius: 18px;
    background: linear-gradient(145deg, #142d3f 0%, #0d2231 58%, #182a40 100%);
    box-shadow: 0 18px 46px rgba(3, 20, 35, .34), inset 0 0 0 1px rgba(255, 255, 255, .05);
}

.bj-fullscreen-table .bj-play-announcement {
    min-height: 42px;
    flex: 0 0 auto;
    margin-bottom: 8px;
    padding: 7px 12px;
    border-color: rgba(111, 140, 255, .35);
    background: linear-gradient(100deg, #fff6d8 0%, #eefcf9 55%, #f2edff 100%);
    box-shadow: inset 4px 0 0 #ffbd5b;
}

.bj-fullscreen-table .bj-play-announcement.is-success {
    background: linear-gradient(100deg, #e8fff4, #effffb);
    box-shadow: inset 4px 0 0 #43cf9a;
}
.bj-fullscreen-table .bj-play-announcement.is-warning {
    background: linear-gradient(100deg, #fff0ca, #fff8e8);
    box-shadow: inset 4px 0 0 #ff955e;
}
.bj-fullscreen-table .bj-play-announcement.is-error {
    background: linear-gradient(100deg, #ffe5e8, #fff2f3);
    box-shadow: inset 4px 0 0 #ff7185;
}

.bj-fullscreen-table .bj-game-canvas {
    height: auto;
    min-height: 0;
    flex: 1 1 auto;
    margin-top: 0;
    border: 0;
    box-shadow: inset 0 0 0 1px #071b25, 0 8px 22px rgba(2, 13, 20, .34);
}

.bj-fullscreen-table .bj-keyboard-hint { flex: 0 0 auto; padding-top: 6px; color: #bed2d7; }
.bj-fullscreen-table .bj-keyboard-hint kbd {
    border-color: rgba(240, 207, 121, .48);
    background: #1b3344;
    color: #f8e6ae;
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .28);
}
.bj-leaderboard-modal-card { width: min(960px, 100%); }

.bj-grant-popup {
    position: fixed;
    z-index: 60;
    top: max(18px, env(safe-area-inset-top));
    left: 50%;
    width: min(520px, calc(100% - 30px));
    padding: 20px 48px 20px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    border: 3px solid #ffd166;
    border-radius: 20px;
    color: #17332f;
    background: linear-gradient(135deg, #fffbe8, #e4fff4);
    box-shadow: 0 18px 50px rgba(3, 29, 39, .38);
    transform: translateX(-50%);
    animation: bj-grant-popup-arrive .35s ease-out both;
}
.bj-grant-popup[hidden] { display: none; }

.bj-credit-empty-card {
    width: min(520px,100%);
    padding: 31px 27px 25px;
    border: 3px solid #ffd166;
    background:
        radial-gradient(circle at 88% 8%,rgba(84,214,196,.22),transparent 28%),
        linear-gradient(145deg,#fff9dc,#edfff9);
    text-align: center;
}
.bj-credit-empty-modal .bj-modal-backdrop { animation: bj-credit-empty-backdrop-in 300ms ease-out both; }
.bj-credit-empty-modal .bj-credit-empty-card { animation: bj-credit-empty-card-in 300ms ease-out both; }
.bj-credit-empty-turtle { display: grid; width: 76px; height: 76px; margin: 0 auto 10px; place-items: center; border: 3px solid #fff; border-radius: 50%; background: linear-gradient(145deg,#54d6c4,#a8fff0); box-shadow: 0 8px 22px rgba(16,42,67,.18); font-size: 40px; }
.bj-credit-empty-card h2 { margin: 4px 25px 11px; color: #b1454e; font-size: clamp(25px,5vw,35px); line-height: 1.05; }
.bj-credit-empty-card p { margin: 8px auto; max-width: 430px; color: #405d58; font-size: 16px; line-height: 1.45; }
.bj-credit-empty-card > small { display: block; margin: -2px auto 4px; max-width: 410px; color: #687b77; font-weight: 700; line-height: 1.35; }
.bj-credit-empty-card p strong { display: inline-block; padding: 2px 8px; border-radius: 999px; background: #173d5d; color: #ffe08a; font-size: 19px; font-variant-numeric: tabular-nums; }
.bj-credit-empty-practice { width: 100%; min-height: 60px; margin-top: 14px; padding: 10px 16px; border: 2px solid rgba(255,255,255,.9); border-radius: 14px; background: linear-gradient(115deg,#54d6c4,#8ef0de 55%,#ffd166); box-shadow: 0 7px 0 #287e70,0 12px 20px rgba(16,42,67,.18); color: #102a43; cursor: pointer; font: inherit; font-size: 19px; font-weight: 900; }
.bj-credit-empty-practice:hover { filter: brightness(1.04) saturate(1.08); transform: translateY(-1px); }
.bj-credit-empty-practice:active { box-shadow: 0 3px 0 #287e70; transform: translateY(4px); }
.bj-credit-empty-later { margin-top: 15px; padding: 7px 13px; border: 0; background: transparent; color: #607570; cursor: pointer; font: inherit; font-weight: 800; text-decoration: underline; }

.bj-challenge-intro-modal .bj-modal-backdrop { animation: bj-credit-empty-backdrop-in 300ms ease-out both; }
.bj-challenge-intro-card {
    width: min(600px, 100%);
    padding: 30px 28px 27px;
    border: 3px solid #ffd166;
    background:
        radial-gradient(circle at 92% 7%, rgba(255, 139, 155, .18), transparent 26%),
        radial-gradient(circle at 5% 96%, rgba(84, 214, 196, .22), transparent 30%),
        linear-gradient(145deg, #fffdf4, #effff9);
    text-align: center;
    animation: bj-credit-empty-card-in 300ms ease-out both;
}
.bj-challenge-intro-flag {
    display: grid;
    width: 72px;
    height: 72px;
    margin: 0 auto 11px;
    place-items: center;
    border: 3px solid #fff;
    border-radius: 50%;
    background: linear-gradient(145deg, #ffd166, #ff9f68);
    box-shadow: 0 9px 24px rgba(81, 50, 16, .18);
    font-size: 38px;
}
.bj-challenge-intro-card h2 { margin: 4px 30px 5px; color: #153f3a; font-size: clamp(28px, 5vw, 39px); line-height: 1.05; }
.bj-challenge-intro-lead { margin: 0 0 18px; color: #58706b; font-size: 17px; font-weight: 700; }
.bj-challenge-intro-points { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin: 0 0 18px; }
.bj-challenge-intro-points div { padding: 12px 8px; border: 1px solid #c9e5dc; border-radius: 13px; background: rgba(255,255,255,.72); }
.bj-challenge-intro-points strong { display: block; color: #137261; font-size: 28px; line-height: 1; }
.bj-challenge-intro-points span { display: block; margin-top: 5px; color: #60746f; font-size: 11px; font-weight: 800; line-height: 1.2; text-transform: uppercase; }
.bj-challenge-intro-rules { margin: 0 0 21px; padding: 16px 18px 16px 37px; border-radius: 14px; background: rgba(255,255,255,.72); color: #405d58; font-size: 14px; line-height: 1.45; text-align: left; }
.bj-challenge-intro-rules li + li { margin-top: 8px; }
.bj-challenge-intro-rules strong { color: #137261; }
.bj-challenge-intro-start { width: 100%; min-height: 60px; padding: 11px 18px; border: 2px solid rgba(255,255,255,.9); border-radius: 15px; background: linear-gradient(115deg,#54d6c4,#8ef0de 55%,#ffd166); box-shadow: 0 7px 0 #287e70,0 12px 20px rgba(16,42,67,.18); color: #102a43; cursor: pointer; font: inherit; font-size: 20px; font-weight: 900; }
.bj-challenge-intro-start:hover { filter: brightness(1.04) saturate(1.08); transform: translateY(-1px); }
.bj-challenge-intro-start:active { box-shadow: 0 3px 0 #287e70; transform: translateY(4px); }
.bj-challenge-intro-start:focus-visible { outline: 4px solid #16765e; outline-offset: 3px; }

.bj-grant-popup-turtle { flex: 0 0 auto; font-size: 44px; line-height: 1; }
.bj-grant-popup h2 { margin: 0 0 4px; color: #0b574a; font-size: 24px; }
.bj-grant-popup p { margin: 0; font-weight: 700; line-height: 1.4; }
.bj-grant-popup strong { display: block; margin-top: 5px; color: #bd6b16; font-size: 18px; }
.bj-grant-popup-close {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    color: #0b574a;
    background: transparent;
    cursor: pointer;
    font: 700 26px/1 Arial, sans-serif;
}
.bj-grant-popup-close:hover,
.bj-grant-popup-close:focus-visible {
    background: rgba(11, 87, 74, .12);
    outline: none;
}
@keyframes bj-grant-popup-arrive {
    from { opacity: 0; transform: translate(-50%, -18px) scale(.96); }
    to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

@keyframes bj-credit-empty-backdrop-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes bj-credit-empty-card-in {
    from { opacity: 0; transform: translateY(8px) scale(.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.bj-leave-modal-card {
    width: min(520px, 100%);
}

.bj-result-modal-card {
    width: min(980px, 100%);
    max-height: min(860px, 94vh);
    padding: 25px;
    border: 3px solid #ffd166;
    background:
        radial-gradient(circle at 8% 4%, rgba(255, 209, 102, .25), transparent 26%),
        radial-gradient(circle at 94% 12%, rgba(84, 214, 196, .18), transparent 24%),
        #fffdf7;
    box-shadow: 0 30px 90px rgba(3, 22, 35, .48), 0 0 0 7px rgba(255, 255, 255, .12);
}

.bj-result-modal.is-win .bj-result-modal-card { border-color: #54d6c4; }
.bj-result-modal.is-tie .bj-result-modal-card { border-color: #ffd166; }
.bj-result-modal.is-loss .bj-result-modal-card { border-color: #ff8b9b; }
.bj-result-modal.is-challenge-complete .bj-result-modal-card {
    border-color: #ffd166;
    background:
        radial-gradient(circle at 8% 5%,rgba(255,113,133,.27),transparent 26%),
        radial-gradient(circle at 94% 10%,rgba(84,214,196,.24),transparent 25%),
        radial-gradient(circle at 50% 110%,rgba(183,166,255,.22),transparent 42%),
        linear-gradient(145deg,#102a43,#133f53 54%,#153959);
    color: #fff;
    overflow-x: hidden;
}
.bj-result-modal.is-challenge-complete .bj-modal-close { border-color: rgba(255,255,255,.45); background: rgba(255,255,255,.12); color: #fff; }
.bj-result-modal.is-challenge-complete .bj-standard-result { display: none; }
.bj-challenge-finale { position: relative; z-index: 1; }
.bj-challenge-finale[hidden] { display: none; }
.bj-challenge-finale-hero { display: flex; align-items: center; justify-content: center; gap: 18px; padding: 2px 48px 14px 0; text-align: left; }
.bj-challenge-finale-trophy { display: grid; width: 88px; height: 88px; flex: 0 0 88px; place-items: center; border: 3px solid rgba(255,255,255,.8); border-radius: 50%; background: linear-gradient(145deg,#fff0a6,#ffbd5b); box-shadow: 0 0 0 7px rgba(255,209,102,.13),0 12px 30px rgba(0,0,0,.28); font-size: 47px; animation: bj-finale-trophy 1.1s cubic-bezier(.2,.8,.3,1) both; }
.bj-challenge-finale-hero .bj-kicker { color: #8ef0de; }
.bj-challenge-finale-hero h2 { margin: 1px 0 2px; color: #fff; font-size: clamp(30px,5vw,48px); line-height: .98; text-shadow: 0 3px 0 rgba(0,0,0,.18); }
.bj-challenge-finale-hero strong { display: inline-block; color: #ffe08a; font-size: 18px; }
.bj-challenge-finale-hero p { margin: 5px 0 0; color: #d8eeeb; font-weight: 700; }
.bj-challenge-finale-scoreboard { display: grid; grid-template-columns: 1fr 1.25fr; gap: 10px; margin-bottom: 10px; }
.bj-challenge-finale-scoreboard > div { display: grid; min-height: 102px; place-items: center; align-content: center; padding: 10px; border: 1px solid rgba(255,255,255,.2); border-radius: 15px; background: rgba(255,255,255,.08); text-align: center; }
.bj-challenge-finale-scoreboard span,.bj-challenge-finale-stats span { color: #a8d8d3; font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.bj-challenge-finale-scoreboard strong { color: #ffe08a; font-size: clamp(28px,4vw,42px); line-height: 1; }
.bj-challenge-finale-scoreboard small { margin-top: 4px; color: #d6e8e5; font-weight: 700; }
.bj-challenge-finale-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; margin-bottom: 10px; }
.bj-challenge-finale-stats > div { display: flex; min-width: 0; flex-direction: column; align-items: center; padding: 10px 6px; border-radius: 12px; background: rgba(255,255,255,.09); text-align: center; }
.bj-challenge-finale-stats strong { margin-top: 2px; color: #fff; font-size: 22px; }
.bj-challenge-finale-stats small { color: #a8d8d3; font-size: 10px; }
.bj-challenge-finale-run,.bj-challenge-finale-comparison { margin-bottom: 10px; padding: 10px 12px; border: 1px solid rgba(255,255,255,.16); border-radius: 13px; background: rgba(4,26,43,.34); }
.bj-challenge-finale h3 { margin: 0 0 7px; color: #fff; font-size: 14px; }
.bj-challenge-finale-hands { display: grid; grid-template-columns: repeat(10,1fr); gap: 5px; }
.bj-challenge-finale-hand { display: flex; min-width: 0; min-height: 47px; flex-direction: column; align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,.28); border-radius: 9px; background: rgba(255,255,255,.08); color: #fff; }
.bj-challenge-finale-hand span { font-size: 9px; font-weight: 900; opacity: .75; }
.bj-challenge-finale-hand strong { font-size: 16px; }
.bj-challenge-finale-hand.is-win { background: #087f73; }
.bj-challenge-finale-hand.is-loss { background: #9e4550; }
.bj-challenge-finale-hand.is-tie { background: #8b6b24; }
.bj-challenge-finale-hand.is-blackjack { outline: 2px solid #ffd166; box-shadow: 0 0 10px rgba(255,209,102,.42); }
.bj-challenge-finale-comparison p { margin: 0 0 7px; color: #d8eeeb; font-weight: 700; }
.bj-challenge-finale-nearby { display: flex; flex-wrap: wrap; gap: 5px; }
.bj-challenge-finale-nearby span { padding: 5px 8px; border-radius: 999px; background: rgba(255,255,255,.1); color: #d8eeeb; font-size: 11px; font-weight: 800; }
.bj-challenge-finale-nearby span.is-you { background: #ffd166; color: #102a43; }
.bj-challenge-finale-actions { display: grid; grid-template-columns: minmax(220px,1.4fr) 1fr .8fr; gap: 8px; }
.bj-challenge-finale-actions button { min-height: 51px; padding: 9px 12px; border: 1px solid rgba(255,255,255,.55); border-radius: 11px; color: #fff; cursor: pointer; font: inherit; font-weight: 900; }
.bj-challenge-finale-classic { background: linear-gradient(115deg,#ff7185,#ff9b61 55%,#ffd166); color: #102a43 !important; font-size: 17px !important; }
.bj-challenge-finale-leaders { background: #087f73; }
.bj-challenge-finale-share { background: #554b91; }
.bj-challenge-confetti { position: absolute; z-index: -1; inset: -25px; overflow: hidden; pointer-events: none; }
.bj-challenge-confetti i { position: absolute; top: -16px; width: 8px; height: 15px; border-radius: 2px; background: #ffd166; opacity: 0; animation: bj-finale-confetti 2.8s ease-in infinite; }
.bj-challenge-confetti i:nth-child(2n) { background: #54d6c4; }
.bj-challenge-confetti i:nth-child(3n) { background: #ff7185; }
.bj-challenge-confetti i:nth-child(4n) { background: #b7a6ff; }
.bj-challenge-confetti i:nth-child(1) { left: 4%; animation-delay: .1s; }.bj-challenge-confetti i:nth-child(2) { left: 13%; animation-delay: 1.1s; }.bj-challenge-confetti i:nth-child(3) { left: 22%; animation-delay: .5s; }.bj-challenge-confetti i:nth-child(4) { left: 31%; animation-delay: 1.8s; }.bj-challenge-confetti i:nth-child(5) { left: 41%; animation-delay: .8s; }.bj-challenge-confetti i:nth-child(6) { left: 49%; animation-delay: 2.1s; }.bj-challenge-confetti i:nth-child(7) { left: 58%; animation-delay: .2s; }.bj-challenge-confetti i:nth-child(8) { left: 66%; animation-delay: 1.5s; }.bj-challenge-confetti i:nth-child(9) { left: 74%; animation-delay: .7s; }.bj-challenge-confetti i:nth-child(10) { left: 82%; animation-delay: 2.2s; }.bj-challenge-confetti i:nth-child(11) { left: 90%; animation-delay: 1.2s; }.bj-challenge-confetti i:nth-child(12) { left: 96%; animation-delay: .4s; }

.bj-result-heading {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-right: 48px;
}

.bj-result-heading h2 { margin-bottom: 0; font-size: clamp(27px, 4vw, 39px); }

.bj-result-modal.is-win #blackjack-result-title,
.bj-result-modal.is-loss #blackjack-result-title {
    display: inline-block;
    padding: 2px 10px 4px;
    border-radius: 9px;
}

.bj-result-modal.is-win #blackjack-result-title {
    background: #e2f9ec;
    color: #079653;
}

.bj-result-modal.is-loss #blackjack-result-title {
    background: #ffe6ec;
    color: #e22345;
}

.bj-result-icon {
    display: grid;
    width: 68px;
    height: 68px;
    flex: 0 0 68px;
    place-items: center;
    border: 3px solid rgba(255, 255, 255, .9);
    border-radius: 50%;
    background: linear-gradient(145deg, #ffe08a, #ff9c68);
    box-shadow: 0 9px 22px rgba(16, 42, 67, .18);
    font-size: 35px;
}

.bj-result-modal.is-win .bj-result-icon { background: linear-gradient(145deg, #9ff4df, #54d6c4); }
.bj-result-modal.is-loss .bj-result-icon { background: linear-gradient(145deg, #ffc2ca, #ff7185); }

.bj-result-message {
    margin: 18px 0;
    padding: 15px 18px;
    border: 1px solid rgba(23, 109, 100, .2);
    border-left: 6px solid var(--bj-teal);
    border-radius: 13px;
    background: rgba(255, 255, 255, .82);
    color: var(--bj-ink);
    font-size: clamp(17px, 2.1vw, 21px);
    font-weight: 800;
    line-height: 1.35;
}

.bj-result-modal.is-win .bj-result-message {
    border-color: #8ee2b5;
    border-left-color: #09a85e;
    background: #ebfff3;
    color: #087745;
}

.bj-result-modal.is-tie .bj-result-message { border-left-color: #e5a72d; }
.bj-result-modal.is-loss .bj-result-message {
    border-color: #f2a8b6;
    border-left-color: #ee3155;
    background: #fff0f4;
    color: #d91f43;
}

.bj-result-fireworks {
    position: absolute;
    z-index: 4;
    inset: 0;
    overflow: hidden;
    border-radius: 15px;
    pointer-events: none;
}

.bj-result-fireworks[hidden] { display: none; }

.bj-result-fireworks i {
    width: 10px;
    height: 4px;
    position: absolute;
    border-radius: 999px;
    opacity: 0;
    box-shadow: 0 0 7px currentColor;
    transform: translate(-50%, -50%) rotate(var(--bj-firework-angle)) scale(.2);
    animation: bj-result-firework-burst 980ms cubic-bezier(.16, .72, .26, 1) var(--bj-firework-delay) both;
}

@keyframes bj-result-firework-burst {
    0% { opacity: 0; transform: translate(-50%, -50%) rotate(var(--bj-firework-angle)) scale(.15); }
    12% { opacity: 1; }
    72% { opacity: .95; }
    100% {
        opacity: 0;
        transform: translate(calc(-50% + var(--bj-firework-x)), calc(-50% + var(--bj-firework-y)))
            rotate(var(--bj-firework-angle)) scale(.35);
    }
}

.bj-result-section {
    min-width: 0;
    padding: 16px;
    border: 1px solid #d7e6df;
    border-radius: 15px;
    background: rgba(255, 255, 255, .88);
}

.bj-result-section h3 {
    margin: 0 0 11px;
    color: var(--bj-teal-dark);
    font-size: 18px;
}

.bj-result-leaderboard {
    overflow-x: auto;
    border-radius: 10px;
}

.bj-result-leaderboard-table { font-size: 14px; }
.bj-result-leaderboard-table th,
.bj-result-leaderboard-table td { padding: 8px 7px; }
.bj-result-leaderboard-table th:nth-child(3),
.bj-result-leaderboard-table td:nth-child(3) { text-align: right; }
.bj-result-leaderboard-table th:nth-child(4),
.bj-result-leaderboard-table th:nth-child(5),
.bj-result-leaderboard-table th:nth-child(6),
.bj-result-leaderboard-table td:nth-child(4),
.bj-result-leaderboard-table td:nth-child(5),
.bj-result-leaderboard-table td:nth-child(6) { text-align: center; }
.bj-result-leaderboard-table th:nth-child(3),
.bj-result-leaderboard-table tr td.bj-primary-score {
    color: #087f5b;
    font-weight: 900;
}
.bj-result-leaderboard-table tr td.bj-primary-score { font-size: 16px; }
.bj-result-leaderboard-table tr td.bj-secondary-stat {
    color: #555;
    font-weight: 600;
}

.bj-result-leaderboard-table tr.is-current-player td {
    background: #fff3ba;
    color: #5c4510;
    font-weight: 900;
}
.bj-result-leaderboard-table tr.is-current-player td.bj-primary-score { color: #087f5b; }
.bj-result-leaderboard-table tr.is-current-player td.bj-secondary-stat {
    color: #555;
    font-weight: 600;
}

.bj-current-player-star {
    display: inline-block;
    margin-left: 7px;
    color: #e5a72d;
    filter: drop-shadow(0 1px 0 #fff);
}

.bj-result-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(110px, 145px);
    gap: 11px;
    margin: 0 0 15px;
}

.bj-play-again {
    width: 100%;
    min-height: 64px;
    margin: 0;
    border: 2px solid rgba(255, 255, 255, .88);
    border-radius: 15px;
    background: linear-gradient(115deg, #ff7185, #ff9b61 48%, #ffd166);
    box-shadow: 0 8px 0 #9f4d45, 0 14px 25px rgba(105, 48, 43, .24);
    color: #102a43;
    cursor: pointer;
    font: inherit;
    font-size: clamp(20px, 3vw, 27px);
    font-weight: 900;
    letter-spacing: .01em;
}

.bj-play-again:hover { filter: brightness(1.04) saturate(1.08); transform: translateY(-1px); }
.bj-play-again:active { box-shadow: 0 4px 0 #9f4d45, 0 8px 18px rgba(105, 48, 43, .22); transform: translateY(4px); }
.bj-play-again:focus-visible { outline: 4px solid rgba(23, 109, 100, .35); outline-offset: 3px; }

.bj-share-results {
    min-height: 64px;
    padding: 10px 18px;
    border: 2px solid #0b6759;
    border-radius: 15px;
    background: linear-gradient(145deg, #e8fff8, #9fe8d7);
    box-shadow: 0 8px 0 #287e70, 0 14px 24px rgba(19, 90, 78, .2);
    color: #10463e;
    cursor: pointer;
    font: inherit;
    font-size: 18px;
    font-weight: 900;
}

.bj-share-results:hover:not(:disabled) { filter: brightness(1.03) saturate(1.08); transform: translateY(-1px); }
.bj-share-results:active:not(:disabled) { box-shadow: 0 4px 0 #287e70, 0 8px 16px rgba(19, 90, 78, .18); transform: translateY(4px); }
.bj-share-results:focus-visible { outline: 4px solid rgba(23, 109, 100, .35); outline-offset: 3px; }
.bj-share-results:disabled { opacity: .48; cursor: wait; box-shadow: 0 5px 0 #7ba99f; }

.bj-copy-toast {
    position: fixed;
    z-index: 11000;
    left: 50%;
    bottom: max(22px, env(safe-area-inset-bottom));
    min-width: 130px;
    padding: 13px 22px;
    border: 2px solid rgba(255, 255, 255, .9);
    border-radius: 999px;
    background: #087f5b;
    box-shadow: 0 12px 34px rgba(3, 39, 31, .35);
    color: #fff;
    font-size: 17px;
    font-weight: 900;
    text-align: center;
    transform: translateX(-50%);
    animation: bj-copy-toast-in .2s ease-out both;
}

.bj-copy-toast[hidden] { display: none; }

/* Gameplay expansion: progression, modes, compact results, and accessible settings. */
.bj-meta-strip {
    display: grid;
    grid-template-columns: minmax(190px, 1fr) minmax(145px, .7fr) minmax(145px, .7fr) minmax(310px, 1.5fr);
    gap: 8px;
    padding: 8px 12px;
    background: #102a43;
    color: #fff;
    align-items: stretch;
}
.bj-progress-pill,
.bj-rank-pill,
.bj-grant-countdown,
.bj-mode-buttons {
    min-width: 0;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 12px;
    background: rgba(255,255,255,.07);
    color: #fff;
}
.bj-progress-pill { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; padding: 8px 10px; cursor: pointer; }
.bj-progress-pill:hover { background: rgba(255,255,255,.12); }
.bj-progress-pill span:last-child { color: #ffe08a; font-size: 12px; font-weight: 800; }
.bj-xp-track { height: 7px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.16); }
.bj-xp-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#54d6c4,#ffd166); transition: width .4s ease; }
.bj-rank-pill,.bj-grant-countdown { display: flex; flex-direction: column; justify-content: center; padding: 7px 11px; text-align: center; }
.bj-rank-pill span,.bj-grant-countdown span { color: #a8d8d3; font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.bj-rank-pill strong,.bj-grant-countdown strong { margin-top: 2px; color: #ffe08a; font-size: 14px; }
.bj-mode-buttons { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 5px; padding: 5px; }
.bj-mode-buttons button,.bj-leaderboard-metrics button {
    border: 0; border-radius: 8px; padding: 7px 8px; background: transparent; color: #d9fff7;
    font-weight: 800; cursor: pointer;
}
.bj-mode-buttons button:hover,.bj-leaderboard-metrics button:hover { background: rgba(255,255,255,.1); }
.bj-mode-buttons button.is-selected { background: #ffd166; color: #102a43; box-shadow: 0 2px 0 #d49626; }
.bj-challenge-progress {
    display: grid;
    grid-template-columns: auto minmax(165px,auto) minmax(180px,1fr) auto;
    gap: 9px 13px;
    flex: 0 0 auto;
    align-items: center;
    margin: 8px 0;
    padding: 9px 14px;
    border: 2px solid #ffd166;
    border-radius: 13px;
    background: linear-gradient(100deg,#173d5d,#155e62 55%,#087f73);
    box-shadow: 0 5px 14px rgba(16,42,67,.22), inset 0 0 0 1px rgba(255,255,255,.15);
    color: #fff;
}
.bj-challenge-progress[hidden] { display: none; }
.bj-challenge-progress-flag { font-size: 27px; filter: drop-shadow(0 2px 0 rgba(0,0,0,.25)); }
.bj-challenge-progress-copy { display: flex; flex-direction: column; }
.bj-challenge-progress-copy span { color: #a8fff0; font-size: 9px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.bj-challenge-progress-copy strong { color: #ffe08a; font-size: 20px; line-height: 1.1; }
.bj-challenge-progress-track { display: grid; grid-template-columns: repeat(10,1fr); gap: 4px; }
.bj-challenge-progress-track i { height: 10px; border: 1px solid rgba(255,255,255,.42); border-radius: 999px; background: rgba(255,255,255,.13); }
.bj-challenge-progress-track i.is-complete { border-color: #ffd166; background: #ffd166; box-shadow: 0 0 7px rgba(255,209,102,.45); }
.bj-challenge-progress-track i.is-current { border-color: #fff; background: #ff7185; box-shadow: 0 0 0 2px rgba(255,113,133,.24), 0 0 9px rgba(255,113,133,.6); animation: bj-challenge-pulse 1.25s ease-in-out infinite alternate; }
.bj-challenge-progress-status { min-width: 105px; color: #fff; font-size: 12px; text-align: right; }
.bj-challenge-summary {
    display: grid;
    grid-template-columns: minmax(235px, .8fr) minmax(440px, 1.6fr) auto;
    gap: 10px 14px;
    flex: 0 0 auto;
    align-items: center;
    margin: 8px 0;
    padding: 13px 15px;
    border: 2px solid #e3a629;
    border-radius: 15px;
    background: linear-gradient(115deg, #fff4bc 0%, #edfff9 55%, #eeeaff 100%);
    box-shadow: 0 7px 18px rgba(16,42,67,.15), inset 0 0 0 2px rgba(255,255,255,.72);
    color: #17324d;
}
.bj-challenge-summary[hidden] { display: none; }
.bj-challenge-summary-heading { display: flex; align-items: center; gap: 10px; }
.bj-challenge-summary-heading > span { font-size: 34px; filter: drop-shadow(0 2px 0 #fff); }
.bj-challenge-summary-heading h2 { margin: 1px 0 2px; color: #0b6759; font-size: clamp(18px,2vw,24px); line-height: 1.05; }
.bj-challenge-summary-heading p { grid-column: 1 / -1; margin: 3px 0 0; color: #4c625e; font-size: 12px; font-weight: 800; line-height: 1.3; }
.bj-challenge-summary-stats { display: grid; grid-template-columns: repeat(5,minmax(76px,1fr)); gap: 6px; }
.bj-challenge-summary-stats > div { display: flex; min-width: 0; flex-direction: column; align-items: center; padding: 7px 5px; border: 1px solid rgba(11,103,89,.17); border-radius: 9px; background: rgba(255,255,255,.7); text-align: center; }
.bj-challenge-summary-stats span { color: #667873; font-size: 9px; font-weight: 900; letter-spacing: .045em; text-transform: uppercase; }
.bj-challenge-summary-stats strong { margin-top: 2px; color: #087f5b; font-size: 17px; font-variant-numeric: tabular-nums; }
.bj-challenge-nearby { display: flex; grid-column: 1 / 3; flex-wrap: wrap; gap: 5px; }
.bj-challenge-nearby > span { padding: 5px 8px; border-radius: 999px; background: rgba(16,42,67,.08); color: #415651; font-size: 11px; font-weight: 800; }
.bj-challenge-nearby > span.is-you { background: #0b806f; color: #fff; box-shadow: 0 2px 0 #07584d; }
.bj-challenge-summary-actions { display: grid; grid-column: 3; grid-row: 1 / 3; gap: 6px; }
.bj-challenge-summary-actions button { min-height: 40px; padding: 7px 11px; border: 0; border-radius: 9px; cursor: pointer; font: inherit; font-size: 12px; font-weight: 900; }
.bj-challenge-classic { background: linear-gradient(115deg,#ff7185,#ffd166); color: #102a43; }
.bj-challenge-leaders { background: #173d5d; color: #fff; }
.bj-challenge-leaders:hover { background: #0b6759; }
.bj-leaderboard-metrics { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.bj-leaderboard-metrics button { background: #eaf8f5; color: #176d64; border: 1px solid #b7ddd6; }
.bj-leaderboard-metrics button.is-selected { background: #176d64; color: #fff; border-color: #176d64; }
.bj-your-rank { margin: 10px 0; padding: 10px 12px; border-radius: 10px; background: #fff7d8; border-left: 4px solid #e5a72d; font-weight: 900; color: #24423e; }
.bj-nearby-list { display: grid; gap: 4px; padding: 8px; border-radius: 10px; background: #eef8f6; }
.bj-nearby-list > div { padding: 5px 8px; }
.bj-nearby-list .is-you { border-radius: 7px; background: #fff1b8; font-weight: 900; }
.bj-progress-card { width: min(780px,100%); }
.bj-level-overview { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; padding: 14px; border-radius: 13px; background: linear-gradient(135deg,#e7fbf7,#fff6d4); }
.bj-level-overview strong { font-size: 24px; color: #087f73; }
.bj-level-overview span { font-weight: 800; color: #3f5f5a; }
.bj-shell-icon { width: 18px; height: 18px; margin: 0 4px 0 1px; object-fit: contain; vertical-align: -4px; }
.bj-mission-list { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
.bj-mission { display: grid; grid-template-columns: 1fr auto; gap: 5px; padding: 11px; border: 1px solid #c9e4df; border-radius: 11px; background: #fff; }
.bj-mission span { font-weight: 900; }
.bj-mission small { grid-column: 1 / -1; color: #647773; }
.bj-mission.is-complete { background: #e4faef; border-color: #73d8af; }
.bj-cosmetic-list { display: flex; flex-wrap: wrap; gap: 7px; }
.bj-cosmetic-list span { padding: 7px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.bj-cosmetic-list .is-unlocked { background: #d8f7ed; color: #087f5b; }
.bj-cosmetic-list .is-locked { background: #edf0f2; color: #6f777b; }
.bj-settings-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
.bj-settings-grid label { display: flex; align-items: center; gap: 7px; min-height: 42px; padding: 9px; border-radius: 9px; background: #f1f7f6; font-weight: 800; }
.bj-settings-grid select { min-width: 0; max-width: 100%; margin-left: auto; }
.bj-result-summary { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin: 10px 0 12px; }
.bj-result-summary > div { display: flex; flex-direction: column; align-items: center; padding: 9px; border-radius: 10px; background: #eff8f6; }
.bj-result-summary span { color: #687b77; font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; }
.bj-result-summary strong { color: #087f5b; font-size: 19px; }
.bj-mission-celebration { margin: 8px 0; padding: 9px 12px; border-radius: 10px; background: linear-gradient(90deg,#fff0ad,#d4faee); color: #24423e; font-weight: 900; text-align: center; }
.bj-result-leaderboard-section { margin-top: 11px; }
.bj-result-modal.is-challenge-complete .bj-result-actions { grid-template-columns: 1fr; }
.bj-result-modal.is-challenge-complete .bj-share-results { width: 100%; }

@media (max-width: 850px) {
    .bj-meta-strip { grid-template-columns: 1fr 1fr; }
    .bj-mode-buttons { grid-column: 1 / -1; }
    .bj-mission-list,.bj-settings-grid { grid-template-columns: 1fr; }
    .bj-challenge-progress { grid-template-columns: auto 1fr auto; }
    .bj-challenge-progress-track { grid-column: 1 / -1; grid-row: 2; }
    .bj-challenge-summary { grid-template-columns: 1fr; }
    .bj-challenge-summary-stats { grid-column: 1; }
    .bj-challenge-nearby { grid-column: 1; }
    .bj-challenge-summary-actions { grid-column: 1; grid-row: auto; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
    .bj-meta-strip { padding: 6px; gap: 5px; }
    .bj-progress-pill { grid-column: 1 / -1; }
    .bj-rank-pill,.bj-grant-countdown { padding: 5px 7px; }
    .bj-mode-buttons button { padding: 6px 4px; font-size: 11px; }
    .bj-challenge-progress { gap: 6px 9px; padding: 8px 9px; }
    .bj-challenge-progress-copy strong { font-size: 17px; }
    .bj-challenge-progress-status { min-width: 0; font-size: 10px; }
    .bj-challenge-summary { padding: 11px 9px; }
    .bj-challenge-summary-stats { grid-template-columns: repeat(6,1fr); }
    .bj-challenge-summary-stats > div { grid-column: span 2; }
    .bj-challenge-summary-stats > div:nth-child(4),.bj-challenge-summary-stats > div:nth-child(5) { grid-column: span 3; }
    .bj-challenge-finale-hero { gap: 11px; padding-right: 32px; }
    .bj-challenge-finale-trophy { width: 64px; height: 64px; flex-basis: 64px; font-size: 34px; }
    .bj-challenge-finale-scoreboard { grid-template-columns: 1fr 1fr; }
    .bj-challenge-finale-stats { grid-template-columns: 1fr 1fr; }
    .bj-challenge-finale-hands { grid-template-columns: repeat(5,1fr); }
    .bj-challenge-finale-actions { grid-template-columns: 1fr 1fr; }
    .bj-challenge-finale-classic { grid-column: 1 / -1; }
    .bj-result-summary { gap: 5px; }
    .bj-result-summary > div { padding: 7px 3px; }
    .bj-leaderboard-table th:nth-child(3),.bj-leaderboard-table td:nth-child(3),
    .bj-leaderboard-table th:nth-child(4),.bj-leaderboard-table td:nth-child(4),
    .bj-leaderboard-table th:nth-child(5),.bj-leaderboard-table td:nth-child(5) { display: none; }
    .bj-result-leaderboard-table th:nth-child(4),.bj-result-leaderboard-table td:nth-child(4),
    .bj-result-leaderboard-table th:nth-child(5),.bj-result-leaderboard-table td:nth-child(5),
    .bj-result-leaderboard-table th:nth-child(6),.bj-result-leaderboard-table td:nth-child(6) { display: none; }
    .bj-result-leaderboard-table th:nth-child(3),.bj-result-leaderboard-table td:nth-child(3) { display: table-cell; }
}

@keyframes bj-copy-toast-in {
    from { opacity: 0; transform: translate(-50%, 10px) scale(.95); }
    to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

@keyframes bj-challenge-pulse {
    from { filter: brightness(.95); transform: scaleY(.85); }
    to { filter: brightness(1.2); transform: scaleY(1.15); }
}

@keyframes bj-finale-trophy {
    0% { opacity: 0; transform: translateY(-18px) rotate(-12deg) scale(.35); }
    60% { opacity: 1; transform: translateY(3px) rotate(5deg) scale(1.12); }
    100% { transform: translateY(0) rotate(0) scale(1); }
}

@keyframes bj-finale-confetti {
    0% { opacity: 0; transform: translateY(0) rotate(0); }
    10% { opacity: .85; }
    100% { opacity: 0; transform: translateY(720px) rotate(620deg); }
}

.bj-leave-modal-card > p {
    margin: 15px 0 22px;
    color: #8a2f29;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.5;
}

.bj-leave-actions {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
}

.bj-leave-confirm {
    min-height: 44px;
    padding: 9px 15px;
    border: 0;
    border-radius: 10px;
    background: #b94b43;
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    font-weight: 800;
}

.bj-leave-confirm:hover { background: #933a34; }

.bj-standalone-login {
    display: grid;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 20px;
    place-items: center;
}

.bj-standalone-login .bj-login-card {
    width: min(780px, 100%);
    box-shadow: 0 24px 70px rgba(0, 0, 0, .22);
}

.bj-standalone-login h1 {
    margin: 4px 0 10px;
    color: var(--bj-ink);
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.08;
}

@media (max-width: 820px) {
    .bj-landing-card { gap: 28px; padding: 38px 30px; }
    .bj-play-topbar { flex-wrap: wrap; gap: 6px 12px; }
    .bj-play-nav { width: 100%; }
    .bj-play-nav button, .bj-play-nav a { flex: 1; }
    .bj-fullscreen-page { min-height: 690px; }
}

@media (max-width: 640px) {
    body.bj-play-body { overflow: auto; }
    .bj-info-page { padding-top: 4px; }
    .bj-landing-card { grid-template-columns: 1fr; gap: 26px; min-height: 0; padding: 32px 22px 25px; border-radius: 22px; }
    .bj-landing-brand { margin-bottom: 14px; }
    .bj-landing-card h1 { font-size: clamp(49px, 17vw, 72px); }
    .bj-landing-tagline { margin: 14px 0 8px; }
    .bj-landing-community { margin-bottom: 23px; }
    .bj-play-button { width: 100%; min-height: 72px; }
    .bj-credit-status { min-height: 205px; padding: 23px 18px; }
    .bj-landing-fine-print { margin: -4px 0 0; }
    .bj-fullscreen-page { width: 100%; height: auto; min-height: 100vh; min-height: 100dvh; margin-left: 0; padding: 7px; gap: 7px; overflow: visible; }
    .bj-play-topbar { border-radius: 12px; }
    .bj-play-brand strong { font-size: 15px; }
    .bj-play-nav button, .bj-play-nav a { min-height: 38px; padding: 6px 5px; font-size: 12px; }
    .bj-fullscreen-table { padding: 6px; border-radius: 14px; }
    .bj-fullscreen-table .bj-game-canvas { min-height: 590px; border-radius: 10px; }
    .bj-fullscreen-table .bj-keyboard-hint { display: none; }
    .bj-fullscreen-table .bj-play-announcement { min-height: 47px; align-items: center; flex-wrap: nowrap; font-size: 13px; }
    .bj-fullscreen-table .bj-play-announcement a { width: auto; margin-left: auto; }
    .bj-modal { padding: 8px; }
    .bj-modal-card { max-height: 94vh; padding: 21px 15px; border-radius: 14px; }
    .bj-result-modal-card { padding: 18px 13px; }
    .bj-result-heading { gap: 11px; }
    .bj-result-icon { width: 55px; height: 55px; flex-basis: 55px; font-size: 28px; }
    .bj-result-message { margin: 13px 0; padding: 12px 13px; }
    .bj-result-section { padding: 12px 10px; }
    .bj-result-actions { grid-template-columns: minmax(0, 1fr) 105px; margin-bottom: 12px; }
    .bj-play-again, .bj-share-results { min-height: 58px; }
    .bj-share-results { padding: 8px 10px; font-size: 16px; }
}

@media (max-width: 360px) {
    .bj-play-brand > span { font-size: 23px; }
    .bj-play-brand strong { display: none; }
    .bj-play-nav { gap: 4px; }
    .bj-play-nav button, .bj-play-nav a { font-size: 11px; }
}

@media (orientation: landscape) and (max-height: 650px) and (min-width: 600px) {
    body.bj-play-body { overflow: auto; }
    .bj-fullscreen-page { height: auto; min-height: 650px; }
    .bj-fullscreen-table .bj-game-canvas { min-height: 520px; }
}
.bj-leaderboard-total {
    margin: 14px 0 0;
    padding-top: 12px;
    border-top: 1px solid #d6dfd8;
    color: #345449;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}
.bj-leaderboard-total[hidden] { display: none; }
