/* App appearance is separate from public-profile themes and canvas exports. */
:root[data-color-mode="light"]{color-scheme:light}
:root[data-color-mode="dark"]{
  color-scheme:dark;background:#0f1b21;
  --pass-ink:#edf3f1;--pass-muted:#a9bab6;--pass-green:#add0b5;
  --pass-paper:#0f1b21;--pass-line:#34474e;--pass-white:#1b2b32;
  --ink:var(--pass-ink);--muted:var(--pass-muted);--green:var(--pass-green);
  --paper:var(--pass-paper);--line:var(--pass-line);--white:var(--pass-white);
  --dark-surface:#1b2b32;--dark-raised:#263b42;--dark-field:#132329;
}

/* Account, profile and shared app controls. */
:root[data-color-mode="dark"] .pass-header{background:#0f1b21f2;border-color:var(--pass-line)}
:root[data-color-mode="dark"] :is(.pass-form-card,.pass-account-card,.pass-auth-dialog,.pass-theme-color,.pass-school-picker,.pass-schedule-row){background:var(--dark-surface);border-color:var(--pass-line)}
:root[data-color-mode="dark"] :is(.pass-card-title>span,.pass-role-badge,.pass-button-primary){color:#142c3c}
:root[data-color-mode="dark"] .pass-button-quiet{border-color:#617b80;color:var(--pass-ink)}
:root[data-color-mode="dark"] .pass-button-quiet:hover{background:var(--dark-raised)}
:root[data-color-mode="dark"] :is(.pass-form-grid label,.pass-profile-link-label,.pass-target-fieldset legend,.pass-theme-picker legend,.pass-photo-title){color:var(--pass-ink)}
:root[data-color-mode="dark"] :is(.pass-form-grid input,.pass-form-grid select,.pass-form-grid textarea,.pass-url-input input,.pass-search-label input,.pass-schedule-fields input,.pass-admin-form input,.pass-admin-search input){background:var(--dark-field);border-color:var(--pass-line);color:var(--pass-ink)}
:root[data-color-mode="dark"] :is(input,textarea)::placeholder{color:#91a7a3;opacity:1}
:root[data-color-mode="dark"] .pass-url-input>span{background:var(--dark-raised);border-color:var(--pass-line);color:var(--pass-muted)}
:root[data-color-mode="dark"] :is(.pass-card-title p,.pass-account-card>p:not(.pass-eyebrow),.pass-auth-intro p,.pass-dialog-close,.pass-profile-link-label>small,.pass-schedule-text small){color:var(--pass-muted)}
:root[data-color-mode="dark"] .pass-form-actions{background:#0f1b21f5;border-color:var(--pass-line)}
:root[data-color-mode="dark"] .pass-form-actions [data-state="dirty"]{color:#f2ca8a}
:root[data-color-mode="dark"] .pass-form-actions [data-state="error"]{color:#ffb8a4}
:root[data-color-mode="dark"] :is(.pass-school-option:hover,.pass-inline-status,.pass-checkout-progress,.pass-upsell){background:#243c31;color:#cfe5d2;border-color:#45614e}
:root[data-color-mode="dark"] .pass-inline-status.error{background:#432b27;color:#ffb8a4;border-color:#825247}
:root[data-color-mode="dark"] :is(.pass-schedule-status,.pass-schedule-status.is-considering){background:#2a4146;color:#d4e4e2}
:root[data-color-mode="dark"] .pass-schedule-status.is-mine{background:#493528;color:#f3c5a0}
:root[data-color-mode="dark"] .pass-schedule-more summary{color:var(--pass-green)}
:root[data-color-mode="dark"] .pass-theme.is-locked{color:#a9bab6}
:root[data-color-mode="dark"] .pass-auth-dialog[data-intent="join"] .pass-auth-intro{background:radial-gradient(320px 220px at 92% 0,#2e624e,transparent 70%),#142c3c}
:root[data-color-mode="dark"] .pass-auth-dialog[data-intent="join"] .pass-auth-intro p{color:#d7ed80}
:root[data-color-mode="dark"] .pass-auth-dialog .pass-dialog-close{background:var(--dark-raised);color:var(--pass-ink)}
:root[data-color-mode="dark"] .pass-auth-dialog[data-intent="join"] .pass-dialog-close{background:#ffffff1f;color:#fff}
:root[data-color-mode="dark"] .pass-auth-steps b{color:#142c3c}
/* Keep the configured identity-provider form on its verified light surface. */
:root[data-color-mode="dark"] .pass-auth-dialog #pass-auth-mount{background:#fff;color:#142c3c;color-scheme:light;border-radius:18px;padding:10px 8px}
:root[data-color-mode="dark"] :is(.club-count input,.club-name input){background:var(--dark-field);border-color:var(--pass-line);color:var(--pass-ink)}
:root[data-color-mode="dark"] .club-plan span{background:var(--dark-field);border-color:var(--pass-line)}
:root[data-color-mode="dark"] .club-plan input:checked+span{background:#294332;border-color:#d7ed80}
:root[data-color-mode="dark"] .club-plan input:focus-visible+span{outline-color:#d7ed80}
:root[data-color-mode="dark"] .club-error{color:#ffb8a4}
:root[data-color-mode="dark"] :is(.pass-toast,.members-directory .toast){background:#24393e;border-color:#526b62;color:#edf3f1}
:root[data-color-mode="dark"] :is(.pass-page,.members-directory) :focus-visible{outline-color:#d7ed80}

/* Instagram creator chrome; the artwork itself keeps its own colors. */
:root[data-color-mode="dark"] :is(.td-dialog,.td-template,.td-feature select){background:var(--dark-surface);border-color:var(--pass-line);color:var(--pass-ink)}
:root[data-color-mode="dark"] :is(.td-header p,.td-event small){color:var(--pass-muted)}
:root[data-color-mode="dark"] .td-note{background:#243c31;color:#d5e6d9}
:root[data-color-mode="dark"] :is(.td-event,.td-export){border-color:var(--pass-line)}
:root[data-color-mode="dark"] .td-template[aria-pressed="true"]{border-color:#d7ed80;box-shadow:0 0 0 1px #d7ed80}
:root[data-color-mode="dark"] .td-page-arrow{color:var(--pass-ink)}
:root[data-color-mode="dark"] .td-page-arrow:disabled{color:#5d6e66}
:root[data-color-mode="dark"] .td-page-dot span{background:#4d5e56}
:root[data-color-mode="dark"] .td-page-dot[aria-current=true] span{background:#d7ed80}
:root[data-color-mode="dark"] .td-accent input:checked+span{outline-color:#edf3f1}
:root[data-color-mode="dark"] .td-dialog :focus-visible{outline-color:#d7ed80}

/* Directory cards, filters and native form fields. */
:root[data-color-mode="dark"] .members-directory{background:var(--paper);color:var(--ink)}
:root[data-color-mode="dark"] .members-directory :is(.event-card,.card-footer,.attend-row,.stats,.coverage-card,.change,.empty,.calendar-box,.calendar-menu,.sheet,.sheet-header,.sheet-footer,dialog,.mine-logo-field,.mine-logo-pick){background:var(--dark-surface);border-color:var(--line)}
:root[data-color-mode="dark"] .members-directory :is(.button,.attend-button,.quick button,.kind-filter button,.calendar-nav button){background:var(--dark-field);border-color:#526970;color:var(--ink)}
:root[data-color-mode="dark"] .members-directory :is(.button.save,.button.primary,.quick button.on,.kind-filter button.on){background:var(--lime);border-color:var(--lime);color:#142c3c}
:root[data-color-mode="dark"] .members-directory .button.save.is-saved{background:#294332;border-color:#526e48;color:#d7edc9}
:root[data-color-mode="dark"] .members-directory .attend-button{color:var(--green);border-color:var(--green)}
:root[data-color-mode="dark"] .members-directory .attend-button.active{background:#355f4c;color:#fff}
:root[data-color-mode="dark"] .members-directory :is(.kind-filter button span,.layout-toggle){background:#24373d;color:var(--muted)}
:root[data-color-mode="dark"] .members-directory .kind-filter button.on span{background:#b8d166;color:#142c3c}
:root[data-color-mode="dark"] .members-directory .layout-toggle button.active{background:#37504f;color:#edf3f1}
:root[data-color-mode="dark"] .members-directory :is(.search-field input,.filter-fields select,.filter-fields input:not([type="checkbox"]),.mine-fields input:not([type="checkbox"]),.mine-fields select,.mine-fields textarea){background:var(--dark-field);border-color:var(--line);color:var(--ink)}
:root[data-color-mode="dark"] .members-directory .results-top select{background-color:var(--dark-field);background-image:none;appearance:auto;-webkit-appearance:auto;color:var(--ink);border-color:var(--line)}
:root[data-color-mode="dark"] .members-directory :is(.date-badge,.tag,.saved-explainer,.active-filters button,.detail-attend){background:#263e32;color:#cfe5c5;border-color:#45614e}
:root[data-color-mode="dark"] .members-directory :is(.date-badge small,.date-badge .year){color:#c0d8b4}
:root[data-color-mode="dark"] .members-directory :is(.tag.neutral,.filter-fields .kind-option){background:var(--dark-raised);color:var(--muted);border-color:var(--line)}
:root[data-color-mode="dark"] .members-directory :is(.tag.warn,.detail-warning,.mine-card .date-badge){background:#493528;color:#f3c5a0}
:root[data-color-mode="dark"] .members-directory :is(.mine-card .date-badge small,.mine-card .host-kind){color:#f3c5a0}
:root[data-color-mode="dark"] .members-directory :is(.card-facts,.detail-summary p){color:#c3d1cf}
:root[data-color-mode="dark"] .members-directory .event-date-line{color:var(--muted)}
:root[data-color-mode="dark"] .members-directory .detail-summary{background:var(--dark-field);border-color:var(--line)}
:root[data-color-mode="dark"] .members-directory .close{background:var(--dark-raised);color:var(--ink)}
:root[data-color-mode="dark"] .members-directory .sheet-body>p{color:var(--muted)}
:root[data-color-mode="dark"] .members-directory :is(.card-footer,.card-facts,.roster,.coach-emails,.coach-school,.detail-summary>div,.sheet-header,.sheet-footer){border-color:var(--line)}
:root[data-color-mode="dark"] .members-directory :is(.coach-emails,.mine-limit,.mine-logo-lock){background:var(--dark-field);color:var(--muted)}
:root[data-color-mode="dark"] .members-directory .mine-error{background:#432b27;color:#ffb8a4}
:root[data-color-mode="dark"] .members-directory .teaser-banner{background:#142c3c}
:root[data-color-mode="dark"] .members-directory :is(.empty-icon,.unlock-icon){color:#142c3c}
:root[data-color-mode="dark"] .members-directory .unlock-logout{color:#ffb8a4}
:root[data-color-mode="dark"] .members-directory :is(.locked-logo,.locked-lines span){background:var(--dark-raised)}
:root[data-color-mode="dark"] .members-directory .calendar-menu button:hover{background:var(--dark-raised)}

/* Calendar and navigation keep selected states distinct. */
:root[data-color-mode="dark"] .members-directory .calendar-day{background:#17272d;border-color:var(--line);color:var(--ink)}
:root[data-color-mode="dark"] .members-directory .calendar-day.outside{background:#111e24;color:#91a7a3}
:root[data-color-mode="dark"] .members-directory .day-count{color:#c0d8b4}
:root[data-color-mode="dark"] .members-directory .calendar-day.has-events{background:#253e30;border-color:#4d6744}
:root[data-color-mode="dark"] .members-directory .calendar-day.selected{background:#375c49;border-color:#d7ed80;color:#fff}
:root[data-color-mode="dark"] .members-directory .calendar-day.today .day-num{background:#d7ed80;color:#142c3c}
:root[data-color-mode="dark"] .members-directory .sidebar{background:#0b171f;color:#edf3f1}
:root[data-color-mode="dark"] .members-directory .nav button.active{background:#d7ed80;color:#142c3c}
:root[data-color-mode="dark"] .members-directory .bottom-nav{background:#14252cf5;border-color:var(--line)}
:root[data-color-mode="dark"] .members-directory .bottom-nav :is(button,.member-nav-profile){color:var(--muted)}
:root[data-color-mode="dark"] .members-directory .bottom-nav button.active{background:#294332;color:#d7ed80}
:root[data-color-mode="dark"] .members-directory .bottom-nav button.active .icon{color:#142c3c}
:root[data-color-mode="dark"] .members-directory .hero #add-mine{color:#142c3c}
:root[data-color-mode="dark"] .members-directory .bottom-badge{background:#d7ed80;color:#142c3c;border-color:#14252c}
:root[data-color-mode="dark"] .members-directory :is(.mobile-brand,.topline){background:#142c3c}
@media(max-width:760px){:root[data-color-mode="dark"] .members-directory .hero{background:#142c3c}:root[data-color-mode="dark"] .members-directory .search-tools{background:#0f1b21f5}}

/* Home page retains its brand hero and the public-profile showcase's own theme. */
:root[data-color-mode="dark"] .welcome-page{background:var(--pass-paper)}
:root[data-color-mode="dark"] .welcome-header{background:#0f1b21ed;border-color:var(--pass-line)}
:root[data-color-mode="dark"] .welcome-hero{background:radial-gradient(900px 500px at 85% 10%,#2e624e 0,transparent 60%),#142c3c}
:root[data-color-mode="dark"] .welcome-access{background:#142c3c}
:root[data-color-mode="dark"] :is(.welcome-phone,.welcome-price,.welcome-cards article,.welcome-event,.welcome-logos,.welcome-clubs,.welcome-pack,.welcome-pack.is-best,.welcome-menu,.welcome-chips span){background:var(--dark-surface);border-color:var(--pass-line)}
:root[data-color-mode="dark"] :is(.welcome-heading h2+p,.welcome-cards p,.welcome-faq-list p,.welcome-marquee-track span){color:var(--pass-muted)}
:root[data-color-mode="dark"] :is(.welcome-button-primary,.welcome-pack-badge,.welcome-menu .welcome-menu-primary,.welcome-icon){color:#142c3c}
:root[data-color-mode="dark"] .welcome-button-ghost{border-color:var(--pass-muted);color:var(--pass-ink)}
:root[data-color-mode="dark"] .welcome-button-ghost:hover{background:var(--dark-raised);color:var(--pass-ink)}
:root[data-color-mode="dark"] :is(.welcome-avatar,.pass-avatar-button){color:#385a34}
:root[data-color-mode="dark"] :is(.pass-skip,.members-directory .skip){background:var(--dark-raised);color:var(--pass-ink)}
:root[data-color-mode="dark"] .members-directory .roster-schools>.school-identity{background:var(--dark-field);color:var(--ink)}
:root[data-color-mode="dark"] .members-directory :is(.suggest-card,.suggest-kind){background:var(--dark-raised);border-color:var(--line)}
:root[data-color-mode="dark"] .members-directory .feature-cta:hover{background:var(--dark-raised)}
:root[data-color-mode="dark"] .members-directory .suggest-file-clear{color:#f3c5a0}
:root[data-color-mode="dark"] .members-directory .mine-logo-preview:not(.has-logo){background:var(--dark-field);border-color:#61756d;color:var(--muted)}
:root[data-color-mode="dark"] .feature-offer{background:#142c3c}
:root[data-color-mode="dark"] :is(.welcome-event-status,.welcome-actions span:first-child){background:#294332;color:#d7edc9;border-color:#45614e}
:root[data-color-mode="dark"] :is(.welcome-price li,.welcome-pack-rules li)::before{background:#294332;color:#d7edc9}
:root[data-color-mode="dark"] :is(.welcome-event-status.is-attending,.welcome-actions span:last-child){background:#355f4c;color:#fff}
:root[data-color-mode="dark"] :is(.welcome-faq-list,.welcome-faq-list details,.welcome-footer){border-color:var(--pass-line)}
:root[data-color-mode="dark"] .welcome-faq-list summary:after{background-color:var(--dark-raised)}
:root[data-color-mode="dark"] .welcome-feature-link:hover{background:var(--dark-raised)}
:root[data-color-mode="dark"] .pass-tour-card{background:radial-gradient(circle at 100% 0,#e4f25b2e,transparent 46%),repeating-linear-gradient(0deg,#ffffff0c 0 1px,transparent 1px 18px),repeating-linear-gradient(90deg,#ffffff0c 0 1px,transparent 1px 18px),#16323f;border-color:#e4f25b55}
:root[data-color-mode="dark"] .td-ig-tag{border:1px solid #e4f25b66}
