/* ════════ TUTORIAL v2 — Interactive overlay styles ════════ */

.tut2-overlay {
  position: fixed;
  inset: 0;
  z-index:var(--z-overlay-event);
  pointer-events: none; /* parent never blocks — masks/tip have their own pointer-events:auto */
}

/* Masks disabled — they were dimming the entire game UI behind the tip box
   on slow-rendered overview pages. The tip + ring alone are enough guidance. */
.tut2-mask {
  position: absolute;
  background: transparent !important;
  backdrop-filter: none !important;
  pointer-events: none !important;
  display: none !important;
}
.tut2-mask-top    { top: 0; left: 0; right: 0; height: 0; }
.tut2-mask-bottom { bottom: 0; left: 0; right: 0; height: 100%; }
.tut2-mask-left   { top: 0; bottom: 0; left: 0; width: 0; }
.tut2-mask-right  { top: 0; bottom: 0; right: 0; width: 0; }

.tut2-ring {
  position: absolute;
  display: none;
  border: 2px solid rgba(42, 143, 255, 0.9);
  border-radius: 12px;
  box-shadow:
    0 0 0 3px rgba(42, 143, 255, 0.35),
    0 0 40px rgba(42, 143, 255, 0.6),
    inset 0 0 24px rgba(42, 143, 255, 0.15);
  pointer-events: none;
  transition: all 0.28s cubic-bezier(.4,0,.2,1);
  animation: tut2Pulse 2s ease-in-out infinite;
}
@keyframes tut2Pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(42,143,255,0.35), 0 0 40px rgba(42,143,255,0.6), inset 0 0 24px rgba(42,143,255,0.15); }
  50%      { box-shadow: 0 0 0 6px rgba(42,143,255,0.25), 0 0 60px rgba(42,143,255,0.9), inset 0 0 32px rgba(42,143,255,0.25); }
}

