/* Desktop operator editor. Keep these rules scoped to the details page. */
main:has(#tournamentDetailsSettings:not(.hidden)) { width:calc(100% - 32px); max-width:none; margin:18px auto 48px; }
#tournamentDetailsSettings {
  position:relative;
  --detail-line:#35485b;
  --detail-muted:#a7b9ca;
  --detail-input:#101923;
  --detail-text:#edf2f7;
  padding:24px;
  border-radius:14px;
}
#tournamentDetailsSettings::before { content:""; position:absolute; left:178px; top:0; bottom:0; width:8px; background:#0d1117; pointer-events:none; }
html[data-theme="light"] #tournamentDetailsSettings::before { background:#f4f7fb; }
#tournamentDetailsSettings [hidden] { display:none !important; }
#tournamentDetailsSettings .venue-court-row { display:grid; grid-template-columns:160px minmax(0,1fr); align-items:center; gap:12px; }
#tournamentDetailsSettings .venue-court-row > span { color:var(--detail-muted); font-size:12px; font-weight:600; }
#tournamentDetailsSettings .venue-court-buttons { display:flex; gap:8px; }
#tournamentDetailsSettings .venue-court-buttons button { background:var(--detail-input); color:var(--detail-text); border:1px solid var(--detail-line) !important; }
#tournamentDetailsSettings .venue-court-buttons button[aria-pressed="true"] { background:#1769c2; color:#fff; border-color:#1769c2 !important; }
#tournamentDetailsSettings .event-calendar-kind-tabs,
#tournamentDetailsSettings .event-calendar-time-panels { grid-template-columns:180px 180px 135px 135px; }
#tournamentDetailsSettings .event-calendar-shared-months { grid-template-columns:repeat(var(--calendar-month-count,3),minmax(180px,230px)); }
#tournamentDetailsSettings .event-calendar-shared-months .event-calendar-month { width:auto; min-width:0; }
#tournamentDetailsSettings .division-stacked-buttons button { min-width:0; width:max-content; padding:4px 5px; white-space:nowrap; }
#tournamentDetailsSettings .division-inline-limit { grid-template-columns:72px max-content; }
#tournamentDetailsSettings .guide-scoring-method-buttons { padding:4px; border:1px solid var(--detail-line) !important; border-radius:8px; }
#tournamentDetailsSettings .guide-priority-position { align-self:center; color:var(--detail-muted); font-size:12px; white-space:nowrap; }
#tournamentDetailsSettings .finals-priority-list { align-items:center; gap:7px; }
#tournamentDetailsSettings .finals-priority-list > .guide-priority-swap { cursor:pointer; padding:5px 8px; margin:0 5px; }
#tournamentDetailsSettings .finals-priority-list > .guide-priority-swap::before { content:none; }
#tournamentDetailsSettings .guide-add-contact { white-space:nowrap; }
.guide-reset-dialog { width:min(520px,90vw); padding:24px; border:1px solid #526679; border-radius:12px; background:#151c25; color:#edf2f7; }
.guide-reset-dialog::backdrop { background:#0009; }
.guide-reset-dialog h2 { font-size:18px; margin:0 0 14px; }
.guide-reset-dialog p { line-height:1.65; color:inherit; }
.guide-reset-dialog-actions { display:flex; justify-content:flex-end; gap:10px; margin-top:22px; }
.guide-reset-dialog-actions button { font-size:13px; padding:9px 14px; }
.guide-reset-dialog-actions .danger { background:#c6283d; color:#fff; }
html[data-theme="light"] .guide-reset-dialog { background:#fff; color:#24384b; border-color:#c9d6e2; }
html[data-theme="light"] #tournamentDetailsSettings {
  --detail-line:#c9d6e2;
  --detail-muted:#52677b;
  --detail-input:#fff;
  --detail-text:#24384b;
}
#tournamentDetailsSettings:not(.hidden) {
  grid-template-columns:144px minmax(0,1fr);
  column-gap:28px;
  row-gap:16px;
  align-items:start;
}
#tournamentDetailsSettings .guide-section-tabs {
  grid-row:1 / span 40;
  width:144px;
  padding:0 8px 12px 0;
  gap:6px;
}
#tournamentDetailsSettings .guide-section-tab {
  width:100%; min-height:34px; padding:8px 12px;
  border-radius:7px; text-align:left; font-size:13px;
  background:var(--detail-input); color:var(--detail-text);
}
#tournamentDetailsSettings .guide-section-tab:hover { background:color-mix(in srgb,#428edb 20%,var(--detail-input)); }
#tournamentDetailsSettings .guide-section-tab[aria-selected="true"] { background:#1769c2; color:#fff; }
#tournamentDetailsSettings .guide-personal-archive-rail { width:100%; margin-top:18px; gap:7px; }
#tournamentDetailsSettings .guide-section { margin:0; min-width:0; overflow:visible; }
#tournamentDetailsSettings .guide-section > summary { padding:8px 16px 8px 0; min-height:34px; }
#tournamentDetailsSettings .guide-section-body { width:100%; max-width:none; padding:0; min-width:0; }
#tournamentDetailsSettings .event-title-range { gap:24px; }
#tournamentDetailsSettings .event-inline-row,
#tournamentDetailsSettings .guide-organizer-inline-fields,
#tournamentDetailsSettings .guide-payment-fields { grid-template-columns:minmax(0,760px); gap:10px; }
#tournamentDetailsSettings .event-inline-row > label,
#tournamentDetailsSettings .guide-organizer-inline-fields > label,
#tournamentDetailsSettings .guide-payment-fields > label {
  display:grid; grid-template-columns:160px minmax(0,1fr); width:100%; gap:12px;
}
#tournamentDetailsSettings label { color:var(--detail-muted); font-weight:600; }
#tournamentDetailsSettings input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
#tournamentDetailsSettings select,
#tournamentDetailsSettings textarea {
  color:var(--detail-text); background:var(--detail-input);
  border:1px solid var(--detail-line); border-radius:6px;
  min-height:34px; padding:7px 10px; font-size:13px;
}
#tournamentDetailsSettings input:focus-visible,
#tournamentDetailsSettings select:focus-visible,
#tournamentDetailsSettings textarea:focus-visible,
#tournamentDetailsSettings button:focus-visible { outline:2px solid #428edb; outline-offset:2px; }
#tournamentDetailsSettings .guide-links-section .guide-section-body { max-width:760px; }
#tournamentDetailsSettings .additional-contact-row { grid-template-columns:160px minmax(0,1fr) 34px; gap:12px; }
#tournamentDetailsSettings .guide-organizer-inline-section,
#tournamentDetailsSettings .guide-links-section,
#tournamentDetailsSettings .guide-account-section { grid-template-columns:minmax(0,1fr); }
#tournamentDetailsSettings .event-calendar-grid { gap:10px; padding:0; }
#tournamentDetailsSettings .event-calendar-time-card { position:relative; }
#tournamentDetailsSettings input.visually-hidden { width:1px !important; height:1px; min-height:0; padding:0; border:0; left:0; top:0; }
#tournamentDetailsSettings .event-calendar-kind-tabs,
#tournamentDetailsSettings .event-calendar-time-panels { grid-template-columns:180px 180px 135px 135px; gap:12px; }
#tournamentDetailsSettings .event-calendar-time-card { min-height:86px; border:1px solid var(--detail-line) !important; border-radius:7px; }
#tournamentDetailsSettings .event-calendar-times select { width:64px; min-width:64px; }
#tournamentDetailsSettings .event-calendar-month-strip { gap:12px; }
#tournamentDetailsSettings .event-calendar-shared-months { gap:12px; }
#tournamentDetailsSettings .event-calendar-day { min-height:28px; height:28px; padding:0; }
#tournamentDetailsSettings .event-calendar-kind-tabs button.is-active { border-bottom:3px solid var(--event-kind-color) !important; }
#tournamentDetailsSettings .guide-division-section { display:block; }
#tournamentDetailsSettings .guide-division-section > summary { display:none; }
#tournamentDetailsSettings .guide-division-section > .guide-section-body { display:block; width:100%; max-width:none; padding:0; }
#tournamentDetailsSettings .division-builder { padding:0; width:100%; }
#tournamentDetailsSettings .division-builder > h4 { font-size:15px; margin:0 0 12px; }
#tournamentDetailsSettings #structuredDivisionListTitle { font-size:12px; color:var(--detail-muted); margin:0 0 8px; }
#tournamentDetailsSettings .division-builder-table-wrap { width:100%; border-radius:6px; }
#tournamentDetailsSettings .division-builder-table { width:max-content; min-width:0; table-layout:auto; }
#tournamentDetailsSettings .division-builder-table th,
#tournamentDetailsSettings .division-builder-table td { width:auto; padding:8px; text-align:left; border:1px solid var(--detail-line) !important; }
#tournamentDetailsSettings .division-builder-table th { font-size:12px; font-weight:700; background:color-mix(in srgb,var(--detail-line) 25%,transparent); }
#tournamentDetailsSettings .division-builder-table th:last-child { width:auto; }
#tournamentDetailsSettings .division-builder-input-row .division-builder-group { padding:0; gap:8px; }
#tournamentDetailsSettings .division-builder-input-row .division-builder-group > legend { padding:0; }
#tournamentDetailsSettings .division-builder-input-row input[type="number"] { width:72px; min-width:0; padding:6px; }
#tournamentDetailsSettings .division-builder-input-row #divisionFee { width:90px; }
#tournamentDetailsSettings .division-choice-buttons button { min-height:30px; border-radius:5px; text-align:left; font-size:12px; }
#tournamentDetailsSettings .division-team-size label { flex-wrap:wrap; white-space:normal; }
#tournamentDetailsSettings .division-inline-limit { grid-template-columns:72px max-content; }
#tournamentDetailsSettings .structured-division-actions { gap:5px; }
#tournamentDetailsSettings .structured-division-row:hover { background:color-mix(in srgb,#428edb 10%,var(--detail-input)); }
#tournamentDetailsSettings .structured-division-actions button { min-height:28px; padding:4px 6px; font-size:11px; }
#tournamentDetailsSettings #divisionBuilderStatus:empty,
#tournamentDetailsSettings #eventDatesStatus:empty,
#tournamentDetailsSettings #guideSectionsStatus:empty { display:none; }
#tournamentDetailsSettings .division-name-preview { font-size:12px; margin:10px 0 0; }
#tournamentDetailsSettings .guide-scoring-options { padding:4px 0; gap:12px; }
#tournamentDetailsSettings .guide-scoring-options h4 { font-size:13px; min-width:100px; }
#tournamentDetailsSettings .guide-scoring-options-grid { gap:8px 16px; }
#tournamentDetailsSettings .guide-score-input input { width:70px; }
#tournamentDetailsSettings .guide-finals-priority { grid-template-columns:160px minmax(0,1fr); }
#tournamentDetailsSettings .guide-long-editor:not([hidden]) {
  display:grid; grid-template-columns:max-content minmax(0,1fr);
  align-items:center; gap:10px 14px; width:100%; margin:8px 0;
}
#tournamentDetailsSettings .guide-long-editor > .guide-field-heading {
  margin:0; font-size:14px; line-height:1.5; font-weight:700; color:var(--detail-text);
}
#tournamentDetailsSettings .guide-long-editor > .guide-expand-button { margin:0; justify-self:start; max-width:none; }
#tournamentDetailsSettings .guide-long-editor > .guide-section-body {
  grid-column:1 / -1; display:block; width:100%; min-width:0; max-width:none; padding:0;
}
#tournamentDetailsSettings .guide-long-editor textarea {
  display:block; width:100% !important; max-width:none; min-width:0;
  height:220px; min-height:220px; max-height:none; line-height:1.5; resize:vertical;
}
#tournamentDetailsSettings .guide-long-editor textarea[rows="10"] { height:220px; min-height:220px; max-height:none; resize:vertical; }
#tournamentDetailsSettings .guide-reset-action-row { margin:12px 0 0; padding:12px 0; }

