/* Seating positions remain relative to this phone's player. */
.around-seats{position:relative;display:block!important;min-height:280px;overflow:visible!important;max-width:none!important;pointer-events:none}.around-seats .table-seat{position:absolute;left:var(--seat-x);top:var(--seat-y);transform:translate(-50%,-50%);width:112px;text-align:center;padding:6px 5px;border:1px solid #d1ac6b40;border-radius:12px;background:#2b0d20c2;color:#f9e7c6;box-sizing:border-box}.table-seat.current{border-color:#f3ce82;box-shadow:0 0 0 2px #e5ba6a20;background:#55283ac9}.table-seat.out{opacity:.45}.table-seat-name{display:flex;align-items:center;justify-content:center;gap:5px;font:700 12px/1.3 Arial,sans-serif}.table-seat-name b{max-width:82px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.table-seat-name span{font-size:10px;white-space:nowrap}.table-seat-cards{display:flex;justify-content:center;align-items:center;padding-left:10px;height:37px;margin-top:4px}.table-seat-back.ar-custom-back{display:block;width:24px;flex:0 0 24px;height:34px;border:1px solid #ceb37d;border-radius:3px;margin-left:-16px;transform:rotate(calc((var(--back-index) - 4)*1deg));box-shadow:0 2px 3px #0005}.table-seat small{font:10px/1.3 Arial,sans-serif;display:block;margin-top:3px}.table-seat.self{border-color:#d3b977}
/* Caixeta: seats surround the central piles; this phone's hand is at the bottom. */
body:not(.tv-mode)[data-ar-surface="caixeta"][data-room-phase="playing"] #play-area.felt-arena{display:block;padding:16px 22px}body:not(.tv-mode)[data-ar-surface="caixeta"][data-room-phase="playing"] #play-area>.table{position:static;min-height:300px;max-width:550px;margin:auto;grid-template-columns:1fr 1fr;align-content:center;padding:74px 0 46px;gap:12px}body:not(.tv-mode)[data-ar-surface="caixeta"][data-room-phase="playing"] #opponents.around-seats{position:absolute;inset:8px 12px auto;height:280px;min-height:0;padding:0;margin:0;z-index:2}body:not(.tv-mode)[data-ar-surface="caixeta"][data-room-phase="playing"] #play-area>#hand-panel{position:relative;max-width:1050px;margin:0 auto;padding-top:12px;border-top:1px solid #e4cda13b}body:not(.tv-mode)[data-ar-surface="caixeta"][data-room-phase="playing"] #play-area #hand{max-height:300px}body:not(.tv-mode)[data-ar-surface="caixeta"][data-room-phase="playing"] #play-area .table-center>.table-pile:first-child{translate:0}body:not(.tv-mode)[data-ar-surface="caixeta"][data-room-phase="playing"] #play-area .table-center{gap:36px}body:not(.tv-mode)[data-ar-surface="caixeta"][data-room-phase="playing"] .table-event{display:none}body:not(.tv-mode)[data-ar-surface="caixeta"][data-room-phase="playing"] #claim-panel{padding-top:10px}
/* Buraco: the public melds retain their existing area below the seated players. */
body[data-ar-surface="buraco"]:not(.tv-mode).ar-studio-active #opponents.around-seats{height:280px;margin:0!important}body[data-ar-surface="buraco"]:not(.tv-mode).ar-studio-active #buraco-table .center-piles{position:absolute;left:50%;top:125px;transform:translateX(-50%);width:max-content;max-width:65%;z-index:2}body[data-ar-surface="buraco"]:not(.tv-mode).ar-studio-active #buraco-table .table-center{position:static;grid-template-areas:'left right';padding-top:12px}
@media(max-width:850px){.around-seats .table-seat{width:82px;padding:4px 2px;border-radius:9px}.table-seat-name{font-size:10px;display:block}.table-seat-name b{display:block;max-width:78px}.table-seat-name span{font-size:9px}.table-seat-cards{height:24px;margin-top:2px}.table-seat-back.ar-custom-back{width:17px;flex-basis:17px;height:24px;margin-left:-12px}.table-seat small{font-size:9px;margin-top:2px}body:not(.tv-mode)[data-ar-surface="caixeta"][data-room-phase="playing"] #play-area.felt-arena{padding:9px}body:not(.tv-mode)[data-ar-surface="caixeta"][data-room-phase="playing"] #opponents.around-seats{height:270px;inset:4px 0 auto}body:not(.tv-mode)[data-ar-surface="caixeta"][data-room-phase="playing"] #play-area>.table{max-width:170px;min-height:290px;display:flex;flex-direction:column;justify-content:center;padding:76px 0 10px;gap:8px}body:not(.tv-mode)[data-ar-surface="caixeta"][data-room-phase="playing"] #play-area .vira-zone{gap:8px}body:not(.tv-mode)[data-ar-surface="caixeta"][data-room-phase="playing"] #play-area .table-center{gap:23px}body:not(.tv-mode)[data-ar-surface="caixeta"][data-room-phase="playing"] #claim-panel{width:100%;padding-top:2px}body:not(.tv-mode)[data-ar-surface="caixeta"][data-room-phase="playing"] #claim-status{display:none}body[data-ar-surface="buraco"]:not(.tv-mode).ar-studio-active #opponents.around-seats{height:260px}body[data-ar-surface="buraco"]:not(.tv-mode).ar-studio-active #buraco-table .center-piles{top:118px;gap:12px;max-width:58%;flex-wrap:nowrap}body[data-ar-surface="buraco"]:not(.tv-mode).ar-studio-active #buraco-table .table-center{grid-template-areas:'left' 'right'}}

body:not(.tv-mode)[data-ar-surface="caixeta"][data-room-phase="playing"] #claim-panel #declare-ready{font-size:11px;min-height:30px;padding:5px 10px;border-radius:18px;background:#2e1524b3;border-color:#dfbd7c55;line-height:1.3}body:not(.tv-mode)[data-ar-surface="caixeta"][data-room-phase="playing"] #claim-status{display:none}@media(pointer:coarse){body:not(.tv-mode)[data-ar-surface="caixeta"][data-room-phase="playing"] #claim-panel #declare-ready{min-height:44px}}

body:not(.tv-mode)[data-ar-surface="caixeta"][data-room-phase="playing"] #hand-panel .hand-actions #claim-panel{display:contents}body:not(.tv-mode)[data-ar-surface="caixeta"][data-room-phase="playing"] #hand-panel .hand-actions #declare-ready{flex:0 0 auto;align-self:center;min-height:32px;font-size:11px;padding:6px 10px}body:not(.tv-mode)[data-ar-surface="caixeta"][data-room-phase="playing"] #hand-panel .hand-actions #claim-knock{flex-basis:100%}body:not(.tv-mode)[data-ar-surface="caixeta"][data-room-phase="playing"] #play-area .table #vira .card{width:94px}body:not(.tv-mode)[data-ar-surface="caixeta"][data-room-phase="playing"] #play-area .table #wild-cards .card{width:76px}body:not(.tv-mode)[data-ar-surface="caixeta"][data-room-phase="playing"] #play-area .table .wild-zone{max-width:168px}body:not(.tv-mode)[data-ar-surface="caixeta"][data-room-phase="playing"] #play-area .table .table-center .card,body:not(.tv-mode)[data-ar-surface="caixeta"][data-room-phase="playing"] #play-area .table .empty-pile{width:92px}body:not(.tv-mode)[data-ar-surface="caixeta"][data-room-phase="playing"] #play-area .table .table-center{gap:28px}body[data-ar-surface="buraco"]:not(.tv-mode).ar-studio-active #buraco-table .center-piles .playing-card{width:72px;height:101px}body[data-ar-surface="buraco"] #hand [data-card]{touch-action:pan-y;user-select:none;-webkit-user-select:none;cursor:grab}.buraco-order-ghost{position:fixed!important;pointer-events:none!important;z-index:1000!important;width:76px!important;height:106px!important;transform:rotate(-5deg);opacity:.92;box-shadow:0 8px 22px #0008}#buraco-hand-left,#buraco-hand-right{min-width:44px;min-height:44px;padding:7px 12px}
@media(max-width:850px){body:not(.tv-mode)[data-ar-surface="caixeta"][data-room-phase="playing"] #play-area .table #vira .card{width:58px}body:not(.tv-mode)[data-ar-surface="caixeta"][data-room-phase="playing"] #play-area .table #wild-cards .card{width:50px}body:not(.tv-mode)[data-ar-surface="caixeta"][data-room-phase="playing"] #play-area .table .table-center .card,body:not(.tv-mode)[data-ar-surface="caixeta"][data-room-phase="playing"] #play-area .table .empty-pile{width:64px}body:not(.tv-mode)[data-ar-surface="caixeta"][data-room-phase="playing"] #hand-panel .hand-actions #declare-ready{font-size:10px;padding:6px 8px}body[data-ar-surface="buraco"]:not(.tv-mode).ar-studio-active #buraco-table .center-piles .playing-card{width:48px;height:67px}body[data-ar-surface="buraco"]:not(.tv-mode).ar-studio-active #buraco-table .center-piles{gap:8px;max-width:65%}}
@media(pointer:coarse){body:not(.tv-mode)[data-ar-surface="caixeta"][data-room-phase="playing"] #hand-panel .hand-actions #declare-ready{min-height:44px}}

body[data-ar-surface="buraco"]:not(.tv-mode).ar-studio-active #buraco-table .center-piles{top:100px}@media(max-width:850px){.around-seats .table-seat{width:66px}.table-seat-name b{max-width:62px}.table-seat-cards .table-seat-back:nth-child(n+8){display:none}body[data-ar-surface="buraco"]:not(.tv-mode).ar-studio-active #buraco-table .center-piles{top:85px}}

@media(max-width:850px){.around-seats .table-seat-name{display:flex;gap:2px;font-size:9px;line-height:1.2}.around-seats .table-seat-name b{max-width:42px}.around-seats .table-seat-name span{font-size:8px}.around-seats .table-seat-cards{height:22px;margin-top:1px}.around-seats .table-seat small{margin-top:1px;line-height:1.2}}

body[data-ar-surface="buraco"]:not(.tv-mode).ar-studio-active #opponents.around-seats{height:320px;min-height:0}body[data-ar-surface="buraco"]:not(.tv-mode).ar-studio-active #ar-board-sides{margin-top:14px}body[data-ar-surface="buraco"]:not(.tv-mode).ar-studio-active #buraco-table .center-piles{top:108px}@media(max-width:850px){body[data-ar-surface="buraco"]:not(.tv-mode).ar-studio-active #opponents.around-seats{height:320px}body[data-ar-surface="buraco"]:not(.tv-mode).ar-studio-active #buraco-table .center-piles{top:110px}body[data-ar-surface="buraco"]:not(.tv-mode).ar-studio-active #buraco-table .ar-extra-dead{width:28px;height:39px;left:calc(50% + (var(--dead-i) - 1.5)*3px)}}

.around-seats[hidden]{display:none!important}

/* Keep the far seats inside the Caixeta felt rim. */
#play-area.felt-arena #opponents.around-seats .table-seat {
  top: max(var(--seat-y), var(--caixeta-seat-top));
  --caixeta-seat-top: 52px;
}

@media (max-width: 850px) {
  #play-area.felt-arena #opponents.around-seats .table-seat {
    --caixeta-seat-top: 42px;
  }
}

/* Give the shared cards their own row when a full table gets narrow. */
@media (max-width: 1150px) {
  body:not(.tv-mode)[data-ar-surface="caixeta"][data-room-phase="playing"] #play-area.felt-arena:has(#opponents .table-seat:nth-child(3)) > .table {
    padding-top: 8px;
  }

  body:not(.tv-mode)[data-ar-surface="caixeta"][data-room-phase="playing"] #opponents.around-seats:has(.table-seat:nth-child(3)) {
    position: static;
    grid-column: 1 / -1;
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
    height: auto;
  }

  #play-area.felt-arena #opponents.around-seats:has(.table-seat:nth-child(3)) .table-seat {
    position: static;
    transform: none;
  }
}
