.team-cup-board {
  display: grid;
  gap: 12px;
  margin: 0 0 16px;
  border: 2px solid color-mix(in srgb, var(--admin-theme-primary, #17633f) 42%, #dbe8e1);
  border-radius: 14px;
  background: color-mix(in srgb, var(--admin-theme-primary, #17633f) 5%, #ffffff);
  padding: 13px;
}

/* Team Cup Points stages use a compact, golf-first selector row. The small
   Custom range only exists when it is needed, so the normal view stays clean. */
body[data-admin-theme] .team-cup-modal .team-cup-stage-grid {
  align-items: end;
  grid-template-columns: repeat(auto-fit, minmax(104px, max-content));
  padding: 9px 10px;
}

body[data-admin-theme] .team-cup-modal .team-cup-stage-grid.is-team-score {
  grid-template-columns: repeat(auto-fit, minmax(104px, max-content));
}

body[data-admin-theme] .team-cup-modal .team-cup-stage-custom-holes {
  align-items: end;
  display: grid;
  gap: 5px;
  grid-template-columns: repeat(2, 48px);
}

body[data-admin-theme] .team-cup-modal .team-cup-stage-custom-holes .admin-field {
  gap: 2px;
}

body[data-admin-theme] .team-cup-modal .team-cup-stage-custom-holes select {
  min-width: 0;
  padding-inline: 4px;
  text-align: center;
}

body[data-admin-theme] .team-cup-modal .team-cup-stage-holes-lock {
  align-self: end;
  min-height: 31px;
  padding-inline: 9px;
  white-space: nowrap;
}

/* The points-stage card is deliberately two rows: golf choices first, then
   the scoring calculation.  That keeps a director from scanning a single
   sprawling selector row to understand a stage. */
body[data-admin-theme] .team-cup-modal .team-cup-stage-selector-rows {
  display: grid;
  gap: 7px;
  padding: 10px;
}

body[data-admin-theme] .team-cup-modal .team-cup-stage-selector-row {
  align-items: end;
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(auto-fit, minmax(96px, max-content));
}

body[data-admin-theme] .team-cup-modal .team-cup-stage-selector-row-primary {
  border-bottom: 1px solid var(--team-cup-ui-line);
  padding-bottom: 7px;
}

body[data-admin-theme] .team-cup-modal .team-cup-stage-selector-row .admin-field {
  gap: 2px;
  min-width: 0;
}

body[data-admin-theme] .team-cup-modal .team-cup-stage-selector-row .admin-field > span:first-child {
  display: block;
  min-height: 16px;
  text-align: center;
}

body[data-admin-theme] .team-cup-modal .team-cup-stage-selector-row select,
body[data-admin-theme] .team-cup-modal .team-cup-stage-selector-row input {
  box-sizing: border-box;
  min-height: 31px;
  width: 100%;
}

/* Team Cup is rebuilt after each selector change.  The shared reliable-select
   layer turns each native select into a button; without this scoped treatment
   the native control remained visible while the button rendered below it.
   Keep a single visible control with the selected value inside its frame. */
body[data-admin-theme] .team-cup-modal .scoodle-reliable-select {
  display: inline-flex;
  min-width: 0;
  position: relative;
  width: 100%;
}

body[data-admin-theme] .team-cup-modal .scoodle-reliable-select-native {
  block-size: 1px !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  inline-size: 1px !important;
  opacity: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
  position: absolute !important;
}

body[data-admin-theme] .team-cup-modal .scoodle-reliable-select-button {
  align-items: center;
  appearance: none;
  background: #ffffff;
  border: 1px solid var(--team-cup-ui-line);
  border-radius: 5px;
  box-sizing: border-box;
  color: var(--team-cup-ui-ink);
  display: inline-flex;
  font: inherit;
  font-size: .76rem;
  font-weight: 750;
  gap: 6px;
  justify-content: space-between;
  min-height: 31px;
  padding: 4px 8px;
  text-align: left;
  width: 100%;
}

body[data-admin-theme] .team-cup-modal .scoodle-reliable-select-button:focus-visible,
body[data-admin-theme] .team-cup-modal .scoodle-reliable-select-button[aria-expanded="true"] {
  border-color: var(--team-cup-ui-blue, #2854a6);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--team-cup-ui-blue, #2854a6) 18%, transparent);
  outline: none;
}

body[data-admin-theme] .team-cup-modal .scoodle-reliable-select-chevron {
  block-size: 7px;
  border-bottom: 2px solid var(--team-cup-ui-blue, #2854a6);
  border-right: 2px solid var(--team-cup-ui-blue, #2854a6);
  flex: 0 0 7px;
  inline-size: 7px;
  margin: -3px 2px 2px 7px;
  transform: rotate(45deg);
}

body[data-admin-theme] .team-cup-modal .scoodle-reliable-select-button[aria-expanded="true"] .scoodle-reliable-select-chevron {
  margin-block: 3px -2px;
  transform: rotate(225deg);
}

body[data-admin-theme] .team-cup-modal .team-cup-stage-selector-row .team-cup-stage-size {
  width: 70px;
}

body[data-admin-theme] .team-cup-modal .team-cup-stage-selector-row .team-cup-stage-size .scoodle-reliable-select-button {
  padding-inline: 5px;
  text-align: center;
}

body[data-admin-theme] .team-cup-modal .team-cup-stage-holes-lock {
  align-items: center;
  align-self: end;
  background: var(--team-cup-ui-blue, #2854a6) !important;
  border-color: var(--team-cup-ui-blue, #2854a6) !important;
  color: #ffffff !important;
  display: inline-flex;
  justify-content: center;
  line-height: 1.1;
  min-height: 31px;
  text-align: center;
}

body[data-admin-theme] .team-cup-modal .team-cup-stage-selector-row .team-cup-stage-points-system output,
body[data-admin-theme] .team-cup-modal .team-cup-stage-selector-row .team-cup-stage-points-scope output {
  min-height: 31px;
}

body[data-admin-theme] .team-cup-modal .team-cup-stage-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

body[data-admin-theme] .team-cup-modal .team-cup-round-holes {
  gap: 2px;
  min-width: 132px;
}

body[data-admin-theme] .team-cup-modal .team-cup-round-holes > span {
  display: block;
  font-size: .7rem;
  text-align: right;
}

body[data-admin-theme] .team-cup-modal .team-cup-round-holes .scoodle-reliable-select-button {
  min-height: 31px;
}

body[data-admin-theme] .team-cup-modal .team-cup-stage-points-system output,
body[data-admin-theme] .team-cup-modal .team-cup-stage-points-scope output {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--team-cup-ui-line);
  border-radius: 5px;
  box-sizing: border-box;
  display: flex;
  font-size: .76rem;
  font-weight: 750;
  min-height: 31px;
  padding: 0 8px;
  white-space: nowrap;
}

body[data-admin-theme] .team-cup-modal .team-cup-stage-holes-wrap {
  align-items: end;
  display: contents;
}

body[data-admin-theme] .team-cup-modal .team-cup-stage-order {
  text-transform: none;
}

.ttg-choice-modal[data-team-cup-stage-unlock-warning="true"] .ttg-choice-body p {
  color: #b42318 !important;
  font-weight: 850;
}

@media (max-width: 760px) {
  body[data-admin-theme] .team-cup-modal .team-cup-stage-grid,
  body[data-admin-theme] .team-cup-modal .team-cup-stage-grid.is-team-score {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-admin-theme] .team-cup-modal .team-cup-stage-holes-lock {
    grid-column: span 2;
    justify-self: start;
  }

  body[data-admin-theme] .team-cup-modal .team-cup-stage-selector-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-admin-theme] .team-cup-modal .team-cup-stage-selector-row .team-cup-stage-size {
    width: auto;
  }
}

.team-cup-board-head,
.team-cup-summary-head,
.team-cup-stages > header,
.team-cup-stage > header,
.team-cup-stage > footer,
.team-cup-team-builder > header,
.team-cup-partners > header,
.team-cup-team-column > header,
.team-cup-field-column > header,
.team-cup-matchup > header {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.team-cup-board-head > div,
.team-cup-summary-head > div:first-child,
.team-cup-stages > header > div,
.team-cup-stage > header > div,
.team-cup-team-builder > header > div,
.team-cup-partners > header > div {
  display: grid;
  gap: 2px;
}

.team-cup-step {
  color: var(--admin-theme-primary, #17633f);
  font-size: .68rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.team-cup-board-head strong,
.team-cup-stages > header strong,
.team-cup-team-builder > header strong,
.team-cup-partners > header strong {
  color: var(--admin-theme-ink, #103b2c);
  font-size: 1rem;
}

.team-cup-board-head span,
.team-cup-stages > header span,
.team-cup-summary-head span,
.team-cup-team-builder > header span,
.team-cup-partners > header span,
.team-cup-stage > footer > span {
  color: #5b6c63;
  font-size: 0.76rem;
  font-weight: 650;
}

.team-cup-summary-list,
.team-cup-stages > div {
  display: grid;
  gap: 10px;
}

.team-cup-summary-card,
.team-cup-stage,
.team-cup-team-builder,
.team-cup-partners,
.team-cup-matchup,
.team-cup-mode-picker,
.team-cup-tally {
  border: 1px solid #c6d7cd;
  border-radius: 10px;
  background: #ffffff;
}

.team-cup-summary-card {
  display: grid;
  gap: 9px;
  padding: 11px;
}

.team-cup-summary-head strong {
  color: #163f2c;
  font-size: 0.94rem;
}

.team-cup-summary-actions,
.team-cup-side-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.team-cup-summary-actions .danger {
  color: #9b251b;
}

.team-cup-side-badge {
  align-items: center;
  border: 1px solid color-mix(in srgb, var(--team-cup-side) 44%, #ffffff);
  border-radius: 999px;
  color: #1a382a;
  display: inline-flex;
  font-size: 0.75rem;
  font-weight: 800;
  gap: 5px;
  padding: 4px 8px;
}

.team-cup-side-badge i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--team-cup-side);
}

.team-cup-stage-summary {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 1.1rem;
  color: #40564a;
  font-size: 0.78rem;
  line-height: 1.3;
}

.team-cup-empty {
  margin: 0;
}

.team-cup-sheet {
  max-width: 1100px;
  width: min(98vw, 1100px);
  min-width: 0;
}

.team-cup-modal-body {
  display: grid;
  /* Keep each section at its full content height; the modal body owns the one scroll. */
  align-content: start;
  gap: 16px;
  grid-auto-rows: max-content;
  min-width: 0;
  overflow-x: hidden;
}

.team-cup-details {
  display: grid;
  grid-template-columns: minmax(155px, 220px) minmax(0, 1fr);
  gap: 10px;
  align-items: end;
  border: 1px solid #d5e0da;
  border-radius: 10px;
  background: #f8fbf9;
  padding: 12px;
}

.team-cup-details > div {
  display: grid;
  gap: 6px;
}

.team-cup-section-title {
  color: var(--admin-theme-ink, #193e2d);
  font-size: 1.06rem;
  font-weight: 850;
  line-height: 1.1;
}

.team-cup-round-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.team-cup-round-checks label {
  align-items: center;
  border: 1px solid #cad9d0;
  border-radius: 7px;
  display: inline-flex;
  gap: 5px;
  min-height: 28px;
  padding: 2px 6px;
  color: #2b4a3a;
  font-size: 0.7rem;
  font-weight: 720;
}

.team-cup-mode-picker {
  display: grid;
  gap: 8px;
  background: #f8fbf9;
  padding: 11px;
}

.team-cup-mode-picker > header {
  display: grid;
  gap: 1px;
}

.team-cup-mode-picker > header span {
  color: #5b6c63;
  font-size: 0.75rem;
}

.team-cup-mode-picker > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.team-cup-mode-option {
  display: grid;
  gap: 4px;
  min-width: 0;
  border: 1.5px solid #c8d8ce;
  border-radius: 9px;
  background: #ffffff;
  color: #274738;
  cursor: pointer;
  font: inherit;
  padding: 9px 10px;
  text-align: left;
}

.team-cup-mode-option strong {
  font-size: .84rem;
}

.team-cup-mode-option span {
  color: #576d61;
  font-size: .72rem;
  line-height: 1.3;
}

.team-cup-mode-option.selected {
  border-color: var(--admin-theme-primary, #17633f);
  background: color-mix(in srgb, var(--admin-theme-primary, #17633f) 11%, #ffffff);
  box-shadow: inset 0 0 0 1px var(--admin-theme-primary, #17633f);
}

.team-cup-team-builder {
  display: grid;
  gap: 10px;
  border-color: color-mix(in srgb, var(--admin-theme-primary, #17633f) 42%, #c7d9cd);
  box-shadow: inset 0 4px 0 color-mix(in srgb, var(--admin-theme-primary, #17633f) 82%, #ffffff);
  /* The player stacks must never be collapsed by the constrained modal grid. */
  min-height: max-content;
  overflow: hidden;
}

.team-cup-team-builder > header,
.team-cup-partners > header {
  padding: 10px 11px 0;
}

.team-cup-team-dnd {
  display: grid;
  grid-template-columns: minmax(0, .94fr) minmax(140px, .72fr) minmax(0, .94fr);
  gap: 10px;
  padding: 0 11px;
  min-width: 0;
}

.team-cup-team-column,
.team-cup-field-column,
.team-cup-partner-team {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
  border: 1px solid color-mix(in srgb, var(--team-cup-side, #719081) 38%, #d9e6de);
  border-radius: 9px;
  background: color-mix(in srgb, var(--team-cup-side, #719081) 6%, #ffffff);
  padding: 8px;
}

.team-cup-team-column {
  border-top: 5px solid var(--team-cup-side);
}

.team-cup-team-column > header {
  align-items: end;
}

.team-cup-team-column label {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.team-cup-team-column label span,
.team-cup-field-column > header span,
.team-cup-partner-team > header span {
  color: #53685c;
  font-size: .68rem;
  font-weight: 760;
}

.team-cup-team-column input {
  width: min(132px, 100%);
  min-height: 31px;
  border: 1px solid #b8cabd;
  border-radius: 7px;
  background: #fff;
  color: #173b2a;
  font: inherit;
  font-size: .8rem;
  padding: 4px 7px;
}

.team-cup-team-column > header > b {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--team-cup-side);
  color: #ffffff;
  font-size: .78rem;
}

.team-cup-field-column {
  border-color: #cbd8d0;
  background: #f8fbf9;
  /* Keep the field as a generous drop zone even when every player is on a team. */
  min-height: 312px;
}

.team-cup-field-column > header strong,
.team-cup-partner-team > header strong {
  color: #244a37;
  font-size: .8rem;
}

.team-cup-field-stack,
.team-cup-team-stack,
.team-cup-partner-team > div {
  display: grid;
  align-content: start;
  gap: 5px;
  min-height: 38px;
}

.team-cup-player-token {
  overflow: hidden;
  width: 100%;
  min-height: 29px;
  border: 1px solid color-mix(in srgb, var(--team-cup-side, #17633f) 31%, #bfd0c4);
  border-radius: 6px;
  background: #ffffff;
  color: #244634;
  cursor: grab;
  font: inherit;
  font-size: .72rem;
  font-weight: 700;
  padding: 4px 6px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-cup-player-token.compact {
  min-height: 27px;
  font-size: .67rem;
}

.team-cup-player-token.tap-selected {
  outline: 3px solid color-mix(in srgb, var(--admin-theme-primary, #17633f) 74%, #ffffff);
  outline-offset: 1px;
  background: color-mix(in srgb, var(--admin-theme-primary, #17633f) 16%, #ffffff);
}

.team-cup-player-token:active,
.team-cup-player-token.is-dragging {
  cursor: grabbing;
  opacity: .44;
}

.team-cup-player-token[aria-disabled="true"] {
  cursor: default;
}

.team-cup-drop-copy {
  color: #697b71;
  font-size: .73rem;
  font-style: italic;
  padding: 5px 2px;
}

.team-cup-drop-ready {
  outline: 2px dashed var(--admin-theme-primary, #17633f);
  outline-offset: 2px;
}

.team-cup-team-builder > footer {
  border-top: 1px solid #e1e9e4;
  color: #596e62;
  font-size: .75rem;
  padding: 8px 11px 10px;
}

.team-cup-tally {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding: 9px 11px;
}

.team-cup-tally > strong {
  color: #193e2d;
  font-size: .82rem;
}

.team-cup-tally > span {
  color: #375847;
  font-size: .78rem;
  font-weight: 720;
}

.team-cup-tally > span::before {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 4px;
  border-radius: 50%;
  background: var(--team-cup-side);
  content: '';
}

.team-cup-tally b {
  font-size: 1rem;
}

.team-cup-tally small {
  color: #62766a;
  font-size: .72rem;
}

.team-cup-stages {
  display: grid;
  gap: 10px;
}

.team-cup-round-stages {
  display: grid;
  gap: 10px;
  border: 1px solid color-mix(in srgb, var(--admin-theme-primary, #17633f) 32%, #d4e1d9);
  border-radius: 10px;
  background: #fbfcfb;
  overflow: hidden;
}

.team-cup-round-stages > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #dce7e0;
  background: color-mix(in srgb, var(--admin-theme-primary, #17633f) 6%, #ffffff);
  padding: 10px 11px;
}

.team-cup-round-stages > header > div:first-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.team-cup-round-stages > header strong {
  color: var(--admin-theme-ink, #193e2d);
  font-size: 1.04rem;
  font-weight: 850;
}

.team-cup-round-stages > header > div:first-child > span {
  color: #50675a;
  font-size: .76rem;
  font-weight: 680;
}

.team-cup-round-hole-scope {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: end;
  gap: 5px 9px;
  margin: 0;
  min-width: 0;
  padding: 0;
  border: 0;
}

.team-cup-round-hole-scope legend {
  width: 100%;
  margin: 0 0 1px;
  color: #607468;
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-align: right;
  text-transform: uppercase;
}

.team-cup-round-hole-scope label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #315441;
  font-size: .7rem;
  font-weight: 730;
  white-space: nowrap;
}

.team-cup-round-hole-scope input {
  width: 14px;
  height: 14px;
  margin: 0;
}

.team-cup-round-stage-list {
  display: grid;
  gap: 9px;
  padding: 0 10px 10px;
}

.team-cup-round-empty {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px dashed #b9cec0;
  border-radius: 8px;
  color: #5a7164;
  font-size: .78rem;
  padding: 10px;
}

.team-cup-stage {
  overflow: hidden;
}

.team-cup-stage > header {
  color: #244634;
  background: #ffffff;
  border-bottom: 1px solid #d6e2da;
  padding: 10px 11px 8px;
}

.team-cup-stage > header span {
  color: #61776a;
  font-size: .67rem;
  font-weight: 750;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.team-cup-stage > header strong {
  color: var(--admin-theme-ink, #193e2d);
}

.team-cup-stage > header .team-cup-stage-order {
  color: var(--admin-theme-ink, #193e2d);
  font-size: 1.08rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: none;
}

.team-cup-stage > header .team-cup-stage-type {
  color: #456353;
  font-size: .84rem;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: none;
}

.team-cup-stage > header .admin-action {
  border-color: #bdcfc3;
  background: #ffffff;
  color: #315540;
}

.team-cup-stage-grid {
  display: grid;
  grid-template-columns: minmax(100px, .9fr) minmax(104px, .9fr) minmax(154px, 1.35fr) minmax(170px, 1.35fr) minmax(70px, .56fr) minmax(86px, .7fr) minmax(76px, .6fr) minmax(72px, .56fr);
  gap: 8px;
  padding: 11px;
  min-width: 0;
}

.team-cup-stage-grid.is-team-score,
.team-cup-stage-grid:has(.team-cup-stage-size) {
  grid-template-columns: minmax(100px, .88fr) minmax(100px, .82fr) 56px 96px minmax(160px, 1.08fr) minmax(172px, 1.16fr) minmax(70px, .56fr) minmax(72px, .58fr);
}

.team-cup-stage-grid.is-team-score .team-cup-stage-size select {
  padding-inline: 4px;
  text-align: center;
}

.team-cup-stage-grid .admin-field {
  align-content: start;
  gap: 2px;
  min-width: 0;
}

.team-cup-stage-grid .admin-field > span:first-child {
  display: block;
  text-align: center;
}

.team-cup-stage-grid select,
.team-cup-stage-grid input,
.team-cup-stableford input,
.team-cup-traditional-result select,
.team-cup-traditional-result input {
  box-sizing: border-box;
  width: 100%;
  min-height: 28px;
  border: 1px solid #b9cabe;
  border-radius: 7px;
  background: #ffffff;
  color: #153928;
  font: inherit;
  padding: 2px 6px;
}

.team-cup-stableford {
  display: grid;
  gap: 5px;
  margin: 0 11px 8px;
  border: 1px solid color-mix(in srgb, var(--admin-theme-primary, #17633f) 34%, #d2e0d7);
  border-radius: 8px;
  background: color-mix(in srgb, var(--admin-theme-primary, #17633f) 5%, #ffffff);
  padding: 6px 8px;
}

.team-cup-stableford > header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}

.team-cup-stableford > header strong {
  color: var(--admin-theme-ink, #193e2d);
  font-size: 1rem;
  line-height: 1;
}

.team-cup-stableford-modify,
.team-cup-stableford-hio > label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #30523f;
  font-size: .75rem;
  font-weight: 750;
}

.team-cup-stableford-modify input,
.team-cup-stableford-hio input[type="checkbox"] {
  width: 15px;
  height: 15px;
  min-height: 15px;
  margin: 0;
}

.team-cup-stableford-point-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(60px, max-content));
  align-items: stretch;
  gap: 4px;
}

.team-cup-stableford-point-grid label {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  min-width: 0;
  border: 1px solid #d4e0d8;
  border-radius: 5px;
  background: #fdfefd;
  padding: 1px 2px;
}

.team-cup-stableford-point-grid label > span {
  color: #536a5e;
  font-size: .6rem;
  font-weight: 760;
  line-height: .78rem;
  overflow-wrap: anywhere;
  text-align: center;
}

.team-cup-stableford-value {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 18px;
}

.team-cup-stableford-point-grid output,
.team-cup-stableford-point-grid input {
  min-width: 0;
  min-height: 18px;
  height: 18px;
  padding: 0 3px;
  color: #1d5038;
  font-size: .9rem;
  font-weight: 850;
  line-height: 16px;
  text-align: center;
}

.team-cup-stableford-point-grid output {
  border: 1px solid transparent;
  background: transparent;
}

.team-cup-stableford-point-grid.is-editing input {
  width: 42px;
  min-width: 42px;
  min-height: 18px;
  border: 1px solid #9db8a8;
  border-radius: 5px;
  background: #ffffff;
}

.team-cup-negative-prefix {
  color: #1d5038;
  font-size: .92rem;
  line-height: 1;
}

.team-cup-stableford-value.is-negative input {
  width: 36px;
  min-width: 36px;
}

.team-cup-stableford-hio {
  min-width: 0 !important;
}

.team-cup-stableford-hio-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 18px;
}

.team-cup-stableford-hio input[type="checkbox"] {
  width: 13px;
  height: 13px;
  min-height: 13px;
  margin: 0;
}

.team-cup-stableford-hio input[type="text"] {
  width: 32px;
  min-width: 32px;
  min-height: 18px;
  height: 18px;
  text-align: center;
}

.team-cup-stableford-hio.is-disabled { opacity: .55; }

.team-cup-hole-range {
  display: grid;
  align-items: center;
  gap: 3px;
  grid-template-columns: .7rem minmax(36px, 1fr) auto minmax(36px, 1fr);
}

.team-cup-hole-range b {
  color: #5c6d64;
  font-size: .75rem;
}

.team-cup-hole-range em {
  color: #5c6d64;
  font-size: .7rem;
  font-style: normal;
  font-weight: 700;
  text-align: center;
}

.team-cup-hole-range select {
  min-width: 36px;
  padding-inline: 4px;
  text-align: center;
}

.team-cup-stage-holes > small {
  display: block;
  margin-top: 3px;
  color: #62746a;
  font-size: .57rem;
  font-weight: 650;
  line-height: 1.1;
  text-align: center;
}

.team-cup-stage-help {
  margin: 0;
  border-top: 1px solid #e2ebe5;
  border-bottom: 1px solid #e2ebe5;
  color: #50665a;
  background: #f8fbf9;
  padding: 8px 11px;
  font-size: .76rem;
  line-height: 1.35;
}

.team-cup-partners {
  display: grid;
  gap: 9px;
  margin: 10px;
  border-color: #d2e0d7;
  background: #fbfcfb;
}

.team-cup-partners > header {
  padding: 9px 10px 0;
}

.team-cup-partner-board {
  display: grid;
  align-items: start;
  grid-template-columns: minmax(128px, .64fr) minmax(310px, 1.65fr) minmax(128px, .64fr);
  gap: 9px;
  padding: 0 10px 10px;
}

.team-cup-mobile-match-controls {
  display: none;
}

.team-cup-partner-team {
  border-top: 4px solid var(--team-cup-side);
}

.team-cup-partner-team > header {
  display: grid;
  gap: 1px;
}

.team-cup-match-list {
  display: grid;
  gap: 7px;
}

.team-cup-matchup {
  overflow: hidden;
  border-color: #d1ddd5;
}

.team-cup-matchup-labels {
  display: grid;
  align-items: center;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 8px;
  border-bottom: 1px solid #e1eae4;
  padding: 6px 8px;
}

.team-cup-matchup-labels strong {
  color: #214634;
  font-size: .8rem;
  text-align: center;
}

.team-cup-matchup-labels span {
  color: var(--team-cup-side, #244634);
  font-size: .69rem;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-cup-matchup-labels span:last-child {
  text-align: right;
}

.team-cup-matchup-labels.is-separated span,
.team-cup-matchup-labels.is-separated span:last-child {
  text-align: center;
}

.team-cup-matchup-sides {
  display: grid;
  align-items: center;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 8px;
  padding: 8px;
}

.team-cup-matchup-side {
  display: grid;
  gap: 4px;
  min-height: 36px;
  border-left: 4px solid var(--team-cup-side);
  border-radius: 5px;
  background: color-mix(in srgb, var(--team-cup-side) 6%, #ffffff);
  padding: 5px;
}

.team-cup-match-slot {
  min-height: 30px;
  border: 1px dashed color-mix(in srgb, var(--team-cup-side, #17633f) 49%, #9db2a5);
  border-radius: 5px;
  color: #718177;
  font-size: .71rem;
  font-style: italic;
  padding: 2px;
}

.team-cup-match-slot:not(.filled) {
  display: grid;
  place-items: center;
}

.team-cup-match-slot.filled {
  border-style: solid;
}

.team-cup-versus {
  color: var(--admin-theme-primary, #17633f);
  font-size: .86rem;
  font-weight: 900;
  text-transform: uppercase;
}

.team-cup-with {
  color: var(--admin-theme-primary, #17633f);
  font-size: .62rem;
  font-weight: 900;
  line-height: .78rem;
  text-align: center;
}

.team-cup-matchup.pairing-only {
  border-color: color-mix(in srgb, var(--admin-theme-primary, #17633f) 28%, #d1ddd5);
}

.team-cup-traditional-result {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(80px, .5fr);
  gap: 7px;
  border-top: 1px solid #e4ece7;
  background: #f8fbf9;
  padding: 7px 8px;
}

.team-cup-traditional-result label {
  display: grid;
  gap: 2px;
}

.team-cup-traditional-result label span {
  color: #53685c;
  font-size: .67rem;
  font-weight: 750;
}

.team-cup-stage > footer {
  border-top: 1px solid #e2ebe5;
  background: #fbfcfb;
  padding: 9px 10px;
}

/* Stroke Play keeps the two Cup rosters around one neutral pairing column. */
body[data-admin-theme] .team-cup-modal .team-cup-pairing-scroll {
  min-width: 0;
  overflow-x: auto;
  padding: 0 10px 10px;
}

body[data-admin-theme] .team-cup-modal .team-cup-pairing-board {
  display: grid;
  grid-template-columns: minmax(100px, .65fr) minmax(570px, 1.7fr) minmax(100px, .65fr);
  align-items: start;
  gap: 8px;
  min-width: 790px;
}

body[data-admin-theme] .team-cup-modal .team-cup-pairing-center {
  display: grid;
  gap: 8px;
  min-width: 0;
}

body[data-admin-theme] .team-cup-modal .team-cup-pairing-roster {
  /* Do not inherit Match Play's mobile reordering of its side stacks. */
  order: 0;
  min-width: 0;
  min-height: 136px;
  margin: 0;
  border-top-color: var(--team-cup-side);
}

body[data-admin-theme] .team-cup-modal .team-cup-pairing-roster > div {
  min-height: 70px;
}

body[data-admin-theme] .team-cup-modal .team-cup-pairing-settings,
body[data-admin-theme] .team-cup-modal .team-cup-pairing-head {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 5px;
  min-width: 0;
  margin: 0;
  background: #ffffff;
  border: 1px solid var(--team-cup-ui-line);
  border-radius: 5px;
  font-size: 14px;
  line-height: 18px;
}

body[data-admin-theme] .team-cup-modal .team-cup-pairings :is(.team-cup-pairing-settings, .team-cup-pairing-head) :is(label, span, strong, input, select, button) {
  font: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 18px;
  text-transform: none;
  letter-spacing: normal;
}

body[data-admin-theme] .team-cup-modal .team-cup-pairings :is(.team-cup-pairing-settings, .team-cup-pairing-head) label {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 3px;
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  white-space: nowrap;
}

body[data-admin-theme] .team-cup-modal .team-cup-pairings :is(.team-cup-pairing-settings, .team-cup-pairing-head) :is(input, select, button):not(.scoodle-reliable-select-native) {
  box-sizing: content-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  height: 18px;
  min-height: 18px;
  max-height: 18px;
  min-width: 0;
  margin: 0;
  padding: 2px;
  border: 1px solid var(--team-cup-ui-line);
  border-radius: 3px;
  color: var(--team-cup-ui-ink);
  background: #fff;
  box-shadow: none;
  text-align: center;
}

body[data-admin-theme] .team-cup-modal .team-cup-pairing-settings .scoodle-reliable-select {
  flex: 0 0 auto;
  width: auto;
}

body[data-admin-theme] .team-cup-modal .team-cup-pairing-settings .scoodle-reliable-select-chevron {
  display: none;
}

body[data-admin-theme] .team-cup-modal .team-cup-pairings .team-cup-pairing-settings .team-cup-group-size :is(select, .scoodle-reliable-select-button) {
  width: 15px;
  min-width: 2ch;
}

body[data-admin-theme] .team-cup-modal .team-cup-pairing-settings .team-cup-interval :is(select, .scoodle-reliable-select-button) {
  width: 20px;
}

/* A full smart time needs seven characters; keep it readable after formatting. */
body[data-admin-theme] .team-cup-modal .team-cup-pairings :is(.team-cup-pairing-settings, .team-cup-pairing-head) input[type="text"] {
  width: 25px;
  min-width: 9ch;
}

body[data-admin-theme] .team-cup-modal .team-cup-pairings .team-cup-pairing-settings button.team-cup-set-times {
  width: 15px;
  min-width: 3ch;
  color: #fff;
  border-color: var(--team-cup-ui-blue);
  background: var(--team-cup-ui-blue);
  cursor: pointer;
}

body[data-admin-theme] .team-cup-modal .team-cup-pairings .team-cup-pairing-settings :is(.team-cup-start-tee, .team-cup-shotgun-direction, .team-cup-shotgun-groups, .team-cup-start-hole) .scoodle-reliable-select-button {
  width: var(--pairing-select-width, 8ch);
  min-width: var(--pairing-select-width, 8ch);
}

.team-cup-pairings .team-cup-shotgun-direction { --pairing-select-width: 10ch; }
.team-cup-pairings .team-cup-shotgun-groups { --pairing-select-width: 6ch; }
.team-cup-pairings .team-cup-start-hole { --pairing-select-width: 2.5ch; }

body[data-admin-theme] .team-cup-modal .team-cup-pairings .team-cup-pairing-settings button.team-cup-assign-starts {
  width: 6ch;
  min-width: 6ch;
  color: #fff;
  border-color: var(--team-cup-ui-blue);
  background: var(--team-cup-ui-blue);
}

body[data-admin-theme] .team-cup-modal .team-cup-pairings .team-cup-pairing-head input[type="text"][data-team-cup-pairing-tee] {
  width: 3.5ch;
  min-width: 3.5ch;
}

body[data-admin-theme] .team-cup-modal .team-cup-pairing-list {
  display: grid;
  gap: 8px;
}

body[data-admin-theme] .team-cup-modal .team-cup-pairing {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--team-cup-ui-line);
  border-radius: 6px;
  background: #fff;
}

body[data-admin-theme] .team-cup-modal .team-cup-pairing-head {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-width: 0 0 1px;
  border-radius: 0;
}

body[data-admin-theme] .team-cup-modal .team-cup-pairings .team-cup-pairing-head > strong {
  justify-self: start;
  font-size: 18px;
  font-weight: 700;
  line-height: 24px;
  text-align: left;
}

body[data-admin-theme] .team-cup-modal .team-cup-pairings .team-cup-pairing-head > label {
  justify-self: center;
}

body[data-admin-theme] .team-cup-modal .team-cup-stage > footer.team-cup-pairing-send-row {
  justify-content: flex-start;
  flex-wrap: wrap;
}

body[data-admin-theme] .team-cup-modal .team-cup-stage > footer > .team-cup-pairings-sent-time {
  color: var(--team-cup-ui-ink);
  font-size: 12px;
  font-weight: 400;
}

body[data-admin-theme] .team-cup-modal .team-cup-stage > footer > .team-cup-pairing-send-message {
  color: #a9152c;
  font-size: 13px;
  font-weight: 400;
}

body[data-admin-theme] .team-cup-modal .team-cup-stage > footer > .team-cup-pairing-send-message[hidden] {
  display: none;
}

body[data-admin-theme] .team-cup-modal .team-cup-pairing-slots {
  display: grid;
  gap: 4px;
  padding: 5px;
}

body[data-admin-theme] .team-cup-modal .team-cup-pairing-slot {
  min-width: 0;
  min-height: 27px;
  border-color: var(--team-cup-ui-line);
  font-size: 12px;
}

body[data-admin-theme] .team-cup-modal .team-cup-pairing-player {
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  gap: 6px;
  font-size: 14px;
  font-style: normal;
}

body[data-admin-theme] .team-cup-modal .team-cup-pairing-player .team-cup-player-token {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  font: inherit;
}

body[data-admin-theme] .team-cup-modal .team-cup-pairing-player > span {
  flex: 0 1 auto;
  max-width: 40%;
  margin-left: auto;
  text-align: right;
  overflow-wrap: anywhere;
  font: inherit;
}

body[data-admin-theme] .team-cup-modal .team-cup-pairing-roster .team-cup-player-token {
  font-size: 14px;
  font-weight: 400;
}
.team-cup-modal-message {
  min-height: 1.1rem;
  margin: 0;
  color: #557267;
  font-size: .78rem;
  font-weight: 700;
}

.team-cup-modal-message[data-tone="error"] {
  color: #a5281d;
}

/* team-cup-blue-red-refresh-23
   Team Cup is a tournament workspace, not an inherited Irish-format card.
   Give it a clean USA control system: navy structure, white surfaces, and
   blue/red side identities. This overrides the original green panel and text
   treatments when the current organization uses another theme. */
body[data-admin-theme] .team-cup-modal,
body[data-admin-theme] [data-team-cup-board] {
  --team-cup-ui-blue: #2854a6;
  --team-cup-ui-ink: #142653;
  --team-cup-ui-muted: #52637f;
  --team-cup-ui-line: #c7d4eb;
  --team-cup-ui-soft: #f5f8ff;
}

body[data-admin-theme] .team-cup-modal .round-format-modal-head {
  background: var(--team-cup-ui-blue);
}

body[data-admin-theme] .team-cup-modal .round-format-modal-head strong,
body[data-admin-theme] .team-cup-modal .round-format-modal-head span {
  color: #ffffff;
}

body[data-admin-theme] .team-cup-board,
body[data-admin-theme] .team-cup-modal .team-cup-details,
body[data-admin-theme] .team-cup-modal .team-cup-mode-picker,
body[data-admin-theme] .team-cup-modal .team-cup-field-column,
body[data-admin-theme] .team-cup-modal .team-cup-pairing-field,
body[data-admin-theme] .team-cup-modal .team-cup-round-stages,
body[data-admin-theme] .team-cup-modal .team-cup-stableford,
body[data-admin-theme] .team-cup-modal .team-cup-partners,
body[data-admin-theme] .team-cup-modal .team-cup-stage-help,
body[data-admin-theme] .team-cup-modal .team-cup-traditional-result,
body[data-admin-theme] .team-cup-modal .team-cup-stage > footer {
  background: var(--team-cup-ui-soft);
  border-color: var(--team-cup-ui-line);
}

body[data-admin-theme] .team-cup-modal .team-cup-round-stages > header {
  background: #eaf0ff;
  border-color: var(--team-cup-ui-line);
}

body[data-admin-theme] .team-cup-board,
body[data-admin-theme] .team-cup-modal .team-cup-summary-card,
body[data-admin-theme] .team-cup-modal .team-cup-stage,
body[data-admin-theme] .team-cup-modal .team-cup-team-builder,
body[data-admin-theme] .team-cup-modal .team-cup-partners,
body[data-admin-theme] .team-cup-modal .team-cup-matchup,
body[data-admin-theme] .team-cup-modal .team-cup-pairing,
body[data-admin-theme] .team-cup-modal .team-cup-mode-picker,
body[data-admin-theme] .team-cup-modal .team-cup-tally,
body[data-admin-theme] .team-cup-modal .team-cup-team-column,
body[data-admin-theme] .team-cup-modal .team-cup-field-column,
body[data-admin-theme] .team-cup-modal .team-cup-partner-team,
body[data-admin-theme] .team-cup-modal .team-cup-pairing-field,
body[data-admin-theme] .team-cup-modal .team-cup-round-stages,
body[data-admin-theme] .team-cup-modal .team-cup-stableford,
body[data-admin-theme] .team-cup-modal .team-cup-matchup.pairing-only {
  border-color: var(--team-cup-ui-line);
}

body[data-admin-theme] .team-cup-modal .team-cup-team-builder {
  box-shadow: inset 0 4px 0 var(--team-cup-ui-blue);
}

body[data-admin-theme] .team-cup-modal .team-cup-mode-option,
body[data-admin-theme] .team-cup-modal .team-cup-stage-grid select,
body[data-admin-theme] .team-cup-modal .team-cup-stage-grid input,
body[data-admin-theme] .team-cup-modal .team-cup-stableford input,
body[data-admin-theme] .team-cup-modal .team-cup-traditional-result select,
body[data-admin-theme] .team-cup-modal .team-cup-traditional-result input,
body[data-admin-theme] .team-cup-modal .team-cup-team-column input,
body[data-admin-theme] .team-cup-modal .team-cup-pairing-settings input,
body[data-admin-theme] .team-cup-modal .team-cup-pairing-settings select,
body[data-admin-theme] .team-cup-modal .team-cup-pairing-head input,
body[data-admin-theme] .team-cup-modal .team-cup-player-token,
body[data-admin-theme] .team-cup-modal .team-cup-stableford-point-grid label {
  background: #ffffff;
  border-color: var(--team-cup-ui-line);
  color: var(--team-cup-ui-ink);
}

body[data-admin-theme] .team-cup-modal .team-cup-mode-option.selected {
  background: #eaf0ff;
  border-color: var(--team-cup-ui-blue);
  box-shadow: inset 0 0 0 1px var(--team-cup-ui-blue);
}

body[data-admin-theme] .team-cup-board :is(strong, span, small, p, li, label, output, input, select, b, em),
body[data-admin-theme] .team-cup-modal :is(.team-cup-details, .team-cup-mode-picker, .team-cup-team-builder, .team-cup-field-column, .team-cup-partners, .team-cup-round-stages, .team-cup-stage, .team-cup-stableford, .team-cup-tally, .team-cup-stage-help, .team-cup-traditional-result, .team-cup-modal-message) :is(strong, span, small, p, li, label, output, input, select, b, em) {
  color: var(--team-cup-ui-ink);
}

body[data-admin-theme] .team-cup-board :is(.team-cup-board-head span, .team-cup-summary-head span, .team-cup-stage-summary, .team-cup-empty),
body[data-admin-theme] .team-cup-modal :is(.team-cup-round-stages > header > div:first-child > span, .team-cup-mode-option span, .team-cup-stage > header span, .team-cup-drop-copy, .team-cup-team-builder > footer, .team-cup-tally small, .team-cup-stage-help, .team-cup-modal-message, .team-cup-stableford-point-grid label > span, .team-cup-traditional-result label span) {
  color: var(--team-cup-ui-muted);
}

body[data-admin-theme] .team-cup-modal .team-cup-section-title,
body[data-admin-theme] .team-cup-modal .team-cup-stage > header .team-cup-stage-order,
body[data-admin-theme] .team-cup-modal .team-cup-round-stages > header strong,
body[data-admin-theme] .team-cup-modal .team-cup-stage > header .team-cup-stage-type,
body[data-admin-theme] .team-cup-modal .team-cup-stableford > header strong {
  color: var(--team-cup-ui-ink);
}

body[data-admin-theme] .team-cup-modal .team-cup-versus,
body[data-admin-theme] .team-cup-modal .team-cup-with {
  color: var(--team-cup-ui-blue);
}

/* Keep the intentional side identities distinct from the navy workspace text. */
body[data-admin-theme] .team-cup-modal .team-cup-team-column > header > b {
  color: #ffffff;
}

body[data-admin-theme] .team-cup-modal .team-cup-matchup-labels span {
  color: var(--team-cup-side);
}

body[data-admin-theme] .team-cup-modal .team-cup-pairing-player > span {
  color: var(--team-cup-side);
}

body[data-admin-theme] .team-cup-modal .team-cup-player-token.tap-selected {
  background: #eaf0ff;
  outline-color: #6c8bd1;
}

body[data-admin-theme] .team-cup-modal .team-cup-drop-ready {
  outline-color: var(--team-cup-ui-blue);
}

/* team-cup-two-control-footer-25 */
body[data-admin-theme] .team-cup-modal .round-format-footer {
  flex-wrap: nowrap;
  justify-content: flex-end;
}

body[data-admin-theme] .team-cup-modal .round-format-footer [data-team-cup-save] {
  background: var(--team-cup-ui-blue);
  border-color: var(--team-cup-ui-blue);
  color: #ffffff;
  min-width: 100px;
}

body[data-admin-theme] .team-cup-modal .round-format-footer [data-team-cup-save]:disabled {
  background: var(--team-cup-ui-blue);
  border-color: var(--team-cup-ui-blue);
  color: #ffffff;
  opacity: 1;
}

body[data-admin-theme] :is(.team-cup-modal, [data-team-cup-board]) .admin-action.secondary {
  background: #ffffff !important;
  border-color: var(--team-cup-ui-blue, #2854a6) !important;
  color: var(--team-cup-ui-blue, #2854a6) !important;
}

body[data-admin-theme] .team-cup-modal .team-cup-modal-message[data-tone="error"] {
  color: #a5281d;
}

@media (max-width: 980px) {
  .team-cup-stage-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .team-cup-stage-grid.is-team-score {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .team-cup-stage-title {
    grid-column: span 2;
  }

  .team-cup-round-stages > header {
    align-items: start;
    flex-direction: column;
  }

  .team-cup-round-hole-scope,
  .team-cup-round-hole-scope legend {
    justify-content: start;
    text-align: left;
  }

  .team-cup-stableford-point-grid {
    gap: 6px 9px;
  }
}

@media (max-width: 720px) {
  .team-cup-board-head,
  .team-cup-summary-head,
  .team-cup-team-builder > header,
  .team-cup-partners > header,
  .team-cup-stage > footer,
  .team-cup-stage > header {
    align-items: start;
    flex-direction: column;
  }

  .team-cup-round-stages > header {
    align-items: start;
    flex-direction: column;
  }

  .team-cup-round-hole-scope,
  .team-cup-round-hole-scope legend {
    justify-content: start;
    text-align: left;
  }

  .team-cup-details,
  .team-cup-mode-picker > div {
    grid-template-columns: 1fr;
  }

  /* Keep Team Builder's two teams and Field of Players visible together. */
  .team-cup-team-dnd {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
    padding: 0 6px;
  }

  /* Keep the Partner Builder's two team stacks around the match column. */
  .team-cup-partner-board {
    grid-template-columns: minmax(68px, .82fr) minmax(112px, 1.36fr) minmax(68px, .82fr);
    gap: 5px;
    padding: 0 6px 7px;
  }

  .team-cup-mobile-match-controls {
    display: grid;
    align-items: center;
    grid-template-columns: 34px minmax(0, 1fr) 34px;
    gap: 6px;
    margin: 0 6px;
  }

  .team-cup-mobile-match-controls .admin-action {
    min-height: 31px;
    padding: 2px;
    font-size: 1.18rem;
    line-height: 1;
  }

  .team-cup-mobile-match-controls strong {
    color: #214634;
    font-size: .76rem;
    text-align: center;
  }

  .team-cup-team-column,
  .team-cup-field-column,
  .team-cup-partner-team {
    gap: 5px;
    border-radius: 7px;
    padding: 5px;
  }

  .team-cup-team-column input {
    width: 100%;
    min-height: 28px;
    font-size: .69rem;
    padding: 3px 4px;
  }

  .team-cup-team-column > header > b {
    width: 22px;
    height: 22px;
    font-size: .67rem;
  }

  .team-cup-field-column {
    min-height: 240px;
  }

  .team-cup-player-token {
    min-height: 27px;
    font-size: .64rem;
    padding: 3px 4px;
  }

  .team-cup-player-token.compact {
    min-height: 25px;
    font-size: .62rem;
    padding: 2px 3px;
  }

  .team-cup-partner-team > header strong,
  .team-cup-field-column > header strong {
    font-size: .68rem;
  }

  .team-cup-team-column label span,
  .team-cup-field-column > header span,
  .team-cup-partner-team > header span {
    font-size: .58rem;
  }

  .team-cup-match-list > .team-cup-matchup:not(.mobile-active) {
    display: none;
  }

  .team-cup-matchup-labels {
    display: block;
    padding: 5px 4px 2px;
    text-align: center;
  }

  .team-cup-matchup-labels strong {
    font-size: .72rem;
  }

  .team-cup-matchup-labels span {
    display: none;
  }

  .team-cup-matchup-sides {
    grid-template-columns: 24px minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 5px 4px;
    padding: 4px;
  }

  .team-cup-matchup-side {
    gap: 4px;
    min-height: 34px;
    border-left-width: 3px;
    padding: 4px;
  }

  /* Keep the active match in a compact stagger: Team A above-left, then
     Team B below-right with the vertical VS/WITH lane beside it. */
  .team-cup-matchup-side:first-child {
    grid-column: 1 / -1;
    grid-row: 1;
    width: calc(100% - 24px);
    justify-self: start;
  }

  .team-cup-matchup-side:last-child {
    grid-column: 2;
    grid-row: 2;
  }

  .team-cup-match-slot {
    min-height: 30px;
    font-size: .62rem;
    padding: 2px;
  }

  .team-cup-versus {
    grid-column: 1;
    grid-row: 2;
    justify-self: center;
    font-size: .75rem;
  }

  .team-cup-with {
    grid-column: 1;
    grid-row: 2;
    justify-self: center;
    font-size: .62rem;
    line-height: .72rem;
  }

  .team-cup-stage-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 8px;
  }

  .team-cup-stage-grid.is-team-score {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .team-cup-stage-title,
  .team-cup-stage-holes {
    grid-column: span 2;
  }

  .team-cup-stableford-options {
    align-items: center;
  }

  .team-cup-stableford-point-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
  }

  .team-cup-partner-team {
    order: 1;
  }

  .team-cup-match-list {
    order: 2;
  }

  .team-cup-partner-team:last-child {
    order: 3;
  }
}
