/* ============================================
   WBTI 农格测试 · 样式 v10
   1) 严格按字体规范：38/26/22/18/16/15/14/13/12/11px
   2) 大百分比统计块、紧凑搭档对、雷达图、折叠图鉴
   3) 清新墨绿色系 + 细衬线优雅字体
   4) 配图全面更新：数据狂魔浅底/五杀横幅/佛系和尚等
   ============================================ */

:root {
    --bg-cream: #F5EFE4;
    --bg-warm: #EFE8D9;
    --bg-card: #FDFCF7;
    --ink: #2B2B28;
    --ink-soft: #4A4A44;
    --ink-light: #918C82;
    --moss: #3E5641;
    --moss-deep: #2A3D2C;
    --moss-light: #6B8A6E;
    --moss-soft: #E4E8DE;
    --moss-cream: #F0EDE0;
    --earth-terra: #B8574A;
    --earth-terra-soft: #EFD9D3;
    --earth-mustard: #C9964A;
    --earth-mustard-soft: #F1E2C4;
    --earth-ocean: #5B7A8A;
    --earth-ocean-soft: #D9E2E7;
    --earth-plum: #8E6A8E;
    --earth-plum-soft: #E5DBE5;
    /* 兼容 */
    --gold: #C9964A;
    --gold-deep: #A77A2E;
    --gold-light: #F1E2C4;
    --gold-soft: #F7EED7;
    --green: #3E5641;
    --green-deep: #2A3D2C;
    --green-light: #6B8A6E;
    --green-soft: #E4E8DE;
    --royal-purple: #6B4EFF;
    --royal-purple-soft: #E9E3FF;
    --rose: #E56B88;
    --rose-soft: #F7DDE4;
    --mint: #3DD4A7;
    --sky: #5BA4FF;
    --card: #FDFCF7;
    --ultra-rare: #B8574A;
    --shadow-sm: 0 2px 8px rgba(43, 43, 40, 0.04);
    --shadow-md: 0 8px 24px rgba(43, 43, 40, 0.06);
    --shadow-lg: 0 16px 48px rgba(43, 43, 40, 0.08);
    --font-serif: 'Playfair Display', 'DM Serif Display', 'Noto Serif SC', 'Songti SC', 'STSong', serif;
    --font-sans: 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', 'Helvetica Neue', Arial, sans-serif;
    --font-display: 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(180deg, #FCF9F1 0%, #F8F3E8 100%);
    color: var(--ink);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(circle at 10% 8%, rgba(201, 169, 97, 0.045), transparent 52%),
        radial-gradient(circle at 88% 90%, rgba(201, 169, 97, 0.035), transparent 55%),
        radial-gradient(circle at 78% 18%, rgba(62, 86, 65, 0.03), transparent 46%);
}

.particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
}

.page { animation: pageIn 0.6s ease-out; }
.page.hidden { display: none !important; }

@keyframes pageIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   ============ 封面页（上下两行大字 · 游戏感装饰） ===========
   ============================================================ */
.intro-wrap {
    width: 100%;
    max-width: 540px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 2;
    padding: 2rem 0 1.2rem;
    min-height: calc(100vh - 5rem);
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* WBTI 金棕色胶囊徽章 */
.wbti-chip {
    display: inline-block;
    margin-bottom: 1.6rem;
    padding: 0;
    position: relative;
}

.wbti-chip-letter {
    display: inline-block;
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
    font-size: 13px;
    color: #FFFFFF;
    letter-spacing: 0.45em;
    font-weight: 700;
    font-style: normal;
    padding: 0.4em 1.5em 0.4em 2em;
    background: #C9A961;
    border-radius: 9999px;
    line-height: 1;
    text-indent: 0;
    box-shadow: 0 2px 8px rgba(201, 169, 97, 0.25);
}

.wbti-chip::after {
    display: none;
}

/* 主标题块：单行 */
.intro-title-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    position: relative;
    padding: 0 2rem; /* 为两侧装饰留空间 */
}

.intro-title-block::before {
    content: '✦';
    position: absolute;
    left: clamp(-20px, -4vw, -32px);
    top: 50%;
    transform: translateY(-50%);
    color: #C9A961;
    font-size: clamp(12px, 3vw, 18px);
    opacity: 0.75;
    animation: twinkle 2.8s ease-in-out infinite;
}

.intro-title-block::after {
    content: '✧';
    position: absolute;
    right: clamp(-20px, -4vw, -32px);
    top: 50%;
    transform: translateY(-50%);
    color: #C9A961;
    font-size: clamp(12px, 3vw, 18px);
    opacity: 0.75;
    animation: twinkle 2.8s ease-in-out infinite 1.4s;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.4; transform: translateY(-50%) scale(0.85); }
    50% { opacity: 1; transform: translateY(-50%) scale(1.15); }
}

/* 单行主标题：WBTI · 农格测试 */
.intro-main-title-oneline {
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
    font-size: clamp(32px, 10vw, 54px);
    font-weight: 900;
    line-height: 1.1;
    margin: 0;
    display: flex;
    align-items: baseline;
    justify-content: center;
    flex-wrap: nowrap;
    white-space: nowrap;
    gap: 0.25em;
}

.intro-main-title-oneline .intro-title-en {
    color: #3A3A38;
    font-family: 'Impact', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-indent: 0.08em;
    font-size: 1em;
}

.intro-main-title-oneline .intro-title-sep {
    color: #C9A961;
    font-weight: 400;
    font-size: 0.7em;
    opacity: 0.8;
    margin: 0 0.05em;
    transform: translateY(-4px);
    display: inline-block;
}

