/* RIPPLEX member dashboard: phone app shell (<= 760px). Loaded after ripplex-ux.css; wider screens are unchanged.
   App bar on top, a wallet card on Home, swipeable earnings, a floating tab bar with a raised Engine button,
   bottom sheets for every popup, page transitions and pull to refresh (ripplex-mobile.js). */
:root {
  --m-bg: #070a14; --m-card: #0e1424; --m-card-2: #121a2e; --m-line: #ffffff14; --m-text: #eef4ff; --m-mut: #8f9bb8;
  --m-cyan: #00e5ff; --m-blue: #0084ff; --m-deep: #0050f0; --m-ok: #22e3a0;
  --m-ease: cubic-bezier(.2, .8, .2, 1); --m-bar: 64px;
}
.mh, .mh-sec, .m-title, .m-ptr { display: none; }

@media (max-width: 760px) {
  body.app-page { background: var(--m-bg); -webkit-tap-highlight-color: transparent; }
  .app-page .app-main { padding-bottom: 0; }
  .app-content { padding: 6px 14px calc(var(--m-bar) + 40px + env(safe-area-inset-bottom)) !important; display: grid; gap: 14px; }
  .app-content > * { margin-top: 0 !important; margin-bottom: 0 !important; }

  /* ---------- top: compact app bar ---------- */
  .app-page .app-topbar { position: sticky; top: 0; z-index: 40; display: flex; flex-wrap: nowrap !important; align-items: center; gap: 8px; min-height: 0 !important;
    padding: calc(8px + env(safe-area-inset-top, 0px)) 14px 8px !important; background: #070a14d9; backdrop-filter: saturate(1.4) blur(16px); -webkit-backdrop-filter: saturate(1.4) blur(16px);
    border-bottom: 1px solid transparent; transition: border-color .25s, background-color .25s; }
  body.m-scrolled .app-page .app-topbar, body.m-scrolled.app-page .app-topbar { border-bottom-color: var(--m-line); }
  .app-page .m-logo { margin-right: 0; flex: none; transition: opacity .2s, transform .25s var(--m-ease); }
  .app-page .m-logo img { width: 104px; }
  .m-title { display: block; flex: 1; min-width: 0; font-weight: 800; font-size: 16px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .25s var(--m-ease); }
  body.m-scrolled .m-title:not(:empty) { opacity: 1; transform: none; }
  body.m-scrolled.m-has-title .m-logo { opacity: 0; transform: scale(.9); width: 0; overflow: hidden; }
  .tb-sum, .tb-walletbal { display: none !important; }
  .app-page .topbar-actions { margin-left: auto !important; gap: 8px; }
  .app-page .topbar-actions [data-act="reload"] { display: grid !important; width: 38px; height: 38px; border-radius: 12px; background: #ffffff0d; border: 1px solid var(--m-line); }
  .app-page .topbar-actions .button-wallet { height: 38px !important; padding: 0 12px 0 8px !important; border-radius: 12px !important; font-size: 12.5px !important; gap: 7px; }
  .app-page .topbar-actions .button-wallet .wallet-symbol { width: 24px; height: 24px; }

  /* page headings: the big title scrolls away, the app bar takes it over */
  .pg-head { gap: 2px; padding: 4px 2px 0; }
  .pg-head .pg-back { display: none; }
  .pg-head h1 { font-size: 30px !important; letter-spacing: -.02em; line-height: 1.1; }

  /* ---------- Home: wallet card ---------- */
  .mh { display: grid; gap: 12px; }
  .mh-card { position: relative; overflow: hidden; display: grid; gap: 4px; padding: 16px 16px 14px; border-radius: 24px; isolation: isolate;
    background: radial-gradient(120% 90% at 100% 0%, #00e5ff38, transparent 55%), radial-gradient(90% 80% at 0% 100%, #0050f066, transparent 60%), linear-gradient(150deg, #10224a, #0a1124 60%);
    border: 1px solid #00e5ff2e; box-shadow: 0 18px 40px -18px #0084ffaa, inset 0 1px 0 #ffffff1f; }
  .mh-card::after { content: ''; position: absolute; inset: -40% -60%; z-index: -1; background: linear-gradient(105deg, transparent 42%, #ffffff12 50%, transparent 58%); animation: mh-sheen 6s ease-in-out infinite; }
  .mh-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
  .mh-who { display: flex; align-items: center; gap: 9px; min-width: 0; }
  .mh-who > span:last-child { display: grid; min-width: 0; }
  .mh-who b { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mh-who small { font-size: 11px; color: #a9c6ee; letter-spacing: .04em; }
  .mh-eng { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 99px; background: #ffffff14; border: 1px solid #ffffff1f; font-size: 12px; font-weight: 700; white-space: nowrap; }
  .mh-eng img { width: 28px; height: auto; filter: drop-shadow(0 0 6px #00e5ff88); }
  .mh-k { font-size: 12px; color: #a9c6ee; font-weight: 600; }
  .mh-amt { display: flex; align-items: baseline; gap: 8px; font-size: 40px; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; font-variant-numeric: tabular-nums; }
  .mh-amt em { font-style: normal; font-size: 14px; font-weight: 700; color: #a9c6ee; letter-spacing: 0; }
  .mh-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid #ffffff1a; }
  .mh-row span { display: grid; gap: 1px; min-width: 0; }
  .mh-row small { font-size: 10.5px; color: #a9c6ee; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mh-row b { font-size: 15px; font-variant-numeric: tabular-nums; }
  .mh-prog { display: grid; gap: 6px; margin-top: 12px; }
  .mh-prog > div { display: flex; justify-content: space-between; gap: 8px; }
  .mh-prog small { font-size: 11px; color: #cfe3ff; font-variant-numeric: tabular-nums; }
  .mh-prog i { display: block; height: 6px; border-radius: 6px; background: #ffffff1a; overflow: hidden; }
  .mh-prog i em { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--m-deep), var(--m-cyan)); box-shadow: 0 0 12px #00e5ffaa; transform-origin: left; animation: mh-grow .9s var(--m-ease) both; }
  .mh-max small { color: var(--m-ok); }
  .mh-acts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .mh-act { text-decoration: none; display: grid; justify-items: center; gap: 6px; padding: 10px 2px 8px; border-radius: 18px; border: 1px solid var(--m-line); background: var(--m-card); color: var(--m-text);
    font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; transition: transform .15s var(--m-ease), background-color .2s; }
  .mh-act span { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; background: linear-gradient(145deg, #0084ff33, #00e5ff1f); color: #7df3ff; }
  .mh-act .ic { width: 20px; height: 20px; }
  .mh-act:first-child span { background: linear-gradient(140deg, var(--m-deep), var(--m-blue) 60%, var(--m-cyan)); color: #fff; box-shadow: 0 8px 18px -8px #0084ff; }
  .mh-act:active { transform: scale(.94); }
  .mh-act:disabled { opacity: .45; }
  .mh-sec { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: -6px !important; padding: 0 2px; }
  .mh-sec h2 { margin: 0; font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
  .mh-sec a { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; font-weight: 700; color: #33c6ff; text-decoration: none; }
  .mh-sec a .ic { width: 14px; height: 14px; }

  /* ---------- earnings: one swipeable row of cards ---------- */
  .rc-grid.rc-wide, .rc-grid.rc-wide.rc-five { display: flex !important; gap: 10px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding: 0 14px;
    margin: 0 -14px !important; padding: 2px 14px 6px; scrollbar-width: none; }
  .rc-grid.rc-wide::-webkit-scrollbar { display: none; }
  .rc-grid.rc-wide .rc { flex: 0 0 158px; scroll-snap-align: start; padding: 12px !important; border-radius: 20px !important; min-height: 0; }
  .rc-grid.rc-wide .rc .rc-amt { font-size: 23px !important; }
  .rc-grid.rc-wide .rc .rc-foot { font-size: 11px; }
  .rc-grid.rc-wide .rc:active { transform: scale(.97); }

  /* ---------- panels: app cards ---------- */
  .app-content .panel, .app-content .ra-section, .app-content .ip, .app-content .eng-card, .app-content .gd, .app-content .ux-miles { border-radius: 22px !important; }
  .app-content .panel { padding: 16px !important; }
  .panel-head { flex-wrap: wrap; gap: 10px; }
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px; }
  .ra-table { font-size: 12.5px; }
  .eng-card { padding: 16px !important; }
  .eng-stage { height: 190px !important; }

  /* ---------- Team: tabs, matrix levels as a strip ---------- */
  .tm-tabs { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
  .tm-tabs button { padding: 8px 4px !important; font-size: 12.5px !important; }
  #team .panel-head { display: grid; }
  .network-summary { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap !important; margin: 0 -4px; padding: 0 4px; }
  .network-summary > span { flex: none; padding: 6px 10px; border-radius: 99px; background: #ffffff0a; border: 1px solid var(--m-line); font-size: 12px; white-space: nowrap; }
  .mx-zone { display: flex !important; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 10px -16px !important; padding: 0 16px 4px; }
  .mx-zone .mx-lv { flex: 0 0 104px; scroll-snap-align: start; }
  .mx-tools { flex-wrap: wrap; }
  .oc-wrap { border-radius: 18px; }

  /* ---------- floating tab bar with the raised Engine button ---------- */
  .ux-bottom.mtab { position: fixed; z-index: 50; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: end;
    height: var(--m-bar); padding: 0 6px; border-radius: 24px; background: #0b1120e6; backdrop-filter: saturate(1.5) blur(18px); -webkit-backdrop-filter: saturate(1.5) blur(18px);
    border: 1px solid #ffffff17; box-shadow: 0 18px 40px -12px #000000cc, inset 0 1px 0 #ffffff12; border-top: 1px solid #ffffff17; transition: transform .3s var(--m-ease); }
  body.m-hide-bar .ux-bottom.mtab { transform: translateY(calc(100% + 24px)); }
  .mtab > a, .mtab > button:not(.mtab-fab) { position: relative; z-index: 1; display: grid; justify-items: center; align-content: center; gap: 3px; height: 100%; padding: 0; border: 0; background: none;
    color: var(--m-mut); text-decoration: none; font: inherit; font-size: 10.5px; font-weight: 700; cursor: pointer; border-radius: 16px; transition: color .2s; }
  .mtab > a b, .mtab > button b { font-weight: 700; }
  .mtab > a span, .mtab > button:not(.mtab-fab) span { display: grid; place-items: center; height: 24px; transition: transform .3s var(--m-ease); }
  .mtab .ic { width: 22px; height: 22px; }
  .mtab > a.active { color: #fff; }
  .mtab > a.active span { transform: translateY(-1px) scale(1.08); color: var(--m-cyan); }
  .mtab-glow { position: absolute; z-index: 0; top: 8px; left: 0; width: 54px; height: calc(var(--m-bar) - 16px); border-radius: 16px; pointer-events: none;
    background: radial-gradient(80% 100% at 50% 0%, #00e5ff2e, #0084ff14 70%); border: 1px solid #00e5ff2e; opacity: 0;
    transform: translateX(var(--glow-x, 0px)); transition: transform .38s var(--m-ease), opacity .25s; }
  .mtab.has-active .mtab-glow { opacity: 1; }
  .mtab-fab { position: relative; z-index: 2; display: grid; justify-items: center; gap: 4px; height: 100%; padding: 0; border: 0; background: none; color: #fff; font: inherit; font-size: 10.5px; font-weight: 800; cursor: pointer; }
  .mtab-fab-in { display: grid; place-items: center; width: 56px; height: 56px; margin-top: -24px; border-radius: 20px; color: #fff;
    background: linear-gradient(140deg, var(--m-deep), var(--m-blue) 55%, var(--m-cyan)); box-shadow: 0 12px 26px -8px #0084ffcc, 0 0 0 5px var(--m-bg), inset 0 1px 0 #ffffff55;
    transition: transform .2s var(--m-ease), box-shadow .2s; animation: fab-breathe 3.2s ease-in-out infinite; }
  .mtab-fab-in .ic { width: 26px; height: 26px; }
  .mtab-fab[data-mode="invest"] .mtab-fab-in { background: linear-gradient(140deg, #059669, #10b981 55%, #34d399); box-shadow: 0 12px 26px -8px #10b981cc, 0 0 0 5px var(--m-bg), inset 0 1px 0 #ffffff55; }
  .mtab-fab:active .mtab-fab-in { transform: scale(.92) rotate(-6deg); }
  .mtab .tap { animation: tab-pop .35s var(--m-ease); }

  /* ---------- More: bottom sheet ---------- */
  .m-sheet { align-items: flex-end; background: #02040a99 !important; backdrop-filter: blur(6px); animation: m-fade .2s ease-out; }
  .m-sheet-in { border-radius: 26px 26px 0 0 !important; border: 1px solid #ffffff17 !important; border-bottom: 0 !important; background: var(--m-card) !important;
    padding: 10px 16px calc(22px + env(safe-area-inset-bottom)) !important; animation: sheet-up .32s var(--m-ease) !important; }
  .m-sheet-in::before { content: ''; display: block; width: 40px; height: 5px; margin: 0 auto 10px; border-radius: 5px; background: #ffffff33; }
  .m-sheet-grid a { border-radius: 18px !important; transition: transform .15s var(--m-ease); }
  .m-sheet-grid a:active { transform: scale(.95); }

  /* ---------- every popup slides up from the bottom ---------- */
  dialog.txf, dialog.inv-dlg { position: fixed; inset: auto 0 0 0; margin: 0 !important; width: 100% !important; max-width: 100% !important; max-height: 92vh; overflow-y: auto;
    border-radius: 26px 26px 0 0 !important; border-left: 0 !important; border-right: 0 !important; border-bottom: 0 !important;
    padding-bottom: env(safe-area-inset-bottom) !important; box-shadow: 0 -20px 60px #000c !important; }
  dialog.inv-dlg { padding: 18px 18px calc(18px + env(safe-area-inset-bottom)) !important; }
  dialog.txf[open], dialog.inv-dlg[open] { animation: sheet-up .34s var(--m-ease); }
  dialog.txf::before, dialog.inv-dlg::before { content: ''; display: block; width: 40px; height: 5px; margin: 10px auto 0; border-radius: 5px; background: #ffffff33; }
  dialog.inv-dlg::before { margin: -6px auto 10px; }
  dialog.txf::backdrop, dialog.inv-dlg::backdrop { background: #02040aa6; backdrop-filter: blur(6px); }
  .txf-in { padding: 14px 18px 20px !important; }
  .rxw-back { align-items: flex-end !important; padding: 0 !important; }
  .rxw-back .rxw { width: 100% !important; max-width: none !important; border-radius: 26px 26px 0 0 !important; max-height: 88vh; padding-bottom: calc(18px + env(safe-area-inset-bottom)) !important; animation: sheet-up .32s var(--m-ease); }

  /* ---------- toasts float above the tab bar ---------- */
  .toast { left: 14px !important; right: 14px !important; bottom: calc(var(--m-bar) + 22px + env(safe-area-inset-bottom)) !important; top: auto !important; max-width: none !important; transform: none; border-radius: 16px !important; }

  /* ---------- page change: slide in from the side of the tab you came from ---------- */
  #app.pg-in-r > *, #app.pg-in-l > *, #app.pg-in-up > * { animation-duration: .42s; animation-timing-function: var(--m-ease); animation-fill-mode: both; animation-delay: calc(min(var(--i, 0), 7) * 35ms); }
  #app.pg-in-r > * { animation-name: pg-in-r; }
  #app.pg-in-l > * { animation-name: pg-in-l; }
  #app.pg-in-up > * { animation-name: pg-in-up; }

  /* ---------- pull to refresh ---------- */
  .m-ptr { display: grid; place-items: center; position: fixed; z-index: 45; left: 50%; top: calc(56px + env(safe-area-inset-top, 0px)); width: 40px; height: 40px; margin-left: -20px; border-radius: 50%;
    background: var(--m-card-2); border: 1px solid #00e5ff44; box-shadow: 0 10px 24px -8px #000; opacity: 0; transform: translateY(-50px) scale(.6); pointer-events: none; }
  .m-ptr span { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid #00e5ff33; border-top-color: var(--m-cyan); transform: rotate(var(--ptr-r, 0deg)); }
  .m-ptr.on { transition: none; }
  .m-ptr.go { opacity: 1 !important; transform: translateY(0) scale(1) !important; transition: transform .25s var(--m-ease), opacity .2s; }
  .m-ptr.go span { animation: ptr-spin .8s linear infinite; }
  .m-ptr.out { opacity: 0 !important; transform: translateY(-50px) scale(.6) !important; transition: transform .3s var(--m-ease), opacity .3s; }

  /* fixes over older phone rules */
  .mtab .mtab-fab .mtab-fab-in { width: 56px; height: 56px; }
  .mtab > a.active, .ux-bottom.mtab a.active { background: none !important; }
  .app-page .topbar-actions [data-act="reload"] { place-items: center; padding: 0; color: #cfe3ff; }
  .app-page .topbar-actions [data-act="reload"] .ic { width: 18px; height: 18px; }
  .tm-tabs { justify-self: stretch; width: 100% !important; }

  /* Team trees on phones: a vertical, indented tree (no sideways scrolling) */
  .oc-wrap { padding: 12px 10px 14px !important; overflow-x: hidden !important; }
  .oc-up { align-items: stretch !important; width: auto !important; min-width: 0 !important; gap: 6px !important; margin-bottom: 10px !important; }
  .oc-pill { align-self: flex-start; } .oc-pill::after { display: none !important; }
  .oc, .oc ul { display: block !important; width: auto !important; min-width: 0 !important; }
  .oc ul { position: relative; margin: 0 0 0 16px !important; padding: 10px 0 0 14px !important; border-left: 2px solid #0084ff44; }
  .oc ul::before, .oc li::before { display: none !important; }
  .oc li { display: block !important; position: relative; padding: 0 0 10px !important; }
  .oc li::after { content: '' !important; display: block !important; position: absolute; left: -14px !important; top: 26px !important; width: 12px !important; height: 0 !important;
    border-top: 2px solid #0084ff44 !important; border-left: 0 !important; border-radius: 0 !important; }
  .oc > li::after { display: none !important; }
  .oc li:last-child { padding-bottom: 0 !important; }
  #team .oc-card.oc-min, .oc-card { display: grid; width: 100%; min-width: 0 !important; max-width: none !important; }
  #team .oc-card.oc-min .oc-ids { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 14px; }
  .oc-main b { max-width: none !important; }

  /* first visit screen */
  .fe-hero h1 { font-size: 30px; }
  .ux-pkgs { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px; }
}

@keyframes mh-sheen { 0%, 60% { transform: translateX(-30%); } 100% { transform: translateX(30%); } }
@keyframes mh-grow { from { transform: scaleX(0); } to { transform: none; } }
@keyframes fab-breathe { 0%, 100% { box-shadow: 0 12px 26px -8px #0084ffcc, 0 0 0 5px var(--m-bg), inset 0 1px 0 #ffffff55; } 50% { box-shadow: 0 14px 34px -6px #00e5ffcc, 0 0 0 5px var(--m-bg), inset 0 1px 0 #ffffff55; } }
@keyframes tab-pop { 0% { transform: scale(1); } 40% { transform: scale(.86); } 100% { transform: scale(1); } }
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes m-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pg-in-r { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes pg-in-l { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
@keyframes pg-in-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes ptr-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .mh-card::after, .mtab-fab-in, .mh-prog i em { animation: none !important; }
  #app.pg-in-r > *, #app.pg-in-l > *, #app.pg-in-up > * { animation: none !important; }
  dialog.txf[open], dialog.inv-dlg[open], .m-sheet-in, .rxw-back .rxw { animation: none !important; }
}

/* ======================= v2: bigger type, account card, info sheet ======================= */
.m-info { display: none; }
@media (max-width: 760px) {
  /* ---- type: comfortable sizes on phones ---- */
  body.app-page { font-size: 16px; }
  .app-content { font-size: 15px; line-height: 1.5; }
  .app-content h2, .app-content .panel-head h2 { font-size: 20px !important; line-height: 1.25; letter-spacing: -.01em; }
  .app-content h3 { font-size: 17px !important; }
  .app-content .eyebrow { font-size: 12px !important; letter-spacing: .08em; }
  .app-content small { font-size: 12.5px; }
  .rc-title { font-size: 15px !important; }
  .rc-foot, .rc-meta, .rc-pct, .rc-state { font-size: 12.5px !important; }
  .activity-row strong { font-size: 15px !important; line-height: 1.35; }
  .activity-row small { font-size: 12.5px !important; }
  .activity-row b { font-size: 15px !important; }
  .ra-table { font-size: 14px !important; } .ra-table th { font-size: 12.5px !important; }
  .oc-ids { font-size: 13.5px !important; } .oc-ids dd { font-size: 13px !important; } .oc-main b { font-size: 15px !important; }
  .network-summary > span { font-size: 13px !important; }
  .mx-lv b { font-size: 12.5px !important; } .mx-lv span { font-size: 19px !important; } .mx-lv > small { font-size: 12px !important; }
  .ip-card small, .ip-claim small { font-size: 12.5px !important; } .ip-card b { font-size: 19px !important; }
  .ap-s, .ap-split, .ap-bar-top { font-size: 13px !important; }
  .mtab > a, .mtab > button { font-size: 11.5px !important; }
  .m-title { font-size: 17px !important; }
  .mh-act { font-size: 13px !important; }
  .m-sheet-grid a { font-size: 14px !important; }
  .gl-row { font-size: 14px !important; }
  .txf-steps b { font-size: 15px !important; } .txf-steps small { font-size: 13px !important; }
  .ux-i { width: 22px !important; height: 22px !important; } .ux-i .ic { width: 19px !important; height: 19px !important; }

  /* ---- Home: account card ---- */
  .mh-card { gap: 2px; padding: 18px 18px 16px !important; border-radius: 28px !important;
    background:
      radial-gradient(70% 60% at 100% 0%, #00e5ff40, transparent 60%),
      radial-gradient(80% 70% at 0% 100%, #0050f080, transparent 65%),
      linear-gradient(155deg, #13306a 0%, #0b1631 55%, #091024 100%) !important;
    box-shadow: 0 24px 48px -22px #0084ffcc, inset 0 1px 0 #ffffff26, inset 0 0 0 1px #00e5ff26 !important; border: 0 !important; }
  .mh-card::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
    background-image: linear-gradient(#ffffff08 1px, transparent 1px), linear-gradient(90deg, #ffffff08 1px, transparent 1px); background-size: 22px 22px;
    -webkit-mask-image: radial-gradient(80% 70% at 85% 20%, #000, transparent 75%); mask-image: radial-gradient(80% 70% at 85% 20%, #000, transparent 75%); }
  .mh-art { position: absolute; z-index: -1; right: -22px; top: 74px; width: 142px; height: auto; opacity: .95; pointer-events: none;
    filter: drop-shadow(0 10px 26px #00e5ff66); animation: mh-float 6s ease-in-out infinite; }
  .mh-top { margin-bottom: 14px !important; position: relative; }
  .mh-who b { font-size: 16px !important; }
  .mh-who small { font-size: 12.5px !important; }
  .mh-eye { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; border: 1px solid #ffffff24; background: #ffffff12; color: #cfe3ff; cursor: pointer; }
  .mh-eye .ic { width: 20px; height: 20px; }
  .mh-eye[aria-pressed="true"] { color: var(--m-cyan); border-color: #00e5ff66; }
  .mh-k { font-size: 13.5px !important; color: #b9d3f5 !important; }
  .mh-amt { font-size: 44px !important; max-width: 66%; }
  .mh-k, .mh-today { position: relative; }
  .ap-k .ux-i { margin-left: 4px; vertical-align: -4px; }
  .mh-amt em { font-size: 15px !important; }
  .mh-today { justify-self: start; margin-top: 6px; padding: 4px 10px; border-radius: 99px; font-size: 13px; font-weight: 700; background: #ffffff12; color: #b9d3f5; }
  .mh-today.up { background: #22e3a01f; color: #5ff0bd; box-shadow: inset 0 0 0 1px #22e3a044; }
  .mh-mix { display: flex; gap: 3px; height: 8px; margin-top: 16px; border-radius: 8px; overflow: hidden; }
  .mh-mix i { display: block; min-width: 6px; border-radius: 8px; transform-origin: left; animation: mh-grow .9s var(--m-ease) both; }
  .mh-mix i:nth-child(2) { animation-delay: .08s; } .mh-mix i:nth-child(3) { animation-delay: .16s; } .mh-mix i:nth-child(4) { animation-delay: .24s; }
  .mx-direct { background: #33c6ff; } .mx-tenLevel { background: #0084ff; } .mx-placement { background: #8b5cf6; } .mx-global { background: #22e3a0; } .mx-none { background: #ffffff1f; }
  .mh-legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; margin-top: 10px; font-size: 13px; color: #b9d3f5; }
  .mh-legend span { display: flex; align-items: center; gap: 7px; min-width: 0; }
  .mh-legend i { width: 9px; height: 9px; border-radius: 3px; flex: none; }
  .mh-legend b { margin-left: auto; color: #fff; font-size: 14px; font-variant-numeric: tabular-nums; }
  .mh-row { margin-top: 14px !important; padding-top: 14px !important; }
  .mh-row small { font-size: 12px !important; color: #b9d3f5 !important; }
  .mh-row b { font-size: 17px !important; }
  .mh-engrow { display: grid; gap: 8px; margin-top: 14px; padding: 12px; border-radius: 18px; background: #00000033; box-shadow: inset 0 0 0 1px #ffffff14; }
  .mh-eng { justify-self: start; padding: 4px 10px !important; font-size: 13px !important; background: linear-gradient(90deg, #0084ff40, #00e5ff26) !important; border: 1px solid #00e5ff44 !important; }
  .mh-engrow .mh-prog { margin-top: 0 !important; }
  .mh-prog small { font-size: 12.5px !important; }
  .mh-prog i { height: 8px !important; }
  /* hide amounts */
  .m-amt { transition: filter .25s; }
  body.m-hide-amt .m-amt, body.m-hide-amt .mh-today, body.m-hide-amt .rc-amt, body.m-hide-amt .tb-k b { filter: blur(9px); }

  /* quick actions: filled icons on tinted tiles */
  .mh-act { padding: 12px 2px 10px !important; border-radius: 20px !important; }
  .mh-act span { width: 46px !important; height: 46px !important; border-radius: 16px !important; }
  .mh-act .ic { width: 23px !important; height: 23px !important; }
  .mtab .ic { width: 24px !important; height: 24px !important; }

  /* ---- explanations live behind info icons: bottom sheet ---- */
  .m-info { display: flex; position: fixed; inset: 0; z-index: 70; align-items: flex-end; background: #02040a99; backdrop-filter: blur(6px); animation: m-fade .2s ease-out; }
  .m-info[hidden] { display: none; }
  .m-info-in { width: 100%; max-height: 80vh; overflow-y: auto; padding: 10px 20px calc(24px + env(safe-area-inset-bottom)); border-radius: 26px 26px 0 0; background: var(--m-card);
    border: 1px solid #ffffff17; border-bottom: 0; animation: sheet-up .32s var(--m-ease); }
  .m-info-in::before { content: ""; display: block; width: 40px; height: 5px; margin: 0 auto 14px; border-radius: 5px; background: #ffffff33; }
  .m-info-h { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font-size: 19px; font-weight: 800; }
  .m-info-h span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: #0084ff2e; color: var(--m-cyan); flex: none; }
  .m-info-h .ic { width: 20px; height: 20px; }
  .m-info p { margin: 0; font-size: 15.5px; line-height: 1.6; color: #d6e2f7; }
  .m-info-ok { width: 100%; height: 48px; margin-top: 18px; border: 0; border-radius: 16px; font: inherit; font-size: 15px; font-weight: 800; color: #fff; cursor: pointer;
    background: linear-gradient(110deg, var(--m-deep), var(--m-blue) 55%, var(--m-cyan)); }
  .m-hidden-text { display: none !important; }
}
@keyframes mh-float { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-6px) rotate(-2deg); } }
@media (prefers-reduced-motion: reduce) { .mh-art, .mh-mix i { animation: none !important; } }

@media (max-width: 760px) {
  /* History: the page title is enough; compact two-line rows */
  #activity > .panel-head > div:first-child { display: none; }
  #activity > .panel-head .ux-seg { width: 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
  .activity-row { gap: 10px !important; align-items: center; }
  .activity-row strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .activity-row > div { min-width: 0; }
  .activity-row b.positive, .activity-row > b { white-space: nowrap; }
  .ux-group { font-size: 12.5px !important; letter-spacing: .08em; margin: 14px 0 6px !important; }
  /* Withdraw: the 80 / 20 bar keeps its labels inside */
  .fl-bar i { font-size: 12px !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 8px !important; }
  .fl-bar .fl-next { min-width: 64px; }
}

@media (max-width: 760px) {
  .fl-bar .fl-next { font-size: 0 !important; text-align: center; }
  .fl-bar .fl-next::before { content: "20%"; font-size: 12px; font-weight: 800; }
}

/* Home card: package value + separate Bonus in the earnings mix */
@media (max-width: 760px) {
  .mx-levelBonus { background: #f5b83d; }
  .mh-pkg { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .mh-pv { display: grid; justify-items: end; line-height: 1.2; }
  .mh-pv small { font-size: 12px; color: #b9d3f5; }
  .mh-pv b { font-size: 18px; color: #fff; font-variant-numeric: tabular-nums; }
  .mh-pv b i { font-style: normal; font-size: 12px; color: #b9d3f5; font-weight: 700; }
}
