﻿/* ============================================================
   二次元看板娘主题覆盖层（在 style.css 之后加载，仅作用于 about.html）
   - 背景：assets/mascot-bg.jpg 模糊化 + 压暗 + 暗角，固定全屏
   - Hero：隐藏粒子 canvas，左侧看板娘（assets/mascot.jpg，边缘羽化），文案右移左对齐
   - 导航：玻璃拟态深色
   换回科技风：删除 about.html 中的 anime-theme.css 引用即可
   注意：本主题为深色基调，页面右上角「亮/暗」切换切到亮色时背景保持深色
   ============================================================ */

body {
    background: #0b0e1d;
}

/* ===== 全屏背景层 ===== */
.anime-bg,
.anime-bg-tint {
    position: fixed;
    pointer-events: none;
}

.anime-bg {
    inset: -60px;
    z-index: -2;
    background: url("../assets/mascot-bg.jpg") center / cover no-repeat;
    /* 底图是产品首页 mockup，本身含左侧角色与气泡面板；重度模糊+压暗化为纯氛围底色，避免与前景立绘重叠成“双角色”。inset 随模糊半径加大以免边缘透出。 */
    filter: blur(40px) brightness(0.5) saturate(1.02);
}

.anime-bg-tint {
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse at 30% 40%, rgba(90, 110, 220, 0.10), transparent 60%),
        linear-gradient(180deg, rgba(10, 12, 30, 0.55) 0%, rgba(10, 12, 30, 0.15) 30%, rgba(10, 12, 30, 0.10) 60%, rgba(10, 12, 30, 0.55) 100%);
    box-shadow: inset 0 0 220px 60px rgba(5, 6, 18, 0.75);
}

/* ===== 导航：玻璃拟态 ===== */
.navbar,
.navbar.scrolled {
    background: rgba(16, 20, 44, 0.55);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(150, 165, 255, 0.18);
    box-shadow: none;
}

.nav-links a {
    color: rgba(220, 226, 255, 0.82);
}

.logo {
    color: #eef0ff;
}

.nav-links a:hover {
    color: #fff;
}

.nav-links a.nav-cta,
.nav-cta {
    background: linear-gradient(135deg, #7b8cff, #b387ff);
    box-shadow: 0 4px 18px rgba(130, 140, 255, 0.45);
    color: #fff;
}

/* ===== Hero：文案上、三栏（立绘合照/聊天/PV）下 ===== */
#heroCanvas {
    display: none;
}

.hero-content {
    text-shadow: 0 2px 18px rgba(10, 12, 35, 0.65);
}

.hero-pv {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: clamp(240px, 24vw, 360px);
}

.hero-pv-tabs {
    display: flex;
    gap: 8px;
}

.hero-pv-tabs button {
    flex: 1;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid rgba(150, 165, 255, 0.3);
    background: rgba(20, 24, 52, 0.55);
    color: rgba(210, 216, 245, 0.75);
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.hero-pv-tabs button[aria-selected="true"] {
    background: linear-gradient(135deg, #7b8cff, #c387ff);
    color: #fff;
    border-color: transparent;
}

.hero-pv-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(10, 12, 28, 0.7);
    box-shadow: 0 8px 30px rgba(20, 20, 60, 0.35);
}

.hero-pv-stage video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* [hidden] 必须真正生效：上面 / 下面的 display 规则会盖过 UA 的
   [hidden]{display:none}，否则空 <video controls> 的控制条会透出占位层，
   且真实 src 到位后占位层会挡住正在播放的视频 */
.hero-pv-stage video[hidden],
.hero-pv-placeholder[hidden],
.hero-pv-dots[hidden] {
    display: none;
}

.hero-pv-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 16px;
    color: rgba(210, 216, 245, 0.65);
    font-size: 13px;
    background: linear-gradient(135deg, rgba(123, 140, 255, 0.18), rgba(195, 135, 255, 0.18));
}

.hero-pv-dots {
    display: flex;
    gap: 6px;
    justify-content: center;
}

.hero-pv-dots button {
    width: 8px;
    height: 8px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(210, 216, 245, 0.3);
    cursor: pointer;
}

.hero-pv-dots button[aria-current="true"] {
    background: linear-gradient(135deg, #7b8cff, #c387ff);
}

.hero-logo {
    margin-bottom: 18px;
}

.hero-logo img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 0 3px rgba(179, 155, 255, 0.55), 0 8px 30px rgba(20, 20, 60, 0.5);
}

