/* Mobile home dashboard (partials/_home_mobile_dash.php). Phones/tablets only; the section is d-lg-none. */

.md-dash {
    --md-c: var(--vr-theme-color, #19bc9c);
    --md-deep: #0f3d33;
    --md-ink: #1f2937;
    --md-mute: #6b7280;
    --md-card: #fff;
    --md-line: #e8eef0;
    --md-page: #f2f4f5;
    --md-shadow: 0 10px 26px -14px rgba(15, 61, 51, .35), 0 2px 6px -2px rgba(15, 23, 42, .06);
    --md-r: 22px;
    background: var(--md-page);
    padding-bottom: 18px;
    margin-bottom: 8px;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--md-ink);
}
.md-dash a { text-decoration: none !important; }
.md-dash button { font: inherit; border: 0; background: none; padding: 0; cursor: pointer; }

/* Green greeting band */
.md-band {
    background: linear-gradient(120deg, #064e3b 0%, #0f766e 50%, #14a58a 100%);
    color: #fff;
    padding: 16px 16px 58px;
    position: relative;
    overflow: hidden;
}
.md-band::after {
    content: "";
    position: absolute;
    right: -40px;
    top: -60px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(125, 255, 90, .28), transparent 70%);
    pointer-events: none;
}
.md-band-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: relative; z-index: 1; }
.md-band-sub { display: block; font-size: .78rem; font-weight: 600; opacity: .82; letter-spacing: .02em; }
.md-band-hello { margin: 2px 0 0; font-size: 1.45rem; font-weight: 800; line-height: 1.2; color: #fff; font-family: inherit; }
.md-band-avatar img {
    display: block;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, .85);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
}

