:root {
  color-scheme: light;
  --bg: #d9d9d7;
  --ink: #3e4240;
  --muted: #838a85;
  --line: #e5e7e4;
  --panel: #ffffff;
  --green: #1f4d25;
  --green-dark: #183d1d;
  --highlight: #7ba946;
  --home: #0aa537;
  --blue: #2c608e;
  --amber: #b57b20;
  --red: #9d0d0d;
  --shadow: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.modal-open {
  overflow: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  background: var(--green);
  color: #fff;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 0 13px;
}

button:hover {
  background: var(--green-dark);
}

button.secondary {
  background: #e7ece5;
  color: var(--ink);
}

button.secondary:hover {
  background: #dbe4d8;
}

button.warning {
  background: var(--amber);
}

button.danger {
  background: var(--red);
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  padding: 11px 12px;
}

.player-role-locked {
  background: #f1f4f0;
  color: #5b625d;
  cursor: not-allowed;
}

.player-role-locked:disabled {
  opacity: 1;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.form-check-row {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
}

.form-check-row input {
  width: 16px;
  height: 16px;
  padding: 0;
}

main {
  width: min(1040px, calc(100% - 32px));
  margin: 30px auto 60px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px max(16px, calc((100vw - 1180px) / 2));
  background: var(--green);
  border-bottom: 3px solid var(--highlight);
  color: #fff;
}

.brand-lockup {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.brand-logo-slot {
  display: grid;
  place-items: center;
  width: 100px;
  height: 100px;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

.brand-logo-slot img,
.match-logo-slot img,
.club-logo-slot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-logo-slot img {
  filter: brightness(0) invert(1);
}

.topbar h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(1.2rem, 2vw, 2rem);
  line-height: 1.1;
}

.header-version {
  margin: 4px 0 0;
  color: #d5e3d7;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0 0 8px;
  color: #cfe4d4;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.eyebrow.dark {
  color: var(--muted);
}

.tabs {
  display: flex;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
}

.tab {
  min-width: 96px;
  background: transparent;
  color: #fff;
}

.tab.active {
  background: #fff;
  color: var(--ink);
}

.account-summary {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 12px;
  min-width: 190px;
  text-align: right;
}

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

.account-summary strong {
  font-size: 0.92rem;
}

.account-summary span {
  margin-top: 3px;
  color: #cfe4d4;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

[hidden] {
  display: none !important;
}

.panel {
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 20px;
}

.schedule-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin: 10px 0 20px;
}

.schedule-head h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
}

.new-match-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  border-radius: 7px;
  padding: 0 13px;
  font-size: 0.84rem;
  white-space: nowrap;
}

.new-match-button img {
  width: 16px;
  height: 16px;
  filter: brightness(0) invert(1);
}

.new-match-button.disabled-button,
.new-match-button:disabled {
  background: #c8cec7;
  color: #6f7771;
  cursor: not-allowed;
}

.new-match-button.disabled-button img,
.new-match-button:disabled img {
  opacity: 0.65;
  filter: none;
}

button.disabled-button,
button:disabled {
  background: #c8cec7;
  color: #6f7771;
  cursor: not-allowed;
}

.schedule-form {
  display: grid;
  grid-template-columns: 1.5fr 0.9fr 0.9fr 0.8fr 0.9fr auto;
  align-items: end;
  gap: 14px;
  margin-top: -34px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: rgba(22, 28, 24, 0.42);
  padding: 24px;
}

.match-modal {
  width: min(680px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 24px;
}

.match-editor-modal {
  width: min(820px, 100%);
  padding-top: 20px;
}

.match-editor-modal label {
  gap: 6px;
  font-size: 0.78rem;
}

.match-editor-modal input,
.match-editor-modal select {
  min-height: 42px;
  padding: 8px 10px;
}

.match-editor-modal button {
  min-height: 34px;
  padding: 0 11px;
}

.match-editor-modal input,
.match-editor-modal select,
.match-editor-modal button {
  font-size: 0.8rem;
}

.match-modal h2 {
  margin: 0;
  font-size: 1.55rem;
}

.match-editor-modal h2 {
  font-size: 1.42rem;
}

.modal-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.modal-form > label:first-child,
.modal-actions,
.modal-wide {
  grid-column: 1 / -1;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
}

#matchForm {
  grid-template-columns: 1fr;
}

#matchForm > * {
  grid-column: 1 / -1;
}

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

.match-form-row-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.match-form-row-club {
  grid-template-columns: minmax(220px, 0.9fr) minmax(260px, 1.1fr);
}

.match-form-row-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.match-detail-date-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.match-detail-format-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.match-form-detail-band {
  display: grid;
  position: relative;
  gap: 10px;
  margin-top: 2px;
  padding: 12px 14px;
  border: 1px solid #d8ddd8;
  border-radius: 6px;
  background: #f0f2f0;
}

.match-form-detail-band label {
  position: relative;
}

.match-form-detail-band label:has(.match-calendar-picker) {
  position: static;
}

.match-form-detail-band input,
.match-form-detail-band select,
.date-picker-button {
  width: 100%;
  height: 42px;
  min-height: 42px;
  justify-content: flex-start;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 700;
  padding: 8px 10px;
  text-align: left;
}

.match-form-detail-band input[type="time"] {
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
  line-height: 1.2;
}

.match-form-detail-band input[type="time"]::-webkit-date-and-time-value {
  min-height: 0;
  text-align: left;
}

.match-form-detail-band input[type="time"]::-webkit-calendar-picker-indicator {
  margin: 0;
}

.date-picker-button:hover {
  background: #f8faf8;
  color: var(--ink);
}

.match-calendar-picker {
  position: absolute;
  left: 50%;
  top: -18px;
  z-index: 30;
  width: 240px;
  transform: translateX(-50%);
  border: 1px solid #c9d0ca;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 18px 38px rgba(20, 28, 22, 0.22);
  padding: 10px;
}

.calendar-head {
  display: grid;
  grid-template-columns: 30px 1fr 30px;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.calendar-head strong {
  font-size: 0.9rem;
  text-align: center;
}

.calendar-head button {
  min-height: 28px;
  padding: 0;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}

.calendar-weekdays {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-align: center;
}

.calendar-grid button,
.calendar-empty {
  min-height: 26px;
  padding: 0;
}

.calendar-grid button {
  border-radius: 4px;
  background: #f2f5f2;
  color: var(--ink);
}

.calendar-grid button:hover,
.calendar-grid button.selected {
  background: var(--green);
  color: #fff;
}

.email-preview-modal {
  width: min(820px, 100%);
}

.email-preview-shell {
  display: grid;
  gap: 16px;
}

.email-meta {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  background: #f7f8f5;
  padding: 14px;
}

.email-meta div {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.email-meta span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.email-meta p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.email-preview-card {
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
}

.email-preview-card.home {
  border-top: 4px solid #13a538;
}

.email-preview-card.away {
  border-top: 4px solid #a00000;
}

.email-preview-head {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  background: #eceeeb;
  color: var(--ink);
  padding: 22px;
}

.email-preview-logo {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
}

.email-preview-logo img {
  max-width: 88px;
  max-height: 88px;
  object-fit: contain;
}

.email-preview-actions {
  margin-top: 0;
}

.email-preview-head p,
.email-preview-head h3,
.email-preview-head span,
.email-preview-copy p {
  margin: 0;
}

.email-preview-head p {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.email-preview-head .email-location {
  font-weight: 900;
}

.email-preview-head .email-location.home {
  color: #13a538;
}

.email-preview-head .email-location.away {
  color: #a00000;
}

.email-preview-head h3 {
  font-size: 1.45rem;
}

.email-preview-head span {
  color: var(--muted);
  font-weight: 700;
}

.email-preview-copy {
  display: grid;
  gap: 10px;
  padding: 20px 22px;
  color: var(--ink);
  line-height: 1.5;
}

.email-pair-list {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.email-pair-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 12px 20px;
}

.email-pair-row:nth-child(even) {
  background: #f4f5f2;
}

.email-pair-row + .email-pair-row {
  border-top: 1px solid var(--line);
}

.email-pair-row time {
  color: var(--ink);
  font-weight: 900;
  white-space: nowrap;
}

.email-pair-row strong {
  font-size: 0.96rem;
  line-height: 1.22;
}

.email-pair-row strong span {
  color: var(--muted);
  padding: 0 4px;
}

.subtabs,
.segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
}

.captain-toolbar {
  display: grid;
  grid-template-columns: minmax(460px, 540px) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin: 35px 0 34px;
  border: 1px solid #cfd5cf;
  border-radius: 8px;
  background: #fff;
  padding: 14px 16px;
}

.toolbar-day-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  width: fit-content;
}

.captain-toolbar .subtabs {
  width: auto;
  flex: 0 0 auto;
  margin: 0;
  border: 1px solid #d6dad5;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.subtabs {
  width: min(980px, calc(100% - 40px));
  margin: 0 auto -1px;
  border: 1px solid #b9bbb8;
  background: #eee;
  display: flex;
  flex-wrap: nowrap;
}

.subtab,
.segment {
  min-height: 36px;
  border-radius: 0;
  background: #efefef;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 750;
  white-space: nowrap;
}

.subtab.active,
.segment.active {
  background: #f8f8f8;
  color: var(--ink);
  box-shadow: inset 0 -3px 0 #f8f8f8;
}

.captain-toolbar .subtab.active {
  background: var(--green);
  color: #fff;
  box-shadow: none;
}

.captain-toolbar .subtab:hover {
  background: var(--green);
  color: #fff;
}

.subtab + .subtab {
  border-left: 1px solid #b9bbb8;
}

.admin-links {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  margin: 12px 0 14px;
}

.toolbar-actions {
  align-items: center;
  justify-content: flex-end;
  gap: 0;
  margin: 0;
  flex-wrap: nowrap;
}

.toolbar-actions > * + * {
  border-left: 1px solid #d6dad5;
}

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  padding: 0 11px;
  font-size: 0.82rem;
  font-weight: 750;
  white-space: nowrap;
}

