
/* 隐藏 Netlify 平台注入的右下角悬浮徽章 */
netlify-badge, [data-netlify-badge], .netlify-badge, .netlify-badge-container,
a.netlify-badge, [class*="netlify-badge"], [id*="netlify-badge"] {
    display: none !important; visibility: hidden !important;
}
/* ==========================================================================
   高中生物全能复习系统 · Premium Editorial UI
   设计语言：暖纸底 / 深墨绿 / 单一翡翠强调色 / 细发丝线 / 克制的阴影
   ========================================================================== */

:root{
    /* —— 纸面与层次 —— */
    --paper:      #F2F6F1;
    --paper-deep: #E4EDE3;
    --surface:    #FFFFFF;
    --surface-2:  #F6FAF5;

    /* —— 文字 —— */
    --ink:    #15201B;
    --ink-2:  #4E5C55;
    --ink-3:  #8A948E;
    --ink-4:  #ADB5B0;

    /* —— 线条 —— */
    --line:      rgba(21,32,27,.10);
    --line-soft: rgba(21,32,27,.055);

    /* —— 强调色（仅此一枚主色） —— */
    --accent:      #1D6B4E;
    --accent-deep: #14543D;
    --accent-soft: #E7F0EA;
    --accent-line: rgba(29,107,78,.22);
    --bio-line: rgba(29,107,78,.085);
    --bio-line-soft: rgba(29,107,78,.05);

    /* —— 点缀色 —— */
    --gold:      #8F6A2A;
    --gold-soft: #F7F1E2;
    --gold-line: rgba(143,106,42,.24);
    --danger:      #A94D38;
    --danger-soft: #F8EBE6;
    --danger-line: rgba(169,77,56,.24);

    /* —— 阴影（低对比、多层次） —— */
    --sh-1: 0 1px 2px rgba(21,32,27,.045);
    --sh-2: 0 1px 2px rgba(21,32,27,.04), 0 6px 18px -12px rgba(21,32,27,.22);
    --sh-3: 0 2px 5px rgba(21,32,27,.05), 0 18px 40px -22px rgba(21,32,27,.26);
    --sh-4: 0 10px 24px rgba(21,32,27,.10), 0 36px 80px -32px rgba(21,32,27,.40);

    /* —— 统一留白规则（马上能改 #3） —— */
    --gap-back: 8px;      /* 返回按钮 → 标题 */
    --gap-title: 16px;    /* 标题 → 内容卡片 */
    --gap-block: 12px;    /* 卡片之间 */

    /* —— 圆角 —— */
    --r-xs: 9px; --r-sm: 12px; --r-md: 15px; --r-lg: 19px; --r-xl: 25px; --r-pill: 999px;

    /* —— 动效 —— */
    --ease: cubic-bezier(.22,.8,.26,1);

    /* —— 字体 —— */
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "HarmonyOS Sans SC",
            "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", sans-serif;

    --content: 1040px;

    /* —— 深色模式令牌（[data-theme="dark"] 整体覆盖） —— */
    --dark-paper:#121A16; --dark-paper-deep:#1A241F; --dark-surface:#1E2A24; --dark-surface-2:#233129;
}

/* ===== 深色模式：护眼暗色，重点绿换成柔和浅绿 ===== */
html[data-theme="dark"]{
    --paper:var(--dark-paper); --paper-deep:var(--dark-paper-deep);
    --surface:var(--dark-surface); --surface-2:var(--dark-surface-2);
    --ink:#E6EFE9; --ink-2:#B9C7BF; --ink-3:#8C9A92; --ink-4:#6B7871;
    --line: rgba(230,239,233,.12); --line-soft: rgba(230,239,233,.07);
    --accent:#6FBF9A; --accent-deep:#8CD3AF; --accent-soft:#1E352B; --accent-line: rgba(111,191,154,.30);
    --bio-line: rgba(111,191,154,.11);
    --bio-line-soft: rgba(111,191,154,.06);
    --gold:#D9B878; --gold-soft:#2E2818; --gold-line: rgba(217,184,120,.28);
    --danger:#E08A73; --danger-soft:#3A241E; --danger-line: rgba(224,138,115,.30);
    --sh-1:0 1px 2px rgba(0,0,0,.30);
    --sh-2:0 1px 2px rgba(0,0,0,.30), 0 6px 18px -12px rgba(0,0,0,.55);
    --sh-3:0 2px 5px rgba(0,0,0,.32), 0 18px 40px -22px rgba(0,0,0,.6);
    --sh-4:0 10px 24px rgba(0,0,0,.42), 0 36px 80px -32px rgba(0,0,0,.7);
}
html[data-theme="dark"] body{
    background:
        radial-gradient(900px 520px at -10% 8%, rgba(111,191,154,.06), transparent 60%),
        radial-gradient(900px 600px at 112% 96%, rgba(96,150,72,.05), transparent 60%),
        repeating-linear-gradient(0deg, rgba(111,191,154,.03) 0 1px, transparent 1px 46px),
        repeating-linear-gradient(90deg, rgba(111,191,154,.03) 0 1px, transparent 1px 46px),
        radial-gradient(1400px 620px at 50% -14%, rgba(111,191,154,.08), transparent 62%),
        var(--paper);
}
html[data-theme="dark"] .detail-text b, html[data-theme="dark"] .detail-text strong{
    background: linear-gradient(transparent 62%, rgba(111,191,154,.22) 62%);
}
html[data-theme="dark"] ::selection{ background: rgba(111,191,154,.28); }
html[data-theme="dark"] .ai-input-area input{ background:var(--paper-deep); }

/* ============================ 科目配色 ============================ */
html[data-subject="geo"]{
    --paper:#F1F6F8; --paper-deep:#E5EEF2; --surface-2:#F4F9FB;
    --ink:#18222A; --ink-2:#46545E; --ink-3:#7E8B93; --ink-4:#AAB4BA;
    --line:rgba(24,34,42,.10); --line-soft:rgba(24,34,42,.055);
    --accent:#1E6380; --accent-deep:#154E66; --accent-soft:#E6F0F4; --accent-line:rgba(30,99,128,.22);
    --bio-line:rgba(30,99,128,.09); --bio-line-soft:rgba(30,99,128,.055);
    --sh-1:0 1px 2px rgba(24,34,42,.045);
    --sh-2:0 1px 2px rgba(24,34,42,.04), 0 6px 18px -12px rgba(24,34,42,.22);
    --sh-3:0 2px 5px rgba(24,34,42,.05), 0 18px 40px -22px rgba(24,34,42,.26);
    --sh-4:0 10px 24px rgba(24,34,42,.10), 0 36px 80px -32px rgba(24,34,42,.40);
    --dark-paper:#131A1F; --dark-paper-deep:#1B252B; --dark-surface:#202C33; --dark-surface-2:#25333B;
}
html[data-theme="dark"][data-subject="geo"]{
    --ink:#E6EFF3; --ink-2:#B8C6CE; --ink-3:#8B9AA3; --ink-4:#6A7881;
    --line:rgba(230,239,243,.12); --line-soft:rgba(230,239,243,.07);
    --accent:#74BBD4; --accent-deep:#93CCDF; --accent-soft:#1C313B; --accent-line:rgba(116,187,212,.30);
    --bio-line:rgba(116,187,212,.11); --bio-line-soft:rgba(116,187,212,.06);
}
html[data-subject="geo"] body{
    background:
        radial-gradient(900px 520px at -10% 8%, rgba(30,99,128,.055), transparent 60%),
        radial-gradient(900px 600px at 112% 96%, rgba(154,110,40,.045), transparent 60%),
        repeating-linear-gradient(0deg, rgba(30,99,128,.032) 0 1px, transparent 1px 46px),
        repeating-linear-gradient(90deg, rgba(30,99,128,.032) 0 1px, transparent 1px 46px),
        radial-gradient(1400px 620px at 50% -14%, rgba(255,255,255,.85), transparent 62%),
        var(--paper);
}
html[data-theme="dark"][data-subject="geo"] body{
    background:
        radial-gradient(900px 520px at -10% 8%, rgba(116,187,212,.06), transparent 60%),
        radial-gradient(900px 600px at 112% 96%, rgba(217,184,120,.045), transparent 60%),
        repeating-linear-gradient(0deg, rgba(116,187,212,.028) 0 1px, transparent 1px 46px),
        repeating-linear-gradient(90deg, rgba(116,187,212,.028) 0 1px, transparent 1px 46px),
        var(--paper);
}

