:root {
    --bg-cream: #FFFDF5;
    --bg-warm: #FFF6E0;
    --bg-card: #FFFFFF;
    --border-cartoon: #E2D9C5;
    --border-dark: #3D342B;
    --primary: #FF7A30;
    --primary-shadow: #D95B16;
    --secondary: #22B8CF;
    --secondary-shadow: #128FA3;
    --accent-green: #40C057;
    --accent-green-shadow: #2B933E;
    --accent-yellow: #FCC419;
    --accent-pink: #FF6B8B;
    --accent-purple: #845EF7;
    --text-main: #2C2520;
    --text-sub: #5C5248;
    --text-muted: #8C8074;
    --radius-xl: 26px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --shadow-card: 0 6px 0 #E5DEC9, 0 10px 24px rgba(120, 90, 40, 0.08);
    --shadow-card-hover: 0 10px 0 #FFD8A8, 0 16px 32px rgba(255, 122, 48, 0.16);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Rounded Mplus 1c", -apple-system, sans-serif;
    background-color: var(--bg-cream);
    background-image:
        radial-gradient(circle at 10% 15%, rgba(255, 216, 117, 0.35) 0%, transparent 35%),
        radial-gradient(circle at 90% 12%, rgba(132, 233, 255, 0.32) 0%, transparent 35%),
        radial-gradient(circle at 50% 88%, rgba(255, 175, 197, 0.25) 0%, transparent 40%);
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    line-height: 1.65;
    font-size: 16px;
    overflow-x: hidden;
}

#bg-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.app-shell {
    position: relative;
    z-index: 1;
    max-width: 1160px;
    margin: 0 auto;
    padding: 18px 18px 80px;
}

/* ==================== 顶部欢乐导航栏 ==================== */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: #FFFFFF;
    border: 3px solid var(--border-cartoon);
    border-radius: var(--radius-xl);
    padding: 14px 22px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-card);
    position: sticky;
    top: 12px;
    z-index: 50;
}

.brand-area {
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
}

.brand-logo {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    background: linear-gradient(135deg, #FF922B, #FCC419);
    border: 3px solid #FFF;
    box-shadow: 0 4px 0 #E67700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.brand-title {
    font-size: 22px;
    font-weight: 900;
    color: var(--text-main);
    letter-spacing: 0.3px;
}

.brand-sub {
    font-size: 13.5px;
    color: var(--text-sub);
    font-weight: 600;
}

.player-stats {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.xp-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #FFF9DB;
    border: 2px solid #FFE066;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 14px;
    font-weight: 700;
    color: #5C4813;
}

.lv-badge {
    background: linear-gradient(135deg, #FF922B, #FF6B6B);
    color: #FFFFFF;
    font-weight: 900;
    font-size: 12.5px;
    padding: 3px 10px;
    border-radius: 999px;
}

.xp-bar-mini {
    width: 76px;
    height: 10px;
    background: #FFE8CC;
    border-radius: 99px;
    overflow: hidden;
    border: 1px solid #FFC078;
}

.xp-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #40C057, #82C91E);
    border-radius: 99px;
    transition: width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* 卡通立体按钮 */
.icon-btn {
    background: #FFFFFF;
    border: 2.5px solid #D8CEBE;
    box-shadow: 0 4px 0 #D8CEBE;
    color: var(--text-main);
    border-radius: 14px;
    padding: 9px 15px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
    text-decoration: none;
}

.icon-btn:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    box-shadow: 0 6px 0 #FFD8A8;
    background: #FFFDF9;
}

.icon-btn:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 #D8CEBE;
}

