.heatmap-page { padding-top: 24px; }
.heatmap-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.heatmap-title { font-family: var(--display-font-cyrillic-safe); font-weight: var(--display-font-weight); font-size: clamp(36px, 6.5vw, 84px); line-height: .95; letter-spacing: 0; margin: 0 0 14px; }
.heatmap-intro { max-width: 65ch; margin: 0; font-weight: 650; }
.heatmap-attribution { margin: 7px 0 0; font-size: 13px; font-weight: 700; }
.heatmap-heading .button { flex-shrink: 0; }
.heatmap-map-frame { position: relative; border: 4px solid #000; border-radius: 16px; overflow: hidden; box-shadow: 8px 8px 0 #000; }
#activity-heatmap { height: min(68vh, 720px); min-height: 380px; background: #fff; }
.activity-heatmap-canvas { pointer-events: none; position: absolute; z-index: 400; }
.heatmap-legend { position: absolute; bottom: 24px; left: 16px; z-index: 450; display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: #fff; color: #000; border: 2px solid #000; border-radius: 16px; font-size: 12px; font-weight: 800; }
.heatmap-legend-scale { width: 90px; height: 12px; background: linear-gradient(to right, rgba(255,74,0,.15), #ff4a00); }
.heatmap-status { min-height: 1.5em; margin: 20px 0 12px; font-weight: 700; }
.heatmap-notes { display: grid; gap: 10px; max-width: 80ch; font-weight: 600; }
.heatmap-notes p { margin: 0; }
#heatmap-preference { padding-top: 12px; }
#heatmap-preference label { display: flex; align-items: center; gap: 10px; cursor: pointer; }
#heatmap-enabled { accent-color: #ff4a00; width: 20px; height: 20px; }
#heatmap-preference-status { display: block; margin-top: 8px; }
.nav a[href='/heatmap'] { background: #ff4a00; color: #fff; }
@media (prefers-color-scheme: dark) {
  #activity-heatmap .leaflet-tile-pane { filter: grayscale(1) invert(1) brightness(.8); }
}
@media (max-width: 640px) {
  .heatmap-heading { flex-direction: column; align-items: start; gap: 16px; }
  .heatmap-title { font-size: clamp(34px, 10vw, 64px); }
  #activity-heatmap { height: 60svh; min-height: 340px; }
  .heatmap-map-frame { box-shadow: 4px 4px 0 #000; }
  .heatmap-legend { left: 8px; bottom: 24px; padding: 8px; gap: 6px; font-size: 11px; }
  .heatmap-legend-scale { width: 55px; }
}
