:root {
  color-scheme: light;
  --ink: #f7f0df;
  --felt: #08783a;
  --felt-dark: #04451f;
  --felt-light: #12a056;
  --gold: #f0c650;
  --gold-dark: #a96d13;
  --wood: #8d481c;
  --wood-dark: #2b1209;
  --panel: rgba(20, 24, 26, 0.82);
  --panel-light: rgba(255, 249, 230, 0.92);
  --line: rgba(255, 255, 255, 0.34);
  --red: #c93c3c;
  --blue: #2879b8;
  --green: #26a85a;
  --shadow: rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: #170b08;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

button,
input {
  font: inherit;
}

button {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  background: linear-gradient(#ffd86a, #d8951d);
  color: #241401;
  cursor: pointer;
  font-weight: 800;
  box-shadow: 0 3px 0 #7c4b0e, 0 10px 18px rgba(0, 0, 0, 0.2);
}

.tooltip-wrap {
  position: relative;
  display: inline-flex;
}

.tooltip-wrap > button {
  width: 100%;
}

.tooltip-wrap::before,
.tooltip-wrap::after {
  position: absolute;
  left: 50%;
  z-index: 30;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 8px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.tooltip-wrap::before {
  content: attr(data-tooltip);
  bottom: calc(100% + 12px);
  width: max-content;
  max-width: 260px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  padding: 9px 11px;
  background: rgba(8, 18, 15, 0.96);
  color: #fffbe8;
  font-size: 0.84rem;
  line-height: 1.25;
  white-space: normal;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
}

.tooltip-wrap::after {
  content: "";
  bottom: calc(100% + 5px);
  border: 7px solid transparent;
  border-top-color: rgba(8, 18, 15, 0.96);
}

.tooltip-wrap:hover::before,
.tooltip-wrap:hover::after,
.tooltip-wrap:focus-within::before,
.tooltip-wrap:focus-within::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

button:hover:not(:disabled) {
  filter: brightness(1.08);
}

button:disabled {
  cursor: not-allowed;
  filter: grayscale(0.5);
  opacity: 0.45;
}

button.secondary {
  background: linear-gradient(#fff7dd, #d8c9a9);
  color: #2b261d;
}

button.danger {
  background: linear-gradient(#ff6962, #b71919);
  color: #fffaf0;
  box-shadow: 0 3px 0 #641010, 0 10px 18px rgba(0, 0, 0, 0.24);
}

button.icon-only {
  width: 52px;
  padding: 0 12px;
}

button.reset-small {
  width: 44px;
  min-height: 40px;
  padding: 0;
}

button.reset-small .button-icon {
  min-width: 22px;
  height: 22px;
  font-size: 0.78rem;
}

button.icon-only .button-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.button-icon {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  color: inherit;
  font-size: 0.9rem;
  font-weight: 900;
  line-height: 1;
}

.button-text {
  white-space: nowrap;
}

h1,
h2,
p {
  margin-top: 0;
}

.table-screen {
  min-height: 100vh;
}

.casino-stage {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  padding: 18px clamp(16px, 2vw, 32px) 188px;
  background:
    radial-gradient(circle at 50% 35%, rgba(50, 206, 110, 0.38), transparent 34%),
    radial-gradient(circle at 18% 56%, rgba(255, 255, 255, 0.08), transparent 26%),
    radial-gradient(circle at 82% 50%, rgba(255, 255, 255, 0.06), transparent 26%),
    repeating-linear-gradient(118deg, rgba(255, 255, 255, 0.025) 0 2px, transparent 2px 9px),
    linear-gradient(180deg, var(--felt-light), var(--felt) 32%, var(--felt-dark));
  border: 5px solid #05aeb8;
}

.felt-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 0 50%, rgba(0, 0, 0, 0.18) 78%, rgba(0, 0, 0, 0.34) 100%);
}

.chip-rack {
  position: absolute;
  top: -4px;
  left: 50%;
  z-index: 4;
  display: flex;
  gap: 12px;
  width: min(34vw, 560px);
  min-width: 380px;
  justify-content: center;
  border: 6px solid #351407;
  border-top: 0;
  border-radius: 0 0 6px 6px;
  padding: 10px 16px 14px;
  background: linear-gradient(90deg, #552009, #9b4b21 20%, #4f1b0a);
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.35);
  transform: translateX(-50%);
}

.rack-pocket {
  position: relative;
  display: block;
  width: 74px;
  height: 92px;
  border-radius: 0 0 36px 36px;
  background: linear-gradient(#6d2c10, #b0602d);
  box-shadow: inset 0 -8px 16px rgba(255, 230, 150, 0.18);
}

.rack-pocket::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 50%;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  border: 9px dashed #f6f0e5;
  background: radial-gradient(circle, #f6f0e5 0 38%, currentColor 40% 100%);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.28);
  transform: translateX(-50%);
}

.chip-blue {
  color: var(--blue);
}

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

.chip-gold {
  color: #e5a82d;
}

.chip-green {
  color: #2e9b3f;
}

.chip-coral {
  color: #dc6b40;
}

.deck-stack {
  position: absolute;
  top: 18px;
  right: 24px;
  z-index: 3;
  width: 116px;
  height: 86px;
  transform: rotate(38deg);
}

.deck-stack span {
  position: absolute;
  inset: 0;
  border: 6px solid #f8fbfb;
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.8) 0 3px, transparent 4px),
    repeating-radial-gradient(circle at 50% 50%, #247da2 0 2px, #e6ffff 2px 4px, #247da2 4px 6px);
  box-shadow: 0 9px 16px rgba(0, 0, 0, 0.25);
}

.deck-stack span:nth-child(2) {
  transform: translate(8px, 8px);
}

.deck-stack span:nth-child(3) {
  transform: translate(16px, 16px);
}

.table-brand {
  position: absolute;
  top: 18px;
  left: 20px;
  z-index: 6;
  width: min(240px, 26vw);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: 8px 48px 8px 10px;
  background: rgba(0, 67, 42, 0.58);
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.18);
}

.language-toggle {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  min-height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  padding: 0;
  background: rgba(255, 247, 221, 0.92);
  color: #143525;
  box-shadow: 0 4px 0 rgba(39, 22, 3, 0.28), 0 8px 14px rgba(0, 0, 0, 0.2);
  font-size: 0.84rem;
  font-weight: 900;
}

.eyebrow {
  margin-bottom: 3px;
  color: #9ff4e4;
  font-size: 0.64rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1 {
  margin-bottom: 3px;
  font-size: clamp(1.05rem, 1.55vw, 1.55rem);
  line-height: 1;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.2);
}

.intro {
  margin-bottom: 0;
  color: #e5fff8;
  font-size: 0.72rem;
  line-height: 1.2;
}

.score-card {
  position: absolute;
  top: 26px;
  right: 190px;
  z-index: 6;
  min-width: 170px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: 12px 14px;
  background: rgba(255, 249, 230, 0.92);
  color: #163827;
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.18);
}

.score-card span,
.score-card small {
  display: block;
  color: #46604f;
}

.score-card strong {
  display: block;
  margin: 2px 0;
  font-size: 1.75rem;
}

.info-drawer {
  position: absolute;
  top: 126px;
  bottom: 188px;
  left: 0;
  z-index: 20;
  width: min(360px, calc(100vw - 68px));
  transform: translateX(calc(-100% - 6px));
  transition: transform 180ms ease;
  pointer-events: none;
}

.info-drawer.open {
  transform: translateX(0);
}

.drawer-tab {
  position: absolute;
  top: 18px;
  right: -46px;
  width: 46px;
  height: 132px;
  min-height: 0;
  border-radius: 0 8px 8px 0;
  padding: 10px 0;
  pointer-events: auto;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  box-shadow: 0 3px 0 #7c4b0e, 0 12px 20px rgba(0, 0, 0, 0.28);
}

.drawer-content {
  display: grid;
  gap: 12px;
  height: 100%;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-left: 0;
  border-radius: 0 10px 10px 0;
  padding: 14px;
  background: rgba(8, 20, 17, 0.94);
  box-shadow: 18px 0 34px rgba(0, 0, 0, 0.32);
  pointer-events: auto;
}

.info-drawer .score-card,
.info-drawer .review-card {
  position: static;
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
  display: block;
  width: 100%;
  min-width: 0;
  max-height: none;
  margin: 0;
}

.info-drawer .score-card {
  padding: 14px;
}

.info-drawer .review-card {
  overflow: visible;
}

.dealer-area {
  position: absolute;
  top: 126px;
  left: 50%;
  z-index: 5;
  width: min(390px, 36vw);
  min-height: 138px;
  border: 2px solid rgba(255, 255, 255, 0.34);
  border-radius: 26px;
  padding: 16px;
  background: rgba(0, 77, 42, 0.42);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16), 0 12px 22px rgba(0, 0, 0, 0.15);
  transform: translateX(-50%);
}