.tut2-tip {
  position: absolute;
  display: none;
  width: 440px;
  max-width: 94vw;
  background:
    radial-gradient(ellipse at top, color-mix(in srgb, var(--accent, #2a8fff) 14%, transparent) 0%, transparent 60%),
    linear-gradient(180deg, rgba(10,16,30,0.985), rgba(6,10,22,0.985));
  border: 1px solid color-mix(in srgb, var(--accent, #2a8fff) 55%, transparent);
  border-radius: 16px;
  box-shadow:
    0 20px 70px rgba(0,0,0,0.75),
    0 0 90px color-mix(in srgb, var(--accent, #2a8fff) 18%, transparent),
    inset 0 1px 0 color-mix(in srgb, var(--accent, #2a8fff) 25%, transparent);
  padding: 20px 22px 18px;
  pointer-events: auto;
  color: #e4ebf5;
  font-size: 14px;
  line-height: 1.6;
  animation: tut2TipIn 0.32s cubic-bezier(.4,0,.2,1);
}
.tut2-tip::before {
  content: '';
  position: absolute;
  top: 0; left: 18px; right: 18px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent, #2a8fff), transparent);
  opacity: 0.85;
}
@keyframes tut2TipIn {
  from { opacity: 0; transform: translateY(8px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.tut2-tip-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-family:var(--font-display);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.tut2-tip-act {
  color: var(--accent, #2a8fff);
  font-weight: 700;
  text-shadow: 0 0 12px color-mix(in srgb, var(--accent, #2a8fff) 55%, transparent);
}
.tut2-tip-step {
  color: #7a8aa0;
  margin-left: auto;
}
.tut2-tip-close {
  background: none;
  border: 1px solid rgba(255,100,100,0.3);
  color: #ff8a8a;
  /* M7-C — touch target 44×44 min (Play Store a11y guideline) */
  width: 44px; height: 44px;
  min-width: 44px; min-height: 44px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.tut2-tip-close:hover { background: rgba(255,100,100,0.15); border-color: rgba(255,100,100,0.6); }

.tut2-tip-progress {
  height: 3px;
  background: color-mix(in srgb, var(--accent, #2a8fff) 15%, transparent);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 14px;
}
.tut2-tip-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent, #2a8fff), var(--accent2, #5ab0ff));
  box-shadow: 0 0 14px color-mix(in srgb, var(--accent, #2a8fff) 60%, transparent);
  transition: width 0.4s ease;
}

.tut2-tip-title {
  font-family:var(--font-display);
  font-size: 19px;
  font-weight: 800;
  color:var(--textbright);
  letter-spacing: 1px;
  margin-bottom: 10px;
  text-shadow: 0 0 18px color-mix(in srgb, var(--accent, #2a8fff) 35%, transparent);
}
.tut2-tip-desc {
  color: #c9d6e8;
  font-size: 14px;
  line-height: 1.65;
  margin-bottom: 12px;
}
.tut2-tip-hint {
  background: linear-gradient(180deg, rgba(255,200,50,0.10), rgba(255,180,30,0.05));
  border-left: 3px solid rgba(255, 200, 50, 0.7);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.55;
  color: #ffd97d;
  margin-bottom: 14px;
  box-shadow: inset 0 0 20px rgba(255,200,50,0.05);
}
.tut2-tip-hint::before { content: '💡 '; }

.tut2-tip-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}
.tut2-btn {
  flex: 1;
  padding: 9px 14px;
  border-radius: 8px;
  font-family:var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s;
}
.tut2-btn-primary {
  background: linear-gradient(180deg, var(--accent, #2a8fff), color-mix(in srgb, var(--accent, #2a8fff) 70%, #000));
  color:var(--textbright);
  border-color: color-mix(in srgb, var(--accent, #2a8fff) 80%, #fff);
  box-shadow: 0 4px 18px color-mix(in srgb, var(--accent, #2a8fff) 35%, transparent);
  text-shadow: 0 1px 4px rgba(0,0,0,0.45);
}
.tut2-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 26px color-mix(in srgb, var(--accent, #2a8fff) 55%, transparent); }
.tut2-btn-ghost {
  background: transparent;
  color: #7a8aa0;
  border-color: rgba(122,138,160,0.3);
  flex: 0 0 auto;
}
.tut2-btn-ghost:hover { color: #b8c5d8; border-color: rgba(122,138,160,0.6); }

.tut2-tip-esc {
  text-align: center;
  font-size: 10px;
  color: #5a6a80;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.tut2-modal {
  position: fixed;
  inset: 0;
  background: transparent;          /* see the game behind, the box has its own bg */
  backdrop-filter: none;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9201;
  pointer-events: none;             /* let clicks fall through; box re-enables pointer-events */
}
.tut2-modal-box { pointer-events: auto; }
.tut2-modal-box {
  position: relative;
  width: 680px;
  max-width: 96vw;
  background:
    radial-gradient(ellipse at top, color-mix(in srgb, var(--accent, #2a8fff) 18%, transparent) 0%, transparent 55%),
    linear-gradient(180deg, rgba(10,16,30,0.985), rgba(4,8,18,0.99));
  border: 1px solid color-mix(in srgb, var(--accent, #2a8fff) 55%, transparent);
  border-radius: 22px;
  box-shadow:
    0 28px 100px rgba(0,0,0,0.85),
    0 0 140px color-mix(in srgb, var(--accent, #2a8fff) 22%, transparent),
    inset 0 1px 0 color-mix(in srgb, var(--accent, #2a8fff) 30%, transparent);
  padding: 44px 48px 36px;
  color: #e4ebf5;
  text-align: center;
  overflow: hidden;
  animation: tut2TipIn 0.55s cubic-bezier(.4,0,.2,1);
}
.tut2-modal-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent, #2a8fff) 30%, var(--accent2, #5ab0ff) 50%, var(--accent, #2a8fff) 70%, transparent);
  opacity: 0.9;
}
.tut2-modal-box::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 10%, color-mix(in srgb, var(--accent, #2a8fff) 10%, transparent), transparent 30%),
    radial-gradient(circle at 85% 90%, color-mix(in srgb, var(--accent2, #5ab0ff) 10%, transparent), transparent 30%);
  pointer-events: none;
  z-index: 0;
}
.tut2-modal-box > * { position: relative; z-index: 1; }

.tut2-modal-faction {
  width: 140px;
  height: 140px;
  margin: 0 auto 18px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: tut2IconFloat 4s ease-in-out 1;
}
.tut2-modal-faction::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent, #2a8fff) 45%, transparent) 0%, transparent 65%);
  filter: blur(8px);
  animation: tut2FactionPulse 2.6s ease-in-out 1;
}
.tut2-modal-faction::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--accent, #2a8fff) 60%, transparent);
  box-shadow: inset 0 0 30px color-mix(in srgb, var(--accent, #2a8fff) 25%, transparent);
}
.tut2-modal-faction img {
  width: 104px;
  height: 104px;
  object-fit: contain;
  filter: drop-shadow(0 0 18px color-mix(in srgb, var(--accent, #2a8fff) 65%, transparent));
  z-index: 1;
}
@keyframes tut2FactionPulse {
  0%, 100% { opacity: 0.8; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.08); }
}
.tut2-modal-icon {
  font-size: 42px;
  margin-bottom: 14px;
  animation: tut2IconFloat 3s ease-in-out 1;
}
@keyframes tut2IconFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}
.tut2-modal-title {
  font-family:var(--font-display);
  font-size: 30px;
  font-weight: 800;
  color:var(--textbright);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 12px;
  text-shadow: 0 0 24px color-mix(in srgb, var(--accent, #2a8fff) 45%, transparent);
}
.tut2-modal-quote {
  font-family:var(--font-display);
  font-size: 13px;
  font-style: italic;
  letter-spacing: 1.5px;
  color: color-mix(in srgb, var(--accent, #2a8fff) 70%, #fff);
  margin-bottom: 18px;
  padding: 0 20px;
  line-height: 1.55;
  text-transform: uppercase;
}
.tut2-modal-quote::before, .tut2-modal-quote::after {
  content: '❝';
  display: inline-block;
  opacity: 0.5;
  margin: 0 6px;
}
.tut2-modal-quote::after { content: '❞'; }
.tut2-modal-sub {
  color: #a8bbd6;
  font-size: 15px;
  margin-bottom: 24px;
  line-height: 1.7;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}
.tut2-modal-meta {
  display: flex;
  gap: 14px;
  justify-content: center;
  align-items: center;
  margin-bottom: 26px;
  font-size: 13px;
  flex-wrap: wrap;
}
.tut2-modal-meta-chip {
  padding: 6px 14px;
  border-radius: 20px;
  background: color-mix(in srgb, var(--accent, #2a8fff) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent, #2a8fff) 40%, transparent);
  font-family:var(--font-display);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--accent, #2a8fff) 55%, #fff);
}
.tut2-modal-meta-chip b { color:var(--textbright); font-weight: 800; margin-left: 6px; }
.tut2-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.tut2-modal-actions .tut2-btn { flex: 0 1 auto; padding: 12px 24px; font-size: 12px; }

.tut2-wait-bar {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: none;
  align-items: center;
  gap: 12px;
  background: linear-gradient(180deg, rgba(30,20,10,0.97), rgba(20,14,6,0.97));
  border: 1px solid rgba(255, 180, 50, 0.4);
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 12px;
  color: #ffd97d;
  z-index: 9202;
  pointer-events: auto;
  box-shadow: 0 6px 30px var(--shade-2), 0 0 40px rgba(255,180,50,0.15);
  animation: tut2TipIn 0.3s ease;
}
.tut2-wait-icon { font-size: 14px; }
.tut2-wait-skip {
  background: none;
  border: 1px solid rgba(255,180,50,0.4);
  color: #ffd97d;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 11px;
  font-family:var(--font-display);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.tut2-wait-skip:hover { background: rgba(255,180,50,0.12); }

.tut2-celebration {
  text-align: center;
}
.tut2-celebration .tut2-modal-icon { font-size: 56px; }
.tut2-acts-recap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 16px 0 22px;
  text-align: left;
}
.tut2-acts-recap .act {
  padding: 8px 14px;
  background: rgba(42,143,255,0.08);
  border-left: 3px solid #2a8fff;
  border-radius: 6px;
  font-size: 13px;
  color: #cde0fb;
}
.tut2-acts-recap .act::before { content: '✓ '; color: #5ed67a; font-weight: 700; }

@media (max-width: 640px) {
  .tut2-tip { width: calc(100vw - 24px); padding: 16px; }
  .tut2-tip-title { font-size: 16px; }
  .tut2-tip-desc { font-size: 13px; }
  .tut2-modal-box { padding: 28px 22px 24px; }
  .tut2-modal-title { font-size: 22px; letter-spacing: 2px; }
  .tut2-modal-faction { width: 108px; height: 108px; }
  .tut2-modal-faction img { width: 80px; height: 80px; }
  .tut2-modal-quote { font-size: 11px; }
  .tut2-modal-sub { font-size: 13px; }
}

/* ════════ NPC Raid Intro — One-shot blocking popup ════════ */
.nri-overlay {
  position: fixed;
  inset: 0;
  z-index:var(--z-overlay-sim); /* above .tut2-overlay (9200) and raid popup (9150) */
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, rgba(60,10,10,0.92) 0%, rgba(4,6,12,0.97) 70%);
  backdrop-filter: blur(10px);
  animation: nriFadeIn 0.45s ease;
}
@keyframes nriFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes nriFadeOut { from { opacity: 1; } to { opacity: 0; } }

.nri-bg-pulse {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(255,60,60,0.12), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(255,60,60,0.10), transparent 45%);
  animation: nriBgPulse 3.2s ease-in-out infinite;
  pointer-events: none;
}
@keyframes nriBgPulse {
  0%, 100% { opacity: 0.6; }
  50%      { opacity: 1; }
}

.nri-box {
  position: relative;
  width: 720px;
  max-width: 96vw;
  max-height: 92vh;
  overflow-y: auto;
  background:
    radial-gradient(ellipse at top, rgba(255,70,70,0.12) 0%, transparent 50%),
    linear-gradient(180deg, rgba(18,10,14,0.985), rgba(8,4,8,0.99));
  border: 1px solid rgba(255,70,70,0.55);
  border-radius: 22px;
  box-shadow:
    0 30px 110px rgba(0,0,0,0.9),
    0 0 140px rgba(255,70,70,0.25),
    inset 0 1px 0 rgba(255,120,120,0.35);
  padding: 30px 44px 36px;
  color: #eadfe0;
  text-align: center;
  animation: tut2TipIn 0.55s cubic-bezier(.4,0,.2,1);
}
.nri-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #ff4444 30%, #ff8888 50%, #ff4444 70%, transparent);
  animation: nriStripePulse 1.8s ease-in-out infinite;
}
@keyframes nriStripePulse {
  0%, 100% { opacity: 0.75; }
  50%      { opacity: 1; }
}

.nri-alert-stripe {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-family:var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #ff7a7a;
  margin-bottom: 22px;
  padding: 8px 0;
  border-top: 1px solid rgba(255,70,70,0.25);
  border-bottom: 1px solid rgba(255,70,70,0.25);
  animation: nriStripePulse 1.8s ease-in-out infinite;
}
.nri-alert-txt { text-shadow: 0 0 14px rgba(255,70,70,0.55); }

.nri-faction {
  width: 120px;
  height: 120px;
  margin: 0 auto 18px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nri-faction::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent, #2a8fff) 50%, transparent) 0%, transparent 65%);
  filter: blur(10px);
  animation: tut2FactionPulse 2.6s ease-in-out 1;
}
.nri-faction::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--accent, #2a8fff) 60%, transparent);
  box-shadow: inset 0 0 26px color-mix(in srgb, var(--accent, #2a8fff) 25%, transparent);
}
.nri-faction img {
  width: 92px;
  height: 92px;
  object-fit: contain;
  filter: drop-shadow(0 0 20px color-mix(in srgb, var(--accent, #2a8fff) 70%, transparent));
  z-index: 1;
}

.nri-title {
  font-family:var(--font-display);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color:var(--textbright);
  margin-bottom: 12px;
  text-shadow: 0 0 22px rgba(255,100,100,0.45);
}
.nri-quote {
  font-family:var(--font-display);
  font-size: 13px;
  font-style: italic;
  letter-spacing: 1.3px;
  color: color-mix(in srgb, var(--accent, #2a8fff) 75%, #fff);
  margin-bottom: 22px;
  padding: 0 18px;
  line-height: 1.55;
  text-transform: uppercase;
}
.nri-quote::before, .nri-quote::after { content: '❝'; opacity: 0.55; margin: 0 6px; }
.nri-quote::after { content: '❞'; }

.nri-lore {
  text-align: left;
  max-width: 580px;
  margin: 0 auto 22px;
  font-size: 14.5px;
  line-height: 1.7;
  color: #c8bdc0;
}
.nri-lore p { margin: 0 0 10px; }
.nri-lore p:last-child { margin-bottom: 0; }

.nri-info-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 auto 24px;
  max-width: 560px;
}
.nri-info-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 10px;
  border-left: 3px solid;
  text-align: left;
}
.nri-info-row.nri-info-good { background: rgba(90,220,120,0.08); border-left-color: #5adc78; }
.nri-info-row.nri-info-bad  { background: rgba(255,100,80,0.10); border-left-color: #ff6450; }
.nri-info-row.nri-info-neutral { background: rgba(180,190,220,0.06); border-left-color: #9aa6c0; }
.nri-info-ico { font-size: 22px; width: 28px; text-align: center; }
.nri-info-txt { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.nri-info-txt b {
  font-family:var(--font-display);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color:var(--textbright);
}
.nri-info-txt span { font-size: 13px; color: #b8c0d0; }

.nri-cta {
  display: block;
  width: 100%;
  padding: 16px 24px;
  background: linear-gradient(180deg, #e03030, #a01818);
  border: 1px solid #ff5a5a;
  border-radius: 12px;
  color:var(--textbright);
  font-family:var(--font-display);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-shadow: 0 1px 6px var(--shade-2);
  cursor: pointer;
  box-shadow: 0 6px 22px rgba(224,48,48,0.45), inset 0 1px 0 rgba(255,255,255,0.2);
  transition: all 0.18s;
  animation: nriCtaPulse 2s ease-in-out infinite;
}
.nri-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(224,48,48,0.65), inset 0 1px 0 var(--tint-10);
}
@keyframes nriCtaPulse {
  0%, 100% { box-shadow: 0 6px 22px rgba(224,48,48,0.45), inset 0 1px 0 rgba(255,255,255,0.2); }
  50%      { box-shadow: 0 8px 34px rgba(224,48,48,0.7),  inset 0 1px 0 var(--tint-10); }
}

@media (max-width: 640px) {
  .nri-box { padding: 24px 18px 26px; border-radius: 16px; }
  .nri-title { font-size: 20px; letter-spacing: 1.5px; }
  .nri-faction { width: 88px; height: 88px; }
  .nri-faction img { width: 68px; height: 68px; }
  .nri-lore { font-size: 13px; }
  .nri-info-txt span { font-size: 12px; }
  .nri-cta { font-size: 11px; padding: 14px 16px; letter-spacing: 1.5px; }
}
