.round-division-summary {
  align-items: center;
  background: #eef7f1;
  border: 1px solid #cce2d3;
  border-radius: 8px;
  display: grid;
  gap: 0.55rem;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 0.65rem;
}

.round-setup-formats {
  color: #52645b;
  display: block;
  font-size: 0.78rem;
  font-weight: 750;
  margin-top: 0.16rem;
}

.round-format-details {
  border: 1px solid #dce8e0;
  border-radius: 8px;
  overflow: hidden;
}

.round-format-details summary {
  align-items: center;
  background: #f7faf8;
  color: #0f3d2b;
  cursor: pointer;
  display: grid;
  gap: 0.25rem 0.75rem;
  grid-template-columns: minmax(0, 1fr) auto;
  list-style: none;
  padding: 0.65rem;
}

.round-format-details summary::-webkit-details-marker {
  display: none;
}

.round-format-details summary::after {
  color: #17633f;
  content: "v";
  font-size: 0.9rem;
  font-weight: 950;
}

.round-format-details[open] summary::after {
  content: "^";
}

.round-format-details summary span {
  font-size: 0.9rem;
  font-weight: 900;
}

.round-format-details summary small {
  color: #52645b;
  font-size: 0.76rem;
  font-weight: 750;
  grid-column: 1 / -1;
}

.round-format-details .round-format-picker {
  border-top: 1px solid #dce8e0;
  padding: 0.6rem;
}

.round-division-summary strong,
.round-division-summary span {
  display: block;
}

.round-division-summary strong {
  color: #0f3d2b;
  font-size: 0.9rem;
}

.round-division-summary span {
  color: #52645b;
  font-size: 0.78rem;
  font-weight: 750;
  margin-top: 0.12rem;
}

/* Authoritative Rounds Preview: the same live data feeds the cards below. */
body[data-admin-theme] #adminRoundSetup .rounds-preview-workspace {
  display: grid;
  gap: 0.35rem;
  margin: 0 0 0.8rem;
}

body[data-admin-theme] #adminRoundSetup .rounds-preview-workspace > .rounds-preview-title {
  color: var(--admin-theme-ink, #14213d);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.1;
}

body[data-admin-theme] #adminRoundSetup .rounds-preview {
  --rounds-preview-date-width: 88px;
  --rounds-preview-round-width: 44px;
  --rounds-preview-course-width: 150px;
  background: #ffffff;
  border: 1px solid color-mix(in srgb, var(--admin-theme-primary, #3c3b6e) 34%, #ffffff);
  box-sizing: border-box;
  border-radius: 10px;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--admin-theme-primary, #3c3b6e) 9%, transparent);
  margin: 0;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  padding: 0.75rem;
  width: 100%;
}

body[data-admin-theme] #adminRoundSetup .rounds-preview > header {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 15px;
  justify-content: flex-start;
  margin-bottom: 0.65rem;
}

body[data-admin-theme] #adminRoundSetup .rounds-preview-controls {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
  justify-content: flex-start;
}

body[data-admin-theme] #adminRoundSetup .rounds-preview-controls label {
  align-items: center;
  color: var(--admin-theme-ink, #14213d);
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 700;
  gap: 0.32rem;
  margin: 0;
}

body[data-admin-theme] #adminRoundSetup .rounds-preview-controls label:first-child {
  align-items: center;
  display: inline-flex;
  gap: 0.32rem;
}

