/* Table UI: browser text above the animated card surface. */
.bj-play-body { background: #0b201e; font-family: 'Segoe UI', Arial, sans-serif; }
/* Challenge progress, notices, and recaps can exceed one viewport. Grow the page
   instead of clipping the action row inside the old fixed-height wrapper. */
.bj-fullscreen-page { background: #0b201e; padding: 10px; gap: 8px; height: auto; min-height: 100vh; min-height: 100dvh; overflow: visible; font-family: 'Segoe UI', Arial, sans-serif; }
.bj-play-topbar { background: #102b28; border: 1px solid #2e4941; border-radius: 12px; box-shadow: none; min-height: 52px; }
.bj-play-brand strong { color: #f7ecd2; font-size: 19px; font-weight: 700; }
.bj-play-brand small { display: inline-block; margin-left: 9px; font-size: 10px; letter-spacing: .15em; color: #92b6a6; }
.bj-play-brand .bj-brand-mark { color: #d9bc77; transform: none; }
.bj-play-nav button, .bj-play-nav button:nth-child(n), .bj-play-nav a { background: transparent; border-color: transparent; box-shadow: none; color: #d4e3d9 !important; font-weight: 600; }
.bj-play-nav button:hover, .bj-play-nav a:hover { background: #25483e; transform: none; }
.bj-fullscreen-table { background: #102b28; border: 1px solid #2e4941; padding: 8px; box-shadow: none; border-radius: 14px; flex: 1 0 auto; }
.bj-meta-strip { background: transparent; padding: 0 4px 8px; grid-template-columns: minmax(180px,.85fr) minmax(110px,.6fr) minmax(120px,.6fr) minmax(290px,1.4fr); flex: 0 0 auto; }
.bj-progress-pill,.bj-rank-pill,.bj-grant-countdown { border: 0; background: transparent; padding: 6px 8px; }
.bj-progress-pill { font: inherit; font-size: 12px; }
.bj-rank-pill span,.bj-grant-countdown span { color: #a4bdb0; font-size: 10px; }
.bj-mode-buttons { border-color: #36544a; background: #0a211d; grid-template-columns: repeat(3,minmax(0,1fr)); }
.bj-mode-buttons button { font: inherit; font-size: 12px; font-weight: 600; }
.bj-mode-buttons button.is-selected { background: #ead397; color: #172c24; box-shadow: none; }
.bj-mode-buttons:has(button[hidden]) { grid-template-columns: repeat(2,minmax(0,1fr)); }
.bj-table-objectives { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 0 13px 8px; color: #adc9b9; font-size: 12px; flex: 0 0 auto; }
#blackjack-active-mission { border: 0; background: none; padding: 4px 0; color: #d9e5d9; font: inherit; text-align: left; cursor: pointer; }
#blackjack-active-mission:hover { color: #f2d996; }
#blackjack-nearby-target { text-align: right; }
.bj-fullscreen-table .bj-game-canvas { position: relative; height: 530px; min-height: 530px; flex: 1 0 530px; overflow: hidden; border: 0; border-radius: 12px; box-shadow: none; }
.bj-table-ui { position: absolute; inset: 0; pointer-events: none; z-index: 2; font-family: 'Segoe UI', Arial, sans-serif; }
/* Override canvas gesture suppression without disabling native button taps. */
#blackjack-game, #blackjack-game canvas, #blackjack-game .bj-table-ui,
#blackjack-game .bj-table-action { touch-action: pan-y pinch-zoom !important; }
.bj-table-element { position: absolute; box-sizing: border-box; line-height: 1.25; white-space: nowrap; }
.bj-table-element[hidden], .bj-play-announcement[hidden] { display: none !important; }
.bj-table-status-panel { background: none; border: 0; }
.bj-table-status { font-size: 16px !important; font-weight: 600 !important; text-align: center !important; line-height: 1.35; }
.bj-table-balance-context { letter-spacing: .09em; font-size: 9px !important; color: #bbd4c4 !important; }
.bj-table-balance { font-size: 20px !important; color: #f9e4a9 !important; font-variant-numeric: tabular-nums; }
.bj-table-timer { padding: 8px 12px; min-width: 78px; text-align: center !important; background: rgba(5,32,27,.65); border: 1px solid #62806b; border-radius: 22px; font-size: 14px !important; }
.bj-hand-total { padding: 4px 10px; background: #113e33; color: #fff5d8 !important; border: 1px solid #71967b; border-radius: 20px; font-size: 16px !important; }
.bj-hand-total:empty { display: none; }
.bj-table-action { pointer-events: auto; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 8px; border: 1px solid #537969; border-radius: 12px; background: #173e32; color: #f0eedb; cursor: pointer; font: 600 15px 'Segoe UI',Arial,sans-serif; box-shadow: 0 3px 0 #092c22; transition: background .15s, box-shadow .15s; }
.bj-table-action kbd { font: 11px 'Segoe UI',Arial,sans-serif; padding: 3px 5px; border: 1px solid currentColor; border-radius: 4px; opacity: .6; }
.bj-action-hit,.bj-action-stand,.bj-action-start { font-size: 18px; border-color: transparent; }
.bj-action-hit,.bj-action-start { background: #f0d58d; color: #20392d; box-shadow: 0 4px 0 #9f8348; }
.bj-action-stand { background: #d4eee0; color: #20392d; box-shadow: 0 4px 0 #719783; }
.bj-action-surrender { background: transparent; border-color: transparent; box-shadow: none; color: #ced5cc; font-size: 13px; }
.bj-table-action:hover:not(:disabled) { filter: brightness(1.1); }
.bj-table-action:active:not(:disabled) { box-shadow: none; }
.bj-table-action:disabled { cursor: default; opacity: .4; }
.bj-play-body button:focus-visible,.bj-play-body a:focus-visible { outline: 3px solid #fff0ba; outline-offset: 3px; }
.bj-fullscreen-table .bj-keyboard-hint { display: none; }
.bj-turtle-portrait { width: 92px; height: 69px; }
.bj-turtle-portrait svg { display: block; width: 100%; height: 100%; overflow: visible; }
.bj-turtle-gasp,.bj-turtle-card { display: none; }
[data-pose=dealing] .bj-turtle-card,[data-pose=surprised] .bj-turtle-gasp { display: initial; }
[data-pose=surprised] .bj-turtle-smile { display: none; }
[data-pose=pleased] .bj-turtle-eyes { transform: scaleY(.5); transform-origin: 19px 48px; }
.bj-turtle-bubble { padding: 8px 12px; background: #fff4d9; border-radius: 13px; color: #284538 !important; font-size: 12px !important; text-align: center !important; box-shadow: 0 3px 9px #062c2533; }
.bj-turtle-bubble::after { content: ''; position: absolute; right: -9px; top: 50%; border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-left: 10px solid #fff4d9; transform: translateY(-50%); }
.bj-result-modal-card { border: 1px solid #ded9c8; border-radius: 20px; background: #fffcf3; box-shadow: 0 24px 80px #061b2955; }
.bj-result-icon { border: 0; box-shadow: none; border-radius: 16px; }
.bj-result-message { border: 0; border-radius: 12px; font-size: 19px; font-weight: 600; line-height: 1.5; }
.bj-result-personal { padding: 10px 14px; border-radius: 10px; color: #176447; background: #e6f4e9; font-weight: 700; }
.bj-result-personal[hidden] { display: none; }
.bj-result-section { background: transparent; border: 0; border-top: 1px solid #e2e5da; box-shadow: none; border-radius: 0; }
.bj-play-again { background: #196c51; color: #fff; border: 0; box-shadow: 0 3px 0 #104734; border-radius: 12px; }
.bj-share-results { background: transparent; border: 1px solid #b9ccc0; box-shadow: none; border-radius: 12px; }
.bj-cosmetic-list > span { display: inline-flex; align-items: center; gap: 8px; }
.bj-cosmetic-swatch { display: inline-block; width: 25px; height: 31px; border-radius: 5px; background: #216458; border: 2px solid #d4bc7c; }
.bj-cosmetic-swatch.is-card { background: repeating-linear-gradient(45deg,#173d5a 0 3px,#d4bc7c 3px 5px); }
.bj-cosmetic-swatch.is-chip { height: 25px; border-radius: 50%; background: #d4ad54; border: 3px dashed #fff5d8; box-shadow: 0 0 0 1px #826739; }
@media(max-width: 950px) {
 body.bj-play-body { overflow: auto; }
 .bj-fullscreen-page { height: auto; min-height: 100dvh; overflow: visible; }
 .bj-meta-strip { grid-template-columns: 1fr 1fr 1fr; }
 .bj-mode-buttons { grid-column: 1/-1; }
 .bj-fullscreen-table .bj-game-canvas { height: 600px; flex: 0 0 600px; }
 .bj-play-topbar { flex-wrap: wrap; }
}
@media(max-width: 799px) { .bj-turtle-portrait { width: 76px; height: 57px; } }
@media(max-width: 599px) {
 .bj-fullscreen-page { padding: 5px; gap: 5px; }
 .bj-play-topbar { padding: 7px 9px; }
 .bj-play-brand small { display: none; }
 .bj-play-nav { width: 100%; gap: 0; justify-content: space-between; }
 .bj-play-nav button,.bj-play-nav a { font-size: 11px; min-height: 36px; padding: 5px; }
 .bj-fullscreen-table { padding: 3px; }
 .bj-meta-strip { grid-template-columns: 1fr 1fr; }
 .bj-progress-pill { display: flex; grid-column: auto; flex-wrap: wrap; gap: 4px 8px; }
 .bj-progress-pill .bj-xp-track { flex-basis: 100%; order: 3; }
 .bj-rank-pill { grid-column: auto; }
 .bj-play-brand strong { display: block; }
 .bj-play-nav button,.bj-play-nav a { white-space: nowrap; }
 .bj-grant-countdown { grid-column: 1/-1; padding: 3px; flex-direction: row; gap: 8px; }
 .bj-grant-countdown.is-unneeded { display: none; }
 .bj-table-objectives { flex-direction: column; align-items: flex-start; gap: 0; padding: 2px 8px 7px; }
 #blackjack-nearby-target { font-size: 11px; }
 .bj-fullscreen-table .bj-game-canvas { height: 610px; min-height: 610px; flex-basis: 610px; }
 .bj-table-balance { font-size: 16px !important; }
 .bj-table-balance-context { font-size: 8px !important; }
 .bj-table-timer { min-width: 60px; font-size: 12px !important; padding: 7px 8px; }
 .bj-table-action kbd { display: none; }
 .bj-table-status { font-size: 14px !important; }
 .bj-hand-total { font-size: 13px !important; max-width: 46%; white-space: normal; text-align: center !important; }
 .bj-result-modal-card { padding: 20px 14px; }
}
@media(prefers-reduced-motion: reduce) { .bj-table-action { transition: none; } }
.bj-challenge-reward {
    margin: 0 0 12px;
    padding: 12px 16px;
    border: 1px solid #b4d6a0;
    border-radius: 12px;
    background: #edf8df;
    color: #21532c;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.5;
}