.icon-tool img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.text-button:hover,
.text-button.active {
  background: transparent;
  color: var(--green);
}

.text-button:disabled,
.text-button.disabled-action,
.text-button.disabled-button {
  color: #8b928b;
  cursor: not-allowed;
  opacity: 0.65;
  pointer-events: none;
}

.text-button:disabled:hover,
.text-button.disabled-action:hover,
.text-button.disabled-button:hover {
  color: #8b928b;
}

.admin-panel {
  display: none;
}

.admin-panel.active {
  display: block;
}

.admin-panel[data-panel='statsPanel'].active {
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 24px;
}

.admin-panel[data-panel='statsPanel'] .section-head {
  margin-bottom: 18px;
}

.player-admin-panel {
  position: sticky;
  top: 14px;
}

.schedule-column {
  min-width: 0;
}

.panel h2,
.card h3 {
  margin: 0;
}

.section-count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  min-height: 24px;
  margin-left: 8px;
  padding: 2px 9px;
  border-radius: 999px;
  background: #e7ece6;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 850;
  vertical-align: middle;
}

.stack {
  display: grid;
  gap: 14px;
}

.two-col,
.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.row-form,
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.row-form label {
  flex: 1;
}

.match-list {
  display: grid;
  gap: 48px;
  margin-top: 0;
}

.card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  padding: 16px;
}

.login-shell {
  display: grid;
  place-items: start center;
  padding-top: 28px;
}

.login-card {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 34px;
  width: min(880px, 100%);
  border: 1px solid #c6c8c3;
  background: #fff;
  padding: 34px;
}

.login-card h2 {
  margin: 8px 0;
  color: #1d3528;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  line-height: 1;
}

.login-copy {
  margin: 0;
  color: #657369;
  font-weight: 650;
  line-height: 1.5;
}

.login-required-title {
  margin: 14px 0 6px;
  color: #8b1d1d;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.login-required-copy {
  margin: 0;
  color: #8b1d1d;
  font-weight: 700;
  font-size: 0.86rem;
  line-height: 1.5;
}

.login-required-copy + .login-required-copy {
  margin-top: 10px;
}

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

.signup-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 650;
  line-height: 1.45;
}

.player-dashboard {
  width: 100%;
  margin: 0 auto;
}

.player-welcome {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.player-kicker,
.player-section-label,
.player-match-type {
  margin: 0;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}

.player-welcome h2 {
  margin: 4px 0 4px;
  color: #1d3528;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 5vw, 2.9rem);
  line-height: 1;
}

.player-handicap {
  margin: 0;
  color: #657369;
  font-size: 1.05rem;
  font-weight: 600;
}

.player-nav,
.player-league-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0 0 24px;
  border: 1px solid #b9bbb8;
  background: #eee;
}

.player-nav button {
  min-height: 46px;
  border-radius: 0;
  background: #efefef;
  color: var(--ink);
  font-weight: 650;
}

.player-nav button + button {
  border-left: 1px solid #b9bbb8;
}

.player-nav button.active {
  background: #fff;
  color: var(--green);
}

.player-league-nav {
  margin-bottom: 22px;
  border-color: #d6dad5;
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
}

.player-league-nav button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 58px;
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 850;
}

.player-league-nav button + button {
  border-left: 1px solid #d6dad5;
}

.player-league-nav button.active {
  background: var(--green);
  color: #fff;
}

.player-league-nav button img {
  width: 22px;
  height: 22px;
}

.player-league-nav button.active img {
  filter: brightness(0) invert(1);
}

.player-page-nav {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin: 0;
  border: 1px solid #d6dad5;
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
}

.player-page-nav button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 210px;
  min-height: 62px;
  border-radius: 0;
  border-bottom: 3px solid transparent;
  background: #fff;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 850;
}

.player-page-nav button.active {
  border-bottom-color: var(--green);
  color: var(--green);
}

.player-page-nav button:hover {
  background: #f4f6f3;
}

.player-page-nav img {
  width: 22px;
  height: 22px;
}

.player-toolbar {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 28px;
}

.player-captain-toolbar .text-button.icon-tool.active {
  background: #eef0ec;
  color: var(--ink);
}

.response-alert {
  margin-bottom: 28px;
  border: 1px solid #f0c94f;
  border-radius: 4px;
  background: #fff8dc;
  color: #9a3d00;
  padding: 16px 20px;
  font-weight: 700;
}

.response-alert.ready {
  border-color: #b9dfc8;
  background: #edf8f0;
  color: #27623d;
}

.player-section-label {
  margin-bottom: 18px;
}

.player-match-meta,
.player-match-count {
  margin: 0;
  color: #657369;
  font-size: 0.92rem;
  font-weight: 600;
}

.player-match-list {
  display: grid;
  gap: 40px;
}

.player-past-divider {
  margin: 4px 0 -16px;
  border-top: 1px solid #cfd4ce;
  padding-top: 18px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.player-match-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-top: 4px solid var(--home);
  border-radius: 6px;
  background: #fff;
}

.player-match-card.away {
  border-top-color: var(--red);
}

.player-match-card.declined-roster-match {
  border-color: #f2b9b9;
  border-top-color: var(--red);
}

.player-match-card.player-alternate-match {
  border-top-color: #6b726d;
}

.player-match-main {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  align-items: start;
  gap: 24px;
  background: #eceeeb;
  border-bottom: 1px solid #cfd4ce;
  padding: 24px;
}

.alternate-match-main {
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: center;
}

.player-card-logo {
  width: 130px;
  height: 130px;
  overflow: visible;
}

.player-card-logo img {
  width: 130px;
  height: 130px;
  max-width: none;
  max-height: none;
}

.player-match-card h3 {
  margin: 8px 0 6px;
  color: var(--ink);
  font-size: 1.55rem;
  line-height: 1.15;
}

.player-alternate-note {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: #fff1f7;
  color: #9c1a58;
  font-size: 0.82rem;
  font-weight: 800;
}

.player-alternate-note-text {
  flex: 1 1 auto;
  min-width: 0;
}