.guide-reset-options { display:grid; gap:12px; margin:20px 0; }
.guide-reset-options label { display:grid; grid-template-columns:18px minmax(0,1fr); align-items:center; column-gap:12px; min-height:42px; cursor:pointer; }
.guide-reset-options input[type="radio"] { grid-column:1; grid-row:1; width:18px; height:18px; flex:none; margin:0; }
.guide-reset-options label span { grid-column:2; grid-row:1; min-width:0; line-height:1.45; }

#tournamentDetailsSettings .division-team-size label { display:flex; align-items:center; gap:4px; white-space:nowrap; }
#tournamentDetailsSettings .division-builder-input-row #divisionTeamMaleCount,
#tournamentDetailsSettings .division-builder-input-row #divisionTeamFemaleCount { width:calc(2ch + 14px); padding:6px; flex:none; appearance:textfield; }
#tournamentDetailsSettings .division-builder-input-row #divisionDuprMin,
#tournamentDetailsSettings .division-builder-input-row #divisionDuprMax { width:calc(5ch + 14px); padding:6px; flex:none; appearance:textfield; }
#tournamentDetailsSettings .division-team-size input::-webkit-inner-spin-button,
#tournamentDetailsSettings .division-team-size input::-webkit-outer-spin-button,
#tournamentDetailsSettings .division-dupr-limits input::-webkit-inner-spin-button,
#tournamentDetailsSettings .division-dupr-limits input::-webkit-outer-spin-button { -webkit-appearance:none; margin:0; }
#tournamentDetailsSettings #saveStructuredDivision { white-space:pre-line; text-align:center; line-height:1.4; min-width:0; }

