:root {
  color-scheme: dark;
  --bg: #080b10;
  --surface: #0d1016;
  --surface-2: #111620;
  --surface-3: #151b27;
  --table: #080b10;
  --table-2: #101722;
  --line: rgba(232, 236, 243, 0.12);
  --line-2: rgba(232, 236, 243, 0.22);
  --text: #f3f5f8;
  --muted: #88919f;
  --soft: #c2c8d1;
  --gold: #c9ad69;
  --gold-2: #e3cc8f;
  --card: #f4efe6;
  --ink: #111217;
  --red: #9d3538;
  --blue: #87b7e8;
  --bad: #d16060;
  --play-w: 690px;
  --stats-w: 172px;
  --table-size: 1;
  --table-scale: 1;
  --table-scale-inverse: 1;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --shadow-fine: 0 1px 1px rgba(0, 0, 0, 0.34);
  --shadow-low: 0 6px 16px rgba(0, 0, 0, 0.28);
  --shadow-mid: 0 12px 28px rgba(0, 0, 0, 0.34);
  --shadow-high: 0 22px 54px rgba(0, 0, 0, 0.46);
  --shadow-card: 0 1px 1px rgba(255, 255, 255, 0.12) inset, 0 10px 24px rgba(0, 0, 0, 0.34), 0 2px 4px rgba(0, 0, 0, 0.28);
  --shadow-card-hover: 0 1px 1px rgba(255, 255, 255, 0.16) inset, 0 18px 34px rgba(0, 0, 0, 0.42), 0 5px 10px rgba(0, 0, 0, 0.32);
  --shadow-chip: inset 0 0 0 6px rgba(0, 0, 0, 0.16), inset 0 0 0 9px rgba(255, 255, 255, 0.045), 0 9px 20px rgba(0, 0, 0, 0.34), 0 2px 4px rgba(0, 0, 0, 0.28);
  --shadow-chip-hover: inset 0 0 0 6px rgba(0, 0, 0, 0.14), inset 0 0 0 9px rgba(255, 255, 255, 0.06), 0 15px 28px rgba(0, 0, 0, 0.42), 0 5px 10px rgba(0, 0, 0, 0.3);
  --shadow-control: inset 0 1px 0 rgba(255, 255, 255, 0.035), 0 8px 18px rgba(0, 0, 0, 0.28), 0 1px 2px rgba(0, 0, 0, 0.24);
  --shadow-control-hover: inset 0 1px 0 rgba(255, 255, 255, 0.055), 0 12px 24px rgba(0, 0, 0, 0.34), 0 3px 7px rgba(0, 0, 0, 0.26);
  --text-depth: 0 1px 1px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

html:fullscreen,
html:fullscreen body,
body.is-fullscreen {
  background: var(--bg);
}

html:fullscreen .shell {
  min-height: 100vh;
  background: var(--bg);
}

button,
input,
select {
  font: inherit;
}

button {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.shell {
  display: grid;
  grid-template-rows: minmax(0, auto);
  gap: 0;
  align-content: center;
  width: 100%;
  min-height: 100svh;
  margin: 0 auto;
  padding: 8px 0;
}

.topbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  justify-self: center;
  width: min(calc(var(--play-w) + var(--stats-w)), calc(100% - 24px));
  min-height: 28px;
}

.wager-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  min-height: 20px;
}

.meter {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.meter {
  min-height: 20px;
  padding: 0 2px;
  display: flex;
  align-items: center;
}

.meter span,
.eyebrow {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: uppercase;
}

.meter span {
  margin-bottom: 3px;
}

.meter strong {
  display: block;
  color: rgba(243, 245, 248, 0.72);
  font-size: 0.82rem;
  line-height: 1.1;
  text-shadow: var(--text-depth);
}

.meter strong.is-pulsing {
  animation: valuePulse 240ms var(--ease);
}

.play-layout {
  position: relative;
  display: block;
  align-self: center;
  justify-self: center;
  width: min(calc(var(--play-w) * var(--table-size) * var(--table-scale)), calc(100% - 24px - var(--stats-w) * var(--table-scale)));
  height: min(calc(790px * var(--table-size) * var(--table-scale)), calc(100svh - 16px));
  min-height: min(calc(690px * var(--table-size) * var(--table-scale)), calc(100svh - 16px));
}

.table-shell {
  position: relative;
  width: calc(100% * var(--table-scale-inverse));
  height: calc(100% * var(--table-scale-inverse));
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  isolation: isolate;
  transform: scale(var(--table-scale));
  transform-origin: top left;
}

.table-brand {
  position: absolute;
  top: 13px;
  left: 18px;
  z-index: 9;
  display: block;
  width: 96px;
  line-height: 1;
  text-decoration: none;
  opacity: 0.58;
  transition: opacity 130ms var(--ease);
}

.table-brand:hover,
.table-brand:focus-visible {
  outline: 0;
  opacity: 0.86;
}

.table-brand picture,
.table-brand-logo {
  display: block;
  width: 100%;
}

.table-brand-logo {
  height: auto;
}

.table-shell::before {
  content: "";
  position: absolute;
  z-index: 0;
  pointer-events: none;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.table-shell::before {
  top: 50%;
  left: 50%;
  width: min(620px, 86%);
  aspect-ratio: 1;
  background-image: url("assets/chip-sword-template-20260710a.webp");
  filter: grayscale(1) saturate(0) contrast(1.52) brightness(0.34);
  mix-blend-mode: screen;
  opacity: 0.048;
  transform: translate(-50%, -50%);
  mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.88) 0 30%, rgba(0, 0, 0, 0.42) 48%, rgba(0, 0, 0, 0.1) 62%, transparent 76%);
  -webkit-mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.88) 0 30%, rgba(0, 0, 0, 0.42) 48%, rgba(0, 0, 0, 0.1) 62%, transparent 76%);
}

.table-shell::after {
  content: none;
}

.felt {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: 220px 10px minmax(232px, 1fr) 168px;
  gap: 6px;
  height: 100%;
  min-height: 0;
  padding: 14px 18px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
}

.felt::before {
  content: none;
}

.felt::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: transparent;
  opacity: 0;
  pointer-events: none;
}

.felt.result-win::after,
.felt.result-blackjack::after,
.felt.result-refill::after {
  animation: tableFlashGold 720ms var(--ease);
}

.felt.result-lose::after {
  animation: tableFlashRed 620ms var(--ease);
}

.felt.result-push::after,
.felt.result-mixed::after {
  animation: tableFlashNeutral 620ms var(--ease);
}

.dealer-zone,
.player-zone,
.controls,
.table-center {
  position: relative;
  z-index: 1;
}

.dealer-zone,
.player-zone {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 16px;
  min-width: 0;
  overflow: visible;
}

.dealer-zone {
  padding-top: 34px;
}

.dealer-zone .lane-heading,
.dealer-zone .result-banner,
.dealer-zone .cards {
  position: relative;
  z-index: 1;
}

.shoe {
  position: absolute;
  top: 70px;
  right: clamp(2px, 5%, 36px);
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 8px;
  opacity: 0.84;
  pointer-events: auto;
  cursor: default;
  transition: opacity 150ms var(--ease), transform 150ms var(--ease);
}

.shoe-stack {
  position: relative;
  width: 50px;
  height: 70px;
  border: 1px solid rgba(232, 236, 243, 0.24);
  border-radius: 9px;
  background: #0a0b0f url("assets/card-back-sword-20260710r.webp") center / cover no-repeat;
  box-shadow: -5px 5px 0 rgba(232, 236, 243, 0.14), -10px 10px 0 rgba(232, 236, 243, 0.08), 0 18px 34px rgba(0, 0, 0, 0.46), 0 4px 10px rgba(0, 0, 0, 0.34);
  transform: translateZ(0);
  transition: transform 150ms var(--ease), border-color 150ms var(--ease), box-shadow 150ms var(--ease), filter 150ms var(--ease);
  will-change: transform;
}

.shoe-stack::after {
  content: none;
}

.shoe-meta {
  display: grid;
  justify-items: center;
  gap: 3px;
  color: rgba(136, 145, 159, 0.62);
  font-size: 0.58rem;
  font-weight: 780;
  line-height: 1;
  text-shadow: var(--text-depth);
  text-transform: uppercase;
}

.shoe-meta strong {
  color: rgba(194, 200, 209, 0.72);
  font-size: 0.72rem;
}

.shoe-xray {
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 10px;
  min-width: 128px;
  padding-top: 1px;
  color: rgba(136, 145, 159, 0.7);
  font-size: 0.58rem;
  line-height: 1;
  text-align: left;
  text-shadow: var(--text-depth);
  text-transform: uppercase;
}

.shoe.has-xray .shoe-xray {
  display: grid;
}

.shoe-xray div {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 5px;
  min-width: 0;
}

