/* Appearance only. Model geometry and illumination switch in the renderers, never through a canvas filter.
   The City theme (css/city-theme.css, 17 Oct 2026) is the page's look by day and by night: this switch now sets the
   time of day of the 3D views (the map, the homes, the Heart) and of the static plan. */
:root { --ui-glass: rgba(46,43,41,.9); --ui-field: transparent; --ui-shadow: rgba(0,0,0,.32); }
.theme-toggle { flex: none; gap: 7px; }
.theme-toggle svg { flex: none; }
.theme-sun { display: none; }
[data-theme="dark"] .theme-sun { display: block; }
[data-theme="dark"] .theme-moon { display: none; }
.theme-toggle:focus-visible { outline: 2px solid var(--clay-ink); outline-offset: 3px; }
@media (max-width: 899px) {
  .theme-toggle { width: 44px; padding: 0; }
  .theme-label { display: none; }
}
/* Keep every target at least 44 px; short headers move the enquiry action into the existing menu. */
@media (max-width: 480px) {
  .top { gap: 8px; padding-inline: max(14px, env(safe-area-inset-left)) max(14px, env(safe-area-inset-right)); }
  .top-actions { gap: 4px; margin-inline-end: 0; }
  body .top #map-btn { width: 44px; min-width: 44px; padding: 0; gap: 0; font-size: 0; }
  body .top #map-btn::before { width: 18px; height: 18px; }
  .top #interest-btn { padding-inline: 11px; font-size: 12px; }
  body[data-scene="landing"] .top .logo { display: none; }
  body[data-scene="landing"] .top { justify-content: flex-end; }
}
@media (max-width: 380px) {
  .top #interest-btn { display: none; }
}
body:not([data-ready]) #theme-toggle { visibility: hidden; }
body[data-failed] #theme-toggle { display: none; }
/* Day/night is offered only in The city. Hidden controls also leave keyboard navigation. */
body:not([data-scene="masterplan"]) #theme-toggle { display: none; }
/* the views at night: the map's ground before it draws, and Plan C's drawing a little darker */
[data-theme="dark"] .map { background: #101a28; }
[data-theme="dark"] .plan { background: #18222b; }
[data-theme="dark"] .plan-img { filter: brightness(.72) saturate(.8); }
[data-theme="dark"] .plan[data-lit] .plan-img { filter: brightness(.65) grayscale(.85); }
@media (prefers-reduced-motion: reduce) {
  .theme-toggle, .theme-toggle svg { transition: none; }
}
