.heatmap-main { max-width: 1920px; margin: 0 auto; padding: 22px 24px 32px; min-width: 0; }
.heatmap-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.heatmap-heading h1 { margin: 3px 0; font-size: 22px; font-weight: 600; letter-spacing: -.025em; }
.heatmap-heading p, .heatmap-heading>span { margin: 0; font-size: 11px; color: var(--muted); }
.heatmap-panel { border: 1px solid var(--line); background: var(--panel); border-radius: 3px; min-width: 0; overflow: hidden; }
.heatmap-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.heatmap-options { display: flex; flex-wrap: wrap; gap: 12px; }
.heatmap-options label { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.heatmap-options select { display: block; min-width: 70px; height: 30px; margin: 0; padding: 0 23px 0 8px; line-height: normal; border: 1px solid var(--line); border-radius: 3px; color: var(--ink); background: var(--input); }
.heatmap-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.heatmap-summary>div { padding: 12px 16px; min-width: 0; }
.heatmap-summary>div+div { border-left: 1px solid var(--line); }
.heatmap-summary span { display: block; color: var(--muted); font-size: 10px; }
.heatmap-summary strong { display: inline-block; margin-top: 5px; font: 500 21px/1.4 var(--numeric); letter-spacing: -.025em; overflow-wrap: anywhere; }
.heatmap-summary small { color: var(--muted); margin-left: 5px; font-size: 10px; white-space: nowrap; }
.heatmap-caption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; padding: 12px 16px 0; color: var(--muted); font-size: 10px; }
.heatmap-canvas-wrap { position: relative; height: clamp(360px, 52vh, 680px); margin: 0 8px; min-width: 0; }
.heatmap-canvas-wrap canvas { display: block; width: 100%; height: 100%; }
.heatmap-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 12px; text-align: center; padding: 24px; pointer-events: none; }
.heatmap-tooltip { position: absolute; z-index: 2; pointer-events: none; max-width: min(330px, calc(100% - 12px)); padding: 9px 11px; border: 1px solid var(--control-line); border-radius: 3px; background: var(--tip); color: var(--ink); font: 11px/1.7 var(--numeric); white-space: pre-line; box-shadow: 0 4px 16px #0002; }
.heatmap-focus { position: absolute; pointer-events: none; border: 1px solid var(--ink); }
.heatmap-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding: 8px 16px 14px; color: var(--muted); font-size: 10px; }
.heatmap-color-key { display: flex; align-items: center; gap: 8px; font-family: var(--numeric); }
.heatmap-gradient { width: 150px; height: 7px; background: linear-gradient(to right, rgb(36,85,214) 0%, rgb(16,174,220) 35%, rgb(250,199,64) 70%, rgb(235,58,55) 100%); border: 1px solid var(--line); border-radius: 1px; }
.coverage-key { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.coverage-key i { width: 18px; height: 11px; border: 1px solid var(--line); background: repeating-linear-gradient(135deg, transparent, transparent 3px, var(--line) 3px, var(--line) 4px); }
.heatmap-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; padding: 10px 16px; color: var(--muted); font-size: 10px; border-top: 1px solid var(--line); }
.heatmap-help { margin: 12px 0 0; color: var(--muted); font-size: 11px; line-height: 1.8; }
.heatmap-notice { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; padding: 10px 12px; background: var(--panel); border: 1px solid var(--control-line); color: var(--ink); font-size: 11px; }
.heatmap-notice button { flex-shrink: 0; padding: 4px 10px; border: 1px solid var(--control-line); border-radius: 2px; color: var(--blue); }
.heatmap-panel[aria-busy="true"] .heatmap-canvas-wrap canvas { opacity: .6; }
@media (max-width: 1000px) { .heatmap-main { padding: 16px 12px 24px; } }
@media (max-width: 800px) { .top { height: auto; min-height: 48px; flex-wrap: wrap; padding-block: 8px; gap: 10px 14px; } .mode-nav { min-height: 28px; } }
@media (max-width: 640px) {
  .heatmap-heading { align-items: flex-start; flex-direction: column; gap: 6px; }
  .heatmap-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .heatmap-summary>div { padding: 10px 12px; }
  .heatmap-summary>div:nth-child(3) { border-left: 0; }
  .heatmap-summary>div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .heatmap-summary strong { font-size: 18px; }
  .heatmap-toolbar { padding: 10px 12px; }
  .heatmap-options { gap: 10px; }
  .heatmap-options label { gap: 4px; font-size: 10px; }
  .heatmap-options select { min-width: 60px; padding-left: 6px; }
  .heatmap-canvas-wrap { height: 380px; margin: 0; }
  .heatmap-caption>span:last-child { display: none; }
  .coverage-key { margin-left: 0; }
}
