:root { color-scheme: light; }
.nav { align-items: center; }
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; gap: 8px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 30px; background: transparent; color: var(--olive-800); font: inherit; font-weight: 650; white-space: nowrap; cursor: pointer; }
.theme-toggle:hover { background: var(--olive-100); }
.theme-toggle:focus-visible { outline: 2px solid var(--sand); outline-offset: 4px; }
.theme-toggle svg { flex-shrink: 0; }
.theme-sun { display: none; }
[data-theme="dark"] .theme-moon { display: none; }
[data-theme="dark"] .theme-sun { display: block; }
:root[data-theme="dark"] {
  color-scheme: dark;
  --olive-950: #cad6a6;
  --olive-800: #bdcb98;
  --olive-700: #adbf82;
  --olive-100: #343e2c;
  --sand: #d2b777;
  --ink: #f1f1e9;
  --muted: #b2b8aa;
  --paper: #181c18;
  --line: rgba(199,211,175,.19);
  --shadow: 0 22px 60px rgba(0,0,0,.28);
}
[data-theme="dark"] body { background: radial-gradient(circle at 84% 5%, rgba(206,176,113,.07), transparent 28rem), var(--paper); }
[data-theme="dark"] .site-header { background: rgba(24,28,24,.94); border-color: var(--line); }
[data-theme="dark"] :is(.product-card,.catalog-card,.cover-card,.quick-card,.hero-stats div,.hero-copy .eyebrow,.contact-link,.line-tab,.button-secondary,.search-field input,.select-field select,.product-dialog,.image-lightbox,.dialog-close,.lightbox-close,.gallery-arrow,.gallery-thumbnail) { background: #242a23; border-color: var(--line); color: var(--ink); }
[data-theme="dark"] :is(.product-media,.cover-stage,.catalog-card-media,.dialog-media) { background: radial-gradient(circle at 65% 62%, rgba(206,176,113,.08), transparent 55%), #292f27; }
[data-theme="dark"] .button-primary, [data-theme="dark"] .line-tab.is-active { background: #aebe83; color: #1b2115; border-color: #aebe83; }
[data-theme="dark"] .button-primary:hover { background: #c2d19b; }
[data-theme="dark"] .line-tab.is-active strong { color: #262b1c; }
[data-theme="dark"] .gallery-thumbnail[aria-pressed="true"] { background: #3c4930; border-color: var(--olive-700); }
[data-theme="dark"] .gallery-video-placeholder { background: transparent; color: var(--muted); }
[data-theme="dark"] .quick-card:hover { background: #30382b; }
[data-theme="dark"] .gallery-card { background: #292f27; }
[data-theme="dark"] input::placeholder { color: #9da594; }
@media (max-width: 940px) { .theme-toggle span { display: none; } .theme-toggle { padding: 10px; } }
@media (max-width: 660px) { .header .nav { display: flex; } .header .nav a { display: none; } }

[data-theme="dark"] .gallery-thumbnail:is([aria-label*="Габариты"],[aria-label*="Чертёж"],[aria-label*="Чертеж"]),
[data-theme="dark"] :is(#dialog-image,#lightbox-image):is([alt*="габарит" i],[alt*="черт" i],[src*="blueprint"]) { background: #f9f9f4; border-radius: 8px; }

[data-theme="dark"] :is(.hero-copy,.section) .eyebrow { background: #30392a; border-color: #526147; color: #edf2df; }
