#bpBoard.bp-board {
  display: block;
  padding: 0;
  overflow: auto;
  background: #080f19;
}
#bpBoard.bp-board[hidden] {
  display: none;
}
.bp-board * {
  box-sizing: border-box;
}
.bp-board h1 {
  font-size: 22px;
  margin: 0;
}
.bp-board h2 {
  font-size: 14px;
  margin: 10px 0;
}
.bp-board label {
  display: grid;
  gap: 5px;
  color: #a5b8ca;
  font-size: 12px;
}
.bp-board input,
.bp-board select,
.bp-board textarea {
  width: 100%;
  min-width: 0;
  background: #0b1929;
  border: 1px solid #30465c;
  color: #e7edf4;
  padding: 8px;
}
.bp-board button {
  cursor: pointer;
}
.bp-board button:disabled {
  cursor: default;
}
.bp-home {
  --home-gap: 18px;
  --home-pad: 24px;
  display: grid;
  grid-template-columns: minmax(0, 600px) minmax(300px, 1fr);
  grid-template-rows: minmax(0, 1fr);
  align-items: stretch;
  gap: 24px;
  width: calc(100% - 64px);
  max-width: 1100px;
  height: calc(100% - 32px);
  margin: 16px auto;
  min-height: 0;
  font-size: 16px;
  line-height: 1.35;
}
#bpBoard.bp-board:has(.bp-home) {
  overflow: hidden;
}
.bp-home-create,
.bp-home-library {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: var(--home-pad);
  background: #102033;
  border: 1px solid #2a445b;
  border-radius: 12px;
}
.bp-home p {
  color: #9bb0c4;
}
.bp-home form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--home-gap);
  flex-shrink: 0;
}
.bp-home h1 {
  font-size: 28px;
}
.bp-home label,
.bp-home button,
.bp-home input {
  font-size: 16px;
}
.bp-home-header {
  display: block;
  position: static;
  height: auto;
  min-height: 0;
  z-index: auto;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  margin-bottom: 18px;
  flex-shrink: 0;
}
.bp-home-header .bp-kicker {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  letter-spacing: 2px;
  color: #50c6e9;
}
.bp-home-header p {
  margin: 8px 0 0;
  font-size: 15px;
  line-height: 1.4;
}
.bp-create-field {
  min-width: 0;
  padding: 0;
  margin: 0;
  border: 0;
}
.bp-create-field legend {
  padding: 0;
  margin-bottom: 7px;
  color: #a5b8ca;
  font-size: 16px;
}
.bp-home #bpName {
  min-height: 44px;
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 3px;
}
.bp-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.bp-board .bp-choice {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 62px;
  padding: 11px 14px;
  border: 1px solid #30465c;
  border-radius: 8px;
  background: #0b1929;
  cursor: pointer;
}
.bp-board .bp-choice input {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  min-height: 0;
  padding: 0;
  margin: 0;
  accent-color: #54caec;
}
.bp-choice strong,
.bp-choice small {
  display: block;
}
.bp-choice strong {
  color: #e1eaf3;
  font-size: 18px;
  font-weight: 600;
}
.bp-choice small {
  margin-top: 4px;
  font-size: 13px;
  color: #8fa6ba;
}
.bp-choice:has(input:checked) {
  background: #123448;
  border-color: #4fbbdc;
}
.bp-choice:hover {
  border-color: #7399b2;
}
.bp-choice:focus-within,
.bp-home #bpName:focus-visible {
  outline: 2px solid #88ddf5;
  outline-offset: 3px;
}
.bp-version {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #a5b8ca;
  font-size: 15px;
}
.bp-version strong {
  font-weight: 500;
  color: #d2e1ed;
}
.bp-version small {
  margin-left: 10px;
  color: #8fa6ba;
}
.bp-home .bp-create-submit {
  min-height: 46px;
  margin-top: 4px;
  border-radius: 8px;
  font-weight: 600;
}
.bp-home-library {
  margin: 0;
}
.bp-home .bp-library-hint {
  margin: 12px 0 0;
  font-size: 14px;
  flex-shrink: 0;
}
.bp-home-library-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
}
.bp-home-library-heading h2 {
  margin: 0;
  font-size: 20px;
}
.bp-home #bpImportHome {
  min-height: 38px;
  font-size: 14px;
}
#bpProjects {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  align-content: start;
  padding-right: 4px;
}
#bpProjects button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-width: 0;
  min-height: 44px;
  text-align: left;
  overflow-wrap: anywhere;
}
#bpProjects button > span:not(.bp-project-name) {
  flex-shrink: 0;
  font-size: 13px;
  color: #91b7cf;
}
.bp-project-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 10px;
}
#bpProjects .bp-project-name {
  min-width: 0;
  overflow-wrap: anywhere;
}
#bpProjects .bp-project-delete,
.bp-danger {
  color: #ffb2bd;
  background: #361d2b;
  border-color: #76424f;
}
#bpProjects .bp-project-delete:hover,
.bp-danger:hover {
  background: #502332;
  border-color: #bf6e7e;
}
.bp-settings.bp-delete-dialog {
  max-width: 480px;
}
.bp-delete-dialog strong {
  overflow-wrap: anywhere;
}
.bp-home .bp-projects-empty {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
}
.bp-home-footer {
  padding-top: 14px;
  margin-top: auto;
  flex-shrink: 0;
}
.bp-home-footer p {
  margin: 5px 0 0;
  font-size: 13px;
  line-height: 1.4;
}
.bp-home-footer #bpSaveStatus {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.bp-home-footer #bpSaveStatus:empty {
  display: none;
}
.bp-primary {
  background: #155b78;
  color: #e6f8ff;
}
.bp-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid #293b50;
  flex-wrap: wrap;
}
.bp-toolbar h1 {
  margin-right: auto;
}
.bp-toolbar small {
  font-size: 13px;
  color: #8ca7be;
}
.bp-toolbar #bpSaveStatus {
  font-size: 12px;
  color: #a5c6b8;
  max-width: 300px;
}
.bp-columns {
  display: grid;
  grid-template-columns: 240px minmax(360px, 1fr) 330px;
  min-height: calc(100vh - 135px);
}
.bp-tree,
.bp-selector,
.bp-draft {
  padding: 14px;
  min-width: 0;
}
.bp-tree {
  background: #0b1624;
  border-right: 1px solid #26394e;
}
.bp-draft {
  display: block;
  background: transparent;
  overflow: visible;
}
.bp-selector {
  border-left: 1px solid #26394e;
}
#bpTree {
  max-height: 45vh;
  overflow: auto;
  margin: 10px 0;
}
.bp-tree-row {
  display: flex;
  gap: 2px;
}
.bp-tree-row > button:first-child {
  flex: 1;
  min-width: 0;
  text-align: left;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 7px 6px;
}
.bp-tree-row > button.active {
  border-color: #3ec4ed;
  background: #164057;
  color: #dcf6ff;
}
.bp-tree textarea {
  height: 80px;
}
.bp-tree > button {
  margin-top: 8px;
}
.bp-turn {
  background: #13354b;
  border: 1px solid #2c657d;
  padding: 14px;
  border-radius: 8px;
  color: #bef0ff;
  font-size: 16px;
}
.bp-team {
  padding: 10px 0;
}
.bp-team h2.blue {
  color: #58c8ee;
}
.bp-team h2.red {
  color: #ff8292;
}
.bp-slots {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}
.bp-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  background: #101f30;
  border: 1px solid #2c4156;
  border-radius: 8px;
  padding: 8px 3px;
  font-size: 11px;
  min-height: 120px;
}
.bp-player {
  display: flex;
  align-items: center;
  flex-direction: column;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  gap: 4px;
}
.bp-player b {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 11px;
}
.bp-player small {
  font-size: 10px;
  color: #7d9bb5;
}
.bp-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  background: #24435a;
  border-radius: 50%;
  color: #d5ecfc;
}
.bp-portrait {
  display: inline-block;
  flex-shrink: 0;
  background-repeat: no-repeat;
  border-radius: 5px;
  vertical-align: middle;
  image-rendering: auto;
}
.bp-bans,
.bp-history {
  display: flex;
  gap: 7px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 10px;
  font-size: 11px;
  color: #9aaabd;
}
.bp-history h2 {
  width: 100%;
}
.bp-picked {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}
.bp-pick {
  display: grid;
  grid-template-columns: 32px auto;
  align-items: center;
  background: #112337;
  padding: 5px;
  border-radius: 5px;
  gap: 4px;
}
.bp-pick select {
  grid-column: 1/-1;
  font-size: 11px;
  padding: 4px;
}
.bp-slot-empty {
  color: #58748e;
  margin-top: 10px;
}
.bp-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  margin-top: 10px;
  max-height: calc(100vh - 275px);
  overflow: auto;
}
.bp-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 6px 2px;
  gap: 4px;
  background: #142437;
  border: 1px solid #2b465c;
  min-height: 75px;
}
.bp-hero span:not(.bp-portrait) {
  font-size: 11px;
}
.bp-hero small {
  font-size: 9px;
  color: #b2b6be;
}
.bp-hero.unavailable {
  filter: grayscale(1);
  opacity: 0.42;
}
.bp-selector > input {
  margin-bottom: 6px;
}
.bp-pool-panel {
  margin-top: 16px;
  border: 1px solid #2d4d65;
  padding: 12px;
  border-radius: 8px;
}
.bp-pool-panel:empty {
  display: none;
}
#bpNextGame {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px;
  border: 1px solid #36556b;
  margin-top: 18px;
}
#bpNextGame h2 {
  width: 100%;
}
.bp-tabs {
  display: none;
}
.bp-tabs button {
  flex: 1;
}
@media (max-width: 1150px) {
  .bp-columns {
    grid-template-columns: 190px minmax(330px, 1fr) 260px;
  }
  .bp-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 850px) {
  .bp-tabs {
    display: flex;
    padding: 8px;
    gap: 8px;
  }
  .bp-columns {
    display: block;
  }
  .bp-columns > .bp-tree,
  .bp-columns > .bp-draft,
  .bp-columns > .bp-selector {
    display: none;
  }
  .bp-columns[data-panel="tree"] > .bp-tree,
  .bp-columns[data-panel="draft"] > .bp-draft,
  .bp-columns[data-panel="heroes"] > .bp-selector {
    display: block;
  }
  .bp-grid {
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    max-height: none;
  }
  #bpTree {
    max-height: 60vh;
  }
  .bp-toolbar {
    padding: 10px;
  }
  .bp-home {
    --home-pad: 16px;
    --home-gap: 10px;
    width: calc(100% - 32px);
    max-width: 600px;
    margin: 16px auto;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(140px, 1fr);
    gap: 12px;
  }
  .bp-home-header .bp-kicker {
    display: none;
  }
  .bp-home-header {
    margin-bottom: 12px;
  }
  .bp-home h1 {
    font-size: 26px;
  }
  .bp-home-header p {
    margin-top: 4px;
    font-size: 14px;
  }
  .bp-home label,
  .bp-create-field legend {
    font-size: 14px;
  }
  .bp-create-field legend {
    margin-bottom: 5px;
  }
  .bp-home .bp-choice {
    min-height: 46px;
    padding: 8px 10px;
  }
  .bp-home .bp-choice strong {
    font-size: 16px;
  }
  .bp-home .bp-choice small {
    display: none;
  }
  .bp-home #bpName {
    min-height: 38px;
    padding: 8px 10px;
  }
  .bp-home .bp-create-submit {
    min-height: 42px;
    margin-top: 0;
  }
  .bp-home-footer {
    padding-top: 10px;
  }
  .bp-home-footer p {
    font-size: 12px;
  }
  .bp-home-library-heading h2 {
    font-size: 18px;
  }
  .bp-home .bp-library-hint {
    margin-top: 8px;
    font-size: 13px;
  }
  .bp-home form {
    grid-template-columns: 1fr;
  }
  .bp-slots {
    gap: 3px;
  }
  .bp-slot {
    min-height: 105px;
  }
  .bp-player b {
    font-size: 10px;
  }
}

