/* Give the table back the former advertising band and condense its remote. */
body.depth-theme.first-person-demo.at-table .table .table-arena {
  z-index:0;
  --tv-height:0px; --tv-gap:0px;
  --room-cup:68px; --room-portrait:60px; --room-profile:68px;
  --room-call:29px; --room-own-bottom:78px;
  --side-seat-lift:clamp(0px, calc(50cqh - 180px), 24px);
}
/* The old room backdrop extended above the round label and below the arena
   into the status strip. Keep that decorative 3D layer inside its own row so
   mobile compositing cannot paint over either label during reveal effects. */
body.depth-theme.first-person-demo.at-table .table .ktv-room {
  --room-overhang:0px; top:0; bottom:0;
}
body.depth-theme.first-person-demo.at-table .table .seats {
  inset:8px 0 0; height:auto;
}
body.depth-theme.first-person-demo.at-table .table[data-seat-count="5"] .seats,
body.depth-theme.first-person-demo.at-table .table[data-seat-count="5"].is-revealed .seats {
  --portrait:var(--room-portrait); --profile-width:var(--room-profile); --cup:var(--room-cup);
  --own-bottom:var(--room-own-bottom); --far-cup-top:8px; --call-height:var(--room-call);
  --cup-gap:4px; --name-height:20px; --coin-height:21px; --name-font:14px; --coin-font:13px;
}
body.depth-theme.first-person-demo.at-table .table[data-seat-count="5"] .table-arena::before {
  inset:16px 18% calc(var(--room-portrait) + 17px); transform:rotateX(10deg);
}
body.depth-theme.first-person-demo.at-table .table[data-seat-count="5"] .table-arena::after {
  inset:22px 20% calc(var(--room-portrait) + 21px); transform:rotateX(10deg);
}
body.depth-theme.first-person-demo.at-table .table[data-seat-count="5"] .seats .seat:nth-child(3) .cup-space { left:32%; }
body.depth-theme.first-person-demo.at-table .table[data-seat-count="5"] .seats .seat:nth-child(4) .cup-space { left:68%; }
body.depth-theme.first-person-demo.at-table .table[data-seat-count="5"] .seats .seat:is(:nth-child(2),:nth-child(5)) .cup-space { top:calc(60% - var(--side-seat-lift)); }
body.depth-theme.first-person-demo.at-table .table[data-seat-count="5"] .seats .seat:nth-child(2) .cup-space { left:30%; }
body.depth-theme.first-person-demo.at-table .table[data-seat-count="5"] .seats .seat:nth-child(5) .cup-space { left:70%; }
body.depth-theme.first-person-demo.at-table .table[data-seat-count="5"] .seats .seat:is(:nth-child(2),:nth-child(5)) .seat-card { top:calc(52% - var(--side-seat-lift)); transform:translateY(-20%); }
body.depth-theme.first-person-demo.at-table .table[data-seat-count="5"] .seats .seat .seat-bid { max-width:calc(var(--cup) + 10px); gap:3px; padding:2px 6px; font-size:12px; }
body.depth-theme.first-person-demo.at-table .table[data-seat-count="5"] .seats .seat .seat-bid.no-call { font-size:12px; }
body.depth-theme.first-person-demo.at-table .table[data-seat-count="5"] .seats .seat .seat-bid strong { font-size:20px; }
body.depth-theme.first-person-demo.at-table .table[data-seat-count="5"] .seats .seat .seat-bid .die { width:23px; min-width:23px; height:24px; padding:4px; }
body.depth-theme.first-person-demo.at-table .table[data-seat-count="5"] .seats .seat .seat-bid-unit { display:inline; font-size:10px; }
/* The identity and dice share one width budget. Reserve enough space for the
   coin icon and full balance; rotated dice must not touch the amount pill. */