/* 渐变色标题改粉紫系 */
.gradient-text {
    background: linear-gradient(120deg, #a8b8ff, #e3a8ff 55%, #ffc2e0);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Hero 主按钮粉紫渐变 */
.hero .btn-primary {
    background: linear-gradient(135deg, #7b8cff, #c387ff);
    box-shadow: 0 6px 22px rgba(140, 130, 255, 0.45);
}

.hero .btn-primary:hover {
    background: linear-gradient(135deg, #8c9bff, #d19bff);
}

/* 副标题 / 统计数字 / 下载按钮 提亮并改粉紫系 */
.hero-subtitle {
    color: rgba(228, 233, 255, 0.88);
}

.stat-number {
    background: linear-gradient(120deg, #a8b8ff, #e3a8ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label,
.hero-download-hint {
    color: rgba(210, 216, 245, 0.75);
}

.os-badge {
    background: rgba(140, 155, 255, 0.25);
    color: #cdd6ff;
}

.hero .btn-download {
    border-color: rgba(180, 170, 255, 0.45);
    color: #d9dcff;
    background: rgba(140, 155, 255, 0.10);
}

.hero .btn-download:hover {
    border-color: rgba(200, 190, 255, 0.75);
    background: rgba(140, 155, 255, 0.2);
}

.hero-badge {
    background: rgba(20, 24, 52, 0.55);
    border-color: rgba(150, 165, 255, 0.3);
    color: #d5dbff;
}

/* 看板娘（边缘羽化融入背景；换透明立绘时删除 mask 两行） */
.anime-mascot {
    position: absolute;
    z-index: 1;
    left: max(12px, 2vw);
    bottom: 0;
    height: min(92vh, 100%);
    pointer-events: none;
    filter: drop-shadow(0 12px 40px rgba(20, 20, 60, 0.55));
    -webkit-mask-image: radial-gradient(ellipse 75% 88% at 50% 46%, #000 55%, transparent 78%);
    mask-image: radial-gradient(ellipse 75% 88% at 50% 46%, #000 55%, transparent 78%);
}

/* 樱花花瓣 */
.anime-petals {
    position: absolute;
    inset: 0;
    z-index: 2;
    overflow: hidden;
    pointer-events: none;
}

.anime-petals span {
    position: absolute;
    top: -40px;
    width: 16px;
    height: 13px;
    background: radial-gradient(ellipse at 30% 30%, #ffd9e8, #f7a8c6);
    border-radius: 60% 40% 55% 45%;
    opacity: 0.85;
    animation: anime-petal-fall linear infinite;
}

@keyframes anime-petal-fall {
    to {
        transform: translateY(112vh) translateX(9vw) rotate(560deg);
    }
}

/* ===== 下方区块：半透明化让动漫底图隐隐透出，消除 Hero 与内容的硬切缝（仅深色主题） ===== */
.hero::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 220px;
    background: linear-gradient(180deg, transparent, rgba(6, 7, 16, 0.92));
    pointer-events: none;
    z-index: 2;
}

.scroll-indicator {
    z-index: 3;
}

html:not([data-theme="light"]) .products,
html:not([data-theme="light"]) .solutions,
html:not([data-theme="light"]) .contact {
    background: rgba(6, 7, 16, 0.74);
}

html:not([data-theme="light"]) .technology,
html:not([data-theme="light"]) .applications {
    background: rgba(4, 5, 12, 0.84);
}

html:not([data-theme="light"]) .cta-section {
    background: rgba(6, 7, 16, 0.6);
}

html:not([data-theme="light"]) .footer {
    background: rgba(4, 5, 10, 0.9);
}

/* 本页锁定深色，隐藏亮/暗切换按钮 */
#themeToggle {
    display: none;
}

/* ===== 看板娘全局聊天框（js/mascot-chat.js 驱动） ===== */
.anime-mascot {
    pointer-events: auto;
    cursor: pointer;
}

/* 引导创作定案按钮：比普通跳转更醒目的进入制作台 CTA。 */

/* 快捷选项气泡：让访客点选即回答，铺在回复气泡下方并自动换行。 */

/* 页面穿梭跳转动画 */
body.page-warp {
    opacity: 0;
    transition: opacity 0.38s ease 0.08s;
}

body.page-warp .anime-bg {
    transform: scale(1.22);
    filter: blur(20px) brightness(1.15) saturate(1.2);
    transition: transform 0.45s ease, filter 0.45s ease;
}

/* Hero 引导问卷：去掉外壳卡，问题 / 选择气泡 / 「我的想法是…」三段散开漂浮在 Hero 中间。 */
.hero-quiz-host { display: flex; justify-content: center; width: 100%; }

.hero-quiz {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    width: clamp(320px, 25vw, 400px);
    text-align: center;
}

/* 上方问题：无外壳，直接漂在场景上，靠文字阴影保证可读性。 */
.hero-quiz__question {
    margin: 0 0 24px;
    color: #fff;
    font-size: clamp(15px, 1.4vw, 19px);
    font-weight: 800;
    line-height: 1.4;
    text-shadow: 0 2px 16px rgba(40, 30, 90, 0.85), 0 0 4px rgba(20, 16, 48, 0.6);
}

/* 中间选择：一颗颗有机错落漂浮的气泡（散开，不再被卡片包裹）。 */
.hero-quiz__bubbles {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 38px 24px;
    width: 100%;
    padding: 12px 0 0;
}
.hero-quiz__bubbles[hidden] { display: none; }

.hero-quiz__bubble {
    position: relative;
    isolation: isolate;
    overflow: visible;
    width: 100%;
    min-height: 52px;
    padding: 13px 22px 14px;
    border: 1px solid rgba(208, 216, 255, 0.7);
    border-radius: 20px 20px 20px 8px;
    color: #fff;
    font-size: clamp(13px, 1.05vw, 15px);
    font-weight: 700;
    line-height: 1.35;
    cursor: pointer;
    background:
        radial-gradient(circle at 16% 12%, rgba(224, 231, 255, 0.2), transparent 34%),
        linear-gradient(135deg, rgba(92, 115, 211, 0.78), rgba(151, 88, 207, 0.8));
    backdrop-filter: blur(12px) saturate(1.12);
    box-shadow:
        0 14px 30px rgba(53, 49, 139, 0.32),
        0 0 0 1px rgba(126, 166, 255, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.34);
    transform: translateY(0);
    animation: hero-quiz-float 4.2s ease-in-out infinite;
    animation-delay: var(--delay, 0s);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.hero-quiz__bubble:nth-child(even) {
    border-radius: 20px 20px 8px 20px;
}

.hero-quiz__bubble span {
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 10px rgba(35, 27, 92, 0.48);
}

/* 小尾角左右交错，让选项更像角色递出的回答气泡，而不是一排普通按钮。 */
.hero-quiz__bubble::before {
    content: "";
    position: absolute;
    z-index: -1;
    left: 18px;
    bottom: -5px;
    width: 15px;
    height: 15px;
    border-right: 1px solid rgba(208, 216, 255, 0.46);
    border-bottom: 1px solid rgba(208, 216, 255, 0.46);
    border-radius: 0 0 4px;
    background: linear-gradient(135deg, rgba(111, 108, 216, 0.9), rgba(130, 91, 207, 0.9));
    transform: rotate(45deg);
}

.hero-quiz__bubble:nth-child(even)::before {
    right: 18px;
    left: auto;
    background: linear-gradient(135deg, rgba(132, 99, 216, 0.9), rgba(151, 88, 207, 0.9));
}

/* 顶部一线月辉用于提亮玻璃边缘，保持克制，避免与 PV 页签争抢层级。 */
.hero-quiz__bubble::after {
    content: "";
    position: absolute;
    top: 6px;
    left: 14%;
    width: 42%;
    height: 1px;
    border-radius: 50%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.72), transparent);
    opacity: 0.68;
    pointer-events: none;
}

.hero-quiz__bubble:hover {
    border-color: rgba(235, 238, 255, 0.92);
    filter: brightness(1.1) saturate(1.06);
    box-shadow:
        0 18px 36px rgba(74, 58, 178, 0.44),
        0 0 22px rgba(157, 143, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.42);
    animation-play-state: paused;
}

.hero-quiz__bubble:focus-visible {
    outline: 2px solid rgba(225, 230, 255, 0.94);
    outline-offset: 4px;
    box-shadow:
        0 18px 36px rgba(74, 58, 178, 0.44),
        0 0 0 5px rgba(139, 151, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.42);
    animation-play-state: paused;
}

.hero-quiz__bubble:active {
    filter: brightness(0.96) saturate(1.08);
}

/* 浮动关键帧保留散开位移（--dx/--dy），只在其上做轻微上下起伏。 */
@keyframes hero-quiz-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-7px); }
}

/* 下方「我的想法是…」：独立漂浮的深色药丸输入条，不再嵌在卡片里。 */
.hero-quiz__compose {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin-top: 26px;
    padding: 6px 6px 6px 16px;
    border: 1px solid rgba(223, 219, 255, 0.45);
    border-radius: 999px;
    background: linear-gradient(145deg, rgba(31, 33, 68, 0.82), rgba(50, 38, 90, 0.82));
    box-shadow: 0 14px 32px rgba(11, 13, 38, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.hero-quiz__input {
    flex: 1;
    min-width: 0;
    padding: 9px 4px;
    border: 0;
    outline: 0;
    color: #fff;
    font-size: 13px;
    background: transparent;
}
.hero-quiz__input::placeholder { color: rgba(226, 224, 255, 0.6); }
.hero-quiz__send {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    background: linear-gradient(135deg, #8d91ff, #b884ff);
    box-shadow: 0 6px 16px rgba(120, 110, 255, 0.45);
}
.hero-quiz__send:hover { filter: brightness(1.06); }
.hero-quiz__progress { margin: 10px 0 0; color: rgba(238, 236, 255, 0.66); font-size: 11px; letter-spacing: 1px; }

/* Hero 问卷增加章节、分隔、进度与场景装饰，形成舒展的纵向节奏。 */
.hero-quiz {
    justify-content: center;
    min-height: 440px;
}

.hero-quiz__kicker {
    margin: 0 0 14px;
    color: rgba(200, 205, 255, 0.82);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.16em;
}

.hero-quiz__ambient {
    position: absolute;
    z-index: -1;
    width: 460px;
    pointer-events: none;
}

.hero-quiz__ambient--top {
    top: -55px;
    height: 118px;
}

.hero-quiz__ambient--top::before {
    content: "";
    position: absolute;
    left: 12px;
    bottom: 4px;
    width: 180px;
    height: 76px;
    opacity: 0.16;
    background: url("../assets/intro-cloud-2-night.webp") center / contain no-repeat;
    animation: hero-ambient-cloud 7s ease-in-out infinite;
}

.hero-quiz__ambient--top::after {
    content: "";
    position: absolute;
    top: 20px;
    right: 54px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    box-shadow: inset 8px -3px 0 rgba(206, 212, 255, 0.58), 0 0 18px rgba(164, 174, 255, 0.2);
    transform: rotate(-18deg);
}

.hero-quiz__ambient span {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(229, 223, 255, 0.72);
    box-shadow: 0 0 10px rgba(184, 168, 255, 0.72);
    animation: hero-ambient-star 3.6s ease-in-out infinite;
}

.hero-quiz__ambient--top span:nth-child(1) { top: 30px; left: 218px; }
.hero-quiz__ambient--top span:nth-child(2) { top: 66px; left: 270px; animation-delay: -1.2s; }
.hero-quiz__ambient--top span:nth-child(3) { top: 42px; left: 318px; animation-delay: -2.4s; }

.hero-quiz__ambient--bottom {
    bottom: -100px;
    height: 110px;
}

.hero-quiz__ambient--bottom::before,
.hero-quiz__ambient--bottom::after {
    content: "";
    position: absolute;
    bottom: 0;
    width: 175px;
    height: 78px;
    opacity: 0.13;
    background: url("../assets/intro-cloud-1-night.webp") center / contain no-repeat;
}

.hero-quiz__ambient--bottom::before { left: 0; }
.hero-quiz__ambient--bottom::after { right: 0; transform: scaleX(-1); }
.hero-quiz__ambient--bottom span:nth-child(1) { top: 18px; left: 74px; }
.hero-quiz__ambient--bottom span:nth-child(2) { top: 42px; right: 72px; animation-delay: -1.5s; }
.hero-quiz__ambient--bottom span:nth-child(3) { top: 16px; right: 154px; animation-delay: -2.7s; }

@keyframes hero-ambient-cloud {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(10px); }
}

@keyframes hero-ambient-star {
    0%, 100% { opacity: 0.35; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.25); }
}

.hero-quiz__question {
    margin-bottom: 42px;
}

.hero-quiz__cloudlets {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-quiz__cloudlets span {
    position: absolute;
    width: 34px;
    height: 14px;
    border-radius: 999px;
    background: rgba(173, 184, 255, 0.28);
    filter: blur(0.2px);
    animation: hero-cloudlet-drift 4.8s ease-in-out infinite;
}

.hero-quiz__cloudlets span::before,
.hero-quiz__cloudlets span::after {
    content: "";
    position: absolute;
    bottom: 4px;
    border-radius: 50%;
    background: inherit;
}

.hero-quiz__cloudlets span::before {
    left: 6px;
    width: 15px;
    height: 15px;
}

.hero-quiz__cloudlets span::after {
    right: 5px;
    width: 12px;
    height: 12px;
}

.hero-quiz__cloudlets span:nth-child(1) { top: 172px; left: -34px; }
.hero-quiz__cloudlets span:nth-child(2) { top: 214px; right: -42px; animation-delay: -1.4s; }
.hero-quiz__cloudlets span:nth-child(3) { top: 438px; left: -22px; animation-delay: -2.8s; }
.hero-quiz__cloudlets span:nth-child(4) { top: 474px; right: -30px; animation-delay: -3.7s; }

@keyframes hero-cloudlet-drift {
    0%, 100% { transform: translateY(0); opacity: 0.5; }
    50% { transform: translateY(-8px); opacity: 0.9; }
}

.hero-quiz__divider {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    margin: 46px 0 18px;
    color: rgba(211, 214, 244, 0.58);
    font-size: 11px;
}

.hero-quiz__divider::before,
.hero-quiz__divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(178, 187, 245, 0.32));
}

.hero-quiz__divider::after {
    transform: scaleX(-1);
}

.hero-quiz__compose {
    margin-top: 0;
}

.hero-quiz__progress {
    position: relative;
    width: 180px;
    margin-top: 24px;
    padding-top: 12px;
}

.hero-quiz__progress::before,
.hero-quiz__progress::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    height: 3px;
    border-radius: 999px;
}

.hero-quiz__progress::before {
    width: 100%;
    background: rgba(196, 202, 255, 0.18);
}

.hero-quiz__progress::after {
    width: var(--quiz-progress, 20%);
    background: linear-gradient(90deg, #8494ff, #c080ff);
    box-shadow: 0 0 12px rgba(162, 134, 255, 0.55);
}

/* 角色提问气泡与固定槽位回答项：动效只在槽位内纵向浮动，避免互相重叠。 */
.hero-quiz__dialog {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(350px, calc(100% + 46px));
    aspect-ratio: 1624 / 565;
    min-height: 0;
    padding: 18px 28px 37px 32px;
    border: 0;
    border-radius: 0;
    isolation: isolate;
    background: none;
    filter: drop-shadow(0 16px 30px rgba(8, 12, 38, 0.36));
    text-align: left;
}

.hero-quiz__dialog::before {
    content: "";
    position: absolute;
    z-index: 0;
    inset: 0;
    background: url("../assets/hero-dialog-frame-light.png") center / 100% auto no-repeat;
    pointer-events: none;
}

.hero-quiz__dialog::after {
    content: none;
}

.hero-quiz__dialog-petals {
    position: absolute;
    z-index: 1;
    inset: 9px 18px 29px 22px;
    overflow: hidden;
    border-radius: 24px;
    pointer-events: none;
}

.hero-quiz__dialog-petals span {
    position: absolute;
    top: -16px;
    width: 12px;
    height: 9px;
    border-radius: 60% 40% 55% 45%;
    opacity: 0.82;
    background: radial-gradient(ellipse at 30% 30%, #fff0f6, #f2a4c2);
    filter: drop-shadow(0 1px 3px rgba(203, 92, 145, 0.24));
    animation: hero-dialog-petal-fall 5.4s linear infinite;
}

.hero-quiz__dialog-petals span:nth-child(1) { left: 14%; animation-delay: -1.2s; }
.hero-quiz__dialog-petals span:nth-child(2) { left: 39%; animation-delay: -3.8s; scale: 0.78; }
.hero-quiz__dialog-petals span:nth-child(3) { left: 67%; animation-delay: -2.5s; scale: 1.08; }
.hero-quiz__dialog-petals span:nth-child(4) { left: 86%; animation-delay: -4.7s; scale: 0.68; }

@keyframes hero-dialog-petal-fall {
    to { transform: translate(24px, 112px) rotate(480deg); }
}

.hero-quiz__dialog .hero-quiz__kicker {
    display: none;
}

.hero-quiz__dialog .hero-quiz__question {
    position: relative;
    z-index: 2;
    margin: 0;
    color: #202a55;
    font-size: clamp(17px, 1.55vw, 21px);
    text-align: center;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.72);
}

.hero-quiz__bubbles {
    gap: 30px 28px;
    padding-top: 42px;
}

.hero-quiz__bubble {
    position: relative;
    border-radius: 22px 10px 22px 22px;
}

.hero-quiz__bubble::after {
    content: "";
    position: absolute;
    right: 14px;
    bottom: -7px;
    width: 15px;
    height: 15px;
    border-right: 1px solid rgba(223, 219, 255, 0.62);
    border-bottom: 1px solid rgba(223, 219, 255, 0.62);
    background: rgba(169, 124, 244, 0.94);
    transform: rotate(45deg);
}

.hero-quiz__bubble:nth-child(2) { border-radius: 10px 22px 22px 22px; }
.hero-quiz__bubble:nth-child(3) { border-radius: 24px 20px 8px 24px; }
.hero-quiz__bubble:nth-child(4) { border-radius: 20px 24px 24px 8px; }

.hero-quiz__bubble:nth-child(2)::after,
.hero-quiz__bubble:nth-child(4)::after {
    right: auto;
    left: 14px;
}

/* 选项下沉为输入框上方的紧凑标签，固定排列，不参与漂浮动效。 */
.hero-quiz__bubbles {
    display: flex;
    position: absolute;
    left: 50%;
    bottom: 115px;
    justify-content: center;
    gap: 10px;
    width: min(680px, calc(100vw - 48px));
    margin-top: 0;
    padding: 0;
    transform: translateX(-50%);
}

.hero-quiz__bubble,
.hero-quiz__bubble:nth-child(2),
.hero-quiz__bubble:nth-child(3),
.hero-quiz__bubble:nth-child(4) {
    width: auto;
    min-height: 30px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 12px;
    animation: none;
    transform: none;
    box-shadow: 0 7px 18px rgba(91, 82, 190, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.hero-quiz__bubble::after {
    content: none;
}

/* 所有问卷选项统一为视频水晶球：默认显示 PV 第 17 秒，悬浮后播放。 */
.hero-quiz__bubbles--worlds {
    display: block;
    bottom: 154px;
    width: min(420px, calc(100vw - 48px));
    height: min(62vh, 650px);
}

.hero-quiz__bubble--world,
.hero-quiz__bubble--world:nth-child(2),
.hero-quiz__bubble--world:nth-child(3),
.hero-quiz__bubble--world:nth-child(4) {
    position: absolute;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--world-size);
    min-height: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(230, 241, 255, 0.78);
    border-radius: 50%;
    background: radial-gradient(circle at 30% 22%, rgba(232, 248, 255, 0.56), transparent 12%), radial-gradient(circle at 70% 76%, var(--world-aura), rgba(9, 15, 41, 0.84) 67%);
    box-shadow: 0 16px 32px rgba(5, 8, 30, 0.56), 0 0 0 2px rgba(203, 228, 255, 0.08), inset 10px 8px 18px rgba(255, 255, 255, 0.42), inset -18px -20px 28px rgba(3, 6, 24, 0.7), inset 0 0 22px rgba(134, 183, 255, 0.46);
    animation: hero-world-drift 5.6s ease-in-out infinite;
    animation-delay: var(--delay, 0s);
    --world-push-x: 0px;
    --world-push-y: 0px;
    translate: var(--world-push-x) var(--world-push-y);
    scale: 1;
    transition: scale 240ms cubic-bezier(0.2, 0.75, 0.25, 1), translate 240ms cubic-bezier(0.2, 0.75, 0.25, 1);
}

.hero-quiz__bubble--world:nth-child(1) {
    top: 0;
    left: 54%;
    --world-size: clamp(102px, 6.7vw, 116px);
    --world-x: -7px;
    --world-y: 5px;
    --world-aura: rgba(118, 117, 255, 0.66);
}

.hero-quiz__bubble--world:nth-child(2) {
    top: 24%;
    left: 13%;
    --world-size: clamp(126px, 8.2vw, 146px);
    --world-x: 5px;
    --world-y: -4px;
    --world-aura: rgba(103, 193, 255, 0.58);
    animation-delay: -1.4s;
}

.hero-quiz__bubble--world:nth-child(3) {
    top: 47%;
    left: 50%;
    --world-size: clamp(110px, 7.3vw, 128px);
    --world-x: 4px;
    --world-y: 0;
    --world-aura: rgba(255, 139, 197, 0.6);
    animation-delay: -2.7s;
}

.hero-quiz__bubble--world:nth-child(4) {
    top: 66%;
    left: 19%;
    --world-size: clamp(128px, 8.6vw, 152px);
    --world-x: -5px;
    --world-y: -5px;
    --world-aura: rgba(136, 230, 197, 0.55);
    animation-delay: -4.1s;
}

.hero-quiz__world-video {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.04) contrast(1.04) brightness(0.91);
    transform: scale(1.04);
    transition: filter 0.22s ease, transform 0.22s ease;
}

.hero-quiz__bubble--world::before,
.hero-quiz__bubble--world::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-quiz__bubble--world::before {
    z-index: 1;
    border-radius: inherit;
    background: radial-gradient(circle at 30% 21%, rgba(252, 255, 255, 0.72), transparent 8%), radial-gradient(circle at 34% 27%, rgba(215, 244, 255, 0.16), transparent 24%);
    box-shadow: inset 6px 6px 11px rgba(255, 255, 255, 0.28), inset -12px -15px 22px rgba(3, 6, 21, 0.28);
}

.hero-quiz__bubble--world::after {
    z-index: 3;
    border-radius: inherit;
    background:
        linear-gradient(128deg, rgba(255, 255, 255, 0.38) 0 7%, transparent 17% 66%, rgba(189, 220, 255, 0.1) 83%, rgba(255, 255, 255, 0.27) 100%),
        radial-gradient(ellipse at 32% 14%, rgba(255, 255, 255, 0.48), transparent 22%),
        radial-gradient(ellipse at 61% 72%, transparent 46%, rgba(219, 239, 255, 0.28) 68%, rgba(5, 7, 28, 0.3) 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.32), inset 3px 3px 7px rgba(255, 255, 255, 0.26), inset -5px -8px 12px rgba(9, 13, 39, 0.44);
}

.hero-quiz__bubble--world span {
    z-index: 4;
    padding: 7px 12px;
    border: 1px solid rgba(239, 244, 255, 0.3);
    border-radius: 999px;
    color: #fff;
    background: rgba(11, 15, 42, 0.26);
    box-shadow: 0 2px 8px rgba(6, 8, 30, 0.22);
    text-shadow: 0 1px 5px rgba(3, 6, 24, 0.72);
    backdrop-filter: blur(3px);
}

.hero-quiz__bubble--world:hover,
.hero-quiz__bubble--world:focus-visible {
    z-index: 5;
    border-color: rgba(246, 250, 255, 0.96);
    filter: none;
    box-shadow: 0 20px 39px rgba(90, 105, 242, 0.42), 0 0 25px var(--world-aura), inset 0 0 0 1px rgba(255, 255, 255, 0.32);
    animation-play-state: paused;
    scale: 1.3;
}

.hero-quiz__bubbles--worlds:has(> .hero-quiz__bubble--world:nth-child(1):is(:hover, :focus-visible)) .hero-quiz__bubble--world:nth-child(2) { --world-push-x: -24px; --world-push-y: 18px; }
.hero-quiz__bubbles--worlds:has(> .hero-quiz__bubble--world:nth-child(1):is(:hover, :focus-visible)) .hero-quiz__bubble--world:nth-child(3) { --world-push-x: 16px; --world-push-y: 28px; }
.hero-quiz__bubbles--worlds:has(> .hero-quiz__bubble--world:nth-child(1):is(:hover, :focus-visible)) .hero-quiz__bubble--world:nth-child(4) { --world-push-x: -18px; --world-push-y: 14px; }

.hero-quiz__bubbles--worlds:has(> .hero-quiz__bubble--world:nth-child(2):is(:hover, :focus-visible)) .hero-quiz__bubble--world:nth-child(1) { --world-push-x: 20px; --world-push-y: -22px; }
.hero-quiz__bubbles--worlds:has(> .hero-quiz__bubble--world:nth-child(2):is(:hover, :focus-visible)) .hero-quiz__bubble--world:nth-child(3) { --world-push-x: 28px; --world-push-y: 10px; }
.hero-quiz__bubbles--worlds:has(> .hero-quiz__bubble--world:nth-child(2):is(:hover, :focus-visible)) .hero-quiz__bubble--world:nth-child(4) { --world-push-x: -22px; --world-push-y: 22px; }

.hero-quiz__bubbles--worlds:has(> .hero-quiz__bubble--world:nth-child(3):is(:hover, :focus-visible)) .hero-quiz__bubble--world:nth-child(1) { --world-push-x: 16px; --world-push-y: -22px; }
.hero-quiz__bubbles--worlds:has(> .hero-quiz__bubble--world:nth-child(3):is(:hover, :focus-visible)) .hero-quiz__bubble--world:nth-child(2) { --world-push-x: -28px; --world-push-y: -10px; }
.hero-quiz__bubbles--worlds:has(> .hero-quiz__bubble--world:nth-child(3):is(:hover, :focus-visible)) .hero-quiz__bubble--world:nth-child(4) { --world-push-x: -24px; --world-push-y: 24px; }

.hero-quiz__bubbles--worlds:has(> .hero-quiz__bubble--world:nth-child(4):is(:hover, :focus-visible)) .hero-quiz__bubble--world:nth-child(1) { --world-push-x: 12px; --world-push-y: -12px; }
.hero-quiz__bubbles--worlds:has(> .hero-quiz__bubble--world:nth-child(4):is(:hover, :focus-visible)) .hero-quiz__bubble--world:nth-child(2) { --world-push-x: -22px; --world-push-y: -24px; }
.hero-quiz__bubbles--worlds:has(> .hero-quiz__bubble--world:nth-child(4):is(:hover, :focus-visible)) .hero-quiz__bubble--world:nth-child(3) { --world-push-x: 28px; --world-push-y: -22px; }

.hero-quiz__bubble--world:hover .hero-quiz__world-video,
.hero-quiz__bubble--world:focus-visible .hero-quiz__world-video {
    filter: saturate(1.12) contrast(1.08) brightness(0.93);
    transform: scale(1.1);
}

@keyframes hero-world-drift {
    0%, 100% { transform: translate(var(--world-x, 0), var(--world-y, 0)) rotate(0deg); }
    50% { transform: translate(var(--world-x, 0), calc(var(--world-y, 0) - 6px)) rotate(1.1deg); }
}

@media (max-width: 960px) {
    .hero-quiz__bubbles--worlds {
        position: relative;
        left: auto;
        bottom: auto;
        width: min(420px, calc(100vw - 48px));
        height: 420px;
        margin: 26px auto 16px;
        transform: none;
    }
}

.hero-quiz__divider {
    display: none;
}

.hero-quiz__compose {
    position: absolute;
    left: 50%;
    bottom: 53px;
    width: min(680px, calc(100vw - 48px));
    margin-top: 0;
    transform: translateX(-50%);
}

.hero-quiz__progress {
    position: absolute;
    left: 50%;
    bottom: 19px;
    transform: translateX(-50%);
}

.hero-quiz__portal {
    position: absolute;
    z-index: 5;
    top: 50%;
    left: 50%;
    display: grid;
    place-items: center;
    width: clamp(168px, 13vw, 224px);
    aspect-ratio: 1;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #f4f2ff;
    background: transparent;
    box-shadow: none;
    cursor: pointer;
    isolation: isolate;
    overflow: visible;
    pointer-events: auto;
    transform: translate(-50%, -48%);
    will-change: scale, opacity;
    transition: scale 220ms ease, filter 220ms ease;
}

.hero-quiz__portal[hidden] {
    display: none;
}

.hero-quiz__portal-canvas {
    position: absolute;
    z-index: 0;
    inset: -12%;
    width: 124%;
    height: 124%;
    border-radius: 50%;
    pointer-events: none;
}

.hero-quiz__portal-label {
    position: absolute;
    z-index: 3;
    top: calc(100% + 12px);
    left: 50%;
    padding: 5px 12px;
    border: 1px solid rgba(208, 216, 255, 0.14);
    border-radius: 999px;
    color: #f4f2ff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
    white-space: nowrap;
    text-shadow: 0 0 12px rgba(157, 145, 255, 0.92);
    background: rgba(15, 17, 48, 0.34);
    box-shadow: 0 6px 18px rgba(4, 5, 24, 0.24);
    backdrop-filter: blur(5px);
    transform: translateX(-50%);
}

.hero-quiz__portal:hover,
.hero-quiz__portal:focus-visible {
    scale: 1.06;
    filter: brightness(1.12) saturate(1.08);
    outline: none;
}

.hero-quiz__portal:focus-visible {
    box-shadow: 0 0 0 3px rgba(214, 219, 255, 0.88), 0 0 42px rgba(116, 118, 255, 0.46);
}

.hero-quiz:has(.hero-quiz__portal.is-warping)::before {
    content: "";
    position: fixed;
    z-index: 4;
    inset: 0;
    pointer-events: none;
    background: #02030b;
    animation: hero-portal-void 2.5s cubic-bezier(0.2, 0.72, 0.3, 1) both;
}

.hero-quiz__portal.is-warping {
    z-index: 6;
    pointer-events: none;
    animation: hero-portal-consume 2.5s cubic-bezier(0.2, 0.72, 0.3, 1) both;
}

.hero-quiz__portal.is-warping .hero-quiz__portal-label {
    opacity: 0;
    transition: opacity 160ms ease;
}

@keyframes hero-portal-void {
    from { opacity: 0; }
    to { opacity: 0.96; }
}

@keyframes hero-portal-consume {
    from { scale: 1; opacity: 1; }
    to { scale: 4.4; opacity: 0; }
}

.hero-assistant.hero-quiz-host,
.hero-quiz {
    height: 100%;
}

.hero-quiz {
    min-height: 0;
    justify-content: flex-start;
}

.hero-quiz__dialog {
    position: absolute;
    top: 87px;
    right: 305px;
}

@media (prefers-reduced-motion: reduce) {
    .hero-quiz__bubble { animation: none; transform: translateY(0); }
    .hero-quiz__bubble--world { animation: none; }
    .hero-quiz__cloudlets span { animation: none; }
    .hero-quiz__ambient::before,
    .hero-quiz__ambient span { animation: none; }
    .hero-quiz__dialog-petals span { animation: none; }
    .hero-quiz__portal.is-warping { animation: none; }
    .hero-quiz:has(.hero-quiz__portal.is-warping)::before { animation: none; opacity: 0; }
}



/* ===== 心蓝酱动作状态机（js/mascot-chat.js 切换 mascot-act-* class） ===== */
/* 立绘切换时轻微淡入，掩盖 src 替换的硬切 */
.anime-mascot {
    transition: transform 0.3s ease, filter 0.3s ease;
}

/* idle：呼吸起伏 */
.mascot-act-idle {
    animation: mascot-breathe 4.5s ease-in-out infinite;
}

/* wave / cheer / happy：短促弹跳，配合 3.2s 后回 idle 的节奏 */
.mascot-act-wave,
.mascot-act-cheer,
.mascot-act-happy {
    animation: mascot-bounce 0.9s ease-in-out infinite;
}

.mascot-act-cheer,
.mascot-act-happy {
    filter: drop-shadow(0 0 18px rgba(179, 155, 255, 0.65));
}

/* think：歪头沉思 */
.mascot-act-think {
    animation: mascot-tilt 2.4s ease-in-out infinite;
}

/* interact：向前倾身 */
.mascot-act-interact {
    animation: mascot-lean 1.8s ease-in-out infinite;
}

@keyframes mascot-breathe {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-6px) scale(1.012); }
}

@keyframes mascot-bounce {
    0%, 100% { transform: translateY(0); }
    40% { transform: translateY(-14px); }
    70% { transform: translateY(-4px); }
}

@keyframes mascot-tilt {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(-2.4deg) translateY(-3px); }
}