@media (max-height: 800px) and (min-width: 851px) {
  .bp-home {
    --home-pad: 16px;
    --home-gap: 10px;
  }
  .bp-home-header {
    margin-bottom: 14px;
  }
  .bp-home-header .bp-kicker {
    margin-bottom: 6px;
  }
  .bp-home-header p {
    margin-top: 6px;
  }
  .bp-home label,
  .bp-create-field legend {
    font-size: 15px;
  }
  .bp-create-field legend {
    margin-bottom: 6px;
  }
  .bp-home .bp-choice {
    min-height: 54px;
    padding: 8px 12px;
  }
  .bp-home .bp-choice strong {
    font-size: 17px;
  }
  .bp-home #bpName {
    min-height: 40px;
    padding: 8px 12px;
  }
  .bp-home .bp-create-submit {
    min-height: 42px;
    margin-top: 0;
  }
  .bp-home-footer {
    padding-top: 8px;
  }
}
@media (max-height: 780px) and (max-width: 850px) {
  .bp-home {
    --home-pad: 12px;
    --home-gap: 6px;
  }
  .bp-home .bp-choice {
    min-height: 40px;
    padding: 8px 10px;
  }
  .bp-home .bp-choice small {
    display: none;
  }
  .bp-home h1 {
    font-size: 24px;
  }
  .bp-home-header {
    margin-bottom: 8px;
  }
  .bp-home-header p {
    display: none;
  }
  .bp-home #bpName {
    min-height: 36px;
    padding: 6px 10px;
  }
  .bp-home .bp-create-submit {
    min-height: 40px;
  }
  .bp-home .bp-library-hint {
    display: none;
  }
}
@media (max-height: 700px) and (min-width: 851px) {
  .bp-home {
    --home-pad: 10px;
    --home-gap: 6px;
  }
  .bp-home-header {
    margin-bottom: 8px;
  }
  .bp-home-header p {
    margin-top: 4px;
  }
  .bp-home-footer {
    padding-top: 4px;
  }
  .bp-home-header .bp-kicker,
  .bp-home .bp-choice small {
    display: none;
  }
  .bp-home .bp-choice {
    min-height: 44px;
  }
  .bp-home h1 {
    font-size: 24px;
  }
}

#bpBoard.bp-board {
  width: 100%;
  padding: 0;
  justify-items: stretch;
  align-items: stretch;
}
.bp-workspace {
  width: 100%;
}
.bp-draft {
  height: auto;
  min-height: 0;
}
.bp-settings {
  max-width: 780px;
  width: 95vw;
}
.bp-settings form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.bp-settings h2,
.bp-settings p,
#bpCustomLanes {
  grid-column: 1/-1;
}
#bpCustomLanes {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.bp-settings input[type="checkbox"] {
  width: auto;
}
.bp-settings select[multiple] {
  height: 120px;
}
.bp-pool-heroes {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.bp-pool-heroes > span {
  display: grid;
  gap: 3px;
  justify-items: center;
  font-size: 11px;
}
.bp-pool-heroes small {
  font-size: 9px;
}
.bp-pool-heroes .unavailable {
  filter: grayscale(1);
  opacity: 0.45;
}
@media (max-width: 650px) {
  .bp-settings form {
    grid-template-columns: 1fr;
  }
  .bp-settings h2,
  .bp-settings p,
  #bpCustomLanes {
    grid-column: auto;
  }
}

/* Modal chrome stays visible; only the content scrolls. */
.bp-settings.bp-modal {
  padding: 0;
  max-height: min(86dvh, 800px);
  max-height: min(86vh, 800px);
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 24px 80px #0009;
}
.bp-settings.bp-modal[open] {
  display: flex;
  flex-direction: column;
}
.bp-settings.bp-modal form {
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 100%;
  gap: 0;
  overflow: hidden;
}
.bp-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  background: #12263a;
  border-bottom: 1px solid #34516b;
  flex-shrink: 0;
}
.bp-settings .bp-modal-header h2 {
  margin: 0;
  font-size: 18px;
}
.bp-modal-close {
  flex-shrink: 0;
  min-height: 40px;
  min-width: 76px;
  color: #e9f3fb;
}
.bp-modal-body {
  overflow: auto;
  overscroll-behavior: contain;
  min-height: 0;
  padding: 18px 20px;
  flex: 1;
}
.bp-modal-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 20px;
  background: #12263a;
  border-top: 1px solid #34516b;
  flex-shrink: 0;
}
.bp-modal-footer [role="alert"] {
  width: 100%;
  margin: 0;
  color: #ffacb6;
}
.bp-modal-footer [role="alert"]:empty {
  display: none;
}
.bp-modal-footer button {
  min-height: 42px;
}
.bp-settings-context {
  margin-bottom: 12px;
}
.bp-settings-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}
.bp-settings-tabs button {
  flex: 1;
  min-height: 42px;
}
.bp-settings-tabs button[aria-selected="true"] {
  color: #d7f5ff;
  background: #16445a;
  border-color: #4d9ebb;
}
.bp-settings-hint {
  font-size: 12px;
  color: #9ab0c4;
  margin: 8px 0 16px;
}
.bp-settings-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.bp-settings-panel[hidden] {
  display: none;
}
.bp-settings-panel > details,
.bp-settings-panel > div,
.bp-settings-panel > p {
  grid-column: 1/-1;
}
.bp-settings-panel label {
  min-width: 0;
}
.bp-settings-panel summary {
  cursor: pointer;
  color: #c5deee;
  padding: 8px 0;
}
.bp-settings-panel details > label {
  margin-top: 8px;
}
.bp-settings-panel input[type="checkbox"] {
  width: auto;
}
.bp-modal-body > label,
.bp-modal-body > p {
  margin-bottom: 12px;
}
@media (max-width: 650px) {
  .bp-settings.bp-modal {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 24px);
    max-height: calc(100vh - 24px);
  }
  .bp-modal-header {
    padding: 12px;
  }
  .bp-settings .bp-modal-header h2 {
    font-size: 16px;
  }
  .bp-modal-body {
    padding: 14px 12px;
  }
  .bp-modal-footer {
    padding: 10px 12px;
  }
  .bp-settings-panel {
    grid-template-columns: 1fr;
  }
  .bp-settings-panel > details,
  .bp-settings-panel > div,
  .bp-settings-panel > p {
    grid-column: auto;
  }
  .bp-settings-tabs button {
    padding: 8px 4px;
    font-size: 12px;
  }
}

.bp-phase-guide {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
}
.bp-phase-guide > span {
  padding: 9px 7px;
  border: 1px solid #2b4054;
  border-radius: 5px;
  font-size: 11px;
  color: #91a4b7;
}
.bp-phase-guide small {
  display: block;
  color: #b5c8da;
  margin-bottom: 3px;
}
.bp-phase-guide .current {
  background: #164157;
  border-color: #4aa4c5;
  color: #ddf7ff;
}
.bp-turn-note {
  font-size: 12px;
  color: #a5bfd2;
  margin: 9px 0;
}
.bp-draft-locked {
  grid-column: 1/-1;
  padding: 16px;
  background: #152c3a;
  border: 1px solid #3c6275;
  border-radius: 7px;
  line-height: 1.8;
  color: #d8ebf5;
}
.bp-draft-locked p {
  font-size: 12px;
}
.bp-pick-count {
  display: block;
  width: 100%;
  font-size: 12px;
  color: #b7d8e7;
}
.bp-next-game > p {
  width: 100%;
  margin: 0;
  font-size: 12px;
  color: #b4c7d8;
}
.bp-next-game {
  background: #112735;
}
#bpRuleWarning {
  border: 1px solid #caa258;
  padding: 12px;
  color: #eecb85;
  font-size: 12px;
}