.shoe-xray strong {
  overflow: hidden;
  color: rgba(227, 204, 143, 0.78);
  font-size: 0.64rem;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shoe.is-shuffling .shoe-stack {
  border-color: rgba(227, 204, 143, 0.5);
  animation: shoeShuffle 640ms var(--ease) both;
}

.shoe.is-shuffling .shoe-meta strong {
  color: rgba(227, 204, 143, 0.88);
}

.shoe:hover .shoe-stack,
.shoe:focus-within .shoe-stack {
  border-color: rgba(232, 236, 243, 0.4);
  filter: brightness(1.08);
  box-shadow: -5px 5px 0 rgba(232, 236, 243, 0.16), -10px 10px 0 rgba(232, 236, 243, 0.09), 0 20px 38px rgba(0, 0, 0, 0.5), 0 6px 12px rgba(0, 0, 0, 0.34);
  transform: translateY(-3px) rotate(1deg);
}

.shoe:hover .shoe-meta,
.shoe:focus-within .shoe-meta {
  color: rgba(194, 200, 209, 0.78);
}

.shoe:hover,
.shoe:focus-within {
  opacity: 1;
}

.shuffle-overlay {
  position: absolute;
  inset: 0;
  z-index: 7;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  color: var(--text);
  background: rgba(8, 11, 16, 0.56);
  opacity: 0;
  pointer-events: none;
  text-align: center;
  text-shadow: var(--text-depth);
  transform: scale(0.985);
  transition: opacity 180ms var(--ease), transform 180ms var(--ease);
}

.shuffle-overlay.is-visible {
  opacity: 1;
  transform: scale(1);
}

.shuffle-card-stack {
  position: relative;
  width: clamp(72px, 12vw, 98px);
  height: clamp(102px, 17vw, 138px);
  border: 1px solid rgba(232, 236, 243, 0.36);
  border-radius: 11px;
  background: #0a0b0f url("assets/card-back-sword-20260710r.webp") center / cover no-repeat;
  box-shadow: -8px 8px 0 rgba(232, 236, 243, 0.14), -16px 16px 0 rgba(232, 236, 243, 0.08), 0 28px 60px rgba(0, 0, 0, 0.58), 0 9px 20px rgba(0, 0, 0, 0.42);
  transform-origin: center;
  animation: centerShoeShuffle 980ms var(--ease) infinite;
}

.shuffle-card-stack::before,
.shuffle-card-stack::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(232, 236, 243, 0.28);
  border-radius: inherit;
  background: inherit;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.34);
}

.shuffle-card-stack::before {
  transform: translateX(-18px) rotate(-8deg);
}

.shuffle-card-stack::after {
  transform: translateX(18px) rotate(8deg);
}

.shuffle-overlay strong {
  color: rgba(243, 245, 248, 0.88);
  font-size: 1rem;
  font-weight: 860;
  line-height: 1;
  text-transform: uppercase;
}

.shuffle-overlay span {
  color: rgba(194, 200, 209, 0.62);
  font-size: 0.66rem;
  font-weight: 780;
  line-height: 1;
  text-transform: uppercase;
}

.player-zone {
  align-content: center;
  gap: 8px;
}

.lane-heading {
  display: grid;
  justify-items: center;
  gap: 0;
  height: 28px;
  text-align: center;
}

.lane-heading strong {
  color: var(--text);
  font-size: clamp(1.42rem, 4.3vw, 1.86rem);
  line-height: 1;
  text-shadow: var(--text-depth);
}

.lane-heading strong:empty {
  opacity: 0;
}

.felt:not(.show-totals) .lane-heading {
  height: 0;
  opacity: 0;
  overflow: hidden;
}

.felt:not(.show-totals) .dealer-zone,
.felt:not(.show-totals) .player-zone {
  gap: 8px;
}

.cards {
  --card-w: clamp(64px, 11.8vw, 82px);
  --card-h: calc(var(--card-w) * 1.45);
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 130px;
  min-width: 0;
  overflow: visible;
}

.cards .card + .card {
  margin-left: clamp(-24px, -3.4vw, -14px);
}

.hands {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  align-content: center;
  gap: 10px;
  width: 100%;
  height: auto;
  min-height: 0;
  padding: 0 2px;
  overflow: visible;
  scrollbar-width: thin;
  scrollbar-color: rgba(232, 236, 243, 0.18) transparent;
}

.hands.split-hands {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(126px, 1fr);
  align-content: center;
  align-items: center;
  justify-items: stretch;
  gap: 8px 10px;
  height: 100%;
  overflow: visible;
}

.hand {
  position: relative;
  display: grid;
  grid-template-rows: 24px 1fr 36px;
  justify-items: center;
  width: min(100%, 484px);
  height: 220px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  transition: opacity 140ms var(--ease);
}

.hand.active::before,
.hand.compact.active::before {
  content: none;
}

.hand.compact {
  grid-template-rows: 0 1fr 36px;
}

.hand.active {
  background: transparent;
}

.hand.win,
.hand.blackjack {
  border-color: transparent;
}

.hand.lose,
.hand.bust {
  border-color: transparent;
}

.hand.push {
  border-color: transparent;
}

.hand-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: min(100%, 420px);
  height: 26px;
  margin-bottom: 0;
  color: rgba(194, 200, 209, 0.58);
  font-size: 0.72rem;
  overflow: hidden;
  text-align: center;
}

.hand-top > div {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 7px;
  min-width: 0;
}

.hand-top strong {
  color: rgba(243, 245, 248, 0.78);
  font-size: 0.74rem;
}

.hand-top.is-empty {
  visibility: hidden;
  height: 0;
}

.hand .cards {
  height: 146px;
}

.hands.split-hands .hand {
  grid-template-rows: 20px 1fr 28px;
  width: 100%;
  height: 126px;
}

.hands.split-hands .hand-top {
  width: 100%;
  height: 20px;
  font-size: 0.62rem;
}

.hands.split-hands .hand-top strong {
  font-size: 0.64rem;
}

.hands.split-hands .hand .cards {
  --card-w: clamp(46px, 7.8vw, 60px);
  height: 78px;
}

.hands.split-hands .cards .card + .card {
  margin-left: clamp(-20px, -2.8vw, -12px);
}

.hands.split-hands .hand-bet {
  height: 28px;
}

.hands.split-hands .hand-bet .bet-chip {
  width: 28px;
  margin-left: -7px;
  font-size: 0.44rem;
}

.hand-bet,
.table-wager {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.hand-bet {
  height: 36px;
  transform: translateY(-2px);
}

.hand-bet.is-empty {
  visibility: hidden;
}

.table-wager-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 46px;
  margin-top: -14px;
  min-width: 0;
}

.table-wager {
  height: 46px;
  margin-top: 0;
  gap: 8px;
}

.table-wager.is-empty {
  visibility: hidden;
}

.table-wager.multi-wager {
  gap: 6px;
}

.bet-spot {
  position: relative;
  display: grid;
  grid-template-rows: 10px 1fr;
  place-items: center;
  min-width: 54px;
  height: 46px;
  padding: 0 4px 1px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: rgba(194, 200, 209, 0.62);
  cursor: pointer;
  transition: background 140ms var(--ease), border-color 140ms var(--ease), box-shadow 140ms var(--ease), opacity 140ms var(--ease), transform 140ms var(--ease);
}

.bet-spot:hover,
.bet-spot:focus-visible {
  border-color: rgba(194, 200, 209, 0.22);
  background: rgba(17, 22, 32, 0.46);
  box-shadow: var(--shadow-low);
  outline: 0;
  transform: translateY(-1px);
}

.bet-spot:active {
  transform: translateY(0) scale(0.995);
}

.bet-spot.active {
  border-color: rgba(227, 204, 143, 0.46);
  background: rgba(201, 173, 105, 0.08);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
}

.spot-label {
  color: rgba(194, 200, 209, 0.52);
  font-size: 0.52rem;
  font-weight: 820;
  line-height: 1;
}

.spot-chips {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.spot-empty {
  display: block;
  width: 28px;
  aspect-ratio: 1;
  border: 1px dashed rgba(232, 236, 243, 0.18);
  border-radius: 999px;
}

.bet-spot.active .spot-empty {
  border-color: rgba(227, 204, 143, 0.44);
}

.table-bet-amount {
  min-width: 58px;
  color: rgba(227, 204, 143, 0.78);
  font-size: 0.78rem;
  font-weight: 840;
  line-height: 1;
  text-align: left;
  text-shadow: var(--text-depth);
}

.table-bet-amount.is-empty {
  visibility: hidden;
}

.bet-chip {
  --chip-body: #242a33;
  --chip-text: #f6f3ea;
  --chip-border: rgba(232, 236, 243, 0.22);
  position: relative;
  display: grid;
  place-items: center;
  width: 38px;
  aspect-ratio: 1;
  margin-left: -8px;
  padding: 0;
  appearance: none;
  border: 1px solid var(--chip-border);
  border-radius: 999px;
  color: var(--chip-text);
  background-color: var(--chip-body);
  background-image: url("assets/chip-sword-template-20260710a.webp");
  background-position: center;
  background-size: cover;
  background-blend-mode: luminosity;
  box-shadow: var(--shadow-chip);
  font-size: 0.56rem;
  font-weight: 860;
  line-height: 1;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.72), 0 0 5px rgba(0, 0, 0, 0.34);
  cursor: default;
  overflow: hidden;
  isolation: isolate;
  transition: transform 140ms var(--ease), border-color 140ms var(--ease), filter 140ms var(--ease), box-shadow 140ms var(--ease), opacity 140ms var(--ease);
}