.alternate-decline-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex: 0 0 auto;
  min-height: 32px;
  border: 1px solid #ff9cbc;
  border-radius: 4px;
  background: #fff;
  color: #9c1a58;
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1;
  padding: 0 12px;
}

.alternate-decline-button .action-icon {
  width: 14px;
  height: 14px;
}

.alternate-decline-button:hover {
  background: #bf2f76;
  color: #fff;
}

.match-location-suffix {
  color: var(--home);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.58em;
  font-weight: 800;
  vertical-align: baseline;
  white-space: nowrap;
}

.away .match-location-suffix {
  color: var(--red);
}

.match-over .match-location-suffix {
  color: #626a64;
}

.player-match-count {
  margin: 28px 0 0;
  font-weight: 700;
}

.player-match-badge-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: -34px;
}

.player-status-tools {
  display: grid;
  grid-template-columns: minmax(150px, 190px);
  justify-content: end;
  align-items: start;
  justify-items: stretch;
  gap: 8px;
  min-width: 190px;
}

.player-status-tools .match-final-score {
  justify-self: end;
  justify-content: flex-start;
  min-width: 0;
  white-space: nowrap;
  text-align: left;
}

.player-actions {
  display: grid;
  grid-template-columns: 0.75fr 1fr 1fr;
  gap: 10px;
  padding: 14px 24px;
}

.player-card-actions {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr);
  justify-items: stretch;
  gap: 7px;
  min-width: 0;
  width: 100%;
}

.player-card-actions button,
.player-card-actions .pay-link {
  width: 100%;
  min-height: 42px;
  border-radius: 4px;
  background: #fff;
  color: #2f3631;
  font-size: 0.86rem;
  font-weight: 800;
  padding: 0 8px;
  white-space: nowrap;
}

.player-card-actions .pill.player-paid-badge {
  justify-self: center;
  align-self: center;
  min-width: 96px;
}

.player-card-actions button:hover,
.player-card-actions button.selected,
.player-card-actions button.selected:hover {
  background: var(--green);
  color: #fff;
}

.player-card-actions .pay-link,
.player-card-actions .pay-link:hover {
  position: relative;
  border: 1px solid #5ebf62;
  background: #6fbf73;
  color: #fff;
  overflow: hidden;
}

.player-card-actions .pay-link::after {
  content: '';
  position: absolute;
  top: -30%;
  left: -45%;
  width: 48%;
  height: 160%;
  border-radius: 2px;
  background: linear-gradient(
    115deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.16) 35%,
    rgba(255, 255, 255, 0.82) 50%,
    rgba(255, 255, 255, 0.16) 65%,
    rgba(255, 255, 255, 0) 100%
  );
  pointer-events: none;
  transform: translateX(-180%) rotate(14deg);
  animation: pay-glint-sweep 3.2s ease-in-out infinite;
}

.player-card-actions .unavailable,
.player-card-actions .unavailable:hover {
  border: 1px solid #ff6b6b;
  background: #ff8a8a;
  color: #fff;
}

.player-card-actions .unavailable.selected,
.player-card-actions .unavailable.selected:hover {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}

@keyframes pay-glint-sweep {
  0%, 58%, 100% {
    transform: translateX(-180%) rotate(14deg);
    opacity: 0;
  }
  60% {
    opacity: 0.95;
  }
  96% {
    transform: translateX(390%) rotate(14deg);
    opacity: 0.95;
  }
  99% {
    transform: translateX(450%) rotate(14deg);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .player-card-actions .pay-link,
  .player-card-actions .pay-link:hover {
    animation: none;
  }

  .player-card-actions .pay-link::after {
    animation: none;
  }
}

.player-card-actions button:disabled {
  cursor: default;
  opacity: 1;
}

.player-actions button,
.pay-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 34px;
  border-radius: 4px;
  font-size: 0.84rem;
  font-weight: 800;
}

.pay-link {
  border: 1px solid var(--green);
  background: #fff;
  color: var(--green);
  text-decoration: none;
}

.pay-link:hover {
  background: #eff8f1;
}

.pay-link.small {
  min-height: 34px;
  padding: 0 12px;
}

.player-actions .unavailable {
  border: 0;
  background: #cfd4ce;
  color: #2f3631;
}

.player-actions .unavailable:hover {
  background: #bdc4bc;
}

.declined-roster-note {
  padding: 14px 24px;
  background: #fff1f1;
  color: #9b0c0c;
  font-size: 0.86rem;
  font-weight: 800;
}

.player-published-roster {
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 12px;
}

.player-roster-heading {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 12px 18px 20px;
  color: #6b726d;
  font-size: 0.86rem;
  font-weight: 800;
}

.player-roster-heading strong {
  justify-self: end;
}

.player-published-roster.collapsed .player-roster-heading {
  border-bottom: 0;
  padding-bottom: 12px;
}

.player-published-roster.collapsed .player-roster-content {
  display: none;
}

.player-roster-pairs {
  display: grid;
}

.player-roster-pair {
  display: grid;
  grid-template-columns: minmax(150px, 0.72fr) minmax(0, 1.08fr) minmax(0, 1.08fr);
  align-items: stretch;
  justify-content: stretch;
  border: 1px solid #ecefeb;
  border-bottom: 0;
  background: #fff;
}

.player-roster-pair:nth-child(even) {
  background: #f5f6f4;
}

.player-roster-pair:first-child {
  border-radius: 6px 6px 0 0;
}

.player-roster-pair:last-child {
  border-bottom: 1px solid #ecefeb;
  border-radius: 0 0 6px 6px;
}

.player-roster-pair time {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 18px;
  border-right: 1px solid #ecefeb;
  color: #111;
  font-size: 0.95rem;
  font-weight: 800;
}

.player-roster-pair time img {
  width: 15px;
  height: 15px;
  object-fit: contain;
}

.player-roster-pair-members {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  grid-column: 2 / -1;
}

.player-roster-member {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 58px;
  padding: 14px 28px;
}

.player-roster-member:first-child {
  text-align: left;
}

.player-roster-member:last-child {
  text-align: left;
}

.player-roster-member.current-player {
  background: #dce7dc;
  box-shadow: inset 0 0 0 1px rgba(31, 77, 37, 0.16);
}

.player-roster-member.current-player strong {
  color: var(--green);
}

.player-roster-member strong {
  min-width: 0;
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.2;
}

.player-roster-result-badge {
  flex: 0 0 auto;
  min-width: 26px;
  margin-left: 8px;
  vertical-align: middle;
}

.player-roster-team-result {
  display: grid;
  place-items: center;
  min-width: 76px;
  padding: 0 10px;
  border-left: 1px solid #ecefeb;
  border-right: 1px solid #ecefeb;
}

.player-roster-team-result .player-roster-result-badge {
  min-width: 54px;
}

.player-roster-member strong span {
  white-space: nowrap;
}

.player-roster-member .pill {
  flex: 0 0 auto;
}

.player-roster-empty {
  padding: 14px 24px;
  color: #6b726d;
  font-size: 0.88rem;
  font-weight: 700;
}

.action-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.calendar-icon-button {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  width: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: 4px;
  background: #fff;
  color: #2f3631;
}

.calendar-icon-button:hover {
  background: var(--green);
  color: #fff;
}

.calendar-icon-button img {
  width: 18px;
  height: 18px;
}

.calendar-icon-button:hover img,
.player-card-actions .calendar-inline-button:hover .action-icon,
.player-card-actions button.selected .action-icon,
.player-card-actions .unavailable .action-icon,
.player-card-actions button:hover .action-icon,
.player-card-actions .pay-link .action-icon,
.player-card-actions .pay-link:hover .action-icon {
  filter: brightness(0) invert(1);
}

.player-empty {
  border: 1px dashed var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.72);
  padding: 26px;
  text-align: center;
}

.season-availability-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 18px;
}

.season-availability-head .player-section-label {
  margin-bottom: 6px;
}

.season-availability-copy {
  margin: 0;
  color: #657369;
  font-weight: 650;
}

