/* Online card tables (TABLE agent): seat chips, trick table, blackjack / hold'em seats. Used with mp.css + cards.css. Board text is white on felt. */
.np-tbl-seat { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border-radius: 999px; min-width: 0; max-width: 100%;
  background: rgba(0,0,0,.3); border: 1px solid rgba(255,255,255,.14); color: #fff; transition: box-shadow .2s, opacity .2s; }
.np-tbl-seat.is-turn { box-shadow: 0 0 0 2px var(--volt, #d4ff3a), 0 0 16px rgba(212,255,58,.4); }
.np-tbl-seat.is-you { background: rgba(212,255,58,.18); }
.np-tbl-seat.is-left { opacity: .5; }
.np-tbl-av { width: 28px; height: 28px; flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: #475569; color: #fff; font: 700 15px/1 var(--font-body, system-ui); }
.np-tbl-who { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; text-align: left; }
.np-tbl-name { font: 700 13px var(--font-body, system-ui); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-tbl-name small { font-weight: 600; font-size: 10px; opacity: .7; }
.np-tbl-sub { font: 600 11px var(--font-body, system-ui); color: rgba(255,255,255,.78); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.np-tbl-timer { position: absolute; left: 14px; right: 14px; bottom: -4px; height: 3px; border-radius: 3px; background: rgba(255,255,255,.18); overflow: hidden; }
.np-tbl-timer::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--t, 100%); background: var(--volt, #d4ff3a); transition: width .25s linear; }
.np-tbl-seat .np-mp-bubble { bottom: calc(100% + 6px); }

/* hearts / spades: seats around the trick */
.np-tbl-cross { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); grid-template-rows: auto auto; align-items: center; justify-items: center;
  column-gap: 8px; row-gap: 4px; width: 100%; }
.np-tbl-c-top { grid-column: 1 / -1; grid-row: 1; max-width: 100%; }
.np-tbl-c-left { grid-column: 1; grid-row: 2; justify-self: start; max-width: 100%; min-width: 0; }
.np-tbl-c-right { grid-column: 3; grid-row: 2; justify-self: end; max-width: 100%; min-width: 0; }
.np-tbl-box { grid-column: 2; grid-row: 2; position: relative; }
.np-tbl-box .card.np-tbl-win { box-shadow: 0 0 0 2px var(--volt, #d4ff3a), 0 6px 16px rgba(0,0,0,.35); }
.np-hand > .card.np-tbl-dim { filter: brightness(.72); }
.np-tbl-bid { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 6px; }
.np-tbl-bid .np-msg { padding: 4px 12px; font-size: 14px; }
.np-tbl-bids { gap: 5px; }
.np-tbl-bids .btn { min-width: 36px; min-height: 36px; padding: 0 6px; background: rgba(255,255,255,.95); color: var(--ink, #0e1020); }
.np-tbl-bids .btn.btn-volt { background: var(--volt, #d4ff3a); }

/* blackjack: seats in a row under the dealer */
.np-tbl-bj { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: 8px; width: 100%; }
.np-tbl-bjseat { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 4px; border-radius: 14px; min-width: 0; background: rgba(0,0,0,.14); }
.np-tbl-bjseat.is-me { background: rgba(0,0,0,.28); }
.np-tbl-bjseat .np-chip { font-size: 12px; padding: 2px 8px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#bj-actions .np-seat-label { margin-right: 4px; }
#bj-actions .btn.btn-volt { background: var(--volt, #d4ff3a) !important; color: var(--ink, #0e1020); }

/* hold'em: compact seats (avatar above the name) */
.np-tbl-pkseats { flex-wrap: nowrap; }
.np-tbl-pk { flex: 1 1 0; max-width: 150px; padding: 4px 4px 6px !important; }
.np-tbl-pk .np-tbl-seat { flex-direction: column; gap: 2px; padding: 3px 4px; border-radius: 12px; width: 100%; }
.np-tbl-pk .np-tbl-who { align-items: center; text-align: center; width: 100%; }
.np-tbl-pk .np-tbl-name { max-width: 100%; font-size: 12px; }
.np-tbl-pk .np-tbl-name small { display: none; }
.np-tbl-btn { position: absolute; top: -6px; right: -4px; z-index: 3; width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: #fff; color: #0e1020; font: 800 11px/1 var(--font-body, system-ui); box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.np-tbl-last { font: 700 11px var(--font-body, system-ui); color: rgba(255,255,255,.85); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
#poker-actions .btn { min-height: 40px; }

/* start / waiting card */
.np-tbl-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.np-tbl-li { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border-radius: 999px; background: var(--bg-panel, #eceae2); font-size: 13px; font-weight: 600; max-width: 100%; }
.np-tbl-li .np-tbl-av { width: 24px; height: 24px; font-size: 13px; }
.np-tbl-li small { font-weight: 600; color: var(--text-muted, #8a8da3); }
.np-tbl-li.is-free { opacity: .6; }
.np-tbl-li.is-free .np-tbl-av { background: transparent; border: 1.5px dashed var(--text-muted, #8a8da3); color: var(--text-muted, #8a8da3); }
.np-tbl-card .btn-volt { background: var(--volt, #d4ff3a); color: var(--volt-ink, #0e1020); border-color: transparent; }
.np-tbl-bar .np-tbl-row { flex-wrap: nowrap; }
.np-tbl-bar .np-mp-turn { flex: 1 1 auto; min-width: 0; text-align: left; }

@media (max-width: 560px) {
  .np-tbl-seat { gap: 4px; padding-right: 7px; }
  .np-tbl-av { width: 24px; height: 24px; font-size: 13px; }
  .np-tbl-name { font-size: 12px; }
  .np-tbl-sub { font-size: 10px; }
  .np-tbl-c-left .np-tbl-seat, .np-tbl-c-right .np-tbl-seat { flex-direction: column; padding: 3px 5px; border-radius: 12px; max-width: 92px; }
  .np-tbl-c-left .np-tbl-who, .np-tbl-c-right .np-tbl-who { align-items: center; text-align: center; }
  .np-tbl-c-left .np-tbl-name small, .np-tbl-c-right .np-tbl-name small { display: none; }
  .np-tbl-bj { gap: 4px; }
  .np-tbl-bjseat .np-tbl-seat { flex-direction: column; padding: 3px 4px; border-radius: 12px; max-width: 100%; }
  .np-tbl-bjseat .np-tbl-who { align-items: center; text-align: center; }
  .np-tbl-bjseat .np-tbl-name small { display: none; }
  .np-tbl-pk .np-tbl-av { width: 22px; height: 22px; }
  .np-tbl-bar .np-mp-row .btn { padding: 0 10px; }
}
/* landscape phones: everything in less height */
@media (max-height: 500px) and (max-width: 1000px) and (orientation: landscape) {
  .np-tbl-bar { margin-bottom: 6px; }
  .np-tbl-bar .np-mp-panel { padding: 4px 8px; }
  .np-tbl-bar .np-mp-row .btn { min-height: 34px; }
  .np-tbl-bar .np-mp-turn { padding: 6px 10px; font-size: 13px; }
  .np-tbl-av { width: 22px; height: 22px; font-size: 12px; }
  .np-tbl-c-top .np-tbl-seat { padding-top: 1px; padding-bottom: 1px; }
  .np-tbl-bjseat { padding: 3px; gap: 2px; }
  .np-tbl-bids .btn { min-width: 32px; min-height: 32px; }
  .np-mm-choose3 .np-mm-ot small { display: none; }
}
/* status mirrored in the side toolbar (landscape phones only; elsewhere the bar above the board shows it) */
.np-tbl-hud { display: none; }
@media (max-height: 500px) and (max-width: 1000px) and (orientation: landscape) {
  .np-tbl-hud:not([hidden]) { display: flex; flex-direction: column; gap: 6px; width: 100%; margin-top: 8px; }
  .np-tbl-hud-t { font: 700 13px/1.25 var(--font-body, system-ui); padding: 6px 8px; border-radius: 10px; background: var(--bg-panel, #eceae2); color: var(--text, #12142a); text-align: center; overflow-wrap: anywhere; }
  .np-tbl-hud.is-mine .np-tbl-hud-t { background: var(--volt, #d4ff3a); color: var(--volt-ink, #0e1020); }
  .np-tbl-hud .btn { min-height: 34px; }
}
@media (max-width: 760px) and (orientation: portrait) {
  .np-tbl-hud:not([hidden]) { display: flex; flex-direction: row; align-items: center; gap: 6px; width: 100%; margin-top: 8px; flex-basis: 100%; }
  .np-tbl-hud-t { flex: 1 1 auto; min-width: 0; font: 700 13px/1.25 var(--font-body, system-ui); padding: 8px 10px; border-radius: 999px; background: var(--bg-panel, #eceae2); color: var(--text, #12142a); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .np-tbl-hud.is-mine .np-tbl-hud-t { background: var(--volt, #d4ff3a); color: var(--volt-ink, #0e1020); }
  .np-tbl-hud .btn { flex: none; min-height: 36px; }
}
@media (max-height: 500px) and (max-width: 1000px) and (orientation: landscape) {
  .game-area:has(#poker-board) #poker-actions { flex-wrap: nowrap; gap: 6px; }
  .game-area:has(#poker-board) #poker-actions .btn { min-height: 34px; padding: 0 10px; font-size: 13px; white-space: nowrap; }
  .np-tbl-pkseats { align-items: flex-start; }
  .np-tbl-pk { gap: 2px !important; }
  .np-tbl-pk .np-tbl-av { width: 20px; height: 20px; font-size: 11px; }
  .np-tbl-pk .np-seat-tag { font-size: 9px; }
}
@media (max-width: 420px) {
  #poker-actions .btn { padding: 0 10px; font-size: 13px; }
}
/* hold'em: six seats never widen the board */
.np-tbl-pkseats { min-width: 0; max-width: 100%; }
.np-tbl-pk { min-width: 0; }
.np-tbl-pk .np-tbl-seat, .np-tbl-pk .np-tbl-who { min-width: 0; max-width: 100%; }
@media (max-width: 760px) and (orientation: portrait) {
  #poker-board:has(.np-tbl-pkseats) { grid-template-columns: minmax(0, 1fr); }
  .np-tbl-pkseats { gap: 3px; }
  .np-tbl-pk { padding: 3px 2px 5px !important; }
  .np-tbl-pk .np-tbl-name, .np-tbl-pk .np-tbl-sub { font-size: 10px; }
  .np-tbl-btn { width: 16px; height: 16px; font-size: 9px; top: -4px; right: -2px; }
}