.bet-chip:first-child {
  margin-left: 0;
}

.bet-chip::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: url("assets/chip-sword-template-20260710a.webp") center / cover no-repeat;
  mix-blend-mode: screen;
  opacity: 0.24;
  pointer-events: none;
}

.bet-chip::after {
  content: "";
  position: absolute;
  inset: 7%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.1), inset 0 -10px 16px rgba(0, 0, 0, 0.2);
  opacity: 0.64;
  pointer-events: none;
}

.chip-label {
  position: relative;
  z-index: 2;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 1.22em;
  max-width: 82%;
  padding: 0 2px;
  border-radius: 4px;
  background: rgba(3, 5, 9, 0.34);
  color: inherit;
  line-height: 1;
  text-align: center;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.86), 0 0 5px rgba(0, 0, 0, 0.52);
  white-space: nowrap;
}

.chip-value-0-5 .chip-label,
.chip-value-2-5 .chip-label,
.chip-value-1000 .chip-label,
.chip-value-5000 .chip-label,
.chip-value-10000 .chip-label,
.chip-value-25000 .chip-label,
.chip-value-50000 .chip-label,
.chip-value-100000 .chip-label,
.chip-value-250000 .chip-label,
.chip-value-500000 .chip-label,
.chip-value-1000000 .chip-label {
  font-size: 0.82em;
}

.hand-bet .bet-chip {
  width: 36px;
  pointer-events: none;
}

.table-wager .bet-chip {
  width: 44px;
  margin-left: -9px;
  border-color: rgba(232, 236, 243, 0.2);
  font-size: 0.6rem;
  cursor: pointer;
  pointer-events: auto;
}

.table-wager .bet-chip:hover:not(:disabled),
.table-wager .bet-chip:focus-visible {
  z-index: 2;
  border-color: rgba(232, 236, 243, 0.56);
  filter: brightness(1.08);
  box-shadow: var(--shadow-chip-hover);
  transform: translateY(-4px) scale(1.05);
}

.table-wager .bet-chip:active:not(:disabled) {
  transform: translateY(-1px) scale(0.98);
}

.table-wager .bet-chip:disabled {
  cursor: default;
  opacity: 0.56;
}

.result-tag {
  min-width: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: rgba(194, 200, 209, 0.58);
  background: transparent;
  font-size: 0.66rem;
  font-weight: 800;
  text-align: center;
}

.result-tag.win,
.result-tag.blackjack {
  color: #c5e1fb;
  border-color: rgba(135, 183, 232, 0.58);
}

.result-tag.lose,
.result-tag.bust,
.result-tag.surrender {
  color: #f0b8b8;
  border-color: rgba(209, 96, 96, 0.58);
}

.result-tag.push {
  color: var(--gold-2);
  border-color: rgba(227, 204, 143, 0.5);
}

.surrender-inline {
  min-height: 22px;
  min-width: 68px;
  padding: 0 7px;
  border: 1px solid rgba(209, 96, 96, 0.28);
  border-radius: 999px;
  color: rgba(240, 184, 184, 0.82);
  background: rgba(13, 18, 26, 0.8);
  box-shadow: var(--shadow-low);
  cursor: pointer;
  font-size: 0.5rem;
  font-weight: 820;
  line-height: 1;
  text-transform: uppercase;
  transition: background 130ms var(--ease), border-color 130ms var(--ease), box-shadow 130ms var(--ease), color 130ms var(--ease), transform 130ms var(--ease);
}

.surrender-inline:hover,
.surrender-inline:focus-visible {
  border-color: rgba(240, 184, 184, 0.44);
  color: #f6d0d0;
  background: rgba(30, 20, 24, 0.9);
  box-shadow: var(--shadow-mid);
  transform: translateY(-1px);
}

.surrender-inline:active {
  transform: translateY(1px) scale(0.99);
}

.hand-pointer {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 4;
  width: 20px;
  height: 52px;
  opacity: 0;
  pointer-events: none;
  filter: drop-shadow(0 5px 8px rgba(0, 0, 0, 0.38));
  transform: translate3d(var(--pointer-x, 0px), calc(var(--pointer-y, 0px) - 26px), 0);
  transition: transform 260ms var(--ease), opacity 150ms var(--ease);
}

.hand-pointer.is-visible {
  opacity: 1;
}

.hand-pointer::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 2px;
  width: 3px;
  border-radius: 999px;
  background: rgba(227, 204, 143, 0.84);
}

.hand-pointer::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 7px;
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 9px solid rgba(227, 204, 143, 0.84);
  transform: translateY(-50%);
}

.card {
  position: relative;
  flex: 0 0 auto;
  width: var(--card-w);
  height: var(--card-h);
  border: 1px solid rgba(12, 13, 16, 0.18);
  border-radius: 9px;
  color: var(--ink);
  background: var(--card);
  box-shadow: var(--shadow-card);
  transform: translateZ(0) rotate(var(--rot, -1deg));
  user-select: none;
  will-change: transform;
  transition: transform 150ms var(--ease), box-shadow 150ms var(--ease), border-color 150ms var(--ease), filter 150ms var(--ease);
}

.card:hover {
  z-index: 3;
  border-color: rgba(227, 204, 143, 0.42);
  filter: brightness(1.025);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-5px) scale(1.025) rotate(var(--rot, -1deg));
}

.card:active {
  transform: translateY(-2px) scale(1.012) rotate(var(--rot, -1deg));
}

.card.red {
  color: var(--red);
}

.card.black {
  color: #111217;
}

.card.rot-0 {
  --rot: -2deg;
}

.card.rot-1 {
  --rot: -1deg;
}

.card.rot-2 {
  --rot: 0deg;
}

.card.rot-3 {
  --rot: 1deg;
}

.card.rot-4 {
  --rot: 2deg;
}

.card.is-new {
  animation: dealIn 170ms var(--ease) both;
}

.card.from-shoe {
  opacity: 0;
  transform: translate3d(var(--deal-x, 0), var(--deal-y, 0), 0) rotate(var(--rot, -1deg)) scale(0.92);
}

.card.from-shoe.is-new {
  animation: dealFromShoe 190ms var(--ease) both;
}

.card.hidden {
  color: transparent;
  background: #0a0b0f url("assets/card-back-sword-20260710r.webp") center / cover no-repeat;
  border-color: rgba(232, 236, 243, 0.2);
}

.card.hidden::before {
  content: none;
}

.card.hidden::after {
  content: none;
}

.dealer-zone .card.hidden {
  z-index: 1;
}

.dealer-zone .card:not(.hidden) {
  z-index: 2;
}

.dealer-zone .card:hover {
  z-index: 4;
}

.corner {
  position: absolute;
  top: 8px;
  left: 9px;
  display: grid;
  line-height: 1;
  text-align: center;
  font-weight: 860;
}

.corner.bottom {
  top: auto;
  right: 9px;
  bottom: 8px;
  left: auto;
  transform: rotate(180deg);
}

.rank {
  font-size: clamp(0.82rem, 2.5vw, 0.98rem);
}

.suit {
  margin-top: 3px;
  font-size: clamp(0.74rem, 2.2vw, 0.88rem);
}

.pip {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.78rem, 4.6vw, 2.28rem);
}

.table-center {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 0;
  min-height: 0;
}

.result-banner {
  display: grid;
  place-items: center;
  min-height: 22px;
  color: rgba(194, 200, 209, 0.72);
  font-size: 0.78rem;
  font-weight: 820;
  line-height: 1;
  text-align: center;
  text-shadow: var(--text-depth);
  transition: color 150ms var(--ease), opacity 150ms var(--ease);
}

.result-banner:empty {
  visibility: hidden;
}

.result-banner.is-win {
  color: rgba(227, 204, 143, 0.82);
}

.result-banner.is-lose {
  color: rgba(240, 184, 184, 0.76);
}

.result-banner.is-push {
  color: rgba(194, 200, 209, 0.64);
}

.dealer-zone .result-payout {
  position: absolute;
  top: 12px;
  left: 50%;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(-4px);
  transition: opacity 180ms var(--ease), transform 180ms var(--ease);
}