.icon-btn.primary-btn {
    background: linear-gradient(180deg, #FF8A3D 0%, #FF6B1A 100%);
    border-color: #D9530F;
    box-shadow: 0 4px 0 #C24608;
    color: #FFFFFF;
}

.icon-btn.primary-btn:hover {
    filter: brightness(1.05);
    box-shadow: 0 6px 0 #C24608;
}

.icon-btn.green-btn {
    background: linear-gradient(180deg, #51CF66 0%, #37B24D 100%);
    border-color: #2B8A3E;
    box-shadow: 0 4px 0 #237032;
    color: #FFFFFF;
}

/* ==================== 阳光欢迎横幅与快乐徽章墙 ==================== */
.hero-banner {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 22px;
    margin-bottom: 28px;
}

.hero-main {
    background: linear-gradient(135deg, #FFF3BF 0%, #FFE3E3 55%, #E3FAFC 100%);
    border: 3px solid #FFD8A8;
    border-radius: var(--radius-xl);
    padding: 28px 30px;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: flex-start;
    font-size: 13.5px;
    font-weight: 800;
    color: #D9480F;
    background: #FFFFFF;
    border: 2px solid #FFA94D;
    padding: 5px 14px;
    border-radius: 999px;
    margin-bottom: 14px;
    box-shadow: 0 3px 0 #FFD8A8;
}

.hero-main h1 {
    font-size: 30px;
    line-height: 1.3;
    margin-bottom: 10px;
    font-weight: 900;
    color: #2C2520;
}

.hero-main p {
    color: #4A3F35;
    font-size: 15.5px;
    margin-bottom: 18px;
    font-weight: 500;
}

.hero-features {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.feature-chip {
    font-size: 13px;
    font-weight: 800;
    color: #3B3026;
    background: rgba(255, 255, 255, 0.88);
    border: 2px solid #E9DAC1;
    padding: 6px 12px;
    border-radius: 12px;
}

/* 快乐纪念册（徽章墙） */
.soul-passport {
    background: #FFFFFF;
    border: 3px solid var(--border-cartoon);
    border-radius: var(--radius-xl);
    padding: 22px 24px;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.passport-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 6px;
}

.passport-title {
    font-size: 16.5px;
    font-weight: 900;
    color: var(--text-main);
}

.storage-status {
    font-size: 12px;
    font-weight: 800;
    color: #2B8A3E;
    background: #EBFBEE;
    border: 2px solid #8CE99A;
    padding: 3px 10px;
    border-radius: 99px;
}

.badge-slots {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.badge-slot {
    background: #F8F9FA;
    border: 2px dashed #CED4DA;
    border-radius: 14px;
    padding: 10px 6px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.badge-slot.unlocked {
    background: linear-gradient(145deg, #FFF9DB, #E6FCF5);
    border: 2.5px solid #40C057;
    box-shadow: 0 4px 0 #B2F2BB;
}

.badge-slot:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
}

.badge-slot-icon {
    font-size: 24px;
    display: block;
    margin-bottom: 3px;
}

.badge-slot-code {
    font-size: 12px;
    font-weight: 800;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.badge-slot.locked .badge-slot-icon {
    filter: grayscale(0.85);
    opacity: 0.45;
}

.badge-slot.locked .badge-slot-code {
    color: var(--text-muted);
}

.passport-footer {
    display: flex;
    gap: 10px;
}

.passport-footer .icon-btn {
    flex: 1;
    justify-content: center;
}

/* ==================== 分类筛选标签 ==================== */
.section-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-tab {
    background: #FFFFFF;
    border: 2.5px solid #E2D9C5;
    box-shadow: 0 3px 0 #E2D9C5;
    color: var(--text-sub);
    padding: 9px 18px;
    border-radius: 999px;
    font-size: 14.5px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.18s;
}

.filter-tab.active, .filter-tab:hover {
    background: var(--primary);
    color: #FFFFFF;
    border-color: #D9530F;
    box-shadow: 0 4px 0 #C24608;
    transform: translateY(-2px);
}

/* ==================== 8大卡通测试卡片网格 ==================== */
.tests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 22px;
}

.test-card {
    background: #FFFFFF;
    border: 3px solid #E5DEC9;
    border-radius: var(--radius-xl);
    padding: 24px 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.22s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow-card);
}

.test-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: var(--card-gradient, linear-gradient(90deg, #FF922B, #FCC419));
}

.test-card:hover {
    transform: translateY(-6px);
    border-color: #FFA94D;
    box-shadow: var(--shadow-card-hover);
}

.test-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 14px;
}

.test-icon-wrap {
    width: 60px;
    height: 60px;
    border-radius: 20px;
    background: #FFF9DB;
    border: 2.5px solid #FFE066;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    box-shadow: 0 4px 0 #FFE066;
}

.test-status-pill {
    font-size: 12.5px;
    font-weight: 800;
    padding: 5px 12px;
    border-radius: 99px;
}

.pill-done {
    background: #EBFBEE;
    color: #2B8A3E;
    border: 2px solid #8CE99A;
}

.pill-progress {
    background: #FFF4E6;
    color: #D9480F;
    border: 2px solid #FFC078;
}

.pill-new {
    background: #F1F3F5;
    color: #495057;
    border: 2px solid #DEE2E6;
}

.test-school-tag {
    font-size: 12.5px;
    color: #E67700;
    font-weight: 800;
    margin-bottom: 4px;
}

.test-card h3 {
    font-size: 20px;
    font-weight: 900;
    margin-bottom: 6px;
    color: var(--text-main);
}

.test-quest-name {
    font-size: 13.5px;
    color: #1098AD;
    margin-bottom: 10px;
    font-weight: 800;
}

.test-desc {
    font-size: 14.5px;
    color: var(--text-sub);
    margin-bottom: 16px;
    line-height: 1.6;
}

.test-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    padding-top: 12px;
    border-top: 2px dashed #EFE8D8;
}

.saved-result-preview {
    margin-bottom: 12px;
    padding: 10px 14px;
    background: #EBFBEE;
    border: 2px solid #69DB7C;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.saved-result-code {
    font-weight: 900;
    font-size: 15px;
    color: #2B8A3E;
}

.saved-result-title {
    font-size: 13px;
    font-weight: 700;
    color: #37B24D;
}

.card-btn-group {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}

.card-btn {
    flex: 1;
    padding: 11px 12px;
    border-radius: 14px;
    border: 2.5px solid #D8CEBE;
    box-shadow: 0 4px 0 #D8CEBE;
    background: #FFFFFF;
    color: var(--text-main);
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
}

.card-btn.start {
    background: linear-gradient(180deg, #FF922B 0%, #F76707 100%);
    border-color: #D9480F;
    box-shadow: 0 4px 0 #C2410C;
    color: #FFFFFF;
}

.card-btn:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

/* ==================== 模式选择弹窗（快速 CAT vs 专业完整版） ==================== */
.mode-cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin: 20px 0;
}

.mode-select-card {
    background: #FFFDF9;
    border: 3px solid #E5DEC9;
    border-radius: 22px;
    padding: 24px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 5px 0 #E5DEC9;
}

.mode-select-card:hover {
    transform: translateY(-4px);
    border-color: #FF922B;
    box-shadow: 0 8px 0 #FFD8A8;
    background: #FFF9EB;
}

.mode-select-card.pro-mode:hover {
    border-color: #22B8CF;
    box-shadow: 0 8px 0 #99E9F2;
    background: #F3FAFC;
}

.mode-badge {
    display: inline-block;
    align-self: flex-start;
    padding: 4px 12px;
    border-radius: 99px;
    font-size: 12.5px;
    font-weight: 900;
    margin-bottom: 10px;
}

/* ==================== 游戏化闯关舞台 ==================== */
.stage-view {
    display: none;
    max-width: 820px;
    margin: 0 auto;
    animation: fadeUp 0.28s ease;
}

.stage-view.active {
    display: block;
}

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

.quest-hud {
    background: #FFFFFF;
    border: 3px solid var(--border-cartoon);
    border-radius: var(--radius-lg);
    padding: 16px 22px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-card);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.hud-progress-wrap {
    flex: 1;
    min-width: 220px;
}

.hud-top-row {
    display: flex;
    justify-content: space-between;
    font-size: 15px;
    margin-bottom: 8px;
    font-weight: 900;
    color: var(--text-main);
}

.hud-progress-track {
    height: 16px;
    background: #F1F3F5;
    border: 2px solid #DEE2E6;
    border-radius: 99px;
    overflow: hidden;
}

.hud-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #51CF66, #FCC419, #FF922B);
    border-radius: 99px;
    transition: width 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.combo-badge {
    background: linear-gradient(135deg, #FF6B6B, #FF922B);
    color: #FFFFFF;
    padding: 7px 16px;
    border-radius: 999px;
    font-weight: 900;
    font-size: 14px;
    box-shadow: 0 4px 0 #C92A2A;
    transition: transform 0.2s;
    white-space: nowrap;
}

.combo-badge.pop {
    transform: scale(1.16);
}

/* CAT 动态追问横幅 */
.cat-bonus-alert {
    background: linear-gradient(90deg, #FFF9DB, #E3FAFC);
    border: 2.5px solid #FCC419;
    border-radius: 16px;
    padding: 12px 18px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14.5px;
    font-weight: 800;
    color: #B45309;
    box-shadow: 0 4px 0 #FFE066;
}

/* 题目主卡片（大字号适老友好） */
.quest-card {
    background: #FFFFFF;
    border: 3px solid var(--border-cartoon);
    border-radius: var(--radius-xl);
    padding: 32px 30px;
    box-shadow: var(--shadow-card);
    position: relative;
}

.scene-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 8px;
}

.scene-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 99px;
    font-size: 13.5px;
    font-weight: 900;
    background: #E3FAFC;
    color: #0B7285;
    border: 2px solid #99E9F2;
}

.interaction-type-hint {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-muted);
}

.scene-emoji-banner {
    font-size: 52px;
    margin-bottom: 10px;
    display: inline-block;
}

.question-title {
    font-size: 23px;
    font-weight: 900;
    line-height: 1.45;
    margin-bottom: 10px;
    color: #1F1A16;
}

.question-lore {
    font-size: 15.5px;
    color: var(--text-sub);
    margin-bottom: 24px;
    font-weight: 600;
}

/* 题型1：大按钮选项列表 (choice & likert) */
.options-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.option-card {
    background: #FFFDF9;
    border: 2.5px solid #E2D9C5;
    box-shadow: 0 4px 0 #E2D9C5;
    border-radius: 18px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: all 0.16s ease;
    text-align: left;
    color: var(--text-main);
    width: 100%;
}

.option-card:hover {
    background: #FFF9DB;
    border-color: #FF922B;
    box-shadow: 0 5px 0 #FFC078;
    transform: translateY(-2px);
}

.option-card.selected {
    background: #EBFBEE;
    border-color: #40C057;
    box-shadow: 0 5px 0 #8CE99A;
}

.option-key {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: #FFF3BF;
    border: 2px solid #FCC419;
    color: #B45309;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 16px;
    flex-shrink: 0;
}

.option-emoji {
    font-size: 28px;
    flex-shrink: 0;
}

.option-text {
    font-size: 17px;
    font-weight: 800;
    flex: 1;
    line-height: 1.45;
}

/* 官方标准 5 级量表横排/大按钮 */
.likert-scale-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-top: 8px;
}

.likert-btn {
    background: #FFFDF9;
    border: 2.5px solid #E2D9C5;
    box-shadow: 0 4px 0 #E2D9C5;
    border-radius: 18px;
    padding: 18px 10px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: all 0.16s;
}

.likert-btn:hover {
    transform: translateY(-3px);
    border-color: #FF922B;
    background: #FFF9DB;
}

.likert-btn.selected {
    background: #EBFBEE;
    border-color: #40C057;
    box-shadow: 0 4px 0 #69DB7C;
}

.likert-emoji {
    font-size: 32px;
}

.likert-label {
    font-size: 15px;
    font-weight: 900;
    color: var(--text-main);
    text-align: center;
}

/* 题型2：二选一欢乐大卡片 (duel) */
.duel-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.duel-card {
    background: #FFFDF9;
    border: 3px solid #E2D9C5;
    box-shadow: 0 6px 0 #E2D9C5;
    border-radius: 22px;
    padding: 28px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.duel-card:hover {
    transform: translateY(-5px);
    border-color: #FF922B;
    background: #FFF9DB;
    box-shadow: 0 8px 0 #FFD8A8;
}

.duel-card.selected {
    background: #EBFBEE;
    border-color: #40C057;
    box-shadow: 0 8px 0 #8CE99A;
}

.duel-icon {
    font-size: 52px;
}

.duel-title {
    font-size: 18px;
    font-weight: 900;
    color: var(--text-main);
}

.duel-desc {
    font-size: 14.5px;
    color: var(--text-sub);
    font-weight: 600;
}

/* 题型3：拔河天平滑块 (slider) */
.spectrum-box {
    background: #FFF9EB;
    border: 2.5px solid #FFE066;
    border-radius: 22px;
    padding: 24px;
}

.spectrum-poles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.pole-card {
    background: #FFFFFF;
    border: 2.5px solid #E5DEC9;
    border-radius: 16px;
    padding: 16px;
    transition: all 0.2s;
}

.pole-card.active-pole {
    border-color: #FF922B;
    background: #FFF3BF;
    box-shadow: 0 4px 0 #FFD8A8;
}

.pole-title {
    font-weight: 900;
    font-size: 17px;
    margin-bottom: 6px;
    color: var(--text-main);
}

.pole-sub {
    font-size: 14px;
    color: var(--text-sub);
    font-weight: 600;
}

.energy-slider {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 16px;
    border-radius: 99px;
    background: linear-gradient(90deg, #FF922B, #FCC419, #22B8CF);
    border: 2px solid #D9480F;
    outline: none;
    margin-bottom: 16px;
}

.energy-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #FFFFFF;
    border: 5px solid #FF7A30;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    cursor: grab;
}

.spectrum-quick-steps {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.step-Dot-btn {
    flex: 1;
    min-width: 110px;
    padding: 10px 8px;
    font-size: 14px;
    border-radius: 12px;
    border: 2px solid #E2D9C5;
    box-shadow: 0 3px 0 #E2D9C5;
    background: #FFFFFF;
    color: var(--text-main);
    cursor: pointer;
    font-weight: 800;
}

.step-Dot-btn:hover, .step-Dot-btn.active {
    background: var(--primary);
    color: #FFFFFF;
    border-color: #D9480F;
    box-shadow: 0 3px 0 #C24608;
}

/* 题型4：特点气泡多选 (multi) */
.alchemy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.rune-bubble {
    background: #FFFDF9;
    border: 2.5px solid #E2D9C5;
    box-shadow: 0 4px 0 #E2D9C5;
    border-radius: 18px;
    padding: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.16s;
}

.rune-bubble:hover {
    border-color: #FF922B;
    background: #FFF9DB;
    transform: translateY(-2px);
}

.rune-bubble.selected {
    background: #EBFBEE;
    border-color: #40C057;
    box-shadow: 0 4px 0 #69DB7C;
}

.quest-footer-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 26px;
    padding-top: 18px;
    border-top: 2px dashed #E9DAC1;
    flex-wrap: wrap;
    gap: 10px;
}

/* ==================== 结果报告舱 ==================== */
.result-view {
    display: none;
    animation: fadeUp 0.35s ease;
}

.result-view.active {
    display: block;
}

.result-hero-card {
    background: linear-gradient(135deg, #FFF9DB 0%, #FFFFFF 55%, #E6FCF5 100%);
    border: 3px solid #FFD8A8;
    border-radius: var(--radius-xl);
    padding: 34px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-card);
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    gap: 28px;
    align-items: center;
}

.archetype-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 99px;
    background: #FFF3BF;
    border: 2px solid #FCC419;
    font-size: 13.5px;
    font-weight: 900;
    color: #D9480F;
    margin-bottom: 12px;
}

.result-code-big {
    font-size: 42px;
    font-weight: 900;
    line-height: 1.15;
    color: #D9480F;
    margin-bottom: 6px;
}

.result-role-title {
    font-size: 24px;
    font-weight: 900;
    color: #2C2520;
    margin-bottom: 12px;
}

.result-quote {
    font-size: 16px;
    font-weight: 700;
    color: #4A3F35;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.8);
    border-left: 5px solid var(--primary);
    border-radius: 10px;
    margin-bottom: 18px;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.trait-tag {
    background: #FFFFFF;
    border: 2px solid #FFA94D;
    color: #D9480F;
    padding: 5px 14px;
    border-radius: 99px;
    font-size: 13.5px;
    font-weight: 800;
    box-shadow: 0 2px 0 #FFD8A8;
}

.visual-chart-box {
    background: #FFFFFF;
    border: 3px solid #E5DEC9;
    border-radius: 22px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.03);
}

.analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 22px;
    margin-bottom: 24px;
}

.panel-card {
    background: #FFFFFF;
    border: 3px solid var(--border-cartoon);
    border-radius: var(--radius-xl);
    padding: 26px;
    box-shadow: var(--shadow-card);
}

.panel-card h3 {
    font-size: 19px;
    font-weight: 900;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-main);
}

