/* Shared personal/golf fields and modal actions. Loaded after page styles. */
.scoodle-player-profile,
[data-shared-profile-footer] { --profile-accent: var(--admin-theme-primary, var(--scoodle-front-primary, #163e78)); }
:is(html, body)[data-admin-theme="usa"] :is(.scoodle-player-profile, [data-shared-profile-footer]) { --profile-accent: #163e78; }
.scoodle-player-profile { font: 400 14px/1.3 system-ui, sans-serif; min-width: 0; }
:is(html, body)[data-admin-theme="usa"] :is(.member-profile-dialog .clubhouse-dialog-head, .admin-player-profile-head, .member-profile-dialog .admin-player-profile-tabs) { background: #163e78 !important; color: #fff !important; }
:is(html, body)[data-admin-theme="usa"] .admin-player-profile-tabs button { background: #ad2034; color: #fff; border-color: #ad2034; }
:is(html, body)[data-admin-theme="usa"] :is(.member-profile-dialog .clubhouse-dialog-head, .admin-player-profile-head) :is(strong, span) { color: #fff; opacity: 1; }
:is(html, body)[data-admin-theme="usa"] :is(.member-profile-dialog, .admin-player-profile-modal) .admin-player-profile-photo-tools { background: #fff; border-color: #c6cfda; }
:is(html, body)[data-admin-theme="usa"] :is(.member-profile-dialog, .admin-player-profile-modal) .admin-profile-photo-shell { background: #163e78; color: #fff; border-color: #c6cfda; }
:is(html, body)[data-admin-theme="usa"] :is(.member-profile-dialog, .admin-player-profile-modal) .admin-profile-photo-shell :is(strong, span) { color: #fff; font: 600 20px/1.2 system-ui, sans-serif; }
.scoodle-player-profile .profile-detail-card {
  min-width: 0; margin: 0 0 20px; padding: 0; overflow: hidden;
  border: 1px solid #d4dfed; border-radius: 12px; background: #fff;
  box-shadow: 0 4px 16px rgb(22 62 120 / 5%);
}
.scoodle-player-profile .admin-profile-section-head {
  display: flex; align-items: center; gap: 12px; margin: 0; padding: 16px 22px;
  border: 0; background: var(--profile-accent); color: #fff;
}
.scoodle-player-profile .admin-profile-section-head strong { color: #fff; font: 600 24px/1.25 system-ui, sans-serif; letter-spacing: -0.4px; }
.scoodle-player-profile .profile-section-icon { flex: 0 0 26px; width: 26px; height: 26px; color: #fff; }
.scoodle-player-profile .admin-profile-golf-block { display: block; }
.scoodle-player-profile :is(.member-profile-info-view-grid, .member-profile-info-edit-grid) {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas: "name name" "nickname phone" "email address";
  gap: 22px 24px; padding: 22px;
}
.scoodle-player-profile :is(.member-profile-info-view-row, .member-profile-info-edit-row) { display: contents; }
.scoodle-player-profile .profile-info-name { grid-area: name; }
.scoodle-player-profile .profile-info-nickname { grid-area: nickname; }
.scoodle-player-profile .profile-info-phone { grid-area: phone; }
.scoodle-player-profile .profile-info-email { grid-area: email; }
.scoodle-player-profile .profile-info-address { grid-area: address; width: 100%; max-width: 100%; }
.scoodle-player-profile :is(.admin-field, .member-profile-view-field) { display: grid; align-content: start; gap: 6px; min-width: 0; padding: 0 !important; margin: 0; border: 0 !important; background: transparent !important; }
.scoodle-player-profile :is(.admin-field, .member-profile-view-field) > span { color: #52647e; font: 500 14px/1.3 system-ui, sans-serif; font-weight: 500 !important; text-transform: none; letter-spacing: 0; padding: 0; }
.scoodle-player-profile :is(.admin-field input:not([type=hidden]), .admin-field select) {
  box-sizing: border-box; width: 100%; min-width: 0; height: 40px; min-height: 40px;
  border: 1px solid #aabbd0; border-radius: 6px; padding: 6px 7px;
  color: #18273a; background: #fff; font: 400 16px/1.2 system-ui, sans-serif;
}
.scoodle-player-profile .admin-field input[readonly] { background: #f3f6fb; color: #52647e; }
.scoodle-player-profile .member-profile-view-field .admin-profile-view-item { display: flex; align-items: center; box-sizing: border-box; width: 100%; min-width: 0; min-height: 32px; overflow-wrap: anywhere; height: auto; border: 0; border-radius: 0; background: transparent; padding: 0; font: 500 20px/1.35 system-ui, sans-serif; }
.scoodle-player-profile .member-profile-view-field .admin-profile-view-item strong { font: 500 20px/1.35 system-ui, sans-serif; color: #18273a; }
.scoodle-player-profile .admin-profile-view-item strong.empty { color: #65758a; font-weight: 400; }
.scoodle-player-profile .profile-info-name .admin-profile-view-item strong { font-size: 28px; font-weight: 650; color: var(--profile-accent); letter-spacing: -0.5px; }
.scoodle-player-profile .member-profile-info-view-grid .profile-info-name::after { content: ""; display: block; width: 40px; height: 3px; margin-top: 8px; background: var(--profile-accent); border-radius: 2px; }
:is(html, body)[data-admin-theme="usa"] .scoodle-player-profile .member-profile-info-view-grid .profile-info-name::after { background: #ad2034; }
.scoodle-player-profile .admin-field.profile-info-name { width: min(100%, 320px); }
.scoodle-player-profile .admin-field.profile-info-nickname { width: min(100%, 240px); }
.scoodle-player-profile .admin-field.profile-info-phone { width: min(100%, 180px); }
.scoodle-player-profile .member-profile-contact-preferences { grid-area: notices; align-self: stretch; display: grid; align-content: center; gap: 12px; padding: 8px; border: 1px solid #d4dbe5; border-radius: 5px; background: #fff; }
.scoodle-player-profile .member-profile-notice-option { display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 400; color: #18273a; white-space: nowrap; }
.scoodle-player-profile .member-profile-notice-option input { appearance: none; flex: 0 0 20px; width: 20px; height: 20px; margin: 0; border: 1px solid var(--profile-accent); border-radius: 4px; background: #fff; opacity: 1; }
.scoodle-player-profile .member-profile-notice-option input:checked { background: var(--profile-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.2 6.3 11.4 13.2 4.5' fill='none' stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.4'/%3E%3C/svg%3E") center / 16px no-repeat; border-color: var(--profile-accent); }
.scoodle-player-profile :is(input, select, button):focus-visible { outline: 2px solid var(--profile-accent); outline-offset: 2px; }
.scoodle-player-profile .member-profile-golf-view-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px 24px; padding: 22px;
  grid-template-areas: "index ghin" "ghinName preference" "gender dob" "age category";
}
.scoodle-player-profile .member-profile-golf-view-row { display: contents; }
.scoodle-player-profile .member-profile-view-field.profile-golf-ghin { grid-area: ghin; }
.scoodle-player-profile .member-profile-view-field.profile-golf-index { grid-area: index; }
.scoodle-player-profile .member-profile-view-field.profile-golf-ghin-name { grid-area: ghinName; }
.scoodle-player-profile .member-profile-view-field.profile-golf-preference { grid-area: preference; }
.scoodle-player-profile .member-profile-view-field.profile-golf-gender { grid-area: gender; }
.scoodle-player-profile .member-profile-view-field.profile-golf-dob { grid-area: dob; }
.scoodle-player-profile .member-profile-view-field.profile-golf-age { grid-area: age; }
.scoodle-player-profile .member-profile-view-field.profile-golf-category { grid-area: category; }
.scoodle-player-profile .profile-golf-index .admin-profile-view-item strong { font-size: 32px; font-weight: 650; color: var(--profile-accent); letter-spacing: -0.6px; }
.scoodle-player-profile .profile-golf-age .admin-profile-view-item { white-space: nowrap; overflow-wrap: normal; }
.scoodle-player-profile .member-profile-golf-edit-grid { display: grid; gap: 22px; padding: 22px; }
.scoodle-player-profile .member-profile-golf-edit-row { display: flex; flex-wrap: wrap; gap: 18px 16px; align-items: end; }
.scoodle-player-profile .admin-field.profile-golf-ghin { width: 100px; }
.scoodle-player-profile .admin-field.profile-golf-index { width: 60px; }
.scoodle-player-profile .admin-field.profile-golf-ghin-name { width: 230px; max-width: 100%; }
.scoodle-player-profile .admin-field.profile-golf-preference { width: 150px; }
.scoodle-player-profile .admin-field.profile-golf-gender { width: 100px; }
.scoodle-player-profile .admin-field.profile-golf-age { width: 50px; }
.scoodle-player-profile .admin-field.profile-golf-category { width: 260px; max-width: 100%; }
.scoodle-player-profile .admin-dob-selects { display: grid; grid-template-columns: 80px 62px 76px; gap: 6px; min-width: 0; }
.admin-player-profile-modal .scoodle-player-profile .profile-golf-dob { width: auto; max-width: 100%; min-width: 0; }
.admin-player-profile-modal .scoodle-player-profile .admin-field.profile-golf-dob { width: 230px; }
.scoodle-player-profile .admin-dob-part { min-width: 0; }
.scoodle-player-profile .admin-dob-part small { font-size: 14px; font-weight: 400; text-transform: none; letter-spacing: 0; }
/* Office enhances the same native fields used by Clubhouse. Size the visible
   controls as well as the selects, so their arrows cannot escape the frame. */
body[data-admin-theme] .scoodle-player-profile .scoodle-reliable-select { width: 100%; min-width: 0; max-width: 100%; }
body[data-admin-theme] .scoodle-player-profile .scoodle-reliable-select-button {
  box-sizing: border-box; width: 100% !important; min-width: 0 !important; max-width: 100% !important; height: 40px; min-height: 40px;
  padding: 4px; gap: 3px; font: 400 16px/1.2 system-ui, sans-serif; border-radius: 6px;
}
body[data-admin-theme] .scoodle-player-profile [data-reliable-select-value] { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body[data-admin-theme] .scoodle-player-profile .scoodle-reliable-select-chevron { flex: 0 0 6px; inline-size: 6px; block-size: 6px; margin: -3px 2px 0 0; }
.scoodle-player-profile .member-profile-ghin-help { font-size: 14px; font-weight: 400; color: #526278; }

/* The actions move out of the Clubhouse form into its global modal footer.
   Attribute scoping keeps the same layout in either host, including view mode. */
[data-shared-profile-footer] {
  display: flex !important; flex: 0 0 auto !important; justify-content: flex-end !important; align-items: center !important;
  gap: 10px !important; width: 100% !important; max-width: 100% !important; min-width: 0 !important;
  box-sizing: border-box; margin: 0 !important; padding: 10px 16px !important;
  border: 0 !important; border-top: 1px solid #d4dbe5 !important; background: #fff !important;
}
[data-shared-profile-footer] > button {
  position: static !important; display: inline-flex !important; flex: 0 0 auto !important; align-items: center !important; justify-content: center !important;
  box-sizing: border-box !important; width: auto !important; min-width: 64px !important; max-width: 100% !important;
  height: 36px !important; min-height: 36px !important; margin: 0 !important; padding: 0 14px !important;
  border: 1px solid var(--profile-accent) !important; border-radius: 6px !important;
  font: 600 14px/1.2 system-ui, sans-serif !important; color: #fff !important; background: var(--profile-accent) !important;
  cursor: pointer; white-space: nowrap;
}
[data-shared-profile-footer] > button.secondary { color: var(--profile-accent) !important; background: #fff !important; }
[data-shared-profile-footer] > button[hidden] { display: none !important; }
[data-shared-profile-footer] > button:disabled { cursor: default; opacity: 0.7; }
.clubhouse-dialog.member-profile-dialog .clubhouse-dialog-footer { background: #fff; padding: 0; border: 0; }
.admin-player-profile-modal[data-player-editor-modal] .admin-event-settings-modal-card { width: min(1200px, calc(100vw - 24px)); max-width: calc(100vw - 24px); }
.admin-player-profile-modal[data-player-editor-modal] .admin-player-profile-identity strong { font-size: 22px; }
.admin-player-profile-modal[data-player-editor-modal] .admin-player-profile-identity span { font-size: 20px; }

/* Read-only details read as label/value rows, not editable form fields. */
.scoodle-player-profile .member-profile-view-field { grid-template-columns: max-content minmax(0, 1fr); column-gap: 8px; align-items: baseline; }
.scoodle-player-profile .member-profile-view-field > span { font-size: 18px; line-height: 1.3; }
.scoodle-player-profile .member-profile-view-field > span::after { content: " —"; }
.scoodle-player-profile :is(.member-profile-view-field, .admin-field) > span { display: inline-flex; align-items: center; gap: 6px; }
.scoodle-player-profile .profile-label-icon { flex: 0 0 18px; width: 18px; height: 18px; color: var(--profile-accent); }
.scoodle-player-profile .member-profile-info-view-grid .profile-info-name::after { display: none; }
@media (max-width: 1100px) {
  .scoodle-player-profile .member-profile-info-view-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "name" "nickname" "phone" "email" "address"; }
  .scoodle-player-profile .member-profile-golf-view-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "index" "ghin" "ghinName" "preference" "gender" "dob" "age" "category"; }
}

/* Keep the larger profile typography without wasting desktop height. The panel
   gap provides the card separation; don't also add bottom margins to each card. */
@media (min-width: 1001px) {
  .scoodle-player-profile.active { gap: 12px; }
  .scoodle-player-profile .profile-detail-card { margin-bottom: 0; }
  .scoodle-player-profile .admin-profile-section-head { padding: 9px 20px; }
  .scoodle-player-profile :is(.member-profile-info-view-grid, .member-profile-info-edit-grid, .member-profile-golf-view-grid, .member-profile-golf-edit-grid) { padding: 12px 20px; gap: 8px 24px; }
  .scoodle-player-profile :is(.admin-field, .member-profile-view-field) { row-gap: 4px; }
  .scoodle-player-profile .member-profile-golf-edit-row { gap: 12px 16px; }
  .scoodle-player-profile .member-profile-info-view-grid .profile-info-name::after { margin-top: 4px; }
}
@media (min-width: 1001px) and (max-height: 800px) {
  .scoodle-player-profile.active { gap: 8px; }
  .scoodle-player-profile .admin-profile-section-head { padding: 6px 18px; }
  .scoodle-player-profile :is(.member-profile-info-view-grid, .member-profile-info-edit-grid, .member-profile-golf-view-grid, .member-profile-golf-edit-grid) { padding: 8px 18px; row-gap: 6px; }
  .scoodle-player-profile :is(.admin-field, .member-profile-view-field) { row-gap: 2px; }
  .scoodle-player-profile .member-profile-golf-edit-row { row-gap: 6px; }
  .scoodle-player-profile .member-profile-info-view-grid .profile-info-name::after { margin-top: 0; }
}

@media (min-width: 651px) and (max-width: 1000px), (max-width: 480px) {
  .scoodle-player-profile :is(.member-profile-info-view-grid, .member-profile-info-edit-grid) {
    grid-template-columns: minmax(0, 1fr); grid-template-areas: "name" "nickname" "phone" "email" "address";
  }
}
@media (max-width: 650px) {
  .scoodle-player-profile .admin-profile-section-head { padding: 14px 16px; gap: 10px; }
  .scoodle-player-profile .admin-profile-section-head strong { font-size: 22px; }
  .scoodle-player-profile :is(.member-profile-info-view-grid, .member-profile-info-edit-grid, .member-profile-golf-view-grid, .member-profile-golf-edit-grid) { padding: 18px 16px; gap: 20px 16px; }
  .scoodle-player-profile .profile-detail-card { margin-bottom: 16px; }
}

/* Promo history stays directly below the code; future prorating stays out of view. */
.admin-profile-scoodle-promo [data-member-promo-used] { font: 500 14px/1.4 system-ui, sans-serif; color: var(--admin-theme-primary, #163e78); overflow-wrap: anywhere; }
.clubhouse-dialog:has([data-membership-promo-sample]) { width: min(1180px, calc(100vw - 24px)); max-width: calc(100vw - 24px); background: #fff; }
.clubhouse-dialog:has([data-membership-promo-sample]) .clubhouse-dialog-head { background: #163e78; border-bottom: 0; }
.clubhouse-dialog:has([data-membership-promo-sample]) .clubhouse-dialog-head :is(strong, span) { color: #fff; }
.clubhouse-dialog:has([data-membership-promo-sample]) .clubhouse-dialog-head strong { font-size: 20px; }
.clubhouse-dialog:has([data-membership-promo-sample]) .clubhouse-dialog-head span { font-size: 14px; }
.clubhouse-dialog:has([data-membership-promo-sample]) .clubhouse-dialog-head [data-close-clubhouse-modal] { display: none; }
.clubhouse-dialog:has([data-membership-promo-sample]) .clubhouse-dialog-footer { display: flex; justify-content: flex-end; background: #fff; border-top: 1px solid #d4dbe5; padding: 12px 16px; }
.clubhouse-dialog:has([data-membership-promo-sample]) .clubhouse-dialog-footer .clubhouse-dialog-actions { display: flex; justify-content: flex-end; width: 100%; }
.clubhouse-dialog:has([data-membership-promo-sample]) .clubhouse-dialog-footer button { width: auto !important; min-width: 72px; height: 36px; padding: 0 14px; background: #163e78; color: #fff; border: 0; border-radius: 6px; font: 600 14px/1.2 system-ui, sans-serif; }
.clubhouse-promo-sample { display: grid; gap: 18px; color: #18273a; --admin-theme-primary: #163e78; }
.clubhouse-promo-sample > * { grid-column: 1 / -1; min-width: 0; }
.clubhouse-promo-sample .admin-profile-scoodle-summary { display: block; margin: 0; }
.clubhouse-promo-sample .admin-profile-scoodle-summary > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
.clubhouse-promo-sample .admin-profile-scoodle-summary > div { padding: 0; background: none; }
.clubhouse-promo-sample .admin-profile-scoodle-summary dt { display: none; }
.clubhouse-promo-sample :is(dt, dd) { margin: 0; font: 500 16px/1.4 system-ui, sans-serif; }
.clubhouse-promo-sample .scoodle-promo-entry { padding: 14px; height: auto; gap: 10px; background: #f4f7fc; border: 1px solid #ccd7e5; border-radius: 8px; }
.clubhouse-promo-sample .scoodle-promo-entry-row { display: flex; gap: 8px; }
.clubhouse-promo-sample .scoodle-promo-entry-row input { min-width: 0; flex: 1; width: 100%; height: 36px; font-size: 14px; }
.clubhouse-promo-sample .scoodle-promo-entry-row button { width: auto; height: 36px; background: #163e78; color: #fff; font-size: 14px; }
.member-promo-sample-page { min-width: 0; min-height: 0; overflow-y: auto; margin: 0; padding: 0; border: 0; }
[data-membership-promo-sample] { display: block; overflow: auto; }
.member-promo-history { margin-top: 12px; border-top: 1px solid #d4dbe5; padding-top: 10px; color: #183553; text-align: left; }
.member-promo-history > strong { font-size: 16px; }
.member-promo-history ol { padding: 0; margin: 6px 0 0; list-style: none; }
.member-promo-history li { padding: 9px 0; border-bottom: 1px solid #e3e9f2; }
.member-promo-history li > span { display: block; font: 500 14px/1.45 system-ui, sans-serif; }
.member-promo-history li small, .member-promo-history p { display: block; margin: 3px 0 0; font: 400 13px/1.4 system-ui, sans-serif; color: #45536b; }

/* One visual contract for every profile tab, not just the personal-info renderer. */
.admin-player-profile-modal { --profile-accent: var(--admin-theme-primary, var(--scoodle-front-primary, #163e78)); }
:is(html, body)[data-admin-theme="usa"] .admin-player-profile-modal { --admin-theme-primary: #163e78; --admin-theme-secondary: #ad2034; --admin-theme-ink: #18273a; --admin-theme-light: #f4f7fc; --profile-accent: #163e78; }
.admin-player-profile-modal .admin-player-profile-panel:not(.scoodle-player-profile):not(.profile-communication-location) { color: #18273a; font: 400 16px/1.4 system-ui, sans-serif; }
.admin-player-profile-modal .admin-player-profile-panel:not(.scoodle-player-profile):not(.profile-communication-location) :is(span, strong, small, p, dt, dd, label, em, output, a) { color: inherit; }
.admin-player-profile-modal .admin-player-profile-panel:not(.scoodle-player-profile):not(.profile-communication-location) .admin-profile-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 20px; margin: 0; background: var(--profile-accent); border: 0; border-radius: 10px 10px 0 0; }
.admin-player-profile-modal .admin-profile-section-head strong { color: #fff !important; font: 600 24px/1.25 system-ui, sans-serif; letter-spacing: -.4px; }
.admin-player-profile-modal .admin-player-profile-panel:not(.scoodle-player-profile):not(.profile-communication-location) button:not(.scoodle-reliable-select-button) { background: var(--profile-accent) !important; color: #fff !important; border-color: var(--profile-accent) !important; font-family: system-ui, sans-serif; }
.admin-player-profile-modal :is(.admin-profile-scoodle-summary > div, .admin-profile-stats-summary article, .admin-profile-membership-card, .scoodle-promo-entry, .scoodle-promo-entry.is-disabled) { background: #f4f7fc; border-color: #c5d3e5; }
.admin-player-profile-modal :is(.admin-profile-score-summary span, .admin-profile-stats-summary article > span, .admin-profile-scoodle-summary dt, .admin-profile-membership-card dt) { font: 500 18px/1.3 system-ui, sans-serif; text-transform: none; }
.admin-player-profile-modal :is(.admin-profile-scoodle-summary dd, .admin-profile-membership-card dd, .admin-profile-stats-summary article > strong, .admin-profile-score-summary strong) { font: 600 22px/1.3 system-ui, sans-serif; }
.admin-player-profile-modal :is(.admin-profile-scoodle-type-picker, .admin-profile-billing-cadence) { padding-top: 58px; }
.admin-player-profile-modal :is(.admin-profile-scoodle-type-picker, .admin-profile-billing-cadence) legend { box-sizing: border-box; left: 0; right: 0; top: 0; width: 100%; padding: 9px 12px; margin: 0; border-radius: 8px 8px 0 0; background: var(--profile-accent); color: #fff !important; font: 600 24px/1.25 system-ui, sans-serif; letter-spacing: -.4px; }
.admin-player-profile-modal :is(.admin-profile-scoodle-amount, .scoodle-promo-entry) > strong { align-self: start; margin: -9px -9px 4px; padding: 9px 12px; border-radius: 8px 8px 0 0; background: var(--profile-accent); color: #fff !important; font: 600 24px/1.25 system-ui, sans-serif; letter-spacing: -.4px; text-align: left; }
.admin-player-profile-modal .admin-profile-payment-method header { margin: -12px -12px 4px; padding: 9px 12px; background: var(--profile-accent); color: #fff; border-radius: 8px 8px 0 0; }
.admin-player-profile-modal .admin-profile-payment-method header strong { color: #fff !important; font: 600 24px/1.25 system-ui, sans-serif; letter-spacing: -.4px; }
.admin-player-profile-modal .admin-profile-payment-method header span { color: #fff !important; }
.admin-player-profile-modal .admin-profile-payment-method header strong { flex: 1; min-width: 0; }
.admin-player-profile-modal .admin-player-profile-panel .admin-profile-payment-method header button[type="submit"]:not(.scoodle-reliable-select-button) { flex: 0 0 auto; min-width: 70px; min-height: 32px; height: 32px; width: auto; padding: 0 14px; margin: 0; border: 1px solid #fff !important; font: 600 14px/1.2 system-ui, sans-serif; }
.admin-player-profile-modal .admin-profile-payment-method .admin-profile-scoodle-save-status:empty { display: none; }
.admin-player-profile-modal :is(.admin-profile-scoodle-type-choice strong, .admin-profile-billing-cadence label) { font: 500 16px/1.35 system-ui, sans-serif; }
.admin-player-profile-modal :is(.scoodle-promo-entry-status, .admin-profile-payment-method p, .admin-profile-payment-method small, .admin-profile-scoodle-save-status) { font-size: 14px; line-height: 1.4; }
.admin-player-profile-modal .admin-profile-scoodle-plan-layout { display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(230px, 1.4fr); align-items: start; gap: 12px; min-width: 0; }
.admin-player-profile-modal .admin-profile-scoodle-settings-column { display: grid; gap: 12px; min-width: 0; align-content: start; }
.admin-player-profile-modal .admin-profile-scoodle-plan-layout > .scoodle-promo-entry { height: auto; min-width: 0; }
.admin-player-profile-modal .admin-profile-scoodle-selection-grid { grid-template-columns: minmax(180px, 1.1fr) minmax(110px, .65fr) minmax(120px, .65fr); }
.admin-player-profile-modal .admin-profile-scoodle-settings-column .admin-profile-scoodle-amount { margin: 0; }
.admin-player-profile-modal .admin-profile-payment-method { min-width: 0; }
.admin-player-profile-modal .admin-profile-scoodle-summary > div { grid-template-columns: minmax(110px, auto) minmax(0, 1fr); }
.admin-player-profile-modal :is(.admin-profile-results-head, .member-score-grid thead th) { background: var(--profile-accent); color: #fff; }
.admin-player-profile-modal :is(.admin-profile-results-head, .member-score-grid thead th) > * { color: #fff !important; }
@media (max-width: 1000px) {
  .admin-player-profile-modal .admin-profile-scoodle-plan-layout { grid-template-columns: minmax(0, 1fr); }
  .admin-player-profile-modal .admin-profile-section-head strong,
  .admin-player-profile-modal :is(.admin-profile-scoodle-type-picker, .admin-profile-billing-cadence) legend,
  .admin-player-profile-modal :is(.admin-profile-scoodle-amount, .scoodle-promo-entry) > strong,
  .admin-player-profile-modal .admin-profile-payment-method header strong { font-size: 22px; }
  .admin-player-profile-modal .admin-profile-scoodle-selection-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .admin-player-profile-modal .admin-profile-payment-method header { flex-wrap: wrap; gap: 4px 10px; }
  .admin-player-profile-modal .admin-profile-payment-method header span { order: 3; flex-basis: 100%; }
  .admin-player-profile-modal .admin-profile-scoodle-selection-grid { grid-template-columns: minmax(0, 1fr); }
  .admin-player-profile-modal .admin-profile-scoodle-selection-grid > * { grid-column: auto; }
  .admin-player-profile-modal .admin-profile-scoodle-summary dd { font-size: 18px; }
}

/* Keep the normal membership view within a short laptop viewport; long histories still scroll. */
@media (min-width: 1001px) and (max-height: 820px) {
  .admin-player-profile-modal [data-member-profile-panel="membership"] { gap: 8px; }
  .admin-player-profile-modal [data-member-profile-panel="membership"] .admin-profile-section-head { padding-top: 6px; padding-bottom: 6px; }
  .admin-player-profile-modal .admin-profile-scoodle-summary > div { padding-top: 0; padding-bottom: 0; }
  .admin-player-profile-modal .admin-profile-scoodle-settings-column { gap: 8px; }
  .admin-player-profile-modal :is(.admin-profile-scoodle-type-picker, .admin-profile-billing-cadence) { padding-top: 50px; padding-bottom: 6px; }
  .admin-player-profile-modal .admin-profile-scoodle-type-choice { min-height: 30px; padding-top: 2px; padding-bottom: 2px; }
  .admin-player-profile-modal .admin-profile-payment-method { padding: 8px; gap: 4px 10px; }
  .admin-player-profile-modal .admin-profile-payment-method header { margin: -8px -8px 0; padding-top: 6px; padding-bottom: 6px; }
  .admin-player-profile-modal .admin-profile-payment-method > button { min-height: 32px; }
}

/* Profile identity belongs in the header; details get the full body width. */
.admin-player-profile-modal .admin-player-profile-body { grid-template-columns: minmax(0, 1fr) !important; }
.admin-player-profile-modal .admin-player-profile-content { padding: 0 8px; }
.admin-player-profile-head, .member-profile-dialog .clubhouse-dialog-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px 16px; }
.clubhouse-dialog.member-profile-dialog .clubhouse-dialog-head { grid-template-columns: minmax(0, 1fr) auto !important; }
.member-profile-dialog .clubhouse-dialog-head > div:first-child { grid-column: 1; grid-row: 1; }
.member-profile-dialog [data-clubhouse-header-extra] { grid-column: 2; grid-row: 1; justify-self: end; }
.admin-player-profile-head > .admin-player-profile-identity { grid-column: 1; grid-row: 1; }
.admin-player-profile-head > [data-profile-header-photo] { grid-column: 2; grid-row: 1; justify-self: end; }
.admin-player-profile-head > .admin-player-profile-tabs { grid-column: 1 / -1; }
.member-profile-dialog .clubhouse-dialog-head > [data-close-clubhouse-modal] { display: none; }
.profile-header-photo { display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 0; }
.profile-header-photo .admin-profile-photo-shell { display: grid; place-items: center; margin: 0; width: 72px !important; height: 72px !important; min-height: 72px !important; max-width: 72px; padding: 0; overflow: hidden; border: 2px solid #fff !important; border-radius: 12px; color: #fff; background: rgba(255,255,255,.12); }
.profile-header-photo .admin-profile-photo-shell img { width: 100%; height: 100%; object-fit: cover; }
.profile-header-photo .admin-profile-photo-shell :is(strong, span) { color: #fff; font: 600 22px/1.2 system-ui, sans-serif; }
.profile-header-photo :is(.admin-profile-upload-button, button) { position: relative; display: inline-flex !important; justify-content: center; align-items: center; width: auto !important; min-height: 26px; padding: 3px 7px !important; border: 1px solid #fff !important; border-radius: 5px; background: transparent !important; color: #fff !important; font: 500 12px/1.3 system-ui, sans-serif !important; white-space: nowrap; cursor: pointer; }
.profile-header-photo input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.profile-header-photo [data-player-photo-status]:empty { display: none; }
.profile-header-photo [data-player-photo-status] { max-width: 140px; color: #fff; font: 400 12px/1.3 system-ui, sans-serif; }
.profile-communication-location.active { margin-top: 12px; }
.profile-communication-location .profile-communications { margin: 0; padding: 0; border: 0; }
.profile-communications .profile-communication-fold { margin: 0; border: 1px solid #ccd7e5; border-radius: 9px; background: #fff; overflow: hidden; }
.profile-communication-fold > summary { display: flex; align-items: center; gap: 12px; padding: 10px 16px; list-style: none; cursor: pointer; color: var(--communication-accent); }
.profile-communication-fold > summary::-webkit-details-marker { display: none; }
.profile-communication-title { color: var(--communication-accent); font: 600 18px/1.15 system-ui, sans-serif; }
.profile-communication-title-break { display: block; }
.profile-communication-completion { display: inline-flex; align-items: center; justify-content: center; padding: 3px 8px; border: 1px solid #c3cfdf; border-radius: 12px; color: #40516a; background: #f4f7fc; font: 500 12px/1.4 system-ui, sans-serif; white-space: nowrap; }
.profile-communication-completion[data-state="set"] { color: var(--communication-accent); border-color: var(--communication-accent); }
.profile-communication-completion[data-state="not-set"] { color: #a32536; border-color: #e3bcc4; background: #fff6f7; }
.profile-communication-arrow { flex: 0 0 22px; width: 22px; height: 22px; margin-left: auto; transition: transform .15s ease; }
.profile-communication-fold[open] .profile-communication-arrow { transform: rotate(180deg); }
.profile-communication-fold > summary:focus-visible { outline: 2px solid var(--communication-accent); outline-offset: -3px; }
.profile-communication-fold-body { padding: 16px; border-top: 1px solid #d4dbe5; }
.profile-communication-fold-body [data-communication-groups] { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.profile-communication-fold-body [data-communication-groups] > :not(.profile-communication-card) { grid-column: 1 / -1; }
.profile-communication-fold-body .profile-communication-card { margin-bottom: 0; }
:is(html, body)[data-admin-theme="usa"] .admin-player-profile-body { background: #f4f7fc; }
:is(html, body)[data-admin-theme="usa"] .admin-player-profile-photo-tools .admin-profile-upload-button { background: #163e78 !important; color: #fff !important; border: 0; border-radius: 5px; min-height: 32px; font: 600 14px/1.3 system-ui, sans-serif; }
.profile-communications { --communication-accent: var(--admin-theme-primary, var(--scoodle-front-primary, #163e78)); min-width: 0; margin-top: 8px; border-top: 1px solid #d4dbe5; padding-top: 12px; font: 400 14px/1.4 system-ui, sans-serif; color: #18273a; text-align: left; }
:is(html, body)[data-admin-theme="usa"] .profile-communications { --communication-accent: #163e78; }
.profile-communications h3 { font: 600 17px/1.25 system-ui, sans-serif; margin: 0 0 12px; color: var(--communication-accent); }
.profile-communication-card { margin-bottom: 10px; padding: 10px; border: 1px solid #ccd7e5; border-radius: 7px; background: #f4f7fc; }
.profile-communication-card h4 { margin: 0 0 8px; font: 600 14px/1.35 system-ui, sans-serif; color: var(--communication-accent); overflow-wrap: anywhere; }
.profile-communication-options { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.profile-communication-channel { margin: 10px 0 0; padding: 0; border: 0; min-width: 0; }
.profile-communication-channel legend { padding: 0; margin-bottom: 5px; color: #18273a; font: 400 14px/1.3 system-ui, sans-serif; }
.profile-communication-channel [data-communication-choice-status] { display: block; margin-top: 4px; }
.profile-communication-channel [data-communication-choice-status][hidden] { display: none !important; }
.profile-communication-options > span { font-size: 12px; }
.profile-communication-options label { display: inline-flex !important; align-items: center; gap: 5px; padding: 0 !important; border: 0 !important; background: none !important; margin: 0; color: #18273a; font: 400 14px/1.3 system-ui, sans-serif; }
.profile-communication-options input:is([type="checkbox"], [type="radio"]) { appearance: none; box-sizing: border-box; flex: 0 0 20px; width: 20px !important; height: 20px !important; min-height: 20px !important; margin: 0; padding: 0; border: 1px solid #163e78; border-radius: 4px; background: #fff; opacity: 1; }
.profile-communication-options input:checked { background: var(--communication-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.2 6.3 11.4 13.2 4.5' fill='none' stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.4'/%3E%3C/svg%3E") center / 16px no-repeat; }
.profile-communication-options input:focus-visible { outline: 2px solid var(--communication-accent); outline-offset: 2px; }
.profile-communications p { margin: 0 0 9px; }
.profile-communications :is(details, small, .profile-communication-hint) { font: 400 12px/1.4 system-ui, sans-serif; color: #40516a; text-align: left; }
.profile-communications details { margin-top: 9px; }
.profile-communications summary { cursor: pointer; color: var(--communication-accent); }
.profile-communications details p { margin-top: 6px; }
.profile-communication-policy { margin-top: 12px; padding-top: 10px; border-top: 1px solid #d4dbe5; font-size: 12px; line-height: 1.45; }
.profile-communication-policy nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.profile-communication-policy a { color: var(--communication-accent); text-decoration: underline; overflow-wrap: anywhere; }
.profile-communication-policy > span { display: block; margin-top: 6px; }
.profile-communications button { background: var(--communication-accent) !important; color: #fff !important; border: 0; border-radius: 5px; padding: 6px 10px; width: auto !important; font: 600 14px/1.3 system-ui, sans-serif; }
.profile-communications .profile-communication-error,
.profile-communications .is-unanswered :is(legend, [data-communication-choice-status]) { color: #b42332; font-weight: 600; }
.profile-communication-channel.is-unanswered { border-left: 3px solid #b42332; padding-left: 8px; }
.profile-communication-channel.is-unanswered input { border-color: #b42332; }
.claim-communication-choice { padding: 14px; border: 1px solid #ccd7e5; border-radius: 8px; background: #f4f7fc; color: #18273a; font: 400 14px/1.4 system-ui, sans-serif; }
.claim-communication-choice h3 { margin: 0 0 8px; color: #163e78; font: 600 18px/1.3 system-ui, sans-serif; }
.claim-communication-choice p { margin: 8px 0; }
.claim-communication-choice nav { display: flex; gap: 14px; flex-wrap: wrap; }
.claim-communication-choice a { color: #163e78; text-decoration: underline; }
.clubhouse-dialog.member-join-dialog .claim-terms-agreement { display: flex; align-items: flex-start; gap: 8px; }
.clubhouse-dialog.member-join-dialog .claim-terms-agreement > span { font: 400 14px/1.4 system-ui, sans-serif !important; }
.clubhouse-dialog.member-join-dialog .claim-terms-agreement input { flex: 0 0 20px; width: 20px !important; height: 20px !important; margin: 0; accent-color: #163e78; }
.clubhouse-dialog.member-join-dialog .claim-terms-agreement:has(input[aria-invalid="true"]) { color: #b42332; }
.claim-communication-choice .clubhouse-check-row { display: flex; align-items: flex-start; gap: 9px; border: 0; padding: 8px 0; }
.claim-communication-choice .clubhouse-check-row span { font: 400 14px/1.4 system-ui, sans-serif; color: #18273a; }
.claim-communication-choice input[type="checkbox"] { flex: 0 0 20px; width: 20px !important; height: 20px !important; min-height: 20px !important; margin: 0; accent-color: #163e78; }
.clubhouse-dialog.claim-communication-dialog { --claim-preference-accent: #163e78; background: #fff; border-color: #c6cfda; }
.claim-communication-dialog .clubhouse-dialog-head { background: var(--claim-preference-accent); border-bottom: 0; padding: 16px; }
.claim-communication-dialog .clubhouse-dialog-head :is(strong, span) { color: #fff; opacity: 1; }
.claim-communication-dialog .clubhouse-dialog-head [data-close-clubhouse-modal] { display: none; }
.claim-communication-dialog :is(.clubhouse-dialog-body, .clubhouse-dialog-footer) { background: #fff; }
.claim-communication-dialog .profile-communications { --communication-accent: var(--claim-preference-accent); }
.claim-communication-dialog [data-shared-profile-footer] { --profile-accent: var(--claim-preference-accent); }
.claim-communication-reminder { font: 400 14px/1.4 system-ui, sans-serif; color: #18273a; }
.claim-communication-reminder button { background: transparent !important; color: #163e78 !important; border: 0; padding: 0; font: inherit; text-decoration: underline; }
[data-claim-communication-form] .profile-communications { border-top: 0; margin: 0; padding: 0; }
[data-claim-communication-status] { font: 400 14px/1.4 system-ui, sans-serif; color: #18273a; }
@media (max-width: 1100px) {
  .admin-player-profile-modal .admin-player-profile-body { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 650px) {
  .admin-player-profile-modal .admin-player-profile-body { grid-template-columns: minmax(0, 1fr); overflow-y: auto; }
  .admin-player-profile-modal .admin-player-profile-photo-tools { width: auto; max-height: none; overflow: visible; }
  .admin-player-profile-modal .profile-communications { grid-column: 1 / -1; }
  .admin-player-profile-modal .admin-player-profile-content { overflow: visible; padding: 0; }
  .profile-header-photo .admin-profile-photo-shell { width: 60px !important; height: 60px !important; min-height: 60px !important; max-width: 60px; }
  .profile-communication-fold > summary { gap: 8px; padding: 12px; }
  .profile-communication-title { font-size: 14px; white-space: nowrap; }
  .profile-communication-title-break { display: inline; }
  .profile-communication-completion { padding: 2px 6px; font-size: 11px; }
  .profile-communication-arrow { flex-basis: 18px; width: 18px; height: 18px; }
  .profile-communication-fold-body { padding: 12px; }
  .profile-communication-fold-body [data-communication-groups] { grid-template-columns: minmax(0, 1fr); }
}

/* Give the mailing address the space left by compact contact details. */
@media (min-width: 1101px) {
  .scoodle-player-profile :is(.member-profile-info-view-grid, .member-profile-info-edit-grid) {
    grid-template-columns: minmax(240px, 0.8fr) minmax(0, 2fr);
    column-gap: 20px;
  }
}
.scoodle-player-profile .profile-address-editor { min-width: 0; display: grid; gap: 6px; }
.scoodle-player-profile .profile-address-editor > span { display: inline-flex; align-items: center; gap: 6px; color: #52647e; font: 500 14px/1.3 system-ui, sans-serif; }
.scoodle-player-profile .profile-address-fields { display: grid; grid-template-columns: minmax(0, 280px) minmax(0, 200px) 50px 76px; gap: 8px; }
@media (min-width: 1101px) {
  .scoodle-player-profile .member-profile-info-edit-grid {
    grid-template-columns: minmax(0, 240px) minmax(0, 160px) 180px minmax(0, 1fr);
    grid-template-areas: "name nickname phone email" "address address address address";
    column-gap: 16px;
  }
}
@media (max-width: 1100px) {
  .scoodle-player-profile .member-profile-info-edit-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "name" "nickname" "phone" "email" "address"; }
}
@media (max-width: 650px) {
  .scoodle-player-profile .profile-address-fields { grid-template-columns: minmax(0, 1fr) 50px 76px; }
  .scoodle-player-profile .profile-address-fields > :first-child { grid-column: 1 / -1; }
}

/* Phone mailing addresses use the full row below their label. */
@media (max-width: 650px) {
  .scoodle-player-profile .member-profile-view-field.profile-info-address { grid-template-columns: minmax(0, 1fr); }
  .scoodle-player-profile .member-profile-view-field.profile-info-address > span::after { content: none; }
}