.intro-main-title-oneline .intro-title-cn {
    background: linear-gradient(180deg, #E5C77A 0%, #C9A961 55%, #A07F3D 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #C9A961;
    font-weight: 900;
    letter-spacing: 0.04em;
    font-size: 1em;
}

/* 兼容旧版（保留） */
.intro-main-title-en,
.intro-main-title-cn {
    display: none;
}

/* 保留旧 class 兼容 */
.intro-main-title {
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
    font-size: 44px;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: 0.01em;
    margin: 0 0 0.5rem 0;
    color: #1A1A1A;
    display: flex;
    align-items: baseline;
    justify-content: center;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.intro-main-title .title-wbti { color: #1A1A1A; font-weight: 900; letter-spacing: 0.04em; font-size: 0.9em; margin-right: 0.05em; }
.intro-main-title .title-sep { color: #C9A961; font-weight: 400; font-size: 0.75em; margin: 0 0.1em; transform: translateY(-2px); display: inline-block; opacity: 0.8; }
.intro-main-title .title-xia { color: #1A1A1A; font-weight: 900; letter-spacing: 0.02em; }
.intro-main-title .title-ceshi { color: #C9A961; font-weight: 900; letter-spacing: 0.02em; margin-left: 0.08em; }

/* 中部区：引导语 + 按钮（整体靠下，向下伸展） */
.intro-mid-area {
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 10rem 0 3.2rem;
}

/* 底部区：免责声明 + 署名（贴底） */
.intro-bottom-area {
    width: 100%;
    margin-top: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 1.5rem;
}

/* 英文副标题（小字 · 括号 · 不重点） */
.intro-en-sub {
    font-family: 'PingFang SC', 'Helvetica Neue', 'Microsoft YaHei', Arial, sans-serif;
    font-size: 12px;
    color: #B8B0A0;
    letter-spacing: 0.08em;
    font-style: normal;
    margin: 0.4rem 0 0 0;
    font-weight: 400;
    text-transform: none;
    opacity: 0.9;
    line-height: 1.6;
}

/* 副标题：14px / 400 浅灰 */
.intro-sub-title {
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
    font-size: 14px;
    color: #A8A8A0;
    letter-spacing: 0.08em;
    margin: 1rem 0 2.4rem 0;
    font-weight: 400;
}

/* 引导语卡片：白底 + 左侧金棕色竖线 */
.intro-desc-card {
    background: #FFFFFF;
    border-radius: 14px;
    padding: 1.8rem 1.8rem 1.8rem 2rem;
    margin: 0 auto 2rem auto;
    max-width: 500px;
    position: relative;
    box-shadow: 0 4px 16px rgba(43, 43, 40, 0.05);
    text-align: left;
    border: none;
    border-left: 4px solid #C9A961;
    overflow: hidden;
}

.intro-desc-card::before {
    content: '';
    display: none;
}

.intro-desc-p {
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
    font-size: 14.5px;
    line-height: 1.65;
    color: #2B2B28;
    margin: 0;
    font-weight: 400;
    font-style: normal;
    letter-spacing: 0.02em;
    text-align: left;
}

.intro-desc-p + .intro-desc-p {
    margin-top: 0.25rem;
}

.intro-desc-p .hl-num {
    color: #2B2B28;
    font-weight: 400;
    font-size: 1em;
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
    font-style: normal;
    margin: 0 0.1em;
}

/* 开始按钮：深灰胶囊 */
.btn-enter-canyon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    min-width: 280px;
    padding: 1.15rem 2.4rem;
    background: #3A3A38;
    border: none;
    border-radius: 9999px;
    color: #FFFFFF;
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.35em;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(58, 58, 56, 0.22);
    transition: all 0.35s cubic-bezier(.2, .9, .35, 1);
    position: relative;
    overflow: hidden;
    margin-bottom: 0;
    text-indent: 0.35em;
}

.btn-enter-canyon .btn-arrow {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    font-size: 17px;
    font-style: normal;
    text-indent: 0;
    transition: transform 0.35s ease;
    display: inline-block;
    font-weight: 600;
    opacity: 0.9;
}

.btn-enter-canyon::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
    transform: translateX(-100%);
    transition: transform 0.7s ease;
}

.btn-enter-canyon:hover {
    transform: translateY(-3px);
    background: #2F2F2D;
    box-shadow: 0 14px 32px rgba(47, 47, 45, 0.3);
}

.btn-enter-canyon:hover::before {
    transform: translateX(100%);
}

.btn-enter-canyon:hover .btn-arrow {
    transform: translateX(5px);
}

.btn-enter-canyon:active {
    transform: translateY(-1px) scale(0.98);
}

/* 免责说明版块（独立卡片 · 左对齐） */
.intro-note-block {
    max-width: 480px;
    margin: 0 auto 0.8rem auto;
    padding: 0.9rem 1.1rem;
    background: rgba(201, 169, 97, 0.08);
    border: 1px dashed rgba(201, 169, 97, 0.4);
    border-radius: 12px;
    position: relative;
    text-align: left;
}

/* 免责说明文字 */
.intro-note {
    color: #8A8478;
    font-size: 11.5px;
    letter-spacing: 0.04em;
    margin: 0;
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
    opacity: 1;
    font-weight: 400;
    line-height: 1.8;
    max-width: 100%;
    text-align: left;
}

.intro-note-line {
    margin: 0;
    padding: 0;
    display: block;
}

.intro-note-line + .intro-note-line {
    margin-top: 0.3rem;
}

/* 署名 */
.intro-presented {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    font-size: 12px;
    color: #B8B0A0;
    letter-spacing: 0.15em;
    font-style: normal;
    font-weight: 400;
}

.intro-presented-name {
    color: #8A8478;
    font-weight: 500;
    font-style: normal;
    margin-left: 0.3rem;
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    letter-spacing: 0.05em;
}

@media (max-width: 480px) {
    .intro-wrap { padding: 1rem 0.3rem; }
    .intro-main-title { font-size: 32px; letter-spacing: 0.01em; }
    .intro-en-sub { font-size: 10.5px; letter-spacing: 0.05em; }
    .intro-sub-title { font-size: 13px; margin-top: 0.8rem; margin-bottom: 2rem; }
    .intro-desc-card { padding: 1.3rem 1.2rem 1.3rem 1.4rem; max-width: 100%; }
    .intro-desc-p { font-size: 13.5px; line-height: 1.65; }
    .btn-enter-canyon {
        min-width: auto;
        width: 100%;
        padding: 1rem 1.5rem;
        letter-spacing: 0.25em;
    }
    .intro-note-block { padding: 0.9rem 1rem 1rem; }
    .intro-note { font-size: 11px; line-height: 1.75; }
    /* 标题两侧装饰收紧，不超出屏幕 */
    .intro-title-block { padding: 0 1.2rem; }
    .intro-title-block::before { left: -8px; font-size: 13px; }
    .intro-title-block::after { right: -8px; font-size: 13px; }
    /* 手机端几何装饰同步缩小，位置保持随机散布，确保不溢出 */
    .deco-layer { opacity: 0.52; }
    .deco-geo { transform: scale(0.65); }
    .dg-1 { top: 4%; left: 4%; }
    .dg-2 { top: 10%; right: 5%; }
    .dg-3 { top: 24%; left: 2%; }
    .dg-4 { top: 30%; right: 3%; }
    .dg-5 { top: 43%; left: 5%; }
    .dg-6 { top: 57%; right: 6%; }
    .dg-7 { bottom: 24%; left: 4%; }
    .dg-8 { bottom: 16%; right: 5%; }
    .dg-9 { top: 69%; left: 11%; }
    .dg-10 { top: 77%; right: 10%; }
    .dg-11 { bottom: 8%; left: 22%; }
    .dg-12 { bottom: 11%; right: 18%; }
    .q-text { gap: 0; }
    .q-deco-icon {
        display: none !important;
    }
}

/* ============================================================
   ============ 测试页（字号严格按规范） ===========
   ============================================================ */
.quiz-wrap {
    max-width: 680px;
    margin: 0 auto;
    padding: 0.5rem 0;
}

.quiz-topbar {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2.4rem;
}

/* 导航按钮（重开）：13px / 700 粗体 */
.quiz-back-btn {
    padding: 0.45rem 1rem;
    background: transparent;
    border: 1px solid rgba(62, 86, 65, 0.2);
    border-radius: 9999px;
    color: var(--ink-soft);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: var(--font-sans);
    display: flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
}

.quiz-back-btn:hover {
    background: var(--moss-soft);
    border-color: var(--moss);
    color: var(--moss-deep);
}

.quiz-progress-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.quiz-progress-track {
    flex: 1;
    height: 3px;
    background: rgba(62, 86, 65, 0.12);
    border-radius: 9999px;
    overflow: hidden;
    position: relative;
}

.quiz-progress-fill {
    height: 100%;
    background: var(--moss-deep);
    border-radius: 9999px;
    transition: width 0.5s cubic-bezier(.2, .9, .35, 1);
    position: relative;
}

/* 题号「Q1/16」：18px / 800 粗体 */
.quiz-progress-num {
    font-family: var(--font-serif);
    font-size: 18px;
    color: var(--ink-soft);
    font-weight: 800;
    letter-spacing: 0.04em;
    white-space: nowrap;
    font-style: italic;
}

.quiz-progress-num #q-num {
    color: var(--moss-deep);
    font-weight: 800;
}

.quiz-progress-num .q-slash {
    margin: 0 0.2em;
    color: var(--ink-light);
    font-weight: 700;
}

.quiz-progress-num #q-total {
    color: var(--ink-soft);
    font-weight: 700;
    font-size: 0.85em;
}

/* 题目卡片 */
.quiz-card {
    background: var(--bg-card);
    border-radius: 22px;
    padding: 2.4rem 2rem 2.4rem;
    box-shadow: 0 2px 12px rgba(43, 43, 40, 0.04);
    border: 1px solid rgba(62, 86, 65, 0.08);
    position: relative;
    animation: cardIn 0.5s cubic-bezier(.2, .9, .35, 1);
}

@keyframes cardIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 题干区（场景 + 题干合并为同一段） */
.q-main-wrap {
    text-align: left;
    margin: 0 0 2rem 0;
    padding: 0 0.3rem;
}

/* 场景前缀（与题干完全相同的字体/字号/字重，仅颜色略淡以示层次） */
.q-scene-inline {
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    letter-spacing: inherit;
}

/* 场景和题干之间用空格连读（已在 JS 中作为文本拼接），无分隔符 */

/* 题干（继承同字体，左对齐） */
.q-text {
    color: #1A1A1A;
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.75;
    text-align: left;
    margin: 0;
    letter-spacing: 0.02em;
    min-height: 2rem;
    display: block;
}

.q-deco-icon {
    display: none !important;
}

.q-text-body {
    display: block;
}

/* 选项列表 */
.q-options-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.option-btn {
    width: 100%;
    padding: 1.05rem 1.3rem;
    background: #FFFFFF;
    border: 1.5px solid rgba(62, 86, 65, 0.1);
    border-radius: 14px;
    color: var(--ink);
    text-align: left;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(.2, .9, .35, 1);
    position: relative;
    overflow: hidden;
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 60px;
}

/* 选项字母 */
.option-btn .opt-letter {
    flex-shrink: 0;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 50%;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--ink-soft);
    transition: all 0.25s ease;
    font-size: 13px;
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
    font-style: normal;
    border: 1.5px solid rgba(62, 86, 65, 0.25);
}

/* 选项文字 */
.option-btn .opt-text {
    flex: 1;
    display: flex;
    align-items: center;
    font-weight: 500;
    color: #2B2B28;
    font-size: 14.5px;
    letter-spacing: 0.02em;
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
    font-style: normal;
}

.option-btn .opt-emoji { display: none; }

.option-btn:hover {
    background: #FAF4E7;
    border-color: rgba(201, 169, 97, 0.32);
    transform: translateX(2px);
}

.option-btn:hover .opt-letter {
    background: #C9A961;
    color: #FFFFFF;
    border-color: #C9A961;
}

.option-btn.selected {
    background: #F2E7CD;
    border-color: #C9A961;
    box-shadow: 0 4px 16px rgba(201, 169, 97, 0.18);
}

.option-btn.selected .opt-letter {
    background: #C9A961;
    color: #FFFFFF;
    border-color: #C9A961;
    box-shadow: 0 2px 6px rgba(201, 169, 97, 0.28);
}

/* 底部 */
.quiz-footer {
    margin-top: 1.6rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 0.3rem;
}

/* 上一题按钮：13px / 700 粗体 */
.quiz-prev-btn {
    padding: 0.55rem 1.2rem;
    background: transparent;
    border: 1px solid rgba(62, 86, 65, 0.2);
    border-radius: 9999px;
    color: var(--ink-soft);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: var(--font-sans);
}

.quiz-prev-btn:hover:not(:disabled) {
    background: var(--moss-soft);
    border-color: var(--moss);
    color: var(--moss-deep);
}

.quiz-prev-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.quiz-tip {
    font-family: var(--font-serif);
    font-size: 11px;
    color: var(--ink-light);
    letter-spacing: 0.05em;
    font-style: italic;
    font-weight: 700;
}

@media (max-width: 640px) {
    .quiz-card { padding: 1.8rem 1.2rem 1.8rem; border-radius: 18px; }
    .option-btn { padding: 0.95rem 1rem; min-height: 58px; gap: 0.85rem; }
    .option-btn .opt-letter { width: 1.95rem; height: 1.95rem; }
    .quiz-topbar { gap: 0.6rem; margin-bottom: 1.8rem; }
    .quiz-back-btn { padding: 0.4rem 0.75rem; font-size: 12px; }
}

/* ============================================================
   ============ 加载页 ===========
   ============================================================ */
.loading-canyon {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-canyon .lc-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px dashed var(--moss);
    animation: lcRingSpin 5s linear infinite;
    opacity: 0.45;
}

.loading-canyon .lc-ring-2 {
    inset: 16px;
    border: 1.5px solid var(--moss-soft);
    border-top-color: var(--moss);
    animation: lcRingSpin 1.4s cubic-bezier(0.5, 0, 0.5, 1) infinite reverse;
    opacity: 1;
}

.loading-canyon .lc-core {
    font-size: 2rem;
    color: var(--moss-deep);
    animation: lcCorePulse 1.8s ease-in-out infinite;
    font-family: var(--font-serif);
}

@keyframes lcRingSpin { to { transform: rotate(360deg); } }
@keyframes lcCorePulse {
    0%, 100% { transform: scale(1); opacity: 0.85; }
    50% { transform: scale(1.12); opacity: 1; }
}

.loading-title {
    font-family: 'Noto Serif SC', 'Songti SC', serif;
    font-size: 22px;
    font-weight: 800;
    color: #1A1A1A;
    margin: 0 0 0.8rem 0;
    letter-spacing: 0.2em;
}

.loading-subtitle {
    font-family: var(--font-serif);
    color: #3A3A3A;
    font-size: 13px;
    letter-spacing: 0.1em;
    transition: opacity 0.3s ease;
    font-style: italic;
    font-weight: 700;
    margin: 0;
}

/* ============================================================
   ============ 兼容 Tailwind ============
   ============================================================ */
.text-white { color: var(--ink) !important; }
.text-gray-300, .text-gray-400, .text-gray-500, .text-gray-600 { color: var(--ink-light) !important; }
.text-amber-300, .text-amber-400, .text-amber-200 { color: var(--moss-deep) !important; }
.bg-gray-800, .bg-gray-800\/30 { background: transparent !important; }

/* Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.8rem 1.8rem;
    background: var(--moss-deep);
    color: #FDFCF7;
    font-weight: 700;
    font-size: 14px;
    border-radius: 9999px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    letter-spacing: 0.05em;
    animation: toastIn 0.3s ease, toastOut 0.3s ease 2s forwards;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@keyframes toastOut {
    to { opacity: 0; transform: translateX(-50%) translateY(-20px); }
}

/* ============================================================
   ============ 结果页（字号严格按规范） =============
   ============================================================ */
#page-result {
    background: transparent;
}

