/* ========== 首页左栏：「五维命运」开场动画（一镜到底版） ========== */
#page-home .instant-panel.fz-fate-panel {
    padding: 0;
    background: #05050a;
    border-color: rgba(201, 169, 97, 0.32);
    box-shadow: 0 18px 40px -24px rgba(20, 16, 40, 0.55);
    min-height: 540px;
}

.fz-fate-intro {
    position: absolute;
    inset: 0;
    overflow: hidden;
    container-type: inline-size;
    color: #efe6d2;
    background: radial-gradient(120% 90% at 50% 40%, #15132a 0%, #0b0b18 50%, #040408 100%);
    font-family: 'Source Han Serif SC', 'Noto Serif CJK SC', 'Songti SC', 'STSong', serif;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.fz-fate-intro .fzfi-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    cursor: pointer;
}

/* 无脚本时的静态文字 */
.fz-fate-intro .fzfi-fallback {
    position: absolute;
    left: 24px;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    text-align: center;
    color: #e2c27a;
    font-size: 20px;
    line-height: 2;
    letter-spacing: 0.2em;
}

.fz-fate-intro .fzfi-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ---------- 字幕：一个词 + 一句话 ---------- */
.fz-fate-intro .fzfi-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 58px;
    padding: 0 20px;
    text-align: center;
    pointer-events: none;
    transition: opacity 0.36s ease, transform 0.36s ease, filter 0.36s ease;
}

.fz-fate-intro .fzfi-caption.is-out {
    opacity: 0;
    transform: translateY(8px);
    filter: blur(4px);
}

.fz-fate-intro .fzfi-title {
    color: #f8edd4;
    font-size: clamp(18px, 6.2cqw, 26px);
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0.1em;
    text-wrap: balance;
    text-shadow: 0 0 18px rgba(233, 199, 123, 0.4), 0 1px 2px rgba(0, 0, 0, 0.7);
}

.fz-fate-intro .fzfi-title.is-word {
    color: #ffe9b4;
    font-size: clamp(32px, 11cqw, 46px);
    line-height: 1.15;
    letter-spacing: 0.32em;
    text-indent: 0.32em;
    text-shadow: 0 0 26px rgba(233, 199, 123, 0.75), 0 0 60px rgba(233, 199, 123, 0.35), 0 1px 2px rgba(0, 0, 0, 0.7);
}

.fz-fate-intro .fzfi-sub {
    min-height: 1.6em;
    margin-top: 8px;
    color: rgba(226, 232, 255, 0.78);
    font-size: clamp(12.5px, 3.9cqw, 15px);
    line-height: 1.6;
    letter-spacing: 0.1em;
    text-wrap: balance;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.fz-fate-intro .fzfi-seg {
    display: inline-block;
}

.fz-fate-intro .fzfi-cta {
    pointer-events: auto;
    margin-top: 12px;
    padding: 8px 24px;
    border: 1px solid rgba(233, 199, 123, 0.85);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(233, 199, 123, 0.3), rgba(156, 116, 53, 0.22));
    color: #fff1cf;
    font: inherit;
    font-size: 14px;
    letter-spacing: 0.3em;
    text-indent: 0.3em;
    cursor: pointer;
    box-shadow: 0 0 22px rgba(233, 199, 123, 0.25);
    animation: fzfiCtaPulse 2.4s ease-in-out infinite;
}

.fz-fate-intro .fzfi-cta[hidden] {
    display: none;
}

.fz-fate-intro .fzfi-cta:hover,
.fz-fate-intro .fzfi-cta:focus-visible {
    background: linear-gradient(180deg, rgba(233, 199, 123, 0.48), rgba(156, 116, 53, 0.36));
    outline: none;
}

@keyframes fzfiCtaPulse {
    0%, 100% { box-shadow: 0 0 14px rgba(233, 199, 123, 0.18); }
    50% { box-shadow: 0 0 30px rgba(233, 199, 123, 0.5); }
}

/* ---------- 底栏：五种力量（点亮即出场，可点跳转）+ 播放、声音 ---------- */
.fz-fate-intro .fzfi-bar {
    position: absolute;
    left: 14px;
    right: 12px;
    bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.fz-fate-intro .fzfi-forces {
    position: relative;
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2px 5px;
    border-bottom: 1px solid rgba(233, 199, 123, 0.16);
}

.fz-fate-intro .fzfi-prog {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 1px;
    background: linear-gradient(90deg, rgba(143, 230, 255, 0.2), #e9c77b);
    transform: scaleX(0);
    transform-origin: left center;
}

.fz-fate-intro .fzfi-force {
    --on: 0;
    --g: 0;
    padding: 5px 3px;
    border: 0;
    background: none;
    color: #e9c77b;
    font: inherit;
    font-size: clamp(11.5px, 3.5cqw, 13px);
    letter-spacing: 0.14em;
    white-space: nowrap;
    cursor: pointer;
    opacity: calc(0.26 + 0.74 * var(--on));
    text-shadow: 0 0 calc(var(--g) * 12px) rgba(255, 226, 160, 0.95), 0 0 calc(var(--g) * 26px) rgba(233, 199, 123, 0.6);
}

.fz-fate-intro .fzfi-force.is-now {
    color: #fff3d6;
}

.fz-fate-intro .fzfi-force:hover,
.fz-fate-intro .fzfi-force:focus-visible {
    opacity: 1;
    outline: none;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.fz-fate-intro .fzfi-btn {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid rgba(233, 199, 123, 0.34);
    border-radius: 50%;
    background: rgba(10, 10, 18, 0.5);
    color: #e9c77b;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.fz-fate-intro:hover .fzfi-btn,
.fz-fate-intro.is-paused .fzfi-btn,
.fz-fate-intro .fzfi-btn:focus-visible {
    opacity: 1;
}

.fz-fate-intro .fzfi-btn:hover,
.fz-fate-intro .fzfi-btn:focus-visible {
    border-color: rgba(233, 199, 123, 0.85);
    outline: none;
}

@media (min-width: 769px) and (max-width: 900px) {
    #page-home .instant-panel.fz-fate-panel {
        padding: 0;
        min-height: 560px;
    }
}

/* 命理首页的画布占满品牌栏与底部导航之间的可用高度。 */
@media (max-width: 768px) {
    #page-home .instant-panel.fz-fate-panel {
        display: block;
        flex: none;
        width: 100%;
        min-height: 0;
        height: calc(var(--fz-home-height) - 2 * var(--fz-home-gap));
        margin: 0;
    }

    .fz-fate-intro .fzfi-caption {
        padding: 0 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fz-fate-intro .fzfi-caption,
    .fz-fate-intro .fzfi-cta {
        transition: none;
        animation: none;
    }
}
