/* Shared dark palette. Light remains the established blue/ivory theme. */
html[data-color-scheme=dark]{color-scheme:dark;--ui-page:#141920;--ui-surface:#202733;--ui-surface-soft:#293343;--ui-text:#e6e9ed;--ui-muted:#b1becf;--ui-link:#abc6f1;--ui-border:#62728a;--ui-button:#315a9a;--ui-male-bg:#253856;--ui-male-text:#c1d5f6;--ui-female-bg:#442d3c;--ui-female-text:#f0c0d4}
html[data-color-scheme=dark] body,html[data-color-scheme=dark] body.workspace,html[data-color-scheme=dark] .workspace main>header,html[data-color-scheme=dark] .editor-heading{background:var(--ui-page);color:var(--ui-text)}
html[data-color-scheme=dark] :is(.card,.profile-panel,.profile-read-grid .card,.home-people,.home-overview,.home-empty,.home-birthdays,.memory-card,.memory-tile,.memory-story,.account-media-tile,.table-wrap,.account-dropdown,.country-options,.profile-selector-results,.tag-picker-results,.family-suggest-results,.family-detail-panel,.ui-dialog,.memory-dialog,.family-dialog,.photo-compose-dialog,.photo-compose-info,.photo-extra-fields,.photo-composer,.photo-extra,.photo-owner-menu>div){background:var(--ui-surface)!important;color:var(--ui-text);border-color:var(--ui-border)!important}
html[data-color-scheme=dark] :is(p,.muted,.memory-meta,.memory-author,.management-role-note,.management-heading p,.account-text small,.account-access-note,.person-details dt,.field-help,.profile-back,.birthday-group-label,.birthday-row p,.photo-upload-help){color:var(--ui-muted)!important}
html[data-color-scheme=dark] :is(main h1,main h2,main h3,main h4,main dt,main strong,.account-text,.memory-caption h3 a,.account-media-caption h2 a,.deceased-cross,.photo-compose-title){color:var(--ui-text)!important}
html[data-color-scheme=dark] :is(main a,.brand,legend,.photo-compose-info .photo-identify-title){color:var(--ui-link)}
html[data-color-scheme=dark] :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=hidden]),select,textarea){background:var(--ui-page)!important;color:var(--ui-text)!important;border-color:var(--ui-border)!important}
html[data-color-scheme=dark] :is(input,textarea)::placeholder{color:var(--ui-muted)!important;opacity:.8}
html[data-color-scheme=dark] :is(input[type=checkbox],input[type=radio],input[type=range]){accent-color:var(--ui-link)}
html[data-color-scheme=dark] :is(button,.button-primary,.photo-choose){background:var(--ui-button);color:#fff}
html[data-color-scheme=dark] :is(.button-outline,.secondary,.account-menu-toggle,.memory-close,.memory-expand,.media-selection,.photo-owner-menu button,.photo-owner-menu a,.photo-identify-self,.family-add-button,.country-options button,.profile-selector-results button,.tag-picker-results button){background:var(--ui-surface-soft)!important;color:var(--ui-link)!important;border-color:var(--ui-border)!important}
html[data-color-scheme=dark] .account-menu-toggle[aria-expanded=true]{background:var(--ui-button)!important;color:#fff!important}
html[data-color-scheme=dark] :is(.account-dropdown a,.account-dropdown button){background:transparent;color:var(--ui-text)}
html[data-color-scheme=dark] :is(.account-dropdown a:hover,.account-dropdown button:hover,.account-dropdown a:focus-visible,.account-dropdown button:focus-visible){background:var(--ui-surface-soft)}
html[data-color-scheme=dark] :is(.section-tabs,.site-footer,.account-role,.profile-save,fieldset,.memory-actions,.memory-meta-band){border-color:var(--ui-border)!important}
html[data-color-scheme=dark] .section-tabs a{color:var(--ui-muted)}
html[data-color-scheme=dark] .section-tabs a[aria-current=page]{background:var(--ui-surface-soft);color:var(--ui-link);border-bottom-color:var(--ui-link)!important}
html[data-color-scheme=dark] :is(.account-role,.life-event,.memory-stage,.memory-image-link,.photo-compose-stage,.memory-photo,.account-media-image,.portrait-frame,.portrait-dropzone,.family-banner-copy,.home-prompt,.home-family-overview,.home-person-initial,.account-initials,.profile-recovery,.recovery-pending){background:var(--ui-surface-soft)!important;color:var(--ui-text);border-color:var(--ui-border)!important}
html[data-color-scheme=dark] :is(.members-table th,.members-table td){border-color:var(--ui-border)!important;color:var(--ui-text)}
html[data-color-scheme=dark] .members-table th{background:var(--ui-surface-soft)}
html[data-color-scheme=dark] .members-table tbody tr:nth-child(even){background:var(--ui-page)}
html[data-color-scheme=dark] .members-table tbody tr:hover{background:var(--ui-surface-soft)}
html[data-color-scheme=dark] :is(.person-chip,.family-person){background:var(--ui-male-bg)!important;color:var(--ui-male-text)!important;border-color:#50668a!important}
html[data-color-scheme=dark] :is(.person-chip--female,.family-person:has([data-family-sex=female])){background:var(--ui-female-bg)!important;color:var(--ui-female-text)!important;border-color:#78556a!important}
html[data-color-scheme=dark] :is(.person-chip--unknown,.family-person:has([data-family-sex=unknown])){background:var(--ui-surface-soft)!important;color:var(--ui-text)!important;border-color:var(--ui-border)!important}
html[data-color-scheme=dark] :is(.person-chip-initial,.family-avatar,.family-person-avatar){background:#ffffff12!important;color:inherit!important}
html[data-color-scheme=dark] .person-chip a,html[data-color-scheme=dark] .family-person a{color:inherit!important}
html[data-color-scheme=dark] .family-person :is(p,small,.family-person-meta){color:inherit!important;opacity:.9}
html[data-color-scheme=dark] .photo-like{background:transparent!important;color:var(--ui-muted)!important}
html[data-color-scheme=dark] .photo-like.is-liked{color:#f09fbe!important}
html[data-color-scheme=dark] .status-toast{background:#243a54;color:#c3dcfa;border-color:#536a86}
html[data-color-scheme=dark] :is(.errors,.photo-error,[data-photo-errors],[data-like-error]){color:#f4adad!important}
html[data-color-scheme=dark] .badge.active,html[data-color-scheme=dark] .badge.verified{background:#253d35;color:#bbebd0}
html[data-color-scheme=dark] .badge.pending{background:#443b25;color:#f4dea4}
html[data-color-scheme=dark] .badge.suspended,html[data-color-scheme=dark] .badge.unverified{background:#492a32;color:#f3b6c4}
html[data-color-scheme=dark] .sidebar{background:#172b4a}
html[data-color-scheme=dark] .sidebar a{color:#d9e3f5}
html[data-color-scheme=dark] .sidebar button{background:transparent;color:#fff}
html[data-color-scheme=dark] .home-carousel :is(button,p,h3,a,small){color:#fff!important}
html[data-color-scheme=dark] :is(.home-carousel-dots button,.home-carousel-controls button){background:transparent}
html[data-color-scheme=dark] .home-carousel-dots [data-carousel-dot]{background:#ffffff75}
html[data-color-scheme=dark] .home-carousel-dots [aria-current=true]{background:#fff}
html[data-reduced-motion=reduce] *,html[data-reduced-motion=reduce] *::before,html[data-reduced-motion=reduce] *::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}
html[data-reduced-motion=reduce] .memory-tile:hover{transform:none}
html[data-color-scheme=dark] .link-logo{fill:var(--ui-text)}
html[data-color-scheme=dark] :is(a,button,input,select,textarea,summary):focus-visible{outline:2px solid var(--ui-link)!important;outline-offset:3px}
html[data-color-scheme=dark] :is(.home-overview span,.home-overview .nav-icon,.home-overview>div,.home-overview .overview-label){color:var(--ui-muted)!important;border-color:var(--ui-border)}
html[data-color-scheme=dark] .button-primary{color:#fff!important}
html[data-color-scheme=dark] .family-banner-visual{background:var(--ui-surface-soft)}