.felt.show-totals .dealer-zone .result-payout {
  top: 78px;
  left: calc(50% - clamp(116px, 18vw, 142px));
}

.result-payout.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.result-payout .payout-chip {
  width: 26px;
  margin-left: -5px;
  border-color: rgba(227, 204, 143, 0.28);
  font-size: 0.4rem;
  box-shadow: var(--shadow-chip);
}

.result-payout .payout-chip:first-child {
  margin-left: 0;
}

.status-pill {
  width: min(340px, 100%);
  min-height: 22px;
  padding: 0 8px;
  border: 0;
  border-radius: 0;
  color: rgba(227, 204, 143, 0.62);
  background: transparent;
  font-size: 0.74rem;
  font-weight: 760;
  text-align: center;
  text-shadow: var(--text-depth);
}

.status-pill:empty {
  visibility: hidden;
}

.table-emblem {
  display: none;
  place-items: center;
  width: auto;
  height: 18px;
  border: 0;
  border-radius: 0;
  color: rgba(227, 204, 143, 0.44);
  background: transparent;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.82rem;
  font-weight: 800;
}

.controls {
  display: grid;
  grid-template-rows: 20px 86px 44px;
  gap: 7px;
  width: min(100%, 520px);
  height: 164px;
  justify-self: center;
  align-self: end;
  overflow: visible;
}

.wager-row {
  display: grid;
  grid-template-columns: 1fr 42px;
  align-items: center;
  gap: 6px;
  height: 86px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.chips {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  align-content: center;
  gap: 5px;
  justify-self: center;
  width: 100%;
  height: 84px;
  min-width: 0;
  max-width: 100%;
}

.chip {
  --chip-body: #242a33;
  --chip-text: #f6f3ea;
  --chip-border: rgba(232, 236, 243, 0.24);
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  width: 48px;
  justify-self: center;
  border: 1px solid var(--chip-border);
  border-radius: 999px;
  color: var(--chip-text);
  background-color: var(--chip-body);
  background-image: url("assets/chip-sword-template-20260710a.webp");
  background-position: center;
  background-size: cover;
  background-blend-mode: luminosity;
  box-shadow: var(--shadow-chip);
  font-size: 0.66rem;
  font-weight: 860;
  line-height: 1;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.72), 0 0 5px rgba(0, 0, 0, 0.34);
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  will-change: transform;
  transition: transform 140ms var(--ease), border-color 140ms var(--ease), opacity 140ms var(--ease), box-shadow 140ms var(--ease), filter 140ms var(--ease);
}

.chip::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: url("assets/chip-sword-template-20260710a.webp") center / cover no-repeat;
  mix-blend-mode: screen;
  opacity: 0.24;
  pointer-events: none;
}

.chip::after {
  content: "";
  position: absolute;
  inset: 7%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.1), inset 0 -10px 16px rgba(0, 0, 0, 0.2);
  opacity: 0.64;
  pointer-events: none;
}

.chip-value-0-5,
.chip-value-2-5 {
  --chip-body: #d4879c;
  --chip-text: #f7edf1;
  --chip-border: rgba(244, 194, 209, 0.58);
}

.chip-value-1 {
  --chip-body: #d6d8d4;
  --chip-text: #f7f8f6;
  --chip-border: rgba(255, 255, 255, 0.58);
}

.chip-value-5 {
  --chip-body: #8d2631;
  --chip-border: rgba(224, 104, 116, 0.46);
}

.chip-value-25 {
  --chip-body: #186346;
  --chip-border: rgba(92, 185, 145, 0.42);
}

.chip-value-100 {
  --chip-body: #141820;
  --chip-border: rgba(232, 236, 243, 0.26);
}

.chip-value-500 {
  --chip-body: #58467b;
  --chip-border: rgba(172, 150, 218, 0.42);
}

.chip-value-1000 {
  --chip-body: #bd8f30;
  --chip-text: #f8eed1;
  --chip-border: rgba(239, 204, 122, 0.56);
}

.chip-value-5000 {
  --chip-body: #9b4d2f;
  --chip-border: rgba(227, 136, 91, 0.46);
}

.chip-value-10000 {
  --chip-body: #1f5f87;
  --chip-border: rgba(111, 183, 228, 0.42);
}

.chip-value-25000 {
  --chip-body: #72315d;
  --chip-border: rgba(209, 124, 178, 0.46);
}

.chip-value-50000 {
  --chip-body: #5c6c74;
  --chip-border: rgba(178, 196, 205, 0.48);
}

.chip-value-100000 {
  --chip-body: #d3d4d0;
  --chip-text: #f4f6f8;
  --chip-border: rgba(255, 255, 255, 0.62);
}

.chip-value-250000 {
  --chip-body: #286f66;
  --chip-border: rgba(112, 204, 191, 0.5);
}

.chip-value-500000 {
  --chip-body: #813b45;
  --chip-border: rgba(221, 126, 139, 0.48);
}

.chip-value-1000000 {
  --chip-body: #8d96a0;
  --chip-border: rgba(221, 229, 237, 0.56);
}

.chips[data-count="6"] .chip,
.chips[data-count="7"] .chip {
  width: 44px;
  font-size: 0.6rem;
}

.chips[data-count="8"],
.chips[data-count="9"],
.chips[data-count="10"] {
  max-width: 246px;
}

.chips[data-count="11"],
.chips[data-count="12"],
.chips[data-count="13"] {
  max-width: 382px;
  gap: 4px;
}

.chips[data-count="14"] {
  max-width: 304px;
  gap: 4px;
}

.chips[data-count="8"] .chip,
.chips[data-count="9"] .chip,
.chips[data-count="10"] .chip {
  width: 40px;
  font-size: 0.54rem;
}

.chips[data-count="11"] .chip,
.chips[data-count="12"] .chip,
.chips[data-count="13"] .chip {
  width: 36px;
  font-size: 0.47rem;
}

.chips[data-count="14"] .chip {
  width: 40px;
  font-size: 0.54rem;
}

.chip:hover:not(:disabled),
.chip:focus-visible {
  transform: translateY(-5px) scale(1.045);
  border-color: rgba(227, 204, 143, 0.68);
  filter: brightness(1.08);
  box-shadow: var(--shadow-chip-hover);
}

.chip:active:not(:disabled) {
  transform: translateY(-2px) scale(0.985);
}

.chip-ghost {
  --chip-body: #242a33;
  --chip-text: #f6f3ea;
  --chip-border: rgba(232, 236, 243, 0.24);
  position: fixed;
  z-index: 30;
  display: grid;
  place-items: center;
  margin: 0;
  border: 1px solid var(--chip-border);
  border-radius: 999px;
  color: var(--chip-text);
  background-color: var(--chip-body);
  background-image: url("assets/chip-sword-template-20260710a.webp");
  background-position: center;
  background-size: cover;
  background-blend-mode: luminosity;
  box-shadow: var(--shadow-chip-hover);
  font-size: 0.62rem;
  font-weight: 860;
  line-height: 1;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.72), 0 0 5px rgba(0, 0, 0, 0.34);
  pointer-events: none;
  overflow: hidden;
  isolation: isolate;
  will-change: transform, opacity;
  animation: chipTransfer 280ms var(--ease) forwards;
}

.chip-ghost::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: url("assets/chip-sword-template-20260710a.webp") center / cover no-repeat;
  mix-blend-mode: screen;
  opacity: 0.24;
  pointer-events: none;
}

.chip-ghost::after {
  content: "";
  position: absolute;
  inset: 7%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.1), inset 0 -10px 16px rgba(0, 0, 0, 0.2);
  opacity: 0.64;
  pointer-events: none;
}

.actions-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  height: 44px;
}

