/*
 * Blog mascot scenes, stat counters and CTA box — rendered by
 * FAFM_Blog_Mascot's shortcodes (includes/class-fafm-blog-mascot.php).
 * Colors come from the theme's own tokens (theme.css :root) so light and
 * dark mode both follow the site; the fallbacks are the light values.
 * Every animation is off under prefers-reduced-motion.
 */

.fafm-mascot {
    --m-accent: var(--fafm-primary, #4a96e8);
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 32px 0;
    padding: 0;
}

.fafm-mascot--right {
    flex-direction: row-reverse;
}

.fafm-mascot__stage {
    position: relative;
    flex: 0 0 150px;
    width: 150px;
    height: 150px;
}

.fafm-mascot__glow {
    position: absolute;
    inset: 18px 10px 6px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(74, 150, 232, 0.28), rgba(74, 150, 232, 0) 70%);
}

.fafm-mascot__body {
    position: absolute;
    left: 6px;
    bottom: 0;
    width: 104px;
    height: auto;
    transform-origin: 50% 100%;
    animation: fafm-mascot-bob 3.2s ease-in-out infinite;
}

.fafm-mascot__prop {
    position: absolute;
    right: -4px;
    top: 4px;
    width: 72px;
    height: 72px;
    filter: drop-shadow(0 6px 10px rgba(20, 40, 90, 0.18));
}

.fafm-mascot__prop svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.fafm-mascot__bubble {
    position: relative;
    flex: 1 1 auto;
    margin: 0;
    padding: 16px 20px;
    border-radius: 18px;
    background: var(--fafm-surface, #ffffff);
    border: 1px solid var(--fafm-border, #d9e1ec);
    box-shadow: var(--fafm-shadow-sm, 0 4px 14px rgba(30, 55, 90, 0.05));
    color: var(--fafm-text, #214b84);
}

.fafm-mascot__bubble::before {
    content: "";
    position: absolute;
    top: 50%;
    left: -9px;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    background: inherit;
    border-left: 1px solid var(--fafm-border, #d9e1ec);
    border-bottom: 1px solid var(--fafm-border, #d9e1ec);
    transform: rotate(45deg);
}

.fafm-mascot--right .fafm-mascot__bubble::before {
    left: auto;
    right: -9px;
    transform: rotate(-135deg);
}

.fafm-mascot__name {
    display: block;
    margin-bottom: 4px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--m-accent);
}

.fafm-mascot__bubble p {
    margin: 0 0 8px;
}

.fafm-mascot__bubble p:last-child {
    margin-bottom: 0;
}

.fafm-mascot.is-solo {
    display: inline-flex;
    margin: 0;
}

/* Bubble pops in once the scene scrolls into view (blog.js adds .is-inview). */
.fafm-mascot .fafm-mascot__bubble {
    opacity: 0;
    transform: translateY(10px) scale(0.97);
    transition: opacity 0.5s ease 0.15s, transform 0.5s cubic-bezier(0.2, 0.8, 0.3, 1.2) 0.15s;
}

.fafm-mascot.is-inview .fafm-mascot__bubble,
.no-js .fafm-mascot .fafm-mascot__bubble {
    opacity: 1;
    transform: none;
}

@keyframes fafm-mascot-bob {
    0%, 100% { transform: translateY(0) rotate(-2deg); }
    50% { transform: translateY(-8px) rotate(2deg); }
}

/* --- Per-pose prop animations ------------------------------------------ */

.p-confetti { animation: fafm-pop 1.6s ease-out infinite; transform-origin: 60px 60px; }
@keyframes fafm-pop { 0% { transform: scale(0.4); opacity: 0; } 30% { opacity: 1; } 100% { transform: scale(1.15); opacity: 0; } }

.p-rays { animation: fafm-glow 1.8s ease-in-out infinite; }
.p-bulb { animation: fafm-bulb 1.8s ease-in-out infinite; }
@keyframes fafm-glow { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }
@keyframes fafm-bulb { 0%, 100% { fill: #fff3bf; } 50% { fill: #ffd84a; } }

.p-bar { transform-box: fill-box; transform-origin: 50% 100%; animation: fafm-grow 2.4s ease-in-out infinite; }
.p-bar2 { animation-delay: 0.15s; }
.p-bar3 { animation-delay: 0.3s; }
@keyframes fafm-grow { 0%, 100% { transform: scaleY(0.55); } 50% { transform: scaleY(1); } }
.p-arrow { stroke-dasharray: 140; animation: fafm-draw 2.4s ease-in-out infinite; }
@keyframes fafm-draw { 0% { stroke-dashoffset: 140; } 50%, 100% { stroke-dashoffset: 0; } }

.p-coin { animation: fafm-drop 1.8s ease-in infinite; }
@keyframes fafm-drop { 0% { transform: translateY(-20px); opacity: 0; } 20% { opacity: 1; } 70%, 100% { transform: translateY(38px); opacity: 0; } }

.p-shield { transform-box: fill-box; transform-origin: 50% 50%; animation: fafm-pulse 2.2s ease-in-out infinite; }
.p-check { stroke-dasharray: 70; animation: fafm-check 2.2s ease-in-out infinite; }
@keyframes fafm-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes fafm-check { 0%, 20% { stroke-dashoffset: 70; } 60%, 100% { stroke-dashoffset: 0; } }

.p-cash { animation: fafm-slide 2s ease-in-out infinite; }
@keyframes fafm-slide { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px) rotate(-3deg); } }

.p-lens { transform-origin: 50px 50px; animation: fafm-scan 3s ease-in-out infinite; }
@keyframes fafm-scan { 0%, 100% { transform: translate(0, 0); } 33% { transform: translate(10px, -4px); } 66% { transform: translate(-6px, 6px); } }

.p-rocket { animation: fafm-lift 2s ease-in-out infinite; }
.p-flame { transform-box: fill-box; transform-origin: 50% 0; animation: fafm-flame 0.25s ease-in-out infinite alternate; }
@keyframes fafm-lift { 0%, 100% { transform: translateY(4px); } 50% { transform: translateY(-8px); } }
@keyframes fafm-flame { from { transform: scaleY(0.8); } to { transform: scaleY(1.15); } }

.p-heart { transform-box: fill-box; transform-origin: 50% 60%; animation: fafm-beat 1.2s ease-in-out infinite; }
@keyframes fafm-beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.18); } 30% { transform: scale(1); } 45% { transform: scale(1.12); } }

.p-trophy { transform-origin: 60px 104px; animation: fafm-sway 2.6s ease-in-out infinite; }
.p-shine { transform-box: fill-box; transform-origin: 50% 50%; animation: fafm-twinkle 1.4s ease-in-out infinite; }
@keyframes fafm-sway { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }
@keyframes fafm-twinkle { 0%, 100% { transform: scale(0.4) rotate(0); opacity: 0.2; } 50% { transform: scale(1) rotate(45deg); opacity: 1; } }

.p-tick { stroke-dasharray: 30; stroke-dashoffset: 30; animation: fafm-tick 3s ease-in-out infinite; }
.p-tick2 { animation-delay: 0.4s; }
.p-tick3 { animation-delay: 0.8s; }
@keyframes fafm-tick { 0%, 10% { stroke-dashoffset: 30; } 35%, 90% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 30; } }

