/* Table rules (owner 2026-10-08): cards open on your turn, timeout
   sit-out, show after an uncontested win, WIN mark.
   Subtle and premium: smoked glass, muted ivory text; champagne #D4B98A
   only on the single primary action ("I'm back") and as hairlines. */

/* ---- 1. hero cards held back until the action reaches you ---- */
.seat.hero .hcards.tr-held .pcard.back {
  background: repeating-linear-gradient(45deg, #1b1b1f 0 3px, #24242a 3px 6px);
  border: 1.5px solid rgba(212,185,138,.55);
  box-shadow: 0 2px 8px rgba(0,0,0,.55);
}
.seat.hero .hcards.tr-held .tr-hint {
  position: absolute; left: 50%; top: calc(100% + 4px); transform: translateX(-50%);
  white-space: nowrap; pointer-events: none;
  padding: 2px 7px; border-radius: 8px;
  background: rgba(12,12,14,.72); border: 1px solid rgba(255,255,255,.08);
  font: 600 9px var(--tb-font); letter-spacing: .03em;
  color: rgba(237,230,216,.72);
}
/* the reveal: one gentle turn, card by card */
.seat.hero .hcards.tr-flip { perspective: 420px; }
.seat.hero .hcards.tr-flip .pcard { animation: tr-flip .52s cubic-bezier(.2,.7,.2,1) both; backface-visibility: hidden; }
.seat.hero .hcards.tr-flip .pcard:nth-child(2) { animation-delay: .06s; }
.seat.hero .hcards.tr-flip .pcard:nth-child(3) { animation-delay: .12s; }
.seat.hero .hcards.tr-flip .pcard:nth-child(4) { animation-delay: .18s; }
.seat.hero .hcards.tr-flip .pcard:nth-child(5) { animation-delay: .24s; }
.seat.hero .hcards.tr-flip .pcard:nth-child(6) { animation-delay: .30s; }
@keyframes tr-flip {
  0% { transform: rotateY(90deg); filter: brightness(.7); }
  100% { transform: rotateY(0); filter: none; }
}

/* ---- WIN mark: soft white text, champagne hairline ---- */
#tbl-layer .seat .tr-win {
  position: absolute; left: 50%; top: 52px; transform: translateX(-50%); z-index: 4;
  padding: 1px 9px 0; border-radius: 3px; pointer-events: none;
  background: rgba(14,14,16,.78);
  border-top: 1px solid rgba(212,185,138,.7); border-bottom: 1px solid rgba(212,185,138,.7);
  font: 700 9.5px var(--tb-font); letter-spacing: .32em; text-indent: .32em;
  color: rgba(250,248,242,.92);
  animation: tr-win-in .35s ease-out both;
}
@keyframes tr-win-in { from { opacity: 0; transform: translateX(-50%) translateY(3px); } }