.player-day-toolbar {
  display: grid;
  grid-template-columns: minmax(174px, 210px) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin: 0 0 34px;
  border: 1px solid #cfd5cf;
  border-radius: 8px;
  background: #fff;
  padding: 14px 16px;
}

.player-day-toolbar .player-availability-tabs {
  width: 100%;
  margin: 0;
  border: 1px solid #d6dad5;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.player-day-toolbar .subtab.active {
  background: var(--green);
  color: #fff;
  box-shadow: none;
}

.player-day-toolbar .subtab:hover {
  background: var(--green);
  color: #fff;
}

.season-match-list {
  display: grid;
  gap: 40px;
}

.season-match {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--home);
  background: #fff;
  min-height: 132px;
  padding: 16px 24px;
}

.club-logo-slot {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  color: #657369;
  font-weight: 900;
  letter-spacing: 0.04em;
  overflow: hidden;
}

.season-match .club-logo-slot {
  width: 108px;
  height: 80px;
  padding: 0;
}

.season-match .club-logo-slot img {
  width: auto;
  height: auto;
  max-width: 110px;
  max-height: 80px;
  object-fit: contain;
}

.player-match-main .player-card-logo {
  width: 130px;
  height: 130px;
  overflow: visible;
}

.player-match-main .player-card-logo img {
  width: 130px;
  height: 130px;
  max-width: none;
  max-height: none;
}

.season-match-info {
  min-width: 0;
}

.season-match:first-child {
  border-top: 0;
}

.season-match.away {
  border-left-color: var(--red);
}

.season-match h4 {
  margin: 6px 0;
  color: #1d3528;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  line-height: 1.1;
}

.season-actions {
  display: flex;
  gap: 8px;
}

.season-actions button {
  min-height: 34px;
  border-radius: 4px;
  background: #e6e0d7;
  color: #66736a;
}

.season-actions button.selected {
  background: var(--green);
  color: #fff;
}

.season-actions .unavailable.selected {
  background: var(--red);
  color: #fff;
}

.season-actions .maybe.selected {
  background: #b86f00;
  color: #fff;
}

.match-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-top: 4px solid var(--home);
  border-radius: 6px;
  background: #fff;
  box-shadow: var(--shadow);
}

.match-card.away {
  border-top-color: var(--red);
}

.match-card.match-over {
  border-top-color: #bfc6bf;
}

.match-card-head {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  grid-template-areas:
    "logo title actions"
    "badges badges actions";
  align-items: start;
  column-gap: 20px;
  row-gap: 36px;
  background: #eceeeb;
  border-bottom: 1px solid #cfd4ce;
  padding: 38px 24px 34px;
}

.match-logo-slot {
  display: grid;
  grid-area: logo;
  place-items: center;
  width: 96px;
  height: 96px;
  overflow: visible;
}

.match-logo-slot img {
  max-width: 96px;
  max-height: 96px;
}

.match-title-block {
  grid-area: title;
}

.match-final-score {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  grid-column: 1 / -1;
  justify-self: end;
  margin-top: 2px;
  padding: 6px 9px;
  border-radius: 999px;
  background: #eef0ec;
  color: #2f3631;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.match-final-label {
  color: #68726b;
  text-transform: uppercase;
  font-size: 0.68rem;
}

.match-final-result {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  min-height: 22px;
  border-radius: 999px;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
}

.match-final-result.win {
  background: var(--green);
}

.match-final-result.loss {
  background: var(--red);
}

.match-final-result.tie {
  background: #b86f00;
}

.card-actions {
  display: grid;
  grid-area: actions;
  grid-template-columns: repeat(3, auto);
  justify-content: end;
  align-content: start;
  gap: 8px;
  min-width: 396px;
  margin-top: 0;
}

.card-actions button,
.card-actions button.secondary,
.card-actions button:not(.secondary) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 92px;
  min-height: 42px;
  border-radius: 4px;
  background: #fff;
  color: #2f3631;
  padding: 0 14px;
  font-size: 0.9rem;
  font-weight: 800;
  white-space: nowrap;
}

.card-actions .action-lock {
  grid-column: 1 / span 2;
}

.card-actions .action-publish {
  grid-column: 3;
}

.card-actions .action-push,
.card-actions .action-push-alt {
  grid-column: 1 / -1;
}

.card-actions button:not(.secondary):hover,
.card-actions button.secondary:hover {
  background: var(--green);
  color: #fff;
}

.card-actions button.publish-action {
  background: #f2c879;
  color: #2f3631;
}

.card-actions button.publish-action:hover {
  background: #e8bb63;
  color: #2f3631;
}

.card-actions button img {
  width: 15px;
  height: 15px;
  object-fit: contain;
  flex: 0 0 auto;
}

.card-actions button.disabled-action,
.card-actions button:disabled:not(.published-action) {
  background: #c8cec7;
  color: #6f7771;
  cursor: not-allowed;
  opacity: 1;
}

.card-actions button.disabled-action:hover,
.card-actions button:disabled:not(.published-action):hover {
  background: #c8cec7;
  color: #6f7771;
}

.card-actions button.disabled-action img,
.card-actions button:disabled:not(.published-action) img,
.card-actions button.disabled-action:hover img,
.card-actions button:disabled:not(.published-action):hover img {
  opacity: 0.65;
  filter: none;
}

.card-actions button:hover img,
.card-actions button.lock-active img {
  filter: brightness(0) invert(1);
}

.card-actions button.publish-action img,
.card-actions button.publish-action:hover img,
.card-actions button.published-action img,
.card-actions button.published-action:hover img,
.card-actions button.published-action:disabled img,
.card-actions button.published-action:disabled:hover img {
  filter: none;
}

.card-actions .published-action,
.card-actions .published-action:disabled {
  background: #d48f00;
  color: #fff;
  opacity: 1;
  cursor: default;
}

.card-actions .published-action:hover,
.card-actions .published-action:disabled:hover {
  background: #d48f00;
  color: #fff;
}

.card-actions button.published-action,
.card-actions button.published-action:hover,
.card-actions button.published-action:disabled,
.card-actions button.published-action:disabled:hover {
  background: #d48f00;
  color: #fff;
}

.card-actions button.published-action:hover,
.card-actions button.published-action:disabled:hover {
  background: #bf8200;
  color: #fff;
}

.card-actions button.published-action img,
.card-actions button.published-action:hover img,
.card-actions button.published-action:disabled img,
.card-actions button.published-action:disabled:hover img {
  filter: brightness(0) invert(1);
}

.card-actions button.lock-active,
.card-actions button.lock-active:hover {
  background: var(--red);
  color: #fff;
}

.match-card-body {
  display: block;
}

.match-detail-grid {
  display: grid;
  grid-template-columns: minmax(340px, 0.95fr) minmax(0, 1.05fr);
}

.match-card.collapsed .match-players,
.match-card.collapsed .alternate-section,
.match-card.collapsed .available-roster,
.match-card.collapsed .add-players .actions,
.match-card.collapsed .add-players .results-editor,
.match-card.collapsed .add-players .empty {
  display: none;
}

.pill.match-over-pill {
  background: #6f7770;
  color: #fff;
}

.match-card h3 {
  margin: 8px 0 6px;
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  line-height: 1.15;
}

.match-captain-contact {
  margin: 0 0 6px;
  color: #59615c;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.match-captain-contact .player-name-link {
  display: inline;
  white-space: nowrap;
}

.match-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.match-kicker span:not(.badge) + span::before {
  content: "•";
  margin-right: 12px;
}

.match-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.match-date {
  margin: 0;
  color: #111;
  font-size: 1rem;
  font-weight: 500;
  text-transform: uppercase;
}

.status-row {
  display: flex;
  grid-area: badges;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
  overflow: visible;
}

.status-subrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.lifecycle-status-row {
  gap: 8px;
}

.lifecycle-status-row:empty {
  display: none;
}

.lifecycle-status-row .pill {
  min-height: 22px;
  padding: 0 10px;
  font-size: 0.64rem;
}

.card-actions .status-row {
  grid-area: auto;
  grid-column: 1 / -1;
  margin-top: 8px;
  flex-wrap: wrap;
}

