/* The newcomer's map coach (public/worldmap-coach.js). */
.wm-coach { position: absolute; inset: 0; pointer-events: none; z-index: 7; }
.wm-coach-bubble {
  position: absolute;
  left: 0;
  top: 0;
  width: min(440px, calc(100% - 16px));
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 10px 12px;
  border-radius: 14px;
  border: 2px solid #c98a12;
  background: linear-gradient(180deg, rgba(48, 44, 40, 0.97), rgba(22, 20, 18, 0.98));
  color: #f6e9cc;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
  pointer-events: auto;
  font-size: 0.9rem;
  line-height: 1.3;
  transition: transform 0.12s ease-out;
}
.wm-coach-bubble[hidden] { display: none; }
/* The arrow points at the hex. */
.wm-coach-bubble::after {
  content: "";
  position: absolute;
  left: calc(var(--arrow-x, 50%) - 9px);
  bottom: -10px;
  border: 9px solid transparent;
  border-bottom: 0;
  border-top-color: #c98a12;
}
.wm-coach-bubble.is-below::after { bottom: auto; top: -10px; border-top: 0; border-bottom: 9px solid #c98a12; }
.wm-coach-bubble.is-docked::after { display: none; }
.wm-coach-icon {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #ffe48a, #f0b52e 55%, #c98a12);
  color: #3d2000;
}
.wm-coach-text { flex: 1; min-width: 0; }
.wm-coach-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.wm-coach-go {
  padding: 8px 12px;
  border-radius: 10px;
  border: 2px solid #7a5310;
  background: linear-gradient(180deg, #ffe48a 0%, #f0b52e 55%, #c98a12 100%);
  color: #3d2000;
  font: 800 0.82rem/1 "Cinzel", serif;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  animation: wm-coach-glow 2s ease-in-out infinite;
}
.wm-coach-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(200, 150, 12, 0.5);
  background: transparent;
  color: #d4c39f;
  cursor: pointer;
}

/* Markers inside the map host: they pan and zoom with the hexes. */
.wm-coach-mark {
  position: absolute;
  width: 62px;
  height: 62px;
  margin: -31px 0 0 -31px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 5;
}
.wm-coach-own { box-shadow: 0 0 0 3px rgba(255, 210, 58, 0.85), 0 0 18px rgba(255, 210, 58, 0.6); }
.wm-coach-target { animation: wm-coach-ring 1.6s ease-out infinite; box-shadow: 0 0 0 4px rgba(255, 120, 60, 0.95); }
/* To the right of the hex: above and below are the neighbours and the name. */
.wm-coach-you {
  position: absolute;
  left: calc(100% - 4px);
  top: 50%;
  transform: translateY(-50%);
  padding: 2px 8px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffe48a, #f0b52e 55%, #c98a12);
  border: 1px solid #7a5310;
  color: #3d2000;
  font: 800 0.7rem/1.3 "Cinzel", serif;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

/* In the hex panel: the button to press next. */
.wm-coach-glow {
  position: relative;
  animation: wm-coach-glow 1.8s ease-in-out infinite;
  outline: 3px solid rgba(255, 210, 58, 0.9);
  outline-offset: 2px;
}

@keyframes wm-coach-ring {
  0% { box-shadow: 0 0 0 3px rgba(255, 120, 60, 0.95), 0 0 0 0 rgba(255, 120, 60, 0.6); }
  100% { box-shadow: 0 0 0 3px rgba(255, 120, 60, 0.95), 0 0 0 18px rgba(255, 120, 60, 0); }
}
@keyframes wm-coach-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 210, 58, 0.5); }
  50% { box-shadow: 0 0 0 8px rgba(255, 210, 58, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .wm-coach-target, .wm-coach-glow, .wm-coach-go { animation: none; }
}
@media (max-width: 480px) {
  .wm-coach-bubble { font-size: 0.84rem; gap: 8px; padding: 8px; }
  .wm-coach-icon { display: none; }
}
.worldmap-attack-now {
  margin: 10px 0 14px;
  padding: 12px;
  border-radius: 12px;
  border: 2px solid rgba(201, 138, 18, 0.7);
  background: rgba(240, 181, 46, 0.12);
}
.worldmap-attack-now-text { margin: 0 0 10px; font-size: 0.88rem; }
.worldmap-attack-now-text i { color: #c98a12; }
.worldmap-attack-now-btn { width: 100%; justify-content: center; }

/* The hand pointing at the button to press (worldmap-coach.js highlightPanel). */
.wm-coach-pointer {
  position: absolute;
  right: -6px;
  bottom: -18px;
  font-size: 1.6rem;
  color: #ffd23a;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.6));
  pointer-events: none;
  animation: wm-coach-tap 1.1s ease-in-out infinite;
  z-index: 2;
}
@keyframes wm-coach-tap {
  0%, 100% { transform: translate(0, 0) rotate(-12deg); }
  50% { transform: translate(-4px, -6px) rotate(-12deg); }
}
@media (prefers-reduced-motion: reduce) {
  .wm-coach-pointer { animation: none; }
}
