:root {
  --card-width: 70px;
  --card-height: 98px;
}
.blackjack-room {
  max-width: 1080px;
  padding-top: 20px;
}
.room-header {
  margin-bottom: 14px;
}
.room-header > div {
  min-width: 0;
}
.room-header .eyebrow {
  margin-bottom: 5px;
}
#sound {
  flex-shrink: 0;
  padding-inline: 12px;
  font-size: 12px;
}
.stats {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 18px;
  margin: 8px 0;
}
.stat {
  min-width: 0;
  padding: 8px 0;
}
.stat strong {
  font-variant-numeric: tabular-nums;
}
#profit.positive,
.outcome-profit.positive {
  color: #a7e5b4;
}
#profit.negative,
.outcome-profit.negative {
  color: #ffb9a3;
}
.trail-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
}
.trail {
  display: flex;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.trail li {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid #627b5b;
  border-radius: 50%;
  font-size: 10px;
  color: #c0cdb5;
}
.trail .current {
  border: 2px solid var(--gold);
  background: #5f5526;
  color: #fff2c9;
}
.trail .won {
  color: #b6edbe;
  background: #285239;
  border-color: #82b77a;
}
.trail .lost {
  color: #ffcfbc;
  background: #543e2d;
  border-color: #a87b60;
}
.trail .push {
  color: #eadab0;
  background: #454d35;
  border-color: #989675;
}
#best {
  color: var(--muted);
  font-size: 12px;
}
.wager-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  margin-bottom: 15px;
  background: #102e23;
  border: 1px solid #687957;
  border-radius: 14px;
}
.wager-choice {
  display: flex;
  align-items: center;
  gap: 14px;
}
#wager-title {
  color: #dddfc7;
  font-size: 13px;
}
.wagers {
  display: flex;
  gap: 6px;
}
.wagers button {
  padding: 8px;
  width: 48px;
  border-radius: 50%;
  font-variant-numeric: tabular-nums;
  background: repeating-linear-gradient(
    90deg,
    #173c2b,
    #173c2b 12px,
    #234833 12px,
    #234833 15px
  );
}
.wagers button[aria-pressed="true"] {
  border: 2px solid #f5d885;
  background: #655e31;
  color: #fff6d9;
  box-shadow: 0 0 0 2px #d4af3722;
}
#deal {
  min-width: 240px;
}
.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.blackjack-table {
  border: 2px solid #aa8b52;
  border-radius: 32px;
  padding: 22px 18px 18px;
  background: radial-gradient(ellipse at 50% 20%, #276149, #0c3527 85%);
  box-shadow:
    inset 0 0 0 6px #0a241b,
    0 18px 45px #0005;
}
.seat-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.seat-heading h2 {
  margin: 0;
  font-size: 15px;
}
.seat-heading > span {
  color: #d0debf;
  font-size: 12px;
}
.cards-row {
  display: flex;
  justify-content: center;
  align-content: start;
  gap: 7px;
  flex-wrap: wrap;
  min-width: 0;
}
.playing-card {
  cursor: default;
  flex-shrink: 0;
  animation: card-in 0.24s ease-out;
}
.playing-card:hover {
  transform: none;
}
.card-slot {
  font-family: Georgia, serif;
}
.felt-rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  margin: 20px 0 16px;
  font-size: 10px;
  letter-spacing: 0.13em;
  color: #d4c695;
}
.felt-rule > span {
  color: #abbb8c;
  font-size: 19px;
}
.hands {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 9px;
}
.hands.split-hands {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.player-hand {
  padding: 12px 9px;
  border: 1px solid #7d9d7150;
  border-radius: 14px;
  background: #04180d33;
  min-width: 0;
}
.player-hand.active {
  border: 2px solid #e9cc79;
  padding: 11px 8px;
  background: #174b334a;
  box-shadow: 0 0 18px #d4af3715;
}
.player-hand .seat-heading {
  min-height: 28px;
  margin-bottom: 8px;
  gap: 4px 7px;
}
.player-hand .seat-heading h2 {
  font-size: 14px;
}
.active-label {
  color: #f9e7ac !important;
  font-size: 10px !important;
  font-weight: 750;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.hand-summary {
  text-align: center;
  font-size: 12px;
  line-height: 1.5;
  margin: 9px 0 0;
  color: #dce5c9;
}
.hand-summary strong {
  color: #f6df9b;
}
.table-note {
  text-align: center;
  color: #b9cdae;
  font-size: 11px;
  line-height: 1.5;
  margin: 14px 0 0;
}
.status {
  margin: 0 0 10px;
  font-size: 14px;
  min-height: 50px;
}
.actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.actions button {
  padding: 10px 6px;
  min-height: 65px;
}
.actions button > span,
.actions button > small {
  display: block;
}
.actions button > span {
  font-size: 17px;
}
.actions button > small {
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
  margin-top: 4px;
}
.action-note {
  color: #bfcdb6;
  font-size: 12px;
  margin: 8px 0;
  line-height: 1.5;
}
.coach-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 10px 0 0;
}
.coach-row > button {
  font-size: 12px;
  padding: 9px 11px;
  white-space: nowrap;
}
.coach-row > span {
  color: #adbfa4;
  font-size: 11px;
  line-height: 1.45;
}
.coaching {
  border: 1px solid #6c8966;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.6;
  color: #dde8c8;
  margin: 9px 0 0;
  background: #143825;
}
.round-result {
  border: 1px solid #8d7b48;
  border-radius: 14px;
  background: #143426;
  padding: 15px;
  margin-top: 12px;
}
.round-result .eyebrow {
  font-size: 10px;
  margin-bottom: 5px;
}
.round-result h2 {
  font-family: Georgia, serif;
  color: #f2dea8;
  font-size: 23px;
  margin-bottom: 10px;
}
.outcome {
  padding: 8px 0;
  border-top: 1px solid #7c916545;
  font-size: 13px;
  color: #e2e9d2;
}
.outcome-heading {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 10px;
  line-height: 1.45;
}
.outcome-profit {
  white-space: nowrap;
  font-weight: 750;
}
.outcome small {
  display: block;
  font-size: 12px;
  color: #bbceb0;
  line-height: 1.55;
  margin-top: 3px;
}
#round-description {
  color: #bfcfb5;
  font-size: 13px;
  margin: 9px 0 12px;
}
#next-round {
  width: 100%;
  font-size: 13px;
}
.trail-result {
  margin: 8px 0 16px;
  background: radial-gradient(ellipse at top, #35482c, #0d2c20);
}
.trail-result h2 {
  font-family: Georgia, serif;
  font-size: 29px;
  color: #ffe4a0;
  margin-bottom: 7px;
}
.trail-result p:not(.eyebrow) {
  color: #dce3cb;
  font-size: 14px;
}
.rules {
  padding: 0 13px;
  margin: 13px 0 0;
}
.rules summary {
  display: list-item;
  padding: 13px 0;
  cursor: pointer;
  color: #ead7a6;
  font-size: 13px;
  min-height: 44px;
}
.rules > div {
  max-height: 340px;
  overflow-y: auto;
  padding: 0 2px 8px;
}
.rules p {
  font-size: 12px;
  color: #cdd8bd;
}
.restart-confirm {
  border-top: 1px solid #7a8e63;
  margin-top: 12px;
  padding-top: 12px;
}
.restart-confirm button {
  font-size: 12px;
  margin: 0 4px 8px 0;
}
.game-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  font-size: 11px;
}
.game-footer a {
  white-space: nowrap;
}
@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(-7px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (max-width: 760px) {
  .game-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 13px;
  }
  .blackjack-room {
    max-width: 580px;
    padding-inline: 14px;
  }
  .room-header {
    position: relative;
    margin-bottom: 10px;
    align-items: start;
  }
  .room-header h1 {
    font-size: 32px;
  }
  .room-header p:not(.eyebrow) {
    font-size: 12px;
  }
  .room-header .eyebrow {
    font-size: 9px;
    letter-spacing: 0.12em;
    padding-right: 80px;
  }
  #sound {
    position: absolute;
    right: 0;
    top: -3px;
    font-size: 10px;
    padding: 8px;
  }
  .stats {
    gap: 12px;
    margin: 7px 0;
  }
  .stat {
    font-size: 10px;
  }
  .stat strong {
    font-size: 22px;
    margin-top: 2px;
  }
  .trail-heading {
    margin-bottom: 11px;
    gap: 8px;
  }
  .trail {
    gap: 5px;
  }
  .trail li {
    width: 19px;
    height: 19px;
    font-size: 8px;
  }
  #best {
    font-size: 10px;
  }
  .wager-panel {
    padding: 10px;
    margin-bottom: 13px;
    gap: 8px;
    flex-wrap: wrap;
  }
  .wager-choice {
    justify-content: space-between;
    width: 100%;
  }
  #wager-title {
    font-size: 12px;
  }
  .wagers button {
    width: 44px;
  }
  #deal {
    width: 100%;
    min-width: 0;
    padding: 10px 8px;
    font-size: 14px;
  }
  .blackjack-table {
    padding: 15px 12px 13px;
    border-radius: 26px;
  }
  .blackjack-table[data-phase="player"] .table-note {
    display: none;
  }
  .dealer-seat {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
  }
  .dealer-seat .seat-heading {
    flex-direction: column;
    gap: 5px;
    margin: 0;
    max-width: 135px;
    text-align: center;
  }
  .dealer-seat .cards-row {
    max-width: 180px;
  }
  .felt-rule {
    margin: 8px 0 7px;
    font-size: 9px;
    gap: 11px;
  }
  .playing-card,
  .card-slot {
    width: 53px;
    height: 76px;
    border-radius: 6px;
  }
  .card-corner {
    font-size: 15px;
    top: 4px;
    left: 5px;
  }
  .card-corner > span {
    font-size: 12px;
    margin-top: 1px;
  }
  .card-corner.bottom {
    right: 5px;
    bottom: 4px;
  }
  .card-center {
    font-size: 25px;
  }
  .player-hand {
    padding: 10px 7px;
  }
  .player-hand.active {
    padding: 9px 6px;
  }
  .player-hand .seat-heading {
    min-height: 18px;
    margin-bottom: 7px;
  }
  .split-hands .playing-card {
    width: 44px;
    height: 66px;
  }
  .hand-summary {
    font-size: 12px;
    margin-top: 7px;
  }
  .table-note {
    font-size: 11px;
    margin-top: 9px;
  }
  .status {
    font-size: 13px;
    min-height: 44px;
    padding: 9px 11px;
    margin-bottom: 8px;
  }
  .actions {
    gap: 7px;
  }
  .actions button {
    min-height: 60px;
    padding: 8px 5px;
  }
  .actions button > span {
    font-size: 16px;
  }
  .actions button > small {
    font-size: 12px;
    margin-top: 3px;
  }
  .coach-row {
    margin-top: 8px;
  }
  .game-footer {
    flex-direction: column;
    align-items: start;
    gap: 2px;
  }
}
@media (max-width: 360px) {
  .blackjack-room {
    padding-inline: 10px;
  }
  .room-header h1 {
    font-size: 28px;
  }
  .room-header .eyebrow {
    font-size: 8px;
    letter-spacing: 0.06em;
  }
  .trail-heading {
    flex-wrap: wrap;
    gap: 4px;
  }
  .trail {
    flex: 1;
    justify-content: space-between;
  }
  #best {
    flex-basis: 100%;
    text-align: right;
  }
  .blackjack-table {
    padding-inline: 9px;
  }
  .dealer-seat {
    gap: 12px;
  }
  .dealer-seat .seat-heading > span {
    font-size: 10px;
  }
}
