:root{--ay-scene-art:url("https://ptdtplxvmqipppxqbcml.supabase.co/storage/v1/object/public/adoptaya-web-static/v294/64906a29fac188d339dbf17c16f24329239667a85bbba16fdffd2a5d779f9cb4.png")}html[data-theme=dark]{color-scheme:dark;--ay-scene-art:url("https://ptdtplxvmqipppxqbcml.supabase.co/storage/v1/object/public/adoptaya-web-static/v294/3bc457c70ea7ee5e01bfc6a98d9e6ea13b475acfd326b86a8c125b3a26f4aee7.webp")}
html[data-theme=dark] body,html[data-theme=dark] #ay-elegant-public,html[data-theme=dark] #ay-elegant-public .app,html[data-theme=dark] .nearby-app,html[data-theme=dark] #ay-elegant-home{background:#001923!important;color:#f4ecdd!important}
html[data-theme=dark] #ay-elegant-public :is(.topbar,.hero,.profile-hero,.content,.viewer,.gallery-card,.animal-powers,.animal-tabs,.animal-panels,.ay44-body,.profile-details),html[data-theme=dark] .happy-nav,html[data-theme=dark] .nearby-header,html[data-theme=dark] .happy-hero,html[data-theme=dark] .stories,html[data-theme=dark] .adopted-card,html[data-theme=dark] .story-card{background-color:#062630!important;color:#f4ecdd!important;border-color:#2c4750!important}
html[data-theme=dark] :is(.hero-copy,.profile-identity,.nearby-intro,.happy-hero-copy) :is(h1,h2,p),html[data-theme=dark] #ay-elegant-public :is(.animal-name,.town,.description,.section-intro,.count),html[data-theme=dark] .happy-gallery-title{color:#f5ecdc!important}
html[data-theme=dark] .happy-hero:after{background:linear-gradient(90deg,#062630,#062630f5 25%,#062630bb 40%,#06263000 67%)!important}
html[data-theme=dark] .nearby-hero:before{background:linear-gradient(90deg,#062630,#062630e6 30%,#06263000 70%)!important}
html[data-theme=dark] #ay-elegant-public :is(input,select,.filter-chip,.reset),html[data-theme=dark] .nearby-header form,html[data-theme=dark] .nearby-header form button,html[data-theme=dark] .nearby-header input{background:#0b303b!important;color:#f6eddf!important;border-color:#47636b!important}
html[data-theme=dark] .ay-scene-backdrop{filter:brightness(.55) saturate(.8)}
html[data-theme=dark] #ay-elegant-home .aeh-native-content{background:#062630!important;color:#f7ecda!important}html[data-theme=dark] #ay-elegant-home .aeh-animal-card{background:#092b35!important;color:#fff0db!important}
html[data-theme=dark] .nearby-header aside,html[data-theme=dark] .nearby-app aside{background:#062630f5!important;color:#f5ecdf!important}

/* Shared midnight palette; explicit targets include the actual home card classes. */
html[data-theme=dark]{--bg:#001923;--card:#062630;--ink:#f5eee1;--muted:#bdccce;--mute:#bdccce;--line:#2c4750}
html[data-theme=dark] #ay-elegant-home .aeh-card,html[data-theme=dark] #ay-elegant-home .aeh-info{background:#062630!important;color:#f5eee1!important}
html[data-theme=dark] #ay-elegant-home .aeh-info strong{color:#fff4e4!important}html[data-theme=dark] #ay-elegant-home .aeh-meta{color:#bfced0!important}
html[data-theme=dark] #ay-elegant-home .aeh-card .aeh-photo{background:#062630!important}
html[data-theme=dark] #ay-elegant-home .aeh-pager{background:#001923!important}html[data-theme=dark] #ay-elegant-home .aeh-pager button{background:#38515b}html[data-theme=dark] #ay-elegant-home .aeh-pager button[aria-current=true]{background:#ff762b}
html[data-theme=dark] #ay-elegant-public .topbar .brand,html[data-theme=dark] .happy-nav .happy-brand,html[data-theme=dark] .nearby-wordmark,html[data-theme=dark] .ayt-brand{color:#fff3e2!important}
html[data-theme=dark] #ay-elegant-public .topbar .brand em,html[data-theme=dark] .happy-nav .happy-brand em,html[data-theme=dark] .nearby-wordmark em{color:#ff7a2e!important}
html[data-theme=dark] #ay-elegant-public :is(.shelter-card,.identity,.profile-identity,.profile-body,.profile-content,.tab-panel,.animal-info,.shelter-line,.profile-toolbar){background-color:#062630!important;color:#f5eee1!important;border-color:#2c4750!important}
html[data-theme=dark] #ay-elegant-public :is(h2,h3,.shelter-title,.shelter-top,.profile-name,.card-footer,.footer-note,.intro,.story-copy,.power-coin+span){color:#f5eee1!important}
html[data-theme=dark] #ay-elegant-public :is(label,.eyebrow,.town,.description,.count,.animal-meta,.footer-note){color:#bccbcd!important}
html[data-theme=dark] #ay-elegant-public .ay-detail-card,html[data-theme=dark] body[data-happy-endings] .story-form{background:#092b35!important;border-color:#2c4750!important}
html[data-theme=dark] body[data-happy-endings] #ya-tienen-hogar{background:#001923!important;color:#f5eee1!important}
html[data-theme=dark] .nearby-app :is(.locate,dialog){background:#092b35!important;color:#f5eee1!important;border-color:#2c4750!important}
/* The gallery container and gaps must match the dark homepage, including rounded card corners. */
html[data-theme=dark] #ay-elegant-home .aeh-animal-overlay,html[data-theme=dark] #ay-elegant-home .aeh-grid{background:#001923!important}

/* v277: explicit surfaces, including rules previously winning with !important. */
html[data-theme=light]{color-scheme:light}
html[data-theme=dark] #ay-elegant-public[data-view="animal-detail"] .ay44-hero .topbar{background:#062630!important;border-color:#2c4750!important;color:#f4ecdd!important}
html[data-theme=dark] #ay-elegant-public[data-view="animal-detail"] :is(.animal-share,.animal-share-status,.ay-follow-bell:not(.is-following)){background:#103440!important;color:#ffd080!important;border-color:#48616a!important}
html[data-theme=dark] #ay-elegant-public :is(.topbar a,.topbar button,.animal-tabs button:not([aria-selected=true]),.profile-tabs button:not([aria-selected=true]),.status-tabs button:not([aria-pressed=true])){color:#dfebec!important}
html[data-theme=dark] #ay-elegant-public .ay44-body .animal-tabs button[aria-selected=true]{color:#fff!important}
html[data-theme=dark] #ay-elegant-public :is(.ay-carousel-controls button,.pagination button,.outline-button,.back,.animal-controls select){background:#103440!important;border-color:#48616a!important;color:#ffcf9a!important}
html[data-theme=dark] #ay-elegant-public :is(.ay-carousel-controls output,.reading-copy,.animal-panel p,.detail-value,.photo-missing){color:#c6d6d8!important}
html[data-theme=dark] #ay-elegant-public :is(.animal-panels,.animal-panel,.profile-main,.facts,.fact,.contact-list a,.profile-tabs,.animal-controls,.searchbar){background:#062630!important;color:#f4ecdd!important;border-color:#2c4750!important}
html[data-theme=dark] #ay-elegant-public .ay-photo-carousel{background:#062630!important}
/* The shelter's current layout uses fp-* names rather than the legacy profile names. */
html[data-theme=dark] .ayfp{background:#001923!important;color:#f4ecdd!important}
html[data-theme=dark] .ayfp :is(.fp-nav,.fp-identity,.fp-counter,.fp-animal,.fp-dialog,.fp-contact-item,.fp-empty,.fp-pager button,.fp-close){background:#062630!important;color:#f4ecdd!important;border-color:#2c4750!important}
html[data-theme=dark] .ayfp :is(.fp-nav-location,.fp-contact-line,.fp-location,.fp-pager,.fp-tab,.fp-placeholder){color:#bdccce!important}
html[data-theme=dark] .ayfp .fp-tab[aria-selected=true]{color:#ffb67c!important}
html[data-theme=dark] .ayfp .fp-cover{background:#092b35!important}
html[data-theme=dark] .nearby-app :is(.nearby-hero,.nearby-header nav button:not([aria-pressed=true]),.leaflet-popup-content-wrapper,.leaflet-popup-tip){background:#062630!important;color:#f4ecdd!important;border-color:#2c4750!important}
html[data-theme=dark] .nearby-app .nearby-header .top .round:before{background:#103440!important}
html[data-theme=dark] .nearby-app :is(.leaflet-control-zoom a,.distance){background:#103440!important;color:#ffe2b3!important;border-color:#48616a!important}
html[data-theme=dark] .nearby-header nav .emergency-tab[aria-pressed=true]{background:#61332b!important;color:#fff0dd!important}
html[data-theme=dark] :is(.story-card,.happy-hero,.adopted-card,.story-form,.stories){background:#062630!important;color:#f4ecdd!important;border-color:#2c4750!important}
html[data-theme=dark] :is(.story-success,.story-rating-display){background:#143d37!important;color:#e6f5ec!important;border-color:#3b685d!important}
html[data-theme=dark] .detail-card{background:#062630!important;color:#f4ecdd!important;border-color:#2c4750!important}
html[data-theme=dark] .detail-card :is(h1,h2,h3,.detail-description,.detail-contact-name){color:#f4ecdd!important}
html[data-theme=dark] :is(.detail-contact-panel,.detail-facts span){background:#103440!important;color:#dce9e7!important;border-color:#48616a!important}
html[data-theme=dark] .detail-main~.detail-footer,html[data-theme=dark] .detail-card>.muted{color:#bdccce!important}
html[data-theme=dark] :is(.publish-modal-content,.auth-modal-content){background:#062630!important;color:#f4ecdd!important;border-color:#2c4750!important}
/* Standalone guides and information pages now inherit the saved theme. */
html[data-theme=dark]:has(body[data-ay-night-page]){--paper:#001923;--forest:#f4ecdd;--green:#abcbbf;--muted:#bdccce;--line:#2c4750;background:#001923!important;color:#f4ecdd!important}
html[data-theme=dark] body[data-ay-night-page] :is(header,.hero,.side,.chapter,.metric,.card,.note,.hero-seal,.secondary,.button.alt,.btn.alt,.spread,.shelter,.final){background:#062630!important;color:#f4ecdd!important;border-color:#2c4750!important}
html[data-theme=dark] body[data-ay-night-page] :is(.tip,.preview,.nav a.active,.nav a:hover){background:#103440!important;color:#dce9e7!important;border-color:#48616a!important}
html[data-theme=dark] body[data-ay-night-page] :is(h1,h2,h3,p,.nav a){color:inherit}
html[data-theme=dark] body[data-ay-night-page=manual] .hero-visual:before{background:linear-gradient(90deg,#062630,transparent 35%)!important}
html[data-theme=dark] body[data-ay-night-page=about] .cover:after{background:linear-gradient(180deg,#001923fa,#001923e8 42%,#0019230d 78%)!important}
@media(max-width:800px){html[data-theme=dark] body[data-ay-night-page=manual] .hero-visual:before{background:linear-gradient(180deg,#062630,transparent 35%)!important}}

html[data-theme=dark] .ayfp{color-scheme:dark}html[data-theme=dark] .happy-nav :is(.happy-back,.happy-share),html[data-theme=dark] #happy-share-status{background:#103440!important;color:#ffcf9a!important}html[data-theme=dark] #ay-elegant-public .topbar .brand em{color:#ff7a2e!important}

/* Remaining home menu, standalone resources and public form surfaces. */
html[data-theme=dark] #ay-elegant-home #aeh-menu-panel{background:#062630!important;color:#f4ecdd!important;border-color:#48616a!important}
html[data-theme=dark] #ay-elegant-home #aeh-menu-panel :is(a,button,summary){color:#f4ecdd!important}
html[data-theme=dark] :is(#dedicated-return,#orientacion .compatibility-box,#academia .academy-box,#orientacion #quizContainer,.resource-panels article,.learning-card,.resource-steps){background:#062630!important;color:#f4ecdd!important;border-color:#2c4750!important}
html[data-theme=dark] :is(.resource-kicker,.resource-library-note){color:#bdccce!important}
html[data-theme=dark] #ay-elegant-public :is(.animal-card,.status-tabs){background:#103440!important;color:#f4ecdd!important;border-color:#48616a!important}
html[data-theme=dark] #ay-elegant-public .status-tabs button[aria-pressed=true]{background:#2b534b!important;color:#f0fff5!important}
html[data-theme=dark] :is(.publish-modal-content,.auth-modal-content,.academy-modal-content,.pdf-modal-content) :is(input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea){background:#103440!important;color:#f4ecdd!important;border-color:#48616a!important}
html[data-theme=dark] :is(.academy-modal-content,.pdf-modal-content){background:#062630!important;color:#f4ecdd!important;border-color:#2c4750!important}
html[data-theme=dark] #publishAnimalModal :is(h3,h4,.photo-drop,.extra-photo-pick){background-color:#103440!important;color:#f4ecdd!important;border-color:#48616a!important}
html[data-theme=dark] body[data-ay-night-page=about] .cover{background-color:#001923!important}
html[data-theme=dark] #ay-tracking .trk-text-btn{color:#ffbc83!important}
