/* M.NationWorld contextual page tour — first-open, per-page onboarding. */
:root {
  --mn-tour-ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --mn-tour-ease-morph: cubic-bezier(0.77, 0, 0.175, 1);
}

.mn-tour-root {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  color: #16161a;
  font-family: inherit;
  pointer-events: none;
}

.mn-tour-root * { box-sizing: border-box; }
.mn-tour-intro, .mn-tour-callout { overflow-wrap: anywhere; }

.mn-tour-scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .70);
  pointer-events: auto;
  opacity: 0;
  animation: mnTourFadeIn 220ms var(--mn-tour-ease-out) forwards;
}

.mn-tour-intro {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(440px, calc(100vw - 32px));
  max-height: min(680px, calc(100dvh - 32px));
  overflow: auto;
  padding: 28px;
  border: 1px solid rgba(15, 15, 18, .12);
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .30);
  transform: translate(-50%, -50%) scale(.96);
  opacity: 0;
  pointer-events: auto;
  animation: mnTourModalIn 280ms var(--mn-tour-ease-out) forwards;
}

.mn-tour-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  margin-bottom: 16px;
  border: 1px solid #d8d8de;
  border-radius: 999px;
  color: #555560;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.mn-tour-intro h2,
.mn-tour-callout h2 {
  margin: 0;
  color: #111115;
  font-weight: 820;
  letter-spacing: -.025em;
}

.mn-tour-intro h2 { font-size: clamp(26px, 7vw, 36px); line-height: 1.08; }
.mn-tour-intro p { margin: 14px 0 0; color: #5d5d68; font-size: 15px; line-height: 1.65; }

.mn-tour-feature-list {
  display: grid;
  gap: 10px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.mn-tour-feature-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: #34343c;
  font-size: 14px;
  line-height: 1.45;
}

.mn-tour-feature-list li::before {
  content: '';
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  margin-top: 6px;
  border-radius: 50%;
  background: #16161a;
}

.mn-tour-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 10px;
  margin-top: 24px;
}

.mn-tour-btn {
  min-height: 48px;
  padding: 8px 16px;
  border: 1px solid #d8d8de;
  border-radius: 15px;
  background: #fff;
  color: #16161a;
  font: inherit;
  font-weight: 760;
  cursor: pointer;
}

.mn-tour-btn-primary { border-color: #16161a; background: #16161a; color: #fff; }
.mn-tour-btn:focus-visible, .mn-tour-skip:focus-visible { outline: 3px solid #111115; outline-offset: 3px; }

.mn-tour-stage {
  position: absolute;
  inset: 0;
  pointer-events: auto;
  overflow: hidden;
}

.mn-tour-spotlight {
  position: fixed;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  border-radius: 18px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, .70);
  pointer-events: none;
  transform-origin: top left;
  will-change: transform;
  opacity: 0;
}

.mn-tour-spotlight[data-ready="true"] { opacity: 1; }

.mn-tour-spotlight::after {
  content: '';
  position: absolute;
  inset: -2px;
  border: 2px solid rgba(255, 255, 255, .94);
  border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(255, 255, 255, .35);
  animation: mnTourBreathe 1800ms ease-in-out infinite;
}

.mn-tour-callout {
  --mn-tour-arrow-x: 32px;
  position: fixed;
  width: min(342px, calc(100vw - 28px));
  padding: 20px;
  border: 1px solid rgba(15, 15, 18, .12);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 18px 52px rgba(0, 0, 0, .28);
  pointer-events: auto;
  transform-origin: var(--mn-tour-arrow-x) 0;
  will-change: transform, opacity;
  visibility: hidden;
}

.mn-tour-callout[data-ready="true"] { visibility: visible; }
.mn-tour-callout[data-scrollable="true"] { overflow-y: auto; overscroll-behavior: contain; }

.mn-tour-callout[data-side="bottom"]::before,
.mn-tour-callout[data-side="top"]::before {
  content: '';
  position: absolute;
  left: var(--mn-tour-arrow-x);
  width: 15px;
  height: 15px;
  background: #fff;
  transform: translateX(-50%) rotate(45deg);
}

.mn-tour-callout[data-side="bottom"]::before { top: -8px; border-left: 1px solid rgba(15, 15, 18, .12); border-top: 1px solid rgba(15, 15, 18, .12); }
.mn-tour-callout[data-side="top"]::before { bottom: -8px; border-right: 1px solid rgba(15, 15, 18, .12); border-bottom: 1px solid rgba(15, 15, 18, .12); }

.mn-tour-callout h2 { font-size: 19px; line-height: 1.25; }
.mn-tour-callout p { margin: 9px 0 0; color: #555560; font-size: 14px; line-height: 1.58; }

.mn-tour-tier-note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f2f2f4;
  color: #34343c;
  font-size: 12px;
  line-height: 1.45;
}

.mn-tour-tier-note[hidden] { display: none; }

.mn-tour-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 17px; }
.mn-tour-count { color: #777783; font-size: 12px; font-variant-numeric: tabular-nums; }
.mn-tour-next { min-width: 112px; margin-left: auto; }

.mn-tour-skip {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  z-index: 2;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 13px;
  background: rgba(16, 16, 20, .62);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 720;
  backdrop-filter: blur(14px);
  cursor: pointer;
  pointer-events: auto;
}

.mn-tour-root.is-leaving { animation: mnTourFadeOut 180ms var(--mn-tour-ease-out) forwards; }

@keyframes mnTourFadeIn { to { opacity: 1; } }
@keyframes mnTourFadeOut { to { opacity: 0; } }
@keyframes mnTourModalIn { to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
@keyframes mnTourCalloutIn { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: scale(1); } }
@keyframes mnTourBreathe { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,.35); } 50% { box-shadow: 0 0 0 7px rgba(255,255,255,0); } }

@media (max-width: 600px) {
  .mn-tour-intro { padding: 24px; border-radius: 24px; }
  .mn-tour-callout { width: calc(100vw - 24px); padding: 18px; border-radius: 18px; }
  .mn-tour-actions { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
}

@media (prefers-reduced-motion: reduce) {
  .mn-tour-scrim, .mn-tour-intro, .mn-tour-root.is-leaving { animation-duration: 1ms; }
  .mn-tour-spotlight::after { animation: none; }
  .mn-tour-callout { will-change: opacity; }
}

