.casino .card-front > .card-icon { display: none; }
.casino-card-body { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; gap: .55rem; margin-top: .4rem; text-align: center; font-family: Avenir, sans-serif; }
.casino-card-body p { margin: 0; font-size: .75rem; font-weight: 800; text-transform: uppercase; }
.casino-card-icon { width: clamp(3.5rem, 7vw, 5.25rem); aspect-ratio: 1; object-fit: contain; animation: stax-icon-in .5s ease-out both; }
.casino-enter, #stax-casino button:not(.playing-card) { min-height: 42px; padding: .65rem 1.1rem; border: 2px solid #252922; border-radius: 0; background: #aeb348; color: #252922; font: 900 .82rem/1.2 Avenir, sans-serif; text-transform: uppercase; cursor: pointer; box-shadow: 3px 3px 0 #252922; transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease; }
.casino-enter:hover, #stax-casino button:not(:disabled):hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 #252922; }
#stax-casino button:focus-visible, .casino-enter:focus-visible, #stax-casino input:focus-visible, #stax-casino select:focus-visible { outline: 3px solid #bd5943; outline-offset: 3px; }
#stax-casino { position: fixed; inset: 0; z-index: 5000; display: none; overflow: auto; padding: clamp(0px, 2vw, 24px); background: rgba(29, 32, 26, .9); color: #252922; font-family: Avenir, sans-serif; }
#stax-casino.open { display: block; }
.stax-casino-shell { width: min(1060px, 100%); min-height: calc(100vh - 48px); margin: auto; border: 3px solid #252922; background: #fdfadc; box-shadow: 9px 9px 0 #aeb348; }
.stax-casino-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: .85rem clamp(1rem, 3vw, 2rem); border-bottom: 3px solid #252922; background: #e5e4b9; }
.casino-kicker { font: 800 .7rem/1.2 Avenir, sans-serif; text-transform: uppercase; }
.stax-casino-head h2 { margin: .25rem 0 0; font: 900 clamp(1.8rem, 3vw, 2.8rem)/1 Engravers, Georgia, serif; text-transform: uppercase; }
.stax-casino-head p { margin: .4rem 0 0; font-size: .9rem; font-weight: 700; }
#stax-casino .stax-casino-close { width: 42px; min-width: 42px; height: 42px; min-height: 42px; padding: 0; background: #fdfadc; font: 400 1.8rem/1 Avenir, sans-serif; }
.casino-bank { display: grid; grid-template-columns: 1fr auto 1fr minmax(120px, .65fr) auto auto; align-items: end; gap: .8rem; padding: .7rem clamp(1rem, 3vw, 2rem); border-bottom: 2px solid #252922; background: #f4f0cd; }
.casino-bank > div { display: grid; gap: .2rem; }
.casino-bank small, .casino-bank label, .stax-bet-row label { font: 800 .7rem/1.2 Avenir, sans-serif; text-transform: uppercase; }
.casino-bank strong { font: 900 1.25rem/1.2 Avenir, sans-serif; }
.casino-bank label, .stax-bet-row label { display: grid; gap: .35rem; }
.casino-bank input, .stax-bet-row input, .stax-bet-row select { width: 100%; min-height: 42px; border: 2px solid #252922; border-radius: 0; background: #fffef2; padding: .4rem .5rem; color: #252922; font: 800 .95rem Avenir, sans-serif; }
.stax-casino-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 3px solid #252922; }
#stax-casino .stax-casino-tab { min-height: 44px; border: 0; border-right: 2px solid #252922; box-shadow: none; background: #fdfadc; }
#stax-casino .stax-casino-tab:last-child { border-right: 0; }
#stax-casino .stax-casino-tab.active { background: #252922; color: #fdfadc; }
.stax-game { display: none; padding: clamp(1rem, 2vw, 1.5rem); }
.stax-game.active { display: block; }
.stax-game-heading { border-bottom: 1px solid #a4a697; margin-bottom: 1rem; padding-bottom: .7rem; }
.stax-game h3 { margin: 0; font: 900 clamp(1.35rem, 2.5vw, 2rem)/1.1 Engravers, Georgia, serif; text-transform: uppercase; }
.stax-game-intro { margin: .45rem 0 0; color: #515648; font-size: .92rem; font-weight: 700; }
.stax-bet-row { display: flex; flex-wrap: wrap; align-items: end; gap: .7rem; margin: 1.2rem 0; }
.stax-bet-row label { width: min(155px, 100%); }
#stax-casino .secondary { background: #fdfadc; }
#stax-casino button:disabled { opacity: .5; cursor: default; transform: none; box-shadow: 3px 3px 0 #252922; }
.stax-result { min-height: 50px; padding: .8rem 1rem; border: 2px solid #252922; background: #f4f0cd; font-weight: 800; }
.stax-result.win { background: #d7e5ba; }
.stax-result.loss { background: #edc7b7; }
.roulette-stage { position: relative; width: min(280px, 72vw); aspect-ratio: 1; margin: .5rem auto; }
.roulette-disc { display: block; width: 100%; height: 100%; border-radius: 50%; filter: drop-shadow(4px 5px 0 #252922); transform: rotate(0deg); transition: transform 3.6s cubic-bezier(.12,.55,.15,1); }
.roulette-pointer { position: absolute; z-index: 3; top: -9px; left: 50%; width: 0; height: 0; transform: translateX(-50%); border-left: 12px solid transparent; border-right: 12px solid transparent; border-top: 22px solid #252922; }
.roulette-ball-orbit { position: absolute; inset: 0; pointer-events: none; }
.roulette-ball-orbit i { position: absolute; top: 13%; left: 50%; width: 16px; height: 16px; transform: translateX(-50%); border: 2px solid #252922; border-radius: 50%; background: #fffef2; box-shadow: 1px 2px 3px #25292299; }
.roulette-readout { position: absolute; top: 50%; left: 50%; display: grid; place-items: center; width: 70px; height: 70px; transform: translate(-50%, -50%); border: 2px solid #252922; border-radius: 50%; background: #fdfadc; font: 900 2rem/1 Engravers, Georgia, serif; }
.slot-machine { position: relative; width: min(400px, 100%); margin: 1.5rem auto; padding: 18px; border: 4px solid #252922; background: #e5e4b9; box-shadow: 6px 6px 0 #aeb348; }
.slot-reels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.slot-reel { --slot-h: 92px; height: var(--slot-h); overflow: hidden; border: 2px solid #252922; background: #fffef2; }
.slot-track { will-change: transform; }
.slot-track span { display: grid; place-items: center; height: var(--slot-h); color: #252922; font: 900 2.9rem/1 Engravers, Georgia, serif; }
.slot-reel:nth-child(2) .slot-track span { color: #bd5943; }
.playing-cards { display: flex; flex-wrap: wrap; gap: .45rem; min-height: 92px; }
.playing-card { position: relative; display: grid; place-items: center; flex: 0 0 62px; width: 62px; height: 86px; border: 2px solid #252922; background: #fffef2; color: #252922; box-shadow: 2px 2px 0 #252922; font-family: Georgia, serif; }
.playing-card small { position: absolute; top: 3px; left: 5px; font-size: .73rem; font-weight: bold; }
.playing-card b { font-size: 1.9rem; line-height: 1; }
.playing-card.red { color: #bc392b; }
.playing-card.card-back { background: repeating-linear-gradient(45deg, #aeb348, #aeb348 6px, #dfe19f 6px, #dfe19f 12px); border: 4px double #252922; }
.poker-table { display: grid; gap: .55rem; min-height: 270px; padding: .7rem; border: 3px solid #252922; background: #d8dfb7; }
.poker-seat { display: flex; align-items: center; gap: 1rem; }
.poker-seat small { width: 90px; flex: 0 0 90px; font-size: .72rem; font-weight: 900; text-transform: uppercase; }
.poker-center { display: flex; align-items: center; gap: 1rem; border-top: 1px solid #8b9076; border-bottom: 1px solid #8b9076; padding: .6rem 0; }
.poker-center .playing-cards { flex: 1; }
.poker-center > span { width: 130px; flex: 0 0 130px; font-size: .8rem; font-weight: 800; text-transform: uppercase; }
.blackjack-table { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.blackjack-table section { min-width: 0; padding: 1rem; border: 2px solid #252922; background: #d8dfb7; }
.blackjack-table h4 { margin: 0 0 .7rem; text-transform: uppercase; }
@media (min-width: 678px) {
  .market.count-8 { align-content: center; }
  .market.count-8 .card { width: 30%; height: 30vh; }
  .market.count-8 .card.casino, .market.count-8 .card.stocks { width: 46.25%; height: 30vh; }
  .market.count-8 .card.stocks .card-heading { position: static; transform: none; font-size: inherit; }
}
@media (min-width: 801px) {
  .stax-game.active { display: grid; grid-template-columns: minmax(0, 1fr) 290px; column-gap: 1.5rem; align-items: start; }
  .stax-game-heading { grid-column: 1 / -1; }
  .roulette-stage, .slot-machine, .poker-table, .blackjack-table { grid-column: 1; grid-row: 2 / 4; }
  .stax-bet-row { grid-column: 2; grid-row: 2; margin: 0; align-content: start; }
  .stax-bet-row label { width: 100%; }
  .stax-bet-row button { flex: 1 1 100px; }
  .stax-result { grid-column: 2; grid-row: 3; margin-top: .8rem; }
  .poker-table { min-height: 260px; }
}
@media (max-width: 800px) {
  #stax-casino { padding: 0; }
  .stax-casino-shell { min-height: 100vh; border: 0; box-shadow: none; }
  .casino-bank { grid-template-columns: 1fr 1fr; }
  .casino-bank > span { display: none; }
  .stax-casino-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #stax-casino .stax-casino-tab:nth-child(2) { border-right: 0; }
  #stax-casino .stax-casino-tab:nth-child(-n+2) { border-bottom: 2px solid #252922; }
  .blackjack-table { grid-template-columns: 1fr; }
  .poker-seat { display: block; }
  .poker-seat small { display: block; width: auto; margin-bottom: .4rem; }
  .poker-center { display: block; }
  .poker-center > span { display: block; width: auto; margin-top: .5rem; }
  .playing-card { flex-basis: 50px; width: 50px; height: 70px; }
  .playing-card b { font-size: 1.45rem; }
  .playing-cards { min-height: 70px; }
  .casino-card-body p { display: none; }
  .casino-card-icon { width: 2.8rem; }
}
@media (prefers-reduced-motion: reduce) { .casino-card-icon { animation: none; } .roulette-disc, .slot-track { transition-duration: .01ms !important; } }
@keyframes stax-icon-in { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: scale(1); } }