.sbti-result-wrap {
    max-width: 820px;
    margin: 0 auto;
    padding: 1rem 0;
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
    color: var(--ink);
}

/* 顶部 Hero 卡 */
.sbti-hero-card {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 2.4rem 1.8rem 2rem;
    box-shadow: 0 2px 12px rgba(43, 43, 40, 0.04);
    margin-bottom: 1.2rem;
    position: relative;
    overflow: hidden;
    color: var(--ink);
    border: 1px solid rgba(62, 86, 65, 0.08);
}

/* "你的农格类型是" 标签：13px / 700 */
.sbti-label {
    text-align: center;
    font-size: 13px;
    color: var(--ink-light);
    letter-spacing: 0.25em;
    margin-bottom: 0.9rem;
    font-weight: 700;
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
}

.sbti-label::before,
.sbti-label::after {
    content: '✦';
    margin: 0 0.5em;
    color: var(--moss);
    font-size: 0.7em;
    opacity: 0.7;
}

.hero-hidden-flag {
    display: inline-block;
    margin: 0 auto 0.8rem;
    padding: 0.35rem 1rem;
    font-size: 11px;
    letter-spacing: 0.25em;
    color: #7B1FA2;
    background: #F3E5F5;
    border-radius: 9999px;
    font-weight: 700;
}

/* 结果页农格名：两行式展示（参考图"酒鬼 / DRUN-K"风格） */
.sbti-code {
    text-align: center;
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
    margin: 0 0 1.2rem;
    line-height: 1.15;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

/* 单行式农格名（GG · 劝退辅助） */
.sbti-code.sbti-code-oneline {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: baseline;
    gap: 0.25em;
    padding: 0 0.4rem;
}

.sbti-code.sbti-code-oneline .sbti-code-en {
    font-size: 36px;
    font-weight: 900;
    letter-spacing: 0.1em;
    line-height: 1.1;
    text-transform: uppercase;
    font-family: 'Impact', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

.sbti-code.sbti-code-oneline .sbti-code-dot {
    font-size: 30px;
    font-weight: 600;
    line-height: 1.1;
    opacity: 0.85;
    margin: 0 0.1em;
    transform: translateY(-2px);
    display: inline-block;
}

.sbti-code.sbti-code-oneline .sbti-code-cn {
    font-size: 36px;
    font-weight: 900;
    letter-spacing: 0.04em;
    line-height: 1.1;
    color: #1A1A1A;
}

/* 中文大字（如"抢分型""酒鬼"） */
.sbti-code .sbti-code-cn {
    font-size: 42px;
    font-weight: 900;
    letter-spacing: 0.08em;
    line-height: 1.1;
}

/* 英文代号大写（如"MVP""DRUN-K"） */
.sbti-code .sbti-code-en {
    font-size: 34px;
    font-weight: 900;
    letter-spacing: 0.12em;
    line-height: 1.1;
    text-transform: uppercase;
    font-family: 'Impact', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

/* 配图区 */
.sbti-avatar-wrap {
    border-radius: 20px;
    padding: 1.2rem 1rem;
    margin: 0.8rem auto 0.6rem;
    max-width: 420px;
    text-align: center;
    position: relative;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06), inset 0 0 0 1px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.sbti-avatar-inner {
    width: 240px;
    height: 240px;
    margin: 0 auto;
}

.sbti-avatar-inner svg {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 14px;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.1));
}

/* 结果页宣言（title）：22px / 800 */
.sbti-hero-caption {
    text-align: center;
    font-size: 22px;
    font-weight: 800;
    color: var(--ink);
    margin: 1.2rem auto 0.3rem;
    letter-spacing: 0.04em;
    line-height: 1.45;
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
}

/* ======= 匹配度/稀有度：大百分比两列 ======= */
.stat-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 1.8rem auto 0.3rem;
    max-width: 420px;
    padding: 0.8rem 0;
    position: relative;
}

.stat-cell {
    flex: 1;
    text-align: center;
    padding: 0.3rem 0.5rem;
    position: relative;
}

.stat-cell-divider {
    width: 1px;
    height: 40px;
    background: rgba(62, 86, 65, 0.2);
    flex-shrink: 0;
}