#tournamentDetailsSettings .guide-section:has(#guide-equipment) { width:min(100%,760px); grid-template-columns:160px minmax(0,1fr); column-gap:12px; align-items:center; }
#tournamentDetailsSettings .guide-section:has(#guide-equipment) .guide-section-body { display:block; width:100%; max-width:none; }
#tournamentDetailsSettings #guide-equipment { width:100%; min-height:34px; }
#tournamentDetailsSettings .event-calendar-navigation { display:flex; gap:10px; align-items:center; justify-content:flex-start; }
#tournamentDetailsSettings .event-calendar-month-strip { display:block; width:100%; max-width:100%; }
#tournamentDetailsSettings .division-builder-table-wrap { width:max-content; max-width:100%; overflow-x:auto; }
#tournamentDetailsSettings .division-builder-table th,
#tournamentDetailsSettings .division-builder-table td { white-space:nowrap; overflow-wrap:normal; padding:6px; }
#tournamentDetailsSettings .division-builder-input-row .division-choice-buttons button { white-space:nowrap; }
#tournamentDetailsSettings .division-builder-table .structured-division-actions { flex-wrap:nowrap; }
#tournamentDetailsSettings .guide-section[data-guide-category="waiver"] { order:91; }
#tournamentDetailsSettings .guide-section[data-guide-category="privacy"] { order:92; }
#tournamentDetailsSettings .guide-section[data-guide-category="refund"] { order:93; }
#tournamentDetailsSettings .guide-section[data-guide-category="misconduct"] { order:94; }
#tournamentDetailsSettings .guide-section[data-guide-category="notices"] { order:95; }
#tournamentDetailsSettings .guide-organizer-inline-fields { grid-template-columns:minmax(0,760px) !important; }

