/* Coach card for the training battle and one-time interface hints. */
.coach-layer {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  pointer-events: none;
  font-family: var(--ui-font-body, system-ui, sans-serif);
}

.coach-layer[hidden] { display: none; }

/* Informational hints block the screen behind them; training prompts let the
   highlighted skill button receive the tap. */
.coach-shade {
  position: absolute;
  inset: 0;
  pointer-events: auto;
}

.coach-pass-through .coach-shade { pointer-events: none; }

.coach-no-target .coach-shade { background: rgba(2, 5, 8, 0.62); }

.coach-ring {
  position: fixed;
  border: 2px solid var(--ui-cyan, #a1e3e9);
  border-radius: 10px;
  box-shadow: 0 0 0 9999px rgba(2, 5, 8, 0.62), 0 0 18px rgba(161, 227, 233, 0.55);
  pointer-events: none;
  transition: left var(--ui-motion, 160ms ease), top var(--ui-motion, 160ms ease),
    width var(--ui-motion, 160ms ease), height var(--ui-motion, 160ms ease);
  animation: coach-pulse 1.6s ease-in-out infinite;
}

.coach-ring[hidden] { display: none; }

@keyframes coach-pulse {
  50% { box-shadow: 0 0 0 9999px rgba(2, 5, 8, 0.62), 0 0 28px rgba(161, 227, 233, 0.9); }
}

.coach-card {
  position: fixed;
  box-sizing: border-box;
  padding: var(--ui-space-4, 16px);
  border: 1px solid var(--ui-line, #3b535e);
  border-top: 2px solid var(--ui-gold, #dfbc7b);
  border-radius: var(--ui-radius, 3px);
  background: linear-gradient(180deg, var(--ui-surface-raised, #102029), var(--ui-surface, #091116));
  box-shadow: var(--ui-panel-shadow, 0 8px 24px #0004), 0 0 0 1px #0008;
  color: var(--ui-ink, #eee7da);
  pointer-events: auto;
}

.coach-step {
  margin: 0 0 var(--ui-space-1, 4px);
  color: var(--ui-cyan, #a1e3e9);
  font-size: var(--ui-meta, 11px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.coach-step[hidden] { display: none; }

.coach-title {
  margin: 0 0 var(--ui-space-2, 8px);
  font-family: var(--ui-font-display, Georgia, serif);
  font-size: var(--ui-subheading, 20px);
  font-weight: 400;
  line-height: 1.2;
}

.coach-text {
  margin: 0;
  color: var(--ui-muted, #b2bfc4);
  font-size: var(--ui-body, 14px);
  line-height: 1.45;
}

.coach-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ui-space-2, 8px);
  justify-content: flex-end;
  margin-top: var(--ui-space-3, 12px);
}

.coach-actions:empty { display: none; }

.coach-button {
  min-height: var(--ui-control-height, 44px);
  padding: 0 var(--ui-space-4, 16px);
  border: 1px solid var(--ui-line, #3b535e);
  border-radius: var(--ui-radius, 3px);
  background: transparent;
  color: var(--ui-ink, #eee7da);
  font: inherit;
  font-size: var(--ui-body, 14px);
  cursor: pointer;
}

.coach-primary {
  border-color: var(--ui-gold, #dfbc7b);
  background: linear-gradient(180deg, #3a2f1c, #1d170e);
  color: #f6e7c4;
}

.coach-button:focus-visible,
.coach-off:focus-visible {
  outline: 2px solid var(--ui-focus, #d5faff);
  outline-offset: 2px;
}

.coach-off {
  display: block;
  margin: var(--ui-space-2, 8px) 0 0 auto;
  padding: var(--ui-space-1, 4px) 0;
  border: 0;
  background: none;
  color: var(--ui-quiet, #91a5af);
  font: inherit;
  font-size: var(--ui-small, 12px);
  text-decoration: underline;
  cursor: pointer;
}

.coach-off[hidden] { display: none; }

/* Training opponent: the Echo of the Watch has its own half-transparent art. */
.enemy-sprite.training-echo {
  filter: drop-shadow(0 0 12px rgba(161, 227, 233, 0.45));
  opacity: 0.95;
}

/* Skills not taught yet stay visible but dim during the training battle. */
.game.training-active .skill.training-locked { opacity: 0.35; }

@media (prefers-reduced-motion: reduce) {
  .coach-ring { animation: none; transition: none; }
}
body:has(.game[data-motion="reduced"]) .coach-ring { animation: none; transition: none; }
