.bje-game {
    --bg: #100d12;
    --panel: #1d1820;
    --line: #443645;
    --text: #fff7fb;
    --muted: #c8b8c2;
    --accent: #ff6dac;
    width: 100%;
    overflow: hidden;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-sizing: border-box;
    overscroll-behavior: contain;
    -webkit-tap-highlight-color: transparent;
}

.bje-game *,
.bje-game *::before,
.bje-game *::after {
    box-sizing: border-box;
}

.bje-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    background: #19131a;
    border-bottom: 1px solid var(--line);
}

.bje-level {
    margin-left: 10px;
    color: var(--muted);
    font-size: 13px;
}

.bje-top-actions {
    display: flex;
    gap: 7px;
}

.bje-topbar button,
.bje-sidebar button,
.bje-touch-controls button {
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--text);
    background: #332735;
    padding: 9px 12px;
    font: inherit;
    cursor: pointer;
    touch-action: manipulation;
}

.bje-topbar button:hover,
.bje-sidebar button:hover,
.bje-touch-controls button:hover {
    border-color: var(--accent);
}

.bje-topbar button:focus-visible,
.bje-sidebar button:focus-visible,
.bje-touch-controls button:focus-visible,
.bje-stage canvas:focus-visible {
    outline: 3px solid rgba(255, 109, 172, .65);
    outline-offset: 2px;
}

.bje-menu-button,
.bje-sidebar-close,
.bje-sidebar-head,
.bje-sidebar-backdrop,
.bje-touch-controls,
.bje-mobile-resources {
    display: none;
}

.bje-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 290px;
    min-height: 610px;
}

.bje-stage {
    position: relative;
    min-width: 0;
    min-height: 440px;
    background: #26382d;
    overflow: hidden;
    isolation: isolate;
}

.bje-stage canvas {
    display: block;
    width: 100%;
    height: min(68vw, 610px);
    min-height: 440px;
    background: #26382d;
    outline: none;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.bje-message {
    position: absolute;
    z-index: 6;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    min-width: 220px;
    max-width: min(80%, 520px);
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(18, 12, 17, .92);
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s;
}

.bje-message.show {
    opacity: 1;
}

.bje-sidebar {
    display: grid;
    align-content: start;
    overflow: auto;
    background: var(--panel);
    border-left: 1px solid var(--line);
    scrollbar-width: thin;
}

.bje-sidebar section {
    padding: 14px;
    border-bottom: 1px solid var(--line);
}

.bje-sidebar h3 {
    margin: 0 0 10px;
    font-size: 15px;
}

.bje-sidebar button {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin-bottom: 8px;
    text-align: left;
}

.bje-sidebar button span {
    max-width: 52%;
    color: var(--muted);
    font-size: 11px;
    text-align: right;
}

.bje-resource-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 7px;
    color: var(--muted);
}

.bje-resource-row strong {
    color: var(--text);
}

.bje-help {
    color: var(--muted);
    font-size: 13px;
}

.bje-help p {
    margin: 0;
}

.bje-game.expanded {
    position: fixed;
    z-index: 999999;
    inset: 0;
    display: flex;
    flex-direction: column;
    width: auto;
    height: 100dvh;
    border: 0;
    border-radius: 0;
}

.bje-game.expanded .bje-layout {
    flex: 1;
    min-height: 0;
}

.bje-game.expanded .bje-stage,
.bje-game.expanded .bje-stage canvas {
    height: 100%;
    min-height: 0;
}

.bje-game-expanded,
.bje-game-menu-open {
    overflow: hidden;
}

.bje-story-modal {
    position: fixed;
    z-index: 1000000;
    inset: 0;
    padding: max(28px, env(safe-area-inset-top)) max(28px, env(safe-area-inset-right)) max(28px, env(safe-area-inset-bottom)) max(28px, env(safe-area-inset-left));
    background: rgba(12, 7, 11, .82);
    overflow: auto;
    overscroll-behavior: contain;
}

.bje-story-modal[hidden] {
    display: none;
}

