:root {
    /* 橘色主色板 */
    --orange: #f97316;
    --orange-dark: #ea580c;
    --orange-deep: #c2410c;
    --orange-50: #fff7ed;
    --orange-100: #ffedd5;
    --orange-200: #fed7aa;
    --orange-300: #fdba74;
    --text: #1f2933;
    --muted: #6b7280;
    /* 玻璃材质（高透光） */
    --glass: rgba(255, 255, 255, 0.3);
    --glass-strong: rgba(255, 255, 255, 0.42);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px rgba(234, 88, 12, 0.14);
    --glass-inset: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
* { box-sizing: border-box; }

/* 橘色渐变背景 + 装饰光斑（让玻璃质感透出来） */
body {
    margin: 0;
    font-family: Arial, "Helvetica Neue", Helvetica, "Microsoft YaHei", "PingFang SC", sans-serif;
    background: linear-gradient(135deg, #fff7ed 0%, #ffe8d6 45%, #ffd9b8 100%) fixed;
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}
body::before, body::after {
    content: "";
    position: fixed;
    border-radius: 50%;
    filter: blur(90px);
    opacity: .62;
    z-index: -1;
    pointer-events: none;
}
body::before {
    width: 480px; height: 480px;
    background: radial-gradient(circle, #fb923c, transparent 70%);
    top: -140px; left: -90px;
}
body::after {
    width: 560px; height: 560px;
    background: radial-gradient(circle, #fdba74, transparent 70%);
    bottom: -180px; right: -140px;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

/* 顶栏：橘色玻璃 */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(249, 115, 22, 0.5);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.45);
    color: #fff;
    box-shadow: 0 4px 20px rgba(234, 88, 12, 0.15);
}
.site-header .nav {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; padding: 12px 16px;
}
.site-header a {
    color: #fff; text-decoration: none; margin-left: 14px;
    padding: 4px 10px; border-radius: 8px;
    transition: background .15s ease;
}
.site-header a:hover { text-decoration: none; background: rgba(255, 255, 255, 0.22); }
.brand { font-weight: 700; font-size: 18px; margin-left: 0 !important; }

/* 端侧布局：默认 PC（JS 会在加载时给 body 加 .is-mobile 类） */
.nav-toggle { display: none; }
.nav-burger { display: none; }                 /* PC 默认隐藏 */
.nav-drawer { display: none; }                 /* PC 默认隐藏 */
.nav-desktop { display: flex; align-items: center; gap: 2px; flex-wrap: nowrap; }
.nav-desktop a { margin-left: 14px; }
.nav-desktop a:first-child { margin-left: 0; }

img { max-width: 100%; height: auto; }
main.container { padding-top: 24px; padding-bottom: 48px; min-height: 60vh; }

/* 玻璃卡片 */
.card {
    background: var(--glass);
    backdrop-filter: blur(18px) saturate(170%);
    -webkit-backdrop-filter: blur(18px) saturate(170%);
    border: 1px solid var(--glass-border);
    border-radius: 16px; padding: 14px 16px;
    margin-bottom: 14px;
    box-shadow: var(--glass-shadow), var(--glass-inset);
}
h1 { color: var(--orange-deep); }
a { color: var(--orange); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.btn-small { padding: 3px 10px; font-size: 12.5px; line-height: 1.4; }
/* 文件列表里的操作按钮（预览/下载/删除）收紧尺寸，配合玻璃质感 */
.file-actions .btn { padding: 5px 12px; font-size: 13px; border-radius: 9px; }

/* 按钮：橘色渐变 + 悬浮上浮 + 点击下沉 + 水波纹 */
.btn {
    display: inline-block;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.92), rgba(234, 88, 12, 0.92));
    color: #fff; padding: 9px 18px; border-radius: 10px; text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.35);
    cursor: pointer; font-size: 15px; font-weight: 600;
    position: relative; overflow: hidden;
    box-shadow: 0 4px 14px rgba(234, 88, 12, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(6px) saturate(140%);
    -webkit-backdrop-filter: blur(6px) saturate(140%);
    transition: transform .12s ease, box-shadow .12s ease, filter .15s ease;
}
.btn:hover {
    transform: translateY(-2px); filter: brightness(1.05);
    box-shadow: 0 8px 22px rgba(234, 88, 12, 0.38);
    text-decoration: none; color: #fff;
}
.btn:active { transform: translateY(0) scale(.95); box-shadow: 0 2px 8px rgba(234, 88, 12, 0.28); }
.btn::after {
    content: ""; position: absolute; left: 50%; top: 50%;
    width: 0; height: 0; background: rgba(255, 255, 255, 0.45);
    border-radius: 50%; transform: translate(-50%, -50%);
    opacity: 0; pointer-events: none;
}
.btn:active::after { animation: btn-ripple .55s ease-out; }
@keyframes btn-ripple {
    0%   { width: 0; height: 0; opacity: .5; }
    100% { width: 340px; height: 340px; opacity: 0; }
}

.alert {
    background: var(--orange-50); color: var(--orange-deep);
    padding: 10px 14px; border-radius: 10px; margin-bottom: 16px;
    border: 1px solid var(--orange-200);
}
form label { display: block; margin: 10px 0 4px; font-weight: 600; }
form input, form textarea, form select {
    width: 100%; padding: 8px 10px; border: 1px solid #fcd9b6;
    border-radius: 8px; font-size: 15px; background: rgba(255,255,255,.85);
}
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.meta { color: var(--muted); font-size: 13px; }

/* 底栏：橘色玻璃 */
.site-footer {
    background: rgba(255, 237, 213, 0.55);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    border-top: 1px solid rgba(255, 255, 255, 0.5);
    padding: 18px 0; text-align: center; color: var(--muted);
    margin-top: 24px;
}
/* 底部备案号（ICP 备案号 + 待补的公安备案号） */
.site-footer .beian-links {
    margin: 6px 0 0;
    font-size: 13px;
    line-height: 1.8;
}
.site-footer .beian-links a {
    color: var(--muted);
    text-decoration: none;
    border-bottom: 1px dotted rgba(150, 120, 90, 0.5);
}
.site-footer .beian-links a:hover {
    color: #c2691d;
    border-bottom-color: #c2691d;
}

/* 公安备案图标与文字对齐 */
.site-footer .beian-links .gongan-beian {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.site-footer .beian-links .gongan-icon {
    width: 14px;
    height: 14px;
    vertical-align: middle;
    border: 0;
    margin: 0;
}

/* 首页：左右并排的两块要让高度对齐到高的那块 */
.home-grid { align-items: stretch; }
.home-grid > .card { display: flex; flex-direction: column; }
.home-grid > .card > .card-spacer { flex: 1 1 auto; }
/* 让"进入知识点简介"和"查看全部"在视觉上贴齐底部 */
.home-grid .card-foot { margin-top: auto; padding-top: 12px; }

/* 注册/登录等窄卡片：宽度约为原容器(1100px)的三分之二 */
.auth-card { max-width: 733px; margin-left: auto; margin-right: auto; }
@media (max-width: 760px) {
    .auth-card { margin-left: 0; margin-right: 0; }
}

/* 独立登录页：登录模块在页面正中 */
.auth-body { background: linear-gradient(180deg, #1d1740 0%, #2e2150 28%, #5b3a6b 52%, #c9772f 78%, #ffd9b8 100%) fixed; }
.auth-center {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    padding: 24px; position: relative; z-index: 1;
}
.auth-login { max-width: 420px; width: 100%; background: rgba(255,255,255,.94); }
.auth-login .brand-center {
    text-align: center; font-size: 26px; font-weight: 700;
    color: var(--orange-deep); margin-bottom: 6px;
}
.auth-login h1 { text-align: center; margin-top: 0; }
.auth-login .meta { text-align: center; }
.auth-login .btn-block { width: 100%; text-align: center; margin-top: 6px; }

/* 登录页氛围灯：整个背景呼吸（暖色光斑缓缓起伏+流动），色调与页面一致 */
.auth-body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    background-image:
        radial-gradient(1.5px 1.5px at 8% 6%,  rgba(255,255,255,.95), transparent),
        radial-gradient(2px 2px at 16% 14%, rgba(255,255,255,.85), transparent),
        radial-gradient(1px 1px at 24% 4%,  rgba(255,255,255,.8), transparent),
        radial-gradient(2.5px 2.5px at 31% 20%, rgba(255,255,255,.9), transparent),
        radial-gradient(1.5px 1.5px at 39% 9%, rgba(255,255,255,.75), transparent),
        radial-gradient(1px 1px at 46% 26%, rgba(255,255,255,.7), transparent),
        radial-gradient(2px 2px at 53% 7%,  rgba(255,255,255,.85), transparent),
        radial-gradient(1.5px 1.5px at 61% 18%, rgba(255,255,255,.8), transparent),
        radial-gradient(1px 1px at 68% 5%,  rgba(255,255,255,.7), transparent),
        radial-gradient(2px 2px at 76% 15%, rgba(255,255,255,.85), transparent),
        radial-gradient(1.5px 1.5px at 84% 9%, rgba(255,255,255,.8), transparent),
        radial-gradient(1px 1px at 92% 22%, rgba(255,255,255,.7), transparent),
        radial-gradient(2px 2px at 12% 30%, rgba(255,255,255,.75), transparent),
        radial-gradient(1.5px 1.5px at 28% 36%, rgba(255,255,255,.7), transparent),
        radial-gradient(1px 1px at 44% 33%, rgba(255,255,255,.65), transparent),
        radial-gradient(2px 2px at 58% 38%, rgba(255,255,255,.7), transparent),
        radial-gradient(1.5px 1.5px at 72% 32%, rgba(255,255,255,.7), transparent),
        radial-gradient(1px 1px at 88% 35%, rgba(255,255,255,.65), transparent),
        radial-gradient(2px 2px at 20% 11%, rgba(168,85,247,.85), transparent),
        radial-gradient(1.5px 1.5px at 50% 16%, rgba(59,130,246,.85), transparent),
        radial-gradient(2px 2px at 80% 24%, rgba(236,72,153,.85), transparent),
        radial-gradient(1.5px 1.5px at 36% 28%, rgba(16,185,129,.85), transparent);
    background-repeat: no-repeat;
    animation: twinkle 6s ease-in-out infinite, hue-flow 24s linear infinite;
    pointer-events: none;
}
@keyframes twinkle {
    0%, 100% { opacity: .5;  transform: translateY(0); }
    50%      { opacity: 1;   transform: translateY(-8px); }
}
@keyframes hue-flow {
    0%   { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}
/* 卡片随同呼吸的橙色调光晕，周期与背景一致 */
.auth-login {
    animation: breath-card 7.5s ease-in-out infinite;
}
@keyframes breath-card {
    0%, 100% { box-shadow: 0 8px 22px rgba(234,88,12,.16); }
    50%      { box-shadow: 0 14px 38px rgba(234,88,12,.34); }
}
/* 无障碍：系统开启减弱动效时关闭所有呼吸动画 */
@media (prefers-reduced-motion: reduce) {
    .auth-body::before, .auth-login { animation: none; }
    .auth-body::before { opacity: .8; }
}

/* 顶部：会员登录 + 视频轮播 */
.hero-row {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 16px;
    margin-bottom: 16px;
    align-items: stretch;
}
.hero-login {
    display: flex; flex-direction: column; justify-content: center;
    margin-bottom: 0;
}
.hero-login h2 { margin-top: 0; margin-bottom: 16px; color: var(--orange-deep); }
.hero-login .form-group { margin-bottom: 12px; }
.hero-login .form-group label { display: block; margin-bottom: 4px; font-weight: 600; font-size: 14px; }
.hero-login .form-group input {
    width: 100%; padding: 9px 11px; border: 1px solid #fcd9b6;
    border-radius: 8px; font-size: 15px; background: rgba(255,255,255,.85);
}
.hero-login .btn-block { width: 100%; text-align: center; }
.hero-login .welcome-text { font-size: 15px; margin-bottom: 16px; }
.hero-login .login-actions { display: flex; flex-direction: column; gap: 10px; }

/* 新闻/习题列表 */
.news-item, .exercise-item {
    display: flex; justify-content: space-between; align-items: baseline;
    padding: 8px 0; border-bottom: 1px solid rgba(253, 186, 116, 0.35);
}
.news-item:last-child, .exercise-item:last-child { border-bottom: none; }
.news-item a, .exercise-item a { text-decoration: none; }
.news-item a:hover, .exercise-item a:hover { text-decoration: underline; }

.exercise-body, .exercise-answer {
    background: rgba(255, 247, 237, 0.7); padding: 14px; border-radius: 12px;
}

/* 首页：九大学科入口网格 */
.subject-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.subject-chip {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; min-height: 76px;
    padding: 12px 8px; border: 1px solid var(--orange-200); border-radius: 14px;
    background: rgba(255, 255, 255, 0.55); color: var(--orange-deep); text-decoration: none;
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    transition: background .15s, border-color .15s, transform .12s;
}
.subject-chip:hover { background: var(--orange-100); border-color: var(--orange); text-decoration: none; transform: translateY(-2px); }
.subject-chip:active { transform: scale(.96); }
.subject-chip strong { font-size: 17px; }
.subject-chip .meta { font-size: 12px; margin-top: 4px; }

@media (max-width: 768px) {
    .grid { grid-template-columns: 1fr; }
    .subject-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-row { grid-template-columns: 1fr; }
    .hero-login { margin-bottom: 16px; }
    h1 { font-size: 1.5rem; }
    .card { padding: 16px 16px; margin-bottom: 12px; }
    main.container { padding-top: 16px; padding-bottom: 32px; }
    /* === 移动端导航（基于 html 类，与 viewport meta 解耦，专门对付微信 X5 把页面撑成 980px 的情况） === */
    html.is-mobile .site-header .nav { padding: 10px 14px; }
    html.is-mobile .nav-desktop { display: none !important; }
    html.is-mobile .nav-burger {
        display: block; cursor: pointer; color: #fff; font-size: 26px; line-height: 1;
        padding: 4px 12px; border-radius: 10px; margin-left: auto;
    }
    html.is-mobile .nav-burger:hover { background: rgba(255, 255, 255, 0.22); }

    html.is-mobile .nav-drawer {
        display: none;
        position: absolute; top: 100%; left: 0; right: 0; z-index: 40;
        flex-direction: column; align-items: stretch;
        padding: 8px 14px 12px;
        background: rgba(255, 247, 237, 0.96);
        backdrop-filter: blur(16px) saturate(160%);
        -webkit-backdrop-filter: blur(16px) saturate(160%);
        border-top: 1px solid rgba(255, 255, 255, 0.55);
        box-shadow: 0 8px 22px rgba(234, 88, 12, 0.16);
    }
    html.is-mobile .nav-drawer a {
        color: var(--orange-deep);
        margin: 0; padding: 12px 10px;
        border-bottom: 1px solid rgba(234, 88, 12, 0.10);
        border-radius: 8px;
    }
    html.is-mobile .nav-drawer a:last-child { border-bottom: none; }
    html.is-mobile .nav-toggle:checked ~ .container .nav-drawer { display: flex !important; }

    /* 答题页：导航按钮改为手机底部固定操作栏（下一题永远在拇指可达处） */
    .practice-side {
        position: fixed !important;
        left: 0; right: 0; bottom: 0;
        width: auto !important; flex: none !important;
        z-index: 40;
        padding: 8px 12px;
        background: rgba(255, 247, 237, 0.85);
        backdrop-filter: blur(14px) saturate(160%);
        -webkit-backdrop-filter: blur(14px) saturate(160%);
        border-top: 1px solid rgba(255, 255, 255, 0.5);
        box-shadow: 0 -4px 20px rgba(234, 88, 12, 0.14);
    }
    .practice-side .card {
        padding: 8px 10px !important; margin: 0 !important;
        background: transparent !important; border: none !important;
        box-shadow: none !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
    }
    .practice-side .meta { display: none !important; }
    .quiz-nav-card .nav-btns {
        flex-direction: row !important;
        flex-wrap: wrap;
        gap: 6px !important; margin-top: 0 !important;
        justify-content: stretch !important;
    }
    .quiz-nav-card .nav-btns form { display: block !important; flex: 1 1 0; min-width: 0; }
    .quiz-nav-card .nav-btns .btn {
        width: 100% !important;
        padding: 10px 6px !important; font-size: 13px !important;
    }
    .practice-main { padding-bottom: 84px !important; }
}

/* 习题列表工具栏 */
.list-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.list-toolbar h1 { margin: 0; }
.list-toolbar .meta { margin: 4px 0 0; }

/* 习题列表筛选栏 */
.filter-card { margin-bottom: 16px; }
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.filter-group { display: flex; align-items: center; gap: 8px; }
.filter-label {
    font-weight: 600; font-size: 14px; color: var(--text);
    line-height: 1; white-space: nowrap;
}
.filter-bar select {
    width: auto; min-width: 110px; height: 36px; margin: 0;
    padding: 0 28px 0 10px; border: 1px solid #fcd9b6; border-radius: 8px;
    font-size: 14px; background: rgba(255,255,255,.85); color: var(--text);
    line-height: 34px; vertical-align: middle;
}
.filter-bar .btn-small,
.filter-bar .btn-ghost.btn-small {
    height: 36px; line-height: 20px;
    padding: 7px 18px; font-size: 14px;
    display: inline-flex; align-items: center; justify-content: center;
}

/* 题型标签 */
.tag {
    display: inline-block; font-size: 12px; padding: 2px 9px; border-radius: 20px;
    font-weight: 600; margin-right: 8px; vertical-align: middle;
}
.tag-subjective { background: #e0f2fe; color: #0369a1; }
.tag-single { background: var(--orange-100); color: var(--orange-deep); }
.tag-multiple { background: #ede9fe; color: #7c3aed; }
.tag-fill { background: #fef3c7; color: #b45309; }
.tag-orange { background: var(--orange-100); color: var(--orange-deep); border: 1px solid #fcd9b6; }

/* 知识点上传表单 */
.upload-form .filter-row { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 12px; }
.upload-form .filter-group { display: flex; flex-direction: column; gap: 6px; flex: 1 1 220px; }
.upload-form .filter-group label { font-weight: 600; font-size: 14px; color: var(--text); }
.upload-form .filter-group input[type=text],
.upload-form .filter-group select {
    width: 100%; height: 38px; padding: 0 10px; margin: 0;
    border: 1px solid #fcd9b6; border-radius: 8px; font-size: 14px;
    background: rgba(255,255,255,.85); color: var(--text);
}
.upload-form .filter-group input[type=file] {
    width: 100%; border: 1px dashed #fcd9b6; border-radius: 8px; padding: 12px;
    background: rgba(255, 247, 237, 0.6); font-size: 14px; color: var(--text);
}

/* 文件列表 */
.file-list { list-style: none; margin: 0; padding: 0; }
.file-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 6px; border-bottom: 1px solid rgba(234, 88, 12, 0.10);
}
.file-item:last-child { border-bottom: none; }
.file-select { flex: 0 0 auto; width: 17px; height: 17px; accent-color: #ea580c; cursor: pointer; margin: 0; }
.file-icon { font-size: 26px; line-height: 1; flex: 0 0 auto; }
.file-info { flex: 1 1 auto; min-width: 0; }
.file-title { font-size: 15px; font-weight: 600; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.file-title a { color: var(--orange-deep); text-decoration: none; word-break: break-all; }
.file-title a:hover { text-decoration: underline; }
.file-meta { font-size: 12px; color: var(--muted); margin-top: 3px; }
.file-del { flex: 0 0 auto; margin: 0; }
.file-name { color: var(--ink); word-break: break-all; }
.file-actions { margin-top: 8px; }

/* ===== 在线预览弹窗 ===== */
.preview-modal {
    position: fixed; inset: 0; z-index: 1000;
    display: flex; align-items: center; justify-content: center;
    background: rgba(20, 12, 4, 0.55);
    -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
    padding: 16px;
}
.preview-modal[hidden] { display: none; }
.preview-dialog {
    width: min(960px, 100%); height: min(88vh, 860px); max-height: 92vh;
    display: flex; flex-direction: column;
    background: rgba(255, 255, 255, 0.82); border-radius: 16px; overflow: hidden;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(16px) saturate(170%); -webkit-backdrop-filter: blur(16px) saturate(170%);
    border: 1px solid rgba(255, 255, 255, 0.55);
}
.preview-bar {
    display: flex; align-items: center; gap: 12px; padding: 10px 14px;
    background: linear-gradient(135deg, var(--orange), var(--orange-deep)); color: #fff;
}
.preview-name { font-weight: 600; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-pager { display: flex; align-items: center; gap: 8px; }
.preview-pager button {
    background: rgba(255, 255, 255, 0.2); color: #fff; border: none;
    border-radius: 8px; padding: 4px 12px; cursor: pointer; font-size: 13px;
}
.preview-pager button:hover { background: rgba(255, 255, 255, 0.35); }
.preview-close {
    background: rgba(255, 255, 255, 0.2); color: #fff; border: none;
    border-radius: 8px; width: 32px; height: 32px; cursor: pointer; font-size: 16px;
}
.preview-close:hover { background: rgba(255, 255, 255, 0.35); }
.preview-download {
    background: rgba(255, 255, 255, 0.2); color: #fff; border: none;
    border-radius: 8px; padding: 4px 12px; cursor: pointer; font-size: 13px;
    text-decoration: none; line-height: 1.6; white-space: nowrap;
}
.preview-download:hover { background: rgba(255, 255, 255, 0.35); }
.preview-body { padding: 20px 24px; overflow: auto; background: #fff; flex: 1 1 auto; min-height: 0; }
.preview-loading, .preview-error { padding: 48px; text-align: center; color: var(--muted); }
.preview-error { color: #c0392b; }
/* PDF.js 自渲染：弹窗内用 canvas 一页一页画，绕开 Chrome 内置 viewer 的 blob hash 顶栏 */
/* 去掉 max-width/height 限制，让页面真正按缩放比例自由放大缩小，超出部分由弹窗内滚动承载 */
.pdf-canvas { display: block; margin: 0 auto 12px; box-shadow: 0 4px 14px rgba(0,0,0,.15); background: #fff; }
/* PDF 模式：内容可拖拽平移（鼠标/触摸），cursor 提示可抓取 */
.preview-body.mode-pdf { cursor: grab; }
.preview-body.mode-pdf.grabbing { cursor: grabbing; }
.preview-body.mode-pdf .pdf-canvas { user-select: none; -webkit-user-select: none; }
.preview-zoom { display: inline-flex; align-items: center; gap: 6px; }
.preview-zoom button {
    background: rgba(255,255,255,.2); color:#fff; border:0;
    border-radius: 8px; width: 28px; height: 28px; cursor: pointer;
    font-size: 16px; line-height: 1; padding: 0;
}
.preview-zoom button:hover { background: rgba(255,255,255,.35); }
#zoom-input {
    width: 54px; height: 26px; padding: 0 4px;
    border: 1px solid rgba(255,255,255,.55); border-radius: 6px;
    background: rgba(255,255,255,.92); color: #2a2a2a;
    font-size: 13px; text-align: center; line-height: 1;
    font-variant-numeric: tabular-nums;
}
#zoom-input:focus { outline: none; border-color: #fff; box-shadow: 0 0 0 2px rgba(255,255,255,.35); }
.zoom-pct { color: #fff; font-size: 13px; }
/* 续读标签：PDF 模式显示「上次读到第 N 页」，点击跳回 */
.preview-resume {
    background: rgba(255,255,255,.92); color: var(--orange-deep);
    border: 0; border-radius: 999px; padding: 3px 12px; cursor: pointer;
    font-size: 12.5px; font-weight: 600; white-space: nowrap; line-height: 1.4;
}
.preview-resume:hover { background: #fff; }

/* docx */
.docx { line-height: 1.7; }
.docx img { max-width: 100%; height: auto; }

/* xlsx */
.xlsx-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.xlsx-tab {
    border: 1px solid rgba(234, 88, 12, 0.3); background: #fff7ed; color: var(--orange-deep);
    border-radius: 8px; padding: 4px 12px; cursor: pointer; font-size: 13px;
}
.xlsx-tab.active { background: var(--orange); color: #fff; border-color: var(--orange); }
.xlsx-sheet { overflow: auto; }
.xlsx-sheet table { border-collapse: collapse; width: 100%; font-size: 13px; }
.xlsx-sheet td, .xlsx-sheet th { border: 1px solid #ddd; padding: 4px 8px; }

/* 知识点学科标签（书签式 tab，所有学科在最上方一行） */
.knowledge-card { padding: 0; overflow: hidden; }
.subject-tabs {
    display: flex; flex-wrap: wrap;
    background: rgba(255, 247, 237, 0.32);
    backdrop-filter: blur(10px) saturate(170%);
    -webkit-backdrop-filter: blur(10px) saturate(170%);
    border-bottom: 1px solid rgba(234, 88, 12, 0.2);
    padding: 0 8px;
}
.subject-tab {
    border: 1px solid transparent;
    background: transparent;
    color: var(--muted);
    padding: 10px 18px;
    margin: 8px 2px -1px 2px;       /* 底边压到 tab strip 的横线上 */
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    font-size: 14px; font-weight: 500;
    transition: background .15s, color .15s;
}
.subject-tab:hover {
    color: var(--orange-dark);
    background: rgba(255, 255, 255, 0.4);
}
.subject-tab.active {
    background: rgba(255, 255, 255, 0.6);
    color: var(--orange-deep);
    font-weight: 600;
    border-color: rgba(234, 88, 12, 0.22);
    border-bottom-color: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.subject-panels { padding: 14px 20px 4px; }

/* 首页「资讯动态」标签：去掉浏览器默认按钮边框和容器底色，纯净文字风格 */
.news-tabs {
    background: transparent;
    border-bottom: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 0 4px;
}
.news-tab {
    border: 0;
    background: transparent;
    color: var(--muted);
    padding: 6px 14px;
    font-size: 14px; font-weight: 500;
    border-radius: 999px;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.news-tab:hover {
    color: var(--orange-deep);
    background: rgba(255, 255, 255, 0.45);
}
.news-tab.active {
    color: var(--orange-deep);
    font-weight: 600;
    background: rgba(255, 255, 255, 0.6);
}

/* ===== 排序工具栏（名称/时间 升序降序） ===== */
.sort-bar {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    padding: 4px 20px 10px;
    border-bottom: 1px dashed rgba(0,0,0,0.06);
    margin-bottom: 4px;
}
.sort-label { color: var(--muted); font-size: 13px; }
.sort-group {
    display: inline-flex; align-items: center;
    background: rgba(255,255,255,0.65);
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 999px;
    padding: 3px;
    gap: 2px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.sort-btn {
    background: transparent; border: 0; cursor: pointer;
    padding: 4px 12px; border-radius: 999px;
    font-size: 12.5px; color: #4a4a4a;
    transition: background-color 0.15s, color 0.15s, box-shadow 0.15s;
    font-variant-numeric: tabular-nums; line-height: 1.4;
}
.sort-btn:hover { background: rgba(255,255,255,0.9); color: var(--orange-deep); }
.sort-btn.active {
    background: linear-gradient(135deg, var(--orange), var(--orange-deep));
    color: #fff; font-weight: 600;
    box-shadow: 0 2px 6px rgba(234,88,12,0.25);
}
.sort-btn.active:hover { color: #fff; }

/* ===== 批量操作栏（复选框 + 删除选中） ===== */
.batch-bar {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    padding: 8px 20px;
    background: rgba(234, 88, 12, 0.06);
    border-bottom: 1px dashed rgba(0,0,0,0.06);
}
.batch-all {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 13px; color: #4a4a4a; cursor: pointer; user-select: none;
}
.batch-all input { width: 16px; height: 16px; accent-color: #ea580c; cursor: pointer; margin: 0; }
.batch-hint { font-size: 12px; color: var(--muted); }
#batch-delete { color: #b91c1c; border-color: rgba(185, 28, 28, 0.35); }
#batch-delete:hover:not(:disabled) { background: rgba(185, 28, 28, 0.08); }
#batch-delete:disabled { opacity: 0.45; cursor: not-allowed; }
.subject-count {
    display: inline-block; margin-left: 4px;
    font-size: 12px; line-height: 1;
    background: rgba(234, 88, 12, 0.12);
    color: var(--orange-deep);
    border-radius: 999px;
    padding: 2px 7px;
}
.subject-tab.active .subject-count {
    background: var(--orange);
    color: white;
}

/* pptx */
.slide {
    min-height: 52vh; display: flex; flex-direction: column; justify-content: center;
    padding: 20px 40px; background: #fff;
}
.slide p { font-size: 20px; line-height: 1.8; margin: 6px 0; }
.slide .muted { color: #aaa; }

/* 首页知识点简介小列表 */
.home-knowledge { list-style: none; margin: 10px 0 0; padding: 0; }
.home-knowledge li { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px dashed rgba(234, 88, 12, 0.12); }
.home-knowledge li:last-child { border-bottom: none; }
.home-knowledge a { color: var(--orange-deep); text-decoration: none; word-break: break-all; }
.home-knowledge a:hover { text-decoration: underline; }

/* 首页"知识点简介"卡片：9 学科小标签紧凑模式（复用 .subject-tabs，缩小尺寸） */
.subject-tabs-sm { gap: 4px; padding: 6px 10px; margin: 10px 0 0; }
.subject-tabs-sm .subject-tab { padding: 3px 10px; font-size: 13px; border-radius: 999px; }
.subject-tabs-sm .subject-count { min-width: 18px; padding: 1px 5px; }
.subject-panels-sm { padding: 6px 0 2px; }

/* 导入表单 */
.import-form input[type=file] { width: auto; border: 1px dashed #fcd9b6; padding: 14px; background: rgba(255, 247, 237, 0.6); }
.error { color: #c62828; background: #fdecea; padding: 10px 14px; border-radius: 10px; }
.btn-ghost {
    background: rgba(255, 255, 255, 0.5); color: var(--orange-deep);
    border: 1px solid rgba(234, 88, 12, 0.4);
    box-shadow: 0 2px 10px rgba(234, 88, 12, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(8px) saturate(160%);
    -webkit-backdrop-filter: blur(8px) saturate(160%);
    font-weight: 600;
}
.btn-ghost:hover {
    background: rgba(255, 247, 237, 0.6); transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(234, 88, 12, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.65);
}
.btn-ghost:active { transform: scale(.95); }
.btn-danger { background: linear-gradient(135deg, #ef4444, #dc2626); color: #fff; border: 1px solid #dc2626; box-shadow: 0 4px 14px rgba(220, 38, 38, 0.3); }
.btn-danger:hover { background: #b91c1c; transform: translateY(-2px); }
.btn-danger:active { transform: scale(.95); }
.admin-actions { display: flex; gap: 10px; margin: 14px 0; }
.admin-actions .btn-small { padding: 6px 14px; }

/* 表格行内操作按钮组（编辑+删除）—— flex 强制基线居中，防止 <a> 与 <form> 默认 vertical-align 错位 */
.row-actions { display: inline-flex; gap: 6px; align-items: center; flex-wrap: nowrap; vertical-align: middle; }
.row-actions form { display: inline; margin: 0; padding: 0; vertical-align: middle; }
.row-actions form .btn { margin: 0; vertical-align: middle; }

/* 会员有效期标签：正常灰蓝、已过期标红 */
.validity-tag{display:inline-block;font-size:12.5px;padding:2px 9px;border-radius:999px;background:rgba(37,99,235,.08);color:#1d4ed8;white-space:nowrap}
.validity-tag.expired{background:rgba(220,38,38,.10);color:#b91c1c}
.pe-static.pe-expired{border-color:rgba(220,38,38,.4);background:rgba(220,38,38,.05);color:#b91c1c}

/* 错题库非选择题输入区 */
.answer-form { margin-top: 14px; }
.answer-form .answer-label { display: block; font-weight: 600; margin-bottom: 8px; }
.answer-form .answer-input {
    display: block; width: 100%; padding: 10px 12px;
    font-size: 15px; border: 1px solid #d2b48c; border-radius: 6px;
    background: #fffaf0; box-sizing: border-box;
}
.answer-form .answer-input:focus {
    outline: none; border-color: #b85c2f; box-shadow: 0 0 0 3px rgba(184,92,47,.15);
}
.answer-form .answer-actions { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.answer-form .answer-actions .btn { flex: 1 1 220px; }

/* 试卷卡片操作按钮：网格 2 列等宽 + 居中
   （grid 强制列宽相等 + width:100%，彻底绕开 <form> 包裹对 flex 尺寸的干扰） */
.exam-card-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin-top: 12px; align-items: stretch; }
.exam-card-actions > form { margin: 0; display: flex; min-width: 0; }
.exam-card-actions > form > .btn { width: 100%; }
.exam-card-actions .btn {
    width: 100%;
    padding: 6px 14px;
    font-size: 14px;
    line-height: 1.4;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
}
@media (max-width: 480px) {
    .exam-card-actions { grid-template-columns: 1fr; }
}

/* 会员中心个人功能卡片：超管 2×2 网格 */
.modules-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
.modules-grid > .card { margin: 0; }
@media (max-width: 720px) {
    .modules-grid { grid-template-columns: 1fr; }
}

/* 习题上一题/下一题导航 */
.exercise-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.exercise-nav .nav-btns { display: flex; gap: 10px; margin-left: auto; }
.btn:disabled, .btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: 0 4px 14px rgba(234, 88, 12, 0.3); filter: none; }
.btn:disabled:hover { background: linear-gradient(135deg, var(--orange), var(--orange-dark)); transform: none; box-shadow: 0 4px 14px rgba(234, 88, 12, 0.3); filter: none; }
.btn-ghost.btn:disabled, .btn-ghost.btn[disabled] { background: rgba(255,255,255,.6); color: var(--orange); border: 1px solid var(--orange); }
.btn-ghost.btn:disabled:hover { background: rgba(255,255,255,.6); transform: none; box-shadow: none; filter: none; }
.guide { color: var(--muted); font-size: 14px; line-height: 1.9; }
.guide code { background: rgba(255, 237, 213, 0.7); padding: 1px 6px; border-radius: 4px; color: var(--text); }

/* 预览 */
.preview-item { border: 1px solid rgba(253, 186, 116, 0.4); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; background: rgba(255,255,255,.45); }
.preview-head { margin-bottom: 6px; }
.preview-q { margin: 4px 0; }
.preview-opts {
    list-style: none;
    margin: 8px 0 4px; padding: 0;
    display: flex; flex-wrap: wrap; gap: 12px;
}
.preview-opts > li {
    flex: 1 1 0; min-width: 140px; max-width: 220px;
    background: rgba(255,255,255,.55);
    border: 1px solid rgba(253,186,116,.4);
    border-radius: 10px;
    padding: 6px 10px 8px;
}
.preview-opts > li img.opt-img {
    max-width: 100%; max-height: 180px;
    height: auto; display: block; margin: 4px auto 0;
}
@media (max-width: 720px) {
    .preview-opts > li { flex-basis: calc(50% - 8px); max-width: none; }
}
@media (max-width: 420px) {
    .preview-opts > li { flex-basis: 100%; }
}
/* 预览页底部操作按钮：flex 容器让两个按钮垂直对齐 */
.preview-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* 答题黑板：题目像写在黑板上, 银白色铝框; 选项和按钮保留正常卡片底色 */
.chalkboard {
    position: relative;
    margin: 14px 0 18px;
    padding: 28px 28px 24px;
    border-radius: 6px;
    color: #f4f4ec;
    /* 绿色黑板底色 + 两处微弱光斑模拟粉尘不均 */
    background:
        radial-gradient(ellipse at 18% 12%, rgba(255,255,255,.08), transparent 45%),
        radial-gradient(ellipse at 82% 88%, rgba(0,0,0,.22), transparent 55%),
        linear-gradient(135deg, #2d5a3d 0%, #1e4d2b 50%, #2a5239 100%);
    /* 银白铝框: 多层 inset box-shadow 模拟金属斜面 + 外发光 */
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,.28),
        inset 0 0 0 3px #b8b8b8,
        inset 0 0 0 5px #f0f0f0,
        inset 0 0 0 7px #8a8a8a,
        inset 0 0 0 9px #d8d8d8,
        0 0 0 1px #a0a0a0,
        0 6px 18px rgba(0,0,0,.18);
}
/* 黑板四角再加几颗"螺丝钉"质感的小圆点(可选) */
.chalkboard::before, .chalkboard::after {
    content: "";
    position: absolute;
    width: 6px; height: 6px; border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #f0f0f0 0%, #888 60%, #555 100%);
    box-shadow: 0 0 1px rgba(0,0,0,.4);
}
.chalkboard::before { top: 6px; left: 8px; }
.chalkboard::after  { top: 6px; right: 8px; }
.chalkboard h1 {
    color: #fafaf2;
    margin: 0 0 14px;
    /* 粉笔感: 略带光晕 */
    text-shadow: 0 0 1px rgba(255,255,255,.35), 0 1px 0 rgba(0,0,0,.18);
    letter-spacing: .5px;
}
.chalkboard .exercise-body {
    color: #f0f0e8;
    line-height: 1.85;
    font-size: 16px;
    text-shadow: 0 1px 0 rgba(0,0,0,.18);
}
.chalkboard .exercise-body img { max-width: 100%; border-radius: 4px; margin-top: 8px; }

/* 黑板内:选项/单选/按钮/答案框,统一粉笔配色 */
.chalkboard .quiz-options { margin-top: 14px; }
.chalkboard .quiz-options li label {
    color: #fafaf2;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background .18s;
}
.chalkboard .quiz-options li label:hover { background: rgba(255,255,255,.06); }
.chalkboard .quiz-options li label b { color: #ffe082; }
.chalkboard .quiz-options input[type="radio"],
.chalkboard .quiz-options input[type="checkbox"] {
    accent-color: #ffe082;
    width: 18px; height: 18px; margin-top: 3px; cursor: pointer;
}
.chalkboard .opt-img { border: 1px solid rgba(255,255,255,.18); }

/* 黑板上的"粉笔"按钮:白色描边+淡灰玻璃风,与橙主按钮区分 */
.chalkboard .btn-chalk {
    background: rgba(255,255,255,.92);
    color: #2d5a3d;
    border: 1px solid #d0d0c8;
    box-shadow: 0 3px 10px rgba(0,0,0,.18);
    margin-top: 6px;
}
.chalkboard .btn-chalk:hover {
    background: #fff;
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(0,0,0,.24);
}
.chalkboard .btn-chalk:active { transform: scale(.97); }

/* 黑板内答题结果:用半透明浅底保证绿/红文字在深绿板上看清 */
.chalkboard .quiz-result {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 8px;
    margin: 10px 0 0;
    background: rgba(255,255,255,.92);
    box-shadow: 0 2px 6px rgba(0,0,0,.12);
}
.chalkboard .quiz-result.ok { color: #15803d; background: rgba(220,252,231,.95); }
.chalkboard .quiz-result.bad { color: #b91c1c; background: rgba(254,226,226,.95); }
    .chalkboard .quiz-result.warn { color: #b45309; background: rgba(255,237,213,.95); }
    .chalkboard .quiz-result:empty { display: none; }

/* 黑板内解析框:粉笔字+米黄底,徽章化"答案纸"贴在黑板底 */
.chalkboard .answer-box-inline {
    margin-top: 12px;
    background: rgba(255,247,237,.95);
    color: #3a2820;
    padding: 12px 16px;
    border-radius: 10px;
    border-left: 4px solid #e8c98a;
    line-height: 1.75;
    box-shadow: 0 3px 10px rgba(0,0,0,.15);
}
.chalkboard .answer-box-inline b { color: #b45309; }

/* 黑板内<details>答案盒子:点击展开也保持深绿底可读 */
.chalkboard .answer-box { margin-top: 14px; }
.chalkboard .answer-box summary {
    cursor: pointer;
    color: #ffe082;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 6px;
    background: rgba(255,255,255,.06);
}
.chalkboard .answer-box[open] summary { background: rgba(255,255,255,.12); }
.chalkboard .answer-box .exercise-answer {
    background: rgba(255,247,237,.95);
    color: #3a2820;
    margin-top: 8px;
    padding: 12px 14px;
    border-radius: 10px;
    border-left: 4px solid #e8c98a;
    line-height: 1.7;
    box-shadow: 0 3px 10px rgba(0,0,0,.15);
}

@media (max-width: 640px) {
    .chalkboard { padding: 22px 16px 20px; }
    .chalkboard .quiz-options li label { padding: 6px 8px; }
}

@media (prefers-reduced-motion: reduce) {
    .chalkboard { box-shadow:
        inset 0 0 0 3px #b8b8b8,
        inset 0 0 0 5px #f0f0f0,
        inset 0 0 0 7px #8a8a8a,
        0 0 0 1px #a0a0a0,
        0 4px 12px rgba(0,0,0,.15);
    }
}

/* 答题 */
.quiz-options { list-style: none; padding: 0; margin: 14px 0; }
.quiz-options li { margin: 8px 0; }
.quiz-options label { font-weight: 400; display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.quiz-options input[type="radio"],
.quiz-options input[type="checkbox"] {
    width: auto; margin-top: 4px; padding: 0; border: none; flex-shrink: 0;
}
.quiz-options label span { flex: 1; line-height: 1.6; }
/* 习题配图：题干图 / 选项图，限制高度避免撑破选项框 */
.opt-img { display: block; max-width: 100%; max-height: 240px; margin-top: 6px; border-radius: 8px; }
.exercise-img { margin-top: 10px; }
.exercise-img img { max-width: 100%; border-radius: 10px; }
.preview-q img.opt-img { max-height: 200px; }
.quiz-result { margin-left: 12px; font-weight: 600; }

/* 提交后锁定：正确/错误选项高亮，且输入禁用（视觉上明确不可再更改） */
.quiz-options li.opt-correct > label {
    background: rgba(34, 139, 34, .12);
    border: 1px solid rgba(34, 139, 34, .5);
    border-radius: 8px;
    padding: 6px 10px;
}
.quiz-options li.opt-wrong > label {
    background: rgba(198, 40, 40, .10);
    border: 1px solid rgba(198, 40, 40, .5);
    border-radius: 8px;
    padding: 6px 10px;
}
.quiz-options li.opt-correct > label b { color: #1b7a1b; }
.quiz-options li.opt-wrong > label b { color: #c62828; }
.quiz-options input[disabled] { cursor: not-allowed; }
.locked-hint { margin-top: 10px; font-size: 13px; color: #8a6d3b; }

/* 已锁定 banner：醒目，便于一眼分辨是否新版 */
.lock-banner {
    margin-top: 14px; padding: 12px 16px;
    background: linear-gradient(135deg,#fff3e8,#ffe6cf);
    border: 2px solid #f0a050; border-radius: 10px;
    color: #8a3a08; font-size: 14px; line-height: 1.5;
    box-shadow: 0 2px 8px rgba(240,160,80,0.15);
}
.lock-banner b { color: #c0501c; font-size: 15px; }
.quiz-result.ok { color: #16a34a; }
.quiz-result.bad { color: #dc2626; }
.quiz-result.warn { color: var(--orange-dark); }
.answer-box { margin-top: 14px; }
.answer-box summary { cursor: pointer; color: var(--orange-deep); font-weight: 600; }

/* 学科总览 */
.subject-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.subject-card {
    background: var(--glass);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    border: 1px solid var(--glass-border); border-radius: 16px; padding: 24px 20px; text-decoration: none;
    box-shadow: var(--glass-shadow), var(--glass-inset); color: var(--text);
    transition: transform .15s, border-color .15s, box-shadow .15s;
}
.subject-card:hover { border-color: var(--orange); transform: translateY(-4px); box-shadow: 0 12px 36px rgba(234, 88, 12, 0.22), var(--glass-inset); }
.subject-card:active { transform: translateY(-1px) scale(.98); }
.subject-card h2 { margin: 0 0 6px; color: var(--orange-deep); }
.toolbar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.grade-tags { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.grade-tag {
    display: inline-block; font-size: 12px; padding: 3px 9px; border-radius: 20px;
    background: rgba(255, 237, 213, 0.8); color: var(--orange-deep); border: 1px solid var(--orange-200);
}
.group-title { margin: 0 0 10px; font-size: 17px; color: var(--orange-deep); border-left: 4px solid var(--orange); padding-left: 10px; }
.exercise-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid rgba(253, 186, 116, 0.35); flex-wrap: wrap; }
.exercise-item:last-child { border-bottom: none; }
.exercise-item a { text-decoration: none; flex: 1; min-width: 160px; }

@media (max-width: 760px) {
    .subject-grid { grid-template-columns: 1fr; }
}

/* 习题练习：学科卡片在主区内改为两列（不影响首页九宫格） */
@media (min-width: 761px) {
    .practice-main .subject-grid { grid-template-columns: repeat(2, 1fr); }
}

/* 综合练习：设置页 */
.practice-setup h1 { margin-top: 0; }
.setup-group { margin: 18px 0; }
.setup-label { display: block; font-weight: 700; color: var(--orange-deep); margin-bottom: 10px; }
.subject-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.subject-radio, .mode-radio {
    display: flex; align-items: center; gap: 8px; cursor: pointer;
    border: 1px solid var(--orange-200); border-radius: 14px; padding: 12px 14px;
    background: rgba(255, 255, 255, 0.55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    transition: .15s;
}
.subject-radio:hover, .mode-radio:hover { border-color: var(--orange); background: var(--orange-100); transform: translateY(-2px); }
.subject-radio:active, .mode-radio:active { transform: scale(.97); }
.subject-radio input, .mode-radio input { width: auto; margin: 0; padding: 0; border: none; accent-color: var(--orange); }
.subject-radio .sr-name { font-weight: 600; }
.subject-radio .sr-count { color: var(--muted); font-size: 12px; margin-left: auto; }
.mode-pick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.mode-radio { justify-content: center; font-weight: 600; }
.btn-start { margin-top: 8px; width: 100%; text-align: center; font-size: 16px; padding: 12px; }

/* 综合练习：进度卡 */
.quiz-progress-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.qp-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.qp-right { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.qp-score { font-size: 14px; }
.qp-score .ok { color: #16a34a; }
.qp-score .bad { color: #dc2626; }

/* 综合练习：内联答案框与导航 */
.answer-box-inline { margin-top: 12px; background: rgba(255, 247, 237, 0.75); padding: 12px 14px; border-radius: 12px; line-height: 1.7; }
.quiz-nav-card .nav-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

/* 综合练习：结果页 */
.result-card { text-align: center; }
.result-card h1 { margin-top: 0; }
.result-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 20px 0; }
.stat { background: rgba(255, 247, 237, 0.8); border: 1px solid var(--orange-200); border-radius: 16px; padding: 16px 8px; display: flex; flex-direction: column; align-items: center; }
.stat .v { font-size: 30px; font-weight: 800; color: var(--orange-deep); line-height: 1.1; }
.stat .k { font-size: 13px; color: var(--muted); margin-top: 4px; }
.stat.ok .v { color: #16a34a; }
.stat.bad .v { color: #dc2626; }
.rate-bar { height: 14px; background: rgba(253, 186, 116, 0.35); border-radius: 8px; overflow: hidden; margin: 10px 0 6px; }
.rate-fill { height: 100%; background: linear-gradient(90deg, var(--orange), var(--orange-300)); transition: width .4s ease; }
.result-actions { display: flex; gap: 10px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }

@media (max-width: 860px) {
    .subject-pick { grid-template-columns: repeat(2, 1fr); }
    .mode-pick { grid-template-columns: repeat(2, 1fr); }
    .result-stats { grid-template-columns: repeat(2, 1fr); }
    .practice-layout { flex-direction: column; }
    .practice-side { width: 100%; position: static; }
}

/* 平板：网格降为两列，避免卡片过窄 */
@media (max-width: 992px) {
    .subject-pick { grid-template-columns: repeat(2, 1fr); }
    .mode-pick { grid-template-columns: repeat(2, 1fr); }
    .result-stats { grid-template-columns: repeat(2, 1fr); }
}

/* 综合练习/错题库：左右分栏布局，题目内容左对齐、右侧 sticky 导航 */
.practice-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}
.practice-main {
    flex: 0 1 760px;
    min-width: 0;  /* 允许内部 flex 子项收缩，避免内容溢出 */
    text-align: left;
}
.practice-side {
    flex: 0 0 240px;
    position: sticky;
    top: 20px;
}
.quiz-nav-card .nav-btns {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}
.quiz-nav-card .nav-btns form { display: block; }
.quiz-nav-card .nav-btns .btn { width: 100%; text-align: center; }

/* 手机端：筛选栏控件两列对齐，下拉与按钮撑满各自格子，避免挤压 */
@media (max-width: 768px) {
    .filter-bar { gap: 8px; }
    .filter-group { flex: 1 1 42%; }
    .filter-bar select { width: 100%; min-width: 0; flex: 1; }
    .filter-bar .btn { flex: 1 1 42%; }
    /* 上传表单在手机端纵向堆叠，方便单手填写 */
    html.is-mobile .upload-form .filter-row { flex-direction: column; gap: 10px; }
    html.is-mobile .upload-form .filter-group { flex: 1 1 100%; }
    html.is-mobile .file-item { flex-wrap: wrap; }
    html.is-mobile .file-del { margin-left: auto; }
}

/* ===== 习题上传中心 ===== */
.upload-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-top: 18px;
}
.upload-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    background: #fff;
    border: 1px solid #e6e9f0;
    border-radius: 14px;
    padding: 22px;
    text-decoration: none;
    color: #1f2733;
    transition: box-shadow .15s, transform .15s, border-color .15s;
}
.upload-card:hover {
    box-shadow: 0 8px 24px rgba(44,123,229,.14);
    transform: translateY(-2px);
    border-color: #2C7BE5;
}
.upload-icon { font-size: 34px; line-height: 1; }
.upload-card h2 { margin: 0; font-size: 19px; }
.upload-card p { margin: 0; color: #5b6573; font-size: 14px; line-height: 1.6; }
.upload-card .btn { margin-top: 6px; pointer-events: none; }
html.is-mobile .upload-grid { grid-template-columns: 1fr; }

/* ===== 批量上传 dropzone ===== */
.dropzone {
    display: block;
    border: 2px dashed #b8c2cf;
    border-radius: 12px;
    padding: 28px 18px;
    text-align: center;
    cursor: pointer;
    background: #fafbfd;
    transition: border-color .15s, background .15s;
    position: relative;
}
.dropzone:hover, .dropzone.is-drag {
    border-color: #2C7BE5;
    background: #eef5ff;
}
.dropzone input[type=file] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}
.dropzone-icon { font-size: 36px; color: #2C7BE5; line-height: 1; }
.dropzone-title { font-size: 15px; color: #1f2733; margin: 8px 0 4px; font-weight: 600; }
.dropzone-hint { font-size: 13px; color: #5b6573; }
.file-list {
    margin-top: 14px;
    background: #fff;
    border: 1px solid #e6e9f0;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 14px;
}
.file-list-head { font-weight: 600; margin-bottom: 6px; }
.file-list ul { margin: 0; padding-left: 20px; }
.file-list li { margin: 2px 0; color: #1f2733; }
.file-list li span { color: #7c8694; margin-left: 6px; font-size: 12px; }
.file-list-foot { color: #5b6573; font-size: 12px; margin-top: 6px; }

/* ===== 报告问题 + 问题库 ===== */
.feedback-card {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 14px;
}
.btn-report {
    background: #fff4e5;
    border: 1px solid #f0b972;
    color: #b5660a;
}
.btn-report:hover { background: #ffe9cc; }
.report-card { max-width: 640px; margin: 0 auto; }
.back-link { color: #2C7BE5; font-size: 14px; }
.report-form { margin-top: 16px; }
.report-form .field { display: block; margin-bottom: 16px; }
.field-label { display: block; font-weight: 600; margin-bottom: 6px; color: #1f2733; }
.report-form select,
.report-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d3d9e3;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    box-sizing: border-box;
}
.report-form textarea { resize: vertical; }
.report-actions { display: flex; gap: 10px; margin-top: 8px; }
.report-note { color: #5b6573; font-size: 13px; margin-top: 14px; }

.problemlib-card { max-width: 880px; margin: 0 auto; }
.count-badge {
    display: inline-block;
    min-width: 24px;
    padding: 1px 9px;
    background: #2C7BE5;
    color: #fff;
    border-radius: 999px;
    font-size: 14px;
    vertical-align: middle;
}
.reason-stats { margin: 12px 0 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.reason-chip {
    background: #eef5ff;
    color: #2C7BE5;
    border-radius: 999px;
    padding: 3px 12px;
    font-size: 13px;
}
.problem-list { list-style: none; padding: 0; margin: 0; }
.problem-item {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    padding: 16px;
    border: 1px solid #e6e9f0;
    border-radius: 12px;
    margin-bottom: 12px;
    background: #fff;
}
.problem-title { font-size: 16px; font-weight: 600; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.problem-title a { color: #1f2733; text-decoration: none; }
.problem-title a:hover { color: #2C7BE5; }
.problem-meta { margin-top: 6px; display: flex; gap: 14px; flex-wrap: wrap; }
.reason-tag { color: #b5660a; font-weight: 600; font-size: 13px; }
.problem-note {
    margin-top: 8px;
    background: #fafbfd;
    border: 1px solid #eef1f6;
    border-radius: 8px;
    padding: 8px 12px;
    color: #3a4250;
    font-size: 14px;
}
.problem-actions { display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; }
.empty-state { text-align: center; padding: 40px 0; color: #5b6573; }
html.is-mobile .problem-item { flex-direction: column; }

/* ===== 导航 active 高亮 + 当前页呼吸色块 ===== */
.site-header .nav a { position: relative; }
.site-header .nav a.is-active {
    background: rgba(255, 255, 255, 0.32);
    color: #fff !important;
    font-weight: 700;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.10);
}
.site-header .nav a.is-active:hover { background: rgba(255, 255, 255, 0.42); }

/* 当前页标记：用整个「首页」链接框作为氛围灯（替代原"你在这里"文字气泡）
   —— PC：active 时让 nav-bubble 撑满父链接的内部，背景色 + 内/外 box-shadow 一起呼吸；
       视觉上就是"标签框本身在发出柔和的氛围光"，与登录页 .breath-card 同款。
   —— 移动：nav-bubble 作为内联小圆点贴在文字右侧，不再用 box-shadow 大光晕（屏幕窄、点触场景）。 */
.site-header .nav a.is-active .nav-bubble { --bc: var(--orange); }

/* PC：父链接作为容器 */
html.is-pc .site-header .nav a {
    position: relative;
    isolation: isolate;
}
html.is-pc .site-header .nav a .nav-label { position: relative; z-index: 1; }

/* nav-bubble 默认（inactive 时不显示，保留 transition 备用）*/
.nav-bubble {
    position: absolute;
    pointer-events: none;
    opacity: 0;
    transition: opacity .25s ease;
}

/* PC：active 时撑满整个链接内部，作为氛围灯 */
html.is-pc .site-header .nav a.is-active .nav-bubble {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    width: auto; height: auto;
    border-radius: 10px;
    transform: none;
    background: color-mix(in srgb, var(--bc) 14%, transparent);
    opacity: 1;
    animation: nav-link-breathe 2.8s ease-in-out infinite;
    z-index: 0;
}

@keyframes nav-link-breathe {
    0%, 100% {
        background: color-mix(in srgb, var(--bc) 12%, transparent);
        box-shadow:
            inset 0 0 0 1px color-mix(in srgb, var(--bc) 36%, transparent),
            0 0 14px 3px color-mix(in srgb, var(--bc) 32%, transparent);
    }
    50% {
        background: color-mix(in srgb, var(--bc) 30%, transparent);
        box-shadow:
            inset 0 0 0 2px color-mix(in srgb, var(--bc) 58%, transparent),
            0 0 30px 8px color-mix(in srgb, var(--bc) 64%, transparent);
    }
}

/* 各导航项用不同颜色，方便一眼区分当前页 */
.site-header a[data-route="home"].is-active .nav-bubble             { --bc: #f97316; }
.site-header a[data-route="news"].is-active .nav-bubble             { --bc: #3b82f6; }
.site-header a[data-route="knowledge"].is-active .nav-bubble       { --bc: #10b981; }
.site-header a[data-route="exercise_list"].is-active .nav-bubble   { --bc: #a855f7; }
.site-header a[data-route="exercise_import"].is-active .nav-bubble  { --bc: #06b6d4; }
.site-header a[data-route="member_list"].is-active .nav-bubble,
.site-header a[data-route="profile"].is-active .nav-bubble         { --bc: #ec4899; }
.site-header a[data-route="contact"].is-active .nav-bubble         { --bc: #f59e0b; }
.site-header a[data-route="logout"].is-active .nav-bubble          { --bc: #64748b; }

/* 移动端抽屉里：色块内联显示在标签右侧（不呼吸，避免窄屏抖动） */
html.is-mobile .nav-drawer a.is-active {
    background: rgba(234, 88, 12, 0.12);
    color: var(--orange-deep) !important;
    font-weight: 700;
}
html.is-mobile .nav-drawer .nav-bubble {
    position: static;
    transform: none !important;
    display: inline-block;
    width: 9px; height: 9px;
    margin-left: 10px;
    opacity: 1;
    background: var(--bc, var(--orange));
    vertical-align: middle;
    animation: none;
}

/* 无障碍：系统开启减弱动效时关闭呼吸 */
@media (prefers-reduced-motion: reduce) {
    html.is-pc .site-header .nav a.is-active .nav-bubble { animation: none !important; }
}

/* ===== 刷题排行榜 ===== */
.rank-switch { display: flex; gap: 10px; margin: 14px 0 18px; flex-wrap: wrap; }
.rank-tab {
    display: inline-block; padding: 8px 16px; border-radius: 999px;
    background: #f1f3f7; color: #46506b; font-weight: 600; text-decoration: none;
    border: 1px solid #e2e6ef;
}
.rank-tab.active { background: #2C7BE5; color: #fff; border-color: transparent; }
.rank-table { width: 100%; border-collapse: collapse; margin-top: 6px; font-size: 15px; }
.rank-table th, .rank-table td { padding: 11px 12px; text-align: left; border-bottom: 1px solid #eef0f5; }
.rank-table thead th { color: #8a93a8; font-weight: 600; font-size: 13px; background: #fafbfc; }
.rank-table .col-rank { width: 64px; text-align: center; font-size: 18px; }
.rank-table .col-num { text-align: right; font-variant-numeric: tabular-nums; color: #2c3346; font-weight: 600; }
.rank-table .col-name { font-weight: 600; color: #1f2738; }
.rank-table tbody tr.top3 { background: linear-gradient(90deg, #fff8ec, #fff); }
.rank-table tbody tr.top3 .col-name { color: #b9770e; }
@media (max-width: 600px) {
    .rank-table { font-size: 14px; }
    .rank-table th, .rank-table td { padding: 9px 8px; }
}

/* 习题练习：右侧双排行榜（上下堆叠） */
.exercise-side {
    flex: 0 0 260px;
    align-self: flex-start;
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
@media (max-width: 860px) {
    .exercise-side { width: 100%; position: static; }
}
.rank-panel { padding: 14px 14px 10px; }
.rank-panel h3 { margin: 0 0 10px; font-size: 15px; color: var(--orange-deep); }
.rank-mini { list-style: none; margin: 0; padding: 0; }
.rank-mini li {
    display: flex; align-items: center; gap: 8px;
    padding: 7px 0; border-bottom: 1px solid rgba(253, 186, 116, 0.28);
    font-size: 14px;
}
.rank-mini li:last-child { border-bottom: none; }
.rank-mini li.top3 {
    background: linear-gradient(90deg, #fff8ec, #fff);
    border-radius: 8px; padding-left: 6px; padding-right: 6px;
}
.rank-mini .rk { width: 22px; text-align: center; font-size: 15px; flex: none; }
.rank-mini .nm {
    flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis;
    white-space: nowrap; color: #1f2738; font-weight: 600;
}
.rank-mini li.top3 .nm { color: #b9770e; }
.rank-mini .vl { color: var(--muted); font-variant-numeric: tabular-nums; flex: none; }
.rank-mini .empty { color: var(--muted); font-size: 13px; padding: 6px 0; }
.rank-more {
    display: inline-block; margin-top: 8px; font-size: 13px;
    color: var(--orange-deep); text-decoration: none;
}
.rank-more:hover { text-decoration: underline; }

/* 新闻动态：分类标签 + 管理工具栏 */
.article-toolbar {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 12px; margin-bottom: 16px;
}
.kind-tabs { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.kind-tabs a {
    text-decoration: none; padding: 8px 14px; border-radius: 999px;
    background: #fff; color: var(--orange-deep);
    border: 1px solid rgba(253, 186, 116, 0.6); font-size: 14px;
}
.kind-tabs a.active {
    background: var(--orange-deep); color: #fff; border-color: transparent;
}
.btn-add {
    background: var(--orange-deep); color: #fff; border: none;
    text-decoration: none; padding: 9px 16px; border-radius: 999px; font-size: 14px;
}
.btn-add:hover { filter: brightness(1.05); }
.article-actions { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.btn-sm { padding: 5px 12px; font-size: 13px; border-radius: 8px; }
.btn-danger { background: #e2574c; color: #fff; border: none; cursor: pointer; }
.btn-danger:hover { background: #c8453b; }

/* 文章表单（添加/编辑） */
.article-form { max-width: 1000px; }
.article-form p { margin: 0 0 14px; }
.article-form label { display: block; font-weight: 600; margin-bottom: 4px; color: #1f2738; }

/* 表单错误汇总 banner（顶部红底，醒目） */
.form-error-banner {
    background: #fdecea;
    border: 1px solid #c0392b;
    color: #922b21;
    padding: 12px 16px;
    border-radius: 8px;
    margin: 0 0 16px;
    font-size: 14px;
}
.form-error-banner strong { display: block; margin-bottom: 6px; }
.form-error-banner ul { margin: 6px 0 0 20px; padding: 0; }
.form-error-banner li { margin: 2px 0; }
.article-form input[type="text"], .article-form textarea, .article-form select {
    width: 100%; padding: 9px 11px; border: 1px solid #e0c9ad; border-radius: 8px;
    font-size: 14px; box-sizing: border-box;
}
.article-form textarea { resize: vertical; }
.form-actions { margin-top: 8px; display: flex; gap: 10px; }

/* Quill 富文本编辑器（正文） */
.field-body #editor-container { background: #fff; }
.field-body .ql-toolbar.ql-snow { border-color: #e0c9ad; border-radius: 8px 8px 0 0; }
.field-body .ql-container.ql-snow { border-color: #e0c9ad; border-radius: 0 0 8px 8px; min-height: 340px; font-size: 15px; }
.field-body .ql-editor { min-height: 320px; }

/* 表单帮助文字 + 错误提示 */
.field-help { display: block; color: #888; font-size: 12px; margin-top: 4px; }
.field-error input, .field-error select, .field-error textarea, .field-body.field-error .ql-container { border-color: #c0392b !important; }
.field-error label, .field-body.field-error > label { color: #c0392b; }
ul.errorlist { color: #c0392b; list-style: none; padding: 0; margin: 4px 0 0; font-size: 13px; }

/* 详情页正文排版（富文本 HTML 渲染） */
.article-content { line-height: 1.85; word-break: break-word; color: #2a3346; }
.article-content img { max-width: 100%; height: auto; border-radius: 8px; margin: 8px 0; }
.article-content h1, .article-content h2, .article-content h3 { margin: 1em 0 .5em; line-height: 1.35; }
.article-content a { color: #c0392b; text-decoration: underline; }
.article-content blockquote { border-left: 4px solid #e0c9ad; margin: 1em 0; padding: .4em 1em; color: #6b7280; background: #fbf7f0; }
.article-content pre { background: #2a3346; color: #f4f4f4; padding: 12px; border-radius: 8px; overflow: auto; }

/* ===== 试卷答卷模块 ===== */
.sheet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 14px;
    margin-top: 14px;
}
.sheet-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px;
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    color: var(--text);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: transform .12s, border-color .15s, box-shadow .15s;
}
.sheet-card:hover {
    transform: translateY(-3px);
    border-color: var(--orange);
    box-shadow: 0 10px 24px rgba(234, 88, 12, 0.18);
    text-decoration: none;
}
.sheet-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 10px;
    background: #f3ede3;
}
.sheet-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.sheet-card-title {
    font-weight: 700;
    font-size: 15px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sheet-card-meta {
    font-size: 12px;
    color: var(--muted);
}

/* 标注舞台：图片 + 绝对定位的标注层 */
.sheet-stage {
    position: relative;
    display: inline-block;
    max-width: 100%;
    margin-top: 12px;
    line-height: 0;
}
.sheet-stage > img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    cursor: crosshair;
}
.sheet-annotation {
    position: absolute;
    transform: translate(-50%, -50%);
    font-weight: 700;
    line-height: 1.15;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.95), 0 0 3px rgba(255, 255, 255, 0.95), 0 0 5px rgba(255, 255, 255, 0.9);
    pointer-events: auto;
}
.sheet-anno-del {
    display: inline;
}
.sheet-anno-del-btn {
    margin-left: 3px;
    border: none;
    background: rgba(220, 38, 38, 0.92);
    color: #fff;
    width: 16px;
    height: 16px;
    line-height: 14px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    padding: 0;
    vertical-align: middle;
}
.sheet-anno-del-btn:hover { background: #b91c1c; }

/* 点击图片后浮出的添加标注表单 */
.sheet-add-form {
    position: absolute;
    z-index: 30;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 248px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid var(--orange-200);
    border-radius: 12px;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.2);
}
.sheet-add-form input[type="text"] {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--orange-200);
    border-radius: 9px;
    font-size: 14px;
}
.sheet-add-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.sheet-add-field {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: var(--muted);
}
.sheet-add-field input[type="number"] {
    width: 56px;
    padding: 4px 6px;
    border: 1px solid var(--orange-200);
    border-radius: 8px;
}

@media (max-width: 768px) {
    .sheet-grid { grid-template-columns: repeat(2, 1fr); }
}

/* 缩略图无法预览时的占位（显示文件类型，如 PDF / Word） */
.sheet-thumb-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-weight: 700;
    font-size: 18px;
    color: var(--muted);
    background: repeating-linear-gradient(45deg, #f3ede3, #f3ede3 10px, #ece3d4 10px, #ece3d4 20px);
}

/* 无预览图（如本地无 LibreOffice 的 Word）时的说明块 */
.sheet-norender {
    margin-top: 14px;
    padding: 22px;
    border: 1px dashed var(--orange-200);
    border-radius: 14px;
    background: rgba(255, 247, 237, 0.6);
    text-align: center;
}

/* 详情页头部操作区（开始批改 / 删除试卷 / 返回） */
.sheet-head-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.sheet-del-sheet { color: #b91c1c; }
.btn-active {
    background: var(--orange) !important;
    color: #fff !important;
    border-color: var(--orange) !important;
}

/* 列表卡片删除按钮 */
.sheet-card-wrap {
    position: relative;
}
.sheet-card-del {
    position: absolute;
    top: 6px;
    right: 6px;
    margin: 0;
    z-index: 5;
}
.sheet-card-del-btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    background: rgba(220, 38, 38, 0.9);
    color: #fff;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
.sheet-card-del-btn:hover { background: #b91c1c; }

/* 详情页：批改模式横幅 + 左右两栏布局 */
.sheet-mark-banner {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(234, 88, 12, 0.1);
    border: 1px solid var(--orange-200);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.sheet-detail-layout {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    margin-top: 12px;
}
.sheet-layout-left {
    flex: 1 1 auto;
    min-width: 0;
}
.sheet-layout-right {
    flex: 0 0 260px;
}

/* 右侧批改记录面板 */
.sheet-grade-panel {
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.5);
    padding: 12px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: sticky;
    top: 12px;
}
.sheet-grade-head {
    font-weight: 700;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
}
.sheet-grade-count {
    font-size: 12px;
    color: var(--muted);
    font-weight: 600;
}
.sheet-grade-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 540px;
    overflow: auto;
}
.sheet-grade-item {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    padding: 6px 0;
    border-bottom: 1px dashed var(--glass-border);
}
.sheet-grade-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-top: 4px;
    flex: 0 0 auto;
}
.sheet-grade-body {
    flex: 1 1 auto;
    min-width: 0;
}
.sheet-grade-text {
    font-weight: 700;
    word-break: break-all;
}
.sheet-grade-meta {
    font-size: 11px;
    color: var(--muted);
    margin-top: 2px;
}
.sheet-grade-del {
    margin: 0;
}
.sheet-grade-empty {
    font-size: 13px;
    color: var(--muted);
    margin: 6px 0 0;
}

/* 超管专属区块过渡到个人区域之间的轻量分隔（纯装饰，无强分隔线） */
.profile-section-label {
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    letter-spacing: 0.15em;
    margin: 22px 0 8px;
    opacity: 0.7;
}

@media (max-width: 768px) {
    .sheet-detail-layout { flex-direction: column; }
    .sheet-layout-right { flex: 1 1 auto; width: 100%; }
    .sheet-grade-panel { position: static; }
}

/* ========= 会员管理综合页（profile 内的管理区） ========= */

/* 紧凑统计卡：6 个一行（PC），单气泡字号小 */
.stats-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    margin-top: 12px;
}
.stats-row .stat {
    background: rgba(255, 247, 237, .7);
    border: 1px solid var(--orange-200);
    border-radius: 10px;
    padding: 8px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 54px;
}
.stats-row .stat .v { font-size: 22px; font-weight: 800; color: var(--orange-deep); line-height: 1; }
.stats-row .stat .k { font-size: 11px; color: var(--muted); margin-top: 3px; white-space: nowrap; }

/* 内联日志：两列 PC，单列 mobile */
.logs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 10px;
}
.log-card {
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.log-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #fff7ed;
    font-size: 13px;
    color: var(--orange-deep);
    font-weight: 700;
    border-bottom: 1px solid #f0e4d4;
}
.log-head .meta-link { color: var(--muted); font-weight: 500; font-size: 12px; }
.log-scroll { max-height: 260px; overflow-y: auto; overflow-x: hidden; }
.log-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.log-table th, .log-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #f3f3f3;
    white-space: nowrap;
}
.log-table th {
    position: sticky;
    top: 0;
    background: #fff;
    font-weight: 700;
    color: var(--orange-deep);
    font-size: 12px;
    z-index: 1;
}
.log-table tr:last-child td { border-bottom: none; }
.log-table td.t { color: #444; font-variant-numeric: tabular-nums; }
.log-table td.u {
    font-weight: 600;
    color: #1f2733;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.log-table td.a {
    color: #999;
    font-size: 12px;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.log-scroll::-webkit-scrollbar { width: 8px; }
.log-scroll::-webkit-scrollbar-thumb { background: rgba(234, 88, 12, .3); border-radius: 4px; }
.log-empty { padding: 18px; color: var(--muted); text-align: center; font-size: 13px; }

/* 表单 */
.msec { margin-top: 16px; }
.mform .form-row { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; }
.mform .fld {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 180px;
    flex: 1;
}
.mform .fld input {
    padding: 8px 12px;
    border: 1px solid rgba(0, 0, 0, .12);
    border-radius: 9px;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
}
.mform label { font-size: 12px; color: var(--muted); font-weight: 600; }
.mform .check-row {
    display: flex;
    gap: 24px;
    align-items: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #eee;
    flex-wrap: wrap;
}
.mform .check-row label {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    color: #1f2733;
    font-weight: 500;
    font-size: 14px;
    white-space: nowrap;
}

/* 会员表 */
.mtable {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
    font-size: 14px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .04);
}
.mtable th, .mtable td {
    padding: 6px 10px;
    vertical-align: middle;
    white-space: nowrap;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}
.mtable th { background: #fff7ed; color: var(--orange-deep); font-weight: 700; font-size: 13px; }
.mtable tr:last-child td { border-bottom: none; }
.mtable .btn { padding: 3px 10px; font-size: 12.5px; line-height: 1.4; box-shadow: 0 2px 8px rgba(234,88,12,.22), inset 0 1px 0 rgba(255,255,255,.4); }
.mtable .btn-danger { padding: 3px 10px; font-size: 12.5px; line-height: 1.4; }
.mtable .u { font-weight: 700; color: #1f2733; }
.mtable td.email { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mtable td.ltime { font-size: 12.5px; color: #6b7280; }
.pager {
    margin-top: 12px;
    display: flex;
    gap: 8px;
    align-items: center;
    color: var(--muted);
    font-size: 13px;
}

/* 管理区与个人区之间的分隔条 */
.msec-divider {
    margin: 28px 0 18px;
    border: 0;
    border-top: 1px dashed rgba(234, 88, 12, .25);
    text-align: center;
    position: relative;
    height: 0;
}
.msec-divider span {
    position: relative;
    top: -12px;
    display: inline-block;
    padding: 0 14px;
    background: var(--bg, #fff7ed);
    color: var(--muted);
    font-size: 13px;
    letter-spacing: 2px;
}

/* 通用 pill（与 member_list 内同款） */
.pill {
    display: inline-block;
    font-size: 11px;
    padding: 1px 8px;
    border-radius: 10px;
    font-weight: 600;
    white-space: nowrap;
    vertical-align: middle;
}
.pill.ok { background: rgba(34, 197, 94, .15); color: #16a34a; }
.pill.fail { background: rgba(220, 38, 38, .15); color: #dc2626; }

/* 移动端 */
html.is-mobile .stats-row { grid-template-columns: repeat(3, 1fr); }
html.is-mobile .logs-grid { grid-template-columns: 1fr; }
html.is-mobile .mform .fld { min-width: 140px; }
html.is-mobile .mtable { font-size: 12px; }
html.is-mobile .mtable th,
html.is-mobile .mtable td { padding: 7px 6px; }

/* 考试答题 / 错题看板 — 内嵌图片 + 多空填空 */
.inline-img { max-width: 100%; height: auto; display: inline-block; margin: 4px 6px 4px 0; border-radius: 6px; box-shadow: 0 1px 4px rgba(0,0,0,.06); vertical-align: middle; }
.opt-img { max-width: 100%; height: auto; display: block; margin-top: 6px; border-radius: 6px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.exercise-img img { max-width: 100%; height: auto; border-radius: 8px; }

.blank-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-top: 12px; }
.blank-cell { background: #fff7ed; border: 1px solid var(--orange-200); border-radius: 10px; padding: 10px 12px; }
.blank-tag { display: inline-block; font-size: 12px; font-weight: 700; color: var(--orange-deep); margin-bottom: 6px; }
.blank-correct-list { margin: 6px 0 0; padding-left: 20px; }
.blank-correct-list li { margin: 2px 0; font-size: 14px; }

.wrong-view-switch { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0 4px; }
.wrong-view-switch .is-active { background: var(--orange-100); border-color: var(--orange-300); color: var(--orange-deep); font-weight: 700; }

.exam-wrong-block { margin-top: 18px; }
.exam-wrong-head {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    font-size: 16px; font-weight: 700; color: #1f2733;
    padding: 8px 12px; background: #fff7ed; border: 1px solid var(--orange-200);
    border-radius: 10px 10px 0 0; border-bottom: none;
}
.exam-wrong-head + .exam-wrong-card { margin-top: 0; border-top-left-radius: 0; border-top-right-radius: 0; }
.exam-wrong-count { font-size: 13px; font-weight: 600; color: var(--orange-deep); background: var(--orange-100); padding: 2px 10px; border-radius: 20px; }

.exam-wrong-card { background: #fff; border: 1px solid var(--orange-200); border-radius: 12px; padding: 14px 16px; margin-top: 12px; }
.exam-wrong-card + .exam-wrong-card { margin-top: 10px; }
.wrong-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding-bottom: 8px; border-bottom: 1px dashed var(--orange-200); margin-bottom: 8px; }
.wrong-q { margin-bottom: 10px; }
.wrong-q-body { font-size: 15px; line-height: 1.7; color: #1f2733; }
.wrong-ans { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; font-size: 14px; }
.wrong-ans .bad { color: #dc2626; }
.wrong-ans .ok { color: #16a34a; }

@media (max-width: 768px) {
  .wrong-ans { grid-template-columns: 1fr; }
  .blank-grid { grid-template-columns: 1fr; }
}
html.is-mobile .exam-wrong-card { padding: 10px 12px; }
