/* Story demo: layered 3D mockup scenes shared by the portfolio case studies */

.sfs {
    border-radius: 1.5rem;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    overflow: hidden;
}

/* Single looping scene with no captions or chapter nav, set into a home-page section */
.sfs-vignette {
    border: 0;
    border-radius: 1.25rem;
    background: transparent;
}

/* Used as the page cover: runs edge to edge inside the case-study card */
.sfs-cover {
    border-radius: 0;
    border-width: 1px 0;
}

.sfs-stage {
    position: relative;
    background: #fff1f2;
    transition: background-color 0.8s ease;
}

/* Fixed 800x440 canvas scaled to the card width so the composition never reflows */
.sfs-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 800 / var(--sfs-h, 440);
    overflow: hidden;
}

.sfs-canvas {
    position: absolute;
    left: 0;
    top: 0;
    width: 800px;
    height: calc(var(--sfs-h, 440) * 1px);
    transform: scale(var(--s, 1));
    transform-origin: 0 0;
    font-family: 'Prompt', sans-serif;
    color: #0f172a;
}

.sfs-scene {
    position: absolute;
    inset: 0;
}

.sfs-scene[hidden] { display: none; }
.sfs-scene.is-active { animation: sfs-enter 0.6s ease both; }

.sfs-captions { padding: 1.25rem 1.25rem 1.1rem; text-align: center; }
.sfs-caption[hidden] { display: none; }
.sfs-caption { animation: sfs-enter 0.5s ease both; }

.sfs-caption h3 {
    font-size: 1.3rem;
    line-height: 1.35;
    font-weight: 700;
    color: #0f172a;
}

.sfs-caption p {
    margin-top: 0.2rem;
    color: #64748b;
    font-size: 0.92rem;
}

@media (min-width: 768px) {
    .sfs-captions { padding: 1.5rem 2rem 1.25rem; }
    .sfs-caption h3 { font-size: 1.65rem; }
}

/* ---------- Chapter nav ---------- */

.sfs-nav {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
    padding: 0.75rem;
    border-top: 1px solid #e2e8f0;
}

.sfs-tab {
    position: relative;
    flex: 1;
    min-width: 0;
    padding: 0.6rem 0.3rem 0.75rem;
    border-radius: 0.85rem;
    border: 0;
    background: transparent;
    color: #94a3b8;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    overflow: hidden;
    transition: color 0.3s ease, background-color 0.3s ease;
}

.sfs-tab:hover { color: #475569; background: #f8fafc; }
.sfs-tab:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }

