/* First-time guide (public/coach.js): a soft dimmed overlay on top of a swipe deck. Tokens from portal.css only. */
.coach-host { position: relative; min-height: 440px; }
.coach-overlay {
  position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; padding: 12px;
  background: rgba(33, 31, 32, 0.55); border-radius: 24px;
  animation: coach-fade .35s var(--ease) both;
}
.coach-box {
  width: 100%; max-width: 420px; max-height: 100%; overflow: auto; box-sizing: border-box; text-align: center;
  background: var(--paper); color: var(--charcoal); border-radius: 22px; padding: 24px 20px 20px;
  box-shadow: 0 18px 50px rgba(33, 31, 32, 0.28);
}
.coach-title { font-family: var(--f-display); font-weight: 400; font-size: 1.7rem; line-height: 1.15; margin: 0 0 8px; }
.coach-text { font-size: 1.3rem; line-height: 1.4; color: var(--ink-2); margin: 8px 0 18px; }
.coach-actions { display: grid; gap: 10px; }
.coach-actions .btn-solid, .coach-actions .btn-outline { width: 100%; }

.coach-demo { position: relative; display: grid; grid-template-columns: 1fr 120px 1fr; align-items: center; gap: 6px; height: 120px; margin: 6px 0; }
.coach-side { font-size: 1rem; font-weight: 600; color: var(--script); opacity: .85; }
.coach-side-left { text-align: right; }
.coach-side-right { text-align: left; }
.coach-mini {
  position: relative; height: 96px; border-radius: 14px; background: var(--cream); border: 2px solid var(--taupe);
  padding: 16px 12px; display: grid; align-content: start; gap: 10px; animation: coach-card 6s var(--ease) infinite;
}
.coach-line { display: block; height: 10px; border-radius: 6px; background: var(--linen); }
.coach-line.short { width: 60%; }
.coach-hand { position: absolute; right: -10px; bottom: -34px; display: block; animation: coach-point 6s var(--ease) infinite; }
.coach-hand svg { display: block; }
@keyframes coach-card {
  0%, 8% { transform: none; }
  30%, 38% { transform: translateX(46px) rotate(7deg); box-shadow: 0 0 0 3px rgba(31, 122, 74, 0.4); }
  52%, 58% { transform: none; box-shadow: none; }
  80%, 88% { transform: translateX(-46px) rotate(-7deg); box-shadow: 0 0 0 3px rgba(106, 85, 70, 0.5); }
  100% { transform: none; box-shadow: none; }
}
@keyframes coach-point {
  0%, 8% { transform: none; }
  30%, 38% { transform: translateX(46px) rotate(7deg); }
  52%, 58% { transform: none; }
  80%, 88% { transform: translateX(-46px) rotate(-7deg); }
  100% { transform: none; }
}
@keyframes coach-fade { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 400px) {
  .coach-demo { grid-template-columns: 1fr 104px 1fr; }
  .coach-title { font-size: 1.5rem; }
  .coach-text { font-size: 1.2rem; }
}
/* Static picture: the card sits still with both directions shown and the hand resting under it. */
@media (prefers-reduced-motion: reduce) {
  .coach-overlay, .coach-mini, .coach-hand { animation: none; }
}

/* keep the whole guide clear of the fixed header and bottom tab bar when it scrolls into view */
.coach-overlay, [class*="coach-"][role="dialog"] { scroll-margin: 90px 0 120px; }
