/* Original vector chair shared by the table and public preview. Decorative layers never take input. */
.has-seat-furniture-r54>.seat-furniture-r54{position:absolute;left:50%;top:var(--seat-chair-top,0px);width:var(--seat-chair-width,68px);height:var(--seat-chair-height,80px);transform:translateX(-50%);z-index:0;pointer-events:none;user-select:none}
.seat-furniture-r54>svg{display:block;width:100%;height:100%;overflow:visible;pointer-events:none}
.seat.has-seat-furniture-r54[data-furniture-occupied=true]{--seat-chair-top:-12px;--seat-chair-width:86px;--seat-chair-height:100px}
.public-preview-seat.has-seat-furniture-r54[data-furniture-occupied=true]{--seat-chair-top:-40px;--seat-chair-width:80px;--seat-chair-height:94px}
.has-seat-furniture-r54>.seat-avatar,.has-seat-furniture-r54>.seat-name,.has-seat-furniture-r54>.seat-chips,.has-seat-furniture-r54>.public-preview-avatar,.has-seat-furniture-r54>.public-preview-plate{position:relative;z-index:2}
.public-preview-seat.has-seat-furniture-r54>.public-preview-avatar,.public-preview-seat.has-seat-furniture-r54>.public-preview-plate{position:absolute}
/* The existing avatar is the head, with room below it for the seated jacket and arms. */
body[data-view=table] .table-stage .seat.has-seat-furniture-r54[data-furniture-occupied=true]{min-height:110px}
body[data-view=table] .table-stage .seat.has-seat-furniture-r54[data-furniture-occupied=true]>.seat-avatar{box-sizing:border-box;width:34px;height:34px;margin:4px auto 28px;border-width:2px;font-size:16px;letter-spacing:0}
#seats .seat.has-seat-furniture-r54[data-furniture-occupied=true]>.seat-avatar>.social-avatar-icon{inset:1px;font-size:22px}
.public-preview-seat.has-seat-furniture-r54[data-furniture-occupied=true]>.public-preview-avatar{box-sizing:border-box;left:calc(50% - 14px);top:-23px;width:28px;height:28px;border-width:2px;font-size:13px}
.public-preview-seat.has-seat-furniture-r54[data-furniture-occupied=true]>.public-preview-plate{top:28px;left:0;right:0}
.seat.has-seat-furniture-r54[data-furniture-occupied=false]>.sit-button,.public-preview-seat.has-seat-furniture-r54[data-furniture-occupied=false]>.public-preview-sit{position:relative;z-index:3;width:68px;height:80px;min-height:80px;margin:0 auto;border:1px solid transparent;border-radius:9px;background:transparent;box-shadow:none;color:#f9f1d8;font-size:9px;line-height:1.1;white-space:pre-line;text-align:center;padding:61px 0 0;overflow:visible;clip-path:none;transform:none;text-shadow:0 1px 3px #102218}
.seat.has-seat-furniture-r54[data-furniture-occupied=false]>.sit-button::before,.public-preview-seat.has-seat-furniture-r54[data-furniture-occupied=false]>.public-preview-sit::before{content:none;border:0;display:none}
.seat.has-seat-furniture-r54[data-furniture-occupied=false]>.sit-button::after,.public-preview-seat.has-seat-furniture-r54[data-furniture-occupied=false]>.public-preview-sit::after{content:'+';position:absolute;top:30px;left:50%;transform:translateX(-50%);font-size:17px;line-height:17px;color:#f3e5ba;text-shadow:0 1px 2px #092b20;pointer-events:none}
.seat.has-seat-furniture-r54[data-furniture-occupied=false]>.sit-button:hover:not(:disabled),.public-preview-seat.has-seat-furniture-r54[data-furniture-occupied=false]>.public-preview-sit:hover:not(:disabled){background:#e8cc7314;border-color:#e8cc7359}
.has-seat-furniture-r54[data-furniture-occupied=false]>button:focus-visible{outline:2px solid #f5d576;outline-offset:3px}
.has-seat-furniture-r54[data-furniture-occupied=false]>button:disabled{opacity:.55;cursor:default}
/* The chairs belong to the floor plane, not to the player's raised card/name
   stack. The rail sits above them and hides their inward front legs/arms. */
.seat-furniture-underlay-r58{position:absolute;inset:0;z-index:0;pointer-events:none;user-select:none;contain:layout style;overflow:visible}
.seat-furniture-underlay-r58[hidden],.seat-furniture-underlay-r58>.seat-furniture-r54[hidden]{display:none!important}
.seat-furniture-underlay-r58>.seat-furniture-r54{position:absolute;display:block;width:76px;height:89px;left:50%;top:92%;transform-origin:50% 50%;pointer-events:none;user-select:none;z-index:0;filter:drop-shadow(0 3px 2px #0005)}
/* Real rail geometry overrides the no-layout percentages. Geometry updates
   must stay attached while resizing, rather than tween across/under the felt.
   The outward backrest remains visible; only inward legs go under the rail. */
.seat-furniture-underlay-r58>.seat-furniture-r54[data-anchored=true]{transition:none}
.seat-furniture-underlay-r58>.seat-furniture-r54[data-position='0']{left:50%;top:92%}
.seat-furniture-underlay-r58>.seat-furniture-r54[data-position='1']{left:92%;top:73%}
.seat-furniture-underlay-r58>.seat-furniture-r54[data-position='2']{left:88%;top:23%}
.seat-furniture-underlay-r58>.seat-furniture-r54[data-position='3']{left:50%;top:11%}
.seat-furniture-underlay-r58>.seat-furniture-r54[data-position='4']{left:12%;top:23%}
.seat-furniture-underlay-r58>.seat-furniture-r54[data-position='5']{left:8%;top:73%}
body[data-view=table] .table-scene>.felt{z-index:1}
.public-table-preview>.public-preview-felt{z-index:1}
.seat-furniture-underlay-r58[data-kind=preview]>.seat-furniture-r54{width:54px;height:63px}
.seat-furniture-underlay-r58[data-kind=preview]>.seat-furniture-r54[data-position='0']{left:50%;top:91%}
.seat-furniture-underlay-r58[data-kind=preview]>.seat-furniture-r54[data-position='1']{left:89%;top:74%}
.seat-furniture-underlay-r58[data-kind=preview]>.seat-furniture-r54[data-position='2']{left:89%;top:23%}
.seat-furniture-underlay-r58[data-kind=preview]>.seat-furniture-r54[data-position='3']{left:50%;top:11%}
.seat-furniture-underlay-r58[data-kind=preview]>.seat-furniture-r54[data-position='4']{left:11%;top:23%}
.seat-furniture-underlay-r58[data-kind=preview]>.seat-furniture-r54[data-position='5']{left:11%;top:74%}
@media(max-width:700px){
 .seat-furniture-underlay-r58[data-kind=table]>.seat-furniture-r54{width:62px;height:72px}
 .seat-furniture-underlay-r58[data-kind=table]>.seat-furniture-r54[data-position='1']{left:90%;top:74%}
 .seat-furniture-underlay-r58[data-kind=table]>.seat-furniture-r54[data-position='2']{left:89%;top:24%}
 .seat-furniture-underlay-r58[data-kind=table]>.seat-furniture-r54[data-position='4']{left:11%;top:24%}
 .seat-furniture-underlay-r58[data-kind=table]>.seat-furniture-r54[data-position='5']{left:10%;top:74%}
}
@media(orientation:landscape) and (min-width:701px) and (max-height:530px){.seat-furniture-underlay-r58[data-kind=table]>.seat-furniture-r54{width:55px;height:64px}}
.seat-message-bubble-r54{position:absolute;bottom:calc(100% + 38px);left:50%;transform:translateX(-50%);z-index:40;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:5;line-clamp:5;max-width:min(220px,42vw);min-width:54px;width:max-content;max-height:calc(6.1em + 16px);overflow:hidden;overflow-wrap:anywhere;white-space:pre-wrap;border:1px solid #bcae83;border-radius:12px;padding:7px 10px;background:#fff9e8;color:#192d25;box-shadow:0 3px 12px #07140c55;font:500 12px/1.22 system-ui,sans-serif;text-align:left;pointer-events:none;animation:seat-message-appear-r54 160ms ease-out both}
.seat-message-bubble-r54::after{content:'';position:absolute;bottom:-5px;left:calc(50% - 4px);width:8px;height:8px;background:inherit;border-right:1px solid #bcae83;border-bottom:1px solid #bcae83;transform:rotate(45deg);pointer-events:none}
.seat.selected>.seat-message-bubble-r54{bottom:calc(100% + 58px)}
.seat[data-position='1']>.seat-message-bubble-r54,.seat[data-position='2']>.seat-message-bubble-r54,.public-preview-seat[data-position='1']>.seat-message-bubble-r54,.public-preview-seat[data-position='2']>.seat-message-bubble-r54{left:auto;right:0;transform:none}
.seat[data-position='4']>.seat-message-bubble-r54,.seat[data-position='5']>.seat-message-bubble-r54,.public-preview-seat[data-position='4']>.seat-message-bubble-r54,.public-preview-seat[data-position='5']>.seat-message-bubble-r54{left:0;transform:none}
/* Upper seats have little space over their heads. Keep a compact excerpt above them. */
.seat[data-position='2']>.seat-message-bubble-r54,.seat[data-position='4']>.seat-message-bubble-r54{bottom:calc(100% - 4px);font-size:11px;padding:5px 8px;-webkit-line-clamp:3;line-clamp:3;max-height:calc(3.66em + 12px)}
.seat[data-position='3']>.seat-message-bubble-r54{bottom:calc(100% - 4px);font-size:10px;line-height:1.15;padding:4px 8px;max-width:min(240px,74vw);-webkit-line-clamp:2;line-clamp:2;max-height:calc(2.3em + 10px)}
.public-preview-seat[data-position='3']>.seat-message-bubble-r54{bottom:calc(100% + 26px);font-size:10px;line-height:1.15;padding:4px 8px;max-width:min(240px,74vw);-webkit-line-clamp:2;line-clamp:2;max-height:calc(2.3em + 10px)}
@keyframes seat-message-appear-r54{from{translate:0 4px}to{translate:0 0}}
@media(max-width:700px){.seat.has-seat-furniture-r54[data-furniture-occupied=true]{--seat-chair-width:74px;--seat-chair-height:87px;--seat-chair-top:-10px}body[data-view=table] .table-stage .seat.has-seat-furniture-r54[data-furniture-occupied=true]>.seat-avatar{width:30px;height:30px;margin:4px auto 25px;font-size:14px}#seats .seat.has-seat-furniture-r54[data-furniture-occupied=true]>.seat-avatar>.social-avatar-icon{font-size:20px}.seat-message-bubble-r54{font-size:11px;max-width:min(190px,45vw)}.seat[data-position='3']>.seat-message-bubble-r54{font-size:10px;max-width:min(240px,74vw);-webkit-line-clamp:1;line-clamp:1;max-height:calc(1.15em + 10px)}}
@media(prefers-reduced-motion:reduce){.seat-message-bubble-r54{animation:none}.seat-furniture-underlay-r58>.seat-furniture-r54[data-anchored=true]{transition:none}}

:is(.table-navigation, .chess-navigation-actions, .domino-play-header) button.table-stand-toggle:not([hidden]) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  gap: 4px;
  width: auto;
  min-width: 0;
  min-height: 36px;
  max-width: none;
  padding: 0 8px;
  border: 1px solid #4c7965;
  border-radius: 999px;
  background: #192f25;
  color: #cae7d7;
  box-shadow: none;
  font-family: inherit;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.1;
  white-space: nowrap;
  touch-action: manipulation;
}
button.table-stand-toggle > svg { flex: 0 0 15px; width: 15px; height: 15px; }
:is(.table-navigation, .chess-navigation-actions, .domino-play-header) button.table-stand-toggle:is([aria-pressed="true"], :hover:not(:disabled)) {
  background: #214938;
  border-color: #76cca0;
  color: #9be9bb;
}
:where([data-home-theme="light"], [data-theme="light"]) :is(.table-navigation, .chess-navigation-actions, .domino-play-header) button.table-stand-toggle:not([hidden]) {
  background: #e1f1e7;
  border-color: #598d75;
  color: #174d36;
}
:where([data-home-theme="light"], [data-theme="light"]) :is(.table-navigation, .chess-navigation-actions, .domino-play-header) button.table-stand-toggle:is([aria-pressed="true"], :hover:not(:disabled)) {
  background: #d4ecde;
  border-color: #3e805f;
  color: #104b33;
}
#stand-after-hand-button.table-stand-toggle { order: 4; }