#tournamentDetailsSettings .guide-section[data-guide-category="awards"] { order:60; }
#tournamentDetailsSettings .guide-section[data-guide-category="format"] { order:70; }
#tournamentDetailsSettings .guide-primary-link-row > label { align-self:center; white-space:nowrap; }

#tournamentDetailsSettings .event-calendar-day.is-today .event-calendar-day-number { display:inline-flex; width:23px; height:23px; box-sizing:border-box; align-items:center; justify-content:center; border:2px solid #9333ea !important; border-radius:0; z-index:3; background:#9333ea; color:#fff; }
#tournamentDetailsSettings .event-calendar-count-controls { display:inline-flex; align-items:center; gap:8px; margin-left:18px; white-space:nowrap; }
#tournamentDetailsSettings .guide-scoring-section:has(.guide-scoring-method-buttons button:hover),
#tournamentDetailsSettings .guide-scoring-section:has(.guide-scoring-method-buttons button:focus-visible) { z-index:20; }
#tournamentDetailsSettings .division-name-preview { margin:0 0 8px; }

#tournamentDetailsSettings .event-calendar-kind-tabs button:not(.is-active) { background:var(--event-kind-color); color:var(--event-kind-text); box-shadow:none; }

#tournamentDetailsSettings .division-age-limits { display:grid; gap:7px; }
#tournamentDetailsSettings .division-age-limits label,
#tournamentDetailsSettings .division-capacity-input { display:flex; align-items:center; gap:6px; white-space:nowrap; }
#tournamentDetailsSettings .division-builder-input-row #divisionAgeMin,
#tournamentDetailsSettings .division-builder-input-row #divisionAgeMax { width:calc(5ch + 14px); padding:6px; appearance:textfield; }
#tournamentDetailsSettings .division-builder-input-row #divisionCapacity { width:calc(2ch + 14px); padding:6px; appearance:textfield; }
#tournamentDetailsSettings .division-age-limits input::-webkit-inner-spin-button,
#tournamentDetailsSettings .division-age-limits input::-webkit-outer-spin-button,
#tournamentDetailsSettings #divisionCapacity::-webkit-inner-spin-button,
#tournamentDetailsSettings #divisionCapacity::-webkit-outer-spin-button { -webkit-appearance:none; margin:0; }
#tournamentDetailsSettings .division-name-preview { font-size:14px; }
#tournamentDetailsSettings .event-calendar-shared-months .event-calendar-month-head { position:relative; justify-content:center; min-height:32px; padding-top:24px; }
#tournamentDetailsSettings .event-calendar-count-controls { position:absolute; top:0; right:0; display:inline-flex; align-items:center; gap:4px; margin:0; white-space:nowrap; }
#tournamentDetailsSettings .event-calendar-count-controls > span { font-size:10px; }
#tournamentDetailsSettings .event-calendar-count-controls button { min-height:24px; padding:2px 5px; font-size:10px; }
#tournamentDetailsSettings .event-calendar-count-controls button[hidden] { display:none !important; }
#tournamentDetailsSettings .structured-division-row.is-editing { background:#203f60; outline:2px solid #62a8ff; outline-offset:-2px; }
html[data-theme="light"] #tournamentDetailsSettings .structured-division-row.is-editing { background:#e2efff; }

