/* =====================================================================
   STKWeb 刷题系统 - 全局样式表
   版本 stkweb1.0.0    作者：哒哒 / 轻Q魔客
   设计目标：护眼浅色为主 / 移动端优先 / 不依赖任何外部 CDN
   ===================================================================== */

/* ---------- 1. 设计变量 ---------- */
:root {
    --c-primary:      #2563eb;
    --c-primary-dark: #1d4ed8;
    --c-primary-soft: #eff6ff;
    --c-success:      #10b981;
    --c-success-soft: #ecfdf5;
    --c-danger:       #ef4444;
    --c-danger-soft:  #fef2f2;
    --c-warn:         #f59e0b;
    --c-warn-soft:    #fffbeb;
    --c-purple:       #8b5cf6;

    --bg:             #f5f8fc;
    --bg-card:        #ffffff;
    --bg-soft:        #f8fafc;
    --border:         #e6ecf5;
    --border-strong:  #cbd5e1;

    --text:           #1e293b;
    --text-mid:       #475569;
    --text-soft:      #94a3b8;

    --radius:         14px;
    --radius-sm:      10px;
    --shadow:         0 2px 10px rgba(30, 41, 59, .06);
    --shadow-lg:      0 8px 28px rgba(30, 41, 59, .10);

    --nav-h:          58px;
}

/* 夜间模式：跟随系统或手动切换 html[data-theme="dark"] */
[data-theme="dark"] {
    --bg:             #0f172a;
    --bg-card:        #1e293b;
    --bg-soft:        #172033;
    --border:         #334155;
    --border-strong:  #475569;
    --text:           #e2e8f0;
    --text-mid:       #cbd5e1;
    --text-soft:      #94a3b8;
    --c-primary-soft: #1e3a8a;
    --c-success-soft: #064e3b;
    --c-danger-soft:  #7f1d1d;
    --c-warn-soft:    #78350f;
    --shadow:         0 2px 10px rgba(0, 0, 0, .3);
    --shadow-lg:      0 8px 28px rgba(0, 0, 0, .45);
}

/* ---------- 2. 基础重置 ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
                 "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -webkit-text-size-adjust: 100%;
    min-height: 100vh;
}
a { color: var(--c-primary); text-decoration: none; }
a:hover { text-decoration: none; }
img { max-width: 100%; }
h1, h2, h3, h4, h5, h6 { margin: 0 0 .5em; font-weight: 600; line-height: 1.35; }
p { margin: 0 0 .8em; }
hr { border: none; border-top: 1px solid var(--border); margin: 18px 0; }
code {
    background: var(--bg-soft); padding: 2px 6px; border-radius: 5px;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: .88em;
}
::selection { background: var(--c-primary); color: #fff; }

/* ---------- 3. 布局容器 ---------- */
.stk-wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.stk-wrap-narrow { max-width: 760px; }
.stk-main { padding: 18px 0 60px; min-height: 60vh; }
.stk-section-title {
    font-size: 15px; font-weight: 700; color: var(--text-mid);
    margin: 22px 0 12px; padding-left: 10px;
    border-left: 4px solid var(--c-primary); border-radius: 2px;
    display: flex; align-items: center; justify-content: space-between;
}
.stk-muted { color: var(--text-soft); font-size: 13px; }
.stk-center { text-align: center; }
.stk-mt { margin-top: 16px; } .stk-mt-lg { margin-top: 26px; }
.stk-mb { margin-bottom: 16px; }
.stk-flex { display: flex; gap: 10px; align-items: center; }
.stk-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stk-spacer { flex: 1; }

