/* ==============================================
   1분빙고 — Cyberpunk Neon Theme
   ============================================== */
:root {
    --b1m-bg:       #020c1e;
    --b1m-panel:    #040e22;
    --b1m-border:   #0d2545;
    --b1m-cyan:     #00f5ff;
    --b1m-pink:     #ff00cc;
    --b1m-green:    #00ff9f;
    --b1m-yellow:   #ffe600;
    --b1m-red:      #ff2244;
    --b1m-text:     #c8e0f0;
    --b1m-muted:    #4a7090;
}

.b1m-wrap {
    background: var(--b1m-bg);
    color: var(--b1m-text);
    font-family: 'Noto Sans KR', sans-serif;
    min-height: 100vh;
    padding: 16px 12px 40px;
    zoom: 0.9;
    background-image:
        linear-gradient(rgba(0,245,255,.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,245,255,.025) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* ── Cyberpunk Title ── */
.b1m-cyber-header {
    display: none/*flex*/;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.b1m-cyber-title {
    text-align: center;
    padding: 12px 40px;
    background: linear-gradient(135deg, #0c2d5e, #1a6dff);
    border: 2px solid var(--b1m-cyan);
    clip-path: polygon(16px 0%, calc(100% - 16px) 0%, 100% 16px, 100% calc(100% - 16px), calc(100% - 16px) 100%, 16px 100%, 0% calc(100% - 16px), 0% 16px);
    position: relative;
    box-shadow: 0 0 30px rgba(26,109,255,.4), inset 0 0 30px rgba(0,245,255,.05);
}
.b1m-cyber-title::after {
    content: '';
    position: absolute;
    inset: 5px;
    clip-path: polygon(12px 0%, calc(100% - 12px) 0%, 100% 12px, 100% calc(100% - 12px), calc(100% - 12px) 100%, 12px 100%, 0% calc(100% - 12px), 0% 12px);
    border: 1px solid rgba(0,245,255,.15);
    pointer-events: none;
}
.b1m-cyber-title h1 {
    font-size: clamp(22px, 4vw, 30px);
    font-weight: 900;
    letter-spacing: 4px;
    color: var(--b1m-cyan);
    text-shadow: 0 0 20px var(--b1m-cyan), 0 0 40px rgba(0,245,255,.4);
    margin: 0;
    line-height: 1.1;
}
.b1m-cyber-title p {
    font-size: 11px;
    color: rgba(0,245,255,.5);
    letter-spacing: 5px;
    margin: 3px 0 0;
    font-weight: 700;
}
.b1m-game-num {
    background: rgba(0,245,255,.1);
    border: 1px solid rgba(0,245,255,.3);
    color: var(--b1m-cyan);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

/* ── Timer ── */
.b1m-timer {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--b1m-panel);
    border: 1px solid var(--b1m-border);
    border-radius: 12px;
    padding: 10px 16px;
    margin-bottom: 14px;
    position: relative;
    overflow: hidden;
}
.b1m-timer::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--b1m-cyan), var(--b1m-pink));
}
.b1m-timer-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--b1m-muted);
    flex-shrink: 0;
}
.b1m-timer-dot.preparing { background: var(--b1m-cyan);   box-shadow: 0 0 12px var(--b1m-cyan);   animation: b1mPulse .8s ease infinite; }
.b1m-timer-dot.betting   { background: var(--b1m-green);  box-shadow: 0 0 12px var(--b1m-green);  animation: b1mPulse 1s ease infinite; }
.b1m-timer-dot.revealing { background: var(--b1m-yellow); box-shadow: 0 0 12px var(--b1m-yellow); animation: b1mPulse .6s ease infinite; }
.b1m-timer-dot.finished  { background: var(--b1m-pink);   box-shadow: 0 0 12px var(--b1m-pink); }
@keyframes b1mPulse { 0%,100%{opacity:1} 50%{opacity:.3} }

.b1m-timer-label { font-size: 12px; font-weight: 700; color: var(--b1m-muted); min-width: 60px; }
.b1m-timer-countdown {
    font-size: 28px; font-weight: 900;
    font-variant-numeric: tabular-nums;
    color: var(--b1m-yellow);
    text-shadow: 0 0 20px var(--b1m-yellow);
    min-width: 60px;
}
.b1m-timer-countdown.urgent { color: var(--b1m-red); text-shadow: 0 0 20px var(--b1m-red); animation: b1mPulse .4s ease infinite; }
.b1m-timer-bar-wrap { flex: 1; height: 6px; background: rgba(255,255,255,.06); border-radius: 3px; overflow: hidden; }
.b1m-timer-bar {
    height: 100%; border-radius: 3px;
    background: linear-gradient(90deg, var(--b1m-cyan), var(--b1m-pink));
    transition: width .9s linear;
    box-shadow: 0 0 8px var(--b1m-cyan);
}
.b1m-timer-phase {
    font-size: 11px; font-weight: 700;
    padding: 3px 10px; border-radius: 10px;
    background: rgba(0,245,255,.1);
    border: 1px solid rgba(0,245,255,.2);
    color: var(--b1m-cyan);
}
.b1m-sound-btn {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: rgba(0,245,255,.08);
    border: 1px solid rgba(0,245,255,.35);
    color: var(--b1m-cyan);
    cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 15px; line-height: 1;
    transition: all .2s;
    padding: 0;
    flex-shrink: 0;
}
.b1m-sound-btn:hover { background: rgba(0,245,255,.16); box-shadow: 0 0 12px rgba(0,245,255,.35); }
.b1m-sound-btn.muted { border-color: rgba(255,50,80,.4); color: var(--b1m-red); background: rgba(255,50,80,.08); }
.b1m-sound-btn.muted:hover { background: rgba(255,50,80,.14); box-shadow: 0 0 12px rgba(255,50,80,.35); }
.b1m-sound-ic { pointer-events: none; }

.b1m-help-btn {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: rgba(255,230,0,.08);
    border: 1px solid rgba(255,230,0,.4);
    color: var(--b1m-yellow);
    cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 17px; font-weight: 900; line-height: 1;
    transition: all .2s;
    padding: 0;
    flex-shrink: 0;
    font-family: 'Noto Sans KR', sans-serif;
}
.b1m-help-btn:hover { background: rgba(255,230,0,.16); box-shadow: 0 0 12px rgba(255,230,0,.45); }