#tournamentDetailsSettings .event-calendar-count-controls { margin-left:48px; }
#tournamentDetailsSettings #eventCalendarToday { background:#9333ea; color:#fff; }
#tournamentDetailsSettings #eventCalendarAddMonth { background:#176c4a; color:#fff; }
#tournamentDetailsSettings #eventCalendarRemoveMonth { background:#a34427; color:#fff; }
#tournamentDetailsSettings .event-calendar-count-controls button:disabled { opacity:.45; cursor:not-allowed; }
#tournamentDetailsSettings .event-calendar-instruction { position:relative; justify-self:start; margin:8px 0 12px; padding:12px 18px; border:1px solid #38b9c9; border-radius:12px; background:#153b48; color:#ddfaff; font-size:13px; font-weight:600; line-height:1.6; }
#tournamentDetailsSettings .event-calendar-instruction::after { content:""; position:absolute; left:32px; bottom:-7px; width:12px; height:12px; transform:rotate(45deg); border-right:1px solid #38b9c9; border-bottom:1px solid #38b9c9; background:inherit; }
html[data-theme="light"] #tournamentDetailsSettings .event-calendar-instruction { background:#e0f7fb; color:#125062; border-color:#38b9c9; }

#tournamentDetailsSettings .division-preview-caption { caption-side:top; text-align:left; }
#tournamentDetailsSettings .division-preview-caption .division-name-preview { width:fit-content; max-width:100%; box-sizing:border-box; margin:0 auto 8px 0; padding:8px 12px; border:1px solid var(--detail-line) !important; border-radius:7px; text-align:left; }
/* Consent sections share the eligibility editor's existing width limit. */
#tournamentDetailsSettings .guide-section[data-guide-category="waiver"] .guide-section-body,
#tournamentDetailsSettings .guide-section[data-guide-category="privacy"] .guide-section-body,
#tournamentDetailsSettings .guide-section[data-guide-category="refund"] .guide-section-body,
#tournamentDetailsSettings .guide-section[data-guide-category="misconduct"] .guide-section-body,
#tournamentDetailsSettings .guide-section[data-guide-category="notices"] .guide-section-body { max-width:1100px; }
#tournamentDetailsSettings .guide-section[data-guide-category="waiver"] textarea,
#tournamentDetailsSettings .guide-section[data-guide-category="privacy"] textarea,
#tournamentDetailsSettings .guide-section[data-guide-category="refund"] textarea,
#tournamentDetailsSettings .guide-section[data-guide-category="misconduct"] textarea,
#tournamentDetailsSettings .guide-section[data-guide-category="notices"] textarea { max-width:1100px; }

