:root {
  --bg: #0e0b12;
  --bg-elevated: #16121d;
  --surface: #1c1626;
  --border: #322a42;
  --text: #edeaf2;
  --muted: #9b92ad;
  --accent: #b38cff;
  --accent-dim: #7e5ac8;
  --gold: #e8c547;
  --silver: #b8c4c0;
  --bronze: #c98a5a;
  --danger: #f07178;
  --winner-team1: #e879f9;
  --winner-team2: #ffb020;
  --bg-glow: #2a1a4a;
  --accent-soft: rgba(179, 140, 255, 0.18);
  --row-hover: rgba(179, 140, 255, 0.06);
  --accent-light: #d4b8ff;
  --tab-summary-active: #5c3d99;
  --radius: 12px;
  --font: "DM Sans", system-ui, sans-serif;
  --font-display: var(--font);
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

/* Masters look at /masters — same markup and data, Augusta green + Masters yellow. */
html[data-theme="masters"] {
  --bg: #04291a;
  --bg-elevated: #083823;
  --surface: #0c432b;
  --border: #1d5e41;
  --text: #f6f1df;
  --muted: #b3c5a6;
  --accent: #f4cf3a;
  --accent-dim: #c9a520;
  --gold: #ffd84a;
  --bg-glow: #0d6b43;
  --accent-soft: rgba(244, 207, 58, 0.18);
  --row-hover: rgba(244, 207, 58, 0.07);
  --accent-light: #f7dd7a;
  --tab-summary-active: #006747;
  --font-display: "Playfair Display", Georgia, serif;
}

html[data-theme="masters"] .header__title,
html[data-theme="masters"] .panel__title {
  font-family: var(--font-display);
  letter-spacing: 0;
}

html[data-theme="masters"] .header__title {
  color: var(--accent);
}

html[data-theme="masters"] .year-tabs__btn--summary.is-active {
  border-color: var(--accent);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: radial-gradient(1200px 600px at 10% -10%, var(--bg-glow) 0%, transparent 55%), var(--bg);
}

.app {
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(16px, 4vw, 32px);
  padding-bottom: 48px;
  overflow-x: clip;
}

.header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.header__titles {
  flex: 1 1 auto;
  min-width: 0;
}

/* Crest headers (Summary + annual years): shared alignment so tabs don’t jump */
.header:has(.header__crest--year) {
  flex-wrap: nowrap;
  align-items: center;
  min-height: 138px;
}

.header:has(.header__crest--year) .header__title-row {
  min-width: 0;
  width: 100%;
}

.header__title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header__crest {
  flex-shrink: 0;
  width: 104px;
  height: 104px;
  object-fit: contain;
}

/* Year-tab crest beside the title + subtitle stack. */
.header__crest--year {
  width: 138px;
  height: 138px;
  max-width: 138px;
  max-height: 138px;
}

.header__title-row:has(.header__crest--year) {
  align-items: flex-start;
  gap: 14px;
  min-height: 0;
}

.header__title-stack {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding-top: 0.45rem;
  min-height: 138px;
  box-sizing: border-box;
}

.header__title-stack .header__title {
  line-height: 1.15;
}

.header__title-stack .header__subtitle {
  margin-top: 6px;
}

.header__title {
  margin: 0;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.header__subtitle {
  margin: 6px 0 0;
  color: var(--text);
  font-size: 1rem;
  font-weight: 500;
}

/* Crest headers: larger Acecation title + event/location subtitle */
.header:has(.header__crest--year) .header__title {
  font-size: clamp(1.875rem, 5vw, 2.5rem);
}

.header__meta {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.header__meta-line {
  margin: 4px 0 0;
}

.header__actions {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  flex-shrink: 0;
  align-items: flex-end;
  gap: 6px;
}

.header__actions-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.header__actions .btn {
  padding: 5px 9px;
  font-size: 0.75rem;
  border-radius: 8px;
  line-height: 1.2;
  white-space: nowrap;
}

.review-badge,
.readonly-badge,
.edit-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 8px;
}

.review-badge,
.readonly-badge {
  color: #1a4d2e;
  background: #d8efe0;
  border: 1px solid #9cc9ad;
}

.edit-badge {
  color: #5a3d00;
  background: #ffe9a8;
  border: 1px solid #e0c56a;
}

body.app--review .header,
body.app--readonly .header {
  padding-bottom: 10px;
}

body.app--readonly input:not([type="file"]),
body.app--readonly select,
body.app--readonly textarea {
  pointer-events: none;
  opacity: 0.92;
}

/* Mobile year picker must stay usable while browsing in read-only mode. */
body.app--readonly select.year-tabs__year-select,
body.app--readonly select.js-year-tab-select {
  pointer-events: auto;
  opacity: 1;
}

@media (max-width: 639px) {
  body.app--review .header__title,
  body.app--readonly .header__title {
    font-size: 1.35rem;
  }

  body.app--review .footer,
  body.app--readonly .footer {
    font-size: 0.78rem;
    line-height: 1.35;
  }
}

.header:has(.header__crest--year) .header__subtitle {
  font-size: 1.25rem;
  white-space: nowrap;
}

@media (max-width: 639px) {
  .header:has(.header__crest--year) {
    flex-wrap: wrap;
  }

  .header__actions {
    width: 100%;
    gap: 6px;
    flex-wrap: wrap;
  }

  .header__actions .btn {
    flex: 0 1 auto;
    min-width: 0;
    padding: 5px 8px;
    font-size: 0.72rem;
    border-radius: 8px;
    text-align: center;
  }

  .header__title-row {
    align-items: flex-start;
  }

  .header:has(.header__crest--year) {
    min-height: 107px;
  }

  .header__title-stack {
    min-height: 107px;
    padding-top: 0.25rem;
  }

  .header__crest {
    width: 64px;
    height: 64px;
  }

  .header__crest--year {
    width: 107px;
    height: 107px;
    max-width: 107px;
    max-height: 107px;
  }

  .header__title {
    font-size: 1.35rem;
    line-height: 1.15;
  }

  .header:has(.header__crest--year) .header__title {
    font-size: 1.6875rem;
  }

  .header:has(.header__crest--year) .header__subtitle {
    font-size: 1.25rem;
    white-space: normal;
  }
}

.btn {
  font: inherit;
  cursor: pointer;
  border-radius: 10px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  transition: background 0.15s, border-color 0.15s;
}

.btn:hover {
  background: var(--bg-elevated);
  border-color: var(--accent-dim);
}

.btn--ghost {
  background: transparent;
}

.btn--file {
  display: inline-flex;
  align-items: center;
}

.note {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.tabs__btn {
  font: inherit;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--muted);
  padding: 10px 16px;
  border-radius: 999px;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.tabs__btn:hover {
  color: var(--text);
}

.tabs__btn.is-active {
  color: var(--bg);
  background: var(--accent);
  border-color: var(--accent);
  font-weight: 600;
}

.panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(16px, 3vw, 24px);
  box-shadow: var(--shadow);
}

.panel + .panel,
.teams-grid--year-readonly + .panel {
  margin-top: 14px;
}

.panel.is-hidden {
  display: none;
}

.panel__head {
  margin-bottom: 16px;
}

.panel__head--row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.panel__title {
  margin: 0 0 4px;
  font-size: 1.15rem;
  font-weight: 600;
}

.panel__title--with-info {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.info-tip {
  position: relative;
  display: inline-flex;
  vertical-align: middle;
}

.info-tip__trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
  padding: 0;
  border: 1px solid var(--muted);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.72rem;
  font-style: italic;
  font-weight: 700;
  line-height: 1;
  cursor: help;
}

.info-tip:hover .info-tip__trigger,
.info-tip:focus-within .info-tip__trigger {
  border-color: var(--accent);
  color: var(--accent);
}

.info-tip__bubble {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  left: 50%;
  width: max-content;
  max-width: min(22rem, 85vw);
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 400;
  line-height: 1.45;
  text-align: left;
  white-space: normal;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%);
  transition: opacity 0.15s ease, visibility 0.15s ease;
}

.info-tip:hover .info-tip__bubble,
.info-tip:focus-within .info-tip__bubble {
  opacity: 1;
  visibility: visible;
}

/* Collapse-bar / title tips sit toward the right — open the bubble leftward so it stays on-page */
.admin-collapse__lead > .info-tip,
.panel__title--with-info .info-tip {
  flex-shrink: 0;
}

.admin-collapse__lead > .info-tip .info-tip__bubble,
.panel__title--with-info .info-tip__bubble {
  left: auto;
  right: 0;
  transform: none;
  z-index: 40;
}

.course-hcp-collapse,
.course-hcp-collapse .admin-collapse__bar,
.course-hcp-collapse .admin-collapse__lead {
  overflow: visible;
}

.panel__hint {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.panel__hint--footnote {
  margin-top: 10px;
  font-size: 0.8rem;
  font-style: italic;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.field__label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.select {
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  min-width: 140px;
}

.scroll-x {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -8px;
  padding: 0 8px;
  max-width: 100%;
}

.matrix {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.matrix th,
.matrix td {
  padding: 10px 12px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.matrix th {
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.matrix th:first-child,
.matrix td:first-child {
  text-align: left;
  position: sticky;
  left: 0;
  background: var(--bg-elevated);
  z-index: 1;
  box-shadow: 8px 0 12px -8px rgba(0, 0, 0, 0.5);
}

.matrix tbody tr:hover td {
  background: var(--row-hover);
}

.matrix tbody tr:hover td:first-child {
  background: var(--surface);
}

.place {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.place--1 {
  color: var(--gold);
}

.place--2 {
  color: var(--silver);
}

.place--3 {
  color: var(--bronze);
}

.place--dash {
  color: var(--muted);
  font-weight: 400;
}

.trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  margin-left: 6px;
  color: var(--muted);
}

.trend--up {
  color: var(--danger);
}

.trend--down {
  color: var(--accent);
}

.table-standings {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}

.table-standings th,
.table-standings td {
  padding: 12px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.table-standings th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.year-card__title {
  margin: 0 0 4px;
  font-size: 1.1rem;
}

.year-card__meta {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.9rem;
}

.player-cards {
  display: grid;
  gap: 12px;
}

@media (min-width: 640px) {
  .player-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

.player-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  background: var(--surface);
}

.player-card__name {
  margin: 0 0 8px;
  font-weight: 600;
}

.player-card__avg {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.player-card__timeline {
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.6;
}

.footer {
  margin-top: 28px;
  font-size: 0.8rem;
  color: var(--muted);
}

.footer code {
  font-size: 0.85em;
  background: var(--surface);
  padding: 2px 6px;
  border-radius: 6px;
}

.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
  font-weight: 600;
}

.btn--primary:hover:not(:disabled) {
  filter: brightness(1.06);
}

.btn--primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn--small {
  padding: 6px 10px;
  font-size: 0.85rem;
}

.btn--danger {
  border-color: rgba(240, 113, 120, 0.45);
  color: var(--danger);
}

.btn--danger:hover {
  background: rgba(240, 113, 120, 0.12);
}

.panel--event {
  margin-bottom: 16px;
}

.form-grid {
  display: grid;
  gap: 12px 16px;
}

.form-grid--2 {
  grid-template-columns: 1fr 2fr;
}

.form-grid--event {
  grid-template-columns: 1fr 1fr;
}

.field--span2 {
  grid-column: 1 / -1;
}

@media (max-width: 560px) {
  .form-grid--2 {
    grid-template-columns: 1fr;
  }

  .form-grid--event {
    grid-template-columns: 1fr;
  }
}

.form-grid--round {
  grid-template-columns: 1fr 1fr;
}

.admin-round-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-round-form__course {
  width: 100%;
}

.course-api-lookup {
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 92%, var(--bg-elevated));
}

.course-api-lookup__bar {
  display: flex;
  gap: 8px;
  align-items: center;
}

.course-api-lookup__input {
  flex: 1 1 auto;
  min-width: 0;
}

.course-api-lookup__error {
  margin: 8px 0 0;
  color: var(--danger);
}

.course-api-results {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.course-api-result {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-elevated);
}

.course-api-result__main {
  min-width: 0;
}

.course-api-result__meta {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.75rem;
}

.admin-round-schedule {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 560px) {
  .admin-round-schedule {
    grid-template-columns: 1fr;
  }
}

.admin-round-course-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-start;
}

.admin-round-tee-stack {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 10.5rem;
  max-width: 14rem;
}

.admin-round-holes-panel {
  flex: 1 1 22rem;
  min-width: 0;
}

.admin-round-holes-panel .admin-hole-grid-wrap {
  margin-top: 0;
}

.admin-hole-grid-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin-bottom: 8px;
}

.admin-hole-grid-toolbar > .field__label {
  margin: 0;
}

.admin-hole-grid-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.admin-hole-grid-wrap--locked .admin-hole-grid__row .input--locked {
  pointer-events: none;
}

.admin-round-form input[type="date"],
.admin-round-form input[type="time"] {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
}

.input--computed {
  cursor: default;
  color: var(--muted);
  background: var(--bg-elevated);
}

.admin-hole-grid-wrap {
  margin-top: 14px;
}

.admin-hole-grid {
  display: flex;
  align-items: stretch;
  gap: 12px;
}

.admin-hole-grid__table {
  flex: 1 1 auto;
  min-width: 0;
}

.admin-hole-grid__row {
  display: grid;
  grid-template-columns: 2.75rem repeat(18, minmax(2.6rem, 1fr));
  gap: 4px;
  align-items: center;
  margin-bottom: 4px;
}

.admin-hole-grid__row--heads {
  margin-bottom: 6px;
}

.admin-hole-grid__row-label,
.admin-hole-grid__head {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
}

.admin-hole-grid__row-label {
  text-align: right;
  padding-right: 4px;
}

.admin-hole-grid__head {
  padding: 2px 0;
}

.admin-hole-grid__row .input--hole {
  width: 100%;
  min-width: 0;
  padding: 6px 4px;
  text-align: center;
  font-size: 0.85rem;
  -moz-appearance: textfield;
  appearance: textfield;
}

.admin-hole-grid__row .input--hole::-webkit-outer-spin-button,
.admin-hole-grid__row .input--hole::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.admin-hole-grid__totals {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 4.5rem;
  padding-top: 1.35rem;
  border-left: 1px solid var(--border);
  padding-left: 12px;
}

.admin-hole-grid__totals-head {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-hole-grid__total-line {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  min-height: 2rem;
  justify-content: center;
}

.admin-hole-grid__total-key {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
}

.admin-hole-grid__total-val {
  font-size: 1rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.hole-hcp-warn-wrap {
  margin-top: 10px;
}

.hole-hcp-warn {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--danger);
  font-size: 0.85rem;
}

.admin-hole-grid__row .input--hole.input--invalid {
  border-color: var(--danger);
  background: rgba(240, 113, 120, 0.08);
}

.field--grow {
  min-width: 0;
}

.field--hi {
  max-width: 140px;
}

.field--cap {
  max-width: 88px;
  align-self: end;
}

.field--teamname {
  margin-bottom: 8px;
}

.field input,
.field select {
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  width: 100%;
}

.cap-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
}

.teams-grid {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}

@media (min-width: 800px) {
  .teams-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  /* Year page: team | scoreboard | team */
  .teams-grid--year-readonly {
    grid-template-columns: minmax(0, 1fr) minmax(230px, 290px) minmax(0, 1fr);
    align-items: stretch;
  }

  .teams-grid--year-readonly .team-card--readonly-0 {
    grid-column: 1;
    grid-row: 1;
  }

  .teams-grid--year-readonly .trip-scoreboard {
    grid-column: 2;
    grid-row: 1;
  }

  .teams-grid--year-readonly .team-card--readonly-1 {
    grid-column: 3;
    grid-row: 1;
  }
}

@media (max-width: 799px) {
  .teams-grid--year-readonly {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
  }

  .teams-grid--year-readonly .trip-scoreboard {
    grid-column: 1 / -1;
    padding: 10px 12px 12px;
  }

  .teams-grid--year-readonly .team-card--readonly-0 {
    grid-column: 1;
  }

  .teams-grid--year-readonly .team-card--readonly-1 {
    grid-column: 2;
  }

  .teams-grid--year-readonly .team-card--readonly {
    padding: 10px 12px;
    min-width: 0;
  }

  .teams-grid--year-readonly .readonly-team__title {
    margin-bottom: 6px;
    font-size: 0.85rem;
    line-height: 1.2;
  }

  .teams-grid--year-readonly .readonly-team__list {
    padding-left: 1rem;
    font-size: 0.82rem;
  }

  .teams-grid--year-readonly .readonly-team__line-full {
    display: none;
  }

  .teams-grid--year-readonly .readonly-team__line-short {
    display: inline;
  }
}

.team-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(14px, 3vw, 20px);
  box-shadow: var(--shadow);
}

.player-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1.25fr) minmax(100px, 120px) 72px;
  gap: 10px;
  align-items: end;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}

/* Admin teams: slot | golfer | captain (no HI column) */
.admin-golfers-table__order {
  width: 4.5rem;
  white-space: nowrap;
  vertical-align: middle;
}

.admin-golfers-table__order .btn {
  min-width: 2rem;
  padding: 4px 6px;
  line-height: 1;
}

.admin-golfers-table__name {
  display: inline-block;
  max-width: 100%;
  font-weight: 500;
  color: var(--accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-golfers-table th.hc-num,
.admin-golfers-table td.hc-num {
  width: 1%;
  padding-left: 4px;
  padding-right: 4px;
  white-space: nowrap;
  text-align: center;
}

.admin-golfers-actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.admin-golfers-table__hci {
  display: inline-block;
  min-width: 2.5rem;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  color: var(--accent);
  white-space: nowrap;
}

.admin-golfers-table .js-golfer-hci-year {
  box-sizing: border-box;
  width: 3.25rem;
  min-width: 0;
  padding: 6px 4px;
  font: inherit;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-align: center;
  -moz-appearance: textfield;
  appearance: textfield;
}

.admin-golfers-table .js-golfer-hci-year::-webkit-outer-spin-button,
.admin-golfers-table .js-golfer-hci-year::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.admin-player-row {
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px 10px;
  align-items: center;
  padding: 6px 0;
}

.admin-player-row .field--golfer-pick {
  gap: 0;
}

.admin-player-row .field--golfer-pick .select {
  min-width: 0;
  width: 100%;
  padding: 8px 10px;
}

.admin-player-row .field--cap {
  max-width: none;
  width: auto;
  min-width: 3.5rem;
  justify-self: end;
  margin-left: auto;
  gap: 2px;
}

.admin-player-row .field--cap .field__label {
  font-size: 0.68rem;
}

.admin-player-row .cap-wrap {
  min-height: 0;
}

.admin-event-collapse .player-row__slot {
  padding-bottom: 0;
  align-self: center;
}

.admin-event-collapse .teams-grid {
  gap: 10px;
  margin-bottom: 12px;
}

.admin-event-collapse .team-card {
  padding: 12px 14px;
}

.admin-event-collapse .field--teamname {
  margin-bottom: 6px;
}

.admin-event-collapse .admin-subheading {
  margin: 14px 0 8px;
  font-size: 0.95rem;
  font-weight: 600;
}

.admin-subheading.panel__title--with-info {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.admin-event-collapse .admin-subheading:first-of-type {
  margin-top: 4px;
}

@media (max-width: 640px) {
  .player-row {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
  }

  .player-row .field--hi {
    grid-column: 2;
    max-width: none;
  }

  .player-row .field--cap {
    grid-column: 1 / -1;
    max-width: none;
    justify-self: start;
  }

  .cap-wrap {
    justify-content: flex-start;
  }

  .admin-player-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-rows: auto;
    align-items: center;
  }

  .admin-player-row .field--cap {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    margin-left: 0;
  }

  .admin-player-row .field--golfer-pick {
    grid-column: 2;
  }

  .admin-player-row .player-row__slot {
    grid-column: 1;
  }

  .admin-player-row .cap-wrap {
    justify-content: flex-end;
  }
}

.player-row__slot {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  padding-bottom: 10px;
  width: 1.25rem;
  text-align: center;
}

.badge-captain {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  vertical-align: middle;
}

.player-name--short {
  display: none;
}

@media (max-width: 799px) {
  .player-name--full {
    display: none;
  }

  .player-name--short {
    display: inline;
  }
}

.badge-captain--compact {
  display: none;
}

/* Year-page team listing: full “Captain” on desktop, “C” on mobile */
.teams-grid--year-readonly .badge-captain--full {
  display: inline-block;
}

.teams-grid--year-readonly .badge-captain--compact {
  display: none;
  margin-left: 2px;
  padding: 1px 5px;
  font-size: 0.65rem;
}

@media (max-width: 799px) {
  .teams-grid--year-readonly .badge-captain--full {
    display: none;
  }

  .teams-grid--year-readonly .badge-captain--compact {
    display: inline-block;
  }
}

.rounds-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.round-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  background: var(--surface);
}

.round-card__title {
  grid-column: 1;
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.round-card__remove {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
}

.round-card .admin-round-form {
  grid-column: 1 / -1;
}

.admin-rounds-heading {
  margin: 0 0 10px;
}

.admin-rounds-actions {
  margin-top: 12px;
}

.admin-events-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.admin-events-toolbar {
  margin-bottom: 0;
}

.admin-events-toolbar__head {
  margin-bottom: 0;
}

.admin-events-toolbar__actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.admin-events-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-events-empty {
  margin: 0;
  padding: clamp(16px, 3vw, 24px);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.admin-panel.admin-collapse + .admin-events-wrap {
  margin-top: 12px;
}

.admin-event-collapse + .admin-event-collapse {
  margin-top: 0;
}

.admin-panel.admin-collapse:not(.admin-collapse--open) {
  padding-top: clamp(14px, 2.5vw, 20px);
  padding-bottom: clamp(14px, 2.5vw, 20px);
}

.admin-event-collapse.admin-collapse:not(.admin-collapse--open) {
  padding-top: 8px;
  padding-bottom: 8px;
  padding-left: 12px;
  padding-right: 12px;
}

.admin-panel.admin-collapse:not(.admin-collapse--open) .admin-collapse__body {
  margin: 0;
  padding: 0;
  border: 0;
}

.admin-collapse__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  min-height: 2.5rem;
}

.admin-event-collapse:not(.admin-collapse--open) .admin-collapse__bar--event {
  min-height: 0;
  column-gap: 10px;
  row-gap: 0;
  align-items: center;
}

.admin-collapse__lead {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex: 1 1 auto;
  min-width: 0;
  overflow: visible;
}

.admin-collapse__lead .admin-collapse__toggle {
  flex: 1 1 auto;
}

.admin-collapse__toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.admin-event-collapse:not(.admin-collapse--open) .admin-collapse__toggle {
  gap: 8px;
}

.admin-collapse__toggle:hover .admin-collapse__title {
  color: var(--accent);
}

.admin-collapse__chevron {
  flex-shrink: 0;
  width: 0.55em;
  height: 0.55em;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
  opacity: 0.85;
}

.admin-collapse--open > .admin-collapse__bar .admin-collapse__chevron,
.admin-collapse--open > .admin-collapse__lead .admin-collapse__chevron,
.admin-collapse--open > .round-card__head > .admin-collapse__toggle > .admin-collapse__chevron,
.admin-collapse--open > .matchups-block__head .admin-collapse__chevron {
  transform: rotate(45deg);
}

.admin-collapse__head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.admin-event-collapse:not(.admin-collapse--open) .admin-collapse__head {
  gap: 0;
}

.admin-collapse__title {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
}

.admin-event-collapse:not(.admin-collapse--open) .admin-collapse__title {
  font-size: 0.95rem;
  line-height: 1.2;
}

.admin-event-collapse .admin-collapse__title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.75rem;
  width: 100%;
  min-width: 0;
}

.admin-event-collapse:not(.admin-collapse--open) .admin-collapse__title-row {
  gap: 0.15rem 0.5rem;
}

.admin-event-collapse .admin-collapse__title-row .admin-collapse__tagline {
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--accent-light);
}

.admin-event-collapse:not(.admin-collapse--open) .admin-collapse__title-row .admin-collapse__tagline {
  font-size: 0.8rem;
  line-height: 1.2;
}

.admin-event-collapse .admin-collapse__summary-row {
  display: block;
  width: 100%;
  min-width: 0;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.35;
}

.admin-event-collapse:not(.admin-collapse--open) .admin-collapse__summary-row {
  font-size: 0.78rem;
  line-height: 1.2;
}

.admin-event-collapse .admin-collapse__summary-location {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-collapse__bar--event {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: start;
  column-gap: 14px;
  row-gap: 2px;
}

.admin-collapse__bar--event .admin-collapse__toggle {
  grid-column: 1;
  grid-row: 1 / 3;
  align-self: stretch;
}

.admin-event-collapse:not(.admin-collapse--open) .admin-collapse__bar--event .admin-collapse__toggle {
  align-self: center;
}

.admin-event-collapse__rounds {
  grid-column: 2;
  grid-row: 2;
  justify-self: end;
  align-self: end;
  font-size: 1.275rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--muted);
  white-space: nowrap;
  padding-bottom: 1px;
}

.admin-event-collapse:not(.admin-collapse--open) .admin-event-collapse__rounds {
  grid-row: 1 / 3;
  align-self: center;
  font-size: 0.9rem;
  font-weight: 600;
  padding-bottom: 0;
}

.admin-event-fields-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
  width: 100%;
  margin-bottom: 4px;
}