/* Keep the BP workspace inside the viewport; each long list owns its scroll. */
#bpBoard.bp-board {
  height: calc(100vh - var(--director-header));
  height: calc(100dvh - var(--director-header));
  overflow: hidden;
}
.bp-workspace {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}
.bp-toolbar,
.bp-tabs {
  flex-shrink: 0;
}
.bp-toolbar {
  gap: 8px;
  padding: 10px 14px;
}
.bp-toolbar h1 {
  min-width: 0;
  max-width: 280px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.bp-toolbar button {
  min-height: 38px;
}
.bp-columns {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  grid-template-columns: 210px minmax(0, 1fr) 300px;
}
.bp-tree,
.bp-selector,
.bp-draft {
  min-height: 0;
  padding: 12px;
}
.bp-tree,
.bp-selector {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
}
.bp-tree > h2,
.bp-selector > h2 {
  margin: 0 0 4px;
  flex-shrink: 0;
}
.bp-tree > label,
.bp-tree > button,
.bp-tree > select,
.bp-selector > input,
.bp-selector > select {
  flex-shrink: 0;
}
.bp-tree textarea {
  height: 60px;
  resize: none;
}
.bp-tree > button {
  margin: 0;
  min-height: 36px;
}
#bpTree {
  flex: 1;
  min-height: 36px;
  max-height: none;
  margin: 0;
  overflow: auto;
  overscroll-behavior: contain;
}
.bp-grid {
  flex: 1;
  min-height: 0;
  max-height: none;
  margin: 0;
  align-content: start;
  overflow: auto;
  overscroll-behavior: contain;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.bp-selector > input {
  margin: 0;
}
.bp-selector > input,
.bp-selector > select {
  min-height: 40px;
}
.bp-hero {
  min-width: 0;
  overflow: hidden;
}
.bp-search-empty {
  grid-column: 1 / -1;
  padding: 12px;
  font-size: 13px;
  line-height: 1.6;
  color: #a5bfd2;
}
.bp-hero span.bp-hero-name {
  display: block;
  width: 100%;
  min-width: 0;
  white-space: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  touch-action: auto;
  font-size: 12px;
  height: 18px;
  line-height: 18px;
}
.bp-hero-name::-webkit-scrollbar {
  display: none;
}
.bp-hero span.bp-hero-name-text {
  display: inline-block;
  white-space: nowrap;
  font-size: inherit;
  line-height: 18px;
  vertical-align: top;
}
.bp-hero small {
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@keyframes bp-name-reveal {
  0%,
  15% {
    transform: translateX(0);
  }
  85%,
  100% {
    transform: translateX(var(--name-shift));
  }
}
@media (hover: hover) {
  .bp-hero:hover .bp-hero-name.is-overflowing .bp-hero-name-text {
    animation: bp-name-reveal var(--name-time) linear infinite alternate;
  }
}
.bp-hero:focus-visible .bp-hero-name.is-overflowing .bp-hero-name-text {
  animation: bp-name-reveal var(--name-time) linear infinite alternate;
}
.bp-draft {
  position: relative;
  display: flex;
  overflow: hidden;
}
.bp-draft-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}
.bp-draft-content > * {
  flex-shrink: 0;
}
.bp-turn {
  padding: 10px;
  font-size: 15px;
}
.bp-phase-guide {
  margin: 0;
}
.bp-phase-guide > span {
  padding: 6px;
}
.bp-turn-note {
  margin: 0;
}
.bp-team {
  padding: 4px 0;
}
.bp-team h2 {
  margin: 0 0 6px;
}
.bp-slot {
  padding: 6px;
  min-height: 64px;
  gap: 4px;
}
.bp-player {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 2px 4px;
  text-align: left;
}
.bp-player .bp-avatar {
  grid-row: 1 / 3;
  width: 24px;
  height: 24px;
}
.bp-player b,
.bp-player small {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bp-player b {
  font-size: 11px;
}
.bp-slot-empty {
  margin: 0;
  font-size: 10px;
}
.bp-slot-champion {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 4px;
}
.bp-slot-champion > span:last-child,
.bp-pick-name {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bp-bans {
  min-height: 26px;
  margin-top: 5px;
}
.bp-picked {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  margin-top: 5px;
}
.bp-pick-count {
  grid-column: 1 / -1;
}
.bp-pick {
  min-width: 0;
  grid-template-columns: 24px minmax(0, 1fr);
  padding: 4px;
}
.bp-pick select {
  min-height: 28px;
}
.bp-history {
  display: block;
  margin: 0;
  max-height: min(24vh, 200px);
  overflow: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
  font-size: 13px;
}
.bp-history h2 {
  margin: 0 0 6px;
}
.bp-history-icons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.bp-history-bans {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #294357;
}
.bp-history-game + .bp-history-game {
  margin-top: 8px;
}
.bp-history-game h3 {
  margin: 0 0 5px;
  font-size: 13px;
}
.bp-history-ban-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-top: 5px;
}
.bp-history-team {
  width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bp-draft-content > .bp-history {
  flex-shrink: 1;
  min-height: 24px;
}
.bp-pool-panel:not(:empty) {
  position: absolute;
  z-index: 8;
  bottom: 12px;
  left: 12px;
  right: 12px;
  max-height: min(45%, 300px);
  margin: 0;
  background: #142b3e;
  box-shadow: 0 8px 30px #0008;
  overflow: auto;
  overscroll-behavior: contain;
}
.bp-pool-panel h2 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  position: sticky;
  top: 0;
  background: #142b3e;
}
.bp-next-details {
  position: relative;
}
.bp-next-details > summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px;
  min-height: 42px;
  border: 1px solid #3c6275;
  border-radius: 6px;
  background: #123448;
  color: #d5effa;
  cursor: pointer;
  list-style: none;
}
.bp-next-details > summary::-webkit-details-marker {
  display: none;
}
.bp-next-details > summary > span::after {
  content: "展开";
}
.bp-next-details[open] > summary > span::after {
  content: "收起";
}
.bp-next-details #bpNextGame {
  position: absolute;
  z-index: 9;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  margin: 0;
  max-height: min(360px, calc(100dvh - 300px));
  overflow: auto;
  overscroll-behavior: contain;
  box-shadow: 0 12px 30px #0009;
}
.bp-workspace[data-complete="true"] .bp-phase-guide,
.bp-workspace[data-complete="true"] #bpTurnHint {
  display: none;
}
.bp-tabs button[aria-pressed="true"] {
  color: #d7f5ff;
  border-color: #4fbbdc;
  background: #123448;
}
@media (max-width: 1150px) {
  .bp-columns {
    grid-template-columns: 180px minmax(0, 1fr) 248px;
  }
  .bp-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 850px) {
  .bp-columns {
    display: block;
  }
  .bp-columns > .bp-tree,
  .bp-columns > .bp-draft,
  .bp-columns > .bp-selector {
    height: 100%;
  }
  .bp-columns[data-panel="tree"] > .bp-tree,
  .bp-columns[data-panel="draft"] > .bp-draft,
  .bp-columns[data-panel="heroes"] > .bp-selector {
    display: flex;
  }
  .bp-grid {
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  }
  .bp-toolbar {
    padding: 8px;
    gap: 6px;
  }
  .bp-toolbar h1 {
    font-size: 18px;
    max-width: 230px;
  }
  .bp-toolbar button {
    padding: 8px;
    font-size: 12px;
  }
  .bp-tabs button {
    min-height: 42px;
  }
}
@media (max-height: 900px) {
  .bp-slot-empty {
    display: none;
  }
  .bp-slot {
    min-height: 48px;
  }
  .bp-turn {
    padding: 8px;
    font-size: 14px;
  }
  .bp-phase-guide > span {
    padding: 4px;
    font-size: 10px;
  }
  .bp-phase-guide small {
    font-size: 9px;
  }
}
@media (pointer: coarse) {
  .bp-toolbar button,
  .bp-tabs button,
  .bp-player,
  .bp-next-details > summary,
  #bpPool button {
    min-height: 44px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .bp-hero .bp-hero-name-text {
    animation: none !important;
  }
}
@media (max-height: 700px) and (min-width: 851px) {
  .bp-workspace .bp-draft {
    padding: 8px;
  }
  .bp-workspace .bp-draft-content {
    gap: 3px;
  }
  .bp-workspace .bp-turn {
    padding: 6px 8px;
    font-size: 13px;
    line-height: 18px;
  }
  .bp-workspace .bp-next-details > summary {
    min-height: 34px;
    padding: 6px 8px;
    line-height: 18px;
    font-size: 13px;
  }
  .bp-workspace .bp-slot {
    min-height: 30px;
    padding: 3px;
  }
  .bp-workspace .bp-player {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .bp-workspace .bp-player .bp-avatar {
    display: none;
  }
  .bp-workspace .bp-player b {
    font-size: 10px;
    line-height: 13px;
  }
  .bp-workspace .bp-player small {
    font-size: 9px;
    line-height: 12px;
  }
  .bp-workspace .bp-team h2 {
    margin-bottom: 2px;
    font-size: 13px;
    line-height: 18px;
  }
  .bp-workspace .bp-team {
    padding: 0;
  }
}
@media (max-width: 650px) {
  .bp-phase-guide {
    grid-template-columns: 1fr 1fr;
  }
  .bp-turn {
    font-size: 14px;
  }
}

/* Draft workspace: player pools above a full-width champion tray. */
.bp-columns {
  grid-template-columns: 190px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) clamp(180px, 30vh, 310px);
}
.bp-columns > .bp-tree {
  grid-column: 1;
  grid-row: 1 / -1;
}
.bp-columns > .bp-draft {
  grid-column: 2;
  grid-row: 1;
}
.bp-columns > .bp-selector {
  grid-column: 2;
  grid-row: 2;
  border-left: 0;
  border-top: 1px solid #294357;
  padding: 10px 12px;
}
.bp-selector-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.bp-selector-tools h2 {
  margin: 0 auto 0 0;
  white-space: nowrap;
}
.bp-selector-tools input {
  width: min(330px, 40%);
  margin: 0;
}
.bp-selector-tools select {
  width: 145px;
  margin: 0;
}
.bp-selector-tools input,
.bp-selector-tools select {
  min-height: 38px;
}
.bp-grid {
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: 6px;
}
.bp-hero {
  padding: 5px;
  height: 70px;
  position: relative;
}
.bp-hero.unavailable small {
  display: none;
}
.bp-team-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 5px;
  min-height: 24px;
}
.bp-team-heading h2 {
  white-space: nowrap;
  flex-shrink: 0;
}
.bp-team-heading h2,
.bp-team-heading .bp-bans {
  margin: 0;
}
.bp-team-heading .bp-bans {
  flex-wrap: nowrap;
  min-height: 22px;
  gap: 4px;
}
.bp-team-heading .bp-pick-count {
  width: auto;
  flex-shrink: 0;
  margin-left: auto;
  font-size: 12px;
  white-space: nowrap;
}
.bp-slot {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 0;
  padding: 6px;
  gap: 4px;
}
.bp-player-id {
  display: flex;
  align-items: center;
  gap: 4px;
}
.bp-player-id input {
  min-width: 0;
  width: 100%;
  height: 28px;
  min-height: 28px;
  padding: 3px 5px;
  margin: 0;
  font-size: 14px;
  background: transparent;
  border-color: transparent;
}
.bp-player-id input:hover,
.bp-player-id input:focus {
  border-color: #4fbbdc;
  background: #0a1928;
}
.bp-player-id small {
  color: #91b1c7;
  font-size: 10px;
}
.bp-player-pool {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 30px;
  max-height: 64px;
  overflow: auto;
  overscroll-behavior: contain;
}
.bp-player-pool button {
  margin: 0;
  padding: 0;
  border-radius: 5px;
  width: 30px;
  height: 30px;
  min-height: 30px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bp-pool-icon {
  background: transparent;
  border-color: transparent;
  transition:
    filter 250ms ease,
    opacity 250ms ease;
}
.bp-pool-icon.unavailable {
  filter: grayscale(1) brightness(0.3);
  opacity: 0.65;
}
.bp-player-pool .bp-pool-add {
  color: #89c9e4;
  background: #132d41;
  border: 1px dashed #3c677f;
  font-size: 23px;
}
.bp-player-pool button:focus-visible {
  outline: 2px solid #58c8ee;
  outline-offset: -2px;
}
.bp-picked:empty {
  display: none;
}
.bp-picked {
  margin-top: 5px;
}
.bp-history {
  max-height: 110px;
  border-top: 1px solid #243a4c;
  padding-top: 5px;
}
.bp-history h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  line-height: 18px;
  margin-bottom: 5px;
  white-space: nowrap;
}
.bp-history h2 small {
  display: inline;
  letter-spacing: normal;
  line-height: 18px;
  margin: 0;
  color: #8aa7bc;
  font-size: 11px;
  font-weight: normal;
}
.bp-history-game {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.bp-history-game > b {
  font-size: 12px;
  width: 24px;
  flex-shrink: 0;
}
.bp-history-timeline {
  display: grid;
  grid-template-columns: repeat(20, 28px);
  gap: 4px;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior: contain;
}
.bp-history-action {
  position: relative;
  border-bottom: 2px solid #58c8ee;
  width: 28px;
  height: 30px;
  text-align: center;
}
.bp-history-action.red {
  border-color: #ff8292;
}
.bp-history-action.ban .bp-portrait {
  filter: grayscale(0.8) brightness(0.7);
}
.bp-history-action small {
  position: absolute;
  right: 0;
  bottom: 1px;
  font-size: 8px;
  line-height: 10px;
  padding: 0 2px;
  border-radius: 2px;
  background: #07131eed;
  color: #e0eff9;
}
.bp-draft-content > .bp-history {
  min-height: 56px;
}
@media (min-width: 1000px) {
  .bp-tabs {
    display: none;
  }
  .bp-columns > .bp-tree,
  .bp-columns > .bp-selector {
    display: flex;
    height: auto;
  }
  .bp-columns > .bp-draft {
    display: flex;
    height: auto;
  }
}
@media (max-width: 999px) {
  .bp-tabs {
    display: flex;
  }
  .bp-columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }
  .bp-columns > .bp-tree,
  .bp-columns > .bp-draft,
  .bp-columns > .bp-selector {
    grid-column: 1;
    height: auto;
  }
  .bp-columns > .bp-tree,
  .bp-columns > .bp-draft {
    grid-row: 1;
    display: none;
  }
  .bp-columns > .bp-selector {
    display: flex;
  }
  .bp-columns[data-panel="draft"] > .bp-draft,
  .bp-columns[data-panel="tree"] > .bp-tree {
    display: flex;
  }
  .bp-columns[data-panel="heroes"] > .bp-selector {
    grid-row: 1 / -1;
  }
  .bp-columns[data-panel="heroes"] > .bp-tree,
  .bp-columns[data-panel="heroes"] > .bp-draft {
    display: none;
  }
}
@media (max-height: 900px) {
  .bp-draft-content {
    gap: 5px;
  }
  .bp-player-pool {
    max-height: 30px;
  }
  .bp-team {
    padding: 2px 0;
  }
  .bp-slot {
    padding: 3px 5px;
    gap: 1px;
  }
  .bp-team h2 {
    font-size: 14px;
  }
  .bp-turn-note {
    font-size: 11px;
  }
}
@media (min-width: 651px) {
  .bp-workspace[data-complete="true"] .bp-columns {
    grid-template-rows: minmax(0, 1fr) 130px;
  }
}
@media (max-height: 700px) and (min-width: 651px) {
  .bp-columns {
    grid-template-rows: minmax(0, 1fr) 150px;
  }
  .bp-workspace .bp-draft {
    padding: 6px 8px;
  }
  .bp-draft-content {
    gap: 3px;
  }
  .bp-team-heading {
    min-height: 20px;
    margin-bottom: 2px;
  }
  .bp-workspace .bp-team h2 {
    margin: 0;
  }
  .bp-workspace .bp-slot {
    padding: 2px 4px;
  }
  .bp-player-id input {
    height: 23px;
    min-height: 23px;
    font-size: 12px;
  }
  .bp-player-pool {
    min-height: 24px;
    max-height: 24px;
    gap: 3px;
  }
  .bp-player-pool button {
    width: 24px;
    height: 24px;
    min-height: 24px;
  }
  .bp-pool-icon .bp-portrait {
    transform: scale(0.8);
  }
  .bp-picked {
    margin-top: 3px;
  }
  .bp-pick {
    padding: 2px;
  }
  .bp-pick select {
    min-height: 24px;
    height: 24px;
    padding: 2px;
  }
  .bp-slot-champion {
    display: none;
  }
  .bp-selector-tools input,
  .bp-selector-tools select {
    min-height: 30px;
    height: 30px;
  }
  .bp-workspace[data-complete="true"] .bp-columns {
    grid-template-rows: minmax(0, 1fr) 100px;
  }
  .bp-workspace[data-complete="true"] .bp-history {
    min-height: 56px;
  }
  .bp-workspace .bp-phase-guide {
    display: none;
  }
  .bp-picked .bp-pick {
    grid-template-columns: 24px minmax(0, 1fr);
    grid-template-rows: 24px;
    gap: 3px;
  }
  .bp-picked .bp-pick-name {
    display: none;
  }
  .bp-picked .bp-pick select {
    grid-column: 2;
    grid-row: 1;
  }
}
@media (max-width: 650px) {
  .bp-columns > .bp-selector {
    display: none;
  }
  .bp-columns[data-panel="draft"] > .bp-draft,
  .bp-columns[data-panel="tree"] > .bp-tree {
    grid-row: 1 / -1;
  }
  .bp-columns[data-panel="heroes"] > .bp-selector {
    display: flex;
  }
  .bp-selector-tools {
    flex-wrap: wrap;
    gap: 6px;
  }
  .bp-selector-tools h2 {
    width: 100%;
  }
  .bp-selector-tools input {
    flex: 1;
    width: 50%;
  }
  .bp-selector-tools select {
    width: 120px;
  }
  .bp-slots {
    grid-template-columns: repeat(5, minmax(108px, 1fr));
    overflow-x: auto;
  }
  .bp-team-heading {
    flex-wrap: wrap;
    gap: 4px 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .bp-pool-icon {
    transition: none;
  }
}

/* A fixed player context and one synchronized membership editor. */
.bp-pool-dialog.bp-settings.bp-modal {
  width: min(880px, calc(100vw - 24px));
  height: min(88dvh, 820px);
  max-height: min(88dvh, 820px);
}
.bp-pool-dialog .bp-modal-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
}
.bp-pool-context {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
  padding-bottom: 12px;
  border-bottom: 1px solid #294357;
}
.bp-pool-context > b {
  color: #a7d9ee;
  font-size: 14px;
}
.bp-pool-context > label {
  width: min(280px, 60%);
}
.bp-pool-editor {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
  min-height: 0;
  flex: 1;
}
.bp-pool-editor > label,
.bp-pool-editor > p,
.bp-pool-selected-heading,
.bp-pool-selected {
  flex-shrink: 0;
}
.bp-pool-editor #bpPoolText {
  min-height: 58px;
  height: 58px;
  resize: vertical;
  margin: 0;
  font-size: 14px;
}
.bp-pool-editor input {
  margin: 0;
  min-height: 40px;
}
.bp-pool-input-hint {
  color: #91afc3;
  font-size: 12px;
  margin: 0;
}
#bpPoolError {
  color: #ffacb6;
  font-size: 12px;
  margin: 0;
}
#bpPoolError:empty {
  display: none;
}
.bp-pool-selected-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: #d6eaf5;
}
.bp-pool-selected-heading small {
  margin-left: auto;
  color: #8ba9be;
  font-size: 12px;
}
.bp-pool-selected {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  min-height: 48px;
  max-height: 102px;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 2px;
}
.bp-pool-selected button,
.bp-pool-catalog button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  min-width: 48px;
  padding: 3px;
  margin: 0;
  border-radius: 6px;
  background: #102538;
  border: 1px solid #30536d;
}
.bp-pool-selected button {
  width: 48px;
  flex-shrink: 0;
}
.bp-pool-selected button small,
.bp-pool-catalog button small {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 15px;
  height: 15px;
  line-height: 15px;
  border-radius: 4px 0 4px 0;
  background: #2585a4;
  color: white;
  font-size: 12px;
}
.bp-pool-selected button small {
  background: #963f4b;
}
.bp-pool-catalog {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
  align-content: start;
  gap: 7px;
  min-height: 110px;
  max-height: 260px;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 3px;
}
.bp-pool-dialog .bp-pool-catalog {
  flex: 1;
  max-height: none;
}
.bp-pool-dialog .bp-pool-editor #bpPoolText {
  resize: none;
}
.bp-pool-catalog button.selected {
  border-color: #58d6f7;
  background: #16475b;
  box-shadow: inset 0 0 0 1px #58d6f7;
}
.bp-pool-selected button:focus-visible,
.bp-pool-catalog button:focus-visible {
  outline: 2px solid #8ee4ff;
  outline-offset: -2px;
}
.bp-pool-empty {
  font-size: 12px;
  color: #8daabd;
  grid-column: 1 / -1;
}
.bp-settings select:not([multiple]) {
  appearance: none;
  padding-right: 42px;
  background-image:
    linear-gradient(45deg, transparent 50%, #a7c5d8 50%),
    linear-gradient(135deg, #a7c5d8 50%, transparent 50%);
  background-position:
    calc(100% - 20px) 50%,
    calc(100% - 15px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
@media (max-height: 700px) {
  .bp-pool-dialog .bp-modal-header,
  .bp-pool-dialog .bp-modal-footer {
    padding: 8px 14px;
  }
  .bp-pool-dialog .bp-pool-editor input {
    min-height: 34px;
    height: 34px;
  }
  .bp-pool-dialog .bp-modal-body {
    gap: 8px;
    padding: 10px 14px;
  }
  .bp-pool-dialog .bp-pool-editor {
    gap: 6px;
  }
  .bp-pool-dialog .bp-pool-input-hint {
    display: none;
  }
  .bp-pool-dialog .bp-pool-context {
    padding-bottom: 6px;
  }
  .bp-pool-dialog .bp-pool-context input {
    height: 30px;
    padding: 4px 8px;
  }
  .bp-pool-dialog .bp-pool-editor #bpPoolText {
    height: 44px;
    min-height: 44px;
    resize: none;
  }
  .bp-pool-dialog .bp-pool-selected {
    max-height: 52px;
  }
  .bp-pool-dialog .bp-pool-catalog {
    min-height: 80px;
  }
}
@media (max-width: 500px) {
  .bp-pool-context {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  .bp-pool-context > label {
    width: 100%;
  }
}

.bp-pool-input-group {
  display: grid;
  gap: 5px;
  flex-shrink: 0;
  min-width: 0;
}
.bp-pool-token-field {
  position: relative;
}
.bp-pool-tokenbox {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 7px;
  min-height: 54px;
  max-height: 110px;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #30536d;
  border-radius: 7px;
  background: #091a29;
  cursor: text;
}
.bp-pool-tokenbox:focus-within {
  border-color: #72d0ef;
  box-shadow: 0 0 0 1px #72d0ef;
}
#bpPoolTokens {
  display: contents;
}
.bp-pool-token {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 32px;
  padding-left: 9px;
  max-width: 100%;
  border: 1px solid #38637d;
  border-radius: 5px;
  background: #173c51;
  color: #e4f4fc;
  font-size: 14px;
  white-space: nowrap;
}
.bp-pool-token > span {
  overflow: hidden;
  text-overflow: ellipsis;
}
.bp-pool-token button {
  flex-shrink: 0;
  min-width: 30px;
  min-height: 30px;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  color: #a9cfdf;
  font-size: 19px;
}
.bp-pool-editor .bp-pool-tokenbox #bpPoolText,
.bp-pool-dialog .bp-pool-editor .bp-pool-tokenbox #bpPoolText {
  flex: 1 0 145px;
  width: auto;
  min-width: 100px;
  max-width: 100%;
  height: 32px;
  min-height: 32px;
  padding: 5px;
  border: 0;
  outline: none;
  box-shadow: none;
  background: transparent;
  resize: none;
}
#bpPoolSuggestions {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  z-index: 20;
  max-height: min(245px, 34dvh);
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #39637d;
  border-radius: 7px;
  background: #102b3d;
  box-shadow: 0 8px 24px #0009;
}
#bpPoolSuggestions[hidden] {
  display: none;
}
.bp-pool-suggestion-count {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 7px 12px;
  background: #102b3d;
  color: #9bbdce;
  font-size: 12px;
}
#bpPoolSuggestions button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 6px 12px;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: left;
}
#bpPoolSuggestions button[aria-selected="true"],
#bpPoolSuggestions button:hover,
#bpPoolSuggestions button:focus-visible {
  background: #23516a;
}
#bpPoolSuggestions button > span:not(.bp-portrait) {
  display: grid;
  gap: 2px;
}
#bpPoolSuggestions b {
  font-size: 14px;
}
#bpPoolSuggestions small {
  font-size: 11px;
  color: #9fbfce;
}
#bpPoolSuggestions button > small {
  margin-left: auto;
}
@media (max-height: 700px) {
  .bp-pool-tokenbox {
    min-height: 44px;
    max-height: 80px;
    padding: 4px;
  }
}

