/* ================================================================
   AI 助学小助手 - 样式表
   布局：纯 flex 列布局，无 position:fixed 脱离文档流
   主题色：#2563eb，移动端 375px 优先
   ================================================================ */

/* ---- CSS 变量 ---- */
:root {
  /* 默认蓝色（一对一） */
  --theme-primary:       #4F8AF7;
  --theme-primary-light: #EEF3FF;
  --theme-primary-dark:  #3B6FD4;
  --theme-gradient:      linear-gradient(135deg, #4F8AF7 0%, #72A4FE 100%);
  --theme-shadow:        0 4px 14px rgba(79,138,247,0.22);

  /* 主色系 */
  --color-primary:       #4F6EF7;
  --color-primary-light: #EEF1FE;
  --color-primary-dark:  #3D4ED4;

  /* 旧变量兼容（逐步迁移） */
  --color-primary-hover: #3D4ED4;

  /* 背景色 */
  --bg-page:     #F5F5F7;
  --bg-card:     #FFFFFF;
  --bg-input:    #F9F9FB;
  --color-bg:    #F5F5F7;    /* 兼容旧引用 */
  --color-white: #FFFFFF;

  /* 文字层级 */
  --text-primary:   #1D1D1F;
  --text-secondary: #6E6E73;
  --text-tertiary:  #AEAEB2;
  --text-inverse:   #FFFFFF;
  --color-text:          #1D1D1F;  /* 兼容旧引用 */
  --color-text-secondary:#6E6E73;  /* 兼容旧引用 */
  --color-text-muted:    #AEAEB2;  /* 兼容旧引用 */

  /* 边框与分隔 */
  --border-light: #E5E5EA;
  --border-card:  #F0F0F5;
  --color-border: #E5E5EA;  /* 兼容旧引用 */

  /* 语义色 */
  --color-success:  #34C759;
  --color-warning:  #FF9500;
  --color-danger:   #FF3B30;
  --color-info:     #5AC8FA;

  /* 圆角 */
  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   16px;
  --radius-xl:   20px;
  --radius-full: 999px;

  /* 阴影 */
  --shadow-sm:  0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md:  0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg:  0 8px 30px rgba(0, 0, 0, 0.12);

  /* 间距 */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 20px;
  --space-2xl: 24px;

  /* 字体 */
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text",
               "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
               sans-serif;
  --font-mono: "SF Mono", "Menlo", "Consolas", monospace;
  --font-family: var(--font-sans);  /* 兼容旧引用 */

  /* 触控 */
  --touch-min: 44px;

  /* 动效 */
  --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --duration-fast: 0.15s;
  --duration-normal: 0.25s;
}

body.mode-preview {
    --theme-primary:       #F97316;
    --theme-primary-light: #FFF7ED;
    --theme-primary-dark:  #EA580C;
    --theme-gradient:     linear-gradient(135deg, #F97316 0%, #FB923C 100%);
    --theme-shadow:       0 4px 14px rgba(249,115,22,0.25);
}

body.mode-review {
    --theme-primary:       #10B981;
    --theme-primary-light: #ECFDF5;
    --theme-primary-dark:  #059669;
    --theme-gradient:     linear-gradient(135deg, #10B981 0%, #34D399 100%);
    --theme-shadow:       0 4px 14px rgba(16,185,129,0.25);
}

/* ---- Reset ---- */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html {
  box-sizing: border-box;
  -webkit-text-size-adjust: 100%;
  font-size:16px;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

/* ---- 根容器：flex 列，整页不滚动 ---- */
body {
    margin: 0;
    padding: 0;
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-page);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* 核心：flex 列布局，100dvh 动态视口高度 */
    height: 100vh; height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    max-width: 480px;
    margin: 0 auto;
    min-height: 100dvh;
}


/* ================================================================
   顶部标题栏（flex 子项，不缩放）
   ================================================================ */
.app-header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #fff;
    color: var(--text-primary);
    min-height: 50px;
    border-bottom: 0.5px solid var(--border-light);
}
/* 标题区（可点击，打开对话列表） */
.app-header-left {
    display: flex; align-items: center; gap: 6px;
    border: none; background: none; cursor: pointer;
    font-family: var(--font-family); padding: 4px 6px;
    border-radius: var(--radius-sm); transition: background 0.15s;
    min-width: 0; flex: 1; text-align: left;
}
.app-header-left:hover { background: var(--color-bg); }
.header-list-icon { font-size: 1.25rem; flex-shrink: 0; }
.header-title-group { display: flex; flex-direction: column; min-width: 0; }
.app-title { font-size: 0.9375rem; font-weight: 700; color: var(--color-text); line-height: 1.2; }
.conv-title { font-size: 0.6875rem; color: var(--color-primary); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 120px; }
/* 右侧操作按钮组 */
.app-header-actions { display: flex; gap: 4px; flex-shrink: 0; }
.header-action-btn {
    background: var(--bg-input);
    border: none;
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    cursor: pointer;
    font-family: inherit;
}
.header-action-btn:hover { border-color: var(--color-primary); color: var(--color-primary); background: var(--color-primary-light); }


/* ================================================================
   Tab 页面容器（flex:1 占满剩余空间，内部独立滚动）
   ================================================================ */
.tab-page {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}


/* ================================================================
   问答页 —— 内部 flex 列：消息区(flex:1) + 输入栏(shrink:0)
   ================================================================ */
#tab-chat {
    display: flex;
    flex-direction: column;
}

/* 对话滚动区 */
.chat-scroll {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: linear-gradient(180deg, #EEF1FE 0%, #F5F5F7 30%, #F5F5F7 100%);
    padding: 0;
}

/* 欢迎引导 */
.chat-welcome {
    margin: 20px 16px;
    padding: 20px 16px 16px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.04);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.chat-welcome.hidden { display:none; }
.welcome-icon {
    animation: welcomeFloat 3s ease-in-out infinite;
}
.welcome-avatar-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
}
@keyframes welcomeFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
.welcome-text {
    font-size: 17px;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.7;
    letter-spacing: 0.03em;
}

/* 欢迎区快捷模式卡片 */
.welcome-cards {
    display: flex;
    gap: 10px;
    width: 100%;
    margin-top: 8px;
}
.welcome-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 14px 8px;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    touch-action: manipulation;
}
.welcome-card:active {
    transform: scale(0.95);
}
.welcome-card * {
    pointer-events: none;
}
.welcome-card-icon {
    font-size: 28px;
    line-height: 1;
}
.welcome-card-title {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}
.welcome-card-blue {
    background: #EFF3FF;
    color: #4F8AF7;
}
.welcome-card-orange {
    background: #FFF7ED;
    color: #F97316;
}
.welcome-card-green {
    background: #ECFDF5;
    color: #10B981;
}

