/* Seat cameras own a clear frame; chips and wagers stay outside the picture. */
.table-stage{touch-action:manipulation}
.table-stage .seat{--seat-width:clamp(86px,13cqw,132px);--video-height:clamp(56px,8cqw,86px);width:var(--seat-width);display:flex;flex-direction:column;gap:3px;height:auto;min-height:0}
.table-stage .seat .seat-body{position:relative;width:100%;height:var(--video-height);min-height:var(--video-height);max-width:none;display:flex;align-items:center;justify-content:center;gap:0}
.table-stage .seat .avatar{width:100%;height:100%;min-width:0;flex:none;padding:0;border:2px solid #799687;border-radius:12px;font-size:28px;box-shadow:0 4px 16px #0006;filter:none;overflow:hidden;touch-action:manipulation}
.table-stage .seat .avatar video{display:block;width:100%;height:100%;object-fit:cover;object-position:center 38%;border-radius:inherit}
.table-stage .seat.folded{opacity:1}
.table-stage .seat.speaking .avatar{border-color:#a4edbd;box-shadow:0 0 0 3px #8ce5ae70,0 4px 16px #0006}
.table-stage .seat .player-chip-stack{position:absolute;right:3px;bottom:-37px;z-index:3;--chip-width:20px;--chip-depth:10px;--chip-step:1px;--column-step:8px;pointer-events:none}
.table-stage .seat .seat-meta{width:100%;min-width:0;max-width:none;height:43px;padding:4px 34px 4px 5px;margin:0;border-radius:7px;text-align:left}
.table-stage .seat .seat-name{font-size:12px;line-height:12px}
.table-stage .seat .seat-stack{font-size:15px;line-height:15px;margin-top:1px;white-space:nowrap}
.table-stage .seat .seat-hand-state{height:10px;min-height:10px;max-height:10px;font-size:9px;line-height:10px;margin-top:1px;gap:1px}
.table-stage .seat .hand-label-full{display:none}
.table-stage .seat .hand-label-compact{display:inline}
.table-stage .seat .bet-chip.seat-wager{position:relative;left:auto;top:auto;transform:none;min-height:20px;height:20px;margin:0;min-width:64px;max-width:100%;padding:1px 4px;order:0}
.table-stage .seat[data-seat-lane="top"]{top:20%!important}
.table-stage .seat[data-seat-lane="bottom"]{top:81%!important}
.table-stage .seat .dealer-chip,.table-stage .seat.own .dealer-chip{left:3px;right:auto;top:3px;width:19px;height:19px;z-index:8}
.table-stage .seat .deck,.table-stage .seat.own .deck{left:-17px;right:auto;top:4px}
.table-stage .seat.empty .empty-seat{height:var(--video-height);width:100%;border-radius:12px}
.table-stage .seat.empty .seat-meta{padding:5px;text-align:center;display:grid;place-items:center}
.table-stage .seat.own .own-cards{top:12px}
.action-panel{grid-template-columns:244px minmax(0,1fr)}
.action-panel .media-toolbar{gap:6px}

@container play-area (max-width:950px){
 .table-stage .seat .seat-name{font-size:11px}
 .table-stage .seat .seat-stack{font-size:14px}
 .table-stage .seat .seat-meta{padding-right:27px}
 .table-stage .seat .player-chip-stack{--chip-width:17px;--chip-depth:8px;--chip-step:.9px;--column-step:7px}
}

/* Portrait seats pair a wide camera with the nameplate, keeping ten rows in view. */
@media(max-width:680px) and (orientation:portrait){
 .table-stage[data-table-layout="portrait"] .seat{--camera-width:64px;--camera-height:46px;--meta-width:62px;display:grid;grid-template-columns:var(--camera-width) var(--meta-width);align-items:start;gap:2px;width:calc(var(--camera-width) + var(--meta-width) + 2px);height:62px;min-height:62px}
 .table-stage[data-table-layout="portrait"] .seat[data-seat-lane="left"]{left:18%!important}
 .table-stage[data-table-layout="portrait"] .seat[data-seat-lane="right"]{left:82%!important}
 .table-stage[data-table-layout="portrait"] .seat .seat-body{grid-column:1;grid-row:1;align-self:start;width:var(--camera-width);max-width:none;height:var(--camera-height);min-height:var(--camera-height);gap:0}
 .table-stage[data-table-layout="portrait"] .seat .avatar{width:var(--camera-width);height:var(--camera-height);min-width:var(--camera-width);border-radius:8px;font-size:23px;border-width:2px}
 .table-stage[data-table-layout="portrait"] .seat .seat-meta{grid-column:2;grid-row:1;width:var(--meta-width);min-width:var(--meta-width);max-width:var(--meta-width);height:41px;padding:3px 2px;margin:0;border-radius:6px;text-align:center}
 .table-stage[data-table-layout="portrait"] .seat .seat-name{font-size:11px;line-height:11px}
 .table-stage[data-table-layout="portrait"] .seat .seat-stack{font-size:13px;line-height:13px;margin-top:1px}
 .table-stage[data-table-layout="portrait"] .seat .seat-hand-state{height:10px;min-height:10px;max-height:10px;font-size:9px;line-height:10px;margin-top:1px;gap:1px}
 .table-stage[data-table-layout="portrait"] .seat .player-chip-stack{right:2px;bottom:-14px;--chip-width:15px;--chip-depth:7px;--chip-step:.55px;--column-step:7px}
 .table-stage[data-table-layout="portrait"] .seat .bet-chip.seat-wager{position:absolute;left:auto;right:0;top:44px;width:var(--meta-width);min-width:var(--meta-width);max-width:var(--meta-width);height:16px;min-height:16px;padding:1px 2px;margin:0;gap:0}
 .table-stage[data-table-layout="portrait"] .seat .bet-chip.seat-wager .wager-chip-stack{display:none}
 .table-stage[data-table-layout="portrait"] .seat .bet-chip.seat-wager span.amount{font-size:10px;line-height:12px}
 .table-stage[data-table-layout="portrait"] .seat .seat-hand,.table-stage[data-table-layout="portrait"] .seat.shown .seat-hand{display:none}
 .table-stage[data-table-layout="portrait"] .seat .empty-seat{grid-column:1;grid-row:1;width:var(--camera-width);height:var(--camera-height);border-radius:8px;font-size:20px}
 .table-stage[data-table-layout="portrait"] .seat.empty .seat-meta{height:41px}
 .table-stage[data-table-layout="portrait"] .seat .dealer-chip,.table-stage[data-table-layout="portrait"] .seat.own .dealer-chip{left:2px;top:2px;width:13px;height:13px;font-size:8px}
 .table-stage[data-table-layout="portrait"] .seat .deck,.table-stage[data-table-layout="portrait"] .seat.own .deck{left:3px;top:49px}
 .table-stage[data-table-layout="portrait"] .seat .deck .card{width:12px;height:17px}
 .table-stage[data-table-layout="portrait"] .seat.own .own-cards,.table-stage[data-table-layout="portrait"] .seat.own[data-hole-count="3"] .own-cards,.table-stage[data-table-layout="portrait"] .seat.own[data-hole-count="4"] .own-cards,.table-stage[data-table-layout="portrait"] .seat.own[data-hole-count="5"] .own-cards{left:calc(100% + 3px);top:-4px;--private-width:45px;--private-height:64px;--private-overlap:12px}
 .table-stage[data-table-layout="portrait"] .seat.own[data-hole-count="4"] .own-cards,.table-stage[data-table-layout="portrait"] .seat.own[data-hole-count="5"] .own-cards{--private-overlap:25px}
 .table-stage[data-table-layout="portrait"] .seat.own[data-hole-count="3"] .own-cards{--private-width:42px;--private-height:60px;--private-overlap:14px}
 .table-stage[data-table-layout="portrait"] .seat.own[data-hole-count="5"] .own-cards{--private-width:40px;--private-height:59px;--private-overlap:25px}
 .table-stage[data-table-layout="portrait"] .seat.own .own-label{display:none}
 .table-stage[data-table-layout="portrait"] .table-center{width:100%;top:47%;gap:8px}
 .table-stage[data-table-layout="portrait"] .table-message,.table-stage[data-table-layout="portrait"][data-hole-count="5"] .table-message{width:106px;max-width:106px;font-size:11px!important;line-height:1.3!important;padding:6px!important}
 .table-stage[data-table-layout="portrait"] .table-center .board-row{width:106px;display:flex;flex-wrap:wrap;gap:2px;justify-content:center}
 .table-stage[data-table-layout="portrait"] .table-center .card{width:34px;height:49px}
 .table-stage[data-table-layout="portrait"][data-board-count="2"] .table-center{flex-direction:row;gap:6px;justify-content:center}
 .table-stage[data-table-layout="portrait"][data-board-count="2"] .table-center .board-row{width:50px}
 .table-stage[data-table-layout="portrait"][data-board-count="2"] .table-center .card{width:24px;height:34px}
 .table-stage[data-table-layout="portrait"][data-board-count="3"] .table-center{flex-direction:column;gap:15px}
 .table-stage[data-table-layout="portrait"][data-board-count="3"] .table-center .board-row{width:82px;flex-wrap:wrap;gap:2px}
 .table-stage[data-table-layout="portrait"][data-board-count="3"] .table-center .card{width:26px;height:37px}
 .table-stage[data-table-layout="portrait"][data-board-count="3"] .table-center .card .corner{font-size:11px;top:2px;left:2px}
 .table-stage[data-table-layout="portrait"][data-board-count="3"] .table-center .card .corner .suit{font-size:8px}
 .table-stage[data-table-layout="portrait"][data-board-count="3"] .table-center .card .pip{font-size:18px}
 .table-stage[data-table-layout="portrait"][data-board-count="3"] .table-center .card .royal-frame{width:14px;height:24px}
 .table-stage[data-table-layout="portrait"][data-board-count="3"] .table-center .card .royal-letter{font-size:17px}
 .table-stage[data-table-layout="portrait"] .board-label{left:50%;top:-13px;transform:translateX(-50%);font-size:9px}
 .action-panel{grid-template-columns:236px minmax(0,1fr)}
 .action-panel .media-toolbar{gap:4px}
 .table-stage{touch-action:manipulation}
 @container poker-stage (max-width:360px){
  .table-stage[data-table-layout="portrait"] .seat{--camera-width:52px;--camera-height:38px;--meta-width:50px;height:54px;min-height:54px}
  .table-stage[data-table-layout="portrait"] .seat[data-seat-lane="left"]{left:17.5%!important}
  .table-stage[data-table-layout="portrait"] .seat[data-seat-lane="right"]{left:82.5%!important}
  .table-stage[data-table-layout="portrait"] .seat .seat-name{font-size:10px}
  .table-stage[data-table-layout="portrait"] .seat .seat-stack{font-size:12px}
  .table-stage[data-table-layout="portrait"] .seat .seat-meta{height:38px;padding:2px 1px}
  .table-stage[data-table-layout="portrait"] .seat .bet-chip.seat-wager{top:40px;height:14px;min-height:14px}
  .table-stage[data-table-layout="portrait"] .seat .bet-chip.seat-wager span.amount{font-size:9px}
  .table-stage[data-table-layout="portrait"] .seat .player-chip-stack{bottom:-14px;--chip-width:13px;--chip-depth:6px;--chip-step:.4px;--column-step:6px}
  .table-stage[data-table-layout="portrait"] .seat .deck,.table-stage[data-table-layout="portrait"] .seat.own .deck{top:41px}
  .table-stage[data-table-layout="portrait"] .seat.own .own-cards{top:0;--private-width:42px;--private-height:59px}
  .table-stage[data-table-layout="portrait"] .seat.own[data-hole-count="3"] .own-cards{--private-width:37px;--private-height:54px;--private-overlap:15px}
  .table-stage[data-table-layout="portrait"] .table-message,.table-stage[data-table-layout="portrait"][data-hole-count="5"] .table-message{width:88px;max-width:88px}
  .table-stage[data-table-layout="portrait"] .seat.own[data-hole-count="4"] .own-cards,.table-stage[data-table-layout="portrait"] .seat.own[data-hole-count="5"] .own-cards{--private-width:34px;--private-height:49px;--private-overlap:22px;top:0}
  .table-stage[data-table-layout="portrait"][data-board-count="1"] .table-center .board-row{width:88px}
  .table-stage[data-table-layout="portrait"][data-board-count="1"] .table-center .card{width:28px;height:40px}
  .table-stage[data-table-layout="portrait"][data-board-count="2"] .table-center{gap:4px}
  .table-stage[data-table-layout="portrait"][data-board-count="2"] .table-center .board-row{width:42px}
  .table-stage[data-table-layout="portrait"][data-board-count="2"] .table-center .card{width:20px;height:29px}
 }
 @container poker-stage (max-height:270px){
  .table-stage[data-table-layout="portrait"] .seat{--camera-height:27px;height:40px;min-height:40px}
  .table-stage[data-table-layout="portrait"] .seat .seat-body{height:40px;min-height:40px;align-items:start}
  .table-stage[data-table-layout="portrait"] .seat .avatar{height:27px;border-radius:6px}
  .table-stage[data-table-layout="portrait"] .seat .player-chip-stack{bottom:0;right:0;--chip-width:12px;--chip-depth:5px;--chip-step:.4px;--column-step:5px}
  .table-stage[data-table-layout="portrait"] .seat .seat-meta{height:38px;padding:2px 1px}
  .table-stage[data-table-layout="portrait"] .seat .bet-chip.seat-wager{left:0;right:auto;top:29px;width:29px;min-width:29px;max-width:29px;height:11px;min-height:11px;padding:0 1px;border-radius:3px}
  .table-stage[data-table-layout="portrait"] .seat .bet-chip.seat-wager span.amount{font-size:8px;line-height:9px;white-space:nowrap}
  .table-stage[data-table-layout="portrait"] .seat .deck,.table-stage[data-table-layout="portrait"] .seat.own .deck{left:0;top:13px}
  .table-stage[data-table-layout="portrait"] .seat.own[data-hole-count] .own-cards{top:-20px}
 }
}

/* Low landscape screens keep the camera beside the label rather than hiding it. */
@container poker-stage (max-height:290px) and (min-width:681px){
 .table-stage .seat{--camera-width:clamp(54px,7.5cqw,72px);--meta-width:60px;display:grid;grid-template-columns:var(--camera-width) var(--meta-width);gap:2px;align-items:start;width:calc(var(--camera-width) + var(--meta-width) + 2px);height:58px;min-height:58px}
 .table-stage .seat .seat-body{grid-column:1;grid-row:1;width:var(--camera-width);height:42px;min-height:42px;max-width:none}
 .table-stage .seat .avatar{height:42px;width:var(--camera-width);min-width:var(--camera-width);border-radius:8px;font-size:20px}
 .table-stage .seat .seat-meta{grid-column:2;grid-row:1;width:var(--meta-width);min-width:0;max-width:none;height:41px;padding:3px 2px;text-align:center}
 .table-stage .seat .player-chip-stack{right:2px;bottom:-14px;--chip-width:14px;--chip-depth:7px;--chip-step:.5px;--column-step:6px}
 .table-stage .seat .seat-name{font-size:11px;line-height:11px}
 .table-stage .seat .seat-stack{font-size:13px;line-height:13px}
 .table-stage .seat .bet-chip.seat-wager{position:absolute;right:0;left:auto;top:43px;height:15px;min-height:15px;width:var(--meta-width);min-width:0;padding:1px 2px}
 .table-stage .seat .bet-chip.seat-wager .wager-chip-stack{display:none}
 .table-stage .seat .bet-chip.seat-wager span.amount{font-size:10px}
 .table-stage .seat[data-seat-lane="top"]{top:18%!important}
 .table-stage .seat[data-seat-lane="bottom"]{top:80%!important}
 .table-stage .seat.empty .empty-seat{height:42px}
 .table-stage .seat.own .own-cards{top:-3px}
 .table-stage .seat .deck,.table-stage .seat.own .deck{left:3px;top:43px}
 .table-stage .seat .deck .card{width:12px;height:17px}
}
@media(max-height:500px) and (orientation:landscape){
 .action-panel{grid-template-columns:236px minmax(0,1fr)}
 .action-panel .media-toolbar{gap:4px}
}