.actions-panel.is-playing {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.actions-panel.is-playing.needs-buy-in {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.actions-panel.is-insurance {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.actions-panel.is-insurance.needs-buy-in {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.player-action,
.insurance-action {
  display: none;
}

.actions-panel.is-playing .player-action,
.actions-panel.is-insurance .insurance-action {
  display: block;
}

.surrender-action {
  display: none !important;
}

.buy-in-action {
  display: none;
}

.actions-panel.is-playing:not(.needs-buy-in) .buy-in-action {
  display: none;
}

.actions-panel.is-insurance:not(.needs-buy-in) .buy-in-action {
  display: none;
}

.actions-panel.is-round .deal-action {
  display: none;
}

.refill-action {
  display: none;
}

.actions-panel.needs-refill .deal:not(.refill-action) {
  display: none;
}

.actions-panel.needs-refill .refill-action {
  display: block;
}

.action,
.ghost-button,
.icon-button {
  min-width: 0;
  border: 1px solid rgba(232, 236, 243, 0.1);
  border-radius: 8px;
  color: var(--text);
  background: #101620;
  box-shadow: var(--shadow-control);
  cursor: pointer;
  font-weight: 830;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: background 130ms var(--ease), border-color 130ms var(--ease), box-shadow 130ms var(--ease), color 130ms var(--ease), opacity 130ms var(--ease), transform 130ms var(--ease);
}

.action,
.ghost-button {
  min-height: 44px;
  padding: 0 8px;
  font-size: 0.78rem;
}

.actions-panel.is-playing.needs-buy-in .action,
.actions-panel.is-insurance.needs-buy-in .action {
  padding: 0 5px;
  font-size: 0.68rem;
}

.action:hover:not(:disabled),
.ghost-button:hover:not(:disabled),
.icon-button:hover:not(:disabled),
.action:focus-visible,
.ghost-button:focus-visible,
.icon-button:focus-visible {
  border-color: rgba(135, 183, 232, 0.28);
  color: #ffffff;
  background: #151d2a;
  box-shadow: var(--shadow-control-hover);
  transform: translateY(-1px);
}

.action:active:not(:disabled),
.ghost-button:active:not(:disabled),
.icon-button:active:not(:disabled) {
  transform: translateY(1px) scale(0.99);
}

.action.deal {
  color: #0c0d10;
  background: var(--gold);
  border-color: transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 10px 22px rgba(0, 0, 0, 0.34), 0 2px 5px rgba(0, 0, 0, 0.26);
}

.action.deal:hover:not(:disabled),
.action.deal:focus-visible {
  border-color: rgba(255, 255, 255, 0.18);
  color: #080a0e;
  background: #d6bf7a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 14px 28px rgba(0, 0, 0, 0.4), 0 4px 9px rgba(0, 0, 0, 0.3);
}

.action.refill-action {
  color: #090b0f;
  background: var(--gold-2);
}

.action.refill-action:hover:not(:disabled),
.action.refill-action:focus-visible {
  color: #07090c;
  background: #edd99a;
}

.ghost-button {
  width: 100%;
  padding: 0 10px;
  color: var(--soft);
  font-size: 0.76rem;
  background: #0d121a;
}

.ghost-button.is-confirming {
  border-color: rgba(227, 204, 143, 0.5);
  color: rgba(227, 204, 143, 0.9);
}

.clear-button {
  min-height: 44px;
  padding: 0;
  font-size: 1.18rem;
}

.clear-button:hover:not(:disabled),
.clear-button:focus-visible {
  border-color: rgba(194, 200, 209, 0.24);
  background: #141b26;
  box-shadow: var(--shadow-control-hover);
}

.chip:disabled,
.action:disabled,
.ghost-button:disabled {
  cursor: not-allowed;
  opacity: 0.36;
}

.stats-sidebar {
  position: absolute;
  top: 0;
  left: 100%;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: var(--stats-w);
  min-width: 0;
  height: calc(100% * var(--table-scale-inverse));
  padding: 16px 0 14px 18px;
  border-left: 1px solid var(--line);
  color: var(--text);
  background: transparent;
  box-shadow: -18px 0 34px -34px rgba(0, 0, 0, 0.92);
  transform: scale(var(--table-scale));
  transform-origin: top left;
}

.stats-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 28px;
}

.stats-head h2,
.stats-section h3 {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1;
}

.stats-head h2 {
  color: rgba(243, 245, 248, 0.78);
  text-shadow: var(--text-depth);
}

.fullscreen-toggle {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 26px;
  min-width: 26px;
  height: 26px;
  min-height: 26px;
  margin-left: auto;
  padding: 0;
  border: 0;
  border-radius: 6px;
  color: rgba(194, 200, 209, 0.64);
  background: transparent;
  box-shadow: none;
}

.fullscreen-toggle:hover:not(:disabled),
.fullscreen-toggle:focus-visible {
  color: rgba(243, 245, 248, 0.9);
  background: rgba(232, 236, 243, 0.06);
  box-shadow: none;
}

.fullscreen-glyph {
  display: block;
  width: 13px;
  height: 13px;
  background:
    linear-gradient(currentColor, currentColor) left top / 6px 1.5px no-repeat,
    linear-gradient(currentColor, currentColor) left top / 1.5px 6px no-repeat,
    linear-gradient(currentColor, currentColor) right top / 6px 1.5px no-repeat,
    linear-gradient(currentColor, currentColor) right top / 1.5px 6px no-repeat,
    linear-gradient(currentColor, currentColor) left bottom / 6px 1.5px no-repeat,
    linear-gradient(currentColor, currentColor) left bottom / 1.5px 6px no-repeat,
    linear-gradient(currentColor, currentColor) right bottom / 6px 1.5px no-repeat,
    linear-gradient(currentColor, currentColor) right bottom / 1.5px 6px no-repeat;
  opacity: 0.9;
  transition: transform 130ms var(--ease), opacity 130ms var(--ease);
}

.fullscreen-toggle.is-active .fullscreen-glyph {
  opacity: 1;
  transform: scale(0.82);
}

.stats-content {
  min-height: 0;
  overflow: hidden;
  padding-top: 10px;
}

.stats-section {
  padding: 15px 0 18px;
  border-top: 1px solid var(--line);
}

.stats-section + .stats-section {
  margin-top: 6px;
}

.stats-section h3 {
  color: rgba(194, 200, 209, 0.62);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.stats-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.text-reset {
  padding: 0;
  border: 0;
  color: rgba(136, 145, 159, 0.56);
  background: transparent;
  cursor: pointer;
  font-size: 0.58rem;
  font-weight: 820;
  line-height: 1.35;
  text-shadow: var(--text-depth);
  text-transform: uppercase;
  transition: color 130ms var(--ease), opacity 130ms var(--ease), transform 130ms var(--ease), text-shadow 130ms var(--ease);
}

.text-reset:hover,
.text-reset:focus-visible {
  color: rgba(194, 200, 209, 0.86);
  transform: translateY(-1px);
  outline: 0;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.52), 0 0 10px rgba(227, 204, 143, 0.08);
}

.text-reset:active:not(:disabled) {
  transform: translateY(1px);
}

.text-reset.is-confirming {
  color: rgba(227, 204, 143, 0.84);
}

.text-reset:disabled {
  cursor: not-allowed;
  opacity: 0.32;
}

.stats-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 9px;
}

.stats-mini-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 9px;
}

.stat {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
}

.stat-hero {
  margin-bottom: 13px;
  padding-bottom: 13px;
  border-bottom: 1px solid rgba(232, 236, 243, 0.08);
}

.stat span {
  display: block;
  margin-bottom: 3px;
  color: rgba(136, 145, 159, 0.78);
  font-size: 0.62rem;
  font-weight: 780;
  line-height: 1;
  text-transform: uppercase;
}

.stat strong {
  display: block;
  overflow: visible;
  color: rgba(243, 245, 248, 0.86);
  font-size: 0.92rem;
  line-height: 1.18;
  text-shadow: var(--text-depth);
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
}

.stat-hero strong {
  font-size: 1.34rem;
  letter-spacing: 0;
  line-height: 1.4;
}

.stats-total-strip {
  padding-top: 15px;
  padding-bottom: 18px;
}

.stats-total-strip .stats-title-row {
  margin-bottom: 10px;
}

.stats-total-strip .stat span {
  color: rgba(136, 145, 159, 0.62);
  font-size: 0.54rem;
}

.stats-total-strip .stat strong {
  color: rgba(243, 245, 248, 0.72);
  font-size: 0.78rem;
}

.buyin-strip {
  padding-top: 16px;
  padding-bottom: 2px;
}

.stats-total-strip + .buyin-strip {
  margin-top: 8px;
}

.buyin-strip .stats-title-row {
  margin-bottom: 8px;
}

.buyin-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.buyin-quick {
  min-width: 0;
  min-height: 24px;
  padding: 0 4px;
  border: 1px solid rgba(232, 236, 243, 0.08);
  border-radius: 7px;
  color: rgba(194, 200, 209, 0.7);
  background: rgba(16, 22, 32, 0.54);
  box-shadow: var(--shadow-low);
  font-size: 0.54rem;
  text-align: center;
  white-space: nowrap;
  transition: background 130ms var(--ease), border-color 130ms var(--ease), box-shadow 130ms var(--ease), color 130ms var(--ease), opacity 130ms var(--ease), transform 130ms var(--ease);
}

.buyin-quick:hover:not(:disabled),
.buyin-quick:focus-visible {
  border-color: rgba(227, 204, 143, 0.24);
  color: rgba(243, 245, 248, 0.86);
  background: rgba(21, 29, 42, 0.72);
  box-shadow: var(--shadow-control-hover);
  outline: 0;
  transform: translateY(-1px);
}

.buyin-quick:active:not(:disabled) {
  transform: translateY(1px) scale(0.99);
}

.buyin-quick:disabled {
  cursor: not-allowed;
  opacity: 0.32;
}

.cashout-stake {
  text-align: center;
}

.buyin-strip .cashout-stake {
  display: inline-grid;
  place-items: center;
  min-height: 24px;
  margin-top: 9px;
  color: rgba(194, 200, 209, 0.68);
}

.buyin-strip .cashout-stake:not(:disabled):hover,
.buyin-strip .cashout-stake:not(:disabled):focus-visible {
  color: rgba(243, 245, 248, 0.88);
}

.stat strong.is-positive {
  color: rgba(197, 225, 251, 0.9);
}

.stat strong.is-negative {
  color: rgba(240, 184, 184, 0.84);
}

.stats-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 7px 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.stats-actions .ghost-button,
.stats-actions .action {
  min-height: 38px;
}

.settings-inline,
.reset-table {
  flex: 0 0 auto;
}

.reset-table {
  margin-left: auto;
  text-align: right;
}

.settings-dialog {
  width: min(430px, calc(100% - 28px));
  max-height: calc(100svh - 28px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  background: #090c12;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.66), 0 10px 28px rgba(0, 0, 0, 0.46);
  overflow: hidden;
}

.settings-dialog::backdrop {
  background: rgba(0, 0, 0, 0.74);
}

.settings-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: 100%;
  max-height: inherit;
  min-width: 0;
  overflow: hidden;
  padding: 17px 18px 15px;
}

.settings-body {
  min-height: 0;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-color: rgba(232, 236, 243, 0.18) transparent;
}

.settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 32px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
}