/* ── 首页 ── */
.home-scroll {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 24px 24px;
    text-align: center;
    background: #fff;
    min-height: 100%;
}
.home-avatar-wrap {
    margin-bottom: 20px;
    animation: welcomeFloat 3s ease-in-out infinite;
}
.home-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.home-greeting {
    font-size: 17px;
    font-weight: 400;
    color: var(--text-primary);
    line-height: 1.8;
    margin: 0 auto 32px;
    max-width: 320px;
    text-align: center;
    letter-spacing: 0.02em;
    animation: greetingFadeIn 0.8s ease-out;
    padding: 18px 22px;
    border: none;
    background: #F8F9FB;
    border-radius: 18px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.adaptive-push-card {
    margin-top: 16px;
    background: linear-gradient(135deg, #FFF7ED 0%, #FFF1F2 100%);
    border: 1px solid #FECACA;
    border-radius: 14px;
    padding: 16px;
    text-align: center;
}
.push-card-text {
    font-size: 14px;
    color: #7C2D12;
    line-height: 1.7;
    margin-bottom: 12px;
}
.push-card-btn {
    display: inline-block;
    padding: 10px 24px;
    background: #EA580C;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-family);
    cursor: pointer;
    transition: all 0.15s ease;
}
.push-card-btn:active {
    transform: scale(0.96);
    opacity: 0.9;
}
@keyframes greetingFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── 首页三卡片 ── */
.home-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 340px;
}
.home-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    user-select: none;
}
.home-card:active {
    transform: scale(0.97);
}
.home-card-icon {
    font-size: 32px;
    line-height: 1;
    flex-shrink: 0;
}
.home-card-title {
    font-size: 17px;
    font-weight: 600;
}
.home-card-desc {
    font-size: 13px;
    opacity: 0.7;
    margin-top: 2px;
}
.home-card-blue {
    background: #EFF3FF;
    color: #4F8AF7;
}
.home-card-orange {
    background: #FFF7ED;
    color: #F97316;
}
.home-card-green {
    background: #ECFDF5;
    color: #10B981;
}

/* ── 首页大按钮 ── */
.home-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 300px;
    margin: 0 auto 24px;
}
.home-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 24px;
    border-radius: 16px;
    border: none;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-family);
    transition: all 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}
.home-btn:active {
    transform: scale(0.97);
}
.home-btn-icon {
    font-size: 22px;
}
.home-btn-chat {
    background: #EEF3FF;
    color: #4F8AF7;
}
.home-btn-learn {
    background: #4F8AF7;
    color: #fff;
    box-shadow: 0 4px 16px rgba(79,138,247,0.3);
}

/* ── 首页模式选择小卡片 ── */
.home-mode-cards {
    display: flex;
    gap: 10px;
    width: 100%;
    max-width: 340px;
}
.home-mode-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px 10px;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}
.home-mode-card:active {
    transform: scale(0.95);
}
.home-mode-icon {
    font-size: 32px;
    line-height: 1;
}
.home-mode-name {
    font-size: 14px;
    font-weight: 600;
}
.home-mode-blue { background: #EFF3FF; color: #4F8AF7; }
.home-mode-orange { background: #FFF7ED; color: #F97316; }
.home-mode-green { background: #ECFDF5; color: #10B981; }


/* ── 我的页面 ── */
.mine-card {
    margin: 12px 16px;
    padding: 20px;
    background: #fff;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.15s ease;
}
.mine-card:active {
    transform: scale(0.98);
}
.mine-card-icon {
    font-size: 28px;
    margin-bottom: 8px;
}
.mine-card-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}
.mine-card-desc {
    font-size: 13px;
    color: var(--text-secondary);
}

/* 消息容器 */
.chat-messages {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 0 16px 0;
}

.chat-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    text-align: center;
    opacity: 0.6;
}
.chat-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}
.chat-empty-text {
    font-size: 14px;
    color: var(--text-tertiary);
}
.answer-content.ai-answer { display: none; }


/* ================================================================
   底部固定输入栏（flex 子项，不缩放）
   ================================================================ */
.chat-input-bar {
    flex-shrink: 0;
    padding: 6px 10px 4px;
    padding-bottom: calc(4px + env(safe-area-inset-bottom, 0));
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 0.5px solid transparent;
    margin: 0 10px 10px 10px;
    border-radius: 24px;
    box-shadow: 0 -2px 20px rgba(0,0,0,0.06), 0 0 0 1px rgba(0,0,0,0.04);
}

/* 输入行 */
.input-row {
    display: flex; align-items: center; gap: 6px;
}
/* 拍照按钮 */
.btn-camera, .btn-pick-teacher {
    width: 38px; height: 38px;
    border-radius: 50%;
    border: none;
    background: transparent;
    font-size: 20px;
    cursor: pointer;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
}
.btn-camera:hover { border-color: var(--color-primary); background: var(--color-primary-light); }
.btn-camera:active { transform: scale(0.95); }
.btn-pick-teacher {
    min-height: unset; min-width: 38px; width: auto;
    padding: 0 6px; font-size: 0.7rem;
}
.btn-pick-teacher:hover { border-color: var(--color-primary); background: var(--color-primary-light); }
/* OCR 识别中 */
.ocr-loading {
    text-align: center; font-size: 0.8125rem; color: var(--color-primary);
    padding: 4px 0; animation: pulse 1.5s infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.5} }
.input-select {
    min-height: var(--touch-min); padding: 4px 4px;
    border: 1px solid var(--color-border); border-radius: var(--radius-sm);
    background: var(--color-bg); font-size: 0.9375rem; color: var(--color-text);
    font-family: var(--font-family); cursor: pointer;
    appearance: none; text-align: center; min-width: 44px;
}
/* 更换老师按钮内的小文字头像 */
.pick-avatar-text {
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; border-radius: 50%; color: #fff;
    font-size: 0.875rem; font-weight: 700;
}
.input-select:focus { outline:none; border-color:var(--color-primary); }
.input-msg {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: var(--radius-full);
    font-size: 15px;
    outline: none;
    background: var(--bg-input);
    color: var(--text-primary);
    font-family: var(--font-family);
}
.input-msg:focus {
    background: #fff;
    box-shadow: 0 0 0 3px var(--theme-primary-light);
}
.input-msg::placeholder { color:var(--color-text-muted); }

/* 发送按钮 */
.btn-send {
    width: 42px; height: 42px;
    border-radius: 50%;
    background: var(--theme-primary);
    color: #fff;
    border: none;
    font-size: 18px;
    cursor: pointer;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--theme-shadow);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-send:active {
    transform: scale(0.88);
    box-shadow: 0 2px 6px rgba(79,110,247,0.2);
}
.btn-send:hover { background:var(--theme-primary-dark); }
.btn-send:disabled { background:#93c5fd; cursor:not-allowed; }

/* 输入栏第二行 */
.input-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}
.btn-action {
    padding: 8px 14px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-light);
    background: #fff;
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: var(--font-family);
    transition: all 0.15s ease;
    white-space: nowrap;
}
.btn-action:active {
    background: var(--bg-input);
    transform: scale(0.96);
}
.btn-action:disabled { opacity:0.4; cursor:not-allowed; }