.admin-event-fields__hint {
  margin: 0 0 12px;
}

@media (max-width: 560px) {
  .admin-event-fields-split {
    grid-template-columns: 1fr;
  }
}

.admin-collapse__summary {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.35;
}

.admin-collapse__hint {
  margin: 0 0 12px;
}

.admin-collapse--open .admin-collapse__body {
  padding-top: 12px;
  border-top: 1px solid var(--border);
  margin-top: 12px;
}

.admin-collapse:not(.admin-collapse--open) .admin-collapse__body[hidden] {
  display: none;
}

/* Year tab — course handicaps (chevron + collapse; matches admin disclosure) */
.course-hcp-collapse.admin-collapse:not(.admin-collapse--open) {
  padding-top: clamp(14px, 2.5vw, 20px);
  padding-bottom: clamp(14px, 2.5vw, 20px);
}

.course-hcp-collapse .admin-collapse__title {
  font-size: 1.15rem;
}

.hc-table.hc-table--leaderboard {
  table-layout: auto;
  min-width: 100%;
}

.hc-table--leaderboard th.hc-sticky,
.hc-table--leaderboard td.hc-sticky {
  width: 1%;
  min-width: 9.5rem;
  max-width: 15rem;
}

.hc-table--purple-jacket td.hc-sticky {
  min-width: 11rem;
  max-width: 16rem;
}

