/* Baccarat. The page is built once; states only change content inside fixed regions. */

.game-root { min-height: 46rem; }

.bc-table {
  --card-w: clamp(2.55rem, 16cqw, 4.35rem);
  --card-h: calc(var(--card-w) * 1.452);
  --radius: calc(var(--card-w) * 0.07);
  width: min(100%, 40rem);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.bc-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  height: 2.6rem;
  color: #d8e0d8;
  font-size: 0.85rem;
}

.bc-shoe-icon.playing-card {
  --card-w: 1.5rem;
  --card-h: 2.18rem;
  --radius: 0.2rem;
  flex: none;
  cursor: default;
  pointer-events: none;
}

.bc-shoe-info {
  display: grid;
  gap: 0.25rem;
  width: clamp(7rem, 36cqw, 12rem);
}

.bc-shoe-bar {
  position: relative;
  display: block;
  height: 0.45rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.32);
  overflow: visible;
}

.bc-shoe-fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.5);
}

.bc-shoe-cut {
  position: absolute;
  top: -0.2rem;
  bottom: -0.2rem;
  width: 3px;
  margin-left: -1px;
  border-radius: 2px;
  background: #f0cf6a;
}

.bc-shoe-text {
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.bc-hand {
  width: 100%;
}

.bc-hand + .bc-hand { margin-top: 0.15rem; }

.bc-hand-title {
  height: 1.35rem;
  margin: 0;
  font: normal 0.95rem/1.35rem var(--font-serif);
  color: #e8ebe6;
  text-align: center;
}

.bc-cards {
  display: grid;
  grid-template-columns: repeat(3, var(--card-w));
  justify-content: center;
  gap: 0.4rem;
  height: var(--card-h);
}

.bc-slot {
  position: relative;
  width: var(--card-w);
  height: var(--card-h);
  border-radius: var(--radius);
}

.bc-slot:not(.is-filled) {
  outline: 1px dashed rgba(255, 253, 247, 0.32);
  outline-offset: -1px;
}

.bc-slot .playing-card {
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  margin: 0;
  cursor: default;
  pointer-events: none;
}

.bc-total {
  height: 1.5rem;
  margin: 0.15rem 0 0;
  text-align: center;
  font: 700 1.05rem/1.5rem var(--font-serif);
  color: #fffdf7;
  font-variant-numeric: tabular-nums;
}

.bc-total.is-win,
.bc-total.is-push { color: #f0cf6a; }

.bc-total.is-lose { color: #d7c4c2; }

.bc-history {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1.7rem));
  justify-content: center;
  gap: 0.3rem;
  width: 100%;
  height: 1.7rem;
  margin: 0.35rem 0 0.15rem;
  padding: 0;
  list-style: none;
}

.bc-hist {
  display: grid;
  place-items: center;
  width: 100%;
  height: 1.7rem;
  border-radius: 50%;
  border: 2px solid transparent;
  color: #fffdf7;
  font: 700 0.68rem/1 var(--font-serif);
  letter-spacing: 0.02em;
}

.bc-hist.is-empty { border-color: rgba(255, 253, 247, 0.32); }
.bc-hist--player { background: #1e4578; }
.bc-hist--banker { background: #8c3b32; }
.bc-hist--tie { background: #c4a24a; color: #1d2433; }
.bc-hist.is-latest { box-shadow: inset 0 0 0 1px rgba(255, 253, 247, 0.85); }

.bc-spots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  width: 100%;
}

.bc-spots.is-locked { pointer-events: none; }

.bc-spot {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 8.75rem;
  margin: 0;
  padding: 0.7rem 0.35rem 0.5rem;
  border: 1px solid rgba(255, 253, 247, 0.38);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
  color: #fffdf7;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
}

.bc-spot--tie {
  background: rgba(224, 185, 72, 0.14);
  border-color: rgba(224, 185, 72, 0.55);
}

.bc-spot-name {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 2.4em;
  overflow: hidden;
  font-family: var(--font-serif);
  font-size: clamp(0.95rem, 4.2cqw, 1.28rem);
  line-height: 1.15;
  text-align: center;
}

.bc-spot-pay {
  height: 1.2em;
  color: #f0cf6a;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  line-height: 1.2;
  text-align: center;
}

.bc-spot-well {
  position: relative;
  width: 100%;
  height: 2.8rem;
  margin-top: auto;
}

.bc-spot.is-win {
  border-color: #f0cf6a;
  box-shadow: inset 0 0 0 1px #f0cf6a;
}

.bc-spot.is-lose { border-color: rgba(255, 253, 247, 0.16); }

.bc-spot.is-push { border-color: rgba(255, 253, 247, 0.72); }

.bc-spot:focus-visible {
  outline: 3px solid #e0b948;
  outline-offset: 2px;
}

@media (hover: hover) {
  .bc-spot:hover { background: rgba(255, 253, 247, 0.08); }
  .bc-spot--tie:hover { background: rgba(224, 185, 72, 0.22); }
}

.bc-spot:active { background: rgba(255, 253, 247, 0.12); }

.bc-dock .casino-chip-tray { flex-wrap: nowrap; }