/* 置信度标签（输入栏内） */
.confidence-badge {
    display: inline-flex; align-items: center;
    padding: 2px 8px; border-radius: 20px;
    font-size: 0.75rem; font-weight: 600; margin-left: auto;
}
.confidence-badge.high { background:#dcfce7; color:#166534; }
.confidence-badge.medium { background:#fef9c3; color:#854d0e; }
.confidence-badge.low { background:#fee2e2; color:#991b1b; }


/* ================================================================
   复盘页 & 老师页：内部滚动
   ================================================================ */
.page-scroll {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 14px;
    min-height: 0;
}


/* ================================================================
   底部 Tab 栏（flex 子项，不缩放）
   ================================================================ */
.tab-bar {
    flex-shrink: 0;
    height: 60px;
    margin: 0 16px 8px 16px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 8px;
    padding-bottom: env(safe-area-inset-bottom, 0);
}
.tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    height: 100%;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--text-tertiary);
    transition: color 0.15s ease, transform 0.15s ease;
    font-family: var(--font-family);
    -webkit-tap-highlight-color: transparent;
    padding: 4px 0;
}
.tab-item:active { transform: scale(0.9); }
.tab-item.active { color: var(--theme-primary); }
.tab-icon {
    font-size: 1.4rem;
    transition: transform 0.15s ease;
}
.tab-item.active .tab-icon { transform: translateY(-2px); }
.tab-label {
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}


/* ================================================================
   对话气泡
   ================================================================ */
.chat-bubble { overflow-wrap: break-word; word-break: normal; animation: bubbleIn 0.3s ease; }
@keyframes bubbleIn { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }

.chat-time { display:block; font-size:11px; color:var(--text-tertiary); margin-top:var(--space-xs); padding:0 4px; }
.chat-bubble-user .chat-time { text-align:right; color:rgba(255,255,255,0.7); }

/* 用户气泡（右，蓝紫渐变） */
.chat-bubble-user {
    align-self: flex-end;
    max-width: 82%;
    background: var(--theme-gradient);
    color: #fff;
    padding: 14px 18px;
    border-radius: 20px 20px 4px 20px;
    box-shadow: var(--theme-shadow);
    font-size: 15px;
    line-height: 1.6;
    overflow-wrap: break-word;
    word-break: normal;
    margin: 4px 16px;
}

/* AI 气泡（左，白底 + 小头像） */
.chat-bubble-ai {
    align-self: flex-start;
    max-width: 85%;
    background: #fff;
    color: var(--text-primary);
    padding: 16px 18px;
    border-radius: 20px 20px 20px 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    font-size: 15px;
    line-height: 1.7;
    overflow-wrap: break-word;
    word-break: normal;
    margin: 4px 16px 4px 48px;
    position: relative;
}
.chat-bubble-ai::before {
    content: '🧑‍🏫';
    position: absolute;
    left: -40px;
    top: 4px;
    width: 28px;
    height: 28px;
    background: var(--theme-primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

/* AI 气泡头部（老师名 + 置信度） */
.chat-bubble-label {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
}

/* 气泡内步骤标题 */
.chat-bubble-content .step-header {
    font-weight:600; color:var(--color-primary); cursor:pointer;
    min-height:var(--touch-min); padding:6px 4px;
    border-bottom:1px dashed var(--color-border); margin-top:6px;
}
.chat-bubble-content .step-header .step-arrow {
    display:inline-block; margin-right:6px; font-size:10px;
    transition:transform 0.2s;
}
.chat-bubble-content .step-header:hover { background:var(--color-primary-light); border-radius:var(--radius-sm); }
.chat-bubble-content .step-body { padding:4px 0 4px 12px; display:none; }
.chat-bubble-content .step-body.expanded { display:block; }
.chat-bubble-content .error-message {
    background:#fef2f2; border:1px solid #fecaca; border-radius:var(--radius-sm);
    padding:12px; font-size:0.875rem; color:#991b1b; line-height:1.6;
}


/* ================================================================
   Loading
   ================================================================ */
.loading {
    display:flex; flex-direction:column; align-items:center; gap:8px;
    padding:20px 0; color:var(--color-text-secondary); font-size:0.875rem;
}
.loading-spinner {
    width:28px; height:28px; border:3px solid var(--color-border);
    border-top-color:var(--theme-primary); border-radius:50%;
    animation:spin 0.8s linear infinite;
}
@keyframes spin { to{transform:rotate(360deg)} }


/* ================================================================
   复盘页面
   ================================================================ */
.review-entry-card {
    text-align:center; padding:32px 20px;
    background:var(--bg-card); border-radius:var(--radius-lg);
    box-shadow:var(--shadow-sm); border:1px solid var(--border-light);
}
.review-entry-icon { font-size:3rem; margin-bottom:10px; }
.review-entry-title { font-size:1.125rem; font-weight:700; margin-bottom:6px; }
.review-entry-desc { font-size:0.875rem; color:var(--color-text-secondary); margin-bottom:16px; }
.page-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    padding: 20px 16px 12px;
    margin: 0;
}


/* ================================================================
   老师页面
   ================================================================ */
.teacher-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 16px;
}
.teacher-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: #fff;
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.15s ease;
    border: 2px solid transparent;
}
.teacher-item:active {
    transform: scale(0.98);
    background: var(--color-primary-light);
    border-color: var(--color-primary);
}
.teacher-item:hover, .teacher-item.active { border-color:var(--color-primary); background:var(--color-primary-light); }
.teacher-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: var(--color-primary-light);
    flex-shrink: 0;
}
/* 文字头像（自定义老师，取名字首字） */
.avatar-text {
    color: #fff; font-size: 1.125rem; font-weight: 700;
    background: var(--color-primary);
}
.teacher-info { flex:1; min-width:0; }
.teacher-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}
.teacher-subject {
    font-size: 13px;
    color: var(--text-secondary);
}
.teacher-style-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 11px;
    background: var(--bg-input);
    color: var(--text-secondary);
    margin-right: 4px;
    margin-top: 4px;
}
.teacher-desc { font-size:0.8125rem; color:var(--color-text-secondary); margin-top:2px; }
.teacher-series { font-size:0.75rem; color:var(--color-text-muted); margin-top:2px; }
.teacher-check { color:var(--color-primary); font-size:1.25rem; flex-shrink:0; }
.avatar-photo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}
.avatar-img-wrap {
    position: relative;
}
.avatar-img-wrap::after {
    content: '📷';
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 20px;
    height: 20px;
    background: var(--bg-card);
    border-radius: 50%;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    pointer-events: none;
}
.avatar-uploadable {
    position: relative;
    transition: all 0.15s ease;
}
.avatar-uploadable::after {
    content: '📷';
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 20px;
    height: 20px;
    background: var(--bg-card);
    border-radius: 50%;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    pointer-events: none;
}
.teacher-coming-soon { text-align:center; font-size:0.8125rem; color:var(--color-text-muted); margin-top:16px; padding-top:12px; border-top:1px dashed var(--color-border); }

#create-teacher-btn {
    margin: 12px 16px;
    padding: 14px;
    border-radius: 14px;
    border: 2px dashed var(--border-light);
    background: #fff;
    font-size: 15px;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: var(--font-family);
    transition: all 0.15s ease;
}
#create-teacher-btn:active {
    background: var(--color-primary-light);
    border-color: var(--color-primary);
    color: var(--color-primary);
}


/* ================================================================
   弹窗（底部滑出，z-index 覆盖在 flex 布局之上）
   ================================================================ */
.modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    visibility: visible;
    opacity: 1;
    transition: visibility 0s, opacity 0.2s ease-out;
}
.modal.hidden {
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s 0.25s, opacity 0.2s ease-out;
}
.modal-backdrop {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: opacity 0.2s ease-out;
}
.modal.hidden .modal-backdrop {
    opacity: 0;
}
.modal-content {
    position: relative;
    background: var(--bg-card);
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-width: 480px;
    max-height: 85vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: var(--shadow-lg);
    transform: translateY(0);
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
    padding: 20px 16px 28px;
}
.modal.hidden .modal-content {
    transform: translateY(100%);
}
.modal-content::before {
    content: '';
    display: block;
    width: 36px;
    height: 5px;
    background: #D1D1D6;
    border-radius: 2.5px;
    margin: 8px auto;
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 12px;
    border-bottom: 0.5px solid var(--border-light);
}
.modal-header h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}
.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--bg-input);
    font-size: 18px;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}
