/*
 * Tips that teach the controls as they become useful (match/coach.js), and
 * the keys shown on HUD buttons. One fixed spot, centred just above the
 * bottom row, so nothing else moves when a tip comes or goes.
 */
.coach {
  /* Across the whole width: the middle column can be narrow. */
  grid-area: 2 / 1 / 3 / 4;
  align-self: end;
  justify-self: center;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  /* Its own width up to a readable line, never squeezed by the grid cell. */
  width: max-content;
  max-width: min(36rem, 100%);
  margin: 0;
  padding: var(--space-2) var(--space-2) var(--space-2) var(--space-3);
  border-color: var(--accent);
  font-size: var(--text-sm);
}

.coach[hidden] {
  display: none;
}

.coach__label {
  flex: none;
  color: var(--accent);
}

.coach__words {
  flex: 1;
}

.coach__close {
  flex: none;
  min-width: 2rem;
  min-height: 2rem;
  border: 0;
  border-radius: var(--radius-inner);
  background: none;
  color: var(--text-dim);
  font: inherit;
  cursor: pointer;
}

.coach__close:hover {
  color: var(--text);
  background: var(--accent-soft);
}

.hud__key {
  margin-left: var(--space-2);
  padding: 0 0.35em;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-inner);
  font: 600 var(--text-xs) / 1.5 var(--font-mono);
  color: var(--text-dim);
}

/* A touch screen has no keys to learn. */
:root[data-touch='true'] .hud__key,
:root[data-touch='true'] .coach {
  display: none;
}
