/* Result safety: preserve table anchors, show a compact receipt by default,
   and let the player open per-pot details without growing off the viewport. */
html body.holdem-table-active #handResultModal.hand-result-modal {
  top:var(--result-safe-top,calc(50.7% + 94px)) !important;
  bottom:auto !important;
  width:208px !important;
  max-width:calc(100% - 20px) !important;
  transform:translateX(-50%) !important;
}
html body.holdem-table-active #handResultModal[data-result-expanded="1"] {
  width:276px !important;
}
html body.holdem-table-active #handResultModal .hand-result-card {
  display:flex !important;
  flex-direction:column !important;
  max-height:var(--result-safe-max-height,calc(100dvh - 20px)) !important;
  border-radius:10px !important;
  overflow:hidden !important;
  animation:none !important;
}
html body.holdem-table-active #handResultModal .hand-result-title {
  flex:0 0 auto !important;
  min-height:0 !important;
  display:flex !important;
  flex-wrap:wrap !important;
  gap:3px 6px !important;
  padding:5px 8px !important;
}
html body.holdem-table-active #handResultModal .hand-result-title span,
html body.holdem-table-active #handResultModal .hand-result-title strong {
  font-size:10px !important;
  line-height:1.3 !important;
  letter-spacing:0 !important;
  overflow-wrap:anywhere;
}
html body.holdem-table-active #handResultModal .hand-result-summary {
  display:grid;
  flex:0 0 auto;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:3px 6px;
  padding:6px 8px;
  color:#dccca8;
  font-size:10px;
}
html body.holdem-table-active #handResultModal .hand-result-summary > strong {
  grid-column:1 / -1;
  grid-row:1;
  color:#ffe193;
  font-size:16px;
  font-weight:900;
  line-height:1.25;
  overflow-wrap:anywhere;
  font-variant-numeric:tabular-nums;
}
html body.holdem-table-active #handResultModal .hand-result-details-toggle {
  min-height:26px;
  padding:3px 8px;
  border:1px solid #b69958;
  border-radius:6px;
  color:#fff1c9;
  background:#4d3a1d;
  font:700 10px/1.2 inherit;
  white-space:nowrap;
  cursor:pointer;
}
html body.holdem-table-active #handResultModal[data-result-expanded="0"] :is(#handResultRows,#handResultBoard) {
  display:none !important;
}
html body.holdem-table-active #handResultModal #handResultRows {
  flex:1 1 auto !important;
  min-height:0 !important;
  max-height:none !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
  overscroll-behavior:contain;
  scrollbar-width:thin;
  padding:0 7px !important;
}
html body.holdem-table-active #handResultModal #handResultBoard {
  flex:0 0 auto !important;
  gap:6px !important;
  padding:4px 8px !important;
}
html body.holdem-table-active #handResultModal .hand-result-row {
  grid-template-columns:minmax(0,1fr) auto !important;
  grid-template-areas:"pot pot" "player cards" "hand cards" "prize prize";
  gap:3px 7px !important;
  min-height:0 !important;
  padding:6px 4px !important;
  cursor:pointer;
}
html body.holdem-table-active #handResultModal .hand-result-row.is-selected {
  background:#b89a4426 !important;
  box-shadow:inset 2px 0 #f0cf73 !important;
}
html body.holdem-table-active #handResultModal .hand-result-row:focus-visible,
html body.holdem-table-active #handResultModal .hand-result-details-toggle:focus-visible {
  outline:2px solid #fff1b4;
  outline-offset:-2px;
}
html body.holdem-table-active #handResultModal .hand-result-pot-label {
  grid-area:pot;
  color:#d9bc79;
  font-size:10px;
  line-height:1.2;
  font-weight:800;
}
html body.holdem-table-active #handResultModal .hand-result-player { grid-area:player; min-width:0; }
html body.holdem-table-active #handResultModal .hand-result-hole { grid-area:cards; }
html body.holdem-table-active #handResultModal .hand-result-hand {
  grid-area:hand;
  align-items:flex-start !important;
  overflow:visible !important;
  white-space:normal !important;
}
html body.holdem-table-active #handResultModal .hand-result-prize {
  grid-area:prize;
  display:block !important;
  width:100% !important;
  min-width:0 !important;
  color:#ffdb6d !important;
  font-size:15px !important;
  line-height:1.35 !important;
  font-weight:900 !important;
  text-align:right;
  white-space:normal !important;
  overflow-wrap:anywhere;
  overflow:visible !important;
}
html body.holdem-table-active #handResultModal .hand-result-prize small {
  color:#cbbb94;
  font-size:9px;
  font-weight:600;
}
html body.holdem-table-active #handResultModal #handResultCountdown {
  flex:0 0 auto;
  padding:3px 8px !important;
  font-size:9px !important;
}
html body.holdem-table-active #handResultModal .hand-result-progress { flex:0 0 auto; }
/* The noon all-in percentage used to inherit a negative avatar-top offset.
   Its own slot below the plaque stays within short screens; no seat moves. */