.settings-head h2 {
  margin: 0;
  color: rgba(243, 245, 248, 0.8);
  font-size: 0.96rem;
  line-height: 1;
  text-shadow: var(--text-depth);
}

.settings-section {
  display: grid;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
  padding: 15px 0 17px;
  border-bottom: 1px solid var(--line);
}

.settings-section:last-of-type {
  padding-bottom: 16px;
}

.settings-tools {
  gap: 8px;
}

.settings-tools-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.settings-tools-grid .ghost-button {
  min-height: 34px;
  padding: 0 9px;
  font-size: 0.66rem;
}

.settings-note {
  max-width: 100%;
  color: rgba(136, 145, 159, 0.62);
  font-size: 0.62rem;
  font-weight: 720;
  line-height: 1.35;
}

.settings-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 1px;
}

.settings-title-row h3 {
  margin: 0;
  color: rgba(194, 200, 209, 0.62);
  font-size: 0.66rem;
  line-height: 1;
  text-transform: uppercase;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
  max-width: 100%;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(232, 236, 243, 0.08);
  border-radius: 7px;
  color: rgba(194, 200, 209, 0.62);
  background: rgba(16, 22, 32, 0.46);
  font-size: 1.05rem;
  line-height: 1;
  transition: background 130ms var(--ease), border-color 130ms var(--ease), box-shadow 130ms var(--ease), color 130ms var(--ease), transform 130ms var(--ease);
}

.icon-button:hover,
.icon-button:focus-visible {
  border-color: rgba(232, 236, 243, 0.18);
  color: rgba(243, 245, 248, 0.86);
  background: rgba(21, 29, 42, 0.7);
  box-shadow: var(--shadow-control-hover);
  outline: 0;
  transform: translateY(-1px);
}

.setting-field,
.toggle-row {
  display: grid;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  color: rgba(194, 200, 209, 0.72);
  font-size: 0.74rem;
  font-weight: 760;
}

.setting-field > span,
.toggle-row > span {
  min-width: 0;
  line-height: 1.18;
}

.setting-field input,
.setting-field select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: rgba(243, 245, 248, 0.86);
  background: rgba(16, 22, 32, 0.54);
  box-shadow: var(--shadow-low);
  padding: 0 10px;
  font-size: 0.76rem;
  font-weight: 780;
  transition: background 130ms var(--ease), border-color 130ms var(--ease), box-shadow 130ms var(--ease), color 130ms var(--ease), opacity 130ms var(--ease), transform 130ms var(--ease);
}

.setting-field:hover input:not([type="range"]):not(:disabled),
.setting-field:hover select:not(:disabled),
.setting-field input:not([type="range"]):focus-visible,
.setting-field select:focus-visible {
  border-color: rgba(135, 183, 232, 0.24);
  background: rgba(21, 29, 42, 0.72);
  box-shadow: var(--shadow-control-hover);
  outline: 0;
}

.setting-field:active input:not([type="range"]):not(:disabled),
.setting-field:active select:not(:disabled) {
  transform: translateY(1px);
}

.range-field > span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.range-field strong {
  flex: 0 0 auto;
  color: rgba(243, 245, 248, 0.72);
  font-size: 0.68rem;
  font-weight: 820;
}

.range-field input[type="range"] {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  accent-color: var(--gold);
  cursor: pointer;
  transition: filter 130ms var(--ease), opacity 130ms var(--ease);
}

.range-field:hover input[type="range"],
.range-field input[type="range"]:focus-visible {
  filter: brightness(1.1);
  outline: 0;
}

.range-field input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(232, 236, 243, 0.16);
}

.range-field input[type="range"]::-webkit-slider-thumb {
  width: 16px;
  height: 16px;
  margin-top: -6px;
  border: 1px solid rgba(232, 236, 243, 0.4);
  border-radius: 999px;
  background: var(--gold);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.34);
  transition: transform 130ms var(--ease), box-shadow 130ms var(--ease), border-color 130ms var(--ease);
  appearance: none;
}

.range-field:hover input[type="range"]::-webkit-slider-thumb,
.range-field input[type="range"]:focus-visible::-webkit-slider-thumb {
  border-color: rgba(255, 255, 255, 0.62);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.42);
  transform: scale(1.08);
}

.range-field input[type="range"]:active::-webkit-slider-thumb {
  transform: scale(0.96);
}

.range-field input[type="range"]::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(232, 236, 243, 0.16);
}

.range-field input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 1px solid rgba(232, 236, 243, 0.4);
  border-radius: 999px;
  background: var(--gold);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.34);
  transition: transform 130ms var(--ease), box-shadow 130ms var(--ease), border-color 130ms var(--ease);
}

.range-field:hover input[type="range"]::-moz-range-thumb,
.range-field input[type="range"]:focus-visible::-moz-range-thumb {
  border-color: rgba(255, 255, 255, 0.62);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.42);
  transform: scale(1.08);
}

.range-field input[type="range"]:active::-moz-range-thumb {
  transform: scale(0.96);
}

.setting-field input:disabled,
.setting-field select:disabled {
  color: rgba(194, 200, 209, 0.42);
  cursor: not-allowed;
  opacity: 0.62;
}

.toggle-row {
  grid-template-columns: auto 1fr;
  align-items: center;
  min-height: 28px;
  gap: 12px;
  cursor: pointer;
  transition: color 130ms var(--ease), transform 130ms var(--ease);
}

.toggle-row:hover,
.toggle-row:focus-within {
  color: rgba(243, 245, 248, 0.86);
}

.toggle-row:active {
  transform: translateY(1px);
}

.toggle-row small {
  display: block;
  margin-top: 3px;
  color: rgba(136, 145, 159, 0.62);
  font-size: 0.6rem;
  font-weight: 650;
  line-height: 1.25;
}

.toggle-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--gold);
  filter: drop-shadow(0 4px 7px rgba(0, 0, 0, 0.34));
  flex: 0 0 auto;
  cursor: pointer;
  transition: filter 130ms var(--ease), transform 130ms var(--ease);
}

.toggle-row:hover input:not(:disabled),
.toggle-row input:focus-visible {
  filter: drop-shadow(0 7px 12px rgba(0, 0, 0, 0.44)) brightness(1.08);
  outline: 0;
  transform: scale(1.06);
}

.toggle-row input:active:not(:disabled) {
  transform: scale(0.96);
}

.toggle-row:has(input:disabled) {
  cursor: not-allowed;
  opacity: 0.62;
}

.toggle-row:has(input:disabled) input {
  cursor: not-allowed;
}