/* Compact match status, opposing five-player columns, and five visible hero rows. */
.bp-workspace {
  --bp-hero-row: 56px;
  --bp-hero-gap: 5px;
  --bp-player-row: 48px;
}
.bp-workspace .bp-columns {
  grid-template-rows: minmax(0, 1fr) calc(
      5 * var(--bp-hero-row) + 4 * var(--bp-hero-gap) + 64px
    );
}
.bp-workspace .bp-draft {
  padding: 8px 12px;
}
.bp-workspace .bp-draft-content {
  gap: 5px;
}
.bp-draft-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
  padding: 7px 12px;
  border: 1px solid #31556a;
  border-radius: 8px;
  background: linear-gradient(100deg, #143247, #0d1d2c 75%);
  box-shadow: inset 3px 0 #59c7e7;
}
.bp-workspace .bp-turn {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: #d8ecf5;
  font-size: 14px;
  font-weight: 600;
}
.bp-workspace .bp-phase-guide {
  display: flex;
  flex-shrink: 0;
  gap: 3px;
  margin: 0;
}
.bp-workspace .bp-phase-guide > span {
  padding: 4px 6px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #64859a;
  font-size: 10px;
  white-space: nowrap;
}
.bp-workspace .bp-phase-guide > .current {
  color: #bcecff;
  background: #1b465b;
}
.bp-matchup {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  min-width: 0;
}
.bp-workspace .bp-team {
  min-width: 0;
  padding: 0;
}
.bp-workspace .bp-team-heading {
  flex-wrap: nowrap;
  min-height: 24px;
  gap: 6px;
  margin-bottom: 5px;
}
.bp-workspace .bp-team-heading h2 {
  margin: 0;
  font-size: 14px;
}
.bp-workspace .bp-team-heading .bp-bans {
  gap: 3px;
}
.bp-workspace .bp-slots {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: repeat(5, var(--bp-player-row));
  gap: 4px;
  overflow: visible;
}
.bp-workspace .bp-slot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 114px;
  gap: 7px;
  padding: 0;
  min-height: 0;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 0;
}
.bp-player-info {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  padding: 1px 7px;
  border: 1px solid #294255;
  border-radius: 6px;
  background: #0e2232;
}
.bp-workspace .bp-player-id input {
  height: 20px;
  min-height: 20px;
  padding: 1px 0;
  font-size: 14px;
}
.bp-workspace .bp-player-pool {
  flex-wrap: nowrap;
  align-items: center;
  min-height: 22px;
  max-height: 22px;
  overflow-x: auto;
  overflow-y: hidden;
  gap: 3px;
}
.bp-workspace .bp-player-pool button {
  width: 22px;
  height: 22px;
  min-height: 22px;
}
.bp-workspace .bp-pool-icon .bp-portrait {
  transform: scale(0.72);
}
.bp-workspace .bp-slot-champion.bp-picked {
  display: flex;
  align-items: stretch;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 1px solid #2c4c61;
  border-radius: 6px;
  background: #0b1b29;
  overflow: hidden;
}
.bp-pick-placeholder {
  align-self: center;
  color: #527389;
  font-size: 11px;
}
.bp-workspace .bp-slot-champion .bp-pick {
  width: 100%;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  grid-template-rows: 22px 18px;
  align-content: center;
  gap: 0 4px;
  margin: 0;
  padding: 2px 4px;
  background: #132d40;
}
.bp-workspace .bp-slot-champion .bp-pick > .bp-portrait {
  width: 32px;
  height: 32px;
  grid-row: 1 / -1;
  transform: scale(0.8);
  transform-origin: center left;
}
.bp-workspace .bp-slot-champion .bp-pick-name {
  display: block;
  font-size: 11px;
  align-self: center;
}
.bp-workspace .bp-slot-champion select {
  grid-column: 2;
  grid-row: 2;
  width: 100%;
  min-width: 0;
  height: 18px;
  min-height: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 10px;
}
.bp-workspace .bp-draft-content > .bp-history {
  flex: 1;
  min-height: 56px;
  max-height: 100px;
  margin: 0;
  padding-top: 4px;
}
.bp-workspace .bp-selector {
  padding: 8px 12px;
  gap: 6px;
}
.bp-workspace .bp-grid {
  grid-auto-rows: var(--bp-hero-row);
  gap: var(--bp-hero-gap);
  padding: 0;
}
.bp-workspace .bp-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  height: var(--bp-hero-row);
  min-height: 0;
  padding: 2px;
}
.bp-workspace .bp-hero > .bp-portrait {
  width: 40px;
  height: 40px;
  zoom: 0.8;
}
.bp-workspace .bp-hero-name {
  width: 100%;
  height: 14px;
  min-height: 14px;
  flex-shrink: 0;
  line-height: 14px;
  font-size: 11px;
}
.bp-workspace .bp-hero span.bp-hero-name-text {
  line-height: inherit;
}
.bp-workspace[data-complete="true"] .bp-columns {
  grid-template-rows: minmax(0, 1fr) 90px;
}
@media (max-width: 1350px) {
  .bp-workspace .bp-phase-guide {
    display: none;
  }
}
@media (max-height: 850px) {
  .bp-workspace {
    --bp-hero-row: 44px;
    --bp-hero-gap: 4px;
    --bp-player-row: 36px;
  }
  .bp-workspace .bp-draft-status {
    min-height: 34px;
    padding: 5px 10px;
  }
  .bp-workspace .bp-slot {
    grid-template-columns: minmax(0, 1fr) 100px;
    gap: 5px;
  }
  .bp-workspace .bp-player-info {
    display: grid;
    grid-template-columns: minmax(72px, 0.55fr) minmax(0, 1fr);
    align-items: center;
    gap: 5px;
    padding: 1px 5px;
  }
  .bp-workspace .bp-player-id input {
    height: 18px;
    min-height: 18px;
    font-size: 12px;
  }
  .bp-workspace .bp-player-pool {
    min-height: 26px;
    max-height: 26px;
  }
  .bp-workspace .bp-player-pool button {
    width: 26px;
    height: 26px;
    min-height: 26px;
  }
  .bp-workspace .bp-pool-icon .bp-portrait {
    transform: scale(0.85);
  }
  .bp-workspace .bp-hero > .bp-portrait {
    zoom: 0.6;
  }
  .bp-workspace .bp-hero-name {
    height: 12px;
    min-height: 12px;
    line-height: 12px;
    font-size: 10px;
  }
  .bp-workspace .bp-slot-champion .bp-pick {
    grid-template-rows: 16px 14px;
  }
  .bp-workspace .bp-slot-champion select {
    height: 14px;
    min-height: 14px;
  }
}
@media (max-height: 700px) and (min-width: 651px) {
  .bp-workspace {
    --bp-hero-row: 30px;
    --bp-hero-gap: 3px;
    --bp-player-row: 28px;
  }
  .bp-workspace .bp-columns {
    grid-template-rows: minmax(0, 1fr) 206px;
  }
  .bp-workspace .bp-draft {
    padding: 5px 8px;
  }
  .bp-workspace .bp-draft-content {
    gap: 4px;
  }
  .bp-workspace .bp-draft-status {
    min-height: 28px;
    padding: 4px 9px;
  }
  .bp-workspace .bp-turn {
    font-size: 12px;
  }
  .bp-workspace .bp-matchup {
    gap: 12px;
  }
  .bp-workspace .bp-team-heading {
    min-height: 20px;
    margin-bottom: 3px;
  }
  .bp-workspace .bp-slots {
    gap: 3px;
  }
  .bp-workspace .bp-slot {
    grid-template-columns: minmax(0, 1fr) 90px;
    padding: 0;
  }
  .bp-workspace .bp-player-info {
    display: grid;
    grid-template-columns: minmax(75px, 0.7fr) minmax(0, 1fr);
    gap: 6px;
    align-items: center;
  }
  .bp-workspace .bp-player-id small {
    display: none;
  }
  .bp-workspace .bp-player-pool {
    min-height: 24px;
    max-height: 24px;
  }
  .bp-workspace .bp-player-pool button {
    width: 24px;
    height: 24px;
    min-height: 24px;
  }
  .bp-workspace .bp-pool-icon .bp-portrait {
    transform: scale(0.8);
  }
  .bp-workspace .bp-slot-champion .bp-pick {
    grid-template-columns: 21px minmax(0, 1fr);
    grid-template-rows: 11px 11px;
    padding: 1px 3px;
    gap: 0 3px;
  }
  .bp-workspace .bp-slot-champion .bp-pick > .bp-portrait {
    transform: scale(0.6);
  }
  .bp-workspace .bp-slot-champion .bp-pick-name {
    font-size: 10px;
    line-height: 11px;
  }
  .bp-workspace .bp-slot-champion select {
    height: 11px;
    min-height: 11px;
    font-size: 9px;
  }
  .bp-workspace .bp-history h2,
  .bp-workspace .bp-history h2 small {
    line-height: 10px;
    font-size: 10px;
    margin-bottom: 0;
  }
  .bp-workspace .bp-selector {
    padding: 4px 8px;
    gap: 4px;
  }
  .bp-workspace .bp-selector-tools {
    gap: 8px;
  }
  .bp-workspace .bp-selector-tools input,
  .bp-workspace .bp-selector-tools select {
    height: 26px;
    min-height: 26px;
  }
  .bp-workspace .bp-hero > .bp-portrait {
    zoom: 0.4;
  }
  .bp-workspace .bp-hero {
    gap: 0;
    padding: 1px;
  }
  .bp-workspace .bp-hero-name {
    height: 10px;
    min-height: 10px;
    line-height: 10px;
    font-size: 9px;
  }
  .bp-workspace[data-complete="true"] .bp-columns {
    grid-template-rows: minmax(0, 1fr) 70px;
  }
}
@media (max-width: 650px) {
  .bp-workspace .bp-columns {
    grid-template-rows: minmax(0, 1fr);
  }
  .bp-workspace .bp-matchup {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .bp-workspace .bp-slot {
    grid-template-columns: minmax(0, 1fr) 100px;
  }
}

/* Player-led pool rows, dedicated Ban slots and paired match history. */
.bp-workspace {
  --bp-player-row: 58px;
  --bp-hero-row: 52px;
  --bp-hero-gap: 4px;
  --bp-pool-size: 26px;
  --bp-history-size: 32px;
}
.bp-workspace .bp-toolbar {
  padding: 4px 12px;
  gap: 7px;
  min-height: 38px;
}
.bp-workspace .bp-toolbar button {
  min-height: 30px;
  padding: 4px 9px;
  font-size: 12px;
}
.bp-workspace .bp-toolbar h1 {
  font-size: 19px;
}
.bp-workspace .bp-columns {
  grid-template-rows: auto minmax(0, 1fr);
}
.bp-workspace .bp-draft {
  padding: 6px 12px;
}
.bp-workspace .bp-draft-content {
  flex: 0 1 auto;
  width: 100%;
  gap: 4px;
}
.bp-workspace .bp-draft-status {
  min-height: 32px;
  padding: 4px 10px;
}
.bp-workspace .bp-matchup {
  gap: 16px;
}
.bp-workspace .bp-team {
  border-radius: 5px;
  transition: box-shadow 160ms ease;
}
.bp-workspace .bp-team[data-active="true"] {
  outline: 1px solid #dcae45;
  outline-offset: 3px;
  box-shadow: 0 0 16px #dab04b18;
}
.bp-workspace .bp-team[data-active="true"] .bp-player-info,
.bp-workspace .bp-team[data-active="true"] .bp-slot-champion,
.bp-workspace .bp-team[data-active="true"] .bp-slot-ban {
  border-color: #8b713d;
  background-color: #252b2a;
}
.bp-workspace .bp-team-heading {
  min-height: 18px;
  margin-bottom: 4px;
}
.bp-workspace .bp-team-heading h2 {
  font-size: 13px;
}
.bp-workspace .bp-slot {
  grid-template-columns: minmax(0, 1fr) 90px 64px;
  gap: 5px;
}
.bp-workspace .bp-player-info {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 1px 6px;
}
.bp-workspace .bp-player-id {
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  overflow: hidden;
}
.bp-workspace .bp-player-id input {
  height: 24px;
  min-height: 24px;
  font-size: 14px;
  padding: 1px 0;
}
.bp-workspace .bp-player-id small {
  display: block;
  padding-left: 1px;
  line-height: 15px;
}
.bp-workspace .bp-player-pool {
  display: grid;
  grid-template-rows: repeat(2, var(--bp-pool-size));
  grid-auto-columns: var(--bp-pool-size);
  grid-auto-flow: column;
  align-content: center;
  justify-content: start;
  align-items: center;
  gap: 2px;
  height: calc(2 * var(--bp-pool-size) + 2px);
  min-height: 0;
  max-height: none;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}
.bp-workspace .bp-player-pool::-webkit-scrollbar {
  display: none;
}
.bp-workspace .bp-player-pool button {
  width: var(--bp-pool-size);
  height: var(--bp-pool-size);
  min-width: 0;
  min-height: var(--bp-pool-size);
}
.bp-workspace .bp-pool-icon .bp-portrait {
  transform: scale(calc(var(--bp-pool-size) / 28px));
}
.bp-workspace .bp-slot-ban {
  display: flex;
  min-width: 0;
  min-height: 0;
  align-items: center;
  justify-content: center;
  border: 1px solid #3f3f4b;
  border-radius: 6px;
  background: #171d29;
  overflow: hidden;
}
.bp-workspace .bp-team[data-active="true"] .bp-slot-ban[data-next="true"] {
  border-color: #ffd36a;
  background: #493d26;
  box-shadow: inset 0 0 0 1px #ffd36a55;
}
.bp-ban-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  max-width: 100%;
  padding: 2px;
}
.bp-ban-hero > span:last-child {
  display: block;
  width: 100%;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  font-size: 10px;
  line-height: 13px;
  text-align: center;
  color: #e0b4ba;
}
.bp-workspace .bp-slot-champion .bp-pick {
  grid-template-columns: 26px minmax(0, 1fr);
}
.bp-workspace .bp-pick-placeholder {
  font-size: 10px;
}
.bp-workspace .bp-draft-content > .bp-history {
  display: block;
  flex: 0 0 auto;
  min-height: 0;
  height: auto;
  max-height: calc(3 * (var(--bp-history-size) + 6px) + 28px);
  margin: 0;
  padding: 4px 0 0;
  overflow: auto;
}
.bp-workspace .bp-history h2 {
  margin: 0 0 3px;
  font-size: 11px;
  line-height: 15px;
}
.bp-workspace .bp-history h2 small {
  font-size: 10px;
  line-height: 15px;
}
.bp-history-games {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 5px 12px;
}
.bp-workspace .bp-history-game {
  min-width: 0;
  gap: 5px;
  margin: 0;
}
.bp-workspace .bp-history-game > b {
  width: 20px;
  font-size: 11px;
}
.bp-workspace .bp-history-timeline {
  grid-template-columns: repeat(20, var(--bp-history-size));
  gap: 1px;
  padding-bottom: 1px;
  scrollbar-width: thin;
}
.bp-workspace .bp-history-action {
  width: var(--bp-history-size);
  height: calc(var(--bp-history-size) + 3px);
}
.bp-workspace .bp-history-action .bp-portrait {
  zoom: calc(var(--bp-history-size) / 32px);
}
.bp-workspace .bp-selector-tools input,
.bp-workspace .bp-selector-tools select {
  min-height: 32px;
  height: 32px;
}
.bp-workspace .bp-selector {
  padding: 6px 12px;
  gap: 5px;
}
.bp-workspace .bp-grid:has(.bp-draft-locked) {
  grid-auto-rows: auto;
  align-content: start;
}
.bp-workspace[data-complete="true"] .bp-columns {
  grid-template-rows: auto minmax(65px, 1fr);
}
@media (min-height: 1000px) {
  .bp-workspace {
    --bp-player-row: 64px;
    --bp-pool-size: 28px;
  }
}
@media (max-height: 850px) {
  .bp-workspace {
    --bp-player-row: 44px;
    --bp-pool-size: 19px;
    --bp-hero-row: 40px;
    --bp-history-size: 30px;
  }
  .bp-workspace .bp-player-info {
    grid-template-columns: 85px minmax(0, 1fr);
    gap: 5px;
    padding: 1px 4px;
  }
  .bp-workspace .bp-player-id input {
    height: 20px;
    min-height: 20px;
    font-size: 12px;
  }
  .bp-workspace .bp-player-id small {
    line-height: 13px;
  }
  .bp-workspace .bp-slot {
    grid-template-columns: minmax(0, 1fr) 85px 54px;
    gap: 4px;
  }
  .bp-workspace .bp-ban-hero > .bp-portrait {
    zoom: 0.7;
  }
  .bp-workspace .bp-draft {
    padding: 4px 8px;
  }
  .bp-workspace .bp-slots {
    gap: 3px;
  }
  .bp-workspace .bp-draft-status {
    min-height: 30px;
  }
  .bp-workspace .bp-hero {
    gap: 0;
  }
}
@media (max-height: 700px) and (min-width: 651px) {
  .bp-workspace {
    --bp-player-row: 32px;
    --bp-pool-size: 13px;
    --bp-hero-row: 30px;
    --bp-history-size: 24px;
  }
  .bp-workspace .bp-toolbar {
    padding: 2px 10px;
    min-height: 32px;
  }
  .bp-workspace .bp-toolbar button {
    min-height: 28px;
  }
  .bp-workspace .bp-draft-content {
    gap: 3px;
  }
  .bp-workspace .bp-draft-status {
    min-height: 26px;
    padding: 3px 8px;
  }
  .bp-workspace .bp-slots {
    gap: 2px;
  }
  .bp-workspace .bp-team-heading {
    margin-bottom: 2px;
  }
  .bp-workspace .bp-player-info {
    grid-template-columns: 95px minmax(0, 1fr);
  }
  .bp-workspace .bp-player-id input {
    height: 16px;
    min-height: 16px;
  }
  .bp-workspace .bp-player-id small {
    line-height: 10px;
    font-size: 9px;
  }
  .bp-workspace .bp-slot {
    grid-template-columns: minmax(0, 1fr) 85px 54px;
  }
  .bp-workspace .bp-ban-hero {
    gap: 0;
    padding: 0;
  }
  .bp-workspace .bp-ban-hero > .bp-portrait {
    zoom: 0.55;
  }
  .bp-workspace .bp-ban-hero > span:last-child {
    font-size: 9px;
    line-height: 10px;
  }
  .bp-workspace .bp-selector-tools input,
  .bp-workspace .bp-selector-tools select {
    min-height: 24px;
    height: 24px;
  }
  .bp-workspace .bp-selector {
    padding: 4px 8px;
    gap: 4px;
  }
  .bp-workspace .bp-history h2,
  .bp-workspace .bp-history h2 small {
    line-height: 12px;
  }
}
@media (max-width: 650px) {
  .bp-workspace .bp-columns,
  .bp-workspace[data-complete="true"] .bp-columns {
    grid-template-rows: minmax(0, 1fr);
  }
  .bp-workspace .bp-draft-content {
    flex: 1;
  }
  .bp-workspace .bp-slot {
    grid-template-columns: minmax(0, 1fr) 85px 50px;
  }
  .bp-workspace .bp-player-info {
    grid-template-columns: 70px minmax(0, 1fr);
  }
  .bp-workspace .bp-history-games {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 650px) {
  .bp-workspace {
    --bp-player-row: 36px;
    --bp-pool-size: 15px;
  }
  .bp-workspace .bp-ban-hero > .bp-portrait {
    zoom: 0.5;
  }
  .bp-workspace .bp-ban-hero > span:last-child {
    line-height: 10px;
    font-size: 9px;
  }
}
@media (max-width: 650px) and (max-height: 750px) {
  .bp-workspace {
    --bp-player-row: 30px;
    --bp-pool-size: 12px;
  }
}

/* Large, naturally wrapping pool buttons; reserve exactly six champion rows. */
.bp-workspace {
  --bp-pool-size: 36px;
  --bp-player-row: 48px;
  --bp-hero-row: 44px;
  --bp-hero-gap: 4px;
}
.bp-workspace .bp-columns {
  grid-template-rows: minmax(0, 1fr) calc(
      6 * var(--bp-hero-row) + 5 * var(--bp-hero-gap) + 52px
    );
}
.bp-workspace .bp-draft-content {
  flex: 1;
}
.bp-workspace .bp-slots {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.bp-workspace .bp-slot {
  min-height: var(--bp-player-row);
  flex: 0 0 auto;
}
.bp-workspace .bp-player-info {
  grid-template-columns: 90px minmax(0, 1fr);
  align-items: stretch;
}
.bp-workspace .bp-player-id {
  justify-content: center;
}
.bp-workspace button.bp-player-pool {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  justify-content: flex-start;
  align-items: center;
  gap: 4px;
  width: 100%;
  height: auto;
  min-width: 0;
  min-height: calc(var(--bp-pool-size) + 8px);
  max-height: calc(3 * var(--bp-pool-size) + 16px);
  margin: 0;
  padding: 3px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  white-space: normal;
  line-height: normal;
  text-align: left;
  overflow: auto;
  scrollbar-width: thin;
  cursor: pointer;
  touch-action: pan-y;
}
.bp-workspace button.bp-player-pool:hover,
.bp-workspace button.bp-player-pool:focus-visible {
  border-color: #6bcbe6;
  background: #23465b55;
  outline: none;
}
.bp-workspace .bp-player-pool > .bp-pool-icon,
.bp-workspace .bp-player-pool > .bp-pool-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 var(--bp-pool-size);
  width: var(--bp-pool-size);
  height: var(--bp-pool-size);
  min-height: 0;
  margin: 0;
  padding: 0;
  border-radius: 5px;
}
.bp-workspace .bp-player-pool > .bp-pool-icon:not(.unavailable) {
  cursor: grab;
  touch-action: none;
}
.bp-workspace .bp-pool-icon .bp-portrait {
  transform: scale(calc(var(--bp-pool-size) / 40px));
  pointer-events: none;
}
.bp-workspace .bp-player-pool.is-sorting {
  cursor: grabbing;
  user-select: none;
}
.bp-workspace .bp-pool-icon.is-dragging {
  opacity: 0.4;
  outline: 2px solid #7edcff;
}
.bp-workspace .bp-pool-icon.drop-before {
  box-shadow: -3px 0 #7edcff;
}
.bp-workspace .bp-pool-icon.drop-after {
  box-shadow: 3px 0 #7edcff;
}
.bp-workspace .bp-hero > .bp-portrait {
  zoom: 0.65;
}
.bp-workspace .bp-hero-name {
  height: 12px;
  min-height: 12px;
  line-height: 12px;
}
.bp-workspace .bp-hero {
  gap: 0;
}
.bp-lane-filter {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border: 1px solid #345267;
  border-radius: 6px;
  background: #091c2b;
}
.bp-workspace .bp-lane-filter button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  min-height: 28px;
  height: 28px;
  margin: 0;
  padding: 0 6px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 12px;
  line-height: 20px;
  white-space: nowrap;
  background: transparent;
  color: #9ab5c9;
}
.bp-workspace .bp-lane-filter button[aria-pressed="true"] {
  color: #d8f6ff;
  border-color: #4388a3;
  background: #1a4b62;
}
.bp-workspace .bp-lane-filter button:focus-visible {
  outline: 2px solid #8bdcf6;
  outline-offset: -2px;
}
.bp-workspace[data-complete="true"] .bp-columns {
  grid-template-rows: minmax(0, 1fr) 90px;
}
@media (min-height: 1000px) {
  .bp-workspace {
    --bp-player-row: 56px;
    --bp-pool-size: 42px;
  }
}
@media (max-height: 850px) {
  .bp-workspace {
    --bp-player-row: 44px;
    --bp-pool-size: 30px;
    --bp-hero-row: 30px;
    --bp-hero-gap: 3px;
  }
  .bp-workspace .bp-player-info {
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 5px;
  }
  .bp-workspace .bp-hero > .bp-portrait {
    zoom: 0.4;
  }
  .bp-workspace .bp-hero-name {
    height: 10px;
    min-height: 10px;
    line-height: 10px;
  }
  .bp-workspace .bp-hero {
    padding: 1px;
  }
  .bp-workspace .bp-lane-filter button {
    height: 24px;
    min-height: 24px;
  }
}
@media (max-height: 700px) and (min-width: 651px) {
  .bp-workspace {
    --bp-player-row: 32px;
    --bp-pool-size: 22px;
    --bp-hero-row: 26px;
  }
  .bp-workspace .bp-columns {
    grid-template-rows: minmax(0, 1fr) calc(
        6 * var(--bp-hero-row) + 5 * var(--bp-hero-gap) + 44px
      );
  }
  .bp-workspace .bp-player-info {
    grid-template-columns: 95px minmax(0, 1fr);
  }
  .bp-workspace button.bp-player-pool {
    gap: 3px;
    padding: 2px;
    min-height: calc(var(--bp-pool-size) + 6px);
  }
  .bp-workspace .bp-hero > .bp-portrait {
    zoom: 0.3;
  }
  .bp-workspace .bp-lane-filter {
    padding: 1px;
  }
  .bp-workspace .bp-lane-filter button {
    height: 22px;
    min-height: 22px;
    min-width: 26px;
    font-size: 11px;
  }
  .bp-workspace[data-complete="true"] .bp-columns {
    grid-template-rows: minmax(0, 1fr) 70px;
  }
}
@media (min-width: 651px) and (max-width: 1100px) {
  .bp-workspace .bp-tabs {
    display: flex;
  }
  .bp-workspace .bp-columns {
    grid-template-columns: minmax(0, 1fr);
  }
  .bp-workspace .bp-columns > .bp-tree,
  .bp-workspace .bp-columns > .bp-draft,
  .bp-workspace .bp-columns > .bp-selector {
    grid-column: 1;
    height: auto;
  }
  .bp-workspace .bp-columns > .bp-tree {
    display: none;
    grid-row: 1;
  }
  .bp-workspace .bp-columns > .bp-draft {
    display: none;
    grid-row: 1;
  }
  .bp-workspace .bp-columns > .bp-selector {
    display: flex;
    grid-row: 2;
  }
  .bp-workspace .bp-columns[data-panel="tree"] > .bp-tree,
  .bp-workspace .bp-columns[data-panel="draft"] > .bp-draft {
    display: flex;
  }
  .bp-workspace .bp-columns[data-panel="heroes"] > .bp-selector {
    grid-row: 1 / -1;
  }
}
@media (max-width: 650px) {
  .bp-workspace {
    --bp-player-row: 36px;
    --bp-pool-size: 26px;
  }
  .bp-workspace .bp-columns,
  .bp-workspace[data-complete="true"] .bp-columns {
    grid-template-rows: minmax(0, 1fr);
  }
  .bp-workspace .bp-player-info {
    grid-template-columns: 60px minmax(0, 1fr);
  }
  .bp-workspace .bp-lane-filter {
    margin-left: auto;
  }
  .bp-workspace .bp-selector-tools input {
    width: 40%;
    min-width: 80px;
  }
}
@media (min-width: 651px) and (max-width: 1000px) and (min-height: 1000px) {
  .bp-workspace {
    --bp-pool-size: 32px;
    --bp-player-row: 48px;
  }
  .bp-workspace .bp-player-info {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 5px;
  }
  .bp-workspace .bp-slot {
    grid-template-columns: minmax(0, 1fr) 85px 54px;
  }
}

