/* ============================================================
   人工智能简史 · E04 课件共享样式（框架参考 experience/C41/lesson5）
   每课在 <html> 上设置 --acc / --acc2（本站主题色）与 --emoji
   ============================================================ */
:root {
    --acc: #4F6DF5;
    --acc2: #8FA8FF;
    --paper: #fafaf8;
    --paper2: #f5f0eb;
    --paper3: #ede5db;
    --ink: #2d2d2d;
    --ink2: #4a4a4a;
    --ink3: #8a8a8a;
    --rule: rgba(0,0,0,0.06);
    /* ── 实验室统一设计变量（各 lab 样式逐步对齐到这里）── */
    --lab-acc: #1ABC9C;
    --lab-acc2: #82E0AA;
    --lab-deep: #0e6e5f;
    --lab-mid: #2d8b7c;
    --lab-soft: #eefaf6;
    --lab-line: #d7eee6;
    --lab-ink: #12302b;
    --lab-ink2: #4c6b64;
    --lab-ink3: #8ba8a0;
    --lab-gold: #f6b93b;
    --lab-gold-soft: #fdf3dd;
    --lab-ok: #16c784;
    --lab-ok-soft: #e3f9f0;
    --lab-err: #f0446a;
    --lab-blue: #2f6bff;
    --font-serif: 'Noto Serif SC', serif;
    --font-doodle: 'ZCOOL KuaiLe', cursive;
    --font-el: 'Cormorant Garamond', serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", STHeiti, "Microsoft YaHei", Tahoma, Arial, sans-serif;
    background: var(--paper);
    color: var(--ink);
    min-height: 100vh;
    overflow-x: hidden;
    padding-bottom: 78px; /* 给底部导航留位 */
}
body::before {
    content: '';
    position: fixed; inset: 0; pointer-events: none; z-index: 0;
    background:
        radial-gradient(circle at 10% 10%, color-mix(in srgb, var(--acc) 7%, transparent) 0%, transparent 32%),
        radial-gradient(circle at 92% 15%, color-mix(in srgb, var(--acc2) 7%, transparent) 0%, transparent 30%),
        radial-gradient(circle at 12% 80%, color-mix(in srgb, var(--acc2) 5%, transparent) 0%, transparent 28%),
        radial-gradient(circle at 88% 78%, color-mix(in srgb, var(--acc) 6%, transparent) 0%, transparent 34%);
}

.wrap { max-width: 960px; margin: 0 auto; padding: 18px 16px 40px; position: relative; z-index: 1; }

/* ===== 页头 ===== */
.hd { background: #fff; border-radius: 18px; padding: 18px 22px 16px; margin-bottom: 16px;
      border: 1px solid var(--rule); box-shadow: 0 6px 24px rgba(0,0,0,.05); position: relative; }
.hd-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.back-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--ink2);
             text-decoration: none; padding: 7px 15px; border-radius: 30px; background: var(--paper2);
             border: 1px solid var(--rule); transition: all .2s; font-family: var(--font-doodle); }