/* 装饰层 */
.geo-bg{
    position: fixed; inset: 0; z-index: 0;
    pointer-events: none; overflow: hidden;
    color: var(--bio-line); display: none;
}
.geo-bg svg{ width: 100%; height: 100%; display: block; }
.geo-bg .soft{ color: var(--bio-line-soft); }
html[data-subject="geo"] .geo-bg{ display: block; }
html[data-subject="geo"] .bio-bg{ display: none; }

/* AI 悬浮按钮：仅进入科目后显示，主界面/启动页不出现 */
body:not(.in-app) .ai-fab{ display: none !important; }

/* ============================ 科目选择主界面 ============================ */
.page.subject-page{ display:block; overflow-y:auto; -webkit-overflow-scrolling:touch; }
.subject-inner{ width:100%; max-width:680px; margin:0 auto; padding:78px 18px 36px; }
.subject-head{ text-align:center; }
.subject-eyebrow{ font-size:9.5px; font-weight:750; letter-spacing:.26em; color:var(--ink-4); text-transform:uppercase; }
.subject-head h1{ font-size:27px; font-weight:700; letter-spacing:.06em; margin-top:12px; }
.subject-head p{ font-size:12px; color:var(--ink-3); margin-top:9px; letter-spacing:.02em; }

.feature-grid{ display:grid; grid-template-columns:1fr; gap:12px; margin-top:26px; }
@media (min-width:560px){ .feature-grid{ grid-template-columns:repeat(2,1fr); } }
.feature-card{
    position:relative; overflow:hidden; display:flex; align-items:center; gap:10px;
    padding:18px 16px; border-radius:18px; border:1px solid var(--line);
    background:var(--surface); box-shadow:var(--sh-2); cursor:pointer; font-family:inherit;
    text-align:left; min-width:0;
    transition: transform .18s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
}
.feature-card::before{ content:""; position:absolute; left:0; right:0; top:0; height:2px; background:var(--fc); opacity:.55; }
.feature-card:active{ transform:scale(.98); }
.subj-bio{ --fc:#226B4C; --fc-on:#FFFFFF; color:#226B4C; border-color:rgba(34,107,76,.20); }
.subj-geo{ --fc:#1E6380; --fc-on:#FFFFFF; color:#1E6380; border-color:rgba(30,99,128,.20); }
html[data-theme="dark"] .subj-bio{ --fc:#6FBF9A; --fc-on:#10261C; color:#6FBF9A; border-color:rgba(111,191,154,.24); }
html[data-theme="dark"] .subj-geo{ --fc:#74BBD4; --fc-on:#0E2128; color:#74BBD4; border-color:rgba(116,187,212,.24); }
.feature-glyph{
    flex:0 0 auto; width:46px; height:46px; border-radius:14px; display:grid; place-items:center;
    font-size:17px; font-weight:700; line-height:1; background:var(--fc); color:var(--fc-on);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.22);
}
.feature-body{ display:flex; flex-direction:column; gap:5px; min-width:0; }
.feature-title{ font-size:16px; font-weight:700; color:var(--ink); letter-spacing:.03em; display:flex; align-items:baseline; gap:6px; }
.feature-title em{ font-style:normal; font-size:9px; font-weight:750; letter-spacing:.16em; color:var(--fc); opacity:.85; }
.feature-meta{ font-size:11.5px; color:var(--ink-3); letter-spacing:.01em; }
.feature-arrow{ margin-left:auto; flex:0 0 auto; color:var(--fc); opacity:.6; }
.feature-arrow svg{ width:17px; height:17px; display:block; }
.feature-motif{ position:absolute; right:-16px; bottom:-26px; width:108px; height:108px; opacity:.10; color:var(--fc); pointer-events:none; }

.soon-block{ margin-top:26px; }
.soon-head{ font-size:9.5px; font-weight:750; letter-spacing:.22em; color:var(--ink-4); text-transform:uppercase; margin-bottom:10px; }
.soon-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:8px; }
.soon-chip{
    display:flex; align-items:center; justify-content:center; gap:5px; padding:11px 4px;
    border-radius:11px; border:1px dashed var(--line); background:transparent;
    font-size:12px; color:var(--ink-3); font-family:inherit; cursor:pointer;
    transition: background .18s var(--ease), border-color .18s var(--ease);
}
.soon-chip:active{ background:var(--surface-2); }
.soon-glyph{ font-size:11.5px; font-weight:700; color:var(--sj); }
.sj-chinese{ --sj:#8C5B3F } .sj-math{ --sj:#315C7A } .sj-english{ --sj:#5C6B4C }
.sj-physics{ --sj:#3E6B7A } .sj-chemistry{ --sj:#7A6242 } .sj-politics{ --sj:#8B4A3E }
.sj-history{ --sj:#6B5A45 }
html[data-theme="dark"] .soon-glyph{ filter: brightness(1.5); }
.subject-foot{ margin-top:24px; text-align:center; font-size:10.5px; color:var(--ink-4); letter-spacing:.06em; }
.subject-switch{
    margin-left:auto; padding:5px 11px; border-radius:99px; border:1px solid var(--line);
    background:var(--surface); color:var(--ink-3); font-size:11.5px; font-family:inherit; cursor:pointer;
}
.subject-switch:active{ background:var(--surface-2); color:var(--ink-2); }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body{
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.55;
    color: var(--ink);
    letter-spacing: .01em;
    background:
        radial-gradient(900px 520px at -10% 8%, rgba(29,107,78,.05), transparent 60%),
        radial-gradient(900px 600px at 112% 96%, rgba(96,150,72,.05), transparent 60%),
        repeating-linear-gradient(0deg, rgba(29,107,78,.035) 0 1px, transparent 1px 46px),
        repeating-linear-gradient(90deg, rgba(29,107,78,.035) 0 1px, transparent 1px 46px),
        radial-gradient(1400px 620px at 50% -14%, rgba(255,255,255,.85), transparent 62%),
        var(--paper);
    background-attachment: fixed;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

button{
    font: inherit; color: inherit; background: none; border: 0; cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
button:focus-visible, [onclick]:focus-visible{
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 6px;
}
::selection{ background: rgba(29,107,78,.16); }
::-webkit-scrollbar{ width: 9px; height: 9px; }
::-webkit-scrollbar-track{ background: transparent; }
::-webkit-scrollbar-thumb{
    background: rgba(21,32,27,.14); border-radius: 99px;
    border: 2.5px solid transparent; background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover{ background: rgba(21,32,27,.26); background-clip: padding-box; }

/* 数字统一等宽，避免跳动 */
.num, .module-count, .countdown-days strong, .countdown-clock b,
.stat-card .num, .chart-row b{ font-variant-numeric: tabular-nums; font-feature-settings:"tnum" 1; }

/* 图标统一尺寸 */
.btn-icon{ width: 16px; height: 16px; flex: 0 0 auto; }

/* ============================ 生物装饰背景层 ============================ */
.bio-bg{
    position: fixed; inset: 0; z-index: 0;
    pointer-events: none; overflow: hidden;
    color: var(--bio-line);
}
.bio-bg svg{ width: 100%; height: 100%; display: block; }
.bio-bg .soft{ color: var(--bio-line-soft); }

/* ============================ 页面骨架 ============================ */
.page{
    position: relative; z-index: 1;
    width: 100%; height: 100%;
    display: flex; flex-direction: column;
    overflow: hidden;
}
#page-home{ overflow-y: auto; overflow-x: hidden; }
.page.hidden{ display: none !important; }
.page:not(.hidden){ animation: pageIn .38s var(--ease) both; }
@keyframes pageIn{
    from{ opacity: 0; transform: translateY(10px); }
    to  { opacity: 1; transform: none; }
}

/* ============================ 顶部导航 ============================ */
.nav{
    flex-shrink: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line-soft);
    padding: 10px 20px;
    position: relative;
}
.nav h1{
    font-size: 23px; font-weight: 680; letter-spacing: -.02em; line-height: 1.25;
    color: var(--ink);
}
.nav p{
    margin-top: 4px; font-size: 12.5px; color: var(--ink-3); letter-spacing: .02em;
}
/* 统一留白：返回按钮 → 标题固定小间距 */
.nav .back + h1{ margin-top: var(--gap-back); }
.nav h1 + p{ margin-top: 5px; }
.back{
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 13px; font-weight: 600; color: var(--ink-2);
    padding: 7px 13px 7px 10px; margin-bottom: var(--gap-back);
    border: 1px solid var(--line); border-radius: var(--r-pill);
    background: var(--surface-2);
    transition: background .18s var(--ease), color .18s var(--ease), transform .12s var(--ease);
}
.back svg{ width: 14px; height: 14px; }
.back:hover{ background: var(--paper); color: var(--ink); }
.back:active{ transform: scale(.96); }

/* 内页紧凑标题栏：返回箭头与标题/副标题合并到一行 */
.nav-compact{ display: flex; align-items: center; gap: 12px; }
.nav-compact .back{ margin-bottom: 0; padding: 8px; flex: 0 0 auto; }
.nav-compact .nav-titles{ min-width: 0; flex: 1; }
.nav-compact h1{ font-size: 19px; line-height: 1.3; }
.nav-compact p{ margin-top: 2px; font-size: 12px; }
@media (max-width: 380px){
    .nav-compact h1{ font-size: 17px; }
}

/* 首页 Hero */
.nav-home{ background: transparent; border-bottom: 0; padding-bottom: 6px; }
.nav-home .hero-mark{
    display: flex; align-items: center; gap: 10px; margin-bottom: 16px;
}
.nav-home .hero-seal{
    width: 36px; height: 36px; border-radius: 50%; object-fit: contain;
    background: #fff; padding: 2px;
    box-shadow: 0 0 0 1px var(--line), var(--sh-1);
}
.nav-home .hero-eyebrow{
    font-size: 10px; font-weight: 750; letter-spacing: .22em; color: var(--ink-4);
    text-transform: uppercase;
}
.nav-home h1{ font-size: 27px; font-weight: 700; letter-spacing: -.028em; }
.nav-home p{ font-size: 13px; color: var(--ink-3); margin-top: 8px; }

/* ============================ 数据总览 ============================ */
.dashboard{
    display: grid; grid-template-columns: repeat(3, 1fr);
    width: 100%; max-width: var(--content); margin: 18px auto 0; padding: 0 20px;
}
.stat-card{
    position: relative; text-align: center; padding: 17px 6px 16px;
    background: var(--surface);
    border: 1px solid var(--line-soft);
    box-shadow: var(--sh-1);
    cursor: pointer;
    transition: background .18s var(--ease), transform .12s var(--ease);
}
.stat-card:hover{ background: var(--surface-2); }
.stat-card:active{ transform: scale(.97); }
.stat-card::after{
    content: ""; position: absolute; right: 7px; top: 7px; width: 5px; height: 5px;
    border-radius: 50%; background: var(--ink-4); opacity: .55;
}
.dashboard .stat-card:first-child{ border-radius: var(--r-md) 0 0 var(--r-md); }
.dashboard .stat-card:last-child { border-radius: 0 var(--r-md) var(--r-md) 0; }
.dashboard .stat-card + .stat-card{ border-left: 0; }
.stat-card .num{
    font-size: 27px; line-height: 1.05; font-weight: 700; letter-spacing: -.035em;
    color: var(--ink);
}
.stat-card .num.is-accent{ color: var(--accent); }
.stat-card .label{
    margin-top: 7px; font-size: 11px; color: var(--ink-3); letter-spacing: .06em;
}

/* ============================ 学习中枢 ============================ */
.study-hub{ width: 100%; padding: 22px 20px 6px; max-width: var(--content); margin: 0 auto; }

/* —— 高考倒计时（页面唯一深色卡片，作为视觉焦点） —— */
.gaokao-countdown{
    position: relative; overflow: hidden;
    padding: 20px 22px 17px; margin-bottom: 24px;
    border-radius: var(--r-xl);
    color: #EEF3EF;
    background: linear-gradient(152deg, #131D19 0%, #1A2B23 52%, #21362B 100%);
    box-shadow: var(--sh-3);
}
.gaokao-countdown::before{
    content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background:
        repeating-linear-gradient(0deg, rgba(255,255,255,.035) 0 1px, transparent 1px 34px),
        repeating-linear-gradient(90deg, rgba(255,255,255,.035) 0 1px, transparent 1px 34px);
}
.gaokao-countdown::after{
    content: ""; position: absolute; width: 260px; height: 260px; right: -96px; top: -128px;
    border: 1px solid rgba(255,255,255,.07); border-radius: 50%;
    box-shadow: 0 0 0 26px rgba(255,255,255,.022), 0 0 0 54px rgba(255,255,255,.014);
    pointer-events: none;
}
.countdown-top{
    display: flex; justify-content: space-between; align-items: center;
    position: relative; z-index: 1;
}
.countdown-top .eyebrow{
    color: rgba(238,243,239,.52); font-size: 9.5px; font-weight: 750; letter-spacing: .2em;
}
.countdown-top h2{
    margin-top: 5px; font-size: 15px; font-weight: 620; letter-spacing: .04em; color: #F4F8F5;
}
.countdown-year{
    font-size: 10.5px; letter-spacing: .08em; color: rgba(238,243,239,.72);
    border: 1px solid rgba(255,255,255,.16); border-radius: var(--r-pill); padding: 5px 11px;
    background: rgba(255,255,255,.04);
}
.countdown-main{
    display: flex; align-items: center; gap: 22px; margin: 16px 0 12px; position: relative; z-index: 1;
}
.countdown-days{ display: flex; align-items: baseline; gap: 6px; }
.countdown-days strong{
    font-size: 58px; line-height: .92; font-weight: 700; letter-spacing: -.045em; color: #fff;
}
.countdown-days span{ font-size: 14px; color: rgba(238,243,239,.62); }
.countdown-right{ border-left: 1px solid rgba(255,255,255,.14); padding-left: 20px; }
.countdown-clock{ display: flex; align-items: flex-start; gap: 7px; }
.countdown-clock span{ display: grid; justify-items: center; gap: 3px; }
.countdown-clock b{ font-size: 17px; font-weight: 600; color: #F4F8F5; letter-spacing: .01em; }
.countdown-clock small{ font-size: 9px; color: rgba(238,243,239,.42); letter-spacing: .08em; }
.countdown-clock i{ font-style: normal; color: rgba(238,243,239,.32); line-height: 1.3; padding-top: 1px; }
.countdown-right p{ margin-top: 10px; font-size: 10.5px; color: rgba(238,243,239,.46); letter-spacing: .04em; }
.countdown-quote{
    position: relative; z-index: 1;
    border-top: 1px solid rgba(255,255,255,.10); padding-top: 11px;
    font-size: 11px; letter-spacing: .12em; color: rgba(238,243,239,.55);
}

/* —— 打卡 / 进度 —— */
.hub-head{
    display: flex; align-items: flex-end; justify-content: space-between; gap: 14px;
    margin-bottom: 13px;
}
.eyebrow{
    font-size: 9.5px; font-weight: 750; letter-spacing: .2em; color: var(--ink-4);
    text-transform: uppercase;
}
.hub-head h2{ margin-top: 5px; font-size: 19px; font-weight: 660; letter-spacing: -.02em; color: var(--ink); }
.hub-head p{ margin-top: 5px; font-size: 12px; color: var(--ink-3); }
.streak-pill{
    display: flex; align-items: center; gap: 6px; white-space: nowrap;
    background: var(--gold-soft); border: 1px solid var(--gold-line); color: var(--gold);
    border-radius: var(--r-pill); padding: 8px 13px; font-size: 13px; font-weight: 650;
}
.streak-pill small{ font-size: 10px; font-weight: 500; color: rgba(143,106,42,.66); }
.streak-icon{ width: 14px; height: 14px; flex: 0 0 14px; }

.daily-card{
    background: var(--surface); border: 1px solid var(--line-soft);
    border-radius: var(--r-lg); box-shadow: var(--sh-1);
    padding: 17px 18px; margin-bottom: 12px;
}
.daily-progress-line{
    display: flex; justify-content: space-between; align-items: baseline;
    font-size: 12.5px; color: var(--ink-2); margin-bottom: 12px;
}
.daily-progress-line b{ font-size: 13px; font-weight: 650; color: var(--ink-3); }
.daily-progress-line b.is-done{ color: var(--accent); }
.checkin-btn{
    width: 100%; padding: 13px; border-radius: var(--r-sm);
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: var(--ink); color: #fff; font-size: 14px; font-weight: 640; letter-spacing: .04em;
    transition: transform .14s var(--ease), background .2s var(--ease), color .2s var(--ease);
}
.checkin-btn:hover{ background: #0d1611; }
.checkin-btn:active{ transform: scale(.985); }
.checkin-btn.done{
    background: var(--accent-soft); color: var(--accent-deep);
    box-shadow: inset 0 0 0 1px var(--accent-line);
}

.hub-grid{ display: grid; grid-template-columns: 1.12fr .88fr; gap: 12px; }
.hub-card{
    background: var(--surface); border: 1px solid var(--line-soft);
    border-radius: var(--r-lg); box-shadow: var(--sh-1);
    padding: 17px 18px; min-width: 0; text-align: left; color: var(--ink);
}
.hub-card-title{
    display: flex; justify-content: space-between; align-items: baseline;
    gap: 10px; margin-bottom: 15px;
}
.hub-card-title span{ font-size: 14px; font-weight: 650; letter-spacing: -.01em; }
.hub-card-title small{ font-size: 10.5px; color: var(--ink-4); }

.progress-chart{ display: grid; gap: 11px; }
.chart-row{
    display: grid; grid-template-columns: 62px 1fr 38px; gap: 10px; align-items: center;
    font-size: 11px; color: var(--ink-2);
}
.chart-row span{ white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chart-row b{ text-align: right; font-size: 11px; font-weight: 620; color: var(--ink-3); }
.chart-track{ height: 6px; background: var(--paper-deep); border-radius: var(--r-pill); overflow: hidden; }
.chart-track i{
    display: block; height: 100%; width: 0; border-radius: var(--r-pill);
    background: var(--accent); transition: width .5s var(--ease);
}

/* —— 错题本入口 —— */
.wrong-entry{
    display: flex; align-items: center; gap: 13px; cursor: pointer;
    transition: transform .16s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.wrong-entry:hover{ border-color: var(--danger-line); box-shadow: var(--sh-2); }
.wrong-entry:active{ transform: scale(.985); }
.wrong-icon{
    width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center;
    background: var(--danger-soft); color: var(--danger); border-radius: var(--r-sm);
}
.wrong-icon svg{ width: 21px; height: 21px; }
.wrong-text{ display: grid; gap: 4px; min-width: 0; }
.wrong-entry b{ font-size: 13.5px; font-weight: 650; }
.wrong-entry small{ font-size: 11px; color: var(--ink-3); line-height: 1.4; }
.wrong-entry strong{
    margin-left: auto; font-size: 21px; font-weight: 680; letter-spacing: -.02em; color: var(--ink);
}
.wrong-arrow{ color: var(--ink-4); display: grid; place-items: center; }
.wrong-arrow svg{ width: 16px; height: 16px; }

/* ============================ 区块标题 ============================ */
.section-heading{
    width: 100%; max-width: var(--content); margin: 28px auto 12px; padding: 0 20px;
    display: grid; gap: 5px;
}
.section-heading span{
    font-size: 9.5px; font-weight: 750; letter-spacing: .2em; color: var(--ink-4);
    text-transform: uppercase;
}
.section-heading b{ font-size: 18px; font-weight: 660; letter-spacing: -.02em; color: var(--ink); }

/* ============================ 知识模块 ============================ */
.module-container{
    width: 100%; max-width: var(--content); margin: 0 auto; padding: 0 20px;
    display: grid; gap: 12px; grid-template-columns: 1fr;
    align-content: start;
}
.module-card{
    position: relative; cursor: pointer;
    background: var(--surface); border: 1px solid var(--line-soft);
    border-radius: var(--r-lg); padding: 15px 16px 13px;
    box-shadow: var(--sh-1);
    transition: transform .18s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
}
.module-card:hover{ transform: translateY(-2px); box-shadow: var(--sh-3); border-color: var(--line); }
.module-card:active{ transform: translateY(0) scale(.99); }
.module-card > *{ pointer-events:none; }
.module-top{
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.module-title{
    display: flex; align-items: center; gap: 11px; min-width: 0;
    font-size: 15.5px; font-weight: 650; letter-spacing: -.012em; color: var(--ink);
}
.module-icon{
    width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center;
    background: var(--accent-soft); color: var(--accent-deep);
    border: 1px solid var(--accent-line);
    border-radius: var(--r-sm);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.5);
}
.module-icon svg{ width: 19px; height: 19px; }
.module-count{
    font-size: 19px; font-weight: 680; letter-spacing: -.03em; color: var(--ink);
    white-space: nowrap;
}
.module-count small{ font-size: 10.5px; font-weight: 500; color: var(--ink-4); margin-left: 3px; }
.module-count.small{ font-size: 12px; color: var(--ink-3); }
.module-desc{ margin: 10px 0 13px; font-size: 12px; color: var(--ink-3); line-height: 1.6; }
.module-progress{
    height: 4px; background: var(--paper-deep); border-radius: var(--r-pill); overflow: hidden;
}
.module-progress-inner{
    height: 100%; width: 0; border-radius: var(--r-pill);
    background: linear-gradient(90deg, var(--accent), var(--accent-deep)); transition: width .6s var(--ease);
}
.module-foot{
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 10px;
}
.module-stat{ font-size: 11px; color: var(--ink-3); }
.module-pct{ font-size: 11px; font-weight: 620; color: var(--ink-2); }
.module-arrow{ color: var(--ink-4); display: grid; place-items: center; }
.module-arrow svg{ width: 15px; height: 15px; }

/* ============================ 首页页脚 ============================ */
.home-footer{
    width: 100%; max-width: var(--content); margin: 0 auto;
    padding: 22px 20px max(34px, env(safe-area-inset-bottom));
    text-align: center;
}
.footer-actions{ display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 15px; }
.foot-btn{
    display: inline-flex; align-items: center; gap: 7px;
    border-radius: var(--r-sm); padding: 11px 18px;
    font-size: 13px; font-weight: 600;
    transition: transform .14s var(--ease), background .2s var(--ease);
}
.foot-btn svg{ width: 15px; height: 15px; }
.foot-btn:active{ transform: scale(.97); }
.guide-btn{ background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); }
.guide-btn:hover{ background: var(--surface-2); color: var(--ink); }
.reward-btn{ background: var(--gold-soft); border: 1px solid var(--gold-line); color: var(--gold); }
.reward-btn:hover{ background: #F3EAD6; }
.footer-meta{ font-size: 11.5px; color: var(--ink-4); line-height: 1.9; }
.footer-meta .line{ display: block; }

/* ============================ 列表页 ============================ */
.list-container{
    flex-grow: 1; overflow-y: auto; overscroll-behavior: contain;
    padding: var(--gap-title) 20px max(24px, env(safe-area-inset-bottom));
    width: 100%; max-width: var(--content); margin: 0 auto;
}
.list-item{
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    background: var(--surface); border: 1px solid var(--line-soft);
    border-radius: var(--r-md); padding: 12px 14px; margin-bottom: var(--gap-block);
    box-shadow: var(--sh-1);
    transition: border-color .2s var(--ease), box-shadow .2s var(--ease), opacity .2s var(--ease);
    position: relative;
}
.list-item:hover{ border-color: var(--line); box-shadow: var(--sh-2); }
/* 已掌握条目：柔和置灰 + 打勾水印（马上能改 #5） */
.list-item.is-mastered{ opacity: .62; }
.list-item.is-mastered::after{
    content: "✓"; position: absolute; right: 15px; top: 50%; transform: translateY(-50%);
    font-size: 30px; font-weight: 800; color: var(--accent); opacity: .10; pointer-events: none;
}
.list-item.is-mastered .item-name{ color: var(--ink-3); }
.item-info{ flex: 1; min-width: 0; padding-right: 26px; }
.item-name{ font-size: 14px; font-weight: 600; line-height: 1.55; color: var(--ink); }
.item-module{ margin-top: 2px; font-size: 11px; color: var(--ink-3); }
.empty-tip{ text-align:center; color:var(--ink-3); font-size:13px; padding:40px 20px; }
.stat-group{ margin: 16px 0 4px; }
.stat-group:first-child{ margin-top: 4px; }
.stat-group-card{
    background: var(--surface); border: 1px solid var(--line-soft);
    border-radius: var(--r-lg); padding: 14px 16px 12px; box-shadow: var(--sh-1);
    cursor: pointer;
    transition: transform .18s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
}
.stat-group-card:hover{ border-color: var(--line); box-shadow: var(--sh-2); }
.stat-group-card:active{ transform: scale(.99); }
.stat-group-card .module-top{ display:flex; justify-content:space-between; align-items:center; gap:12px; }
.stat-group-card .module-title{ display:flex; align-items:center; gap:11px; min-width:0; font-size:15px; font-weight:650; color:var(--ink); }
.stat-group-card .module-icon{ width:32px; height:32px; flex:0 0 32px; display:grid; place-items:center; background:var(--accent-soft); color:var(--accent-deep); border-radius:var(--r-xs); }
.stat-group-card .module-icon svg{ width:17px; height:17px; }
.stat-group-card .module-count{ font-size:18px; font-weight:680; color:var(--ink); white-space:nowrap; }
.stat-group-card .module-count small{ font-size:10.5px; font-weight:500; color:var(--ink-4); margin-left:3px; }
.stat-group-card .module-desc{ margin:9px 0 11px; font-size:12px; color:var(--ink-3); line-height:1.6; }
.stat-group-card .module-progress{ height:4px; background:var(--paper-deep); border-radius:var(--r-pill); overflow:hidden; }
.stat-group-card .module-progress-inner{ height:100%; border-radius:var(--r-pill); background:var(--accent); }
.stat-group-card .module-foot{ display:flex; align-items:center; justify-content:space-between; margin-top:9px; }
.stat-group-card .module-stat{ font-size:11px; color:var(--ink-3); }
.stat-group-items{ margin-top:12px; }
.stat-group-items .list-item{ margin-bottom: var(--gap-block); }
.item-sub{ margin-top: 4px; font-size: 11px; color: var(--ink-4); }
.btn-group{ display: flex; gap: 7px; flex-shrink: 0; }
.btn{
    display: inline-flex; align-items: center; justify-content: center; gap: 5px;
    padding: 8px 12px; border-radius: var(--r-xs);
    font-size: 12px; font-weight: 600; white-space: nowrap;
    border: 1px solid transparent;
    transition: background .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease), transform .12s var(--ease);
}
.btn:active{ transform: scale(.96); }
.btn svg{ width: 13px; height: 13px; }
.btn-outline{ border-color: var(--line); background: var(--surface-2); color: var(--ink-2); }
.btn-outline:hover{ background: var(--paper); color: var(--ink); }
.btn-view{ background: var(--ink); color: #fff; }
.btn-view:hover{ background: #0d1611; }
.btn-mastered{ background: var(--accent-soft); color: var(--accent-deep); box-shadow: inset 0 0 0 1px var(--accent-line); }

/* ============================ 详情页 ============================ */
.detail-content{
    flex-grow: 1; overflow-y: auto; overscroll-behavior: contain;
    background: var(--paper);
    padding: var(--gap-title) 20px 30px;
}
.detail-inner{ max-width: 720px; margin: 0 auto; }
.detail-tag{
    display: inline-block; background: var(--accent-soft); color: var(--accent-deep);
    padding: 5px 11px; border-radius: var(--r-xs);
    font-size: 11px; font-weight: 640; letter-spacing: .04em; margin-bottom: var(--gap-title);
}
.detail-text{
    font-size: 15px; line-height: 1.6; color: var(--ink-2);
    background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-lg);
    padding: 18px 18px 20px; box-shadow: var(--sh-1);
}
.detail-text p{ margin: 0 0 12px; }
.detail-text p:last-child{ margin-bottom: 0; }
.detail-text b, .detail-text strong{
    font-weight: 680; color: var(--accent-deep);
    background: linear-gradient(transparent 62%, rgba(29,107,78,.13) 62%);
    padding: 0 1px;
}
.detail-fig{
    margin-top: 14px; background: var(--surface);
    border: 1px solid var(--line-soft); border-radius: var(--r-lg);
    padding: 14px 14px 10px; box-shadow: var(--sh-1);
}
.detail-fig:empty{ display: none; }
.detail-fig svg{ width: 100%; height: auto; display: block; }
.detail-fig text{ fill: var(--ink-3); stroke: none; font-weight: 400; }
.detail-fig .fig-cap{
    margin-top: 8px; font-size: 11px; letter-spacing: .04em; color: var(--ink-3); text-align: center;
}
.chart-fig{
    margin: 4px 0 16px; background: var(--surface-2);
    border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: 12px;
}
.chart-fig svg{ width: 100%; height: auto; display: block; }
.chart-cap{ font-size: 11px; color: var(--ink-3); text-align: center; margin-top: 8px; }

/* —— 易错辨析 —— */
.quiz-box{
    margin-top: 14px; padding: 16px 16px;
    background: var(--gold-soft); border: 1px solid var(--gold-line);
    border-radius: var(--r-lg);
}
.quiz-title{
    display: flex; align-items: center; gap: 8px;
    font-size: 12.5px; font-weight: 680; letter-spacing: .04em; color: var(--gold);
    margin-bottom: 12px;
}
.quiz-title svg{ width: 16px; height: 16px; }
.quiz-text{ font-size: 14.5px; font-weight: 620; line-height: 1.6; color: var(--ink); margin-bottom: 14px; }
.judge-row{ display: flex; gap: 9px; margin-bottom: 12px; }
.judge-btn{
    flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px; border-radius: var(--r-sm);
    border: 1px solid var(--line); background: var(--surface);
    font-size: 13px; font-weight: 620; color: var(--ink-2);
    transition: all .18s var(--ease);
}
.judge-btn svg{ width: 14px; height: 14px; }
.judge-btn:not(:disabled):hover{ border-color: var(--ink-4); color: var(--ink); }
.judge-btn:disabled{ cursor: default; }
.judge-btn.good-sel{ background: var(--accent-soft); border-color: var(--accent); color: var(--accent-deep); }
.judge-btn.bad-sel{ background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }
/* 判断题选中反馈：短暂高亮脉冲动画（马上能改 #2） */
@keyframes judgePulse{
    0%{ transform: scale(1); }
    45%{ transform: scale(1.05); }
    100%{ transform: scale(1); }
}
.judge-btn.picked{ animation: judgePulse .32s var(--ease) both; }
@keyframes shakeBad{
    0%,100%{ transform: translateX(0); }
    20%{ transform: translateX(-5px); } 40%{ transform: translateX(5px); }
    60%{ transform: translateX(-4px); } 80%{ transform: translateX(4px); }
}
.judge-btn.bad-sel{ animation: shakeBad .34s var(--ease) both; }
.judge-result{ font-size: 13px; font-weight: 660; margin-bottom: 10px; display: none; }
.judge-result.good{ color: var(--accent-deep); }
.judge-result.bad{ color: var(--danger); }
.quiz-btn{
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--ink); color: #fff; border: 0; border-radius: var(--r-xs);
    padding: 9px 16px; font-size: 12.5px; font-weight: 600;
    transition: background .18s var(--ease), transform .12s var(--ease);
}
.quiz-btn:hover{ background: #0d1611; }
.quiz-btn:active{ transform: scale(.97); }
.quiz-ans{
    display: none; margin-top: 12px; padding-top: 13px;
    border-top: 1px dashed var(--gold-line);
    font-size: 13.5px; line-height: 1.85; color: var(--ink-2);
}
.wrong-save-btn{
    margin-top: 14px; width: 100%;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    border: 1px solid var(--line); background: var(--surface);
    color: var(--ink-2); border-radius: var(--r-sm); padding: 11px;
    font-size: 12.5px; font-weight: 620;
    transition: all .18s var(--ease);
}
.wrong-save-btn svg{ width: 14px; height: 14px; }
.wrong-save-btn:hover{ border-color: var(--danger-line); color: var(--danger); }
.wrong-save-btn.saved{ background: var(--danger-soft); border-color: var(--danger-line); color: var(--danger); }

/* —— 详情底部操作栏（精简为两行：主操作 + 轻量工具） —— */
.bottom-bar{
    flex-shrink: 0;
    padding: 10px 16px max(12px, env(safe-area-inset-bottom));
    background: var(--surface);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    backdrop-filter: saturate(160%) blur(14px);
    border-top: 1px solid var(--line-soft);
    box-shadow: 0 -6px 20px -14px rgba(21,32,27,.3);
    display: flex; flex-direction: column; gap: 8px;
}
.btn-block{
    flex: 1.4;
    padding: 12px 10px; border-radius: var(--r-sm);
    font-size: 14px; font-weight: 650; letter-spacing: .03em;
    border: 0; background: var(--ink); color: #fff;
    transition: background .18s var(--ease), color .18s var(--ease), transform .12s var(--ease);
}
.btn-block:hover{ background: #0d1611; }
.btn-block:active{ transform: scale(.99); }
.btn-block.mastered{ background: var(--accent-soft); color: var(--accent-deep); box-shadow: inset 0 0 0 1px var(--accent-line); }
.nav-row{ display: flex; gap: 8px; align-items: stretch; }
.btn-nav{
    flex: 1; padding: 12px 8px; border-radius: var(--r-sm);
    font-size: 13px; font-weight: 600;
    border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2);
    transition: all .18s var(--ease);
}
/* 轻量工具行：背诵 / 导出，弱化样式 */
.aux-row{ display: flex; gap: 4px; justify-content: center; }
.aux-link{
    display: inline-flex; align-items: center; gap: 5px;
    padding: 6px 12px; border-radius: var(--r-pill);
    font-size: 12px; font-weight: 600; color: var(--ink-3);
    border: 0; background: transparent; transition: all .16s var(--ease);
}
.aux-link svg{ width: 14px; height: 14px; }
.aux-link:hover{ background: var(--paper-deep); color: var(--ink); }
.aux-link:active{ transform: scale(.96); }
.aux-link.is-on{ color: var(--accent-deep); background: var(--accent-soft); }

/* 详情页内：错题本 / 收藏 轻量辅助按钮 */
.detail-aux{ display: flex; gap: 8px; margin-top: 12px; }
.aux-btn{
    flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    border: 1px solid var(--line); background: var(--surface);
    color: var(--ink-2); border-radius: var(--r-sm); padding: 9px 10px;
    font-size: 12.5px; font-weight: 620; transition: all .18s var(--ease);
}
.aux-btn svg{ width: 14px; height: 14px; }
.aux-btn:hover{ border-color: var(--danger-line); color: var(--danger); }
.aux-btn.active, .aux-btn.saved{ background: var(--danger-soft); border-color: var(--danger-line); color: var(--danger); }
.aux-btn.fav.active{ background: var(--gold-soft); border-color: var(--gold-line); color: var(--gold); }
.btn-nav:not(:disabled):hover{ border-color: var(--ink-4); color: var(--ink); }
.btn-nav:disabled{ background: var(--paper-deep); color: var(--ink-4); border-color: transparent; cursor: not-allowed; }

/* ============================ 错题本 ============================ */
.wrong-list{
    flex-grow: 1; overflow-y: auto; overscroll-behavior: contain;
    padding: 16px 20px max(24px, env(safe-area-inset-bottom));
    width: 100%; max-width: var(--content); margin: 0 auto;
    display: grid; gap: 10px; align-content: start;
}
.wrong-item{
    background: var(--surface); border: 1px solid var(--line-soft);
    border-radius: var(--r-md); padding: 15px 16px;
    display: flex; align-items: center; gap: 13px; box-shadow: var(--sh-1);
}
.wrong-item-main{ flex: 1; min-width: 0; }
.wrong-item-main b{ display: block; font-size: 13.5px; font-weight: 620; color: var(--ink); margin-bottom: 5px; }
.wrong-item-main small{ font-size: 11px; color: var(--ink-4); }
.wrong-item-actions{ display: flex; gap: 7px; flex-wrap: wrap; }
.wrong-item-actions button{
    border: 0; border-radius: var(--r-xs); padding: 8px 12px;
    font-size: 11.5px; font-weight: 620;
    background: var(--accent-soft); color: var(--accent-deep);
    transition: background .18s var(--ease);
}
.wrong-item-actions button:hover{ background: #DCE9E1; }
.wrong-item-actions .remove{ background: var(--danger-soft); color: var(--danger); }
.wrong-item-actions .remove:hover{ background: #F2DFD8; }
.wrong-empty{ text-align: center; padding: 60px 20px; color: var(--ink-4); }
.wrong-empty svg{ width: 34px; height: 34px; color: var(--ink-4); opacity: .7; }
.wrong-empty strong{ display: block; font-size: 14.5px; font-weight: 620; color: var(--ink-2); margin: 14px 0 7px; }
.wrong-empty span{ font-size: 12.5px; }

/* ============================ 弹层 ============================ */
.modal-mask{
    position: fixed; inset: 0; z-index: 120;
    background: rgba(14,24,19,.42);
    -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px);
    display: flex; align-items: center; justify-content: center; padding: 24px;
    animation: fadeIn .22s var(--ease) both;
}
@keyframes fadeIn{ from{opacity:0} to{opacity:1} }
.modal-box{
    background: var(--surface); border: 1px solid var(--line-soft);
    border-radius: var(--r-xl); padding: 24px;
    max-width: 360px; width: 100%;
    box-shadow: var(--sh-4);
    animation: modalIn .3s var(--ease) both;
    max-height: 86vh; overflow-y: auto;
}
@keyframes modalIn{ from{opacity:0; transform: translateY(12px) scale(.97)} to{opacity:1; transform:none} }
.modal-title{
    display: flex; align-items: center; gap: 9px;
    font-size: 16.5px; font-weight: 680; letter-spacing: -.015em;
    color: var(--ink); margin-bottom: 14px;
}
.modal-title svg{ width: 18px; height: 18px; color: var(--accent-deep); }
.modal-body p{ font-size: 13.5px; line-height: 1.9; color: var(--ink-2); margin-bottom: 9px; }
.modal-body p:last-child{ margin-bottom: 0; }
.modal-close{
    width: 100%; margin-top: 18px; padding: 13px; border: 0;
    border-radius: var(--r-sm); background: var(--ink); color: #fff;
    font-size: 14px; font-weight: 640; letter-spacing: .04em;
    transition: background .18s var(--ease), transform .12s var(--ease);
}
.modal-close:hover{ background: #0d1611; }
.modal-close:active{ transform: scale(.99); }
.reward-tip{
    margin-top: 14px; padding: 16px;
    border: 1px dashed var(--gold-line); border-radius: var(--r-md);
    color: var(--ink-3); font-size: 12.5px; line-height: 1.8; text-align: center;
}
.reward-qr{ margin-top: 16px; display: flex; justify-content: center; }
.reward-qr img{
    width: 216px; max-width: 100%; border-radius: var(--r-md);
    border: 1px solid var(--line-soft); background: #fff; padding: 6px;
}

/* ============================ 启动扉页（纸质 / 宋体 / 铜章） ============================ */
.splash-page{
    align-items: center; justify-content: center;
    color: #1B1A17;
    background:
        radial-gradient(120% 78% at 50% 0%, #FCF9F1 0%, #F4EFE3 52%, #EDE6D6 100%),
        #F4EFE3;
}
.splash-page::after{
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background:
        repeating-linear-gradient(0deg, rgba(27,26,23,.020) 0 1px, transparent 1px 7px),
        radial-gradient(110% 70% at 50% 108%, rgba(96,84,60,.13), transparent 66%);
}
.sp-sheet{
    position: relative; z-index: 2;
    display: flex; flex-direction: column;
    width: 100%; max-width: 520px; height: 100%;
    margin: 0 auto; padding: 44px 26px 30px; text-align: center;
}
.sp-head{
    display: flex; align-items: baseline; justify-content: space-between;
    font-size: 9px; font-weight: 600; letter-spacing: .22em;
    color: #6F6757; padding-bottom: 10px; position: relative; text-align: left;
}
.sp-head::after{
    content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 1px;
    background: rgba(27,26,23,.16);
}
.sp-head::before{
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
    background: rgba(27,26,23,.62);
}
.sp-body{
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 10px 0 0;
}
.sp-medal{
    position: relative; width: 184px; height: 184px;
    display: grid; place-items: center;
}
.sp-medal::before{
    content: ""; position: absolute; inset: 0; border-radius: 50%;
    border: 1px solid rgba(27,26,23,.30);
}
.sp-medal::after{
    content: ""; position: absolute; inset: 8px; border-radius: 50%;
    border: 1px solid rgba(27,26,23,.10);
}
.sp-crest{ width: 128px; height: 128px; display: block; }
.sp-connector{
    width: 1px; height: 40px; margin: 14px 0 26px;
    background: linear-gradient(180deg, rgba(27,26,23,.34), rgba(27,26,23,.06));
}
.sp-title{
    margin: 0 -.34em 0 0;
    font-family: "Songti SC","Source Han Serif SC","Noto Serif CJK SC","Noto Serif SC","STSong","SimSun",serif;
    font-size: clamp(29px, 9vw, 38px); font-weight: 600;
    line-height: 1.35; letter-spacing: .34em; color: #171614;
}
.sp-subline{
    display: flex; align-items: center; justify-content: center; gap: 14px;
    margin: 20px 0 0; font-size: 10px; letter-spacing: .26em; color: #7A7263;
}
.sp-subline i{ width: 26px; height: 1px; background: rgba(27,26,23,.22); display: block; }
.sp-motto{
    margin: 14px 0 0; font-size: 10px; letter-spacing: .34em; color: #8C8474;
}
.sp-foot{ padding-top: 16px; }
.sp-rule{
    height: 7px; margin-bottom: 18px;
    background: repeating-linear-gradient(90deg, rgba(27,26,23,.26) 0 9px, transparent 9px 20px);
    border-bottom: 1px solid rgba(27,26,23,.20);
}
.sp-cta{
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; padding: 16px 20px 16px 22px; cursor: pointer;
    border: 0; border-radius: 2px; background: #1B1A17; color: #F6F1E5;
    font-family: inherit; font-size: 12.5px; font-weight: 600; letter-spacing: .32em;
    transition: background .2s var(--ease), transform .12s var(--ease);
}
.sp-cta svg{ width: 17px; height: 17px; opacity: .7; }
.sp-cta:hover{ background: #2A2823; }
.sp-cta:active{ transform: scale(.995); }
.sp-end{
    margin-top: 18px; font-size: 9.5px; letter-spacing: .16em; color: #8A8270;
}
@keyframes spIn{ from{ opacity: 0; transform: translateY(8px); } to{ opacity: 1; transform: none; } }
.sp-head{ animation: spIn .7s var(--ease) both; }
.sp-medal{ animation: spIn .85s var(--ease) both .08s; }
.sp-connector, .sp-title{ animation: spIn .85s var(--ease) both .18s; }
.sp-subline, .sp-motto{ animation: spIn .85s var(--ease) both .28s; }
.sp-rule, .sp-cta{ animation: spIn .85s var(--ease) both .36s; }
.sp-end{ animation: spIn .85s var(--ease) both .44s; }
@media (min-width: 768px){
    .sp-sheet{ max-width: 560px; padding: 58px 54px 44px; }
    .sp-medal{ width: 188px; height: 188px; }
    .sp-crest{ width: 138px; height: 138px; }
    .sp-title{ font-size: 38px; }
}

/* ============================ 阅读进度 ============================ */
.progress-top{
    position: fixed; top: 0; left: 0; height: 2px; width: 0; z-index: 200;
    background: var(--accent); transition: width .12s linear;
}
.progress-side{ display: none; }

/* ============================ 响应式 ============================ */
@media (min-width: 760px){
    .dashboard, .module-container, .study-hub, .section-heading, .home-footer,
    .list-container, .wrong-list{ padding-left: 28px; padding-right: 28px; }
    .nav{
        padding-left:  max(28px, calc((100% - var(--content)) / 2 + 28px));
        padding-right: max(28px, calc((100% - var(--content)) / 2 + 28px));
    }
    .module-container{ grid-template-columns: repeat(2, minmax(0,1fr)); }
    .list-item{ padding: 16px 18px; }
    .detail-content{ padding: 20px 28px 40px; }
    .nav{ padding: 18px 28px 16px; }
    .nav-home h1{ font-size: 31px; }
}

@media (max-width: 560px){
    .hub-grid{ grid-template-columns: 1fr; }
    .hub-head h2{ font-size: 18px; }
    .wrong-list{ padding: 14px 16px; }
    .wrong-item{ align-items: flex-start; flex-wrap: wrap; }
    .wrong-item-actions{ width: 100%; }
    .countdown-main{ gap: 16px; }
    .list-item{ flex-wrap: wrap; }
    .list-item .btn-group{ width: 100%; margin-top: 8px; }
    .list-item .btn-group .btn{ flex: 1; }
}

@media (max-width: 380px){
    .dashboard{ padding: 0 14px; }
    .stat-card .num{ font-size: 24px; }
    .module-container, .list-container, .study-hub{ padding-left: 14px; padding-right: 14px; }
    .module-card{ padding: 15px 15px 14px; }
    .btn{ padding: 7px 9px; font-size: 11px; }
    .item-name{ font-size: 13.5px; }
    .countdown-days strong{ font-size: 48px; }
    .countdown-right{ padding-left: 14px; }
    .countdown-clock{ gap: 5px; }
    .list-item .btn-group{ gap: 5px; }
}

@media (prefers-reduced-motion: reduce){
    *, *::before, *::after{
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

/* ============================ 判定与答案徽标 ============================ */
.res-mark, .ans-mark{
    display: inline-block; text-align: center;
    border-radius: 6px; font-weight: 700; line-height: 1;
}
.res-mark{ width: 18px; height: 18px; font-size: 11px; margin-right: 7px; vertical-align: -3px; }
.ans-mark{ width: 21px; height: 21px; font-size: 12px; margin-right: 9px; vertical-align: -4px; }
.res-mark.ok, .ans-mark.ok{ background: var(--accent-soft); color: var(--accent-deep); }
.res-mark.no, .ans-mark.no{ background: var(--danger-soft); color: var(--danger); }
.ans-body{ vertical-align: baseline; }

    /* ===== 窄屏健壮性防御：避免横向溢出 ===== */
    .page, .nav, .dashboard, .study-hub, .section-heading, .module-container,
    .list-container, .detail-content, .detail-inner, .wrong-list, .bottom-bar{ min-width: 0; max-width: 100%; }
    .dashboard > *, .study-hub > *, .module-container > *, .list-item, .bottom-bar > *{ min-width: 0; }
    .countdown-main, .countdown-right, .countdown-clock, .judge-row, .nav-row, .btn-group, .hub-head{ min-width: 0; }
    .detail-text, .quiz-text, .item-name, .module-desc, .wrong-text{ overflow-wrap: break-word; word-break: break-word; }
    .chart-fig img, .detail-text img{ max-width: 100%; }

    /* ===== AI 答疑悬浮窗 ===== */
    .ai-fab,.ai-mask,.ai-chat-box{ display:none !important; }
    .ai-fab{ position:fixed; right:20px; bottom:18%; height:44px; padding:0 18px 0 15px; border-radius:var(--r-pill);
        background:var(--surface); color:var(--accent-deep);
        display:flex; align-items:center; gap:8px; border:1px solid var(--accent-line);
        cursor:grab; z-index:300; box-shadow:var(--sh-2); touch-action:none; user-select:none; -webkit-user-select:none;
        transition:transform .22s var(--ease), box-shadow .22s var(--ease), background .2s var(--ease), border-color .2s var(--ease); }
    .ai-fab:hover{ transform:translateY(-2px); background:var(--accent-soft); border-color:var(--accent); box-shadow:var(--sh-3); }
    .ai-fab:active{ cursor:grabbing; }
    .ai-fab.dragging{ transform:none; cursor:grabbing; transition:none; }

    .ai-fab svg{ width:21px; height:21px; flex-shrink:0; }
    .ai-fab-label{ font-size:13.5px; font-weight:600; letter-spacing:.02em; white-space:nowrap; }
    .ai-chat-box{ position:fixed; right:16px; bottom:84px; width:calc(100% - 32px); max-width:360px;
        height:62vh; max-height:520px; background:var(--surface); border:1px solid var(--line-soft);
        border-radius:var(--r-lg); box-shadow:var(--sh-4); display:none; flex-direction:column; z-index:299; overflow:hidden; }
    .ai-chat-box.open{ display:flex; }
    .ai-mask{ position:fixed; inset:0; z-index:298; background:rgba(21,32,27,.28); display:none; }
    .ai-mask.open{ display:block; }
    .app-toast{
        position:fixed; left:50%; bottom:12%; transform:translateX(-50%);
        background:rgba(21,32,27,.92); color:#fff; font-size:13px; font-weight:500;
        padding:10px 18px; border-radius:var(--r-pill); z-index:400;
        opacity:0; pointer-events:none; transition:opacity .2s var(--ease);
        max-width:80%; text-align:center;
    }
    .app-toast.show{ opacity:1; }
    .ai-header{ background:var(--ink); color:#fff; padding:14px 16px; display:flex; justify-content:space-between; align-items:center; }
    .ai-header .ai-title{ display:flex; align-items:center; gap:8px; font-size:14px; font-weight:640; letter-spacing:.03em; }
    .ai-header .ai-title svg{ width:16px; height:16px; }
    .ai-head-right{ display:flex; align-items:center; gap:10px; }
    .ai-model-wrap{ position:relative; }
    .ai-model-btn{ display:flex; align-items:center; gap:6px; background:rgba(255,255,255,.10); color:#fff;
        border:1px solid rgba(255,255,255,.22); border-radius:var(--r-xs); font-size:12px; padding:5px 9px;
        font-family:var(--font); cursor:pointer; }
    .ai-model-btn svg{ width:12px; height:12px; }
    .ai-model-menu{ position:absolute; top:calc(100% + 6px); right:0; min-width:128px; background:var(--surface);
        border:1px solid var(--line-soft); border-radius:var(--r-sm); box-shadow:var(--sh-3); overflow:hidden; z-index:10; }
    .ai-model-item{ display:flex; align-items:center; justify-content:space-between; gap:14px; width:100%; padding:10px 13px;
        background:none; border:0; font-size:13px; color:var(--ink-2); font-family:var(--font); cursor:pointer; text-align:left; }
    .ai-model-item:hover{ background:var(--surface-2); }
    .ai-model-item.active{ color:var(--accent-deep); font-weight:600; }
    .ai-model-item .tick{ width:14px; height:14px; flex-shrink:0; color:var(--accent); visibility:hidden; }
    .ai-model-item.active .tick{ visibility:visible; }
    .ai-close{ cursor:pointer; opacity:.75; padding:4px; display:flex; }
    .ai-close:hover{ opacity:1; }
    .ai-msgs{ flex:1; padding:15px; overflow-y:auto; background:var(--surface-2); display:flex; flex-direction:column; gap:12px; }
    .ai-msg{ max-width:86%; padding:10px 13px; border-radius:var(--r-md); font-size:13.5px; line-height:1.65; overflow-wrap:break-word; }
    .ai-msg.user{ align-self:flex-end; background:var(--accent); color:#fff; border-bottom-right-radius:3px; }
    .ai-msg.bot{ align-self:flex-start; background:var(--surface); border:1px solid var(--line-soft); color:var(--ink-2); border-bottom-left-radius:3px; box-shadow:var(--sh-1); }
    .ai-msg.loading{ background:transparent; border:none; box-shadow:none; color:var(--ink-3); font-size:12.5px; }
    .ai-msg.sys{ align-self:center; background:var(--gold-soft); color:var(--gold); font-size:11.5px; max-width:92%; text-align:center; }
    .ai-input-area{ padding:12px; background:var(--surface); border-top:1px solid var(--line-soft); display:flex; gap:8px; align-items:center; }
    .ai-input-area input{ flex:1; min-width:0; padding:10px 14px; border-radius:var(--r-pill); border:1px solid var(--line); background:var(--paper); outline:none; font-size:13px; color:var(--ink); font-family:var(--font); }
    .ai-input-area input:focus{ border-color:var(--accent); }
    .ai-send{ background:var(--ink); color:#fff; border:0; padding:0 17px; border-radius:var(--r-pill); font-size:13px; font-weight:600; cursor:pointer; flex-shrink:0; }
    .ai-send:active{ transform:scale(.95); }
    .ai-attach{ flex:0 0 auto; width:38px; height:38px; display:grid; place-items:center; border-radius:50%; border:1px solid var(--line); background:var(--surface-2); color:var(--ink-2); cursor:pointer; }
    .ai-attach:active{ transform:scale(.95); }
    .ai-attach svg{ width:19px; height:19px; }
    .ai-img{ max-width:150px; max-height:150px; border-radius:var(--r-xs); display:block; margin-top:6px; }
    .ai-img:first-child{ margin-top:0; }
    .ai-preview{ display:none; align-items:center; gap:8px; padding:8px 12px 0; background:var(--surface); }
    .ai-preview.show{ display:flex; }
    .ai-preview img{ width:44px; height:44px; object-fit:cover; border-radius:var(--r-xs); }
    .ai-preview .ai-preview-text{ flex:1; min-width:0; font-size:12px; color:var(--ink-3); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
    .ai-preview .ai-preview-clear{ flex:0 0 auto; border:0; background:var(--surface-2); color:var(--ink-2); width:26px; height:26px; border-radius:50%; cursor:pointer; font-size:14px; line-height:1; }

    /* ==================== 新增功能样式 ==================== */
    /* —— 顶部工具条：主题开关 / 搜索 / 随机刷题（紧凑两行） —— */
    .tool-bar{
        width:100%; max-width:var(--content); margin:12px auto 0; padding:0 20px;
        display:flex; gap:8px; flex-wrap:wrap; align-items:center;
    }
    .tool-btn{
        display:inline-flex; align-items:center; gap:5px;
        border:1px solid var(--line); background:var(--surface-2); color:var(--ink-2);
        border-radius:var(--r-pill); padding:8px 12px; font-size:12px; font-weight:600;
        transition:all .18s var(--ease);
    }
    .tool-btn svg{ width:14px; height:14px; }
    .tool-btn:active{ transform:scale(.96); }
    .tool-btn:hover{ background:var(--paper); color:var(--ink); }
    .tool-btn.is-on{ background:var(--accent-soft); border-color:var(--accent-line); color:var(--accent-deep); }
    .theme-toggle{ margin-left:auto; }
    @media (max-width: 560px){
        .tool-bar{ gap:7px; }
        .tool-btn{ padding:8px 11px; }
    }
    .search-wrap{ position:relative; flex:1 1 100%; min-width:0; order:-1; }
    .search-wrap svg{ position:absolute; left:13px; top:50%; transform:translateY(-50%); width:15px; height:15px; color:var(--ink-4); pointer-events:none; }
    .search-input{
        width:100%; padding:10px 14px 10px 38px; border-radius:var(--r-pill);
        border:1px solid var(--line); background:var(--surface-2); color:var(--ink);
        font-size:13px; font-family:var(--font); outline:none;
    }
    .search-input:focus{ border-color:var(--accent); background:var(--surface); }
    .search-result-meta{ font-size:11.5px; color:var(--ink-3); margin:10px 2px 8px; }

    /* —— 统计细化：本周复习 / 正确率（紧凑横条） —— */
    .stat-extra{
        width:100%; max-width:var(--content); margin:10px auto 0; padding:0 20px;
        display:grid; grid-template-columns:repeat(2,1fr); gap:10px;
    }
    .stat-extra .mini-card{
        background:var(--surface); border:1px solid var(--line-soft); border-radius:var(--r-md);
        padding:11px 14px; display:flex; align-items:center; justify-content:space-between; gap:10px;
    }
    .stat-extra .mini-card b{ font-size:18px; font-weight:700; letter-spacing:-.02em; color:var(--ink); }
    .stat-extra .mini-card span{ font-size:11px; color:var(--ink-3); }

    /* —— 收藏星标 —— */
    .fav-btn{
        display:inline-flex; align-items:center; justify-content:center;
        width:36px; height:36px; border-radius:var(--r-xs); flex:0 0 36px;
        border:1px solid var(--line); background:var(--surface-2); color:var(--ink-4);
        transition:all .18s var(--ease);
    }
    .fav-btn svg{ width:17px; height:17px; }
    .fav-btn.active{ color:var(--gold); background:var(--gold-soft); border-color:var(--gold-line); }
    .list-item.is-fav .item-name::before{ content:"★"; color:var(--gold); margin-right:6px; }

    /* —— 背诵模式：答案先隐藏 —— */
    .recall-mask{
        display:flex; flex-direction:column; align-items:center; gap:8px;
        padding:26px 18px; border:1px dashed var(--line); border-radius:var(--r-md);
        color:var(--ink-3); font-size:13px; text-align:center;
    }
    .recall-mask svg{ width:22px; height:22px; }
    .detail-text.recall-hidden{ color:transparent; }
    .detail-text.recall-hidden b, .detail-text.recall-hidden strong{ background:none; }

    /* —— 全站统一页脚（细节规范 #1 #2） —— */
    .site-footer{
        flex-shrink:0; padding:12px 20px max(16px, env(safe-area-inset-bottom));
        border-top:1px solid var(--line-soft); background:var(--surface);
        text-align:center;
    }
    .site-footer .footer-guide{ font-size:12px; color:var(--ink-2); margin-bottom:5px; }
    .site-footer .footer-guide a{ color:var(--accent-deep); text-decoration:none; font-weight:600; }
    .site-footer .footer-meta{ font-size:10.5px; color:var(--ink-4); line-height:1.7; letter-spacing:.03em; }

    /* —— 收藏清单页 —— */
    .fav-empty{ text-align:center; padding:60px 20px; color:var(--ink-4); }
    .fav-empty svg{ width:34px; height:34px; opacity:.7; }
    .fav-empty strong{ display:block; font-size:14.5px; font-weight:620; color:var(--ink-2); margin:14px 0 7px; }
    .fav-empty span{ font-size:12.5px; }

    /* —— 随机刷题浮层 —— */
    .quiz-dock{
        position:fixed; left:50%; bottom:18px; transform:translateX(-50%); z-index:150;
        display:flex; gap:8px; align-items:center;
        background:var(--surface); border:1px solid var(--line); border-radius:var(--r-pill);
        padding:8px 10px; box-shadow:var(--sh-3); max-width:calc(100% - 32px);
    }
    .quiz-dock .dock-count{ font-size:12px; color:var(--ink-3); padding:0 6px; white-space:nowrap; }
    .quiz-dock button{
        display:inline-flex; align-items:center; gap:5px; padding:8px 13px; border-radius:var(--r-pill);
        font-size:12.5px; font-weight:600; white-space:nowrap;
    }
    .dock-next{ background:var(--ink); color:#fff; }
    .dock-exit{ background:var(--surface-2); color:var(--ink-2); border:1px solid var(--line); }

    /* —— 解析紧扣考点校验提示 —— */
    .quiz-ans.warn{ border-top-color:var(--danger-line); }
    .quiz-ans .ans-warn{ display:block; margin-top:6px; font-size:11.5px; color:var(--danger); }

    