/* 小标签：11px / 700 */
.stat-cell-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--ink-light);
    letter-spacing: 0.3em;
    margin-bottom: 0.4rem;
    font-family: var(--font-sans);
}

/* 大数字：28px / 900 */
.stat-cell-num {
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
    font-size: 32px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: baseline;
    gap: 0.05em;
}

.stat-cell-unit {
    font-size: 16px;
    font-weight: 700;
    margin-left: 0.08em;
    opacity: 0.85;
}

/* 极稀有高亮 */
.stat-cell.ultra-rare {
    position: relative;
}

.stat-cell.ultra-rare::before {
    content: '';
    position: absolute;
    inset: -4px 6px;
    background: radial-gradient(ellipse, rgba(184, 87, 74, 0.15), transparent 70%);
    z-index: 0;
    animation: ultraPulse 2.4s ease-in-out infinite;
}

.stat-cell.ultra-rare .stat-cell-label,
.stat-cell.ultra-rare .stat-cell-num {
    position: relative;
    z-index: 1;
}

.stat-cell.ultra-rare .stat-cell-label {
    color: var(--ultra-rare);
    font-weight: 900;
}

.stat-cell .ultra-star {
    font-size: 14px;
    margin-left: 0.2em;
    color: var(--ultra-rare);
    font-weight: 700;
    animation: ultraTwinkle 1.6s ease-in-out infinite;
    font-style: normal;
}

@keyframes ultraPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}
@keyframes ultraTwinkle {
    0%, 100% { transform: rotate(0deg) scale(1); opacity: 0.85; }
    50% { transform: rotate(180deg) scale(1.2); opacity: 1; }
}

.hidden-notice {
    margin: 1rem auto 0;
    padding: 0.8rem 1.2rem;
    background: linear-gradient(135deg, rgba(123, 31, 162, 0.08), rgba(123, 31, 162, 0.15));
    border: 1px dashed rgba(123, 31, 162, 0.4);
    border-radius: 10px;
    color: #6A1B9A;
    font-size: 13px;
    font-weight: 700;
    max-width: 620px;
    line-height: 1.6;
}

/* 分析卡 */
.sbti-analysis-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 1.8rem 1.6rem;
    box-shadow: 0 2px 12px rgba(43, 43, 40, 0.04);
    margin-bottom: 1.2rem;
    color: var(--ink);
    border: 1px solid rgba(62, 86, 65, 0.06);
}

/* 行为标题：13px / 700 */
.sbti-section-title.main {
    font-size: 13px;
    color: var(--ink);
    font-weight: 700;
    margin-bottom: 1.1rem;
    letter-spacing: 0.15em;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid rgba(62, 86, 65, 0.15);
    position: relative;
}

.sbti-section-title.main::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 48px;
    height: 2px;
    background: var(--moss-deep);
    border-radius: 2px;
}

.behavior-list {
    list-style: none;
    padding: 0;
    margin: 0.2rem 0 1rem;
}

/* 行为条目：紧凑行间距，无分隔线 */
.behavior-item {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.1rem 0;
    line-height: 1.5;
    border-bottom: none;
    animation: slideInLeft 0.5s ease-out backwards;
    animation-delay: calc(var(--idx, 0) * 0.08s);
}

.behavior-item + .behavior-item { margin-top: 0.15rem; }

.behavior-item:last-child { border-bottom: none; }

/* 项目符号圆点：替代原编号，更简洁 */
.behavior-dot {
    flex-shrink: 0;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-top: 8px;
    box-shadow: 0 0 0 3px rgba(62, 86, 65, 0.08);
}

.behavior-text {
    flex: 1;
    font-size: 14px;
    line-height: 1.55;
    color: var(--ink);
    font-weight: 600;
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

.teammate-quote {
    margin-top: 1rem;
    padding: 1rem 1.2rem;
    border-radius: 12px;
}

.teammate-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--ink-soft);
    letter-spacing: 0.15em;
    margin-bottom: 0.5rem;
}

.teammate-text {
    font-size: 14px;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.7;
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
}

/* 推荐三英雄：14px / 700 */
.hero-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 0.8rem 0 0.4rem;
}

.hero-card {
    position: relative;
    padding: 1.2rem 0.6rem;
    border: 2px solid;
    border-radius: 12px;
    background: #fff;
    text-align: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.hero-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.hero-rank {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    padding: 2px 10px;
    border-radius: 10px;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    font-family: var(--font-serif);
    font-style: italic;
}

.hero-icon {
    font-size: 1.8rem;
    margin-bottom: 0.3rem;
}

.hero-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: 0.04em;
}

.hero-hint {
    text-align: center;
    font-size: 11px;
    color: var(--ink-light);
    margin-top: 0.8rem;
    font-style: italic;
    font-family: var(--font-serif);
    font-weight: 700;
}

/* ======= 搭档/克星 紧凑双卡 ======= */
.sbti-pair-row-compact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.sbti-pair-card-c {
    border-radius: 14px;
    padding: 0.9rem 0.9rem 1rem;
    position: relative;
    border: 1px solid;
    background: #fff;
}

