/* Heads-up No-Limit Hold'em — a restrained card-room table. The table materials (felt, rail, brass,
   cards, chips) come from the design tokens and look the same in light and dark themes;
   everything around the table follows the site theme. */

.hd-root {
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.hd-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------------- HUD ---------------- */
.hd-hud {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  font-size: 12.5px;
  color: var(--muted);
}
.hd-hud-l { display: flex; align-items: baseline; gap: 10px; }
.hd-hud-hand {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -.01em;
}
.hd-net { font-variant-numeric: tabular-nums; font-weight: 600; }
.hd-net.hd-up { color: var(--good); }
.hd-net.hd-down { color: var(--bad); }
.hd-hud-r { justify-self: end; letter-spacing: .02em; }
.hd-streets {
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 3px;
  list-style: none;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.hd-streets li {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background .3s, color .3s;
}
.hd-streets li.hd-past { color: color-mix(in srgb, var(--text) 55%, var(--muted)); }
.hd-streets li.hd-cur {
  color: #2b1f0b;
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5);
}

/* ---------------- table: rail, brass inlay, felt ---------------- */
.hd-table {
  --cw: clamp(38px, calc((100cqw - 64px) / 5.9), 64px);
  --rail: clamp(12px, 2.6cqw, 22px);
  position: relative;
  padding: var(--rail);
  border-radius: 999px;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(255, 255, 255, .13), transparent 55%),
    radial-gradient(120% 90% at 50% 100%, rgba(0, 0, 0, .35), transparent 60%),
    linear-gradient(180deg, var(--rail-1), var(--rail-2));
  box-shadow:
    0 28px 50px -24px rgba(0, 0, 0, .7),
    0 10px 22px -12px rgba(0, 0, 0, .55),
    inset 0 1px 0 rgba(255, 255, 255, .22),
    inset 0 -2px 3px rgba(0, 0, 0, .6);
  isolation: isolate;
}
/* padded leather: soft highlight and a faint stitch line */
.hd-table::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-image: var(--noise);
  opacity: .22;
  mix-blend-mode: overlay;
  pointer-events: none;
}
.hd-table::after {
  content: '';
  position: absolute;
  inset: calc(var(--rail) * .38);
  border-radius: inherit;
  border: 1px dashed rgba(236, 217, 166, .16);
  pointer-events: none;
}

.hd-felt {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto auto 1fr auto auto;
  justify-items: center;
  align-items: center;
  gap: 4px;
  padding: 10px 16px;
  border-radius: 999px;
  background: radial-gradient(ellipse 75% 70% at 50% 45%, var(--felt-1), var(--felt-2));
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, .55),
    0 0 0 3px var(--gold),
    0 0 0 4px rgba(0, 0, 0, .5),
    inset 0 0 0 1px rgba(0, 0, 0, .35),
    inset 0 14px 30px rgba(0, 0, 0, .45),
    inset 0 0 80px rgba(0, 0, 0, .35);
}
.hd-felt::before { /* felt texture */
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-image: var(--noise);
  opacity: .32;
  mix-blend-mode: soft-light;
  pointer-events: none;
}
.hd-felt::after { /* printed betting line */
  content: '';
  position: absolute;
  inset: 21% 12%;
  border-radius: 999px;
  border: 1px solid var(--felt-line);
  pointer-events: none;
}
.hd-mark {
  width: min(78%, 420px);
  margin: -2px 0 -8px;
  pointer-events: none;
  line-height: 0;
}
.hd-mark svg { width: 100%; height: auto; overflow: visible; }
.hd-mark text {
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 500;
  letter-spacing: .34em;
  fill: rgba(255, 255, 255, .15);
}
.hd-felt > * { position: relative; z-index: 1; }