.back-chip:hover { background: color-mix(in srgb, var(--acc) 12%, #fff); color: var(--acc); transform: translateY(-1px); }
.hd-badge { font-family: var(--font-el); font-size: 12px; font-weight: 700; color: #fff; padding: 4px 13px; border-radius: 20px;
            background: linear-gradient(135deg, var(--acc), var(--acc2)); letter-spacing: .4px; }
.hd-step { font-size: 12px; color: var(--ink3); font-weight: 700; }
/* 学科名片：页头右上角标签 + 悬停/点击弹出的定义窗 */
.brx { margin-left: auto; position: relative; display: inline-flex; align-items: center;
       font-size: 11.5px; font-weight: 800; color: color-mix(in srgb, var(--acc) 78%, #000);
       background: color-mix(in srgb, var(--acc) 11%, #fff);
       border: 1px solid color-mix(in srgb, var(--acc) 30%, #fff);
       border-radius: 20px; padding: 4px 12px; cursor: help; outline: none;
       transition: background .18s, box-shadow .18s; }
.brx:hover, .brx:focus, .brx.open { background: color-mix(in srgb, var(--acc) 20%, #fff);
       box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--acc) 70%, transparent); }
.brx::after { content: '?'; display: inline-block; margin-left: 5px; width: 13px; height: 13px; line-height: 13px;
       text-align: center; border-radius: 50%; font-size: 9px; font-weight: 900;
       background: color-mix(in srgb, var(--acc) 70%, #fff); color: #fff; }
.brx-pop { position: absolute; top: calc(100% + 10px); right: 0; width: 312px; z-index: 70;
       background: #fff; border: 1px solid color-mix(in srgb, var(--acc) 22%, #fff); border-radius: 14px;
       box-shadow: 0 20px 46px -20px rgba(20,30,70,.45); padding: 13px 15px 14px;
       text-align: left; line-height: 1.75; cursor: default;
       opacity: 0; visibility: hidden; transform: translateY(-6px); pointer-events: none;
       transition: opacity .18s, transform .18s, visibility .18s; }
.brx:hover .brx-pop, .brx:focus .brx-pop, .brx.open .brx-pop { opacity: 1; visibility: visible; transform: translateY(0); }
.brx-pop::before { content: ''; position: absolute; top: -6px; right: 20px; width: 11px; height: 11px;
       background: #fff; border-left: 1px solid color-mix(in srgb, var(--acc) 22%, #fff);
       border-top: 1px solid color-mix(in srgb, var(--acc) 22%, #fff); transform: rotate(45deg); }
.brx-pop b { display: block; font-size: 13.5px; color: #16264d; margin-bottom: 5px; }
.brx-pop > span { display: block; font-size: 12px; color: #5b6488; }
.brx-pop .bx-lv { margin-top: 8px; font-size: 11.5px; color: #147a4a; background: #eef8f2; border-radius: 8px; padding: 6px 9px; }
.brx-pop .bx-here { margin-top: 6px; font-size: 11.5px; color: #6b3fbf; background: #f5f0ff; border-radius: 8px; padding: 6px 9px; }
@media (max-width: 640px) {
    .hd-step { width: 100%; }
    .brx { margin-left: 0; }
    .brx-pop { right: auto; left: 0; width: min(86vw, 312px); }
    .brx-pop::before { right: auto; left: 18px; }
}
.hd-title { font-family: var(--font-doodle); font-size: 26px; line-height: 1.3; color: var(--ink); margin-top: 8px;
            display: inline-block; position: relative; padding-bottom: 4px; }
.hd-title::after { content: ''; position: absolute; left: 0; bottom: 0; width: 100%; height: 6px; border-radius: 3px; opacity: .55;
                   background: repeating-linear-gradient(90deg, var(--acc) 0 10px, var(--acc2) 10px 20px, #ffd93d 20px 30px, var(--acc) 30px 40px); }
.hd-goal { margin-top: 10px; font-size: 13.5px; line-height: 1.7; color: var(--ink2);
           background: color-mix(in srgb, var(--acc) 6%, #fff); border-left: 4px solid var(--acc);
           border-radius: 0 10px 10px 0; padding: 9px 14px; }

/* ===== 幻灯片 ===== */
.slide { display: none; animation: fadeIn .35s ease; }
.slide.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

.card { background: #fff; border-radius: 18px; padding: 22px 24px; margin-bottom: 14px;
        border: 1px solid var(--rule); box-shadow: 0 4px 18px rgba(0,0,0,.05); }
.card h2 { font-family: var(--font-serif); font-size: 20px; font-weight: 900; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.card h2::after { content: ''; flex: 1; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--acc), transparent); }

/* ===== 封面 ===== */
.cover { border-radius: 22px; padding: 34px 26px 30px; text-align: center; color: #fff; position: relative; overflow: hidden;
         background: linear-gradient(135deg, var(--acc), var(--acc2));
         box-shadow: 0 18px 44px -18px var(--acc); margin-bottom: 16px; }
.cover .yr { position: absolute; right: 18px; top: 6px; font-family: var(--font-el); font-size: 96px; font-weight: 800; opacity: .18; line-height: 1; }
.cover .c-emoji { font-size: 60px; display: block; filter: drop-shadow(0 4px 8px rgba(0,0,0,.18)); }
.cover .c-station { display: inline-block; background: rgba(255,255,255,.22); border: 1px solid rgba(255,255,255,.4);
                    padding: 3px 16px; border-radius: 30px; font-size: 13px; font-weight: 800; margin: 8px 0 6px; }
.cover h1 { font-family: var(--font-serif); font-size: 32px; font-weight: 900; line-height: 1.35; margin-bottom: 6px; }
.cover .c-sub { font-size: 15px; opacity: .95; margin-bottom: 14px; }
.cover .c-goal { display: inline-block; width: max-content; max-width: 100%; background: rgba(255,255,255,.16); border-radius: 14px;
                 padding: 10px 18px; font-size: 14px; line-height: 1.8; text-align: left; }
.start-btn { display: block; width: max-content; margin: 18px auto 0; background: #fff; color: var(--acc); border: none; cursor: pointer;
             font-family: var(--font-doodle); font-size: 17px; font-weight: 700; padding: 11px 32px; border-radius: 40px;
             transition: all .2s; box-shadow: 0 6px 16px rgba(0,0,0,.16); }
.start-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(0,0,0,.22); }

/* ===== 故事 ===== */
.story p { font-size: 16px; line-height: 2.05; color: #3d3a34; margin-bottom: 10px; }
.story p:last-child { margin-bottom: 0; }
.story-mark { display: inline-block; font-size: 12px; font-weight: 700; color: var(--acc); background: color-mix(in srgb, var(--acc) 10%, #fff);
              padding: 3px 12px; border-radius: 20px; margin-bottom: 10px; }

/* ===== 故事页 · 人物/场景配图 ===== */
.story-fig { margin: 6px 0 14px; }
.story-fig.person { display: flex; align-items: center; gap: 18px; background: color-mix(in srgb, var(--acc) 6%, #fff);
                    border: 1px solid color-mix(in srgb, var(--acc) 22%, #fff); border-radius: 16px; padding: 14px 16px; }
.fig-photo { flex: 0 0 auto; }
.fig-photo img { width: 150px; height: 178px; object-fit: cover; border-radius: 14px; border: 3px solid #fff;
                 box-shadow: 0 6px 18px rgba(0,0,0,.16); background: #eee; }
.fig-info { min-width: 0; }
.fig-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.fig-name { font-family: var(--font-serif); font-size: 21px; font-weight: 900; color: var(--acc); }
.fig-en { font-size: 12.5px; color: var(--ink3); font-weight: 600; letter-spacing: .3px; }
.fig-years { font-size: 12px; color: var(--ink3); margin-top: 2px; font-weight: 700; }
.fig-role { font-size: 13.5px; font-weight: 700; color: #6b5b2f; background: #fff6e5; border-radius: 8px;
            display: inline-block; padding: 2px 10px; margin-top: 5px; }
.fig-facts { margin: 9px 0 0; padding: 0; list-style: none; }
.fig-facts li { position: relative; padding-left: 18px; font-size: 13.5px; line-height: 1.75; color: #4a463f; }
.fig-facts li::before { content: '✦'; position: absolute; left: 0; top: 0; color: var(--acc); font-size: 11px; }

.story-fig.scene { text-align: center; }
.story-fig.scene img { max-width: min(460px, 86%); max-height: 300px; object-fit: cover; border-radius: 14px;
                       border: 1px solid var(--rule); box-shadow: 0 8px 22px rgba(0,0,0,.10); }
.story-fig.scene figcaption { font-size: 13px; color: var(--ink2); line-height: 1.7; margin-top: 8px; text-align: center; }
.fig-credit { font-size: 11.5px; color: var(--ink3); text-align: right; margin: 2px 0 8px; opacity: .85; }
@media (max-width: 620px) {
    .story-fig.person { flex-direction: column; text-align: center; }
    .fig-facts { text-align: left; }
}

/* ===== 故事正文 · 纵向 timeline ===== */
.story-tl { position: relative; margin: 4px 0 2px; }
.story-tl::before { content: ''; position: absolute; left: 9px; top: 12px; bottom: 12px; width: 3px; border-radius: 3px;
                    background: linear-gradient(180deg, var(--acc), var(--acc2), color-mix(in srgb, var(--acc) 50%, transparent)); opacity: .45; }
.st-item { position: relative; padding-left: 36px; margin-bottom: 12px; }
.st-item:last-child { margin-bottom: 0; }
.st-dot { position: absolute; left: 0; top: 14px; width: 21px; height: 21px; border-radius: 50%;
          background: linear-gradient(135deg, var(--acc), var(--acc2)); border: 3px solid #fff; z-index: 1;
          box-shadow: 0 2px 6px color-mix(in srgb, var(--acc) 45%, transparent); }
.st-card { position: relative; background: #fff; border: 1px solid color-mix(in srgb, var(--acc) 18%, #fff);
           border-radius: 14px; padding: 11px 16px 12px; box-shadow: 0 3px 12px rgba(0,0,0,.04); }
.st-chip { display: inline-block; font-size: 11.5px; font-weight: 800; color: #fff; letter-spacing: .5px;
           background: linear-gradient(135deg, var(--acc), var(--acc2)); padding: 2px 11px; border-radius: 20px; margin-bottom: 6px; }
.st-card p { font-size: 15.5px; line-height: 1.95; color: #3d3a34; margin: 0 !important; }
/* 故事线 · 每条时间点的配图（第 1 课 / 第 7 课共用）：左图右文 */
.st-body { display: flex; gap: 14px; align-items: center; }
.st-body > p { flex: 1; min-width: 0; }
.st-body > .st-text { flex: 1; min-width: 0; }
.st-fig { flex: 0 0 300px; margin: 0; }
.st-fig img { display: block; width: 100%; height: 197px; object-fit: contain; border-radius: 12px;
              border: 1px solid color-mix(in srgb, var(--acc) 18%, #fff); background: #f4f6fb; }
.st-fig.face img { object-position: 50% 32%; }
.st-fig.chipshot img { object-position: 50% 8%; }
.st-fig.cab img { object-position: 50% 38%; }
.st-fig figcaption { font-size: 11.5px; line-height: 1.6; color: var(--ink3); margin-top: 6px; }
.st-fig .st-credit { display: block; opacity: .85; }
/* 一条时间点放两张图：左栏上下叠放（窄屏自动并排） */
.st-figs { flex: 0 0 300px; display: flex; flex-direction: column; gap: 10px; margin: 0; }
.st-figs .st-fig { flex: none; }
.st-figs .st-fig img { height: 128px; }
/* 左栏图组：4 张及以上用两列网格，避免左栏被拉得太长 */
.st-figs.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.st-figs.grid .st-fig img { height: 96px; }
.st-figs.grid .st-fig figcaption { font-size: 10.5px; line-height: 1.5; }
/* 超宽横幅图（如第 5 / 8 课的横构图）：文字在上，图铺满卡片宽度 */
.st-body.stack { display: block; }
.st-body.stack .st-fig { width: 100%; margin: 10px 0 0; }
/* 「左图右文」但 DOM 里文字在前（利于读屏）：用 order 把图换到左栅 */
.st-body.split > .st-fig { order: -1; }
/* 左栅容器：需要「图 + 别的视觉元素」一起待在左边时用（如第 2 课：“提案图 + 四位提出者头像”）
   注意保持 flex: 0 0 300px，否则右侧正文会被挤窄 */
.st-body > .st-left { flex: 0 0 300px; min-width: 0; }
.st-body > .st-left .st-fig { flex: none; width: 100%; margin: 0; }
.st-body.stack .st-fig img { height: auto; max-height: 260px; }/* 一条时间点放三张图：钺满卡片宽度的三格图廊 */
.st-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 12px 0 0; }
.st-body .st-strip .st-fig { flex: none; width: auto; margin: 0; }
.st-body .st-strip .st-fig img { height: 150px; max-height: 150px; }@media (max-width: 620px) {
    .story-tl::before { left: 7px; }
    .st-item { padding-left: 28px; }
    .st-dot { width: 18px; height: 18px; top: 13px; }
    .st-body { display: block; }
    .st-fig { margin: 0 0 10px; }
    .st-fig img { height: 184px; }
    .st-fig.dia img { height: auto; }
    .st-figs { flex: none; width: 100%; flex-direction: row; gap: 8px; margin: 0 0 10px; }
    .st-figs .st-fig { flex: 1 1 0; min-width: 0; margin: 0; }
    .st-figs .st-fig img { height: 150px; }
    .st-body.stack .st-fig { margin: 10px 0 0; }
    .st-strip { grid-template-columns: 1fr; }
}

/* ===== 第1课 · 人机猜猜看训练器 ===== */
.tt { background: linear-gradient(180deg, color-mix(in srgb, var(--acc) 5%, #fff), #fff);
      border: 1px solid color-mix(in srgb, var(--acc) 20%, #fff); border-radius: 18px; padding: 16px 16px 14px;
      box-shadow: 0 10px 24px -20px var(--acc); }
.tt-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.tt-badge { font-family: var(--font-serif); font-weight: 900; color: var(--acc); font-size: 16px; }
.tt-round { font-size: 12.5px; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--acc), var(--acc2)); border-radius: 20px; padding: 3px 12px; }
.tt-tip { font-size: 13px; color: var(--ink3); line-height: 1.7; margin-bottom: 10px; }
.tt-stage { border: 1px solid color-mix(in srgb, var(--acc) 20%, #fff); border-radius: 14px; overflow: hidden; background: #fff; }
.tt-opp { display: flex; justify-content: space-between; align-items: center; padding: 8px 14px; background: color-mix(in srgb, var(--acc) 8%, #fff); font-size: 13px; font-weight: 700; color: var(--ink2); }
.tt-status { font-size: 11px; color: #1bb56a; background: #e8f8ef; border-radius: 12px; padding: 1px 8px; }
.tt-chat { max-height: 240px; min-height: 90px; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.tt-bub { max-width: 84%; padding: 8px 13px; border-radius: 14px; font-size: 14px; line-height: 1.7; color: #333; }
.tt-bub.me { align-self: flex-end; background: linear-gradient(135deg, var(--acc), var(--acc2)); color: #fff; border-bottom-right-radius: 4px; }
.tt-bub.bot { align-self: flex-start; background: var(--paper2); border: 1px solid var(--rule); border-bottom-left-radius: 4px; }
.tt-bub.win { background: #e9f9ef; border: 1px solid #7fd8ab; color: #157a4a; }
.tt-bub.lose { background: #fdeeee; border: 1px solid #f2a9a9; color: #a33; }
.tt-actions, .tt-guess, .tt-ctrl { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tt-input { display: flex; gap: 8px; margin-top: 10px; }
.tt-input input { flex: 1; min-width: 0; border: 1.5px solid color-mix(in srgb, var(--acc) 30%, #fff); border-radius: 30px; padding: 9px 16px; font-size: 14px; font-family: inherit; outline: none; background: #fff; color: #333; }
.tt-input input:focus { border-color: var(--acc); }
.tt-input input:disabled { background: #f4f4f4; opacity: .7; }
.tt-actions { justify-content: center; }
.tt-guess { justify-content: center; }
.tt-ctrl { justify-content: center; }
.tt-btn { border: 1.5px solid color-mix(in srgb, var(--acc) 40%, #fff); cursor: pointer; font-family: inherit; font-size: 13px; font-weight: 700; padding: 8px 14px; border-radius: 30px; background: #fff; color: var(--acc); transition: all .15s; }
.tt-btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(0,0,0,.08); }
.tt-btn:disabled { opacity: .45; cursor: default; }
.tt-btn.human { color: #1e8e5a; border-color: #9ad9bb; }
.tt-btn.bot { color: #4F6DF5; border-color: #aeb9f7; }
.tt-btn.primary { background: linear-gradient(135deg, var(--acc), var(--acc2)); color: #fff; border: none; }
.tt-btn.ghost { background: transparent; }
.tt-result { margin-top: 10px; padding: 10px 14px; border-radius: 12px; font-size: 14px; line-height: 1.8; background: color-mix(in srgb, var(--acc) 6%, #fff); color: #333; display: none; }
.tt-result.show { display: block; animation: fadeIn .3s ease; }
.tt-result.ok { background: #e9f9ef; }
.tt-result.no { background: #fdeeee; }
.tt-score { margin-top: 10px; text-align: center; font-size: 13px; color: var(--ink3); font-weight: 600; }
.tt-score b { color: var(--acc); font-size: 16px; }
.tt-dot { color: #ddd; margin-left: 2px; }
.tt-dot.on { color: var(--acc); }
.tt-recap { margin-top: 12px; font-size: 13px; color: var(--ink3); line-height: 1.9; background: #fff7e8; border: 1px dashed #f0c98a; border-radius: 12px; padding: 10px 14px; }
@media (max-width: 620px) {
    .tt { padding: 12px 10px; }
    .tt-badge { font-size: 14px; }
}

/* ===== 知识翻牌 ===== */
.k-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.kcard { perspective: 900px; height: 150px; cursor: pointer; }
.kcard-inner { position: relative; width: 100%; height: 100%; transition: transform .5s; transform-style: preserve-3d; }
.kcard.open .kcard-inner { transform: rotateY(180deg); }
.kfront, .kback { position: absolute; inset: 0; backface-visibility: hidden; border-radius: 14px; padding: 14px;
                  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; }
.kfront { background: color-mix(in srgb, var(--acc) 8%, #fff); border: 2px solid color-mix(in srgb, var(--acc) 30%, #fff); }
.kfront .kt { font-size: 18px; }
.kfront .kh { font-family: var(--font-serif); font-weight: 900; color: var(--acc); font-size: 15px; }
.kfront .ktip { font-size: 12px; color: var(--ink3); }
.kback { background: #fff; border: 2px dashed color-mix(in srgb, var(--acc) 45%, #fff); transform: rotateY(180deg);
         font-size: 13px; line-height: 1.7; color: var(--ink2); }

/* ===== 小任务 ===== */
/* ========== 第2课 · 演化时光机（时间轴：单细胞→智慧 · 沿途讨论 智力/智能/智慧） ========== */
.etl-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.etl-badge { font-family: var(--font-serif); font-weight: 900; color: var(--acc); font-size: 16px; }
.etl-tip { font-size: 13px; color: var(--ink3); line-height: 1.75; margin-bottom: 12px; background: #fffdf2; border: 1px dashed #f0c98a; border-radius: 12px; padding: 8px 12px; }
.etl { position: relative; margin-top: 2px; }
.etl::before { content: ''; position: absolute; left: 19px; top: 6px; bottom: 10px; width: 3px; border-radius: 3px;
  background: linear-gradient(180deg, #f7c878 0%, #7fbfe0 22%, #f0a6c9 40%, #7ea0ff 58%, #7ad1a8 78%, #c98af0 100%); opacity: .5; }
.etl-stop { position: relative; display: flex; gap: 14px; }
.etl-ic { flex: 0 0 40px; height: 40px; border-radius: 50%; background: #fff; border: 2px solid #e6e9f2;
  display: flex; align-items: center; justify-content: center; font-size: 20px; box-shadow: 0 2px 6px rgba(0, 0, 0, .05); z-index: 1; }
.etl-body { flex: 1; min-width: 0; background: #fff; border: 1px solid var(--rule); border-radius: 14px; padding: 10px 12px 8px; margin-bottom: 12px; box-shadow: 0 2px 8px -5px rgba(0, 0, 0, .06); }
.etl-nhead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 5px; }
.etl-nhead b { font-size: 14.5px; color: var(--ink2); }
.etl-year { font-size: 11px; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--acc), var(--acc2)); border-radius: 12px; padding: 2px 9px; }
.etl-txt { font-size: 13px; color: #4a4f63; line-height: 1.75; margin-bottom: 6px; }
.etl-fig { margin: 1px 0 8px; }
.etl-img { width: 100%; height: 155px; object-fit: cover; border-radius: 12px; border: 1px solid var(--rule); display: block; background: #f4f6fb; cursor: zoom-in; }
.etl-cap { font-size: 11px; color: #8a93b8; line-height: 1.65; margin-top: 5px; }
.etl-lic { opacity: .85; }
/* 配图灯箱：点击放大看全图 */
.etl-lb { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center;
  background: rgba(13, 20, 38, .88); opacity: 0; pointer-events: none; transition: opacity .22s ease; }
.etl-lb.open { opacity: 1; pointer-events: auto; }
.etl-lb-btn { position: absolute; z-index: 2; width: 46px; height: 46px; border: none; border-radius: 50%; cursor: pointer;
  background: rgba(255, 255, 255, .16); color: #fff; font-size: 22px; line-height: 1; transition: background .15s, transform .15s; }
.etl-lb-btn:hover { background: rgba(255, 255, 255, .34); transform: scale(1.06); }
.etl-lb-close { top: 18px; right: 20px; }
.etl-lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.etl-lb-next { right: 18px; top: 50%; transform: translateY(-50%); }
.etl-lb-fig { max-width: 92vw; max-height: 88vh; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 0 64px; margin: 0; }
.etl-lb-img { max-width: 100%; max-height: 76vh; width: auto; height: auto; object-fit: contain; border-radius: 10px;
  background: #fff; box-shadow: 0 18px 60px rgba(0, 0, 0, .5); }
.etl-lb-cap { color: #dbe1f2; font-size: 13px; line-height: 1.7; text-align: center; max-width: 88vw; }
.etl-lb-cap .etl-lic { opacity: .8; }
@media (max-width: 640px) { .etl-lb-fig { padding: 0 8px; } .etl-lb-prev { left: 6px; } .etl-lb-next { right: 6px; } }
.etl-lv { display: inline-block; font-size: 12px; font-weight: 700; border: 1px solid; border-radius: 12px; padding: 2px 10px; margin-bottom: 6px; line-height: 1.7; }
.etl-lv b { color: inherit; }
.etl-lv i { font-style: normal; font-weight: 600; opacity: .85; }
.etl-qq { font-size: 13px; font-weight: 700; color: #7a5b1e; background: #fff8e6; border: 1px dashed #f0c98a; border-radius: 10px; padding: 5px 10px; margin-bottom: 6px; line-height: 1.6; }
.etl-q { font-family: inherit; font-size: 12.5px; font-weight: 700; color: var(--acc); background: #eef7f1; border: 1.5px solid color-mix(in srgb, var(--acc) 35%, #fff); border-radius: 20px; padding: 5px 14px; cursor: pointer; transition: all .15s; }
.etl-q:hover { transform: translateY(-1px); box-shadow: 0 3px 8px rgba(0, 0, 0, .08); }
.etl-a { display: none; }
.etl-disc.open .etl-a { display: block; animation: fadeIn .25s ease; }
.etl-a-in { margin-top: 7px; background: #f0f7ff; border-left: 3px solid #7ea0ff; border-radius: 0 10px 10px 0; padding: 8px 12px; }
.etl-tag { display: inline-block; font-size: 11px; font-weight: 800; color: #4F6DF5; margin-bottom: 4px; }
.etl-a-in p { font-size: 13px; color: #38415f; line-height: 1.75; margin-top: 4px; }
.etl-final { background: linear-gradient(135deg, #fff, #faf7ff); border: 2px solid #e3d5f5; border-radius: 16px; padding: 14px 16px; margin: 2px 0 4px 54px; }
.etl-fhead { font-family: var(--font-serif); font-weight: 900; color: #7c3aed; font-size: 16px; margin-bottom: 4px; }
.etl-ftxt { font-size: 13px; color: var(--ink3); margin-bottom: 10px; }
.etl-trio { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.etl-trio-c { background: #fff; border: 1.5px solid color-mix(in srgb, var(--c) 45%, #fff); border-top: 4px solid var(--c); border-radius: 12px; padding: 9px 10px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; }
.etl-trio-c i { font-style: normal; font-size: 24px; }
.etl-trio-c b { font-size: 15px; color: var(--c); }
.etl-trio-c span { font-size: 12px; color: #5a5f72; line-height: 1.6; }
.etl-fask { margin-top: 10px; font-size: 13px; font-weight: 700; color: #6a4c9c; background: #f6efff; border: 1px dashed #d5b8f0; border-radius: 12px; padding: 8px 12px; line-height: 1.7; }
@media (max-width: 640px) { .etl-trio { grid-template-columns: 1fr; } }

.task-item { display: flex; align-items: flex-start; gap: 12px; background: var(--paper2); border-radius: 14px;
             padding: 13px 16px; margin-bottom: 10px; border: 1px solid var(--rule); transition: all .2s; }
.task-item.done { background: color-mix(in srgb, var(--acc) 8%, #fff); border-color: color-mix(in srgb, var(--acc) 35%, #fff); }
.task-check { flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--acc); background: #fff;
              color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; cursor: pointer; transition: all .2s; }
.task-item.done .task-check { background: var(--acc); }
.task-txt { flex: 1; font-size: 14.5px; line-height: 1.8; color: var(--ink2); }
.task-item.done .task-txt { color: var(--ink3); text-decoration: line-through; }
.task-progress { text-align: center; font-size: 13px; font-weight: 700; color: var(--acc); margin-top: 4px; }

/* ===== 小测验 ===== */
.quiz-item { border-top: 1px dashed var(--rule); padding: 14px 0 6px; }
.quiz-item:first-of-type { border-top: none; }
.quiz-q { font-size: 15px; font-weight: 700; margin-bottom: 10px; line-height: 1.7; }
.quiz-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.quiz-opt { padding: 9px 16px; border-radius: 30px; border: 2px solid #eae6de; background: #fbf9f5; font-size: 14px;
            font-weight: 600; color: var(--ink2); cursor: pointer; transition: all .18s; font-family: inherit; }
.quiz-opt:hover { border-color: var(--acc); transform: translateY(-1px); }
.quiz-opt.right { border-color: #27ae60; background: #e8f8ef; color: #1e8e52; }
.quiz-opt.wrong { border-color: #e0563f; background: #fdecea; color: #c0392b; }
.quiz-fb { min-height: 20px; font-size: 13px; font-weight: 700; margin-top: 8px; }
.quiz-fb.ok { color: #1e9e6a; }
.quiz-fb.no { color: #c0392b; }
.quiz-actions { display: flex; gap: 10px; justify-content: center; margin-top: 12px; flex-wrap: wrap; }
.qbtn { padding: 10px 22px; border-radius: 40px; border: none; cursor: pointer; font-size: 14px; font-weight: 700;
        font-family: var(--font-doodle); transition: all .2s; }
.qbtn.primary { background: linear-gradient(135deg, var(--acc), var(--acc2)); color: #fff; box-shadow: 0 6px 16px -6px var(--acc); }
.qbtn.primary:hover { transform: translateY(-2px); }
.qbtn.ghost { background: var(--paper2); color: var(--ink2); border: 1px solid var(--rule); }
.quiz-result { text-align: center; font-size: 15px; font-weight: 800; color: var(--acc); margin-top: 6px; min-height: 22px; }

/* ===== 反思/完课 ===== */
.field { margin-bottom: 12px; }
.field label { display: block; font-weight: 700; font-size: 13.5px; margin-bottom: 6px; color: var(--ink2); }
.field input, .field textarea { width: 100%; padding: 11px 14px; border-radius: 12px; border: 2px solid var(--rule);
                                font-size: 14px; font-family: inherit; background: var(--paper); resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--acc); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.chip { padding: 6px 14px; border-radius: 30px; background: var(--paper2); border: 1px solid var(--rule); font-size: 12.5px;
        cursor: pointer; transition: all .18s; }
.chip:hover { background: color-mix(in srgb, var(--acc) 12%, #fff); color: var(--acc); }
.finish-msg { text-align: center; font-size: 13px; font-weight: 700; color: #27ae60; min-height: 20px; margin-top: 6px; }
.complete-card { display: none; margin: 18px auto 0; max-width: 620px; padding: 22px; text-align: center; border-radius: 20px;
                 border: 3px solid var(--acc); background: color-mix(in srgb, var(--acc) 5%, #fff);
                 box-shadow: 6px 6px 0 color-mix(in srgb, var(--acc) 14%, #fff); }
.complete-card .stamp-icon { font-size: 52px; animation: stampPop .6s ease; }
.complete-card h3 { font-family: var(--font-serif); font-size: 22px; margin: 6px 0; }
.complete-card p { font-size: 14px; color: var(--ink2); line-height: 1.8; }
.stamp { display: inline-block; margin-top: 10px; padding: 8px 16px; border: 4px double var(--acc); border-radius: 50%;
         color: var(--acc); font-weight: 900; transform: rotate(-6deg); font-family: var(--font-doodle); font-size: 14px; }
@keyframes stampPop { 0% { transform: scale(0) rotate(-30deg); opacity: 0; } 70% { transform: scale(1.25); } 100% { transform: scale(1); opacity: 1; } }

/* ===== 底部导航 ===== */
.slide-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: rgba(255,255,255,.92);
             backdrop-filter: blur(10px); border-top: 1px solid var(--rule); padding: 10px 16px;
             display: flex; align-items: center; justify-content: center; gap: 12px; }
.slide-nav button { padding: 9px 18px; border-radius: 30px; border: none; cursor: pointer; font-size: 13.5px; font-weight: 700;
                    font-family: var(--font-doodle); transition: all .2s; }
.slide-nav .nav-prev { background: var(--paper2); color: var(--ink2); }
.slide-nav .nav-next { background: linear-gradient(135deg, var(--acc), var(--acc2)); color: #fff; box-shadow: 0 5px 14px -5px var(--acc); }
.slide-nav button:disabled { opacity: .4; cursor: not-allowed; }
.slide-nav .nav-prev:hover:not(:disabled), .slide-nav .nav-next:hover:not(:disabled) { transform: translateY(-1px); }
.nav-counter { font-size: 12.5px; color: var(--ink3); min-width: 130px; text-align: center; font-weight: 600; }
.dots { display: flex; gap: 5px; align-items: center; }
.dots .dot { width: 8px; height: 8px; border-radius: 50%; background: #d8d2c8; cursor: pointer; transition: all .2s; }
.dots .dot.active { width: 20px; border-radius: 6px; background: var(--acc); }

/* ===== AI 助手 ===== */
.ai-fab { position: fixed; right: 18px; bottom: 84px; z-index: 60; width: 56px; height: 56px; border-radius: 50%;
          background: linear-gradient(135deg, var(--acc), var(--acc2)); color: #fff; font-size: 26px; border: none;
          cursor: pointer; box-shadow: 0 8px 22px -6px var(--acc); transition: transform .2s; }
.ai-fab:hover { transform: scale(1.08); }
.ai-panel { position: fixed; right: 16px; bottom: 150px; z-index: 61; width: min(92vw, 360px); background: #fff;
            border-radius: 18px; box-shadow: 0 16px 50px rgba(0,0,0,.18); overflow: hidden; display: flex; flex-direction: column;
            max-height: 60vh; }
.ai-panel.hidden { display: none; }
.ai-panel .ap-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; color: #fff;
                     background: linear-gradient(135deg, var(--acc), var(--acc2)); font-weight: 700; font-size: 14px; }
.ai-panel .ap-head .x { margin-left: auto; background: none; border: none; color: #fff; font-size: 16px; cursor: pointer; }
.ai-msgs { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; background: var(--paper); min-height: 120px; }
.ai-msg { max-width: 86%; padding: 9px 12px; border-radius: 14px; font-size: 13.5px; line-height: 1.7; }
.ai-msg.bot { background: #fff; border: 1px solid var(--rule); align-self: flex-start; border-bottom-left-radius: 4px; }
.ai-msg.me { background: linear-gradient(135deg, var(--acc), var(--acc2)); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.ai-quick { display: flex; gap: 6px; flex-wrap: wrap; padding: 8px 10px; background: #fff; border-top: 1px solid var(--rule); }
.ai-quick button { font-size: 12px; padding: 5px 11px; border-radius: 20px; border: 1px solid var(--rule); background: var(--paper2); cursor: pointer; }
.ai-input { display: flex; gap: 6px; padding: 8px 10px; background: #fff; border-top: 1px solid var(--rule); }
.ai-input input { flex: 1; padding: 8px 12px; border-radius: 20px; border: 1px solid var(--rule); font-size: 13px; outline: none; }
.ai-input button { border: none; border-radius: 20px; padding: 0 16px; color: #fff; font-weight: 700;
                   background: linear-gradient(135deg, var(--acc), var(--acc2)); cursor: pointer; }

/* ===== 响应式 ===== */
@media (max-width: 640px) {
    .wrap { padding: 12px 12px 30px; }
    .hd { padding: 14px 16px; }
    .hd-title { font-size: 21px; }
    .cover { padding: 26px 18px; }
    .cover h1 { font-size: 25px; }
    .cover .yr { font-size: 64px; }
    .card { padding: 18px 16px; }
    .k-grid { grid-template-columns: 1fr 1fr; }
    .nav-counter { display: none; }
}