.bje-story-dialog {
    position: relative;
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    width: min(1100px, 100%);
    margin: 0 auto;
    background: #fff;
    color: #2c2027;
    border-radius: 18px;
    overflow: hidden;
}

.bje-story-portrait {
    background: #f062a5;
}

.bje-story-portrait img {
    position: sticky;
    top: 0;
    display: block;
    width: 100%;
    height: 100vh;
    max-height: 760px;
    object-fit: cover;
    object-position: center 18%;
}

.bje-story-copy {
    padding: 34px;
    max-height: 82vh;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.bje-story-copy h2 {
    margin-top: 0;
    font-size: 32px;
}

.bje-story-copy blockquote,
.bje-story-body blockquote {
    margin: 24px 0;
    padding: 14px 18px;
    border-left: 4px solid #e84f96;
    background: #fff0f7;
}

.bje-story-close {
    position: absolute;
    z-index: 2;
    top: max(12px, env(safe-area-inset-top));
    right: max(12px, env(safe-area-inset-right));
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: #2f2029;
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.bje-modal-open {
    overflow: hidden;
}

.bje-standalone-story {
    width: min(1050px, 100%);
    margin: 0 auto;
    background: #fff;
    color: #2c2027;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(34, 16, 27, .15);
}

.bje-story-hero {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    align-items: center;
    background: linear-gradient(135deg, #30101f, #bd3977);
    color: #fff;
}

.bje-story-hero img {
    display: block;
    width: 100%;
    height: 430px;
    object-fit: cover;
    object-position: center 16%;
}

.bje-story-hero > div {
    padding: 38px;
}

.bje-story-hero h1 {
    margin: 8px 0 14px;
    color: #fff;
    font-size: 44px;
}

.bje-eyebrow {
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: 12px;
    font-weight: 700;
}

.bje-story-body {
    padding: 36px;
}

.bje-story-body h2 {
    margin-top: 32px;
    color: #7f2451;
}

@media (max-width: 900px) {
    .bje-layout {
        grid-template-columns: 1fr;
    }

    .bje-sidebar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        border-left: 0;
        border-top: 1px solid var(--line);
    }

    .bje-story-dialog {
        grid-template-columns: 1fr;
    }

    .bje-story-portrait img {
        position: static;
        height: 300px;
    }

    .bje-story-copy {
        max-height: none;
    }

    .bje-story-hero {
        grid-template-columns: 1fr;
    }

    .bje-story-hero img {
        height: 380px;
    }
}

@media (max-width: 700px), (pointer: coarse) {
    .bje-touch-controls,
    .bje-mobile-resources {
        display: flex;
    }

    .bje-touch-controls {
        position: absolute;
        z-index: 8;
        right: max(12px, env(safe-area-inset-right));
        bottom: max(12px, env(safe-area-inset-bottom));
        left: max(12px, env(safe-area-inset-left));
        align-items: flex-end;
        justify-content: space-between;
        gap: 16px;
        pointer-events: none;
    }

    .bje-dpad {
        display: grid;
        grid-template-columns: repeat(3, 58px);
        grid-template-rows: repeat(3, 58px);
        gap: 5px;
        pointer-events: auto;
    }

    .bje-dpad button {
        width: 58px;
        height: 58px;
        padding: 0;
        border-radius: 16px;
        background: rgba(35, 24, 35, .88);
        border-color: rgba(255, 255, 255, .25);
        font-size: 22px;
        font-weight: 800;
        backdrop-filter: blur(5px);
        touch-action: none;
    }

    .bje-dpad button.is-active {
        transform: scale(.94);
        background: var(--accent);
        color: #23131c;
    }

    .bje-dpad-up {
        grid-column: 2;
        grid-row: 1;
    }

    .bje-dpad-left {
        grid-column: 1;
        grid-row: 2;
    }

    .bje-dpad-center {
        grid-column: 2;
        grid-row: 2;
        width: 22px;
        height: 22px;
        place-self: center;
        border-radius: 50%;
        background: rgba(255, 109, 172, .6);
    }

    .bje-dpad-right {
        grid-column: 3;
        grid-row: 2;
    }

    .bje-dpad-down {
        grid-column: 2;
        grid-row: 3;
    }

    .bje-mobile-actions {
        display: grid;
        gap: 9px;
        width: min(150px, 34vw);
        pointer-events: auto;
    }

    .bje-mobile-actions button {
        min-height: 52px;
        background: rgba(35, 24, 35, .9);
        backdrop-filter: blur(5px);
        font-weight: 700;
    }

    .bje-cancel-placement {
        background: #8d315b !important;
    }

    .bje-mobile-resources {
        position: absolute;
        z-index: 7;
        top: max(10px, env(safe-area-inset-top));
        left: max(10px, env(safe-area-inset-left));
        flex-wrap: wrap;
        gap: 5px;
        max-width: calc(100% - 130px);
        pointer-events: none;
    }

    .bje-mobile-resources span {
        padding: 5px 8px;
        border: 1px solid rgba(255, 255, 255, .18);
        border-radius: 999px;
        background: rgba(18, 12, 17, .84);
        color: #fff;
        font-size: 12px;
        white-space: nowrap;
        backdrop-filter: blur(5px);
    }

    .bje-mobile-resources b {
        color: var(--accent);
    }

    .bje-message {
        bottom: 205px;
    }
}

@media (max-width: 700px) {
    .bje-game {
        border-radius: 10px;
    }

    .bje-topbar {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px;
    }

    .bje-topbar > div:first-child {
        min-width: 0;
        flex: 1 1 180px;
    }

    .bje-topbar strong {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .bje-level {
        display: block;
        margin: 4px 0 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .bje-top-actions {
        flex: 1 1 100%;
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 6px;
    }

    .bje-top-actions button {
        min-width: 0;
        padding: 8px 5px;
        font-size: 13px;
    }

    .bje-menu-button {
        display: block;
    }

    .bje-layout {
        display: block;
        min-height: 0;
    }

    .bje-stage {
        height: clamp(450px, 68dvh, 680px);
        min-height: 450px;
    }

    .bje-stage canvas {
        width: 100%;
        height: 100%;
        min-height: 0;
    }

    .bje-sidebar {
        position: fixed;
        z-index: 1000002;
        right: 0;
        bottom: 0;
        left: 0;
        display: block;
        max-height: min(74dvh, 720px);
        padding-bottom: max(12px, env(safe-area-inset-bottom));
        border: 1px solid var(--line);
        border-bottom: 0;
        border-radius: 18px 18px 0 0;
        transform: translateY(105%);
        transition: transform .22s ease;
        -webkit-overflow-scrolling: touch;
        box-shadow: 0 -16px 50px rgba(0, 0, 0, .45);
    }

    .bje-game.menu-open .bje-sidebar {
        transform: translateY(0);
    }

    .bje-sidebar-head {
        position: sticky;
        z-index: 3;
        top: 0;
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 56px;
        padding: 10px 14px;
        background: #19131a;
        border-bottom: 1px solid var(--line);
    }

    .bje-sidebar-close {
        display: grid !important;
        place-items: center;
        width: 44px !important;
        min-height: 44px !important;
        margin: 0 !important;
        padding: 0 !important;
        border-radius: 50% !important;
        font-size: 24px !important;
    }

    .bje-sidebar section {
        padding: 13px 14px;
    }

    .bje-sidebar button {
        min-height: 50px;
    }

    .bje-sidebar-backdrop {
        position: fixed;
        z-index: 1000001;
        inset: 0;
        display: block;
        width: 100%;
        height: 100%;
        border: 0;
        background: rgba(8, 5, 8, .62);
        opacity: 0;
        pointer-events: none;
        transition: opacity .2s ease;
    }

    .bje-game.menu-open .bje-sidebar-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .bje-game.expanded .bje-stage {
        height: 100%;
        min-height: 0;
    }

    .bje-story-modal {
        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));
    }

    .bje-story-copy,
    .bje-story-body,
    .bje-story-hero > div {
        padding: 22px;
    }

    .bje-story-hero h1 {
        font-size: 34px;
    }
}

@media (max-width: 420px) {
    .bje-stage {
        height: clamp(430px, 66dvh, 610px);
        min-height: 430px;
    }

    .bje-dpad {
        grid-template-columns: repeat(3, 52px);
        grid-template-rows: repeat(3, 52px);
        gap: 4px;
    }

    .bje-dpad button {
        width: 52px;
        height: 52px;
        border-radius: 14px;
    }

    .bje-mobile-actions {
        width: 132px;
    }

    .bje-mobile-actions button {
        min-height: 48px;
        padding: 7px;
        font-size: 13px;
    }

    .bje-message {
        bottom: 188px;
        min-width: 0;
        width: calc(100% - 24px);
    }

    .bje-mobile-resources {
        max-width: calc(100% - 118px);
    }

    .bje-mobile-resources span {
        padding: 4px 6px;
        font-size: 11px;
    }
}

@media (orientation: landscape) and (max-height: 560px) and (pointer: coarse) {
    .bje-topbar {
        padding: 6px 10px;
    }

    .bje-top-actions {
        flex: 0 1 auto;
        display: flex;
    }

    .bje-stage {
        height: calc(100dvh - 96px);
        min-height: 320px;
    }

    .bje-dpad {
        grid-template-columns: repeat(3, 46px);
        grid-template-rows: repeat(3, 46px);
    }

    .bje-dpad button {
        width: 46px;
        height: 46px;
        border-radius: 13px;
        font-size: 18px;
    }

    .bje-mobile-actions {
        width: 130px;
    }

    .bje-mobile-actions button {
        min-height: 44px;
    }

    .bje-message {
        bottom: 150px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bje-message,
    .bje-sidebar,
    .bje-sidebar-backdrop {
        transition: none;
    }
}


/* Harvester gold-mining interaction */
.bje-game.harvester-selected .bje-stage canvas {
    cursor: crosshair;
}

@media (pointer: coarse) {
    .bje-game.harvester-selected .bje-stage canvas {
        cursor: default;
    }
}


/* v1.6 paused context build and building status UI */
.bje-game { position: relative; }
.bje-command-note { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.bje-context-overlay {
    position: absolute;
    z-index: 40;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 18px;
}
.bje-context-overlay[hidden] { display: none; }
.bje-context-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgba(10, 6, 10, .68);
    backdrop-filter: blur(2px);
}
.bje-context-popup {
    position: relative;
    z-index: 1;
    width: min(430px, 100%);
    max-height: min(680px, calc(100dvh - 80px));
    overflow: auto;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #211821;
    color: var(--text);
    box-shadow: 0 20px 65px rgba(0, 0, 0, .55);
    -webkit-overflow-scrolling: touch;
}
.bje-context-popup header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}
.bje-context-popup h3 { margin: 2px 0 0; font-size: 21px; }
.bje-context-eyebrow { color: var(--accent); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; }
.bje-context-close {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: #352736;
    color: #fff;
    font-size: 25px;
    cursor: pointer;
}
.bje-context-actions { display: grid; gap: 9px; }
.bje-context-actions button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 54px;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #342737;
    color: var(--text);
    text-align: left;
    cursor: pointer;
}
.bje-context-actions button:hover:not(:disabled) { border-color: var(--accent); background: #412d40; }
.bje-context-actions button:disabled { opacity: .45; cursor: not-allowed; }
.bje-context-actions button span { color: var(--muted); font-size: 12px; text-align: right; }
.bje-context-status { margin-bottom: 10px; }
.bje-context-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255, 109, 172, .12);
    color: var(--text);
}
.bje-context-info span { color: var(--muted); font-size: 12px; }
.bje-context-help { margin: 12px 2px 0; color: var(--muted); font-size: 12px; }
.bje-game.context-open .bje-touch-controls { pointer-events: none; opacity: .45; }
.bje-game.context-open .bje-stage canvas { cursor: default; }