.md-wrap { padding: 0 14px; margin-top: -44px; position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
/* Cards never grow wider than the screen because of long unbroken text (links, titles) */
.md-wrap > * { min-width: 0; }

.md-card {
    background: var(--md-card);
    border-radius: var(--md-r);
    box-shadow: var(--md-shadow);
}

/* Account card */
.md-account { display: flex; justify-content: space-between; gap: 12px; padding: 18px 16px; }
.md-acc-info { display: flex; flex-direction: column; min-width: 0; }
.md-acc-label { font-size: .8rem; color: var(--md-mute); font-weight: 600; }
.md-acc-balance { font-size: 2rem; font-weight: 800; line-height: 1.15; color: var(--md-deep); margin: 2px 0 6px; letter-spacing: -.01em; }
.md-acc-meta { font-size: .82rem; color: var(--md-mute); }
.md-acc-plan { margin-top: 3px; font-size: .86rem; font-weight: 600; color: var(--md-ink) !important; text-decoration: underline !important; text-underline-offset: 3px; text-decoration-color: #cbd5e1 !important; }
.md-acc-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 10px;
    font-size: .88rem;
    font-weight: 700;
    color: #0f766e !important;
}
.md-acc-link svg:first-child { color: var(--md-c); }
.md-acc-link span { text-decoration: underline; text-underline-offset: 3px; }
.md-acc-btns { display: flex; flex-direction: column; justify-content: center; gap: 10px; flex: 0 0 auto; }
.md-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 128px;
    height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    font-size: .95rem;
    font-weight: 700;
    white-space: nowrap;
    transition: transform .15s ease, box-shadow .15s ease;
}
.md-pill:active { transform: scale(.97); }
.md-pill-ghost { color: #0f766e !important; border: 1.5px solid color-mix(in srgb, var(--md-c) 55%, transparent) !important; background: #fff !important; }
.md-pill-main { color: #fff !important; background: linear-gradient(135deg, var(--md-c), #0f766e) !important; box-shadow: 0 10px 20px -10px var(--md-c); }

/* App promo strip */
.md-strip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 8px 8px 12px;
    border: 1.5px solid color-mix(in srgb, var(--md-c) 45%, transparent);
    overflow: hidden;
}
.md-strip-logo img { display: block; width: 34px; height: 34px; border-radius: 9px; }
.md-strip-name { font-weight: 800; font-size: .92rem; color: var(--md-deep); letter-spacing: .03em; white-space: nowrap; }
.md-strip-marquee {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.md-strip-marquee span {
    display: inline-block;
    white-space: nowrap;
    font-size: .74rem;
    font-weight: 600;
    color: var(--md-mute);
    padding-left: 100%;
    animation: mdMarquee 14s linear infinite;
}
.md-strip-btn {
    flex: 0 0 auto;
    padding: 9px 14px;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 800;
    color: #0f766e;
    background: color-mix(in srgb, var(--md-c) 14%, #fff);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--md-c) 25%, transparent);
}
@keyframes mdMarquee { to { transform: translateX(-100%); } }

/* Quick actions */
.md-quick { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; padding: 16px 8px 14px; }
.md-q { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--md-ink) !important; }
.md-q-ic {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    transition: transform .2s ease;
}
.md-q:active .md-q-ic { transform: scale(.92); }
.md-q-lbl { font-size: .8rem; font-weight: 600; text-align: center; line-height: 1.15; }
.md-q-green .md-q-ic  { color: #059669; background: #dcfce7; }
.md-q-blue .md-q-ic   { color: #2563eb; background: #dbeafe; }
.md-q-pink .md-q-ic   { color: #db2777; background: #fce7f3; }
.md-q-purple .md-q-ic { color: #7c3aed; background: #ede9fe; }
.md-q-amber .md-q-ic  { color: #d97706; background: #fef3c7; }
.md-q-teal .md-q-ic   { color: #0d9488; background: #ccfbf1; }

/* Stat cards */
.md-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.md-stat { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 16px 8px 14px; color: var(--md-ink) !important; }
.md-stat-ic { color: var(--md-c); margin-bottom: 8px; }
.md-stat-num { line-height: 1.1; color: #0f766e; white-space: nowrap; }
.md-stat-num b { font-size: 1.35rem; font-weight: 800; }
.md-stat-num small { font-size: .85rem; font-weight: 700; color: var(--md-mute); }
.md-stat-lbl { font-size: .8rem; color: var(--md-mute); margin-top: 2px; }
.md-bar { display: block; width: 78%; height: 6px; margin: 12px 0 10px; border-radius: 99px; background: #e5ece9; overflow: hidden; }
.md-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--md-c), #7dd35a); }
.md-stat-foot { font-size: .76rem; color: var(--md-mute); }

/* Three-part promo banner */
.md-tri {
    display: flex;
    height: 76px;
    border-radius: var(--md-r);
    overflow: hidden;
    box-shadow: var(--md-shadow);
}
.md-tri-a {
    position: relative;
    flex: 1 1 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 6px;
    color: #fff !important;
    font-weight: 800;
    font-size: .95rem;
    line-height: 1.12;
}
.md-tri-a svg { flex: 0 0 auto; opacity: .92; }
.md-tri-1 { background: linear-gradient(135deg, #5b21b6, #7c3aed); padding-right: 14px; }
.md-tri-2 { background: linear-gradient(135deg, #db2777, #ec4899); margin-left: -16px; clip-path: polygon(16px 0, 100% 0, calc(100% - 16px) 100%, 0 100%); padding: 0 20px; z-index: 1; }
.md-tri-3 { background: linear-gradient(135deg, #f59e0b, #fbbf24); margin-left: -16px; clip-path: polygon(16px 0, 100% 0, 100% 100%, 0 100%); padding-left: 22px; }

@media (max-width: 380px) {
    .md-account { flex-direction: column; }
    .md-acc-btns { flex-direction: row; }
    .md-pill { flex: 1 1 0; min-width: 0; }
    .md-q-ic { width: 46px; height: 46px; }
    .md-tri-a { font-size: .84rem; }
    .md-tri-a svg { width: 24px; height: 24px; }
}
@media (min-width: 576px) {
    .md-wrap { max-width: 640px; margin-left: auto; margin-right: auto; }
}

/* The account card replaces the reading banner on small screens */
@media (max-width: 991.98px) {
    body.has-md-dash .erp-banner-section { display: none; }
}

/* ---------- Phase 2: mobile content (partials/_home_mobile_feed.php) ---------- */
.md-feed {
    --md-c: var(--vr-theme-color, #19bc9c);
    --md-deep: #0f3d33;
    --md-ink: #1f2937;
    --md-mute: #6b7280;
    --md-card: #fff;
    --md-page: #f2f4f5;
    --md-shadow: 0 10px 26px -14px rgba(15, 61, 51, .35), 0 2px 6px -2px rgba(15, 23, 42, .06);
    --md-r: 22px;
    background: var(--md-page);
    padding: 4px 0 22px;
    margin: -8px 0 12px;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--md-ink);
}
.md-feed .md-wrap { margin-top: 0; }
.md-feed a { text-decoration: none !important; }

/* Slider */
.mf-track {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--md-r);
}
.mf-track::-webkit-scrollbar { display: none; }
.mf-slide { flex: 0 0 100%; scroll-snap-align: start; }
.mf-slide-link {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    border-radius: var(--md-r);
    overflow: hidden;
    box-shadow: var(--md-shadow);
    background: #dfe7e4;
}
.mf-slide-link img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mf-slide-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, .78) 100%); }
.mf-slide-body { position: absolute; left: 16px; right: 16px; bottom: 14px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.mf-slide-cat {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #fff;
    background: var(--cc, #19bc9c);
}
.mf-slide-title { color: #fff; font-size: 1.12rem; font-weight: 800; line-height: 1.3; text-shadow: 0 2px 8px rgba(0, 0, 0, .35); }
.mf-dots { display: flex; justify-content: center; gap: 8px; margin-top: 12px; }
.mf-dot { width: 8px; height: 8px; border-radius: 99px; background: #c5ccd3 !important; border: 0; padding: 0; transition: width .25s ease, background-color .25s ease; }
.mf-dot.is-active { width: 22px; background: var(--md-c) !important; }

/* Category tiles */
.mf-cats {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scrollbar-width: none;
    margin: 0 -14px;
    padding: 4px 14px 6px;
    scroll-snap-type: x proximity;
}
.mf-cats::-webkit-scrollbar { display: none; }
.mf-cat { flex: 0 0 82px; display: flex; flex-direction: column; align-items: center; gap: 8px; scroll-snap-align: start; color: var(--md-mute) !important; }
.mf-cat-tile {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 82px;
    height: 82px;
    border-radius: 22px;
    background: var(--md-card);
    box-shadow: var(--md-shadow);
    overflow: hidden;
}
.mf-cat-blob {
    position: absolute;
    width: 54px;
    height: 54px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--c1), var(--c2));
    opacity: .2;
    transform: rotate(-14deg) translate(6px, 4px);
    transition: transform .3s ease;
}
.mf-cat-ic {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(135deg, var(--c1), var(--c2));
    box-shadow: 0 8px 16px -8px var(--c2), inset 0 1px 0 rgba(255, 255, 255, .35);
    transition: transform .3s ease;
}
.mf-cat-spark {
    position: absolute;
    right: 14px;
    top: 12px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--c1);
    box-shadow: -50px 46px 0 -1px color-mix(in srgb, var(--c2) 45%, transparent);
}
.mf-cat:active .mf-cat-ic { transform: scale(.92); }
.mf-cat:active .mf-cat-blob { transform: rotate(0) translate(0, 0); }
.mf-cat-name { font-size: .82rem; font-weight: 600; text-align: center; line-height: 1.15; max-width: 82px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Info cards */
.mf-info { padding: 16px 16px 12px; }
.mf-info-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.mf-info-title { display: inline-flex; align-items: center; gap: 8px; font-size: 1rem; font-weight: 800; color: var(--md-ink); }
.mf-info-title svg { color: var(--md-c); }
.mf-live { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; font-size: .74rem; font-weight: 700; color: #0f766e; background: #dcfce7; }
.mf-live i { width: 7px; height: 7px; border-radius: 50%; background: #16a34a; animation: mfPulse 1.6s ease-in-out infinite; }
@keyframes mfPulse { 50% { opacity: .3; } }
.mf-info-more { display: block; margin-top: 12px; text-align: center; font-size: .86rem; color: var(--md-mute) !important; text-decoration: underline !important; text-underline-offset: 3px; text-decoration-color: #cbd5e1 !important; }

.mf-podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 8px; margin: 0; padding: 0; list-style: none; }
.mf-p a { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--md-ink) !important; }
.mf-p-av { position: relative; }
.mf-p-av img { display: block; width: 52px; height: 52px; border-radius: 50%; object-fit: cover; border: 3px solid var(--m, #22a05a); }
.mf-p-av b {
    position: absolute;
    right: -4px;
    bottom: -2px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .72rem;
    color: #fff;
    background: var(--m, #22a05a);
    border: 2px solid var(--md-card);
}
.mf-p-1 { --m: #d4a21c; order: 2; }
.mf-p-1 .mf-p-av img { width: 64px; height: 64px; }
.mf-p-2 { --m: #8a97ab; order: 1; }
.mf-p-3 { --m: #c0763f; order: 3; }
.mf-p-name { font-size: .84rem; font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mf-p-num { font-size: .74rem; color: var(--md-mute); }

.mf-path-date { font-size: .84rem; color: var(--md-mute); font-weight: 600; }
.mf-steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; margin: 0; padding: 0; list-style: none; }
.mf-steps a { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px 2px; border-radius: 16px; color: var(--md-ink) !important; }
.mf-step-lbl { font-size: .8rem; font-weight: 600; }
.mf-step-no { font-size: 1rem; font-weight: 800; color: var(--md-mute); }
.mf-steps .is-done .mf-step-no { color: #16a34a; }
.mf-steps .is-now a { background: linear-gradient(160deg, var(--md-c), #0f766e); color: #fff !important; box-shadow: 0 10px 18px -10px var(--md-c); }
.mf-steps .is-now .mf-step-no { color: #fff; }

/* Ways to earn */
.mf-ways { display: grid; grid-template-columns: 42% minmax(0, 1fr); gap: 10px; padding: 10px; }
.mf-ways-photo { position: relative; display: block; border-radius: 16px; overflow: hidden; min-height: 100%; background: linear-gradient(160deg, #fce7f3, #dcfce7); }
.mf-ways-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mf-ways-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, .55)); }
.mf-ways-photo span { position: absolute; left: 10px; right: 10px; bottom: 12px; z-index: 1; text-align: center; color: #fff; font-weight: 800; font-size: .95rem; line-height: 1.15; text-shadow: 0 2px 8px rgba(0, 0, 0, .4); }
.mf-ways-list { display: grid; gap: 8px; }
.mf-way { display: flex; align-items: center; gap: 8px; padding: 10px 8px; border-radius: 16px; background: var(--wb); color: var(--md-ink) !important; }
.mf-way-ic { flex: 0 0 auto; width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: #fff; color: var(--wc); box-shadow: 0 2px 6px rgba(0, 0, 0, .06); }
.mf-way-text { min-width: 0; flex: 1 1 auto; display: flex; flex-direction: column; }
.mf-way-text b { font-size: .98rem; font-weight: 800; color: var(--wc); text-decoration: underline; text-underline-offset: 3px; }
.mf-way-text small { font-size: .74rem; line-height: 1.3; color: #4b5563; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mf-way-go { color: var(--wc); flex: 0 0 auto; }
.mf-way-lime   { --wc: #4d9a12; --wb: #eef6e4; }
.mf-way-amber  { --wc: #e08a00; --wb: #fdebd0; }
.mf-way-pink   { --wc: #db2777; --wb: #fde4ee; }
.mf-way-violet { --wc: #6d28d9; --wb: #ebe4f7; }

@media (max-width: 380px) {
    .mf-ways { grid-template-columns: 1fr; }
    .mf-ways-photo { min-height: 150px; }
}

/* Mobile content replaces the featured grid and the earn hub intro/grid on small screens */
@media (max-width: 991.98px) {
    body.has-md-feed .featured-section,
    body.has-md-feed .eh .eh-hero,
    body.has-md-feed .eh .eh-head,
    body.has-md-feed .eh .eh-grid,
    body.has-md-feed .eh .eh-credit { display: none !important; }
}

[data-bs-theme="dark"] .md-feed { --md-card: #111a2b; --md-ink: #e5e7eb; --md-mute: #94a3b8; --md-deep: #d1fae5; --md-page: #0b1220; }
[data-bs-theme="dark"] .mf-live { background: rgba(22, 163, 74, .16); color: #86efac; }
[data-bs-theme="dark"] .mf-way { --wb: #18233a; }
[data-bs-theme="dark"] .mf-way-ic { background: #0b1220; }
[data-bs-theme="dark"] .mf-way-text small { color: #94a3b8; }

/* ---------- Phase 3: mobile services (partials/_home_mobile_services.php) ---------- */
.md-services {
    --md-c: var(--vr-theme-color, #19bc9c);
    --md-ink: #1f2937;
    --md-mute: #6b7280;
    --md-card: #fff;
    --md-page: #f2f4f5;
    --md-shadow: 0 10px 26px -14px rgba(15, 61, 51, .35), 0 2px 6px -2px rgba(15, 23, 42, .06);
    --md-r: 22px;
    background: var(--md-page);
    padding: 0 0 24px;
    margin: -12px 0 12px;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--md-ink);
}
.md-services .md-wrap { margin-top: 0; }
.md-services a { text-decoration: none !important; }

/* Services grid */
.ms-grid-card { padding: 18px 10px 8px; position: relative; }
.ms-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 4px; }
.ms-svc { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--md-mute) !important; }
.ms-svc-ic {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    border-radius: 18px;
    color: var(--tc);
    background: linear-gradient(150deg, var(--tb), #fff);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tc) 14%, transparent);
    transition: transform .2s ease;
}
.ms-svc-ic::after { content: ""; position: absolute; right: 7px; top: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--tc); opacity: .35; }
.ms-svc:active .ms-svc-ic { transform: scale(.92); }
.ms-svc-lbl { font-size: .8rem; font-weight: 600; text-align: center; line-height: 1.15; }
.ms-t-green  { --tc: #16a34a; --tb: #dcfce7; }
.ms-t-teal   { --tc: #0d9488; --tb: #ccfbf1; }
.ms-t-pink   { --tc: #db2777; --tb: #fce7f3; }
.ms-t-amber  { --tc: #ea580c; --tb: #ffedd5; }
.ms-t-violet { --tc: #7c3aed; --tb: #ede9fe; }
.ms-t-gold   { --tc: #ca8a04; --tb: #fef9c3; }
.ms-t-blue   { --tc: #2563eb; --tb: #dbeafe; }
.ms-grid-card:not(.is-open) .ms-extra { display: none; }
.ms-grid-card:not(.is-open) .ms-grid { -webkit-mask-image: linear-gradient(180deg, #000 70%, rgba(0, 0, 0, .35)); mask-image: linear-gradient(180deg, #000 70%, rgba(0, 0, 0, .35)); }
.ms-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    margin-top: 8px;
    padding: 10px 0 8px;
    border: 0;
    background: none;
    font: inherit;
    font-size: 1.05rem;
    font-weight: 700;
    color: #4d9a12;
    cursor: pointer;
}
.ms-more svg { transition: transform .25s ease; }
.is-open .ms-more svg { transform: rotate(180deg); }

/* Promo banner */
.ms-promo-label { display: block; margin: 4px 2px -6px; font-size: .95rem; color: var(--md-mute); }
.ms-promo {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 16px;
    border-radius: var(--md-r);
    overflow: hidden;
    background: linear-gradient(110deg, #fff 0%, #fffbea 60%, #fef3c7 100%);
    box-shadow: var(--md-shadow);
}
.ms-promo-coin {
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 900;
    color: #92400e;
    background: radial-gradient(circle at 35% 30%, #fde68a, #f59e0b 70%, #b45309);
    box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .15), 0 6px 14px -6px #b45309;
    animation: msCoin 3s ease-in-out infinite;
}
.ms-promo-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.ms-promo-text b { font-size: 1.35rem; font-weight: 900; color: #1f2937; line-height: 1.1; }
.ms-promo-text small { font-size: .78rem; color: #6b7280; }
.ms-promo-btn {
    flex: 0 0 auto;
    padding: 10px 22px;
    border-radius: 999px;
    font-weight: 900;
    letter-spacing: .06em;
    color: #fff;
    background: linear-gradient(180deg, #34d058, #16a34a);
    box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .15), 0 8px 16px -8px #16a34a;
    position: relative;
    z-index: 1;
}
.ms-coin { position: absolute; width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fde68a, #f59e0b); opacity: .8; animation: msFloat 4s ease-in-out infinite; }
.ms-coin-1 { right: 18%; top: 8px; }
.ms-coin-2 { right: 6px; bottom: 6px; width: 10px; height: 10px; animation-delay: -1.3s; }
.ms-coin-3 { left: 44%; bottom: 4px; width: 9px; height: 9px; animation-delay: -2.6s; }
@keyframes msCoin { 50% { transform: rotateY(180deg); } }
@keyframes msFloat { 50% { transform: translateY(-6px); } }

/* Plan offers */
.ms-plans {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    margin: 0 -14px;
    padding: 4px 14px 10px;
}
.ms-plans::-webkit-scrollbar { display: none; }
.ms-plan {
    flex: 0 0 86%;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    border-radius: var(--md-r);
    overflow: hidden;
    background: var(--md-card);
    box-shadow: var(--md-shadow);
}
.ms-plan:only-child { flex-basis: 100%; }
.ms-plan-head { padding: 12px 16px 14px; background: linear-gradient(120deg, #0f766e, var(--md-c)); color: #fff; }
.ms-plan-chip { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .7rem; font-weight: 800; letter-spacing: .04em; color: #fff; background: #f59e0b; }
.ms-plan-name { display: block; margin-top: 6px; font-size: 1.3rem; font-weight: 800; }
.ms-plan-feats { list-style: none; margin: 0; padding: 14px 14px 12px; display: grid; gap: 10px; border-bottom: 1px solid #edf1ef; }
.ms-plan-feats li { display: flex; align-items: center; gap: 10px; font-size: .88rem; font-weight: 600; line-height: 1.3; }
.ms-feat-ic { flex: 0 0 auto; color: var(--md-c); display: inline-flex; }
.ms-plan-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px 16px; margin-top: auto; }
.ms-plan-price { display: flex; flex-direction: column; }
.ms-plan-price b { font-size: 1.5rem; font-weight: 900; color: #4d9a12; line-height: 1.1; }
.ms-plan-price small { font-size: .8rem; color: var(--md-mute); }
.ms-plan-btn {
    flex: 0 0 auto;
    padding: 13px 26px;
    border-radius: 14px;
    font-weight: 800;
    color: #fff !important;
    background: linear-gradient(135deg, #db2777, #e6007e);
    box-shadow: 0 10px 18px -10px #db2777;
}

[data-bs-theme="dark"] .md-services { --md-card: #111a2b; --md-ink: #e5e7eb; --md-mute: #94a3b8; --md-page: #0b1220; }
[data-bs-theme="dark"] .ms-svc-ic { background: linear-gradient(150deg, color-mix(in srgb, var(--tc) 22%, #111a2b), #111a2b); }
[data-bs-theme="dark"] .ms-promo { background: linear-gradient(110deg, #111a2b, #2a2210); }
[data-bs-theme="dark"] .ms-promo-text b { color: #fde68a; }
[data-bs-theme="dark"] .ms-plan-feats { border-bottom-color: #1e293b; }

/* ---------- My Account hub (partials/_home_mobile_account.php, members only) ---------- */
.md-account-hub {
    --md-c: var(--vr-theme-color, #19bc9c);
    --md-deep: #0f3d33;
    --md-ink: #1f2937;
    --md-mute: #6b7280;
    --md-card: #fff;
    --md-line: #edf1ef;
    --md-page: #f2f4f5;
    --md-shadow: 0 10px 26px -14px rgba(15, 61, 51, .35), 0 2px 6px -2px rgba(15, 23, 42, .06);
    --md-r: 22px;
    background: var(--md-page);
    padding: 0 0 18px;
    margin: -8px 0 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--md-ink);
}
.md-account-hub .md-wrap { margin-top: 0; }
.md-account-hub a { text-decoration: none !important; }
.md-account-hub button { font: inherit; cursor: pointer; }
.ma-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 2px 0; }
.ma-head-title { font-size: 1.15rem; font-weight: 800; color: var(--md-ink); }
.ma-head-link { display: inline-flex; align-items: center; gap: 2px; font-size: .86rem; font-weight: 700; color: #0f766e !important; }
/* Phones: the "Full dashboard" link is a pill button so the way to My Account is obvious */
@media (max-width: 991.98px) { .ma-head-link { padding: 6px 12px; border-radius: 999px; background: #e6f4f1; font-size: .82rem; } }
.ma-sec-title { display: block; font-size: 1rem; font-weight: 800; margin-bottom: 10px; }

/* Reading strip (plan, next session, today's reads, Start Reading) */
.ma-read { padding: 14px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.ma-read-info { flex: 1 1 260px; min-width: 0; }
.ma-read-title { display: flex; align-items: center; gap: 7px; font-size: 1rem; font-weight: 800; margin-bottom: 8px; }
.ma-read-title svg { color: #0f766e; }
.ma-read-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ma-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; font-size: .76rem; font-weight: 600; line-height: 1.3; color: #334155; background: #f1f5f9; border: 1px solid #e2e8f0; }
.ma-chip b { font-weight: 800; font-variant-numeric: tabular-nums; }
.ma-chip small { font-weight: 800; color: #b45309; }
.ma-chip-plan { color: #92400e !important; background: #fef3c7; border-color: #fcd34d; }
.ma-chip-plan.is-active { color: #065f46 !important; background: #d1fae5; border-color: #6ee7b7; }
.ma-t-ready { color: #166534; background: rgba(34, 197, 94, .14); border-color: rgba(34, 160, 90, .45); }
.ma-t-cool { color: #92400e; background: rgba(251, 191, 36, .18); border-color: rgba(217, 119, 6, .4); }
.ma-t-quota { color: #9a3412; background: rgba(249, 115, 22, .14); border-color: rgba(234, 88, 12, .4); }
.ma-read-note { margin-top: 6px; font-size: .82rem; color: #0f766e; }
.ma-read-note:empty { display: none; }
.ma-read-btns { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.ma-read-go { display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 18px; border: 0; border-radius: 999px; color: #fff; font-weight: 800; background: linear-gradient(135deg, #0f766e, #19bc9c); box-shadow: 0 10px 18px -10px rgba(15, 118, 110, .9); }
.ma-read-go:disabled { opacity: .7; }
.ma-read-link { display: inline-flex; align-items: center; height: 42px; padding: 0 14px; border-radius: 999px; font-weight: 700; font-size: .88rem; color: #0f766e !important; background: #e6f4f1; }
@media (max-width: 575.98px) { .ma-read-btns { width: 100%; } .ma-read-go { flex: 1 1 auto; justify-content: center; } }
.ma-eye { margin-left: auto; width: 36px; height: 36px; border: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; background: rgba(255, 255, 255, .14); position: relative; z-index: 1; }
.ma-eye .ma-eye-off, .ma-eye.is-hidden .ma-eye-on { display: none; }
.ma-eye.is-hidden .ma-eye-off { display: flex; }
.ma-eye .ma-eye-on { display: flex; }
[data-bs-theme="dark"] .ma-chip { color: #cbd5e1; background: #0b1220; border-color: #1e293b; }
[data-bs-theme="dark"] .ma-read-link { background: rgba(25, 188, 156, .14); color: #5eead4 !important; }

/* Wallet */
.ma-wallet { padding: 16px; background: linear-gradient(135deg, #064e3b, #0f766e 55%, #14a58a) !important; color: #fff; position: relative; overflow: hidden; }
.ma-wallet::after { content: ""; position: absolute; right: -50px; top: -50px; width: 170px; height: 170px; border-radius: 50%; background: radial-gradient(circle, rgba(125, 255, 90, .25), transparent 70%); }
.ma-wallet-top { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.ma-wallet-ic { width: 44px; height: 44px; border-radius: 14px; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .14); }
.ma-wallet-lbl { display: block; font-size: .8rem; opacity: .8; }
.ma-wallet-amt { font-size: 1.8rem; font-weight: 900; line-height: 1.1; }
.ma-wallet-stats { display: flex; gap: 8px; margin: 14px 0; position: relative; z-index: 1; }
.ma-wallet-stats div { flex: 1 1 0; padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, .1); }
.ma-wallet-stats small { display: block; font-size: .72rem; opacity: .8; }
.ma-wallet-stats b { font-size: .98rem; }
.ma-wallet-btns { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; position: relative; z-index: 1; }
.ma-wallet-btns a { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; color: #fff !important; }
.ma-wallet-btns span { width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #064e3b; background: linear-gradient(135deg, #d1fae5, #7dff5a); box-shadow: 0 8px 16px -8px rgba(125, 255, 90, .9); }

/* Withdraw readiness + bonus */
.ma-ready { padding: 16px; }
.ma-ready-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.ma-ready-title { font-weight: 800; }
.ma-ready-state { padding: 4px 10px; border-radius: 99px; font-size: .74rem; font-weight: 800; }
.ma-ready-state.is-ok { color: #15803d; background: #dcfce7; }
.ma-ready-state.is-wait { color: #b45309; background: #fef3c7; }
.ma-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ma-checks li, .ma-checks a { display: flex; align-items: center; gap: 10px; font-size: .88rem; font-weight: 600; color: var(--md-ink) !important; }
.ma-check-ic { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; flex: 0 0 auto; }
.ma-checks .is-ok .ma-check-ic { background: #16a34a; }
.ma-checks .is-wait .ma-check-ic { background: #f59e0b; }
.ma-checks .is-no .ma-check-ic { background: #ef4444; }
.ma-ready-bar { width: 100%; margin: 12px 0 0; }
.ma-bonus { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 12px; border-radius: 16px; background: #fdf2f8; color: var(--md-ink) !important; }
.ma-bonus.is-claim { background: linear-gradient(110deg, #fdf2f8, #fef3c7); box-shadow: inset 0 0 0 1.5px #f9a8d4; }
.ma-bonus-ic { width: 44px; height: 44px; border-radius: 14px; display: flex; align-items: center; justify-content: center; color: #fff; background: linear-gradient(135deg, #ec4899, #db2777); flex: 0 0 auto; }
.is-claim .ma-bonus-ic { animation: maWiggle 2.4s ease-in-out infinite; }
.ma-bonus-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.ma-bonus-text b { font-size: 1rem; font-weight: 800; }
.ma-bonus-text small { font-size: .78rem; color: var(--md-mute); }
.ma-bonus-btn { padding: 8px 16px; border-radius: 99px; font-size: .84rem; font-weight: 800; color: #fff; background: linear-gradient(135deg, #db2777, #e6007e); }
@keyframes maWiggle { 0%, 80%, 100% { transform: rotate(0); } 85% { transform: rotate(-10deg); } 90% { transform: rotate(10deg); } 95% { transform: rotate(-6deg); } }

/* Referral link */
.ma-ref { padding: 16px; }
.ma-ref-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.ma-ref-title { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; }
.ma-ref-title svg { color: var(--md-c); }
.ma-ref-stats { font-size: .76rem; color: var(--md-mute); white-space: nowrap; }
.ma-ref-stats b { color: #0f766e; }
.ma-ref-box { display: flex; align-items: center; gap: 6px; padding: 5px 5px 5px 12px; border-radius: 14px; background: #f3f7f5; border: 1px dashed color-mix(in srgb, var(--md-c) 50%, transparent); }
.ma-ref-box input { flex: 1 1 auto; min-width: 0; border: 0; background: none; font-size: .84rem; color: var(--md-ink); outline: none; }
.ma-ref-copy { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border: 0; border-radius: 10px; font-size: .84rem; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--md-c), #0f766e); }
.ma-ref-copy.is-done { background: #16a34a; }
.ma-ref-share { display: flex; gap: 8px; margin-top: 10px; }
.ma-sh { flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; border-radius: 12px; border: 0; font-size: .82rem; font-weight: 700; color: #fff !important; }
.ma-sh-wa { background: #25d366; }
.ma-sh-fb { background: #1877f2; }
.ma-sh-more { background: #334155; }

/* Recent activity */
.ma-activity { padding: 16px 16px 8px; }
.ma-activity ul { list-style: none; margin: 0; padding: 0; }
.ma-act { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--md-line); }
.ma-act:first-child { border-top: 0; padding-top: 2px; }
.ma-act-ic { width: 38px; height: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.ma-act-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.ma-act-text b { font-size: .86rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ma-act-text small { font-size: .74rem; color: var(--md-mute); }
.ma-act-amt { font-weight: 800; font-size: .9rem; white-space: nowrap; }
.ma-act-in .ma-act-ic { color: #16a34a; background: #dcfce7; }
.ma-act-in .ma-act-amt { color: #16a34a; }
.ma-act-out .ma-act-ic { color: #2563eb; background: #dbeafe; }
.ma-act-wait .ma-act-ic { color: #d97706; background: #fef3c7; }
.ma-act-no .ma-act-ic { color: #dc2626; background: #fee2e2; }
.ma-act-no .ma-act-amt { text-decoration: line-through; color: var(--md-mute); }

/* Account menu */
.ma-menu { padding: 16px 12px 12px; }
.ma-menu .ma-sec-title { padding: 0 4px; }
.ma-group + .ma-group { border-top: 1px solid var(--md-line); }
.ma-group-btn { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 4px; border: 0; background: none; color: var(--md-ink); text-align: left; }
.ma-group-ic { width: 40px; height: 40px; border-radius: 13px; display: flex; align-items: center; justify-content: center; color: var(--gc); background: var(--gb); flex: 0 0 auto; }
.ma-group-name { flex: 1 1 auto; font-size: .95rem; font-weight: 700; }
.ma-group-count { min-width: 24px; height: 22px; padding: 0 7px; border-radius: 99px; display: flex; align-items: center; justify-content: center; font-size: .74rem; font-weight: 800; color: var(--gc); background: var(--gb); }
.ma-group-chev { color: var(--md-mute); transition: transform .25s ease; }
.ma-group.is-open .ma-group-chev { transform: rotate(180deg); }
.ma-group-items { display: none; padding: 0 0 10px 52px; }
.ma-group.is-open .ma-group-items { display: grid; gap: 2px; }
.ma-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; color: var(--md-ink) !important; font-size: .9rem; font-weight: 600; }
.ma-item:active { background: var(--gb); }
.ma-item-ic { color: var(--gc); display: inline-flex; }
.ma-item-lbl { flex: 1 1 auto; }
.ma-item-badge { min-width: 22px; height: 20px; padding: 0 6px; border-radius: 99px; display: inline-flex; align-items: center; justify-content: center; font-size: .72rem; font-weight: 800; color: #fff; background: #e6007e; }
.ma-item-go { color: #cbd5e1; display: inline-flex; }
.ma-g-green  { --gc: #16a34a; --gb: #dcfce7; }
.ma-g-blue   { --gc: #2563eb; --gb: #dbeafe; }
.ma-g-amber  { --gc: #ea580c; --gb: #ffedd5; }
.ma-g-gold   { --gc: #ca8a04; --gb: #fef9c3; }
.ma-g-pink   { --gc: #db2777; --gb: #fce7f3; }
.ma-g-violet { --gc: #7c3aed; --gb: #ede9fe; }
.ma-g-teal   { --gc: #0d9488; --gb: #ccfbf1; }
.ma-g-slate  { --gc: #475569; --gb: #e2e8f0; }
.ma-logout { margin: 6px 0 0; padding-top: 10px; border-top: 1px solid var(--md-line); }
.ma-logout button { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 44px; border: 1.5px solid #fecaca; border-radius: 14px; background: #fff5f5; color: #dc2626; font-weight: 800; }

/* Desktop: the hub becomes a four-card row at the top of the home page */
@media (min-width: 992px) {
    .md-account-hub { margin: 0; padding: 26px 0 30px; border-bottom: 1px solid #e6ebe9; }
    .md-account-hub .md-wrap {
        max-width: 1320px;
        margin: 0 auto;
        padding: 0 12px;
        grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
        gap: 18px;
        align-items: stretch;
    }
    .md-account-hub .ma-head { grid-column: 1 / -1; padding: 0 2px; }
    .md-account-hub .ma-read { grid-column: 1 / -1; padding: 16px 20px; }
    .md-account-hub .ma-head-title { font-size: 1.35rem; }
    .md-account-hub .md-card { transition: transform .2s ease, box-shadow .2s ease; }
    .md-account-hub .md-card:hover { transform: translateY(-3px); box-shadow: 0 18px 34px -18px rgba(15, 61, 51, .45), 0 2px 6px -2px rgba(15, 23, 42, .06); }
    .md-account-hub .ma-wallet, .md-account-hub .ma-ready, .md-account-hub .ma-ref, .md-account-hub .ma-activity { display: flex; flex-direction: column; padding: 20px; }
    .md-account-hub .ma-wallet-btns { margin-top: auto; }
    .md-account-hub .ma-wallet-btns a:hover span { transform: translateY(-2px); }
    .md-account-hub .ma-wallet-btns span { transition: transform .2s ease; }
    .md-account-hub .ma-bonus { margin-top: auto; }
    .md-account-hub .ma-checks { margin-bottom: 14px; }
    .md-account-hub .ma-ref-share { margin-top: auto; padding-top: 12px; }
    .md-account-hub .ma-sh:hover, .md-account-hub .ma-ref-copy:hover, .md-account-hub .ma-bonus-btn:hover { filter: brightness(1.08); }
    .md-account-hub .ma-act-text b { white-space: normal; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
    .md-account-hub .ma-checks a:hover, .md-account-hub .ma-head-link:hover { text-decoration: underline !important; }
}
@media (prefers-reduced-motion: reduce) {
    .md-account-hub .md-card, .md-account-hub .ma-wallet-btns span { transition: none; }
    .md-account-hub .md-card:hover { transform: none; }
}
[data-bs-theme="dark"] .md-account-hub { border-bottom-color: #1e293b; }
[data-bs-theme="dark"] .md-account-hub { --md-card: #111a2b; --md-ink: #e5e7eb; --md-mute: #94a3b8; --md-line: #1e293b; --md-page: #0b1220; }
[data-bs-theme="dark"] .ma-ref-box { background: #0b1220; }
[data-bs-theme="dark"] .ma-bonus { background: #1f1630; }
[data-bs-theme="dark"] .ma-logout button { background: transparent; border-color: #7f1d1d; color: #f87171; }
[data-bs-theme="dark"] .ma-group-ic, [data-bs-theme="dark"] .ma-group-count { background: color-mix(in srgb, var(--gc) 18%, #111a2b); }

/* Dark mode */
[data-bs-theme="dark"] .md-dash { --md-card: #111a2b; --md-ink: #e5e7eb; --md-mute: #94a3b8; --md-deep: #d1fae5; --md-page: #0b1220; --md-line: #1e293b; }
[data-bs-theme="dark"] .md-pill-ghost { background: transparent !important; color: #a7f3d0 !important; }
[data-bs-theme="dark"] .md-acc-link, [data-bs-theme="dark"] .md-stat-num { color: #5eead4 !important; }
[data-bs-theme="dark"] .md-strip-btn { color: #a7f3d0; background: rgba(25, 188, 156, .14); }
[data-bs-theme="dark"] .md-bar { background: #1e293b; }
[data-bs-theme="dark"] .md-q-ic { filter: saturate(.9) brightness(.95); }

@media (prefers-reduced-motion: reduce) {
    .md-strip-marquee span { animation: none; padding-left: 0; }
    .mf-live i, .ms-promo-coin, .ms-coin, .is-claim .ma-bonus-ic { animation: none; }
    .mf-dot { transition: none; }
    .md-pill, .md-q-ic { transition: none; }
}
