/* Neutral materials carry the interface; color identifies light preference and primary actions. */
:root{--shade-accent:#896249;--sun-accent:#526773}
body[data-map-tone]{--white:#f6f5f2;--ui-surface:#f6f5f2;--ui-raised:#fdfdfb;--ui-recessed:#eae9e6;--ui-border:#d6d5d1;--ui-ink:#323231;--ui-muted:#626461;--ui-elevation:0 2px 5px #293c3510,0 14px 38px #293c3514}
body[data-map-tone="shade"]{--ui-accent:var(--shade-accent);--ui-accent-strong:#604735;--ui-soft:#ece6e0;--ui-line:#bdb0a5;--ui-rgb:137,98,73;--ui-shadow:#4b3b31;--ui-building:#f4f1ec;--ui-building-line:#bcb6b0}
body[data-map-tone="sun"]{--ui-accent:var(--sun-accent);--ui-accent-strong:#3c505c;--ui-soft:#e5e9ea;--ui-line:#acb7be;--ui-rgb:82,103,115;--ui-shadow:#b0bac0;--ui-building:#51595d;--ui-building-line:#434a4e}
body[data-map-tone] .surface{background:var(--ui-surface);border-color:var(--ui-border);box-shadow:var(--ui-elevation)}
body[data-map-tone] :is(.journey-switch,.journey-role-switch,.estimate-label,.map-hint,.map-tools .basemap-control){background:var(--ui-raised);border-color:var(--ui-border);box-shadow:0 2px 8px #293c3510}
body[data-map-tone] :is(.date-button,.map-tools .map-dimension-control){background:var(--ui-recessed);border-color:var(--ui-border)}
#map-scene{position:absolute;inset:0;z-index:0;isolation:isolate}
#map-tone-wash{position:absolute;inset:0;width:100%;height:100%;z-index:1;pointer-events:none;mask-image:linear-gradient(90deg,transparent 45%,#000 55%);mask-size:250% 100%;mask-position:100% 0%;mask-repeat:no-repeat}
#map-tone-wash[hidden]{display:none}
.app-header .wordmark,.place-label{transition:color .9s ease,text-shadow .9s ease}
body[data-map-tone] .app-header .wordmark{color:var(--ui-ink);text-shadow:0 1px 6px #ffffffb3}
body[data-map-tone] #workspace:not([data-map-style="imagery"]) .place-label{color:var(--ui-accent-strong);background:var(--ui-raised);border:1px solid var(--ui-line);border-radius:4px;padding:2px 5px;width:fit-content}
@media(prefers-reduced-motion:reduce){#map-scene,.app-header .wordmark,.place-label{transition:none}#map-tone-wash{display:none}}

/* Solid primary action, raised secondary selection, quiet navigation. */
body[data-map-tone] :is(.primary-button,.play-button,.journey-switch button.selected){background:var(--ui-accent);border-color:var(--ui-accent);color:#fff}
body[data-map-tone] .primary-button{background:linear-gradient(120deg,var(--ui-accent),var(--ui-accent-strong));box-shadow:0 3px 7px rgba(var(--ui-rgb),.16),inset 0 1px #ffffff24}
body[data-map-tone] :is(.quick-cities .selected,.journey-role-switch>button.selected,.map-tools .basemap-control button.selected,.map-tools .map-dimension-control button.selected,.va-filters button.selected,.va-plan-tabs .selected,.va-map-switch button.selected,.im-group-filter button.selected,.sz-filters button.selected){background:var(--ui-soft);border-color:var(--ui-line);color:var(--ui-accent-strong);box-shadow:inset 0 0 0 1px rgba(var(--ui-rgb),.13)}
body[data-map-tone] :is(.secondary-button,.city-option.selected){background:var(--ui-raised);color:var(--ui-accent-strong);border-color:var(--ui-line)}
body[data-map-tone] :is(.scenario-tabs .selected,.activity-tabs button.selected){background:var(--ui-raised);color:var(--ui-accent-strong);border-color:var(--ui-line);box-shadow:0 1px 4px #293c3515,inset 0 -2px var(--ui-accent)}
body[data-map-tone] :is(.export-button,.inline-button,.walk-text-button,.text-button,.time-readout strong,.map-tools>button,.activity-steps li::before){color:var(--ui-accent)}
body[data-map-tone] :is(.status-dot,.brandmark i,.walk-shade-bar>span,.va-shade-track i,.va-distribution-bar .high,.im-delta-track b,.im-track-key b,.journey-loading-track>span){background:var(--ui-accent)}
body[data-map-tone] :is(.va-score,.va-shade-ring>span,.va-badge.high,.va-swatch.high,.va-cell-symbol.high,.va-tip-heading .high,.im-impact-pair>div:first-child,.toast){background:var(--ui-accent);border-color:var(--ui-accent);color:#fff}
body[data-map-tone] :is(.walk-route-card.selected,.activity-need-buttons button.selected,.stay-strategy.selected,.va-strategy.selected){border-color:var(--ui-line);background:var(--ui-raised);box-shadow:inset 3px 0 var(--ui-accent),0 3px 12px #293c350a}
body[data-map-tone] .va-grid-row.selected{background:var(--ui-soft);box-shadow:inset 2px 0 var(--ui-accent)}
body[data-map-tone] :is(.va-selected-detail,.im-impact-pair){border-color:var(--ui-accent)}
body[data-map-tone] .im-main-tabs button.selected{color:var(--ui-accent);border-bottom-color:var(--ui-accent)}
body[data-map-tone] .activity-map-time{border-left-color:var(--ui-accent);color:var(--ui-accent-strong)}
body[data-map-tone] .switch:checked{background:var(--ui-accent)}
body[data-map-tone] :is(input[type="range"],input[type="checkbox"],progress){accent-color:var(--ui-accent)}
body[data-map-tone] #time::-webkit-slider-thumb{background:var(--ui-accent);box-shadow:0 1px 7px rgba(var(--ui-rgb),.35)}
body[data-map-tone] #time::-moz-range-thumb{background:var(--ui-accent);box-shadow:0 1px 7px rgba(var(--ui-rgb),.35)}
body[data-map-tone] :is(button,a,input,select,textarea,summary):focus-visible{outline-color:var(--ui-accent)}
body[data-map-tone] :is(.point-marker,.walk-person){background:var(--ui-accent);box-shadow:0 0 0 8px rgba(var(--ui-rgb),.15),0 3px 8px #0002}
body[data-map-tone] .walk-map-pin{color:var(--ui-accent);border-color:var(--ui-accent)}
body[data-map-tone] :is(.walk-map-pin.destination,.walk-dot.destination){background:var(--ui-accent);color:#fff}
body[data-map-tone] .walk-dot.destination{border-color:var(--ui-accent)}
body[data-map-tone] .sz-marker i{background:var(--ui-accent)}
body[data-map-tone] .sz-marker.selected i{background:#fff;border-color:var(--ui-accent)}
body[data-map-tone] .sz-marker.selected span{background:var(--ui-accent);color:#fff}
body[data-map-tone] .va-legend-ramp .high{background:linear-gradient(90deg,var(--ui-shadow),var(--ui-accent))}
body[data-map-tone] :is(.need-shade,.fact-shade,.stay-timeline .shade){background:#ad927e;border-color:var(--shade-accent)}
body[data-map-tone] :is(.need-sun,.fact-sun,.stay-timeline .sun){background:#8b9ba4;border-color:var(--sun-accent)}
body[data-map-tone] .need-mixed{background:linear-gradient(90deg,#ad927e 50%,#8b9ba4 50%);border-color:var(--ui-line)}
body[data-map-tone] .va-ambient-dot{background:rgba(var(--ui-rgb),.15);border-color:var(--ui-line)}
body[data-map-tone] :is(.nav-item,.primary-button,.play-button,.quick-cities button,.journey-switch button,.journey-role-switch button,.va-score,.time-readout strong){transition:background-color .45s ease,color .45s ease,border-color .45s ease}
@media(prefers-reduced-motion:reduce){body[data-map-tone] :is(.nav-item,.primary-button,.play-button,.quick-cities button,.journey-switch button,.journey-role-switch button,.va-score,.time-readout strong){transition:none}}
#workspace[data-map-style="map"] .map-legend{padding:6px 8px;border-radius:8px;background:var(--ui-surface);color:#4b5861}

/* The ground recedes; the selected time and actual shadow remain legible. */
#shadow-map-legend{bottom:158px;gap:7px;padding:11px 13px;border:1px solid var(--ui-border);border-radius:12px;background:var(--ui-surface);color:#4b5861;text-shadow:none;box-shadow:0 3px 16px #26374408;pointer-events:none;max-width:290px}
#workspace[data-map-style="map"] #shadow-map-legend{padding:11px 13px;border-radius:12px;background:var(--ui-surface)}
#shadow-map-legend b{font-size:11px;font-weight:600;letter-spacing:.02em}
.shadow-legend-items{display:flex;gap:13px;align-items:center}
.shadow-legend-items span{display:flex;gap:5px;align-items:center;white-space:nowrap;font-size:10px}
#shadow-map-legend .legend-shade{position:relative;background:var(--legend-ground,#f0f1ee);border:1px solid #8c939980;width:13px;height:11px;transform:skewX(-18deg);border-radius:1px}
#shadow-map-legend .legend-shade::after{content:'';position:absolute;inset:0;background:var(--legend-shadow,#1d232b);opacity:var(--legend-opacity,.62)}
#shadow-map-legend .legend-building{background:var(--legend-building,#f8f6ee);border:1px solid #c8cec6;width:11px;height:11px}
#shadow-map-legend .legend-open{background:var(--legend-ground,#f0f1ee);border:1px solid #8c939980;width:11px;height:11px}
#shadow-legend-note{font-size:10px;color:#748077;line-height:1.45}
#shadow-map-legend[data-need="shade"] .shadow-legend-items span:first-child{color:var(--ui-accent);font-weight:600}
#shadow-map-legend[data-need="sun"] .shadow-legend-items span:nth-child(2){color:var(--ui-accent);font-weight:600}
#shadow-map-legend[data-available="false"] .shadow-legend-items{display:none}
body[data-map-tone] .shadow-swatch{background:var(--ui-shadow);border:1px solid var(--ui-accent)}
body[data-map-tone] .building-swatch{background:var(--ui-building);border:1px solid var(--ui-building-line)}
/* Paper panels, inset controls and white result cards read as distinct surfaces. */
body[data-map-tone] .walk-heading{background:linear-gradient(105deg,var(--ui-raised),var(--ui-surface));border-bottom-color:var(--ui-border);color:var(--ui-ink)}
body[data-map-tone] :is(.walk-panel,.app-panel,.timeline){color:var(--ui-ink)}
body[data-map-tone] :is(.activity-tabs,.scenario-tabs){background:var(--ui-recessed);box-shadow:inset 0 1px 3px #293c3508}
body[data-map-tone] :is(.walk-locations,.walk-options select,.walk-date-field input,.walk-route-card,.stay-strategy,.va-strategy){background:var(--ui-raised);border-color:var(--ui-border)}
body[data-map-tone] .walk-locations{box-shadow:0 2px 6px #293c3507}
body[data-map-tone] :is(.activity-steps,.activity-demo){border-color:var(--ui-border)}
body[data-map-tone] .activity-steps{color:var(--ui-muted)}
body[data-map-tone] .activity-steps li::before{color:var(--ui-accent-strong);font-weight:600}
body[data-map-tone] .walk-options select{box-shadow:0 1px 2px #293c3508}
body[data-map-tone] .app-nav{background:var(--ui-raised);border-color:var(--ui-border);box-shadow:0 0 24px #293c3512}
body[data-map-tone] :is(.nav-item,.nav-about){color:var(--ui-muted)}
body[data-map-tone] :is(.nav-brand,.nav-about:hover){color:var(--ui-ink)}
body[data-map-tone] .nav-item.active{position:relative;background:var(--ui-soft);color:var(--ui-accent-strong);box-shadow:inset 3px 0 var(--ui-accent)}
body[data-map-tone] :is(.nav-item:not(.active):hover,.nav-about:hover){background:var(--ui-recessed);color:var(--ui-ink)}
body[data-map-tone] .app-nav button:focus-visible{outline-color:var(--ui-accent)}
@media(max-width:760px){
 body[data-map-tone] .app-nav{background:var(--ui-raised);border-color:var(--ui-border)}
 body[data-map-tone] .nav-item.active{box-shadow:inset 0 2px var(--ui-accent)}
 body:not(.view-panel):not(.view-walk) #shadow-map-legend{display:flex;left:12px;bottom:158px;max-width:calc(100% - 90px);padding:8px 10px;border-radius:9px;gap:5px}
 #shadow-map-legend b{font-size:10px}
 .shadow-legend-items{gap:10px}
}
@media(max-height:550px) and (max-width:760px){body:not(.view-panel):not(.view-walk) #shadow-map-legend{display:none}}