.sfs-tab-num {
    display: inline-grid;
    place-items: center;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 9999px;
    background: #f1f5f9;
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.sfs-tab-label { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sfs-tab-bar {
    position: absolute;
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.3rem;
    height: 3px;
    border-radius: 9999px;
    background: #e2e8f0;
    overflow: hidden;
}

.sfs-tab-bar span {
    display: block;
    height: 100%;
    width: 0;
    background: #2563eb;
    border-radius: inherit;
}

.sfs-tab.is-done .sfs-tab-bar span { width: 100%; }
.sfs-tab.is-active { color: #0f172a; }
.sfs-tab.is-active .sfs-tab-num { background: #2563eb; color: #fff; }

@media (max-width: 639px) {
    .sfs-nav { gap: 0.25rem; padding: 0.5rem; }
    .sfs-tab { font-size: 0.78rem; }
}

/* ---------- Mockup building blocks ---------- */

.sfx-floor {
    position: absolute;
    left: 90px;
    right: 90px;
    bottom: 26px;
    height: 60px;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(15, 23, 42, 0.16), rgba(15, 23, 42, 0));
}

.sfx-world {
    position: absolute;
    inset: 0;
    perspective: 1500px;
    perspective-origin: 50% 30%;
}

.sfx-plane {
    position: absolute;
    inset: 0;
    transform-style: preserve-3d;
}

.sfx-tilt-a { transform: rotateX(16deg) rotateY(-10deg) rotateZ(-2deg); }
.sfx-tilt-b { transform: rotateX(10deg) rotateY(-14deg); }
.sfx-tilt-c { transform: rotateX(8deg) rotateY(12deg); }
.sfx-tilt-d { transform: rotateX(14deg); }

.sfx-shadow,
.sfx-win,
.sfx-doc,
.sfx-chat,
.sfx-ocr,
.sfx-out {
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.06),
        0 8px 16px -6px rgba(15, 23, 42, 0.12),
        0 30px 60px -18px rgba(15, 23, 42, 0.28);
}

.sfx-win {
    position: absolute;
    background: #fff;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.07);
    overflow: hidden;
    transform: translateZ(var(--z, 0));
}

.sfx-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 30px;
    padding: 0 12px;
    background: linear-gradient(#f8fafc, #f1f5f9);
    border-bottom: 1px solid #e8edf3;
    font-size: 11px;
    color: #64748b;
    white-space: nowrap;
}

.sfx-bar i { width: 9px; height: 9px; border-radius: 50%; background: #e2e8f0; flex: none; }
.sfx-bar i:nth-child(1) { background: #fb7185; }
.sfx-bar i:nth-child(2) { background: #fbbf24; }
.sfx-bar i:nth-child(3) { background: #4ade80; }
.sfx-bar span { margin-left: 6px; overflow: hidden; text-overflow: ellipsis; }

.sfx-bar-green { background: linear-gradient(#16a34a, #15803d); color: #dcfce7; border-bottom-color: #166534; }
.sfx-bar-green i { opacity: 0.9; }

/* Spreadsheet */
.sfx-sheet {
    width: 100%;
    border-collapse: collapse;
    font-size: 11.5px;
    font-variant-numeric: tabular-nums;
}

.sfx-sheet th {
    background: #f8fafc;
    color: #94a3b8;
    font-weight: 500;
    font-size: 10px;
    border: 1px solid #edf1f5;
    padding: 3px 6px;
}

.sfx-sheet td {
    border: 1px solid #edf1f5;
    padding: 6px 8px;
    color: #334155;
    text-align: right;
}

.sfx-sheet td:first-of-type { text-align: left; }
.sfx-sheet td.b { font-weight: 600; color: #0f172a; background: #f8fafc; text-align: left; }
.sfx-sheet td.err { background: #fee2e2; color: #dc2626; font-weight: 700; }
.sfx-sheet td.warn { background: #fef3c7; color: #b45309; font-weight: 700; }
.sfx-sheet td.muted { color: #94a3b8; text-align: center; font-style: italic; }

/* Paper document */
.sfx-doc,
.sfx-out {
    position: absolute;
    background: #fff;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.07);
    padding: 16px 14px;
    transform: translateZ(var(--z, 0));
}

.sfx-doc-tag {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.sfx-doc-title { display: block; font-size: 13px; font-weight: 700; margin-bottom: 8px; }

.sfx-line {
    display: block;
    height: 6px;
    border-radius: 3px;
    background: #e9eef4;
    margin: 6px 0;
}

.sfx-line.w80 { width: 80%; }
.sfx-line.w60 { width: 60%; }

.sfx-doc-rows { margin-top: 10px; border-top: 1px dashed #e2e8f0; }
.sfx-doc-rows span { display: block; height: 18px; border-bottom: 1px dashed #e2e8f0; position: relative; }
.sfx-doc-rows span::before { content: ""; position: absolute; left: 0; top: 6px; width: 55%; height: 5px; border-radius: 3px; background: #eef2f6; }
.sfx-doc-rows span::after { content: ""; position: absolute; right: 0; top: 6px; width: 22%; height: 5px; border-radius: 3px; background: #eef2f6; }

.sfx-doc-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-top: 10px;
    font-size: 11px;
    color: #64748b;
}

.sfx-doc-total b { font-size: 14px; color: #0f172a; }

/* Chat with slip */
.sfx-chat {
    position: absolute;
    width: 190px;
    padding: 10px;
    border-radius: 18px;
    background: #f1f5f9;
    border: 6px solid #0f172a;
    transform: rotate(6deg);
}

.sfx-chat-head { display: flex; align-items: center; gap: 6px; font-size: 11px; margin-bottom: 8px; }
.sfx-avatar { width: 20px; height: 20px; border-radius: 50%; background: linear-gradient(135deg, #fda4af, #f472b6); }

.sfx-bubble {
    display: inline-block;
    background: #fff;
    border-radius: 12px 12px 12px 4px;
    padding: 6px 9px;
    font-size: 11px;
    color: #334155;
    margin: 4px 0;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.sfx-slip-mini {
    background: #fff;
    border-radius: 10px;
    padding: 10px;
    margin: 4px 0;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.sfx-slip-mini b { display: block; font-size: 17px; margin: 6px 0 4px; }

.sfx-slip-ok {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10.5px;
    font-weight: 600;
    color: #15803d;
}

/* Chips */
.sfx-chip {
    position: absolute;
    padding: 8px 14px;
    border-radius: 999px;
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    box-shadow: 0 6px 18px -6px rgba(15, 23, 42, 0.3);
    white-space: nowrap;
}

.sfx-chip-red { background: #ef4444; color: #fff; }
.sfx-chip-green { background: #16a34a; color: #fff; }

/* App window (scene 2) */
.sfx-app-body { padding: 14px 16px 16px; }

.sfx-src {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    margin-bottom: 7px;
    border: 1px solid #eef2f6;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
}

.sfx-src-ico { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; font-size: 13px; }

.sfx-toggle {
    margin-left: auto;
    width: 30px;
    height: 17px;
    border-radius: 999px;
    background: #2563eb;
    position: relative;
}

.sfx-toggle::after {
    content: "";
    position: absolute;
    right: 2px;
    top: 2px;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #fff;
}

.sfx-run-wrap { margin-top: 12px; }

.sfx-run {
    display: block;
    text-align: center;
    padding: 10px;
    border-radius: 10px;
    background: linear-gradient(#3b82f6, #2563eb);
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 4px 0 #1e40af, 0 10px 18px -6px rgba(37, 99, 235, 0.6);
}

.sfx-progress {
    margin-top: 10px;
    height: 6px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.sfx-progress span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, #3b82f6, #10b981);
}

.sfx-file {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px 8px 8px;
    background: #fff;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
    color: #334155;
    box-shadow: 0 10px 24px -8px rgba(15, 23, 42, 0.35);
    white-space: nowrap;
    z-index: 2;
}

.sfx-file i {
    font-style: normal;
    font-size: 9px;
    font-weight: 700;
    color: #fff;
    padding: 4px 5px;
    border-radius: 5px;
}

.sfx-in-l { left: 40px; }
.sfx-in-r { right: 40px; }

.sfx-cursor {
    position: absolute;
    left: 420px;
    top: 330px;
    width: 30px;
    height: 30px;
    z-index: 3;
    filter: drop-shadow(0 4px 6px rgba(15, 23, 42, 0.3));
}

/* Matching table (scene 3) */
.sfx-match { position: relative; padding: 8px 12px 12px; }

.sfx-row {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr 1.1fr;
    align-items: center;
    padding: 8px 6px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    color: #334155;
}

.sfx-row.head { font-size: 10.5px; color: #94a3b8; font-weight: 600; letter-spacing: 0.04em; }
.sfx-row span:first-child { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }

.sfx-st { position: relative; height: 20px; }
.sfx-st em, .sfx-st b {
    position: absolute;
    left: 0;
    top: 0;
    font-style: normal;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    white-space: nowrap;
}

.sfx-st em { color: #94a3b8; background: #f1f5f9; }
.sfx-st b { opacity: 0; transform: scale(0.6); }
.sfx-st b.ok { background: #dcfce7; color: #15803d; }
.sfx-st b.bad { background: #fef3c7; color: #b45309; }

.sfx-scan {
    position: absolute;
    left: 6px;
    right: 6px;
    top: 36px;
    height: 34px;
    border-radius: 8px;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.35);
}

.sfx-ocr {
    position: absolute;
    left: 28px;
    top: 120px;
    width: 188px;
    padding: 14px;
    background: #fff;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.07);
    transform: rotate(-5deg);
    z-index: 2;
}

.sfx-ocr-amt, .sfx-ocr-row { position: relative; }
.sfx-ocr-amt b { display: block; font-size: 20px; margin: 8px 0 6px; }
.sfx-ocr-row { display: flex; justify-content: space-between; font-size: 11px; color: #64748b; padding: 5px 0; border-top: 1px dashed #e2e8f0; }
.sfx-ocr-row b { color: #0f172a; font-weight: 600; }

.sfx-box {
    position: absolute;
    inset: -2px -6px;
    border: 2px solid #3b82f6;
    border-radius: 6px;
    background: rgba(59, 130, 246, 0.06);
    opacity: 0;
}

.sfx-ocr-tag {
    position: absolute;
    top: -12px;
    right: 12px;
    padding: 3px 9px;
    border-radius: 999px;
    background: #2563eb;
    color: #fff;
    font-size: 10.5px;
    font-weight: 600;
}

.sfx-exc {
    position: absolute;
    right: 40px;
    top: 300px;
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 12px 16px 12px 12px;
    border-radius: 14px;
    background: #fff;
    border-left: 4px solid #f59e0b;
    box-shadow: 0 18px 40px -14px rgba(15, 23, 42, 0.4);
    z-index: 2;
}

.sfx-exc-ico {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #fef3c7;
    color: #b45309;
    font-weight: 800;
}

.sfx-exc b { display: block; font-size: 13px; }
.sfx-exc span { font-size: 11px; color: #64748b; }

/* Outputs (scene 4) */
.sfx-out {
    width: 168px;
    min-height: 220px;
    padding-top: 0;
    overflow: visible;
    transform: rotateZ(var(--r, 0)) translateZ(0);
}

.sfx-out-head {
    margin: 0 -14px 12px;
    padding: 9px 14px;
    border-radius: 12px 12px 0 0;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
}

.sfx-bars {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 80px;
    margin: 8px 0 12px;
    padding-bottom: 4px;
    border-bottom: 1px solid #e2e8f0;
}

.sfx-bars span {
    flex: 1;
    height: var(--h);
    border-radius: 4px 4px 0 0;
    background: linear-gradient(#34d399, #059669);
}

.sfx-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3px;
}

.sfx-grid span { height: 20px; border-radius: 3px; background: #f0fdf4; border: 1px solid #dcfce7; }
.sfx-grid span:nth-child(-n+3) { background: #bbf7d0; }

.sfx-stamp {
    position: absolute;
    right: -12px;
    top: -12px;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #16a34a;
    color: #fff;
    font-style: normal;
    font-weight: 800;
    font-size: 18px;
    border: 3px solid #fff;
    box-shadow: 0 6px 14px -4px rgba(22, 163, 74, 0.6);
}

.sfx-toast {
    position: absolute;
    right: 24px;
    top: 14px;
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 10px 16px 10px 10px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 18px 40px -14px rgba(15, 23, 42, 0.4);
}

.sfx-toast-ico {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #dcfce7;
    color: #15803d;
    font-weight: 800;
}

.sfx-toast b { display: block; font-size: 13px; }
.sfx-toast span { font-size: 11px; color: #64748b; }

/* ---------- Motion (runs only in the active scene) ---------- */

.is-active .sfx-float { animation: sfx-float 3.2s ease-in-out infinite alternate; animation-delay: var(--d, 0s); }
.is-active .sfx-chat.sfx-float { animation-name: sfx-float-chat; }
.is-active .sfx-pulse { animation: sfx-pulse 1.6s ease-in-out infinite; animation-delay: var(--d, 0s); }

.is-active .sfx-in-l,
.is-active .sfx-in-r { opacity: 0; animation: sfx-in-l 2.6s cubic-bezier(.5, 0, .3, 1) infinite; animation-delay: var(--d, 0s); }
.is-active .sfx-in-r { animation-name: sfx-in-r; }
.is-active .sfx-press { animation: sfx-press 2.6s ease infinite; }
.is-active .sfx-cursor { animation: sfx-cursor 2.6s ease-in-out infinite; }
.is-active .sfx-progress span { animation: sfx-progress 2.6s ease infinite; }

.is-active .sfx-scan { animation: sfx-scan 3s ease-in-out infinite; }
.is-active .sfx-row:not(.head) { opacity: 0; animation: sfx-row 0.4s ease forwards; animation-delay: calc(var(--d) - 0.3s); }
.is-active .sfx-st em { animation: sfx-out 0.2s ease forwards; animation-delay: calc(var(--d) + 0.25s); }
.is-active .sfx-st b { animation: sfx-pop 0.35s cubic-bezier(.2, 1.5, .4, 1) forwards; animation-delay: calc(var(--d) + 0.3s); }
.is-active .sfx-box { animation: sfx-in 0.3s ease forwards; animation-delay: var(--d); }
.is-active .sfx-ocr { animation: sfx-slide-r 0.6s ease both; }
.is-active .sfx-exc { opacity: 0; animation: sfx-exc 0.6s cubic-bezier(.2, 1.3, .4, 1) forwards 2.2s; }

.is-active .sfx-out { opacity: 0; animation: sfx-deal 0.7s cubic-bezier(.2, 1.2, .4, 1) forwards; animation-delay: var(--d); }
.is-active .sfx-stamp { opacity: 0; animation: sfx-stamp 0.45s cubic-bezier(.2, 1.6, .4, 1) forwards; animation-delay: var(--d); }
.is-active .sfx-bars span { transform-origin: bottom; animation: sfx-grow 0.8s ease both 0.6s; }
.is-active .sfx-toast { opacity: 0; animation: sfx-toast 0.6s cubic-bezier(.2, 1.3, .4, 1) forwards 1.6s; }
.is-active .sfx-chip-green { animation: sfx-in 0.5s ease both 2s; }

@keyframes sfs-enter {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

@keyframes sfx-float {
    from { transform: translateZ(var(--z, 0)) translateY(0); }
    to { transform: translateZ(var(--z, 0)) translateY(-10px); }
}

@keyframes sfx-float-chat {
    from { transform: rotate(6deg) translateY(0); }
    to { transform: rotate(4deg) translateY(-12px); }
}

@keyframes sfx-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes sfx-in-l {
    0%, 30% { opacity: 0; transform: translate(-30px, 0) scale(1); }
    40% { opacity: 1; transform: translate(0, 0); }
    85% { opacity: 1; transform: translate(300px, 40px) scale(0.6); }
    100% { opacity: 0; transform: translate(330px, 50px) scale(0.4); }
}

@keyframes sfx-in-r {
    0%, 30% { opacity: 0; transform: translate(30px, 0) scale(1); }
    40% { opacity: 1; transform: translate(0, 0); }
    85% { opacity: 1; transform: translate(-300px, 30px) scale(0.6); }
    100% { opacity: 0; transform: translate(-330px, 40px) scale(0.4); }
}

@keyframes sfx-press {
    0%, 22% { transform: translateY(0); box-shadow: 0 4px 0 #1e40af, 0 10px 18px -6px rgba(37, 99, 235, 0.6); }
    28%, 34% { transform: translateY(4px); box-shadow: 0 0 0 #1e40af, 0 4px 8px -4px rgba(37, 99, 235, 0.6); }
    40%, 100% { transform: translateY(0); box-shadow: 0 4px 0 #1e40af, 0 10px 18px -6px rgba(37, 99, 235, 0.6); }
}

@keyframes sfx-cursor {
    0% { transform: translate(90px, 70px); opacity: 0; }
    8% { opacity: 1; }
    24% { transform: translate(0, 0); }
    30% { transform: translate(0, 2px) scale(0.9); }
    36% { transform: translate(0, 0) scale(1); opacity: 1; }
    60%, 100% { transform: translate(60px, 50px); opacity: 0; }
}

@keyframes sfx-progress {
    0%, 30% { width: 0; }
    90%, 100% { width: 100%; }
}

@keyframes sfx-scan {
    0% { transform: translateY(0); }
    50% { transform: translateY(152px); }
    100% { transform: translateY(0); }
}

@keyframes sfx-row {
    from { opacity: 0; transform: translateX(-8px); }
    to { opacity: 1; transform: none; }
}

@keyframes sfx-out { to { opacity: 0; } }
@keyframes sfx-in { from { opacity: 0; } to { opacity: 1; } }

@keyframes sfx-pop {
    to { opacity: 1; transform: scale(1); }
}

@keyframes sfx-slide-r {
    from { opacity: 0; transform: rotate(-5deg) translateX(-30px); }
    to { opacity: 1; transform: rotate(-5deg); }
}

@keyframes sfx-exc {
    from { opacity: 0; transform: translateY(20px) scale(0.9); }
    to { opacity: 1; transform: none; }
}

@keyframes sfx-deal {
    from { opacity: 0; transform: rotateZ(0) translateY(60px) translateZ(-80px); }
    to { opacity: 1; transform: rotateZ(var(--r, 0)) translateZ(0); }
}

@keyframes sfx-stamp {
    from { opacity: 0; transform: scale(2) rotate(-20deg); }
    to { opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes sfx-grow {
    from { transform: scaleY(0); }
    to { transform: scaleY(1); }
}

@keyframes sfx-toast {
    from { opacity: 0; transform: translateY(-16px); }
    to { opacity: 1; transform: none; }
}

/* Reduced motion: every scene shows its finished picture without movement */
@media (prefers-reduced-motion: reduce) {
    .sfs *, .sfs *::before, .sfs *::after {
        animation-duration: 0.001ms !important;
        animation-delay: 0s !important;
        animation-iteration-count: 1 !important;
        transition: none !important;
    }

    .sfx-in-l, .sfx-in-r, .sfx-cursor, .sfx-scan { display: none; }
    .is-active .sfx-progress span { animation: none !important; width: 100%; }
}
