.board-intro { padding-block: 2rem 1rem; }
.board-intro h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
.tactic-board { max-width: 1440px; margin: 0 auto 3rem; padding: 1rem; background: #17191c; color: #fff; border-radius: 16px; }
.tactic-board label { display: grid; gap: .35rem; font-size: .9rem; }
.tactic-board fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.tactic-board legend { font-size: .85rem; margin-bottom: .35rem; }
.tactic-board button, .tactic-board select, .tactic-board input { font: inherit; border: 1px solid #696969; border-radius: 7px; min-height: 44px; background: #292c30; color: #fff; padding: .5rem .7rem; }
.tactic-board button { cursor: pointer; }
.tactic-board button:hover { border-color: #e7b44a; }
.tactic-board button[aria-pressed="true"] { background: #efbd52; color: #111; border-color: #efbd52; }
.tactic-board :focus-visible { outline: 3px solid #ffe19b; outline-offset: 3px; }
.tactic-board button:disabled { opacity: .45; cursor: default; }
.board-toolbar, .board-tools { display: flex; gap: .5rem; flex-wrap: wrap; align-items: end; }
.board-toolbar { padding-bottom: 1rem; gap: 1rem; }
.tactic-board .board-check { display: flex; align-items: center; align-self: center; gap: .5rem; }
.board-check input { width: 22px; }
.board-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 1rem; }
.board-court-wrap { min-width: 0; display: flex; align-items: start; justify-content: center; background: #0e1012; border-radius: 10px; }
#board-court { display: block; width: 100%; max-height: 82vh; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
#board-court [data-marker] { cursor: grab; }
#board-court [data-marker]:focus { outline: none; }
#board-court [data-marker]:focus .marker-ring { stroke: #fff1ad; stroke-width: 6; }
.board-sidebar { display: grid; gap: 1rem; align-content: start; }
.board-sidebar h2 { font-size: 1.1rem; color: #fff; margin: 0; }
.board-sidebar form { display: grid; gap: .6rem; }
.board-sidebar input { width: 100%; min-width: 0; }
.board-sidebar p { margin: 0; font-size: .85rem; }
.board-sidebar fieldset button { margin-bottom: .4rem; }
.board-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.board-help { color: #c6c6c6; }
.tactic-board.is-expanded { position: fixed; inset: 0; z-index: 1000; max-width: none; margin: 0; border-radius: 0; overflow: auto; }
body.board-expanded { overflow: hidden; }
@media (max-width: 700px) {
  .tactic-board { border-radius: 0; padding: .75rem; }
  .board-workspace { grid-template-columns: 1fr; }
  #board-court { max-height: 75vh; }
  .board-sidebar { grid-template-columns: 1fr 1fr; }
  .board-sidebar form { grid-row: span 3; }
}
@media (max-width: 420px) { .board-sidebar { grid-template-columns: 1fr; } }

/* Crowded benches grow down the page rather than shrinking their markers. */
#board-court.bench-crowded { max-height: none; }
