/* Approved Tournament Build/Raze/Bonus table. Live values and actions stay in the game API. */
.tournament-build-page { max-width: 56.25rem; min-width: 0; }
.tournament-build-page [hidden] { display: none !important; }
.tournament-build-page button,
.tournament-build-page summary { min-height: 2.75rem; }
.tournament-build-heading { display: flex; align-items: center; justify-content: space-between; gap: .625rem; margin-bottom: .875rem; }
.tournament-build-heading > div { min-width: 0; }
.tournament-build-heading h2 { margin: 0 0 .25rem; font-size: 1.125rem; }
.tournament-build-heading p { margin: 0; color: var(--muted); font-size: .75rem; }
.tournament-build-heading .term-help { padding: 0; font-size: inherit; }
.tournament-build-unbuilt { flex: 0 0 auto; padding: .5rem .75rem; border: 1px solid var(--border); background: var(--panel); text-align: right; }
.tournament-build-unbuilt span { display: block; font-size: .6875rem; color: var(--muted); }
.tournament-build-unbuilt strong { display: block; margin-top: .1875rem; color: var(--link); font-size: 1.375rem; font-variant-numeric: tabular-nums; }
.tournament-build-advisor { margin: 0 0 .875rem; padding: .625rem .75rem; border: 1px solid var(--border); background: var(--panel); font-size: .75rem; }
.tournament-build-advisor strong { font-size: .8125rem; }
.tournament-build-advisor p { margin: .375rem 0 0; line-height: 1.5; }
.tournament-build-advisor small { display: block; margin-top: .375rem; color: var(--muted); }
.tournament-build-advisor[data-severity=red] { border-left: .1875rem solid var(--bad); }
.tournament-build-advisor[data-severity=yellow] { border-left: .1875rem solid var(--tournament-status-caution); }
.tournament-build-toolbar { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .75rem; }
.tournament-build-toggle { display: flex; flex: 0 0 auto; gap: .125rem; padding: .1875rem; border: 1px solid var(--border); border-radius: .4375rem; background: var(--panel); }
.tournament-build-toggle button { min-width: 4rem; padding: .5rem .375rem; border: 1px solid transparent; border-radius: .25rem; background: transparent; font-size: .75rem; box-shadow: none; }
.tournament-build-toggle [data-tournament-build-mode=build] { color: var(--good); }
.tournament-build-toggle [data-tournament-build-mode=raze] { color: var(--bad); }
.tournament-build-toggle [data-tournament-build-mode=bonus] { color: var(--link); }
.tournament-build-toggle [data-tournament-build-mode=build][aria-pressed=true] { background: var(--good); border-color: var(--good); color: var(--tournament-status-ink); }
.tournament-build-toggle [data-tournament-build-mode=raze][aria-pressed=true] { background: var(--bad); border-color: var(--bad); color: var(--tournament-status-ink); }
.tournament-build-toggle [data-tournament-build-mode=bonus][aria-pressed=true] { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.tournament-build-toolbar > p { margin: 0; min-width: 0; color: var(--muted); text-align: right; font-size: .6875rem; line-height: 1.5; overflow-wrap: anywhere; }
.tournament-build-page .tournament-build-table { width: 100%; min-width: 0; margin: 0; table-layout: fixed; border-collapse: collapse; border: 1px solid var(--border); background: var(--panel); }
.tournament-build-table th,
.tournament-build-table td { padding: .5rem .375rem; border-bottom: 1px solid var(--border); font-size: .6875rem; line-height: 1.5; white-space: normal; overflow-wrap: anywhere; vertical-align: middle; }
.tournament-build-table th:first-child { width: 44%; }
.tournament-build-table th:nth-child(2) { width: 22%; }
.tournament-build-table th:last-child { width: 34%; }
.tournament-build-table thead th { font-size: .625rem; text-align: left; color: var(--muted); }
.tournament-build-table thead th:last-child,
.tournament-build-table td:last-child { text-align: right; }
.tournament-build-table tbody th,
.tournament-build-table tfoot th { font-size: .75rem; text-align: left; font-weight: 500; color: var(--text); }
.tournament-build-table .term-help { max-width: 100%; padding: .25rem 0; font: inherit; text-align: left; line-height: 1.4; white-space: normal; }
.tournament-build-table small { display: block; margin-top: .1875rem; font-size: .625rem; font-weight: 400; color: var(--muted); }
.tournament-build-table .tournament-build-pending { color: var(--link); }
.tournament-build-table input { width: 100%; max-width: 7.5rem; min-width: 0; min-height: 2.75rem; padding: .5rem .375rem; box-sizing: border-box; background: var(--bg); text-align: right; font-size: 16px; font-variant-numeric: tabular-nums; }
.tournament-build-table input:disabled { opacity: .55; }
.tournament-build-table tfoot { background: var(--panel-2); font-weight: 600; }
.tournament-build-table .tournament-build-barren th,
.tournament-build-table .tournament-build-barren td { color: var(--muted); }
.tournament-build-page[data-tournament-build-mode=build] .tournament-build-table thead th:last-child { color: var(--good); }
.tournament-build-page[data-tournament-build-mode=raze] .tournament-build-table thead th:last-child { color: var(--bad); }
.tournament-build-page[data-tournament-build-mode=bonus] .tournament-build-table th:first-child { width: 31%; }
.tournament-build-page[data-tournament-build-mode=bonus] .tournament-build-table th:nth-child(2) { width: 18%; }
.tournament-build-page[data-tournament-build-mode=bonus] .tournament-build-table th:last-child { width: 51%; }
.tournament-build-page[data-tournament-build-mode=bonus] .tournament-build-table th:last-child,
.tournament-build-page[data-tournament-build-mode=bonus] .tournament-build-table td:last-child { text-align: left; }
.tournament-build-page[data-tournament-build-mode=bonus] .tournament-build-table thead th:last-child { color: var(--link); }
.tournament-build-options { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem .75rem; margin-top: .875rem; font-size: .75rem; color: var(--muted); }
.tournament-build-options label { display: flex; align-items: center; gap: .5rem; min-height: 2.75rem; }
.tournament-build-options input { width: 1.25rem; height: 1.25rem; margin: 0; flex: 0 0 auto; }
.tournament-build-plan { display: flex; justify-content: space-between; gap: .75rem; margin: .875rem 0 .5rem; color: var(--muted); font-size: .75rem; font-variant-numeric: tabular-nums; }
.tournament-build-plan strong { color: var(--text); }
.tournament-build-plan > span:last-child { text-align: right; }
.tournament-build-validation,
.tournament-build-error { color: var(--bad); font-size: .8125rem; line-height: 1.5; }
.tournament-build-validation { margin: .5rem 0; }
.tournament-build-validation:empty { display: none; }
.tournament-build-submit { width: 100%; margin-top: .375rem; }
.tournament-build-page[data-tournament-build-mode=build] .tournament-build-submit { background: var(--good); border-color: var(--good); color: var(--tournament-status-ink); }
.tournament-build-page[data-tournament-build-mode=raze] .tournament-build-submit { background: var(--bad); border-color: var(--bad); color: var(--tournament-status-ink); }
.tournament-build-result { display: flex; align-items: start; gap: .5rem; margin-top: .625rem; font-size: .8125rem; line-height: 1.5; }
.tournament-build-result:empty { display: none; }
.tournament-build-result p { flex: 1; min-width: 0; margin: .625rem 0; overflow-wrap: anywhere; }
.tournament-build-result button { flex: 0 0 2.75rem; width: 2.75rem; padding: .5rem; }
.tournament-build-note,
.tournament-build-orders > p,
.tournament-build-recovery > p { font-size: .75rem; color: var(--muted); line-height: 1.5; }
.tournament-build-orders,
.tournament-build-recovery { margin-top: 1rem; border-top: 1px solid var(--border); }
.tournament-build-orders > summary,
.tournament-build-recovery > summary { padding: .75rem 0; color: var(--link); font-size: .8125rem; cursor: pointer; }
.tournament-build-order-list { display: grid; gap: .625rem; margin-bottom: .75rem; }
.tournament-build-order-list label { display: grid; grid-template-columns: minmax(0, 1fr) minmax(5rem, 7.5rem); align-items: center; gap: .75rem; padding-bottom: .625rem; border-bottom: 1px solid var(--border); }
.tournament-build-order-list strong { font-size: .8125rem; }
.tournament-build-order-list small { display: block; margin-top: .1875rem; color: var(--muted); font-size: .6875rem; }
.tournament-build-order-list input { width: 100%; min-width: 0; min-height: 2.75rem; padding: .5rem; box-sizing: border-box; text-align: right; font-size: 16px; }
.tournament-build-orders form > button { width: 100%; }
.tournament-build-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (min-width: 760px) {
  .tournament-build-heading h2 { font-size: 1.375rem; }
  .tournament-build-heading p { font-size: .875rem; }
  .tournament-build-unbuilt { min-width: 7.5rem; padding: .625rem .875rem; }
  .tournament-build-unbuilt strong { font-size: 1.625rem; }
  .tournament-build-toggle button { min-width: 6.25rem; padding-inline: .75rem; font-size: .875rem; }
  .tournament-build-toolbar > p { font-size: .8125rem; }
  .tournament-build-table th,
  .tournament-build-table td { padding: .6875rem .625rem; font-size: .8125rem; }
  .tournament-build-table tbody th,
  .tournament-build-table tfoot th { font-size: .875rem; }
  .tournament-build-table thead th,
  .tournament-build-table small { font-size: .75rem; }
  .tournament-build-advisor { font-size: .8125rem; }
}
@media (min-width: 1100px) {
  .tournament-build-heading { margin-bottom: 1rem; }
  .tournament-build-table th,
  .tournament-build-table td { padding: .75rem; }
}