.dealer-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.seat-label {
  margin-bottom: 0;
  color: #fbf8ec;
  font-size: 0.85rem;
  font-weight: 900;
  text-transform: uppercase;
}

.seat-note {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.84rem;
  font-weight: 700;
}

.felt-print {
  position: absolute;
  top: 33%;
  left: 50%;
  z-index: 1;
  display: grid;
  width: min(560px, 42vw);
  place-items: center;
  color: rgba(255, 255, 255, 0.28);
  text-align: center;
  text-transform: uppercase;
  transform: translate(-50%, -50%) rotate(2deg);
}

.felt-print span {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.1rem, 4vw, 4.25rem);
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.18);
}

.felt-print strong {
  margin-top: 4px;
  color: rgba(240, 198, 80, 0.55);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1rem, 2vw, 2rem);
  line-height: 1;
}

.felt-print small {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.25);
  font-size: clamp(0.72rem, 1.3vw, 1.1rem);
  font-weight: 800;
}

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

.seat-grid {
  position: absolute;
  inset: 0;
}

.seat-grid::before {
  content: none;
}

.seat {
  position: absolute;
  width: min(260px, 20vw);
  min-height: 154px;
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-radius: 24px;
  padding: 12px;
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.035) 0 2px, transparent 2px 7px),
    rgba(0, 83, 43, 0.48);
  color: #fff9e7;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.08), 0 18px 24px rgba(0, 0, 0, 0.16);
  pointer-events: auto;
}

