/* ============================================================
   829 数据工程基础 · 闯关刷题系统 样式表
   主题：深空神经网络 + 霓虹发光
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg: #070b17;
    --bg-2: #0c1428;
    --panel: rgba(17, 26, 48, 0.92);
    --line: rgba(120, 170, 255, 0.16);
    --txt: #dce9ff;
    --txt-dim: #8aa0c4;
    --cyan: #38bdf8;
    --purple: #a78bfa;
    --green: #34d399;
    --amber: #f59e0b;
    --rose: #fb7185;
    --gold: #fbbf24;
}

html, body { height: 100%; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    background:
        radial-gradient(1200px 600px at 15% -10%, rgba(56, 189, 248, 0.14), transparent 60%),
        radial-gradient(900px 500px at 90% 10%, rgba(167, 139, 250, 0.13), transparent 60%),
        var(--bg);
    color: var(--txt);
    font-size: 15px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }
button { font-family: inherit; cursor: pointer; }
ul { list-style: none; }

/* ================= HUD ================= */
.hud {
    position: sticky; top: 0; z-index: 60;
    display: flex; align-items: center; gap: 20px;
    padding: 12px 22px;
    background: linear-gradient(180deg, rgba(9, 14, 28, 0.96), rgba(9, 14, 28, 0.82));
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
    flex-wrap: wrap;
}
.hud-left { display: flex; align-items: center; gap: 14px; min-width: 280px; }
.avatar {
    width: 58px; height: 58px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 14px; color: #fff;
    background:
        conic-gradient(var(--gold) 0deg var(--p, 0deg), rgba(255,255,255,0.08) var(--p, 0deg) 360deg);
    box-shadow: 0 0 18px rgba(251, 191, 36, 0.3);
    position: relative; flex: 0 0 auto;
}
.avatar::after {
    content: ''; position: absolute; inset: 4px; border-radius: 50%;
    background: radial-gradient(circle at 35% 25%, #1b2b4d, #0a1122);
    border: 1px solid rgba(255,255,255,0.1);
}
.avatar span { position: relative; z-index: 1; }
.hud-xp { flex: 1 1 180px; min-width: 160px; }
.hud-xp-top { display: flex; justify-content: space-between; font-size: 12px; color: var(--txt-dim); }
.hud-xp-top b { color: var(--gold); font-variant-numeric: tabular-nums; }
.xp-bar {
    height: 9px; margin-top: 5px; border-radius: 99px; overflow: hidden;
    background: rgba(255,255,255,0.08); box-shadow: inset 0 0 6px rgba(0,0,0,0.5);
}
.xp-fill {
    height: 100%; width: 0%;
    background: linear-gradient(90deg, #f59e0b, #fbbf24, #fde68a);
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.6);
    transition: width 0.45s cubic-bezier(.2,.8,.2,1);
}
.hud-stats { display: flex; gap: 18px; flex-wrap: wrap; }
.hud-stats .stat { display: flex; flex-direction: column; align-items: center; min-width: 72px; }
.hud-stats .stat span { font-size: 11px; color: var(--txt-dim); }
.hud-stats .stat b { font-size: 17px; font-variant-numeric: tabular-nums; }
.hud-stats .stat.warn b { color: var(--rose); }
.hud-right { display: flex; gap: 8px; margin-left: auto; }

.btn {
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.05);
    color: var(--txt); border-radius: 10px;
    padding: 9px 16px; font-size: 13px; font-weight: 600;
    transition: all 0.18s;
}
.btn:hover { background: rgba(255,255,255,0.12); transform: translateY(-1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-primary {
    background: linear-gradient(135deg, #2563eb, #38bdf8);
    border-color: transparent; color: #04101f;
    box-shadow: 0 6px 18px rgba(56, 189, 248, 0.28);
}
.btn-primary:hover { background: linear-gradient(135deg, #3b82f6, #7dd3fc); }
.btn-ghost { background: rgba(255,255,255,0.04); }
.btn-ghost.danger:hover { background: rgba(251, 113, 133, 0.18); border-color: rgba(251,113,133,0.5); }
.btn-ok { background: linear-gradient(135deg, #059669, #34d399); border-color: transparent; color: #04140d; }
.btn-no { background: linear-gradient(135deg, #9f1239, #fb7185); border-color: transparent; color: #fff; }
.btn-mini { padding: 5px 11px; font-size: 12px; border-radius: 8px; }
.btn-block { width: 100%; margin-top: 14px; padding: 13px; font-size: 15px; }

/* ================= 图例 ================= */
.legend {
    display: flex; gap: 26px; flex-wrap: wrap;
    padding: 10px 22px; font-size: 12px; color: var(--txt-dim);
    border-bottom: 1px solid rgba(120,170,255,0.08);
}
.legend-group { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.legend-title { color: #6f86a8; font-weight: 700; }
.lg-item { display: inline-flex; align-items: center; gap: 5px; }
.lg-item i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.lg-item i.dot { border-radius: 50%; }
.lg-item i.locked { background: #33405c; }
.lg-item i.unlocked { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.lg-item i.cleared { background: var(--green); box-shadow: 0 0 8px var(--green); }
.lg-item i.boss { background: var(--rose); box-shadow: 0 0 8px var(--rose); }
/* 考点掌握度图例：与热力图、地图外圈用同一套配色 */
.lg-item i.m0 { background: #33405c; }
.lg-item i.m1 { background: var(--rose); box-shadow: 0 0 8px var(--rose); }
.lg-item i.m2 { background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.lg-item i.m3 { background: var(--green); box-shadow: 0 0 8px var(--green); }
.legend-group.hint { margin-left: auto; }

/* ================= 地图 ================= */
.map-scroll { overflow: auto; padding: 8px 0 40px; }
.map-inner { position: relative; margin: 0 auto; min-width: 720px; }

.map-bg {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(120, 170, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(120, 170, 255, 0.045) 1px, transparent 1px);
    background-size: 44px 44px;
    pointer-events: none;
}
.tier-col {
    position: absolute; top: 0; bottom: 0;
    border-left: 1px dashed rgba(120, 170, 255, 0.12);
    border-right: 1px dashed rgba(120, 170, 255, 0.06);
    background: linear-gradient(180deg, color-mix(in srgb, var(--tc) 9%, transparent), transparent 55%);
    border-radius: 18px;
}
.tier-title {
    position: absolute; top: 18px; left: 0; right: 0; text-align: center;
    font-size: 15px; font-weight: 800; letter-spacing: 3px; color: var(--tc);
    text-shadow: 0 0 16px color-mix(in srgb, var(--tc) 60%, transparent);
}
.tier-desc {
    position: absolute; top: 46px; left: 22px; right: 22px; text-align: center;
    font-size: 11.5px; color: var(--txt-dim); line-height: 1.5;
}

.edges { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.edge { fill: none; stroke-width: 1.6; opacity: 0.32; }
.edge-locked { stroke-dasharray: 5 7; opacity: 0.16; }
.edge-done { opacity: 0.45; stroke-width: 2.2; }
.edge-active {
    opacity: 0.9; stroke-width: 2.6;
    stroke-dasharray: 9 9;
    animation: flow 1s linear infinite;
    filter: drop-shadow(0 0 6px currentColor);
}
@keyframes flow { to { stroke-dashoffset: -36; } }

/* ---------- 节点 ---------- */
.nodes { position: absolute; inset: 0; }
.node {
    position: absolute; transform: translate(-50%, -50%);
    width: calc(var(--size) * 1.65);
    text-align: center; cursor: pointer; user-select: none;
    transition: transform 0.18s;
}
.node:hover { transform: translate(-50%, -50%) scale(1.07); z-index: 5; }
.node-core {
    position: relative; margin: 0 auto;
    width: var(--size); height: var(--size); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: radial-gradient(circle at 34% 28%, color-mix(in srgb, var(--color) 55%, #0b1220), #0a1122 72%);
    border: 2px solid color-mix(in srgb, var(--color) 70%, transparent);
    box-shadow: 0 0 20px color-mix(in srgb, var(--color) 35%, transparent), inset 0 0 18px rgba(0,0,0,0.6);
}
.node-icon { font-size: calc(var(--size) * 0.42); line-height: 1; filter: drop-shadow(0 0 6px rgba(0,0,0,0.6)); }
.node-crown {
    position: absolute; right: -6px; top: -6px;
    width: 24px; height: 24px; border-radius: 50%;
    background: linear-gradient(135deg, #059669, #34d399);
    color: #052e21; font-size: 13px; font-weight: 900; line-height: 24px;
    box-shadow: 0 0 12px rgba(52, 211, 153, 0.7);
}
.node-ring {
    position: absolute; inset: -9px; border-radius: 50%;
    border: 1px solid color-mix(in srgb, var(--color) 35%, transparent);
    opacity: 0; transition: opacity 0.25s;
}
.node.unlocked .node-ring { opacity: 1; animation: pulse 2.6s ease-in-out infinite; }
@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.55; }
    50% { transform: scale(1.08); opacity: 1; }
}
.node-label {
    margin-top: 7px; font-size: 12.5px; font-weight: 700; color: var(--txt);
    text-shadow: 0 2px 8px #000;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.node-meta { font-size: 10.5px; color: var(--txt-dim); }

/* ---- 地图节点上的掌握度 ---- */
.node-mast {
    display: inline-block; margin-top: 3px; padding: 1px 7px;
    font-size: 10px; font-weight: 700; border-radius: 999px;
    font-variant-numeric: tabular-nums; white-space: nowrap;
}
.node-mast.m0 { color: #7b8aa8; background: rgba(255, 255, 255, 0.05); }
.node-mast.m1 { color: #ffd3da; background: rgba(251, 113, 133, 0.22); border: 1px solid rgba(251, 113, 133, 0.5); }
.node-mast.m2 { color: #ffe8bd; background: rgba(245, 158, 11, 0.22); border: 1px solid rgba(245, 158, 11, 0.5); }
.node-mast.m3 { color: #c9f8e5; background: rgba(52, 211, 153, 0.22); border: 1px solid rgba(52, 211, 153, 0.55); }
/* 外圈颜色跟着掌握度走：红=薄弱 黄=一般 绿=扎实 */
.node.m1 .node-ring { border-color: rgba(251, 113, 133, 0.9); border-width: 2px; }
.node.m2 .node-ring { border-color: rgba(245, 158, 11, 0.9); border-width: 2px; }
.node.m3 .node-ring { border-color: rgba(52, 211, 153, 0.95); border-width: 2px; }

.node.locked { cursor: not-allowed; }
.node.locked .node-core {
    filter: grayscale(1); opacity: 0.5;
    border-color: rgba(140,160,190,0.28);
    box-shadow: none;
}
.node.locked .node-label { color: #66799a; }
.node.cleared .node-core {
    border-color: var(--green);
    box-shadow: 0 0 22px rgba(52, 211, 153, 0.45), inset 0 0 18px rgba(0,0,0,0.5);
}
.node.boss .node-core { animation: bossGlow 2.2s ease-in-out infinite; }
@keyframes bossGlow {
    0%, 100% { box-shadow: 0 0 22px rgba(251, 113, 133, 0.4), inset 0 0 18px rgba(0,0,0,0.6); }
    50% { box-shadow: 0 0 38px rgba(251, 113, 133, 0.8), inset 0 0 18px rgba(0,0,0,0.6); }
}

/* ================= 悬浮提示 ================= */
.tip {
    position: fixed; z-index: 200; max-width: 300px;
    padding: 11px 14px; border-radius: 12px; font-size: 12.5px;
    background: rgba(12, 20, 40, 0.97);
    border: 1px solid rgba(120,170,255,0.28);
    box-shadow: 0 12px 34px rgba(0,0,0,0.6);
    opacity: 0; pointer-events: none; transform: translateY(6px);
    transition: opacity 0.15s, transform 0.15s;
}
.tip.show { opacity: 1; transform: translateY(0); }
.tip-title { font-weight: 800; margin-bottom: 5px; font-size: 13.5px; }
.tip-row { color: var(--txt-dim); }
.tip-row b { color: var(--txt); }
.tip-row .ok { color: var(--green); }
.tip-row .no { color: var(--rose); }

/* ================= 关卡简报弹窗 ================= */
.modal-mask {
    position: fixed; inset: 0; z-index: 150;
    display: none; align-items: center; justify-content: center;
    background: rgba(4, 8, 18, 0.78); backdrop-filter: blur(6px);
    padding: 20px;
}
.modal-mask.show { display: flex; }
.modal-wrap { position: relative; width: 100%; max-width: 560px; max-height: 88vh; }
.modal-close {
    position: absolute; right: -6px; top: -6px; z-index: 3;
    width: 34px; height: 34px; border-radius: 50%;
    background: rgba(20,30,55,0.95); border: 1px solid var(--line);
    color: var(--txt); font-size: 15px;
}
.modal-card {
    background: var(--panel); border: 1px solid rgba(120,170,255,0.22);
    border-radius: 18px; padding: 24px; overflow-y: auto; max-height: 88vh;
    box-shadow: 0 30px 70px rgba(0,0,0,0.6);
    animation: pop 0.22s ease-out;
}
@keyframes pop { from { transform: scale(0.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.nd-head { display: flex; gap: 14px; align-items: center; }
.nd-icon {
    width: 54px; height: 54px; border-radius: 16px; flex: 0 0 auto;
    display: flex; align-items: center; justify-content: center; font-size: 26px;
    background: color-mix(in srgb, var(--color) 18%, transparent);
    border: 1px solid color-mix(in srgb, var(--color) 50%, transparent);
}
.nd-name { font-size: 19px; font-weight: 800; }
.nd-sub { font-size: 12px; color: var(--txt-dim); }
.nd-desc { margin-top: 14px; color: #b9cbe8; font-size: 13.5px; }
.nd-block { margin-top: 16px; }
.nd-block-title { font-size: 13px; font-weight: 800; color: var(--cyan); margin-bottom: 7px; }
.nd-block ul li {
    font-size: 13px; color: #b9cbe8; padding-left: 16px; position: relative; margin-bottom: 3px;
}
.nd-block ul li::before { content: '◆'; position: absolute; left: 0; color: var(--purple); font-size: 9px; top: 5px; }
.nd-source { font-size: 12.5px; color: var(--txt-dim); }

/* ---- 关卡简报里的「深度分析」块：真题考法 / 答题模板 / 易错陷阱 / 学习路径 / 强关联 / 素材 ---- */
.nd-note {
    font-size: 13px; color: #b9cbe8; line-height: 1.72;
    padding: 10px 12px; border-radius: 10px;
    background: rgba(56, 189, 248, 0.07);
    border-left: 3px solid rgba(56, 189, 248, 0.55);
}
.nd-tmpl {
    font-size: 12.5px; color: #d8e6ff; line-height: 1.8;
    padding: 11px 13px; border-radius: 10px;
    background: rgba(167, 139, 250, 0.09);
    border-left: 3px solid rgba(167, 139, 250, 0.6);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    white-space: pre-wrap; word-break: break-word;
}
.nd-block ul.nd-traps li { color: #ffd9df; }
.nd-block ul.nd-traps li::before { content: '⚠'; color: var(--rose); font-size: 10px; top: 2px; }
.nd-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.rel-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 11px; border-radius: 999px;
    font-size: 12.5px; font-weight: 700; color: var(--txt);
    background: color-mix(in srgb, var(--rc, #38bdf8) 14%, rgba(255, 255, 255, 0.03));
    border: 1px solid color-mix(in srgb, var(--rc, #38bdf8) 45%, transparent);
    transition: transform 0.13s, background 0.13s, border-color 0.13s;
}
.rel-chip:hover {
    transform: translateY(-1px);
    background: color-mix(in srgb, var(--rc, #38bdf8) 26%, rgba(255, 255, 255, 0.04));
    border-color: color-mix(in srgb, var(--rc, #38bdf8) 78%, transparent);
}
.rel-kind {
    font-size: 10px; font-weight: 800; color: #071018;
    background: color-mix(in srgb, var(--rc, #38bdf8) 82%, #fff);
    padding: 1px 5px; border-radius: 6px;
}
.nd-ref {
    font-size: 11.5px; color: #7f95b8; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    padding: 3px 0 3px 14px; position: relative; word-break: break-all;
}
.nd-ref::before { content: '📄'; position: absolute; left: 0; font-size: 10px; top: 4px; }

/* ---- 地图上的跨章节关联虚线（点顶部 🔗 打开） ---- */
.edge-rel {
    stroke-width: 1.2; opacity: 0.3; stroke-dasharray: 3 8;
    pointer-events: stroke;
}
.edge-rel:hover { opacity: 0.85; stroke-width: 2; }

/* ================= 战斗界面 ================= */
.battle-mask {
    position: fixed; inset: 0; z-index: 160;
    display: none; align-items: center; justify-content: center;
    background: rgba(3, 6, 14, 0.86); backdrop-filter: blur(8px); padding: 16px;
}
.battle-mask.show { display: flex; }
.battle-panel {
    width: 100%; max-width: 880px; max-height: 92vh;
    display: flex; flex-direction: column;
    background: linear-gradient(180deg, rgba(14, 22, 42, 0.98), rgba(9, 15, 30, 0.99));
    border: 1px solid rgba(120,170,255,0.22);
    border-radius: 20px; overflow: hidden;
    box-shadow: 0 30px 80px rgba(0,0,0,0.7);
    animation: pop 0.2s ease-out;
}
.battle-head {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    padding: 14px 20px; border-bottom: 1px solid var(--line);
    background: linear-gradient(90deg, rgba(251,113,133,0.10), transparent 55%);
    flex-wrap: wrap;
}
.monster { display: flex; align-items: center; gap: 12px; flex: 1 1 320px; }
.monster-icon { font-size: 34px; line-height: 1; filter: drop-shadow(0 0 10px rgba(251,113,133,0.6)); }
.monster-info { flex: 1; min-width: 0; }
.monster-name { font-size: 14px; font-weight: 800; margin-bottom: 4px; }
.hp-bar { height: 10px; border-radius: 99px; background: rgba(255,255,255,0.08); overflow: hidden; }
.hp-fill {
    height: 100%; width: 100%;
    background: linear-gradient(90deg, #ef4444, #fb7185);
    box-shadow: 0 0 12px rgba(251,113,133,0.7);
    transition: width 0.4s cubic-bezier(.2,.8,.2,1);
}
.hp-fill.low { background: linear-gradient(90deg, #b91c1c, #f97316); }
.hp-text { font-size: 11.5px; color: var(--txt-dim); margin-top: 3px; }
.battle-meta { display: flex; align-items: center; gap: 12px; }
.q-progress { font-size: 13px; color: var(--txt-dim); font-variant-numeric: tabular-nums; }
.combo-badge {
    display: none; padding: 4px 12px; border-radius: 99px; font-size: 13px; font-weight: 800;
    background: linear-gradient(135deg, #f59e0b, #fb7185); color: #1a0b02;
    box-shadow: 0 0 16px rgba(251, 113, 133, 0.7);
    animation: pop 0.2s;
}
.combo-badge.show { display: inline-block; }
.battle-close {
    width: 34px; height: 34px; border-radius: 50%;
    background: rgba(255,255,255,0.06); border: 1px solid var(--line);
    color: var(--txt); font-size: 15px;
}
.battle-close:hover { background: rgba(251,113,133,0.2); }

.battle-body { flex: 1; overflow-y: auto; padding: 20px; }
.q-card { animation: pop 0.18s ease-out; }
.q-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.tag {
    font-size: 11.5px; padding: 3px 10px; border-radius: 99px;
    background: rgba(255,255,255,0.07); color: var(--txt-dim);
    border: 1px solid rgba(255,255,255,0.08);
}
.tag-type { background: rgba(56,189,248,0.16); color: #7dd3fc; border-color: rgba(56,189,248,0.35); }
.tag-level.lv1 { background: rgba(56,189,248,0.14); color: #7dd3fc; }
.tag-level.lv2 { background: rgba(167,139,250,0.16); color: #c4b5fd; }
.tag-level.lv3 { background: rgba(251,113,133,0.16); color: #fda4af; }
.tag-score { background: rgba(52,211,153,0.14); color: #6ee7b7; }
.tag-xp { background: rgba(251,191,36,0.16); color: #fcd34d; }

.q-stem { font-size: 15.5px; line-height: 1.85; color: #e8f1ff; }
.inline-code {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    background: rgba(56,189,248,0.13); color: #7dd3fc;
    padding: 1px 6px; border-radius: 5px; font-size: 13.5px;
}
.code-block {
    margin: 12px 0; padding: 14px 16px; overflow-x: auto;
    background: #050a14; border: 1px solid rgba(120,170,255,0.18);
    border-radius: 10px; font-size: 13px; line-height: 1.7;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    color: #a5d8ff; white-space: pre;
}

.q-options { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.opt {
    display: flex; gap: 12px; align-items: flex-start; text-align: left;
    padding: 13px 16px; border-radius: 12px; font-size: 14.5px;
    background: rgba(255,255,255,0.04); border: 1px solid rgba(120,170,255,0.16);
    color: var(--txt); transition: all 0.16s;
}
.opt:hover:not(:disabled) { background: rgba(56,189,248,0.12); border-color: rgba(56,189,248,0.5); transform: translateX(3px); }
.opt:disabled { cursor: default; }
.opt-key {
    flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.09); font-weight: 800; font-size: 12.5px;
}
.opt.right { background: rgba(52,211,153,0.16); border-color: var(--green); }
.opt.right .opt-key { background: var(--green); color: #04140d; }
.opt.wrong { background: rgba(251,113,133,0.16); border-color: var(--rose); }
.opt.wrong .opt-key { background: var(--rose); color: #2a060c; }

.q-input {
    width: 100%; margin-top: 16px; padding: 13px 15px; resize: vertical;
    background: #050a14; color: #e8f1ff; font-size: 14px; line-height: 1.7;
    border: 1px solid rgba(120,170,255,0.22); border-radius: 12px;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}
.q-input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(56,189,248,0.18); }
.shake { animation: shake 0.4s; border-color: var(--rose) !important; }
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

.q-feedback { margin-top: 18px; }

/* ---- 考点讲解外链（题目卡片里的视频/搜索入口） ---- */
.q-links {
    margin-top: 16px; padding: 11px 13px; border-radius: 12px;
    background: rgba(8, 14, 30, 0.55);
    border: 1px solid rgba(120, 170, 255, 0.18);
}
.q-links-head { font-size: 12px; color: var(--txt-dim); margin-bottom: 8px; }
.q-links-body { display: flex; flex-wrap: wrap; gap: 7px; }
.ql-chip {
    display: inline-flex; align-items: center; gap: 5px; max-width: 100%;
    font-size: 12px; line-height: 1.45; text-decoration: none;
    padding: 5px 10px; border-radius: 999px;
    color: #cfe2ff; background: rgba(56, 189, 248, 0.10);
    border: 1px solid rgba(56, 189, 248, 0.30);
    transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.ql-chip:hover { background: rgba(56, 189, 248, 0.22); border-color: rgba(56, 189, 248, 0.6); transform: translateY(-1px); }
.ql-chip.ql-search { color: var(--txt-dim); background: transparent; border-color: var(--line); }
.ql-chip.ql-search:hover { color: var(--txt); border-color: rgba(120, 170, 255, 0.5); }
.fb { padding: 16px; border-radius: 14px; border: 1px solid; animation: pop 0.2s; }
.fb-ok { background: rgba(52,211,153,0.09); border-color: rgba(52,211,153,0.45); }
.fb-no { background: rgba(251,113,133,0.09); border-color: rgba(251,113,133,0.45); }
.fb-pending { background: rgba(56,189,248,0.07); border-color: rgba(56,189,248,0.35); }
.fb-title { font-weight: 800; font-size: 14px; margin: 8px 0 6px; }
.fb-title:first-child { margin-top: 0; }
.fb-note, .fb-note-inline { font-size: 12.5px; color: var(--amber); }
.fb-answer { font-size: 14px; color: #e8f1ff; }
.fb-analysis { font-size: 13.5px; color: #b9cbe8; }
.fb-source { margin-top: 10px; font-size: 12px; color: var(--purple); }
.fb-keys { margin: 4px 0 0; }
.fb-keys li { font-size: 13px; color: #b9cbe8; padding-left: 16px; position: relative; margin-bottom: 3px; }
.fb-keys li::before { content: '✔'; position: absolute; left: 0; color: var(--green); font-size: 11px; }
.fb-optnotes { margin: 4px 0 0; list-style: none; padding: 0; }
.fb-optnotes li { font-size: 13px; color: #b9cbe8; margin-bottom: 5px; padding-left: 26px; position: relative; line-height: 1.65; }
.opt-mark {
    position: absolute; left: 0; top: 2px; width: 18px; height: 18px; border-radius: 5px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 800; color: #0b1220; background: #7dd3fc;
}
.fb-tip {
    font-size: 13px; color: #ffe6a8; background: rgba(251,191,36,0.08);
    border-left: 3px solid var(--amber); border-radius: 0 8px 8px 0; padding: 8px 10px;
}
.fb-variants { margin: 4px 0 0; list-style: none; padding: 0; }
.fb-variants li { border: 1px dashed var(--line); border-radius: 10px; padding: 9px 11px; margin-bottom: 8px; }
.variant-stem { font-size: 13px; color: #dbe7fb; }
.variant-hint { margin-top: 5px; font-size: 12.5px; color: var(--txt-dim); }
.tag-diff.d-basic { background: rgba(56,189,248,0.12); color: #7dd3fc; border-color: rgba(56,189,248,0.3); }
.tag-diff.d-exam { background: rgba(251,191,36,0.12); color: #fcd34d; border-color: rgba(251,191,36,0.3); }
.tag-diff.d-hard { background: rgba(251,113,133,0.12); color: #fda4af; border-color: rgba(251,113,133,0.3); }
.self-judge { display: flex; gap: 10px; margin-top: 16px; }
.self-result { margin-bottom: 10px; }

.battle-foot {
    display: flex; align-items: center; gap: 12px; justify-content: flex-end;
    padding: 14px 20px; border-top: 1px solid var(--line);
    background: rgba(6, 11, 22, 0.7); flex-wrap: wrap;
}
.foot-hint { margin-right: auto; font-size: 12px; color: var(--txt-dim); }

/* ================= 结算 ================= */
.settle { text-align: center; padding: 12px 4px; }
.settle-icon { font-size: 60px; line-height: 1; animation: pop 0.3s; }
.settle-title { font-size: 24px; font-weight: 900; margin-top: 8px; letter-spacing: 2px; }
.settle.win .settle-title { color: var(--gold); text-shadow: 0 0 22px rgba(251,191,36,0.5); }
.settle.lose .settle-title { color: var(--rose); }
.settle-sub { color: var(--txt-dim); font-size: 13px; }
.settle-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 22px 0;
}
.sg {
    background: rgba(255,255,255,0.04); border: 1px solid var(--line);
    border-radius: 12px; padding: 12px 6px;
}
.sg b { display: block; font-size: 20px; color: var(--cyan); font-variant-numeric: tabular-nums; }
.sg span { font-size: 11.5px; color: var(--txt-dim); }
.settle-row { display: flex; justify-content: space-between; padding: 8px 4px; border-bottom: 1px dashed rgba(120,170,255,0.14); font-size: 14px; }
.settle-row b { color: var(--gold); }
.settle-row.hl { color: var(--green); border: none; }
.settle-note { margin-top: 12px; font-size: 13px; color: var(--amber); }
.unlock-box, .ach-box {
    margin-top: 16px; padding: 14px; border-radius: 12px; text-align: left;
    background: rgba(56,189,248,0.07); border: 1px solid rgba(56,189,248,0.28);
}
.ach-box { background: rgba(251,191,36,0.07); border-color: rgba(251,191,36,0.3); margin-top: 10px; }
.ub-title { font-size: 13px; font-weight: 800; color: var(--cyan); margin-bottom: 6px; }
.ach-box .ub-title { color: var(--gold); }
.ub-item { font-size: 13px; color: #cfe0fb; padding: 3px 0; }
.ach-desc { color: var(--txt-dim); font-size: 12px; }

/* ================= 侧栏面板 ================= */
.panel-mask {
    position: fixed; inset: 0; z-index: 170; background: rgba(4,8,18,0.6);
    display: none;
}
.panel-mask.show { display: block; }
.panel {
    position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 94vw);
    z-index: 180; background: linear-gradient(180deg, #0d1730, #080e1e);
    border-left: 1px solid rgba(120,170,255,0.22);
    transform: translateX(102%); transition: transform 0.28s cubic-bezier(.2,.8,.2,1);
    display: flex; flex-direction: column;
    box-shadow: -20px 0 60px rgba(0,0,0,0.6);
}
.panel.show { transform: translateX(0); }
.panel-head {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 16px; border-bottom: 1px solid var(--line);
}
.panel-tabs { display: flex; gap: 6px; flex: 1; }
.panel-tab {
    flex: 1; padding: 9px 8px; border-radius: 10px; font-size: 12.5px; font-weight: 700;
    background: rgba(255,255,255,0.05); border: 1px solid transparent; color: var(--txt-dim);
}
.panel-tab.active { background: rgba(56,189,248,0.16); color: #fff; border-color: rgba(56,189,248,0.45); }
.panel-body { flex: 1; overflow-y: auto; padding: 16px; }
.panel-view { display: none; }
.panel-view.active { display: block; }

.ach { display: flex; align-items: center; gap: 12px; padding: 11px; border-radius: 12px; margin-bottom: 8px; background: rgba(255,255,255,0.03); border: 1px solid rgba(120,170,255,0.1); }
.ach.got { background: linear-gradient(90deg, rgba(251,191,36,0.12), rgba(255,255,255,0.03)); border-color: rgba(251,191,36,0.35); }
.ach-icon { font-size: 24px; width: 34px; text-align: center; }
.ach.got .ach-icon { filter: drop-shadow(0 0 8px rgba(251,191,36,0.6)); }
.ach-body { flex: 1; }
.ach-name { font-size: 13.5px; font-weight: 800; }
.ach.got .ach-name { color: var(--gold); }
.ach-desc { font-size: 11.5px; color: var(--txt-dim); }
.ach-date { font-size: 11px; color: var(--txt-dim); }
.empty { text-align: center; padding: 60px 20px; color: var(--txt-dim); font-size: 14px; }

.wrong-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 12.5px; color: var(--txt-dim); flex-wrap: wrap; }
.wrong-bar span { margin-right: auto; }
.wrong-item { padding: 13px; border-radius: 12px; margin-bottom: 10px; background: rgba(251,113,133,0.06); border: 1px solid rgba(251,113,133,0.24); }
.wi-head { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 6px; }
.wi-node { color: #fda4af; font-weight: 700; }
.wi-times { color: var(--txt-dim); }
.wi-stem { font-size: 12.5px; color: #cfe0fb; line-height: 1.6; }
.wi-src { font-size: 11px; color: var(--purple); margin-top: 6px; }
.wi-actions { display: flex; gap: 8px; margin-top: 10px; }

.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 18px; }
.stat-cell { background: rgba(255,255,255,0.04); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.stat-cell span { display: block; font-size: 11.5px; color: var(--txt-dim); }
.stat-cell b { font-size: 19px; color: var(--cyan); font-variant-numeric: tabular-nums; }

/* ================= 考点掌握度热力图 ================= */
.stats-block { margin-bottom: 18px; }
.hm-summary {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
    margin-bottom: 10px; font-size: 12px; color: var(--txt-dim);
}
.hm-s { padding: 3px 9px; border-radius: 999px; font-weight: 700; }
.hm-s b { font-variant-numeric: tabular-nums; }
.hm-s.m0 { background: rgba(255, 255, 255, 0.05); color: #93a2bd; }
.hm-s.m1 { background: rgba(251, 113, 133, 0.16); color: #ffb3bf; }
.hm-s.m2 { background: rgba(245, 158, 11, 0.16); color: #ffd98a; }
.hm-s.m3 { background: rgba(52, 211, 153, 0.16); color: #7ee7bb; }
.hm-hint { margin-left: auto; font-size: 11px; }
.hm-weak { margin-bottom: 10px; font-size: 12px; color: var(--txt-dim); }
.hm-link {
    font: inherit; font-size: 12px; cursor: pointer; margin-left: 6px;
    padding: 3px 9px; border-radius: 999px;
    color: #ffd3da; background: rgba(251, 113, 133, 0.12);
    border: 1px solid rgba(251, 113, 133, 0.4);
}
.hm-link:hover { background: rgba(251, 113, 133, 0.25); }
.hm-wrap { display: flex; flex-direction: column; gap: 10px; }
.hm-group-title { font-size: 11.5px; color: var(--txt-dim); margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.hm-group-title i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.hm-cells { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 7px; }
.hm-cell {
    display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
    font: inherit; cursor: pointer; text-align: left;
    padding: 7px 9px; border-radius: 10px; border: 1px solid;
    transition: transform 0.14s, filter 0.14s;
}
.hm-cell:hover { transform: translateY(-2px); filter: brightness(1.25); }
.hm-cell .hm-name { font-size: 11px; line-height: 1.3; opacity: 0.9; }
.hm-cell .hm-pct { font-size: 15px; font-weight: 900; font-variant-numeric: tabular-nums; }
.hm-cell.m0 { color: #93a2bd; background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.1); }
.hm-cell.m1 { color: #ffb3bf; background: rgba(251, 113, 133, 0.12); border-color: rgba(251, 113, 133, 0.42); }
.hm-cell.m2 { color: #ffd98a; background: rgba(245, 158, 11, 0.12); border-color: rgba(245, 158, 11, 0.42); }
.hm-cell.m3 { color: #7ee7bb; background: rgba(52, 211, 153, 0.12); border-color: rgba(52, 211, 153, 0.45); }

/* ================= 成就稀有度 ================= */
.ach-head {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
    margin-bottom: 12px; font-size: 12.5px; color: var(--txt-dim);
}
.ach-head b { color: var(--gold); font-size: 15px; font-variant-numeric: tabular-nums; }
.ach-tally { padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; border: 1px solid; }
.ach-rarity { padding: 1px 7px; border-radius: 999px; font-size: 10.5px; font-weight: 700; border: 1px solid; }
.ach-hidden-tag { padding: 1px 7px; border-radius: 999px; font-size: 10.5px; color: #ddd; background: rgba(255,255,255,0.12); }
.r-common, .ach-tally.r-common, .ach-rarity.r-common { color: #a9b8d4; background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.14); }
.r-rare, .ach-tally.r-rare, .ach-rarity.r-rare { color: #c4b5fd; background: rgba(139,92,246,0.16); border-color: rgba(139,92,246,0.5); }
.r-epic, .ach-tally.r-epic, .ach-rarity.r-epic { color: #ffc48a; background: rgba(249,115,22,0.16); border-color: rgba(249,115,22,0.5); }
.r-legend, .ach-tally.r-legend, .ach-rarity.r-legend { color: #ffe08a; background: rgba(251,191,36,0.18); border-color: rgba(251,191,36,0.6); }
.ach.r-legend.got { border-color: rgba(251,191,36,0.6); }
.ach.r-epic.got { border-color: rgba(249,115,22,0.5); }
.ach-list { display: block; }

/* ================= 破纪录提示 ================= */
.settle-row.rec { color: var(--gold); font-weight: 800; border-bottom-style: solid; border-bottom-color: rgba(251,191,36,0.35); }
.settle-row.rec .rec-old { margin-left: 8px; font-size: 12px; font-weight: 400; opacity: 0.75; }
.rec-up { color: var(--green); font-size: 12.5px; }
.rec-down { color: var(--rose); font-size: 12.5px; }
.rec-eq { color: var(--txt-dim); font-size: 12.5px; }
.play-tips { font-size: 12.5px; color: #b9cbe8; }
.play-tips ul li { padding-left: 16px; position: relative; margin-bottom: 7px; }
.play-tips ul li::before { content: '▸'; position: absolute; left: 0; color: var(--cyan); }
.play-tips b { color: var(--gold); }

/* ================= Toast / 飘字 ================= */
#toastWrap { position: fixed; top: 78px; left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
    padding: 11px 20px; border-radius: 99px; font-size: 13.5px; font-weight: 700;
    background: rgba(14,22,42,0.97); border: 1px solid rgba(120,170,255,0.35);
    color: #fff; box-shadow: 0 10px 30px rgba(0,0,0,0.55);
    opacity: 0; transform: translateY(-10px); transition: all 0.25s;
}
.toast.in { opacity: 1; transform: translateY(0); }
.toast.lvup { background: linear-gradient(135deg, #f59e0b, #fbbf24); color: #2a1a02; border-color: transparent; }
.toast.ach { background: linear-gradient(135deg, #7c3aed, #38bdf8); color: #fff; border-color: transparent; }
.toast.rec { background: linear-gradient(135deg, #d97706, #fde68a); color: #2a1a02; border-color: transparent; }

.xp-float {
    position: fixed; left: 50%; top: 42%; transform: translateX(-50%);
    z-index: 250; font-size: 26px; font-weight: 900; pointer-events: none;
    animation: floatUp 1.1s ease-out forwards;
}
.xp-float.plus { color: var(--gold); text-shadow: 0 0 20px rgba(251,191,36,0.8); }
.xp-float.minus { font-size: 16px; color: var(--rose); text-shadow: 0 0 16px rgba(251,113,133,0.7); }
@keyframes floatUp {
    0% { opacity: 0; transform: translate(-50%, 20px) scale(0.8); }
    25% { opacity: 1; transform: translate(-50%, 0) scale(1.12); }
    100% { opacity: 0; transform: translate(-50%, -70px) scale(1); }
}

/* ================= 响应式 ================= */
@media (max-width: 860px) {
    .hud { gap: 12px; padding: 10px 14px; }
    .hud-stats { width: 100%; justify-content: space-between; gap: 8px; }
    .hud-stats .stat { min-width: 60px; }
    .hud-right { width: 100%; }
    .hud-right .btn { flex: 1; }
    .legend { gap: 14px; padding: 10px 14px; }
    .legend-group.hint { margin-left: 0; }
    .map-scroll { padding-bottom: 80px; }
    .battle-body { padding: 14px; }
    .settle-grid { grid-template-columns: repeat(2, 1fr); }
    .q-stem { font-size: 14.5px; }
    .battle-foot { justify-content: stretch; }
    .battle-foot .btn { flex: 1; }
    .foot-hint { width: 100%; margin: 0 0 4px; text-align: center; }
}

/* ============================================================
   玩法系统（2026-11）：HUD 经济条 / 战斗计时与行囊 / 玩法中心 / 商店 / 图鉴
   ============================================================ */

/* ---- HUD ---- */
.hud-stats .stat.coin b { color: var(--gold); }
.hud-stats .stat.rank b { font-size: 14px; font-weight: 800; }
.btn-game {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    border: none; color: #1a1206; font-weight: 900; letter-spacing: .5px;
    box-shadow: 0 6px 20px rgba(245, 158, 11, .35);
}
.btn-game:hover { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(245, 158, 11, .55); }

/* ---- 战斗：计时条 ---- */
.q-timer {
    position: relative; display: inline-flex; align-items: center; justify-content: center;
    min-width: 76px; height: 26px; border-radius: 999px; overflow: hidden;
    background: rgba(255,255,255,.06); border: 1px solid var(--line);
}
.qt-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 100%;
    background: linear-gradient(90deg, #22d3ee, #34d399); opacity: .35; transition: width .1s linear; }
.qt-txt { position: relative; font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.q-timer.low .qt-fill { background: linear-gradient(90deg, #fb7185, #f59e0b); opacity: .55; }
.q-timer.low .qt-txt { color: #ffd9df; animation: qtPulse .55s ease-in-out infinite; }
@keyframes qtPulse { 50% { opacity: .45; } }

/* ---- 战斗：行囊（道具） ---- */
.q-items { display: flex; align-items: center; gap: 6px; margin: 0 0 10px; flex-wrap: wrap; }
.q-items-label { font-size: 11px; color: var(--txt-dim); }
.q-item {
    display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px;
    border-radius: 10px; font-size: 13px; line-height: 1.2;
    background: rgba(56,189,248,.1); border: 1px solid rgba(56,189,248,.35);
    transition: transform .15s, background .15s;
}
.q-item b { font-size: 11px; color: #9fc0ea; font-variant-numeric: tabular-nums; }
.q-item:hover:not(:disabled) { background: rgba(56,189,248,.24); transform: translateY(-1px); }
.q-item:disabled { opacity: .35; cursor: not-allowed; }
.q-item.empty { filter: grayscale(1); }
.q-items-shop {
    width: 24px; height: 24px; border-radius: 8px; line-height: 1;
    border: 1px dashed var(--line); background: transparent; color: var(--txt-dim); font-size: 13px;
}
.q-items-shop:hover { color: var(--txt); border-color: rgba(56,189,248,.5); }

/* ---- 战斗：提示框 / 排除选项 / 疾风飘字 / 模式标签 ---- */
.q-hint {
    margin: 0 0 10px; padding: 10px 12px; border-radius: 10px; font-size: 13px;
    background: rgba(251,191,36,.1); border-left: 3px solid var(--gold); color: #ffe8bd;
}
.q-hint b { display: block; margin-bottom: 3px; font-size: 12px; color: var(--gold); }
.opt.gone { opacity: .22; filter: grayscale(1); text-decoration: line-through; }
.xp-float.fast { color: #7dd3fc; font-weight: 900; text-shadow: 0 0 18px rgba(56,189,248,.9); }
.tag.tag-mode { background: rgba(56,189,248,.16); border-color: rgba(56,189,248,.5); }
.tag.tag-mode.endl { background: rgba(251,113,133,.16); border-color: rgba(251,113,133,.55); color: #ffd3da; }
.tag.tag-mode.mock { background: rgba(245,158,11,.16); border-color: rgba(245,158,11,.55); color: #ffe8bd; }
body.hide-hp .hp-wrap { display: none; }

/* ---- 模式局结算 ---- */
.mock-score { display: flex; align-items: baseline; justify-content: center; gap: 8px; margin: 16px 0 4px; }
.mock-score b {
    font-size: 48px; line-height: 1; font-variant-numeric: tabular-nums; font-weight: 900;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    filter: drop-shadow(0 0 18px rgba(251,191,36,.35));
}
.mock-score span { font-size: 13px; color: var(--txt-dim); }
.mock-bars { display: flex; flex-direction: column; gap: 7px; margin: 14px 0; }
.mock-bar { display: grid; grid-template-columns: 108px 1fr 44px; gap: 8px; align-items: center; font-size: 12px; }
.mock-bar span { color: var(--txt-dim); }
.mock-bar i { display: block; height: 8px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.mock-bar i b { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg,#38bdf8,#34d399); }
.mock-bar em { font-style: normal; text-align: right; color: var(--txt-dim); font-variant-numeric: tabular-nums; }

/* ---- 玩法中心 ---- */
.gc-mask .modal-wrap { max-width: 900px; }
.gc-card { padding: 20px 22px 22px; }
.gc-head { margin-bottom: 12px; }
.gc-title { font-size: 20px; font-weight: 900; }
.gc-sub { font-size: 12px; color: var(--txt-dim); margin-top: 3px; }
.gc-tabs { display: flex; gap: 8px; margin: 14px 0 16px; padding-bottom: 10px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.gc-tab {
    padding: 7px 15px; border-radius: 999px; font-size: 13px; font-weight: 700;
    color: var(--txt-dim); background: rgba(255,255,255,.05); border: 1px solid transparent;
}
.gc-tab.active { background: rgba(56,189,248,.16); border-color: rgba(56,189,248,.5); color: var(--txt); }
.gc-tip { margin-top: 14px; font-size: 11.5px; color: var(--txt-dim); line-height: 1.65; }

/* 段位卡 */
.rank-box {
    position: relative; display: flex; gap: 14px; padding: 14px; border-radius: 16px; overflow: hidden;
    background: linear-gradient(135deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
    border: 1px solid color-mix(in srgb, var(--rc) 42%, transparent);
}
.rank-box::after {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(420px 130px at 12% 0%, color-mix(in srgb, var(--rc) 24%, transparent), transparent 72%);
}
.rank-badge {
    width: 58px; height: 58px; flex: 0 0 auto; border-radius: 18px; font-size: 30px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,.28); border: 1px solid color-mix(in srgb, var(--rc) 55%, transparent);
    box-shadow: 0 0 26px color-mix(in srgb, var(--rc) 38%, transparent);
}
.rank-main { flex: 1; min-width: 0; position: relative; z-index: 1; }
.rank-name { font-size: 15px; font-weight: 900; }
.rank-lv { font-size: 11px; font-weight: 600; color: var(--txt-dim); margin-left: 6px; }
.rank-pep { font-size: 12px; color: var(--txt-dim); margin: 3px 0 8px; }
.rank-meter { height: 8px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.rank-meter i {
    display: block; height: 100%; border-radius: 99px; transition: width .5s ease;
    background: linear-gradient(90deg, var(--rc), rgba(255,255,255,.45));
}
.rank-foot { display: flex; justify-content: space-between; gap: 10px; font-size: 11.5px; color: var(--txt-dim); margin-top: 6px; }
.rank-coins { color: var(--gold); font-weight: 800; }
.rank-mini { display: flex; gap: 16px; flex-wrap: wrap; margin: 10px 2px 0; font-size: 12px; color: var(--txt-dim); }
.rank-mini b { color: var(--txt); font-variant-numeric: tabular-nums; }

/* 每日打卡日历 */
.daily-strip {
    margin-top: 14px; padding: 12px 14px; border-radius: 14px;
    background: rgba(56,189,248,.06); border: 1px solid rgba(56,189,248,.22);
}
.ds-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 9px; font-size: 12.5px; color: var(--txt-dim); }
.ds-head b { font-size: 13px; color: var(--txt); }
.ds-days { display: flex; gap: 5px; }
.ds-day {
    flex: 1; height: 26px; border-radius: 7px; font-size: 10px; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.05); color: #6b7f9e; border: 1px solid transparent;
}
.ds-day.today { border-color: rgba(56,189,248,.7); box-shadow: inset 0 0 0 1px rgba(56,189,248,.25); }
.ds-day.ok { background: rgba(56,189,248,.22); color: #cfe9ff; }
.ds-day.great { background: rgba(52,211,153,.3); color: #c9f8e5; }
.ds-day.bad { background: rgba(251,113,133,.22); color: #ffd9df; }

/* 模式卡 */
.mode-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; }
.mode-card {
    display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 16px;
    background: linear-gradient(160deg, color-mix(in srgb, var(--mc) 15%, transparent), rgba(255,255,255,.02));
    border: 1px solid color-mix(in srgb, var(--mc) 40%, transparent);
}
.mc-icon { font-size: 26px; line-height: 1; }
.mc-name { font-size: 15px; font-weight: 900; }
.mc-desc { flex: 1; font-size: 11.5px; line-height: 1.55; color: var(--txt-dim); }
.mc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.mc-tag { font-size: 10.5px; font-weight: 800; color: color-mix(in srgb, var(--mc) 85%, #fff); }
.mc-play { padding: 7px 12px; font-size: 12px; }
.mc-record { font-size: 11px; color: var(--txt-dim); }

/* 商店 */
.shop-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.shop-head b { font-size: 19px; color: var(--gold); font-variant-numeric: tabular-nums; }
.shop-hint { font-size: 11px; color: var(--txt-dim); }
.shop-grid { display: flex; flex-direction: column; gap: 9px; margin-top: 12px; }
.shop-item { display: flex; align-items: center; gap: 12px; padding: 11px 13px; border-radius: 13px;
    background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.si-icon { width: 34px; text-align: center; font-size: 24px; }
.si-main { flex: 1; min-width: 0; }
.si-name { font-size: 13.5px; font-weight: 800; }
.si-own { margin-left: 8px; font-size: 10.5px; font-weight: 600; color: var(--txt-dim); }
.si-desc { font-size: 11.5px; color: var(--txt-dim); }
.si-buy { white-space: nowrap; font-weight: 800; color: var(--gold); background: rgba(251,191,36,.1); border-color: rgba(251,191,36,.4); }
.btn.disabled, .si-buy.disabled { opacity: .42; pointer-events: none; }

/* 图鉴 */
.codex-head { font-size: 12.5px; color: var(--txt-dim); }
.codex-head b { color: var(--txt); font-size: 15px; }
.codex-mods { display: flex; flex-direction: column; gap: 11px; margin-top: 12px; }
.codex-mod .cm-title { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 800; }
.codex-mod .cm-title i { width: 8px; height: 8px; border-radius: 50%; }
.codex-mod .cm-title span { margin-left: auto; font-size: 11px; font-weight: 600; color: var(--txt-dim); }
.codex-grid { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.cdx-cell {
    width: 34px; height: 34px; border-radius: 9px; font-size: 16px;
    border: 1px solid var(--line); background: rgba(255,255,255,.04);
    filter: grayscale(1); opacity: .5;
}
.cdx-cell.got { filter: none; opacity: 1; border-color: rgba(52,211,153,.45); background: rgba(52,211,153,.1); }
.cdx-cell.got:hover { transform: translateY(-1px); border-color: rgba(52,211,153,.85); }
.cdx-detail {
    margin-top: 14px; padding: 12px 14px; min-height: 72px; border-radius: 13px; font-size: 12.5px; color: #b9cbe8;
    background: rgba(255,255,255,.04); border: 1px solid var(--line);
}
.cdx-dtitle { margin-bottom: 8px; font-size: 14px; font-weight: 900; color: var(--txt); }
.cdx-dtitle span { margin-left: 6px; font-size: 11px; font-weight: 600; color: var(--txt-dim); }
.cdx-block { margin-top: 8px; }
.cdx-block b { font-size: 12px; color: var(--cyan); }
.cdx-block ul { margin-top: 4px; }
.cdx-block ul li { position: relative; padding-left: 14px; margin-bottom: 3px; }
.cdx-block ul li::before { content: '⚠'; position: absolute; left: 0; font-size: 10px; color: var(--rose); }
.cdx-tmpl { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11.5px; }
.cdx-locked { color: var(--txt-dim); }

@media (max-width: 760px) {
    .mode-grid { grid-template-columns: 1fr; }
    .gc-mask .modal-wrap { max-width: 96vw; }
    .mock-bar { grid-template-columns: 80px 1fr 40px; }
    .hud-stats .stat.hide-sm { display: none; }
    .q-items { gap: 4px; }
    .q-item { padding: 3px 7px; font-size: 12px; }
}

/* hidden 属性要能压住 .q-timer 的 display:inline-flex */
.q-timer[hidden] { display: none !important; }

/* 玩家资产条（经验条下方一行：境界 + 灵石） */
.hud-wallet { display: flex; gap: 12px; margin-top: 4px; font-size: 11px; font-weight: 800; color: var(--txt-dim); }
.hud-wallet #hudRank { color: var(--cyan); }
.hud-wallet #hudCoins { color: var(--gold); }

/* 玩法中心要能盖在战斗界面上（行囊里的「+」直接开商店） */
.gc-mask { z-index: 200; }

/* 「玩法」按钮上的红点：今天还没打卡 */
.btn-game { position: relative; }
.btn-game.need-daily::after {
    content: ''; position: absolute; top: -3px; right: -3px; width: 9px; height: 9px;
    border-radius: 50%; background: #fb7185; box-shadow: 0 0 9px #fb7185;
    animation: dotPulse 1.6s ease-in-out infinite;
}
@keyframes dotPulse { 50% { transform: scale(1.35); opacity: .55; } }

/* ============================================================
   3D 星系（深空版）
   ============================================================ */
.galaxy-scroll {
    position: relative;
    height: calc(100vh - 152px);
    min-height: 460px;
    overflow: hidden;
}
.galaxy-stage {
    position: relative; width: 100%; height: 100%;
    cursor: grab; overflow: hidden;
    border-radius: 0 0 18px 18px;
}
.galaxy-stage:active { cursor: grabbing; }
/* 兜底底色：WebGL 正常时整片星空由 three.js 画在这层上面 */
.galaxy-sky {
    position: absolute; inset: 0;
    background:
        radial-gradient(900px 520px at 18% 12%, rgba(70, 90, 190, 0.22), rgba(70, 90, 190, 0) 62%),
        radial-gradient(900px 520px at 86% 88%, rgba(150, 70, 170, 0.18), rgba(150, 70, 170, 0) 62%),
        linear-gradient(180deg, #02030a 0%, #060919 50%, #02030a 100%);
}
.galaxy-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.galaxy-labels { position: absolute; inset: 0; pointer-events: none; }
.gp-label {
    position: absolute; left: 0; top: 0;
    display: flex; align-items: center; gap: 5px;
    padding: 3px 9px; border-radius: 999px;
    background: rgba(10, 16, 36, 0.72);
    border: 1px solid rgba(150, 185, 255, 0.22);
    color: #e6eeff; font-size: 11px; font-weight: 800;
    white-space: nowrap; pointer-events: auto; cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    transition: background 0.15s, box-shadow 0.15s, color 0.15s, border-color 0.15s;
    will-change: transform;
}
.gp-label .gp-dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; box-shadow: 0 0 6px currentColor; }
.gp-label .gp-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
.gp-label i { font-style: normal; font-size: 10px; }
.gp-label.done { background: rgba(8, 40, 32, 0.78); border-color: rgba(110, 231, 183, 0.5); color: #d1fae5; }
.gp-label.active { background: rgba(255, 255, 255, 0.94); border-color: #fff; color: #1b2440; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.18), 0 8px 22px rgba(0, 0, 0, 0.5); }
.gp-label.hot, .gp-label:hover {
    background: rgba(34, 46, 86, 0.94); border-color: #ffd166; color: #fff;
    box-shadow: 0 0 0 1px rgba(255, 209, 102, 0.35), 0 8px 22px rgba(255, 176, 34, 0.35);
}
.gp-label.hidden { display: none; }

.galaxy-hint {
    position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
    max-width: min(92%, 900px); text-align: center; line-height: 1.5;
    padding: 7px 16px; border-radius: 999px;
    background: rgba(10, 16, 36, 0.7); border: 1px solid rgba(150, 185, 255, 0.2);
    color: #c9d8f5; font-size: 11.5px; font-weight: 700;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
    pointer-events: none; backdrop-filter: blur(6px);
}
.galaxy-loading {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    color: #cfe0ff; font-size: 14px; font-weight: 800; letter-spacing: 1px;
    background: rgba(3, 5, 14, 0.72);
}
.galaxy-loading[hidden] { display: none; }

/* WebGL 不可用时的兜底网格 */
.galaxy-fallback { position: absolute; inset: 0; overflow: auto; padding: 18px 20px 40px; }
.galaxy-fallback[hidden] { display: none; }
.gf-group { margin-bottom: 16px; }
.gf-title { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 900; color: #e6eeff; margin-bottom: 8px; }
.gf-title i { width: 9px; height: 9px; border-radius: 50%; }
.gf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 9px; }
.gf-card {
    display: flex; align-items: center; gap: 8px; padding: 9px 11px; border-radius: 12px;
    background: rgba(14, 22, 46, 0.82); border: 1px solid rgba(150, 185, 255, 0.2);
    color: #e6eeff; font-size: 12px; font-weight: 700; text-align: left;
}
.gf-card:hover { background: rgba(34, 46, 86, 0.94); border-color: #ffd166; }
.gf-icon { font-size: 16px; }
.gf-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gf-meta { color: #9fb3d9; font-size: 10.5px; }

/* 「继续学习」主按钮 */
.btn-study {
    background: linear-gradient(135deg, #f4796f, #f7a072 60%, #f2c45a);
    border: none; color: #3b2116; font-weight: 900;
    box-shadow: 0 7px 20px rgba(244, 121, 111, 0.35);
}
.btn-study:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(244, 121, 111, 0.45); }

/* ============================================================
   学习引导：讲义分步 / 学习路线 / 新手引导
   ============================================================ */
.study-mask .modal-wrap, .path-mask .modal-wrap { max-width: 760px; }
.study-card { padding: 20px 22px 18px; }
.st-head { display: flex; gap: 14px; align-items: center; }
.st-icon {
    width: 54px; height: 54px; flex: 0 0 auto; border-radius: 16px; font-size: 26px;
    display: flex; align-items: center; justify-content: center;
    background: color-mix(in srgb, var(--mc, #f7a072) 22%, transparent);
    border: 1px solid color-mix(in srgb, var(--mc, #f7a072) 55%, transparent);
}
.st-titlebox { min-width: 0; }
.st-name { font-size: 19px; font-weight: 900; }
.st-sub { font-size: 11.5px; color: var(--txt-dim); }
.st-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 10px; }
.st-badge {
    padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 800;
    background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); color: var(--txt-dim);
}
.st-badge.real { color: #ffd9c0; border-color: rgba(247, 160, 114, 0.55); background: rgba(247, 160, 114, 0.16); }
.st-badge.no { color: #b9cbe8; }
.st-badge.must { color: #ffe8bd; border-color: rgba(242, 196, 90, 0.6); background: rgba(242, 196, 90, 0.16); }
.st-badge.roi { color: #ffd166; letter-spacing: 1px; }
.st-badge.cost { color: #cfe4ff; }
.st-badge.ok { color: #c9f8e5; border-color: rgba(90, 200, 150, 0.5); background: rgba(90, 200, 150, 0.14); }
.st-tabs { display: flex; flex-wrap: wrap; gap: 7px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.st-tab {
    padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 700;
    color: var(--txt-dim); background: rgba(255, 255, 255, 0.05); border: 1px solid transparent;
}
.st-tab.active { color: var(--txt); background: rgba(247, 160, 114, 0.18); border-color: rgba(247, 160, 114, 0.5); }
.st-tab.done { color: #c9f8e5; }
.st-body { min-height: 220px; padding: 14px 2px 6px; }
.st-h { font-size: 13px; font-weight: 900; color: var(--cyan); margin-bottom: 9px; }
.st-text { font-size: 13.5px; color: #cfe0f7; line-height: 1.75; }
.st-quote {
    margin-top: 14px; padding: 12px 14px; border-radius: 12px; font-size: 13px; line-height: 1.7;
    color: #ffe8d6; background: rgba(247, 160, 114, 0.1); border-left: 3px solid rgba(247, 160, 114, 0.7);
}
.st-point {
    display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; margin-bottom: 8px;
    border-radius: 12px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line);
    font-size: 13.5px; line-height: 1.65; color: #e6efff;
}
.st-point b {
    flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; font-size: 12px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #f7a072, #f2c45a); color: #3b2116;
}
.st-end { margin-top: 12px; font-size: 12px; color: var(--txt-dim); }
.st-read { margin-left: 8px; padding: 4px 10px; border-radius: 8px; font-size: 11.5px; font-weight: 800; background: rgba(52, 211, 153, 0.16); border: 1px solid rgba(52, 211, 153, 0.45); color: #c9f8e5; }
.st-tmpl {
    padding: 12px 14px; border-radius: 12px; font-size: 12.5px; line-height: 1.85; white-space: pre-wrap;
    background: rgba(169, 155, 232, 0.12); border-left: 3px solid rgba(169, 155, 232, 0.7); color: #e9e4ff;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.st-demo-stem { font-size: 14px; line-height: 1.8; color: #eef4ff; }
.st-demo-opts { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; }
.sd-opt { display: flex; gap: 8px; padding: 8px 11px; border-radius: 10px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); font-size: 12.5px; }
.sd-opt b { color: var(--cyan); }
.st-demo-actions { display: flex; gap: 8px; margin-top: 10px; }
.st-hint { margin-top: 10px; padding: 10px 12px; border-radius: 10px; font-size: 12.5px; background: rgba(242, 196, 90, 0.12); border-left: 3px solid var(--gold); color: #ffe8bd; }
.st-hint b { display: block; margin-bottom: 3px; font-size: 11.5px; color: var(--gold); }
.st-demo-ans { margin-top: 12px; }
.st-ans { font-size: 13px; font-weight: 800; color: #c9f8e5; margin-bottom: 8px; }
.st-analysis { font-size: 12.5px; line-height: 1.8; color: #d6e4ff; padding: 10px 12px; border-radius: 10px; background: rgba(56, 189, 248, 0.07); }
.st-trap { display: flex; gap: 9px; padding: 9px 11px; margin-bottom: 7px; border-radius: 10px; background: rgba(251, 113, 133, 0.09); border-left: 3px solid rgba(251, 113, 133, 0.6); font-size: 12.5px; line-height: 1.6; color: #ffd9df; }
.st-trap i { font-style: normal; }
.st-foot { display: flex; align-items: center; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.st-count { flex: 1; text-align: center; font-size: 11.5px; color: var(--txt-dim); }
.st-foot .btn[disabled] { opacity: 0.35; pointer-events: none; }

/* 学习路线 */
.path-card { padding: 20px 22px 18px; }
.path-title { font-size: 20px; font-weight: 900; }
.path-sub { font-size: 12px; color: var(--txt-dim); margin-top: 4px; }
.path-sub b { color: var(--txt); }
.path-stage {
    margin-top: 12px; padding: 13px 14px; border-radius: 15px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--sc) 12%, transparent), rgba(255, 255, 255, 0.02));
    border: 1px solid color-mix(in srgb, var(--sc) 34%, transparent);
}
.path-stage.current { box-shadow: 0 0 0 2px color-mix(in srgb, var(--sc) 55%, transparent); }
.path-stage.done { opacity: 0.82; }
.ps-head { display: flex; align-items: center; gap: 11px; }
.ps-icon { font-size: 24px; }
.ps-main { flex: 1; min-width: 0; }
.ps-name { font-size: 14px; font-weight: 900; }
.ps-days { margin-left: 8px; font-size: 11px; font-weight: 600; color: var(--txt-dim); }
.ps-goal { font-size: 11.5px; color: var(--txt-dim); line-height: 1.5; }
.ps-progress { text-align: right; font-size: 11px; color: var(--txt-dim); }
.ps-progress b { font-size: 18px; color: var(--txt); }
.ps-meta { display: flex; gap: 12px; flex-wrap: wrap; margin: 8px 0 6px; font-size: 11px; color: var(--txt-dim); }
.ps-done { color: #c9f8e5; }
.ps-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pchip {
    padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700;
    background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); color: var(--txt-dim);
    max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pchip.real { color: #ffe8d6; border-color: rgba(247, 160, 114, 0.4); }
.pchip.must { border-color: rgba(242, 196, 90, 0.55); }
.pchip.learned { background: rgba(90, 200, 150, 0.16); border-color: rgba(90, 200, 150, 0.45); color: #c9f8e5; }
.pchip.cleared { background: rgba(242, 196, 90, 0.18); border-color: rgba(242, 196, 90, 0.6); color: #ffe8bd; }
.ps-foot { margin-top: 9px; }

/* 新手引导 */
.welcome-mask { z-index: 220; }
.welcome-card { max-width: 560px; margin: 0 auto; text-align: center; padding: 26px 26px 22px; }
.wc-icon { font-size: 44px; line-height: 1; }
.wc-title { margin-top: 8px; font-size: 22px; font-weight: 900; }
.wc-sub { margin-top: 6px; font-size: 12.5px; color: var(--txt-dim); line-height: 1.7; }
.wc-steps { margin: 16px 0 12px; text-align: left; display: flex; flex-direction: column; gap: 10px; }
.wc-step { display: flex; gap: 11px; align-items: flex-start; }
.wc-step b {
    flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%; font-size: 12px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #f7a072, #f2c45a); color: #3b2116;
}
.wc-step span { font-size: 12.5px; line-height: 1.65; color: #d6e4ff; }
.wc-step i { display: block; font-style: normal; font-weight: 900; color: var(--txt); margin-bottom: 2px; }
.wc-note { font-size: 12px; color: var(--txt-dim); margin-bottom: 14px; }
.wc-note b { color: var(--gold); }
.wc-foot { display: flex; gap: 9px; justify-content: center; flex-wrap: wrap; }

/* 星球简报里的学习引导条 */
.nd-guide { margin-top: 12px; }
.nd-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.g-badge {
    padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 800;
    background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); color: var(--txt-dim);
}
.g-badge.real { color: #ffd9c0; border-color: rgba(247, 160, 114, 0.55); background: rgba(247, 160, 114, 0.16); }
.g-badge.must { color: #ffe8bd; border-color: rgba(242, 196, 90, 0.6); background: rgba(242, 196, 90, 0.16); }
.g-badge.roi { color: #ffd166; letter-spacing: 1px; }
.g-badge.ok { color: #c9f8e5; border-color: rgba(90, 200, 150, 0.5); }
.nd-years { margin-top: 6px; font-size: 11.5px; color: var(--txt-dim); }
.nd-advice {
    margin-top: 9px; padding: 9px 12px; border-radius: 10px; font-size: 12px; line-height: 1.6;
    color: #ffe8d6; background: rgba(247, 160, 114, 0.1); border-left: 3px solid rgba(247, 160, 114, 0.7);
}
.nd-lock { margin-top: 10px; font-size: 12px; color: #ffd9df; }
.nd-actions { display: flex; gap: 10px; margin-top: 14px; }
.nd-actions .btn { flex: 1; padding: 12px; font-size: 14px; }
.nd-actions .btn[disabled] { opacity: 0.4; pointer-events: none; }
.tip-roi { color: #ffd166; letter-spacing: 1px; }
.tip-years { color: #b9cbe8; font-size: 11px; }

@media (max-width: 860px) {
    .galaxy-scroll { height: calc(100vh - 210px); }
    .gp-label .gp-name { max-width: 92px; }
    .nd-actions { flex-direction: column; }
    .study-card, .path-card { padding: 16px; }
}

/* 层级：天空在最底，画布在其上，标签最上（否则天空渐变会盖住 three.js 画布） */
.galaxy-sky { z-index: 0; }
.galaxy-canvas { z-index: 1; }
.galaxy-labels { z-index: 2; }
.galaxy-hint, .galaxy-loading { z-index: 3; }
.galaxy-fallback { z-index: 4; }

/* ---- 温暖卡通：顶栏与图例改成奶油色玻璃 ---- */
.hud {
    background: linear-gradient(180deg, rgba(255, 249, 240, 0.96), rgba(255, 237, 222, 0.94)) !important;
    border-bottom: 1px solid rgba(150, 110, 80, 0.18) !important;
    box-shadow: 0 8px 30px rgba(160, 110, 80, 0.12) !important;
    backdrop-filter: blur(10px);
}
.hud, .hud .hud-xp-top span, .hud-stats .stat span { color: #8a6a53 !important; }
.hud .hud-stats .stat b, .hud .hud-xp-top b { color: #4a3527 !important; }
.hud .hud-stats .stat.warn b { color: #d9695f !important; }
.hud .avatar { background: rgba(255, 255, 255, 0.75) !important; border-color: rgba(150, 110, 80, 0.25) !important; }
.hud .xp-bar { background: rgba(150, 110, 80, 0.14) !important; }
.hud .hud-wallet { color: #8a6a53; }
.hud .hud-wallet #hudRank { color: #c2793c !important; }
.hud .hud-wallet #hudCoins { color: #c9962a !important; }
.hud .btn-ghost {
    background: rgba(255, 255, 255, 0.7) !important;
    border-color: rgba(150, 110, 80, 0.22) !important;
    color: #5b4436 !important;
}
.hud .btn-ghost:hover { background: #fff3df !important; }
.hud .dragonballs { filter: saturate(0.9); }
.hud .dball { background: rgba(255, 255, 255, 0.7) !important; border-color: rgba(150, 110, 80, 0.2) !important; }
.legend {
    background: rgba(255, 250, 242, 0.78) !important;
    border-bottom: 1px solid rgba(150, 110, 80, 0.14) !important;
    color: #7a6350 !important;
    backdrop-filter: blur(8px);
}
.legend .legend-title { color: #5b4436 !important; }
.legend .lg-item { color: #7a6350 !important; }
.legend-group.hint span { color: #8a6a53 !important; }
.hud .btn-game { box-shadow: 0 6px 18px rgba(230, 165, 46, 0.35) !important; }

/* ============================================================
   温暖卡通：学习/路线/新手引导/玩法中心这几个弹窗改成奶油色
   （战斗界面保持深色，突出「打怪」的紧张感）
   ============================================================ */
.study-mask .modal-card,
.path-mask .modal-card,
.welcome-mask .modal-card,
.gc-mask .modal-card {
    --txt: #4a3527;
    --txt-dim: #8b7561;
    --line: rgba(150, 110, 80, 0.18);
    --cyan: #b5651d;
    --purple: #8b6bb5;
    --gold: #c9962a;
    --rose: #c2564f;
    background: linear-gradient(180deg, #fffdf8, #fff6e9);
    border: 1px solid rgba(150, 110, 80, 0.22);
    color: #4a3527;
    box-shadow: 0 26px 60px rgba(140, 95, 65, 0.22);
}
.study-mask .modal-close,
.path-mask .modal-close,
.welcome-mask .modal-close,
.gc-mask .modal-close {
    background: #fff6e9; border-color: rgba(150, 110, 80, 0.22); color: #6b503c;
}
.study-mask .btn, .path-mask .btn, .welcome-mask .btn, .gc-mask .btn {
    background: #fffdf8; border-color: rgba(150, 110, 80, 0.24); color: #5b4436;
}
.study-mask .btn:hover, .path-mask .btn:hover, .welcome-mask .btn:hover, .gc-mask .btn:hover {
    background: #fff3df; border-color: rgba(191, 138, 62, 0.5);
}
.study-mask .btn-primary, .path-mask .btn-primary, .welcome-mask .btn-primary, .gc-mask .btn-primary {
    background: linear-gradient(135deg, #f4796f, #f7a072 60%, #f2c45a);
    border-color: transparent; color: #3b2116;
    box-shadow: 0 6px 16px rgba(244, 121, 111, 0.3);
}
.study-mask .st-tab { background: rgba(180, 140, 100, 0.08); color: #8b7561; }
.study-mask .st-tab.active { background: rgba(244, 121, 111, 0.16); border-color: rgba(244, 121, 111, 0.5); color: #8a3c33; }
.study-mask .st-text, .study-mask .st-demo-stem { color: #5b4436; }
.study-mask .st-quote { color: #8a5a2b; background: rgba(247, 160, 114, 0.16); border-left-color: #f0a06a; }
.study-mask .st-point { background: #fffdf8; border-color: rgba(150, 110, 80, 0.16); color: #4a3527; }
.study-mask .st-tmpl { color: #4a3527; background: rgba(139, 107, 181, 0.1); border-left-color: #b49ae0; }
.study-mask .st-hint { color: #7a5320; background: rgba(242, 196, 90, 0.18); border-left-color: #e0a53a; }
.study-mask .st-analysis { color: #4a3527; background: rgba(80, 160, 200, 0.08); }
.study-mask .sd-opt { background: #fffdf8; border-color: rgba(150, 110, 80, 0.16); }
.study-mask .st-trap { color: #8c3f3a; background: rgba(225, 120, 110, 0.12); border-left-color: #d98078; }
.study-mask .st-ans { color: #2f7d5a; }
.study-mask .st-badge { background: #fffdf8; color: #8b7561; border-color: rgba(150, 110, 80, 0.18); }
.study-mask .st-badge.real { color: #a8532a; border-color: rgba(224, 130, 80, 0.55); background: rgba(247, 160, 114, 0.16); }
.study-mask .st-badge.must { color: #8a6412; border-color: rgba(224, 170, 60, 0.6); background: rgba(242, 196, 90, 0.2); }
.study-mask .st-badge.roi { color: #b07d0a; }
.study-mask .st-badge.ok { color: #2f7d5a; border-color: rgba(90, 180, 130, 0.5); background: rgba(90, 200, 150, 0.14); }
.study-mask .st-read { color: #2f7d5a; background: rgba(90, 200, 150, 0.16); border-color: rgba(90, 180, 130, 0.5); }
.study-mask .st-icon { background: color-mix(in srgb, var(--mc, #f7a072) 18%, #fffdf8); }
.study-mask .st-h, .path-mask .st-h { color: #b5651d; }

.path-mask .path-sub b { color: #4a3527; }
.path-mask .path-stage { background: linear-gradient(135deg, color-mix(in srgb, var(--sc) 16%, #fffdf8), #fffaf0); }
.path-mask .ps-goal, .path-mask .ps-days, .path-mask .ps-meta, .path-mask .ps-progress { color: #8b7561; }
.path-mask .ps-progress b { color: #4a3527; }
.path-mask .pchip { background: #fffdf8; color: #8b7561; border-color: rgba(150, 110, 80, 0.18); }
.path-mask .pchip.real { color: #a8532a; border-color: rgba(224, 130, 80, 0.45); }
.path-mask .pchip.must { border-color: rgba(224, 170, 60, 0.6); }
.path-mask .pchip.learned { background: rgba(90, 200, 150, 0.18); border-color: rgba(90, 180, 130, 0.5); color: #2f7d5a; }
.path-mask .pchip.cleared { background: rgba(242, 196, 90, 0.22); border-color: rgba(224, 170, 60, 0.6); color: #8a6412; }

.welcome-mask .wc-sub, .welcome-mask .wc-note { color: #8b7561; }
.welcome-mask .wc-step span { color: #5b4436; }
.welcome-mask .wc-step i { color: #4a3527; }
.welcome-mask .wc-note b { color: #b07d0a; }

.gc-mask .gc-sub, .gc-mask .gc-tip, .gc-mask .rank-pep, .gc-mask .mc-desc,
.gc-mask .shop-hint, .gc-mask .si-desc, .gc-mask .codex-head, .gc-mask .ds-head { color: #8b7561; }
.gc-mask .gc-tab { background: rgba(180, 140, 100, 0.08); color: #8b7561; }
.gc-mask .gc-tab.active { background: rgba(244, 121, 111, 0.16); border-color: rgba(244, 121, 111, 0.5); color: #8a3c33; }
.gc-mask .rank-box { background: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(255, 246, 233, 0.6)); }
.gc-mask .rank-mini, .gc-mask .rank-foot { color: #8b7561; }
.gc-mask .rank-mini b, .gc-mask .rank-name { color: #4a3527; }
.gc-mask .mode-card { background: linear-gradient(160deg, color-mix(in srgb, var(--mc) 18%, #fffdf8), #fffaf0); }
.gc-mask .shop-item, .gc-mask .cdx-detail { background: #fffdf8; border-color: rgba(150, 110, 80, 0.18); }
.gc-mask .si-name, .gc-mask .mc-name { color: #4a3527; }
.gc-mask .cdx-cell { background: #fffdf8; border-color: rgba(150, 110, 80, 0.18); }
.gc-mask .cdx-dtitle { color: #4a3527; }
.gc-mask .cdx-block b { color: #b5651d; }
.gc-mask .cdx-block ul li::before { color: #c2564f; }
.gc-mask .daily-strip { background: rgba(80, 160, 200, 0.08); border-color: rgba(80, 160, 200, 0.22); }
.gc-mask .ds-day { background: #fffdf8; color: #b3a08c; }

/* body.dz（热血模式）会把所有弹窗刷成深色，这里把这几个学习向弹窗抢回奶油色 */
body.dz .study-mask .modal-card,
body.dz .path-mask .modal-card,
body.dz .welcome-mask .modal-card,
body.dz .gc-mask .modal-card {
    background: linear-gradient(180deg, #fffdf8, #fff6e9) !important;
    border: 1px solid rgba(150, 110, 80, 0.22) !important;
    color: #4a3527 !important;
    box-shadow: 0 26px 60px rgba(140, 95, 65, 0.22) !important;
}
body.dz .study-mask .btn,
body.dz .path-mask .btn,
body.dz .welcome-mask .btn,
body.dz .gc-mask .btn {
    background: #fffdf8 !important; color: #5b4436 !important; border-color: rgba(150, 110, 80, 0.24) !important;
}
body.dz .study-mask .btn-primary,
body.dz .path-mask .btn-primary,
body.dz .welcome-mask .btn-primary,
body.dz .gc-mask .btn-primary {
    background: linear-gradient(135deg, #f4796f, #f7a072 60%, #f2c45a) !important;
    color: #3b2116 !important; border-color: transparent !important;
}
body.dz .study-mask .st-tab,
body.dz .gc-mask .gc-tab {
    background: rgba(180, 140, 100, 0.1) !important; color: #8b7561 !important;
}
body.dz .study-mask .st-tab.active,
body.dz .gc-mask .gc-tab.active {
    background: rgba(244, 121, 111, 0.18) !important; border-color: rgba(244, 121, 111, 0.5) !important; color: #8a3c33 !important;
}
body.dz .study-mask .st-text,
body.dz .study-mask .st-demo-stem,
body.dz .study-mask .st-point,
body.dz .welcome-mask .wc-step span { color: #4a3527 !important; }
body.dz .study-mask .st-point,
body.dz .study-mask .sd-opt,
body.dz .path-mask .pchip,
body.dz .gc-mask .shop-item,
body.dz .gc-mask .cdx-detail,
body.dz .gc-mask .cdx-cell { background: #fffdf8 !important; border-color: rgba(150, 110, 80, 0.18) !important; color: #5b4436 !important; }
body.dz .path-mask .ps-goal,
body.dz .path-mask .ps-meta,
body.dz .path-mask .path-sub,
body.dz .gc-mask .gc-sub,
body.dz .gc-mask .gc-tip,
body.dz .gc-mask .mc-desc,
body.dz .gc-mask .si-desc,
body.dz .gc-mask .rank-mini,
body.dz .gc-mask .rank-foot,
body.dz .gc-mask .codex-head { color: #8b7561 !important; }
body.dz .gc-mask .rank-name,
body.dz .gc-mask .si-name,
body.dz .gc-mask .mc-name,
body.dz .gc-mask .ps-progress b { color: #4a3527 !important; }
body.dz .gc-mask .rank-box { background: linear-gradient(135deg, #fffdf8, #fff4e4) !important; }
body.dz .gc-mask .mode-card { background: linear-gradient(160deg, color-mix(in srgb, var(--mc) 20%, #fffdf8), #fffaf0) !important; }

/* 窗口不够宽时先收起龙珠，保证「继续学习 / 玩法」这两个主按钮不换行 */
@media (max-width: 1560px) {
    .hud .dragonballs { display: none; }
}

/* ---- 驾驶模式：切换按钮、准星、光标 ---- */
.galaxy-mode {
    position: absolute; right: 16px; bottom: 14px; z-index: 5;
    padding: 8px 16px; border-radius: 999px; cursor: pointer;
    background: rgba(10, 16, 36, 0.78); border: 1px solid rgba(150, 185, 255, 0.28);
    color: #e6eeff; font-size: 12.5px; font-weight: 900;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
    transition: all 0.18s;
}
.galaxy-mode:hover { background: rgba(30, 42, 80, 0.92); transform: translateY(-1px); }
.galaxy-mode.on {
    background: linear-gradient(135deg, #ff7a45, #ffb022 60%, #ffe27a);
    color: #2a1204; border-color: transparent;
    box-shadow: 0 8px 24px rgba(255, 150, 40, 0.45);
}
.galaxy-stage.piloting { cursor: crosshair; }
.galaxy-stage.piloting::after {
    content: '';
    position: absolute; left: 50%; top: 46%; width: 26px; height: 26px;
    margin: -13px 0 0 -13px; border-radius: 50%;
    border: 1.5px solid rgba(200, 225, 255, 0.55);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35) inset, 0 0 12px rgba(120, 180, 255, 0.35);
    pointer-events: none; z-index: 4;
}
.galaxy-stage.piloting .galaxy-hint {
    background: rgba(16, 22, 46, 0.84);
    color: #e6eeff;
}

/* ---- 驾驶：屏幕方向盘（左下） ---- */
.flight-wheel {
    position: absolute; left: 18px; bottom: 16px; z-index: 5;
    width: 132px; height: 132px; border-radius: 50%;
    display: none; align-items: center; justify-content: center;
    background:
        radial-gradient(circle at 50% 38%, rgba(40, 54, 98, 0.92), rgba(12, 18, 40, 0.9) 62%, rgba(6, 9, 22, 0.94));
    border: 1px solid rgba(150, 185, 255, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55), inset 0 0 0 10px rgba(120, 160, 255, 0.07);
    touch-action: none; user-select: none; cursor: grab;
}
.galaxy-stage.piloting .flight-wheel { display: flex; }
.flight-wheel:active { cursor: grabbing; }
.fw-knob {
    position: absolute; left: 50%; top: 50%;
    width: 46px; height: 46px; margin: 0; border-radius: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle at 40% 34%, #fff, #9fd0ff 55%, #4f8fe8);
    border: 1px solid rgba(190, 220, 255, 0.5);
    box-shadow: 0 0 18px rgba(90, 160, 255, 0.65), inset 0 -3px 6px rgba(20, 50, 120, 0.35);
    pointer-events: none; transition: transform 0.05s linear;
}
.fw-knob::after {
    content: ''; position: absolute; left: 50%; top: 50%; width: 8px; height: 8px;
    margin: -4px 0 0 -4px; border-radius: 50%; background: rgba(20, 40, 90, 0.45);
}
.fw-dir {
    position: absolute; font-size: 10.5px; font-weight: 900; color: #9fb7e6;
    letter-spacing: 0.5px;
}
.fw-up { top: 7px; left: 50%; transform: translateX(-50%); }
.fw-down { bottom: 7px; left: 50%; transform: translateX(-50%); }
.fw-left { left: 8px; top: 50%; transform: translateY(-50%); }
.fw-right { right: 8px; top: 50%; transform: translateY(-50%); }
@media (max-width: 860px) {
    .flight-wheel { width: 108px; height: 108px; left: 12px; bottom: 12px; }
}

/* ---- 让星系铺满「HUD + 图例」之外的全部高度（避免方向盘/提示被挤出视口） ---- */
html, body { height: 100%; }
body {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}
.hud, .legend { flex: 0 0 auto; }
.galaxy-scroll {
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
}

/* ---- 讲义「必背」：每条标题下面带展开讲解与考场提示 ---- */
.st-tip {
    margin-bottom: 10px; padding: 9px 12px; border-radius: 10px;
    font-size: 12px; line-height: 1.6; color: #8a6a45;
    background: rgba(242, 196, 90, 0.14);
    border-left: 3px solid #e8b45a;
}
.st-point.rich { align-items: flex-start; padding: 12px 14px; }
.st-point.rich > b { margin-top: 1px; }
.sp-main { flex: 1; min-width: 0; }
.sp-t { font-size: 13.5px; font-weight: 900; color: #4a3527; line-height: 1.45; }
.sp-d {
    margin-top: 5px; font-size: 12.8px; line-height: 1.75; color: #5b4436;
}
.sp-q {
    margin-top: 6px; padding: 6px 9px; border-radius: 8px; font-size: 12px; line-height: 1.6;
    color: #7a5320; background: rgba(224, 170, 60, 0.12);
}
.sp-q i {
    font-style: normal; font-weight: 900; margin-right: 5px; color: #b07d0a;
    font-size: 11px; letter-spacing: 0.5px;
}
body.dz .study-mask .st-tip { background: rgba(242, 196, 90, 0.18) !important; color: #7a5320 !important; }
body.dz .study-mask .sp-t { color: #4a3527 !important; }
body.dz .study-mask .sp-d { color: #5b4436 !important; }
body.dz .study-mask .sp-q { background: rgba(224, 170, 60, 0.14) !important; color: #7a5320 !important; }

.st-blind {
    float: right; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 800;
    background: rgba(255, 255, 255, 0.7); border: 1px solid rgba(150, 110, 80, 0.22);
    color: #8a6a45; cursor: pointer;
}
.st-blind:hover { background: #fff3df; }
.st-points.blind .sp-d, .st-points.blind .sp-q { display: none; }
.st-points.blind .sp-t { color: #8a6a45; }
body.dz .study-mask .st-blind { background: #fffdf8 !important; color: #8a6a45 !important; }

.st-steps { display: flex; flex-direction: column; gap: 8px; }
.st-step {
    display: flex; gap: 10px; align-items: flex-start;
    padding: 10px 12px; border-radius: 12px;
    background: rgba(169, 155, 232, 0.1); border-left: 3px solid rgba(169, 155, 232, 0.65);
    font-size: 13px; line-height: 1.7; color: #4a3527;
}
.st-step b {
    flex: 0 0 auto; width: 20px; height: 20px; border-radius: 50%; font-size: 11px;
    display: flex; align-items: center; justify-content: center;
    background: #e9e2ff; color: #5b4a8a; border: 1px solid rgba(139, 107, 181, 0.35);
}
.st-step span { flex: 1; min-width: 0; }
body.dz .study-mask .st-step { background: rgba(139, 107, 181, 0.12) !important; color: #4a3527 !important; }

/* 讲义底部按钮：长内容时吸底，不用滚到底才能「下一步」 */
.study-card .st-foot {
    position: sticky; bottom: -18px; z-index: 2;
    margin: 0 -22px -18px; padding: 12px 22px 18px;
    background: linear-gradient(180deg, rgba(255, 250, 241, 0), #fff8ec 38%, #fff8ec);
    border-top: 1px solid rgba(150, 110, 80, 0.14);
}
body.dz .study-mask .st-foot {
    background: linear-gradient(180deg, rgba(255, 250, 241, 0), #fff8ec 38%, #fff8ec) !important;
}


