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

body {
    font-family: 'Comic Sans MS', 'PingFang SC', 'Arial Rounded MT Bold', sans-serif;
    background: linear-gradient(180deg, #FFF5E6 0%, #FFE4EC 50%, #E8F4FF 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* 屏幕管理 */
.screen {
    display: none;
    min-height: 100vh;
    padding: 20px;
}

.screen.active {
    display: block;
}

.mascot {
    font-size: 8rem;
    animation: bounce 2s infinite;
    margin-bottom: 20px;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.big-btn {
    padding: 25px 60px;
    font-size: 2rem;
    border: none;
    border-radius: 50px;
    background: linear-gradient(135deg, #FF6B9D, #FF8E53);
    color: white;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(255,107,157,0.4);
    transition: all 0.3s;
}

.big-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(255,107,157,0.5);
}

.big-btn:active {
    transform: scale(0.95);
}

/* 主页 */
header {
    text-align: center;
    padding: 20px 0;
}

.mascot-small {
    font-size: 4rem;
    margin-bottom: 10px;
}

header h1 {
    font-size: 2rem;
    color: #FF6B9D;
}

/* 分类网格 */
.category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 20px 0;
}

.category-card {
    background: white;
    border-radius: 25px;
    padding: 25px 15px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transition: all 0.3s;
    border: 4px solid transparent;
}

.category-card:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: #FF6B9D;
}

.category-card:active {
    transform: scale(0.95);
}

.cat-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 10px;
}

.cat-name {
    font-size: 1.5rem;
    color: #333;
    display: block;
    font-weight: bold;
}

.cat-en {
    font-size: 1rem;
    color: #999;
}

/* 游戏区域 */
.games-section {
    margin-top: 30px;
}

.games-section h2 {
    text-align: center;
    font-size: 1.8rem;
    color: #9B59B6;
    margin-bottom: 20px;
}

.game-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.game-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 25px;
    padding: 25px;
    color: white;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(102,126,234,0.3);
    transition: all 0.3s;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(102,126,234,0.4);
}

.game-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 10px;
}

.game-name {
    font-size: 1.3rem;
}

/* 学习页面 */
.learn-header, .game-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 0;
}

.back-btn {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: #FFE4EC;
    font-size: 1.5rem;
    cursor: pointer;
    color: #FF6B9D;
}

.learn-header h2, .game-header h2 {
    font-size: 1.8rem;
    color: #FF6B9D;
}

/* 轮播 */
.carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    gap: 20px;
    padding: 20px 0;
    scrollbar-width: none;
}

.carousel::-webkit-scrollbar {
    display: none;
}

.word-card {
    flex: 0 0 85%;
    scroll-snap-align: center;
    background: white;
    border-radius: 40px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    margin: 0 auto;
}

.word-emoji {
    font-size: 8rem;
    margin-bottom: 20px;
    animation: wiggle 2s infinite;
}

@keyframes wiggle {
    0%, 100% { transform: rotate(-3deg); }
    50% { transform: rotate(3deg); }
}

.word-en {
    font-size: 3rem;
    color: #FF6B9D;
    font-weight: bold;
    margin-bottom: 10px;
}

.word-zh {
    font-size: 2rem;
    color: #666;
    margin-bottom: 30px;
}

.speak-btn {
    width: 100px;
    height: 100px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF6B9D, #FF8E53);
    font-size: 3rem;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(255,107,157,0.4);
    transition: all 0.3s;
}

.speak-btn:hover {
    transform: scale(1.1);
}

.speak-btn:active {
    transform: scale(0.9);
}

/* 轮播控制 */
.carousel-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
}