.seat::before {
  content: "";
  position: absolute;
  inset: 18px 20px auto;
  height: 82px;
  border: 2px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.045) 0 2px, transparent 2px 6px);
  opacity: 0.55;
  pointer-events: none;
}

.seat::after {
  content: attr(data-seat);
  position: absolute;
  top: -14px;
  left: 16px;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 2px solid rgba(255, 255, 255, 0.84);
  border-radius: 999px;
  background: var(--gold);
  color: #211504;
  font-size: 0.9rem;
  font-weight: 900;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.28);
}

.seat-position-1 {
  top: 31%;
  left: 8%;
  transform: translateY(-50%);
}

.seat-position-2 {
  top: 57%;
  left: 28%;
  transform: translateY(-50%);
}

.seat-position-3 {
  top: 57%;
  right: 28%;
  left: auto;
  transform: translateY(-50%);
}

.seat-position-4 {
  top: 31%;
  right: 8%;
  transform: translateY(-50%);
}

.seat.active {
  border-color: var(--gold);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.1), 0 0 0 5px rgba(240, 198, 80, 0.22), 0 18px 28px rgba(0, 0, 0, 0.24);
}

.seat.receiving-card,
.dealer-area.receiving-card {
  border-color: #fff3a0;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.16), 0 0 0 5px rgba(255, 217, 96, 0.26), 0 18px 28px rgba(0, 0, 0, 0.24);
}