body.depth-theme.first-person-demo.at-table .table[data-seat-count="5"] .seats .seat.is-you {
  --self-info-width:80px; --self-card-left:4px; --self-column-gap:7px; --self-hand-gap:8px;
}
body.depth-theme.first-person-demo.at-table .table[data-seat-count="5"] .seats .seat.is-you .seat-card {
  left:var(--self-card-left); grid-template-columns:var(--portrait) var(--self-info-width);
  width:calc(var(--portrait) + var(--self-column-gap) + var(--self-info-width)); gap:0 var(--self-column-gap);
}
body.depth-theme.first-person-demo.at-table .table[data-seat-count="5"] .seats .seat.is-you .seat-name {
  display:block;box-sizing:border-box;min-width:0;width:100%;max-width:100%;
  height:var(--name-height);line-height:var(--name-height);padding:0 5px;text-align:center;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
body.depth-theme.first-person-demo.at-table .table[data-seat-count="5"] .seats .seat.is-you .seat-coins {
  width:100%; max-width:100%; padding-inline:4px; font-variant-numeric:tabular-nums;
}
body.depth-theme.first-person-demo.at-table .table[data-seat-count="5"] .seats .seat.is-you .private-hand {
  left:calc(var(--self-card-left) + var(--portrait) + var(--self-column-gap) + var(--self-info-width) + var(--self-hand-gap)); right:0;
}
@container (max-width:330px) {
  body.depth-theme.first-person-demo.at-table .table[data-seat-count="5"] .seats .seat.is-you { --self-info-width:72px; }
  body.depth-theme.first-person-demo.at-table .table[data-seat-count="5"] .seats .seat.is-you .seat-coins { font-size:11px; }
}
@container (max-height:360px) {
  body.depth-theme.first-person-demo.at-table .table[data-seat-count="5"] .seats .seat.is-you { --self-info-width:72px; }
  body.depth-theme.first-person-demo.at-table .table[data-seat-count="5"] .seats .seat.is-you .seat-coins { font-size:11px; }
}
body.depth-theme.first-person-demo.at-table .table[data-seat-count="5"] .seats .seat.is-you .private-hand .table-die { max-width:54px; }

/* Lift both side seats equally; keep the latest call centred in their safe band. */
body.depth-theme.first-person-demo.at-table .table.is-playing #latest-call-stage.center-stage {
  top:calc(30% + 36px - var(--side-seat-lift) / 2);
  width:max-content; max-width:min(48%,180px); padding:5px 10px; border-radius:12px;
}
body.depth-theme.first-person-demo.at-table .table.is-playing #latest-call-stage .current-bid { display:flex; flex-direction:row; gap:5px; height:32px; }
body.depth-theme.first-person-demo.at-table .table.is-playing #latest-call-stage .bid-number { font-size:29px; }
body.depth-theme.first-person-demo.at-table .table.is-playing #latest-call-stage .bid-unit { font-size:12px; }
body.depth-theme.first-person-demo.at-table .table.is-playing #latest-call-stage .die { width:29px; min-width:29px; height:30px; padding:5px; }
body.depth-theme.first-person-demo.at-table .table.is-playing #latest-call-stage .latest-bid-mode { font-size:10px; }
body.depth-theme.first-person-demo.at-table .table.is-playing #latest-call-stage h2 { font-size:13px; line-height:30px; white-space:nowrap; }

/* Mode and the pure toggle share one row; choices and actions remain tap-sized. */
body.depth-theme.at-table { --action-control-height:44px; --action-control-font:16px; --table-action-height:138px; }
body.depth-theme.at-table .table #room-panel.action-panel { padding:4px 5px 5px; row-gap:5px; }
/* Reserve the closed remote's footprint through rolling and settlement. The
   arena is the flexible grid row above it; collapsing this panel when bidding
   is hidden would stretch the felt and move every player between phases. */
