/* ══════════════════════════════════════════════════════════
   ONBOARDING · один coachmark в игровом HUD
   Не затемняет поле и не превращает обучение в серию модалок.
   ══════════════════════════════════════════════════════════ */

.onboarding-coachmark {
  position: fixed;
  left: 50%;
  top: auto;
  bottom: calc(64px + env(safe-area-inset-bottom, 0px) + 12px);
  transform: translateX(-50%);
  z-index: 75;
  width: min(440px, calc(100vw - 32px));
  padding: 14px 16px 15px;
  color: var(--text-2, #d6e0ef);
  background:
    linear-gradient(180deg, rgba(12, 15, 37, .995), rgba(5, 7, 21, .995));
  border: 2px solid color-mix(in srgb, var(--magic, #a78bfa) 52%, var(--line, #2a2a5a));
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.045),
    0 0 0 1px #07060d,
    0 8px 28px rgba(0,0,0,.68);
  font-family: var(--font, 'Courier New', monospace);
  pointer-events: auto;
  max-height: calc(100dvh - 150px);
  overflow-y: auto;
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}

.onboarding-coachmark[hidden] { display: none; }

.onboarding-coachmark::before,
.onboarding-coachmark::after {
  content: '';
  position: absolute;
  width: 6px;
  height: 6px;
  border-color: var(--gold, #f5c542);
  opacity: .8;
}
.onboarding-coachmark::before {
  top: 3px; left: 3px;
  border-top: 1px solid; border-left: 1px solid;
}
.onboarding-coachmark::after {
  right: 3px; bottom: 3px;
  border-right: 1px solid; border-bottom: 1px solid;
}

.onboarding-head,
.onboarding-status,
.onboarding-reward,
.onboarding-actions {
  display: flex;
  align-items: center;
}

.onboarding-head {
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.onboarding-kicker {
  color: var(--gold, #f5c542);
  font-size: 10px;
  letter-spacing: 1px;
  line-height: 1.1;
  text-transform: uppercase;
}
.onboarding-step {
  margin-left: auto;
  color: var(--text-3, #8faacc);
  font-size: 10px;
  white-space: nowrap;
}
.onboarding-title {
  color: #fff4bd;
  font-size: 17px;
  line-height: 1.3;
  text-shadow: 0 1px 0 #000;
}
.onboarding-close {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  padding: 0;
  color: #c5d0e7;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line, #2a2a5a);
  font: inherit;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
}
.onboarding-close:hover,
.onboarding-close:focus-visible {
  color: #fff4bd;
  border-color: var(--gold, #f5c542);
  outline: 2px solid var(--gold, #f5c542);
  outline-offset: 2px;
}
.onboarding-copy {
  margin-top: 6px;
  color: #f0f3ff;
  font-size: 12px;
  line-height: 1.5;
}
.onboarding-status {
  gap: 5px;
  margin-top: 8px;
  min-width: 0;
  flex-wrap: wrap;
}
.onboarding-chip {
  padding: 3px 5px;
  color: var(--text-3, #8faacc);
  background: rgba(255,255,255,.045);
  border: 1px solid var(--line, #2a2a5a);
  font-size: 9px;
  line-height: 1;
  white-space: nowrap;
}
.onboarding-chip--hp { color: #ff9d9d; border-color: rgba(231,76,60,.42); }
.onboarding-chip--xp { color: #d1b5ff; border-color: rgba(167,139,250,.42); }
.onboarding-chip--wave { color: #ffe18a; border-color: rgba(245,197,66,.42); }
.onboarding-reward {
  gap: 5px;
  margin-top: 7px;
  color: var(--success, #2ecc71);
  font-size: 10px;
  line-height: 1.2;
}
.onboarding-reward-label { color: var(--text-3, #8faacc); }
.onboarding-actions {
  justify-content: space-between;
  gap: 9px;
  margin-top: 13px;
  flex-wrap: wrap;
}
.onboarding-skip {
  min-height: 35px;
  padding: 7px 10px;
  color: #c5d0e7;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line, #2a2a5a);
  font: inherit;
  font-size: 10px;
  cursor: pointer;
  touch-action: manipulation;
}
.onboarding-skip:hover,
.onboarding-skip:focus-visible {
  color: #fff4bd;
  border-color: var(--gold, #f5c542);
  outline: none;
}
.onboarding-skip:active { transform: translateY(2px); }
.onboarding-action {
  min-height: 35px;
  padding: 7px 11px;
  color: #171225;
  background: linear-gradient(180deg, #f5c542, #bd8d19);
  border: 1px solid #ffe58a;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 2px 0 #08070f;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
  touch-action: manipulation;
}
.onboarding-action:active {
  transform: translateY(2px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 0 0 #08070f;
}

@media (max-width: 360px) {
  .onboarding-coachmark {
    width: calc(100vw - 20px);
    padding: 12px 13px 13px;
  }
  .onboarding-title { font-size: 15px; }
  .onboarding-copy { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .onboarding-coachmark { scroll-behavior: auto; }
}
