/* v365 — player identities and draw stock only. Field cards, capture/auction
 * motion, card dimensions and the existing avatar timer remain independent. */
.uiPlayerPanel[data-player-tone="0"]{--ui-player-top:#274c43;--ui-player-bottom:#142b26;--ui-player-line:#8ab8a29e;--ui-player-soft:#cee5d8}
.uiPlayerPanel[data-player-tone="1"]{--ui-player-top:#304657;--ui-player-bottom:#1c2935;--ui-player-line:#94b8d09e;--ui-player-soft:#d4e3f0}
.uiPlayerPanel[data-player-tone="2"]{--ui-player-top:#584735;--ui-player-bottom:#332a20;--ui-player-line:#d6b67d9e;--ui-player-soft:#f0dfbe}
.uiPlayerPanel[data-player-tone="3"]{--ui-player-top:#4d3c52;--ui-player-bottom:#2c2432;--ui-player-line:#bd9cc89e;--ui-player-soft:#e8d9ed}
.uiPlayerPanel{--ui-player-top:#274c43;--ui-player-bottom:#142b26;--ui-player-line:#8ab8a29e;--ui-player-soft:#cee5d8;--ui-table-text:#fff5e0;--ui-table-muted:var(--ui-player-soft);--ui-table-border:var(--ui-player-line)}
#seatT.uiPlayerPanel,#oSeat.uiPlayerPanel,#meIdent.uiPlayerPanel,#oIdent.uiPlayerPanel{background:linear-gradient(150deg,var(--ui-player-top),var(--ui-player-bottom));border-color:var(--ui-player-line);box-shadow:inset 0 1px #ffffff14,0 4px 10px #0003}
#seatR.uiPlayerPanel::before,#seatL.uiPlayerPanel::before,#oSeatR.uiPlayerPanel::before,#oSeatL.uiPlayerPanel::before{height:148px;inset-inline:2px;background:linear-gradient(160deg,var(--ui-player-top),var(--ui-player-bottom));border-color:var(--ui-player-line);box-shadow:inset 0 1px #ffffff14,0 4px 10px #0003}
/* The identity tint never replaces the gold active-turn ring. */
#seatT.uiPlayerPanel.turnGlow,#oSeat.uiPlayerPanel.turnGlow,#meIdent.uiPlayerPanel.turnGlow,#oIdent.uiPlayerPanel.turnGlow{border-color:var(--ui-gold);box-shadow:0 0 0 1px #eac77f55,0 4px 10px #0003}
#seatR.uiPlayerPanel.turnGlow::before,#seatL.uiPlayerPanel.turnGlow::before,#oSeatR.uiPlayerPanel.turnGlow::before,#oSeatL.uiPlayerPanel.turnGlow::before{border-color:var(--ui-gold);box-shadow:0 0 0 1px #eac77f55,0 4px 10px #0003}
.uiPlayerPanel .uiPlayerName{display:block;min-width:0;color:#fff5e0;font-weight:800;text-shadow:0 1px 2px #0004}
.uiPlayerPanel .uiSeatRank{display:flex;align-items:center;justify-content:center;min-width:0;min-height:16px;margin-top:3px;line-height:1.2}
.uiPlayerPanel .uiSeatRank .uiRankBadge{max-width:100%;min-height:16px;padding:1px 3px;gap:2px;border-radius:5px;background:#fff6e4;color:#2f302a!important;border-color:var(--badge-color);font-size:8px!important;font-weight:800;line-height:1.2;text-shadow:none;white-space:nowrap;overflow:hidden}
.uiPlayerPanel .uiSeatRank .uiRankBadge img{width:12px;height:12px;object-fit:contain;flex:0 0 12px}
.uiPlayerPanel .uiSeatRole{display:block;color:var(--ui-player-soft);font-size:7px;font-weight:700;line-height:1.25;white-space:normal;text-shadow:none}
#seatR.uiPlayerPanel,#seatL.uiPlayerPanel,#oSeatR.uiPlayerPanel,#oSeatL.uiPlayerPanel{grid-template-rows:52px 46px 30px auto}
#seatR.uiPlayerPanel .nm,#seatL.uiPlayerPanel .nm,#oSeatR.uiPlayerPanel .nm,#oSeatL.uiPlayerPanel .nm{display:flex;flex-direction:column;align-items:center;justify-content:center;height:46px;max-height:46px;width:52px;max-width:52px;overflow:hidden;white-space:normal;-webkit-line-clamp:unset;text-overflow:clip;line-height:1.3}
#seatR.uiPlayerPanel .uiPlayerName,#seatL.uiPlayerPanel .uiPlayerName,#oSeatR.uiPlayerPanel .uiPlayerName,#oSeatL.uiPlayerPanel .uiPlayerName{width:50px;max-width:50px;max-height:26px;font-size:10px;line-height:13px;text-align:center;overflow-wrap:anywhere;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
#seatR.uiPlayerPanel .uiSeatRank,#seatL.uiPlayerPanel .uiSeatRank,#oSeatR.uiPlayerPanel .uiSeatRank,#oSeatL.uiPlayerPanel .uiSeatRank{height:16px;max-height:16px;max-width:50px;margin-top:3px}
#seatR.uiPlayerPanel .pts,#seatL.uiPlayerPanel .pts,#oSeatR.uiPlayerPanel .pts,#oSeatL.uiPlayerPanel .pts{background:var(--ui-player-bottom);border-color:var(--ui-player-line)}
#seatT.uiPlayerPanel .nm,#oSeat.uiPlayerPanel .nm{display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:42px;max-width:96px;white-space:normal;overflow:hidden;text-overflow:clip}
#seatT.uiPlayerPanel .uiPlayerName,#oSeat.uiPlayerPanel .uiPlayerName{max-width:96px;max-height:32px;font-size:12px;line-height:16px;overflow-wrap:anywhere;text-align:center;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
#seatT.uiPlayerPanel .uiSeatRank,#oSeat.uiPlayerPanel .uiSeatRank{margin-top:4px}
#meIdent.uiPlayerPanel,#oIdent.uiPlayerPanel{flex:0 1 auto;min-width:0;max-width:min(192px,53%);gap:6px;padding:5px 7px;border-radius:17px}
#meIdent.uiPlayerPanel .ava,#oIdent.uiPlayerPanel .ava{flex:none}
/* The pile retains its intrinsic width; the name column takes the actual
 * remaining flex-row space, rather than pushing a long name outside the frame. */
#meIdent.uiPlayerPanel .uiSelfName,#oIdent.uiPlayerPanel .uiSelfName{flex:1 1 auto;min-width:0}
#meIdent.uiPlayerPanel .nm,#oIdent.uiPlayerPanel .nm{display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:0;max-width:115px;white-space:normal;overflow:hidden;text-overflow:clip}
#meIdent.uiPlayerPanel .uiPlayerName,#oIdent.uiPlayerPanel .uiPlayerName{width:100%;max-width:115px;font-size:12px;line-height:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center}
#meIdent.uiPlayerPanel .uiSeatRank,#oIdent.uiPlayerPanel .uiSeatRank{margin-top:3px}
@media(max-width:360px){
 #seatT.uiPlayerPanel .nm,#oSeat.uiPlayerPanel .nm,#seatT.uiPlayerPanel .uiPlayerName,#oSeat.uiPlayerPanel .uiPlayerName{max-width:68px}
 #meIdent.uiPlayerPanel,#oIdent.uiPlayerPanel{max-width:51%;gap:4px;padding-inline:5px}
 #meIdent.uiPlayerPanel .uiPlayerName,#oIdent.uiPlayerPanel .uiPlayerName{font-size:11px}
}
/* The measured placement helper only updates these four local CSS variables.
 * Keeping the number on the stock itself removes the old 30px protruding label
 * that covered the left player's pile count. The original safe-area expression
 * remains the fallback horizontal anchor when measurement is unavailable. */
#deckStack,#oDeckStack{left:var(--ui-stock-x,calc(16px + env(safe-area-inset-left, 0px)));top:var(--ui-stock-y,calc(420px + var(--ui-safe-top)));width:var(--ui-stock-w,44px);height:var(--ui-stock-h,62px)}
#deckStack>.card,#oDeckStack>.card{width:100%!important;height:100%!important;box-shadow:0 2px 4px #0003}
#deckStack>.cnt,#oDeckStack>.cnt{top:auto;bottom:5px;left:50%;right:auto;transform:translateX(-50%);display:flex;align-items:center;justify-content:center;min-width:26px;min-height:20px;padding:2px 4px;border:1px solid #e6ce95b3;border-radius:6px;background:#102c24f5;color:#fff0c7;font:900 11px/1.2 var(--fb);font-variant-numeric:tabular-nums;direction:ltr;unicode-bidi:isolate;text-shadow:none;box-shadow:0 1px 3px #0003;white-space:nowrap}
#deckStack.uiStockBadge>.card,#oDeckStack.uiStockBadge>.card{display:none}
#deckStack.uiStockBadge>.cnt,#oDeckStack.uiStockBadge>.cnt{inset:0;transform:none;min-width:0;min-height:22px}
@media(max-height:740px){#deckStack,#oDeckStack{top:var(--ui-stock-y,calc(410px + var(--ui-safe-top)))}}