#tournamentDetailsSettings .event-calendar-kind-tabs button::after { white-space:pre-line; }

#tournamentDetailsSettings .division-range-arrow { display:block; text-align:center; line-height:1; font-size:18px; }

/* Larger division table text with content-sized, unwrapped columns. */
#tournamentDetailsSettings .division-builder-table th,
#tournamentDetailsSettings .division-builder-table td,
#tournamentDetailsSettings .division-builder-table input,
#tournamentDetailsSettings .division-builder-table button,
#tournamentDetailsSettings .division-builder-table label,
#tournamentDetailsSettings .division-builder-table legend { font-size:14px; }
#tournamentDetailsSettings .division-builder-table .structured-division-actions button { font-size:13px; }
#tournamentDetailsSettings .division-builder-table .division-preview-caption .division-name-preview { font-size:16px; }
#tournamentDetailsSettings .division-builder-table .division-range-arrow { font-size:20px; }
#tournamentDetailsSettings .division-builder-table th,
#tournamentDetailsSettings .division-builder-table td { min-width:max-content; }
#tournamentDetailsSettings .division-builder-table label,
#tournamentDetailsSettings .division-builder-table .division-choice-buttons button { white-space:nowrap; }
#tournamentDetailsSettings .division-builder-table .division-team-size label { flex-wrap:nowrap; }
#tournamentDetailsSettings .division-builder-table #divisionFee { width:calc(12ch + 14px); }
#tournamentDetailsSettings .division-builder-table input:not([type="checkbox"]):not([type="radio"]) { font-size:15px; }

#tournamentDetailsSettings .guide-reset-action-row { flex-direction:column; align-items:flex-end; gap:8px; }
#tournamentDetailsSettings .guide-reset-action-row #guideSectionsStatus { margin:0; max-width:100%; text-align:right; overflow-wrap:anywhere; }

/* Center range arrows on the numeric inputs, excluding their text labels. */
#tournamentDetailsSettings .division-age-limits .division-range-arrow,
#tournamentDetailsSettings .division-dupr-limits .division-range-arrow { width:calc(5ch + 14px); font-size:15px; text-align:center; justify-self:start; }
#tournamentDetailsSettings .division-range-arrow > span { font-size:20px; }

#tournamentDetailsSettings .guide-section[data-guide-category="scores"] { order:65; }