.under-actions-badges {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  overflow: visible;
  justify-content: flex-end;
  gap: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 10px;
  background: #eef0ec;
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0;
  white-space: nowrap;
}

.pill.confirmed {
  background: #c8f5df;
  color: #00614c;
}

.pill.confirmed.player-paid-badge,
.pill.player-paid-badge {
  background: var(--green);
  color: #fff;
}

.pill.pending {
  background: #fff0c8;
  color: #9a5100;
}

.pill.maybe {
  background: #ffe0ad;
  color: #9a5100;
}

.pill.available {
  background: #c8f7df;
  color: #075b3d;
}

.pill.declined {
  background: #ffdcdc;
  color: #b00012;
}

.pill.alternate {
  background: #ffe5f1;
  color: #bf2f76;
}

.pill.roster-locked {
  background: #6f7770;
  color: #fff;
}

.pill.results-entered {
  background: #dcecf8;
  color: #26567a;
}

.pill.ineligible {
  background: #ffdcdc;
  color: #b00012;
}

.pill.empty-pill {
  visibility: hidden;
}

.pill.roster-published {
  background: #d48f00;
  color: #fff;
}

.pill.hcp-locked {
  background: #ffdcdc;
  color: #8a0f0f;
}

.pill.locked {
  background: #dfe4ea;
  color: #343a40;
}

.role-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  border-radius: 999px;
  padding: 0 8px;
  min-height: 22px;
  font-size: 0.72rem;
  line-height: 1;
  font-weight: 800;
  text-transform: uppercase;
}

.role-badge {
  text-transform: none;
}

.role-badge.role-manager,
.role-chip.role-manager {
  background: #e9e3ff;
  color: #3f2f8f;
}

.role-badge.role-captain,
.role-chip.role-captain {
  background: #dbf0e7;
  color: #0f5736;
}

.role-badge.role-head-captain,
.role-chip.role-head-captain {
  background: #d7e6fc;
  color: #1d4f8c;
}

.badge.draft {
  background: #c8f5df;
  color: #00614c;
}

.card-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.meta {
  margin: 6px 0 0;
  color: var(--muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  background: #e9eee6;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
}

.badge.published,
.badge.confirmed {
  background: #d8eddf;
  color: var(--green-dark);
}

.badge.alternate {
  background: #e0ecf6;
  color: var(--blue);
}

.badge.declined {
  background: #f4dedb;
  color: var(--red);
}

.assignment-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.82fr) minmax(0, 1.38fr);
  gap: 16px;
  margin-top: -24px;
}

.match-section {
  min-width: 0;
}

.match-section-title,
.add-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 0 24px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
}

.section-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roster-average {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  margin-right: auto;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  white-space: nowrap;
}

.roster-average strong {
  color: var(--ink);
  font-size: 0.86rem;
}

.match-players {
  border-top: 1px solid #eef0ec;
}

.match-roster-stack {
  min-width: 0;
}

.schedule-player-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  min-height: 54px;
  padding: 8px 24px;
  border-top: 1px solid #eef0ec;
}

.match-roster-row {
  grid-template-columns: minmax(0, 1fr) minmax(72px, 84px) minmax(82px, 96px);
  gap: 10px;
}

.match-roster-row.has-reset-action {
  grid-template-columns: minmax(0, 1fr) minmax(72px, 84px) minmax(82px, 96px) auto;
}

.match-players .match-roster-row:nth-child(4n + 1),
.match-players .match-roster-row:nth-child(4n + 2) {
  background: #f5f6f4;
}

.match-players .match-roster-row:nth-child(2n) {
  border-bottom: 1px solid #c8ccc7;
}

.match-players .match-roster-row.declined-player,
.available-player.declined-player {
  background: #fff1f1;
}

.alternate-section {
  margin-top: 12px;
  border-top: 2px solid #9ea69f;
}

.alternate-title {
  min-height: 38px;
  background: #f4f6f4;
  border-top: 1px solid #eef0ec;
}

.alternate-row {
  grid-template-columns: minmax(0, 1fr) auto;
  background: #fbfcff;
}

.alternate-players .alternate-row:nth-child(n) {
  background: #fbfcff;
  border-bottom: 0;
}

.alternate-players {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding-bottom: 10px;
}

.alternate-players .alternate-row:nth-child(2n) {
  border-left: 1px solid #eef0ec;
}

.alternate-row .pill.alternate {
  justify-self: end;
}

.alternate-row strong {
  font-size: 0.69rem;
  white-space: nowrap;
}

.alternate-row span:not(.pill) {
  font-size: 0.56rem;
}

.available-player.maybe-player {
  background: #fff6e8;
}

.available-player.ineligible-player strong {
  color: var(--red);
}

.roster-directory-row {
  grid-template-columns: minmax(0, 1fr) auto auto auto auto auto;
  column-gap: 4px;
  min-height: 46px;
  padding: 6px 12px;
}

.roster-directory-row .pill.account-status {
  min-width: 66px;
  min-height: 18px;
  padding: 0 6px;
  font-size: 0.56rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.roster-directory-row .small-action {
  min-height: 34px;
  border-radius: 5px;
  padding: 0 11px;
  background: #e9ede7;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 850;
}

.roster-directory-row .small-action:hover,
.roster-directory-row .small-action:focus-visible {
  background: #dfe6dd;
  color: var(--ink);
}

.roster-directory-row .icon-small-action {
  gap: 5px;
}

.roster-directory-contact {
  padding-left: 14px;
}

.small-action {
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.82rem;
  white-space: nowrap;
}

.icon-small-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.icon-small-action img {
  width: 14px;
  height: 14px;
  object-fit: contain;
}

.tiny-action {
  min-height: 28px;
  padding: 0 8px;
  font-size: 0.74rem;
  white-space: nowrap;
}

.match-roster-toggle {
  min-width: 106px;
}

.roster-toggle-arrow {
  display: inline-block;
  margin-right: 6px;
  font-size: 0.78rem;
  line-height: 1;
  vertical-align: middle;
}

.schedule-player-row:first-child {
  border-top: 0;
}

.schedule-player-row strong,
.schedule-player-row span {
  display: block;
}

.schedule-player-row strong {
  font-size: 0.98rem;
}

.roster-handicap-button {
  display: inline-block;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 800;
  text-align: left;
}

.roster-handicap-button:hover,
.roster-handicap-button:focus-visible {
  background: transparent;
  color: var(--green);
  text-decoration: underline;
}

.schedule-player-row span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.roster-contact-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.schedule-player-row .pill {
  display: inline-flex;
  margin-top: 0;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  font-size: 0.72rem;
  line-height: 1;
}

.match-roster-row .pill,
.match-available-player .pill {
  min-height: 22px;
  padding: 0 8px;
  font-size: 0.66rem;
}

.match-roster-row .pill,
.match-roster-row .paid-toggle {
  justify-self: end;
}

.alternate-players .alternate-row {
  min-height: 34px;
  padding: 4px 24px;
  gap: 8px;
}

.alternate-players .alternate-row strong {
  font-size: 0.69rem;
  line-height: 1.15;
}

.alternate-players .alternate-row span:not(.pill) {
  margin-top: 0;
  font-size: 0.56rem;
  line-height: 1.15;
}

.alternate-players .alternate-row .pill.alternate {
  min-height: 18px;
  padding: 0 6px;
  font-size: 0.56rem;
}

.schedule-player-row .pill.confirmed {
  min-height: 18px;
  padding: 0 7px;
  color: #00614c;
  font-size: 0.6rem;
}

.schedule-player-row .pill.pending {
  min-height: 18px;
  padding: 0 7px;
  color: #9a5100;
  font-size: 0.6rem;
}

.schedule-player-row .pill.declined {
  color: #b00012;
}

.paid-toggle {
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
}

.paid-toggle.disabled {
  color: #7f8781;
  cursor: not-allowed;
}

.paid-toggle-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.paid-toggle-control {
  position: relative;
  display: inline-flex;
  width: 34px;
  height: 18px;
  border-radius: 999px;
  background: #c8cec7;
  box-shadow: inset 0 0 0 1px rgba(47, 54, 49, 0.16);
  transition: background 0.16s ease, box-shadow 0.16s ease;
}

.paid-toggle-control::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
  transition: transform 0.16s ease;
}