/* ---------------- seats ---------------- */
.hd-seat {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hd-seat-top { flex-direction: column-reverse; margin-top: calc(var(--rail) * -1 - 14px); }
.hd-seat-bottom { margin-bottom: calc(var(--rail) * -1 - 14px); }
.hd-hole { display: flex; position: relative; z-index: 1; }
.hd-seat-bottom .hd-plate-wrap { margin-top: -16px; }
.hd-seat-top .hd-plate-wrap { margin-bottom: 3px; }
.hd-plate-wrap { position: relative; z-index: 2; }

.hd-plate {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 142px;
  padding: 5px 18px 5px 5px;
  border-radius: 999px;
  color: #f4efe3;
  background: linear-gradient(180deg, #2b2c31, #141518);
  border: 1px solid rgba(201, 164, 92, .45);
  box-shadow: 0 10px 22px -10px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .08);
  transition: border-color .3s, box-shadow .3s;
}
.hd-on .hd-plate {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 164, 92, .22), 0 0 22px rgba(236, 217, 166, .28), 0 10px 22px -10px rgba(0, 0, 0, .8);
  animation: hd-glow 2.4s ease-in-out infinite;
}
.hd-won .hd-plate { border-color: var(--gold-2); }
.hd-is-allin .hd-plate {
  border-color: #c9403c;
  box-shadow: 0 0 0 3px rgba(201, 64, 60, .22), 0 0 20px rgba(214, 70, 60, .3), 0 10px 22px -10px rgba(0, 0, 0, .8);
}
.hd-plate-allin {
  padding: 1px 8px;
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 750;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(180deg, #d0413f, #9d1f24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25);
}
@keyframes hd-glow {
  50% { box-shadow: 0 0 0 3px rgba(201, 164, 92, .34), 0 0 30px rgba(236, 217, 166, .42), 0 10px 22px -10px rgba(0, 0, 0, .8); }
}
.hd-ava {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
}
.hd-ava-jev {
  color: var(--gold-2);
  background: radial-gradient(circle at 35% 30%, #3a3b42, #0e0e11 70%);
  box-shadow: inset 0 0 0 1.5px var(--gold), inset 0 0 0 3px #0e0e11, inset 0 0 0 3.8px rgba(201, 164, 92, .45);
}
.hd-ava-you {
  color: #fff;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--accent) 70%, #fff), color-mix(in srgb, var(--accent) 80%, #000) 75%);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .35);
}
.hd-pinfo { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.hd-pname {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(244, 239, 227, .72);
}
.hd-pstack {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: var(--gold-2);
}
.hd-coin {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--gold-2) 0 30%, var(--gold) 32% 58%, #8a6a2e 60%);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .4);
}

/* dealer puck */
.hd-puck {
  position: absolute;
  right: calc(100% + 10px);
  inset-block: 0;
  margin-block: auto;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: #3b2a0e;
  background: radial-gradient(circle at 38% 30%, #fff6da, var(--gold-2) 30%, var(--gold) 62%, #8c6a2c 100%);
  box-shadow:
    inset 0 0 0 2px rgba(255, 247, 222, .5),
    inset 0 0 0 3.5px rgba(120, 88, 32, .55),
    0 3px 6px rgba(0, 0, 0, .55),
    0 1px 0 #6d5122;
}

/* action bubbles */
.hd-bubble {
  position: absolute;
  left: calc(100% + 10px);
  inset-block: 0;
  margin-block: auto;
  height: max-content;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 650;
  white-space: nowrap;
  color: #1c1a16;
  background: var(--paper);
  box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .7), 0 0 0 1px rgba(0, 0, 0, .15);
  transform-origin: left center;
}
.hd-bubble::before {
  content: '';
  position: absolute;
  left: -4px;
  top: calc(50% - 4px);
  width: 8px;
  height: 8px;
  background: inherit;
  transform: rotate(45deg);
  border-radius: 1px;
}
.hd-bubble.hd-b-bet, .hd-bubble.hd-b-raise, .hd-bubble.hd-hn.hd-best {
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  color: #2b1f0b;
}
.hd-bubble.hd-b-bet::before, .hd-bubble.hd-b-raise::before, .hd-bubble.hd-hn.hd-best::before { background: var(--gold); }
.hd-bubble.hd-b-fold { background: #3a3b40; color: rgba(244, 239, 227, .8); }
.hd-bubble.hd-b-shove {
  color: #fff;
  letter-spacing: .02em;
  background: linear-gradient(180deg, #d0413f, #9d1f24);
  box-shadow: 0 6px 16px -6px rgba(120, 10, 14, .9), 0 0 0 1px rgba(255, 214, 160, .35), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.hd-bubble.hd-b-shove::before { background: #b52d2f; }
.hd-bubble.hd-b-sb, .hd-bubble.hd-b-bb { background: rgba(247, 243, 234, .82); color: #3d3a33; font-weight: 600; }
.hd-bubble.hd-hn { background: #17181b; color: #f4efe3; border: 1px solid rgba(201, 164, 92, .5); }
.hd-bubble.hd-hn::before { background: #17181b; }
.hd-b-allin {
  padding: 0 5px;
  border-radius: 4px;
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #fff;
  background: var(--card-red);
}
.hd-bubble.hd-think { gap: 4px; padding: 8px 11px; }
.hd-think i, .hd-dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  animation: hd-dot 1.1s infinite ease-in-out;
}
.hd-think i:nth-child(2), .hd-dots i:nth-child(2) { animation-delay: .15s; }
.hd-think i:nth-child(3), .hd-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes hd-dot { 0%, 100% { opacity: .25; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-2px); } }

/* ---------------- playing cards ---------------- */
.hd-card {
  --w: var(--cw);
  --rot: 0deg;
  --lift: 0px;
  position: relative;
  flex: none;
  display: block;
  width: var(--w);
  height: calc(var(--w) * 1.4);
  perspective: 700px;
  transform: translateY(var(--lift)) rotate(var(--rot));
  transition: transform .35s var(--ease, ease), filter .35s, opacity .35s;
}
.hd-seat-bottom .hd-card { --w: calc(var(--cw) * 1.08); }
.hd-seat-top .hd-card { --w: calc(var(--cw) * .84); }
.hd-hole .hd-card + .hd-card { margin-left: calc(var(--w) * -.16); }
.hd-hole .hd-card:first-child { --rot: -5deg; }
.hd-hole .hd-card:last-child { --rot: 5deg; }
.hd-seat-top .hd-hole .hd-card:first-child { --rot: 4deg; }
.hd-seat-top .hd-hole .hd-card:last-child { --rot: -4deg; }

.hd-inner {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}
.hd-inner.hd-down { transform: rotateY(180deg); }
.hd-face, .hd-back {
  position: absolute;
  inset: 0;
  border-radius: calc(var(--w) * .09);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
}
.hd-face {
  color: var(--card-black);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, .9), rgba(255, 255, 255, 0) 40%),
    var(--paper);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, .12),
    0 1px 1px rgba(0, 0, 0, .25),
    0 4px 10px -3px rgba(0, 0, 0, .5);
  user-select: none;
}
.hd-face.hd-red { color: var(--card-red); }
.hd-idx {
  position: absolute;
  top: calc(var(--w) * .06);
  left: calc(var(--w) * .07);
  display: flex;
  flex-direction: column;
  align-items: center;
  width: calc(var(--w) * .24);
  line-height: .9;
}
.hd-idx.br { top: auto; left: auto; bottom: calc(var(--w) * .06); right: calc(var(--w) * .07); transform: rotate(180deg); }
.hd-idx-r {
  font-family: var(--font-display);
  font-size: calc(var(--w) * .27);
  font-weight: 600;
  letter-spacing: -.02em;
}
.hd-ten .hd-idx-r { letter-spacing: -.1em; font-size: calc(var(--w) * .24); margin-left: -.06em; }
.hd-idx-s { display: block; width: calc(var(--w) * .17); margin-top: calc(var(--w) * .025); line-height: 0; }
.hd-idx-s svg, .hd-pip svg, .hd-court-s svg { display: block; width: 100%; height: auto; }
.hd-pip {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.hd-pip svg { width: 40%; filter: drop-shadow(0 .5px 0 rgba(0, 0, 0, .15)); }
.hd-pip.hd-ace svg { width: 50%; }
/* court cards: flat face, no inner frame. Crown ornament, big upright letter, suit beneath. */
.hd-court {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: calc(var(--w) * .02);
}
.hd-crown { display: block; width: calc(var(--w) * .22); line-height: 0; opacity: .8; margin-bottom: calc(var(--w) * .03); }
.hd-crown svg { display: block; width: 100%; height: auto; }
.hd-court-l {
  font-family: var(--font-display);
  font-size: calc(var(--w) * .5);
  font-weight: 600;
  font-style: normal;
  letter-spacing: -.02em;
  line-height: .9;
}
.hd-court-s { display: block; width: calc(var(--w) * .14); line-height: 0; margin-top: calc(var(--w) * .045); }

.hd-back {
  transform: rotateY(180deg);
  background:
    radial-gradient(circle at 50% 50%, transparent 0 9%, rgba(201, 164, 92, .75) 9.5% 11%, transparent 11.5%),
    repeating-linear-gradient(60deg, rgba(201, 164, 92, .34) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(-60deg, rgba(201, 164, 92, .34) 0 1px, transparent 1px 5px),
    radial-gradient(ellipse at 50% 40%, color-mix(in srgb, var(--accent) 55%, #1b1440), color-mix(in srgb, var(--accent) 30%, #0a0820));
  box-shadow:
    inset 0 0 0 calc(var(--w) * .055) var(--paper),
    inset 0 0 0 calc(var(--w) * .055 + 1px) var(--gold),
    inset 0 0 0 calc(var(--w) * .055 + 3px) color-mix(in srgb, var(--accent) 30%, #0a0820),
    inset 0 0 0 calc(var(--w) * .055 + 3.8px) rgba(201, 164, 92, .6),
    0 1px 1px rgba(0, 0, 0, .3),
    0 4px 10px -3px rgba(0, 0, 0, .55);
}
.hd-back::after { /* centre medallion */
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 26%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%) rotate(45deg);
  border: 1px solid var(--gold-2);
  background: color-mix(in srgb, var(--accent) 35%, #0a0820);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 35%, #0a0820), 0 0 0 2.8px rgba(201, 164, 92, .6);
}

.hd-card.hd-slot {
  border-radius: calc(var(--w) * .09);
  border: 1px solid var(--felt-line);
  background: rgba(0, 0, 0, .08);
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, .25);
}

/* showdown: winning five lift & glow, the rest dim; folded cards are mucked */
.hd-card.hd-win { --lift: -7px; }
.hd-card.hd-win .hd-face {
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, .1),
    0 0 0 2px var(--gold),
    0 0 18px 2px rgba(236, 217, 166, .55),
    0 8px 16px -4px rgba(0, 0, 0, .6);
}
.hd-card.hd-dim { filter: brightness(.52) saturate(.7); }
.hd-card.hd-muck { opacity: .38; filter: grayscale(.6); }
.hd-done .hd-seat:not(.hd-won) .hd-card.hd-dim { filter: brightness(.5) saturate(.6); }

/* ---------------- board, pot, chips ---------------- */
.hd-centre { display: grid; justify-items: center; gap: 8px; }
.hd-done .hd-centre { gap: 16px; }
.hd-board { display: flex; gap: calc(var(--cw) * .1); }
.hd-potrow {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 36px;
}
.hd-potlabel {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .62);
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .22);
  border: 1px solid rgba(255, 255, 255, .08);
}
.hd-potlabel b { margin-left: 4px; font-size: 13.5px; letter-spacing: 0; color: #fff; font-variant-numeric: tabular-nums; }
.hd-done .hd-potrow .hd-pot { position: absolute; }

.hd-betrow { display: flex; justify-content: center; align-items: center; min-height: 36px; }
.hd-chips { display: inline-flex; align-items: flex-end; gap: 7px; }
.hd-stack { display: inline-flex; align-items: flex-end; filter: drop-shadow(0 3px 2px rgba(0, 0, 0, .45)); }
.hd-stack .hd-col { display: block; }
.hd-stack .hd-col + .hd-col { margin-left: -5px; }
.hd-amt {
  margin-bottom: 2px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: #fff;
  background: rgba(0, 0, 0, .42);
  border: 1px solid rgba(255, 255, 255, .1);
}

.hd-banner {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 6px 18px 7px;
  border-radius: 12px;
  color: #f7f1e1;
  background: rgba(10, 12, 11, .74);
  border: 1px solid rgba(201, 164, 92, .7);
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .06);
  text-align: center;
}
.hd-banner-k {
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
}
.hd-banner b { font-family: var(--font-display); font-size: 16px; font-weight: 600; letter-spacing: -.005em; }

.hd-virtual {
  margin: -4px 0 0;
  text-align: center;
  font-size: 11.5px;
  letter-spacing: .05em;
  color: var(--muted);
}

/* ---------------- action bar ---------------- */
.hd-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  min-height: 98px;
  padding: 4px 0;
}
.hd-say {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}
.hd-say.hd-good { color: var(--good); }
.hd-say.hd-bad { color: var(--bad); }
.hd-tocall {
  padding: 1px 9px;
  border-radius: 999px;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.hd-dots { display: inline-flex; gap: 3px; margin-left: 2px; }
.hd-dots i { width: 4px; height: 4px; }
.hd-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; width: 100%; }
.hd-act {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 132px;
  height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: 650 15px/1 var(--font);
  letter-spacing: .01em;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .15s, box-shadow .2s, background .2s, border-color .2s, opacity .2s;
}
.hd-act:hover:not(:disabled) { transform: translateY(-1px); }
/* Next hand / New game: the one button on screen, so make it prominent */
.hd-act.hd-act-next { min-width: 220px; height: 54px; padding: 0 32px; font-size: 16.5px; }
.hd-act:active:not(:disabled) { transform: translateY(0) scale(.98); }
.hd-act:disabled { cursor: default; }
.hd-act-n {
  min-width: 22px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
  background: rgba(0, 0, 0, .14);
}
.hd-act-fold {
  color: var(--text);
  background: var(--surface);
  border-color: color-mix(in srgb, var(--bad) 40%, var(--border));
}
.hd-act-fold:hover:not(:disabled) { background: color-mix(in srgb, var(--bad) 8%, var(--surface)); }
.hd-act-plain {
  color: var(--bg);
  background: var(--text);
  box-shadow: 0 6px 16px -10px rgba(0, 0, 0, .7);
}
.hd-act-plain .hd-act-n { background: color-mix(in srgb, var(--bg) 20%, transparent); }
.hd-act-gold {
  color: #2b1f0b;
  background: linear-gradient(180deg, var(--gold-2), var(--gold) 58%, #a9853f);
  border-color: #9a7735;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 8px 18px -10px rgba(120, 88, 30, .9);
}
.hd-act-gold .hd-act-n { background: rgba(60, 40, 8, .14); }
.hd-act-gold:hover:not(:disabled) { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 10px 22px -10px rgba(120, 88, 30, 1); }
.hd-act-allin {
  color: #fff;
  background: linear-gradient(180deg, #d9504b, #b3292c 60%, #8f1c21);
  border-color: #7c161b;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 8px 18px -10px rgba(140, 20, 24, .95);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.hd-act-allin .hd-act-n { background: rgba(0, 0, 0, .2); letter-spacing: 0; }
.hd-act-allin:hover:not(:disabled) { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 10px 22px -10px rgba(140, 20, 24, 1); }
.hd-act-agg.hd-act-shove { filter: saturate(1.15); }
.hd-act.hd-ghost { color: var(--muted); background: var(--surface-2); border-color: var(--border); opacity: .45; }
.hd-act:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.hd-bar-over { gap: 8px; }

/* bet sizing: quick chips, slider, number */
.hd-sizer {
  display: grid;
  gap: 10px;
  width: min(100%, 620px);
  padding: 10px 14px 12px;
  border-radius: 18px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.hd-quick { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.hd-q {
  flex: 1 1 0;
  min-width: 52px;
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: 650 13px/1 var(--font);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, transform .12s;
}
.hd-q:hover:not(:disabled) { border-color: var(--gold); transform: translateY(-1px); }
.hd-q.hd-q-on {
  color: #2b1f0b;
  border-color: #9a7735;
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5);
}
.hd-q:last-child { color: #b3292c; border-color: color-mix(in srgb, #b3292c 45%, var(--border)); }
.hd-q:last-child.hd-q-on { color: #fff; border-color: #7c161b; background: linear-gradient(180deg, #d9504b, #a2252a); }
.hd-slide { display: flex; align-items: center; gap: 12px; }
.hd-lim { font-size: 12px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.hd-range {
  --fill: 0%;
  flex: 1;
  min-width: 0;
  height: 22px;
  margin: 0;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
.hd-range::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold) var(--fill), color-mix(in srgb, var(--text) 16%, transparent) var(--fill));
}
.hd-range::-moz-range-track { height: 6px; border-radius: 999px; background: color-mix(in srgb, var(--text) 16%, transparent); }
.hd-range::-moz-range-progress { height: 6px; border-radius: 999px; background: var(--gold); }
.hd-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  margin-top: -8px;
  border-radius: 50%;
  border: 1px solid #8c6a2c;
  background: radial-gradient(circle at 38% 30%, #fff6da, var(--gold-2) 35%, var(--gold) 70%);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .45), inset 0 0 0 3px rgba(255, 247, 222, .45);
}
.hd-range::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid #8c6a2c;
  background: radial-gradient(circle at 38% 30%, #fff6da, var(--gold-2) 35%, var(--gold) 70%);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .45);
}
.hd-range:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 999px; }
.hd-numwrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 4px 3px 10px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.hd-numk { font-size: 11px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.hd-num {
  width: 4.2em;
  height: 28px;
  padding: 0 6px;
  border: 0;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  font: 700 15px/1 var(--font);
  font-variant-numeric: tabular-nums;
  text-align: center;
  -moz-appearance: textfield;
}
.hd-num::-webkit-inner-spin-button, .hd-num::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.hd-num:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.hd-over { text-align: center; }
.hd-over h2 { font-family: var(--font-display); font-size: 30px; margin: 0 0 4px; }
.hd-over p { margin: 0; }

/* ---------------- logs ---------------- */
.hd-logs { display: grid; gap: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.hd-log-title {
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.hd-log ol, .hd-recent ol {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 12.5px;
}
.hd-log li, .hd-recent li {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.hd-log li.hd-jev { border-color: color-mix(in srgb, var(--gold) 45%, var(--border)); }
.hd-recent li.hd-good b { color: var(--good); }
.hd-recent li.hd-bad b { color: var(--bad); }
.hd-lstreet { color: var(--muted); font-size: 11px; }
.hd-allin {
  padding: 0 5px;
  border-radius: 4px;
  font-size: 10.5px;
  color: #fff;
  background: var(--card-red);
}

/* ---------------- animations (one-shot; classes added by holdem.js) ---------------- */
.hd-a-deal { animation: hd-deal .52s var(--ease, ease-out) both; }
.hd-a-deal-top { animation: hd-deal-top .52s var(--ease, ease-out) both; }
.hd-a-flip { animation: hd-flip .6s cubic-bezier(.3, .7, .2, 1) both; }
.hd-a-board { animation: hd-board .42s var(--ease, ease-out) both; }
.hd-a-pop { animation: hd-pop .38s cubic-bezier(.3, 1.4, .5, 1) both; }
.hd-a-bet { animation: hd-bet .38s var(--ease, ease-out) both; }
.hd-a-bet-top { animation: hd-bet-top .38s var(--ease, ease-out) both; }
.hd-a-gather { animation: hd-gather .45s var(--ease, ease-out) both; }
.hd-a-to-top { animation: hd-to-top .9s cubic-bezier(.5, 0, .3, 1) both; }
.hd-a-to-bottom { animation: hd-to-bottom .9s cubic-bezier(.5, 0, .3, 1) both; }
.hd-a-fade { animation: hd-fade .9s ease both; }
.hd-a-banner { animation: hd-banner .5s var(--ease, ease-out) both; }

/* movement lives on .hd-card (individual translate/scale compose with its transform);
   the 3D turn lives on .hd-inner */
@keyframes hd-deal {
  from { opacity: 0; translate: 0 -150px; scale: .88; }
  30% { opacity: 1; }
  to { opacity: 1; translate: 0 0; scale: 1; }
}
@keyframes hd-deal-top {
  from { opacity: 0; translate: 0 130px; scale: .88; }
  30% { opacity: 1; }
  to { opacity: 1; translate: 0 0; scale: 1; }
}
@keyframes hd-flip {
  from { transform: rotateY(180deg); }
  to { transform: rotateY(0deg); }
}
@keyframes hd-board {
  from { opacity: 0; translate: 0 -34px; }
  to { opacity: 1; translate: 0 0; }
}
@keyframes hd-pop {
  from { opacity: 0; transform: scale(.6); }
  to { opacity: 1; transform: none; }
}
@keyframes hd-bet { from { opacity: 0; transform: translateY(34px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes hd-bet-top { from { opacity: 0; transform: translateY(-34px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes hd-gather { from { opacity: .3; transform: scale(.85); } to { opacity: 1; transform: none; } }
@keyframes hd-to-top { to { opacity: 0; transform: translateY(-190px) scale(.8); } }
@keyframes hd-to-bottom { to { opacity: 0; transform: translateY(190px) scale(.8); } }
@keyframes hd-fade { to { opacity: 0; transform: scale(.9); } }
@keyframes hd-banner { from { opacity: 0; transform: translateY(8px) scale(.96); } to { opacity: 1; transform: none; } }

/* ---------------- narrow tables: a rounded rectangle ---------------- */
@container (max-width: 600px) {
  .hd-table { border-radius: 64px; }
  .hd-felt { border-radius: calc(64px - var(--rail)); padding: 10px 10px; }
  .hd-felt::after { inset: 20% 7%; border-radius: 40px; }
  .hd-hud { grid-template-columns: 1fr auto; }
  .hd-hud-r { display: none; }
  .hd-streets li { padding: 3px 7px; font-size: 10px; letter-spacing: .04em; }
  .hd-streets li:not(.hd-cur):not(.hd-past) { opacity: .7; }
  .hd-plate { min-width: 118px; gap: 8px; padding: 4px 14px 4px 4px; }
  .hd-ava { width: 30px; height: 30px; font-size: 14px; }
  .hd-pstack { font-size: 14px; }
  .hd-bubble { font-size: 11.5px; padding: 3px 8px; left: calc(100% + 8px); }
  .hd-puck { width: 24px; height: 24px; font-size: 12px; right: calc(100% + 7px); }
  .hd-mark { width: 96%; }
  .hd-mark text { font-size: 28px; }
  .hd-act { min-width: 0; flex: 1 1 0; padding: 0 10px; height: 46px; font-size: 14px; gap: 6px; }
  .hd-btns.hd-btns-4 .hd-act { flex: 1 1 calc(50% - 10px); }
  .hd-sizer { padding: 9px 10px 10px; gap: 8px; }
  .hd-q { min-width: 0; padding: 0 4px; font-size: 12px; height: 30px; }
  .hd-slide { gap: 8px; }
  .hd-lim { display: none; }
  .hd-numk { display: none; }
  .hd-numwrap { padding: 3px; }
  .hd-act-n { padding: 2px 6px; font-size: 12.5px; }
  .hd-banner b { font-size: 14px; }
}
@container (max-width: 380px) {
  .hd-streets li:not(.hd-cur) { display: none; }
  .hd-hud-hand { font-size: 15px; }
  .hd-plate { min-width: 108px; padding-right: 12px; }
  .hd-bubble { padding: 3px 7px; font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .hd-root *, .hd-root *::before, .hd-root *::after {
    animation: none !important;
    transition: none !important;
  }
}