body.depth-theme.first-person-demo.at-table .table #room-panel.action-panel {
  min-height:var(--table-action-height);
  align-content:end;
}
body.depth-theme.at-table .table #bid-controls { position:relative; }
body.depth-theme.at-table .table .bid-wheel-labels { position:absolute; inset:32px 0 auto auto; width:60px; height:44px; min-height:44px; margin:0; }
body.depth-theme.at-table .table .bid-wheel-labels>span { display:none; }
body.depth-theme.at-table .table #pure-toggle { inset:0 0 auto auto; transform:none; min-width:60px; height:44px; min-height:44px; padding:4px 10px; font-size:16px; }
body.depth-theme.at-table .table #pure-toggle.has-release-hint { min-width:60px; }
/* Two lines need 30px even when the detail happens to be empty. Reserving only
   26px made the whole table move again when a pure/one-face hint appeared. */
body.depth-theme.at-table .table #selection-hint { min-height:30px; margin:0 0 2px; padding:2px 4px; border:0; background:none; }
body.depth-theme.at-table .table #selection-hint strong { font-size:11px; }
body.depth-theme.at-table .table #selection-hint span { font-size:9px; min-height:0; }
body.depth-theme.at-table .table .bid-pickers { margin-right:66px; }
body.depth-theme.at-table .table .bid-picker-trigger { height:46px; min-height:44px; border-radius:12px; padding-block:2px; }
body.depth-theme.at-table .table .bid-picker .wheel-number { font-size:27px; }
body.depth-theme.at-table .table .bid-picker .wheel-unit { font-size:13px; }
body.depth-theme.at-table .table .bid-picker-trigger .die { width:30px; min-width:30px; height:30px; padding:5px; }
body.depth-theme.at-table .table #room-panel.action-panel>:is(#challenge,#rush,#return-bid,#quick-raise,#primary) { height:44px; min-height:44px; border-radius:11px; }

/* A gold same-face shortcut sits next to Call without adding another row. */
body.depth-theme.at-table .table #room-panel.action-panel:has(#bid-controls:not([hidden])) {
  grid-template-columns:38px minmax(44px,1fr) minmax(44px,.85fr) minmax(44px,1fr) minmax(44px,.85fr) minmax(44px,1.1fr);
  column-gap:4px;
}
body.depth-theme.at-table .table #room-panel.action-panel>#quick-raise {
  grid-column:5; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:1px;
  min-width:44px; margin:0; padding:2px; border:1px solid #fff4be;
  color:#713c12; background:linear-gradient(#fff3b3,#ffd46b 48%,#eeb348);
  box-shadow:inset 0 2px 0 #fff9,0 3px 0 #bd8241; font:800 21px/1 system-ui;
}
body.depth-theme.at-table .table #room-panel.action-panel>#quick-raise small { font:700 9px/1.2 system-ui; }
body.depth-theme.at-table .table #room-panel.action-panel>#quick-raise:hover:not(:disabled) { background:linear-gradient(#fff9d5,#ffe18a 48%,#ffc856); }
body.depth-theme.at-table .table #room-panel.action-panel>#quick-raise:disabled {
  color:#8b729e; border-color:#d5b4e1; background:linear-gradient(#e8d5ee,#d9c1e4);
  box-shadow:inset 0 1px 0 #fff9,0 2px 0 #b598c2; opacity:1;
}
body.depth-theme.at-table .table #room-panel.action-panel>#quick-raise:focus-visible { outline:3px solid #713c12; outline-offset:2px; }
body.depth-theme.at-table .table #room-panel.action-panel:has(#bid-controls:not([hidden]))>#primary { grid-column:6; }
@media (max-width:360px) {
  body.depth-theme.at-table .table #room-panel.action-panel:has(#bid-controls:not([hidden])) { column-gap:2px; padding-inline:4px; }
  body.depth-theme.at-table .table #room-panel.action-panel>:is(#challenge,#rush,#return-bid,#primary) { padding-inline:1px; font-size:14px; }
  body.depth-theme.at-table .table #room-panel.action-panel>#rush small { padding:1px; font-size:9px; }
}
@media (orientation:landscape) and (max-height:519px) {
  /* The side remote has two action rows on short landscape screens. */
  body.depth-theme.at-table { --table-action-height:187px; }
  body.depth-theme.at-table .table #room-panel.action-panel:has(#bid-controls:not([hidden])) { grid-template-columns:repeat(3,minmax(44px,1fr)); gap:5px; }
  body.depth-theme.at-table .table #room-panel.action-panel>#return-bid { grid-column:1; }
  body.depth-theme.at-table .table #room-panel.action-panel>#quick-raise { grid-column:2; }
  body.depth-theme.at-table .table #room-panel.action-panel:has(#bid-controls:not([hidden]))>#primary { grid-column:3; }
}