.arrow-btn {
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 50%;
    background: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.dots {
    display: flex;
    gap: 10px;
}

.dot {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #DDD;
    cursor: pointer;
    transition: all 0.3s;
}

.dot.active {
    background: #FF6B9D;
    transform: scale(1.3);
}

/* 游戏容器 */
.game-container {
    background: white;
    border-radius: 30px;
    padding: 30px;
    margin-top: 20px;
    min-height: 400px;
}

/* 找一找游戏 */
.find-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.find-item {
    aspect-ratio: 1;
    background: #F5F5F5;
    border: 4px solid transparent;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    cursor: pointer;
    transition: all 0.3s;
}

.find-item:hover {
    background: #FFE4EC;
    transform: scale(1.05);
}

.find-item.found {
    background: #90EE90;
    border-color: #32CD32;
    animation: foundAnim 0.5s;
}

@keyframes foundAnim {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.find-target {
    text-align: center;
    margin-bottom: 30px;
}

.find-target h3 {
    font-size: 1.5rem;
    color: #666;
    margin-bottom: 15px;
}

.find-target .target-emoji {
    font-size: 5rem;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* 连一连游戏 */
.match-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.match-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.match-item {
    width: 100px;
    height: 100px;
    background: white;
    border: 4px solid #DDD;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    cursor: pointer;
    transition: all 0.3s;
}

.match-item:hover {
    border-color: #FF6B9D;
    transform: scale(1.05);
}

.match-item.selected {
    border-color: #667eea;
    background: #E8F4FF;
}

.match-item.matched {
    border-color: #32CD32;
    background: #90EE90;
    pointer-events: none;
}

/* 描一描游戏 */
.trace-area {
    text-align: center;
}

.trace-letter {
    font-size: 12rem;
    font-weight: bold;
    color: #FFE4EC;
    -webkit-text-stroke: 3px #FF6B9D;
    margin: 20px 0;
}

.trace-instruction {
    font-size: 1.3rem;
    color: #666;
    margin-bottom: 20px;
}

/* 手指描红画布 */
.trace-canvas-wrap {
    display: flex;
    justify-content: center;
    margin: 0 auto 16px;
}

#trace-canvas, #lesson-trace-canvas {
    width: 320px;
    height: 320px;
    max-width: 90vw;
    max-height: 90vw;
    background: white;
    border: 4px solid #FFE4EC;
    border-radius: 28px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
    cursor: pointer;
}

#lesson-trace-canvas {
    width: 280px;
    height: 280px;
}

.trace-hint {
    font-size: 1.4rem;
    color: #FF6B9D;
    margin-bottom: 16px;
    min-height: 1.6em;
}

.trace-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.trace-btn {
    padding: 14px 22px;
    font-size: 1.3rem;
    border: none;
    border-radius: 999px;
    background: #FFE4EC;
    color: #FF6B9D;
    cursor: pointer;
    font-weight: bold;
}

.trace-btn:active {
    transform: scale(0.95);
}

.trace-done-btn {
    padding: 18px 36px;
    font-size: 1.6rem;
}

/* 奖励弹窗 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.reward-content {
    background: white;
    border-radius: 40px;
    padding: 50px;
    text-align: center;
    animation: popIn 0.5s;
}

@keyframes popIn {
    from { transform: scale(0); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.stars {
    font-size: 3rem;
    margin-bottom: 20px;
}

.reward-emoji {
    font-size: 6rem;
    margin-bottom: 20px;
}

.reward-content h3 {
    font-size: 2.5rem;
    color: #FF6B9D;
    margin-bottom: 10px;
}

.reward-content p {
    font-size: 1.5rem;
    color: #666;
    margin-bottom: 30px;
}

/* 进度条 */
.progress-bar {
    width: 100%;
    height: 20px;
    background: #EEE;
    border-radius: 10px;
    overflow: hidden;
    margin: 20px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #FF6B9D, #FF8E53);
    border-radius: 10px;
    transition: width 0.5s;
}

/* 响应式 */
@media (min-width: 768px) {
    .category-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .game-buttons {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .word-card {
        flex: 0 0 60%;
    }
}

/* ============ 注册 / 登录 / 年龄档 / 今日一课（2-18 架构） ============ */
.auth-content {
    max-width: 420px;
    margin: 0 auto;
    padding: 30px 20px;
    text-align: center;
}
.auth-tabs { display: flex; gap: 10px; justify-content: center; margin: 20px 0; }
.auth-tab {
    padding: 12px 30px; border: none; border-radius: 999px;
    background: #FFE4EC; color: #FF6B9D; font-size: 1.2rem; cursor: pointer; font-weight: bold;
}
.auth-tab.active { background: linear-gradient(135deg, #FF6B9D, #FF8E53); color: white; }
.auth-input {
    width: 100%; padding: 16px 20px; margin-bottom: 12px;
    border: 2px solid #FFE4EC; border-radius: 16px; font-size: 1.2rem; outline: none; background: white;
}
.auth-input:focus { border-color: #FF6B9D; }
.password-wrap { position: relative; width: 100%; margin-bottom: 12px; }
.password-wrap .password-input { margin-bottom: 0; padding-right: 52px; }
.password-toggle {
    position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
    width: 38px; height: 38px; border: none; border-radius: 50%;
    background: #FFE4EC; font-size: 1.2rem; cursor: pointer; line-height: 1;
}
.password-toggle:active { transform: translateY(-50%) scale(0.92); }
.auth-error { color: #E74C3C; min-height: 1.5em; margin: 6px 0; font-size: 1rem; }
.auth-submit { width: 100%; padding: 18px; font-size: 1.5rem; }
.auth-note { color: #999; font-size: 0.9rem; margin-top: 12px; }
.link-btn { background: none; border: none; color: #667eea; font-size: 1.1rem; cursor: pointer; margin-top: 14px; text-decoration: underline; }

.user-bar {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    background: white; border-radius: 16px; padding: 10px 14px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.06); font-size: 1rem; color: #333;
}
.star-badge {
    background: #FFF3CD; color: #B7791F; padding: 6px 14px; border-radius: 999px; font-weight: bold;
}
.mini-btn {
    padding: 8px 14px; border: none; border-radius: 999px; background: #FFE4EC; color: #FF6B9D; cursor: pointer; font-weight: bold;
}
.sub-title { color: #999; font-size: 1.1rem; margin-top: 6px; }
.lesson-entry {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    background: linear-gradient(135deg, #FF6B9D, #FF8E53); color: white;
    border-radius: 24px; padding: 18px; margin: 16px 0;
}
.lesson-entry-title { font-size: 1.4rem; font-weight: bold; }
.lesson-entry-desc { font-size: 1rem; opacity: 0.95; margin-top: 4px; }
.lesson-btn { padding: 14px 22px; font-size: 1.2rem; background: white; color: #FF6B9D; box-shadow: none; }
.age-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 18px 0; }
.age-card {
    background: white; border-radius: 20px; padding: 18px; cursor: pointer;
    border: 3px solid transparent; box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}
.age-card.selected { border-color: #FF6B9D; }
.age-card-title { font-weight: bold; font-size: 1.2rem; color: #333; }
.age-card-vocab { color: #FF6B9D; font-weight: bold; margin: 6px 0; }
.age-card-desc { color: #888; font-size: 0.95rem; }
.age-card-check { margin-top: 8px; color: #667eea; font-weight: bold; }
.unit-grid { display: grid; gap: 12px; margin: 16px 0; }
.unit-card { background: white; border-radius: 20px; padding: 16px; cursor: pointer; box-shadow: 0 6px 18px rgba(0,0,0,0.08); border: 3px solid transparent; }
.unit-card:hover { border-color: #FF6B9D; }
.unit-title { font-weight: bold; font-size: 1.2rem; }
.unit-words { color: #666; margin: 6px 0; }
.unit-meta { color: #999; font-size: 0.95rem; }
/* ============ IXL 层：技能目标 / 掌握状态 / 家长摘要 / 定位 / 下一步 ============ */
.unit-goal { color: #667eea; font-size: 0.95rem; margin: 6px 0; line-height: 1.5; }
.mastery-badge { display: inline-block; font-size: 0.85rem; font-weight: bold; padding: 2px 8px; border-radius: 10px; margin-left: 6px; }
.mastery-badge.practicing { background: #E0ECFF; color: #3366CC; }
.mastery-badge.mastered { background: #D9F5E3; color: #1E7E46; }
.mastery-badge.review { background: #FFF0D6; color: #B26A00; }
.parent-summary { background: #FFF8E1; border-radius: 20px; padding: 16px; margin: 16px 0; box-shadow: 0 6px 18px rgba(0,0,0,0.06); }
.parent-summary h2 { font-size: 1.3rem; color: #333; margin-bottom: 8px; }
.parent-summary p { font-size: 1.05rem; color: #444; line-height: 1.7; margin: 4px 0; }
.parent-note { color: #888; }
.parent-review-btn { margin: 4px 6px 4px 0; }
.grammar-explain-box { background: #FFF8E1; border-left: 4px solid #FFB300; border-radius: 8px; padding: 12px; margin: 12px 0; font-size: 1.1rem; color: #333; line-height: 1.6; }
.diag-entry { background: linear-gradient(135deg, #667eea, #764ba2); }
.diag-opt { display: block; width: 100%; margin: 8px 0; text-align: left; }
.next-steps .big-btn { display: block; width: 100%; margin: 10px 0; }
/* 高龄学科化主界面：不再是水果/身体大卡通 */
.older-subjects { margin: 16px 0; }
.older-subjects h2 { font-size: 1.4rem; color: #333; margin-bottom: 12px; }
.subject-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.subject-card {
    background: white; border: 2px solid #EEE; border-radius: 16px; padding: 18px 12px;
    font-size: 1.2rem; font-weight: bold; color: #333; cursor: pointer; text-align: center;
}
.subject-card:active { border-color: #667eea; transform: scale(0.98); }
.subject-sub { font-size: 0.9rem; color: #888; font-weight: normal; }
/* 成熟档：收起大狮子，标题变深色 */
#home-screen.mature .mascot-small { display: none; }
#home-screen.mature header h1 { color: #333; text-shadow: none; }
.reward-section { margin-top: 26px; }
.reward-cost { font-size: 1rem; display: block; }
.reward-desc { font-size: 0.95rem; opacity: 0.9; display: block; margin-top: 4px; }
/* 奖励游戏卡：叠加在 .game-card 之上，金色表示“花星玩”，与学习游戏区分；用 .game-card.reward-card 提高特异性，确保覆盖 .game-card 的紫色渐变与白字 */
.game-card.reward-card { background: linear-gradient(135deg, #FFD54F, #FF8E53); border: 3px solid #FFCA28; color: #5D4037; box-shadow: 0 8px 25px rgba(255,179,0,0.35); }
.game-card.reward-card:hover { transform: translateY(-5px); box-shadow: 0 12px 35px rgba(255,179,0,0.45); }
/* 奖励游戏：未解锁（年龄未到）的灰色提示卡，如 2-6 的掌机 */
.game-card.reward-card.locked-card { background: #E0E0E0; border: 3px solid #BDBDBD; color: #757575; box-shadow: none; filter: grayscale(1); opacity: 0.75; }
.game-card.reward-card.locked-card:hover { transform: none; box-shadow: none; }
.lesson-steps { display: flex; gap: 8px; align-items: center; justify-content: center; margin: 14px 0; flex-wrap: wrap; }
.lesson-step { background: #EEE; padding: 8px 16px; border-radius: 999px; color: #888; }
.lesson-step.active { background: #FF6B9D; color: white; font-weight: bold; }
.lesson-container { background: white; border-radius: 28px; padding: 24px; margin-top: 10px; }
.lesson-block h3 { color: #FF6B9D; margin-bottom: 12px; }
.lesson-text { font-size: 1.2rem; color: #333; line-height: 1.6; }
.lesson-examples { margin: 12px 0; }
.lesson-ex { background: #FFF5E6; padding: 10px 14px; border-radius: 12px; margin-bottom: 8px; }
/* 语法小测面板：与例句 .lesson-ex 区分，淡紫底 + 左侧色条标示“答题区” */
.lesson-quiz { background: #F0F0FF; border-left: 4px solid #667eea; border-radius: 12px; padding: 14px 16px; margin: 16px 0; }
.lesson-quiz .lesson-text { margin-bottom: 4px; }
.lesson-words { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 18px; }
.lesson-word { background: #FFF5E6; border-radius: 16px; padding: 14px; text-align: center; cursor: pointer; }
.lesson-word-emoji { font-size: 2.2rem; }
.lesson-word-en { font-weight: bold; color: #FF6B9D; font-size: 1.2rem; }
.lesson-word-zh { color: #666; }
.lesson-word-phonics { color: #999; font-size: 0.9rem; }
.lesson-word-ex { color: #888; font-size: 0.9rem; margin-top: 4px; }
.writing-input {
    width: 100%; min-height: 120px; padding: 14px; border: 2px solid #FFE4EC; border-radius: 16px;
    font-size: 1.1rem; margin: 12px 0; font-family: inherit;
}
.lesson-checklist { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; color: #555; }
/* ============ 复古掌机（纯玩奖励） ============ */
.retro-shell { max-width: 420px; margin: 0 auto; text-align: center; }
.retro-screen-wrap {
    background: #3A3A3A; border-radius: 28px; padding: 18px 18px 12px;
    box-shadow: 0 10px 24px rgba(0,0,0,0.25), inset 0 2px 0 rgba(255,255,255,0.15);
}
.retro-brand { color: #DDD; font-size: 0.85rem; letter-spacing: 2px; margin-bottom: 10px; }
.retro-canvas {
    width: 100%; max-width: 300px; aspect-ratio: 1; display: block; margin: 0 auto;
    background: #9BBC0F; border: 6px solid #1A1A1A; border-radius: 10px;
    image-rendering: pixelated; touch-action: none;
}
.retro-score { color: #FFF; font-size: 1.15rem; font-weight: bold; margin-top: 10px; }
.retro-status { color: #CCC; font-size: 1rem; min-height: 1.5em; }
.retro-select { display: flex; gap: 8px; justify-content: center; margin: 14px 0; flex-wrap: wrap; }
.retro-select-btn {
    min-height: 48px; padding: 10px 14px; font-size: 1.05rem; border: 2px solid #DDD;
    border-radius: 999px; background: #FFF; cursor: pointer;
}
.retro-select-btn.active { background: #FF6B9D; border-color: #FF6B9D; color: #FFF; font-weight: bold; }
.retro-controls { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 6px 0 12px; padding: 0 6px; }
.retro-dpad {
    display: grid; grid-template-columns: repeat(3, 56px); grid-template-rows: repeat(3, 56px);
    gap: 0; touch-action: none;
}
.retro-dpad-btn {
    width: 56px; height: 56px; font-size: 1.3rem; background: #2B2B2B; color: #FFF;
    border: none; cursor: pointer; display: flex; align-items: center; justify-content: center;
    -webkit-tap-highlight-color: transparent;
}
.retro-dpad-btn:active { background: #555; }
.retro-dpad-center {
    width: 56px; height: 56px; background: #2B2B2B; color: #888; border: none;
    font-size: 1.2rem; display: flex; align-items: center; justify-content: center;
}
.retro-dpad-empty { width: 56px; height: 56px; }
.retro-ab { display: flex; gap: 14px; align-items: center; }
.retro-btn-a, .retro-btn-b {
    width: 64px; height: 64px; border-radius: 50%; border: 3px solid rgba(0,0,0,0.2);
    color: #FFF; font-size: 1.3rem; font-weight: bold; cursor: pointer; line-height: 1.1;
}
.retro-btn-a { background: #E74C3C; }
.retro-btn-b { background: #F1C40F; color: #333; }
.retro-btn-a span, .retro-btn-b span { font-size: 0.75rem; font-weight: normal; }
.retro-start-btn {
    min-height: 48px; padding: 10px 22px; font-size: 1.05rem; border: none;
    border-radius: 999px; background: #555; color: #FFF; cursor: pointer; margin-bottom: 10px;
}
.retro-hint { color: #999; font-size: 0.95rem; margin-bottom: 14px; }
@media (max-width: 480px) {
    .lesson-words { grid-template-columns: 1fr 1fr; }
    .age-grid { grid-template-columns: 1fr; }
    .lesson-entry { flex-direction: column; align-items: stretch; text-align: center; }
}

/* ============ 离线智能问答机器人（悬浮窗） ============ */
.bot-fab {
    position: fixed; right: 18px; bottom: 18px; width: 60px; height: 60px;
    border-radius: 50%; border: none; cursor: pointer; font-size: 1.8rem;
    background: linear-gradient(135deg, #FF6B9D, #FF8E53); color: #FFF;
    box-shadow: 0 8px 20px rgba(255,107,157,0.45); z-index: 9000;
    -webkit-tap-highlight-color: transparent;
    display: flex; align-items: center; justify-content: center; padding: 0;
}
.bot-fab:active { transform: scale(0.95); }
.bot-fab-avatar { display: flex; align-items: center; justify-content: center; animation: botAvatarFloat 3.4s ease-in-out infinite; }
@keyframes botAvatarFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
.bot-avatar { width: 40px; height: auto; display: block; margin: 0 auto; }
.bot-avatar-sm { width: 26px; height: auto; display: inline-block; vertical-align: -5px; margin: 0 4px 0 0; }
/* 糖宝头像容器：原图 + 眼睛覆盖层（SVG 与图片同比例，严格对齐） */
.bot-avatar-wrap { position: relative; display: inline-block; line-height: 0; }
.bot-avatar-wrap .bot-avatar { display: block; margin: 0; }
.bot-avatar-eyes { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.tb-eyes-a { animation: tbEyesA 9s linear infinite; }
.tb-eyes-b { animation: tbEyesB 9s linear infinite; }
.tb-gaze { animation: tbGaze 7s ease-in-out infinite; }
.tb-blink { animation: tbBlink 5s linear infinite; transform-box: fill-box; transform-origin: center; }
@keyframes tbEyesA { 0%, 82% { opacity: 1; } 88%, 94% { opacity: 0; } 97%, 100% { opacity: 1; } }
@keyframes tbEyesB { 0%, 82% { opacity: 0; } 88%, 94% { opacity: 1; } 97%, 100% { opacity: 0; } }
@keyframes tbGaze { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(8px); } 40% { transform: translateX(0); } 60% { transform: translateX(-8px); } 80% { transform: translateX(0); } }
@keyframes tbBlink { 0%, 90% { transform: scaleY(1); } 93% { transform: scaleY(0.12); } 96%, 100% { transform: scaleY(1); } }
/* 悬浮按钮旁的“AI助手”标签：桌面端 hover/focus 显示，触摸设备常显 */
.bot-fab-label {
    position: absolute; right: calc(100% + 10px); top: 50%; transform: translateY(-50%);
    background: #FFF; color: #333; font-size: 14px; font-weight: 700; white-space: nowrap;
    padding: 6px 12px; border-radius: 999px; box-shadow: 0 4px 14px rgba(0,0,0,0.18);
    opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.bot-fab:hover .bot-fab-label, .bot-fab:focus .bot-fab-label { opacity: 1; }
@media (hover: none) {
    .bot-fab-label { opacity: 1; }
}
/* 糖宝头像：修复底图 + 矢量眼睛层（A 帧 > _ / B 帧 — — + 视线 + 眨眼）；无辉光、无重绘 */
/* 减少动态效果：关闭按钮与头像浮动 */
@media (prefers-reduced-motion: reduce) {
    .bot-fab, .bot-fab-avatar { animation: none; }
    /* 底图无眼睛，不能隐藏眼睛层；关闭动画并强制 A 帧静止 */
    .tb-eyes-a, .tb-eyes-b, .tb-gaze, .tb-blink { animation: none; }
    .tb-eyes-a { opacity: 1; }
    .tb-eyes-b { opacity: 0; }
    .tb-gaze { transform: none; }
    .tb-blink { transform: scaleY(1); }
}
.bot-header span { display: inline-flex; align-items: center; }
.bot-panel {
    position: fixed; right: 14px; bottom: 90px; width: 360px; max-width: calc(100vw - 28px);
    max-height: 70vh; background: rgba(255,255,255,0.85); border-radius: 20px; overflow: hidden;
    box-shadow: 0 12px 32px rgba(0,0,0,0.25); z-index: 9000;
    display: flex; flex-direction: column;
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255,255,255,0.7);
}
.bot-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 14px; background: linear-gradient(135deg, #FF6B9D, #FF8E53);
    color: #FFF; font-weight: bold; font-size: 1.05rem;
}
.bot-close {
    border: none; background: transparent; color: #FFF; font-size: 1.2rem;
    cursor: pointer; min-width: 44px; min-height: 44px;
}
.bot-messages { overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; min-height: 140px; }
.bot-msg {
    max-width: 92%; padding: 10px 12px; border-radius: 16px;
    font-size: 1rem; line-height: 1.55; white-space: pre-wrap; word-break: break-word;
}
.bot-msg-bot { background: #FFF5E6; color: #333; align-self: flex-start; }
.bot-msg-user { background: #FF6B9D; color: #FFF; align-self: flex-end; }
.bot-msg .bot-src { display: block; margin-top: 6px; color: #888; font-size: 0.85rem; }
.bot-msg-user .bot-src { color: rgba(255,255,255,0.85); }
.bot-go-btn {
    margin-top: 8px; min-height: 44px; padding: 8px 14px; font-size: 1rem;
    border: none; border-radius: 999px; background: #FF6B9D; color: #FFF; cursor: pointer;
}
.bot-word { cursor: pointer; color: #FF6B9D; font-weight: 700; text-decoration: underline dotted; }
.word-card.bot-target { border: 3px solid #FF6B9D; box-shadow: 0 0 0 3px rgba(255,107,157,0.35), 0 8px 24px rgba(255,107,157,0.4); }
.bot-suggest-btn {
    margin: 4px 4px 0 0; min-height: 40px; padding: 6px 12px; font-size: 0.95rem;
    border: 2px solid #FFE4EC; border-radius: 999px; background: #FFF; cursor: pointer;
}
.bot-quick { display: flex; gap: 8px; padding: 0 12px 10px; flex-wrap: wrap; }
.bot-quick button {
    min-height: 40px; padding: 6px 14px; font-size: 0.95rem; border: 2px solid #FFE4EC;
    border-radius: 999px; background: #FFF5E6; cursor: pointer;
}
.bot-input-row { display: flex; gap: 8px; padding: 0 12px 8px; }
.bot-input-row input {
    flex: 1; min-width: 0; padding: 10px 12px; font-size: 1rem;
    border: 2px solid #FFE4EC; border-radius: 999px; font-family: inherit;
}
.bot-input-row button {
    min-width: 64px; min-height: 44px; padding: 8px 14px; font-size: 1rem;
    border: none; border-radius: 999px; background: #FF6B9D; color: #FFF; cursor: pointer;
}
.bot-note { margin: 0 12px 10px; color: #999; font-size: 0.85rem; }
@media (max-width: 480px) {
    .bot-panel { right: 14px; left: 14px; width: auto; bottom: 86px; }
}

/* 会员权益卡（前期免费开放，展示用；正式收费需后端验权） */
.membership-card { background: #fff8e1; border: 1px solid #ffe082; border-radius: 14px; padding: 14px 16px; margin: 12px 0; }
.membership-title { font-weight: 700; font-size: 16px; margin-bottom: 8px; }
.membership-status { font-weight: 400; font-size: 13px; color: #666; margin-left: 6px; }
.membership-cols { display: flex; gap: 20px; flex-wrap: wrap; }
.membership-col-title { font-weight: 600; margin-bottom: 4px; }
.membership-cols ul { margin: 0; padding-left: 18px; font-size: 14px; }
.membership-note { margin-top: 10px; font-size: 12px; color: #888; line-height: 1.5; }