.p-hello { animation: fafm-glow 2s ease-in-out infinite; }

/* --- Stat counter -------------------------------------------------------- */

.fafm-stat {
    display: inline-flex;
    flex-direction: column;
    min-width: 160px;
    margin: 8px 12px 20px 0;
    padding: 18px 22px;
    border-radius: 16px;
    background: var(--fafm-primary-faint, rgba(74, 150, 232, 0.08));
    border: 1px solid var(--fafm-border, #d9e1ec);
}

.fafm-stat__value {
    font-size: 34px;
    font-weight: 800;
    line-height: 1.1;
    color: var(--fafm-primary, #4a96e8);
}

.fafm-stat__label {
    margin-top: 4px;
    font-size: 13px;
    color: var(--fafm-text-soft, #7086a1);
}

/* --- Call to action ------------------------------------------------------- */

.fafm-post-cta {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 40px 0;
    padding: 24px 28px;
    border-radius: 22px;
    background: linear-gradient(135deg, #1d3fa8 0%, #4a63e0 55%, #8b4ae0 100%);
    color: #ffffff;
    box-shadow: 0 20px 44px rgba(40, 60, 160, 0.28);
}

.fafm-post-cta .fafm-mascot {
    margin: 0;
}

.fafm-post-cta .fafm-mascot__glow {
    background: radial-gradient(circle, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0) 70%);
}

.fafm-post-cta__copy p {
    margin: 0 0 12px;
    color: rgba(255, 255, 255, 0.9);
}

.fafm-post-cta__copy .fafm-post-cta__title {
    margin-bottom: 6px;
    font-size: 21px;
    font-weight: 800;
    color: #ffffff;
}

.fafm-post-cta__button {
    display: inline-block;
    padding: 12px 22px;
    border-radius: 999px;
    background: #ffffff;
    color: #1d3fa8 !important;
    font-weight: 800;
    text-decoration: none !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fafm-post-cta__button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

@media (max-width: 640px) {
    .fafm-mascot,
    .fafm-mascot--right {
        flex-direction: column;
        align-items: flex-start;
    }

    .fafm-mascot__stage {
        flex-basis: auto;
        width: 130px;
        height: 130px;
    }

    .fafm-mascot__body {
        width: 92px;
    }

    .fafm-mascot__bubble::before {
        top: -9px;
        left: 40px;
        margin-top: 0;
        transform: rotate(135deg);
    }

    .fafm-mascot--right .fafm-mascot__bubble::before {
        left: 40px;
        right: auto;
        transform: rotate(135deg);
    }

    .fafm-post-cta {
        flex-direction: column;
        align-items: flex-start;
        padding: 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fafm-mascot *,
    .fafm-mascot *::before {
        animation: none !important;
        transition: none !important;
    }

    .fafm-mascot .fafm-mascot__bubble {
        opacity: 1;
        transform: none;
    }
}

/* ==========================================================================
   First-contact blocks (FAFM_Blog_Blocks) — story, quick take, jump-to,
   takeaway, animated app mock-ups, reading progress.
   ========================================================================== */

.fafm-read-progress {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999;
    height: 4px;
    width: 100%;
    transform: scaleX(0);
    transform-origin: 0 50%;
    background: linear-gradient(90deg, var(--post-accent, #4a63e0), var(--post-accent-2, #8b4ae0));
    pointer-events: none;
}

/* --- Story ------------------------------------------------------------- */

.fafm-story {
    position: relative;
    margin: 0 0 28px;
    border-radius: 24px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--post-accent, #4a63e0) 0%, var(--post-accent-2, #8b4ae0) 100%);
    box-shadow: 0 24px 50px rgba(40, 50, 140, 0.28);
    color: #ffffff;
    user-select: none;
    -webkit-user-select: none;
}

.fafm-story::before {
    content: "";
    position: absolute;
    inset: -40% -20% auto auto;
    width: 70%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    pointer-events: none;
}

.fafm-story__bars {
    position: absolute;
    top: 14px;
    left: 18px;
    right: 18px;
    z-index: 3;
    display: flex;
    gap: 5px;
}

.fafm-story__bars span {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.3);
    overflow: hidden;
}

.fafm-story__bars span i {
    display: block;
    height: 100%;
    width: 100%;
    background: #ffffff;
    transform: scaleX(0);
    transform-origin: 0 50%;
}

.fafm-story__bars span.is-done i {
    transform: scaleX(1);
}

.fafm-story__bars span.is-active i {
    animation: fafm-story-fill var(--story-ms, 5000ms) linear forwards;
}

.fafm-story.is-paused .fafm-story__bars span.is-active i {
    animation-play-state: paused;
}

@keyframes fafm-story-fill {
    to { transform: scaleX(1); }
}

.fafm-story__track {
    position: relative;
    min-height: 330px;
}

.fafm-story__slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 44px 64px 34px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(30px);
    transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.2, 0.8, 0.3, 1), visibility 0.45s;
}

.fafm-story__slide.is-active {
    position: relative;
    opacity: 1;
    visibility: visible;
    transform: none;
}

/* Without JS every slide simply stacks, fully readable. */
.fafm-story:not(.is-ready) .fafm-story__slide {
    position: relative;
    opacity: 1;
    visibility: visible;
    transform: none;
}

.fafm-story__visual {
    flex: 0 0 auto;
}

.fafm-story .fafm-mascot {
    margin: 0;
}

.fafm-story .fafm-mascot__stage {
    width: 190px;
    height: 190px;
}

.fafm-story .fafm-mascot__body {
    width: 140px;
}

.fafm-story .fafm-mascot__prop {
    width: 88px;
    height: 88px;
}

.fafm-story .fafm-mascot__glow {
    background: radial-gradient(circle, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0) 70%);
}

.fafm-story__copy {
    flex: 1 1 auto;
    min-width: 0;
}

.fafm-story__title {
    margin: 0 0 10px !important;
    font-size: clamp(24px, 3.6vw, 34px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: #ffffff;
}

.fafm-story__text {
    margin: 0 !important;
    font-size: 17px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
}

.fafm-story__slide.is-active .fafm-story__title {
    animation: fafm-story-pop 0.55s cubic-bezier(0.2, 0.8, 0.3, 1.2) both;
}

.fafm-story__slide.is-active .fafm-story__text,
.fafm-story__slide.is-active .fafm-story__actions {
    animation: fafm-story-pop 0.55s 0.12s cubic-bezier(0.2, 0.8, 0.3, 1.2) both;
}

.fafm-story__slide.is-active .fafm-mascot__stage {
    animation: fafm-story-bounce 0.7s cubic-bezier(0.2, 0.8, 0.3, 1.4) both;
}

@keyframes fafm-story-pop {
    from { opacity: 0; transform: translateY(14px) scale(0.97); }
    to { opacity: 1; transform: none; }
}

@keyframes fafm-story-bounce {
    from { opacity: 0; transform: scale(0.6) rotate(-8deg); }
    to { opacity: 1; transform: none; }
}

.fafm-story__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.fafm-story__cta,
.fafm-story__more {
    padding: 11px 20px;
    border-radius: 999px;
    font-weight: 800;
    text-decoration: none !important;
}

.fafm-story__cta {
    background: #ffffff;
    color: #1d3fa8 !important;
}

.fafm-story__more {
    border: 2px solid rgba(255, 255, 255, 0.6);
    color: #ffffff !important;
}

.fafm-story__nav,
.fafm-story__pause {
    position: absolute;
    z-index: 3;
    border: 0;
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    cursor: pointer;
    transition: background 0.2s ease;
}

.fafm-story__nav:hover,
.fafm-story__pause:hover {
    background: rgba(255, 255, 255, 0.32);
}

.fafm-story__nav {
    top: 50%;
    width: 38px;
    height: 38px;
    margin-top: -19px;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
}

.fafm-story__nav.is-prev { left: 12px; }
.fafm-story__nav.is-next { right: 12px; }

.fafm-story__pause {
    top: 28px;
    right: 18px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 10px;
}

.fafm-story:not(.is-ready) .fafm-story__nav,
.fafm-story:not(.is-ready) .fafm-story__pause,
.fafm-story:not(.is-ready) .fafm-story__bars {
    display: none;
}

/* --- Quick take ---------------------------------------------------------- */

.fafm-quicktake {
    margin: 0 0 24px;
    padding: 22px 24px;
    border-radius: 20px;
    background: var(--fafm-surface, #ffffff);
    border: 1px solid var(--fafm-border, #d9e1ec);
    box-shadow: var(--fafm-shadow-md, 0 14px 34px rgba(27, 52, 89, 0.09));
}

.fafm-quicktake__title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px !important;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--post-accent, #4a63e0);
}

.fafm-quicktake__list {
    display: grid;
    gap: 12px;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none;
}

.fafm-quicktake__list li {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 !important;
    font-size: 16.5px;
    font-weight: 600;
    line-height: 1.45;
    color: var(--fafm-text-strong, #183964);
    opacity: 0;
    transform: translateX(-12px);
    transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.2, 0.8, 0.3, 1.2);
}

.fafm-quicktake.is-inview li { opacity: 1; transform: none; }
.fafm-quicktake.is-inview li:nth-child(2) { transition-delay: 0.12s; }
.fafm-quicktake.is-inview li:nth-child(3) { transition-delay: 0.24s; }
.fafm-quicktake.is-inview li:nth-child(4) { transition-delay: 0.36s; }
.fafm-quicktake.is-inview li:nth-child(5) { transition-delay: 0.48s; }

.fafm-quicktake__icon {
    flex: 0 0 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--post-accent, #4a63e0), var(--post-accent-2, #8b4ae0));
    color: #ffffff;
}

.fafm-ico {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
}

/* --- Jump to ------------------------------------------------------------- */

.fafm-toc {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 32px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
}

.fafm-toc::-webkit-scrollbar {
    display: none;
}

.fafm-toc__label {
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--fafm-text-faint, #97a8bc);
}

.fafm-toc__links {
    display: flex;
    gap: 8px;
}

.fafm-toc__links a {
    flex: 0 0 auto;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid var(--fafm-border, #d9e1ec);
    background: var(--fafm-surface, #ffffff);
    color: var(--fafm-text-strong, #183964) !important;
    font-size: 13.5px;
    font-weight: 600 !important;
    text-decoration: none !important;
    white-space: nowrap;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.fafm-toc__links a:hover {
    border-color: var(--post-accent, #4a63e0);
    transform: translateY(-2px);
}

.fafm-post__content h2[id] {
    scroll-margin-top: 90px;
}

/* --- Takeaway ------------------------------------------------------------ */

.fafm-takeaway {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: -4px 0 18px;
    padding: 10px 14px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--post-accent, #4a63e0) 10%, transparent);
    color: var(--fafm-text-strong, #183964);
    font-weight: 700;
    font-size: 16px;
}

.fafm-takeaway .fafm-ico {
    color: var(--post-accent, #4a63e0);
}

/* --- Animated app mock-ups ----------------------------------------------- */

.fafm-mockup {
    margin: 30px auto;
    max-width: 440px;
}

.fafm-mockup__window {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background: var(--fafm-surface, #ffffff);
    border: 1px solid var(--fafm-border, #d9e1ec);
    box-shadow: 0 22px 44px rgba(20, 40, 90, 0.16);
    transform: perspective(900px) rotateX(6deg) translateY(10px);
    transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.fafm-mockup.is-inview .fafm-mockup__window {
    transform: none;
}

.fafm-mockup__bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--fafm-border, #d9e1ec);
    background: var(--fafm-surface-2, #fbfcff);
    font-size: 12.5px;
    font-weight: 700;
    color: var(--fafm-text-soft, #7086a1);
}

.fafm-mockup__bar i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #ef5d6f;
}

.fafm-mockup__bar i:nth-child(2) { background: #f5b82e; }
.fafm-mockup__bar i:nth-child(3) { background: #2fb37a; margin-right: 6px; }

.fafm-mockup__body {
    position: relative;
    display: grid;
    gap: 10px;
    padding: 16px 18px 18px;
    font-size: 14px;
    color: var(--fafm-text-strong, #183964);
}

.fafm-mockup figcaption {
    margin-top: 10px;
    text-align: center;
    font-size: 12.5px;
    color: var(--fafm-text-faint, #97a8bc);
}

.mk-in {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.fafm-mockup.is-inview .mk-in { opacity: 1; transform: none; }
.fafm-mockup.is-inview .mk-in:nth-child(2) { transition-delay: 0.25s; }
.fafm-mockup.is-inview .mk-in:nth-child(3) { transition-delay: 0.5s; }
.fafm-mockup.is-inview .mk-in:nth-child(4) { transition-delay: 0.75s; }
.fafm-mockup.is-inview .mk-in:nth-child(5) { transition-delay: 1s; }
.fafm-mockup.is-inview .mk-in:nth-child(6) { transition-delay: 1.25s; }

.mk-row,
.mk-total,
.mk-task {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mk-row span:first-child,
.mk-task span:last-child {
    flex: 1;
}

.mk-row b {
    margin-left: auto;
}

.mk-total {
    justify-content: space-between;
    padding-top: 10px;
    border-top: 2px dashed var(--fafm-border, #d9e1ec);
    font-size: 16px;
    font-weight: 800;
}

.mk-stamp {
    position: absolute;
    right: 20px;
    bottom: 58px;
    padding: 4px 12px;
    border: 3px solid #2fb37a;
    border-radius: 8px;
    color: #2fb37a;
    font-weight: 900;
    letter-spacing: 0.12em;
    transform: rotate(-12deg) scale(2);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.3, 1.4) 1.4s, opacity 0.2s 1.4s;
}

.fafm-mockup.is-inview .mk-stamp {
    transform: rotate(-12deg) scale(1);
    opacity: 1;
}

.mk-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--post-accent, #4a63e0);
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
}

.mk-avatar + span {
    flex: 1;
}

.mk-progress {
    height: 8px;
    border-radius: 4px;
    background: var(--fafm-border, #d9e1ec);
    overflow: hidden;
}

.mk-progress i {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #2fb37a, #48b97d);
    transition: width 1.2s ease 0.9s;
}

.fafm-mockup.is-inview .mk-progress i {
    width: 100%;
}

.mk-note {
    color: #2fb37a;
    font-weight: 700;
}

.mk-meter span {
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
}

.mk-meter em {
    margin-left: 6px;
    padding: 1px 7px;
    border-radius: 999px;
    background: #ef5d6f;
    color: #ffffff;
    font-size: 10.5px;
    font-style: normal;
    font-weight: 800;
}

.mk-track {
    height: 10px;
    border-radius: 5px;
    background: var(--fafm-border, #d9e1ec);
    overflow: hidden;
}

.mk-track i {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 5px;
    background: linear-gradient(90deg, var(--post-accent, #4a63e0), var(--post-accent-2, #8b4ae0));
    transition: width 1.1s cubic-bezier(0.2, 0.8, 0.3, 1) 0.3s;
}

.mk-meter.is-low .mk-track i {
    background: #ef5d6f;
}

.fafm-mockup.is-inview .mk-track i {
    width: var(--w);
}

.mk-button {
    padding: 11px;
    border-radius: 10px;
    background: var(--post-accent, #4a63e0);
    color: #ffffff;
    text-align: center;
    font-weight: 800;
}

.mk-box {
    position: relative;
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 2px solid var(--fafm-border, #c8d3e2);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.fafm-mockup.is-inview .mk-box {
    background: #2fb37a;
    border-color: #2fb37a;
}

.fafm-mockup.is-inview .mk-box::after {
    content: "✓";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
}

.fafm-mockup.is-inview .mk-task:nth-child(1) .mk-box { transition-delay: 0.6s; }
.fafm-mockup.is-inview .mk-task:nth-child(2) .mk-box { transition-delay: 1s; }
.fafm-mockup.is-inview .mk-task:nth-child(3) .mk-box { transition-delay: 1.4s; }
.fafm-mockup.is-inview .mk-task:nth-child(4) .mk-box { transition-delay: 1.8s; }

.mk-bubble {
    max-width: 80%;
    padding: 9px 13px;
    border-radius: 14px 14px 14px 4px;
    background: var(--fafm-surface-2, #f0f3f9);
    border: 1px solid var(--fafm-border, #d9e1ec);
}

.mk-bubble.is-me {
    justify-self: end;
    border-radius: 14px 14px 4px 14px;
    background: var(--post-accent, #4a63e0);
    border-color: transparent;
    color: #ffffff;
}

.mk-bars {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    height: 150px;
    padding-top: 6px;
}

.mk-pair {
    flex: 1;
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 100%;
}

.mk-pair i {
    flex: 1;
    height: 0;
    border-radius: 5px 5px 2px 2px;
    transition: height 0.9s cubic-bezier(0.2, 0.8, 0.3, 1) var(--d, 0ms);
}

.mk-pair i.is-in { background: #2fb37a; }
.mk-pair i.is-out { background: #ef8a5d; }

.fafm-mockup.is-inview .mk-pair i {
    height: var(--h);
}

.mk-legend {
    display: flex;
    gap: 16px;
    font-size: 12.5px;
    color: var(--fafm-text-soft, #7086a1);
}

.mk-legend span::before {
    content: "";
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 6px;
    border-radius: 3px;
    vertical-align: -1px;
}

.mk-legend .is-in::before { background: #2fb37a; }
.mk-legend .is-out::before { background: #ef8a5d; }

@media (max-width: 640px) {
    .fafm-story__track {
        min-height: 440px;
    }

    .fafm-story__slide {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        gap: 10px;
        padding: 40px 26px 30px;
    }

    .fafm-story .fafm-mascot__stage {
        width: 150px;
        height: 150px;
    }

    .fafm-story .fafm-mascot__body {
        width: 110px;
    }

    .fafm-story .fafm-mascot__prop {
        width: 70px;
        height: 70px;
    }

    .fafm-story__actions {
        justify-content: center;
    }

    .fafm-story__nav {
        display: none;
    }

    .fafm-story__title {
        font-size: 25px;
    }

    .fafm-story__text {
        font-size: 16px;
    }

    .fafm-quicktake {
        padding: 18px;
    }

    .fafm-quicktake__list li {
        font-size: 15.5px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fafm-story__slide,
    .fafm-quicktake__list li,
    .mk-in,
    .fafm-mockup__window,
    .mk-track i,
    .mk-pair i,
    .mk-progress i,
    .mk-stamp {
        transition: none !important;
        animation: none !important;
    }

    .fafm-quicktake__list li,
    .mk-in {
        opacity: 1;
        transform: none;
    }
}
.fafm-article-anchor { display: block; scroll-margin-top: 80px; }
