/* KrazFrame Kasino Blackjack table.
   Classic high-limit table: bottle-green baize, brass print, oxblood rail, ivory cards.
   Layout is absolute inside .table so the felt print, shoe and seats stay put;
   breakpoints: wide (>=1500), short desktop (>=1001 and <=950 high), tablet (<=1000),
   phone portrait (<=600) and phone landscape (<=500 high). */

:root {
  --felt: #164936;
  --felt-dark: #0b3026;
  --felt-light: #215b43;
  --ink: #f0eadb;
  --ink-soft: #ced2bc;
  --muted: #b5c2b5;
  --brass: #c9a45c;
  --brass-light: #e6cc91;
  --rail: #422421;
  --panel: #14281f;
  --danger-ink: #e5c5b9;
  --card-w: 90px;
  --card-h: 126px;
  --display: 'Cormorant Garamond', 'Iowan Old Style', Georgia, serif;
  --sans: 'IBM Plex Sans', 'Segoe UI', Arial, sans-serif;
  --ease-out: cubic-bezier(.2, .7, .3, 1);
  color-scheme: dark;
}

/* ---------- Base ---------- */

* { box-sizing: border-box; }

body {
  margin: 0;
  background: #101b17;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

button, a { -webkit-tap-highlight-color: transparent; }

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  touch-action: manipulation;
  min-width: 44px;
  min-height: 44px;
}
button:disabled { cursor: default; opacity: .35; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--brass-light); outline-offset: 4px; }

a { color: var(--brass-light); }

[hidden] { display: none !important; }

/* The page has its own Lobby link, so the generic touch back overlay is redundant. */
body > button[aria-label="Go back"] { display: none; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

kbd {
  display: none;
  margin-left: 9px;
  padding: 1px 4px;
  border: 1px solid currentColor;
  border-radius: 3px;
  font: 9px var(--sans);
  opacity: .65;
}
@media (hover: hover) { kbd { display: inline-block; } }

.eyebrow {
  display: block;
  margin-bottom: 4px;
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--brass);
}

/* ---------- Top bar ---------- */

.topbar {
  position: relative;
  height: 100px;
  max-width: 1440px;
  margin: auto;
  padding: 12px 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid #ffffff0e;
}

.lobby {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 44px;
  color: #d7d5c8;
  text-decoration: none;
}
.chevron {
  width: 8px;
  height: 8px;
  border: solid var(--brass);
  border-width: 0 0 1px 1px;
  transform: rotate(45deg);
}

.wordmark {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
}
.wordmark > span {
  font-size: 9px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--brass);
}
h1 {
  margin: 4px 0 0;
  font: 600 38px/.98 var(--display);
  letter-spacing: .4px;
}

.header-tools { display: flex; align-items: center; gap: 16px; }

.balance { padding-right: 21px; border-right: 1px solid #c9a45c33; }
.balance > span {
  display: block;
  font-size: 9px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--muted);
}
.balance strong {
  font-size: 23px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.icon-button { border: 0; background: transparent; font-size: 30px; }
.icon-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--brass-light);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-button[aria-pressed=true] .mute-mark,
.icon-button[aria-pressed=false] .sound-wave { display: none; }

.rules-button {
  padding: 0 18px;
  border: 1px solid #c9a45c66;
  border-radius: 4px;
  background: transparent;
  color: #e2d5b9;
}

/* ---------- Table ---------- */

.casino { max-width: 1440px; margin: auto; padding: 22px 30px 16px; }

.table {
  position: relative;
  isolation: isolate;
  height: 580px;
  overflow: hidden;
  border: 1px solid #886739;
  border-radius: 160px 160px 100px 100px / 60px 60px 50px 50px;
  background: radial-gradient(ellipse at 50% 48%, var(--felt-light) 0, var(--felt) 45%, var(--felt-dark) 100%);
  box-shadow: 0 10px 25px #0005, inset 0 0 70px #00180c80;
}
/* Woven baize: fractal noise at low opacity */
.table::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .17;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%23fff' filter='url(%23n)' opacity='.5' d='M0 0h120v120H0z'/%3E%3C/svg%3E");
}
.table-border {
  position: absolute;
  inset: 14px 15px 31px;
  border: 1px solid #c9a45c55;
  border-radius: 145px 145px 88px 88px / 50px 50px 43px 43px;
  pointer-events: none;
}
.table-caption {
  position: absolute;
  top: 21px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 8px;
  letter-spacing: 3px;
  color: #c8cdb4;
}
.table-caption span { margin: 0 14px; color: var(--brass); }

