/* Phase 9 workspace: public turn context and a single dock-owned action. */
.playing-view .turn-progress {
  margin: 0 0 8px;
  color: #d9e7de;
  font-size: 12px;
  line-height: 1.35;
}
.playing-view .player-order {
  display: inline-grid;
  width: 17px;
  height: 17px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
.playing-view .player-turn-state { color: #b4c8bf; font-size: 11px; }
.playing-view .player[data-current="true"] { border-top: 1px solid #d7b976; background: #244149; }
.playing-view .player[data-self="true"] .player-turn-state { color: #efd498; }
.playing-view .dock-actions {
  display: flex;
  min-width: 0;
}
.playing-view .dock-actions > button:not([hidden]) { flex: 1 1 0; min-width: 0; }
.playing-view .dock-actions #guidePrimary:not([hidden]) {
  display: flex;
  flex: 1.7 1 110px;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin: 0;
  padding: 5px;
  border-radius: 0;
  color: #172329;
  background: #d9bd7b;
  font-size: 12px;
  line-height: 1.2;
  text-align: center;
  white-space: normal;
}
.playing-view .dock-actions #mobileRollDice { display: none !important; }
body.playing-view .toast { pointer-events: none; }
.playing-view .board-toolbar { display: flex; gap: 4px; }
.playing-view .board-toolbar button { width: 44px; height: 44px; min-height: 44px; padding: 8px; touch-action: manipulation; }
.playing-view .board-toolbar #view3d[aria-pressed="true"] { border-color: #f1d38a; color: #fff4cc; }
.playing-view .board-toolbar button:disabled { opacity: .46; cursor: default; }
.playing-view .board-panel .edge.legal .edge-hit { stroke-width: 22; }
.playing-view .board-panel .vertex.legal .vertex-hit { r: 19; }
.playing-view .board-panel .robber-target .hex { stroke: #e9ca80; stroke-width: 4; }
.playing-view .board-panel .edge.legal[data-target-state="selected"] .edge-hit { stroke: #fff2b0; filter: drop-shadow(0 0 6px #fff2b0); }
.playing-view .board-panel .vertex.legal[data-target-state="selected"] .vertex-hit { fill: #fff2b0; stroke: #533c25; }
.playing-view .board-panel .robber-target[data-target-state="selected"] .hex { stroke: #fff2b0; stroke-width: 7; }
.playing-view .board-panel .edge.legal,
.playing-view .board-panel .vertex.legal,
.playing-view .board-panel .robber-target { touch-action: manipulation; }
.resource-swatch { display: inline-block; flex: 0 0 16px; width: 16px; height: 16px; border: 2px solid #f2ead8; border-radius: 4px; background: #76887c; }
.resource-swatch[data-trade-resource="wood"] { background: #3a8a59; }
.resource-swatch[data-trade-resource="brick"] { background: #c1684c; }
.resource-swatch[data-trade-resource="wheat"] { background: #d1aa41; }
.resource-swatch[data-trade-resource="sheep"] { background: #a7bc6d; }
.resource-swatch[data-trade-resource="ore"] { background: #8798a5; }
#tradeHubDialog .trade-row { align-items: end; }
#tradeHubDialog .trade-choice { display: grid; min-width: 0; gap: 4px; font-size: 12px; }
#tradeHubDialog .trade-choice-control { display: flex; align-items: center; gap: 6px; min-width: 0; }
#tradeHubDialog .trade-choice-control select { flex: 1; min-width: 0; }
#tradeHubDialog .trade-choice small { color: #d3dfdc; font-size: 11px; }
#tradeDialog .trade-resource-row label { display: flex; align-items: center; gap: 7px; }
#tradeDialog .trade-resource-row label small { display: block; color: #60766e; font-size: 11px; }
#tradeDialog .trade-resource-row input { min-height: 44px; text-align: center; }
#tradeDialog .trade-dialog-fields { overscroll-behavior: contain; }
.incoming-trade-dialog[open] { width: min(420px, calc(100vw - 24px)); }
.incoming-trade-dialog #incomingTrade { display: grid; gap: 12px; padding: 12px; overflow-y: auto; }
.incoming-trade-dialog #incomingTradeText { margin: 0; line-height: 1.5; }
.incoming-trade-dialog .development-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.incoming-trade-dialog .development-actions button { min-height: 44px; }
.victory-match-summary { margin: 4px 0 0; color: #c5d2cf; font-size: 12px; font-variant-numeric: tabular-nums; }
#platformLobby .profile-extras { grid-column: 1 / -1; border-top: 1px solid rgba(216,199,159,.22); padding-top: 10px; }
#platformLobby .profile-extras summary { cursor: pointer; color: #e9d7a8; font-size: 13px; }
#platformLobby .profile-extras dl { display: grid; gap: 8px; margin: 10px 0 0; }
#platformLobby .profile-extras dl > div { display: grid; grid-template-columns: 54px minmax(0,1fr); gap: 8px; color: #dce8e5; font-size: 12px; }
#platformLobby .profile-extras dt { color: #aebfba; }
#platformLobby .profile-extras dd { margin: 0; overflow-wrap: anywhere; }

@media (max-width: 760px) {
  .playing-view .player-rail { overflow: hidden; }
  .playing-view .identity-strip .players,
  .playing-view .identity-strip .players:has(.player:nth-child(4)) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3px;
    overflow: visible;
  }
  .playing-view .identity-strip .players[data-count="5"],
  .playing-view .identity-strip .players[data-count="6"],
  .playing-view .identity-strip .players[data-count="7"],
  .playing-view .identity-strip .players[data-count="8"] {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .playing-view .identity-strip .players[data-count="9"],
  .playing-view .identity-strip .players[data-count="10"] {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .playing-view .identity-strip .player { min-width: 0; flex: none; padding: 3px 4px; }
  .playing-view .identity-strip .player-head { display: flex; gap: 3px; align-items: center; }
  .playing-view .identity-strip .player-head strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
  .playing-view .identity-strip .player-head > span { flex: 0 0 auto; font-size: 10px; }
  .playing-view .player-turn-state { display: none; }
  .playing-view .turn-progress { margin: 0 0 3px; font-size: 11px; }
  .playing-view .dock-actions #guidePrimary:not([hidden]) { flex-basis: 106px; }
}

@media (max-height: 500px) and (orientation: landscape) and (max-width: 950px) {
  .playing-view .player-rail { overflow-y: auto; }
  .playing-view .turn-progress { font-size: 10px; }
  .playing-view .dock-actions #guidePrimary:not([hidden]) { min-height: 44px; }
  .playing-view .action-dock { height: 52px; min-height: 52px; }
  .playing-view .action-dock .hand-bar { min-height: 0; }
  .playing-view .dock-actions button:not(#guidePrimary) { min-height: 44px; padding: 3px; }
  .playing-view .dock-actions button:not(#guidePrimary) > span { display: none; }
}