html body.holdem-eight-layout.holdem-eight-layout.holdem-eight-layout.holdem-eight-layout.holdem-eight-layout.holdem-eight-layout.holdem-eight-layout.holdem-mascot-table #tableView :is(#seats,#seatGhosts) .seat-clock-12 .sweat-pct-tag {
  top:calc(100% + 3px) !important;
  bottom:auto !important;
}
html body.holdem-eight-layout.holdem-eight-layout.holdem-eight-layout.holdem-eight-layout.holdem-eight-layout.holdem-eight-layout.holdem-eight-layout.holdem-mascot-table #tableView #hero .sweat-pct-tag {
  left:50% !important;
  width:132px !important;
  min-width:132px !important;
  max-width:132px !important;
}
/* Final-table companions share the safe bounds instead of escaping above and
   below the result card. The prize ladder is a player-opened detail. */
html body.holdem-table-active #handResultModal:not(.hidden) { display:flex; flex-direction:column; }
html body.holdem-table-active #handResultModal .hand-result-card { order:2; }
html body.holdem-table-active #handResultModal .ft-result-badge {
  position:static;
  order:1;
  transform:none;
  justify-content:center;
  margin:0;
  padding:3px 6px;
  font-size:10px;
  letter-spacing:1px;
}
html body.holdem-table-active #handResultModal .ft-result-ladder {
  position:static;
  order:3;
  transform:none;
  margin:0;
  padding:5px 7px;
}
html body.holdem-table-active #handResultModal .ft-result-ladder .row { justify-content:center; flex-wrap:wrap; gap:4px 8px; }
html body.holdem-table-active #handResultModal[data-result-expanded="0"] .ft-result-ladder { display:none; }
/* The whole automatic receipt opens its details. This provides a real 44px
   touch target even on the scaled landscape table, with no adjacent control. */
html body.holdem-table-active #handResultModal .hand-result-card {
  position:relative;
  min-height:calc(44px / var(--result-render-scale,1));
}
html body.holdem-table-active #handResultModal .hand-result-summary { min-height:54px; box-sizing:border-box; }
html body.holdem-table-active #handResultModal .hand-result-details-toggle { font-family:inherit; font-size:10px; line-height:1.2; font-weight:700; }
html body.holdem-table-active #handResultModal[data-result-expanded="0"] .hand-result-details-toggle {
  position:absolute;
  z-index:1;
  inset:0;
  width:100%;
  height:100%;
  padding:0;
  border:0;
  border-radius:inherit;
  background:transparent;
}
html body.holdem-table-active #handResultModal[data-result-expanded="0"] .hand-result-details-label {
  position:absolute;
  right:8px;
  bottom:19px;
  padding:5px 8px;
  border:1px solid #b69958;
  border-radius:6px;
  background:#4d3a1d;
}
html body.holdem-table-active #handResultModal[data-result-expanded="1"] .hand-result-details-toggle {
  min-height:calc(44px / var(--result-render-scale,1));
}

html body.holdem-table-active #handResultModal[data-result-expanded="1"] .hand-result-details-toggle { min-width:calc(44px / var(--result-render-scale,1)); }
html body.holdem-table-active #handResultModal .hand-result-exact {
  display:block;
  color:#d6c69e;
  font-size:9px;
  font-weight:600;
  line-height:1.3;
  white-space:normal;
  overflow-wrap:anywhere;
}
/* A winner remains identifiable when its optional 3D stamp has no clear slot. */
html body.holdem-eight-layout.holdem-eight-layout.holdem-eight-layout.holdem-eight-layout.holdem-eight-layout.holdem-eight-layout.holdem-eight-layout.holdem-mascot-table #tableView :is(#seats,#hero) .is-winner :is(.name-pill,.hero-nameplate),
html body.holdem-eight-layout.holdem-eight-layout.holdem-eight-layout.holdem-eight-layout.holdem-eight-layout.holdem-eight-layout.holdem-eight-layout.holdem-mascot-table #tableView #hero.is-winner .hero-nameplate {
  border-color:#ffe095 !important;
  box-shadow:inset 0 0 0 1px #f6cd7866,0 0 8px #e6bf523d !important;
}
/* Award rows keep their content height. Only the list scrolls; flex shrinking
   must never pull a payout onto the following pot label. */
html body.holdem-table-active #handResultModal .hand-result-row { flex:0 0 auto !important; min-height:calc(44px / var(--result-render-scale,1)) !important; }
