.bcp-wrap{
    --bcp-bg:#ffffff;
    --bcp-panel:#ffffff;
    --bcp-panel-2:#f7f7f7;
    --bcp-border:#d9d9d9;
    --bcp-yellow:#ffca05;
    --bcp-text:#111111;
    --bcp-muted:#555555;
    --bcp-danger:#c62828;
    --bcp-success:#168a4a;
    box-sizing:border-box;
    width:100%;
    max-width:900px;
    margin:0 auto;
    padding:18px 14px 36px;
    color:var(--bcp-text);
    background:var(--bcp-bg);
    font-family:inherit;
}
.bcp-wrap *{box-sizing:border-box}
.bcp-stats{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:16px;
    margin:0 0 18px;
}
.bcp-stat{
    min-height:100px;
    display:flex;
    align-items:center;
    gap:14px;
    padding:18px 20px;
    border:1px solid var(--bcp-border);
    border-radius:20px;
    background:var(--bcp-panel);
    box-shadow:0 5px 18px rgba(0,0,0,.07);
}
.bcp-stat-icon{font-size:36px;min-width:44px;text-align:center}
.bcp-stat small{display:block;font-size:13px;font-weight:800;letter-spacing:1px;color:#111}
.bcp-stat strong{display:block;margin-top:3px;font-size:clamp(30px,5vw,44px);line-height:1;font-weight:900;color:#111}
.bcp-board-shell{position:relative;width:100%;max-width:780px;margin:0 auto}
.bcp-board{
    width:100%;
    aspect-ratio:1;
    display:grid;
    grid-template-columns:repeat(var(--bcp-grid,3),1fr);
    grid-template-rows:repeat(var(--bcp-grid,3),1fr);
    gap:3px;
    padding:3px;
    background:#111;
    border:1px solid #bdbdbd;
    border-radius:18px;
    overflow:hidden;
    touch-action:none;
    user-select:none;
    -webkit-user-select:none;
}
.bcp-tile{
    position:relative;
    min-width:0;
    min-height:0;
    border:0;
    border-radius:2px;
    background-repeat:no-repeat;
    background-color:#f2f2f2;
    cursor:pointer;
    transition:transform .11s ease,filter .11s ease;
    touch-action:none;
}
.bcp-tile:not(.bcp-blank):active{filter:brightness(1.08)}
.bcp-tile.bcp-blank{background-image:none!important;background:#eeeeee;cursor:default}
.bcp-board-lock{
    position:absolute;
    inset:3px;
    display:flex;
    align-items:flex-end;
    justify-content:center;
    padding:22px;
    background:linear-gradient(to top,rgba(255,255,255,.94),rgba(255,255,255,.08) 48%,rgba(255,255,255,0));
    border-radius:16px;
    pointer-events:none;
}
.bcp-lock-text{
    padding:10px 16px;
    border:1px solid #cfcfcf;
    background:rgba(255,255,255,.96);
    border-radius:999px;
    color:#111;
    font-weight:800;
    box-shadow:0 4px 12px rgba(0,0,0,.08);
}
.bcp-play{
    display:block;
    width:100%;
    max-width:780px;
    margin:18px auto 0;
    min-height:58px;
    border:1px solid #111;
    border-radius:15px;
    background:var(--bcp-yellow);
    color:#111;
    font-size:18px;
    font-weight:900;
    letter-spacing:1px;
    cursor:pointer;
    box-shadow:0 7px 16px rgba(0,0,0,.10);
}
.bcp-play:disabled{opacity:.55;cursor:not-allowed}
.bcp-message{
    max-width:780px;
    margin:12px auto 0;
    min-height:24px;
    text-align:center;
    color:var(--bcp-muted);
    font-weight:700;
}
.bcp-rules{
    max-width:780px;
    margin:18px auto 0;
    color:#444;
    text-align:center;
    line-height:1.55;
    font-size:13px;
}
.bcp-modal,.bcp-result{
    position:fixed;
    z-index:999999;
    inset:0;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:18px;
}
.bcp-modal[hidden],.bcp-result[hidden]{display:none}
.bcp-modal-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.48);backdrop-filter:blur(4px)}
.bcp-modal-card,.bcp-result-card{
    position:relative;
    width:min(430px,100%);
    padding:28px 22px 22px;
    text-align:center;
    color:#111;
    background:#fff;
    border:1px solid #cfcfcf;
    border-radius:22px;
    box-shadow:0 22px 60px rgba(0,0,0,.25);
}
.bcp-modal-close{position:absolute;top:10px;right:13px;width:38px;height:38px;border:0;background:transparent;color:#111;font-size:29px;cursor:pointer}
.bcp-modal-icon,.bcp-result-icon{font-size:52px}
.bcp-modal-card h2,.bcp-result-title{margin:6px 0 10px;font-size:26px;color:#111}
.bcp-modal-card p,.bcp-result-text{margin:8px 0;color:#444}
.bcp-modal-amount{margin:14px 0;color:#111;font-size:38px;font-weight:1000}
.bcp-modal-note{font-size:13px!important}
.bcp-modal-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:20px}
.bcp-modal-actions button,.bcp-result-button{min-height:52px;border-radius:14px;font-weight:900;cursor:pointer}
.bcp-cancel{background:#fff;border:1px solid #111;color:#111}
.bcp-start,.bcp-result-button{background:var(--bcp-yellow);border:1px solid #111;color:#111}
.bcp-result-button{width:100%;margin-top:16px}
.bcp-wrap.bcp-playing .bcp-board-lock{display:none}
.bcp-wrap.bcp-playing .bcp-play{display:none}
.bcp-wrap.bcp-winning .bcp-timer{color:var(--bcp-success)}
.bcp-wrap.bcp-losing .bcp-timer{color:var(--bcp-danger)}
.bcp-loading{opacity:.7;pointer-events:none}
@media(max-width:640px){
    .bcp-wrap{padding:10px 8px 24px}
    .bcp-stats{gap:8px;margin:0 0 12px}
    .bcp-stat{min-height:78px;padding:11px 9px;gap:7px;border-radius:15px}
    .bcp-stat-icon{font-size:26px;min-width:31px}
    .bcp-stat small{font-size:10px}
    .bcp-stat strong{font-size:28px}
    .bcp-board{border-radius:14px}
    .bcp-board-lock{border-radius:12px;padding:14px}
    .bcp-lock-text{font-size:12px;padding:8px 12px}
    .bcp-play{margin-top:12px;min-height:54px}
}
.bcp-message[data-type="error"]{color:#b00020}
.bcp-message[data-type="success"]{color:#087f3f}