.sbti-pair-card-c.match {
    border-color: rgba(62, 86, 65, 0.25);
    background: linear-gradient(180deg, #F0F4ED, #FBFCF9);
}
.sbti-pair-card-c.counter {
    border-color: rgba(184, 87, 74, 0.22);
    background: linear-gradient(180deg, #F5E7E3, #FCF6F4);
}

/* 搭档/对线徽章：15px / 700 */
.sbti-pair-badge {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-align: center;
    padding: 0.35rem 0.6rem;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    display: inline-block;
    width: 100%;
}

.sbti-pair-badge.match-badge {
    background: rgba(62, 86, 65, 0.1);
    color: var(--moss-deep);
}
.sbti-pair-badge.counter-badge {
    background: rgba(184, 87, 74, 0.1);
    color: #8C3D2E;
}

.sbti-pair-mini {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.6rem;
}

.sbti-pair-mini-avatar {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.sbti-pair-mini-avatar svg { width: 100%; height: 100%; display: block; }

.sbti-pair-mini-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

/* 一行显示：代号 · 梗名 */
.sbti-pair-mini-fullname {
    display: flex;
    align-items: baseline;
    gap: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    line-height: 1.3;
}

/* 搭档徽章代号：15px / 700 粗体 */
.sbti-pair-mini-code {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.2;
    white-space: nowrap;
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
    flex-shrink: 0;
}

.sbti-pair-mini-dot {
    font-size: 14px;
    font-weight: 400;
    opacity: 0.6;
    margin: 0 0.1em;
    flex-shrink: 0;
}

.sbti-pair-mini-name {
    font-size: 13px;
    color: #2B2B28;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
    min-width: 0;
}

.sbti-pair-reason-c {
    font-size: 12px;
    line-height: 1.65;
    color: var(--ink-soft);
    margin: 0;
    font-weight: 400;
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
}

/* ======= 雷达图 ======= */
.radar-wrap {
    margin: 1rem auto 0.5rem;
    padding: 0.5rem 1rem 0;
    max-width: 340px;
}

.radar-caption {
    text-align: center;
    font-size: 11px;
    color: var(--ink-light);
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-top: 0.5rem;
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
}

/* ======= 四维天平条 ======= */
.balance-wrap {
    margin: 0.8rem auto 0.2rem;
    padding: 0;
    max-width: 560px;
}

.balance-bars {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.balance-row {
    background: rgba(255,255,255,0.45);
    border: 1px solid rgba(201,169,97,0.18);
    border-radius: 10px;
    padding: 0.75rem 0.9rem 0.8rem;
}

.balance-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 0.6rem;
}

.balance-axis {
    font-size: 13px;
    font-weight: 800;
    color: #1A1A1A;
    letter-spacing: 0.05em;
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

.balance-context {
    font-size: 11px;
    color: #8A8478;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.balance-bar-wrap {
    display: grid;
    grid-template-columns: 80px 1fr 80px;
    align-items: center;
    gap: 0.6rem;
}

.balance-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    opacity: 0.55;
    transition: opacity .25s ease, transform .25s ease;
}

.balance-side.win {
    opacity: 1;
    transform: scale(1.04);
}

.balance-side.left { text-align: right; align-items: flex-end; }
.balance-side.right { text-align: left; align-items: flex-start; }

.balance-side-cn {
    font-size: 13px;
    font-weight: 800;
    color: #1A1A1A;
    letter-spacing: 0.03em;
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

.balance-side.win .balance-side-cn {
    color: #1A1A1A;
}

.balance-side-pct {
    font-size: 11px;
    font-weight: 700;
    color: #8A8478;
    font-family: 'Playfair Display', serif;
    letter-spacing: 0.04em;
}

.balance-side.left.win .balance-side-pct {
    color: #3A3A38;
}

.balance-side.right.win .balance-side-pct {
    color: #C9A961;
}

.balance-track {
    position: relative;
    height: 10px;
    background: rgba(138,132,120,0.14);
    border-radius: 999px;
    overflow: visible;
    display: flex;
}

.balance-fill-left,
.balance-fill-right {
    height: 100%;
    transition: width .6s cubic-bezier(.33,1,.68,1);
}

.balance-fill-left {
    border-top-left-radius: 999px;
    border-bottom-left-radius: 999px;
}

.balance-fill-right {
    border-top-right-radius: 999px;
    border-bottom-right-radius: 999px;
}

/* 中心刻度线（0 点） */
.balance-tick-center {
    position: absolute;
    top: -3px;
    bottom: -3px;
    left: 50%;
    width: 2px;
    background: rgba(26,26,26,0.35);
    transform: translateX(-50%);
    border-radius: 2px;
}

/* 滑块（圆球） */
.balance-handle {
    position: absolute;
    top: 50%;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 3px solid #fff;
    transform: translate(-50%, -50%);
    box-shadow: 0 3px 10px rgba(26,26,26,0.22);
    transition: left .6s cubic-bezier(.33,1,.68,1), background .3s ease;
    z-index: 2;
}

/* 宣言（放在图片下方，大字粗斜体） */
.sbti-hero-slogan {
    display: block;
    text-align: center;
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
    font-size: 22px;
    font-weight: 800;
    font-style: italic;
    color: #1A1A1A;
    letter-spacing: 0.02em;
    line-height: 1.45;
    margin: 0.8rem auto 0.6rem;
    max-width: 520px;
    padding: 0 0.5rem;
}

/* 全页几何装饰（不同彩色、轻盈随机） */
.deco-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
    opacity: 0.56;
}

.deco-geo {
    position: absolute;
    display: block;
    user-select: none;
    pointer-events: none;
    mix-blend-mode: normal;
    filter: none;
}

.deco-geo::before,
.deco-geo::after {
    content: '';
    position: absolute;
    inset: 0;
}

.deco-ring {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: rgba(245, 170, 112, 0.34);
}

.deco-diamond {
    width: 34px;
    height: 34px;
    background: rgba(242, 132, 130, 0.42);
    transform: rotate(45deg);
    border-radius: 8px;
}

.deco-cross {
    width: 40px;
    height: 40px;
}

.deco-cross::before,
.deco-cross::after {
    left: 50%;
    top: 50%;
    width: 34px;
    height: 6px;
    background: rgba(124, 195, 165, 0.82);
    border-radius: 999px;
    transform: translate(-50%, -50%) rotate(36deg);
}

.deco-cross::after {
    transform: translate(-50%, -50%) rotate(-36deg);
}

.deco-tri {
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
}

.deco-tri::before,
.deco-tri::after {
    display: none;
}

.deco-tri-up {
    border-bottom: 20px solid rgba(129, 176, 247, 0.42);
    filter: none;
}

.deco-tri-down {
    border-top: 20px solid rgba(204, 162, 234, 0.42);
    filter: none;
}

.deco-dot-cluster {
    width: 40px;
    height: 40px;
}

.deco-dot-cluster::before {
    inset: 0;
    background:
        radial-gradient(circle at 20% 26%, rgba(124, 195, 165, 0.9) 0 3px, transparent 3.4px),
        radial-gradient(circle at 63% 18%, rgba(245, 170, 112, 0.88) 0 3px, transparent 3.4px),
        radial-gradient(circle at 78% 56%, rgba(129, 176, 247, 0.88) 0 3px, transparent 3.4px),
        radial-gradient(circle at 32% 78%, rgba(242, 132, 130, 0.8) 0 2.4px, transparent 2.8px),
        radial-gradient(circle at 56% 62%, rgba(204, 162, 234, 0.88) 0 2px, transparent 2.4px);
}

.deco-dot-cluster::after {
    display: none;
}

.deco-hex {
    width: 42px;
    height: 24px;
    background: rgba(255, 214, 102, 0.48);
}

.deco-hex::before,
.deco-hex::after {
    width: 0;
    height: 0;
    left: 0;
    right: 0;
    margin: auto;
    border-left: 21px solid transparent;
    border-right: 21px solid transparent;
}

.deco-hex::before {
    top: -12px;
    border-bottom: 12px solid rgba(255, 214, 102, 0.48);
}

.deco-hex::after {
    bottom: -12px;
    border-top: 12px solid rgba(255, 214, 102, 0.48);
}

.deco-arc {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 6px solid rgba(96, 173, 242, 0.58);
    border-right-color: transparent;
    border-bottom-color: transparent;
    transform: rotate(-24deg);
}

.deco-spark {
    width: 36px;
    height: 36px;
}

.deco-spark::before,
.deco-spark::after {
    left: 50%;
    top: 50%;
    width: 5px;
    height: 100%;
    background: rgba(242, 132, 130, 0.38);
    border-radius: 999px;
    transform: translate(-50%, -50%);
}

.deco-spark::after {
    width: 100%;
    height: 5px;
    background: rgba(124, 195, 165, 0.82);
}

.deco-square {
    width: 30px;
    height: 30px;
    background: rgba(129, 176, 247, 0.44);
    border-radius: 7px;
    box-shadow: none;
}

.dg-1 { top: 3%; left: 7%; transform: rotate(-18deg); }
.dg-2 { top: 11%; right: 9%; transform: rotate(21deg); }
.dg-3 { top: 22%; left: 2%; transform: rotate(-8deg); }
.dg-4 { top: 28%; right: 3%; transform: rotate(12deg); }
.dg-5 { top: 44%; left: 10%; transform: rotate(-14deg); }
.dg-6 { top: 56%; right: 11%; transform: rotate(9deg); }
.dg-7 { bottom: 26%; left: 5%; transform: rotate(-28deg); }
.dg-8 { bottom: 18%; right: 6%; transform: rotate(22deg); }
.dg-9 { top: 66%; left: 15%; transform: rotate(17deg); }
.dg-10 { top: 74%; right: 16%; transform: rotate(-13deg); }
.dg-11 { bottom: 7%; left: 26%; transform: rotate(10deg) scale(0.88); }
.dg-12 { bottom: 10%; right: 21%; transform: rotate(-20deg) scale(0.92); }

/* 兼容旧 class（若历史 DOM 仍在则隐藏） */
.deco-sil,
.deco-sil-img,
.deco-shape,
.deco-float,
.deco-sil-cut,
.deco-sil-sheet {
    display: none !important;
}

/* 全页面统一背景符文（每一页都保持同款底色与装饰） */
#page-intro,
#page-quiz,
#page-loading,
#page-result {
    position: relative;
}

/* 所有页面统一渐变背景 */
#page-intro,
#page-quiz,
#page-loading,
#page-result {
    background:
        radial-gradient(circle at 8% 12%, rgba(201,169,97,0.075), transparent 38%),
        radial-gradient(circle at 92% 88%, rgba(62,86,65,0.055), transparent 42%),
        radial-gradient(circle at 84% 14%, rgba(201,169,97,0.045), transparent 34%),
        radial-gradient(circle at 18% 78%, rgba(62,86,65,0.04), transparent 32%);
}

/* 所有页面统一点阵装饰 */
#page-intro::before,
#page-quiz::before,
#page-loading::before,
#page-result::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image:
        radial-gradient(circle at 18% 24%, rgba(201,169,97,0.08) 0, rgba(201,169,97,0.08) 1.4px, transparent 1.9px),
        radial-gradient(circle at 74% 58%, rgba(62,86,65,0.07) 0, rgba(62,86,65,0.07) 1.4px, transparent 1.9px),
        radial-gradient(circle at 42% 84%, rgba(201,169,97,0.07) 0, rgba(201,169,97,0.07) 1.2px, transparent 1.7px),
        radial-gradient(circle at 88% 26%, rgba(62,86,65,0.05) 0, rgba(62,86,65,0.05) 1.2px, transparent 1.7px);
    background-size: 180px 180px, 220px 220px, 160px 160px, 210px 210px;
    opacity: 0.55;
}

#page-intro > *,
#page-quiz > *,
#page-loading > *,
#page-result > * {
    position: relative;
    z-index: 1;
}

/* 分享卡 */
.share-card {
    margin: 1.2rem 0;
    padding: 1.5rem;
    border-radius: 18px;
    color: #fff;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.share-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(255,255,255,0.15), transparent 60%);
    pointer-events: none;
}

.share-title {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    margin-bottom: 0.8rem;
    position: relative;
}

.share-text {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.8;
    padding: 1rem 1.1rem;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    margin-bottom: 1rem;
    position: relative;
    text-align: left;
}