.felt-print {
  position: absolute;
  top: 155px;
  left: 50%;
  width: 650px;
  max-width: 83%;
  height: 200px;
  transform: translateX(-50%);
  fill: var(--brass);
  opacity: .72;
  font-family: var(--display);
  font-weight: 600;
  pointer-events: none;
}
.pay-print { font-size: 29px; letter-spacing: 4px; }
.stand-print { font-size: 16px; letter-spacing: 3px; }
.ins-print { font-size: 13px; letter-spacing: 3px; }

.table-footer {
  position: absolute;
  bottom: 30px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 8px;
  letter-spacing: 4px;
  color: #b9bd9b;
}
.table-footer span { margin: 0 9px; font-size: 7px; color: var(--brass); }

/* Padded leather arm rail with a brass bead */
.rail {
  position: absolute;
  bottom: -19px;
  left: -3%;
  right: -3%;
  z-index: 8;
  height: 44px;
  border-top: 3px solid #a18049;
  border-radius: 50% 50% 0 0 / 20% 20% 0 0;
  background:
    repeating-linear-gradient(80deg, #ffffff03 0 1px, transparent 1px 4px),
    linear-gradient(#623c31, #321d1b 80%);
  box-shadow: 0 -4px 10px #0005, inset 0 3px 5px #bb817544;
}

/* Wooden shoe */
.shoe {
  position: absolute;
  top: 67px;
  right: 10%;
  z-index: 4;
  width: 105px;
  height: 92px;
  border: 2px solid #20120e;
  border-radius: 9px 9px 15px 15px;
  background: linear-gradient(115deg, #51362a, #201d18 65%);
  box-shadow: 4px 7px 8px #0006, inset 2px 1px 1px #9c7966;
  transform: rotate(-12deg);
}
.shoe::after {
  content: '';
  position: absolute;
  left: 7px;
  right: 7px;
  bottom: 8px;
  height: 28px;
  border: 1px solid #7d6657;
  border-radius: 3px;
  background: #211a18;
}
.shoe-cards {
  position: absolute;
  inset: 9px 9px 30px;
  border-radius: 4px;
  background: repeating-linear-gradient(0deg, #ded9cc 0 1px, #a39c8b 1px 2px);
  transform: skewX(-8deg);
}
.shoe span {
  position: absolute;
  bottom: 14px;
  left: 0;
  right: 0;
  z-index: 1;
  text-align: center;
  font: 15px var(--display);
  color: var(--brass);
}

/* ---------- Seats and cards ---------- */

.dealer-zone {
  position: absolute;
  top: 55px;
  left: 50%;
  z-index: 3;
  max-width: 72%;
  transform: translateX(-50%);
  text-align: center;
}
.dealer-cards { max-width: 100%; }

.seat-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 23px;
  margin-bottom: 10px;
  font-size: 9px;
  letter-spacing: 2.5px;
  color: var(--ink-soft);
}

.total {
  padding: 3px 8px;
  border: 1px solid #b49553;
  border-radius: 4px;
  background: #112f25;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .3px;
  color: #f0e5cc;
  white-space: nowrap;
}

.cards {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--card-h);
}
.card-spot {
  width: var(--card-w);
  height: var(--card-h);
  margin: 0 4px;
  border: 1px solid #c9a45c44;
  border-radius: 6px;
}

.card {
  position: relative;
  flex: 0 0 var(--card-w);
  width: var(--card-w);
  height: var(--card-h);
  margin-left: calc(var(--card-w) * -.34);
  perspective: 800px;
  filter: drop-shadow(1px 4px 3px #0005);
  transform: rotate(var(--angle, 0deg));
}
.card:first-child { margin-left: 0; }
.card-inner {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transition: transform .52s var(--ease-out);
}
.card.face-down .card-inner { transform: rotateY(180deg); }
.card-face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 6px;
  background: #fbf8f1;
  box-shadow: 0 1px 0 #bcb7aa;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.card-face svg { display: block; width: 100%; height: 100%; }
.card-back { transform: rotateY(180deg); }

.round-message {
  position: absolute;
  top: 295px;
  left: 20px;
  right: 20px;
  z-index: 5;
  min-height: 49px;
  text-align: center;
  pointer-events: none;
}
.message-main { font: 600 27px/1.1 var(--display); color: #f0e5ce; }
.round-message.result-win .message-main { color: var(--brass-light); }

.player-hands {
  position: absolute;
  top: 352px;
  left: 8%;
  right: 8%;
  z-index: 4;
  display: flex;
  justify-content: center;
  gap: 24px;
}
.hand {
  position: relative;
  flex: 0 1 210px;
  min-width: 0;
  padding: 0 7px 8px;
  border-radius: 10px;
  text-align: center;
}
.hand.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 15%;
  right: 15%;
  height: 2px;
  background: var(--brass);
  box-shadow: 0 2px 12px #c9a45c35;
}
.hand .seat-label { margin: 0 0 9px; }
.hand .cards { margin: 0 auto; }
.hand-meta { margin-top: 7px; font-size: 9px; letter-spacing: 1px; color: #cbd0bd; }
.hand-result {
  min-height: 20px;
  margin-top: 9px;
  font-size: 11px;
  color: var(--ink);
  white-space: nowrap;
}
.hand-result strong {
  margin-left: 7px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--brass-light);
}
.hand-result[data-outcome=lose], .hand-result[data-outcome=bust] { color: var(--danger-ink); }

.insurance {
  position: absolute;
  top: 278px;
  left: 50%;
  z-index: 7;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border: 1px solid var(--brass);
  border-radius: 5px;
  background: #102c22;
  transform: translateX(-50%);
  white-space: nowrap;
}

/* ---------- Bet circle and chips ---------- */

.bet-zone {
  position: absolute;
  bottom: 40px;
  left: calc(50% + 160px);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 13px;
}
.table:has(.hand) .bet-zone { left: auto; right: 5%; bottom: 42px; }
.bet-circle {
  display: grid;
  place-items: center;
  width: 76px;
  height: 65px;
  border: 1px solid #c9a45c77;
  border-radius: 50%;
}
.bet-stack { position: relative; width: 47px; height: 45px; }
.bet-stack .chip {
  position: absolute;
  left: 0;
  width: 46px;
  height: 46px;
  filter: drop-shadow(0 2px 1px #0008);
}
.bet-copy { display: flex; flex-direction: column; gap: 1px; }
.bet-copy > span { font-size: 8px; letter-spacing: 2px; color: #d2c6a1; }
.bet-copy strong { font-size: 21px; font-weight: 500; font-variant-numeric: tabular-nums; }
.bet-copy small { font-size: 9px; letter-spacing: .7px; color: var(--muted); }

.chip { display: block; flex: none; width: 57px; height: 57px; }
.chip svg { display: block; width: 100%; height: 100%; }
.flying-chip { position: fixed; z-index: 50; pointer-events: none; }

/* ---------- Controls ---------- */

.console { position: relative; max-width: 980px; margin: 18px auto 0; }

.bet-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  margin-bottom: 18px;
}
.tray-label { font-size: 9px; letter-spacing: 2px; color: var(--brass-light); }
.tray-label span {
  display: block;
  margin-top: 5px;
  font-size: 11px;
  letter-spacing: 0;
  color: #b3beb4;
}
.chip-tray { display: flex; align-items: center; gap: 12px; }
.chip-button {
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  filter: drop-shadow(0 3px 2px #0008);
  transition: transform .15s;
}
.chip-button:hover:enabled { transform: translateY(-4px); }
.bet-helpers { display: flex; gap: 2px; }
.bet-helpers button {
  padding: 0 10px;
  border: 0;
  background: transparent;
  font-size: 12px;
  color: #cfcebc;
}

.actions { display: flex; justify-content: center; gap: 9px; }
.actions > button, .insurance button {
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid #7a8060;
  border-radius: 4px;
  background: #22342a;
  font-weight: 500;
  color: #eee8d9;
  transition: background .15s;
}
.insurance button { min-height: 44px; padding: 0 12px; }
.actions > button:hover:enabled, .insurance button:hover:enabled { background: #354a39; }
.actions > .deal {
  min-width: 168px;
  border-color: #e2c38b;
  background: linear-gradient(#d8ba7b, #b58c47);
  color: #211e15;
}
.actions > .deal:hover:enabled { background: #e1c68d; }
.actions > .subtle { background: transparent; font-size: 12px; color: #bfc4b6; }

.table-hint {
  margin: 12px 0 0;
  text-align: center;
  font-size: 11px;
  letter-spacing: .5px;
  color: #b6c1b5;
}

.toast {
  position: absolute;
  bottom: 100%;
  left: 50%;
  z-index: 10;
  width: max-content;
  max-width: 95%;
  padding: 10px 20px;
  border: 1px solid #b28f69;
  border-radius: 4px;
  background: #482c25;
  font-size: 12px;
  color: #fff0dd;
  transform: translateX(-50%);
}
.toast button {
  margin-left: 12px;
  padding: 0 10px;
  border: 1px solid var(--brass);
  border-radius: 3px;
  background: #263b2e;
  font-size: 12px;
}

.bankrupt {
  margin: 0 0 12px;
  padding: 10px;
  border: 1px solid #c9a45c44;
  background: #24362b;
  text-align: center;
  font-size: 12px;
}

/* ---------- Rules dialog ---------- */

dialog {
  width: 490px;
  max-width: calc(100% - 28px);
  max-height: 85dvh;
  padding: 26px 30px;
  border: 1px solid #a98a4e;
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 25px 80px #0009;
}
dialog::backdrop { background: #07130fbe; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; }
.dialog-heading .icon-button { margin: -12px -13px 0 0; font-size: 25px; }
h2 { margin: 3px 0 14px; font: 600 36px var(--display); }
h3 { margin: 21px 0 8px; font: 600 23px var(--display); }
dialog p { font-size: 13px; line-height: 1.65; color: #c6ccbc; }
dl { margin: 20px 0; }
dl > div {
  display: grid;
  grid-template-columns: 95px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #c9a45c22;
  font-size: 12px;
  line-height: 1.5;
}
dt { color: var(--brass-light); }
dd { margin: 0; color: #d2d7c9; }
.dialog-foot { padding-top: 15px; border-top: 1px solid #c9a45c33; font-size: 11px !important; }

/* Soft bloom on a winning round (no flash) */
.win-bloom { animation: bloom 1.5s ease-out; }
@keyframes bloom {
  0%, 100% { box-shadow: 0 10px 25px #0005, inset 0 0 70px #00180c80; }
  35% { box-shadow: 0 10px 25px #0005, inset 0 0 110px #c9a45c30; }
}

/* ---------- Wide desktop ---------- */

@media (min-width: 1500px) {
  .casino { padding-top: 32px; }
  .table { height: 610px; }
  .round-message { top: 306px; }
  .player-hands { top: 365px; }
  .bet-zone { bottom: 55px; }
}

/* ---------- Tablet ---------- */

@media (max-width: 1000px) {
  :root { --card-w: 76px; --card-h: 106px; }
  .topbar { height: 85px; padding: 10px 25px; }
  .header-tools { gap: 7px; }
  .balance { padding-right: 10px; }
  .casino { padding: 16px 15px; }
  .table { height: 540px; }
  .shoe { right: 7%; transform: scale(.85) rotate(-12deg); }
  .felt-print { top: 137px; }
  .round-message { top: 274px; }
  .player-hands { top: 330px; left: 4%; right: 4%; gap: 10px; }
  .bet-zone { bottom: 62px; }
  .table:has(.hand) .bet-zone { bottom: 32px; }
  .actions > button { padding: 0 16px; }
}

/* ---------- Phone portrait ---------- */

@media (max-width: 600px) {
  :root { --card-w: 66px; --card-h: 92px; }

  .topbar { height: 79px; padding: 8px 8px 8px 12px; gap: 5px; }
  .lobby { gap: 8px; font-size: 12px; }
  .wordmark { top: 17px; }
  .wordmark > span { font-size: 7px; letter-spacing: 1.5px; }
  h1 { font-size: 29px; }
  .header-tools { gap: 0; }
  .header-tools .balance { padding: 0; border: 0; }
  .balance > span { font-size: 8px; letter-spacing: .8px; }
  .balance strong { font-size: 16px; }
  .icon-button { padding: 4px; }
  .icon-button svg { width: 19px; }
  .rules-button {
    position: absolute;
    top: 79px;
    right: 19px;
    z-index: 9;
    padding: 0 8px;
    border: 0;
    font-size: 11px;
  }

  .casino { padding: 0 8px 12px; }
  .table { height: 442px; border-radius: 65px 65px 42px 42px / 30px 30px 24px 24px; }
  .table-border { inset: 9px 8px 24px; border-radius: 60px 60px 35px 35px / 25px 25px 20px 20px; }
  .table-caption { top: 16px; padding: 0 57px; font-size: 7px; letter-spacing: 1.5px; }
  .table-caption span { margin: 0 6px; }
  .dealer-zone { top: 48px; }
  .seat-label { gap: 7px; margin-bottom: 8px; font-size: 8px; letter-spacing: 1.5px; }
  .hand .seat-label { min-height: 18px; }
  .shoe { top: 56px; right: 7px; transform: scale(.52) rotate(-12deg); transform-origin: top right; }
  .felt-print { top: 120px; width: 450px; max-width: 110%; height: 150px; }
  .pay-print { letter-spacing: 3px; }
  .round-message { top: 219px; left: 10px; right: 10px; }
  .eyebrow { font-size: 8px; letter-spacing: 1.5px; }
  .message-main { font-size: 23px; }

  .player-hands { top: 257px; left: 2%; right: 2%; gap: 2px; }
  .player-hands:has(.hand:nth-child(2)) { --card-w: 58px; --card-h: 81px; }
  .player-hands:has(.hand:nth-child(3)) { --card-w: 44px; --card-h: 62px; gap: 1px; }
  .player-hands:has(.hand:nth-child(3)) .seat-label { flex-direction: column; gap: 3px; margin-top: -10px; }
  .player-hands:has(.hand:nth-child(3)) .hand-result { white-space: normal; line-height: 1.5; }
  .player-hands:has(.hand:nth-child(3)) .hand-result strong { display: block; margin: 0; }
  .hand { flex-basis: 160px; padding: 0 3px 4px; }
  .hand-meta { display: none; }
  .hand-result { min-height: 14px; margin-top: 7px; font-size: 10px; }
  .hand-result strong { margin-left: 4px; }
  .total { padding: 2px 5px; font-size: 10px; }

  /* Bet sits at the left of the rail; with split hands it moves to a compact centre row */
  .bet-zone, .table:has(.hand) .bet-zone {
    left: 14px;
    right: auto;
    bottom: 51px;
    width: 63px;
    flex-direction: column;
    gap: 6px;
    transform: none;
  }
  .bet-circle { width: 47px; height: 38px; }
  .bet-stack { width: 46px; height: 46px; transform: scale(.67); }
  .bet-copy { gap: 0; text-align: center; }
  .bet-copy > span { font-size: 7px; letter-spacing: 1px; }
  .bet-copy strong { font-size: 16px; }
  .bet-copy small { display: none; }
  .table:has(.hand:nth-child(2)) .bet-zone {
    left: 50%;
    bottom: 28px;
    width: auto;
    flex-direction: row;
    gap: 9px;
    transform: translateX(-50%);
  }
  .table:has(.hand:nth-child(2)) .bet-circle { width: 32px; height: 29px; }
  .table:has(.hand:nth-child(2)) .bet-stack { transform: scale(.48); }
  .table:has(.hand:nth-child(2)) .bet-copy { flex-direction: row; align-items: center; gap: 8px; }

  .table-footer { bottom: 15px; font-size: 6px; letter-spacing: 2.5px; }
  .rail { bottom: -17px; height: 29px; border-top-width: 2px; }

  .insurance { top: 222px; max-width: 97%; padding: 8px; gap: 5px; font-size: 11px; }
  .insurance button { padding: 0 8px; font-size: 11px; }

  .console { margin-top: 12px; }
  .bet-controls { justify-content: center; gap: 16px; margin-bottom: 12px; padding: 0 5px; }
  .tray-label { display: none; }
  .chip-tray { gap: 6px; }
  .chip { width: 45px; height: 45px; }
  .bet-helpers { gap: 3px; }
  .bet-helpers button { padding: 0 4px; font-size: 11px; }
  .actions { flex-wrap: wrap; gap: 5px; }
  .actions > button { flex: 1 0 25%; min-height: 44px; padding: 0 9px; font-size: 12px; }
  .actions > .subtle { font-size: 12px; }
  .actions > .deal { flex: 1 0 40%; min-width: 0; }
  .table-hint { margin-top: 9px; font-size: 10px; }
  .toast, .bankrupt { font-size: 12px; }
}

/* ---------- Phone landscape: table left, controls in a column on the right ---------- */

@media (max-height: 500px) and (min-width: 601px) {
  :root { --card-w: 48px; --card-h: 67px; }

  .topbar { height: 54px; padding: 3px 20px; }
  h1 { font-size: 27px; }
  .wordmark > span { font-size: 7px; }
  .balance strong { font-size: 18px; }

  .casino {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 195px;
    gap: 12px;
    max-width: 1200px;
    padding: 7px 12px;
  }
  .table {
    height: calc(100dvh - 69px);
    min-height: 276px;
    border-radius: 65px 65px 40px 40px / 25px 25px 20px 20px;
  }
  .table-caption { top: 10px; font-size: 7px; }
  .dealer-zone { top: 28px; }
  .seat-label { min-height: 16px; margin-bottom: 5px; font-size: 8px; }
  .hand .seat-label { min-height: 16px; margin-bottom: 4px; }
  .shoe { top: 28px; right: 6%; transform: scale(.55) rotate(-12deg); transform-origin: top right; }
  .felt-print { top: 93px; width: 430px; height: 105px; }
  .round-message { top: 151px; min-height: 20px; }
  .round-message .eyebrow { display: none; }
  .message-main { font-size: 19px; }
  .player-hands { top: 173px; left: 4%; right: 4%; gap: 5px; }
  .player-hands:has(.hand:nth-child(3)) { --card-w: 42px; --card-h: 59px; }
  .hand { padding-bottom: 3px; }
  .hand.active::after { bottom: 0; }
  .hand-meta { display: none; }
  .hand-result { min-height: 14px; margin-top: 4px; font-size: 10px; }
  .total { padding: 2px 5px; font-size: 10px; }

  .bet-zone { left: auto; right: 4%; bottom: 30px; gap: 7px; }
  .table:has(.hand) .bet-zone { display: none; }
  .bet-circle { width: 47px; height: 42px; }
  .bet-stack { transform: scale(.7); }
  .bet-copy strong { font-size: 16px; }
  .bet-copy > span, .bet-copy small { font-size: 7px; }
  .table-footer { bottom: 17px; font-size: 6px; }
  .rail { bottom: -17px; height: 31px; }

  .insurance { top: 137px; padding: 5px; gap: 6px; font-size: 11px; }
  .insurance button { padding: 0 8px; font-size: 11px; }

  .console { display: flex; flex-direction: column; justify-content: center; margin: 0; }
  .bet-controls { flex-wrap: wrap; gap: 7px; margin-bottom: 8px; }
  .tray-label { width: 100%; text-align: center; font-size: 8px; }
  .tray-label span { display: none; }
  .chip-tray { gap: 5px; }
  .chip { width: 36px; height: 36px; }
  .chip-button { display: grid; place-items: center; }
  .bet-helpers { gap: 12px; }
  .bet-helpers button { font-size: 11px; }
  .actions { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
  .actions > button { min-height: 44px; padding: 0 5px; font-size: 12px; }
  .actions > .deal { min-width: 0; }
  .actions > .subtle { font-size: 11px; }
  kbd { display: none; }
  .table-hint { margin-top: 7px; font-size: 10px; line-height: 1.4; }
  .toast { top: 0; bottom: auto; }
  .bankrupt { font-size: 11px; }
}

/* ---------- Short desktop (laptops) ---------- */

@media (min-width: 1001px) and (max-height: 950px) {
  :root { --card-w: 82px; --card-h: 115px; }
  .casino { padding-top: 16px; }
  .table { height: 530px; }
  .dealer-zone { top: 35px; }
  .felt-print { top: 142px; }
  .round-message { top: 268px; }
  .player-hands { top: 315px; }
  .hand-result { margin-top: 7px; }
  .table:has(.hand) .bet-zone { bottom: 35px; }
  .console { margin-top: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
