/* Hand replay uses the Simulator's Clean table DOM, card renderer, and
   racetrack seat positions. Keep these rules scoped to the replay stage. */
.hr-card .hr-sim-stage {
  flex: 1 1 auto;
  min-width: 0;
  height: var(--hr-stage);
  display: flex;
  align-items: center;
  justify-content: center;
  container-type: inline-size;
  overflow: visible;
}
.hr-sim-stage .sim-table.hr-sim-table {
  position: relative;
  flex: none;
  width: min(1180px, calc(100% - 120px)) !important;
  height: auto !important;
  aspect-ratio: 860 / 420;
  border-radius: 999px !important;
  border: 9px solid #070b15 !important;
  background: radial-gradient(ellipse 75% 70% at 50% 45%, #111c33 0%, #0b1426 55%, #080e1c 100%) !important;
  box-shadow: 0 0 0 1px rgba(203,213,225,.38), inset 0 0 0 1px rgba(203,213,225,.1), 0 30px 70px rgba(0,0,0,.55) !important;
  overflow: visible;
}
.hr-sim-table .sim-felt-texture {
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(148,163,184,.07);
  border-radius: inherit;
  background: none;
  pointer-events: none;
}
.hr-sim-table .sim-felt-texture::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 22%;
  aspect-ratio: 720 / 320;
  transform: translate(-50%,-50%);
  background: url("../sp-logo-clean.png") center / contain no-repeat;
  opacity: .3;
}
.hr-sim-table .sim-street-label {
  position: absolute;
  top: 19%; left: 50%; transform: translate(-50%,-50%);
  color: #8194ae;
  font: 700 11px/1 'JetBrains Mono', monospace;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-shadow: none;
  white-space: nowrap;
  z-index: 2;
}
.hr-sim-table .sim-pot-wrap {
  position: absolute;
  top: 32%; left: 50%; transform: translate(-50%,-50%);
  display: grid; justify-items: center; gap: 7px;
  z-index: 3;
}
.hr-sim-table .sim-pot-chips { display: flex; gap: 2px; height: 12px; align-items: center; }
.hr-sim-table .sim-pot-chips i {
  width: 19px; height: 8px; border-radius: 50%;
  background: #3b82f6;
  border: 2px solid #cbd5e1;
  box-shadow: 0 2px 0 #1e40af, 0 3px 0 #cbd5e1;
}
.hr-sim-table .sim-pot-chips i + i { width: 15px; background: #cbd5e1; border-color: #e2e8f0; box-shadow: 0 2px 0 #64748b; }
.hr-sim-table .sim-pot {
  white-space: nowrap;
  color: #e2e8f0;
  background: rgba(7,11,21,.82);
  border: 1px solid rgba(148,163,184,.2);
  border-radius: 999px;
  padding: 5px 13px;
  font: 600 clamp(13px,1.6cqi,17px)/1.1 Outfit,system-ui,sans-serif;
  letter-spacing: .2px;
  box-shadow: none;
  text-shadow: none;
}
.hr-sim-table .hr-pot-k { margin-right: 5px; color: #b7c7dd; font: inherit; text-transform: none; }
.hr-sim-table .sim-community.hr-board {
  position: absolute;
  top: 51%; left: 50%; transform: translate(-50%,-50%);
  min-height: 0;
  display: flex; align-items: center; justify-content: center;
  gap: clamp(4px,.5cqi,8px);
  white-space: nowrap;
  z-index: 4;
}
.hr-sim-table .sim-community .card-face,
.hr-sim-table .sim-community .card-back {
  width: clamp(44px,6.2cqi,80px) !important;
  height: clamp(62px,8.4cqi,114px) !important;
}
.hr-sim-table .sim-community .card-face,
.hr-sim-table .hr-seat-cards .card-face {
  --hr-card-ink: #e2e8f0;
  position: relative;
  display: inline-flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  flex: none;
  color: var(--hr-card-ink) !important;
  background: linear-gradient(180deg,#1a2438,#121a2b) !important;
  border: 1px solid rgba(226,232,240,.18) !important;
  border-radius: 7px !important;
  box-shadow: 0 6px 16px rgba(0,0,0,.45) !important;
  font-family: Outfit,system-ui,sans-serif !important;
}
.hr-sim-table .card-face[data-suit="h"] { --hr-card-ink: #f87171; }
.hr-sim-table .card-face[data-suit="d"] { --hr-card-ink: #60a5fa; }
.hr-sim-table .card-face[data-suit="c"] { --hr-card-ink: #4ade80; }
.hr-sim-table .card-face .cf-shine,
.hr-sim-table .card-face .cf-pip,
.hr-sim-table .card-face .cf-corner-br { display: none !important; }
.hr-sim-table .card-face .cf-corner {
  position: static !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 0 !important;
  line-height: 1 !important;
}
.hr-sim-table .sim-community .cf-corner > span:first-child { font: 700 clamp(28px,3.7cqi,49px)/1 Outfit,system-ui,sans-serif !important; }
.hr-sim-table .sim-community .cf-corner > span:last-child { font-size: clamp(22px,2.6cqi,33px) !important; line-height: 1 !important; }
.hr-sim-table .card-back {
  flex: none;
  background: #111a2d !important;
  border: 1px solid rgba(226,232,240,.18) !important;
  border-radius: 7px !important;
  box-shadow: 0 6px 16px rgba(0,0,0,.45), inset 0 0 0 3px #111a2d, inset 0 0 0 4px rgba(148,163,184,.16) !important;
}
.hr-sim-table .card-back > * { display: none !important; }
.hr-sim-table .hr-seats { position: absolute; inset: 0 !important; z-index: 5; pointer-events: none; }
.hr-sim-table .sim-seat.hr-seat,
.hr-sim-table .sim-seat-ghost.hr-seat-ghost {
  position: absolute;
  transform: translate(-50%,-50%);
  width: clamp(78px,11.5cqi,140px);
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  z-index: 6;
}
.hr-sim-table .sim-seat-circle {
  position: relative;
  width: 72px !important;
  height: 56px !important;
  min-width: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.hr-sim-table .sim-seat-circle-ai { height: 36px !important; }
.hr-sim-table .hr-seat-cards {
  position: absolute;
  top: -25px; bottom: auto !important; left: 50%;
  transform: translateX(-50%) !important;
  display: flex; gap: 4px;
  z-index: 7;
}
.hr-sim-table .sim-seat-circle-ai .hr-seat-cards { top: -29px; }
.hr-sim-table .sim-seat-circle-hero .card-face,
.hr-sim-table .sim-seat-circle-hero .card-back {
  width: clamp(50px,5.5cqi,72px) !important;
  height: clamp(70px,7.8cqi,101px) !important;
}
.hr-sim-table .sim-seat-circle-ai .card-face,
.hr-sim-table .sim-seat-circle-ai .card-back {
  width: clamp(30px,3.8cqi,50px) !important;
  height: clamp(42px,5.2cqi,70px) !important;
}
.hr-sim-table .sim-seat-circle-hero .cf-corner > span:first-child { font: 700 clamp(25px,3cqi,38px)/1 Outfit,system-ui,sans-serif !important; }
.hr-sim-table .sim-seat-circle-hero .cf-corner > span:last-child { font-size: clamp(20px,2.3cqi,28px) !important; }
.hr-sim-table .sim-seat-circle-ai .cf-corner > span:first-child { font: 700 clamp(15px,1.8cqi,22px)/1 Outfit,system-ui,sans-serif !important; }
.hr-sim-table .sim-seat-circle-ai .cf-corner > span:last-child { font-size: clamp(12px,1.4cqi,17px) !important; }
.hr-sim-table .sim-seat-info.hr-seat-plate {
  position: relative;
  z-index: 8;
  display: grid !important;
  grid-template-columns: auto auto;
  justify-content: center; align-items: center;
  column-gap: 8px; row-gap: 2px;
  width: auto; min-width: clamp(90px,10cqi,140px);
  max-width: 100%;
  margin: -2px 0 0;
  padding: 7px 12px 8px;
  background: rgba(11,17,32,.96) !important;
  border: 1px solid rgba(148,163,184,.22) !important;
  border-top-color: rgba(203,213,225,.32) !important;
  border-radius: 10px !important;
  box-shadow: 0 8px 24px rgba(0,0,0,.45) !important;
  line-height: 1.1;
}
.hr-sim-table .hr-seat.hero .hr-seat-plate { border-color: rgba(59,130,246,.5) !important; border-top-color: rgba(147,197,253,.55) !important; }
.hr-sim-table .hr-seat.acting .hr-seat-plate { border-color: rgba(96,165,250,.9) !important; box-shadow: 0 8px 24px rgba(0,0,0,.45),0 0 0 3px rgba(59,130,246,.13) !important; }
.hr-sim-table .hr-seat.folded { opacity: 1 !important; }
.hr-sim-table .hr-seat.folded .hr-seat-plate {
  background: rgba(15,24,40,.96) !important;
  border-color: rgba(126,151,181,.42) !important;
}
.hr-sim-table .hr-seat.folded .sim-seat-circle-ai .card-back { opacity: .55; }
.hr-sim-table .hr-seat.folded [data-seat-hole]:empty::after {
  content: "FOLDED";
  display: block;
  padding: 3px 5px;
  color: #aabbd0;
  background: #111a2b;
  border: 1px solid rgba(148,163,184,.3);
  border-radius: 4px;
  font: 700 clamp(8px,.9cqi,10px)/1 'JetBrains Mono',monospace;
  letter-spacing: .04em;
}
.hr-sim-table .hr-seat.winner .hr-seat-plate { border-color: rgba(245,158,11,.75) !important; }
.hr-sim-table .hr-seat .sim-seat-pos-badge,
.hr-sim-table .hr-seat .sim-seat-name {
  width: auto; height: auto; padding: 0;
  border: 0; border-radius: 0;
  background: none; box-shadow: none;
  font: 500 clamp(8px,1cqi,11px)/1 'JetBrains Mono',monospace;
  letter-spacing: .1em; text-transform: uppercase;
  white-space: nowrap;
}
.hr-sim-table .hr-seat .sim-seat-pos-badge { color: #8194ae !important; }
.hr-sim-table .hr-seat .sim-seat-name { display: inline-flex; align-items: center; gap: 5px; color: #b7c7dd !important; }
.hr-sim-table .hr-seat .sim-seat-name::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #3b82f6; }
.hr-sim-table .hr-seat:not(.hero) .sim-seat-name::before { background: #64748b; }
/* The plate was capped at the seat's width, which clipped a six-letter name
   like SB_GUY by a few pixels once the side pane took its share. Let the plate
   size to its name (it stays centred on the seat) and only cut long names. */
.hr-sim-table .sim-seat-info.hr-seat-plate { width: max-content; max-width: none; margin-left: auto; margin-right: auto; }
.hr-sim-table .hr-seat .sim-seat-name { max-width: 13em; overflow: hidden; text-overflow: ellipsis; }
.hr-sim-table .hr-seat .sim-seat-stack {
  grid-column: 1 / -1;
  text-align: center;
  font: 600 clamp(13px,1.65cqi,20px)/1.1 Outfit,system-ui,sans-serif;
  color: #f1f5f9 !important;
  white-space: nowrap;
}
.hr-sim-table .hr-seat .sim-seat-stack .u { font-size: .75em; color: #9fb0c6; }
.hr-sim-table .hr-seat-eq:not(:empty) { grid-column: 1 / -1; justify-self: center; }
.hr-sim-table .hr-seat-bet {
  top: calc(100% + 7px);
  z-index: 9;
  min-height: 35px;
  gap: 8px;
  padding: 5px 11px;
  border: 1px solid rgba(250, 204, 117, .7);
  border-radius: 9px;
  background: linear-gradient(180deg, #17253a, #0a1221);
  box-shadow: 0 9px 20px rgba(0,0,0,.6), 0 0 0 2px rgba(3,7,18,.65);
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.hr-sim-table .hr-seat-bet::before {
  width: 13px;
  height: 13px;
  flex: none;
  background: radial-gradient(circle at 35% 28%, #fff3bb 0 15%, #fbbf24 17% 61%, #985714 64%);
  box-shadow: 0 0 0 2px #251808, 0 2px 5px rgba(0,0,0,.6);
}
.hr-sim-table .hr-seat-bet.current {
  border-color: #facc69;
  box-shadow: 0 9px 20px rgba(0,0,0,.6), 0 0 0 3px rgba(251,191,36,.26), 0 0 24px rgba(251,191,36,.18);
}
.hr-sim-table .hr-bet-label {
  color: #d7e1f2;
  font: 700 clamp(9px, 1cqi, 11px)/1 Outfit,system-ui,sans-serif;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.hr-sim-table .hr-seat-bet strong {
  color: #fff7dc;
  font: 750 clamp(15px, 1.9cqi, 21px)/1 Outfit,system-ui,sans-serif;
  white-space: nowrap;
}
.hr-sim-table .hr-seat.hero .hr-seat-bet {
  top: -70px;
  left: calc(50% + clamp(108px, 12cqi, 145px));
  transform: none;
}
.hr-sim-table .hr-seat.bet-to-right .hr-seat-bet,
.hr-sim-table .hr-seat-ghost.bet-to-right .hr-seat-bet {
  top: 50%;
  left: calc(100% + 7px);
  transform: none;
}
.hr-sim-table .hr-seat.bet-to-left .hr-seat-bet,
.hr-sim-table .hr-seat-ghost.bet-to-left .hr-seat-bet {
  top: 50%;
  left: auto;
  right: calc(100% + 7px);
  transform: none;
}
.hr-sim-table .sim-seat-ghost.hr-seat-ghost { opacity: 1; pointer-events: none; }
.hr-sim-table .sim-seat-ghost .sim-seat-info {
  min-width: clamp(88px,8.5cqi,116px);
  text-align: center;
  padding: 8px 10px;
  background: rgba(23,36,56,.96);
  border: 1px solid rgba(135,160,190,.55);
  border-top-color: rgba(181,202,226,.7);
  border-radius: 9px;
  box-shadow: 0 5px 14px rgba(0,0,0,.38), inset 0 1px 0 rgba(255,255,255,.05);
}
.hr-sim-table .sim-seat-ghost .sim-seat-pos-badge {
  color: #d3e0ef;
  background: none;
  border: 0;
  font: 700 clamp(11px,1.15cqi,14px)/1 Outfit,system-ui,sans-serif;
  letter-spacing: .04em;
}
.hr-sim-table .sim-seat-ghost .hr-ghost-status {
  display: block;
  margin-top: 3px;
  color: #8798af;
  font: 600 clamp(8px,.85cqi,10px)/1 Outfit,system-ui,sans-serif;
  white-space: nowrap;
}
.hr-sim-table .hr-action {
  position: absolute;
  top: 72%; left: 50%; transform: translateX(-50%);
  display: none; justify-content: center; align-items: center; gap: 7px;
  z-index: 4; white-space: nowrap;
  min-height: 31px;
  padding: 5px 11px;
  color: #e2e8f0;
  background: rgba(5,11,22,.88);
  border: 1px solid rgba(148,163,184,.25);
  border-radius: 8px;
  box-shadow: 0 5px 18px rgba(0,0,0,.35);
}
.hr-sim-table .hr-action:empty { display: none; }
.hr-sim-table .hr-action .hr-actor { color: #f1f5f9; font-weight: 700; }
.hr-sim-table .hr-action .hr-amt { color: #fde68a; font-weight: 800; font-variant-numeric: tabular-nums; }
.hr-sim-table .hr-action .hr-sizepct { color: #a9bcd5; }
.hr-card .hr-tl-amt { font-size: clamp(12px, 1.05cqi, 15px); color: #f8e3ad; font-weight: 800; }
.hr-card .hr-tl-row.current .hr-tl-amt { color: #ffcf69; }
@media (max-width: 900px) {
  .hr-card .hr-body { flex-direction: column; }
  .hr-card .hr-sim-stage { height: min(66vw, 390px); min-height: 250px; flex: none; }
  .hr-sim-stage .sim-table.hr-sim-table { width: calc(100% - 72px) !important; }
  .hr-card .hr-timeline { flex: none; width: 100%; height: clamp(150px,25vh,220px); }
}
@media (max-width: 600px) {
  .hr-card .hr-sim-stage { height: 330px; }
  .hr-sim-stage .sim-table.hr-sim-table { width: calc(100% - 34px) !important; aspect-ratio: 1.65; }
  .hr-card .hr-timeline { height: 170px; }
  .hr-sim-table .sim-seat-ghost.hr-seat-ghost { display: none; }
  .hr-sim-table .sim-seat.hr-seat { width: 68px; }
  .hr-sim-table .sim-seat-info.hr-seat-plate { min-width: 62px; padding: 4px 5px 5px; column-gap: 3px; }
  .hr-sim-table .hr-seat .sim-seat-pos-badge,
  .hr-sim-table .hr-seat .sim-seat-name { font-size: 7px; }
  .hr-sim-table .hr-seat .sim-seat-stack { font-size: 10px; }
  .hr-sim-table .sim-seat-circle-hero .card-face,
  .hr-sim-table .sim-seat-circle-hero .card-back { width: 35px !important; height: 51px !important; }
  .hr-sim-table .sim-seat-circle-ai .card-face,
  .hr-sim-table .sim-seat-circle-ai .card-back { width: 20px !important; height: 29px !important; }
  .hr-sim-table .hr-seat-bet { display: none; }
  .hr-sim-table .hr-seat-bet::before { width: 9px; height: 9px; }
  .hr-sim-table .hr-bet-label { font-size: 7px; }
  .hr-sim-table .hr-seat-bet strong { font-size: 11px; }
  .hr-sim-table .hr-seat.hero .hr-seat-bet { top: -42px; left: calc(50% + 41px); }
  .hr-sim-table .sim-street-label { display: none; }
  .hr-sim-table .hr-action {
    display: flex;
    top: calc(100% + 47px);
    padding: 6px 9px;
    gap: 6px;
    font-size: 11px;
    border-color: rgba(250,204,117,.52);
  }
  .hr-sim-table .hr-action .hr-amt { font-size: 14px; }
  .hr-sim-table .sim-community .card-face,
  .hr-sim-table .sim-community .card-back { width: 34px !important; height: 48px !important; }
  .hr-sim-table .sim-community .cf-corner > span:first-child { font-size: 19px !important; }
  .hr-sim-table .sim-community .cf-corner > span:last-child { font-size: 14px !important; }
  .hr-sim-table .sim-seat-circle-hero .cf-corner > span:first-child { font-size: 18px !important; }
  .hr-sim-table .sim-seat-circle-hero .cf-corner > span:last-child { font-size: 14px !important; }
}
