/* One projected room, in depth order. display:contents keeps the four avatars
   in a single accessible group while allowing the tabletop between the seats. */
.room-view {isolation:isolate}
.room-view #environmentCanvas,.room-view #roomCanvas,.room-view #chairForeground {
  position:absolute;inset:0;width:100%;height:100%;display:block;
}
.room-view #environmentCanvas {z-index:0;pointer-events:none}
.room-view #castSeats {display:contents}
.room-view #castSeats .cast-figure {z-index:1;pointer-events:none}
.room-view #castSeats .cast-chair {display:none}
.room-view #roomCanvas {z-index:2}
.room-view #castSeats .cast-figure[data-seat="0"] {z-index:3}
.room-view #chairForeground {z-index:4;pointer-events:none}
.room-view #hand {z-index:5}
.room-view .seat,.room-view .cut-info {z-index:6}
.room-view #opening,.room-view #dropHint {z-index:7}
.dealing-room .room-view .seat {visibility:hidden}
.room-view .seat {
  display:flex;align-items:center;gap:.38rem;min-height:0;
  color:#f9f0d6;background:#274e48f0;
  padding:4px 8px 5px;border:1px solid #d4bd8b;border-radius:5px;
  box-shadow:0 2px 0 #38433a75;
}
.room-view .seat .seat-wind {
  border:0;border-right:1px solid #decfa35e;padding-right:.38rem;
  color:#f2d48e;font:700 15px/1 var(--serif);
}
.room-view .seat.thinking {background:#704334;border-color:#f3d497}
.room-view .seat strong {font:600 13px/1.12 var(--serif);letter-spacing:.04em}
.room-view .seat small {display:none}
.room-view .seat .stake {margin:0;color:#e3d6ac;font:11px/1 Georgia,serif}
@media(max-width:700px),(max-height:530px) {
  .room-view .seat {gap:3px;padding:2px 4px 3px;border-radius:4px}
  .room-view .seat strong {font-size:11px}
  .room-view .seat .seat-wind {font-size:11px;padding-right:3px}
  .room-view .seat .stake {display:none}
}

/* Front-view inset follows the foreground player's current drawing. */
.cast-portrait{
  position:relative;flex:0 0 auto;isolation:isolate;overflow:hidden;
  width:clamp(32px,4.2vmin,64px);aspect-ratio:1;border:1px solid #cfbc89;border-radius:50%;
  background:linear-gradient(140deg,#f0e2b4,#a2bd9a 76%,#617d66);
}
.cast-portrait canvas{
  display:block;position:absolute;width:144%;height:144%;left:-22%;top:-3%;
  pointer-events:none;
}
html[data-ui-mode="desktop"] .room-view .seat strong{font-size:var(--seat-label-size,14px)}
html[data-ui-mode="desktop"] .room-view .seat .seat-wind{font-size:var(--seat-label-size,14px)}
.room-view .seat{max-width:23%;overflow:hidden}
.room-view .seat>div{min-width:0;overflow:hidden;text-overflow:ellipsis}

.cast-figure[data-table-seat="true"]:is([data-seat="1"],[data-seat="3"]) canvas{height:112.5%}