.pj-tracker-player {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.pj-tracker-player__awards {
  flex: 0 0 1.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.15rem;
  min-height: 1.45em;
  line-height: 1;
}

.pj-tracker-player__awards:empty {
  visibility: hidden;
}

.pj-tracker-player__name {
  flex: 1 1 auto;
  min-width: 0;
}

.pj-tracker-player .purple-jacket-award__icon {
  width: 1.38em;
  height: 1.38em;
}

.pj-tracker-player .leaderboard-clown {
  font-size: 1.2em;
  line-height: 1;
}

.hc-table--leaderboard .hc-leaderboard-sub {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.hc-table--purple-jacket .hc-th-round,
.hc-table--purple-jacket .hc-th-title,
.hc-table--purple-jacket th.hc-num,
.hc-table--purple-jacket td.hc-num,
.hc-table--purple-jacket .hc-leaderboard-sub,
.hc-table--purple-jacket .hc-leaderboard-total {
  text-align: center;
}

.hc-table--purple-jacket .pj-col-round-start {
  border-left: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}

.hc-table--purple-jacket .pj-round-low-net {
  display: inline-block;
  padding: 1px 7px;
  font-weight: 600;
  line-height: 1.3;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}

.hc-table--leaderboard .hc-leaderboard-total {
  font-weight: 600;
  background: color-mix(in srgb, var(--bg-elevated) 88%, transparent);
}

.hc-table.hc-table--overall-leaderboard {
  table-layout: fixed;
  width: 100%;
  min-width: 52rem;
}

.hc-table--overall-leaderboard th.hc-sticky,
.hc-table--overall-leaderboard td.hc-sticky {
  width: 34%;
  min-width: 15rem;
  max-width: none;
  white-space: nowrap;
}

.hc-table--overall-leaderboard th.hc-col-total,
.hc-table--overall-leaderboard td.hc-col-total {
  width: 9%;
}

.hc-table--overall-leaderboard th.hc-col-wlt,
.hc-table--overall-leaderboard td.hc-col-wlt {
  width: 14%;
}

.hc-table--overall-leaderboard th.hc-col-count,
.hc-table--overall-leaderboard td.hc-col-count {
  width: 9%;
}

.hc-table--overall-leaderboard thead .hc-th-sub {
  display: block;
  margin-top: 2px;
  font-weight: 400;
  font-size: 0.65rem;
  color: var(--muted);
  line-height: 1.2;
  text-transform: none;
  letter-spacing: normal;
}

.hc-table--overall-leaderboard .hc-leaderboard-total {
  font-weight: 600;
  background: color-mix(in srgb, var(--bg-elevated) 88%, transparent);
}

.hc-table--overall-leaderboard th.hc-num,
.hc-table--overall-leaderboard td.hc-num {
  text-align: center;
}

.hc-table--overall-leaderboard th.hc-col-total,
.hc-table--overall-leaderboard td.hc-col-total {
  text-align: center;
}

.hc-table--overall-leaderboard .hc-sort-th {
  padding: 0;
  vertical-align: bottom;
}

.hc-table--overall-leaderboard .hc-sort-btn {
  display: flex;
  align-items: flex-end;
  gap: 0.35rem;
  width: 100%;
  min-height: 100%;
  padding: 8px 8px;
  font: inherit;
  font-weight: 600;
  color: inherit;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  line-height: 1.2;
}

.hc-table--overall-leaderboard th.hc-num .hc-sort-btn {
  position: relative;
  justify-content: center;
  text-align: center;
}

.hc-table--overall-leaderboard .hc-sort-label {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.hc-table--overall-leaderboard th.hc-num .hc-sort-label {
  align-items: center;
}

.hc-table--overall-leaderboard .hc-sort-label-main {
  display: block;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}

.hc-table--overall-leaderboard .hc-sort-btn:hover {
  color: var(--text);
}

.hc-table--overall-leaderboard .hc-sort-th[aria-sort="ascending"] .hc-sort-btn,
.hc-table--overall-leaderboard .hc-sort-th[aria-sort="descending"] .hc-sort-btn {
  color: var(--accent);
}

.hc-table--overall-leaderboard .hc-sort-indicator {
  flex-shrink: 0;
  align-self: center;
  font-size: 0.65rem;
  line-height: 1;
  width: 0.75em;
  text-align: center;
}

.hc-table--overall-leaderboard th.hc-num .hc-sort-indicator {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: auto;
}

.hc-table--overall-leaderboard .hc-sort-indicator--idle {
  display: none;
}

.hc-table--overall-leaderboard .wl-pct {
  color: var(--muted);
  font-size: 0.88em;
}

.acecation-tip {
  position: relative;
  display: inline-block;
  cursor: help;
}

.acecation-tip__bubble {
  position: fixed;
  z-index: 1000;
  width: max-content;
  max-width: min(20rem, 90vw);
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 400;
  line-height: 1.4;
  text-align: left;
  white-space: normal;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}

.acecation-tip__bubble.is-visible {
  opacity: 1;
  visibility: visible;
}

.acecation-tip__line {
  display: block;
}

.acecation-tip__line + .acecation-tip__line {
  margin-top: 4px;
}

.acecation-tip__line--best {
  margin-left: -6px;
  margin-right: -6px;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.tracker-tip__win {
  color: #7dcea0;
  font-weight: 600;
}

.tracker-tip__loss {
  color: #f07178;
  font-weight: 600;
}

.hc-table.hc-table--h2h {
  table-layout: auto;
  min-width: 100%;
}

.hc-table--h2h th.hc-sticky,
.hc-table--h2h td.hc-sticky,
.hc-table--h2h th.h2h-row-label {
  text-align: left;
  min-width: 8.5rem;
  max-width: 14rem;
}

.hc-table--h2h .h2h-corner {
  vertical-align: bottom;
}

.hc-table--h2h .h2h-col {
  vertical-align: bottom;
  padding-left: 4px;
  padding-right: 4px;
  min-width: 3.25rem;
}

.hc-table--h2h .h2h-col-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 4.5rem;
}

.hc-table--h2h .h2h-cell {
  text-align: center;
  font-size: 0.8rem;
  padding-left: 4px;
  padding-right: 4px;
  border-radius: 6px;
}

.hc-table--h2h .h2h-cell .acecation-tip {
  display: inline-block;
  max-width: 100%;
}

.hc-table--h2h .h2h-cell .acecation-tip__value {
  font-weight: inherit;
  color: inherit;
}

.hc-table--h2h .h2h-cell--self {
  color: var(--muted);
}

.hc-table--h2h .h2h-cell--neutral {
  background: color-mix(in srgb, #edeaf2 8%, var(--bg-elevated));
  color: var(--text);
}

/* Winning records: deeper green as net (W−L) grows */
.hc-table--h2h .h2h-cell--strong {
  font-weight: 600;
}

.hc-table--h2h .h2h-cell--strong-1 {
  background: color-mix(in srgb, #5a9e78 12%, var(--bg-elevated));
  color: #9bc4ad;
}

.hc-table--h2h .h2h-cell--strong-2 {
  background: color-mix(in srgb, #5a9e78 20%, var(--bg-elevated));
  color: #b0d4c0;
}

.hc-table--h2h .h2h-cell--strong-3 {
  background: color-mix(in srgb, #5a9e78 30%, var(--bg-elevated));
  color: #c5e4d2;
}

.hc-table--h2h .h2h-cell--strong-4 {
  background: color-mix(in srgb, #5a9e78 42%, var(--bg-elevated));
  color: #d8f0e2;
}

/* Losing records: deeper red as net (W−L) drops */
.hc-table--h2h .h2h-cell--poor {
  font-weight: 600;
}

.hc-table--h2h .h2h-cell--poor-1 {
  background: color-mix(in srgb, #c07078 11%, var(--bg-elevated));
  color: #c9a0a6;
}

.hc-table--h2h .h2h-cell--poor-2 {
  background: color-mix(in srgb, #c07078 20%, var(--bg-elevated));
  color: #d8b0b6;
}

.hc-table--h2h .h2h-cell--poor-3 {
  background: color-mix(in srgb, #c07078 30%, var(--bg-elevated));
  color: #e4c4c8;
}

.hc-table--h2h .h2h-cell--poor-4 {
  background: color-mix(in srgb, #c07078 42%, var(--bg-elevated));
  color: #f0d6da;
}

.hc-table--h2h tbody tr:hover td.h2h-cell--neutral {
  background: color-mix(in srgb, #edeaf2 12%, var(--surface));
}

.hc-table--h2h tbody tr:hover td.h2h-cell--strong-1 {
  background: color-mix(in srgb, #5a9e78 18%, var(--surface));
}

.hc-table--h2h tbody tr:hover td.h2h-cell--strong-2 {
  background: color-mix(in srgb, #5a9e78 26%, var(--surface));
}

.hc-table--h2h tbody tr:hover td.h2h-cell--strong-3 {
  background: color-mix(in srgb, #5a9e78 36%, var(--surface));
}

.hc-table--h2h tbody tr:hover td.h2h-cell--strong-4 {
  background: color-mix(in srgb, #5a9e78 48%, var(--surface));
}

.hc-table--h2h tbody tr:hover td.h2h-cell--poor-1 {
  background: color-mix(in srgb, #c07078 16%, var(--surface));
}

.hc-table--h2h tbody tr:hover td.h2h-cell--poor-2 {
  background: color-mix(in srgb, #c07078 26%, var(--surface));
}

.hc-table--h2h tbody tr:hover td.h2h-cell--poor-3 {
  background: color-mix(in srgb, #c07078 36%, var(--surface));
}

.hc-table--h2h tbody tr:hover td.h2h-cell--poor-4 {
  background: color-mix(in srgb, #c07078 48%, var(--surface));
}

.summary-years-table {
  table-layout: fixed;
  width: 100%;
  min-width: 28rem;
}

.summary-years-table th:nth-child(1),
.summary-years-table td:nth-child(1) {
  width: 52%;
  text-align: left;
}

.summary-years-table th:nth-child(2),
.summary-years-table td:nth-child(2),
.summary-years-table th:nth-child(3),
.summary-years-table td:nth-child(3) {
  width: 18%;
  text-align: center;
}

.summary-years-table .hc-num {
  text-align: center;
}

.summary-years-table .sum-event-main {
  display: block;
}

.summary-years-table .sum-event-location {
  display: block;
  margin-top: 3px;
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.3;
}

.summary-years-table th,
.summary-years-table td {
  text-align: center;
}

.summary-years-table th {
  text-transform: none;
  letter-spacing: normal;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  vertical-align: bottom;
}

.summary-years-table th .th-sub {
  display: block;
  margin-top: 2px;
  font-size: 0.65rem;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.2;
  text-transform: none;
  letter-spacing: normal;
}

.overall-awards {
  display: inline-flex;
  align-items: flex-end;
  gap: 0.35em;
  margin-left: 0.2em;
  white-space: nowrap;
  vertical-align: middle;
}

.purple-jacket-award {
  display: inline-flex;
  line-height: 1;
}

.purple-jacket-award--career {
  position: relative;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.purple-jacket-award--career .purple-jacket-award__icon {
  width: 1.75em;
  height: 1.75em;
}

.purple-jacket-award__year {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.5em;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
  text-shadow:
    0 0 3px rgba(70, 70, 70, 0.95),
    0 1px 2px rgba(55, 55, 55, 0.85);
  pointer-events: none;
}

.purple-jacket-award__icon {
  width: 1.2em;
  height: 1.2em;
  display: block;
  object-fit: contain;
}

.clown-award {
  display: inline-flex;
  line-height: 1;
}

.clown-award--career {
  flex-direction: column;
  align-items: center;
  gap: 0.08em;
  font-size: 0.92rem;
}

.clown-award__icon {
  display: block;
  line-height: 1;
}

.clown-award__year {
  font-size: 0.46em;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--muted);
}

.hc-table.hc-table--individual-tracker {
  table-layout: auto;
  min-width: 100%;
}

.hc-table--individual-tracker th.hc-sticky,
.hc-table--individual-tracker td.hc-sticky {
  width: 1%;
  min-width: 9.5rem;
  max-width: 15rem;
}

.hc-table--individual-tracker thead .hc-th-sub {
  font-weight: 400;
}

.hc-table {
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.hc-table th,
.hc-table td {
  padding: 8px 8px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

.hc-table thead th {
  background: var(--bg-elevated);
  font-weight: 600;
  color: var(--muted);
  vertical-align: bottom;
}

.hc-table th.hc-sticky,
.hc-table td.hc-sticky {
  width: 8.5rem;
  max-width: 22%;
}

.hc-table th.hc-col-hi,
.hc-table td.hc-col-hi {
  width: 2.5rem;
  padding-left: 2px;
  padding-right: 2px;
}

.hc-table--rounds-3 th.hc-th-round {
  width: calc((100% - 8.5rem - 2.5rem) / 3);
}

.hc-table--rounds-4 th.hc-th-round {
  width: calc((100% - 8.5rem - 2.5rem) / 4);
}

.hc-table th.hc-num,
.hc-table td.hc-num {
  padding-left: 3px;
  padding-right: 3px;
  font-size: 0.78rem;
  text-align: center;
}

.hc-th-round {
  text-align: center;
  vertical-align: bottom;
  min-width: 0;
  padding: 6px 3px;
}

.hc-th-title {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.25;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

.hc-th-sub {
  display: block;
  font-weight: 400;
  font-size: 0.65rem;
  color: var(--muted);
  margin-top: 3px;
  line-height: 1.3;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

.hc-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.hc-muted {
  color: var(--muted);
}

.hc-overridden {
  font-weight: 600;
}

.hc-override-mark {
  margin-left: 0.15em;
  font-weight: 700;
  text-decoration: none;
  color: var(--accent, #8b6cc7);
}

.admin-ch-overrides {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

.admin-ch-overrides__title {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.admin-ch-overrides__table {
  margin-top: 0.5rem;
  max-width: 36rem;
}

.admin-ch-overrides__table .input--ch-override {
  width: 4.5rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.hc-sticky {
  position: sticky;
  left: 0;
  z-index: 1;
  box-shadow: 6px 0 10px -8px rgba(0, 0, 0, 0.6);
  background: var(--bg-elevated);
}

.hc-table tbody td.hc-sticky {
  background: var(--bg-elevated);
}

.hc-table tbody tr:hover td {
  background: var(--row-hover);
}

.hc-table tbody tr:hover td.hc-sticky {
  background: var(--surface);
}

.year-tabs {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.year-tabs__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.year-tabs__btn {
  font: inherit;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--muted);
  padding: 10px 16px;
  border-radius: 999px;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.year-tabs__btn:hover {
  color: var(--text);
}

.year-tabs__btn.is-active {
  color: var(--bg);
  background: var(--accent);
  border-color: var(--accent);
  font-weight: 600;
}

.year-tabs__btn--summary {
  border-color: var(--accent-dim);
}

.year-tabs__btn--summary.is-active {
  background: var(--tab-summary-active);
  border-color: var(--tab-summary-active);
  color: var(--text);
}

.year-tabs__info {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  margin-left: 2px;
}

.year-tabs__info .info-tip__bubble {
  left: auto;
  right: 0;
  transform: none;
}

.year-tabs__btn--year {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 5px;
  padding-bottom: 5px;
  line-height: 1.05;
}

.year-tabs__btn--year .year-tabs__label-full {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.year-tabs__btn--year .year-tabs__roman {
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1;
  opacity: 0.85;
}

.year-tabs__btn--year.is-active .year-tabs__roman {
  opacity: 1;
}

.year-tabs__btn--year .year-tabs__label-short {
  display: none;
}

.year-tabs__year-select {
  display: none;
}

@media (max-width: 639px) {
  .year-tabs__btn--year {
    display: none;
  }

  .year-tabs__year-select {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 7.5rem;
    padding: 10px 12px;
    border-radius: 999px;
    font-weight: 600;
  }
}

.summary-years-table .sum-team {
  display: block;
  margin-top: 4px;
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--muted);
}

.summary-years-table .sum-captain {
  display: block;
  margin-top: 2px;
  font-size: 0.68rem;
  font-weight: 400;
  color: var(--muted);
}

.summary-years-table .sum-team-cell--winner {
  font-weight: 700;
  color: var(--accent);
}

.summary-years-table .sum-team-cell--winner .sum-team,
.summary-years-table .sum-team-cell--winner .sum-captain {
  font-weight: inherit;
  color: inherit;
}

.th-sub {
  font-weight: 400;
  font-size: 0.68rem;
  color: var(--muted);
}

.matchups-block {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.matchups-block__title {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 600;
}

.matchups-block__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin-bottom: 8px;
}

.matchups-block__head .matchups-block__title {
  margin-bottom: 0;
}

.matchups-block--collapsible .matchups-block__head {
  margin-bottom: 6px;
}

.matchups-block--collapsible .admin-collapse__bar--matchups {
  width: 100%;
  min-height: 0;
}

.matchups-block--collapsible .admin-collapse__title {
  font-size: 1rem;
}

.matchups-block--collapsible.admin-collapse:not(.admin-collapse--open) {
  padding-bottom: 0;
}

.matchups-block__body {
  margin-top: 4px;
}

.matchups-block__toolbar {
  flex-shrink: 0;
}

.matchups-block__actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.matchups-block__hint {
  margin-bottom: 12px;
}

.round-points {
  margin: 0 0 16px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.95rem;
}

.round-points--summary {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 6px 10px;
  flex-shrink: 0;
  text-align: right;
  font-size: 1.05rem;
  line-height: 1.15;
}

.round-points__score {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: flex-end;
  gap: 0.3em;
  font-weight: 600;
}

.round-points__team {
  font-size: 0.92em;
  font-weight: 500;
  color: var(--text);
}

.round-points__dash {
  color: var(--muted);
  font-weight: 500;
}

.round-points__pts {
  font-size: 1.15em;
  font-variant-numeric: tabular-nums;
}

.round-points__pts--team0 {
  color: var(--winner-team1);
}

.round-points__pts--team1 {
  color: var(--winner-team2);
}

.round-pairings {
  margin: 0 0 20px;
  padding: 14px 14px 6px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.round-pairings__title {
  margin: 0 0 6px;
  font-size: 0.95rem;
  font-weight: 600;
}

.round-pairings__hint {
  margin: 0 0 14px;
  font-size: 0.82rem;
}

.round-pairings--readonly .round-pairings__title {
  font-size: 1rem;
}

.pairing-group--readonly {
  padding-bottom: 4px;
}

.pairing-readonly-line {
  display: flex;
  align-items: center;
  gap: 8px 10px;
  margin: 0 0 8px;
  font-size: 0.9rem;
  line-height: 1.45;
}

.pairing-readonly-line__kind {
  flex: 0 0 5.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.pairing-readonly-line__picks {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px 10px;
  flex: 1;
  min-width: 0;
}

.pairing-readonly-line__side {
  text-align: center;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.round-pairings--readonly .pairing-readonly-line__side {
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  line-height: 1.35;
}

.admin-matchups-section {
  margin-bottom: 20px;
}

.admin-matchups-settings {
  margin-bottom: 14px;
}

.admin-matchups-section__hint {
  margin: 0 0 14px;
}

.admin-matchups-rounds {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-matchup-round {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.admin-matchup-round__title {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
}

.admin-matchup-round__meta {
  margin: 0 0 10px;
  font-size: 0.82rem;
  color: var(--muted);
}

.admin-matchup-round .round-pairings {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
}

.admin-matchup-round .round-pairings__title,
.admin-matchup-round .round-pairings__hint {
  display: none;
}

.admin-matchups-warn {
  margin-top: 10px;
}

.match-result {
  margin: 0 0 8px;
  font-size: 0.84rem;
  line-height: 1.45;
}

.match-result__label {
  font-weight: 600;
  color: var(--muted);
}

.match-result__value--pending {
  color: var(--muted);
  font-style: italic;
}

.match-result--na .match-result__value {
  color: var(--muted);
  font-style: italic;
}

.match-line--na {
  opacity: 0.92;
}

.pairing-readonly-line__na {
  color: var(--muted);
  font-style: italic;
  font-weight: 600;
}

.match-winner {
  font-weight: 700;
}

.match-winner--team0 {
  color: var(--winner-team1);
}

.match-winner--team1 {
  color: var(--winner-team2);
}

.match-cell-lines.match-winner--team0 .match-cell-lines__name,
.match-cell-lines.match-winner--team0 .match-cell-lines__score {
  color: var(--winner-team1);
}

.match-cell-lines.match-winner--team1 .match-cell-lines__name,
.match-cell-lines.match-winner--team1 .match-cell-lines__score {
  color: var(--winner-team2);
}

.match-singles__result .match-result {
  margin: 0;
  width: 100%;
}

.match-line__result-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 10px;
}

.match-line__result-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.match-line--doubles-result .match-line__picks {
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.match-line__pairing-label {
  font-size: 0.9rem;
}

.pairing-groups {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pairing-group {
  padding: 12px 12px 4px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
}

.pairing-group__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(12rem, 38%);
  gap: 12px 16px;
  align-items: stretch;
}

.round-pairings__teams-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(12rem, 38%);
  gap: 12px 16px;
  margin-bottom: 10px;
  padding: 0 2px;
}

.round-pairings__teams-banner-singles .pairing-group__teams {
  margin-bottom: 0;
}

.round-pairings__teams-banner-doubles {
  min-width: 0;
}

.pairing-group__teams--compact {
  margin: 0 0 8px;
  padding: 0;
}

.pairing-group__teams--compact .pairing-group__teams-picks {
  width: 100%;
}

.pairing-group__teams--compact .pairing-group__team {
  font-size: 0.82rem;
}

.pairing-group__doubles-col .pairing-line--doubles .pairing-line__side--derived {
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

.pairing-group__singles-col {
  min-width: 0;
}

.pairing-group__doubles-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-left: 12px;
  border-left: 1px solid var(--border);
}

.pairing-group__doubles-col .pairing-line {
  border-bottom: none;
  padding-top: 0;
  padding-bottom: 0;
  width: 100%;
}

.pairing-group__doubles-col .pairing-readonly-line {
  margin-bottom: 0;
}

.pairing-group__title {
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.pairing-group__teams {
  display: flex;
  align-items: flex-end;
  gap: 8px 10px;
  margin: 0 0 8px;
  padding: 0;
  border: none;
  background: none;
}

.pairing-group__teams-spacer {
  flex: 0 0 5.5rem;
}

.pairing-group__teams-picks {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px 10px;
  flex: 1;
  min-width: 0;
}

.pairing-group__teams-gap {
  width: 1.75rem;
}

.pairing-group__team {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pairing-line {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.pairing-line:last-child {
  border-bottom: none;
  padding-bottom: 6px;
}

.pairing-line__kind {
  flex: 0 0 5.5rem;
  font-weight: 500;
  font-size: 0.88rem;
  padding-top: 8px;
}

.pairing-line__picks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  flex: 1;
  min-width: 0;
}

.pairing-line--singles .pairing-line__picks,
.pairing-line--doubles .pairing-line__picks {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px 10px;
}

.pairing-line--singles .pairing-line__picks .select--sm,
.pairing-line--doubles .pairing-line__side--derived {
  width: 100%;
  min-width: 0;
}

.pairing-line--singles .pairing-line__picks .pairing-line__vs,
.pairing-line--doubles .pairing-line__picks .pairing-line__vs {
  justify-self: center;
}

.pairing-line--doubles .pairing-line__side--derived {
  font-size: 0.88rem;
  font-weight: 500;
  text-align: center;
  padding: 8px 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pairing-line--doubles .select--result {
  grid-column: 1 / -1;
  justify-self: end;
  width: 100%;
  max-width: 14rem;
}

@media (max-width: 520px) {
  .pairing-line--doubles .pairing-line__side--derived {
    white-space: normal;
  }

  .pairing-line--doubles .select--result {
    max-width: none;
    justify-self: stretch;
  }
}

.match-line--doubles-result .match-line__pairing-label {
  font-size: 0.88rem;
  font-weight: 500;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .match-line--doubles-result .match-line__pairing-label {
    white-space: normal;
  }
}

.pairing-line__vs {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 600;
}

.pairing-line--singles .select--sm {
  flex: 1 1 8rem;
  min-width: 0;
  max-width: 14rem;
}

.pairing-line--singles .select--result {
  grid-column: 1 / -1;
  justify-self: end;
  width: 100%;
  max-width: 14rem;
}

@media (max-width: 640px) {
  .pairing-line--singles .select--result {
    max-width: none;
    justify-self: stretch;
  }
}

.admin-matchup-round .pairing-line--doubles {
  padding-top: 12px;
  margin-top: 4px;
  border-top: 1px solid color-mix(in srgb, var(--border) 65%, transparent);
}

.admin-matchup-round .pairing-line--doubles .pairing-line__side--derived {
  background: var(--bg-elevated);
}

.match-sub {
  margin: 14px 0 8px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.match-sub--with-info {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.match-sub:first-of-type {
  margin-top: 0;
}

.match-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.match-line:last-child {
  border-bottom: none;
}

.match-line__kind {
  flex: 0 0 7.5rem;
  font-weight: 500;
  font-size: 0.9rem;
}

.match-line__picks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  flex: 1;
  min-width: 0;
}

.match-line--low-net {
  align-items: flex-start;
}

.match-line--manual {
  align-items: flex-start;
}

.match-line__manual-body {
  flex: 1;
  min-width: 0;
}

.manual-match {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.manual-match__picks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  flex: 1 1 12rem;
  min-width: 0;
}

.manual-match__picks--readonly .manual-pick__side {
  cursor: default;
}

.manual-match__vs {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  flex-shrink: 0;
}

.manual-pick__side {
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.3;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  cursor: pointer;
  text-align: center;
  min-width: 0;
  word-break: break-word;
  transition: border-color 0.15s, background 0.15s, color 0.15s, box-shadow 0.15s;
}

button.manual-pick__side:hover {
  border-color: var(--accent-dim);
}

.manual-pick__side--team0.is-selected,
.manual-pick__side--team0.is-winner {
  border-color: var(--winner-team1);
  background: color-mix(in srgb, var(--winner-team1) 18%, var(--bg-elevated));
  color: var(--winner-team1);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--winner-team1) 35%, transparent);
}

.manual-pick__side--team1.is-selected,
.manual-pick__side--team1.is-winner {
  border-color: var(--winner-team2);
  background: color-mix(in srgb, var(--winner-team2) 18%, var(--bg-elevated));
  color: var(--winner-team2);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--winner-team2) 35%, transparent);
}

.manual-pick__side--half {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  padding: 8px 10px;
}

.manual-pick__side--half.is-selected,
.manual-pick__side--half.is-winner {
  border-color: var(--accent-dim);
  background: color-mix(in srgb, var(--accent) 14%, var(--bg-elevated));
  color: var(--accent);
}

.manual-match__result {
  flex: 1 1 10rem;
  min-width: 0;
  font-size: 0.84rem;
  line-height: 1.45;
}

.manual-match__result--preview {
  opacity: 0.95;
}

.manual-match__def {
  color: var(--muted);
  font-weight: 500;
}

.manual-match .btn--small {
  flex-shrink: 0;
  align-self: flex-start;
}

.low-net-manual__select-label {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}

.low-net-manual__select {
  width: 100%;
  max-width: 320px;
  font-weight: 600;
  transition: border-color 0.15s, background 0.15s, color 0.15s, box-shadow 0.15s;
}

.low-net-manual__select--team0 {
  border-color: var(--winner-team1);
  background: color-mix(in srgb, var(--winner-team1) 18%, var(--bg-elevated));
  color: var(--winner-team1);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--winner-team1) 35%, transparent);
}

.low-net-manual__select--team1 {
  border-color: var(--winner-team2);
  background: color-mix(in srgb, var(--winner-team2) 18%, var(--bg-elevated));
  color: var(--winner-team2);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--winner-team2) 35%, transparent);
}

.low-net-manual__select--na {
  border-color: var(--muted);
  background: var(--bg-elevated);
  color: var(--muted);
}

.low-net-manual__hint {
  margin: 8px 0 0;
}

@media (max-width: 639px) {
  .match-line__kind--singles-title,
  .match-scorecard__title-toggle .match-line__kind--doubles-title {
    white-space: normal;
    word-break: break-word;
  }

  .match-singles__title-result {
    display: block;
    margin-top: 4px;
  }

  .match-singles__title-result .match-result__value {
    white-space: normal;
  }

  .match-scorecard__title-text {
    overflow-wrap: anywhere;
  }

  .manual-match {
    flex-direction: column;
    align-items: stretch;
  }

  .manual-match__result {
    order: 3;
    width: 100%;
    padding-top: 4px;
    border-top: 1px solid var(--border);
  }

  .manual-match__picks {
    width: 100%;
  }

  .manual-pick__side {
    flex: 1 1 calc(50% - 1rem);
  }

  .manual-pick__side--half {
    flex: 1 1 100%;
  }
}

.match-line__picks--low-net-readonly .match-result {
  margin: 0;
}

/* Doubles: team + two players stacked | vs | other team + two stacked; result on the right */
.match-line--doubles {
  align-items: flex-start;
}

.match-line__picks--doubles {
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
}

.doubles-side {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  flex: 1 1 10rem;
  max-width: 15rem;
}

.doubles-side__team {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.25;
  word-break: break-word;
}

.doubles-side .select--sm {
  width: 100%;
  max-width: none;
}

.doubles-vs {
  flex: 0 0 auto;
  align-self: center;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
  padding: 0 2px;
}

.doubles-result {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1 1 12rem;
  min-width: min(100%, 11rem);
}

.doubles-result .select--result {
  margin-left: 0;
  width: 100%;
  max-width: 12rem;
}

@media (min-width: 720px) {
  .match-line__picks--doubles {
    flex-wrap: nowrap;
  }

  .doubles-result {
    flex: 0 0 auto;
    margin-left: auto;
    min-width: 0;
  }

  .doubles-result .select--result {
    width: auto;
  }
}

@media (max-width: 719px) {
  .doubles-result {
    flex-basis: 100%;
    justify-content: stretch;
  }

  .doubles-result .select--result {
    max-width: none;
  }
}

.match-line__hint {
  font-size: 0.8rem;
  color: var(--muted);
  max-width: 14rem;
}

.vs {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 600;
}

.select--sm {
  min-width: 0;
  max-width: 11rem;
  padding: 8px 10px;
  font-size: 0.88rem;
}

.select--result {
  max-width: 12rem;
  margin-left: auto;
}

@media (max-width: 640px) {
  .select--result {
    margin-left: 0;
    width: 100%;
    max-width: none;
  }

  .match-line__kind {
    flex: 1 1 100%;
  }

  .singles-holes-controls .select,
  .singles-holes-controls .select--result {
    flex: 1 1 100%;
    max-width: none;
  }
}

.matchups-warn {
  margin: 12px 0 0;
  padding-left: 1.2rem;
  color: var(--danger);
  font-size: 0.85rem;
}

.match-line--singles {
  flex-wrap: wrap;
  align-items: flex-start;
}

.match-line__singles-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
}

.match-line__singles-holes-wrap {
  flex: 1;
  min-width: 0;
}

.matchups-singles-hint {
  margin: 4px 0 10px;
  font-size: 0.82rem;
}

.singles-scorecard,
.match-scorecard {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.singles-scorecard {
  padding: 0 10px 10px;
}

.match-scorecard--doubles {
  padding: 10px 12px;
}

.match-scorecard__pairing {
  margin: 0 0 10px;
  font-size: 0.84rem;
  line-height: 1.4;
  color: var(--text);
}

.match-scorecard__pairing--year-title .match-line__kind--doubles-title {
  font-size: inherit;
  font-weight: 600;
  color: var(--text);
}

.doubles-scorecard__pairing {
  margin: 0 0 4px;
}

.doubles-scorecard__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px 12px;
}

.doubles-scorecard__bar--top {
  padding: 4px 0 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

.doubles-scorecard__bar--collapsed {
  padding: 6px 0 4px;
}

.doubles-scorecard__bar-main {
  flex: 1 1 12rem;
  min-width: 0;
}

.doubles-scorecard__bar-main--fill {
  flex: 1 1 auto;
}

.match-scorecard--doubles-collapsed .doubles-scorecard__bar--collapsed {
  align-items: center;
}

.match-scorecard__title-toggle {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  padding: 6px 0 4px;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
}

.match-scorecard__title-toggle:hover .match-line__kind--singles-title,
.match-scorecard__title-toggle:hover .match-line__kind--doubles-title {
  color: var(--accent);
}

.match-scorecard__title-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.match-scorecard__title-chevron {
  flex-shrink: 0;
  width: 0.5rem;
  height: 0.5rem;
  margin-top: 0.35em;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
}

.match-scorecard__title-toggle[aria-expanded="true"] .match-scorecard__title-chevron {
  transform: rotate(45deg);
}

.match-scorecard__title-text {
  flex: 1 1 auto;
  min-width: 0;
}

.match-scorecard__title-toggle .match-scorecard__pairing {
  margin: 0;
}

.match-scorecard__title-toggle .match-line__kind--singles-title {
  font-size: 0.82rem;
  font-weight: 600;
}

.singles-scorecard--collapsed .match-scorecard__title-toggle {
  padding: 10px 0 0;
}

.doubles-scorecard__bar--collapsed .match-scorecard__title-toggle {
  padding: 0;
}

.doubles-scorecard__bar--top .match-scorecard__title-toggle {
  flex: 1 1 auto;
}

.js-doubles-scorecard-close,
.js-doubles-scorecard-expand {
  flex-shrink: 0;
  align-self: flex-start;
}

.match-scorecard__result .select--result {
  width: 100%;
  max-width: none;
}

.singles-scorecard--collapsed {
  padding-bottom: 10px;
}

.singles-scorecard__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.singles-scorecard__bar--top {
  padding: 6px 0 4px;
}

.singles-scorecard__bar .match-line__kind--singles-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.82rem;
  font-weight: 600;
}

.singles-scorecard--collapsed .singles-scorecard__bar {
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px 10px;
}

.singles-scorecard--collapsed .singles-scorecard__bar .match-line__kind--singles-title {
  flex: 1 1 12rem;
}

.singles-scorecard__bar--actions {
  justify-content: flex-end;
  padding: 6px 0 2px;
  border-top: 1px solid var(--border);
  margin-top: 2px;
}

.singles-scorecard--collapsed .singles-scorecard__bar {
  padding: 10px 0 0;
}

.singles-scorecard__label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.singles-scorecard__status {
  font-size: 0.82rem;
  color: var(--text);
  flex: 1 1 10rem;
  min-width: 0;
}

.singles-scorecard__hint {
  margin: 0 0 6px;
  font-size: 0.72rem;
}

.singles-scorecard__scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.singles-holes-ltr.singles-holes-ltr--grid {
  --score-gutter: 3.1rem;
  display: grid;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  /* gutter · holes 1–9 · OUT · holes 10–18 · IN · TOTAL */
  grid-template-columns: var(--score-gutter) repeat(21, minmax(0, 1fr));
  column-gap: 2px;
  row-gap: 2px;
  align-items: stretch;
  padding: 2px 0 4px;
  font-variant-numeric: tabular-nums;
}

.singles-h-grid-gutter {
  display: flex;
  align-items: center;
  width: auto;
  max-width: none;
  min-width: 0;
  text-align: left;
  padding-right: 2px;
  box-sizing: border-box;
}

.singles-h-grid-gutter--head {
  min-height: 1.1em;
}

.singles-h-grid-gutter--name {
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  align-self: center;
}

.singles-h-grid-gutter--meta {
  font-size: 0.58rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  align-self: center;
}

.singles-h-grid-gutter--stroke {
  min-height: 0;
  align-self: stretch;
  padding: 0 4px 0 0;
}

.singles-holes-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  padding: 0 2px 10px;
  margin-bottom: 2px;
  border-bottom: 1px solid var(--border);
}

.singles-holes-controls .select {
  min-width: 0;
  flex: 1 1 10rem;
  max-width: 16rem;
}

.singles-holes-controls .select--result {
  margin-left: 0;
  flex: 1 1 12rem;
  max-width: 18rem;
}

.singles-h-grid-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: auto;
  max-width: none;
  min-width: 0;
  text-align: center;
}

.singles-h-grid-cell--head {
  font-size: 0.58rem;
  font-weight: 700;
  color: var(--muted);
  min-height: auto;
  padding: 1px 0;
}

.singles-h-grid-cell--par,
.singles-h-grid-cell--hcp {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--muted);
  min-height: 1.35rem;
  padding: 0;
}

.singles-h-grid-cell--par-sum {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  background: color-mix(in srgb, var(--border) 22%, transparent);
  border-radius: 5px;
}

.singles-h-grid-cell--net {
  font-size: 0.7rem;
  line-height: 1.15;
}

.singles-h-grid-cell--net-split {
  display: block;
  position: relative;
  width: auto;
  max-width: none;
  min-width: 0;
  min-height: 1.45rem;
  padding: 0;
  overflow: hidden;
  border-radius: 4px;
}

.singles-h-grid-cell--net-split.singles-h-grid-cell--sum {
  padding: 0;
}

.singles-h-grid-cell--net-split .gross-net__half {
  font-size: 0.58rem;
  font-weight: 700;
  color: var(--text);
}

.singles-h-grid-cell--net-split.singles-h-grid-cell--sum .gross-net__half {
  font-size: 0.62rem;
}

.singles-h-grid-cell--match {
  font-size: 0.62rem;
  line-height: 1.15;
  color: var(--text);
}

.match-cell-lines {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.06em;
  line-height: 1.12;
  max-width: 100%;
}

.match-cell-lines__name {
  font-weight: 700;
  font-size: 0.62rem;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-cell-lines__score {
  font-weight: 700;
  font-size: 0.58rem;
}

.match-cell-lines--as .match-cell-lines__score {
  font-size: 0.62rem;
}

.match-stand-cell {
  display: inline-flex;
  flex-direction: column;
  cursor: default;
  vertical-align: middle;
  max-width: 100%;
}

.singles-h-grid-cell--match .match-winner.match-cell-lines {
  font-size: inherit;
  white-space: normal;
}

.singles-h-grid-cell--sum {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text);
  background: color-mix(in srgb, var(--border) 35%, transparent);
  border-radius: 5px;
  padding: 0 2px;
  min-height: 1.75rem;
}

.singles-h-grid-cell--sum-empty {
  background: transparent;
  border-radius: 0;
  font-weight: inherit;
  min-height: 0;
}

.singles-h-grid-cell--head.singles-h-grid-cell--sum {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: transparent;
  min-height: auto;
  padding: 2px 0;
}

.singles-h-grid-cell--sum.singles-h-grid-cell--net:not(.singles-h-grid-cell--net-split) {
  font-size: 0.68rem;
  font-weight: 600;
  gap: 0;
  line-height: 1.15;
  white-space: nowrap;
  padding: 0 1px;
}

.singles-h-grid-cell--sum.singles-h-grid-cell--net:not(.singles-h-grid-cell--net-split) .hc-num {
  font-size: inherit;
}

.gross-net__half {
  position: absolute;
  inset: 0;
  display: flex;
  box-sizing: border-box;
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
  pointer-events: none;
}

.gross-net__half--gross {
  clip-path: polygon(0 0, 100% 0, 0 100%);
  align-items: flex-start;
  justify-content: flex-start;
  padding: 2px 4px 0 3px;
  background: color-mix(in srgb, var(--border) 18%, transparent);
}

.gross-net__half--net {
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
  align-items: flex-end;
  justify-content: flex-end;
  padding: 0 3px 2px 4px;
  background: color-mix(in srgb, var(--border) 28%, transparent);
}

/* Doubles Net team rows: ring around the partner net that counts as best ball on each hole */
.singles-h-grid-cell--net-split .hc-num.doubles-net-low-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.05rem;
  min-height: 1.05rem;
  padding: 0 3px;
  border: 1.5px solid color-mix(in srgb, var(--text) 50%, var(--border));
  border-radius: 50%;
  box-sizing: border-box;
  line-height: 1;
}

.singles-h-grid-cell--net-split .hc-num.doubles-net-low-circle--team0 {
  border-color: var(--winner-team1);
  color: var(--winner-team1);
}

.singles-h-grid-cell--net-split .hc-num.doubles-net-low-circle--team1 {
  border-color: var(--winner-team2);
  color: var(--winner-team2);
}

.singles-gross-input-wrap.singles-gross-input-wrap--won-team0 .input--hole,
.singles-holes-ltr.singles-holes-ltr--grid .singles-gross-input-wrap--won-team0 .input--hole {
  border-color: var(--winner-team1);
  border-width: 2px;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--winner-team1) 28%, transparent);
}

.singles-gross-input-wrap.singles-gross-input-wrap--won-team1 .input--hole,
.singles-holes-ltr.singles-holes-ltr--grid .singles-gross-input-wrap--won-team1 .input--hole {
  border-color: var(--winner-team2);
  border-width: 2px;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--winner-team2) 28%, transparent);
}

.singles-gross-input-wrap {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.singles-h-grid-cell--gross {
  flex-direction: column;
  overflow: visible;
  padding: 1px 0;
}

.singles-h-grid-cell--gross-readonly {
  padding: 1px 0;
}

.singles-gross-readonly {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  min-height: 1.45rem;
  box-sizing: border-box;
  padding: 0 1px;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text);
  background: color-mix(in srgb, var(--border) 12%, transparent);
  border: 1px solid var(--border);
  border-radius: 4px;
  text-align: center;
}

.match-doubles-net-gutter {
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
  gap: 0;
}

.match-doubles-net-gutter__k {
  font-size: 0.58rem;
}

.match-doubles-net-gutter__t {
  font-size: 0.52rem;
  font-weight: 600;
  color: var(--muted);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-scorecard__doubles-hint {
  margin-bottom: 8px;
}

.singles-h-grid-cell--stroke-mark {
  min-height: 0.7rem;
  padding: 0;
  align-items: center;
  justify-content: center;
}

.singles-h-grid-cell--stroke-mark .singles-stroke-mark {
  min-height: 0;
  line-height: 1.05;
}

.singles-gross-input-wrap .input--hole,
.singles-holes-ltr.singles-holes-ltr--grid .input--hole {
  width: 100%;
  min-width: 0;
  max-width: none;
  box-sizing: border-box;
  height: 1.45rem;
  padding: 0 1px;
  font: inherit;
  font-size: 0.68rem;
  line-height: 1.45rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  text-align: center;
  -moz-appearance: textfield;
  appearance: textfield;
}

.singles-gross-input-wrap .input--hole::-webkit-outer-spin-button,
.singles-gross-input-wrap .input--hole::-webkit-inner-spin-button,
.singles-holes-ltr.singles-holes-ltr--grid .input--hole::-webkit-outer-spin-button,
.singles-holes-ltr.singles-holes-ltr--grid .input--hole::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.singles-stroke-mark {
  flex: 0 0 auto;
  font-size: 0.58rem;
  font-weight: 700;
  color: var(--muted);
  line-height: 1;
  letter-spacing: -0.06em;
  user-select: none;
  text-align: center;
  min-height: 0.65rem;
}

.singles-h-grid-cell--net .hc-num {
  font-size: inherit;
}

.singles-net-sep {
  color: var(--muted);
  font-weight: 400;
  font-size: 0.58rem;
  margin: 0 1px;
}

.match-total-row td {
  border-top: 2px solid var(--border);
  padding-top: 14px;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(12px, 3vh, 40px) 16px 32px;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
}

.modal {
  width: min(920px, 100%);
  max-height: min(92vh, 1200px);
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.modal__title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
}

.modal__close {
  font-size: 1.5rem;
  line-height: 1;
  padding: 4px 12px;
}

.modal__body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px 24px;
}

.modal__footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.ghin-add-modal__lead {
  margin: 0 0 14px;
}

.ghin-add-modal__steps {
  margin: 0 0 18px;
  padding-left: 1.25rem;
  color: var(--text);
  font-size: 0.92rem;
}

.ghin-add-modal__steps li {
  margin-bottom: 10px;
}

.ghin-add-modal__steps li:last-child {
  margin-bottom: 0;
}

.ghin-add-modal__fields {
  margin-top: 4px;
}

.field__optional {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.85em;
}

.year-tabs__add {
  margin-left: auto;
}

.readonly-dl {
  display: grid;
  gap: 12px 24px;
  margin: 0;
}

@media (min-width: 520px) {
  .readonly-dl {
    grid-template-columns: repeat(3, 1fr);
  }
}

.readonly-dl dt {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 4px;
}

.readonly-dl dd {
  margin: 0;
  font-weight: 500;
}

.section-heading {
  margin: 20px 0 12px;
  font-size: 1rem;
  font-weight: 600;
}

.section-heading-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin: 20px 0 12px;
}

.section-heading-row .section-heading {
  margin: 0;
}

.section-heading-row .btn {
  flex-shrink: 0;
}

.team-card--readonly {
  padding: 16px 18px;
}

.readonly-team__title {
  margin: 0 0 10px;
  font-size: 1.05rem;
}

/* Center column on year page: trip match points */
.trip-scoreboard {
  position: relative;
  z-index: 4;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 10px 14px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  min-width: 0;
  overflow: visible;
}

.trip-scoreboard--popout-open {
  z-index: 30;
}

.trip-scoreboard__heading-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.trip-scoreboard__heading {
  margin: 0;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.trip-scoreboard__heading-row > .info-tip {
  flex-shrink: 0;
}

.trip-scoreboard__heading-row > .info-tip .info-tip__bubble {
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  z-index: 40;
  text-align: left;
}

.trip-scoreboard__scores {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  justify-items: center;
  column-gap: 10px;
  row-gap: 6px;
  width: 100%;
}

.trip-scoreboard__team-name--0 {
  grid-column: 1;
  grid-row: 1;
}

.trip-scoreboard__team-name--1 {
  grid-column: 3;
  grid-row: 1;
}

.trip-scoreboard__pts--team0 {
  grid-column: 1;
  grid-row: 2;
  color: var(--winner-team1);
}

.trip-scoreboard__pts--team1 {
  grid-column: 3;
  grid-row: 2;
  color: var(--winner-team2);
}

.trip-scoreboard__pts {
  font-size: clamp(2.425rem, 6.56vw, 3.2rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.trip-scoreboard__team-name {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  text-align: center;
  align-self: center;
}

.trip-scoreboard__mid {
  grid-column: 2;
  grid-row: 2;
  align-self: center;
  margin-top: 0;
  padding-bottom: 0;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--muted);
  opacity: 0.55;
  user-select: none;
}

.trip-scoreboard__mid--gap {
  grid-column: 2;
  grid-row: 1;
  width: 0;
  height: 0;
  margin: 0;
  padding: 0;
  opacity: 0;
  font-size: 0;
}

.trip-scoreboard__rounds-btn {
  margin: 2px 0 0;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  line-height: 1.2;
}

.trip-scoreboard__rounds-btn:hover,
.trip-scoreboard__rounds-btn[aria-expanded="true"] {
  border-color: var(--accent);
  color: var(--accent);
}

.trip-scoreboard__popout {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: max(100%, min(22rem, calc(100vw - 2rem)));
  padding: 12px 12px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  text-align: left;
  z-index: 35;
}

.trip-scoreboard__popout[hidden],
.trip-scoreboard__popout:not(.trip-scoreboard__popout--open) {
  display: none;
}

.trip-scoreboard__popout-head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 8px;
}

.trip-scoreboard__popout-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
}

.trip-scoreboard__popout-head > .info-tip .info-tip__bubble {
  left: 0;
  right: auto;
  transform: none;
  z-index: 45;
}

.trip-scoreboard__table {
  width: 100%;
  font-size: 0.78rem;
}

.trip-scoreboard__table th,
.trip-scoreboard__table td {
  padding: 6px 6px;
}

.trip-scoreboard__table th.hc-num,
.trip-scoreboard__table td.hc-num {
  text-align: center;
}

.teams-grid--year-readonly {
  overflow: visible;
}

.readonly-team__list {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--text);
}

.readonly-team__line-short {
  display: none;
}

.round-card--readonly {
  grid-template-columns: 1fr;
  margin-bottom: 0;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  padding: 10px 12px;
  gap: 0;
}

.round-card--readonly.admin-collapse:not(.admin-collapse--open) {
  padding-top: 8px;
  padding-bottom: 8px;
}

.round-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 10px;
  margin-bottom: 0;
}

.round-card__course-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 12rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.round-card__course-logo {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--border);
}

.round-card__course-toggle:focus-visible {
  outline: 2px solid var(--accent, #7c6cf0);
  outline-offset: 3px;
  border-radius: 6px;
}

.round-card__course-text {
  min-width: 0;
}

.round-card__head .round-card__title {
  display: block;
  margin: 0;
  font-size: clamp(1.05rem, 2.4vw, 1.25rem);
  font-weight: 700;
  line-height: 1.2;
}

.round-card__body .readonly-round__meta {
  margin: 0 0 10px;
  font-size: 0.88rem;
  color: var(--muted);
}

.round-card--readonly .round-card__head {
  grid-column: 1;
}

.round-card--readonly .round-card__body {
  grid-column: 1;
  margin-top: 8px;
}

.round-card--readonly.admin-collapse:not(.admin-collapse--open) .round-card__body {
  margin-top: 0;
}

.round-card--readonly .matchups-block {
  grid-column: 1;
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.matchups-block--year .round-points {
  margin-bottom: 10px;
  padding: 8px 10px;
  font-size: 0.88rem;
}

@media (max-width: 639px) {
  .round-card__head {
    align-items: center;
  }

  .round-points--summary {
    width: auto;
    margin-left: auto;
    text-align: right;
    font-size: 1rem;
    padding: 5px 8px;
  }

  .round-points__score {
    justify-content: flex-end;
  }
}

.round-card--readonly .round-pairings {
  margin-bottom: 10px;
  padding: 10px 10px 2px;
}

.round-card--readonly .round-pairings__hint {
  display: none;
}

.round-card--readonly .pairing-groups {
  gap: 8px;
}

.round-card--readonly .pairing-readonly-line {
  margin-bottom: 5px;
  font-size: 0.84rem;
  gap: 6px 8px;
}

.round-card--readonly .pairing-readonly-line__kind {
  flex: 0 0 4.5rem;
  font-size: 0.68rem;
}

.round-card--readonly .match-sub {
  margin: 10px 0 6px;
  font-size: 0.7rem;
}

.round-card--readonly .match-line {
  padding: 6px 0;
  gap: 8px 10px;
}

.round-card--readonly .match-line__kind {
  flex: 0 0 5rem;
  font-size: 0.82rem;
}

.round-card--readonly .match-line__hint {
  display: none;
}

.round-card--readonly .match-line__pairing-label {
  font-size: 0.84rem;
  line-height: 1.35;
}

.match-line--singles-compact {
  display: block;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  max-width: 100%;
  min-width: 0;
}

.match-line--singles-compact:last-child {
  border-bottom: none;
}

.match-line--doubles-compact {
  display: block;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  max-width: 100%;
  min-width: 0;
}

.match-line--doubles-compact:last-child {
  border-bottom: none;
}

.match-doubles__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-bottom: 6px;
}

.match-line--doubles-compact .match-line__kind {
  flex: 0 0 auto;
  font-size: 0.82rem;
  font-weight: 600;
}

.match-singles__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 10px;
  margin-bottom: 8px;
}

.match-line--singles-compact .match-line__kind {
  flex: 0 0 auto;
  font-size: 0.82rem;
  font-weight: 600;
}

.match-line__kind--singles-title {
  flex: 1 1 100%;
  max-width: 100%;
  line-height: 1.45;
}

.match-singles__title-result {
  font-weight: 400;
}

.match-singles__title-result .match-result__value {
  display: inline;
  font-weight: inherit;
}

.match-line--singles-compact .match-singles__result {
  width: 100%;
  margin-bottom: 6px;
}

.match-singles__result {
  flex: 1 1 9rem;
  min-width: 0;
  display: flex;
  justify-content: flex-start;
}

.match-singles__result .select--result {
  width: 100%;
  max-width: 13rem;
}

.match-line--singles-compact .match-line__singles-holes-wrap {
  width: 100%;
  min-width: 0;
}

.round-card--readonly .singles-scorecard {
  padding: 0 4px 6px;
  border-radius: 6px;
}

.round-card--readonly .match-scorecard--doubles {
  padding: 8px 10px;
  border-radius: 6px;
}

.round-card--readonly .match-scorecard__pairing {
  margin-bottom: 8px;
  font-size: 0.82rem;
}

.round-card--readonly .singles-scorecard__hint {
  display: none;
}

.round-card--readonly .singles-scorecard__bar--top {
  padding: 4px 0 2px;
}

.round-card--readonly .singles-scorecard__scroll {
  margin: 0;
  max-width: 100%;
}

@media (max-width: 640px) {
  .pairing-group__layout,
  .round-pairings__teams-banner {
    grid-template-columns: 1fr;
  }

  .round-pairings__teams-banner-doubles {
    display: none;
  }

  .pairing-group__doubles-col {
    padding-left: 0;
    padding-top: 10px;
    border-left: none;
    border-top: 1px solid var(--border);
    justify-content: flex-start;
  }
}

.empty-years {
  max-width: 40rem;
}

.panel--readonly-overview {
  margin-top: 8px;
}

.legacy-event-awards__field,
.legacy-event-awards__clown {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 320px;
}

.legacy-event-awards__label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
}

.legacy-event-awards__select {
  width: 100%;
  padding: 8px 10px;
  font-size: 0.84rem;
}

.legacy-event-awards__grid {
  display: grid;
  gap: 10px;
}

@media (min-width: 640px) {
  .legacy-event-awards__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