.dim-bar-item {
    margin-bottom: 16px;
}

.dim-bar-labels {
    display: flex;
    justify-content: space-between;
    font-size: 14.5px;
    font-weight: 800;
    margin-bottom: 6px;
    color: var(--text-main);
}

.dim-bar-track {
    height: 14px;
    background: #F1F3F5;
    border: 2px solid #DEE2E6;
    border-radius: 99px;
    overflow: hidden;
}

.dim-bar-fill {
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, #FF922B, #51CF66);
}

.insight-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.insight-list li {
    background: #FFFDF7;
    border: 2px solid #EFE8D8;
    border-radius: 14px;
    padding: 14px 16px;
    font-size: 15px;
    font-weight: 700;
    color: #3B322B;
    border-left: 5px solid #40C057;
}

.export-dock {
    background: #FFF9DB;
    border: 3px solid #FCC419;
    border-radius: var(--radius-xl);
    padding: 22px 26px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-card);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.export-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.qa-review-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    font-size: 14.5px;
}

.qa-review-table th, .qa-review-table td {
    padding: 14px;
    text-align: left;
    border-bottom: 2px solid #F1ECE1;
}

.qa-review-table th {
    color: var(--text-main);
    font-weight: 900;
    background: #FFF9EB;
}

/* 模态框与轻提示 */
.modal-mask {
    position: fixed;
    inset: 0;
    background: rgba(44, 37, 32, 0.55);
    backdrop-filter: blur(6px);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.modal-mask.open {
    display: flex;
}

.modal-box {
    background: #FFFFFF;
    border: 4px solid #FFD8A8;
    border-radius: var(--radius-xl);
    max-width: 720px;
    width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    padding: 28px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.toast-pop {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: #2C2520;
    border: 3px solid #FCC419;
    color: #FFFFFF;
    padding: 14px 24px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 800;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    z-index: 300;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

.toast-pop.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

@media (max-width: 820px) {
    .hero-banner, .result-hero-card, .mode-cards-grid, .duel-grid {
        grid-template-columns: 1fr;
    }
    .likert-scale-grid {
        grid-template-columns: 1fr;
    }
    .likert-btn {
        flex-direction: row;
        padding: 14px 18px;
    }
    .topbar {
        flex-direction: column;
        align-items: stretch;
    }
    .quest-card {
        padding: 22px 18px;
    }
    .question-title {
        font-size: 20px;
    }
}