.share-copy-btn {
    padding: 0.6rem 1.6rem;
    background: #fff;
    color: var(--ink);
    border: none;
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.share-copy-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

/* 免责卡 */
.sbti-disclaimer-card {
    margin: 1.2rem 0;
    padding: 1rem 1.2rem;
    background: transparent;
    border: 1px dashed rgba(62, 86, 65, 0.4);
    border-radius: 12px;
    text-align: center;
}

.sbti-disclaimer-card p {
    font-size: 11px;
    color: var(--ink-soft);
    line-height: 1.8;
    margin: 0.2rem 0;
    font-weight: 400;
}

/* ======= 图鉴（折叠） ======= */
.sbti-gallery-card {
    background: transparent;
    border-radius: 20px;
    padding: 0;
    box-shadow: none;
    margin-bottom: 1.2rem;
    border: none;
    overflow: visible;
}

/* 图鉴按钮 —— 柔和强调（莫兰迪紫 · 简洁胶囊） */
.gallery-toggle-btn {
    width: 100%;
    padding: 0.95rem 1.4rem;
    background: #F5F0F7;
    border: 1.5px solid rgba(123, 31, 162, 0.22);
    border-radius: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    color: #6B3A8A;
    letter-spacing: 0.1em;
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(123, 31, 162, 0.06);
}

.gallery-toggle-btn:hover {
    background: #EFE6F3;
    border-color: rgba(123, 31, 162, 0.4);
    box-shadow: 0 4px 12px rgba(123, 31, 162, 0.12);
    transform: translateY(-1px);
}

.gallery-toggle-btn:active {
    transform: translateY(0);
}

.gallery-toggle-btn .toggle-arrow {
    font-size: 10px;
    transition: transform 0.35s ease;
    color: #6B3A8A;
    font-weight: 700;
    margin-left: 0.25rem;
    opacity: 0.7;
}

.gallery-toggle-btn.open .toggle-arrow {
    transform: rotate(180deg);
}

.gallery-panel {
    margin-top: 0.8rem;
    padding: 1rem;
    background: var(--bg-card);
    border-radius: 18px;
    border: 1px solid rgba(62, 86, 65, 0.08);
    box-shadow: 0 2px 12px rgba(43, 43, 40, 0.04);
    animation: galleryIn 0.35s ease;
}

.gallery-panel[hidden] { display: none; }

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

.family-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1rem;
    font-size: 11px;
    font-weight: 700;
}

.family-tab {
    padding: 0.2rem 0.6rem;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 10px;
    letter-spacing: 0.05em;
}

/* 图鉴按系别分组 */
.gallery-family-group {
    margin-bottom: 1rem;
}
.gallery-family-group:last-child {
    margin-bottom: 0;
}
.gallery-family-title {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.1em;
    padding: 0.3rem 0 0.55rem;
    margin-bottom: 0.5rem;
    border-bottom: 1.5px dashed;
    display: flex;
    align-items: center;
    gap: 0.5em;
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
}
.gallery-family-title .gfg-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.gallery-family-title .gfg-count {
    font-size: 10.5px;
    color: #9E9A90;
    font-weight: 600;
    letter-spacing: 0.08em;
    margin-left: 0.2em;
}

/* 图鉴网格：4 列紧凑 */
.sbti-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.55rem;
    margin-top: 0.5rem;
}

.sbti-gallery-item {
    background: #FBF9F2;
    border: 1.5px solid transparent;
    border-radius: 10px;
    padding: 0.45rem 0.2rem 0.4rem;
    text-align: center;
    transition: all 0.25s ease;
    cursor: default;
}

.sbti-gallery-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
}

.sbti-gallery-item.active {
    transform: translateY(-2px) scale(1.02);
}

.sbti-gallery-avatar {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 0.3rem;
    background: #fff;
}

.sbti-gallery-avatar svg { width: 100%; height: 100%; display: block; }

/* 图鉴代号：11px / 700 */
.sbti-gallery-code {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin-top: 0.15rem;
    line-height: 1.2;
}

/* 图鉴名：11px / 700 */
.sbti-gallery-name {
    font-size: 11px;
    font-weight: 700;
    color: var(--ink);
    margin-top: 0.12rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.sbti-gallery-rarity {
    font-size: 10px;
    color: var(--ink-light);
    margin-top: 0.1rem;
    font-weight: 700;
    font-style: italic;
    font-family: var(--font-serif);
}

/* 操作按钮：14px / 700 */
.sbti-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.sbti-btn {
    padding: 0.85rem 1.7rem;
    background: #3A3A38;
    border: 1.5px solid rgba(58, 58, 56, 0.2);
    border-radius: 9999px;
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
    box-shadow: 0 6px 16px rgba(58, 58, 56, 0.16);
    letter-spacing: 0.08em;
}

.sbti-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(47, 47, 45, 0.22);
    border-color: #2F2F2D;
    color: #FFFFFF;
    background: #2F2F2D;
}

/* 强调按钮：分享测试 / 保存结果（使用农格主色填充） */
.sbti-btn.accent {
    color: #FFFFFF !important;
    border: none !important;
    font-weight: 800;
    padding: 0.95rem 1.9rem;
    font-size: 15px;
    letter-spacing: 0.1em;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18) !important;
}

.sbti-btn.accent:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25) !important;
    color: #FFFFFF !important;
}

/* 弱化按钮：重新测试（浅灰底胶囊，字号与 accent 一致） */
.sbti-btn.ghost {
    background: #ECE8E0;
    border: 1px solid rgba(145, 140, 130, 0.28);
    color: #5A5852;
    padding: 0.95rem 1.9rem;
    font-size: 15px;
    font-weight: 800;
    box-shadow: none;
    opacity: 1;
    letter-spacing: 0.1em;
}

.sbti-btn.ghost:hover {
    background: #E4DED4;
    color: #3A3A38;
    border-color: rgba(145, 140, 130, 0.42);
    box-shadow: none;
    transform: none;
}

/* 保留 primary 向后兼容（仍可用作醒目色块按钮） */
.sbti-btn.primary {
    color: #FDFCF7 !important;
    border: none !important;
    font-weight: 700;
    background: var(--moss-deep) !important;
    box-shadow: 0 6px 18px rgba(42, 61, 44, 0.25) !important;
}

.sbti-btn.primary:hover {
    background: var(--moss) !important;
    box-shadow: 0 10px 22px rgba(42, 61, 44, 0.35) !important;
}

/* 结果页底部署名 */
.sbti-presented {
    margin: 1.8rem auto 0.4rem;
    text-align: center;
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    font-size: 12px;
    color: #B8B0A0;
    letter-spacing: 0.15em;
    font-weight: 400;
}
.sbti-presented-name {
    color: #8A8478;
    font-weight: 500;
    margin-left: 0.3rem;
    letter-spacing: 0.05em;
}

/* 移动端结果页 */
@media (max-width: 640px) {
    .sbti-hero-card, .sbti-analysis-card, .sbti-gallery-card {
        border-radius: 18px;
        padding: 1.4rem 1.1rem;
    }
    .sbti-gallery-card { padding: 0.6rem; }
    .sbti-avatar-inner { width: 190px; height: 190px; }
    .sbti-code .sbti-code-cn { font-size: 34px; }
    .sbti-code .sbti-code-en { font-size: 26px; }
    .sbti-code.sbti-code-oneline .sbti-code-cn,
    .sbti-code.sbti-code-oneline .sbti-code-en { font-size: 26px; letter-spacing: 0.04em; }
    .sbti-code.sbti-code-oneline .sbti-code-dot { font-size: 22px; }
    .sbti-hero-caption { font-size: 18px; }
    .sbti-hero-slogan { font-size: 18px; margin: 0.3rem auto 1rem; }
    .balance-bar-wrap { grid-template-columns: 62px 1fr 62px; gap: 0.4rem; }
    .balance-side-cn { font-size: 12px; }
    .balance-side-pct { font-size: 10.5px; }
    .balance-axis { font-size: 12px; }
    .balance-context { font-size: 10px; }
    .balance-row { padding: 0.6rem 0.6rem 0.7rem; }
    .stat-cell-num { font-size: 28px; }
    .stat-cell-unit { font-size: 14px; }
    .sbti-pair-row-compact { grid-template-columns: 1fr 1fr; gap: 0.5rem; }
    .sbti-pair-card-c { padding: 0.75rem 0.65rem 0.85rem; }
    .sbti-pair-mini-avatar { width: 42px; height: 42px; }
    .sbti-pair-mini-code { font-size: 13px; }
    .sbti-pair-mini-name { font-size: 12px; }
    .sbti-pair-mini-dot { font-size: 12px; }
    .sbti-pair-reason-c { font-size: 11px; }
    .sbti-pair-badge { font-size: 12px; padding: 0.3rem 0.4rem; letter-spacing: 0.04em; }
    .sbti-gallery { grid-template-columns: repeat(4, 1fr); gap: 0.4rem; }
    .sbti-gallery-code, .sbti-gallery-name { font-size: 10px; }
    .sbti-gallery-rarity { font-size: 9px; }
    .sbti-btn { padding: 0.7rem 1.3rem; font-size: 13px; }
    .hero-row { gap: 0.5rem; }
    .hero-card { padding: 1rem 0.3rem; }
    .hero-name { font-size: 13px; }
    .hero-icon { font-size: 1.4rem; }
    .behavior-text { font-size: 13px; }
    .share-text { font-size: 13px; }
    .radar-wrap { max-width: 280px; }
}

