/* Baccarat simulator — realistic casino felt table */
@import url('casino-shoe-discard.css?v=20260703d');

.bac-game-container {
    max-width: 1360px;
    margin: 0 auto;
    padding: 12px;
    color: #f5f5f5;
}

/* ── Top bar ── */
.bac-topbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(180deg, #14241b, #0f1d15);
    border: 1px solid #2e5d44;
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 12px;
}
.bac-stat { display: flex; flex-direction: column; min-width: 70px; }
.bac-stat-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: .05em; opacity: .7; }
.bac-stat-value { font-size: 1.05rem; font-weight: 700; color: #ffd54a; }
.bac-variant-wrap { min-width: 130px; }
.bac-select {
    background: #0f261b; color: #f5f5f5; border: 1px solid #2e5d44;
    border-radius: 6px; padding: 4px 8px; font-size: .9rem;
}
.bac-select-sm { padding: 2px 6px; font-size: .82rem; }
.bac-settings-toggle {
    background: #c8941f; color: #1a1a1a; border: none; border-radius: 8px;
    width: 42px; height: 42px; font-size: 1.1rem; cursor: pointer; flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,.4); transition: background .15s, transform .15s;
}
.bac-settings-toggle:hover { background: #e0a82e; transform: rotate(20deg); }

/* ── Felt table — half-oval, flat dealer edge at the top ── */
.bac-table {
    background:
        linear-gradient(160deg, #6b3f22 0%, #4e2c15 35%, #3a1f0e 70%, #2c170a 100%);
    border-radius: 26px 26px 50% 50% / 26px 26px 290px 290px;
    padding: 16px 16px 24px;
    box-shadow:
        0 14px 34px rgba(0,0,0,.55),
        inset 0 2px 4px rgba(255,255,255,.18),
        inset 0 -8px 18px rgba(0,0,0,.5);
    margin-bottom: 14px;
}
.bac-table-felt {
    position: relative;
    border: 2px solid rgba(255,215,120,.4);
    border-radius: 18px 18px 50% 50% / 18px 18px 255px 255px;
    padding: 12px 4% 64px;
    background:
        radial-gradient(ellipse 130% 110% at 50% 0%, #38719f 0%, #2b5b88 40%, #1d456c 75%, #16385a 100%);
    box-shadow: inset 0 0 70px rgba(0,0,0,.4);
    display: flex;
    flex-direction: column;
}

/* ── Flat dealer edge: discard tray / stats / chip tray / min sign / shoe ── */
.bac-felt-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    min-height: 74px;
}

/* Bankroll / Bet readout */
.bac-table-stats {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding-top: 6px;
}
.bac-table-stats .bac-stat { min-width: 52px; text-align: center; }
.bac-table-stats .bac-stat-label { font-size: .62rem; }
.bac-table-stats .bac-stat-value { font-size: .88rem; }

/* Blackjack-style shoe + discard tray, scaled to fit the felt top rail */
.bac-table-felt .bac-table-discard,
.bac-table-felt .bac-table-shoe {
    width: 100px;
    height: 88px;
    overflow: visible;
}
.bac-table-felt .bac-table-discard {
    transform: scale(0.52);
    transform-origin: top left;
    margin: 0 0 -76px -4px;
}
.bac-table-felt .bac-table-shoe {
    transform: scale(0.52);
    transform-origin: top right;
    margin: 0 -4px -76px 0;
}

/* Table min/max placard */
.bac-chip-tray {
    display: flex;
    gap: 4px;
    align-items: center;
    padding: 7px 9px;
    background: linear-gradient(180deg, #1b1b1f, #0d0d10);
    border: 1px solid rgba(255,215,120,.3);
    border-radius: 8px;
    box-shadow: inset 0 3px 8px rgba(0,0,0,.7), 0 2px 6px rgba(0,0,0,.4);
    align-self: flex-start;
    margin-top: 2px;
}
.bac-tray-col {
    width: 26px; height: 30px;
    border-radius: 4px;
    background-image: repeating-linear-gradient(180deg, var(--tray-c, #d9534f) 0 3px, #f5f5f5 3px 4.5px);
    box-shadow: inset 0 0 4px rgba(0,0,0,.45);
}
.bac-tray-col:nth-child(1) { --tray-c: #3f74c9; }
.bac-tray-col:nth-child(2) { --tray-c: #d9534f; }
.bac-tray-col:nth-child(3) { --tray-c: #2f2f33; }
.bac-tray-col:nth-child(4) { --tray-c: #d9534f; }
.bac-tray-col:nth-child(5) { --tray-c: #5cb85c; }
.bac-tray-col:nth-child(6) { --tray-c: #5cb85c; }
.bac-tray-col:nth-child(7) { --tray-c: #e0a82e; }
.bac-tray-col:nth-child(8) { --tray-c: #e0a82e; }

/* Table min/max placard */
.bac-minmax-sign {
    background: #f5f5f0;
    color: #1a1a1a;
    border: 2px solid #333;
    border-radius: 4px;
    padding: 4px 10px;
    font-size: .72rem;
    font-weight: 700;
    line-height: 1.35;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 6px rgba(0,0,0,.45);
    flex-shrink: 0;
    margin-top: 4px;
}
.bac-minmax-row { white-space: nowrap; }

/* ── Card boxes: PLAYER | TIE PAYS | BANKER ── */
.bac-hands {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: clamp(14px, 3vw, 42px);
    padding: 4px 0 0;
    min-height: 150px;
}
.bac-hand { text-align: center; display: flex; flex-direction: column; }
.bac-hand .bac-cards {
    border: 2px solid rgba(255,255,255,.85);
    border-radius: 10px;
    background: rgba(255,255,255,.045);
    padding: 8px 10px;
    min-width: 218px;
    flex: 1 1 auto;
    box-shadow: inset 0 0 14px rgba(0,0,0,.18);
}
.bac-hand-header {
    font-family: Georgia, 'Times New Roman', serif;
    font-weight: 700;
    letter-spacing: .1em;
    margin-top: 7px;
    font-size: 1.08rem;
    color: #f5c84c;
    text-shadow: 0 1px 3px rgba(0,0,0,.6);
}
.bac-hand-score {
    display: inline-block; min-width: 24px; padding: 0 6px; margin-left: 4px;
    background: rgba(0,0,0,.4); border-radius: 6px;
    font-family: inherit;
    color: #fff;
}
.bac-tie-pays {
    align-self: center;
    font-family: Georgia, 'Times New Roman', serif;
    font-weight: 700;
    font-size: 1.02rem;
    letter-spacing: .12em;
    color: #f5c84c;
    text-align: center;
    line-height: 1.5;
    text-shadow: 0 1px 3px rgba(0,0,0,.6);
    padding-bottom: 20px;
}

.bac-cards {
    display: flex;
    gap: 6px;
    justify-content: center;
    min-height: 92px;
    align-items: center;
    flex-wrap: wrap;
    perspective: 700px;
}

/* Flip-capable card */
.bac-card { width: 62px; height: 88px; position: relative; }
.bac-card-inner {
    position: relative; width: 100%; height: 100%;
    transform-style: preserve-3d;
    transition: transform .55s cubic-bezier(.4,0,.2,1);
    transform: rotateY(180deg);
}
.bac-card-inner.flipped { transform: rotateY(0deg); }
.bac-card-face {
    position: absolute; width: 100%; height: 100%;
    backface-visibility: hidden; border-radius: 5px; overflow: hidden;
    box-shadow: 0 3px 8px rgba(0,0,0,.5);
}
.bac-card-front { transform: rotateY(0deg); }
.bac-card-back { transform: rotateY(180deg); }
.bac-card-face img { width: 100%; height: 100%; display: block; }
.bac-card-back {
    background: #7a1020;
    background-image: repeating-linear-gradient(45deg, transparent, transparent 5px, rgba(255,255,255,.12) 5px, rgba(255,255,255,.12) 10px);
    border: 1px solid #5a0c18;
}
@keyframes bacDealIn {
    from { opacity: 0; transform: translate(120px, -96px) rotate(10deg) scale(.82); }
    to   { opacity: 1; transform: translate(0,0) rotate(0) scale(1); }
}
.bac-card.bac-dealing { animation: bacDealIn .42s ease-out; }

/* 3rd card dealt sideways, like real casino baccarat */
.bac-card.bac-card-sideways {
    transform: rotate(90deg);
    margin-left: 13px;  /* (88 - 62) / 2 — compensates for width/height swap */
    margin-right: 13px;
}
@keyframes bacDealInSideways {
    from { opacity: 0; transform: rotate(90deg) translateX(-40px) scale(.92); }
    to   { opacity: 1; transform: rotate(90deg); }
}
.bac-card.bac-card-sideways.bac-dealing { animation-name: bacDealInSideways; }

/* ── Mobile card layout: 2 upright side-by-side, 3rd sideways below ── */
@media (max-width: 680px) {
    .bac-hand .bac-cards {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
        justify-items: center;
        align-items: center;
        column-gap: 6px;
        row-gap: 2px;
        min-height: 72px;
        padding: 6px 4px;
    }
    /* First two cards share the top row */
    .bac-hand .bac-cards .bac-card:not(.bac-card-sideways):nth-child(1) { grid-column: 1; grid-row: 1; }
    .bac-hand .bac-cards .bac-card:not(.bac-card-sideways):nth-child(2) { grid-column: 2; grid-row: 1; }
    /* 3rd card (sideways) centered on its own row below */
    .bac-hand .bac-cards .bac-card.bac-card-sideways {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-self: center;
        align-self: start;
        margin: 0;
        transform: rotate(90deg);
    }
    .bac-hand .bac-cards:has(.bac-card-sideways) {
        min-height: 108px;
        row-gap: 0;
        padding-bottom: 4px;
    }
    @keyframes bacDealInMobile {
        from { opacity: 0; transform: translate(70px, -80px) rotate(8deg) scale(.85); }
        to   { opacity: 1; transform: translate(0, 0) rotate(0) scale(1); }
    }
    @keyframes bacDealInSidewaysMobile {
        from { opacity: 0; transform: rotate(90deg) translateY(-28px) scale(.9); }
        to   { opacity: 1; transform: rotate(90deg); }
    }
    .bac-hand .bac-cards .bac-card.bac-dealing:not(.bac-card-sideways) {
        animation-name: bacDealInMobile;
    }
    .bac-hand .bac-cards .bac-card.bac-card-sideways.bac-dealing {
        animation-name: bacDealInSidewaysMobile;
    }
}

/* Result banner */
.bac-message {
    text-align: center; font-size: 1.02rem; font-weight: 700;
    margin: 14px auto 14px; min-height: 24px; color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,.6); max-width: 90%;
}

/* ── Shared bet-spot base ── */
.bac-bet-spot {
    position: relative;
    border: 2px solid rgba(255,255,255,.35);
    border-radius: 10px;
    padding: 14px 6px;
    text-align: center;
    cursor: pointer;
    transition: transform .08s, box-shadow .12s, border-color .12s, background .12s;
    user-select: none;
    background: rgba(0,0,0,.12);
}
.bac-bet-spot:hover { border-color: #ffd54a; transform: translateY(-2px); background: rgba(0,0,0,.22); }
.bac-bet-spot.has-bet { box-shadow: 0 0 0 2px #ffd54a inset; }
.bac-spot-label { display: block; font-weight: 800; letter-spacing: .04em; }
.bac-spot-odds  { display: block; font-size: .74rem; opacity: .8; margin-top: 3px; }
.bac-spot-disabled { opacity: .3; pointer-events: none; }
.bac-spot-locked { pointer-events: none; }

/* ── Felt betting layout: side-bet ovals + TIE/BANKER/PLAYER arc bands ── */
.bac-betting-layout {
    margin: 4px auto 0;
    width: 100%;
}

/* Side bet ovals: 7 spots in a gentle arc above the TIE band */
.bac-side-strip {
    display: flex;
    justify-content: center;
    gap: clamp(4px, 1vw, 14px);
    margin-bottom: 10px;
}
.bac-bet-spot.bac-strip-sb {
    border: 2px solid rgba(255,255,255,.75);
    border-radius: 50%;
    width: clamp(58px, 7.4vw, 84px);
    height: clamp(44px, 5.4vw, 60px);
    padding: 2px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.14);
    flex-shrink: 0;
}
/* Fake the table curve: outer spots sit higher than center ones */
.bac-bet-spot.bac-strip-sb:nth-child(1), .bac-bet-spot.bac-strip-sb:nth-child(7) { transform: translateY(0); }
.bac-bet-spot.bac-strip-sb:nth-child(2), .bac-bet-spot.bac-strip-sb:nth-child(6) { transform: translateY(7px); }
.bac-bet-spot.bac-strip-sb:nth-child(3), .bac-bet-spot.bac-strip-sb:nth-child(5) { transform: translateY(12px); }
.bac-bet-spot.bac-strip-sb:nth-child(4) { transform: translateY(14px); }
.bac-bet-spot.bac-strip-sb:hover { background: rgba(255,255,255,.1); border-color: #ffd54a; }
.bac-bet-spot.bac-strip-sb:nth-child(1):hover, .bac-bet-spot.bac-strip-sb:nth-child(7):hover { transform: translateY(0); }
.bac-bet-spot.bac-strip-sb:nth-child(2):hover, .bac-bet-spot.bac-strip-sb:nth-child(6):hover { transform: translateY(7px); }
.bac-bet-spot.bac-strip-sb:nth-child(3):hover, .bac-bet-spot.bac-strip-sb:nth-child(5):hover { transform: translateY(12px); }
.bac-bet-spot.bac-strip-sb:nth-child(4):hover { transform: translateY(14px); }
.bac-strip-sb .bac-spot-label { font-size: .62rem; }
.bac-strip-sb .bac-spot-odds  { font-size: .54rem; margin-top: 1px; }
.bac-strip-sb .bac-bet-amount { width: 26px; height: 26px; font-size: .54rem; bottom: -4px; right: -4px; top: auto; }

/* Main bands: TIE → BANKER → PLAYER stacked, widening toward the player */
.bac-main-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 9px;
    margin-top: 16px;
}

/* Stadium band with white outline (arc-style, like the printed felt) */
.bac-bet-spot.bac-col-section {
    border: 2.5px solid rgba(255,255,255,.85);
    border-radius: 999px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.1);
    cursor: pointer;
    transition: filter .1s, background .12s, border-color .12s;
    padding: 5px 20px;
}
.bac-bet-spot.bac-col-section:hover { transform: none; background: rgba(255,255,255,.09); filter: brightness(1.1); border-color: #ffd54a; }
.bac-spot-text { display: flex; flex-direction: column; align-items: center; }
.bac-col-section .bac-spot-odds { display: block; margin-top: 1px; opacity: .88; }

/* TIE — narrowest, top */
.bac-bet-spot.bac-col-tie {
    width: min(44%, 420px);
    min-height: 46px;
}
.bac-col-tie .bac-spot-label { color: #f5f5f5; font-size: 1.05rem; font-weight: 800; letter-spacing: .14em; }
.bac-col-tie .bac-spot-odds  { color: rgba(245,245,245,.78); font-size: .72rem; }

/* BANKER — middle, gold text */
.bac-bet-spot.bac-col-banker {
    width: min(56%, 540px);
    min-height: 54px;
}
.bac-col-banker .bac-spot-label { color: #ffd54a; font-size: 1.35rem; font-weight: 900; letter-spacing: .16em; }
.bac-col-banker .bac-spot-odds  { color: rgba(255,213,74,.85); font-size: .74rem; }

/* PLAYER — widest, bottom */
.bac-bet-spot.bac-col-player {
    width: min(68%, 640px);
    min-height: 58px;
}
.bac-col-player .bac-spot-label { color: #fff; font-size: 1.5rem; font-weight: 900; letter-spacing: .18em; }
.bac-col-player .bac-spot-odds  { color: rgba(255,255,255,.82); font-size: .74rem; }

/* Chip placed on a spot — color set dynamically by JS based on denomination */
.bac-bet-amount {
    position: absolute; top: 4px; right: 4px;
    width: 34px; height: 34px; border-radius: 50%;
    background: #fff;
    border: 3px solid #888;
    color: #888; font-weight: 800; font-size: .66rem;
    display: none; align-items: center; justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,.5);
}
/* On the main bands, center the chip vertically next to the right arrow */
.bac-col-section .bac-bet-amount {
    top: 50%; margin-top: -17px; right: 42px;
}
@keyframes bacChipPop { 0% { transform: scale(0); } 70% { transform: scale(1.18); } 100% { transform: scale(1); } }
.bac-bet-amount.bac-chip-bump { animation: bacChipPop .25s ease-out; }
@keyframes bacWinPulse { 0%,100% { box-shadow: 0 0 0 2px #ffd54a inset; } 50% { box-shadow: 0 0 22px 6px #ffd54a; } }
.bac-win-pulse { animation: bacWinPulse 1.1s ease-in-out; }

/* EZ-Baccarat note shown on the Dragon 7 strip spot (below the oval) */
.bac-ez-note {
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: .5rem;
    color: rgba(255,213,74,.85);
    letter-spacing: .02em;
    text-shadow: 0 1px 2px rgba(0,0,0,.7);
}

/* Chip flying from rack to a bet spot — color set dynamically by JS */
.bac-flying-chip {
    position: fixed; z-index: 9998; width: 34px; height: 34px; border-radius: 50%;
    background: #fff;
    border: 3px solid #888; color: #888; font-weight: 800; font-size: .62rem;
    display: flex; align-items: center; justify-content: center; pointer-events: none;
    box-shadow: 0 3px 8px rgba(0,0,0,.5);
    transition: transform .4s cubic-bezier(.25,.46,.45,.94), opacity .4s ease;
}

/* Chip rack */
.bac-chip-selector { display: flex; gap: 10px; justify-content: center; margin-bottom: 12px; flex-wrap: wrap; }
.bac-chip-select {
    width: 54px; height: 54px; border-radius: 50%; border: 3px dashed rgba(255,255,255,.55);
    font-weight: 800; cursor: pointer; box-shadow: 0 3px 7px rgba(0,0,0,.45);
    position: relative; transition: transform .12s;
}
.bac-chip-select::before {
    content: ''; position: absolute; inset: 5px; border-radius: 50%;
    border: 2px solid rgba(255,255,255,.35);
}
.bac-chip-select.selected { border-style: solid; border-color: #ffd54a; transform: translateY(-4px) scale(1.08); }

/* Controls */
.bac-controls { display: flex; gap: 10px; justify-content: center; margin-bottom: 14px; flex-wrap: wrap; }
.bac-btn {
    background: #2e5d44; color: #fff; border: 1px solid #3a7a59;
    border-radius: 8px; padding: 10px 24px; font-weight: 700; cursor: pointer; transition: background .12s;
}
.bac-btn:hover { background: #3a7a59; }
.bac-btn:disabled { opacity: .5; cursor: not-allowed; }
.bac-btn-primary { background: #c8941f; border-color: #e0a82e; color: #1a1a1a; }
.bac-btn-primary:hover { background: #e0a82e; }
.bac-btn-sm { padding: 6px 12px; font-size: .85rem; }

/* Shoe / count */
.bac-shoe-info { display: flex; gap: 16px; justify-content: center; align-items: center; flex-wrap: wrap; font-size: .86rem; margin-bottom: 18px; }
.bac-count-display { display: flex; gap: 8px; align-items: center; }
.bac-count-off { opacity: .6; }
.bac-count-label { font-weight: 600; }
.bac-count-rc, .bac-count-tc { background: rgba(0,0,0,.3); padding: 2px 8px; border-radius: 6px; }
.bac-count-hot { background: #c8941f; color: #1a1a1a; font-weight: 700; }
.bac-count-signal { background: #2f9e5c; color: #fff; padding: 2px 8px; border-radius: 6px; font-weight: 700; }

/* Sections */
.bac-section-title { font-size: 1.05rem; color: #ffd54a; border-bottom: 1px solid #2e5d44; padding-bottom: 6px; margin: 4px 0 12px; }

/* Roads */
.bac-roads-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.bac-derived-grid { grid-template-columns: 1fr 1fr 1fr; }
.bac-road-block { background: #fff; border: 1px solid #d8d8d8; border-radius: 8px; padding: 6px; overflow-x: auto; }
.bac-road-name { font-size: .72rem; font-weight: 700; color: #333; margin-bottom: 4px; }
.bac-road { display: grid; grid-auto-flow: column; gap: 1px; grid-template-rows: repeat(6, 18px); min-height: 108px; }
.bac-road-cell { width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; font-size: .62rem; font-weight: 700; border: 1px solid #eee; box-sizing: border-box; position: relative; }

/* Roads in dark mode — match the dark felt/drawer instead of bright white cards */
body.dark-mode .bac-road-block {
    background: #15281d;
    border: 1px solid #2e5d44;
    box-shadow: inset 0 0 18px rgba(0,0,0,.35);
}
body.dark-mode .bac-road-name { color: #ffd54a; }
body.dark-mode .bac-road-cell { border-color: rgba(255,255,255,.08); }
body.dark-mode .bigroad-P, body.dark-mode .bigroad-B, body.dark-mode .bigroad-T,
body.dark-mode .derived-red, body.dark-mode .derived-blue { background: transparent; }
.bead-P { background: #2f6fb0; color: #fff; border-radius: 50%; }
.bead-B { background: #b04545; color: #fff; border-radius: 50%; }
.bead-T { background: #3a9d6a; color: #fff; border-radius: 50%; }
.bigroad-P { border: 2px solid #2f6fb0; border-radius: 50%; background: #fff; }
.bigroad-B { border: 2px solid #b04545; border-radius: 50%; background: #fff; }
.bigroad-T { border: 2px solid #3a9d6a; border-radius: 50%; background: #fff; }
.bac-tie-slash { position: absolute; width: 130%; height: 2px; background: #3a9d6a; transform: rotate(-45deg); }
.derived-red { border: 2px solid #b04545; border-radius: 50%; background: #fff; }
.derived-blue { border: 2px solid #2f6fb0; border-radius: 50%; background: #fff; }

/* ── Settings drawer ── */
.bac-settings-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.55);
    opacity: 0; visibility: hidden; transition: opacity .25s; z-index: 1040;
}
.bac-settings-overlay.open { opacity: 1; visibility: visible; }
.bac-settings-drawer {
    position: fixed; top: 0; right: 0; height: 100%; width: 420px; max-width: 92vw;
    background: #11201a; border-left: 2px solid #2e5d44;
    transform: translateX(100%); transition: transform .3s cubic-bezier(.4,0,.2,1);
    z-index: 1041; display: flex; flex-direction: column;
    box-shadow: -8px 0 24px rgba(0,0,0,.5);
}
.bac-settings-drawer.open { transform: translateX(0); }
.bac-drawer-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px; border-bottom: 1px solid #2e5d44; background: #0f1d15;
}
.bac-drawer-header h2 { margin: 0; font-size: 1.1rem; color: #ffd54a; }
.bac-drawer-close { background: none; border: none; color: #f5f5f5; font-size: 1.6rem; line-height: 1; cursor: pointer; }
.bac-drawer-body { padding: 16px; overflow-y: auto; flex: 1; }
.bac-drawer-section { margin-bottom: 24px; }
.bac-drawer-hint { font-size: .8rem; opacity: .75; margin-bottom: 8px; }

/* EV list */
.ev-category-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.ev-category-item { display: flex; justify-content: space-between; align-items: center; background: #1b3a2b; border: 1px solid #2e5d44; border-radius: 6px; padding: 6px 10px; }
.ev-category-name { font-weight: 700; }
.ev-category-values { display: flex; gap: 14px; font-size: .82rem; flex-wrap: wrap; }
.ev-value { color: #ffd54a; font-weight: 700; }
.bac-ev-totals { display: flex; flex-direction: column; gap: 4px; }
.bac-ev-total-row { font-weight: 600; }

/* Trainers */
.bac-honest-note { background: #2a2a1a; border-left: 3px solid #c8941f; padding: 8px 12px; font-size: .82rem; border-radius: 4px; margin-bottom: 14px; }
.bac-trainer-card, .bac-sim-card { background: #1b3a2b; border: 1px solid #2e5d44; border-radius: 10px; padding: 12px; margin-bottom: 12px; }
.bac-trainer-card h4, .bac-sim-card h4 { font-size: .95rem; color: #ffd54a; margin: 0 0 8px; }
.bac-trainer-q { min-height: 48px; font-size: .9rem; margin-bottom: 8px; }
.bac-trainer-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 6px; }
.bac-trainer-score { font-size: .82rem; opacity: .85; margin-top: 4px; }
.bac-quiz-feedback { min-height: 20px; font-size: .85rem; font-weight: 600; }
.bac-correct { color: #6fe09a; }
.bac-wrong { color: #ff8a8a; }
.bac-input { background: #0f261b; color: #f5f5f5; border: 1px solid #2e5d44; border-radius: 6px; padding: 4px 8px; width: 110px; font-size: .85rem; }
.bac-drill-card { display: flex; justify-content: center; min-height: 84px; align-items: center; margin: 6px 0; }
.bac-static-card { width: 58px; height: auto; border-radius: 5px; box-shadow: 0 2px 6px rgba(0,0,0,.5); }
.bac-drill-card img { width: 58px; border-radius: 4px; }
.bac-sim-controls { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; font-size: .85rem; }
.bac-sim-controls label { display: flex; gap: 4px; align-items: center; }
.bac-sim-status { font-size: .85rem; opacity: .85; min-height: 18px; margin-bottom: 6px; }
.bac-sim-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.bac-sim-table td { padding: 4px 8px; border-bottom: 1px solid #2e5d44; }
.bac-sim-table td:last-child { text-align: right; color: #ffd54a; font-weight: 700; }
.bac-sim-divider td { border-top: 2px solid #3a7a59; }
.bac-sim-note { font-size: .8rem; opacity: .8; margin-top: 8px; }

/* ── Bet-spot tooltips ── */
.bac-bet-tooltip {
    position: fixed;
    background: rgba(8, 22, 14, 0.97);
    color: #f5f5f5;
    border: 2px solid #ffd54a;
    border-radius: 10px;
    padding: 12px 14px;
    min-width: 190px;
    max-width: 250px;
    font-size: 11px;
    z-index: 3000;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity .25s, transform .25s;
    box-shadow: 0 6px 20px rgba(0,0,0,.7);
}
.bac-bet-tooltip.show { opacity: 1; transform: translateY(0); }
.bac-bet-tooltip h6 {
    color: #ffd54a; font-size: 12px; font-weight: 800;
    margin: 0 0 8px; text-align: center; text-transform: uppercase;
    letter-spacing: .06em; border-bottom: 1px solid rgba(255,213,74,.3); padding-bottom: 6px;
}
.bac-bet-tooltip table { width: 100%; border-collapse: collapse; }
.bac-bet-tooltip thead th {
    color: rgba(255,213,74,.75); font-size: 9.5px; font-weight: 700;
    padding: 2px 5px; text-transform: uppercase; letter-spacing: .04em;
    border-bottom: 1px solid rgba(255,255,255,.12);
}
.bac-bet-tooltip tbody td {
    font-size: 10.5px; padding: 3px 5px;
    border-bottom: 1px solid rgba(255,255,255,.06);
    vertical-align: middle;
}
.bac-bet-tooltip tbody td:last-child {
    text-align: right; color: #ffd54a; font-weight: 700; white-space: nowrap;
}
.bac-bet-tooltip .bac-tt-note {
    font-size: 9.5px; color: rgba(255,255,255,.55); margin-top: 8px;
    border-top: 1px solid rgba(255,255,255,.1); padding-top: 6px; font-style: italic;
    line-height: 1.4;
}

/* ── Pro Gate ── */
.bac-pro-gate {
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    padding: 24px 16px; text-align: center;
    background: rgba(255,213,74,.05); border: 1px dashed rgba(255,213,74,.35);
    border-radius: 8px; margin: 8px 0;
}
.bac-pro-gate-icon { font-size: 2rem; line-height: 1; }
.bac-pro-gate-msg { color: #cfe3ff; font-size: .9rem; margin: 0; }
.bac-pro-gate-msg strong { color: #ffd54a; }
.bac-drawer-section[data-pro-feature] { position: relative; }
.bac-pro-gate-overlay {
    position: relative; z-index: 2;
}
.bac-pro-locked-body {
    max-height: 0; overflow: hidden; opacity: 0; pointer-events: none;
}

/* ── Responsive ── */
@media (max-width: 680px) {
    /* Remove side padding so the oval table fills the screen width */
    .bac-game-container { padding: 12px 0; }
    .bac-table { padding: 10px 8px 16px; border-radius: 18px 18px 50% 50% / 18px 18px 95px 95px; }
    .bac-table-felt { padding: 8px 2% 46px; border-radius: 12px 12px 50% 50% / 12px 12px 82px 82px; overflow: hidden; }

    /* Flat dealer edge: compact grid so shoe/discard don't crush the center */
    .bac-felt-top {
        display: grid;
        grid-template-columns: 52px 1fr 52px;
        grid-template-rows: auto auto;
        gap: 2px 6px;
        align-items: start;
        min-height: 0;
        margin-bottom: 4px;
    }
    .bac-table-discard { grid-column: 1; grid-row: 1 / span 2; align-self: start; }
    .bac-table-shoe { grid-column: 3; grid-row: 1 / span 2; align-self: start; justify-self: end; }
    .bac-table-stats {
        grid-column: 2; grid-row: 1;
        justify-content: center;
        gap: 12px;
        padding-top: 0;
    }
    .bac-minmax-sign {
        grid-column: 2; grid-row: 2;
        justify-self: center;
        margin-top: 0;
        font-size: .58rem;
        padding: 2px 6px;
    }
    .bac-chip-tray { display: none; }
    .bac-table-felt .bac-table-discard,
    .bac-table-felt .bac-table-shoe {
        width: 100px;
        height: 72px;
    }
    .bac-table-felt .bac-table-discard {
        transform: scale(0.44);
        transform-origin: top left;
        margin: 0 0 -80px -2px;
    }
    .bac-table-felt .bac-table-shoe {
        transform: scale(0.44);
        transform-origin: top right;
        margin: 0 -2px -80px 0;
    }
    .bac-table-stats .bac-stat { min-width: 0; }
    .bac-table-stats .bac-stat-label { font-size: .56rem; }
    .bac-table-stats .bac-stat-value { font-size: .76rem; }

    /* Card boxes — grid layout for 2+1 card stacking (see mobile block above) */
    .bac-hands { gap: 8px; min-height: 100px; }
    .bac-hand .bac-cards { min-width: 0; }
    .bac-hand { flex: 1 1 0; max-width: 46%; }
    .bac-hand-header { font-size: .84rem; margin-top: 4px; }
    .bac-tie-pays { font-size: .58rem; letter-spacing: .06em; padding-bottom: 10px; line-height: 1.35; }
    .bac-card { width: 48px; height: 68px; }
    .bac-message { font-size: .92rem; margin: 8px auto; }

    .bac-roads-grid, .bac-derived-grid { grid-template-columns: 1fr; }
    .bac-chip-select { width: 46px; height: 46px; font-size: .8rem; }

    /* Side-bet ovals: two wrapped rows, no overlap or edge clipping */
    .bac-side-strip {
        flex-wrap: wrap;
        justify-content: center;
        align-content: center;
        gap: 7px 10px;
        padding: 0 10px;
        margin-bottom: 8px;
    }
    .bac-bet-spot.bac-strip-sb {
        width: calc((100% - 30px) / 4);
        max-width: 68px;
        min-width: 54px;
        height: 38px;
        border-width: 1.5px;
        flex-shrink: 0;
    }
    .bac-bet-spot.bac-strip-sb:nth-child(n) { transform: none !important; }
    .bac-strip-sb .bac-spot-label { font-size: .48rem; line-height: 1.1; }
    .bac-strip-sb .bac-spot-odds  { font-size: .42rem; margin-top: 0; }

    /* Main bands: shorter so table+chips+buttons fit without scroll */
    .bac-main-column { gap: 6px; margin-top: 8px; }
    .bac-bet-spot.bac-col-section { padding: 3px 10px; border-width: 2px; }
    .bac-bet-spot.bac-col-tie    { min-height: 34px; width: 58%; }
    .bac-col-tie .bac-spot-label { font-size: .85rem; }
    .bac-col-tie .bac-spot-odds { font-size: .6rem; }
    .bac-bet-spot.bac-col-banker { min-height: 42px; width: 71%; }
    .bac-col-banker .bac-spot-label { font-size: 1.05rem; }
    .bac-col-banker .bac-spot-odds { font-size: .62rem; }
    .bac-bet-spot.bac-col-player { min-height: 46px; width: 84%; }
    .bac-col-player .bac-spot-label { font-size: 1.2rem; }
    .bac-col-player .bac-spot-odds { font-size: .62rem; }
    .bac-col-section .bac-bet-amount { right: 26px; width: 28px; height: 28px; margin-top: -14px; font-size: .56rem; }
    .bac-ez-note { bottom: -13px; font-size: .44rem; }
}
