/* Welcome missions card (home page) — uses the Pro theme tokens from theme-pro.css */
.blk-missions[hidden] { display: none !important; }
.ms-sec-ic { color: var(--pb-acc); margin-inline-end: 4px; }
.ms-count { color: var(--pb-t2); font-size: .74rem; font-weight: 600; background: var(--pb-card); border: 1px solid var(--pb-line); border-radius: 8px; padding: 2px 8px; direction: ltr; unicode-bidi: isolate; }
.ms-wrap { display: flex; flex-direction: column; gap: 10px; }

.ms-card { background: var(--pb-card); border: 1px solid var(--pb-line); border-radius: var(--pb-r, 16px); padding: 14px; display: flex; flex-direction: column; gap: 11px; }
.ms-card.ms-on { border-color: rgba(14,203,129,.45); background: linear-gradient(180deg, rgba(14,203,129,.08), var(--pb-card) 58%); }
.ms-card.ms-gold { border-color: rgba(240,185,11,.45); background: linear-gradient(180deg, rgba(240,185,11,.08), var(--pb-card) 58%); }
.ms-card.ms-done { flex-direction: row; align-items: center; gap: 10px; padding: 11px 14px; color: var(--pb-acc); font-size: .8rem; font-weight: 600; border-color: rgba(14,203,129,.28); }
.ms-card.ms-done i { font-size: 1rem; }