@media print {
    #page-result { background: #fff; }
    .sbti-actions { display: none; }
}

/* 页脚 */
footer {
    color: var(--ink-light);
    border-top: 1px dashed rgba(62, 86, 65, 0.25) !important;
}

footer p {
    font-size: 11px !important;
}

footer a { font-weight: 700; }

#page-result footer p { color: var(--ink-soft) !important; }
#page-result footer .text-xs { color: var(--ink-light) !important; }

/* ============================================================
   ============ H5 多机型适配 · 安全区域 · 响应式增强 ============
   ============================================================ */

/* 安全区域适配（刘海屏 / 底部横条） */
@supports (padding: env(safe-area-inset-top)) {
    #page-intro { padding-top: calc(2.5rem + env(safe-area-inset-top)); }
    #page-quiz { padding-top: calc(2.5rem + env(safe-area-inset-top)); }
    #page-loading { padding-top: env(safe-area-inset-top); }
    #page-result { padding-top: calc(3rem + env(safe-area-inset-top)); }
    #page-intro,
    #page-quiz,
    #page-result { padding-bottom: calc(1.5rem + env(safe-area-inset-bottom)); }
    .sbti-actions { padding-bottom: env(safe-area-inset-bottom); }
}

/* 防止页面内容溢出 */
html {
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
}

/* 超小屏幕（≤ 360px，如 iPhone SE / 小尺寸安卓） */
@media (max-width: 360px) {
    #page-intro { padding: 0.8rem 0.8rem 1rem; }
    .intro-wrap { padding: 0.6rem 0; }
    .intro-main-title-oneline { font-size: 32px; gap: 0.12em; }
    .intro-main-title-oneline .intro-title-sep { font-size: 0.55em; }
    .intro-title-block { padding: 0 0.5rem; }
    .intro-title-block::before,
    .intro-title-block::after { display: none; }
    .intro-en-sub { font-size: 9.5px; }
    .intro-mid-area { padding: 6rem 0 2rem; }
    .intro-desc-card { padding: 1rem 1rem 1rem 1.2rem; margin-bottom: 1.5rem; }
    .intro-desc-p { font-size: 12.5px; line-height: 1.6; }
    .btn-enter-canyon { padding: 0.85rem 1.2rem; font-size: 14px; letter-spacing: 0.2em; min-width: auto; width: 100%; }
    .intro-note-block { padding: 0.7rem 0.8rem; }
    .intro-note { font-size: 10px; line-height: 1.7; }
    .intro-presented { font-size: 10.5px; }
    /* 超小屏几何装饰进一步缩小并远离边缘 */
    .deco-layer { opacity: 0.35; }
    .deco-geo { transform: scale(0.5); }

    /* 测试页 */
    #page-quiz { padding: 0.8rem 0.6rem 1rem; }
    .quiz-card { padding: 1.4rem 0.9rem; border-radius: 16px; }
    .q-text { font-size: 15px; line-height: 1.65; }
    .option-btn { padding: 0.8rem 0.8rem; min-height: 50px; gap: 0.65rem; }
    .option-btn .opt-letter { width: 1.7rem; height: 1.7rem; font-size: 11px; }
    .option-btn .opt-text { font-size: 13px; }
    .q-options-list { gap: 0.55rem; }
    .quiz-progress-num { font-size: 15px; }
    .quiz-prev-btn { font-size: 12px; padding: 0.4rem 0.8rem; }
    .quiz-tip { font-size: 10px; }

    /* 结果页 */
    #page-result { padding: 0.8rem 0.5rem 1.5rem; }
    .sbti-hero-card { padding: 1.2rem 0.8rem 1.2rem; border-radius: 16px; }
    .sbti-analysis-card { padding: 1.2rem 0.8rem; border-radius: 16px; }
    .sbti-avatar-inner { width: 150px; height: 150px; }
    .sbti-code.sbti-code-oneline .sbti-code-cn,
    .sbti-code.sbti-code-oneline .sbti-code-en { font-size: 22px; }
    .sbti-code.sbti-code-oneline .sbti-code-dot { font-size: 18px; }
    .sbti-hero-slogan { font-size: 16px; }
    .sbti-label { font-size: 11px; letter-spacing: 0.15em; }
    .sbti-section-title.main { font-size: 12px; }
    .behavior-text { font-size: 12px; }
    .teammate-text { font-size: 12.5px; }
    .teammate-label { font-size: 10px; }

    /* 搭档克星 - 超小屏单列 */
    .sbti-pair-row-compact { grid-template-columns: 1fr; gap: 0.6rem; }
    .sbti-pair-card-c { padding: 0.7rem 0.7rem 0.8rem; }
    .sbti-pair-mini-avatar { width: 38px; height: 38px; }
    .sbti-pair-mini-code { font-size: 12px; }
    .sbti-pair-mini-name { font-size: 11px; }
    .sbti-pair-badge { font-size: 11px; }
    .sbti-pair-reason-c { font-size: 10.5px; }

    /* 天平条 */
    .balance-bar-wrap { grid-template-columns: 52px 1fr 52px; gap: 0.3rem; }
    .balance-side-cn { font-size: 11px; }
    .balance-side-pct { font-size: 9.5px; }
    .balance-axis { font-size: 11px; }
    .balance-context { font-size: 9px; }
    .balance-row { padding: 0.5rem 0.5rem; }
    .balance-handle { width: 14px; height: 14px; border-width: 2px; }

    /* 图鉴 - 超小屏3列 */
    .sbti-gallery { grid-template-columns: repeat(3, 1fr); gap: 0.35rem; }
    .sbti-gallery-code, .sbti-gallery-name { font-size: 9px; }
    .sbti-gallery-rarity { font-size: 8px; }
    .gallery-toggle-btn { font-size: 12px; padding: 0.8rem 1rem; }
    .gallery-panel { padding: 0.6rem; }

    /* 操作按钮 */
    .sbti-actions { gap: 0.5rem; flex-direction: column; align-items: stretch; }
    .sbti-btn { width: 100%; text-align: center; padding: 0.75rem 1rem; font-size: 13px; }
    .sbti-btn.accent { padding: 0.85rem 1rem; font-size: 14px; }

    /* 加载页 */
    .loading-canyon { width: 90px; height: 90px; }
    .loading-title { font-size: 18px; letter-spacing: 0.12em; }
    .loading-subtitle { font-size: 12px; }

    /* 统计数字 */
    .stat-cell-num { font-size: 24px; }
    .stat-cell-unit { font-size: 12px; }
    .stat-cell-label { font-size: 10px; letter-spacing: 0.2em; }
}

/* 小屏幕（361px ~ 390px，如 iPhone 12 mini / iPhone 13 mini） */
@media (min-width: 361px) and (max-width: 390px) {
    .intro-main-title-oneline { font-size: 40px; }
    .intro-mid-area { padding: 7rem 0 2.5rem; }
    .intro-desc-p { font-size: 13px; }
    .btn-enter-canyon { width: 100%; min-width: auto; }
    .sbti-avatar-inner { width: 170px; height: 170px; }
    .sbti-code.sbti-code-oneline .sbti-code-cn,
    .sbti-code.sbti-code-oneline .sbti-code-en { font-size: 24px; }
    .sbti-hero-slogan { font-size: 17px; }
    .sbti-actions { flex-direction: column; align-items: stretch; }
    .sbti-btn { width: 100%; text-align: center; }
}

/* 中等手机屏幕（391px ~ 430px，如 iPhone 14/15 Pro / 大部分安卓） */
@media (min-width: 391px) and (max-width: 430px) {
    .intro-main-title-oneline { font-size: 44px; }
    .intro-mid-area { padding: 8rem 0 2.8rem; }
    .btn-enter-canyon { width: 100%; min-width: auto; }
    .sbti-actions { flex-direction: column; align-items: stretch; }
    .sbti-btn { width: 100%; text-align: center; }
}

