/* Page-local layout. Shared casino tokens, buttons, header and navigation live in casino.css. */
html:has(body.casino-blackjack), body.casino-blackjack { touch-action: auto; }
.casino-blackjack { color-scheme: dark; }
.casino-blackjack [hidden] { display: none !important; }
.casino-blackjack .casino-main { padding-top: 8px; }
.bj-rules-link { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; color: #b7c8db; text-decoration: none; font-size: 14px; }
.bj-practice { margin: 0 0 14px; }
.bj-layout { display: grid; gap: 14px; align-items: start; }
.bj-layout > *, .bj-information > * { min-width: 0; }
.bj-table { position: relative; border: 1px solid #33534f; border-radius: 20px; padding: 14px 16px 10px; background: radial-gradient(ellipse at 50% 45%, #16443d, #0d302c 65%, #102c2c); box-shadow: inset 0 1px 0 #ffffff08; }
.bj-table-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; color: #aac7bf; font-size: 12px; line-height: 1.5; margin-bottom: 12px; }
.bj-hand-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.bj-hand-heading h2 { font-size: 15px; font-weight: 500; margin: 0; }
.bj-total { min-width: 38px; padding: 2px 8px; border: 1px solid #72988c66; background: #0a2422; border-radius: 7px; text-align: center; font: 600 17px/1.35 'Space Grotesk', sans-serif; font-variant-numeric: tabular-nums; }
.bj-total.bj-bust { color: #ffb8bb; }
.bj-total.bj-natural { color: #8eefd0; }
.bj-cards { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; min-height: 78px; }
.bj-empty { color: #a0bfb5; font-size: 13px; }
.bj-table-arc { height: 15px; margin: 4px 0 12px; border-bottom: 1px solid #85b7a742; border-radius: 0 0 50% 50%; }
.bj-card { position: relative; display: flex; flex: 0 0 52px; width: 52px; height: 76px; justify-content: center; align-items: center; background: #f7f8fa; border: 1px solid #fff; border-radius: 7px; color: #182232; box-shadow: 0 3px 6px #0003; font-family: 'Space Grotesk', sans-serif; }
.bj-card.bj-red { color: #ac2540; }
.bj-card-corner { position: absolute; top: 4px; left: 5px; display: flex; flex-direction: column; align-items: center; font-size: 14px; line-height: 1; font-weight: 700; }
.bj-card-corner small { font-size: 12px; }
.bj-card-suit { margin-top: 8px; font-size: 28px; line-height: 1; }
.bj-card.bj-facedown { border: 1px solid #668393; background: repeating-linear-gradient(45deg, #203e50, #203e50 3px, #294a5c 3px, #294a5c 5px); box-shadow: inset 0 0 0 4px #163343, 0 3px 6px #0003; color: #d3e1e9; }
.bj-facedown span { font-size: 23px; }
.bj-card-enter { animation: bj-card-in 180ms ease-out both; }
@keyframes bj-card-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.bj-table-caption { margin: 12px 0 0; color: #aac7bf; font-size: 12px; line-height: 1.5; }
.bj-controls { display: flex; flex-direction: column; gap: 12px; }
.bj-balance-row { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 12px; border-bottom: 1px solid #2a374b; }
.bj-label { display: block; font-size: 12px; line-height: 1.5; color: #9fb0c4; }
.bj-balance-row strong { display: block; font: 600 24px/1.3 'Space Grotesk', sans-serif; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.bj-balance { color: #6ee7b7; }
.bj-wager { text-align: right; }
.bj-selection-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -5px 0 5px; }
.bj-selection-heading h2 { font-size: 14px; font-weight: 500; margin: 0; }
.bj-clear { padding: 8px 12px; color: #c0cede; }
.bj-chips { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.bj-chip { display: flex; flex-direction: column; justify-content: center; align-items: center; min-width: 44px; min-height: 47px; padding: 5px 2px; border: 1px solid #3c5269; border-radius: 10px; background: #18283c; color: #edf4fc; font: 600 15px/1.2 'Space Grotesk', sans-serif; cursor: pointer; transition: background 120ms, border-color 120ms; }
.bj-chip small { display: block; font: 400 10px/1.3 'IBM Plex Sans', sans-serif; color: #b0bfd0; }
.bj-chip[aria-disabled="true"] { background: #111c2e; border-style: dashed; color: #b0bfd0; }
.bj-chip.bj-selected { border-color: #6ee7b7; background: #203d3d; box-shadow: inset 0 0 0 1px #6ee7b7; }
.bj-chip:hover { background: #233950; }
.bj-chip:active { background: #2c4e51; }
.bj-hint { margin: 8px 0 12px; font-size: 12px; line-height: 1.5; color: #b2c1d2; overflow-wrap: anywhere; }
.bj-wide { width: 100%; }
.bj-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.casino-blackjack .casino-button { min-width: 44px; min-height: 44px; font: 600 14px/1.4 'IBM Plex Sans', sans-serif; padding: 10px 8px; cursor: pointer; }
.casino-blackjack .casino-button:disabled { opacity: .48; cursor: not-allowed; }
.bj-status { margin: 0; color: #c4d2e1; font-size: 13px; line-height: 1.5; }
.bj-result { border-left: 3px solid #91a7be; border-radius: 4px; background: #1a2a3e; padding: 10px 12px; }
.bj-result[data-outcome="win"], .bj-result[data-outcome="bj"] { border-color: #6ee7b7; }
.bj-result[data-outcome="lose"] { border-color: #ec9ca9; }
.bj-result h2 { font: 600 18px/1.4 'Space Grotesk', sans-serif; margin: 0 0 4px; }
.bj-result p { font-size: 13px; line-height: 1.5; margin: 2px 0; color: #c4d2e1; }
.bj-guide { border-top: 1px solid #2a374b; padding-top: 4px; }
.casino-blackjack summary { display: list-item; min-height: 44px; padding: 12px 0; font-size: 14px; font-weight: 500; cursor: pointer; }
.bj-guide p, .bj-details p, .bj-details li { font-size: 13px; line-height: 1.6; color: #afbed0; margin: 8px 0; }
.bj-guide h3 { font-size: 14px; font-weight: 600; margin: 12px 0 4px; }
.bj-hint-toggle { display: flex; align-items: center; gap: 9px; min-height: 44px; font-size: 13px; cursor: pointer; }
.bj-hint-toggle input { width: 20px; height: 20px; accent-color: #6ee7b7; flex-shrink: 0; }
.bj-information { display: grid; gap: 10px; margin-top: 14px; align-items: start; }
.bj-details { scroll-margin-top: 12px; }
.casino-blackjack .bj-details { padding-top: 2px; padding-bottom: 2px; }
.bj-details ul { padding-left: 18px; }
.bj-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 8px 0 16px; }
.bj-stats dt { font-size: 12px; color: #9fb0c4; }
.bj-stats dd { margin: 2px 0 0; font: 600 20px/1.4 'Space Grotesk', sans-serif; }
.bj-level { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; font-size: 13px; margin-top: 14px; }
.bj-level-track { height: 4px; border-radius: 3px; background: #2a374b; margin: 8px 0 12px; }
#lvFill { width: 0; height: 100%; border-radius: inherit; background: #6ee7b7; }
@media (min-width: 760px) {
  .bj-layout { grid-template-columns: minmax(0, 1.6fr) minmax(280px, .9fr); gap: 20px; }
  .bj-table { padding: 22px 24px 16px; }
  .bj-table-meta { margin-bottom: 24px; }
  .bj-cards { min-height: 105px; gap: 10px; }
  .bj-card { flex-basis: 64px; width: 64px; height: 94px; }
  .bj-card-corner { font-size: 16px; }
  .bj-card-suit { font-size: 34px; }
  .bj-table-arc { height: 28px; margin: 12px 0 24px; }
  .bj-table-caption { margin-top: 22px; }
  .bj-information { grid-template-columns: 1fr 1fr; gap: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .casino-blackjack *, .casino-blackjack *::before, .casino-blackjack *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}