.settings-actions {
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.settings-actions .ghost-button,
.settings-actions .action {
  min-width: 0;
  min-height: 34px;
  border-radius: 7px;
  font-size: 0.68rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 10;
  max-width: min(340px, calc(100vw - 36px));
  padding: 11px 13px;
  border: 1px solid rgba(201, 173, 105, 0.42);
  border-radius: 10px;
  color: var(--text);
  background: #0a0d13;
  box-shadow: 0 26px 72px rgba(0, 0, 0, 0.58), 0 8px 18px rgba(0, 0, 0, 0.38);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 170ms var(--ease), transform 170ms var(--ease);
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.burst {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.burst span {
  position: absolute;
  top: 54%;
  left: 50%;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: rgba(227, 204, 143, 0.78);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.8);
  animation: particleOut 680ms var(--ease) var(--d, 0ms) forwards;
}

.burst-lose span {
  background: rgba(209, 96, 96, 0.72);
}

.burst-push span,
.burst-mixed span {
  background: rgba(194, 200, 209, 0.58);
}

.burst-refill span {
  background: rgba(135, 183, 232, 0.7);
}

@keyframes dealIn {
  from {
    opacity: 0;
    transform: translate3d(14px, -12px, 0) rotate(2deg) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateZ(0) rotate(var(--rot, -1deg)) scale(1);
  }
}

@keyframes dealFromShoe {
  from {
    opacity: 0;
    transform: translate3d(var(--deal-x, 0), var(--deal-y, 0), 0) rotate(4deg) scale(0.9);
  }
  20% {
    opacity: 1;
  }
  to {
    opacity: 1;
    transform: translateZ(0) rotate(var(--rot, -1deg)) scale(1);
  }
}

@keyframes shoeShuffle {
  0% {
    transform: translateZ(0) rotate(0deg);
  }
  22% {
    transform: translate3d(-4px, 1px, 0) rotate(-4deg);
  }
  46% {
    transform: translate3d(5px, -1px, 0) rotate(4deg);
  }
  68% {
    transform: translate3d(-2px, 0, 0) rotate(-2deg);
  }
  100% {
    transform: translateZ(0) rotate(0deg);
  }
}

@keyframes centerShoeShuffle {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
  }
  20% {
    transform: translate3d(-7px, 1px, 0) rotate(-5deg) scale(1.02);
  }
  42% {
    transform: translate3d(8px, -2px, 0) rotate(5deg) scale(1.04);
  }
  64% {
    transform: translate3d(-4px, 1px, 0) rotate(-3deg) scale(1.02);
  }
  100% {
    transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
  }
}

@keyframes valuePulse {
  50% {
    color: var(--gold-2);
    transform: translateY(-1px);
  }
}

@keyframes tableFlashGold {
  0% {
    opacity: 0;
    background: transparent;
  }
  18% {
    opacity: 0.16;
    background: rgba(227, 204, 143, 0.22);
  }
  100% {
    opacity: 0;
    background: transparent;
  }
}

@keyframes tableFlashRed {
  0% {
    opacity: 0;
    background: transparent;
  }
  18% {
    opacity: 0.12;
    background: rgba(209, 96, 96, 0.2);
  }
  100% {
    opacity: 0;
    background: transparent;
  }
}

@keyframes tableFlashNeutral {
  0% {
    opacity: 0;
    background: transparent;
  }
  18% {
    opacity: 0.12;
    background: rgba(194, 200, 209, 0.16);
  }
  100% {
    opacity: 0;
    background: transparent;
  }
}

@keyframes particleOut {
  12% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) scale(0);
  }
}

@keyframes chipTransfer {
  0% {
    opacity: 0.96;
    transform: translate3d(0, 0, 0) scale(1);
  }
  72% {
    opacity: 0.96;
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--dx, 0), var(--dy, 0), 0) scale(0.82);
  }
}

@media (max-width: 1028px) {
  .play-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) calc(var(--stats-w) * var(--table-scale));
    width: min(calc((var(--play-w) * var(--table-size) * var(--table-scale)) + (var(--stats-w) * var(--table-scale))), calc(100% - 24px));
  }

  .stats-sidebar {
    position: relative;
    top: auto;
    left: auto;
    width: auto;
  }
}