@media (max-width: 700px) {
    .bje-context-overlay { align-items: end; padding: 0; position: fixed; z-index: 1000004; }
    .bje-context-popup {
        width: 100%;
        max-height: 76dvh;
        padding: 16px max(16px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
        border-radius: 18px 18px 0 0;
    }
    .bje-context-actions button { min-height: 58px; }
}


/* v1.9 reliable desktop context action */
@media (hover: hover) and (pointer: fine) {
    .bje-game .bje-stage canvas {
        cursor: default;
    }

    .bje-game .bje-stage canvas:active {
        cursor: default;
    }
}


/* v2.0 exact build-flow status */
.bje-game.context-open .bje-context-popup::after {
    content: "GAME PAUSED";
    display: block;
    margin-top: 10px;
    color: var(--accent);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .12em;
    text-align: center;
}

.bje-game.context-open .bje-stage canvas {
    filter: saturate(.72) brightness(.82);
}


/* v2.1 hard isolation: the host page receives only this iframe shell. */
.bje-isolated-shell {
    width: 100%;
    min-height: 620px;
    height: var(--bje-frame-height, 780px);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 18px;
    background: #101418;
}

.bje-isolated-frame {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: #101418;
}

@media (max-width: 700px) {
    .bje-isolated-shell {
        min-height: 680px;
        height: max(680px, 84vh);
        border-radius: 12px;
    }
}


/* v2.4 generic resource collector assignment */
.bje-game.collector-selected .bje-stage canvas {
    cursor: crosshair;
}

@media (pointer: coarse) {
    .bje-game.collector-selected .bje-stage canvas {
        cursor: default;
    }
}


/* v2.7 direct unit movement */
.bje-game.actor-selected .bje-stage canvas {
    cursor: crosshair;
}

@media (pointer: coarse) {
    .bje-game.actor-selected .bje-stage canvas {
        cursor: default;
    }
}


/* v4.2 — 30-minute survival war */
.bje-battle-timer {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    margin-left: 10px;
    padding: 4px 9px;
    border: 1px solid rgba(255, 109, 172, .55);
    border-radius: 999px;
    color: #ffe3f0;
    background: rgba(95, 25, 58, .68);
    font-weight: 800;
    font-size: 12px;
    letter-spacing: .04em;
    white-space: nowrap;
}

.bje-game.battle-active .bje-battle-timer {
    border-color: rgba(255, 91, 91, .75);
    color: #fff0f0;
    background: rgba(113, 24, 30, .80);
}

.bje-game.battle-victory .bje-battle-timer {
    border-color: rgba(89, 209, 120, .8);
    color: #effff3;
    background: rgba(30, 103, 50, .78);
}

.bje-game.battle-defeat .bje-battle-timer {
    border-color: rgba(235, 93, 104, .9);
    color: #fff;
    background: rgba(113, 18, 27, .9);
}

.bje-battle-panel p,
.bje-battle-status {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.bje-battle-status {
    display: grid;
    gap: 3px;
    margin-bottom: 8px;
    padding: 9px 10px;
    border: 1px solid rgba(255, 109, 172, .28);
    border-radius: 9px;
    background: rgba(255, 109, 172, .07);
}

.bje-battle-status strong {
    color: var(--text);
}

@media (max-width: 760px) {
    .bje-topbar > div:first-child {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 4px;
    }

    .bje-battle-timer {
        margin-left: 0;
    }
}


/* v5.9 — startup splash and full lose screen */
.bje-splash-screen,
.bje-lose-screen,
.bje-win-screen {
    position: absolute;
    z-index: 120;
    inset: 0;
    display: grid;
    place-items: center;
    padding: clamp(18px, 4vw, 52px);
    background:
        radial-gradient(circle at 50% 28%, rgba(255, 109, 172, .24), transparent 38%),
        linear-gradient(145deg, rgba(12, 9, 14, .96), rgba(36, 18, 31, .97));
    backdrop-filter: blur(5px);
}

.bje-splash-screen[hidden],
.bje-lose-screen[hidden],
.bje-win-screen[hidden] {
    display: none;
}

.bje-screen-card {
    width: min(760px, 94vw);
    border: 1px solid rgba(255, 145, 194, .55);
    border-radius: 24px;
    background: rgba(28, 20, 29, .96);
    box-shadow: 0 28px 90px rgba(0, 0, 0, .58);
    overflow: hidden;
}

.bje-splash-card {
    display: grid;
    grid-template-columns: minmax(210px, .75fr) minmax(280px, 1.25fr);
    align-items: stretch;
}

.bje-screen-portrait {
    width: 100%;
    height: 100%;
    min-height: 390px;
    object-fit: cover;
    object-position: center top;
    background: #171019;
}

.bje-screen-copy,
.bje-lose-card,
.bje-win-card {
    display: grid;
    align-content: center;
    gap: 15px;
    padding: clamp(28px, 5vw, 54px);
}

.bje-screen-kicker {
    margin: 0;
    color: #ff91c2;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.bje-screen-copy h1,
.bje-lose-card h2,
.bje-win-card h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(32px, 5vw, 58px);
    line-height: .98;
}

.bje-screen-copy p,
.bje-lose-card p,
.bje-win-card p {
    margin: 0;
    color: #decbd6;
    font-size: clamp(15px, 2vw, 18px);
    line-height: 1.55;
}

.bje-screen-details {
    color: #ffd66d !important;
    font-weight: 800;
}

.bje-splash-start,
.bje-lose-new-game,
.bje-win-new-game {
    width: fit-content;
    min-width: 190px;
    min-height: 52px;
    margin-top: 8px;
    border: 1px solid #ff91c2;
    border-radius: 12px;
    padding: 12px 22px;
    color: #fff;
    background: linear-gradient(180deg, #d94f96, #9d2f6b);
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.bje-splash-start:hover,
.bje-lose-new-game:hover,
.bje-win-new-game:hover {
    filter: brightness(1.12);
}

.bje-lose-screen {
    background:
        radial-gradient(circle at 50% 40%, rgba(192, 34, 46, .30), transparent 36%),
        rgba(12, 5, 8, .96);
}

.bje-lose-card,
.bje-win-card {
    max-width: 620px;
    justify-items: center;
    text-align: center;
}

.bje-lose-card {
    border-color: rgba(255, 82, 92, .72);
}

.bje-lose-card h2 {
    color: #ff626b;
    text-shadow: 0 0 28px rgba(255, 49, 62, .35);
}

.bje-win-screen {
    background:
        radial-gradient(circle at 50% 38%, rgba(255, 207, 77, .22), transparent 38%),
        linear-gradient(145deg, rgba(9, 22, 15, .97), rgba(25, 50, 31, .97));
}

.bje-win-card {
    border-color: rgba(255, 215, 96, .82);
    background:
        linear-gradient(145deg, rgba(29, 47, 33, .98), rgba(18, 29, 22, .98));
}

.bje-win-card .bje-screen-kicker {
    color: #ffd76a;
}

.bje-win-card h2 {
    color: #80e89c;
    text-shadow: 0 0 28px rgba(80, 220, 124, .38);
}

.bje-win-new-game {
    border-color: #ffd76a;
    background: linear-gradient(180deg, #4aaf69, #27723f);
}


.bje-game.splash-open .bje-topbar,
.bje-game.splash-open .bje-layout,
.bje-game.lose-open .bje-topbar,
.bje-game.lose-open .bje-layout,
.bje-game.win-open .bje-topbar,
.bje-game.win-open .bje-layout {
    pointer-events: none;
}

@media (max-width: 680px) {
    .bje-splash-card {
        grid-template-columns: 1fr;
        max-height: 92vh;
        overflow: auto;
    }

    .bje-screen-portrait {
        min-height: 210px;
        max-height: 34vh;
    }

    .bje-screen-copy,
    .bje-lose-card,
    .bje-win-card {
        padding: 26px 22px;
    }
}
