.hm-grid {
  width: 100%;
  margin-top: 14px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  box-shadow: var(--shadow-card);
  /* Allow horizontal scroll only when content truly overflows; otherwise
     the SVG scales to fit. */
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.hm-grid svg {
  display: block;
  width: 100%;
  height: auto;
  /* No hard min-width — let the SVG scale down on small phones; if labels
     get tight, the JS already shows sparse column labels. */
}

.hm-row-label {
  fill: var(--fg-faint);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.hm-col-label {
  fill: var(--fg-faint);
  font-family: var(--mono);
  font-size: 9px;
}

.hm-hints {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--fg-dim);
}
.hm-hints .item {
  background: var(--bg-soft);
  border: 1px solid var(--border-soft, var(--border));
  border-radius: 6px;
  padding: 4px 8px;
  animation: fade-up 0.3s ease both;
}
.hm-hints .item .key {
  color: var(--accent);
  margin-right: 4px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 11px;
}