.ms-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.ms-ttl { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ms-ttl small { color: var(--pb-t3); font-size: .68rem; font-weight: 600; }
.ms-ttl b { color: var(--pb-t1); font-size: .92rem; line-height: 1.45; }
.ms-rw { flex-shrink: 0; background: var(--pb-acc); color: var(--pb-on-acc); font-weight: 700; font-size: .92rem; border-radius: 9px; padding: 4px 10px; direction: ltr; unicode-bidi: isolate; }
.ms-rw.gold { background: var(--pb-warn); color: #1b1400; }
.ms-desc { margin: 0; color: var(--pb-t2); font-size: .76rem; line-height: 1.7; }

.ms-prog { display: flex; flex-direction: column; gap: 7px; }
.ms-prog-row { display: flex; justify-content: space-between; color: var(--pb-t2); font-size: .74rem; }
.ms-prog-row b { color: var(--pb-t1); font-weight: 600; direction: ltr; unicode-bidi: isolate; }
.ms-slots { display: flex; gap: 8px; }
.ms-slot { flex: 1; min-width: 0; height: 36px; border-radius: 10px; border: 1px dashed var(--pb-line2); display: grid; place-items: center; color: var(--pb-t3); font-size: .72rem; }
.ms-slot.on { border-style: solid; border-color: rgba(14,203,129,.5); background: var(--pb-acc-soft); color: var(--pb-acc); font-weight: 600; }
.ms-bar { height: 7px; border-radius: 99px; background: var(--pb-card2); overflow: hidden; }
.ms-bar i { display: block; height: 100%; background: var(--pb-acc); border-radius: 99px; }

.ms-link { display: flex; align-items: center; gap: 8px; background: var(--pb-bg2); border: 1px solid var(--pb-line); border-radius: 11px; padding: 8px 10px; }
.ms-link span { flex: 1; min-width: 0; color: var(--pb-t2); font-size: .74rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.ms-link .ms-code-lbl { flex: 0 0 auto; color: var(--pb-t2); font-size: .74rem; }
.ms-link .ms-code { flex: 1; color: var(--pb-t1); font-size: .95rem; font-weight: 700; letter-spacing: .5px; text-align: start; }
.ms-copy { flex-shrink: 0; background: var(--pb-acc-soft); color: var(--pb-acc); border: 1px solid rgba(14,203,129,.35); border-radius: 8px; padding: 5px 12px; font-size: .74rem; font-weight: 700; cursor: pointer; }
.ms-copy.ok { background: var(--pb-acc); color: var(--pb-on-acc); }

.ms-share { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.ms-share a, .ms-share button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 2px; border-radius: 10px; background: var(--pb-card2); border: 1px solid var(--pb-line); color: var(--pb-t2); font-size: .66rem; text-decoration: none; cursor: pointer; font-family: inherit; }
.ms-share i { font-size: 1.05rem; color: var(--pb-t1); }
.ms-share a:hover, .ms-share button:hover { border-color: var(--pb-line2); color: var(--pb-t1); }
.ms-share span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }

.ms-cta { height: 46px; border: 0; border-radius: 12px; background: var(--pb-warn); color: #1b1400; font-weight: 700; font-size: .9rem; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; font-family: inherit; }
.ms-cta:hover { filter: brightness(1.08); }
.ms-copy:focus-visible, .ms-share a:focus-visible, .ms-share button:focus-visible, .ms-cta:focus-visible { outline: 2px solid var(--pb-acc); outline-offset: 2px; }

@media (prefers-reduced-motion: no-preference) {
  .ms-enter { animation: msIn .45s ease both; }
  @keyframes msIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}

/* desktop: the missions block spans the full width at the top of the home grid */
@media (min-width: 1100px) {
  #pageDashboard .blk-missions { grid-column: 1 / -1; }
  #pageDashboard .blk-missions .pro-sec { margin-top: 0; }
  .ms-wrap { flex-direction: row; align-items: stretch; }
  .ms-wrap > .ms-card { flex: 1; min-width: 0; }
  .ms-wrap > .ms-card.ms-done { flex: 0 0 auto; align-self: flex-start; max-width: 40%; }
}

/* ---------- sign-up details: inviter code field / linked confirmation (signup-steps.js) ---------- */
#bfsRefWrap[hidden], .bfs-ref-ok[hidden] { display: none !important; }
.bfa #bfsRef { text-align: left; letter-spacing: .5px; text-transform: uppercase; }
.bfs-ref-ok { display: flex; align-items: center; gap: 8px; margin: 0 0 18px; padding: 11px 13px; border-radius: 10px;
  background: rgba(14,203,129,.08); border: 1px solid rgba(14,203,129,.3); color: #0ecb81; font-size: .84rem; font-weight: 600; }
.bfs-ref-ok i { font-size: 1rem; }

/* ---------- on-screen popup: new member joined / mission complete ---------- */
.ms-pop-ov {
  position: fixed; inset: 0; z-index: 12000; display: grid; place-items: center;
  padding: max(16px, env(safe-area-inset-top, 0px)) 16px max(16px, env(safe-area-inset-bottom, 0px));
  background: rgba(5, 7, 9, .72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .25s ease;
}
.ms-pop-ov.show { opacity: 1; }
.ms-pop {
  position: relative; width: min(360px, 100%); overflow: hidden;
  background: var(--pb-card); border: 1px solid rgba(14,203,129,.4); border-radius: 22px;
  padding: 26px 20px 18px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px;
  box-shadow: 0 30px 70px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.03) inset;
  transform: translateY(14px) scale(.96); transition: transform .3s cubic-bezier(.2,.9,.3,1.2);
}
.ms-pop-ov.show .ms-pop { transform: none; }
.ms-pop::before { content: ''; position: absolute; top: -90px; left: 50%; width: 260px; height: 200px; transform: translateX(-50%); background: radial-gradient(circle, rgba(14,203,129,.22), transparent 70%); pointer-events: none; }
.ms-pop.win { border-color: rgba(240,185,11,.45); }
.ms-pop.win::before { background: radial-gradient(circle, rgba(240,185,11,.22), transparent 70%); }
.ms-pop-x { position: absolute; top: 10px; inset-inline-end: 10px; width: 32px; height: 32px; border-radius: 10px; border: 0; background: var(--pb-card2); color: var(--pb-t2); cursor: pointer; }
.ms-pop-ic { position: relative; width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; font-size: 1.6rem; background: var(--pb-acc-soft); color: var(--pb-acc); border: 1px solid rgba(14,203,129,.35); }
.ms-pop.win .ms-pop-ic { background: rgba(240,185,11,.14); color: var(--pb-warn); border-color: rgba(240,185,11,.4); }
.ms-pop-t { position: relative; color: var(--pb-t1); font-size: 1.05rem; line-height: 1.5; }
.ms-pop-p { position: relative; margin: 0; color: var(--pb-t2); font-size: .82rem; line-height: 1.75; }
.ms-pop-amount { position: relative; font-size: 2.1rem; font-weight: 700; color: var(--pb-acc); direction: ltr; unicode-bidi: isolate; }
.ms-pop-slots { display: flex; gap: 10px; justify-content: center; margin: 2px 0; }
.ms-pop-slots i { width: 40px; height: 40px; border-radius: 50%; border: 2px dashed var(--pb-line2); display: grid; place-items: center; color: var(--pb-on-acc); font-size: .85rem; }
.ms-pop-slots i.on { border: 0; background: var(--pb-acc); box-shadow: 0 0 0 4px var(--pb-acc-soft); }
.ms-pop-acts { position: relative; width: 100%; display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.ms-pop-btn { height: 46px; border-radius: 12px; border: 1px solid var(--pb-line2); background: var(--pb-card2); color: var(--pb-t1); font-weight: 700; font-size: .9rem; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; font-family: inherit; }
.ms-pop-btn.main { background: var(--pb-acc); color: var(--pb-on-acc); border-color: transparent; }
.ms-pop-btn:focus-visible, .ms-pop-x:focus-visible { outline: 2px solid var(--pb-acc); outline-offset: 2px; }
.ms-confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.ms-confetti span { position: absolute; top: -12px; left: var(--x); width: 7px; height: 12px; border-radius: 2px; background: var(--c); opacity: 0; }

@media (prefers-reduced-motion: no-preference) {
  .ms-pop-ov.show .ms-pop-ic { animation: msPopIc .6s cubic-bezier(.2,.9,.3,1.4) .1s both; }
  @keyframes msPopIc { from { transform: scale(.4) rotate(-12deg); opacity: 0; } to { transform: none; opacity: 1; } }
  .ms-pop-ov.show .ms-pop-slots i.on { animation: msSlot .45s ease var(--d) both; }
  @keyframes msSlot { from { transform: scale(.3); opacity: 0; } 70% { transform: scale(1.15); } to { transform: none; opacity: 1; } }
  .ms-pop-ov.show .ms-pop-amount { animation: msAmt .7s cubic-bezier(.2,.9,.3,1.3) .2s both; }
  @keyframes msAmt { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
  .ms-pop-ov.show .ms-confetti span { animation: msFall 1.8s ease-in var(--d) both; }
  @keyframes msFall { 0% { opacity: 1; transform: translateY(0) rotate(0); } 100% { opacity: 0; transform: translateY(330px) rotate(540deg); } }
}

/* ---------- compact strip at the top of the wallet page (opens the full card in a sheet) ---------- */
#pageDashboard .blk-missions { margin-bottom: 12px; }
.ms-strip { width: 100%; display: flex; align-items: center; gap: 12px; text-align: start; cursor: pointer; font-family: inherit; color: var(--pb-t1);
  padding: 11px 14px; border-radius: 16px; border: 1px solid rgba(14,203,129,.35); position: relative; overflow: hidden;
  background: linear-gradient(100deg, rgba(14,203,129,.16), rgba(14,203,129,.04) 55%, var(--pb-card)); transition: transform .12s, border-color .15s; }
.ms-strip:active { transform: scale(.985); }
.ms-strip:hover { border-color: rgba(14,203,129,.6); }
.ms-strip::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.08) 50%, transparent 70%);
  transform: translateX(-120%); animation: msShine 4.5s ease-in-out infinite 1.5s; pointer-events: none; }
@keyframes msShine { 0%, 70% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
.ms-strip-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; font-size: 17px;
  background: var(--pb-acc, #0ecb81); color: #06140d; animation: msWiggle 3.5s ease-in-out infinite; }
@keyframes msWiggle { 0%, 88%, 100% { transform: rotate(0); } 91% { transform: rotate(-12deg); } 94% { transform: rotate(10deg); } 97% { transform: rotate(-6deg); } }
.ms-strip-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ms-strip-tx > b { font-size: .86rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-strip-tx small { font-size: .72rem; color: var(--pb-t2); display: flex; gap: 4px; align-items: center; }
.ms-strip-tx small b { color: var(--pb-t1); direction: ltr; unicode-bidi: isolate; }
.ms-strip-bar { height: 4px; border-radius: 4px; background: rgba(255,255,255,.08); overflow: hidden; }
.ms-strip-bar i { display: block; height: 100%; border-radius: 4px; background: var(--pb-acc, #0ecb81); transition: width .4s; }
.ms-strip-rw { font-weight: 700; font-size: .95rem; color: var(--pb-acc, #0ecb81); background: rgba(14,203,129,.12); border-radius: 999px; padding: 4px 10px; flex: none; }
.ms-strip-go { color: var(--pb-t3); font-size: .75rem; flex: none; }
html[dir="ltr"] .ms-strip-go { transform: scaleX(-1); }
.ms-strip.gold { border-color: rgba(240,185,11,.4); background: linear-gradient(100deg, rgba(240,185,11,.16), rgba(240,185,11,.04) 55%, var(--pb-card)); }
.ms-strip.gold .ms-strip-ic { background: var(--pb-warn, #f0b90b); color: #1a1300; }
.ms-strip.gold .ms-strip-rw { color: var(--pb-warn, #f0b90b); background: rgba(240,185,11,.12); }
@media (prefers-reduced-motion: reduce) { .ms-strip::after, .ms-strip-ic { animation: none; } }

.ms-sheet-ov { position: fixed; inset: 0; z-index: 10002; background: rgba(0,0,0,.65); display: flex; align-items: flex-end; justify-content: center; opacity: 0; transition: opacity .3s ease; }
.ms-sheet-ov.show { opacity: 1; }
.ms-sheet { width: 100%; max-width: 520px; max-height: 88vh; overflow-y: auto; background: var(--pb-bg2, #0f1317); border-radius: 22px 22px 0 0;
  padding: 10px 14px calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateY(100%); transition: transform .34s cubic-bezier(.32,.72,0,1); will-change: transform; }
.ms-sheet-ov.show .ms-sheet { transform: none; }
.ms-sheet-grab { width: 36px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.14); margin: 0 auto 10px; }
.ms-sheet-h { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.ms-sheet-h > b { flex: 1; font-size: 1rem; }
.ms-sheet-x { width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--pb-card); color: var(--pb-t1); cursor: pointer; display: grid; place-items: center; }
