/* =========================================================================
   assets/ui/map.css — نقشه‌ی بازی، نسخه‌ی ۲ (v3.27) · رفتارها: assets/ui/map.js
   - هر دنیا رنگِ خودش رو داره (data-hue روی .map-shell)
   - همه‌ی حرکت‌ها transform/opacity ان (روی گوشیِ ضعیف هم روان) و با «کاهشِ حرکت» خاموش می‌شن
   - فقط یه چیز روی مسیر مدام تکون می‌خوره: مرحله‌ی فعلی (و صندوقچه‌ی آماده) — چشم می‌دونه کجا بره
   ========================================================================= */

/* ---------------- پالتِ هر دنیا ---------------- */
.mp { --mp-a: #2BFFC6; --mp-a2: #10a37f; --mp-glow: rgba(43, 255, 198, .5); --mp-b: #6C8CFF; --mp-c: #FF4FD8; --mp-on: #053a2c;
  --mp-lock: var(--bn-surface-2, #221b42); --mp-lock-edge: rgba(0, 0, 0, .42); --mp-xp: var(--mp-a2); }
.mp[data-hue="pink"]   { --mp-a: #FF6ADF; --mp-a2: #b02d97; --mp-glow: rgba(255, 79, 216, .5);  --mp-b: #a78bfa; --mp-c: #FFC94A; --mp-on: #3a0030; }
.mp[data-hue="sky"]    { --mp-a: #5AB8FF; --mp-a2: #2a72b0; --mp-glow: rgba(90, 184, 255, .5);  --mp-b: #2BFFC6; --mp-c: #a78bfa; --mp-on: #062a44; }
.mp[data-hue="gold"]   { --mp-a: #FFC94A; --mp-a2: #b07c06; --mp-glow: rgba(255, 201, 74, .5);  --mp-b: #ff8a3d; --mp-c: #FF4FD8; --mp-on: #3a2700; }
.mp[data-hue="violet"] { --mp-a: #B69CFF; --mp-a2: #6d4fd1; --mp-glow: rgba(167, 139, 250, .5); --mp-b: #FF4FD8; --mp-c: #2BFFC6; --mp-on: #1e0f4a; }
.mp[data-hue="mint"]   { --mp-a: #4ADE9F; --mp-a2: #1f8a5c; --mp-glow: rgba(74, 222, 159, .5);  --mp-b: #FFC94A; --mp-c: #5AB8FF; --mp-on: #062e1d; }
.mp[data-hue="py"]     { --mp-a: #FFD43B; --mp-a2: #a8870f; --mp-glow: rgba(255, 212, 59, .45); --mp-b: #4B8BBE; --mp-c: #3776AB; --mp-on: #2a2000; }
.mp[data-hue="ai"]     { --mp-a: #C9A2FF; --mp-a2: #8048e8; --mp-glow: rgba(192, 132, 252, .5); --mp-b: #ec4899; --mp-c: #FFC94A; --mp-on: #2a0a4a; }
html[data-theme="light"] .mp { --mp-lock: #ebe8f4; --mp-lock-edge: #cfc9e0; --mp-xp: var(--mp-a); }
html[data-theme="light"] .mp[data-hue="teal"], html[data-theme="light"] .mp:not([data-hue]) { --mp-a: #1fd6a5; --mp-a2: #0b8f6d; }
html[data-theme="light"] .mp[data-hue="pink"]   { --mp-a: #f562d6; --mp-a2: #a01e86; }
html[data-theme="light"] .mp[data-hue="sky"]    { --mp-a: #4aaef7; --mp-a2: #1f6aa6; }
html[data-theme="light"] .mp[data-hue="gold"]   { --mp-a: #ffc12e; --mp-a2: #a87400; }
html[data-theme="light"] .mp[data-hue="violet"] { --mp-a: #a68bff; --mp-a2: #5b3fc4; }
html[data-theme="light"] .mp[data-hue="mint"]   { --mp-a: #35d48f; --mp-a2: #178052; }
html[data-theme="light"] .mp[data-hue="py"]     { --mp-a: #ffcf26; --mp-a2: #a07d00; }
html[data-theme="light"] .mp[data-hue="ai"]     { --mp-a: #bb8cff; --mp-a2: #7a45e6; }

/* ---------------- چیدمان ---------------- */
/* overflow-x: hidden روی body اون رو «ظرفِ اسکرول» می‌کنه و هیچ sticky‌ای (نوارِ بالا، نوارِ دنیا، ستونِ کناری) کار نمی‌کنه؛
   clip همون جلوگیری از سرریزِ افقی رو بدونِ این عارضه انجام می‌ده — مثلِ صفحه‌ی اصلی (landing.css)، فقط وقتی نقشه بازه */
@supports (overflow-x: clip) { body:has([data-screen="map"]) { overflow-x: clip; } }
.mp .map-main { display: flex; flex-direction: column; min-height: 0; width: 100%; max-width: 780px; margin-inline: auto; }
.mp .map-main > #bn-ann { order: 1; }
.mp .map-main > #bn-plan-strip { order: 2; }
.mp .map-main > #bn-continue { order: 3; }
.mp .map-main > #mp-today { order: 4; }
.mp .map-main > #bn-quick { order: 5; }
.mp .map-main > #bn-world-pick { order: 7; }
.mp .map-main > .map-header { order: 8; }
.mp .map-main > #bn-money-strip { order: 9; }
.mp .map-main > .path-wrap { order: 10; }
.mp .map-main > .bn-here { order: 11; }
.mp .map-main > .daily-strip, .mp #bn-track-tabs { display: none !important; }

.mp .map-main > .map-header { display: block; margin: 0 0 6px; }
.mp .map-header h2#world-title, .mp .map-header .world-badge { display: none !important; }
.mp .map-header #world-desc { margin: 2px 6px 10px; font-size: 13.5px; line-height: 1.9; color: var(--bn-fg-muted); }

@media (min-width: 861px) {
  .mp { grid-template-columns: 316px minmax(0, 1fr); gap: 28px; }
  .mp > .sidebar { top: 92px; max-height: calc(100vh - 108px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
  .mp > .sidebar .mp-today { margin: 0 0 18px; padding: 12px; box-shadow: none; }
}
@media (max-width: 860px) {
  .mp { gap: 0; grid-template-columns: minmax(0, 1fr); }
  .mp > .sidebar { display: none; }
  .mp .map-header #world-desc { display: none; }
  /* دکمه‌ی شناورِ پشتیبانی روی نقشه لازم نیست (🎧 توی نوارِ بالا هست) و روی مسیر می‌افتاد */
  body:has([data-screen="map"]) #support-fab { display: none !important; }
}

/* شمارنده‌ی هر دنیا توی لیستِ کناری */
.sb-world-item .sb-n { margin-inline-start: auto; flex-shrink: 0; min-width: 40px; text-align: center; font-size: 11px; font-weight: 900; padding: 2px 8px; border-radius: 99px;
  color: var(--bn-fg-muted); background: linear-gradient(to left, rgba(43, 255, 198, .26) var(--p, 0%), var(--bn-surface-2) var(--p, 0%)); }
.sb-world-item .sb-n.is-full { color: #053a2c; background: var(--fill-teal, #2BFFC6); }
html[data-theme="light"] .sb-world-item .sb-n { background: linear-gradient(to left, rgba(0, 166, 128, .2) var(--p, 0%), var(--bn-surface-2) var(--p, 0%)); }

/* ---------------- کاشی‌های سریع (همه‌ی اندازه‌ها) ---------------- */
.mp .bn-quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0 0 12px; }
.mp .bn-quick button { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; padding: 9px 4px 8px; border-radius: 18px; font: inherit; color: var(--bn-fg); cursor: pointer;
  background: var(--bn-surface); border: 1px solid var(--bn-line); -webkit-tap-highlight-color: transparent; transition: transform .35s var(--bn-spring, ease), border-color .2s; }
.mp .bn-quick button:active { transform: scale(.94); transition-duration: .1s; }
.mp .bn-quick i { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; font-style: normal; font-size: 20px; margin-bottom: 2px; }
.mp .bn-quick i .bi { width: 21px; height: 21px; }
.mp .bn-quick [data-q="invite"] i { background: rgba(43, 255, 198, .13); }
.mp .bn-quick [data-q="exam"] i { background: rgba(90, 184, 255, .15); }
.mp .bn-quick [data-q="card"] i { background: rgba(169, 139, 255, .16); }
.mp .bn-quick [data-q="shop"] i { background: rgba(255, 95, 217, .14); }
.mp .bn-quick b { font-size: 12px; font-weight: 900; white-space: nowrap; }
.mp .bn-quick small { font-size: 10.5px; font-weight: 700; color: var(--bn-fg-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
@media (min-width: 861px) {
  .mp .bn-quick button { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 10px; align-items: center; text-align: right; padding: 10px 12px; }
  .mp .bn-quick i { grid-row: 1 / 3; margin: 0; }
  .mp .bn-quick b, .mp .bn-quick small { justify-self: start; }
  .mp .bn-quick button:hover { border-color: var(--bn-line-strong); transform: translateY(-2px); }
}

/* ---------------- نوارِ دنیا (چسبان) ---------------- */
.mp .bn-world-pick { display: flex; align-items: center; gap: 12px; width: 100%; margin: 2px 0 10px; padding: 10px 12px; border-radius: 20px; text-align: right; font: inherit; color: var(--bn-fg); cursor: pointer;
  position: sticky; top: calc(var(--mp-tb, 0px) + 8px); z-index: 30;
  background: var(--bn-surface); border: 1.5px solid var(--bn-line-strong); box-shadow: 0 12px 30px -16px rgba(0, 0, 0, .55);
  -webkit-tap-highlight-color: transparent; transition: top .45s var(--bn-spring, ease), transform .3s var(--bn-spring, ease), border-color .2s; }
.mp .bn-world-pick:active { transform: scale(.985); border-color: var(--mp-a); }
.mp .bn-wp-ic { width: 42px; height: 42px; flex-shrink: 0; border-radius: 14px; display: grid; place-items: center; font-size: 22px; background: var(--bn-surface-2);
  background: linear-gradient(145deg, color-mix(in srgb, var(--mp-a) 26%, transparent), transparent), var(--bn-surface-2); }
.mp .bn-wp-ic .bi { width: 24px; height: 24px; }
.mp .bn-wp-t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.5; }
.mp .bn-wp-t small { font-size: 11px; font-weight: 800; color: var(--bn-fg-soft); }
.mp .bn-wp-t b { font-size: 14.5px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp .bn-wp-bar { position: relative; display: block; height: 7px; margin: 6px 0 2px; border-radius: 99px; background: var(--bn-line-strong); }
.mp .bn-wp-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(to left, var(--mp-a), var(--mp-b)); transition: width .8s var(--bn-smooth, ease); }
.mp .bn-wp-bar em { position: absolute; top: 50%; width: 11px; height: 11px; border-radius: 3px; transform: translate(50%, -50%) rotate(45deg);
  background: var(--bn-surface); border: 2px solid var(--bn-line-strong); }
.mp .bn-wp-bar em.on { background: #FFC94A; border-color: #FFC94A; box-shadow: 0 0 8px rgba(255, 201, 74, .7); }
.mp .bn-wp-n { flex-shrink: 0; display: flex; flex-direction: column; align-items: center; line-height: 1.2; font-size: 19px; font-weight: 900; color: var(--bn-accent-text, #2BFFC6); }
.mp .bn-wp-n small { font-size: 10.5px; font-weight: 800; color: var(--bn-fg-soft); }
.mp .bn-wp-sw { flex-shrink: 0; display: flex; flex-direction: column; align-items: center; padding: 6px 9px; border-radius: 14px; background: var(--bn-surface-2); font-size: 10.5px; font-weight: 900; color: var(--bn-fg-muted); line-height: 1.4; }
.mp .bn-wp-sw i { font-style: normal; font-size: 15px; line-height: .8; }

/* ---------------- کارتِ «امروز» ---------------- */
.mp-today { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "flame text goal" "week week claim"; column-gap: 12px; row-gap: 10px; align-items: center;
  margin: 0 0 12px; padding: 12px 14px; border-radius: 22px; background: var(--bn-surface); border: 1px solid var(--bn-line-strong); box-shadow: var(--bn-shadow-soft); }
.mp-td-top, .mp-td-bot { display: contents; }
.mp-flame { grid-area: flame; } .mp-td-t { grid-area: text; } .mp-goal { grid-area: goal; } .mp-week { grid-area: week; } .mp-claim { grid-area: claim; }
/* توی ستونِ کناریِ دسکتاپ (باریک‌تر): هفته یه ردیفِ کامل، هدف و جایزه کنارِ هم */
.sidebar .mp-today { grid-template-areas: "flame text text" "week week week" "goal claim claim"; }
.sidebar .mp-claim { justify-content: center; }
.mp-today.is-risk { border-color: rgba(255, 138, 61, .55); background: linear-gradient(160deg, rgba(255, 138, 61, .13), transparent 62%), var(--bn-surface); }
.mp-flame { position: relative; width: 48px; height: 48px; flex-shrink: 0; display: grid; place-items: center; border-radius: 16px; background: var(--bn-surface-2); }
.mp-flame svg { width: 30px; height: 30px; color: #ff8a3d; }
.mp-flame.is-on { background: linear-gradient(160deg, rgba(255, 179, 92, .3), rgba(255, 106, 61, .14)); }
.mp-flame.is-off svg { color: var(--bn-fg-soft); opacity: .55; }
.mp-flame.is-risk svg { animation: mpFlick 1.5s ease-in-out infinite; transform-origin: 50% 90%; }
.mp-flame b { position: absolute; bottom: -5px; inset-inline-start: -5px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 99px; display: grid; place-items: center;
  font-size: 12px; font-weight: 900; color: #2a1000; background: #ff9a4d; border: 2px solid var(--bn-surface); }
.mp-flame.is-off b { background: var(--bn-surface-2); color: var(--bn-fg-soft); }
.mp-td-t { flex: 1; min-width: 0; line-height: 1.55; }
.mp-td-t b { display: block; font-size: 15px; font-weight: 900; }
.mp-td-t small { display: block; font-size: 12px; color: var(--bn-fg-muted); }
.mp-today.is-risk .mp-td-t small { color: var(--bn-fg); }
.mp-cd { font-weight: 900; color: #ff8a3d; font-variant-numeric: tabular-nums; }
.mp-goal { position: relative; width: 52px; height: 52px; flex-shrink: 0; padding: 0; border: 0; background: none; cursor: pointer; color: var(--bn-fg); -webkit-tap-highlight-color: transparent; }
.mp-goal svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.mp-goal circle { fill: none; stroke-width: 5; }
.mp-goal .bg { stroke: var(--bn-line-strong); }
.mp-goal .fg { stroke: var(--mp-a, #2BFFC6); stroke-linecap: round; transition: stroke-dashoffset 1s var(--bn-smooth, ease); }
.mp-goal.is-hit .fg { stroke: #FFC94A; }
.mp-goal > span { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.15; }
.mp-goal b { font-size: 13.5px; font-weight: 900; }
.mp-goal b i { font-style: normal; font-size: 10px; color: var(--bn-fg-soft); }
.mp-goal small { font-size: 9.5px; font-weight: 800; color: var(--bn-fg-soft); }
.mp-goal:focus-visible, .mp-claim:focus-visible { outline: 2px solid var(--bn-accent-text); outline-offset: 3px; border-radius: 14px; }
.mp-week { flex: 1; min-width: 0; display: flex; justify-content: space-between; gap: 2px; margin: 0; padding: 0; list-style: none; }
.mp-week li { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10.5px; font-weight: 800; color: var(--bn-fg-soft); }
.mp-week li i { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--bn-surface-2); border: 1.5px solid var(--bn-line-strong); }
.mp-week li i svg { width: 14px; height: 14px; }
.mp-week li.is-on i { color: #fff; border-color: transparent; background: linear-gradient(160deg, #ffb35c, #ff6a3d); box-shadow: 0 4px 10px -4px rgba(255, 106, 61, .8); }
.mp-week li.is-today span { color: var(--bn-fg); }
.mp-week li.is-risk i { border: 2px dashed #ff8a3d; animation: mpRisk 1.6s ease-in-out infinite; }
.mp-week li.is-future i { opacity: .45; }
.mp-claim { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border: 0; border-radius: 14px; font: inherit; font-size: 13.5px; font-weight: 900; cursor: pointer;
  color: #3a2700; background: linear-gradient(135deg, #FFD978, #FFB52E); box-shadow: 0 4px 0 #b97800, 0 10px 22px -10px rgba(255, 181, 46, .9);
  -webkit-tap-highlight-color: transparent; transition: transform .12s, box-shadow .12s; }
.mp-claim svg { width: 18px; height: 18px; }
.mp-claim:active { transform: translateY(3px); box-shadow: 0 1px 0 #b97800; }
.mp-claim:not(.is-done) svg { animation: mpGift 2.8s ease-in-out infinite; }
.mp-claim.is-done { color: var(--bn-fg-muted); background: var(--bn-surface-2); box-shadow: none; font-size: 12px; padding: 8px 11px; }
.mp-claim.is-done svg { color: var(--bn-accent-text); width: 15px; height: 15px; }
.mp-claim.is-busy { opacity: .7; pointer-events: none; }
.mp-ignite { animation: mpIgnite .9s var(--bn-spring, ease) both; }

/* ---------------- مسیر ---------------- */
.mp .path-wrap { position: relative; padding: 30px 0 34px; --amp: min(26vw, 112px); view-transition-name: mp-path; }
@media (min-width: 861px) { .mp .path-wrap { --amp: 134px; padding: 34px 0 60px; } }
.mp .path-svg { z-index: 0; overflow: visible; animation: none; pointer-events: none; }
.mp .path-svg path { fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: none; }
.mp #path-line-todo { stroke: var(--bn-line-strong); stroke-width: 10; stroke-dasharray: .1 21; }
.mp #mp-line-glow { stroke: var(--mp-a); stroke-width: 24; opacity: .13; }
.mp #path-line-done { stroke: url(#mp-grad); stroke-width: 10; }
.mp #mp-line-flow { stroke: #fff; stroke-width: 4; stroke-dasharray: 2 16; opacity: .75; animation: mpFlow 1.1s linear infinite; }
.mp #mp-line-meas { stroke: none; }
.mp .mp-s1 { stop-color: var(--mp-a); }
.mp .mp-s2 { stop-color: var(--mp-b); }
.mp .mp-s3 { stop-color: var(--mp-c); }
.mp .path-nodes { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 0; }
.mp .path-row { display: flex; justify-content: center; align-items: flex-start; min-height: 0; padding: 9px 0; animation: none; }
.mp .path-row.is-cur { padding-top: 52px; }
.mp .path-row > * { position: relative; left: calc(var(--k, 0) * var(--amp)); }

/* تزئینِ پس‌زمینه: تکه‌کدهای کم‌رنگ که آروم با اسکرول جابه‌جا می‌شن */
.mp-decor { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.mp-decor span { position: absolute; transform: rotate(var(--r, 0deg)); direction: ltr; white-space: nowrap; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 800;
  color: var(--mp-a); opacity: .1; }
html[data-theme="light"] .mp-decor span { opacity: .16; color: var(--mp-a2); }

/* ---------------- ایستگاه ---------------- */
.mp .node { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 132px; cursor: pointer; outline: none; transform: none; transition: none; -webkit-tap-highlight-color: transparent; }
.mp .node:hover { transform: none; }
.mp .node.locked { cursor: pointer; }
.mp .mp-coin { --edge: var(--mp-lock-edge); --edge-h: 6px; position: relative; width: 74px; height: 68px; border-radius: 50%; display: grid; place-items: center;
  color: var(--bn-fg-soft); background: var(--mp-lock); box-shadow: 0 var(--edge-h) 0 var(--edge), inset 0 0 0 2px var(--bn-line-strong);
  transition: transform .14s ease, box-shadow .14s ease; }
.mp .mp-ic { display: grid; place-items: center; line-height: 1; font-size: 26px; }
.mp .mp-ic svg { width: 30px; height: 30px; display: block; }
.mp .node:active .mp-coin { --edge-h: 1px; transform: translateY(5px); }
.mp .node:focus-visible .mp-coin { outline: 3px solid var(--bn-accent-text, #2BFFC6); outline-offset: 5px; }

.mp .node.done .mp-coin { --edge: var(--mp-a2); color: var(--mp-on);
  background: radial-gradient(circle at 32% 26%, rgba(255, 255, 255, .55), transparent 44%), var(--mp-a);
  box-shadow: 0 var(--edge-h) 0 var(--edge), 0 14px 24px -12px var(--mp-glow); }
.mp .node.done .mp-ic svg { width: 32px; height: 32px; }
.mp .node.current .mp-coin { --edge: var(--mp-a2); width: 86px; height: 80px; color: var(--mp-on);
  background: radial-gradient(circle at 32% 26%, rgba(255, 255, 255, .6), transparent 46%), var(--mp-a);
  box-shadow: 0 var(--edge-h) 0 var(--edge), 0 0 0 7px rgba(255, 255, 255, .07), 0 18px 34px -12px var(--mp-glow);
  box-shadow: 0 var(--edge-h) 0 var(--edge), 0 0 0 7px color-mix(in srgb, var(--mp-a) 22%, transparent), 0 18px 34px -12px var(--mp-glow); }
.mp .node.current .mp-ic svg { width: 36px; height: 36px; }
.mp .node.current .mp-coin::before, .mp .node.current .mp-coin::after { content: ""; position: absolute; inset: -7px; border-radius: 50%; border: 3px solid var(--mp-a); opacity: 0; pointer-events: none;
  animation: mpRing 2.6s cubic-bezier(.2, .6, .3, 1) infinite; }
.mp .node.current .mp-coin::after { animation-delay: 1.3s; }
.mp .node.premium-locked .mp-coin { --edge: #7a5400; color: #FFC94A; background: radial-gradient(circle at 32% 26%, rgba(255, 228, 150, .2), transparent 50%), linear-gradient(160deg, #2b2246, #1a1433);
  box-shadow: 0 var(--edge-h) 0 var(--edge), inset 0 0 0 2.5px rgba(255, 201, 74, .8), 0 12px 24px -14px rgba(255, 201, 74, .7); }
.mp .node.course-locked .mp-coin { --edge: #3f4a9e; color: #9aa8ff; box-shadow: 0 var(--edge-h) 0 var(--edge), inset 0 0 0 2.5px rgba(124, 140, 255, .8); }
.mp .node.soon .mp-coin { --edge: #5b2fa8; color: #e9d5ff; background: linear-gradient(150deg, rgba(139, 92, 246, .45), rgba(236, 72, 153, .3)), var(--mp-lock);
  box-shadow: 0 var(--edge-h) 0 var(--edge), inset 0 0 0 2px rgba(168, 85, 247, .6); }
html[data-theme="light"] .mp .node.premium-locked .mp-coin { color: #a87400; background: linear-gradient(160deg, #fff8e1, #ffefc2); }
html[data-theme="light"] .mp .node.course-locked .mp-coin { color: #4152c9; background: #eef0ff; }
.mp .node.boss .mp-coin { width: 88px; height: 80px; }
.mp .node.boss.current .mp-coin { width: 96px; height: 88px; }
.mp .node.boss .mp-ic svg { width: 38px; height: 38px; }
.mp .node.boss:not(.done):not(.current):not(.premium-locked) .mp-coin { color: #c9a24a; }
.mp .node.boss.done .mp-coin { --edge: #a87400; color: #5a3a00; background: radial-gradient(circle at 32% 26%, rgba(255, 255, 255, .6), transparent 44%), #FFC94A;
  box-shadow: 0 var(--edge-h) 0 var(--edge), 0 0 0 6px rgba(255, 201, 74, .2), 0 14px 28px -12px rgba(255, 201, 74, .8); }

.mp .node-premium-badge { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); z-index: 2; padding: 1px 9px; border-radius: 99px; white-space: nowrap;
  font-size: 10.5px; font-weight: 900; line-height: 1.7; color: #3a2700; background: #FFC94A; box-shadow: 0 4px 10px -4px rgba(0, 0, 0, .5); }
.mp .node.course-locked .node-premium-badge { background: #8f9cff; color: #0b0815; }

.mp .mp-stars { display: flex; gap: 1px; margin-top: -1px; }
.mp .mp-stars i { display: block; width: 13px; height: 13px; color: var(--bn-line-strong); }
.mp .mp-stars i.on { color: #FFC94A; }
.mp .mp-stars svg { width: 100%; height: 100%; display: block; }

.mp .node-label { max-width: 132px; text-align: center; line-height: 1.55; }
/* خطِ مسیر از زیرِ اسم‌ها رد می‌شه، نه از روشون */
.mp .node-label .t, .mp .node-label .s { width: fit-content; max-width: 100%; margin-inline: auto; padding: 0 7px; border-radius: 8px; background: var(--bg-void, #0B0815); }
.mp .node-label .t { font-size: 12.5px; font-weight: 800; color: var(--bn-fg); }
.mp .node-label .s { display: none; font-size: 11px; color: var(--bn-fg-soft); margin-top: 1px; }
.mp .node.locked:not(.premium-locked):not(.soon) .node-label .t { color: var(--bn-fg-soft); }
.mp .node.current .node-label .t { font-size: 13.5px; font-weight: 900; }
.mp .node.current .node-label .s { display: block; }
@media (min-width: 861px) {
  .mp .node, .mp .node-label { width: 150px; max-width: 150px; }
  .mp .node.done .node-label .s { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mp .node:hover .mp-coin { transform: translateY(-2px); }
  .mp .node:active .mp-coin { transform: translateY(5px); }
}

/* حبابِ «ادامه +XP» روی مرحله‌ی فعلی */
.mp-bub { position: absolute; bottom: calc(100% + 12px); left: 50%; z-index: 3; display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px 4px 4px; padding-inline-start: 4px; padding-inline-end: 12px; border-radius: 99px; white-space: nowrap; pointer-events: none;
  color: var(--bn-ink-fg, #0b0815); background: var(--bn-ink, #F5F3FF); box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .65);
  transform: translateX(calc(-50% + var(--bx, 0px))); animation: mpBob 1.9s ease-in-out infinite; }
.mp-bub::after { content: ""; position: absolute; top: 100%; left: calc(50% - var(--bx, 0px)); margin-left: -7px; border: 7px solid transparent; border-top-color: var(--bn-ink, #F5F3FF); }
.mp-bub-av { width: 26px; height: 26px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; flex-shrink: 0;
  font-size: 12px; font-weight: 900; color: #fff; background: linear-gradient(135deg, var(--fill-pink, #FF4FD8), var(--fill-blue, #6C8CFF)); }
.mp-bub-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mp-bub b { font-size: 13px; font-weight: 900; }
.mp-bub small { font-size: 11px; font-weight: 900; color: var(--mp-xp); }

/* ---------------- صندوقچه ---------------- */
.mp .mp-chest { --ch-a: #4a4268; --ch-b: #5b5380; --ch-band: #2e2846; --ch-plate: #8a82b0; position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 0; border: 0; background: none; font: inherit; color: var(--bn-fg); cursor: pointer; -webkit-tap-highlight-color: transparent; }
html[data-theme="light"] .mp .mp-chest { --ch-a: #cfc9e2; --ch-b: #ddd8ec; --ch-band: #a9a2c4; --ch-plate: #f2f0f8; }
.mp .mp-chest-art { position: relative; display: block; width: 70px; height: 62px; }
.mp .mp-chest-svg { width: 100%; height: 100%; overflow: visible; display: block; }
.mp-chest .a { fill: var(--ch-a); }
.mp-chest .b { fill: var(--ch-b); }
.mp-chest .band, .mp-chest .hole { fill: var(--ch-band); }
.mp-chest .plate { fill: var(--ch-plate); }
.mp-chest .hi { stroke: rgba(255, 255, 255, .4); }
.mp-chest .mp-ch-in { fill: #241500; }
.mp-chest .mp-ch-shadow { fill: rgba(0, 0, 0, .28); }
.mp-ch-lid { transform-box: fill-box; transform-origin: 0% 100%; transition: transform .6s var(--bn-spring, ease); }
.mp .mp-chest.is-ready, .mp .mp-chest.is-open { --ch-a: #FFC94A; --ch-b: #ffe08a; --ch-band: #9a6200; --ch-plate: #fff3c4; }
.mp .mp-chest.is-open .mp-ch-lid { transform: translate(-3px, -9px) rotate(-17deg); }
.mp .mp-chest.is-open .mp-chest-svg { opacity: .8; }
.mp .mp-chest.is-ready .mp-chest-art::before { content: ""; position: absolute; inset: -18px; z-index: -1; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 201, 74, .55), transparent 65%); animation: mpGlow 1.8s ease-in-out infinite; }
.mp .mp-chest.is-ready .mp-chest-svg { animation: mpChest 2.6s ease-in-out infinite; transform-origin: 50% 90%; }
.mp .mp-chest.is-shaking .mp-chest-svg { animation: mpShake .14s linear infinite; }
.mp .mp-chest.is-opening .mp-chest-art { animation: mpPop .7s var(--bn-spring, ease) both; }
.mp .mp-chest.is-opening .mp-chest-svg { opacity: 1; }
.mp .mp-chest.is-wait .mp-chest-svg { opacity: .55; }
.mp .mp-chest.is-locked .mp-chest-svg { opacity: .92; }
.mp .mp-chest.mp-pre .mp-chest-art { filter: grayscale(1) brightness(.75); }
.mp .mp-chest.mp-pre .mp-chest-art::before, .mp .mp-chest.mp-pre .mp-chest-tag { display: none; }
.mp .mp-chest.mp-pre .mp-chest-svg { animation: none; }
.mp .mp-chest.mp-arrive .mp-chest-art { animation: mpPop .8s var(--bn-spring, ease) both; }
.mp .mp-chest-tag { padding: 2px 10px; border-radius: 99px; white-space: nowrap; font-size: 11.5px; font-weight: 900; line-height: 1.7;
  color: var(--bn-fg-muted); background: var(--bn-surface); border: 1px solid var(--bn-line-strong); }
.mp .mp-chest-tag:empty { display: none; }
.mp .mp-chest.is-ready .mp-chest-tag { color: #3a2700; background: #FFC94A; border-color: transparent; animation: mpBobY 1.4s ease-in-out infinite; }
.mp .mp-chest.is-plus .mp-chest-tag { color: var(--bn-gold-text, #FFC94A); border-color: rgba(255, 201, 74, .5); }
.mp .mp-chest.is-open .mp-chest-tag { color: var(--bn-gold-text, #FFC94A); }
.mp .mp-chest:focus-visible .mp-chest-art { outline: 3px solid var(--bn-accent-text); outline-offset: 6px; border-radius: 16px; }
.mp-win { position: absolute; bottom: 100%; left: 50%; z-index: 5; display: inline-flex; align-items: center; gap: 4px; padding: 6px 14px; border-radius: 99px; white-space: nowrap; pointer-events: none;
  font-weight: 900; color: #3a2700; background: linear-gradient(135deg, #FFE08A, #FFC94A); box-shadow: 0 12px 30px -8px rgba(255, 201, 74, .9);
  width: max-content; transform: translateX(-50%); animation: mpWin 2s cubic-bezier(.2, .8, .2, 1) both; justify-content: center; }
.mp-win b { font-size: 20px; }
.mp-win svg { width: 20px; height: 20px; color: #0e7fa8; }
.mp-win small { width: 100%; text-align: center; font-size: 11.5px; }
.mp-win.is-big { padding: 8px 18px; flex-wrap: wrap; max-width: 190px; }
.mp-win.is-big b { font-size: 26px; }

/* ---------------- دروازه‌ی دنیای بعد ---------------- */
.mp .mp-gate { width: min(330px, 86vw); display: flex; flex-direction: column; align-items: center; gap: 3px; margin-top: 30px; padding: 0 18px 18px; text-align: center;
  border-radius: 26px; background: var(--bn-surface); border: 1.5px dashed var(--bn-line-strong); }
.mp .mp-gate-dot { width: 66px; height: 62px; margin: -33px 0 8px; border-radius: 50%; display: grid; place-items: center; color: var(--bn-fg-soft);
  background: var(--mp-lock); box-shadow: 0 6px 0 var(--mp-lock-edge), inset 0 0 0 2px var(--bn-line-strong); }
.mp .mp-gate-dot svg { width: 28px; height: 28px; }
.mp .mp-gate-emo { font-style: normal; font-size: 28px; line-height: 1; }
.mp .mp-gate-emo .bi { width: 30px; height: 30px; }
.mp .mp-gate small { font-size: 11.5px; font-weight: 800; color: var(--bn-fg-soft); }
.mp .mp-gate b { font-size: 16px; font-weight: 900; line-height: 1.6; }
.mp .mp-gate p { margin: 2px 0 6px; font-size: 12.5px; line-height: 1.8; color: var(--bn-fg-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mp .mp-gate em { font-style: normal; font-size: 12px; font-weight: 900; color: var(--bn-fg-muted); }
.mp .mp-gate-bar { display: block; width: 78%; height: 6px; margin: 4px 0 2px; border-radius: 99px; background: var(--bn-line-strong); overflow: hidden; }
.mp .mp-gate-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(to left, var(--mp-a), var(--mp-b)); }
.mp .mp-gate-btn { margin-top: 6px; padding: 10px 20px; border: 0; border-radius: 99px; font: inherit; font-size: 14px; font-weight: 900; cursor: pointer;
  color: var(--bn-ink-fg, #0b0815); background: var(--bn-ink, #F5F3FF); box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .6); transition: transform .3s var(--bn-spring, ease); }
.mp .mp-gate-btn:active { transform: scale(.95); }
.mp .mp-gate.is-open { border-style: solid; border-color: var(--mp-a); border-color: color-mix(in srgb, var(--mp-a) 60%, transparent); box-shadow: 0 20px 44px -26px var(--mp-glow); }
.mp .mp-gate.is-open .mp-gate-dot { color: var(--mp-on); background: radial-gradient(circle at 32% 26%, rgba(255, 255, 255, .55), transparent 44%), var(--mp-a); box-shadow: 0 6px 0 var(--mp-a2);
  box-shadow: 0 6px 0 var(--mp-a2), 0 0 0 7px color-mix(in srgb, var(--mp-a) 20%, transparent); }
.mp .mp-gate.is-locked { cursor: pointer; }
.mp .mp-gate.is-end .mp-gate-dot { color: #c9a24a; }
.mp .mp-gate.is-end.is-done { border-style: solid; border-color: rgba(255, 201, 74, .55); }
.mp .mp-gate.is-end.is-done .mp-gate-dot { color: #5a3a00; background: radial-gradient(circle at 32% 26%, rgba(255, 255, 255, .6), transparent 44%), #FFC94A; box-shadow: 0 6px 0 #a87400; }

/* ---------------- پنجره‌ی کوچیکِ ایستگاه ---------------- */
.mp-pop { position: absolute; z-index: 20; width: min(290px, calc(100% - 12px)); padding: 14px; border-radius: 20px; text-align: right;
  background: var(--bn-surface); border: 1px solid var(--bn-line-strong); box-shadow: 0 24px 54px -18px rgba(0, 0, 0, .6);
  opacity: 0; transform: translateY(-8px) scale(.96); transform-origin: var(--ax, 50%) 0; transition: opacity .18s ease, transform .4s var(--bn-spring, ease); }
.mp-pop.is-on { opacity: 1; transform: none; }
.mp-pop-arrow { position: absolute; top: -8px; left: var(--ax, 50%); width: 15px; height: 15px; margin-left: -7.5px; background: var(--bn-surface);
  border-top: 1px solid var(--bn-line-strong); border-left: 1px solid var(--bn-line-strong); transform: rotate(45deg); border-radius: 3px 0 0 0; }
.mp-pop-h { display: flex; align-items: center; gap: 10px; }
.mp-pop-h > div { min-width: 0; line-height: 1.55; }
.mp-pop-h b { display: block; font-size: 15px; font-weight: 900; }
.mp-pop-h small { display: block; font-size: 12px; color: var(--bn-fg-soft); }
.mp-pop-ic { width: 38px; height: 38px; flex-shrink: 0; border-radius: 12px; display: grid; place-items: center; color: var(--bn-fg-soft); background: var(--bn-surface-2); }
.mp-pop-ic svg { width: 20px; height: 20px; }
.mp-pop-ic.is-done { color: var(--mp-on, #053a2c); background: var(--mp-a, #2BFFC6); }
.mp-pop-stars { display: flex; justify-content: center; gap: 6px; margin: 12px 0 2px; }
.mp-pop-stars i { width: 30px; height: 30px; color: var(--bn-line-strong); }
.mp-pop-stars i.on { color: #FFC94A; filter: drop-shadow(0 3px 6px rgba(255, 201, 74, .5)); }
.mp-pop-stars svg { width: 100%; height: 100%; }
.mp-pop p { margin: 8px 0 10px; font-size: 13px; line-height: 1.9; color: var(--bn-fg-muted); text-align: center; }
.mp-pop-go { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 11px; border: 0; border-radius: 14px; font: inherit; font-size: 14px; font-weight: 900; cursor: pointer;
  color: var(--bn-ink-fg, #0b0815); background: var(--bn-ink, #F5F3FF); transition: transform .3s var(--bn-spring, ease); }
.mp-pop.is-done .mp-pop-go { color: var(--mp-on, #053a2c); background: var(--mp-a, #2BFFC6); box-shadow: 0 4px 0 var(--mp-a2, #10a37f); }
.mp-pop-go svg { width: 18px; height: 18px; }
.mp-pop-go:active { transform: scale(.97); }
.mp .node.is-pop .mp-coin { outline: 3px solid var(--bn-line-strong); outline: 3px solid color-mix(in srgb, var(--bn-fg) 30%, transparent); outline-offset: 4px; }

/* ---------------- «برو به مرحله‌ی فعلی» ---------------- */
.mp .bn-here { display: inline-flex; align-items: center; gap: 6px; position: fixed; z-index: 85; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom));
  transform: translate(-50%, 16px); opacity: 0; pointer-events: none; padding: 9px 16px 9px 14px; border: 0; border-radius: 99px; font: inherit; font-size: 13.5px; font-weight: 900; cursor: pointer;
  color: var(--mp-on); background: var(--mp-a); box-shadow: 0 4px 0 var(--mp-a2), 0 14px 28px -10px var(--mp-glow); transition: opacity .25s, transform .45s var(--bn-spring, ease); }
.mp .bn-here.is-on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.mp .bn-here-ar { display: grid; place-items: center; }
.mp .bn-here-ar svg { width: 17px; height: 17px; }
@media (min-width: 861px) { .mp .bn-here { bottom: 26px; left: calc(50% - 150px); } }

/* ---------------- ادامه از جایی که موندی ---------------- */
.mp .bn-continue { box-shadow: 0 16px 36px -22px var(--mp-glow); }

/* ---------------- برگشت از درس: پیشرفت جلوی چشم ---------------- */
.mp .node.done.mp-pre .mp-coin { --edge: var(--mp-lock-edge); color: transparent; background: var(--mp-lock); box-shadow: 0 var(--edge-h) 0 var(--edge), inset 0 0 0 2px var(--bn-line-strong); }
.mp .node.done.mp-pre .mp-stars { opacity: 0; }
.mp .node.mp-pop .mp-coin { animation: mpPop .7s var(--bn-spring, ease) both; }
.mp .node.mp-pop .mp-stars i { animation: mpStar .5s var(--bn-spring, ease) both; }
.mp .node.mp-pop .mp-stars i:nth-child(2) { animation-delay: .12s; }
.mp .node.mp-pop .mp-stars i:nth-child(3) { animation-delay: .24s; }
.mp .node.current.mp-pre-cur .mp-bub { opacity: 0; animation: none; }
.mp .node.current.mp-pre-cur .mp-coin { --edge: var(--mp-lock-edge); color: transparent; background: var(--mp-lock); box-shadow: 0 var(--edge-h) 0 var(--edge), inset 0 0 0 2px var(--bn-line-strong); }
.mp .node.current.mp-pre-cur .mp-coin::before, .mp .node.current.mp-pre-cur .mp-coin::after { animation: none; }
.mp .node.current.mp-arrive .mp-coin { animation: mpPop .75s var(--bn-spring, ease) both; }
.mp .node.current.mp-arrive .mp-bub { animation: mpBubIn .6s var(--bn-spring, ease) both; }

/* هایلایتِ جستجو (ux.js) و «برو به مرحله‌ی فعلی» */
.mp .node.bn-spot .mp-coin { animation: mpSpot 1.2s ease 2; }

.mp-wiggle { animation: mpWiggle .6s ease both; }
.stat-chip.mp-bump { animation: mpBump .4s var(--bn-spring, ease); }

/* جم‌هایی که از صندوقچه تا شمارنده‌ی بالا پرواز می‌کنن */
.mp-fly { position: fixed; z-index: 500; width: 24px; height: 24px; color: #4FE3FF; pointer-events: none; will-change: transform, opacity; filter: drop-shadow(0 4px 8px rgba(79, 227, 255, .55)); }
.mp-fly svg { width: 100%; height: 100%; display: block; }

/* ---------------- جشنِ تموم شدنِ دنیا ---------------- */
.mp-cele { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; padding: 20px; background: rgba(8, 5, 20, .74); opacity: 0; transition: opacity .3s ease; }
.mp-cele.is-on { opacity: 1; }
.mp-cele-card { position: relative; width: min(390px, 100%); padding: 30px 22px 16px; border-radius: 30px; text-align: center; overflow: hidden;
  background: var(--bn-surface); border: 1px solid var(--bn-line-strong); box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .75);
  transform: translateY(40px) scale(.9); transition: transform .65s var(--bn-spring, ease); }
.mp-cele.is-on .mp-cele-card { transform: none; }
.mp-cele-rays { position: absolute; left: 50%; top: 78px; width: 460px; height: 460px; margin: -230px 0 0 -230px; border-radius: 50%; pointer-events: none;
  background: repeating-conic-gradient(rgba(255, 201, 74, .18) 0 9deg, transparent 9deg 22deg);
  -webkit-mask: radial-gradient(circle, #000 22%, transparent 68%); mask: radial-gradient(circle, #000 22%, transparent 68%); animation: mpSpin 16s linear infinite; }
.mp-cele-trophy { position: relative; width: 98px; height: 98px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; color: #7a4b00;
  background: radial-gradient(circle at 34% 28%, #fff6cf, #FFC94A 46%, #e09a10); box-shadow: 0 8px 0 #a86b00, 0 22px 44px -10px rgba(255, 201, 74, .85);
  animation: mpTrophy .9s var(--bn-spring, ease) .15s both; }
.mp-cele-trophy svg { width: 56px; height: 56px; }
.mp-cele-card > small { position: relative; display: block; font-size: 13px; font-weight: 900; color: var(--bn-gold-text, #FFC94A); }
.mp-cele-card > b { position: relative; display: block; margin: 2px 0 12px; font-size: 21px; font-weight: 900; line-height: 1.6; }
.mp-cele-stats { position: relative; display: flex; justify-content: center; gap: 8px; margin-bottom: 12px; }
.mp-cele-stats span { flex: 1; max-width: 104px; padding: 8px 4px; border-radius: 16px; background: var(--bn-surface-2); line-height: 1.4; }
.mp-cele-stats b { display: block; font-size: 19px; font-weight: 900; }
.mp-cele-stats small { font-size: 11px; font-weight: 800; color: var(--bn-fg-soft); }
.mp-cele-card > p { position: relative; margin: 0 0 14px; font-size: 14px; line-height: 1.9; color: var(--bn-fg-muted); }
.mp-cele-card > .btn { position: relative; margin-top: 8px; }
.mp-cele-x { position: relative; margin-top: 8px; padding: 8px 16px; border: 0; background: none; font: inherit; font-size: 13px; font-weight: 800; color: var(--bn-fg-soft); cursor: pointer; }

/* ---------------- برگه‌ی انتخابِ هدفِ روزانه ---------------- */
.mp-goals { display: flex; flex-direction: column; gap: 8px; }
.mp-goals button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 18px; text-align: right; font: inherit; color: var(--bn-fg); cursor: pointer;
  background: var(--bn-surface-2); border: 1.5px solid transparent; transition: transform .3s var(--bn-spring, ease), border-color .2s; }
.mp-goals button:active { transform: scale(.98); }
.mp-goals button.is-on { border-color: var(--fill-teal, #2BFFC6); background: linear-gradient(135deg, rgba(43, 255, 198, .12), var(--bn-surface-2)); }
.mp-goals-n { width: 42px; height: 42px; flex-shrink: 0; border-radius: 14px; display: grid; place-items: center; font-size: 19px; font-weight: 900; background: var(--bn-surface); }
.mp-goals-t { flex: 1; line-height: 1.6; }
.mp-goals-t b { display: block; font-size: 15px; font-weight: 900; }
.mp-goals-t small { font-size: 12px; color: var(--bn-fg-soft); }
.mp-goals button > i { width: 24px; height: 24px; opacity: 0; color: var(--bn-accent-text); }
.mp-goals button.is-on > i { opacity: 1; }
.mp-goals button > i svg { width: 100%; height: 100%; }
.mp-goals-note { margin: 6px 4px 0; font-size: 12.5px; line-height: 1.9; color: var(--bn-fg-soft); }

/* ---------------- حرکت‌ها ---------------- */
@keyframes mpFlow { to { stroke-dashoffset: -18; } }
@keyframes mpRing { 0% { transform: scale(.92); opacity: .75; } 100% { transform: scale(1.55); opacity: 0; } }
@keyframes mpBob { 50% { transform: translateX(calc(-50% + var(--bx, 0px))) translateY(-5px); } }
@keyframes mpBobY { 50% { transform: translateY(-3px); } }
@keyframes mpBubIn { from { opacity: 0; transform: translateX(calc(-50% + var(--bx, 0px))) translateY(10px) scale(.6); } to { opacity: 1; transform: translateX(calc(-50% + var(--bx, 0px))); } }
@keyframes mpPop { 0% { transform: scale(.55); } 55% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes mpStar { from { transform: scale(0) rotate(-60deg); } to { transform: none; } }
@keyframes mpChest { 0%, 62%, 100% { transform: none; } 66% { transform: rotate(-8deg) scale(1.04); } 72% { transform: rotate(7deg) scale(1.04); } 78% { transform: rotate(-5deg); } 84% { transform: rotate(3deg); } }
@keyframes mpShake { 0% { transform: translateX(-2px) rotate(-3deg); } 50% { transform: translateX(2px) rotate(3deg); } 100% { transform: translateX(-2px) rotate(-3deg); } }
@keyframes mpGlow { 50% { opacity: .45; transform: scale(.9); } }
@keyframes mpWin { 0% { opacity: 0; transform: translateX(-50%) translateY(10px) scale(.6); } 15% { opacity: 1; transform: translateX(-50%) translateY(-6px) scale(1.08); } 75% { opacity: 1; transform: translateX(-50%) translateY(-26px) scale(1); } 100% { opacity: 0; transform: translateX(-50%) translateY(-46px) scale(.96); } }
@keyframes mpWiggle { 20% { transform: rotate(-9deg); } 40% { transform: rotate(8deg); } 60% { transform: rotate(-5deg); } 80% { transform: rotate(3deg); } }
@keyframes mpBump { 40% { transform: scale(1.16); } }
@keyframes mpSpot { 50% { transform: scale(1.12); } }
@keyframes mpFlick { 50% { transform: scale(1.08, .94) rotate(-3deg); opacity: .8; } }
@keyframes mpRisk { 50% { transform: scale(1.12); } }
@keyframes mpGift { 0%, 70%, 100% { transform: none; } 76% { transform: rotate(-12deg) scale(1.1); } 84% { transform: rotate(10deg) scale(1.1); } 92% { transform: rotate(-4deg); } }
@keyframes mpIgnite { 0% { transform: scale(.7); } 50% { transform: scale(1.22); } 100% { transform: none; } }
@keyframes mpSpin { to { transform: rotate(360deg); } }
@keyframes mpTrophy { 0% { transform: scale(.2) rotate(-40deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes mpIn { from { scale: .55; opacity: 0; } to { scale: 1; opacity: 1; } }
@keyframes mpLabelIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes mpDrift { from { translate: 0 60px; } to { translate: 0 -60px; } }

/* ورودِ ایستگاه‌ها با اسکرول (Scroll-driven Animations؛ فقط مرورگرهایی که دارنش — بقیه بدونِ افکت) */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    /* عمداً کم‌وزن (دو کلاس) تا انیمیشنِ حالت‌ها (تیک خوردن، باز شدنِ صندوقچه…) همیشه برنده باشن */
    .mp .mp-coin, .mp .mp-chest-art, .mp .mp-gate-dot { animation: mpIn linear both; animation-timeline: view(); animation-range: entry 0% entry 75%; }
    .mp .node-label { animation: mpLabelIn linear both; animation-timeline: view(); animation-range: entry 20% entry 90%; }
    .mp-decor span { animation: mpDrift linear both; animation-timeline: view(); }
  }
}

/* جابه‌جاییِ بینِ دنیاها (View Transitions) */
::view-transition-old(mp-path) { animation: mpVtOut .22s ease-in both; }
::view-transition-new(mp-path) { animation: mpVtIn .46s cubic-bezier(.2, .8, .2, 1) .04s both; }
::view-transition-group(mp-path) { animation-duration: .46s; }
@keyframes mpVtOut { to { opacity: 0; transform: translateY(-12px) scale(.98); } }
@keyframes mpVtIn { from { opacity: 0; transform: translateY(22px) scale(.98); } }

@media (prefers-reduced-motion: reduce) {
  .mp *, .mp *::before, .mp *::after, .mp-cele, .mp-cele *, .mp-fly, .mp-win { animation: none !important; transition: none !important; }
  .mp .path-wrap { view-transition-name: none; }
}