.seat.seat-you {
  border-color: rgba(127, 230, 255, 0.82);
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.052) 0 2px, transparent 2px 7px),
    linear-gradient(145deg, rgba(13, 121, 137, 0.72), rgba(12, 52, 93, 0.74));
  box-shadow: inset 0 0 0 2px rgba(159, 241, 255, 0.18), 0 0 0 4px rgba(75, 212, 245, 0.16), 0 18px 24px rgba(0, 0, 0, 0.18);
}

.seat.seat-you::before {
  border-color: rgba(173, 242, 255, 0.22);
  background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.065) 0 2px, transparent 2px 6px);
}

.seat.seat-you .hand-block {
  background: rgba(3, 24, 48, 0.4);
}

.seat.seat-you .persona {
  color: rgba(226, 252, 255, 0.86);
}

.seat.seat-you.active {
  border-color: #9ef4ff;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.16), 0 0 0 5px rgba(64, 220, 255, 0.28), 0 18px 28px rgba(0, 0, 0, 0.24);
}

.seat-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.seat-name {
  margin-bottom: 3px;
  font-weight: 900;
}

.persona {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
}

.chip-count {
  border: 2px dashed rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  padding: 6px 9px;
  background: #b43333;
  color: #fffbe8;
  white-space: nowrap;
  font-size: 0.86rem;
  font-weight: 900;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.18);
}

.chip-flash-win {
  animation: chipWinBlink 900ms ease-out 1;
}

.chip-flash-loss {
  animation: chipLossBlink 900ms ease-out 1;
}

.hand-block {
  position: relative;
  z-index: 2;
  margin-top: 10px;
  border-radius: 10px;
  padding: 8px;
  background: rgba(0, 33, 20, 0.34);
}

.hand-title {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.78rem;
  font-weight: 800;
}

.card-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  min-height: 58px;
}

.dealer-area .card-row {
  justify-content: center;
}

.card {
  position: relative;
  display: block;
  width: 42px;
  height: 58px;
  border: 1px solid #cfc5b0;
  border-radius: 7px;
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 247, 220, 0.55), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), transparent 42%),
    linear-gradient(180deg, #fffdf8, #eee7d8);
  color: #1f2933;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 900;
  box-shadow: 0 3px 0 #b8a98f, 0 10px 14px rgba(0, 0, 0, 0.24);
  overflow: hidden;
}

.hand-block .card + .card {
  margin-left: -14px;
}

.dealer-area .card + .card {
  margin-left: -10px;
}

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

.card.black {
  color: #111827;
}

.card-corner {
  position: absolute;
  display: grid;
  justify-items: center;
  gap: 0;
  font-size: 0.7rem;
  line-height: 0.86;
}

.card-corner-top {
  top: 4px;
  left: 4px;
}

.card-corner-bottom {
  right: 4px;
  bottom: 4px;
  transform: rotate(180deg);
}

.card-suit {
  font-size: 0.78rem;
  line-height: 1;
}

.card-pip {
  position: absolute;
  top: 50%;
  left: 50%;
  font-size: 1.45rem;
  line-height: 1;
  transform: translate(-50%, -50%);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.85);
}