/* Fixed tactical-paper cells: data changes never resize the workspace. */
.bp-workspace {
  --bp-status-height: 36px;
  --bp-review-height: 142px;
}
.bp-workspace .bp-toolbar {
  flex-wrap: nowrap;
  height: 38px;
  min-height: 38px;
  overflow-x: auto;
  white-space: nowrap;
}
.bp-workspace .bp-toolbar > * {
  flex-shrink: 0;
}
.bp-workspace .bp-tabs {
  height: 40px;
  min-height: 40px;
}
.bp-workspace .bp-columns,
.bp-workspace[data-complete="true"] .bp-columns {
  grid-template-rows: minmax(0, 1fr) calc(
      6 * var(--bp-hero-row) + 5 * var(--bp-hero-gap) + 52px
    );
}
.bp-workspace .bp-draft-content {
  display: grid;
  grid-template-rows: var(--bp-status-height) minmax(0, 1fr) var(
      --bp-review-height
    );
  gap: 5px;
  flex: 1;
  overflow: hidden;
}
.bp-workspace .bp-draft-status {
  height: var(--bp-status-height);
  min-height: 0;
  padding: 4px 10px;
}
.bp-workspace #bpTurn {
  min-width: 0;
  line-height: 20px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bp-workspace .bp-matchup {
  min-height: 0;
  align-items: stretch;
}
.bp-workspace .bp-team {
  display: grid;
  grid-template-rows: 20px minmax(0, 1fr);
  min-height: 0;
}
.bp-workspace .bp-team-heading {
  height: 18px;
  min-height: 0;
  margin: 0 0 2px;
}
.bp-workspace .bp-slots {
  display: grid;
  grid-template-rows: repeat(5, minmax(0, 1fr));
  gap: 4px;
  min-height: 0;
}
.bp-workspace .bp-slot {
  min-height: 0;
  height: 100%;
  overflow: hidden;
}
.bp-workspace .bp-player-info {
  min-height: 0;
  overflow: hidden;
}
.bp-workspace button.bp-player-pool {
  display: block;
  container-type: size;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: none;
  padding: 2px;
  overflow: auto;
  --bp-pool-size: min(40px, calc((100cqh - 2px) / 2));
}
.bp-workspace .bp-pool-icons {
  display: grid;
  grid-template-rows: repeat(2, var(--bp-pool-size));
  grid-auto-columns: var(--bp-pool-size);
  grid-auto-flow: column;
  align-content: center;
  justify-content: start;
  gap: 2px;
  width: max-content;
  min-width: 100%;
  height: 100%;
}
.bp-workspace .bp-pool-icons > .bp-pool-icon,
.bp-workspace .bp-pool-icons > .bp-pool-add {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  width: var(--bp-pool-size);
  height: var(--bp-pool-size);
  margin: 0;
  padding: 0;
  border-radius: 4px;
}
.bp-workspace .bp-pool-icons > .bp-pool-icon:not(.unavailable) {
  cursor: grab;
  touch-action: none;
}
.bp-workspace .bp-pool-icon .bp-portrait {
  transform: scale(calc(var(--bp-pool-size) / 40px));
}
.bp-workspace .bp-draft-content > .bp-history {
  height: var(--bp-review-height);
  min-height: 0;
  max-height: var(--bp-review-height);
  overflow: auto;
}
.bp-workspace .bp-draft-status .bp-next-details {
  flex-shrink: 0;
  min-width: 140px;
}
.bp-workspace .bp-draft-status .bp-next-details > summary {
  min-height: 26px;
  height: 26px;
  padding: 2px 8px;
  font-size: 12px;
}
.bp-workspace .bp-draft-status .bp-next-details #bpNextGame {
  position: fixed;
  top: calc(var(--director-header) + 94px);
  left: auto;
  right: 16px;
  width: min(640px, calc(100vw - 32px));
  max-height: calc(100dvh - 190px);
  z-index: 20;
}
.bp-workspace #bpRuleWarning {
  position: absolute;
  z-index: 10;
  top: 46px;
  right: 12px;
  max-width: 70%;
  padding: 4px;
  background: #242333;
}
@media (max-height: 850px) {
  .bp-workspace {
    --bp-status-height: 30px;
    --bp-review-height: 132px;
  }
}
@media (max-height: 700px) and (min-width: 651px) {
  .bp-workspace {
    --bp-status-height: 26px;
    --bp-review-height: 84px;
    --bp-history-size: 18px;
  }
  .bp-workspace .bp-columns,
  .bp-workspace[data-complete="true"] .bp-columns {
    grid-template-rows: minmax(0, 1fr) calc(
        6 * var(--bp-hero-row) + 5 * var(--bp-hero-gap) + 44px
      );
  }
  .bp-workspace .bp-draft-content {
    gap: 3px;
  }
  .bp-workspace .bp-team {
    grid-template-rows: 18px minmax(0, 1fr);
  }
  .bp-workspace .bp-slots {
    gap: 2px;
  }
  .bp-workspace .bp-ban-hero > .bp-portrait {
    zoom: 0.45;
  }
  .bp-workspace .bp-ban-hero > span:last-child {
    line-height: 9px;
  }
  .bp-workspace .bp-history-games {
    gap: 3px 10px;
  }
  .bp-workspace .bp-history h2,
  .bp-workspace .bp-history h2 small {
    font-size: 9px;
    line-height: 11px;
  }
}
@media (max-width: 650px) {
  .bp-workspace .bp-columns,
  .bp-workspace[data-complete="true"] .bp-columns {
    grid-template-rows: minmax(0, 1fr);
  }
  .bp-workspace .bp-matchup {
    grid-template-rows: repeat(2, minmax(0, 1fr));
  }
  .bp-workspace .bp-phase-guide {
    display: none;
  }
  .bp-workspace .bp-draft-status .bp-next-details {
    min-width: 110px;
  }
  .bp-workspace .bp-draft-status .bp-next-details > summary {
    font-size: 10px;
    gap: 3px;
  }
}
.bp-workspace #bpSaveStatus {
  flex: 0 0 126px;
  width: 126px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* Fixed frame, adaptive one/two/three-row contents. */
