.admin-player-profile-modal .admin-event-settings-modal-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: min(94dvh, 760px);
  max-height: min(94dvh, 760px);
  max-width: min(940px, calc(100vw - 24px));
  overflow: hidden;
  width: min(940px, calc(100vw - 24px));
}

.admin-player-profile-head {
  background: var(--admin-theme-primary, #17633f);
  color: #fff;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 16px 18px 0;
}

.admin-player-profile-identity {
  align-items: center;
  display: flex;
  gap: 12px;
  min-width: 0;
}

.admin-player-profile-identity > div:last-child {
  display: grid;
  min-width: 0;
}

.admin-player-profile-identity strong {
  font-size: clamp(1.22rem, 3vw, 1.72rem);
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-player-profile-identity span {
  font-size: 0.78rem;
  font-weight: 750;
  opacity: 0.86;
}

.admin-profile-photo-shell {
  align-items: center;
  background: color-mix(in srgb, var(--admin-theme-secondary, #ff883e) 24%, #fff);
  border: 2px solid #fff;
  border-radius: 50%;
  color: var(--admin-theme-primary, #17633f);
  display: grid;
  flex: 0 0 auto;
  height: 52px;
  justify-items: center;
  overflow: hidden;
  position: relative;
  width: 52px;
}

.admin-profile-photo-shell img,
.admin-profile-photo-shell span {
  grid-area: 1 / 1;
}

.admin-profile-photo-shell img {
  height: 100%;
  object-fit: cover;
  width: 100%;
  z-index: 2;
}

.admin-profile-photo-shell span {
  font-size: 0.88rem;
  font-weight: 950;
}

.admin-player-profile-head .admin-modal-close {
  align-self: start;
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 1.8rem;
  height: 38px;
  line-height: 1;
  padding: 0;
  width: 38px;
}

.admin-player-profile-tabs {
  display: flex;
  gap: 4px;
  grid-column: 1 / -1;
  margin-top: 13px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.admin-player-profile-tabs::-webkit-scrollbar {
  display: none;
}

.admin-player-profile-tabs button {
  background: color-mix(in srgb, var(--admin-profile-tab-fill, var(--admin-theme-secondary, #ff883e)) 72%, var(--admin-theme-primary, #17633f));
  border: 1px solid color-mix(in srgb, var(--admin-profile-tab-fill, var(--admin-theme-secondary, #ff883e)) 82%, #fff);
  border-radius: 5px 5px 0 0;
  color: var(--admin-profile-tab-text, #fff);
  flex: 0 0 auto;
  font-size: 0.76rem;
  font-weight: 900;
  min-height: 38px;
  padding: 0 13px;
}

.admin-player-profile-tabs button.active {
  background: var(--admin-profile-tab-fill, var(--admin-theme-secondary, #ff883e));
  border-color: var(--admin-profile-tab-fill, var(--admin-theme-secondary, #ff883e));
  box-shadow: inset 0 -3px 0 #fff;
  color: var(--admin-profile-tab-text, #fff);
}

body[data-admin-theme="irish"] {
  --admin-profile-tab-fill: #ff883e;
  --admin-profile-tab-text: #173428;
}

body[data-admin-theme="usa"] {
  --admin-profile-tab-fill: #b22234;
  --admin-profile-tab-text: #fff;
}

body[data-admin-theme="scoodle"] {
  --admin-profile-tab-fill: #ef342d;
  --admin-profile-tab-text: #fff;
}

body[data-admin-theme="masters"] {
  --admin-profile-tab-fill: #e2ba2f;
  --admin-profile-tab-text: #103c31;
}

.admin-player-profile-body {
  background: #f3f6f4;
  display: grid;
  gap: 14px;
  grid-template-columns: 150px minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
  padding: 16px;
}

.admin-player-profile-photo-tools {
  align-content: start;
  background: #fff;
  border: 1.5px solid color-mix(in srgb, var(--admin-theme-primary, #17633f) 42%, #fff);
  border-radius: 7px;
  display: grid;
  gap: 8px;
  justify-items: stretch;
  padding: 12px;
}

.admin-player-profile-photo-tools .admin-profile-photo-shell {
  border-color: color-mix(in srgb, var(--admin-theme-primary, #17633f) 42%, #fff);
  height: 108px;
  justify-self: center;
  width: 108px;
}

.admin-profile-upload-button {
  cursor: pointer;
  display: grid;
  place-items: center;
}

.admin-profile-upload-button input {
  height: 1px;
  opacity: 0;
  overflow: hidden;
  position: absolute;
  width: 1px;
}

.admin-player-profile-photo-tools small {
  color: #637168;
  font-size: 0.68rem;
  text-align: center;
}

.admin-player-profile-content {
  min-height: 0;
  min-width: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 3px;
}

.admin-player-profile-panel {
  display: none;
}

.admin-player-profile-panel.active {
  display: grid;
  gap: 14px;
}

.admin-profile-section-head {
  border-bottom: 2px solid color-mix(in srgb, var(--admin-theme-primary, #17633f) 28%, #fff);
  display: grid;
  gap: 2px;
  padding-bottom: 9px;
}

.admin-profile-section-head strong {
  color: var(--admin-theme-ink, #153d2d);
  font-size: 1.04rem;
}

.admin-profile-section-head span {
  color: #617168;
  font-size: 0.76rem;
}

.admin-profile-form-grid {
  display: grid;
  gap: 11px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-profile-name-grid {
  display: grid;
  gap: 11px;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 92px;
  min-width: 0;
}

.admin-player-profile-modal .admin-field {
  min-width: 0;
}

.admin-player-profile-modal .admin-field span,
.admin-profile-subhead {
  color: var(--admin-theme-ink, #153d2d);
  font-size: 0.72rem;
  font-weight: 900;
}

.admin-player-profile-modal .admin-field input,
.admin-player-profile-modal .admin-field select {
  background: #fff;
  border: 1.5px solid #c9d5ce;
  border-radius: 5px;
  box-sizing: border-box;
  color: #17271f;
  min-height: 42px;
  padding: 8px 10px;
  width: 100%;
}

.admin-player-profile-modal .admin-field input:focus,
.admin-player-profile-modal .admin-field select:focus {
  border-color: var(--admin-theme-primary, #17633f);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--admin-theme-primary, #17633f) 17%, transparent);
  outline: 0;
}

.wide-field,
.street-field {
  grid-column: 1 / -1;
}

.admin-profile-toggle {
  align-items: center;
  background: #fff;
  border: 1.5px solid #d0d9d4;
  border-radius: 6px;
  display: flex;
  gap: 10px;
  min-height: 48px;
  padding: 8px 10px;
}

.admin-profile-toggle input {
  accent-color: var(--admin-theme-primary, #17633f);
  height: 20px;
  width: 20px;
}

.admin-profile-toggle span {
  display: grid;
}

.admin-profile-toggle strong {
  color: #20352a;
  font-size: 0.76rem;
}

.admin-profile-toggle small {
  color: #69776f;
  font-size: 0.66rem;
}

.admin-profile-address-block {
  background: color-mix(in srgb, var(--admin-theme-primary, #17633f) 5%, #fff);
  border: 1.5px solid color-mix(in srgb, var(--admin-theme-primary, #17633f) 30%, #fff);
  border-radius: 7px;
  display: grid;
  gap: 9px;
  padding: 11px;
}

.admin-profile-record-status,
.admin-profile-ghin-note {
  align-items: center;
  background: #fff;
  border: 1.5px solid #d0d9d4;
  border-radius: 7px;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  padding: 10px;
}

.admin-profile-record-status small,
.admin-profile-ghin-note span {
  color: #66756d;
  font-size: 0.72rem;
}

.admin-profile-ghin-note {
  display: grid;
}

.admin-profile-status-pill {
  background: #eef1ef;
  border: 1px solid #ccd5d0;
  border-radius: 999px;
  color: #58675f;
  font-size: 0.68rem;
  font-weight: 950;
  padding: 5px 9px;
  text-transform: uppercase;
}

.admin-profile-status-pill.connected {
  background: color-mix(in srgb, var(--admin-theme-primary, #17633f) 12%, #fff);
  border-color: color-mix(in srgb, var(--admin-theme-primary, #17633f) 48%, #fff);
  color: var(--admin-theme-primary, #17633f);
}

.admin-profile-score-summary {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-profile-score-summary > div {
  background: #fff;
  border: 1.5px solid color-mix(in srgb, var(--admin-theme-primary, #17633f) 35%, #fff);
  border-radius: 7px;
  display: grid;
  gap: 2px;
  padding: 10px;
  text-align: center;
}

.admin-profile-score-summary strong {
  color: var(--admin-theme-primary, #17633f);
  font-size: 1.08rem;
}

.admin-profile-score-summary span {
  color: #65736b;
  font-size: 0.65rem;
  font-weight: 850;
  text-transform: uppercase;
}

.admin-profile-record-list,
.admin-profile-results-table {
  display: grid;
  gap: 8px;
}

.admin-profile-results-grid {
  border: 1.5px solid color-mix(in srgb, var(--admin-theme-primary, #17633f) 32%, #fff);
  border-radius: 7px;
  display: grid;
  overflow: hidden;
}

.admin-profile-results-head,
.admin-profile-results-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(74px, 0.82fr) minmax(112px, 1.65fr) minmax(72px, 0.75fr) minmax(68px, 0.72fr);
  min-height: 34px;
  padding: 5px 9px;
}

.admin-profile-results-head {
  background: color-mix(in srgb, var(--admin-theme-primary, #17633f) 12%, #fff);
  color: var(--admin-theme-primary, #17633f);
  font-size: 0.64rem;
  font-weight: 900;
  line-height: 1.05;
  text-transform: uppercase;
}

.admin-profile-results-row {
  border-top: 1px solid #dbe3de;
  color: #52635a;
  font-size: 0.72rem;
}

.admin-profile-results-row > * {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-profile-results-row a {
  color: var(--admin-theme-primary, #17633f);
  font-weight: 850;
}

.admin-profile-results-row strong {
  color: #20352a;
  font-size: 0.72rem;
  text-align: center;
}

.admin-profile-results-head > :nth-child(3),
.admin-profile-results-head > :nth-child(4) {
  text-align: center;
}

@media (max-width: 430px) {
  .admin-profile-results-head,
  .admin-profile-results-row {
    gap: 5px;
    grid-template-columns: 72px minmax(88px, 1fr) 64px 62px;
    padding-inline: 6px;
  }

  .admin-profile-results-head {
    font-size: 0.57rem;
  }

  .admin-profile-results-row {
    font-size: 0.66rem;
  }
}

.admin-profile-record-row,
.admin-profile-result-row {
  align-items: center;
  background: #fff;
  border: 1.5px solid color-mix(in srgb, var(--admin-theme-primary, #17633f) 32%, #fff);
  border-radius: 7px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) auto;
  padding: 10px;
}

.admin-profile-result-row {
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(80px, auto) auto;
}

.admin-profile-record-row > div,
.admin-profile-result-row > div {
  display: grid;
  min-width: 0;
}

.admin-profile-record-row strong,
.admin-profile-result-row strong {
  color: #20352a;
  font-size: 0.78rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-profile-record-row span,
.admin-profile-result-row span {
  color: #6c7972;
  font-size: 0.68rem;
}

.admin-profile-record-score {
  text-align: center;
}

.admin-profile-record-score strong {
  color: var(--admin-theme-primary, #17633f);
  font-size: 1rem;
}

.member-score-record-row {
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) auto auto;
}

.admin-profile-record-remove {
  align-self: center;
  background: #fff;
  border: 1px solid #a8483e;
  border-radius: 5px;
  color: #8e3029;
  font-size: 0.66rem;
  font-weight: 900;
  min-height: 32px;
  padding: 0 9px;
}

.admin-profile-record-remove:hover,
.admin-profile-record-remove:focus-visible {
  background: #fff0ed;
}

.clubhouse-remove-score-form,
.clubhouse-remove-score-warning {
  display: grid;
  gap: 12px;
}

.clubhouse-remove-score-warning {
  background: #fff7f4;
  border: 2px solid #a8483e;
  border-radius: 7px;
  color: #3c2825;
  padding: 14px;
}

.clubhouse-remove-score-warning span {
  color: #6d514c;
  font-size: 0.82rem;
}

.clubhouse-remove-score-form > label {
  display: grid;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 850;
}

.clubhouse-remove-score-form input {
  border: 1.5px solid #aebbb3;
  border-radius: 5px;
  min-height: 42px;
  padding: 0 11px;
}

.admin-profile-result-row button {
  background: color-mix(in srgb, var(--admin-theme-primary, #17633f) 10%, #fff);
  border: 1px solid color-mix(in srgb, var(--admin-theme-primary, #17633f) 45%, #fff);
  border-radius: 5px;
  color: var(--admin-theme-primary, #17633f);
  font-size: 0.68rem;
  font-weight: 900;
  min-height: 34px;
  padding: 0 9px;
}

.admin-profile-empty,
.admin-profile-loading {
  background: #fff;
  border: 1.5px dashed #becbc4;
  border-radius: 7px;
  color: #66746c;
  display: grid;
  gap: 3px;
  padding: 22px 14px;
  text-align: center;
}

.admin-profile-empty strong {
  color: #2b4035;
}

.admin-profile-membership-card {
  background: #fff;
  border: 2px solid #cbd5d0;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 15px;
}

.admin-profile-membership-card.linked {
  border-color: var(--admin-theme-primary, #17633f);
}

.admin-profile-membership-card > .admin-profile-status-pill {
  justify-self: start;
}

.admin-profile-membership-card > strong {
  color: #20352a;
  font-size: 1.05rem;
}

.admin-profile-membership-card p {
  color: #627169;
  font-size: 0.76rem;
  margin: 0;
}

.admin-profile-membership-card dl {
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.admin-profile-membership-card dl div {
  background: #f5f7f6;
  border-radius: 5px;
  display: grid;
  gap: 2px;
  padding: 9px;
}

.admin-profile-membership-card dt {
  color: #6c7972;
  font-size: 0.64rem;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-profile-membership-card dd {
  color: #20352a;
  font-size: 0.78rem;
  font-weight: 800;
  margin: 0;
}

.admin-profile-upgrade {
  background: color-mix(in srgb, var(--admin-theme-secondary, #ff883e) 12%, #fff);
  border: 1.5px solid color-mix(in srgb, var(--admin-theme-secondary, #ff883e) 58%, #fff);
  border-radius: 6px;
  display: grid;
  gap: 3px;
  padding: 11px 12px;
}

.admin-profile-upgrade > span {
  color: #66746d;
  font-size: 0.63rem;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-profile-upgrade > strong {
  color: var(--admin-theme-primary, #17633f);
  font-size: 0.9rem;
}

.admin-profile-upgrade p {
  color: #4e6157;
  font-size: 0.72rem;
}

.admin-player-profile-actions {
  align-items: center;
  background: #fff;
  border-top: 1px solid #d5ddd8;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  padding: 10px 16px;
}

.admin-player-profile-actions [data-player-profile-status] {
  color: #5f6e66;
  font-size: 0.72rem;
  font-weight: 800;
}

.admin-player-profile-actions [data-player-profile-status][data-tone="success"] {
  color: #137143;
}

.admin-player-profile-actions [data-player-profile-status][data-tone="error"] {
  color: #a12b20;
}

@media (max-width: 700px) {
  .admin-player-profile-modal .admin-event-settings-modal-card {
    height: 96dvh;
    max-height: 96dvh;
    max-width: calc(100vw - 12px);
    width: calc(100vw - 12px);
  }

  .admin-player-profile-head {
    padding: 12px 12px 0;
  }

  .admin-player-profile-body {
    display: block;
    overflow-y: auto;
    padding: 11px;
  }

  .admin-player-profile-photo-tools {
    align-items: center;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    margin-bottom: 11px;
  }

  .admin-player-profile-photo-tools .admin-profile-photo-shell {
    height: 66px;
    width: 66px;
  }

  .admin-player-profile-photo-tools small {
    display: none;
  }

  .admin-player-profile-content {
    overflow: visible;
    padding: 0;
  }

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

  .admin-profile-name-grid {
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 70px;
  }

  .wide-field,
  .street-field {
    grid-column: auto;
  }

  .admin-profile-score-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-profile-record-row,
  .admin-profile-result-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .admin-profile-record-row > div:nth-child(2),
  .admin-profile-result-row > div:nth-child(2) {
    grid-column: 1 / 2;
  }

  .admin-profile-result-row button {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .admin-profile-record-remove {
    grid-column: 2;
    grid-row: 1 / span 2;
  }


  .member-score-record-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

@media (max-width: 430px) {
  .admin-player-profile-identity .admin-profile-photo-shell {
    height: 44px;
    width: 44px;
  }

  .admin-player-profile-tabs button {
    font-size: 0.7rem;
    padding: 0 10px;
  }

  .admin-player-profile-photo-tools {
    grid-template-columns: 58px minmax(0, 1fr) auto;
    padding: 9px;
  }

  .admin-player-profile-photo-tools .admin-profile-photo-shell {
    height: 54px;
    width: 54px;
  }

  .admin-profile-score-summary strong {
    font-size: 0.9rem;
  }

  .admin-profile-score-summary span {
    font-size: 0.56rem;
  }

  .admin-profile-membership-card dl {
    grid-template-columns: 1fr;
  }

  .admin-player-profile-actions {
    grid-template-columns: minmax(0, 1fr) auto auto;
    padding: 9px 10px;
  }

  .admin-player-profile-actions .admin-action {
    min-height: 38px;
    padding: 0 10px;
  }
}
.admin-profile-stats-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.admin-profile-stats-head > div {
  display: grid;
  gap: 2px;
}

.admin-profile-stats-head select {
  min-height: 38px;
  border: 1px solid var(--admin-theme-primary, #17633f);
  border-radius: 5px;
  background: #fff;
  color: #173428;
  font: inherit;
  font-weight: 700;
  padding: 7px 9px;
}

.admin-profile-stats-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.admin-profile-stats-summary article {
  display: grid;
  gap: 3px;
  min-width: 0;
  border: 1px solid color-mix(in srgb, var(--admin-theme-primary, #17633f) 48%, #fff);
  border-radius: 6px;
  background: color-mix(in srgb, var(--admin-theme-light, #fff) 92%, var(--admin-theme-primary, #17633f));
  padding: 15px 12px;
  text-align: center;
}

.admin-profile-stats-summary article > strong {
  color: var(--admin-theme-primary, #17633f);
  font-size: 1.35rem;
}

.admin-profile-stats-summary article > span {
  color: #173428;
  font-size: .78rem;
  font-weight: 800;
}

.admin-profile-stats-summary article > small,
.admin-profile-stats-note {
  color: #64746c;
  font-size: .7rem;
}

.admin-profile-stats-note {
  margin: 12px 0 0;
  text-align: center;
}

@media (max-width: 680px) {
  .admin-profile-stats-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-profile-stats-head {
    align-items: stretch;
    flex-direction: column;
  }
}
