/* Shared semantic palette. This layer also covers legacy nested surfaces. */
:root{--bg:#090e1a;--card:#17263b;--text:#edf4ff;--muted:#bbcae0;--line:#526780;--green:#53f4d1;--good:#65efbf;--bad:#ff93a5;--accent-bg:#16463f;color-scheme:dark}
:root[data-theme=light]{--bg:#f1f5f9;--card:#fff;--text:#172b42;--muted:#455b72;--line:#b0c2d4;--green:#006950;--good:#17633f;--bad:#a61d36;--accent-bg:#d7f5ea;color-scheme:light}
body{background:var(--bg);color:var(--text);font-size:17px;line-height:1.5}
header,.bottom-nav,.app-backbar{background:var(--bg);color:var(--text);border-color:var(--line)}
/* Preserve map tiles, QR images, video and the illustrated hero. */
main :is(button,input,select,textarea,summary),header button{color:var(--text);font-size:17px}
main :is(p,small,label,span,em),.brand small{font-size:max(14px,1em)}
main :is(.section-title,.mini-heading,.muted-note,.profile-now-empty span,.cabinet-stats span,.field label,.badge,.pill,.segmented button span){font-size:14px!important}
main small,main .muted-note{font-size:14px!important;line-height:1.5}
main :is(span,label,p,em,figcaption):not(.weather-hero *){font-size:16px!important;line-height:1.5}
main :is(h2,h3){color:var(--text)!important}
main .avatar{background:var(--accent-bg);color:var(--text)}
main .big-action b,main .profile-main-button b{font-size:18px}
main :is(b,strong):not(.weather-hero *){font-size:18px!important}
.bottom-nav button span{font-size:14px}.bottom-nav button{color:var(--text)}
main :is(button,input,select,textarea,summary){min-height:44px}
main :is(button,input,select,textarea,summary):not(.weather-hero):not(.leaflet-control-zoom-in):not(.leaflet-control-zoom-out),header button{background:var(--card)!important;border-color:var(--line)!important;color:var(--text)!important}
main :is(.panel,.card,.clean-card,.kpi,.mode-card,.category-card,.home-feature,.profile-summary,.profile-menu,.profile-now-empty,.form-block,.form-fold,.request-card,.request-summary,.request-meta,.detail-line,.offer-card,.appointment-card,.master-card,.wanted-match-card,.market-card,.market-filters,.market-card-cover,.market-detail-cover,.weather-day,.content-fold,.check,.field-check,.payment-box,.payment-details,.taxi-route-card,.loyalty-card,.loyalty-business-card,.loyalty-qr-card,.promo-card,.voucher-card,.promotion-voucher,.voucher-code,.master-profile,.profile-section,.mini-card,.address-card,.service-card,.booking-card,.schema-row,.admin-note,.now-feature,.incident-card,.brief-card,.community-card,.profile-promo,.segmented,.admin-route-box,.news-radar-card,.radar-score,.radar-reason,.weight,.category-fold,.empty-state-good,.now-calm,.local-news-card,.participant-summary,.participant-event,.safety-112,.home-weather-hint,.weather-nowcast,.weather-nowcast-item,.weather-nowcast-note,.flyer-total-bar,.promo-waiting,.promo-disabled-action,.home-search-box,.wanted-card,.market-question,.market-offer,.portfolio-unavailable,.empty),main :is(.cabinet-stats,.details-grid,.estate-specs,.participant-summary-grid,.participant-detail-grid,.weather-now)>div{background:var(--card)!important;color:var(--text)!important;border-color:var(--line)!important}
main :is(b,strong,small,span,em,label,p,figcaption):not(.weather-hero *){color:inherit}
main :is(b,strong,small,span,em,label,p,figcaption):not(.weather-hero *){color:var(--text)!important}
main :is(.muted-note,.section-title,.mini-heading,.source-health,.privacy-note){color:var(--muted)}
main :is(.primary,.active,.work-mode-entry){background:var(--accent-bg)!important;color:var(--text)!important}
main :is(.primary,.active,.work-mode-entry) :is(b,strong,small,span,em){color:var(--text)!important}
main :is(.danger,.compact-alert.danger,.notice.bad){border-left:4px solid var(--bad)!important}
main :is(.compact-alert,.notice,.warnbox){background:var(--card)!important;color:var(--text)!important;border:1px solid var(--line)}
main a,.text-action{color:var(--green)}
main input::placeholder,main textarea::placeholder{color:var(--muted)!important;opacity:1}
main .big-action>span,main .profile-main-button>span{background:var(--accent-bg);color:var(--text)}
main .profile-menu button>span{background:var(--accent-bg);color:var(--text)}
main .field-check span{background:transparent}
.home-link-strip{flex-wrap:wrap}.header-actions{flex-wrap:wrap}.big-action{grid-template-columns:44px minmax(0,1fr) 18px}
#themeToggle{width:44px;flex:0 0 44px;padding:6px}.brand small{color:var(--muted)}
.weather-hero{padding:18px 16px 14px;min-height:0;border-radius:22px;background:linear-gradient(180deg,#2f5db0 0%,#33406e 45%,#0c1018 65%);color:#f3f7ff;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px 12px}
.weather-location{grid-column:1/-1;font-size:14px;letter-spacing:.05em}
.weather-temperature{font-size:48px;margin:10px 0 0;letter-spacing:-2px;grid-column:1}
.weather-condition{grid-column:1;font-size:17px}.weather-details{grid-column:1/-1;font-size:14px;margin-top:8px;color:#edf4ff}
.dinskaya-clock{grid-column:2;grid-row:2 / 4;align-self:center;text-align:right;font-size:24px;font-weight:800;font-variant-numeric:tabular-nums;z-index:2}.dinskaya-clock small{display:block;font-size:14px}
.weather-orb{width:40px;height:40px;left:48%;right:auto;top:55px}.weather-orb i{display:none}
.home-road{grid-column:1/-1;position:relative;display:block;height:150px;margin-top:8px}.home-road svg{width:100%;height:100%;overflow:visible}
.road-line,.road-glow{fill:none;stroke:var(--road-color);stroke-width:5;stroke-linecap:round}.road-glow{stroke-width:12;filter:blur(5px);opacity:.7}
.road-car{offset-path:path('M280 42 C230 32 205 58 155 53 S70 70 20 60');offset-rotate:auto;animation:road-drive 8s linear infinite}
@keyframes road-drive{from{offset-distance:0%}to{offset-distance:100%}}
.road-pin,.road-status{position:absolute;font-size:14px!important;font-weight:700;border-radius:12px;padding:3px 7px;background:#0c1426;color:#f3f7ff;border:1px solid #627b99}
.road-destination{left:0;top:0}.road-origin{right:0;bottom:4px}.road-status{left:0;bottom:4px;color:var(--road-color)}
.road-meta{grid-column:1/-1;display:flex;justify-content:space-between;gap:10px;align-items:center;font-size:15px}.road-meta b{font-size:23px;color:#ffc24d}
@media(max-width:360px){.weather-hero{padding:14px 12px}.weather-temperature{font-size:44px}.weather-orb{left:46%;top:57px}.home-road{height:140px}.road-meta{flex-wrap:wrap}.bottom-nav button{min-width:0;flex:1}.bottom-nav button span{font-size:13px}}
@media(prefers-reduced-motion:reduce){.road-car{animation:none;offset-distance:45%}}
