.home-header { flex-wrap: wrap; gap: 16px; }
.site-preferences { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-left: auto; }
.snowflake-button { display: inline-grid; place-items: center; flex: none; width: 48px; height: 48px; padding: 10px; border: 1px solid #87b9ee55; border-radius: 50%; background: #8badff0c; color: #a7d9ff; cursor: pointer; touch-action: manipulation; }
.snowflake-button svg { width: 26px; height: 26px; }
.snowflake-button:hover { background: #8badff26; border-color: #87b9ee; }
.snowflake-button:focus-visible, .holiday-photo-close:focus-visible { outline: 3px solid #9fbfff; outline-offset: 4px; }
html[data-theme="light"] .snowflake-button { color: #315cb8; border-color: #8ca9d8; }
.holiday-photo { position: fixed; inset: 0; width: fit-content; max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); margin: auto; padding: 0; border: 1px solid #ffffff40; border-radius: 16px; background: #090e18; box-shadow: 0 24px 90px #0008; overflow: hidden; }
.holiday-photo::backdrop { background: #030712d9; }
.holiday-photo[open] { animation: holiday-window-in .8s ease-out both; }
.holiday-photo[open]::backdrop { animation: holiday-backdrop-in .8s ease-out both; }
.holiday-photo img { display: block; width: auto; height: auto; max-width: calc(100vw - 34px); max-height: calc(100dvh - 34px); object-fit: contain; opacity: 0; }
.holiday-photo[open].holiday-photo-ready img { animation: holiday-image-in 2.6s ease-out both; }
.holiday-snow { position: absolute; inset: 0; overflow: hidden; pointer-events: none; border-radius: inherit; }
.holiday-snowflake { position: absolute; top: -32px; left: var(--snow-left); color: #fff; font: var(--snow-size)/1 system-ui, sans-serif; text-shadow: 0 0 8px #c6e8ffb3; opacity: 0; }
.holiday-photo[open] .holiday-snowflake { animation: holiday-snowfall var(--snow-duration) linear var(--snow-delay) infinite; }
.holiday-photo-close { position: absolute; z-index: 2; top: 10px; right: 10px; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid #ffffff80; border-radius: 50%; background: #090e18dc; color: #fff; font: 30px/1 system-ui, sans-serif; cursor: pointer; }
@keyframes holiday-window-in { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes holiday-backdrop-in { from { background: #03071200; } to { background: #030712d9; } }
@keyframes holiday-image-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes holiday-snowfall { 0% { top: -32px; transform: translateX(0) rotate(0); opacity: 0; } 12% { opacity: .85; } 85% { opacity: .75; } 100% { top: calc(100% + 32px); transform: translateX(var(--snow-drift)) rotate(160deg); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
    .holiday-photo[open], .holiday-photo[open]::backdrop, .holiday-photo[open].holiday-photo-ready img { animation: none !important; }
    .holiday-photo.holiday-photo-ready img { opacity: 1; }
    .holiday-snow { display: none; }
}
.holiday-photo-close:hover { background: #223451; }
html.holiday-photo-open { overflow: hidden; }
.preference-control { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 48px; padding: 8px 6px; border-radius: 10px; color: #a8b8d0; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.preference-control:hover { background: #8badff0c; }
.preference-icon { width: 22px; height: 22px; flex: none; }
.preference-sun { color: #fff; }
.preference-globe { color: #a7c2ff; }
.preference-input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.preference-switch { position: relative; display: block; flex: none; width: 48px; height: 28px; border: 1px solid #4b6286; border-radius: 20px; background: #34445d; transition: background .18s, border-color .18s; }
.switch-thumb { position: absolute; width: 20px; height: 20px; top: 3px; left: 3px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px #0003; transition: transform .18s; }
.preference-input:checked + .preference-switch { background: #3968d7; border-color: #7e9fee; }
.preference-input:checked + .preference-switch .switch-thumb { transform: translateX(20px); }
.preference-input:focus-visible + .preference-switch { outline: 3px solid #9fbfff; outline-offset: 4px; }
.language-switch { width: 62px; }
.language-switch .switch-thumb { width: 26px; border-radius: 12px; }
.preference-input:checked + .language-switch .switch-thumb { transform: translateX(28px); }
.switch-ru,.switch-en { position: absolute; top: 0; display: grid; place-items: center; width: 30px; height: 26px; font: 600 9px/1 system-ui,sans-serif; letter-spacing: .2px; }
.switch-ru { left: 0; color: #172b4a; }
.switch-en { right: 0; color: #dce8ff; }
.preference-input:checked + .language-switch .switch-ru { color: #e7efff; }
.preference-input:checked + .language-switch .switch-en { color: #172b4a; }
html[data-theme="light"] .preference-sun { color: #000; }
html[data-theme="light"] .preference-globe { color: #365fb5; }
html[data-theme="light"] .preference-switch { background: #d2deee; border-color: #9eb4d6; }
html[data-theme="light"] .preference-input:checked + .preference-switch { background: #3968d7; border-color: #3968d7; }
html[data-theme="light"] .preference-input:not(:checked) + .language-switch .switch-en { color: #405578; }
@media (prefers-reduced-motion: reduce) { .preference-switch,.switch-thumb { transition: none; } }
html[data-theme="light"] { color-scheme: light; background: #f4f7fc; color: #17263e; }
html[data-theme="light"] body { background-color: #f4f7fc; color: #17263e; }
html[data-theme="light"] .home-page { --home-muted: #52627b; --home-blue: #315cb8; background-color: #f4f7fc; background-image: radial-gradient(ellipse at 78% 43%, #c4d8ff55, transparent 55%); }
html[data-theme="light"] .home-page::before { background-image: linear-gradient(#2e508c08 1px, transparent 1px), linear-gradient(90deg, #2e508c08 1px, transparent 1px); }
html[data-theme="light"] :is(.home-brand,.home-copy h1,.analysis-heading h1,.demo-result strong,.analysis-form-heading h2,.preview-heading h2,.result-heading h3) { color: #172c4d; }
html[data-theme="light"] :is(.brand-accent,.brand-mark,.home-copy h1 > span,.analysis-heading h1 > span,.home-eyebrow) { color: #365fb5; }
html[data-theme="light"] :is(.home-description,.analysis-back,.detection-legend,.analysis-limits,.supported-animals,.dropzone-description,.video-note,.video-filename,.result-description,.home-bottom,.home-bottom-note,.demo-example,.demo-result-label,.result-number,.preference-control,.analysis-page #preview-summary,.analysis-page .image-previews figcaption,.detection-modes legend) { color: #52627b; }
html[data-theme="light"] :is(.demo-card,.analysis-form,.analysis-result) { border-color: #c8d5e9; background: linear-gradient(145deg, #ffffff, #f0f5fc); box-shadow: 0 16px 50px #23457110; }
html[data-theme="light"] :is(.demo-toolbar,.result-heading,.home-bottom,.analysis-preview) { border-color: #ccd7e8; }
html[data-theme="light"] :is(.demo-switcher,.analysis-page .clear-photos,.analysis-page .preview-toggle,.detection-mode-options span,.analysis-modes a,.video-statistics div) { color: #405578; background: #f6f9ff; border-color: #bdcde4; }
html[data-theme="light"] :is(.demo-switcher button,.analysis-step,.results-count,.animal-summary li,.video-statistics span) { color: #405578; }
html[data-theme="light"] :is(.demo-switcher button[aria-selected="true"],.detection-mode-options input:checked + span,.analysis-modes a[aria-current]) { color: #204b9c; background: #dce9ff; border-color: #668dcf; }
html[data-theme="light"] .upload-dropzone { background: radial-gradient(ellipse at 50% 0, #d6e5ff88, transparent 80%), #f5f9ff; border-color: #7c9ccf; color: #223e68; }
html[data-theme="light"] .upload-dropzone:hover { background-color: #e9f2ff; border-color: #426fba; }
html[data-theme="light"] .upload-symbol { color: #365fb5; background: #e5edfc; border-color: #bbcff0; }
html[data-theme="light"] .legend-face { color: #21815a; }
html[data-theme="light"] .legend-animal { color: #286acb; }
html[data-theme="light"] .home-cta--secondary { background: #e7efff; border-color: #8ca9d8; color: #294d8d; }
html[data-theme="light"] .home-cta--secondary:hover { background: #d9e7ff; }
html[data-theme="light"] :is(.analysis-page .clear-photos:hover,.analysis-page .preview-toggle:hover,.demo-switcher button:hover) { color: #204b9c; border-color: #668dcf; }
html[data-theme="light"] .demo-check { color: #16724d; border-color: #b0d2be; background: #e6f7ed; }
html[data-theme="light"] .result-status { color: #176444; border-color: #b0d2be; background: #e6f7ed; }
html[data-theme="light"] .analysis-result--info .result-status { color: #31599c; border-color: #b6c9ed; background: #eaf1ff; }
html[data-theme="light"] .analysis-result--error .result-status { color: #942b42; border-color: #e5b3be; background: #fff0f3; }
html[data-theme="light"] .analysis-result--error { border-color: #e5b3be; }
html[data-theme="light"] .result-indicator { background: #21815a; }
html[data-theme="light"] .analysis-result--info .result-indicator { background: #426db7; }
html[data-theme="light"] .analysis-result--error .result-indicator { background: #ac3a54; }
html[data-theme="light"] :is(.animal-summary li > span,.video-statistics strong) { color: #264d91; }
html[data-theme="light"] .animal-summary li { border-color: #b4cbed; background: #edf4ff; }
html[data-theme="light"] .video-error { border-color: #df9dab; color: #8e263e; background: #fff0f3; }
html[data-theme="light"] .video-success { border-color: #a5d2ba; color: #1a6345; background: #eaf8f0; }
html[data-theme="light"] .video-delete { color: #942b42; background: #fff2f5; border-color: #d9a2af; }
html[data-theme="light"] .video-delete:hover { color: #7a1930; background: #ffe4eb; border-color: #bb697e; }
html[data-theme="light"] :is(.analysis-step,.results-count) { border-color: #bdcde4; background: #eaf0fa; }
.video-statistics > div:only-child { grid-column: 1 / -1; }
@media (max-width: 1050px) { .header-note { display: none; } }
@media (max-width: 640px) {
    .site-preferences { width: 100%; justify-content: flex-end; gap: 14px; }
    .home-header { gap: 12px; }
    .preference-control { gap: 8px; }
}