/* Fit all division controls into the available page width without horizontal scrolling. */
#tournamentDetailsSettings .division-builder-table-wrap { width:100%; max-width:100%; overflow-x:hidden; }
#tournamentDetailsSettings .division-builder-table { width:100%; min-width:0; table-layout:fixed; }
#tournamentDetailsSettings .division-builder-table th,
#tournamentDetailsSettings .division-builder-table td { min-width:0; padding:4px 3px; text-align:center; vertical-align:middle; font-size:13px; white-space:normal; overflow-wrap:anywhere; }
#tournamentDetailsSettings .division-builder-table th { font-size:12px; line-height:1.25; }
#tournamentDetailsSettings .division-builder-table input:not([type="checkbox"]):not([type="radio"]),
#tournamentDetailsSettings .division-builder-table button,
#tournamentDetailsSettings .division-builder-table label { font-size:12px; }
#tournamentDetailsSettings .division-builder-input-row .division-builder-group { width:100%; min-width:0; gap:5px; }
#tournamentDetailsSettings .division-builder-input-row .division-choice-buttons { width:100%; min-width:0; flex-wrap:wrap; gap:3px; }
#tournamentDetailsSettings .division-builder-input-row .division-choice-buttons button { min-width:0; padding:3px 4px; font-size:11px; line-height:1.25; text-align:center; white-space:normal; overflow-wrap:anywhere; }
#tournamentDetailsSettings .division-builder-input-row .division-team-size { flex-wrap:wrap; gap:3px; }
#tournamentDetailsSettings .division-builder-input-row .division-team-size label { gap:2px; }
#tournamentDetailsSettings .division-builder-input-row #divisionCapacity,
#tournamentDetailsSettings .division-builder-input-row #divisionFee { width:100%; min-width:0; padding:4px 2px; }
#tournamentDetailsSettings .division-builder-input-row .division-capacity-input { flex-wrap:wrap; justify-content:center; gap:2px; }
#tournamentDetailsSettings .division-age-limits.division-range-inline,
#tournamentDetailsSettings .division-dupr-limits.division-range-inline { display:flex; align-items:flex-start; justify-content:center; gap:3px; min-width:0; white-space:normal; }
#tournamentDetailsSettings .division-age-limits[hidden],
#tournamentDetailsSettings .division-dupr-limits[hidden] { display:none !important; }
#tournamentDetailsSettings .division-range-inline label { display:inline-flex; flex:1 1 0; min-width:0; flex-direction:column; align-items:center; gap:1px; white-space:normal; line-height:1.15; }
#tournamentDetailsSettings .division-range-inline label span { font-size:10px; }
#tournamentDetailsSettings .division-range-separator { flex:0 0 auto; align-self:flex-start; margin-top:7px; color:var(--muted,#60758a); font-weight:700; }
#tournamentDetailsSettings .division-builder-table #divisionAgeMin,
#tournamentDetailsSettings .division-builder-table #divisionAgeMax,
#tournamentDetailsSettings .division-builder-table #divisionDuprMin,
#tournamentDetailsSettings .division-builder-table #divisionDuprMax { width:calc(4ch + 6px); min-width:0; padding:3px 2px; }
#tournamentDetailsSettings .division-builder-input-row .division-builder-actions { min-width:0; margin:0; }
#tournamentDetailsSettings .division-builder-input-row .division-create-button,
#tournamentDetailsSettings .division-builder-input-row #cancelStructuredDivision { width:100%; max-width:none; min-width:0; min-height:42px; padding:4px 3px; font-size:11px; line-height:1.2; white-space:normal; overflow-wrap:anywhere; }
#tournamentDetailsSettings .division-builder-table .structured-division-actions { justify-content:center; gap:3px; flex-wrap:wrap; }
#tournamentDetailsSettings .division-builder-table .structured-division-actions button { min-width:0; padding:3px 4px; font-size:11px; }
#tournamentDetailsSettings .division-builder-table tbody:not(.division-builder-input-row) td { white-space:normal; overflow-wrap:anywhere; }
#tournamentDetailsSettings .division-name-preview { font-size:14px; }

/* Match the added guide bookmarks. Unspecified grid order (0) puts fields above the title. */
#tournamentDetailsSettings .guide-section[data-guide-category="registration_details"] { order:96; }
#tournamentDetailsSettings .guide-section[data-guide-category="weather_policy"] { order:97; }
#tournamentDetailsSettings .guide-section[data-guide-category="checkin_details"] { order:98; }
#tournamentDetailsSettings .guide-section[data-guide-category="participant_benefits"] { order:99; }
#tournamentDetailsSettings .guide-section[data-guide-category="ranking_points"] { order:100; }
#tournamentDetailsSettings .guide-section[data-guide-category="special_divisions"] { order:101; }

