/* Blackjack owns its layout: a quiet control rail and a shared casino table. */
.table--blackjack { height: auto; min-height: 100dvh; overflow: visible; background: #0f1923; }
.bj-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 0; padding: 20px; max-width: 1680px; width: 100%; margin: 0 auto; align-items: start; }
.bj-controls { background: #213240; border: 1px solid #ffffff08; border-radius: 14px 0 0 14px; padding: 22px 18px; display: flex; flex-direction: column; gap: 24px; min-height: 640px; }
.bj-controls__heading { display: flex; flex-direction: column; gap: 8px; }
.bj-controls__heading .eyebrow { font-size: .58rem; color: #9bafbf; letter-spacing: .15em; }
.bj-controls__heading h2 { font-size: 1.65rem; letter-spacing: -.04em; }
.bj-controls__status { padding: 10px 12px; color: #c5d6e3; background: #142532; border-radius: 7px; font-size: .78rem; border-left: 3px solid #7cc9ac; }
.bj-controls .turn-hint { line-height: 1.7; font-size: .85rem; text-align: left; padding-bottom: 10px; }
.bj-controls .actions { display: grid; grid-template-columns: 1fr; }
.bj-controls .actions .btn { max-width: none; width: 100%; border-radius: 7px; font-size: .93rem; }
.bj-controls .btn--primary { background: #00e777; color: #062b18; box-shadow: 0 4px 0 #00a957; }
.bj-controls .btn--primary:hover:not(:disabled) { background: #28f990; }
.bj-controls .btn--ghost { background: #314b5e; border-color: transparent; }
.bj-controls .chips { gap: 7px; }
.bj-controls .chip-btn { min-width: 35px; min-height: 35px; border-width: 2px; font-size: .66rem; padding: 0 4px; }
.bj-controls .bet-row { width: 100%; border-radius: 7px; background: #10212f; padding: 7px; }
.bj-controls .bet-amount { min-width: 0; flex: 1; }
.bj-controls .answers { grid-template-columns: 1fr; }
.bj-controls .answer-btn { min-height: 48px; font-size: .85rem; }
.bj-controls__note { margin-top: auto; padding-top: 20px; border-top: 1px solid #ffffff0c; color: #8ca4b5; font-size: .73rem; display: flex; gap: 8px; align-items: center; }
.bj-waiting { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; padding: 25px 0; color: #b3cbd9; }
.bj-board-wrap { min-width: 0; }
.table--blackjack .bj-felt { min-height: 640px; overflow: hidden; padding: 28px 22px 24px; gap: 0; border-radius: 0 14px 14px 0; border: 1px solid #ffffff09; background: radial-gradient(ellipse at 50% 30%, #21494b 0%, #17363e 48%, #122c36 100%); box-shadow: inset 0 -20px 50px #051b2444; }
.table--blackjack .bj-felt::before { background: repeating-linear-gradient(110deg, #ffffff02 0 1px, transparent 1px 4px); }
.table--blackjack .bj-felt::after { top: 90px; left: 4%; right: 4%; height: 260px; border: 1px solid #b6ddbd26; border-top: 0; border-radius: 0 0 50% 50%; }
.table--blackjack .dealer { border: 0; background: transparent; backdrop-filter: none; min-height: 155px; gap: 16px; padding: 0; }
.table--blackjack .dealer__label { color: #bdcfd3; font-size: .7rem; letter-spacing: .16em; }
.table--blackjack .dealer__cards { gap: 0; min-height: 110px; justify-content: center; flex-wrap: wrap; padding: 0 12px; }
.table--blackjack .dealer__cards .fcard { --card-w: 70px; }
.table--blackjack .dealer__cards .fcard + .fcard { margin-left: -20px; transform: translateY(6px); }
.bj-dealer-placeholder { height: 100px; width: 72px; display: grid; place-items: center; border: 1px dashed #b5d9d43b; border-radius: 9px; color: #9bbdb66b; font-size: .55rem; letter-spacing: .1em; }
.bj-table-mark { display: flex; flex-direction: column; text-align: center; gap: 3px; margin: 15px 0 17px; pointer-events: none; color: #a0c2bd66; }
.bj-table-mark > span { font-size: clamp(1.2rem, 2.6vw, 2.4rem); letter-spacing: .28em; font-weight: 800; }
.bj-table-mark strong { font-size: .75rem; letter-spacing: .23em; color: #c0d0a97d; }
.bj-table-mark small { font-size: .55rem; letter-spacing: .12em; }
.bj-table-status { text-align: center; min-height: 34px; color: #a6c2c8; font-size: .77rem; padding: 0 10px; }
.table--blackjack .bj-shoe { position: absolute; right: 35px; top: 45px; transform: rotate(17deg); display: flex; flex-direction: column; align-items: center; gap: 10px; opacity: .65; }
.bj-shoe .fcard { --card-w: 48px; box-shadow: 3px 3px #64777f, 6px 6px #253946, 9px 9px #61757b; }
.bj-shoe span { font-size: .45rem; letter-spacing: .15em; }
.bj-seats-scroll { width: 100%; overflow-x: auto; padding: 12px 0 8px; scrollbar-color: #557b83 transparent; scrollbar-width: thin; }
.bj-seats { display: grid; grid-template-columns: repeat(var(--seats), minmax(128px, 1fr)); gap: 10px; min-width: min-content; align-items: start; padding: 0 4px 48px; }
.bj-seat { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; padding-top: var(--seat-drop); }
.bj-seat__hands { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; min-height: 146px; }
.table--blackjack .hand-block { padding: 9px 4px; gap: 12px; width: 100%; max-width: 260px; border-radius: 12px; }
.table--blackjack .hand-block__cards { justify-content: center; gap: 0; min-height: 83px; width: 100%; flex-wrap: wrap; padding: 0 6px; }
.table--blackjack .hand-block__cards .fcard { --card-w: 57px; }
.table--blackjack .hand-block__cards .fcard + .fcard { margin-left: -25px; }
.table--blackjack .hand-block__foot { gap: 5px; }
.table--blackjack .hand-block__foot .chip { font-size: .65rem; padding: 3px 6px; background: #0f2533b3; }
.table--blackjack .hand-block__total { font-size: .76rem; background: #10222ddd; border: 1px solid #ffffff15; }
.table--blackjack .hand-block--active { animation: none; border-color: #49e6a477; background: #58dc9a0a; box-shadow: 0 0 26px -14px #42efae; }
.table--blackjack .hand-block__total--bust { color: #ffa3a3; }
.table--blackjack .hand-block__total--bj { color: #f8dc86; border-color: #e4c47088; }
.bj-seat__identity { display: flex; align-items: center; gap: 7px; padding: 8px 10px; background: #0b2230aa; border: 1px solid #ffffff12; border-radius: 30px; max-width: 100%; position: relative; }
.bj-seat__identity .stack { min-width: 0; }
.bj-seat__identity strong { font-size: .72rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 112px; }
.bj-seat__identity span { color: #829eae; font-size: .52rem; letter-spacing: .13em; }
.bj-seat--you .bj-seat__identity { border-color: #61e2b259; }
.bj-seat--you .bj-seat__identity span { color: #79e9b8; }
.bj-seat--active .bj-seat__identity { background: #245144; border-color: #64ebb0; }
.bj-active-dot { width: 6px; height: 6px; border-radius: 50%; background: #67f5b2; position: absolute; right: 8px; top: -3px; box-shadow: 0 0 10px #67f5b2; }
.bj-seat--out { opacity: .5; }
.bj-empty-hand { width: 88px; height: 126px; border: 1px dashed #bedace32; border-radius: 40px 40px 12px 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: #94b1b8; }
.bj-empty-hand span { font-size: .53rem; letter-spacing: .12em; }
.bj-empty-hand small { font-size: .65rem; text-align: center; }
.table--blackjack .result-line { font-size: .65rem; gap: 4px; padding: 5px 8px; flex-wrap: wrap; justify-content: center; animation: none; }
.bj-details { margin: 12px 0 0 12px; color: #96aebc; font-size: .78rem; }
.bj-details summary { cursor: pointer; padding: 12px; }
.bj-details summary svg { vertical-align: middle; margin-right: 6px; }
.bj-details__body { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-height: 280px; overflow: auto; }
.table--blackjack .fcard--deal { animation: casinoDeal .7s cubic-bezier(.16,.7,.3,1) backwards; }
.bj-card--flip { animation: casinoFlip .85s ease both; }
@keyframes casinoDeal { from { opacity: 0; translate: 35px -65px; rotate: 15deg; } to { opacity: 1; translate: 0 0; rotate: 0deg; } }
@keyframes casinoFlip { 0% { rotate: y -90deg; opacity: .2; } 100% { rotate: y 0deg; opacity: 1; } }
@media (min-width: 1500px) { .bj-seats { grid-template-columns: repeat(var(--seats), minmax(145px, 1fr)); } .table--blackjack .hand-block__cards .fcard { --card-w: 66px; } }
@media (max-width: 900px) {
  .bj-layout { grid-template-columns: 1fr; padding: 10px; gap: 10px; }
  .bj-board-wrap { grid-row: 1; }
  .table--blackjack .bj-felt { min-height: 530px; border-radius: 14px; padding: 18px 10px 12px; }
  .bj-controls { min-height: 0; border-radius: 14px; gap: 14px; }
  .bj-controls__heading, .bj-controls__note { display: none; }
  .bj-controls .actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bj-controls .actions .btn:only-child { grid-column: 1 / -1; }
  .bj-controls .turn-hint { text-align: center; }
  .bj-controls .chip-btn { min-width: 46px; min-height: 46px; }
  .bj-details { margin: 4px 0 0; }
  .bj-table-mark { margin-top: 5px; }
  .table--blackjack .bj-shoe { right: 22px; top: 25px; }
}
@media (max-width: 480px) {
  .table--blackjack .bj-felt { min-height: 495px; }
  .table--blackjack .dealer { min-height: 138px; }
  .table--blackjack .dealer__cards .fcard { --card-w: 60px; }
  .bj-table-status { font-size: .68rem; }
  .bj-seats { gap: 8px; padding-bottom: 10px; }
  .bj-seat { padding-top: 8px; }
  .bj-details__body { grid-template-columns: 1fr; }
  .bj-shoe .fcard { --card-w: 32px; }
}
@media (prefers-reduced-motion: reduce) { .table--blackjack .fcard--deal, .bj-card--flip { animation: none; } }
.table--blackjack .fcard__pip svg { display: block; width: calc(var(--card-w) * .38); height: calc(var(--card-w) * .38); }
.table--blackjack .fcard__rank span svg { display: block; width: calc(var(--card-w) * .18); height: calc(var(--card-w) * .18); }
.table--blackjack .bj-card-corner-bottom { top: auto; left: auto; right: calc(var(--card-w) * .09); bottom: calc(var(--card-w) * .06); transform: rotate(180deg); }