.bp-workspace button.bp-player-pool {
  scrollbar-width: none;
}
.bp-workspace button.bp-player-pool::-webkit-scrollbar {
  display: none;
}
.bp-workspace .bp-pool-icons {
  --bp-pool-cell: min(
    var(--bp-pool-size),
    calc((100cqh - (var(--bp-pool-rows, 1) - 1) * 3px) / var(--bp-pool-rows, 1))
  );
  position: relative;
  grid-template-rows: repeat(var(--bp-pool-rows, 1), var(--bp-pool-cell));
  grid-template-columns: repeat(var(--bp-pool-cols, 1), var(--bp-pool-cell));
  grid-auto-flow: row;
  gap: 3px;
  width: 100%;
  justify-content: start;
  justify-items: start;
  align-content: center;
}
.bp-workspace .bp-pool-icons > .bp-pool-icon,
.bp-workspace .bp-pool-icons > .bp-pool-add {
  width: var(--bp-pool-cell);
  height: var(--bp-pool-cell);
}
.bp-workspace .bp-pool-icon .bp-portrait {
  transform: scale(calc(var(--bp-pool-cell) / 40px));
}
.bp-workspace .bp-pool-icons > .bp-pool-add {
  font-size: clamp(14px, var(--bp-pool-cell), 30px);
}
.bp-workspace .bp-pool-icons > .bp-pool-icon.is-dragging,
.bp-workspace .bp-pool-icons > .bp-pool-icon.is-landing {
  opacity: 0;
}
.bp-pool-drag-ghost {
  position: fixed;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  border-radius: 5px;
  background: #173b4e;
  box-shadow:
    0 5px 18px #0009,
    0 0 0 2px #64d6f5;
}
.bp-pool-drag-ghost .bp-portrait {
  flex: 0 0 40px;
  transform: scale(calc(var(--bp-pool-size) / 40px));
}

/* Dialog drafts share the same direct sorting interaction as workspace pools. */
.bp-pool-tokenbox,
.bp-pool-selected {
  position: relative;
}
.bp-pool-token,
.bp-pool-selected [data-pool-remove] {
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.bp-pool-token [data-pool-token-remove] {
  cursor: pointer;
}
.bp-sort-item.is-dragging,
.bp-sort-item.is-landing {
  opacity: 0;
}
.bp-pool-tokenbox.is-sorting,
.bp-pool-selected.is-sorting {
  cursor: grabbing;
}
.bp-pool-drag-ghost small {
  display: none;
}
.bp-pool-drag-ghost.bp-pool-token {
  margin: 0;
  padding: 0 0 0 9px;
  font-size: 14px;
}

.bp-workspace .bp-pool-icons > .bp-pool-icon {
  cursor: grab;
  touch-action: none;
}
.bp-pool-drag-ghost.is-unavailable .bp-portrait {
  filter: grayscale(1) brightness(0.35);
}
