/* Coach tips: dimmed screen with cut-outs, arrows, and a red squircle card. */
.coach-layer {
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: none;
}

.coach-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.coach-shade {
  fill: rgba(4, 2, 12, 0.8);
}

.coach-rings path {
  fill: none;
  stroke: #fff;
  stroke-width: 3;
  stroke-dasharray: 10 8;
  animation: coach-ring-march 1.2s linear infinite, coach-ring-glow 1.6s ease-in-out infinite;
  filter: drop-shadow(0 0 6px rgba(255, 90, 70, 0.9));
}

@keyframes coach-ring-march {
  to { stroke-dashoffset: -36; }
}

@keyframes coach-ring-glow {
  50% { stroke: #ffc21a; }
}

.coach-arrows {
  filter: drop-shadow(4px 10px 7px rgba(0, 0, 0, 0.7));
}

.coach-shaft {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.coach-head {
  stroke-linejoin: round;
}

.coach-arrow-outline .coach-shaft { stroke: #fff; }
.coach-arrow-outline .coach-head { fill: #fff; stroke: #fff; }

.coach-arrow-dark .coach-shaft { stroke: #9c0a10; }
.coach-arrow-dark .coach-head { fill: #9c0a10; stroke: #9c0a10; }

.coach-arrow-body .coach-shaft { stroke: #e8221d; }
.coach-arrow-body .coach-head { fill: #e8221d; stroke: #e8221d; }

.coach-arrow-shine .coach-shaft {
  stroke: #ff5a4c;
  opacity: 0.9;
}

.coach-arrow-shine .coach-head {
  fill: #ff5a4c;
  opacity: 0.9;
}

.coach-card {
  position: absolute;
  width: min(340px, calc(100vw - 24px));
  padding: 18px 18px 14px 22px;
  border: 4px solid #fff;
  border-radius: 30px;
  background: linear-gradient(160deg, #ef3b2d 0%, #c8161f 60%, #a10f18 100%);
  box-shadow: 0 10px 0 #6e0810, 0 18px 34px rgba(0, 0, 0, 0.55);
  color: #fff;
  pointer-events: auto;
}

.coach-card-in {
  animation: coach-pop 0.32s cubic-bezier(0.2, 1.4, 0.4, 1);
}

@keyframes coach-pop {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.coach-granny {
  position: absolute;
  top: -50px;
  left: -38px;
  width: 104px;
  height: 104px;
  border: 5px solid #fff;
  border-radius: 50%;
  background: #3a1650 url('../assets/ui/granny-coach.jpg?v=1') center / cover no-repeat;
  box-shadow: 0 5px 0 #6e0810, 0 8px 16px rgba(0, 0, 0, 0.5);
  animation: coach-granny-bob 2.4s ease-in-out infinite;
}

@keyframes coach-granny-bob {
  50% { transform: translateY(-3px) rotate(-3deg); }
}

.coach-step {
  position: absolute;
  top: -22px;
  right: -18px;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 4px solid #fff;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff3a8 0%, #ffc21a 45%, #f39200 100%);
  color: #8a0c12;
  font-family: var(--font-display);
  font-size: 2.3rem;
  line-height: 1;
  box-shadow: 0 4px 0 #a85a00, 0 6px 12px rgba(0, 0, 0, 0.4);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
}

.coach-title {
  margin: 0 24px 8px 60px;
  font-family: var(--font-display);
  font-size: 1.38rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1.05;
  text-shadow: 2px 2px 0 #6e0810;
}

.coach-text {
  margin: 0 0 14px;
  font-family: var(--font-math);
  font-size: 1.08rem;
  line-height: 1.35;
}

.coach-punch {
  margin: -8px 0 14px;
  color: #ffc21a;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  text-shadow: 2px 2px 0 #6e0810;
}

.coach-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.coach-off {
  padding: 4px 0;
  border: none;
  background: none;
  color: rgba(255, 255, 255, 0.82);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.coach-off:hover {
  color: #fff;
}

.coach-next {
  padding: 8px 18px;
  border: 3px solid #fff;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffd84a 0%, #ffb000 55%, #ff9500 100%);
  box-shadow: 0 4px 0 #a85a00;
  color: #7a0c12;
  font-family: var(--font-display);
  font-size: 1.3rem;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: transform 0.12s ease;
}

.coach-next:hover {
  transform: translateY(-1px) scale(1.04);
}

.coach-next:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #a85a00;
}

.coach-next:focus-visible,
.coach-off:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.coach-next:focus:not(:focus-visible) {
  outline: none;
}

@media (prefers-reduced-motion: reduce) {
  .coach-rings path,
  .coach-granny,
  .coach-card-in {
    animation: none;
  }
}
