/* 万家上机流程 · 电影分镜（无 WebGL） */

.wanjia-ai-section {
    position: relative;
    z-index: 2;
    margin: 0 0 3.5rem;
    width: 100%;
    /* 顶栏 54 + 子导航 ~52，锚点/滚入时避免挡掉舞台角标与模式切换 */
    scroll-margin-top: 7.5rem;
}

.wj-story {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 1.5rem;
    background: #fff;
    box-shadow: 0 20px 45px -16px rgba(15, 23, 42, 0.1);
    overflow: hidden;
}

.wj-story__stage {
    position: relative;
    background:
        radial-gradient(90% 70% at 70% 20%, rgba(59, 130, 246, 0.08), transparent 55%),
        linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    min-height: min(52vh, 520px);
}

.wj-story__chrome {
    position: absolute;
    top: 1.1rem;
    left: 1.1rem;
    right: 1.1rem;
    z-index: 3;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.wj-story__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(0, 0, 0, 0.06);
    font-size: 0.75rem;
    font-weight: 600;
    color: #15803d;
}

.wj-story__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #16a34a;
    box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.18);
}

.wj-story__modes {
    display: inline-flex;
    padding: 3px;
    gap: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.wj-story__mode {
    border: 0;
    background: transparent;
    border-radius: 999px;
    padding: 0.4rem 0.85rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
}

.wj-story__mode:focus-visible {
    outline: 2px solid #0071e3;
    outline-offset: 2px;
}

.wj-story__mode.is-active {
    background: #0071e3;
    color: #fff;
}

.wj-story[data-mode="traditional"] .wj-story__mode.is-active {
    background: #d97706;
}

.wj-story__frames {
    position: relative;
    min-height: min(52vh, 520px);
}

.wj-frame {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    align-items: center;
    gap: clamp(1.5rem, 4vw, 3rem);
    padding: 4.5rem clamp(1.25rem, 3vw, 2.75rem) 2rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.45s ease, transform 0.45s ease, visibility 0.45s;
}

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

.wj-frame__copy {
    max-width: 28rem;
}

.wj-frame__kicker {
    margin: 0 0 0.55rem;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
}

.wj-frame__title {
    margin: 0 0 0.65rem;
    font-size: clamp(1.6rem, 3vw, 2.35rem);
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: #0f172a;
    font-weight: 700;
}

.wj-frame__desc {
    margin: 0;
    font-size: 1.02rem;
    line-height: 1.55;
    color: #475569;
}

/* —— 抽象分镜画面（CSS 构图，非 3D 小人） —— */
.wj-frame__art {
    position: relative;
    height: min(38vh, 320px);
    border-radius: 1.25rem;
    background: linear-gradient(160deg, #0f172a 0%, #1e293b 55%, #334155 100%);
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.wj-art__door {
    position: absolute;
    left: 8%;
    top: 12%;
    bottom: 12%;
    width: 22%;
    border-radius: 12px;
    background: linear-gradient(180deg, #1e293b, #0f172a);
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.wj-art__door.is-dim {
    opacity: 0.45;
}

.wj-art__cam {
    position: absolute;
    left: 14%;
    top: 18%;
    width: 10px;
    height: 42%;
    border-radius: 6px;
    background: #94a3b8;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.25);
}

.wj-art__cam.is-off {
    background: #475569;
    box-shadow: none;
}

.wj-art__cone {
    position: absolute;
    left: 16%;
    top: 28%;
    width: 42%;
    height: 48%;
    background: linear-gradient(90deg, rgba(96, 165, 250, 0.35), transparent 70%);
    clip-path: polygon(0 40%, 100% 0, 100% 100%, 0 60%);
    filter: blur(0.2px);
}

.wj-art__silhouette {
    position: absolute;
    left: 38%;
    bottom: 14%;
    width: 46px;
    height: 110px;
    border-radius: 22px 22px 10px 10px;
    background: rgba(226, 232, 240, 0.55);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
}

.wj-art__silhouette::before {
    content: '';
    position: absolute;
    top: -22px;
    left: 50%;
    width: 28px;
    height: 28px;
    margin-left: -14px;
    border-radius: 50%;
    background: inherit;
}

.wj-art__silhouette.is-pass {
    left: 58%;
    opacity: 0.35;
}

.wj-frame__art--cloud {
    display: grid;
    place-items: center;
}

.wj-art__nodes {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.wj-art__nodes span {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #60a5fa;
    box-shadow: 0 0 0 8px rgba(96, 165, 250, 0.15);
}

.wj-art__nodes span:nth-child(2) {
    width: 28px;
    height: 28px;
    background: #93c5fd;
}

.wj-art__pulse {
    position: absolute;
    left: 22%;
    right: 22%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #60a5fa, transparent);
    opacity: 0.7;
}

.wj-frame__art--desk,
.wj-frame__art--trad-phone {
    display: grid;
    place-items: end center;
    padding-bottom: 12%;
}

.wj-art__desk {
    width: 62%;
    height: 14px;
    border-radius: 8px;
    background: #0b1220;
}

.wj-art__monitor {
    width: 48%;
    aspect-ratio: 16 / 10;
    margin-bottom: -2px;
    border-radius: 10px 10px 4px 4px;
    background: #020617;
    border: 2px solid #1e293b;
    display: grid;
    place-items: center;
}

.wj-art__qr {
    width: 34%;
    aspect-ratio: 1;
    border-radius: 6px;
    background:
        linear-gradient(#38bdf8 0 0) 0 0 / 30% 30%,
        linear-gradient(#38bdf8 0 0) 100% 0 / 30% 30%,
        linear-gradient(#38bdf8 0 0) 0 100% / 30% 30%,
        linear-gradient(#38bdf8 0 0) 100% 100% / 30% 30%,
        repeating-linear-gradient(90deg, #38bdf8 0 2px, transparent 2px 5px);
    background-repeat: no-repeat;
    opacity: 0.9;
}

.wj-art__monitor.is-warn {
    background: #1c1917;
}

.wj-art__modal {
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    background: #fbbf24;
    color: #78350f;
    font-size: 0.72rem;
    font-weight: 700;
}

.wj-frame__art--unlock,
.wj-frame__art--trad-late {
    display: grid;
    place-items: center;
    padding: 8%;
}

.wj-art__desktop {
    width: 78%;
    aspect-ratio: 16 / 10;
    border-radius: 12px;
    background: linear-gradient(145deg, #0ea5e9, #1d4ed8 55%, #0f172a);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 0.7rem;
    box-sizing: border-box;
}

.wj-art__desktop.is-late {
    background: linear-gradient(145deg, #78716c, #44403c 60%, #1c1917);
}

.wj-art__bar {
    height: 8px;
    width: 36%;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
    margin-bottom: 0.85rem;
}

.wj-art__tiles {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.45rem;
}

.wj-art__tiles i {
    display: block;
    aspect-ratio: 1;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.18);
}

.wj-art__late {
    margin-top: 1.4rem;
    text-align: center;
    font-size: 1.6rem;
    font-weight: 700;
    color: #fde68a;
    letter-spacing: -0.03em;
}

.wj-frame__art--trad-retry {
    display: grid;
    place-items: center;
}

.wj-art__phone {
    width: 34%;
    aspect-ratio: 9 / 16;
    border-radius: 18px;
    background: #0f172a;
    border: 2px solid #334155;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.wj-art__face {
    width: 42%;
    aspect-ratio: 1;
    border-radius: 50%;
    border: 2px dashed #f59e0b;
    box-shadow: 0 0 0 8px rgba(245, 158, 11, 0.12);
}

.wj-art__retry {
    font-size: 0.7rem;
    color: #fbbf24;
    font-weight: 600;
}

/* 底部轨道 */
.wj-story__rail {
    padding: 1.15rem 1.35rem 1.4rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    background: #fff;
}

.wj-story__readout {
    display: flex;
    align-items: baseline;
    gap: 0.85rem;
    margin-bottom: 0.95rem;
    flex-wrap: wrap;
}

.wj-story__value {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    color: #0071e3;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.wj-story__value.is-traditional {
    color: #d97706;
}

.wj-story__status {
    font-size: 0.95rem;
    color: #64748b;
    font-weight: 500;
}

.wj-story__steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.55rem;
}

.wj-story__step {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    padding: 0.7rem 0.75rem;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #f8fafc;
    cursor: pointer;
    text-align: left;
    font: inherit;
    color: #334155;
}

.wj-story__step:focus-visible {
    outline: 2px solid #0071e3;
    outline-offset: 2px;
}

.wj-story__step:hover {
    background: #f1f5f9;
}

.wj-story__step.is-active {
    border-color: #0071e3;
    background: #eff6ff;
}

.wj-story__step.is-done {
    border-color: rgba(22, 163, 74, 0.35);
    background: #f0fdf4;
}

.wj-story__step.is-traditional.is-active {
    border-color: #d97706;
    background: #fffbeb;
}

.wj-story__num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    font-size: 0.75rem;
    font-weight: 700;
    background: #e2e8f0;
    color: #64748b;
}

.wj-story__step.is-active .wj-story__num {
    background: #0071e3;
    color: #fff;
}

.wj-story__step.is-done .wj-story__num {
    background: #16a34a;
    color: #fff;
}

.wj-story__step.is-traditional.is-active .wj-story__num {
    background: #d97706;
}

.wj-story__step-title {
    font-size: 0.85rem;
    font-weight: 600;
}

@media (max-width: 900px) {
    .wj-frame {
        grid-template-columns: 1fr;
        padding-top: 4.25rem;
        gap: 1.1rem;
    }

    .wj-frame__art {
        height: 200px;
        order: -1;
    }

    .wj-story__steps {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }

    .wj-story__steps::-webkit-scrollbar {
        display: none;
    }

    .wj-story__step {
        flex: 0 0 70%;
        scroll-snap-align: start;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wj-frame {
        transition: none;
    }
}
