#player-mode-field {
  display: grid;
  gap: 6px;
  font-weight: 750;
  margin-bottom: 10px;
}

#player-mode-field[hidden], #duel [hidden], body[data-players="duo"] #game > [hidden] {
  display: none;
}

body[data-players="duo"] #game {
  display: flex;
  overflow: auto;
  overscroll-behavior: contain;
}

body[data-players="duo"] .blueprint {
  height: auto;
  flex-shrink: 0;
}

#duel {
  width: min(1120px, 100%);
  margin: 10px auto 0;
}

#duel-players {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(6px, 1.5vw, 16px);
}

.duel-player {
  min-width: 0;
  background: #153d36f2;
  color: #fff8e3;
  border-radius: 18px;
  padding: clamp(6px, 1.5vw, 16px);
  border: 1px solid #a6d7b7;
}

.duel-player[data-side="1"] {
  background: #453923f5;
  border-color: #f3d38e;
}

.duel-player[data-won="true"] { border-color: #ffdc80; }
.duel-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 3px 8px; }
.duel-heading h2 { margin: 0; font-size: clamp(16px, 2.4vw, 23px); }
.duel-heading strong { font-size: clamp(14px, 2.2vw, 21px); }

.duel-scene {
  display: block;
  width: 100%;
  height: clamp(92px, 20dvh, 190px);
  margin: 6px 0;
  border-radius: 10px;
  background: #558e79 url('../v1/assets/valley.webp') center / cover;
}

.duel-controls { display: grid; gap: 6px; }
.duel-controls button {
  touch-action: none;
  min-height: 44px;
  min-width: 44px;
  padding: 5px;
  font-size: clamp(13px, 1.8vw, 17px);
}
.duel-controls button[aria-pressed="true"] { background: #f5cf75; color: #243c30; }
.duel-planks { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; text-align: center; }
.duel-planks button { font-size: 20px; }
.duel-directions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
.duel-kinds { display: flex; gap: 4px; flex-wrap: wrap; }
.duel-kinds button { flex: 1; }
.duel-player [data-player-status] { margin: 8px 0 0; min-height: 2.8em; font-size: 14px; }

.duel-footer {
  margin-top: 8px;
  padding: 8px;
  text-align: center;
  background: #fff8e5f2;
  border-radius: 16px;
}
.duel-footer p { margin: 0 0 6px; }
.duel-footer .tools button { color: #193d35; }
.duel-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }

@media (max-width: 480px) {
  .duel-controls button { border-radius: 10px; }
  .duel-player [data-player-status] { font-size: 12px; }
}
