/* v1.11.0 — 6–8 player Extended Table.
   Classic 1–5 layout is intentionally untouched. */

.extended-table .landscape-board{
  grid-template-columns:clamp(88px,9.6vw,132px) minmax(0,1fr) clamp(88px,9.6vw,132px)!important;
  gap:clamp(3px,.42vw,6px)!important;
}
.extended-table .table-opponents{
  min-width:0;
  min-height:0;
  display:flex;
  flex-direction:column;
}
.extended-table .table-opponents-right{flex:1}
.extended-table .opponent-rail,
.extended-table .opponent-rail.single{
  min-height:0!important;
  flex:1!important;
  display:flex!important;
  justify-content:space-evenly!important;
  gap:3px!important;
  overflow:hidden!important;
}
/* From the viewer's seat, the next player starts at the lower-left and the
   sequence travels upward, across the table, then down the right side. */
.extended-table .table-opponents-left .opponent-rail{
  flex-direction:column-reverse!important;
}
.extended-table .table-opponents-right .opponent-rail{
  flex-direction:column!important;
}
.extended-table .opponent-seat,
.extended-table .opponent-rail.single .opponent-seat{
  flex:1 1 0!important;
  min-height:0!important;
  max-height:84px!important;
  width:100%;
  grid-template-columns:25px minmax(0,1fr)!important;
  gap:3px!important;
  padding:3px!important;
  overflow:hidden;
}
.extended-table .seat-avatar,
.extended-table .opponent-rail.single .seat-avatar{
  width:23px!important;
  min-height:28px!important;
  font-size:7px!important;
}
.extended-table .seat-body{align-self:center}
.extended-table .opponent-seat .player-name{
  font-size:7px!important;
  line-height:1.05!important;
}
.extended-table .seat-type{font-size:5px!important;margin-top:0!important}
.extended-table .seat-order{width:12px!important;height:12px!important;font-size:5px!important}
.extended-table .opponent-seat .mini-caravan{
  margin-top:2px!important;
  padding:2px!important;
}
.extended-table .opponent-seat .mini-caravan-grid{
  min-height:8px!important;
  gap:1px!important;
}
.extended-table .opponent-seat .mini-caravan .caravan-cube{
  width:6px!important;
  height:6px!important;
}
.extended-table .seat-footer{margin-top:2px!important;gap:2px!important}
.extended-table .mini-stat{height:13px!important;min-width:18px!important;padding:0 2px!important}
.extended-table .mini-stat b{font-size:6px!important}
.extended-table .seat-footer .coin{width:12px!important;height:12px!important;font-size:4px!important}
.extended-table .seat-host-action{top:13px!important;font-size:5px!important;padding:1px 3px!important}

/* Keep host tools, but make them consume less space than an opponent seat. */
.extended-table .landscape-right-rail{gap:2px!important}
.extended-table .rail-tools{flex:0 0 auto!important;gap:2px!important}
.extended-table .rail-tools .compact-drawer summary{padding:2px!important;font-size:5px!important}

/* Non-intrusive mode flag. */
.extended-table .landscape-market{position:relative}
.extended-table .mode-badge.extended{
  position:absolute;
  z-index:8;
  right:3px;
  top:1px;
  padding:2px 5px;
  border:1px solid rgba(193,145,70,.46);
  border-radius:999px;
  background:rgba(20,15,11,.82);
  color:#d9b36f;
  font:800 6px/1 Inter,"Noto Sans SC","Microsoft YaHei",sans-serif;
  letter-spacing:.03em;
  pointer-events:none;
}

@media (orientation:landscape) and (max-height:620px){
  .extended-table .landscape-board{
    grid-template-columns:76px minmax(0,1fr) 76px!important;
    gap:3px!important;
  }
  .extended-table .opponent-rail,
  .extended-table .opponent-rail.single{gap:2px!important}
  .extended-table .opponent-seat,
  .extended-table .opponent-rail.single .opponent-seat{
    max-height:54px!important;
    grid-template-columns:20px minmax(0,1fr)!important;
    gap:2px!important;
    padding:2px!important;
  }
  .extended-table .seat-avatar,
  .extended-table .opponent-rail.single .seat-avatar{
    width:19px!important;
    min-height:23px!important;
    font-size:6px!important;
  }
  .extended-table .opponent-seat .player-name{font-size:6px!important}
  .extended-table .seat-type{display:none!important}
  .extended-table .opponent-seat .mini-caravan{margin-top:1px!important;padding:1px!important}
  .extended-table .opponent-seat .mini-caravan-grid{min-height:6px!important}
  .extended-table .opponent-seat .mini-caravan .caravan-cube{width:5px!important;height:5px!important}
  .extended-table .mini-stat{height:10px!important;min-width:14px!important}
  .extended-table .mini-stat b{font-size:5px!important}
  .extended-table .seat-footer .coin{width:10px!important;height:10px!important;font-size:4px!important}
  .extended-table .seat-host-action{top:11px!important;font-size:4px!important;padding:1px 2px!important}
  .extended-table .rail-tools{display:flex!important}
  .extended-table .mode-badge.extended{font-size:5px;padding:1px 4px}
}

@media (orientation:landscape) and (max-width:820px){
  .extended-table .landscape-board{
    grid-template-columns:70px minmax(0,1fr) 70px!important;
  }
  .extended-table .opponent-seat,
  .extended-table .opponent-rail.single .opponent-seat{
    grid-template-columns:18px minmax(0,1fr)!important;
  }
  .extended-table .seat-avatar,
  .extended-table .opponent-rail.single .seat-avatar{width:17px!important;font-size:5px!important}
  .extended-table .seat-order{display:none}
}