/* Notebook bookmark navigation: one expanded group, no internal scrollbar. */
#tournamentDetailsSettings:not(.hidden) { grid-template-columns:200px minmax(0,1fr); }
#tournamentDetailsSettings .guide-section-tabs { position:sticky; top:calc(var(--operator-header-height,64px) + 10px); z-index:8; align-self:start; width:200px; box-sizing:border-box; max-height:calc(100dvh - var(--operator-header-height,64px) - 20px); overflow-y:auto; overscroll-behavior:contain; gap:5px; padding:0 10px 0 0; }
#tournamentDetailsSettings .guide-menu-group { width:100%; margin:0; }
#tournamentDetailsSettings .guide-menu-group > summary { display:list-item; padding:8px 10px; min-height:32px; box-sizing:border-box; border-radius:6px; cursor:pointer; font-size:13px; font-weight:700; line-height:1.3; color:var(--detail-text); background:var(--detail-input); white-space:normal; overflow-wrap:anywhere; }
#tournamentDetailsSettings .guide-menu-group[open] > summary { background:#1769c2; color:#fff; }
#tournamentDetailsSettings .guide-menu-items { display:grid; gap:3px; padding:4px 0 3px 8px; }
#tournamentDetailsSettings .guide-section-tab,
#tournamentDetailsSettings .guide-personal-archive-rail button { width:100%; height:auto; min-height:30px; padding:6px 9px; font-size:12px; line-height:1.35; white-space:normal; overflow:visible; overflow-wrap:anywhere; text-overflow:clip; }
#tournamentDetailsSettings .guide-personal-archive-rail { margin:0; gap:3px; }
#tournamentDetailsSettings .guide-personal-archive-inline-status:empty { display:none; }
/* Keep the navigation beside the editor on short screens too; scroll the rail only when it cannot fit. */
@media (max-height:700px) { #tournamentDetailsSettings .guide-section-tabs { position:sticky; max-height:calc(100dvh - var(--operator-header-height,64px) - 12px); overflow-y:auto; } }

/* Save/help actions share the bookmark submenu's typography and alignment. */
#tournamentDetailsSettings .guide-menu-items .guide-section-tab,
#tournamentDetailsSettings .guide-menu-items .guide-personal-archive-rail button {
  font-family:inherit; font-size:12px; font-weight:700; line-height:1.35;
  text-align:left; padding:6px 9px; min-height:30px; border-radius:7px;
}
#tournamentDetailsSettings .guide-menu-items .guide-personal-archive-rail button,
#tournamentDetailsSettings .guide-menu-items .guide-personal-archive-rail button:hover,
#tournamentDetailsSettings .guide-menu-items .guide-personal-archive-rail button:focus-visible {
  background:transparent; color:var(--detail-text);
}
#tournamentDetailsSettings .guide-menu-items .guide-personal-archive-rail button:hover { text-decoration:underline; }
#tournamentDetailsSettings .guide-menu-items .guide-personal-archive-rail button:focus-visible { outline:2px solid #428edb; outline-offset:-2px; }
#tournamentDetailsSettings .guide-rulebook-link { display:block; width:100%; margin-top:8px; padding:9px 10px; border-radius:6px; font-size:13px; font-weight:700; text-decoration:none; color:var(--detail-text); background:var(--detail-input); overflow-wrap:anywhere; }
#tournamentDetailsSettings .guide-rulebook-link::after { content:" ↗"; }
#tournamentDetailsSettings .guide-rulebook-link:hover { text-decoration:underline; }

#tournamentDetailsSettings .guide-rulebook-link { display:block; width:100%; padding:8px 10px; border-radius:6px; font-size:13px; font-weight:700; line-height:1.3; color:var(--detail-text); background:var(--detail-input); text-decoration:none; }
#tournamentDetailsSettings .guide-rulebook-link:hover { background:#1769c2; color:#fff; }