body[data-admin-theme] #adminRoundSetup .rounds-preview-controls select {
  background: #ffffff;
  border: 1px solid color-mix(in srgb, var(--admin-theme-primary, #3c3b6e) 45%, #ffffff);
  border-radius: 5px;
  color: var(--admin-theme-ink, #14213d);
  font: inherit;
  height: 30px;
  min-width: 58px;
  padding: 0 0.35rem;
}

body[data-admin-theme] #adminRoundSetup .rounds-preview-controls input[type="checkbox"] {
  accent-color: var(--admin-theme-primary, #3c3b6e);
  height: 16px;
  margin: 0;
  width: 16px;
}

body[data-admin-theme] #adminRoundSetup .rounds-preview-presets {
  align-items: center;
  border-bottom: 1px solid color-mix(in srgb, var(--admin-theme-primary, #3c3b6e) 20%, #ffffff);
  display: grid;
  gap: 0.55rem 0.85rem;
  grid-template-columns: minmax(180px, 0.72fr) minmax(0, 2.28fr);
  margin: 0 0 0.68rem;
  padding: 0 0 0.68rem;
}

body[data-admin-theme] #adminRoundSetup .rounds-preview-presets-title {
  display: grid;
  gap: 0.12rem;
}

body[data-admin-theme] #adminRoundSetup .rounds-preview-presets-title strong {
  color: var(--admin-theme-ink, #14213d);
  font-size: 0.92rem;
  font-weight: 800;
}

body[data-admin-theme] #adminRoundSetup .rounds-preview-presets-title span {
  color: color-mix(in srgb, var(--admin-theme-ink, #14213d) 72%, #ffffff);
  font-size: 0.7rem;
  line-height: 1.28;
}

body[data-admin-theme] #adminRoundSetup .rounds-preview-preset-list {
  display: grid;
  gap: 0.45rem;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
}

body[data-admin-theme] #adminRoundSetup .rounds-preview .rounds-preview-preset {
  align-content: start;
  background: color-mix(in srgb, var(--admin-theme-light, #eef2ff) 35%, #ffffff);
  border: 1px solid color-mix(in srgb, var(--admin-theme-primary, #3c3b6e) 38%, #ffffff);
  border-radius: 7px;
  color: var(--admin-theme-ink, #14213d);
  display: grid;
  gap: 0.16rem;
  min-height: 60px;
  padding: 0.45rem 0.52rem;
  text-align: left;
}

body[data-admin-theme] #adminRoundSetup .rounds-preview .rounds-preview-preset strong {
  color: var(--admin-theme-primary, #3c3b6e);
  font-size: 0.84rem;
  font-weight: 850;
}

body[data-admin-theme] #adminRoundSetup .rounds-preview .rounds-preview-preset small {
  color: color-mix(in srgb, var(--admin-theme-ink, #14213d) 73%, #ffffff);
  font-size: 0.66rem;
  font-weight: 600;
  line-height: 1.2;
}

body[data-admin-theme] #adminRoundSetup .rounds-preview .rounds-preview-preset:hover:not(:disabled),
body[data-admin-theme] #adminRoundSetup .rounds-preview .rounds-preview-preset:focus-visible:not(:disabled) {
  background: color-mix(in srgb, var(--admin-theme-primary, #3c3b6e) 13%, #ffffff);
  border-color: var(--admin-theme-primary, #3c3b6e);
  text-decoration: none;
}

body[data-admin-theme] #adminRoundSetup .rounds-preview .rounds-preview-preset.is-coming-soon,
body[data-admin-theme] #adminRoundSetup .rounds-preview .rounds-preview-preset:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

body[data-admin-theme] #adminRoundSetup .rounds-preview-controls .rounds-preview-clear-formats {
  background: #ffffff;
  border: 1px solid color-mix(in srgb, var(--admin-theme-primary, #3c3b6e) 54%, #ffffff);
  border-radius: 5px;
  color: var(--admin-theme-primary, #3c3b6e);
  font: inherit;
  font-size: 0.76rem;
  font-weight: 800;
  min-height: 30px;
  padding: 0.28rem 0.55rem;
}

body[data-admin-theme] #adminRoundSetup .rounds-preview-controls .rounds-preview-controls-lock {
  background: #002868;
  border: 1px solid #002868;
  border-radius: 5px;
  color: #ffffff;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 800;
  min-height: 30px;
  padding: 0.28rem 0.55rem;
}

body[data-admin-theme] #adminRoundSetup .rounds-preview-controls .rounds-preview-controls-lock:hover,
body[data-admin-theme] #adminRoundSetup .rounds-preview-controls .rounds-preview-controls-lock:focus-visible {
  background: #194d8f;
  border-color: #194d8f;
  color: #ffffff;
  text-decoration: none;
}

body[data-admin-theme] #adminRoundSetup .rounds-preview-controls .rounds-preview-controls-lock:disabled {
  background: #9ca7bb;
  border-color: #9ca7bb;
  color: #ffffff;
  cursor: not-allowed;
}

/* The unlock confirmation calls out the score-loss risk before the protected
   controls are made editable. */
.ttg-choice-modal[data-round-preview-unlock-warning="true"] .ttg-choice-body p {
  color: #b42318 !important;
  font-weight: 850;
}

body[data-admin-theme] #adminRoundSetup .rounds-preview-controls .rounds-preview-clear-formats:hover,
body[data-admin-theme] #adminRoundSetup .rounds-preview-controls .rounds-preview-clear-formats:focus-visible {
  background: color-mix(in srgb, var(--admin-theme-primary, #3c3b6e) 9%, #ffffff);
}

body[data-admin-theme] #adminRoundSetup .rounds-preview-controls .rounds-preview-clear-formats:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

body[data-admin-theme] #adminRoundSetup .rounds-preview-table-wrap {
  border: 1px solid color-mix(in srgb, var(--admin-theme-primary, #3c3b6e) 40%, #ffffff);
  border-radius: 7px;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  width: fit-content;
}

body[data-admin-theme] #adminRoundSetup .rounds-preview table {
  border-collapse: separate;
  border-spacing: 0;
  color: var(--admin-theme-ink, #14213d);
  font-size: 0.76rem;
  min-width: 0;
  table-layout: fixed;
}

body[data-admin-theme] #adminRoundSetup .rounds-preview th,
body[data-admin-theme] #adminRoundSetup .rounds-preview td {
  border-bottom: 1px solid color-mix(in srgb, var(--admin-theme-primary, #3c3b6e) 18%, #ffffff);
  border-right: 1px solid color-mix(in srgb, var(--admin-theme-primary, #3c3b6e) 14%, #ffffff);
  box-sizing: border-box;
  line-height: 1.25;
  padding: 4px 3px;
  overflow-wrap: anywhere;
  text-align: center;
  vertical-align: middle;
}

body[data-admin-theme] #adminRoundSetup .rounds-preview thead th {
  background: var(--admin-theme-primary, #3c3b6e);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 800;
  position: sticky;
  top: 0;
  z-index: 1;
}

/* Keep the identity of every round in view while the detail columns scroll. */
body[data-admin-theme] #adminRoundSetup .rounds-preview .rounds-preview-sticky-date {
  left: 0;
  min-width: var(--rounds-preview-date-width);
  position: sticky;
  width: var(--rounds-preview-date-width);
}

body[data-admin-theme] #adminRoundSetup .rounds-preview .rounds-preview-sticky-round {
  left: var(--rounds-preview-date-width);
  min-width: var(--rounds-preview-round-width);
  position: sticky;
  width: var(--rounds-preview-round-width);
}

body[data-admin-theme] #adminRoundSetup .rounds-preview .rounds-preview-sticky-course {
  left: calc(var(--rounds-preview-date-width) + var(--rounds-preview-round-width));
  min-width: var(--rounds-preview-course-width);
  position: sticky;
  width: var(--rounds-preview-course-width);
}

body[data-admin-theme] #adminRoundSetup .rounds-preview thead .rounds-preview-sticky-date,
body[data-admin-theme] #adminRoundSetup .rounds-preview thead .rounds-preview-sticky-round,
body[data-admin-theme] #adminRoundSetup .rounds-preview thead .rounds-preview-sticky-course {
  z-index: 4;
}

body[data-admin-theme] #adminRoundSetup .rounds-preview tbody .rounds-preview-sticky-date,
body[data-admin-theme] #adminRoundSetup .rounds-preview tbody .rounds-preview-sticky-round,
body[data-admin-theme] #adminRoundSetup .rounds-preview tbody .rounds-preview-sticky-course {
  background: #ffffff;
  z-index: 2;
}

/* Keep every merged Format row for a Round on the same band. */
body[data-admin-theme] #adminRoundSetup .rounds-preview tbody tr.rounds-preview-round-tone-white > * {
  background: #ffffff;
}

body[data-admin-theme] #adminRoundSetup .rounds-preview tbody tr.rounds-preview-round-tone-blue > * {
  background: color-mix(in srgb, var(--admin-theme-primary, #3c3b6e) 8%, #ffffff);
}

body[data-admin-theme="usa"] #adminRoundSetup .rounds-preview tbody tr.rounds-preview-round-tone-blue > * {
  background: #edf3ff;
}

body[data-admin-theme] #adminRoundSetup .rounds-preview tbody tr.rounds-preview-round-tone-white .rounds-preview-sticky-date,
body[data-admin-theme] #adminRoundSetup .rounds-preview tbody tr.rounds-preview-round-tone-white .rounds-preview-sticky-round,
body[data-admin-theme] #adminRoundSetup .rounds-preview tbody tr.rounds-preview-round-tone-white .rounds-preview-sticky-course {
  background: #ffffff;
}

body[data-admin-theme] #adminRoundSetup .rounds-preview tbody tr.rounds-preview-round-tone-blue .rounds-preview-sticky-date,
body[data-admin-theme] #adminRoundSetup .rounds-preview tbody tr.rounds-preview-round-tone-blue .rounds-preview-sticky-round,
body[data-admin-theme] #adminRoundSetup .rounds-preview tbody tr.rounds-preview-round-tone-blue .rounds-preview-sticky-course {
  background: color-mix(in srgb, var(--admin-theme-primary, #3c3b6e) 8%, #ffffff);
}

body[data-admin-theme="usa"] #adminRoundSetup .rounds-preview tbody tr.rounds-preview-round-tone-blue .rounds-preview-sticky-date,
body[data-admin-theme="usa"] #adminRoundSetup .rounds-preview tbody tr.rounds-preview-round-tone-blue .rounds-preview-sticky-round,
body[data-admin-theme="usa"] #adminRoundSetup .rounds-preview tbody tr.rounds-preview-round-tone-blue .rounds-preview-sticky-course {
  background: #edf3ff;
}

body[data-admin-theme] #adminRoundSetup .rounds-preview tbody tr:last-child > * {
  border-bottom: 0;
}

body[data-admin-theme] #adminRoundSetup .rounds-preview-shared-format {
  align-items: end;
  background: color-mix(in srgb, var(--admin-theme-light, #eef2ff) 52%, #ffffff);
  border: 1px solid color-mix(in srgb, var(--admin-theme-primary, #3c3b6e) 28%, #ffffff);
  border-radius: 7px;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.6rem;
  margin: 0 0 0.65rem;
  padding: 0.55rem 0.62rem;
}

body[data-admin-theme] #adminRoundSetup .rounds-preview-shared-format > strong {
  color: var(--admin-theme-ink, #14213d);
  font-size: 0.9rem;
  margin: 0 0.2rem 0.1rem 0;
}

body[data-admin-theme] #adminRoundSetup .rounds-preview-shared-format label {
  color: var(--admin-theme-ink, #14213d);
  display: grid;
  font-size: 0.68rem;
  font-weight: 750;
  gap: 0.16rem;
}

body[data-admin-theme] #adminRoundSetup .rounds-preview-shared-format select {
  background: #ffffff;
  border: 1px solid color-mix(in srgb, var(--admin-theme-primary, #3c3b6e) 42%, #ffffff);
  border-radius: 5px;
  color: var(--admin-theme-ink, #14213d);
  font: inherit;
  height: 29px;
  max-width: 185px;
  padding: 0 0.32rem;
}

body[data-admin-theme] #adminRoundSetup .rounds-preview-shared-format-choice select { max-width: 250px; }

body[data-admin-theme] #adminRoundSetup .rounds-preview-shared-format-status {
  align-self: end;
  color: var(--admin-theme-primary, #3c3b6e);
  font-size: 0.72rem;
  font-weight: 750;
  line-height: 29px;
  white-space: nowrap;
}

body[data-admin-theme] #adminRoundSetup .rounds-preview .rounds-preview-shared-format-lock {
  align-self: end;
  background: var(--admin-theme-primary, #3c3b6e);
  border: 1px solid var(--admin-theme-primary, #3c3b6e);
  border-radius: 5px;
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1;
  min-height: 29px;
  padding: 0.35rem 0.7rem;
}

body[data-admin-theme] #adminRoundSetup .rounds-preview .rounds-preview-shared-format-lock:hover,
body[data-admin-theme] #adminRoundSetup .rounds-preview .rounds-preview-shared-format-lock:focus-visible {
  background: var(--admin-theme-primary, #3c3b6e);
  color: #ffffff;
  text-decoration: none;
}

body[data-admin-theme] #adminRoundSetup .rounds-preview .rounds-preview-shared-format-lock:disabled {
  background: color-mix(in srgb, var(--admin-theme-primary, #3c3b6e) 26%, #ffffff);
  border-color: color-mix(in srgb, var(--admin-theme-primary, #3c3b6e) 34%, #ffffff);
  color: color-mix(in srgb, var(--admin-theme-primary, #3c3b6e) 70%, #ffffff);
  cursor: not-allowed;
}

body[data-admin-theme] #adminRoundSetup .rounds-preview button {
  background: transparent;
  border: 0;
  color: var(--admin-theme-primary, #3c3b6e);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  padding: 0;
}

body[data-admin-theme] #adminRoundSetup .rounds-preview button:hover,
body[data-admin-theme] #adminRoundSetup .rounds-preview button:focus-visible {
  text-decoration: underline;
  text-underline-offset: 2px;
}

body[data-admin-theme] #adminRoundSetup .rounds-preview .rounds-preview-quick-link {
  color: var(--admin-theme-ink, #14213d);
  font-weight: 750;
}

body[data-admin-theme] #adminRoundSetup .rounds-preview .rounds-preview-course-cell {
  text-align: left;
}

body[data-admin-theme] #adminRoundSetup .rounds-preview .rounds-preview-course-cell .rounds-preview-quick-link {
  color: var(--admin-theme-primary, #3c3b6e);
  text-align: left;
}

body[data-admin-theme] #adminRoundSetup .rounds-preview .rounds-preview-format-name {
  min-width: 0;
  text-align: left;
}

body[data-admin-theme] #adminRoundSetup .rounds-preview table button {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.2;
}

body[data-admin-theme] #adminRoundSetup .rounds-preview .rounds-preview-format-name .rounds-preview-format-link {
  font-weight: 500;
  text-align: left;
}

@media (max-width: 620px) {
  body[data-admin-theme] #adminRoundSetup .rounds-preview {
    padding: 0.62rem;
  }

  body[data-admin-theme] #adminRoundSetup .rounds-preview > header,
  body[data-admin-theme] #adminRoundSetup .rounds-preview-controls {
    align-items: start;
    justify-content: flex-start;
  }

  body[data-admin-theme] #adminRoundSetup .rounds-preview-controls { gap: 0.4rem 0.65rem; }

  body[data-admin-theme] #adminRoundSetup .rounds-preview-presets {
    grid-template-columns: 1fr;
  }

  body[data-admin-theme] #adminRoundSetup .rounds-preview-preset-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* A phone cannot show three frozen identity columns and meaningful format
     data at the same time. Keep the compact Round marker visible, but let
     Date and Course travel with the table so a horizontal swipe reaches the
     actual setup columns. */
  body[data-admin-theme] #adminRoundSetup .rounds-preview .rounds-preview-sticky-date,
  body[data-admin-theme] #adminRoundSetup .rounds-preview .rounds-preview-sticky-course {
    left: auto;
    min-width: 0;
    position: static;
    width: auto;
  }

  body[data-admin-theme] #adminRoundSetup .rounds-preview .rounds-preview-sticky-round {
    left: 0;
    min-width: var(--rounds-preview-round-width);
    width: var(--rounds-preview-round-width);
  }

  body[data-admin-theme] #adminRoundSetup .rounds-preview thead .rounds-preview-sticky-round {
    z-index: 4;
  }

  body[data-admin-theme] #adminRoundSetup .rounds-preview tbody .rounds-preview-sticky-round {
    z-index: 2;
  }
}