.card.hidden-card {
  display: grid;
  place-items: center;
  border-color: #d8f5f7;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.8) 0 3px, transparent 4px),
    repeating-radial-gradient(circle at 50% 50%, #2879b8 0 2px, #e6ffff 2px 4px, #2879b8 4px 6px);
  color: #ffffff;
}

.card-back-mark {
  border-radius: 999px;
  padding: 3px 5px;
  background: rgba(255, 255, 255, 0.18);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.72rem;
  font-weight: 900;
}

.table-console {
  position: absolute;
  right: clamp(16px, 2vw, 30px);
  bottom: 26px;
  left: clamp(16px, 2vw, 30px);
  z-index: 7;
  display: grid;
  grid-template-columns: minmax(230px, 1fr) auto minmax(360px, 1.4fr);
  gap: 12px;
  align-items: stretch;
}

.status-strip,
.bet-panel,
.controls-panel,
.hint-box,
.review-card {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(8px);
}

.status-strip {
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 12px 14px;
}

.status-strip p {
  margin-bottom: 0;
  color: #fffbe8;
  font-weight: 800;
}

.table-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.table-stats span {
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.82rem;
  font-weight: 800;
}

@keyframes chipWinBlink {
  0% {
    background: #b43333;
    color: #fffbe8;
    transform: scale(1);
  }

  28%,
  62% {
    background: #16a765;
    color: #ffffff;
    box-shadow: 0 0 0 5px rgba(73, 255, 160, 0.28), 0 8px 18px rgba(0, 0, 0, 0.28);
    transform: scale(1.1);
  }

  100% {
    background: #b43333;
    color: #fffbe8;
    transform: scale(1);
  }
}

@keyframes chipLossBlink {
  0% {
    background: #b43333;
    color: #fffbe8;
    transform: scale(1);
  }

  28%,
  62% {
    background: #e23b35;
    color: #ffffff;
    box-shadow: 0 0 0 5px rgba(255, 89, 89, 0.3), 0 8px 18px rgba(0, 0, 0, 0.28);
    transform: scale(1.1);
  }

  100% {
    background: #b43333;
    color: #fffbe8;
    transform: scale(1);
  }
}

.bet-panel {
  display: grid;
  align-content: center;
  gap: 8px;
  min-width: 320px;
  padding: 12px;
}

.bet-panel label {
  color: #fffbe8;
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.bet-row {
  display: flex;
  gap: 8px;
}

.bet-row .tooltip-wrap {
  flex: 0 0 auto;
}

.bet-row .deal-action {
  flex: 1 1 150px;
  min-width: 150px;
}

.bet-row .clean-action button {
  height: 100%;
}

.bet-row input {
  width: 86px;
  min-height: 42px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 0 10px;
  background: #fffaf0;
  color: #1f2933;
  font-weight: 800;
}

.controls-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-content: center;
  align-items: center;
  padding: 12px;
}

.controls-panel .tooltip-wrap {
  flex: 0 1 auto;
}

.controls-panel .reset-action {
  margin-left: auto;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
  padding-left: 18px;
}

.hint-box {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  max-width: 560px;
  padding: 13px 14px;
  background: rgba(255, 247, 211, 0.96);
  color: #2f2410;
  font-weight: 800;
}

.review-card {
  position: absolute;
  z-index: 6;
  width: min(260px, 20vw);
  max-height: 170px;
  overflow: auto;
  padding: 14px;
  background: rgba(13, 21, 19, 0.72);
  color: #fffbe8;
}

.review-card h2 {
  margin-bottom: 8px;
  color: #f7d26b;
  font-size: 0.9rem;
  text-transform: uppercase;
}

.review-card p:last-child {
  margin-bottom: 0;
}

.review-panel {
  right: 26px;
  top: 365px;
}

.action-panel {
  left: 26px;
  top: 365px;
  bottom: auto;
}

#reviewList ul,
#actionLog {
  margin: 0;
  padding-left: 18px;
}

#reviewList li,
#actionLog li {
  margin-bottom: 7px;
  line-height: 1.3;
}

.wood-rail {
  position: absolute;
  right: -9%;
  bottom: -104px;
  left: -9%;
  z-index: 3;
  height: 245px;
  border-top: 12px solid rgba(255, 215, 83, 0.86);
  border-radius: 50% 50% 0 0 / 42% 42% 0 0;
  background:
    linear-gradient(180deg, rgba(255, 220, 104, 0.26), transparent 20%),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.18) 0 2px, transparent 2px 132px),
    linear-gradient(180deg, #a95d23, #5a260f 52%, #160906 100%);
  box-shadow: inset 0 12px 0 rgba(255, 204, 92, 0.22), 0 -16px 30px rgba(0, 0, 0, 0.3);
}