@media (max-width: 660px) {
  :root {
    --stats-w: 0px;
  }

  .shell {
    width: 100%;
    min-height: 100svh;
    padding: 0;
    align-content: stretch;
  }

  .play-layout {
    display: flex;
    flex-direction: column;
    width: min(100%, 460px);
    height: 100svh;
    min-height: 640px;
    max-height: 100svh;
    padding: 0;
  }

  .table-shell {
    flex: 1 1 auto;
    width: 100%;
    height: auto;
    min-height: 0;
    transform: none;
    transform-origin: top center;
  }

  .table-brand {
    top: 9px;
    left: 12px;
    width: 74px;
  }

  .felt {
    grid-template-rows: 190px 8px minmax(214px, 1fr) 222px;
    gap: 6px;
    height: 100%;
    min-height: 0;
    padding: 10px 12px max(10px, env(safe-area-inset-bottom));
    border-radius: 0;
  }

  .stats-sidebar {
    order: -1;
    position: relative;
    top: auto;
    left: auto;
    z-index: 8;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-rows: 1fr;
    align-items: center;
    column-gap: 10px;
    width: 100%;
    height: 54px;
    min-height: 54px;
    padding: max(4px, env(safe-area-inset-top)) 10px 5px;
    border-right: 0;
    border-left: 0;
    border-bottom: 1px solid rgba(232, 236, 243, 0.1);
    background: rgba(8, 11, 16, 0.96);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
    transform: none;
  }

  .stats-head {
    min-height: 0;
    gap: 6px;
  }

  .stats-head h2 {
    font-size: 0.64rem;
  }

  .stats-content {
    display: flex;
    align-items: center;
    min-width: 0;
    padding-top: 0;
    overflow: hidden;
  }

  .stats-section {
    display: none;
  }

  .stats-section:first-child {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 0;
    border-top: 0;
  }

  .stats-title-row,
  .stats-section + .stats-section,
  .stats-total-strip,
  .buyin-strip {
    display: none;
  }

  .stat-hero {
    flex: 0 1 auto;
    min-width: 0;
    margin: 0;
    padding: 0;
    border-bottom: 0;
  }

  .stats-grid {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
  }

  .stats-grid .stat:nth-child(n+2),
  .stats-mini-grid {
    display: none;
  }

  .stat span {
    margin-bottom: 2px;
    font-size: 0.46rem;
  }

  .stat strong,
  .stat-hero strong {
    max-width: 72px;
    overflow: hidden;
    font-size: 0.74rem;
    line-height: 1.05;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .stats-actions {
    gap: 8px;
    padding-top: 0;
    border-top: 0;
  }

  .stats-actions .reset-table {
    display: none;
  }

  .stats-actions .text-reset {
    display: inline-grid;
    place-items: center;
    min-height: 28px;
    font-size: 0.48rem;
    line-height: 1;
  }

  .stats-actions .reset-table.text-reset {
    display: none;
  }

  .dealer-zone {
    padding-top: 22px;
  }

  .shoe {
    top: 54px;
    right: 4px;
    gap: 6px;
    transform: scale(0.82);
    transform-origin: top right;
  }

  .shoe-xray {
    min-width: 104px;
    gap: 4px 8px;
    font-size: 0.54rem;
  }

  .shoe-xray strong {
    font-size: 0.58rem;
  }

  .shuffle-overlay {
    gap: 8px;
  }

  .shuffle-card-stack {
    width: 70px;
    height: 100px;
  }

  .shuffle-overlay strong {
    font-size: 0.86rem;
  }

  .shuffle-overlay span {
    font-size: 0.56rem;
  }

  .cards {
    --card-w: clamp(66px, 18vw, 78px);
    height: 124px;
  }

  .hand {
    height: 224px;
    padding: 0;
  }

  .hands.split-hands {
    grid-auto-rows: minmax(116px, 1fr);
    gap: 6px;
  }

  .hands.split-hands .hand {
    height: 116px;
    grid-template-rows: 18px 1fr 24px;
  }

  .hands.split-hands .hand .cards {
    --card-w: clamp(48px, 13.5vw, 56px);
    height: 80px;
  }

  .hands.split-hands .hand-bet {
    height: 24px;
  }

  .hands.split-hands .hand-bet .bet-chip {
    width: 24px;
    margin-left: -6px;
    font-size: 0.4rem;
  }

  .surrender-inline {
    min-height: 20px;
    min-width: 64px;
    padding: 0 6px;
    font-size: 0.46rem;
  }

  .hand .cards {
    height: 148px;
  }

  .table-wager-row {
    height: 42px;
    margin-top: -12px;
  }

  .table-wager {
    height: 42px;
  }

  .table-bet-amount {
    min-width: 48px;
    font-size: 0.68rem;
  }

  .result-payout .payout-chip {
    width: 23px;
    margin-left: -4px;
    font-size: 0.35rem;
  }

  .bet-chip {
    width: 38px;
    font-size: 0.52rem;
  }

  .hand-bet .bet-chip {
    width: 32px;
  }

  .table-wager .bet-chip {
    width: 42px;
    font-size: 0.54rem;
  }

  .controls {
    grid-template-rows: 22px 78px 98px;
    gap: 7px;
    width: min(100%, 372px);
    height: 212px;
  }

  .wager-row {
    grid-template-columns: 1fr 36px;
    gap: 7px;
    height: 78px;
  }

  .chips {
    flex-wrap: wrap;
    align-content: center;
    gap: 4px;
    height: 78px;
  }

  .chip {
    width: 40px;
    font-size: 0.54rem;
  }

  .chips[data-count="6"] .chip,
  .chips[data-count="7"] .chip,
  .chips[data-count="8"] .chip,
  .chips[data-count="9"] .chip,
  .chips[data-count="10"] .chip,
  .chips[data-count="11"] .chip,
  .chips[data-count="12"] .chip,
  .chips[data-count="13"] .chip,
  .chips[data-count="14"] .chip {
    width: 38px;
    font-size: 0.5rem;
    box-shadow: var(--shadow-chip);
  }

  .chips[data-count="11"],
  .chips[data-count="12"],
  .chips[data-count="13"],
  .chips[data-count="14"] {
    max-width: 286px;
    gap: 4px;
  }

  .chips[data-count="11"] .chip,
  .chips[data-count="12"] .chip,
  .chips[data-count="13"] .chip {
    width: 38px;
    font-size: 0.48rem;
  }

  .chips[data-count="14"] {
    max-width: 290px;
    gap: 4px;
  }

  .chips[data-count="14"] .chip {
    width: 38px;
    font-size: 0.5rem;
  }

  .clear-button {
    min-height: 46px;
  }

  .settings-dialog {
    inset: 0;
    width: 100%;
    max-width: 100%;
    height: 100svh;
    max-height: 100svh;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: rgba(9, 12, 18, 0.985);
    box-shadow: none;
  }

  .settings-card {
    height: 100svh;
    max-height: 100svh;
    padding: max(10px, env(safe-area-inset-top)) 14px max(10px, env(safe-area-inset-bottom));
  }

  .settings-head {
    min-height: 36px;
    padding-bottom: 9px;
  }

  .settings-head h2 {
    font-size: 0.86rem;
  }

  .settings-head .icon-button {
    width: 34px;
    height: 34px;
  }

  .settings-section {
    gap: 7px;
    padding: 9px 0 11px;
  }

  .settings-body {
    overscroll-behavior: contain;
    padding-right: 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
  }

  .settings-body::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }

  .settings-grid {
    gap: 8px;
  }

  .settings-tools-grid {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .settings-tools-grid .text-reset {
    justify-self: stretch;
    display: grid;
    place-items: center;
    min-height: 34px;
    border: 1px solid rgba(240, 184, 184, 0.18);
    border-radius: 7px;
    color: rgba(240, 184, 184, 0.74);
    background: rgba(37, 19, 23, 0.3);
    box-shadow: var(--shadow-low);
    font-size: 0.62rem;
    text-transform: none;
    transition: background 130ms var(--ease), border-color 130ms var(--ease), box-shadow 130ms var(--ease), color 130ms var(--ease), opacity 130ms var(--ease), transform 130ms var(--ease);
  }

  .settings-tools-grid .text-reset:hover,
  .settings-tools-grid .text-reset:focus-visible {
    border-color: rgba(240, 184, 184, 0.32);
    color: rgba(250, 218, 218, 0.9);
    background: rgba(48, 24, 29, 0.42);
    box-shadow: var(--shadow-control-hover);
  }

  .settings-note {
    display: none;
  }

  .setting-field,
  .toggle-row {
    gap: 5px;
    font-size: 0.62rem;
  }

  .toggle-row {
    min-height: 24px;
    gap: 10px;
  }

  .toggle-row input {
    width: 16px;
    height: 16px;
  }

  .toggle-row small {
    font-size: 0.55rem;
  }

  .setting-field input,
  .setting-field select {
    min-height: 30px;
    padding: 0 8px;
    font-size: 0.64rem;
  }

  .range-field input[type="range"] {
    min-height: 22px;
  }

  .range-field input[type="range"]::-webkit-slider-thumb {
    width: 14px;
    height: 14px;
    margin-top: -5px;
  }

  .range-field input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 14px;
  }

  .settings-actions .ghost-button,
  .settings-actions .action {
    min-height: 38px;
    padding: 0 4px;
    font-size: 0.58rem;
  }

  .settings-actions {
    padding-top: 8px;
  }

  .actions-panel {
    grid-template-columns: 1fr;
    grid-template-rows: 46px 46px;
    height: 98px;
  }

  .action,
  .ghost-button {
    min-height: 46px;
    padding: 0 8px;
    font-size: 0.72rem;
  }

  .actions-panel.is-playing.needs-buy-in .action,
  .actions-panel.is-insurance.needs-buy-in .action {
    padding: 0 3px;
    font-size: 0.54rem;
  }

  .actions-panel.is-playing {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: 46px 46px;
  }

  .actions-panel.is-playing.needs-buy-in {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: 46px 46px;
  }

  .actions-panel.is-insurance {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: 46px;
    height: 46px;
    align-self: end;
  }

  .actions-panel.is-insurance.needs-buy-in {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .action.deal {
    grid-column: 1 / -1;
  }
}

@media (max-width: 390px) {
  :root {
    --stats-w: 0px;
  }

  .meter {
    padding: 2px 6px;
  }

  .stats-sidebar {
    padding-right: 8px;
    padding-left: 8px;
  }

  .stats-actions {
    gap: 3px;
  }

  .stats-actions .text-reset {
    font-size: 0.4rem;
  }

  .settings-card {
    padding-right: 12px;
    padding-left: 12px;
  }

  .settings-grid {
    gap: 7px;
  }

  .settings-section {
    padding: 8px 0 10px;
  }

  .settings-head h2 {
    font-size: 0.82rem;
  }

  .setting-field,
  .toggle-row {
    font-size: 0.6rem;
  }

  .chips {
    gap: 4px;
  }

  .chip {
    width: 38px;
  }

  .chips[data-count="6"] .chip,
  .chips[data-count="7"] .chip,
  .chips[data-count="8"] .chip,
  .chips[data-count="9"] .chip,
  .chips[data-count="10"] .chip,
  .chips[data-count="11"] .chip,
  .chips[data-count="12"] .chip,
  .chips[data-count="13"] .chip,
  .chips[data-count="14"] .chip {
    width: 38px;
  }

  .chips[data-count="11"] .chip,
  .chips[data-count="12"] .chip,
  .chips[data-count="13"] .chip {
    width: 38px;
    font-size: 0.48rem;
  }

  .chips[data-count="14"] .chip {
    width: 38px;
    font-size: 0.5rem;
  }
}

@media (max-width: 360px) {
  .settings-card {
    padding-right: 10px;
    padding-left: 10px;
  }

  .settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .settings-section {
    gap: 6px;
  }

  .setting-field input,
  .setting-field select {
    min-height: 29px;
  }

  .felt {
    grid-template-rows: 184px 6px minmax(214px, 1fr) 216px;
    gap: 5px;
    padding: 8px;
  }

  .dealer-zone {
    padding-top: 22px;
  }

  .controls {
    grid-template-rows: 22px 86px 98px;
    height: 218px;
    width: calc(100% + 16px);
    margin-inline: -8px;
  }

  .wager-row {
    position: relative;
    grid-template-columns: 1fr 30px;
    height: 86px;
    gap: 5px;
  }

  .chips {
    box-sizing: border-box;
    height: 84px;
    padding-right: 0;
  }

  .chips[data-count="14"] {
    max-width: 270px;
    gap: 3px;
  }

  .chips[data-count="14"] .chip {
    width: 36px;
    font-size: 0.46rem;
  }

  .clear-button {
    position: static;
    width: 30px;
    min-height: 44px;
    transform: none;
  }
}

@media (max-width: 660px) and (max-height: 720px) {
  .play-layout {
    min-height: 0;
  }

  .stats-sidebar {
    height: 46px;
    min-height: 46px;
    padding-top: 3px;
    padding-bottom: 3px;
  }

  .stats-head h2 {
    font-size: 0.6rem;
  }

  .stat span {
    font-size: 0.42rem;
  }

  .stat strong,
  .stat-hero strong {
    max-width: 66px;
    font-size: 0.68rem;
  }

  .stats-actions .text-reset {
    min-height: 26px;
    font-size: 0.45rem;
  }

  .felt {
    grid-template-rows: 150px 5px minmax(160px, 1fr) 194px;
    gap: 5px;
    padding: 8px 12px;
  }

  .dealer-zone {
    padding-top: 12px;
  }

  .shoe {
    top: 42px;
    transform: scale(0.72);
  }

  .cards {
    --card-w: clamp(60px, 17vw, 70px);
    height: 108px;
  }

  .hand {
    height: 176px;
  }

  .hand .cards {
    height: 118px;
  }

  .table-wager-row {
    height: 36px;
    margin-top: -12px;
  }

  .table-wager {
    height: 36px;
  }

  .controls {
    grid-template-rows: 20px 64px 98px;
    gap: 5px;
    height: 194px;
  }

  .wager-row {
    height: 64px;
  }

  .chips {
    height: 64px;
  }

  .chips[data-count="14"] {
    max-width: 270px;
    gap: 3px;
  }

  .chips[data-count="14"] .chip {
    width: 36px;
    font-size: 0.46rem;
  }

  .chip {
    width: 36px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}