/* 大手机屏幕（431px ~ 480px，如 iPhone 14 Plus / Pro Max） */
@media (min-width: 431px) and (max-width: 480px) {
    .intro-main-title-oneline { font-size: 48px; }
    .btn-enter-canyon { min-width: 280px; }
}

/* 横屏手机适配 */
@media (max-height: 500px) and (orientation: landscape) {
    .intro-wrap { min-height: auto; padding: 0.5rem 0; }
    .intro-mid-area { padding: 2rem 0 1.5rem; }
    .intro-main-title-oneline { font-size: 32px; }
    .intro-desc-card { padding: 0.8rem 1rem 0.8rem 1.2rem; margin-bottom: 1rem; }
    .intro-desc-p { font-size: 12px; line-height: 1.5; }
    .btn-enter-canyon { padding: 0.7rem 1.5rem; }
    .loading-canyon { width: 70px; height: 70px; margin-bottom: 1rem; }
    .loading-title { font-size: 18px; }
    .quiz-card { padding: 1.2rem 1rem; }
    .q-options-list { gap: 0.5rem; }
    .option-btn { min-height: 44px; padding: 0.6rem 0.8rem; }
}

/* 平板适配（481px ~ 768px） */
@media (min-width: 481px) and (max-width: 768px) {
    .intro-main-title-oneline { font-size: 54px; }
    .sbti-result-wrap { max-width: 600px; }
    .sbti-pair-row-compact { gap: 0.75rem; }
    .sbti-gallery { grid-template-columns: repeat(4, 1fr); }
}

/* 触摸设备优化 - 增大点击区域 */
@media (hover: none) and (pointer: coarse) {
    .option-btn { min-height: 56px; }
    .quiz-prev-btn { min-height: 40px; min-width: 72px; }
    .btn-enter-canyon { min-height: 52px; }
    .sbti-btn { min-height: 48px; }
    .gallery-toggle-btn { min-height: 48px; }
}

/* 高分辨率屏幕优化 */
@media (-webkit-min-device-pixel-ratio: 3), (min-resolution: 3dppx) {
    .balance-track { height: 10px; }
    .balance-handle { border-width: 2.5px; }
    .quiz-progress-track { height: 3px; }
}

/* ============================================================
   ============ 分享引导浮层 ============
   ============================================================ */
.share-guide-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    animation: shareOverlayIn 0.25s ease;
}
.share-guide-overlay.fade-out {
    animation: shareOverlayOut 0.25s ease forwards;
}
@keyframes shareOverlayIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes shareOverlayOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

.share-guide-panel {
    width: 100%;
    max-width: 480px;
    background: #FDFCF7;
    border-radius: 20px 20px 0 0;
    padding: 0 0 env(safe-area-inset-bottom, 16px) 0;
    box-shadow: 0 -8px 40px rgba(0,0,0,0.15);
    animation: sharePanelSlideUp 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.share-guide-overlay.fade-out .share-guide-panel {
    animation: sharePanelSlideDown 0.25s ease forwards;
}
@keyframes sharePanelSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
@keyframes sharePanelSlideDown {
    from { transform: translateY(0); }
    to { transform: translateY(100%); }
}

.share-guide-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 12px;
    border-bottom: 1px solid rgba(62, 86, 65, 0.08);
}
.share-guide-title {
    font-size: 17px;
    font-weight: 700;
    color: #1A1A1A;
    letter-spacing: 0.02em;
}
.share-guide-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.06);
    color: #666;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.share-guide-close:hover {
    background: rgba(0,0,0,0.12);
}

.share-guide-content {
    padding: 16px 20px 20px;
}
.share-guide-tip {
    font-size: 13px;
    color: #8A8478;
    margin-bottom: 18px;
    text-align: center;
}

.share-guide-channels {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 20px;
}
.share-channel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s;
}
.share-channel:active {
    transform: scale(0.92);
}
.share-channel-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: #F4F1EA;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    transition: background 0.2s, box-shadow 0.2s;
}
.share-channel:hover .share-channel-icon {
    background: #EDE8DA;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.share-channel-name {
    font-size: 12px;
    color: #5A5A5A;
    font-weight: 500;
}

.share-guide-link-box {
    background: #F4F1EA;
    border-radius: 10px;
    padding: 4px;
}
.share-guide-link-input {
    width: 100%;
    border: none;
    background: transparent;
    font-size: 12px;
    color: #8A8478;
    padding: 10px 12px;
    outline: none;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    font-family: 'SF Mono', 'Menlo', monospace;
}

/* 分享浮层响应式 */
@media (min-width: 481px) {
    .share-guide-overlay {
        align-items: center;
    }
    .share-guide-panel {
        border-radius: 20px;
        max-width: 420px;
        padding-bottom: 20px;
    }
    @keyframes sharePanelSlideUp {
        from { transform: translateY(30px); opacity: 0; }
        to { transform: translateY(0); opacity: 1; }
    }
    @keyframes sharePanelSlideDown {
        from { transform: translateY(0); opacity: 1; }
        to { transform: translateY(30px); opacity: 0; }
    }
}

/* ============================================================
   ============ Tailwind 关键类备用定义（CDN 加载失败时兜底） ============
   ============================================================ */
.min-h-screen { min-height: 100vh; }
.hidden { display: none !important; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.text-center { text-align: center; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.relative { position: relative; }
.fixed { position: fixed; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.overflow-x-hidden { overflow-x: hidden; }
.pointer-events-none { pointer-events: none; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-16 { margin-top: 4rem; }
.pt-8 { padding-top: 2rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.max-w-5xl { max-width: 64rem; }
.z-0 { z-index: 0; }
.z-10 { z-index: 10; }

/* ============================================================
   ============ 装饰层点击穿透强化 ============
   ============================================================ */
.deco-layer,
.deco-layer *,
.deco-layer *::before,
.deco-layer *::after,
.deco-geo,
.deco-geo::before,
.deco-geo::after {
    pointer-events: none !important;
}

/* 确保按钮始终可点击 */
.btn-enter-canyon {
    position: relative;
    z-index: 100;
    pointer-events: auto !important;
}

#btn-start {
    position: relative;
    z-index: 100;
    pointer-events: auto !important;
}

/* ============================================================
   ============ 图片预览浮层（保存结果图） ============
   ============================================================ */
.img-preview-overlay {
    position: fixed;
    inset: 0;
    z-index: 3000;
    background: rgba(0, 0, 0, 0.72);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: imgOverlayIn 0.3s ease;
    padding: 16px;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}
.img-preview-overlay.fade-out {
    animation: imgOverlayOut 0.25s ease forwards;
}
@keyframes imgOverlayIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes imgOverlayOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

.img-preview-panel {
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    background: #FDFCF7;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: imgPanelIn 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    display: flex;
    flex-direction: column;
}
.img-preview-overlay.fade-out .img-preview-panel {
    animation: imgPanelOut 0.25s ease forwards;
}
@keyframes imgPanelIn {
    from { transform: scale(0.88) translateY(20px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}
@keyframes imgPanelOut {
    from { transform: scale(1); opacity: 1; }
    to { transform: scale(0.92); opacity: 0; }
}

.img-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 12px;
    border-bottom: 1px solid rgba(62, 86, 65, 0.08);
    flex-shrink: 0;
}
.img-preview-title {
    font-size: 17px;
    font-weight: 700;
    color: #1A1A1A;
    letter-spacing: 0.02em;
}
.img-preview-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.06);
    color: #666;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.img-preview-close:hover {
    background: rgba(0,0,0,0.12);
}

.img-preview-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}
.img-preview-img {
    width: 100%;
    max-width: 380px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    /* 确保移动端长按可以保存 */
    -webkit-touch-callout: default !important;
    -webkit-user-select: auto !important;
    user-select: auto !important;
}

.img-preview-footer {
    padding: 12px 20px 20px;
    text-align: center;
    flex-shrink: 0;
    border-top: 1px solid rgba(62, 86, 65, 0.06);
}
.img-preview-tip {
    font-size: 15px;
    font-weight: 600;
    color: #3E5641;
    margin: 0;
    padding: 10px 0;
    letter-spacing: 0.02em;
}
.img-preview-download {
    display: inline-block;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    letter-spacing: 0.03em;
    transition: transform 0.2s, box-shadow 0.2s;
}
.img-preview-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(62, 142, 112, 0.25);
}

@media (max-width: 480px) {
    .img-preview-panel {
        max-width: 100%;
        max-height: 92vh;
        border-radius: 16px;
    }
    .img-preview-body {
        padding: 12px;
    }
}