.wood-rail::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 50px;
  left: 0;
  height: 54px;
  border-top: 6px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  background: linear-gradient(180deg, #2d1108, #080303);
  box-shadow: inset 0 14px 20px rgba(255, 255, 255, 0.06);
}

.rail-slot {
  position: absolute;
  top: 48px;
  width: 34%;
  height: 56px;
  border: 6px solid #ffd856;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 32%),
    #4b0f09;
  box-shadow: inset 0 0 0 5px rgba(104, 35, 8, 0.8), 0 5px 16px rgba(0, 0, 0, 0.26);
}

.rail-left {
  left: 13%;
  transform: rotate(7deg);
}

.rail-right {
  right: 13%;
  transform: rotate(-7deg);
}

.good {
  color: #91f0b8;
  font-weight: 800;
}

.missed {
  color: #ff9f9f;
  font-weight: 800;
}

@media (max-width: 1100px) {
  .table-brand {
    width: min(220px, 27vw);
  }

  .score-card {
    right: 160px;
  }

  .seat {
    width: min(230px, 23vw);
  }

  .seat-position-1 {
    left: 5%;
  }

  .seat-position-2 {
    left: 26%;
  }

  .seat-position-3 {
    right: 26%;
  }

  .seat-position-4 {
    right: 5%;
  }

  .table-console {
    grid-template-columns: minmax(280px, 1fr) 320px;
  }

  .controls-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  body {
    overflow-y: auto;
  }

  .casino-stage {
    min-height: 1150px;
    padding-bottom: 310px;
  }

  .chip-rack {
    min-width: 300px;
    width: 300px;
  }

  .rack-pocket {
    width: 48px;
    height: 66px;
  }

  .rack-pocket::before {
    width: 42px;
    height: 42px;
    border-width: 6px;
  }

  .deck-stack {
    top: 18px;
    right: 14px;
    width: 84px;
    height: 64px;
  }

  .table-brand,
  .score-card,
  .review-card {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    width: auto;
    margin-bottom: 12px;
  }

  .dealer-area {
    top: 218px;
    width: calc(100% - 40px);
  }

  .felt-print {
    top: 410px;
    width: calc(100% - 40px);
  }

  .seat {
    width: calc(50% - 24px);
    min-height: 210px;
  }

  .seat-position-1 {
    top: 500px;
    left: 16px;
    transform: none;
  }

  .seat-position-2 {
    top: 500px;
    right: 16px;
    left: auto;
    transform: none;
  }

  .seat-position-3 {
    top: 730px;
    left: 16px;
    right: auto;
    transform: none;
  }

  .seat-position-4 {
    top: 730px;
    right: 16px;
    bottom: auto;
    left: auto;
    width: calc(50% - 24px);
    transform: none;
  }

  .table-console {
    grid-template-columns: 1fr;
  }

  .review-panel,
  .action-panel {
    position: absolute;
    top: auto;
    bottom: 132px;
    width: calc(50% - 24px);
    max-height: 150px;
  }

  .review-panel {
    right: 16px;
  }

  .action-panel {
    left: 16px;
  }
}

@media (max-width: 560px) {
  .casino-stage {
    min-height: 1420px;
  }

  .dealer-area {
    top: 260px;
  }

  .felt-print {
    top: 460px;
  }

  .seat {
    right: 16px;
    left: 16px;
    width: auto;
  }

  .seat-position-1 {
    top: 560px;
  }

  .seat-position-2 {
    top: 790px;
  }

  .seat-position-3 {
    top: 1020px;
  }

  .seat-position-4 {
    top: 1250px;
  }

  .review-panel,
  .action-panel {
    display: none;
  }

  .table-console {
    position: fixed;
    right: 10px;
    bottom: 10px;
    left: 10px;
  }

  .bet-row,
  .controls-panel {
    width: 100%;
  }

  .bet-row .tooltip-wrap,
  .controls-panel .tooltip-wrap,
  .bet-row button,
  .controls-panel button {
    flex: 1 1 110px;
  }
}