@keyframes mascot-lean {
    0%, 100% { transform: translateX(0) scale(1); }
    50% { transform: translateX(10px) scale(1.03); }
}

@media (prefers-reduced-motion: reduce) {
    .mascot-act-idle,
    .mascot-act-wave,
    .mascot-act-cheer,
    .mascot-act-happy,
    .mascot-act-think,
    .mascot-act-interact {
        animation: none;
    }
}

/* 融合气泡助手绝对居中于 Hero（原手机位置），让出左侧立绘与右侧 PV，避免遮挡角色。 */
@media (min-width: 961px) {
    .hero-showcase {
        position: static;
        grid-template-columns: auto clamp(164px, 15vw, 220px) minmax(0, 1fr);
    }

    /* 卡片脱离栅格流绝对居中，不挤压立绘与 PV；选项/输入仍可点，故不禁用指针。 */
    .hero-assistant {
        position: absolute;
        z-index: 5;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        display: flex;
        justify-content: center;
    }
}

/* ===== 桌面端（≥961px）：左·大立绘合照 / 中·聊天气泡 / 右·大 PV ===== */
@media (min-width: 961px) {
    /* 收紧上下留白，保证三栏整体落在首屏内。 */
    .hero {
        padding-block: 104px 52px;
    }

    /* PV 独占右栏，避免文案占用其展示空间。 */
    .hero-showcase {
        display: grid;
        grid-template-columns: auto auto minmax(0, 1fr);
        grid-template-areas: "cast assistant pv";
        align-items: center;
        column-gap: clamp(16px, 3vw, 56px);
        width: 100%;
        max-width: 1700px;
        margin-inline: auto;
    }

    .hero-cast { grid-area: cast; }
    .hero-assistant { grid-area: assistant; }
    .hero-pv { grid-area: pv; }

    /* 中间主立绘以首屏高度为基准放大，令角色主体接近 Hero 左栏的完整可视高度。 */
    .hero-cast {
        display: flex;
        align-items: flex-end;
    }

    .hero-cast .hero-cast__center {
        position: static;
        height: clamp(560px, 80vh, 800px);
        z-index: 2;
        pointer-events: auto;
        cursor: pointer;
    }

    .hero-cast__side {
        height: clamp(220px, 34vh, 400px);
        z-index: 1;
        pointer-events: none;
        filter: drop-shadow(0 12px 40px rgba(20, 20, 60, 0.55));
        -webkit-mask-image: radial-gradient(ellipse 75% 88% at 50% 46%, #000 55%, transparent 78%);
        mask-image: radial-gradient(ellipse 75% 88% at 50% 46%, #000 55%, transparent 78%);
    }

    .hero-cast__side--left {
        margin-right: clamp(-72px, -6vw, -28px);
    }

    .hero-cast__side--right {
        margin-left: clamp(-72px, -6vw, -28px);
    }

    /* PV 放大，占满右栏。 */
    .hero-pv {
        width: 100%;
        max-width: 720px;
    }

    /* 中栏＝融合气泡卡片，在助手槽内居中。 */
    .hero-assistant {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* PV 贴齐右栏并收窄，为居中的气泡助手和完整对话窗保留横向安全通道。 */
@media (min-width: 1200px) {
    .hero-cast {
        transform: translateX(clamp(20px, 2.8vw, 42px));
    }

    .hero-pv {
        width: clamp(460px, 40vw, 620px);
        max-width: 620px;
        justify-self: end;
        transform: translateY(-65px);
    }
}

/* 小桌面可用横向空间有限，继续缩小 PV，避免与居中助手相交。 */
@media (min-width: 961px) and (max-width: 1199px) {
    .hero-pv {
        width: clamp(250px, 27vw, 324px);
        max-width: 324px;
        justify-self: end;
    }
}

/* ===== 移动端：隐藏看板娘与花瓣，以 PV 作为 Hero 主展示 ===== */@media (max-width: 960px) {
    .hero-cast,
    .anime-petals,
    .hero-quiz__dialog-petals {
        display: none;
    }

    .hero {
        justify-content: center;
    }

    .hero-showcase {
        width: min(100%, 720px);
        margin-inline: auto;
    }

    /* 融合卡片成为移动端 Hero 主元素，居中显示。 */
    .hero-assistant {
        display: flex;
        justify-content: center;
        margin-bottom: 16px;
    }

    .hero-pv {
        display: flex;
        width: 100%;
        max-width: none;
    }
}

/* ============================================================
   首页入场动画（仅 about.html，配合 .intro-active 标记）
   流程：夜空云层满屏 → 云层左右拨开 + 中心透光 →
        Hero 镜头拉近（zoom + 去模糊）→ 左侧看板娘滑入、右侧 PV 浮现
   遮罩仅在 html.intro-active 时显示；每次进入都播放，无 JS / 减弱动效时跳过
   ============================================================ */

.intro-overlay {
    display: none;
}

html.intro-active .intro-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 9999;
    overflow: hidden;
    pointer-events: none;
    animation: intro-overlay-out 0.9s ease 2.5s forwards;
}

/* 夜空底（星点 + 中心微光 + 深蓝渐变）：独立一层，云团基本散开后先行淡出，
   让镜头拉近中的 Hero 从云缝里露出来，而不是等遮罩整体消失 */
.intro-sky {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle 1.6px at 18% 22%, rgba(255, 255, 255, 0.9), transparent 100%),
        radial-gradient(circle 1.2px at 32% 12%, rgba(255, 255, 255, 0.7), transparent 100%),
        radial-gradient(circle 1.8px at 50% 26%, rgba(255, 255, 255, 0.85), transparent 100%),
        radial-gradient(circle 1.3px at 66% 14%, rgba(255, 255, 255, 0.7), transparent 100%),
        radial-gradient(circle 1.6px at 82% 24%, rgba(255, 255, 255, 0.8), transparent 100%),
        radial-gradient(circle 1.2px at 42% 38%, rgba(255, 255, 255, 0.6), transparent 100%),
        radial-gradient(circle 1.4px at 74% 40%, rgba(255, 255, 255, 0.6), transparent 100%),
        radial-gradient(circle 1.2px at 26% 44%, rgba(255, 255, 255, 0.55), transparent 100%),
        radial-gradient(ellipse 55% 45% at 50% 52%, rgba(126, 138, 210, 0.4), transparent 72%),
        linear-gradient(180deg, #090c20 0%, #141a3c 42%, #202a5c 68%, #12173a 100%);
    animation: intro-sky-out 0.9s ease 1.35s forwards;
}

@keyframes intro-sky-out {
    to { opacity: 0; }
}

@keyframes intro-overlay-out {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

/* 光束：云散开后从中心洒出的柔和光柱，随镜头拉近旋转淡出 */
.intro-rays {
    position: absolute;
    inset: -20%;
    background: repeating-conic-gradient(from -8deg at 50% 46%,
        rgba(240, 244, 255, 0.12) 0deg 7deg,
        transparent 7deg 22deg);
    -webkit-mask-image: radial-gradient(ellipse 42% 52% at 50% 46%, #000 20%, transparent 70%);
    mask-image: radial-gradient(ellipse 42% 52% at 50% 46%, #000 20%, transparent 70%);
    opacity: 0;
    animation: intro-rays-glow 2.2s ease-out 0.5s both;
}

@keyframes intro-rays-glow {
    0% { opacity: 0; transform: rotate(-2deg) scale(0.8); }
    45% { opacity: 0.45; }
    100% { opacity: 0; transform: rotate(2deg) scale(1.15); }
}

/* 中心透光：云层拨开时从中间亮起，再随镜头拉近淡出 */
.intro-light {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 46% 58% at 50% 46%,
        rgba(214, 224, 255, 0.95) 0%,
        rgba(168, 184, 255, 0.45) 38%,
        transparent 72%);
    opacity: 0;
    transform: scale(0.35);
    animation: intro-light-bloom 2.1s ease-out 0.3s both;
}

@keyframes intro-light-bloom {
    0% { opacity: 0; transform: scale(0.35); }
    45% { opacity: 0.95; }
    100% { opacity: 0; transform: scale(1.55); }
}

/* 七朵云：真实云图（assets/intro-cloud-N-night.webp，scripts/process-intro-clouds.py
   由白底原图抠透明 + 月光调色生成），.flip 用独立 scale 属性水平镜像出更多变化；
   位置/散开方向/延迟/时长由内联样式给定（--dx/--dy/--rot），
   中部两朵向左右错开，形成「云从中部打开」 */
.intro-cloud {
    position: absolute;
    will-change: transform, opacity;
    background: center / contain no-repeat;
    animation: intro-cloud-part 1.8s cubic-bezier(0.5, 0, 0.25, 1) 0.35s forwards;
}

.intro-cloud.img1 { background-image: url("../assets/intro-cloud-1-night.webp"); }
.intro-cloud.img2 { background-image: url("../assets/intro-cloud-2-night.webp"); }
.intro-cloud.img3 { background-image: url("../assets/intro-cloud-3-night.webp"); }
.intro-cloud.flip { scale: -1 1; }

@keyframes intro-cloud-part {
    0% { transform: translate(0, 0) rotate(0deg) scale(1); opacity: 1; }
    70% { opacity: 0.92; }
    100% { transform: translate(var(--dx), var(--dy, 0vh)) rotate(var(--rot, 0deg)) scale(1.1); opacity: 0; }
}

/* 镜头拉近：第二幕。云层拨开、夜空淡去之后（1.35s 起），
   Hero 整体从放大 + 模糊回落到正常视角 */
html.intro-active .hero {
    animation: intro-hero-zoom 1.4s cubic-bezier(0.22, 0.61, 0.21, 1) 1.35s both;
    will-change: transform, filter;
}

@keyframes intro-hero-zoom {
    0% { transform: scale(1.26); filter: blur(12px) brightness(1.4); }
    55% { filter: blur(3px) brightness(1.1); }
    100% { transform: scale(1); filter: blur(0) brightness(1); }
}

/* 立绘合照：镜头拉近到位前从左侧滑入（三张一起，作为一个整体） */
html.intro-active .hero-cast .hero-character__art {
    animation: intro-mascot-in 1.1s cubic-bezier(0.25, 0.7, 0.3, 1) 1.6s both;
}

@keyframes intro-mascot-in {
    0% { opacity: 0; transform: translateX(-64px) scale(1.04); }
    100% { opacity: 1; transform: translateX(0) scale(1); }
}

/* 右侧 PV 文案：入场期间保持收起，1.9s 打上 intro-reveal 标记后
   由 main.js 已施加的 aos-animate 过渡统一浮现（含既有阶梯延迟） */
html.intro-active:not(.intro-reveal) .hero [data-aos] {
    opacity: 0 !important;
    transform: translateY(34px) !important;
}

@media (prefers-reduced-motion: reduce) {
    html.intro-active .intro-overlay,
    html.intro-active .intro-cloud,
    html.intro-active .hero,
    html.intro-active .hero-cast {
        animation: none;
    }
}

/* ===== 官网首页右上角用户系统（深色动漫主题适配） ===== */
.site-user-btn,
.site-user-pill {
    background: rgba(16, 20, 44, 0.55);
    border-color: rgba(150, 165, 255, 0.18);
    color: rgba(220, 226, 255, 0.9);
}

.site-user-btn:hover,
.site-user-pill:hover {
    border-color: rgba(179, 155, 255, 0.55);
    background: rgba(24, 28, 60, 0.72);
    color: #fff;
}

.site-user-btn[aria-expanded="true"],
.site-user-pill[aria-expanded="true"] {
    border-color: rgba(179, 155, 255, 0.7);
    background: rgba(123, 140, 255, 0.18);
    color: #fff;
}

.site-user-panel {
    background: rgba(14, 17, 38, 0.92);
    border-color: rgba(150, 165, 255, 0.22);
    box-shadow: 0 18px 60px rgba(5, 6, 18, 0.6);
    color: #e6e0ff;
}

.site-user-panel__head {
    border-color: rgba(150, 165, 255, 0.18);
}

.site-user-panel__head b {
    color: #f0edff;
}

.site-user-panel__action {
    color: #b8bfe0;
}

.site-user-panel__action:hover {
    background: rgba(150, 165, 255, 0.15);
    color: #fff;
}

.site-user-panel__item {
    color: rgba(220, 226, 255, 0.82);
}

.site-user-panel__item:hover {
    background: rgba(150, 165, 255, 0.12);
    color: #fff;
}

.site-user-panel__item.is-unread {
    background: rgba(123, 140, 255, 0.14);
    box-shadow: inset 3px 0 0 #a8b8ff;
}

.site-user-panel__item b {
    color: #f0edff;
}

.site-user-panel__body small {
    color: #8f96c3;
}

.site-user-panel__empty {
    color: #8f96c3;
}

.site-user-dot {
    border-color: #0b0e1d;
}

/* 问卷栏会与角色轮播局部重叠，空白区域必须让点击穿透到左右箭头。 */
.hero-assistant.hero-quiz-host {
    pointer-events: none;
}

.hero-quiz__bubble,
.hero-quiz__compose {
    pointer-events: auto;
}

@media (max-width: 480px) {
    .site-user-cluster .site-user-btn:nth-child(1),
    .site-user-cluster .site-user-btn:nth-child(2) {
        display: none;
    }

    .site-user-cluster {
        gap: 6px;
    }
}
