* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
    --primary: #4e9aff;
    --primary-dark: #2563eb;
    --bg: #f5f7fa;
    --card-bg: #fff;
    --text: #1a1a2e;
    --muted: #8b95a1;
    --border: #e8e8e8;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
}
body { font-family: -apple-system, "Microsoft YaHei", sans-serif; background: var(--bg); color: var(--text); }
a { text-decoration: none; color: inherit; }

/* 登录页 */
.login-body { background: linear-gradient(135deg, #4e9aff, #2563eb); min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login-wrap { width: 100%; max-width: 380px; padding: 20px; }
.login-box { background: #fff; border-radius: 16px; padding: 40px 32px; box-shadow: 0 20px 60px rgba(0,0,0,.15); text-align: center; }
.login-box h1 { font-size: 24px; margin-bottom: 4px; }
.login-box p { color: var(--muted); font-size: 14px; margin-bottom: 28px; }
.login-form .form-group { margin-bottom: 16px; }
.login-form input { width: 100%; height: 44px; padding: 0 14px; border: 1px solid var(--border); border-radius: 8px; font-size: 15px; }
.login-form input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(78,154,255,.1); }
.btn-login { width: 100%; height: 44px; background: var(--primary); color: #fff; border: none; border-radius: 8px; font-size: 16px; font-weight: 600; cursor: pointer; }
.btn-login:hover { background: var(--primary-dark); }
.login-tips { margin-top: 20px; }
.login-tips p { color: #aaa; font-size: 13px; margin-bottom: 4px; }
.login-tips a { color: var(--primary); }

/* PC 端布局 */
.pc-app { min-height: 100vh; }
.pc-header { height: 56px; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.08); display: flex; align-items: center; padding: 0 24px; position: sticky; top: 0; z-index: 100; }
.header-left { flex: 0 0 auto; }
.header-left .logo { font-size: 18px; font-weight: 700; }
.header-nav { flex: 1; display: flex; justify-content: center; gap: 8px; }
.nav-item { padding: 8px 20px; border-radius: 8px; font-size: 14px; color: var(--muted); transition: all .2s; }
.nav-item:hover, .nav-item.active { background: var(--primary); color: #fff; }
.header-right { display: flex; align-items: center; gap: 12px; }
.emp-name { font-size: 14px; font-weight: 500; }
.emp-dept { font-size: 12px; color: var(--muted); background: #f0f2f5; padding: 2px 8px; border-radius: 4px; }
.btn-logout { font-size: 13px; color: var(--danger); padding: 4px 12px; border-radius: 6px; }
.btn-usage-guide { font-size: 13px; color: var(--primary-dark); background: #eff6ff; padding: 4px 12px; border-radius: 6px; }
.btn-usage-guide:hover { background: #dbeafe; }
.btn-admin-center { font-size: 13px; color: #fff; background: var(--primary); padding: 4px 12px; border-radius: 6px; }
.btn-admin-center:hover { background: var(--primary-dark); }
.pc-content { padding: 24px; max-width: 1200px; margin: 0 auto; }
.kb-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.kb-tab { border: 1px solid var(--border); background: #fff; color: var(--text); border-radius: 8px; padding: 8px 14px; font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.kb-tab:hover { border-color: var(--primary); color: var(--primary); }
.kb-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* 卡片 */
.card { background: var(--card-bg); border-radius: 12px; padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,.06); margin-bottom: 16px; }
.card-title { font-size: 16px; font-weight: 600; margin-bottom: 16px; }
.card-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-title-row .card-title { margin-bottom: 0; }
.clip-page .card-title-row .card-title { flex: 1; min-width: 0; }
.clip-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.clip-crumb a { color: var(--primary); }
.pc-clip-catalog { padding-bottom: 0; overflow: hidden; }
.pc-clip-search { margin-bottom: 14px; }
.pc-clip-search .input { width: 100%; height: 38px; }
.pc-clip-split { display: flex; align-items: stretch; min-height: 480px; margin: 0 -20px; border-top: 1px solid var(--border); }
.pc-clip-rail { width: 168px; flex: none; background: #f4f6fb; overflow-y: auto; max-height: calc(100vh - 220px); }
.pc-clip-rail button { display: block; width: 100%; border: none; background: transparent; color: #64748b; font-size: 14px; line-height: 1.35; padding: 16px 12px; text-align: center; cursor: pointer; }
.pc-clip-rail button.on { background: #fff; color: #2563eb; font-weight: 650; }
.pc-clip-rail button[hidden], .pc-clip-row[hidden] { display: none; }
.pc-clip-side-empty, .pc-clip-main-empty { padding: 28px 16px; color: #94a3b8; font-size: 13px; text-align: center; }
.pc-clip-main { flex: 1; min-width: 0; background: #fff; overflow-y: auto; max-height: calc(100vh - 220px); }
.pc-clip-row { display: flex; align-items: center; gap: 8px; width: 100%; border: none; border-bottom: 1px solid #f1f5f9; background: #fff; text-align: left; padding: 14px 18px; cursor: pointer; }
.pc-clip-row span { flex: 1; min-width: 0; }
.pc-clip-row b { display: block; font-size: 15px; font-weight: 650; color: #17233d; }
.pc-clip-row small { display: block; margin-top: 4px; font-size: 12px; color: #94a3b8; font-weight: 400; }
.pc-clip-row i { color: #cbd5e1; font-style: normal; font-size: 20px; }
.clip-folder-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.clip-folder-item { border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; cursor: pointer; min-width: 140px; background: #f8fafc; }
.clip-folder-item strong { display: block; font-size: 14px; }
.clip-folder-item span { font-size: 12px; color: var(--muted); }
.clip-author { margin-left: auto; font-size: 12px; color: var(--muted); }
.clip-read-ops { display: flex; gap: 8px; margin-top: 10px; }
.clip-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.clip-block-list { display: flex; flex-direction: column; gap: 10px; }
.clip-block { border: 1px solid var(--border); border-radius: 8px; padding: 10px; background: #f8fafc; }
.clip-block-hd { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: 13px; }
.clip-block img, .clip-block video { max-width: 100%; max-height: 180px; display: block; margin-bottom: 8px; border-radius: 6px; }
.clip-read-split { display: flex; align-items: flex-start; gap: 18px; margin-top: 4px; min-height: 420px; }
.clip-read-rail {
    width: 250px; flex: none; position: sticky; top: 72px; align-self: flex-start;
    max-height: calc(100vh - 96px); overflow: auto;
    background: #fffdf8; border-radius: 12px; padding: 6px; box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.clip-read-rail[hidden] { display: none !important; }
.clip-read-toc { padding: 0; }
.ebook-toc-item[hidden] { display: none !important; }
.ebook-toc-item.clip-outline-toc { padding-left: 28px; }
.ebook-toc-item.clip-outline-toc span { width: 8px; }
.ebook-toc-item.clip-outline-toc b { font-weight: 500; color: #6b5a45; }
.clip-read-card .clip-outline-mark { font-weight: 650; scroll-margin-top: 84px; }
.clip-read-list { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; padding: 2px 0 4px; }
.clip-read-card { border: 1px solid var(--border); border-radius: 10px; padding: 14px; background: #fff; scroll-margin-top: 76px; cursor: pointer; }
.clip-read-article { cursor: default; border: none; padding: 0; }
.clip-read-article .clip-read-body { max-height: none; overflow: visible; }
.clip-read-page .card-title-row { position: relative; display: flex; align-items: center; justify-content: space-between; min-height: 40px; }
.clip-read-page .card-title-row .btn { position: relative; z-index: 1; }
.clip-read-page .card-actions { display: flex; align-items: center; gap: 8px; position: relative; z-index: 1; }
.clip-read-page .card-title {
    position: absolute; left: 88px; right: 168px; top: 50%; transform: translateY(-50%);
    display: block; margin: 0; width: auto; max-width: none;
    text-align: center; font-size: 22px; font-weight: 700; line-height: 1.4;
    pointer-events: none;
}
.clip-read-page:has(.clip-read-rail:not([hidden])) .card-title { left: calc(250px + 18px + 72px); right: 168px; }
.book-item > .fav-btn { position: absolute; top: 8px; left: 8px; z-index: 3; background: rgba(255,255,255,.92); }
.ebook-bar .fav-btn { flex-shrink: 0; }
.clip-read-page > .clip-author { display: block; margin: -8px 0 12px; text-align: center; }
.clip-read-page:has(.clip-read-rail:not([hidden])) > .clip-author { padding-left: calc(250px + 18px); box-sizing: border-box; }
.clip-read-body { max-height: 168px; overflow: hidden; position: relative; }
.clip-read-card.open .clip-read-body { max-height: none; }
.clip-read-card.clip-long:not(.open) .clip-read-body::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 36px;
    background: linear-gradient(transparent, #fff); pointer-events: none;
}
.clip-read-more {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    width: 100%; margin-top: 4px; border: none; background: transparent;
    color: var(--primary); font-size: 13px; padding: 6px 0 2px; cursor: pointer;
}
.clip-read-more[hidden] { display: none; }
.clip-read-more i {
    width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg); margin-top: -4px;
}
.clip-read-card.open .clip-read-more i { transform: rotate(225deg); margin-top: 2px; }
.clip-read-card .clip-read-hd { display: grid; grid-template-columns: 1fr auto; align-items: start; margin-bottom: 8px; }
.clip-read-card .clip-read-hd strong { grid-column: 1 / -1; grid-row: 1; min-width: 0; padding: 0 148px; box-sizing: border-box; text-align: center; font-size: 22px; font-weight: 700; line-height: 1.35; }
.clip-read-card .clip-read-hd .clip-read-tools { grid-column: 2; grid-row: 1; display: flex; gap: 6px; justify-self: end; position: relative; z-index: 1; }
.clip-read-card .clip-read-hd .clip-read-tools .btn { position: static; }
.clip-read-card .clip-read-hd .btn { grid-column: 2; grid-row: 1; justify-self: end; margin-left: 0; position: relative; z-index: 1; }
.clip-read-card .clip-read-hd .clip-author { grid-column: 1 / -1; grid-row: 2; margin: 6px 0 0; text-align: center; }
.clip-read-card img, .clip-read-card video { max-width: 100%; border-radius: 8px; display: block; margin: 8px 0; }
.clip-read-card img { max-height: 640px; height: auto; object-fit: contain; background: #f4f7f5; }
.clip-read-card video { max-height: 320px; }
.clip-read-card p { margin: 8px 0; color: #475569; line-height: 1.7; white-space: pre-wrap; }
.clip-read-card a { color: var(--primary); word-break: break-all; display: block; margin: 8px 0; }

/* 统计卡片 */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat-card { background: #fff; border-radius: 12px; padding: 20px; text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.stat-card.stat-link { cursor: pointer; }
.stat-card.stat-link:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(15, 23, 42, .08); }
.stat-card .stat-icon { font-size: 28px; margin-bottom: 8px; }
.stat-card .stat-value { font-size: 28px; font-weight: 700; color: var(--primary); }
.stat-card .stat-label { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* 课程书架 */
.book-shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 20px 16px; padding: 4px 0 8px; }
.book-item { cursor: pointer; }
.book {
    position: relative; height: 220px; border-radius: 2px 10px 10px 2px; color: #fff;
    padding: 18px 12px 14px 18px; box-shadow: 4px 6px 16px rgba(15,23,42,.18);
    display: flex; flex-direction: column; overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease;
}
.book:hover { transform: translateY(-4px) rotate(-.4deg); box-shadow: 6px 10px 22px rgba(15,23,42,.24); }
.book-spine { position: absolute; left: 0; top: 0; bottom: 0; width: 10px; background: linear-gradient(90deg, rgba(0,0,0,.28), rgba(255,255,255,.08) 40%, rgba(0,0,0,.12)); }
.book-cat { font-size: 11px; letter-spacing: .04em; opacity: .86; margin-bottom: 8px; }
.book-title { font-size: 16px; font-weight: 700; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; text-shadow: 0 1px 2px rgba(0,0,0,.25); }
.book-meta { margin-top: auto; font-size: 11px; line-height: 1.5; opacity: .9; }
.book-progress { position: absolute; top: 10px; right: 10px; font-size: 11px; padding: 1px 6px; border-radius: 999px; background: rgba(255,255,255,.22); }
.book-toc { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: #fff; }
.book-toc-cover { padding: 18px 20px 14px; background: linear-gradient(135deg, #1e3a8a, #2563eb); color: #fff; }
.book-toc-mark { font-size: 11px; letter-spacing: .2em; opacity: .75; margin-bottom: 4px; }
.book-toc-title { font-size: 18px; font-weight: 700; }
.book-chapter { border-top: 1px solid var(--border); }
.book-chapter-hd { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: #f8fafc; }
.book-ch-no { font-size: 12px; font-weight: 700; color: var(--primary-dark, #2563eb); flex-shrink: 0; }
.book-ch-name { font-size: 15px; font-weight: 600; }
.book-section { display: flex; align-items: center; gap: 10px; padding: 11px 14px 11px 24px; border-top: 1px dashed #e5e7eb; cursor: pointer; }
.book-section:hover { background: #eff6ff; }
.book-sec-no { width: 36px; font-size: 12px; color: var(--muted); font-weight: 600; }
.book-sec-name { flex: 1; font-size: 14px; }
.book-sec-empty { padding: 10px 14px 10px 24px; color: var(--muted); font-size: 13px; border-top: 1px dashed #e5e7eb; }

/* 课程网格 */
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.course-card { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.06); cursor: pointer; transition: transform .2s; }
.course-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.1); }
.course-card .cover { height: 140px; background: linear-gradient(135deg, #4e9aff, #2563eb); display: flex; align-items: center; justify-content: center; font-size: 40px; }
.course-card .info { padding: 16px; }
.course-card .info h4 { font-size: 15px; margin-bottom: 8px; }
.course-card .info p { font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.course-card .progress-bar { height: 4px; background: #f0f2f5; border-radius: 2px; margin-top: 12px; overflow: hidden; }
.course-card .progress-fill { height: 100%; background: var(--primary); transition: width .3s; }
.course-card .progress-text { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* 按钮和输入 */
.btn { display: inline-flex; align-items: center; gap: 4px; padding: 8px 16px; border: none; border-radius: 8px; font-size: 14px; cursor: pointer; transition: all .2s; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-ghost { background: #f0f2f5; color: var(--text); }
.btn-danger { background: rgba(239,68,68,.1); color: var(--danger); }
.btn-sm { padding: 4px 12px; font-size: 12px; }
.input, .select, textarea { width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; }
#pcClipTitle.input { height: auto; min-height: 48px; padding: 10px 12px; font-size: 22px; font-weight: 650; line-height: 1.35; }
.input:focus, .select:focus, textarea:focus { outline: none; border-color: var(--primary); }
textarea { height: auto; padding: 8px 12px; min-height: 80px; resize: vertical; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 500; color: #555; }
.kb-dept-list { display: flex; flex-wrap: wrap; gap: 6px 14px; max-height: 160px; overflow: auto; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: #fafafa; }
.kb-dept-item { font-size: 13px; color: #334155; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.kb-dept-all { font-weight: 600; color: #0f172a; }

/* 表格 */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); font-size: 14px; }
.table th { background: #f9fafb; font-weight: 600; color: var(--muted); }
.table tr:hover { background: #f9fafb; }

/* 标签 */
.badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; }
.badge-success { background: rgba(16,185,129,.1); color: var(--success); }
.badge-warning { background: rgba(245,158,11,.1); color: var(--warning); }
.badge-danger { background: rgba(239,68,68,.1); color: var(--danger); }
.badge-info { background: rgba(78,154,255,.1); color: var(--primary); }
.badge-muted { background: #f0f2f5; color: var(--muted); }

/* 搜索 */
.search-bar { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.search-bar .input, .search-bar .select { width: auto; min-width: 160px; }
.search-bar .practice-done-count { margin-left: auto; color: var(--muted); font-size: 13px; white-space: nowrap; }

/* 弹窗 */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: flex; align-items: flex-start; justify-content: center; z-index: 200; padding: 40px 20px; overflow-y: auto; }
.modal { background: #fff; border-radius: 12px; width: 100%; max-width: 640px; box-shadow: 0 20px 60px rgba(0,0,0,.2); }
.modal-header { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.modal-header h3 { font-size: 16px; }
.modal-close { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--muted); }
.modal-body { padding: 20px; max-height: 70vh; overflow-x: hidden; overflow-y: auto; max-width: 100%; }
.modal-footer { padding: 16px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 12px; }

/* 空状态 */
.empty { text-align: center; padding: 40px; color: var(--muted); }
.empty .empty-icon { font-size: 48px; margin-bottom: 8px; }

/* 刷题 */
.question-card { background: #fff; border-radius: 12px; padding: 24px; margin-bottom: 16px; max-width: 100%; overflow-x: hidden; }
.question-card .q-title { font-size: 16px; font-weight: 500; margin-bottom: 16px; max-width: 100%; overflow-wrap: anywhere; }
.question-card .q-options { margin-bottom: 16px; max-width: 100%; }
.question-card .q-option { padding: 12px 16px; border: 2px solid var(--border); border-radius: 8px; margin-bottom: 8px; cursor: pointer; display: flex; align-items: flex-start; gap: 8px; max-width: 100%; }
.question-card img, .question-card video,
.q-title img, .q-title video,
.q-option img, .q-option video,
.modal-body img, .modal-body video,
.pc-content img, .pc-content video {
    max-width: 100% !important;
    max-height: 70vh !important;
    width: auto !important;
    height: auto !important;
    display: block;
    object-fit: contain;
    border-radius: 8px;
    margin: 8px 0;
    box-sizing: border-box;
}
.question-card .q-option:hover { border-color: var(--primary); }
.question-card .q-option.selected { border-color: var(--primary); background: rgba(78,154,255,.05); }
.question-card .q-option.correct { border-color: var(--success); background: rgba(16,185,129,.05); }
.question-card .q-option.wrong { border-color: var(--danger); background: rgba(239,68,68,.05); }
.question-card .q-analysis { margin-top: 16px; padding: 16px; background: #f9fafb; border-radius: 8px; font-size: 14px; color: #555; }
.question-card .q-analysis.correct { background: rgba(16,185,129,.05); }
.question-card .q-analysis.wrong { background: rgba(239,68,68,.05); }

/* 课程详情 */
.course-detail { }
.course-detail .chapter { padding: 16px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 12px; cursor: pointer; }
.course-detail .chapter:hover { border-color: var(--primary); }
.course-detail .chapter-title { font-size: 15px; font-weight: 500; margin-bottom: 8px; }
.course-detail .chapter-content { font-size: 14px; color: #555; line-height: 1.6; }
.course-detail .chapter-group { border: 1px solid var(--border); border-radius: 8px; margin-bottom: 12px; padding: 14px 16px; }
.course-detail .content-item { display: flex; align-items: center; gap: 8px; padding: 10px 12px; margin-top: 8px; background: #f8fafc; border-radius: 8px; cursor: pointer; font-size: 14px; }
.course-detail .content-item:hover { background: #eff6ff; color: var(--primary); }
.attach-box { margin-top: 20px; padding: 14px; background: #f8fafc; border: 1px solid var(--border); border-radius: 8px; }
.attach-box-title { font-size: 13px; font-weight: 600; color: #374151; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.attach-dl { display: flex; align-items: center; gap: 6px; padding: 8px 10px; background: #fff; border: 1px solid var(--border); border-radius: 6px; margin-top: 6px; font-size: 13px; color: #2563eb; }
.attach-dl:hover { border-color: #2563eb; background: #eff6ff; }

/* 考试 */
.exam-card { background: #fff; border-radius: 12px; padding: 20px; margin-bottom: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.exam-card .exam-title { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.exam-card .exam-info { display: flex; gap: 16px; font-size: 13px; color: var(--muted); margin-bottom: 12px; flex-wrap: wrap; }
.exam-timer { position: fixed; top: 56px; right: 24px; background: var(--danger); color: #fff; padding: 8px 16px; border-radius: 8px; font-weight: 600; z-index: 100; }

/* =============================================
   考试星风格 - 首页
   ============================================= */

/* 欢迎Banner */
.home-banner {
    background: linear-gradient(120deg, #4e9aff 0%, #2563eb 60%, #7c3aed 100%);
    border-radius: 16px;
    padding: 28px 32px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(37,99,235,.25);
}
.home-banner::after {
    content: '';
    position: absolute;
    right: -40px; top: -60px;
    width: 200px; height: 200px;
    background: rgba(255,255,255,.12);
    border-radius: 50%;
}
.home-banner::before {
    content: '';
    position: absolute;
    right: 100px; bottom: -80px;
    width: 160px; height: 160px;
    background: rgba(255,255,255,.08);
    border-radius: 50%;
}
.home-banner h2 { font-size: 22px; margin-bottom: 8px; position: relative; z-index: 1; }
.home-banner p { font-size: 14px; opacity: .85; position: relative; z-index: 1; }
.banner-deco { font-size: 56px; position: relative; z-index: 1; filter: drop-shadow(0 4px 8px rgba(0,0,0,.15)); color: rgba(255,255,255,.9); }

/* 快捷入口宫格 */
.home-shortcuts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}
.shortcut-item {
    background: #fff;
    border-radius: 12px;
    padding: 18px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    transition: transform .2s, box-shadow .2s;
    position: relative;
}
.shortcut-item:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.1); }
.shortcut-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px;
}
.shortcut-label { font-size: 13px; color: var(--text); font-weight: 500; }
.shortcut-badge {
    position: absolute; top: 8px; right: 12px;
    background: var(--danger); color: #fff;
    font-size: 11px; min-width: 18px; height: 18px;
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    padding: 0 5px;
}

/* 最近学习 */
.recent-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.recent-item {
    display: flex; gap: 12px; align-items: center;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color .2s;
}
.recent-item:hover { border-color: var(--primary); }
.recent-cover {
    position: relative;
    width: 84px; height: 56px;
    border-radius: 6px;
    overflow: hidden;
    flex: 0 0 84px;
    background: #eef2f7;
}
.recent-cover img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.recent-info { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.recent-title { font-size: 14px; font-weight: 500; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; word-break: keep-all; }

/* 课程封面多彩渐变（考试星风格） */
.course-card .cover.c1 { background: linear-gradient(135deg, #4e9aff, #2563eb); }
.course-card .cover.c2 { background: linear-gradient(135deg, #10b981, #059669); }
.course-card .cover.c3 { background: linear-gradient(135deg, #f59e0b, #d97706); }
.course-card .cover.c4 { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.course-card .cover.c5 { background: linear-gradient(135deg, #ec4899, #db2777); }
.course-card .cover.c6 { background: linear-gradient(135deg, #06b6d4, #0891b2); }
.course-card .cover { position: relative; }
.course-card .cover.has-photo { padding: 0; overflow: hidden; }
.course-card .cover.has-photo::after { display: none; }
.course-card .cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.course-card .cover::after {
    content: '';
    position: absolute; right: -20px; top: -30px;
    width: 90px; height: 90px;
    background: rgba(255,255,255,.15);
    border-radius: 50%;
}
.course-card .cat-tag {
    position: absolute; top: 10px; left: 10px;
    background: rgba(255,255,255,.9);
    color: var(--primary-dark);
    font-size: 12px; font-weight: 600;
    padding: 2px 10px;
    border-radius: 10px;
    z-index: 1;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .pc-header { height: auto; flex-wrap: wrap; align-items: center; padding: 8px 10px 0; gap: 6px 8px; }
    .header-left .logo { font-size: 15px; }
    .header-right { margin-left: auto; min-width: 0; gap: 6px; }
    .emp-dept { display: none; }
    .emp-name { max-width: 72px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
    .btn-usage-guide, .btn-admin-center, .btn-logout { padding: 4px 8px; }
    .header-nav {
        order: 3; flex: 1 1 100%; justify-content: space-between; gap: 4px;
        overflow-x: auto; padding: 0 0 8px; scrollbar-width: none;
    }
    .header-nav::-webkit-scrollbar { display: none; }
    .nav-item {
        flex: 1 1 0; min-width: 0; justify-content: center;
        padding: 6px 4px; font-size: 12px; gap: 3px; white-space: nowrap;
    }
}
@media (max-width: 640px) {
    .home-banner { padding: 20px; border-radius: 12px; }
    .home-banner h2 { font-size: 18px; }
    .banner-deco { font-size: 40px; }
    .home-shortcuts { grid-template-columns: repeat(4, 1fr); gap: 8px; }
    .shortcut-item { padding: 12px 6px; }
    .shortcut-icon { width: 40px; height: 40px; font-size: 20px; }
    .shortcut-label { font-size: 12px; }
}

/* SVG 图标通用对齐 */
.ico { vertical-align: -0.18em; flex-shrink: 0; }
.logo { display: inline-flex; align-items: center; gap: 8px; }
.logo .ico { color: var(--primary); }
.nav-item { display: inline-flex; align-items: center; gap: 6px; }
.nav-item .ico { vertical-align: middle; }
.card-title { display: flex; align-items: center; gap: 6px; }
.card-title .ico { color: var(--primary); }
.stat-icon { display: flex; align-items: center; justify-content: center; }
.stat-icon .ico { color: var(--primary); }
.recent-cover .ico { color: #6366f1; }
.btn { display: inline-flex; align-items: center; gap: 4px; justify-content: center; }
.exam-timer { display: inline-flex; align-items: center; gap: 4px; }
.login-box h1 .ico { vertical-align: -6px; margin-right: 6px; color: var(--primary); }

/* 课程/章节内容富媒体渲染 */
.chapter-full { font-size: 15px; line-height: 1.85; }
.chapter-full img { max-width: 100%; height: auto; border-radius: 8px; margin: 14px 0; display: block; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.chapter-full video { max-width: 100%; border-radius: 8px; margin: 14px 0; display: block; background: #000; }
.chapter-full h2 { font-size: 20px; margin: 20px 0 10px; color: var(--text); border-left: 3px solid var(--primary); padding-left: 10px; }
.chapter-full h3 { font-size: 17px; margin: 16px 0 8px; color: var(--text); }
.chapter-full p { font-size: 15px; line-height: 1.85; margin: 10px 0; color: var(--text); }
.chapter-full ul, .chapter-full ol { padding-left: 24px; margin: 10px 0; }
.chapter-full li { font-size: 15px; line-height: 1.85; margin: 4px 0; }

.course-detail img, .chapter img, .course-content img, .study-content img { max-width: 100%; height: auto; border-radius: 6px; margin: 10px 0; display: block; }
.course-detail video, .chapter video, .course-content video, .study-content video { max-width: 100%; border-radius: 6px; margin: 10px 0; display: block; }
.course-detail h2, .chapter h2 { font-size: 18px; margin: 16px 0 8px; color: var(--text); }
.course-detail h3, .chapter h3 { font-size: 16px; margin: 14px 0 6px; color: var(--text); }
.course-detail p, .chapter p { font-size: 14px; line-height: 1.8; margin: 8px 0; color: var(--text); }
.course-detail ul, .chapter ul, .course-detail ol, .chapter ol { padding-left: 24px; margin: 8px 0; }
.course-detail li, .chapter li { font-size: 14px; line-height: 1.8; }

.book.has-photo { background-size: cover; background-position: center; }
.book-shelf::after {
    content: ''; grid-column: 1 / -1; height: 10px; border-radius: 2px;
    background: linear-gradient(#e7d3b0, #b08968); box-shadow: 0 8px 12px rgba(80,50,20,.12);
}
.ebook-bar {
    position: sticky; top: 56px; z-index: 30;
    display: flex; align-items: center; gap: 8px; margin: -8px 0 0; padding: 10px 2px;
    background: rgba(245,247,250,.94);
}
.ebook-bar-title { flex: 1; min-width: 0; font-size: 16px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ebook-back, .ebook-tool {
    border: 1px solid #e7e0d4; background: #fffdf8; color: #3f3428; border-radius: 999px;
    padding: 6px 12px; font-size: 13px; cursor: pointer; flex-shrink: 0;
}
.ebook-back:hover, .ebook-tool:hover { border-color: #2563eb; color: #1d4ed8; }
.ebook-toc-btn { display: none; }
.ebook-share-tip { font-size: 13px; color: #1d4ed8; margin: 8px 0 0; word-break: break-all; }
.ebook-share-tip[hidden] { display: none; }
.ebook-progress { height: 3px; background: #e7e0d4; border-radius: 2px; margin: 8px 0 0; overflow: hidden; }
.ebook-progress i { display: block; height: 100%; background: #2563eb; }
.ebook-body { display: flex; align-items: flex-start; gap: 18px; margin-top: 14px; }
.ebook-toc {
    width: 250px; flex-shrink: 0; position: sticky; top: 118px;
    max-height: calc(100vh - 140px); overflow: auto;
    background: #fffdf8; border-radius: 12px; padding: 6px; box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.ebook-stage { flex: 1; min-width: 0; }
.ebook-toc-ch { font-size: 12px; font-weight: 700; color: #6b5a45; padding: 10px 10px 4px; }
.ebook-toc-item {
    display: flex; align-items: flex-start; gap: 8px; width: 100%; text-align: left;
    border: none; background: transparent; border-radius: 8px; padding: 8px 10px; font-size: 13px; color: #1f2937; cursor: pointer;
}
.ebook-toc-item span { width: 36px; flex-shrink: 0; color: #8a7355; font-weight: 600; }
.ebook-toc-item b { font-weight: 500; line-height: 1.45; }
.ebook-toc-item.active, .ebook-toc-item:hover { background: #efe6d6; }
.ebook-sheet {
    background: #fffdf8; border-radius: 2px 16px 16px 2px; padding: 36px 42px 20px;
    box-shadow: 8px 12px 28px rgba(80,60,20,.08); min-height: 68vh;
}
.ebook-sheet[data-font="sm"] { font-size: 16px; }
.ebook-sheet[data-font="md"] { font-size: 18px; }
.ebook-sheet[data-font="lg"] { font-size: 20px; }
.ebook-kicker { font-size: 12px; letter-spacing: .12em; color: #8a7355; margin-bottom: 8px; }
.ebook-sheet h1 { font-size: 1.45em; line-height: 1.35; margin: 0 0 18px; }
.ebook-lead { color: #5c5346; line-height: 1.8; margin: 0 0 14px; }
.ebook-text, .ebook-text p, .ebook-text li { font-size: 1em; line-height: 1.95; color: #1f2937; }
.ebook-text p { margin: 0.85em 0; }
.ebook-text h2, .ebook-text h3 { line-height: 1.4; margin: 1.15em 0 .45em; }
.ebook-text pre, .ebook-text code { white-space: pre-wrap; font-family: Consolas, ui-monospace, monospace; font-size: .92em; }
.ebook-text img, .ebook-text video { max-width: 100%; height: auto; display: block; margin: 14px auto; border-radius: 8px; }
.ebook-empty { color: #8a7355; }
.ebook-turnbar {
    position: sticky; bottom: 16px; z-index: 5;
    display: flex; align-items: center; gap: 12px; margin-top: 18px; padding: 10px;
    background: rgba(255,253,248,.96); border-radius: 14px; box-shadow: 0 6px 18px rgba(80,60,20,.1);
}
.ebook-turnbar span { min-width: 64px; text-align: center; color: #8a7355; font-size: 13px; }
.ebook-turn { flex: 1; border: none; background: #1e3a8a; color: #fff; border-radius: 999px; padding: 10px 12px; font-size: 14px; cursor: pointer; }
.ebook-turn[disabled] { background: #e7e0d4; color: #a89880; cursor: default; }
@media (max-width: 860px) {
    .ebook-bar { top: 96px; }
    .ebook-toc-btn { display: inline-flex; }
    .ebook-body { display: block; }
    .ebook-toc { display: none; width: auto; position: static; max-height: none; margin-bottom: 10px; }
    .ebook.show-toc .ebook-toc { display: block; }
    .ebook.show-toc .ebook-stage { display: none; }
    .ebook-sheet { padding: 22px 16px 12px; }
    .ebook-turnbar { bottom: 12px; }
}
.ledger-page .card-title { flex: 1; text-align: center; }
.ledger-summary { margin-bottom: 14px; }
.ledger-summary b { display: block; font-size: 28px; color: var(--primary); line-height: 1.2; }
.ledger-summary span, .ledger-meta, .ledger-note, .ledger-ans { color: var(--muted); font-size: 13px; line-height: 1.6; }
.ledger-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.ledger-chip { border: 1px solid var(--border); background: #fff; border-radius: 999px; padding: 6px 12px; cursor: pointer; font-size: 13px; }
.ledger-chip.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.ledger-search { width: 100%; margin-bottom: 12px; }
.ledger-item { display: block; width: 100%; text-align: left; border: 1px solid var(--border); background: #fff; border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; cursor: default; }
button.ledger-item { cursor: pointer; }
.ledger-item-hd { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.ledger-item-hd b { font-size: 15px; line-height: 1.45; }
.ledger-item-hd span.ok, .ledger-state.ok { color: var(--success); }
.ledger-item-hd span.no, .ledger-state.no { color: var(--danger); }
.ledger-bar { height: 6px; background: #eef2f7; border-radius: 99px; overflow: hidden; margin: 8px 0; }
.ledger-bar i { display: block; height: 100%; background: var(--primary); }
.ledger-cat { margin-bottom: 10px; }
.ledger-actions { display: flex; gap: 8px; margin-top: 8px; }
.ledger-act { border: 1px solid var(--border); background: #fff; border-radius: 8px; padding: 6px 10px; cursor: pointer; font-size: 13px; color: var(--primary); }

.practice-run { max-width: 960px; margin: 0 auto; }
.practice-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; background: #fff; border-radius: 12px; padding: 14px 18px; margin-bottom: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.05); }
.practice-head h2 { margin: 0; font-size: 18px; text-align: center; }
.practice-head span { text-align: right; color: var(--muted); font-size: 13px; white-space: nowrap; }
.practice-head-count { display: flex; justify-content: flex-end; }
.practice-bar { height: 4px; background: #e5e7eb; border-radius: 2px; overflow: hidden; margin-bottom: 14px; }
.practice-bar i { display: block; height: 100%; background: linear-gradient(90deg, #2563eb, #3b82f6); }
.q-badges { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.question-card .opt-key { font-weight: 700; min-width: 22px; }
.question-card .opt-text { flex: 1; line-height: 1.6; }
textarea.practice-fill { height: auto; min-height: 120px; padding: 12px; }
.practice-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 14px; }
.practice-nav button[disabled] { opacity: .45; cursor: default; }
.practice-dots { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.practice-dots button { width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid #d1d5db; background: #fff; font-size: 13px; cursor: pointer; }
.practice-dots button.current { background: #2563eb; color: #fff; border-color: #2563eb; }
.practice-dots button.done { background: #d1fae5; color: #065f46; border-color: #6ee7b7; }
.practice-report { background: #fff; border-radius: 12px; padding: 36px 24px; text-align: center; }
.practice-rate { font-size: 48px; font-weight: 700; color: #2563eb; line-height: 1; }
.practice-rate small { font-size: 18px; margin-left: 2px; }
.practice-report p { margin: 12px 0 0; color: #374151; }
.practice-meta { display: flex; justify-content: center; gap: 28px; margin: 18px 0 8px; color: var(--muted); font-size: 13px; }
.practice-meta b { display: block; font-size: 18px; color: #1f2937; }
.practice-report .practice-nav { justify-content: center; margin-top: 18px; }
.clip-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin: 8px 0 4px; }
.clip-pager > span { color: var(--muted); font-size: 13px; }
.clip-page { min-width: 36px; height: 34px; padding: 0 10px; border: 1px solid var(--border); background: #fff; border-radius: 8px; cursor: pointer; font-size: 13px; }
.clip-page.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.clip-page[disabled] { opacity: .4; cursor: default; }
.clip-page-gap { color: var(--muted); }