/* ---------- 4. 顶栏 ---------- */
.stk-nav {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 60;
    box-shadow: var(--shadow);
}
.stk-nav-inner {
    max-width: 1080px; margin: 0 auto; padding: 0 16px;
    height: var(--nav-h); display: flex; align-items: center; gap: 12px;
}
.stk-logo {
    display: flex; align-items: center; gap: 8px;
    font-weight: 700; font-size: 16px; color: var(--text); white-space: nowrap;
}
.stk-logo .mark {
    width: 30px; height: 30px; border-radius: 9px; flex: none;
    background: linear-gradient(135deg, var(--c-primary), #60a5fa);
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 15px; font-weight: 700;
}
.stk-nav-links { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.stk-nav-links::-webkit-scrollbar { display: none; }
.stk-nav-links a {
    padding: 7px 12px; border-radius: 9px; font-size: 14px;
    color: var(--text-mid); white-space: nowrap; transition: .18s;
}
.stk-nav-links a:hover { background: var(--bg-soft); color: var(--text); }
.stk-nav-links a.active { background: var(--c-primary-soft); color: var(--c-primary); font-weight: 600; }
.stk-nav-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }

/* ---------- 5. 移动端底部导航 ---------- */
.stk-tabbar {
    display: none;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
    background: var(--bg-card); border-top: 1px solid var(--border);
    padding-bottom: env(safe-area-inset-bottom);
}
.stk-tabbar-inner { display: flex; }
.stk-tabbar a {
    flex: 1; padding: 8px 0 7px; text-align: center; font-size: 11px;
    color: var(--text-soft); display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.stk-tabbar a .ico { font-size: 19px; line-height: 1; }
.stk-tabbar a.active { color: var(--c-primary); font-weight: 600; }

/* ---------- 6. 卡片 ---------- */
.stk-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 18px; margin-bottom: 14px;
}
.stk-card.pad-lg { padding: 26px; }
.stk-card.flat { box-shadow: none; }
.stk-card-title {
    font-size: 15px; font-weight: 700; margin-bottom: 12px;
    display: flex; align-items: center; gap: 8px;
}
.stk-grid { display: grid; gap: 14px; }
.stk-grid-2 { grid-template-columns: repeat(2, 1fr); }
.stk-grid-3 { grid-template-columns: repeat(3, 1fr); }
.stk-grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- 7. 按钮 ---------- */
.stk-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 9px 16px; border-radius: var(--radius-sm); border: 1px solid transparent;
    background: var(--c-primary); color: #fff; font-size: 14px; font-weight: 500;
    cursor: pointer; transition: .18s; font-family: inherit; line-height: 1.4;
    min-height: 38px; white-space: nowrap;
}
.stk-btn:hover { background: var(--c-primary-dark); transform: translateY(-1px); }
.stk-btn:active { transform: none; }
.stk-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.stk-btn.block { display: flex; width: 100%; }
.stk-btn.lg { padding: 12px 20px; font-size: 15px; min-height: 46px; }
.stk-btn.sm { padding: 5px 11px; font-size: 13px; min-height: 30px; }
.stk-btn.ghost { background: transparent; color: var(--text-mid); border-color: var(--border-strong); }
.stk-btn.ghost:hover { background: var(--bg-soft); color: var(--text); }
.stk-btn.soft { background: var(--c-primary-soft); color: var(--c-primary); }
.stk-btn.soft:hover { background: #dbeafe; }
.stk-btn.ok { background: var(--c-success); } .stk-btn.ok:hover { background: #059669; }
.stk-btn.bad { background: var(--c-danger); } .stk-btn.bad:hover { background: #dc2626; }
.stk-btn.warn { background: var(--c-warn); } .stk-btn.warn:hover { background: #d97706; }

/* ---------- 8. 表单 ---------- */
.stk-field { margin-bottom: 14px; }
.stk-label {
    display: block; font-size: 13px; font-weight: 600;
    color: var(--text-mid); margin-bottom: 6px;
}
.stk-label .req { color: var(--c-danger); margin-left: 2px; }
.stk-input, .stk-select, .stk-textarea {
    width: 100%; padding: 10px 12px; font-size: 14px; font-family: inherit;
    border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
    background: var(--bg-card); color: var(--text); transition: .18s;
}
.stk-textarea { min-height: 96px; resize: vertical; line-height: 1.6; }
.stk-input:focus, .stk-select:focus, .stk-textarea:focus {
    outline: none; border-color: var(--c-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.stk-input:disabled, .stk-select:disabled { background: var(--bg-soft); color: var(--text-soft); }
.stk-row { display: flex; gap: 10px; flex-wrap: wrap; }
.stk-row > * { flex: 1; min-width: 130px; }
.stk-hint { font-size: 12px; color: var(--text-soft); margin-top: 5px; }
.stk-check { display: flex; align-items: center; gap: 7px; font-size: 14px; cursor: pointer; }
.stk-check input { width: 16px; height: 16px; accent-color: var(--c-primary); cursor: pointer; }

/* ---------- 9. 标签 / 徽章 ---------- */
.stk-tag {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 9px; border-radius: 20px; font-size: 12px; font-weight: 600;
    background: var(--bg-soft); color: var(--text-mid); border: 1px solid var(--border);
}
.stk-tag.blue { background: var(--c-primary-soft); color: var(--c-primary); border-color: transparent; }
.stk-tag.green { background: var(--c-success-soft); color: var(--c-success); border-color: transparent; }
.stk-tag.red { background: var(--c-danger-soft); color: var(--c-danger); border-color: transparent; }
.stk-tag.amber { background: var(--c-warn-soft); color: #b45309; border-color: transparent; }
.stk-tag.purple { background: #f5f3ff; color: var(--c-purple); border-color: transparent; }

/* ---------- 10. 提示条 ---------- */
.stk-flash-wrap { max-width: 1080px; margin: 14px auto 0; padding: 0 16px; }
.stk-flash {
    padding: 10px 14px; border-radius: var(--radius-sm); margin-bottom: 10px;
    font-size: 14px; border-left: 4px solid transparent;
}
.stk-flash.is-ok { background: var(--c-success-soft); color: #047857; border-left-color: var(--c-success); }
.stk-flash.is-err { background: var(--c-danger-soft); color: #b91c1c; border-left-color: var(--c-danger); }
.stk-flash.is-warn { background: var(--c-warn-soft); color: #b45309; border-left-color: var(--c-warn); }

.stk-toast {
    position: fixed; left: 50%; top: 74px; transform: translateX(-50%) translateY(-12px);
    background: rgba(15, 23, 42, .92); color: #fff; padding: 10px 18px; border-radius: 20px;
    font-size: 14px; z-index: 9999; opacity: 0; pointer-events: none; transition: .22s;
    max-width: 80vw; text-align: center;
}
.stk-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.stk-toast.ok { background: rgba(5, 150, 105, .94); }
.stk-toast.bad { background: rgba(220, 38, 38, .94); }

/* ---------- 11. 数据展示：统计卡 / 环形图 / 柱状图 ---------- */
.stk-stat {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 16px; text-align: center; box-shadow: var(--shadow);
}
.stk-stat .num { font-size: 26px; font-weight: 700; line-height: 1.2; }
.stk-stat .lbl { font-size: 12px; color: var(--text-soft); margin-top: 4px; }
.stk-stat.blue .num { color: var(--c-primary); }
.stk-stat.green .num { color: var(--c-success); }
.stk-stat.red .num { color: var(--c-danger); }
.stk-stat.amber .num { color: var(--c-warn); }

.stk-ring { display: flex; align-items: center; gap: 18px; }
.stk-ring svg { flex: none; }
.stk-ring .ring-info { font-size: 13px; color: var(--text-mid); }
.stk-ring .ring-info b { font-size: 22px; color: var(--text); display: block; line-height: 1.2; }

.stk-bars { display: flex; align-items: flex-end; gap: 8px; height: 120px; }
.stk-bars .bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; height: 100%; }
.stk-bars .bar {
    width: 100%; background: linear-gradient(180deg, #60a5fa, var(--c-primary));
    border-radius: 5px 5px 0 0; min-height: 3px; transition: height .4s ease;
    margin-top: auto;
}
.stk-bars .bar-lbl { font-size: 11px; color: var(--text-soft); }
.stk-bars .bar-val { font-size: 11px; color: var(--text-mid); font-weight: 600; }

.stk-progress {
    height: 8px; background: var(--bg-soft); border-radius: 6px; overflow: hidden;
    border: 1px solid var(--border);
}
.stk-progress > i {
    display: block; height: 100%; background: linear-gradient(90deg, var(--c-primary), #60a5fa);
    border-radius: 6px; transition: width .4s ease;
}

/* ---------- 12. 功能入口卡 ---------- */
.stk-entry {
    display: block; background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 18px 14px; text-align: center;
    box-shadow: var(--shadow); transition: .2s; color: var(--text);
}
.stk-entry:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: #bfdbfe; }
.stk-entry .ico { font-size: 30px; line-height: 1; margin-bottom: 8px; display: block; }
.stk-entry .t { font-weight: 700; font-size: 15px; }
.stk-entry .d { font-size: 12px; color: var(--text-soft); margin-top: 3px; }

/* ---------- 13. 刷题区 ---------- */
.stk-qbox {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px;
}
.stk-q-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.stk-q-title { font-size: 17px; line-height: 1.7; font-weight: 500; margin: 0 0 18px; word-break: break-word; }
.stk-q-title .idx { color: var(--c-primary); font-weight: 700; margin-right: 4px; }

.stk-opt {
    display: flex; gap: 10px; width: 100%; text-align: left; align-items: flex-start;
    padding: 12px 14px; margin-bottom: 9px; border-radius: var(--radius-sm);
    border: 1px solid var(--border-strong); background: var(--bg-card); color: var(--text);
    font-size: 15px; line-height: 1.55; cursor: pointer; transition: .16s; font-family: inherit;
}
.stk-opt:hover:not(:disabled) { border-color: var(--c-primary); background: var(--c-primary-soft); }
.stk-opt .k {
    flex: none; width: 24px; height: 24px; border-radius: 7px; border: 1px solid var(--border-strong);
    display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700;
    color: var(--text-mid); margin-top: 1px;
}
.stk-opt .v { flex: 1; word-break: break-word; }
.stk-opt:disabled { cursor: default; }
.stk-opt.picked { border-color: var(--c-primary); background: var(--c-primary-soft); }
.stk-opt.picked .k { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.stk-opt.right { border-color: var(--c-success); background: var(--c-success-soft); }
.stk-opt.right .k { background: var(--c-success); color: #fff; border-color: var(--c-success); }
.stk-opt.wrong { border-color: var(--c-danger); background: var(--c-danger-soft); }
.stk-opt.wrong .k { background: var(--c-danger); color: #fff; border-color: var(--c-danger); }

.stk-answer {
    margin-top: 18px; padding: 16px; border-radius: var(--radius-sm);
    background: var(--bg-soft); border-left: 4px solid var(--c-primary); position: relative;
}
.stk-answer.ok { border-left-color: var(--c-success); }
.stk-answer.no { border-left-color: var(--c-danger); }
.stk-answer .verdict { font-size: 16px; font-weight: 700; margin-bottom: 10px; }
.stk-answer .verdict.ok { color: var(--c-success); }
.stk-answer .verdict.no { color: var(--c-danger); }
.stk-answer .line { font-size: 14px; margin-bottom: 6px; word-break: break-word; }
.stk-answer .line b { color: var(--text-mid); font-weight: 600; }
.stk-answer .exp { margin-top: 10px; font-size: 14px; line-height: 1.75; color: var(--text-mid); word-break: break-word; }

.stk-qbar {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); flex-wrap: wrap;
}
.stk-kbd-tip { font-size: 12px; color: var(--text-soft); }

/* ---------- 14. 考试 ---------- */
.stk-exam-top {
    position: sticky; top: var(--nav-h); z-index: 50;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 12px 16px; margin-bottom: 14px;
    box-shadow: var(--shadow); display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.stk-timer { font-size: 20px; font-weight: 700; color: var(--c-danger); letter-spacing: 1px; font-variant-numeric: tabular-nums; }
.stk-timer.low { animation: pulse 1s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .45; } }

.stk-cardgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 7px; }
.stk-cardgrid button {
    aspect-ratio: 1; border-radius: 8px; border: 1px solid var(--border-strong);
    background: var(--bg-card); color: var(--text-mid); font-size: 13px; cursor: pointer;
    font-family: inherit; transition: .15s;
}
.stk-cardgrid button.done { background: var(--c-primary-soft); border-color: #93c5fd; color: var(--c-primary); font-weight: 600; }
.stk-cardgrid button.cur { border-color: var(--c-primary); border-width: 2px; color: var(--c-primary); font-weight: 700; }
.stk-cardgrid button.flag { background: var(--c-warn-soft); border-color: var(--c-warn); color: #b45309; }

.stk-score {
    background: linear-gradient(135deg, var(--c-primary), #1e40af); color: #fff;
    border-radius: var(--radius); padding: 30px 20px; text-align: center; box-shadow: var(--shadow-lg);
}
.stk-score .big { font-size: 52px; font-weight: 800; line-height: 1; }
.stk-score .sub { opacity: .85; font-size: 14px; margin-top: 8px; }

/* ---------- 15. 表格 ---------- */
.stk-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-card); }
.stk-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 620px; }
.stk-table th, .stk-table td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.stk-table th { background: var(--bg-soft); font-weight: 600; color: var(--text-mid); font-size: 13px; white-space: nowrap; }
.stk-table tbody tr:hover { background: var(--bg-soft); }
.stk-table tbody tr:last-child td { border-bottom: none; }
.stk-table .nowrap { white-space: nowrap; }
.stk-table .ellip { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 16. 分页 ---------- */
.stk-pager { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 16px 0; }
.stk-pager .pg {
    padding: 6px 12px; border: 1px solid var(--border-strong); border-radius: 8px;
    color: var(--text-mid); font-size: 13px; background: var(--bg-card);
}
.stk-pager .pg:hover { border-color: var(--c-primary); color: var(--c-primary); }
.stk-pager .pg.active { background: var(--c-primary); color: #fff; border-color: var(--c-primary); font-weight: 600; }
.stk-pager .pg.disabled { opacity: .45; cursor: default; }
.stk-pager .pg.dots { border: none; }
.stk-pager .pg-info { font-size: 13px; color: var(--text-soft); margin-left: auto; }

/* ---------- 17. 弹窗 ---------- */
.stk-modal {
    position: fixed; inset: 0; z-index: 200; display: none;
    align-items: center; justify-content: center; padding: 16px;
    background: rgba(15, 23, 42, .5);
}
.stk-modal.open { display: flex; }
.stk-modal-box {
    background: var(--bg-card); border-radius: var(--radius); width: 100%; max-width: 560px;
    max-height: 86vh; overflow: auto; box-shadow: var(--shadow-lg);
}
.stk-modal-head {
    padding: 15px 18px; border-bottom: 1px solid var(--border);
    font-weight: 700; display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; background: var(--bg-card); z-index: 2; border-radius: var(--radius) var(--radius) 0 0;
}
.stk-modal-body { padding: 18px; }
.stk-modal-foot { padding: 14px 18px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }
.stk-x { border: none; background: none; font-size: 22px; line-height: 1; color: var(--text-soft); cursor: pointer; padding: 0 4px; }
.stk-x:hover { color: var(--text); }

/* ---------- 18. 空状态 / 加载 ---------- */
.stk-empty { text-align: center; padding: 46px 20px; color: var(--text-soft); }
.stk-empty .ico { font-size: 44px; display: block; margin-bottom: 12px; opacity: .6; }
.stk-loading { text-align: center; padding: 40px; color: var(--text-soft); }
.stk-dots::after {
    content: ''; animation: dots 1.2s steps(4, end) infinite;
}
@keyframes dots { 0% { content: ''; } 25% { content: '·'; } 50% { content: '··'; } 75% { content: '···'; } }
.stk-skeleton {
    background: linear-gradient(90deg, var(--bg-soft) 25%, var(--border) 37%, var(--bg-soft) 63%);
    background-size: 400% 100%; animation: sk 1.2s ease infinite; border-radius: 8px; height: 14px; margin-bottom: 8px;
}
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---------- 19. 登录 / 注册 / 错误页 ---------- */
.stk-auth {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    padding: 24px 16px; background: linear-gradient(160deg, #eef4ff 0%, var(--bg) 55%);
}
[data-theme="dark"] .stk-auth { background: var(--bg); }
.stk-auth-box { width: 100%; max-width: 400px; }
.stk-auth-head { text-align: center; margin-bottom: 22px; }
.stk-auth-head .mark {
    width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 14px;
    background: linear-gradient(135deg, var(--c-primary), #60a5fa); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 700;
    box-shadow: 0 8px 20px rgba(37, 99, 235, .25);
}
.stk-auth-head h1 { font-size: 21px; margin-bottom: 4px; }
.stk-auth-head p { color: var(--text-soft); font-size: 13px; margin: 0; }
.stk-auth-alt { text-align: center; font-size: 13px; color: var(--text-soft); margin-top: 14px; }
.stk-err-page { text-align: center; padding: 60px 20px; }
.stk-err-page .code { font-size: 72px; font-weight: 800; color: var(--c-primary); line-height: 1; }

/* ---------- 20. 公告条 ---------- */
.stk-notice {
    background: var(--c-success-soft); border: 1px solid #bbf7d0; color: #166534;
    border-radius: var(--radius-sm); padding: 12px 40px 12px 14px; font-size: 14px;
    position: relative; margin-bottom: 14px;
}
[data-theme="dark"] .stk-notice { color: #86efac; border-color: #14532d; }
.stk-notice b { display: block; margin-bottom: 3px; }
.stk-notice .close {
    position: absolute; right: 10px; top: 10px; border: none; background: none;
    color: inherit; cursor: pointer; font-size: 16px; opacity: .6;
}
.stk-notice .close:hover { opacity: 1; }

/* ---------- 21. 后台侧栏（桌面） ---------- */
.stk-admin-layout { display: flex; gap: 16px; align-items: flex-start; }
.stk-side {
    width: 190px; flex: none; background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 10px; box-shadow: var(--shadow);
    position: sticky; top: calc(var(--nav-h) + 14px);
}
.stk-side a {
    display: flex; align-items: center; gap: 8px; padding: 9px 11px; border-radius: 9px;
    color: var(--text-mid); font-size: 14px; margin-bottom: 2px;
}
.stk-side a:hover { background: var(--bg-soft); color: var(--text); }
.stk-side a.active { background: var(--c-primary-soft); color: var(--c-primary); font-weight: 600; }
.stk-admin-main { flex: 1; min-width: 0; }

/* ---------- 22. 工具类 ---------- */
.stk-hide { display: none !important; }
.stk-nowrap { white-space: nowrap; }
.stk-scroll { overflow-x: auto; }
.stk-mono { font-family: "SFMono-Regular", Consolas, monospace; font-size: 13px; }
.text-ok { color: var(--c-success); } .text-bad { color: var(--c-danger); }
.text-warn { color: var(--c-warn); } .text-mid { color: var(--text-mid); }
.text-soft { color: var(--text-soft); }
.fw-bold { font-weight: 700; } .fs-12 { font-size: 12px; } .fs-13 { font-size: 13px; }
.fs-18 { font-size: 18px; } .fs-22 { font-size: 22px; }

/* ---------- 23. 响应式 ---------- */
@media (max-width: 900px) {
    .stk-grid-4 { grid-template-columns: repeat(2, 1fr); }
    .stk-admin-layout { flex-direction: column; }
    .stk-side {
        width: 100%; position: static; display: flex; gap: 6px; overflow-x: auto;
        padding: 8px; scrollbar-width: none;
    }
    .stk-side::-webkit-scrollbar { display: none; }
    .stk-side a { margin-bottom: 0; white-space: nowrap; }
}
@media (max-width: 640px) {
    body { font-size: 14px; padding-bottom: 62px; }
    .stk-main { padding: 14px 0 40px; }
    .stk-wrap { padding: 0 12px; }
    .stk-grid-3, .stk-grid-4 { grid-template-columns: repeat(2, 1fr); }
    .stk-grid-2 { grid-template-columns: 1fr; }
    .stk-card { padding: 14px; border-radius: 12px; }
    .stk-card.pad-lg { padding: 16px; }
    .stk-nav-links { display: none; }
    .stk-tabbar { display: block; }
    .stk-qbox { padding: 14px; border-radius: 12px; }
    .stk-q-title { font-size: 16px; margin-bottom: 14px; }
    .stk-opt { padding: 10px 12px; font-size: 14.5px; margin-bottom: 8px; }
    .stk-exam-top { top: 0; border-radius: 0; padding: 10px 12px; }
    .stk-stat .num { font-size: 22px; }
    .stk-bars { height: 96px; }
    .stk-modal-box { max-height: 90vh; }
    .stk-table { min-width: 520px; font-size: 13px; }
}
