:root{
  --dr-chartreuse:#A6E22E;
  --dr-navy:#002D6D;
  --dr-orange:#E86030;
  --dr-warm-white:#F7F8F4;
  --dr-soft-gray:#D9DED4;
  --bg:var(--dr-warm-white);
  --ink:var(--dr-navy);
  --brand:var(--dr-navy);
  --brand2:var(--dr-navy);
  --line:var(--dr-soft-gray);
  --shadow:0 10px 28px rgba(7,29,51,.08);
}
body{background:var(--dr-warm-white);color:var(--dr-navy)}
.card,.organizer-area,.roster-manager-row,.member-admin-row,.player-access-row,.picker-option{border-color:var(--dr-soft-gray)}
.eyebrow{color:var(--dr-orange)}
.primary{background:var(--dr-chartreuse);color:var(--dr-navy);box-shadow:0 4px 12px rgba(7,29,51,.08)}
.primary:hover{filter:brightness(.97)}
.secondary{background:var(--dr-soft-gray);color:var(--dr-navy)}
.ghost{color:var(--dr-navy);border-color:var(--dr-soft-gray)}
.count strong,.scoreline{color:var(--dr-navy)}
.picker-option.selected{background:rgba(166,226,46,.14);border-color:var(--dr-chartreuse);box-shadow:inset 0 0 0 1px var(--dr-chartreuse);color:var(--dr-navy)}
.picker-option input{accent-color:var(--dr-navy)}
.player-chip{background:rgba(166,226,46,.16);color:var(--dr-navy)}
.tabs button{background:var(--dr-soft-gray);color:var(--dr-navy)}
.tabs button.active{background:var(--dr-chartreuse);color:var(--dr-navy)}
.hero{background:linear-gradient(135deg,var(--dr-navy),#16365f)}
.hero .eyebrow{color:var(--dr-chartreuse)}
.cloud-status.connected{color:var(--dr-navy)}
.cloud-status.connected::before{background:var(--dr-chartreuse)}
.brand-heading{display:flex;align-items:center;gap:14px;min-width:0}
.brand-mark{display:block;width:78px;height:78px;object-fit:contain;flex:0 0 auto;background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important;opacity:1;visibility:visible}
.topbar h1{color:var(--dr-navy)}
.brand-word-dink{color:var(--dr-navy)}
.brand-word-robin{color:var(--dr-chartreuse)}
.brand-promise{font-weight:750;color:var(--dr-navy)!important}
.organizer-flow-hint{margin:12px 0 2px;padding:10px 12px;border-left:4px solid var(--dr-orange);border-radius:10px;background:#fff;color:var(--dr-navy);font-weight:750}
.invite-progress{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:12px 0 10px}
.invite-progress-item{padding:10px 8px;border:1px solid var(--dr-soft-gray);border-radius:12px;background:#fff;text-align:center}
.invite-progress-value{display:block;font-size:24px;line-height:1;font-weight:900;color:var(--dr-navy)}
.invite-progress-label{display:block;margin-top:5px;font-size:11px;line-height:1.2;font-weight:800;text-transform:uppercase;letter-spacing:.45px;color:#667085}
.invite-next-action{margin:8px 0 12px;padding:10px 12px;border-radius:10px;background:var(--dr-soft-gray);color:var(--dr-navy);font-weight:800}
#sendInvitesBtn{min-width:180px}
.invite-action-groups{display:flex;flex-direction:column;gap:16px;margin-top:8px;min-width:0}
.invite-action-group{display:flex;flex-direction:column;gap:8px;min-width:0}
.invite-action-label{margin:0}
#inviteShareTrackHint,#inviteShareTrackNote{margin:0}
.invite-action-group .toolbar{flex-wrap:wrap;gap:8px;min-width:0}
.invite-action-group .toolbar button{min-height:44px;min-width:0;max-width:100%;padding:8px 12px}
.invite-sms-toolbar #sendInvitesBtn{min-width:min(180px,100%)}
@media(max-width:480px){
  .invite-share-toolbar #shareInviteBtn,
  .invite-share-toolbar #remindShareBtn,
  .invite-share-fallbacks #copyInviteLinkBtn,
  .invite-share-fallbacks button,
  .invite-sms-toolbar button{flex:1 1 100%}
}
#inviteModeNotice{border-color:var(--dr-chartreuse)}
footer{color:#667085}
.legal-links{display:flex;flex-wrap:wrap;justify-content:center;gap:8px 16px;margin:10px 0 0}
.legal-links a{color:var(--dr-navy);font-weight:750;text-decoration:underline}
#authGate .legal-links{justify-content:flex-start;margin-top:16px}
@media(max-width:650px){
  .brand-heading{align-items:flex-start;gap:10px}
  .brand-mark{width:58px;height:58px;border-radius:0!important}
  .topbar h1{font-size:clamp(32px,10vw,44px)}
  .invite-progress{grid-template-columns:repeat(2,minmax(0,1fr))}
  .invite-progress-item{padding:9px 6px}
}

/* Founder Release 51 correction: remove old Lakestone sage treatment from stats and inactive chrome. */
.badge-beta,.badge-status,.badge-established,.badge-confidence{background:var(--dr-soft-gray);color:var(--dr-navy);border:1px solid var(--dr-soft-gray)}
.leaderboard-row:hover{background:var(--dr-warm-white)}
.player-link,.profile-rating,.stat-tile .stat-value{color:var(--dr-navy)}
.stat-tile{background:#fff;border-color:var(--dr-soft-gray)}
.profile-avatar-placeholder{background:var(--dr-soft-gray);color:var(--dr-navy)}
.seed{background:var(--dr-soft-gray);color:var(--dr-navy)}
.sms-signup-bar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0 0 12px}
.sms-signup-bar .small{flex-basis:100%}
.sms-signup-btn{background:#A6E22E;color:#002D6D;border:0;border-radius:10px;min-height:40px;padding:8px 12px;font-weight:800;cursor:pointer}
.sms-signup-messages{color:var(--dr-navy);font-weight:750}
.roster-player-main{display:flex;flex-direction:column;align-items:flex-start;gap:4px;min-width:0}
.sms-consent-line{display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.sms-consent-status{display:inline-flex;align-items:center;min-height:28px;padding:2px 8px;border-radius:999px;font-size:12px;font-weight:800;border:1px solid var(--dr-soft-gray);color:var(--dr-navy);background:#fff}
.sms-consent-consented{background:rgba(166,226,46,.22);border-color:#A6E22E}
.people-list-panel{margin-top:8px}
.people-action-row{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:0 0 8px}
.people-action-row .compact-button{min-height:44px}
.people-list-tools{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:0 0 8px}
.people-list-tools input,.people-list-tools select{flex:1 1 150px;min-width:0;min-height:44px}
.people-filter-toggle{flex:0 0 auto;min-height:44px}
.people-filter-panel{display:contents}
.people-list{display:grid;gap:4px}
.people-row{display:flex;flex-wrap:nowrap;align-items:center;justify-content:flex-start;gap:6px;width:100%;max-width:100%;min-width:0;min-height:44px;padding:4px 8px;border:1px solid var(--dr-soft-gray);border-radius:10px;background:#fff;overflow:hidden}
button.people-row{font:inherit;color:inherit;text-align:left;cursor:pointer}
.people-row-inactive{opacity:.72}
.people-unlinked-row{flex-wrap:wrap;overflow:visible;height:auto}
.people-name{flex:1 1 45%;min-width:45%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:800}
.people-duplicate{flex:0 0 auto;white-space:nowrap;font-size:10px;font-weight:800;line-height:16px;padding:0 4px;border-radius:999px;background:#fff4d6;color:#002D6D;border:1px solid #E6C36A}
.people-row:has(.people-duplicate){flex-wrap:wrap;height:auto;overflow:visible}
.people-row:has(.people-duplicate) .people-name{flex:1 1 auto;min-width:min(100%,12rem);white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere}
.people-texting-dot,.people-texting-glyph{display:none}
.people-status-inactive{display:inline-flex;align-items:center;border:1px solid #98a2b3;border-radius:999px;background:transparent;color:#667085}
@media (max-width:480px){
  .people-row .people-texting{position:relative;min-width:18px;width:18px;height:18px;padding:0;justify-content:center;gap:0;border:0}
  .people-row .people-texting-label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
  .people-row .people-texting-dot{display:flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:50%;background:#98a2b3;color:#fff}
  .people-row .people-texting-glyph{display:block;font-size:12px;font-weight:800;line-height:1}
  .people-row .sms-consent-consented .people-texting-dot{background:#3f7a1a;color:#fff}
  .people-row .sms-consent-on_file_not_consented .people-texting-dot{background:#b7791f;color:#1a1208}
  .people-row .sms-consent-opted_out .people-texting-dot{background:#a23b3b;color:#fff}
  .people-row .sms-consent-no_phone .people-texting-dot{background:#98a2b3;color:#fff}
}
.people-unlinked-row .people-name{flex:1 1 auto;white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere}
.people-row-meta{display:flex;flex:0 0 auto;flex-wrap:nowrap;align-items:center;gap:3px;min-width:0}
.people-row .people-role,.people-row .sms-consent-status,.people-row .people-band,.people-row .people-status{flex:0 0 auto;min-height:18px;padding:0 4px;font-size:10px;line-height:16px;white-space:nowrap}
@media (max-width:480px){
  .people-row{gap:2px;padding:4px 6px}
  .people-row-meta{align-items:center;column-gap:3px;gap:3px}
  .people-row .people-role,.people-row .people-band,.people-row .people-status{display:inline-flex;align-items:center;height:18px;min-height:18px;padding:0 4px;font-size:10px;line-height:16px;letter-spacing:-0.03em}
  .people-row .people-texting{width:18px;min-width:18px;height:18px;min-height:18px;padding:0;border:0;line-height:16px}
}
.people-mobile,.people-status{font-size:11px;font-weight:750;color:#667085}
.people-role{display:inline-flex;align-items:center;min-height:28px;padding:2px 8px;border-radius:999px;font-size:12px;font-weight:800;border:1px solid var(--dr-soft-gray);background:#fff;color:var(--dr-navy)}
.people-role-owner{background:rgba(232,96,48,.16);border-color:#E86030}
.people-role-organizer{background:rgba(166,226,46,.22);border-color:#A6E22E}
.people-role-viewer{background:var(--dr-soft-gray)}
.people-empty,.people-unlinked-heading{margin:8px 0}
.people-open{background:none;border:0;padding:0;font:inherit;font-weight:800;color:inherit;cursor:pointer;text-align:left}
button.people-role,button.sms-consent-status,button.invite-open-contact{cursor:pointer;font:inherit}
.crm-profile-header{display:flex;gap:14px;align-items:flex-start;margin-bottom:8px}
.crm-profile-header .profile-avatar{width:64px;height:64px;border-radius:50%;object-fit:cover;flex:none}
.crm-profile-header .profile-avatar-placeholder{display:grid;place-items:center;font-weight:800;font-size:24px}
.crm-profile-name{margin:0;overflow-wrap:anywhere}
.crm-chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.crm-chip{display:inline-flex;align-items:center;min-height:28px;padding:2px 8px;border-radius:999px;font-size:12px;font-weight:800;background:#e7eee9;color:var(--dr-navy,#002D6D)}
.crm-tabs{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0 4px}
.crm-tab[aria-selected="true"]{background:var(--dr-navy,#002D6D);color:#fff}
.crm-name-list{margin:6px 0 12px;padding-left:18px}
.profile-editor{margin-top:8px}
.profile-section{margin:14px 0;padding-top:12px;border-top:1px solid var(--dr-soft-gray)}
.profile-section h3{margin:0 0 8px}
.profile-fields{display:grid;gap:8px;max-width:min(420px,100%)}
.profile-fields input,.profile-fields select{width:100%;min-height:44px}
.profile-identity{display:flex;gap:12px;align-items:flex-start;border-top:0;padding-top:0}
@media(max-width:650px){
  .sms-signup-bar{flex-direction:column;align-items:stretch}
  .sms-signup-btn,.sms-signup-bar .compact-button,.sms-signup-messages{width:100%;text-align:center}
  .toolbar{flex-wrap:wrap}
  .toolbar input,.invite-capacity input{flex:1 1 140px;min-width:0;width:auto;max-width:100%}
  .invite-capacity{flex-wrap:wrap}
  .people-action-row{flex-wrap:nowrap;gap:6px}
  .people-action-row .compact-button{flex:1 1 0;min-width:0;padding:6px 8px;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  #peopleAddForm{display:none}
  #peopleAddForm.is-open{display:block}
  #peopleSignupBar:not(:has(#peopleSignupActions.is-open)){display:none}
  #peopleSignupActions{display:none}
  #peopleSignupActions.is-open{display:block}
  .people-filter-panel{display:none;flex:1 1 100%}
  .people-filter-panel.is-open{display:flex;flex-wrap:wrap;gap:8px}
  .people-filter-panel select{flex:1 1 140px;min-width:0;min-height:44px}
  #peopleSearch{display:block;flex:1 1 120px}
}
@media(min-width:651px){
  #peopleFilterToggle,#peopleAddToggle,#peopleSignupToggle{display:none}
  .people-filter-panel{display:contents}
  #peopleAddForm,#peopleSignupActions{display:block}
}
.people-band{max-width:100%}
.people-inactive-section{max-width:100%;min-width:0}
.people-inactive-section summary{min-width:0;overflow-wrap:anywhere}
.crm-profile{min-width:0;max-width:100%}
.crm-profile-header{flex-wrap:wrap}
.crm-profile-id{flex:1 1 160px;min-width:0}
.crm-panel,.profile-editor{min-width:0;max-width:100%}
.crm-profile input,.crm-profile select,.profile-editor input,.profile-editor select{width:100%;max-width:100%;min-width:0}
.crm-panel .table-wrap{overflow-x:auto;max-width:100%}
.self-consent-label{display:flex;gap:8px;align-items:flex-start;min-width:0;overflow-wrap:anywhere}
.self-opt-in-note{overflow-wrap:anywhere}
@media (max-width:420px){
  .crm-profile,.crm-profile-header,.crm-profile-id,.crm-panel,.profile-editor,.profile-fields,.self-password-fields{min-width:0;max-width:100%}
  .crm-profile button,.crm-profile .compact-button,.crm-profile input,.crm-profile select,.crm-profile label{
    max-width:100%;
    min-width:0;
    white-space:normal;
    overflow-wrap:anywhere;
  }
  .crm-profile .profile-editor,.crm-profile .profile-fields,.crm-profile .self-password-fields{display:grid}
  .crm-tabs,.crm-chips{flex-wrap:wrap}
}
.topbar{align-items:flex-start}
.topbar-actions{position:relative;z-index:20;align-items:flex-end}
.header-menu-button{min-height:44px;min-width:44px}
.header-menu{
  position:absolute;
  top:100%;
  right:0;
  left:auto;
  margin-top:6px;
  z-index:30;
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:4px;
  width:max-content;
  min-width:min(220px,calc(100vw - 28px));
  max-width:calc(100vw - 28px);
  padding:6px;
  background:#fff;
  border:1px solid var(--dr-soft-gray);
  border-radius:12px;
  box-shadow:var(--shadow);
}
.header-menu button{
  min-height:44px;
  width:100%;
  max-width:100%;
  white-space:normal;
  overflow-wrap:anywhere;
  text-align:center;
}