.modal-close:active {
    background: var(--border-light);
}
.modal-body {
    padding: 0 20px 24px;
}


/* ================================================================
   表单
   ================================================================ */
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}
.form-group textarea {
    width:100%; min-height:50px; padding:12px 14px;
    border:1.5px solid var(--border-light); border-radius:12px;
    font-size:15px; font-family:var(--font-family);
    resize:vertical; background:#fff; color:var(--text-primary); line-height:1.5;
}
.form-group textarea:focus { outline:none; border-color:var(--color-primary); }
.selector {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--border-light);
    border-radius: 12px;
    font-size: 15px;
    color: var(--text-primary);
    background: #fff;
    font-family: var(--font-family);
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%23AEAEB2'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}
.selector:focus {
    outline: none;
    border-color: var(--color-primary);
}
.toggle-btns {
    display: flex;
    gap: 8px;
}
.btn-toggle {
    flex: 1;
    padding: 10px;
    border-radius: 12px;
    border: 1.5px solid var(--border-light);
    background: #fff;
    font-size: 14px;
    cursor: pointer;
    font-family: var(--font-family);
    color: var(--text-secondary);
    transition: all 0.15s ease;
}
.btn-toggle.active {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}
.emoji-toggle {
    display: flex;
    gap: 8px;
}
.btn-emoji {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 8px;
    border-radius: 12px;
    border: 1.5px solid var(--border-light);
    background: #fff;
    cursor: pointer;
    font-family: var(--font-family);
    transition: all 0.15s ease;
}
.btn-emoji .emoji-big {
    font-size: 28px;
}
.btn-emoji .emoji-label {
    font-size: 12px;
    color: var(--text-secondary);
}
.btn-emoji.active {
    border-color: var(--color-primary);
    background: var(--color-primary-light);
}
.btn-emoji.active .emoji-label {
    color: var(--color-primary);
    font-weight: 600;
}
.review-intro {
    font-size: 14px;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.6;
}
.review-summary { background:var(--color-primary-light); border-radius:var(--radius-md); padding:14px; font-size:0.9375rem; line-height:1.8; white-space:pre-wrap; overflow-wrap:break-word; word-break:normal; }


/* ================================================================
   通用按钮
   ================================================================ */
.btn {
    display: block;
    padding: 14px 0;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    font-family: var(--font-family);
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}
.btn:active { transform:scale(0.97); }
.btn-primary {
    background: var(--color-primary);
    color: #fff;
    font-weight: 600;
}
.btn-primary:active {
    opacity: 0.9;
}
.btn-outline {
    border: 1.5px solid var(--color-primary);
    background: #fff;
    color: var(--color-primary);
}
.btn-outline:active {
    background: var(--color-primary-light);
}
.btn-text {
    display: inline-block;
    padding: 8px 16px;
    border: none;
    background: none;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    font-family: var(--font-family);
    transition: color 0.15s ease;
}
.btn-text:active {
    color: var(--color-primary);
}
.btn-full { width: 100%; }
.btn:disabled,
.btn-action:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}
.btn-fb-correct {
    border: 1px solid #34C759;
    color: #34C759;
    background: #E8F8ED;
}
.btn-fb-wrong {
    border: 1px solid #FF3B30;
    color: #FF3B30;
    background: #FFEBED;
}


/* ================================================================
   分享面板
   ================================================================ */
.share-card {
    background: linear-gradient(135deg, #EFF3FF 0%, #F5F5F7 100%);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    text-align: center;
}
.share-card-top {
    font-size: 13px;
    color: var(--color-primary);
    font-weight: 600;
    margin-bottom: 12px;
}
.share-card-body {
    background: #fff;
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 10px;
    box-shadow: var(--shadow-sm);
}
.share-card-question {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: 6px;
}
.share-card-teacher {
    font-size: 12px;
    color: var(--text-tertiary);
}
.share-card-point {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}
.share-card-bottom {
    font-size: 12px;
    color: var(--text-tertiary);
}
.share-card-qr-box {
    width: 60px;
    height: 60px;
    margin: 8px auto 0;
    background: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}
#share-screenshot {
    background: var(--color-primary);
    color: #fff;
    border: none;
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-family);
    margin-bottom: 8px;
    transition: all 0.15s ease;
}
#share-screenshot:active { transform: scale(0.97); }
#share-copy-link, #share-wechat {
    background: #fff;
    color: var(--text-primary);
    border: 1.5px solid var(--border-light);
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    font-family: var(--font-family);
    margin-bottom: 8px;
    transition: all 0.15s ease;
}
#share-copy-link:active, #share-wechat:active {
    background: var(--bg-input);
}
.share-hint {
    font-size: 12px;
    color: var(--text-tertiary);
    text-align: center;
    margin-top: 4px;
}


/* ================================================================
   Toast
   ================================================================ */
.toast {
    position: fixed;
    top: 60px;
    left: 50%;
    z-index: 2000;
    padding: 12px 24px;
    background: #1D1D1F;
    color: #fff;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    font-family: var(--font-family);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    pointer-events: none;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    transition: opacity 0.25s ease-out, transform 0.25s ease-out;
    max-width: 90vw;
    text-align: center;
}
.toast.hidden {
    display: block !important;
    opacity: 0;
    transform: translateX(-50%) translateY(-8px);
}
.toast.hiding {
    display: block !important;
    opacity: 0;
    transform: translateX(-50%) translateY(-8px);
}


/* ================================================================
   工具类
   ================================================================ */
.hidden { display:none !important; }


/* ================================================================
   会话列表弹窗
   ================================================================ */