.paid-toggle-input:checked + .paid-toggle-control {
  background: var(--green);
}

.paid-toggle-input:checked + .paid-toggle-control::after {
  transform: translateX(16px);
}

.paid-toggle-input:disabled + .paid-toggle-control {
  background: #c8cec7;
  box-shadow: inset 0 0 0 1px rgba(47, 54, 49, 0.12);
}

.paid-toggle-input:disabled + .paid-toggle-control::after {
  background: #f4f5f3;
}

.paid-toggle-input:focus-visible + .paid-toggle-control {
  box-shadow: 0 0 0 3px rgba(31, 77, 37, 0.18), inset 0 0 0 1px rgba(31, 77, 37, 0.35);
}

.avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #e8e2d8;
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 900;
}

.add-players {
  min-width: 0;
  border-left: 1px solid var(--line);
  background: #fff;
  padding-bottom: 16px;
}

.add-players.collapsed {
  padding-bottom: 0;
}

.add-players .available-roster,
.add-players .roster-select-control,
.add-players .actions {
  padding: 0 24px;
}

.add-players select {
  min-height: 220px;
  border-radius: 4px;
}

.schedule-empty {
  border: 1px dashed var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.62);
  padding: 34px;
  text-align: center;
}

.full-roster {
  margin-top: -24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.roster-directory-card {
  background: #fff;
}

.roster-directory-card + .roster-directory-card {
  border-top: 1px solid var(--line);
}

.roster-directory-card.expanded .roster-directory-row {
  border-bottom: 1px solid var(--line);
}

.roster-directory-row {
  background: #fff;
}

.roster-availability-toggle {
  display: inline;
  width: auto;
  height: auto;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  padding: 0 4px 0 0;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  vertical-align: baseline;
}

.roster-availability-toggle:hover,
.roster-availability-toggle:focus-visible {
  background: transparent;
  color: var(--green);
  outline: none;
}

.roster-availability-panel {
  padding: 10px 12px 12px;
  background: #f7f8f5;
}

.roster-availability-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.roster-availability-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.roster-availability-column {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
}

.roster-availability-day {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 24px;
  border-radius: 4px;
  background: #e9ede7;
  color: var(--green);
  padding: 0 8px;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.roster-availability-day span {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  letter-spacing: 0;
}

.roster-availability-list {
  display: grid;
  gap: 6px;
}

.roster-availability-match {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  border: 1px solid #e2e6df;
  border-radius: 5px;
  background: #fff;
  padding: 8px 10px;
}

.roster-availability-match strong {
  display: block;
  color: var(--text);
  font-size: 0.84rem;
  line-height: 1.15;
}

.roster-availability-match span:not(.pill):not(.match-location-suffix) {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
}

.roster-availability-match .pill {
  margin: 0;
  white-space: nowrap;
}

.roster-availability-match .small-action {
  min-height: 28px;
  white-space: nowrap;
}

.roster-availability-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.roster-availability-actions .small-action {
  min-height: 26px;
  padding: 0 8px;
  font-size: 0.68rem;
}

.roster-availability-actions .small-action.selected {
  background: var(--green);
  color: #fff;
}

.roster-availability-actions .small-action.maybe.selected {
  background: #c88216;
  color: #fff;
}

.assignment-grid select {
  min-height: 300px;
}

.available-roster {
  display: grid;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fbfbfa;
  overflow: hidden;
}

.add-players .available-roster {
  margin-bottom: 16px;
  border-right: 0;
  border-left: 0;
}

.add-players .available-roster.checkbox-roster {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.available-player {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 5px 12px;
  border-top: 1px solid #eef0ec;
}

.checkbox-player {
  grid-template-columns: 34px minmax(0, 1fr) auto;
  color: var(--ink);
}

.match-available-player {
  grid-template-columns: minmax(0, 1fr) auto;
}

.match-available-player.selected-player {
  background: #ebf7ed;
}

.checkbox-player.match-available-player {
  grid-template-columns: minmax(0, 1fr) 20px 20px;
  gap: 2px;
  min-height: 34px;
  padding: 4px 4px 4px 8px;
}

.checkbox-player.match-available-player.alternate-player {
  background: #fff0f7;
}

.checkbox-player.match-available-player.maybe-player.alternate-player {
  background: #fff0f7;
}

.checkbox-player.match-available-player.declined-player.alternate-player {
  background: #fff0f7;
}

.match-available-player .pill {
  justify-self: end;
}

.add-players .available-roster.checkbox-roster .available-player {
  border-top: 1px solid #eef0ec;
}

.assignment-choice {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: end;
  width: 22px;
  height: 22px;
  color: #555e58;
  font-size: 0.58rem;
  font-weight: 850;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
}

.assignment-choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.assignment-choice input:disabled {
  cursor: not-allowed;
}

.assignment-disabled-player .assignment-choice {
  cursor: not-allowed;
}

.assignment-letter {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  padding-top: 2px;
  border: 1px solid #c8cec7;
  border-radius: 4px;
  background: #fff;
  color: #59615c;
  font-size: 0.62rem;
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.alternate-choice .assignment-letter {
  border-color: #ed9ac4;
  color: #bf2f76;
}

.roster-choice input:checked + .assignment-letter {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.alternate-choice input:checked + .assignment-letter {
  border-color: #e04f91;
  background: #e04f91;
  color: #fff;
}

.assignment-choice input:disabled + .assignment-letter {
  border-color: #d4d8d2;
  background: #edf0eb;
  color: #a5aca5;
  opacity: 0.58;
  cursor: not-allowed;
}

.available-player-group {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.available-player-group-header {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 6px 8px 4px;
}

.available-player-group-header .pill {
  min-height: 18px;
  padding: 0 7px;
  font-size: 0.6rem;
}

.available-player-group-maybe,
.available-player-group-declined {
  margin-top: 12px;
  border-top: 2px solid #9ea69f;
  background: #fff;
}

.add-players .available-roster.checkbox-roster .available-player-group > .available-player:nth-of-type(-n + 3) {
  border-top: 0;
}

.add-players .available-roster.checkbox-roster .available-player-group > .available-player:nth-of-type(3n + 2),
.add-players .available-roster.checkbox-roster .available-player-group > .available-player:nth-of-type(3n + 3) {
  border-left: 1px solid #eef0ec;
}

@media (max-width: 980px) {
  .add-players .available-roster.checkbox-roster {
    grid-template-columns: 1fr;
  }

  .available-player-group {
    grid-template-columns: 1fr;
  }

  .add-players .available-roster.checkbox-roster .available-player-group > .available-player:nth-of-type(3n + 2),
  .add-players .available-roster.checkbox-roster .available-player-group > .available-player:nth-of-type(3n + 3) {
    border-left: 0;
  }

  .add-players .available-roster.checkbox-roster .available-player-group > .available-player:nth-of-type(2),
  .add-players .available-roster.checkbox-roster .available-player-group > .available-player:nth-of-type(3) {
    border-top: 1px solid #eef0ec;
  }
}

.checkbox-player input {
  width: 18px;
  height: 18px;
  padding: 0;
  justify-self: end;
}

.available-player:first-of-type {
  border-top: 0;
}

.available-player strong,
.available-player span {
  display: block;
}

.available-player strong {
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
}

.match-available-player strong {
  font-size: 0.69rem;
}

.available-player-name-line {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  min-width: 0;
  white-space: nowrap;
}

.available-player span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.match-available-player span {
  font-size: 0.56rem;
}

.player-name-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.available-player-name-line .player-name-link {
  display: inline-flex;
  min-width: 0;
}

.player-name-link:hover {
  text-decoration: underline;
}

button.available-handicap-copy {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  font: inherit;
  font-size: 0.69rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  box-shadow: none;
}

button.available-handicap-copy:hover,
button.available-handicap-copy:focus,
button.available-handicap-copy:focus-visible,
button.available-handicap-copy:active {
  background: transparent;
  color: inherit;
  outline: none;
  box-shadow: none;
  text-decoration: none;
}

button.available-handicap-copy:disabled {
  background: transparent;
  color: var(--muted);
  cursor: default;
  text-decoration: none;
}

.available-player .pill {
  display: inline-flex;
  margin-top: 0;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  line-height: 1;
}

.checkbox-player.match-available-player .pill.maybe,
.checkbox-player.match-available-player .pill.declined {
  min-height: 14px;
  padding: 0 4px;
  font-size: 0.5rem;
}

.available-player .pill.maybe {
  color: #9a5100;
}

.available-player .pill.declined {
  color: #b00012;
}

.player-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}

.player-row:first-child {
  border-top: 0;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: -24px;
}

.results-editor {
  margin-top: 12px;
  border-top: 1px solid #d9ddd7;
  padding-top: 12px;
}

.results-grid {
  display: grid;
  grid-template-columns: minmax(130px, 0.9fr) minmax(170px, 1fr) 74px 78px 78px;
  gap: 6px;
  align-items: center;
}

.results-row {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(130px, 0.9fr) minmax(170px, 1fr) 74px 78px 78px;
  align-items: center;
  gap: 6px;
  margin: 0 -6px;
  padding: 6px;
  border-radius: 4px;
}

.results-row.zebra {
  background: #f4f6f4;
}

.results-head {
  color: #6f7671;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.results-player {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 700;
}

.results-input {
  min-height: 34px;
  border: 1px solid #cfd4ce;
  border-radius: 4px;
  padding: 0 8px;
  background: #fff;
}

.results-input[type='number'] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.results-input[type='number']::-webkit-outer-spin-button,
.results-input[type='number']::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.results-modal {
  max-width: 920px;
}

.results-grid-modal {
  margin-top: 8px;
}

.results-modal-actions {
  margin-top: -24px;
}

.stats-table {
  --stats-grid: minmax(150px, 1fr) 52px 60px 60px 62px 56px 58px 68px 68px 58px 68px 68px;
  border: 1px solid #d4d8d3;
  border-radius: 6px;
  overflow-x: hidden;
  overflow-y: hidden;
  background: #fff;
}

.stats-row {
  display: grid;
  grid-template-columns: var(--stats-grid);
  gap: 0;
  align-items: center;
  padding: 8px 10px;
  border-top: 1px solid #ecefeb;
  min-width: 0;
}

.stats-row > :not(:first-child) {
  text-align: center;
  justify-self: center;
}

.stats-row > span,
.stats-row > button {
  white-space: nowrap;
}

.stats-player-row > :not(:first-child) {
  transform: translateX(-5px);
}

.stats-sort-label {
  white-space: nowrap;
}

.stats-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.player-stats-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.player-stats-head h2 {
  margin: 0;
  font-size: 1.45rem;
}

.player-stats-filters {
  flex-wrap: nowrap;
}

.current-player-stats {
  margin-bottom: 22px;
}

.current-player-stats h3,
.all-player-stats h3 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 800;
}

.roster-filter-input {
  min-height: 36px;
  min-width: 220px;
  padding: 0 10px;
  border: 1px solid #cfd4ce;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}

.stats-filters {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stats-filters .subtab {
  background: #fff;
  color: var(--ink);
  border-radius: 6px;
  border: 1px solid #d8ddd7;
}

.stats-filters .subtab.active {
  background: var(--green);
  color: #fff;
  box-shadow: none;
  border-color: var(--green);
}

.stats-filters .subtab:hover {
  background: #dbe4d8;
  color: var(--ink);
}

.stats-filters .subtab.active:hover {
  background: var(--green);
  color: #fff;
}

.season-select {
  min-height: 36px;
  border: 1px solid #b9bbb8;
  border-radius: 0;
  background: #efefef;
  color: var(--ink);
  padding: 0 12px;
  font-size: 0.82rem;
  font-weight: 750;
}

.season-tab-button {
  background: var(--green);
  color: #fff;
  border-radius: 10px;
  padding: 0 18px;
  white-space: nowrap;
  flex: 0 0 auto;
}

.season-tab-button:hover {
  background: var(--green-dark);
  color: #fff;
}

.season-tab-button:disabled,
.season-tab-button.disabled-button {
  background: #c8cec7;
  color: #6f7771;
  cursor: not-allowed;
  opacity: 0.72;
}

.season-tab-button:disabled:hover,
.season-tab-button.disabled-button:hover {
  background: #c8cec7;
  color: #6f7771;
}

.season-tab-button.season-readonly-button,
.season-tab-button.season-readonly-button:hover,
.season-tab-button.season-readonly-button:disabled,
.season-tab-button.season-readonly-button:disabled:hover {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
  cursor: default;
  opacity: 1;
}

.season-nav .text-button {
  min-height: 36px;
  border: 1px solid #b9bbb8;
  border-radius: 0;
  background: #efefef;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 750;
}

.season-nav .text-button:hover,
.season-nav .text-button.active {
  background: var(--green);
  color: #fff;
}

.stats-row:first-child {
  border-top: 0;
}

.stats-head-row {
  background: #edf0ec;
  font-size: 0.67rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #68716b;
}

.stats-group-row {
  padding-top: 7px;
  padding-bottom: 0;
  border-top: 0;
  background: #edf0ec;
  color: #68716b;
  font-size: 0.69rem;
  font-weight: 900;
  text-transform: uppercase;
}

.stats-group-label {
  grid-column: span 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  justify-self: stretch !important;
  text-align: center !important;
  padding: 0;
}

.stats-group-label::before,
.stats-group-label::after {
  content: "";
  flex: 1 1 auto;
  min-width: 0;
  border-top: 2px solid #c4cac5;
}

.stats-group-label + .stats-group-label {
  margin-left: 16px;
}

.stats-row:not(.stats-head-row):nth-child(odd) {
  background: #f6f7f5;
}

.stats-player-row {
  cursor: pointer;
}

.stats-player-row.expanded {
  background: #fdecef !important;
}

.stats-row-detail {
  padding: 8px 10px 12px;
  background: #fafbfa;
  border-top: 1px solid #ecefeb;
  min-width: 0;
}

.stats-detail-row {
  display: grid;
  grid-template-columns: var(--stats-grid);
  gap: 0;
  padding: 6px 0;
  font-size: 0.76rem;
  color: #4f5752;
  align-items: center;
}

.stats-detail-subhead {
  display: grid;
  grid-template-columns: var(--stats-grid);
  gap: 0;
  padding: 3px 0 5px;
  color: #7b827d;
  font-size: 0.7rem;
  font-weight: 700;
  align-items: center;
}

.stats-detail-subhead > :not(:first-child) {
  text-align: center;
  justify-self: center;
  white-space: nowrap;
}

.stats-detail-row:nth-child(even) {
  background: #f3f4f2;
}

.stats-detail-row > :not(:first-child) {
  text-align: center;
  justify-self: center;
  white-space: nowrap;
}

.stats-club-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  white-space: nowrap;
}

.stats-club-name,
.stats-club-handicap {
  white-space: nowrap;
}

.stats-club-logo {
  display: inline-flex;
  width: 26px;
  height: 26px;
  align-items: center;
  justify-content: center;
}

.stats-club-logo img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.stats-club-name.home {
  color: #0b7d2d;
  font-weight: 700;
}

.stats-club-name.away {
  color: #b00012;
  font-weight: 700;
}

.stats-club-handicap {
  color: #626b66;
  font-weight: 800;
}

.stats-result-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  border-radius: 999px;
  padding: 0 8px;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
}

.stats-result-badge.win {
  background: #c8f5df;
  color: #00614c;
}

.stats-result-badge.loss {
  background: #ffdcdc;
  color: #b00012;
}

.stats-result-badge.tie {
  background: #fff0c8;
  color: #9a5100;
}

.stats-sort {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  appearance: none;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
  font: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
  text-align: left;
  cursor: pointer;
  padding: 0;
  border-radius: 0;
  min-height: auto;
}

.stats-sort.active {
  color: #1f6f2d;
}

.stats-sort:hover,
.stats-sort:focus-visible,
.stats-sort:active {
  background: transparent;
  border: 0;
  box-shadow: none;
  outline: none;
}

.stats-sort-arrow {
  width: 10px;
  opacity: 0;
}

.stats-sort:hover .stats-sort-arrow,
.stats-sort:focus-visible .stats-sort-arrow,
.stats-sort.active .stats-sort-arrow {
  opacity: 1;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: min(420px, calc(100vw - 36px));
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow);
  padding: 12px 14px;
  opacity: 0;
  transform: translateY(10px);
  transition: 0.2s ease;
  pointer-events: none;
}

.inline-status {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 30;
  width: min(520px, calc(100vw - 36px));
  border: 1px solid #bcd5c4;
  border-radius: 6px;
  background: #f2fbf3;
  color: #235c34;
  font-size: 0.88rem;
  font-weight: 800;
  padding: 11px 14px;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 10px);
  transition: 0.2s ease;
  pointer-events: none;
}

.inline-status.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.empty {
  color: var(--muted);
  padding: 10px 0;
}

@media (max-width: 760px) {
  .topbar,
  .player-welcome,
  .row-form,
  .section-head,
  .card-head,
  .schedule-head {
    align-items: stretch;
    flex-direction: column;
  }

  .brand-lockup {
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 14px;
  }

  .brand-logo-slot {
    width: 70px;
    height: 70px;
    font-size: 1.5rem;
  }

  .tabs,
  .account-summary,
  .captain-toolbar,
  .player-day-toolbar,
  .schedule-form,
  .modal-form,
  .login-card,
  .two-col,
  .admin-grid,
  .match-detail-grid,
  .assignment-grid {
    grid-template-columns: 1fr;
  }

  .match-form-row-2:not(.match-detail-format-row),
  .match-form-row-3:not(.match-detail-date-row) {
    grid-template-columns: 1fr;
  }

  .match-detail-date-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .match-detail-format-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .match-form-detail-band {
    padding: 12px;
  }

  .captain-toolbar {
    margin-top: 28px;
    padding: 12px;
  }

  .player-day-toolbar {
    padding: 12px;
  }

  .player-league-nav {
    grid-template-columns: 1fr;
  }

  .player-league-nav button + button {
    border-top: 1px solid #d6dad5;
    border-left: 0;
  }

  .player-page-nav button {
    flex: 1;
    min-width: 0;
  }

  .toolbar-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .toolbar-actions > * + * {
    border-left: 0;
  }

  .text-button,
  .new-match-button {
    justify-content: center;
    min-height: 42px;
  }

  .account-summary {
    width: 100%;
    justify-content: space-between;
    text-align: left;
  }

  .match-card-head {
    grid-template-columns: 72px minmax(0, 1fr);
    grid-template-areas:
      "logo title"
      "badges badges"
      "actions actions";
    row-gap: 18px;
    padding: 24px 18px;
  }

  .player-match-main {
    grid-template-columns: 96px minmax(0, 1fr);
    padding: 18px;
  }

  .alternate-match-main {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 14px;
    padding: 18px;
  }

  .player-card-logo {
    width: 96px;
    height: 96px;
  }

  .player-card-logo img {
    width: 96px;
    height: 96px;
  }

  .match-logo-slot {
    width: 72px;
    height: 72px;
  }

  .match-logo-slot img {
    max-width: 72px;
    max-height: 72px;
  }

  .card-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
    min-width: 0;
  }

  .card-actions button {
    width: 100%;
    min-width: 0;
  }

  .card-actions .action-email,
  .card-actions .action-lock,
  .card-actions .action-publish,
  .card-actions .action-push,
  .card-actions .action-push-alt {
    grid-column: auto;
  }

  .card-actions .action-publish {
    grid-column: 1 / -1;
  }

  .card-actions .action-push,
  .card-actions .action-push-alt {
    grid-column: 1 / -1;
  }

  .add-players {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .schedule-player-row,
  .roster-directory-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .roster-availability-match {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .roster-availability-columns {
    grid-template-columns: 1fr;
  }

  .roster-availability-match .small-action {
    grid-column: 1 / -1;
    justify-self: stretch;
  }

  .roster-availability-actions {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .roster-availability-actions .small-action {
    flex: 1 1 0;
  }

  .match-roster-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .alternate-players {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .alternate-players .alternate-row:nth-child(2n) {
    border-left: 1px solid #eef0ec;
  }

  .schedule-player-row .pill,
  .schedule-player-row .small-action,
  .schedule-player-row .paid-toggle {
    grid-column: 2;
    justify-self: start;
  }

  .match-roster-row .pill,
  .match-roster-row .paid-toggle {
    grid-column: 1;
  }

  .player-status-tools {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr);
    justify-content: stretch;
    justify-items: stretch;
    min-width: 0;
  }

  .player-status-tools .calendar-icon-button {
    justify-self: start;
  }

  .player-card-actions {
    grid-column: 1;
    grid-template-columns: 1fr;
    min-width: 0;
    width: 100%;
  }

  .tabs {
    display: grid;
    width: 100%;
  }

  .player-actions,
  .season-match,
  .season-actions {
    grid-template-columns: 1fr;
  }

  .player-roster-pair {
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .player-roster-pair time {
    border-right: 0;
    border-bottom: 1px solid #ecefeb;
    padding: 10px 18px;
    justify-content: flex-start;
  }

  .player-roster-pair-members {
    grid-column: auto;
    grid-template-columns: 1fr;
  }

  .player-roster-member:first-child {
    border-right: 0;
    border-bottom: 1px solid #ecefeb;
  }

  .player-roster-team-result {
    min-height: 38px;
    border-left: 0;
    border-right: 0;
    border-bottom: 1px solid #ecefeb;
  }

  .club-logo-slot {
    width: 48px;
    height: 48px;
  }

  .season-actions {
    display: grid;
  }
}

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

  .alternate-players .alternate-row:nth-child(2n) {
    border-left: 0;
  }

  .match-detail-date-row,
  .match-detail-format-row {
    grid-template-columns: 1fr;
  }
}

/* Presidio Players Club splash page */
html,
body.splash-page {
  min-height: 100%;
}

body.splash-page {
  display: grid;
  place-items: start center;
  min-height: 100vh;
  margin: 0;
  background: #1b4f27;
  color: #fff;
}

.splash-page .container {
  display: grid;
  justify-items: center;
  width: min(100%, 760px);
  padding: clamp(92px, 16vh, 150px) 24px 48px;
}

.splash-page .logo {
  display: block;
  width: min(430px, 78vw);
  height: auto;
}

.splash-page .feature-links {
  display: grid;
  justify-items: center;
  gap: 9px;
  margin-top: 14px;
  font-size: clamp(0.86rem, 2.4vw, 0.98rem);
  font-weight: 800;
  text-align: center;
}

.splash-page .feature-links a {
  color: #fff;
  text-decoration: none;
  text-underline-offset: 4px;
  opacity: 0.86;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.splash-page .feature-links a:hover,
.splash-page .feature-links a:focus-visible {
  transform: translateY(-4px);
  opacity: 1;
  text-decoration: underline;
}

.splash-page .social-icons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  width: min(232px, 62vw);
  margin-top: 18px;
  padding: 0 0 12px;
}

.splash-page .social-icons a {
  display: inline-grid;
  place-items: center;
  width: 41px;
  height: 41px;
}

.splash-page .social-icons a {
  opacity: 0.8;
}

.splash-page .social-icons a {
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.splash-page .social-icons a:hover,
.splash-page .social-icons a:focus-visible {
  transform: translateY(-4px);
  opacity: 1;
}

.splash-page .social-icons img {
  display: block;
  width: 41px;
  height: 41px;
  object-fit: contain;
}

@media (max-width: 520px) {
  .splash-page .container {
    padding-top: 96px;
  }

  .splash-page .logo {
    width: min(360px, 82vw);
  }

  .splash-page .social-icons {
    gap: 18px;
    margin-top: 0;
    padding: 0 0 8px;
  }
}