/* ---- 2. timeout sit-out modal ---- */
.tr-modal {
  position: absolute; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center;
  padding: 16px; background: rgba(6,6,8,.58);
  animation: tr-fade .18s ease-out both;
}
.tr-modal.out { animation: tr-fade-out .18s ease-in both; }
.tr-modal .tr-box {
  width: min(340px, 100%); box-sizing: border-box; padding: 22px 22px 16px; border-radius: 14px; text-align: center;
  background: linear-gradient(180deg, rgba(34,35,40,.97), rgba(18,18,21,.98));
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 18px 40px rgba(0,0,0,.6);
  color: #EDE6D8; font-family: var(--tb-font);
}
.tr-modal .tr-t { font: 700 17px var(--tb-font); letter-spacing: .01em; color: #F6F2EA; }
.tr-modal .tr-s { margin-top: 8px; font: 500 13.5px/1.45 var(--tb-font); color: rgba(237,230,216,.74); }
.tr-modal .tr-s b { color: #F6F2EA; font-variant-numeric: tabular-nums; font-weight: 700; }
.tr-modal .tr-clock {
  margin: 14px auto 0; display: inline-flex; align-items: baseline; gap: 8px;
  padding: 5px 12px; border-radius: 999px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07);
  font: 600 11.5px var(--tb-font); color: rgba(237,230,216,.6);
}
.tr-modal .tr-clock b { font: 700 13.5px var(--tb-font); color: #F6F2EA; font-variant-numeric: tabular-nums; }
.tr-modal .tr-back {
  display: block; width: 100%; height: 44px; margin-top: 18px; border: 0; border-radius: 10px; cursor: pointer;
  background: #D4B98A; color: #17140F; font: 800 14.5px var(--tb-font); letter-spacing: .02em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 4px 12px rgba(0,0,0,.35);
}
.tr-modal .tr-back:disabled { opacity: .65; cursor: default; }
.tr-modal .tr-back:focus-visible, .tr-modal .tr-later:focus-visible { outline: 2px solid rgba(246,242,234,.7); outline-offset: 2px; }
.tr-modal .tr-later {
  display: block; width: 100%; height: 34px; margin-top: 6px; border: 0; background: transparent; cursor: pointer;
  font: 600 12.5px var(--tb-font); color: rgba(237,230,216,.58);
}
.tr-modal .tr-fine { margin-top: 6px; font: 500 10px var(--tb-font); color: rgba(237,230,216,.34); }
@keyframes tr-fade { from { opacity: 0; } }
@keyframes tr-fade-out { to { opacity: 0; } }

/* ---- 3. Show pill (uncontested win) ---- */
.tr-show {
  position: absolute; right: 6px; bottom: 6px; z-index: 30;
  display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 8px 6px 8px;
  border-radius: 12px; overflow: hidden;
  background: linear-gradient(180deg, rgba(40,41,46,.95), rgba(16,17,20,.97));
  border: 1px solid rgba(255,255,255,.22); color: #EDE6D8;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 6px 16px rgba(0,0,0,.5);
  font: 700 13px var(--tb-font); letter-spacing: .02em;
  animation: tr-show-in .24s ease-out both;
}
.tr-show.shown { border-color: rgba(255,255,255,.14); color: rgba(237,230,216,.7); }
.tr-show .tr-show-c { display: inline-flex; gap: 3px; padding: 5px 4px 3px; border-radius: 7px; background: rgba(250,250,247,.06); }
.tr-show .tr-pick { padding: 0; border: 0; background: none; cursor: pointer; border-radius: 4px; transition: transform .12s ease-out, box-shadow .12s; }
.tr-show .tr-pick.sel { transform: translateY(-4px); box-shadow: 0 0 0 1.5px #FFFFFF, 0 3px 8px rgba(0,0,0,.5); }
.tr-show .tr-pick.on { cursor: default; box-shadow: 0 0 0 1px rgba(255,255,255,.35); }
.tr-show .tr-pick:disabled:not(.on) { cursor: default; }
.tr-show .tr-pick:focus-visible { outline: 1.5px solid #FFFFFF; outline-offset: 2px; }
.tr-show .pcard.tr-mini { width: 24px; height: 33px; border-radius: 3px; box-shadow: 0 1px 3px rgba(0,0,0,.5); }
.tr-show .pcard.tr-mini .r { font-size: 12px; left: 3px; top: 2px; }
.tr-show .pcard.tr-mini .s { font-size: 9px; left: 3px; top: 15px; }
.tr-show .pcard.tr-mini .bigsuit { display: none; }
.tr-show .tr-show-b { display: inline-flex; flex-direction: column; gap: 4px; }
.tr-show .tr-sbtn {
  height: 20px; padding: 0 10px; border-radius: 6px; cursor: pointer;
  font: 800 10.5px var(--tb-font); letter-spacing: .06em; text-transform: uppercase;
  background: #F4F2EE; color: #111214; border: 1px solid #F4F2EE;
}
.tr-show .tr-sbtn.ghost { background: transparent; color: #EDE6D8; border-color: rgba(255,255,255,.3); }
.tr-show .tr-sbtn:disabled { opacity: .45; cursor: default; }
.tr-show .tr-show-l { padding-right: 6px; }
.tr-show .tr-bar {
  position: absolute; left: 0; bottom: 0; height: 2px; width: 100%;
  background: rgba(255,255,255,.5); transform-origin: 0 50%;
  animation: tr-drain var(--left, 5000ms) linear forwards;
}
.tr-show.shown .tr-bar { background: rgba(255,255,255,.18); }
@keyframes tr-drain { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@keyframes tr-show-in { from { opacity: 0; transform: translateY(4px); } }

@media (prefers-reduced-motion: reduce) {
  .seat.hero .hcards.tr-flip .pcard, #tbl-layer .seat .tr-win, .tr-modal, .tr-modal.out, .tr-show { animation: none; }
  .tr-show .tr-bar { animation: none; display: none; }
  .tr-show .tr-pick { transition: none; }
}