.conv-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 12px;
    max-height: 50vh;
    overflow-y: auto;
}
.conv-list > div {
    padding: 14px 16px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 14px;
    color: var(--text-primary);
}
.conv-list > div:active {
    background: var(--bg-input);
}
.conv-item { display: flex; align-items: center; justify-content: space-between; padding: 12px; border: 1px solid var(--color-border); border-radius: var(--radius-md); cursor: pointer; transition: all 0.15s; background: var(--color-white); gap: 10px; }
.conv-item:hover, .conv-item.active { border-color: var(--color-primary); background: var(--color-primary-light); }
.conv-item-main { flex: 1; min-width: 0; }
.conv-item-title { font-size: 0.9375rem; font-weight: 600; color: var(--color-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-item-meta { display: flex; align-items: center; gap: 8px; margin-top: 2px; font-size: 0.75rem; color: var(--color-text-secondary); }
.conv-item-subject { font-size: 0.6875rem; padding: 1px 6px; border-radius: 8px; background: var(--color-primary-light); color: var(--color-primary); font-weight: 500; }
.conv-item-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.conv-item-time { font-size: 0.6875rem; color: var(--color-text-muted); }
.conv-item-del { border: none; background: none; font-size: 1rem; cursor: pointer; opacity: 0.5; padding: 4px; min-width: 32px; }
.conv-item-del:hover { opacity: 1; color: var(--color-danger); }


/* ================================================================
   学情页面
   ================================================================ */
/* 汇总卡片行 */
.stats-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 0 16px;
    margin-bottom: 20px;
}
.stat-card {
    background: #fff;
    border-radius: 14px;
    padding: 16px 10px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}
.stat-card .stat-num {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    display: block;
}
.stat-card .stat-label {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-top: 6px;
    display: block;
}
/* 空状态 */
.stats-empty {
    text-align: center;
    padding: 50px 24px;
}
.stats-empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}
.stats-empty-text {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}
.stats-empty-hint {
    font-size: 13px;
    color: var(--text-tertiary);
}
/* 分区标题 */
.stats-section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    padding: 0 16px;
    margin-bottom: 12px;
}
/* 记录列表 */
.stats-records { display: flex; flex-direction: column; gap: 8px; }
/* 单条记录 */
.lr-item {
    background: #fff;
    border-radius: 14px;
    padding: 16px;
    margin: 0 16px 10px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.lr-header {
    display: flex; align-items: center; gap: 8px; margin-bottom: 4px;
    font-size: 0.75rem; color: var(--color-text-secondary); flex-wrap: wrap;
}
.lr-time { color: var(--color-text-muted); }
.lr-subject {
    font-size: 0.6875rem; padding: 1px 6px; border-radius: 8px;
    background: var(--color-primary-light); color: var(--color-primary); font-weight: 500;
}
.lr-question { font-size: 0.875rem; color: var(--color-text); line-height: 1.4; }
.lr-kp { font-size: 0.75rem; color: var(--color-primary); margin-top: 4px; }
.lr-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.lr-icon-tutoring { background: #EFF3FF; }
.lr-icon-preview { background: #FFF7ED; }
.lr-icon-review { background: #ECFDF5; }
.lr-content {
    flex: 1;
    min-width: 0;
}
.lr-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.lr-meta {
    font-size: 12px;
    color: var(--text-tertiary);
}
.lr-arrow {
    font-size: 16px;
    color: var(--text-tertiary);
    flex-shrink: 0;
    align-self: center;
}
/* 对错反馈按钮（胶囊形） */
.btn-fb-correct.active { background:#D4EDDA; border-color:var(--color-success); }
.btn-fb-wrong.active { background:#F8D7DA; border-color:var(--color-danger); }

/* 👎 没听懂浮动菜单 */
.not-understood-menu {
    background: #fff; border-radius: 12px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.15);
    padding: 6px; display: flex; flex-direction: column; gap: 4px;
    min-width: 180px; animation: numFadeIn 0.15s ease-out;
}
@keyframes numFadeIn { from { opacity:0; transform:translateY(4px); } to { opacity:1; transform:translateY(0); } }
.not-understood-menu button {
    border: none; background: none; padding: 10px 14px; border-radius: 8px;
    font-size: 0.8rem; cursor: pointer; text-align: left;
    transition: background 0.15s;
}
.not-understood-menu button:hover { background: #f1f5f9; }
.num-retry { color: #2563eb; }
.num-mark { color: #64748b; }


/* ================================================================
   错题本
   ================================================================ */
.errorbook-scroll {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--bg-page);
    padding: 16px;
}

.eb-summary {
    background: #fff;
    border-radius: 16px;
    padding: 20px 16px 16px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}
.eb-stats-row {
    display: flex;
    justify-content: space-around;
    margin-bottom: 16px;
}
.eb-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.eb-stat-num {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}
.eb-stat-label {
    font-size: 12px;
    color: var(--text-tertiary);
}
.eb-stats-actions {
    display: flex;
    gap: 8px;
}
.eb-review-all-btn {
    flex: 1;
    padding: 10px 0;
    border: none;
    border-radius: 10px;
    background: #ECFDF5;
    color: #10B981;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-family);
    transition: all 0.15s ease;
}
.eb-review-all-btn:active {
    background: #D1FAE5;
}
.eb-export-btn {
    flex: 1;
    padding: 10px 0;
    border: none;
    border-radius: 10px;
    background: var(--bg-input);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    font-family: var(--font-family);
    transition: all 0.15s ease;
}
.eb-export-btn:active {
    background: var(--border-light);
}
/* ---- 导出弹窗 ---- */
.export-range-btn,
.export-fmt-btn {
    flex: 1;
    padding: 10px 8px;
    border-radius: 10px;
    border: 1.5px solid var(--border-light);
    background: #fff;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: var(--font-family);
    transition: all 0.15s ease;
}
.export-range-btn.active,
.export-fmt-btn.active {
    border-color: var(--color-primary);
    background: var(--color-primary-light);
    color: var(--color-primary);
    font-weight: 600;
}
.export-range-btn:active,
.export-fmt-btn:active {
    transform: scale(0.96);
}

#export-confirm {
    margin-top: 8px;
}

.eb-filters { margin-bottom:10px; }
.eb-filter-row { display:flex; gap:6px; overflow-x:auto; padding-bottom:4px; }
.eb-filter-tag {
    padding: 6px 14px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-light);
    background: #fff;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: var(--font-family);
    transition: all 0.15s ease;
    white-space: nowrap;
}
.eb-filter-tag.active { background:var(--color-primary); color:#fff; border-color:var(--color-primary); }
.eb-filter-tag:active {
    transform: scale(0.95);
}

.eb-list { display:flex; flex-direction:column; gap:8px; }
.eb-card {
    background: #fff;
    border-radius: 14px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: all 0.15s ease;
}
.eb-card:active {
    transform: scale(0.98);
}
.eb-card-header {
    padding: 16px;
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}
.eb-subj-tag,.eb-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 500;
    flex-shrink: 0;
}
.eb-q { flex:1; font-size:0.78rem; color:#1e293b; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.eb-time { font-size:0.65rem; color:#94a3b8; flex-shrink:0; }
.eb-arrow { font-size:0.7rem; color:#94a3b8; transition:transform 0.2s; flex-shrink:0; }
.eb-expanded .eb-arrow { transform:rotate(180deg); }

.eb-card-body {
    display: none;
    padding: 0 16px 16px;
    border-top: 0.5px solid var(--border-light);
    margin: 0 16px;
}
.eb-expanded .eb-card-body { display:block; }
.eb-kp { font-size:0.7rem; color:var(--color-primary); margin-bottom:6px; }
.eb-full-question {
    padding: 12px;
    background: var(--bg-input);
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    margin-top: 12px;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    word-break: normal;
}
.eb-reply {
    margin-top: 10px;
    padding: 12px;
    background: #F8F9FB;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
}
.eb-notes {
    margin-top: 10px;
    padding: 10px 12px;
    background: #FFFDE7;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.5;
    color: #6D5E00;
    cursor: text;
}
.eb-notes:hover { background:#FFF9C4; }
.eb-notes-placeholder { color:#94a3b8; font-style:italic; }
.eb-notes-editing { cursor:text; }
.eb-notes-edit {
    width:100%; padding:8px; border:1px solid var(--color-primary);
    border-radius:6px; font-size:0.78rem; font-family:var(--font-family);
    resize:vertical; outline:none; background:#fff;
    min-height:60px;
}
.eb-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}
.eb-actions button {
    padding: 6px 12px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-light);
    background: #fff;
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: var(--font-family);
    transition: all 0.15s ease;
}
.eb-actions button:active {
    background: var(--color-primary-light);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.eb-empty {
    text-align: center;
    padding: 60px 24px;
    color: var(--text-secondary);
}
.eb-empty-icon {
    font-size: 56px;
    margin-bottom: 16px;
    opacity: 0.6;
}
.eb-empty p { font-size:0.82rem; color:#64748b; line-height:1.6; }
.eb-empty-btn {
    margin-top:14px; padding:10px 24px;
    background:var(--color-primary); color:var(--text-inverse); border:none; border-radius:10px;
    font-size:0.82rem; cursor:pointer;
}
/* ---- 添加错题按钮 ---- */
.add-mistake-btn {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: 2px dashed var(--border-light);
    background: #fff;
    font-size: 15px;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: var(--font-family);
    margin-bottom: 16px;
    transition: all 0.15s ease;
}
.add-mistake-btn:active {
    background: var(--color-primary-light);
    border-color: var(--color-primary);
    color: var(--color-primary);
}
/* ---- 手动录入标签 ---- */
.eb-manual-tag {
    font-size:0.6rem; color:#94a3b8; background:#f1f5f9;
    padding:2px 6px; border-radius:4px; flex-shrink:0;
}
.eb-photo { margin-bottom:8px; }
.eb-no-reply {
    font-size:0.75rem; color:#94a3b8; padding:10px;
    background:#f8fafc; border-radius:8px; text-align:center; margin-bottom:8px;
}
.form-hint {
    font-size: 12px;
    color: var(--text-tertiary);
    line-height: 1.5;
    margin-top: 6px;
}
.mistake-form-content { max-height: 80vh; overflow-y: auto; }
.mistake-form-content .form-group { margin-bottom:14px; }
.mistake-form-content .form-input {
    width:100%; padding:10px 12px; border:1px solid #e2e8f0;
    border-radius:8px; font-size:0.85rem; font-family:var(--font-family);
}
.mistake-form-content label { font-size:0.8rem; color:#475569; display:block; margin-bottom:4px; }

#mistake-photo-btn {
    padding: 14px;
    border-radius: 12px;
    border: 2px dashed var(--border-light);
    background: #fff;
    font-size: 15px;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: var(--font-family);
    transition: all 0.15s ease;
}
#mistake-photo-btn:active {
    background: var(--color-primary-light);
    border-color: var(--color-primary);
    color: var(--color-primary);
}
#mistake-photo-preview img {
    max-width: 100%;
    max-height: 160px;
    border-radius: 10px;
    border: 1px solid var(--border-light);
    object-fit: contain;
}
#mistake-save {
    margin-top: 6px;
}
#mistake-cancel {
    display: block;
    width: 100%;
    margin-top: 8px;
}

/* 小屏幕 tab 紧凑 */
@media (max-width:400px) {
    .tab-item .tab-label { font-size:0.6rem; }
    .tab-item .tab-icon { font-size:1rem; }
}

/* ================================================================
   创建老师表单
   ================================================================ */
.teacher-form-content { max-height: 80vh; }
/* 选择卡片 */
.ct-card {
    flex: 1;
    padding: 14px 10px;
    border-radius: 12px;
    border: 1.5px solid var(--border-light);
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    font-family: var(--font-family);
    text-align: center;
    transition: all 0.15s ease;
}
.ct-card.active {
    border-color: var(--color-primary);
    background: var(--color-primary-light);
    color: var(--color-primary);
    font-weight: 600;
}
.ct-card:active {
    transform: scale(0.96);
}
.ct-card small {
    display: block;
    font-size: 11px;
    font-weight: 400;
    opacity: 0.7;
    margin-top: 2px;
}
.ct-subjects, .ct-gender, .ct-age { display: flex; gap: 8px; }
/* 风格标签 */
.ct-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.ct-tag {
    padding: 8px 16px;
    border-radius: var(--radius-full);
    border: 1.5px solid var(--border-light);
    background: #fff;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: var(--font-family);
    transition: all 0.15s ease;
    -webkit-user-select: none;
    user-select: none;
}
.ct-tag.active {
    border-color: var(--color-primary);
    background: var(--color-primary-light);
    color: var(--color-primary);
    font-weight: 600;
}
.ct-tag:active {
    transform: scale(0.94);
}

#ct-submit {
    margin-bottom: 10px;
}
/* 表单输入 */
.form-input {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--border-light);
    border-radius: 12px;
    font-size: 15px;
    color: var(--text-primary);
    background: #fff;
    font-family: var(--font-family);
    resize: vertical;
    box-sizing: border-box;
}
.form-input:focus {
    outline: none;
    border-color: var(--color-primary);
}
.form-input::placeholder {
    color: var(--text-tertiary);
}
/* 自定义老师角标 */
.teacher-custom-badge {
    font-size: 0.625rem; padding: 1px 6px; border-radius: 8px;
    background: linear-gradient(135deg,#7c3aed,#a78bfa); color: #fff;
    font-weight: 600; vertical-align: middle;
}
.teacher-del-btn { border:none;background:none;font-size:1rem;cursor:pointer;padding:4px;opacity:0.4; }
.teacher-del-btn:hover { opacity:1;color:var(--color-danger); }



/* ================================================================
   学生画像（学情页）
   ================================================================ */
.profile-section {
    background: var(--color-white);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 12px;
    border: 1px solid var(--color-border);
}
.profile-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    margin: 0 0 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--color-border);
}
.profile-basic {
    display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px;
}
.profile-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.4;
}
.profile-name {
    background: #e0e7ff; color: #3730a3;
}
.profile-level {
    background: #fce7f3; color: #9d174d;
}
.profile-weak {
    background: #fef2f2; color: #b91c1c;
    border: 1px solid #fecaca;
}
.profile-strength {
    background: #f0fdf4; color: #15803d;
    border: 1px solid #bbf7d0;
}
.profile-tags {
    display: flex; gap: 4px; flex-wrap: wrap; margin: 4px 0;
}
.profile-subject {
    margin-bottom: 10px;
    padding: 8px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}
.profile-subj-header {
    font-size: 0.78rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 4px;
}
.profile-errors {
    font-size: 0.72rem;
    color: #64748b;
    margin-top: 4px;
    padding: 4px 8px;
    background: #fff;
    border-radius: 4px;
}
.profile-style {
    font-size: 0.78rem;
    color: #475569;
    padding: 6px 8px;
    margin: 6px 0;
    background: #f1f5f9;
    border-radius: 6px;
}
.profile-insight {
    font-size: 0.78rem;
    color: #0f172a;
    padding: 8px;
    margin: 6px 0;
    background: #fef9c3;
    border-radius: 6px;
    border-left: 3px solid #eab308;
}

/* --- 班主任问候弹窗 --- */
.greeting-overlay {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.3s;
}
.greeting-visible { opacity: 1; }
.greeting-fadeout { opacity: 0; pointer-events: none; }

.greeting-modal {
    background: #fff;
    border-radius: 16px;
    width: min(520px, 94vw);
    max-height: 66vh;
    padding: 28px 26px 22px;
    box-shadow: 0 16px 50px rgba(0,0,0,0.12);
    text-align: left;
    display: flex; flex-direction: column;
    animation: greetingSlideIn 0.35s ease-out;
}
@keyframes greetingSlideIn {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.greeting-modal-header {
    display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
}
.greeting-modal-avatar {
    font-size: 1.6rem; flex-shrink: 0;
}
.greeting-modal-title {
    flex: 1;
}
.greeting-modal-name {
    font-size: 0.95rem; font-weight: 600; color: #0f172a; line-height: 1.3;
}
.greeting-modal-subtitle {
    font-size: 0.68rem; color: #94a3b8;
}
.greeting-modal-body {
    font-size: 0.88rem; color: #334155; line-height: 1.8;
    padding: 16px 18px;
    background: #f8fafc;
    border-radius: 10px;
    margin-bottom: 16px;
    overflow-y: auto; max-height: 42vh;
}
.greeting-modal-actions {
    display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
}
.greeting-btn-chat {
    padding: 10px 18px; border: 1px solid #cbd5e1; border-radius: 12px;
    background: #fff; color: #475569; font-size: 0.82rem;
    cursor: pointer; transition: all 0.2s;
}
.greeting-btn-chat:hover {
    background: #f1f5f9; border-color: #94a3b8;
}
.greeting-btn-study {
    padding: 10px 18px; border: none; border-radius: 12px;
    background: var(--color-primary); color: #fff;
    font-size: 0.82rem; font-weight: 600; cursor: pointer;
    transition: all 0.2s;
}
.greeting-btn-study:hover {
    background: var(--color-primary-hover); transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}
.greeting-btn-ok {
    padding: 10px 18px; border: none; border-radius: 12px;
    background: linear-gradient(135deg, #059669, #10b981); color: #fff;
    font-size: 0.82rem; font-weight: 600; cursor: pointer;
    transition: all 0.2s;
}
.greeting-btn-ok:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

/* --- 诊断面板 --- */
.diagnosis-section {
    margin-bottom: 12px;
}
.diagnosis-summary {
    font-size: 0.82rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
    padding: 8px 10px;
    background: #f8fafc;
    border-radius: 8px;
}
.diagnosis-alert {
    display: flex; gap: 8px; align-items: flex-start;
    padding: 8px;
    margin-bottom: 6px;
    border-radius: 8px;
    border: 1px solid;
}
.diagnosis-red {
    background: #fef2f2; border-color: #fecaca;
}
.diagnosis-yellow {
    background: #fffbeb; border-color: #fde68a;
}
.diagnosis-green {
    background: #f0fdf4; border-color: #bbf7d0;
}
.diag-icon { font-size: 1rem; flex-shrink: 0; }
.diag-body { flex: 1; }
.diag-title {
    font-size: 0.78rem; font-weight: 600; color: #1e293b; margin-bottom: 2px;
}
.diag-detail {
    font-size: 0.72rem; color: #64748b; line-height: 1.4;
}
.diagnosis-recs {
    display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px;
}
.diag-rec {
    font-size: 0.72rem;
    padding: 3px 8px;
    background: #f1f5f9;
    border-radius: 6px;
    color: #475569;
}
.profile-actions {
    display: flex; gap: 6px; margin-top: 10px; padding-top: 8px;
    border-top: 1px solid var(--color-border);
}
.btn-action-small {
    font-size: 0.72rem;
    padding: 4px 10px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: var(--color-white);
    color: #475569;
    cursor: pointer;
    transition: all 0.15s;
}
.btn-action-small:hover {
    background: #f1f5f9;
    border-color: var(--color-primary);
    color: var(--color-primary);
}


/* ================================================================
   桌面端（>768px）：居中 480px + 左右留白
   ================================================================ */
@media (min-width: 769px) {
    html { background: #e2e8f0; }
    body {
        box-shadow: 0 0 30px rgba(0,0,0,0.12);
        border-left: 1px solid var(--color-border);
        border-right: 1px solid var(--color-border);
    }
}

/* ================================================================
   设置面板（PWA 新增）
   ================================================================ */
.settings-overlay { position:fixed; inset:0; z-index:9999; background:rgba(15,23,42,0.5); display:flex; align-items:flex-end; justify-content:center; }
.settings-panel { background:#fff; border-radius:16px 16px 0 0; width:100%; max-width:480px; max-height:85vh; padding:20px; overflow-y:auto; }
.settings-title { font-size:1.05rem; font-weight:700; margin-bottom:4px; }
.settings-desc { font-size:0.75rem; color:#64748b; margin-bottom:14px; }
.settings-field { margin-bottom:12px; }
.settings-field label { font-size:0.75rem; color:#475569; display:block; margin-bottom:4px; }
.settings-field input { width:100%; padding:8px 10px; border:1px solid #e2e8f0; border-radius:8px; font-size:0.8rem; }
.settings-actions { display:flex; gap:8px; margin-top:10px; }
.settings-actions button { flex:1; padding:10px; border:none; border-radius:10px; font-size:0.82rem; cursor:pointer; }
.btn-save { background:var(--color-primary); color:#fff; }
.btn-test { background:#f1f5f9; color:#475569; }
.settings-footer { font-size:0.65rem; color:#94a3b8; margin-top:10px; text-align:center; }
.settings-gear { margin-top:16px; text-align:center; }
.settings-gear button { background:none; border:1px solid #e2e8f0; border-radius:12px; padding:8px 18px; font-size:0.75rem; color:#64748b; cursor:pointer; }
/* ---- 学习模式切换栏 ---- */
.mode-tabs {
    display: flex; gap: 8px; padding: 8px 12px;
    overflow-x: auto; flex-shrink: 0;
}
.mode-tab {
    flex: 1; padding: 8px 12px; border-radius: var(--radius-full);
    border: 1px solid var(--border-light); background: var(--bg-card);
    font-size: 13px; text-align: center; cursor: pointer;
    white-space: nowrap; min-width: 0; color: var(--text-secondary);
    font-family: var(--font-family); transition: all var(--duration-fast) var(--ease-out);
}
.mode-tab:active { transform: scale(0.97); }
.mode-tab.active {
    background: var(--theme-primary); color: var(--text-inverse);
    border-color: var(--theme-primary);
    box-shadow: var(--theme-shadow);
}
/* ---- 难度选择栏 ---- */
.difficulty-bar {
    display: flex; gap: 6px; padding: 6px 12px;
    align-items: center; font-size: 13px; flex-shrink: 0;
    color: var(--color-text-secondary);
}
.diff-btn {
    padding: 4px 14px; border-radius: var(--radius-full);
    border: 1px solid var(--border-light); background: var(--bg-card);
    font-size: 12px; cursor: pointer;
    font-family: var(--font-family); transition: all var(--duration-fast) var(--ease-out);
    color: var(--text-secondary);
}
.diff-btn:active { transform: scale(0.97); }
.diff-btn.active {
    background: var(--theme-primary-light); border-color: var(--theme-primary);
    color: var(--theme-primary); font-weight: 600;
}
/* ---- 追问快捷入口 ---- */
.ai-quick-actions {
    display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap;
}
.ai-quick-actions button {
    padding: 6px 14px; border-radius: var(--radius-full);
    border: 1px solid var(--border-light); background: var(--bg-card);
    font-size: 12px; color: var(--text-secondary); cursor: pointer;
    min-height: 36px;
    font-family: var(--font-family); transition: all var(--duration-fast) var(--ease-out);
    -webkit-tap-highlight-color: transparent;
}
.ai-quick-actions button:active {
    background: var(--theme-primary-light);
    border-color: var(--theme-primary);
    color: var(--theme-primary);
    transform: scale(0.96);
}

/* 每日学习小结卡片 */
.daily-summary-card {
  background: linear-gradient(135deg, #f0f4ff 0%, #e8f0fe 100%);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  border: 1px solid #d0d9f0;
}
.daily-summary-card.daily-summary-empty {
  background: #f5f5f5;
  color: #999;
  text-align: center;
  padding: 24px 16px;
  font-size: 14px;
}
.daily-summary-title {
  font-size: 15px;
  font-weight: 600;
  color: #333;
  margin-bottom: 10px;
}
.daily-summary-stats {
  display: flex;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.daily-stat {
  font-size: 13px;
  color: #555;
  background: #fff;
  padding: 4px 10px;
  border-radius: 8px;
}
.daily-stat strong {
  color: #333;
}
.daily-summary-detail {
  font-size: 13px;
  color: #555;
  margin-bottom: 10px;
  line-height: 1.5;
}
.daily-summary-points {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.kp-tag {
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 10px;
  font-weight: 500;
}
.kp-tag.kp-mastered {
  background: #e6f7e6;
  color: #2d7d2d;
}
.kp-tag.kp-struggling {
  background: #fde8e8;
  color: #c62828;
}

/* 明日建议 */
.tomorrow-section {
  background: #fffdf5;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
  border: 1px solid #f0e8c0;
}
.tomorrow-title {
  font-size: 14px;
  font-weight: 600;
  color: #8d6e00;
  margin-bottom: 8px;
}
.tomorrow-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.tomorrow-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  margin-bottom: 6px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #f0e0a0;
  cursor: pointer;
  transition: background 0.15s;
  font-size: 13px;
  color: #444;
  line-height: 1.5;
}
.tomorrow-item:last-child {
  margin-bottom: 0;
}
.tomorrow-item:active {
  background: #fdf0c0;
}
.tomorrow-text {
  flex: 1;
  margin-right: 8px;
}
.tomorrow-arrow {
  font-size: 16px;
  color: #b8960c;
  flex-shrink: 0;
}

/* 周报 */
#weekly-report-area {
  margin-bottom: 16px;
}
.btn-weekly {
  width: 100%;
  padding: 12px;
  background: #fff;
  border: 2px dashed #ccc;
  border-radius: 12px;
  font-size: 14px;
  color: #666;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-weekly:active {
  background: #f5f5f5;
  border-color: #999;
}
.btn-weekly:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.weekly-report-card {
  background: #fff;
  border-radius: 12px;
  padding: 18px 16px;
  margin-top: 12px;
  border: 1px solid #e0e0e0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.wr-p {
  font-size: 14px;
  color: #444;
  line-height: 1.75;
  margin-bottom: 12px;
}
.wr-p:last-child {
  margin-bottom: 0;
}
.weekly-report-empty {
  text-align: center;
  padding: 20px;
  color: #999;
  font-size: 14px;
}

/* AI 每日小结段落 */
.ds-p {
  font-size: 14px;
  color: #444;
  line-height: 1.75;
  margin-bottom: 10px;
}
.ds-p:last-child {
  margin-bottom: 0;
}

/* 设置 - 学习信息 */
#settings-schedule {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #eee;
}
.settings-section-title {
  font-size: 15px;
  font-weight: 600;
  color: #333;
  margin-bottom: 6px;
}
.settings-hint {
  font-size: 12px;
  color: #999;
  margin-bottom: 14px;
  line-height: 1.5;
}
.settings-field {
  margin-bottom: 12px;
}
.settings-field label {
  display: block;
  font-size: 13px;
  color: #555;
  margin-bottom: 4px;
}
.settings-field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
  color: #333;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%23999'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.btn-settings-save {
  margin-top: 8px;
  padding: 10px 20px;
  background: #4a6cf7;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
}
.btn-settings-save:active {
  background: #3b5de7;
}
.settings-save-status {
  margin-left: 10px;
  font-size: 13px;
  color: #4caf50;
}

/* 考试成绩 */
#exam-section {
  margin-bottom: 16px;
}
.exam-trend-card {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid #e0e0e0;
}
.exam-trend-title {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 12px;
}
#exam-trend-canvas {
  width: 100%;
  height: auto;
  max-width: 480px;
  display: block;
}
.exam-trend-empty {
  text-align: center;
  padding: 24px;
  color: #999;
  font-size: 14px;
  background: #fafafa;
  border-radius: 12px;
}
.exam-entry-card {
  background: #fafbfc;
  border-radius: 12px;
  padding: 16px;
  border: 1px dashed #ddd;
}
.exam-entry-title {
  font-size: 13px;
  font-weight: 600;
  color: #666;
  margin-bottom: 10px;
}
.exam-entry-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.exam-entry-fields select,
.exam-entry-fields input {
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  color: #333;
  background: #fff;
}
.exam-entry-fields select {
  min-width: 80px;
}
#exam-score {
  width: 60px;
}
#exam-fullscore {
  width: 50px;
}
.exam-score-divider {
  font-size: 16px;
  color: #999;
}
#exam-name {
  flex: 1;
  min-width: 120px;
}
#exam-date {
  width: 130px;
}
#exam-notes {
  width: 100%;
  resize: vertical;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
}
.btn-exam-save {
  padding: 8px 18px;
  background: #4a6cf7;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
}
.btn-exam-save:active {
  background: #3b5de7;
}
#exam-save-status {
  font-size: 13px;
  color: #4caf50;
}

/* 聊聊最近 */
.chat-entry-card {
  background: #fefdf8;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  border: 1px solid #f0ead0;
}
.chat-entry-title {
  font-size: 14px;
  font-weight: 600;
  color: #6b5e00;
  margin-bottom: 6px;
}
.chat-entry-hint {
  font-size: 12px;
  color: #999;
  margin-bottom: 10px;
  line-height: 1.5;
}
#chat-entry-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e0dcc0;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  color: #333;
  background: #fff;
  box-sizing: border-box;
}
#chat-entry-input::placeholder {
  color: #bbb;
}
.btn-chat-entry {
  margin-top: 8px;
  padding: 10px 20px;
  background: #8d7b20;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
}
.btn-chat-entry:active {
  background: #6e5f18;
}
.btn-chat-entry:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.chat-response-bubble {
  margin-top: 12px;
  padding: 14px 16px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e8e4d0;
}
.chat-response-text {
  font-size: 14px;
  color: #444;
  line-height: 1.75;
}
.chat-response-text p {
  margin: 0 0 8px 0;
}
.chat-response-text p:last-child {
  margin-bottom: 0;
}

/* 反馈区 */
.feedback-section {
  margin-top: 16px;
  padding: 16px;
  background: #fff;
  border-radius: 12px;
}
.feedback-title {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 10px;
}
.feedback-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  color: #333;
  box-sizing: border-box;
}
.feedback-contact {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 13px;
  margin-top: 8px;
  margin-bottom: 8px;
  box-sizing: border-box;
}
.btn-feedback {
  padding: 10px 20px;
  background: #4a6cf7;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
}
.btn-feedback:active {
  background: #3b5de7;
}
.btn-feedback:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.feedback-status {
  margin-left: 10px;
  font-size: 13px;
  color: #4caf50;
}