/* ── Help Modal ── */
.b1m-modal {
    position: fixed; inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: b1mModalIn .2s ease;
}
@keyframes b1mModalIn { from { opacity: 0; } to { opacity: 1; } }
.b1m-modal-backdrop {
    position: absolute; inset: 0;
    background: rgba(2, 6, 18, .82);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    cursor: pointer;
}
.b1m-modal-box {
    position: relative;
    width: min(680px, 96vw);
    max-height: 88vh;
    display: flex; flex-direction: column;
    background: linear-gradient(180deg, rgba(4,14,34,.98) 0%, rgba(2,8,20,.98) 100%);
    border: 1px solid var(--b1m-cyan);
    border-radius: 14px;
    box-shadow: 0 0 40px rgba(0,245,255,.35), 0 0 80px rgba(0,245,255,.12);
    overflow: hidden;
    animation: b1mModalBoxIn .25s cubic-bezier(.2,.9,.3,1.2);
}
@keyframes b1mModalBoxIn {
    from { opacity: 0; transform: translateY(12px) scale(.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.b1m-modal-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--b1m-border);
    background: linear-gradient(90deg, rgba(0,245,255,.08), rgba(255,0,204,.05));
}
.b1m-modal-head h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 900;
    color: var(--b1m-cyan);
    text-shadow: 0 0 12px rgba(0,245,255,.5);
    letter-spacing: 1px;
}
.b1m-modal-x {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid rgba(200,224,240,.25);
    color: var(--b1m-text);
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
    padding: 0;
    transition: all .2s;
}
.b1m-modal-x:hover { background: rgba(255,50,80,.15); border-color: var(--b1m-red); color: var(--b1m-red); }
.b1m-modal-body {
    padding: 16px 20px;
    overflow-y: auto;
    color: var(--b1m-text);
    font-size: 13px;
    line-height: 1.7;
}
.b1m-modal-body section { margin-bottom: 18px; }
.b1m-modal-body section:last-child { margin-bottom: 0; }
.b1m-modal-body h3 {
    font-size: 14px;
    font-weight: 900;
    color: var(--b1m-yellow);
    text-shadow: 0 0 8px rgba(255,230,0,.3);
    margin: 0 0 8px;
    letter-spacing: .5px;
}
.b1m-modal-body p { margin: 0 0 6px; color: #b8d4e8; }
.b1m-modal-body ul {
    margin: 0; padding: 0 0 0 4px;
    list-style: none;
}
.b1m-modal-body ul li {
    padding: 3px 0 3px 18px;
    position: relative;
    color: #b8d4e8;
}
.b1m-modal-body ul li::before {
    content: '›';
    position: absolute;
    left: 2px;
    color: var(--b1m-cyan);
    font-weight: 900;
}
.b1m-modal-body b { color: #fff; }
.b1m-help-phase li { padding-left: 0 !important; }
.b1m-help-phase li::before { content: none !important; }
.b1m-help-chip {
    display: inline-block;
    min-width: 44px;
    padding: 2px 8px;
    margin-right: 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 900;
    text-align: center;
    letter-spacing: 1px;
}
.b1m-help-chip.chip-prep { background: rgba(0,245,255,.15); color: var(--b1m-cyan);   border: 1px solid rgba(0,245,255,.4); }
.b1m-help-chip.chip-bet  { background: rgba(0,255,159,.15); color: var(--b1m-green);  border: 1px solid rgba(0,255,159,.4); }
.b1m-help-chip.chip-rev  { background: rgba(255,230,0,.15); color: var(--b1m-yellow); border: 1px solid rgba(255,230,0,.4); }
.b1m-help-chip.chip-end  { background: rgba(255,0,204,.15); color: var(--b1m-pink);   border: 1px solid rgba(255,0,204,.4); }
.b1m-modal-foot {
    padding: 12px 18px;
    border-top: 1px solid var(--b1m-border);
    text-align: right;
    background: rgba(0,0,0,.3);
}
.b1m-modal-ok {
    padding: 8px 22px;
    border-radius: 8px;
    background: var(--b1m-cyan);
    color: #001018;
    border: none;
    font-weight: 900;
    cursor: pointer;
    font-size: 13px;
    letter-spacing: 1px;
    transition: all .2s;
}
.b1m-modal-ok:hover { background: #5cffff; box-shadow: 0 0 16px var(--b1m-cyan); }

/* ── Main Layout ── */
.b1m-main {
    display: grid;
    grid-template-columns: 1fr 450px;
    gap: 14px;
    margin-bottom: 14px;
}
@media(max-width:900px) { .b1m-main { grid-template-columns: 1fr; } }

/* ── Board Panel (Octagonal Cyberpunk Frame) ── */
.b1m-board-outer {
    filter: drop-shadow(0 0 18px rgba(0,245,255,.4)) drop-shadow(0 0 4px rgba(0,245,255,.6));
}
.b1m-board-panel {
    background: rgba(3, 9, 26, 0.97);
    border: 2px solid var(--b1m-cyan);
    clip-path: polygon(
        22px 0%, calc(100% - 22px) 0%,
        100% 22px, 100% calc(100% - 22px),
        calc(100% - 22px) 100%, 22px 100%,
        0% calc(100% - 22px), 0% 22px
    );
    padding: 20px 18px;
    position: relative;
        background-image: url(../../../img/bingo_back2.png);
    background-repeat: no-repeat;
    background-size: 100.7% 100.5%;
    background-blend-mode: lighten;
}
.b1m-board-panel::before {
    content: '';
    position: absolute;
    inset: 7px;
    clip-path: polygon(
        16px 0%, calc(100% - 16px) 0%,
        100% 16px, 100% calc(100% - 16px),
        calc(100% - 16px) 100%, 16px 100%,
        0% calc(100% - 16px), 0% 16px
    );
    border: 1px solid rgba(0,245,255,.1);
    pointer-events: none;
}
.b1m-board-title {
    font-size: 12px; font-weight: 700;
    color: var(--b1m-cyan);
    letter-spacing: 1px;
    margin-bottom: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ── B-I-N-G-O Column Headers ── */
.b1m-grid-wrap {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.b1m-col-labels {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
}
.b1m-col-labels span {
    text-align: center;
    font-size: clamp(20px, 3vw, 28px);
    font-weight: 900;
    color: var(--b1m-cyan);
    text-shadow: 0 0 20px var(--b1m-cyan), 0 0 40px rgba(0,245,255,.3);
    letter-spacing: 2px;
    padding: 4px 0;
}
.b1m-grid-area {
    position: relative;
}
.b1m-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
}

/* ── Win Line Overlay ── */
#b1mWinLine {
    position: absolute;
    border-radius: 4px;
    background: var(--b1m-pink);
    box-shadow: 0 0 20px var(--b1m-pink), 0 0 40px rgba(255,0,204,.5), 0 0 60px rgba(255,0,204,.25);
    pointer-events: none;
    z-index: 20;
    display: none;
    opacity: .9;
    animation: b1mWinLineIn .5s ease forwards;
}
@keyframes b1mWinLineIn {
    0%   { opacity: 0; transform: scaleX(0); }
    100% { opacity: .9; transform: scaleX(1); }
}

/* ── Cyberpunk Neon Ball Cells ── */
.b1m-cell {
    aspect-ratio: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: default;
    background:
        radial-gradient(circle at 32% 28%, rgba(255,255,255,.18) 0%, rgba(255,255,255,.04) 14%, transparent 34%),
        radial-gradient(circle at 50% 50%, #0a1d33 0%, #051224 55%, #010610 100%);
    border: 1px solid rgba(0, 245, 255, 0.25);
    box-shadow:
        inset 0 -6px 14px rgba(0,0,0,.55),
        inset 0 6px 12px rgba(0,245,255,.06);
    transition: all .3s;
    overflow: hidden;
}
.b1m-cell::before {
    content: '';
    position: absolute;
    top: 8%; left: 18%;
    width: 42%; height: 28%;
    background: radial-gradient(ellipse at center, rgba(255,255,255,.35) 0%, rgba(255,255,255,.08) 50%, transparent 78%);
    border-radius: 50%;
    pointer-events: none;
    filter: blur(1.5px);
    z-index: 1;
}
.b1m-cell::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(ellipse at 50% 0%, rgba(0,245,255,.05) 0%, transparent 65%);
    pointer-events: none;
}
.b1m-cell .b1m-ball {
    width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    background: none;
    opacity: 1;
    transition: all .3s;
}
.b1m-ball-num {
    font-size: clamp(16px, 2.4vw, 50px);
    font-weight: 900;
    position: relative;
    z-index: 2;
    color: rgba(0, 245, 255, 0.6);
    text-shadow: 0 0 8px rgba(0,245,255,.2);
    line-height: 1;
    transition: all .3s;
    font-variant-numeric: tabular-nums;
}

/* ── Revealed (Open) ── */
.b1m-cell.open {
    border-color: rgba(255, 0, 204, 0.6);
    background:
        radial-gradient(circle at 32% 28%, rgba(255,255,255,.22) 0%, rgba(255,255,255,.05) 14%, transparent 34%),
        radial-gradient(circle at 50% 50%, #4a0f35 0%, #28081e 55%, #120410 100%);
    box-shadow:
        inset 0 -6px 14px rgba(0,0,0,.55),
        inset 0 6px 14px rgba(255,0,204,.18),
        0 0 12px rgba(255,0,204,.25);
}
.b1m-cell.open::after {
    background: radial-gradient(ellipse at 50% 0%, rgba(255,0,204,.12) 0%, transparent 65%);
}
.b1m-cell.open .b1m-ball-num {
    color: #ffe8f5;
    text-shadow: 0 0 14px var(--b1m-pink), 0 0 28px rgba(255,0,204,.55);
    font-size: clamp(18px, 2.7vw, 50px);
}
.b1m-cell.open .b1m-ball {
    animation: b1mRevealFlash .4s ease forwards;
}
@keyframes b1mRevealFlash {
    0%   { background: rgba(255, 0, 204, 0.25); }
    100% { background: transparent; }
}

/* Win cell */
.b1m-cell.win-cell {
    border-color: var(--b1m-pink) !important;
    background: rgba(255, 0, 204, 0.22) !important;
    box-shadow: 0 0 0 2px var(--b1m-pink), 0 0 24px rgba(255,0,204,.55) !important;
    animation: b1mWinPulse .75s ease infinite alternate;
}
.b1m-cell.win-cell .b1m-ball-num {
    color: var(--b1m-pink) !important;
    text-shadow: 0 0 16px var(--b1m-pink) !important;
}
@keyframes b1mWinPulse {
    0%  { box-shadow: 0 0 0 2px var(--b1m-pink), 0 0 16px rgba(255,0,204,.5); }
    100%{ box-shadow: 0 0 0 3px var(--b1m-pink), 0 0 36px rgba(255,0,204,.85), 0 0 60px rgba(255,0,204,.25); }
}

/* Near-bingo */
.b1m-cell.near-bingo {
    animation: b1mNearScale .42s cubic-bezier(.4,0,.6,1) infinite alternate,
               b1mNearColor 1.26s linear infinite;
    z-index: 3;
}
.b1m-cell.near-bingo .b1m-ball-num {
    animation: b1mNearNum .42s ease-in-out infinite alternate;
}
/* Near-bingo: 숫자 뒤에서 회전하는 별 */
.b1m-cell.near-bingo .b1m-ball::after {
    content: '★';
    position: absolute;
    top: 50%; left: 50%;
    width: auto; height: auto;
    font-size: clamp(34px, 5.5vw, 110px);
    line-height: 1;
    color: rgba(255, 230, 0, .55);
    text-shadow: 0 0 14px rgba(255,180,0,.85), 0 0 28px rgba(255,120,0,.55);
    z-index: 1;
    pointer-events: none;
    transform-origin: center;
    animation: b1mNearStar 2.2s linear infinite;
}
@keyframes b1mNearStar {
    0%   { transform: translate(-50%, -50%) rotate(0deg);   opacity: .55; }
    50%  { transform: translate(-50%, -50%) rotate(180deg); opacity: .95; }
    100% { transform: translate(-50%, -50%) rotate(360deg); opacity: .55; }
}
@keyframes b1mNearScale {
    0%  { transform: scale(1); }
    100%{ transform: scale(1.08); }
}
@keyframes b1mNearColor {
    0%   { border-color:#ffe000; box-shadow:0 0 14px #ffe000cc,0 0 32px #ffaa0070,inset 0 0 12px #ffe00018; background:rgba(255,220,0,.07); }
    33%  { border-color:#ff7700; box-shadow:0 0 20px #ff7700ee,0 0 48px #ff440088,inset 0 0 16px #ff770022; background:rgba(255,110,0,.10); }
    66%  { border-color:#ff1500; box-shadow:0 0 26px #ff1500ff,0 0 60px #ff000066,inset 0 0 20px #ff150028; background:rgba(255,20,0,.12); }
    100% { border-color:#ffe000; box-shadow:0 0 14px #ffe000cc,0 0 32px #ffaa0070,inset 0 0 12px #ffe00018; background:rgba(255,220,0,.07); }
}
@keyframes b1mNearNum {
    0%  { text-shadow:0 0 8px rgba(255,220,0,.7); color:#fff066; }
    100%{ text-shadow:0 0 18px #ffe000,0 0 36px #ff7700cc; color:#ffe000; }
}

/* ── Neon flicker turn-on effect ── */
.b1m-cell.opening-in {
    animation: b1mNeonFlicker .85s ease forwards;
}
@keyframes b1mNeonFlicker {
    0%   { border-color: rgba(255,0,204,0);   background: rgba(0,0,0,0); }
    7%   { border-color: rgba(255,0,204,.85);  background: rgba(180,0,140,.28); }
    10%  { border-color: rgba(255,0,204,.05);  background: rgba(0,0,0,0); }
    15%  { border-color: rgba(255,0,204,.9);   background: rgba(180,0,140,.32); }
    18%  { border-color: rgba(255,0,204,.08);  background: rgba(0,0,0,0); }
    25%  { border-color: rgba(255,0,204,.88);  background: rgba(180,0,140,.26); }
    28%  { border-color: rgba(255,0,204,.25);  background: rgba(0,0,0,.02); }
    36%  { border-color: rgba(255,0,204,.9);   background: rgba(180,0,140,.24); }
    42%  { border-color: rgba(255,0,204,.5);   background: rgba(160,0,120,.18); }
    55%  { border-color: rgba(255,0,204,.85);  background: rgba(160,0,120,.2); }
    70%  { border-color: rgba(255,0,204,.7);   background: rgba(160,0,120,.16); }
    100% { border-color: rgba(255,0,204,.55);  background: rgba(160,0,120,.14); }
}
.b1m-cell.opening-in .b1m-ball-num {
    animation: b1mNumFlicker .85s ease forwards;
}
@keyframes b1mNumFlicker {
    0%   { color: rgba(255,0,204,0);  text-shadow: none; }
    7%   { color: rgba(255,0,204,.9); text-shadow: 0 0 18px rgba(255,0,204,.9); }
    10%  { color: rgba(255,0,204,.02);text-shadow: none; }
    15%  { color: rgba(255,0,204,1);  text-shadow: 0 0 22px rgba(255,0,204,1); }
    18%  { color: rgba(255,0,204,.05);text-shadow: none; }
    25%  { color: rgba(255,0,204,.95);text-shadow: 0 0 18px rgba(255,0,204,.9); }
    28%  { color: rgba(255,0,204,.4); text-shadow: 0 0 8px rgba(255,0,204,.3); }
    36%  { color: rgba(255,0,204,1);  text-shadow: 0 0 22px rgba(255,0,204,1); }
    50%  { color: rgba(255,0,204,.8); text-shadow: 0 0 16px rgba(255,0,204,.8); }
    100% { color: var(--b1m-pink);    text-shadow: 0 0 14px var(--b1m-pink), 0 0 28px rgba(255,0,204,.55); }
}
.b1m-cell.is-last { animation: b1mLastReveal .9s ease forwards !important; }
@keyframes b1mLastReveal {
    0%   { transform: scale(1.45); background: rgba(255,0,204,.45); }
    40%  { transform: scale(.93); }
    70%  { transform: scale(1.08); }
    100% { transform: scale(1); }
}

/* ── BINGO / WINNER Badges ── */
.b1m-badge-area {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
    justify-content: center;
}
.b1m-bingo-badge, .b1m-winner-badge {
    padding: 6px 20px;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 2px;
    clip-path: polygon(9px 0%, calc(100% - 9px) 0%, 100% 9px, 100% calc(100% - 9px), calc(100% - 9px) 100%, 9px 100%, 0% calc(100% - 9px), 0% 9px);
    animation: b1mBadgePulse .8s ease infinite alternate;
}
.b1m-bingo-badge {
    background: rgba(0,245,255,.12);
    border: 1px solid var(--b1m-cyan);
    color: var(--b1m-cyan);
    text-shadow: 0 0 14px var(--b1m-cyan);
}
.b1m-winner-badge {
    background: rgba(255,0,204,.12);
    border: 1px solid var(--b1m-pink);
    color: var(--b1m-pink);
    text-shadow: 0 0 14px var(--b1m-pink);
}
@keyframes b1mBadgePulse {
    0%  { box-shadow: 0 0 10px currentColor; }
    100%{ box-shadow: 0 0 28px currentColor, 0 0 50px rgba(255,255,255,.08); }
}

/* ── Number Call Display ── */
.b1m-num-call-wrap {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(0,245,255,.1);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.b1m-num-call-label {
    font-size: 10px;
    color: var(--b1m-muted);
    font-weight: 700;
    letter-spacing: 1px;
    white-space: nowrap;
}
.b1m-num-call-ball {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px; height: 42px;
    border-radius: 4px;
    font-size: 20px;
    font-weight: 900;
    background: rgba(255,0,204,.15);
    border: 2px solid var(--b1m-pink);
    color: var(--b1m-pink);
    text-shadow: 0 0 14px var(--b1m-pink);
    box-shadow: 0 0 14px rgba(255,0,204,.3);
    transition: all .3s;
    flex-shrink: 0;
}
.b1m-num-call-ball.idle {
    background: rgba(0,245,255,.04);
    border-color: rgba(0,245,255,.15);
    color: rgba(0,245,255,.25);
    text-shadow: none;
    box-shadow: none;
}
.b1m-num-call-seq {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    flex: 1;
    min-height: 28px;
}
.b1m-reveal-ball-item {
    width: 26px; height: 26px;
    border-radius: 3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 900;
    background: rgba(255,0,204,.1);
    border: 1px solid rgba(255,0,204,.25);
    color: rgba(255,0,204,.7);
    flex-shrink: 0;
}
.b1m-reveal-ball-item.is-last {
    background: rgba(255,0,204,.22);
    border: 2px solid var(--b1m-pink);
    color: var(--b1m-pink);
    box-shadow: 0 0 12px rgba(255,0,204,.55);
    font-size: 13px;
    animation: b1mPulse .6s ease infinite;
}

/* ── 중앙 숫자 호출 디스플레이 (3D Ball) ── */
#b1mNumDisplay {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 58%; aspect-ratio: 1;
    background:
        radial-gradient(circle at 32% 28%, rgba(255,255,255,.28) 0%, rgba(255,255,255,.06) 14%, transparent 34%),
        radial-gradient(circle at 50% 50%, rgba(11,35,64,.72) 0%, rgba(6,21,38,.68) 55%, rgba(2,8,16,.65) 100%);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    border: 2px solid var(--b1m-cyan);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    z-index: 25;
    pointer-events: none;
    opacity: 0;
    box-shadow:
        0 0 50px rgba(0,245,255,.45),
        0 0 100px rgba(0,245,255,.18),
        inset 0 -18px 40px rgba(0,0,0,.4),
        inset 0 18px 40px rgba(0,245,255,.1);
}
#b1mNumDisplay::before {
    content: '';
    position: absolute;
    top: 8%; left: 18%;
    width: 40%; height: 28%;
    background: radial-gradient(ellipse at center, rgba(255,255,255,.45) 0%, rgba(255,255,255,.12) 45%, transparent 75%);
    border-radius: 50%;
    pointer-events: none;
    filter: blur(2px);
}
#b1mNumDisplay.nd-in  { animation: b1mNdIn  .22s cubic-bezier(.2,.8,.3,1.2) forwards; }
#b1mNumDisplay.nd-out { animation: b1mNdOut .38s ease forwards; }
#b1mNumDisplay.nd-prep {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}
#b1mNumDisplay.nd-last {
    border-color: var(--b1m-pink);
    box-shadow:
        0 0 50px rgba(255,0,204,.55),
        0 0 100px rgba(255,0,204,.2),
        inset 0 -18px 40px rgba(0,0,0,.55),
        inset 0 18px 40px rgba(255,0,204,.14);
}
@keyframes b1mNdIn {
    0%   { opacity: 0; transform: translate(-50%,-50%) scale(.55); }
    65%  { opacity: 1; transform: translate(-50%,-50%) scale(1.06); }
    100% { opacity: 1; transform: translate(-50%,-50%) scale(1); }
}
@keyframes b1mNdOut {
    0%   { opacity: 1; transform: translate(-50%,-50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%,-50%) scale(1.28); }
}
.b1m-nd-letter {
    font-size: clamp(16px, 3.5vw, 32px);
    font-weight: 900;
    color: var(--b1m-cyan);
    text-shadow: 0 0 16px var(--b1m-cyan);
    letter-spacing: 3px;
    line-height: 1;
}
#b1mNumDisplay.nd-last .b1m-nd-letter { color: var(--b1m-pink); text-shadow: 0 0 16px var(--b1m-pink); }
.b1m-nd-num {
    font-size: clamp(42px, 9vw, 184px);
    font-weight: 900;
    color: #fff;
    text-shadow: 0 0 30px var(--b1m-cyan), 0 0 60px rgba(0,245,255,.4);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
#b1mNumDisplay.nd-last .b1m-nd-num { text-shadow: 0 0 30px var(--b1m-pink), 0 0 60px rgba(255,0,204,.4); }
.b1m-nd-pos {
    font-size: clamp(11px, 1.8vw, 15px);
    font-weight: 700;
    color: rgba(0,245,255,.55);
    letter-spacing: 2px;
    line-height: 1;
    margin-top: 2px;
}
#b1mNumDisplay.nd-last .b1m-nd-pos { color: rgba(255,0,204,.55); }

/* ── Idle animations ── */
.b1m-idle-particle {
    position: absolute;
    width: 3px; height: 3px;
    border-radius: 50%;
    pointer-events: none;
    animation: b1mParticleFloat linear infinite;
    opacity: 0;
}
@keyframes b1mParticleFloat {
    0%   { opacity: 0; transform: translateY(0) scale(.5); }
    10%  { opacity: .7; }
    90%  { opacity: .7; }
    100% { opacity: 0; transform: translateY(-70px) scale(1.2); }
}
/* ── Opening start banner (grid 전체 덮는 dim + 중앙 큰 텍스트) ── */
.b1m-start-banner {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
    font-size: clamp(22px, 4.6vw, 54px);
    font-weight: 900;
    letter-spacing: 3px;
    color: var(--b1m-yellow);
    text-shadow:
        0 0 12px var(--b1m-yellow),
        0 0 28px rgba(255,230,0,.9),
        0 0 60px rgba(255,160,0,.6),
        0 2px 8px rgba(0,0,0,.8);
    line-height: 1;
    padding: 0 8px;
    background: radial-gradient(ellipse at center,
        rgba(4,10,22,.88) 0%,
        rgba(2,6,14,.92) 55%,
        rgba(0,0,0,.95) 100%);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 24;
    pointer-events: none;
    animation: b1mStartFlash .6s ease-in-out infinite alternate;
}
@keyframes b1mStartFlash {
    0%   { opacity: .7; text-shadow: 0 0 10px var(--b1m-yellow); }
    100% { opacity: 1;  text-shadow: 0 0 24px var(--b1m-yellow), 0 0 50px rgba(255,200,0,.6); }
}

.b1m-scan-line {
    position: absolute;
    left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--b1m-cyan), transparent);
    pointer-events: none;
    animation: b1mScan 3s ease-in-out infinite;
    opacity: .3;
    z-index: 10;
}
@keyframes b1mScan { 0%{top:0} 100%{top:100%} }

/* ── Right Panel ── */
.b1m-right { display: flex; flex-direction: column; gap: 12px; }
.b1m-box {
    background: var(--b1m-panel);
    border: 1px solid var(--b1m-border);
    border-radius: 12px;
    padding: 14px;
    position: relative;
}
.b1m-box::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0,245,255,.2), transparent);
}
.b1m-box-title {
    font-size: 11px; font-weight: 700;
    color: var(--b1m-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

/* ── Line Bet Buttons (행/열) ── */
.b1m-lb-section { margin-bottom: 10px; }
.b1m-lb-label {
    font-size: 10px; font-weight: 700;
    letter-spacing: 1px; text-transform: uppercase;
    margin-bottom: 5px; color: var(--b1m-muted);
}
.b1m-lb-group { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.b1m-line-btn {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 2px; padding: 7px 2px;
    border-radius: 6px;
    border: 1px solid var(--b1m-border);
    background: rgba(0,0,0,.3);
    cursor: pointer; transition: all .18s;
    min-width: 0; overflow: hidden;
}
.b1m-lb-name { font-size: 12px; font-weight: 900; color: #fff; }
.b1m-lb-odds { font-size: 9px; font-weight: 700; color: var(--b1m-muted); white-space: nowrap; }
.b1m-btn-line-row { border-color: rgba(26,157,255,.2); }
.b1m-btn-line-col { border-color: rgba(255,68,170,.2); }
.b1m-btn-line-row:hover:not(.elim) { border-color: #1a9dff; box-shadow: 0 0 8px rgba(26,157,255,.3); }
.b1m-btn-line-col:hover:not(.elim) { border-color: #ff44aa; box-shadow: 0 0 8px rgba(255,68,170,.3); }
.b1m-line-btn.sel.b1m-btn-line-row {
    border-color: #1a9dff; box-shadow: 0 0 14px rgba(26,157,255,.5);
    background: rgba(26,157,255,.1);
}
.b1m-line-btn.sel.b1m-btn-line-row .b1m-lb-name,
.b1m-line-btn.sel.b1m-btn-line-row .b1m-lb-odds { color: #1a9dff; }
.b1m-line-btn.sel.b1m-btn-line-col {
    border-color: #ff44aa; box-shadow: 0 0 14px rgba(255,68,170,.5);
    background: rgba(255,68,170,.1);
}
.b1m-line-btn.sel.b1m-btn-line-col .b1m-lb-name,
.b1m-line-btn.sel.b1m-btn-line-col .b1m-lb-odds { color: #ff44aa; }
.b1m-line-btn.elim {
    opacity: 0.28; cursor: not-allowed;
    border-style: dashed;
    border-color: var(--b1m-border) !important;
    box-shadow: none !important;
}
.b1m-line-btn.elim .b1m-lb-odds { color: var(--b1m-red); font-size: 8px; }
.b1m-line-btn.already-bet { opacity: .5; cursor: not-allowed; }
.b1m-line-btn.result-win  { border-color: var(--b1m-green) !important; }
.b1m-line-btn.result-lose { border-color: var(--b1m-red)   !important; opacity: .5; }
.b1m-parity-group { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 6px; }
.b1m-parity-group.b1m-quad { grid-template-columns: repeat(4, 1fr); }

/* ── Bet Stats Lines ── */
.b1m-bet-stats-lines { display: flex; flex-direction: column; gap: 3px; }
.b1m-bsl {
    display: flex; align-items: center; gap: 6px;
    padding: 4px 6px;
    background: rgba(0,0,0,.2); border-radius: 4px;
    font-size: 10px;
}
.b1m-bsl-name { font-weight: 900; min-width: 26px; color: #fff; }
.b1m-bsl-bar-wrap { flex: 1; height: 4px; background: rgba(255,255,255,.06); border-radius: 2px; overflow: hidden; }
.b1m-bsl-bar { height: 100%; border-radius: 2px; transition: width .5s ease; }
.b1m-bsl-total { font-weight: 700; color: var(--b1m-muted); min-width: 44px; text-align: right; font-size: 9px; }
.b1m-bsl-amt { font-weight: 700; color: var(--b1m-muted); min-width: 52px; text-align: right; font-size: 9px; }
.b1m-bsl-cnt { color: var(--b1m-muted); min-width: 24px; text-align: right; font-size: 9px; opacity: .7; }

/* ── Bet Buttons ── */
.b1m-bet-types { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.b1m-bet-type-btn {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 4px; padding: 12px 8px;
    border-radius: 8px;
    border: 1px solid var(--b1m-border);
    background: rgba(0,0,0,.3);
    cursor: pointer;
    transition: all .2s;
    position: relative; overflow: hidden;
}
.b1m-bet-type-btn::before {
    content: ''; position: absolute; inset: 0;
    background: currentColor; opacity: 0; transition: opacity .2s;
}
.b1m-bet-type-btn:hover::before { opacity: .07; }
.b1m-bet-type-btn.sel::before   { opacity: .12; }
.b1m-bet-type-btn.sel { border-color: currentColor; box-shadow: 0 0 16px currentColor; }
.b1m-btn-row  { color: #1a9dff; }
.b1m-btn-col  { color: #ff44aa; }
.b1m-btn-row-gen { color: #1a9dff; }
.b1m-btn-col-gen { color: #ff44aa; }
.b1m-btn-odd  { color: var(--b1m-green); }
.b1m-btn-even { color: var(--b1m-yellow); }
.b1m-btn-icon  { font-size: 20px; line-height: 1; }
.b1m-btn-label { font-size: 13px; font-weight: 900; color: #fff; }
.b1m-btn-odds  { font-size: 11px; font-weight: 700; color: var(--b1m-muted); }
.b1m-bet-type-btn.sel .b1m-btn-odds { color: currentColor; }
.b1m-bet-type-btn.result-win::after  { content:'WIN ✓';  position:absolute;top:4px;right:6px;font-size:9px;font-weight:900;color:var(--b1m-green); }
.b1m-bet-type-btn.result-lose::after { content:'LOSE ✗'; position:absolute;top:4px;right:6px;font-size:9px;font-weight:900;color:var(--b1m-red); }

/* ── Last Number ── */
.b1m-last-num-box {
    text-align: center; padding: 10px 0 6px;
    border-top: 1px solid var(--b1m-border); margin-top: 6px;
}
.b1m-last-num-label { font-size: 10px; color: var(--b1m-muted); margin-bottom: 6px; }
.b1m-last-num-ball {
    display: inline-flex; align-items: center; justify-content: center;
    width: 52px; height: 52px;
    border-radius: 5px;
    font-size: 22px; font-weight: 900;
    background: rgba(2,8,24,.95);
    border: 1px solid rgba(0,245,255,.2);
    color: rgba(0,245,255,.3);
    margin: 0 auto; transition: all .3s;
}
.b1m-last-num-ball.revealed {
    background: rgba(160,0,120,.2);
    border-color: var(--b1m-pink);
    color: var(--b1m-pink);
    text-shadow: 0 0 14px var(--b1m-pink);
    box-shadow: 0 0 0 2px rgba(255,0,204,.3), 0 0 22px rgba(255,0,204,.4);
    animation: b1mLastBallPulse .7s ease infinite alternate;
}
@keyframes b1mLastBallPulse {
    0%  { box-shadow: 0 0 0 1px rgba(255,0,204,.3), 0 0 14px rgba(255,0,204,.4); }
    100%{ box-shadow: 0 0 0 3px rgba(255,0,204,.5), 0 0 38px rgba(255,0,204,.7); }
}
.b1m-last-parity { font-size: 16px; font-weight: 900; margin-top: 6px; }
.b1m-last-parity.odd  { color: var(--b1m-green);  text-shadow: 0 0 12px var(--b1m-green); }
.b1m-last-parity.even { color: var(--b1m-yellow); text-shadow: 0 0 12px var(--b1m-yellow); }

/* ── Bet Form ── */
.b1m-bet-sel-info {
    background: rgba(0,245,255,.05); border: 1px solid rgba(0,245,255,.15);
    border-radius: 8px; padding: 8px 12px; margin-bottom: 8px;
    display: flex; justify-content: space-between; align-items: center; min-height: 36px;
}
.b1m-sel-name { font-size: 14px; font-weight: 700; color: var(--b1m-cyan); }
.b1m-sel-odds { font-size: 12px; color: var(--b1m-yellow); font-weight: 700; }
.b1m-my-pts   { font-size: 11px; color: var(--b1m-muted); margin-bottom: 8px; }
.b1m-quick-btns { display: flex; gap: 5px; margin-bottom: 8px; }
.b1m-quick-btns button {
    flex: 1; padding: 5px 0;
    border: 1px solid var(--b1m-border); border-radius: 6px;
    background: rgba(0,245,255,.06); color: var(--b1m-cyan);
    font-size: 10px; font-weight: 700; cursor: pointer; transition: background .15s;
}
.b1m-quick-btns button:hover { background: rgba(0,245,255,.15); }
.b1m-inp-row { display: flex; gap: 6px; margin-bottom: 8px; }
.b1m-inp-row input {
    flex: 1; padding: 8px 12px;
    background: rgba(0,0,0,.4); border: 1px solid var(--b1m-border);
    border-radius: 8px; color: #fff; font-size: 14px; font-weight: 700;
    outline: none; transition: border-color .2s;
}
.b1m-inp-row input:focus { border-color: var(--b1m-cyan); }
.b1m-inp-row span { color: var(--b1m-muted); font-size: 13px; align-self: center; }
.b1m-go-btn {
    width: 100%; padding: 10px; border: none; border-radius: 8px;
    background: linear-gradient(135deg, var(--b1m-cyan), #0077bb);
    color: #000; font-size: 14px; font-weight: 900;
    cursor: pointer; transition: opacity .2s, transform .1s; letter-spacing: 1px;
}
.b1m-go-btn:hover:not(:disabled) { opacity: .9; transform: translateY(-1px); }
.b1m-go-btn:disabled { background: #0d1e30; color: var(--b1m-muted); cursor: not-allowed; }
.b1m-cancel-btn {
    display: none; width: 100%; margin-top: 6px;
    padding: 6px; border: 1px solid var(--b1m-border); border-radius: 8px;
    background: none; color: var(--b1m-muted); font-size: 12px; cursor: pointer;
}
.b1m-bet-closed-msg { text-align: center; padding: 16px; color: var(--b1m-muted); font-size: 12px; }

/* ── Stats ── */
.b1m-bet-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.b1m-bs {
    background: rgba(0,0,0,.3); border-radius: 6px; padding: 7px 8px;
    display: flex; flex-direction: column; gap: 2px;
}
.b1m-bs-label { font-size: 9px; font-weight: 700; color: var(--b1m-muted); }
.b1m-bs-val   { font-size: 13px; font-weight: 900; color: #fff; }
.b1m-bs-sub   { font-size: 9px; color: var(--b1m-muted); }

/* ── Result Banner (빙고판 내부 오버레이) ── */
.b1m-result {
    display: none;
    position: absolute; inset: 0;
    z-index: 50;
    background: rgba(2, 6, 20, 0.78);
    overflow: hidden;
    text-align: center;
}
.b1m-result.show {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Fireworks canvas — board-panel 직접 자식, result(z:50) 아래 */
#b1m-fireworks {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    z-index: 45;
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity .5s;
}
#b1m-fireworks.active { opacity: 1; }

/* Result content on top of fireworks */
.b1m-result-content {
    position: relative;
    z-index: 2;
    padding: 24px;
}
.b1m-result-content::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(ellipse at center, rgba(0,245,255,.06) 0%, transparent 70%);
    pointer-events: none;
}
.b1m-result-ico  { font-size: 40px; margin-bottom: 4px; line-height: 1; }
.b1m-res-lastnum {
    display: block; font-size: 80px; font-weight: 900; line-height: 1;
    font-family: var(--b1m-font);
    text-shadow: 0 0 24px currentColor, 0 0 50px currentColor, 0 0 90px currentColor;
    animation: b1mResNumIn .5s cubic-bezier(.2,1.4,.4,1) forwards;
}
@keyframes b1mResNumIn {
    0%   { transform: scale(2.5) rotate(-8deg); opacity: 0; }
    60%  { transform: scale(.92) rotate(2deg); opacity: 1; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
.b1m-result-ttl  {
    font-size: 36px; font-weight: 900; letter-spacing: 4px;
    color: var(--b1m-cyan);
    text-shadow: 0 0 30px var(--b1m-cyan), 0 0 60px rgba(0,245,255,.4);
    margin-bottom: 8px;
}
.b1m-result-line { font-size: 16px; color: var(--b1m-pink); font-weight: 700; margin-bottom: 6px; }
.b1m-result-last { font-size: 13px; color: var(--b1m-muted); }
.b1m-result-nxt  { font-size: 12px; color: var(--b1m-muted); margin-top: 8px; }
.b1m-result-cats { display: flex; justify-content: center; gap: 10px; margin-top: 10px; }
.b1m-result-cat-badge {
    padding: 5px 16px; border-radius: 4px;
    font-size: 15px; font-weight: 900; letter-spacing: 1px;
    clip-path: polygon(6px 0%, calc(100% - 6px) 0%, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0% calc(100% - 6px), 0% 6px);
}

/* ── History ── */
.b1m-bottom { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media(max-width:700px) { .b1m-bottom { grid-template-columns: 1fr; } }

.b1m-hist-wrap, .b1m-my-wrap {
    background: var(--b1m-panel); border: 1px solid var(--b1m-border);
    border-radius: 12px; overflow: hidden;
}
.b1m-section-hd {
    padding: 10px 14px; font-size: 12px; font-weight: 700;
    color: var(--b1m-cyan); border-bottom: 1px solid var(--b1m-border); letter-spacing: 1px;
}
.b1m-hist-scroll, .b1m-my-scroll { max-height: 260px; overflow-y: auto; }
.b1m-hist-scroll::-webkit-scrollbar,
.b1m-my-scroll::-webkit-scrollbar { width: 4px; }
.b1m-hist-scroll::-webkit-scrollbar-track,
.b1m-my-scroll::-webkit-scrollbar-track { background: transparent; }
.b1m-hist-scroll::-webkit-scrollbar-thumb,
.b1m-my-scroll::-webkit-scrollbar-thumb { background: var(--b1m-border); border-radius: 2px; }

.b1m-hist-wrap table, .b1m-my-wrap table { width: 100%; border-collapse: collapse; font-size: 11px; }
.b1m-hist-wrap th, .b1m-my-wrap th {
    padding: 6px 8px; background: rgba(0,0,0,.3); color: var(--b1m-muted);
    font-weight: 700; text-align: center; position: sticky; top: 0;
}
.b1m-hist-wrap td, .b1m-my-wrap td {
    padding: 5px 8px; border-bottom: 1px solid rgba(255,255,255,.04);
    color: var(--b1m-text); text-align: center;
}
.b1m-cat-row  { color: #1a9dff; font-weight: 700; }
.b1m-cat-col  { color: #ff44aa; font-weight: 700; }
.b1m-res-win  { color: var(--b1m-green); font-weight: 700; }
.b1m-res-lose { color: var(--b1m-red); }
.b1m-res-pend { color: var(--b1m-muted); }

/* ── Baccarat Road ── */
.b1m-bac-wrap  { overflow-x: auto; padding: 6px 12px 8px; min-height: 72px; cursor: grab; user-select: none; }
.b1m-bac-road  { display: flex; flex-direction: row; gap: 2px; width: max-content; }
.b1m-bac-lane  { display: flex; flex-direction: column; gap: 2px; }
.b1m-bac-cell  { width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0; box-sizing: border-box; }
.b1m-bac-empty { background: transparent; border: 1px solid rgba(255,255,255,.07); }
.b1m-bac-row   { background: #1a9dff; box-shadow: 0 0 5px #1a9dff88; }
.b1m-bac-col   { background: #ff4444; box-shadow: 0 0 5px #ff444488; }
.b1m-bac-odd   { background: #00e676; box-shadow: 0 0 5px #00e67688; }
.b1m-bac-even  { background: #ffd600; box-shadow: 0 0 5px #ffd60088; }
.b1m-bac-empty-msg { color: var(--b1m-muted); font-size: 12px; padding: 4px; }

/* (fireworks canvas is defined inside .b1m-result above) */

/* ── Reveal count dots ── */
.b1m-reveal-count { display: /*flex*/none ; gap: 3px; flex-wrap: wrap; padding: 6px 0 2px; }
.b1m-rc-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--b1m-border); transition: all .3s; }
.b1m-rc-dot.open    { background: var(--b1m-cyan); box-shadow: 0 0 6px var(--b1m-cyan); }
.b1m-rc-dot.is-last { background: var(--b1m-pink); box-shadow: 0 0 10px var(--b1m-pink); animation: b1mPulse .5s ease infinite; }

/* ── Scrollbar ── */
.b1m-wrap *::-webkit-scrollbar { width: 4px; height: 4px; }
.b1m-wrap *::-webkit-scrollbar-track { background: transparent; }
.b1m-wrap *::-webkit-scrollbar-thumb { background: var(--b1m-border); border-radius: 2px; }

/* ========================================================
   DEMO 전용 — 숫자 구간별 볼 색상 (1-8 / 9-17 / 18-25)
   ======================================================== */
/* Range 1: 1-8 (Green) */
.b1m-demo .b1m-cell.open.b1m-range-1 {
    border-color: rgba(0,255,159,.65);
    background:
        radial-gradient(circle at 32% 28%, rgba(255,255,255,.22) 0%, rgba(255,255,255,.05) 14%, transparent 34%),
        radial-gradient(circle at 50% 50%, #0f4a3a 0%, #082820 55%, #041210 100%);
    box-shadow:
        inset 0 -6px 14px rgba(0,0,0,.55),
        inset 0 6px 14px rgba(0,255,159,.2),
        0 0 14px rgba(0,255,159,.3);
}
.b1m-demo .b1m-cell.open.b1m-range-1::after {
    background: radial-gradient(ellipse at 50% 0%, rgba(0,255,159,.14) 0%, transparent 65%);
}
.b1m-demo .b1m-cell.open.b1m-range-1 .b1m-ball-num {
    color: #c7ffe8;
    text-shadow: 0 0 14px var(--b1m-green), 0 0 28px rgba(0,255,159,.55);
}

/* Range 2: 9-17 (Yellow) */
.b1m-demo .b1m-cell.open.b1m-range-2 {
    border-color: rgba(255,230,0,.65);
    background:
        radial-gradient(circle at 32% 28%, rgba(255,255,255,.22) 0%, rgba(255,255,255,.05) 14%, transparent 34%),
        radial-gradient(circle at 50% 50%, #4a3a0f 0%, #282008 55%, #120e04 100%);
    box-shadow:
        inset 0 -6px 14px rgba(0,0,0,.55),
        inset 0 6px 14px rgba(255,230,0,.2),
        0 0 14px rgba(255,230,0,.28);
}
.b1m-demo .b1m-cell.open.b1m-range-2::after {
    background: radial-gradient(ellipse at 50% 0%, rgba(255,230,0,.14) 0%, transparent 65%);
}
.b1m-demo .b1m-cell.open.b1m-range-2 .b1m-ball-num {
    color: #fff8c7;
    text-shadow: 0 0 14px var(--b1m-yellow), 0 0 28px rgba(255,230,0,.5);
}

/* Range 3: 18-25 (Pink — 기본과 유사하나 조금 더 선명) */
.b1m-demo .b1m-cell.open.b1m-range-3 {
    border-color: rgba(255,0,204,.7);
    background:
        radial-gradient(circle at 32% 28%, rgba(255,255,255,.22) 0%, rgba(255,255,255,.05) 14%, transparent 34%),
        radial-gradient(circle at 50% 50%, #4a0f35 0%, #28081e 55%, #120410 100%);
    box-shadow:
        inset 0 -6px 14px rgba(0,0,0,.55),
        inset 0 6px 14px rgba(255,0,204,.22),
        0 0 14px rgba(255,0,204,.3);
}
.b1m-demo .b1m-cell.open.b1m-range-3::after {
    background: radial-gradient(ellipse at 50% 0%, rgba(255,0,204,.14) 0%, transparent 65%);
}
.b1m-demo .b1m-cell.open.b1m-range-3 .b1m-ball-num {
    color: #ffe8f5;
    text-shadow: 0 0 14px var(--b1m-pink), 0 0 28px rgba(255,0,204,.55);
}

/* 근접빙고/승리 셀은 기본 스타일 유지 (덮어쓰기 없음) */
