body.scanner-ui.strategy-guide-active {
  --strategy-guide-scrim-z: 2500;
  --strategy-guide-card-z: 4200;
}

body.scanner-ui .strategy-guide-scrim {
  position: fixed;
  inset: 0;
  z-index: var(--strategy-guide-scrim-z);
  pointer-events: none;
  background: rgba(2, 8, 23, 0.2);
}

body.scanner-ui .strategy-guide-target {
  position: relative !important;
  z-index: calc(var(--strategy-guide-scrim-z) + 2) !important;
  pointer-events: auto !important;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  border-color: rgba(96, 165, 250, 0.86) !important;
  box-shadow:
    0 0 0 2px rgba(59, 130, 246, 0.55),
    0 0 0 8px rgba(59, 130, 246, 0.16),
    0 16px 38px rgba(0, 0, 0, 0.34) !important;
  animation: strategyGuidePulse 1.35s ease-in-out infinite;
}

body.scanner-ui .scanner-strategyLibrary .strategy-guide-target {
  z-index: 2 !important;
}

body.scanner-ui .strategy-guide-card {
  position: fixed;
  right: min(560px, max(320px, 28vw));
  bottom: 24px;
  z-index: var(--strategy-guide-card-z);
  width: min(420px, calc(100vw - 32px));
  border: 1px solid rgba(96, 165, 250, 0.34);
  border-radius: 12px;
  background: rgba(10, 20, 36, 0.98);
  color: #e5eefc;
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.44);
  padding: 14px;
  pointer-events: auto;
  touch-action: manipulation;
}

body.scanner-ui .strategy-guide-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

body.scanner-ui .strategy-guide-card__eyebrow {
  color: #8fb8ff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

body.scanner-ui .strategy-guide-card__title {
  margin-top: 4px;
  color: #ffffff;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.24;
}

body.scanner-ui .strategy-guide-card__close {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(96, 165, 250, 0.22);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.86);
  color: #b9c7dd;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

body.scanner-ui .strategy-guide-card__text {
  margin-top: 10px;
  color: #bfd0ea;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}

body.scanner-ui .strategy-guide-card__steps {
  display: flex;
  gap: 6px;
  margin-top: 12px;
}

body.scanner-ui .strategy-guide-card__step {
  height: 4px;
  flex: 1 1 0;
  border-radius: 999px;
  background: rgba(71, 85, 105, 0.78);
}

body.scanner-ui .strategy-guide-card__step.is-active,
body.scanner-ui .strategy-guide-card__step.is-done {
  background: #2f73df;
}

body.scanner-ui .strategy-guide-card__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

body.scanner-ui .strategy-guide-card__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid rgba(96, 165, 250, 0.4);
  border-radius: 8px;
  background: linear-gradient(180deg, #367df0, #2563d4);
  color: #ffffff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  padding: 9px 13px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

body.scanner-ui .strategy-guide-card__button--ghost {
  background: rgba(15, 23, 42, 0.86);
  color: #d5e3f8;
}

@keyframes strategyGuidePulse {
  0%, 100% {
    box-shadow:
      0 0 0 2px rgba(59, 130, 246, 0.44),
      0 0 0 7px rgba(59, 130, 246, 0.12),
      0 14px 28px rgba(0, 0, 0, 0.28) !important;
  }
  50% {
    box-shadow:
      0 0 0 2px rgba(96, 165, 250, 0.9),
      0 0 0 12px rgba(59, 130, 246, 0.22),
      0 18px 38px rgba(37, 99, 235, 0.24) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.scanner-ui .strategy-guide-target {
    animation: none;
  }
}

@media (max-width: 900px) {
  body.scanner-ui .strategy-guide-card {
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: auto;
    padding: 12px;
  }

  body.scanner-ui .strategy-guide-card__title {
    font-size: 15px;
  }
}
