/* Card tables are full room scenes, with their own always-visible exit. */
body.basement-table-active { overflow: hidden; }
.bt-scene {
  --bt-brass: #cfb57a;
  --bt-paper: #f1e6ce;
  position: fixed; inset: 0; z-index: 10000;
  display: grid; grid-template-rows: auto minmax(0, 1fr);
  width: 100%; height: 100%; height: 100dvh;
  color: var(--bt-paper);
  background: radial-gradient(ellipse at 50% 30%, #322b23 0, #191917 60%, #0b1110 100%);
  font-family: 'Noto Sans', Arial, sans-serif;
  isolation: isolate;
}
.bt-scene *, .bt-scene *::before, .bt-scene *::after { box-sizing: border-box; }
.bt-scene button, .bt-scene input { font: inherit; }
.bt-scene button { cursor: pointer; }
.bt-scene button:focus-visible, .bt-scene input:focus-visible, .bt-scene summary:focus-visible { outline: 2px solid #f8dca8; outline-offset: 4px; }
.bt-header { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 14px clamp(20px, 4vw, 64px); border-bottom: 1px solid #c3a87142; background: #0d1210ee; box-shadow: 0 7px 26px #0005; z-index: 2; }
.bt-kicker { display: block; color: #b3a586; letter-spacing: .25em; font-size: 10px; }
.bt-header h1 { margin: 4px 0 0; color: var(--bt-paper); font-family: Georgia, 'Times New Roman', serif; font-weight: 400; font-size: clamp(23px, 2.5vw, 33px); line-height: 1.2; }
.bt-header-tools { display: flex; align-items: center; gap: 24px; }
.bt-balance { display: grid; grid-template-columns: auto auto; column-gap: 6px; align-items: baseline; text-align: right; }
.bt-balance > span { grid-column: 1 / -1; color: #b0aca0; font-size: 10px; }
.bt-balance strong { color: #e4c790; font-size: 23px; font-weight: 500; font-variant-numeric: tabular-nums; }
.bt-balance small { color: #a89f87; font-size: 10px; }
.bt-leave { display: flex; align-items: center; gap: 18px; min-height: 44px; color: #e7d1aa; border: 1px solid #bda67578; border-radius: 2px; padding: 11px 16px; background: #bfa26c11; font-size: 12px !important; }
.bt-leave:hover { background: #bfa26c27; border-color: #d0b782; }
.bt-leave span { color: #cdb27a; font-size: 20px; line-height: 1; }
.bt-sound { background: none; border: 1px solid #bda67540; color: #ddc395; width: 40px; height: 42px; border-radius: 2px; font-size: 23px !important; }
.bt-scene-scroll { min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; padding: 18px clamp(20px, 4vw, 64px) 22px; }
.bt-conversation { display: flex; gap: 13px; align-items: flex-start; width: min(1160px, 100%); margin: 0 auto 18px; flex: 0 0 auto; }
.bt-dealer-mark { display: grid; place-items: center; width: 34px; height: 41px; border: 1px solid #b6a18f4f; color: #d0bce3; background: #3f314b77; border-radius: 45% 45% 35% 35%; font-family: serif; font-size: 20px; flex: 0 0 auto; }
.bt-conversation-body { flex: 1; min-width: 0; }
.bt-conversation p { margin: 0 0 4px; font-size: 12px; line-height: 1.7; color: #d7d2c4; }
.bt-conversation [lang="ja"] { color: #e2d9c9; letter-spacing: .04em; }
.bt-conversation .bs-japanese-record, .bt-conversation .bs-translated-line { margin: 0; }
.bt-replies { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 7px; }
.bt-replies[hidden] { display: none; }
.bt-replies button { padding: 7px 11px; min-height: 33px; border: 1px solid #bfa26c35; border-radius: 2px; background: #070b0b3d; color: #cbb98e; font-size: 11px; }
.bt-replies button:hover { background: #bfa26c20; }
.bt-game-area { flex: 1 0 auto; width: min(1160px, 100%); margin: 0 auto; display: flex; min-height: 500px; }
.bt-game-area .bc-game { display: grid; grid-template-rows: minmax(300px, 1fr) auto auto auto; max-width: none; width: 100%; margin: 0; }
.bt-game-area .bc-felt { display: flex; flex-direction: column; justify-content: center; min-height: 300px; padding: 35px clamp(25px, 5vw, 78px) 29px; border: 9px solid #493327; outline: 1px solid #bd965e69; border-radius: 170px 170px 40px 40px; background: radial-gradient(ellipse at 50% 38%, #22584a, #153c34 60%, #102b26); box-shadow: inset 0 0 0 1px #c2a67582, inset 0 0 0 8px #071f1e66, inset 0 0 0 9px #c4a16a36, inset 0 0 90px #02120e9c, 0 14px 30px #0006; }
.bt-game-area .bc-felt::before { content: '地下'; font-size: clamp(110px, 16vw, 230px); color: #dac3940c; }
.bt-game-area .bc-felt::after { inset: 18px; border-radius: 150px 150px 28px 28px; border-color: #d1b97833; }
.bt-game-area .bc-hands { width: 100%; align-items: start; gap: 32px; }
.bt-game-area .bc-hand h3 { font-size: 13px; margin-bottom: 16px; letter-spacing: .1em; }
.bt-game-area .bc-hand h3 > span { font-size: 23px; }
.bt-game-area .bc-cards { min-height: 138px; padding-left: 14px; }
.bt-game-area .bc-card { width: 86px; height: 128px; flex-basis: 86px; margin-left: -14px; padding: 8px 9px; font-size: 19px; }
.bt-game-area .bc-card > b { font-size: 34px; left: 30px; top: 48px; }
.bt-game-area .bc-card small { font-size: 15px; }
.bt-game-area .bc-card-back > span { font-size: 40px; }
.bt-game-area .bc-choices { margin-top: 24px; }
.bt-game-area .bc-choices button { max-width: 280px; min-height: 45px; font-size: 13px; }
.bt-game-area .bc-blackjack-hands { grid-template-columns: 1fr 1fr; gap: 32px; }
.bt-game-area .bc-blackjack-hands .bc-cards { flex-wrap: wrap; row-gap: 8px; }
.bt-game-area .bc-controls { margin: 18px 0 12px; align-items: flex-end; }
.bt-game-area .bc-primary { min-width: 220px; }
.bt-game-area .bc-result { min-height: 62px; }
.bt-game-area .bc-result p { font-size: 13px; }
.bt-game-area .bc-rules { margin-top: 10px; }
.bt-game-area .bc-rules p { max-width: none; }
.bt-leaving-caption { color: #d1b982; font-size: 12px; text-align: center; }
.bt-denied { position: fixed; z-index: 10001; left: 50%; top: 50%; translate: -50% -50%; width: min(440px, calc(100vw - 40px)); padding: 24px; border: 1px solid #bda675; color: #e9dec7; background: #101915; box-shadow: 0 20px 100px #0009; font-family: Arial, sans-serif; }
.bt-denied p { line-height: 1.65; font-size: 14px; }
.bt-denied button { min-height: 44px; padding: 10px 14px; border: 1px solid #bda675; color: #e9dec7; background: #33382c; cursor: pointer; }
@media (min-width: 1800px) { .bt-game-area, .bt-conversation { width: min(1400px, 100%); } .bt-game-area .bc-card { width: 104px; height: 154px; flex-basis: 104px; } .bt-game-area .bc-card > b { top: 61px; left: 39px; } }
@media (max-height: 750px) and (min-width: 701px) {
  .bt-header { padding-top: 10px; padding-bottom: 10px; }
  .bt-scene-scroll { padding-top: 13px; }
  .bt-conversation { margin-bottom: 12px; }
  .bt-game-area { min-height: 440px; }
  .bt-game-area .bc-game { grid-template-rows: minmax(260px, 1fr) auto auto auto; }
  .bt-game-area .bc-felt { min-height: 260px; padding-top: 27px; padding-bottom: 22px; }
  .bt-game-area .bc-cards { min-height: 111px; }
  .bt-game-area .bc-card { width: 72px; height: 105px; flex-basis: 72px; }
  .bt-game-area .bc-card > b { top: 38px; left: 24px; font-size: 27px; }
  .bt-game-area .bc-choices { margin-top: 15px; }
}
@media (max-width: 700px) {
  .bt-header { gap: 10px; padding: 11px 14px; align-items: flex-start; }
  .bt-kicker { font-size: 8px; letter-spacing: .15em; }
  .bt-header h1 { font-size: 23px; margin-top: 6px; }
  .bt-header-tools { gap: 8px; display: grid; grid-template-columns: 1fr auto; align-items: center; }
  .bt-balance { grid-column: 1; justify-content: end; }
  .bt-balance > span { display: none; }
  .bt-balance strong { font-size: 18px; }
  .bt-balance small { font-size: 8px; }
  .bt-sound { grid-column: 2; grid-row: 1; width: 30px; height: 28px; font-size: 17px !important; }
  .bt-leave { grid-column: 1 / -1; gap: 7px; min-height: 38px; padding: 8px 10px; font-size: 10px !important; }
  .bt-leave span { font-size: 14px; }
  .bt-scene-scroll { padding: 16px 14px 20px; }
  .bt-conversation { gap: 10px; margin-bottom: 16px; }
  .bt-conversation p { font-size: 11px; }
  .bt-dealer-mark { width: 28px; height: 35px; }
  .bt-replies { gap: 6px; }
  .bt-replies button { padding: 7px 9px; font-size: 10px; }
  .bt-game-area { min-height: 480px; }
  .bt-game-area .bc-game { grid-template-rows: minmax(280px, 1fr) auto auto auto; }
  .bt-game-area .bc-felt { min-height: 280px; padding: 28px 10px 22px; border-width: 6px; border-radius: 90px 90px 16px 16px; }
  .bt-game-area .bc-felt::after { inset: 11px; border-radius: 77px 77px 9px 9px; }
  .bt-game-area .bc-hands { gap: 6px; }
  .bt-game-area .bc-hand h3 { font-size: 10px; margin-bottom: 13px; letter-spacing: 0; }
  .bt-game-area .bc-hand h3 > span { font-size: 18px; padding-left: 6px; }
  .bt-game-area .bc-cards { min-height: 94px; padding-left: 12px; }
  .bt-game-area .bc-card { width: 53px; height: 81px; flex-basis: 53px; margin-left: -12px; padding: 5px; font-size: 13px; }
  .bt-game-area .bc-card > b { top: 29px; left: 16px; font-size: 23px; }
  .bt-game-area .bc-card small { font-size: 10px; }
  .bt-game-area .bc-card-back > span { font-size: 25px; }
  .bt-game-area .bc-choices { gap: 6px; margin-top: 18px; }
  .bt-game-area .bc-choices button { font-size: 10px; min-height: 44px; padding: 9px 5px; flex-basis: 65px; }
  .bt-game-area .bc-blackjack-hands { grid-template-columns: 1fr; gap: 19px; }
  .bt-game-area .bc-blackjack .bc-felt { min-height: 350px; }
  .bt-game-area .bc-blackjack .bc-card { width: 62px; height: 91px; flex-basis: 62px; margin-left: -12px; }
  .bt-game-area .bc-blackjack .bc-card > b { left: 20px; top: 33px; }
  .bt-game-area .bc-controls { gap: 8px; margin-top: 15px; }
  .bt-game-area .bc-primary { min-width: 0; flex: 1 1 100%; }
  .bt-game-area .bc-bet-label input { width: 105px; }
  .bt-game-area .bc-quick-bets { margin-left: auto; }
  .bt-game-area .bc-result { padding: 12px; min-height: 60px; }
  .bt-game-area .bc-result p { font-size: 11px; }
  .bt-game-area .bc-receipt { gap: 18px; }
  .bt-game-area .bc-rules { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) { .bt-scene *, .bt-scene *::before, .bt-scene *::after { animation: none !important; transition: none !important; } }