/* Result controls use the newly freed middle band rather than the old TV offset. */
body.depth-theme.first-person-demo.at-table .table .round-center-controls { top:calc(16px + var(--room-cup) + var(--room-call) + 34px); margin-top:0; }
body.depth-theme.first-person-demo.at-table .table .round-result-burst { top:36%; }
body.depth-theme.first-person-demo.at-table .table .round-verdict { --verdict-top:36%; }

@container (max-height:360px) {
  body.depth-theme.first-person-demo.at-table .table :is(.seats,#latest-call-stage) { --side-seat-lift:clamp(0px, calc(25cqh - 70px), 16px); }
  body.depth-theme.first-person-demo.at-table .table[data-seat-count="5"] .seats,
  body.depth-theme.first-person-demo.at-table .table[data-seat-count="5"].is-revealed .seats {
    --portrait:48px; --profile-width:56px; --cup:54px; --call-height:25px;
    --own-bottom:52px; --name-font:12px; --name-height:17px; --coin-font:11px; --coin-height:18px;
  }
  body.depth-theme.first-person-demo.at-table .table[data-seat-count="5"] .seats .seat .seat-bid strong { font-size:17px; }
  body.depth-theme.first-person-demo.at-table .table[data-seat-count="5"] .seats .seat .seat-bid .die { width:20px; min-width:20px; height:21px; padding:3px; }
  body.depth-theme.first-person-demo.at-table .table[data-seat-count="5"] .seats .seat .seat-bid { padding-inline:4px; }
  body.depth-theme.first-person-demo.at-table .table[data-seat-count="5"] .seats .seat:is(:nth-child(2),:nth-child(5)) .cup-space { top:calc(63% - var(--side-seat-lift)); }
  body.depth-theme.first-person-demo.at-table .table.is-playing #latest-call-stage.center-stage { top:calc(31.5% + 31px - var(--side-seat-lift) / 2); padding:1px 8px; }
  body.depth-theme.first-person-demo.at-table .table.is-playing #latest-call-stage .current-bid { height:28px; }
  body.depth-theme.first-person-demo.at-table .table.is-playing #latest-call-stage .bid-number { font-size:25px; }
  body.depth-theme.first-person-demo.at-table .table.is-playing #latest-call-stage .die { width:25px; min-width:25px; height:26px; padding:4px; }
  body.depth-theme.first-person-demo.at-table .table .round-center-controls { top:137px; }
  body.depth-theme.first-person-demo.at-table .table[data-seat-count="5"] .table-arena::before { bottom:67px; }
  body.depth-theme.first-person-demo.at-table .table[data-seat-count="5"] .table-arena::after { bottom:71px; }
}
@container (min-width:600px) and (min-height:500px) {
  body.depth-theme.first-person-demo.at-table .table[data-seat-count="5"] .seats,
  body.depth-theme.first-person-demo.at-table .table[data-seat-count="5"].is-revealed .seats {
    --portrait:76px; --profile-width:86px; --cup:92px; --call-height:32px; --own-bottom:96px;
    --name-font:16px; --name-height:22px; --coin-font:14px; --coin-height:23px;
  }
  body.depth-theme.first-person-demo.at-table .table.is-playing #latest-call-stage.center-stage { top:calc(30% + 43px - var(--side-seat-lift) / 2); }
}
@media (prefers-reduced-motion:reduce) { body.depth-theme.at-table .table .seat.is-turn * { animation:none; } }

/* Reveal hands in place. The self hand is already visible in the private strip. */
body.depth-theme.first-person-demo.at-table .table.is-revealed .round-center-controls {
  top:calc(16px + var(--room-cup) + var(--room-call) + 8px); transform:translateX(-50%);
}
body.depth-theme.first-person-demo.at-table .table.is-revealed .seats .seat.is-you .cup-space { visibility:hidden; }
body.depth-theme.first-person-demo.at-table .table.is-revealed .seats .seat:not(.is-you) .cup-model .table-hand {
  inset:0 auto auto -10%; width:120%; height:100%;
}
@container (max-height:360px) {
  body.depth-theme.first-person-demo.at-table .table.is-revealed .round-center-controls { top:103px; }
  body.depth-theme.first-person-demo.at-table .table.is-revealed .round-verdict-crest { height:10px; }
}

@container (min-width:600px) and (min-height:500px) {
  body.depth-theme.first-person-demo.at-table .table.is-revealed .round-center-controls { top:155px; }
}

/* Keep the result to its title and two payouts. Detailed dice counts remain
   available in the result history instead of competing with the revealed hands. */
body.depth-theme.first-person-demo.at-table .round-center-controls :is(.round-verdict-crest,.round-verdict-multiplier,.round-call-summary) { display:none; }
/* A compact result fits between the two fixed rows. Only the manual action
   remains in the remote, which retains its height through settlement. */
body.depth-theme.first-person-demo.at-table .table.is-revealed .table-arena > .round-center-controls {
  top:calc(30% + 36px - var(--side-seat-lift) / 2);left:50%;
  transform:translate(-50%,-50%);width:min(56%,280px);margin:0;gap:0;
}
body.depth-theme.first-person-demo.at-table .table .round-center-controls .round-verdict {
  display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto;
  min-height:46px;padding:4px 6px;gap:2px;border-radius:12px;animation:none;
}
body.depth-theme.first-person-demo.at-table .table .round-verdict-heading { grid-column:1;grid-row:1; }
body.depth-theme.first-person-demo.at-table .table .round-center-controls .round-verdict-title { font-size:18px; }
body.depth-theme.first-person-demo.at-table .table .round-verdict-payouts {
  grid-column:1;grid-row:2;flex-direction:row;gap:8px;
}
body.depth-theme.first-person-demo.at-table .table .round-verdict-payouts > div { max-width:calc(50% - 4px);font-size:11px;gap:3px; }
body.depth-theme.first-person-demo.at-table .table #room-panel > #round-primary {
  position:absolute;right:5px;bottom:5px;width:calc(100% - 58px);min-height:44px;height:44px;padding:4px;font-size:12px;
}
body.depth-theme.first-person-demo.at-table .table #room-panel:has(#round-primary:not([hidden])) > #primary { visibility:hidden; }
@container (max-height:360px) {
  body.depth-theme.first-person-demo.at-table .table.is-revealed .table-arena > .round-center-controls {
    top:calc(31.5% + 30px - var(--side-seat-lift) / 2);
  }
  body.depth-theme.first-person-demo.at-table .table .round-center-controls .round-verdict { min-height:34px;padding:2px 4px;gap:1px; }
  body.depth-theme.first-person-demo.at-table .table .round-center-controls .round-verdict-title { font-size:14px; }
  body.depth-theme.first-person-demo.at-table .table .round-verdict-payouts > div { font-size:9px; }
}
@container (min-width:600px) and (min-height:500px) {
  body.depth-theme.first-person-demo.at-table .table.is-revealed .table-arena > .round-center-controls {
    top:calc(30% + 43px - var(--side-seat-lift) / 2);
  }
}
/* Very short landscape has no room for both old calls and the outcome between
   revealed hands. Keep the dice fixed and replace the upper call labels. */
@media (orientation:landscape) and (max-height:350px) {
  body.depth-theme.first-person-demo.at-table .table.is-revealed .table-arena > .round-center-controls {
    top:calc(31.5% + 16px - var(--side-seat-lift) / 2);
  }
  body.depth-theme.first-person-demo.at-table .table[data-seat-count="5"].is-revealed .seats .seat:is(:nth-child(3),:nth-child(4)) .seat-bid { visibility:hidden; }
}
