:root {
  --bg: #0a0f1d; --bg2: #111830; --panel: rgba(14, 20, 38, .94); --panel2: #18213d; --line: rgba(255,255,255,.09);
  --text: #e7ecf6; --muted: #8e9ab4; --accent: #4cc9f0; --accent2: #4361ee; --ok: #06d6a0; --bad: #ef476f; --warn: #f8b84e;
  --grid: rgba(255,255,255,.08); --radius: 10px;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif; color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-size: 14px; }
body { overflow-x: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
input, select, textarea { background: #0d1428; border: 1px solid var(--line); border-radius: 7px; padding: 6px 9px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
textarea { width: 100%; resize: vertical; }
input[type=range] { padding: 0; accent-color: var(--accent); }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); }
h1, h2, h3, h4, h5 { margin: .4em 0; }
h5 { font-size: 13px; color: var(--muted); }
.hidden { display: none !important; }
.ok { color: var(--ok); } .bad { color: var(--bad); } .muted { color: var(--muted); }
.tip { color: var(--muted); font-size: 12px; line-height: 1.6; }
.center { min-height: 100vh; display: grid; place-content: center; text-align: center; gap: 12px; }
.spinner { width: 38px; height: 38px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }

.btn { border: 1px solid var(--line); background: #1c2647; padding: 7px 14px; border-radius: 8px; cursor: pointer; transition: .15s; white-space: nowrap; }
.btn:hover { background: #26325c; }
.btn.primary { background: linear-gradient(135deg, var(--accent2), #3a86ff); border-color: transparent; color: #fff; font-weight: 600; }
.btn.primary:hover { filter: brightness(1.1); }
.btn.ghost { background: transparent; }
.btn.danger { background: rgba(239,71,111,.15); border-color: rgba(239,71,111,.4); color: #ff8fa8; }
.btn.sm { padding: 4px 10px; font-size: 12px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.pill { display: inline-block; padding: 1px 8px; border-radius: 99px; background: rgba(76,201,240,.15); color: var(--accent); font-size: 12px; margin-right: 4px; }
.pill.ghost { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.notice { padding: 8px 12px; border-radius: 8px; background: rgba(248,184,78,.12); color: var(--warn); margin: 8px 0; font-size: 13px; }
.notice.bad { background: rgba(239,71,111,.12); color: #ff8fa8; }

/* toast & modal */
#toasts { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); z-index: 1000; display: grid; gap: 6px; pointer-events: none; }
.toast { padding: 9px 16px; border-radius: 8px; background: #1d2850; border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(0,0,0,.4); transition: .4s; max-width: 70vw; }
.toast.ok { border-color: rgba(6,214,160,.5); } .toast.warn { border-color: rgba(248,184,78,.6); } .toast.bad { border-color: rgba(239,71,111,.6); }
.toast.out { opacity: 0; transform: translateY(-8px); }
.modal-mask { position: fixed; inset: 0; background: rgba(4,8,18,.7); backdrop-filter: blur(3px); display: grid; place-items: center; z-index: 900; padding: 16px; }
.modal { position: relative; background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; width: min(520px, 100%); max-height: 88vh; overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.modal.wide { width: min(980px, 100%); }
.modal-x { position: absolute; right: 12px; top: 8px; background: none; border: 0; font-size: 22px; cursor: pointer; color: var(--muted); }
.opt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.alarm h3 { color: var(--bad); }
.alarm { animation: shake .5s; }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }

/* login */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.3fr 1fr; align-items: center; gap: 40px; padding: 6vh 6vw;
  background: radial-gradient(1200px 600px at 10% 10%, rgba(67,97,238,.25), transparent), radial-gradient(800px 500px at 90% 90%, rgba(76,201,240,.18), transparent), var(--bg); }
.login-hero h1 { font-size: 34px; line-height: 1.3; }
.login-hero p { color: var(--muted); line-height: 1.8; font-size: 15px; max-width: 640px; }
.badge { display: inline-block; padding: 4px 12px; border-radius: 99px; border: 1px solid rgba(76,201,240,.5); color: var(--accent); font-size: 12px; }
.hero-tags { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.hero-tags span { padding: 8px 14px; border-radius: 10px; background: rgba(255,255,255,.05); border: 1px solid var(--line); }
.login-card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 24px; display: grid; gap: 10px; }
.login-card form { display: grid; gap: 10px; }
.login-card label { display: grid; gap: 4px; color: var(--muted); font-size: 13px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.tabs button { background: none; border: 0; padding: 8px 12px; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; }
.tabs button.on { color: var(--text); border-color: var(--accent); }

/* home */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 24px; border-bottom: 1px solid var(--line); background: rgba(10,15,29,.9); position: sticky; top: 0; z-index: 10; backdrop-filter: blur(6px); }
.brand { display: flex; align-items: center; gap: 10px; }
.brand small { display: block; color: var(--muted); font-size: 12px; }
.logo { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, var(--accent2), var(--accent)); display: grid; place-items: center; font-weight: 700; color: #fff; }
.user { display: flex; align-items: center; gap: 10px; }
.src { font-size: 12px; padding: 2px 8px; border-radius: 6px; background: rgba(255,255,255,.06); color: var(--muted); }
.src.ilab { background: rgba(6,214,160,.15); color: var(--ok); }
.home main, .page main { max-width: 1240px; margin: 0 auto; padding: 22px 24px 60px; }
.intro { position: relative; overflow: hidden; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 34px 32px; min-height: 230px; border-radius: 18px; background: linear-gradient(120deg, rgba(67,97,238,.25), rgba(76,201,240,.08)); border: 1px solid var(--line); }
.intro > * { position: relative; z-index: 1; }
.intro .hero-bg { position: absolute; inset: 0; z-index: 0; opacity: 0; transition: opacity 1.2s; background: linear-gradient(90deg, rgba(10,15,29,.97) 0%, rgba(10,15,29,.9) 50%, rgba(10,15,29,.35) 100%), var(--hero) center 40% / cover no-repeat; }
.intro .hero-bg.has-hero { opacity: 1; }
.login.has-hero { background: linear-gradient(90deg, rgba(8,12,24,.95) 0%, rgba(8,12,24,.78) 50%, rgba(8,12,24,.55) 100%), var(--hero) center / cover no-repeat; transition: background .8s; }
.mod .ico { width: 34px; height: 34px; color: var(--accent); position: absolute; right: 16px; top: 18px; opacity: .85; }
.mod { box-shadow: 0 10px 30px rgba(0,0,0,.25); background: linear-gradient(160deg, rgba(30,40,72,.9), rgba(14,20,38,.94)); }
.mod:hover { box-shadow: 0 16px 40px rgba(67,97,238,.25); }
.intro p { color: #c5cee0; line-height: 1.8; max-width: 860px; }
.score-ring { width: 110px; height: 110px; border-radius: 50%; border: 6px solid var(--accent); display: grid; place-content: center; text-align: center; flex: none; }
.score-ring b { font-size: 34px; } .score-ring small { color: var(--muted); }
.modules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 18px 0; }
.mod { position: relative; padding: 18px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); cursor: pointer; transition: .2s; display: flex; flex-direction: column; gap: 6px; min-height: 200px; }
.mod:hover { transform: translateY(-3px); border-color: rgba(76,201,240,.5); }
.mod .no { font-size: 30px; font-weight: 800; color: rgba(76,201,240,.25); }
.mod p { color: var(--muted); line-height: 1.6; flex: 1; margin: 0; }
.mod .st { font-size: 12px; color: var(--accent); }
.mod.done { border-color: rgba(6,214,160,.45); }
.mod.done .st::before { content: '✓ '; }
.mod button { align-self: flex-start; }
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
.about h3 { margin-top: 0; }
.about .flow, .about .gains { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; counter-reset: f; }
.about li { display: grid; grid-template-columns: 150px 1fr; gap: 10px; align-items: start; padding: 9px 12px; border-radius: 10px; background: rgba(255,255,255,.03); border: 1px solid var(--line); font-size: 13px; line-height: 1.65; }
.about li b { color: var(--text); }
.about li span { color: var(--muted); }
.about .flow li { counter-increment: f; }
.about .flow li b::before { content: counter(f); display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: 7px; border-radius: 50%; background: var(--accent2); color: #fff; font-size: 12px; }
.about .gains li b::before { content: '✓'; margin-right: 6px; color: var(--accent); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; }
.panel p { color: var(--muted); line-height: 1.7; }
.guide { color: var(--muted); line-height: 1.9; padding-left: 18px; margin: 0; }
.kp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.kp-grid div { padding: 12px; border-radius: 10px; background: rgba(255,255,255,.03); border: 1px solid var(--line); }
.kp-grid p { font-size: 12.5px; margin: 6px 0 0; }

/* quiz */
.quiz { display: grid; gap: 12px; max-width: 900px !important; }
.qcard { padding: 14px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.qcard.right { border-color: rgba(6,214,160,.5); } .qcard.wrong { border-color: rgba(239,71,111,.5); }
.opt { display: block; padding: 6px 8px; border-radius: 6px; cursor: pointer; }
.opt:hover { background: rgba(255,255,255,.04); }
.exp { margin-top: 8px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.verdict { padding: 10px 14px; border-radius: 10px; font-weight: 600; margin: 8px 0; }
.verdict.ok { background: rgba(6,214,160,.12); color: var(--ok); } .verdict.bad { background: rgba(239,71,111,.12); color: #ff8fa8; }

/* workspace */
#ws { position: fixed; inset: 0; z-index: 50; background: var(--bg); }
#viewport { position: absolute; inset: 0; }
#viewport canvas { display: block; }
.label-layer { position: absolute; inset: 0; pointer-events: none; z-index: 1; overflow: hidden; }
.hide-labels .tag { display: none; }
.ws-top { position: absolute; left: 0; right: 0; top: 0; height: 52px; display: flex; align-items: center; gap: 14px; padding: 0 14px; background: linear-gradient(180deg, rgba(8,12,24,.95), rgba(8,12,24,.75)); border-bottom: 1px solid var(--line); z-index: 5; }
.ws-title b { font-size: 15px; } .ws-title .sub { display: block; font-size: 11px; color: var(--muted); }
.ws-stages { flex: 1; display: flex; gap: 4px; justify-content: center; overflow: hidden; }
.chip { font-size: 11.5px; padding: 3px 9px; border-radius: 99px; background: rgba(255,255,255,.05); color: var(--muted); white-space: nowrap; }
.chip.done { color: var(--ok); background: rgba(6,214,160,.1); }
.chip.cur { color: #fff; background: var(--accent2); }
.ws-right { display: flex; align-items: center; gap: 10px; }
.ws-timer { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12px; }
.ws-left { position: absolute; left: 10px; top: 62px; bottom: 60px; width: 236px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: auto; z-index: 4; padding: 10px 8px; }
.ws-left .prog { padding: 4px 6px 10px; font-size: 12px; color: var(--muted); }
.bar { height: 6px; border-radius: 4px; background: rgba(255,255,255,.08); overflow: hidden; margin-bottom: 4px; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent2), var(--accent)); }
.stage-h { font-size: 11.5px; color: var(--accent); margin: 10px 6px 4px; display: flex; justify-content: space-between; }
.stage-h em { color: var(--muted); font-style: normal; }
.step { display: flex; align-items: center; gap: 7px; padding: 6px 7px; border-radius: 7px; cursor: pointer; font-size: 12.5px; }
.step:hover { background: rgba(255,255,255,.05); }
.step .no { width: 20px; height: 20px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 11px; background: rgba(255,255,255,.07); }
.step.done .no { background: rgba(6,214,160,.2); color: var(--ok); }
.step.cur { background: rgba(67,97,238,.25); }
.step.cur .no { background: var(--accent2); color: #fff; }
.step.locked { opacity: .4; }
.step .tt { flex: 1; line-height: 1.3; }
.step .sc { font-size: 11px; color: var(--ok); }
.ws-panel { position: absolute; right: 10px; top: 62px; bottom: 60px; width: 390px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; z-index: 4; overflow: auto; }
.panel-inner { padding: 14px 16px 18px; }
.step-head .stage { font-size: 11.5px; color: var(--accent); }
.step-head h3 { font-size: 16px; }
.step-head .meta { font-size: 12px; color: var(--muted); }
.task { margin: 10px 0; padding: 10px 12px; background: rgba(67,97,238,.12); border-left: 3px solid var(--accent2); border-radius: 6px; line-height: 1.7; font-size: 13px; }
.step-body.readonly { pointer-events: none; opacity: .75; }
.evalbox { margin-top: 10px; padding: 8px 10px; background: rgba(6,214,160,.08); border-radius: 8px; font-size: 12.5px; color: #9ff0d6; }
details.model { margin-top: 10px; font-size: 12px; color: var(--muted); }
details.model summary { cursor: pointer; }
.step-foot { display: flex; justify-content: space-between; margin-top: 14px; gap: 8px; position: sticky; bottom: -18px; padding: 10px 0; background: linear-gradient(0deg, var(--panel) 70%, transparent); }
.ws-tools { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); display: flex; gap: 2px; padding: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; z-index: 4; }
.ws-tools button { background: none; border: 0; padding: 6px 11px; border-radius: 7px; cursor: pointer; color: var(--muted); font-size: 12.5px; }
.ws-tools button:hover { background: rgba(255,255,255,.06); color: var(--text); }
.ws-tools button.on { background: rgba(76,201,240,.18); color: var(--accent); }
.ws-tools .sep { width: 1px; background: var(--line); margin: 4px 4px; }
.ws-walkhint { position: absolute; left: 50%; top: 64px; transform: translateX(-50%); padding: 6px 14px; background: rgba(0,0,0,.6); border-radius: 8px; font-size: 12px; z-index: 4; }
#ws.running .ws-left { display: none; }
#ws.running .ws-hud, #ws[data-mode="tutorial"] .ws-hud { left: 10px; }
#ws.running #collab-box { left: 380px; }
.ws-hud { position: absolute; left: 256px; top: 62px; width: 340px; max-height: calc(100vh - 130px); overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; z-index: 4; }
.hud-top { display: flex; align-items: center; gap: 10px; font-size: 12px; }
.hud-top .clk { font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; }
.hud-top .tag { color: var(--accent); }
.pbar { flex: 1; height: 5px; background: rgba(255,255,255,.08); border-radius: 3px; overflow: hidden; }
.pbar i { display: block; height: 100%; background: var(--accent); }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 8px 0; }
.tiles div { background: rgba(255,255,255,.04); border-radius: 8px; padding: 6px 8px; }
.tiles em { display: block; font-style: normal; font-size: 11px; color: var(--muted); }
.tiles b { font-size: 16px; font-variant-numeric: tabular-nums; }
.tiles.big { grid-template-columns: repeat(5, 1fr); margin-bottom: 16px; }
.tiles.big div { padding: 14px; } .tiles.big b { font-size: 26px; }
canvas.chart { width: 100%; height: 130px; display: block; margin: 4px 0; }
canvas.chart.sm { height: 120px; }
canvas.radar { width: 100%; height: 280px; }
.hud-log { font-size: 11.5px; max-height: 80px; overflow: auto; }
.hud-log .warn, .log .warn { color: var(--warn); } .hud-log .error, .log .error { color: var(--bad); }
.log { font-size: 12px; max-height: 180px; overflow: auto; background: rgba(0,0,0,.2); padding: 6px 8px; border-radius: 6px; }

/* 3D 标签 */
.tag { font-size: 11px; padding: 3px 7px; border-radius: 6px; background: rgba(8,12,24,.78); border: 1px solid rgba(255,255,255,.15); color: #fff; white-space: nowrap; transform: translateY(-6px); display: flex; gap: 5px; align-items: center; }
.tag b { color: #ffd166; }
.tag .s:empty { display: none; }
.tag .s { color: var(--accent); }
.tag[data-level="green"] { border-color: rgba(6,214,160,.7); } .tag[data-level="green"] .s { color: var(--ok); }
.tag[data-level="amber"] { border-color: rgba(248,184,78,.8); } .tag[data-level="amber"] .s { color: var(--warn); }
.tag[data-level="red"] { border-color: var(--bad); background: rgba(80,10,30,.85); } .tag[data-level="red"] .s { color: #ff9fb5; }
.tag-dh { background: rgba(10,40,60,.85); }
.marker { pointer-events: auto; cursor: pointer; display: flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 99px; background: rgba(67,97,238,.9); color: #fff; font-size: 12px; box-shadow: 0 0 0 4px rgba(67,97,238,.25); animation: pulse 1.6s infinite; }
.marker .dot { width: 22px; height: 22px; border-radius: 50%; background: #fff; color: var(--accent2); display: grid; place-items: center; font-weight: 700; }
.marker.done { background: rgba(6,214,160,.9); animation: none; box-shadow: none; }
.marker.done .dot { color: #079a74; }
@keyframes pulse { 50% { box-shadow: 0 0 0 9px rgba(67,97,238,0); } }

/* 面板组件 */
.cards { display: grid; gap: 10px; }
.card { padding: 12px 14px; border-radius: 10px; background: rgba(255,255,255,.03); border: 1px solid var(--line); }
.card p { color: var(--muted); margin: 4px 0; font-size: 12.5px; line-height: 1.6; }
.card ul { margin: 6px 0 0; padding-left: 16px; font-size: 12px; line-height: 1.8; color: #c5cee0; }
.sel-card { cursor: pointer; }
.sel-card.on { border-color: var(--accent); background: rgba(76,201,240,.08); }
.form { display: grid; gap: 10px; }
.form label { display: grid; gap: 4px; font-size: 12.5px; color: #c5cee0; grid-template-columns: 1fr auto; align-items: center; }
.form label > input[type=range], .form label > select, .form label > input[type=number] { grid-column: 1 / -1; }
.form label > output { grid-row: 1; grid-column: 2; color: var(--accent); font-weight: 600; }
label.ck { display: flex !important; align-items: center; gap: 6px; cursor: pointer; font-size: 12.5px; }
label.mix { grid-template-columns: 14px 64px 1fr 40px !important; }
label.mix i { width: 10px; height: 10px; border-radius: 50%; }
label.mix > input { grid-column: auto !important; }
label.mix > output { grid-column: auto !important; grid-row: auto !important; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 12.5px; margin: 10px 0; padding: 8px 10px; background: rgba(255,255,255,.03); border-radius: 8px; }
.kv span { color: var(--muted); }
.checklist { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 4px; }
.checklist li { padding: 6px 8px; border-radius: 6px; background: rgba(255,255,255,.03); font-size: 12.5px; display: flex; gap: 8px; align-items: center; }
.checklist li.ok { color: var(--ok); }
.checklist li.ok::before { content: '✓'; }
.legend { display: flex; flex-wrap: wrap; gap: 4px; }
.palette { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin: 8px 0; }
.palette.mini { grid-template-columns: repeat(4, 1fr); }
.pal { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 10px; border-radius: 9px; border: 1px solid var(--line); background: rgba(255,255,255,.03); cursor: pointer; text-align: left; font-size: 12.5px; border-left: 3px solid var(--c, var(--accent)); }
.pal:hover { background: rgba(255,255,255,.07); }
.pal b { font-size: 16px; color: var(--c, var(--accent)); }
.pal small { color: var(--muted); font-size: 11px; }
.pal i { position: absolute; right: 8px; top: 6px; color: var(--ok); font-style: normal; }
.editor { margin-top: 12px; padding: 12px; border-radius: 10px; background: rgba(76,201,240,.06); border: 1px solid rgba(76,201,240,.25); display: grid; gap: 8px; }
.editor h5 { margin: 0; color: var(--text); font-size: 14px; display: flex; gap: 8px; align-items: center; }
.editor h5 small { color: var(--muted); font-weight: normal; }
.editor label { display: grid; gap: 4px; font-size: 12.5px; color: #c5cee0; }
.editor input.inline { width: 140px; }
.seg { display: flex; flex-wrap: wrap; gap: 4px; }
.seg button { padding: 4px 10px; border-radius: 7px; border: 1px solid var(--line); background: rgba(255,255,255,.03); cursor: pointer; font-size: 12px; }
.seg button.on { background: var(--accent2); border-color: transparent; color: #fff; }
.seg.wrap button { text-align: left; }
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 8px; }
.list { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 4px; }
.list li { padding: 6px 9px; border-radius: 7px; background: rgba(255,255,255,.03); cursor: pointer; font-size: 12.5px; }
.list li:hover, .list li.on { background: rgba(67,97,238,.2); }
.issues { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 4px; font-size: 12.5px; }
.issues li { padding: 6px 9px; border-radius: 7px; background: rgba(255,255,255,.03); line-height: 1.5; }
.issues li.error { color: #ff9fb5; background: rgba(239,71,111,.1); }
.issues li.warn { color: var(--warn); background: rgba(248,184,78,.08); }
.issues li.ok { color: var(--ok); }
.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; margin: 8px 0; }
.tbl th, .tbl td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.tbl th { color: var(--muted); font-weight: 500; }
.tbl td small { display: block; color: var(--muted); }
.tbl input.xs { width: 64px; padding: 3px 6px; }
.tbl.cmp td:not(:first-child) { font-variant-numeric: tabular-nums; }
.qbank { display: grid; gap: 4px; max-height: 200px; overflow: auto; margin: 8px 0; }
.qb { text-align: left; padding: 6px 9px; border-radius: 7px; border: 1px solid var(--line); background: rgba(255,255,255,.03); cursor: pointer; font-size: 12.5px; }
.qb:hover { background: rgba(255,255,255,.07); }
.qb em { font-style: normal; font-size: 11px; color: var(--accent); margin-right: 6px; }
.qa-log { display: grid; gap: 8px; margin-top: 8px; }
.bubble { padding: 9px 11px; border-radius: 10px; background: rgba(255,255,255,.04); border: 1px solid var(--line); font-size: 12.5px; line-height: 1.6; }
.bubble span { color: #c9f1ff; }
.bubble em { display: block; font-style: normal; font-size: 12px; margin-top: 4px; color: var(--muted); }
.bubble.right { border-color: rgba(6,214,160,.45); } .bubble.wrong { border-color: rgba(239,71,111,.45); }
.bubble .evi { font-size: 11px; color: var(--muted); margin-top: 3px; }
.judge { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.runbox { margin: 10px 0; padding: 10px; border-radius: 10px; background: rgba(255,255,255,.03); border: 1px solid var(--line); }
.q p { margin: 10px 0 6px; font-size: 13px; }
ul.ai { padding-left: 18px; line-height: 1.7; font-size: 12.5px; }
.kps details { padding: 6px 8px; border-radius: 7px; background: rgba(255,255,255,.03); margin-bottom: 4px; font-size: 12.5px; }
.kps details.read summary { color: var(--ok); }
.kps summary { cursor: pointer; }
.kps p { color: #c5cee0; line-height: 1.7; }
.roles { display: grid; gap: 6px; margin: 10px 0; }
.roles label { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.roles small { color: var(--muted); margin-left: auto; }

/* 协同 */
#collab-box { position: absolute; left: 256px; bottom: 60px; width: 300px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; z-index: 6; font-size: 12px; }
#collab-box.min .cb-m, #collab-box.min .cb-chat, #collab-box.min .row { display: none; }
.cb-h { display: flex; justify-content: space-between; align-items: center; }
.cb-m { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 8px; margin: 6px 0; }
.mem { display: flex; align-items: center; gap: 5px; }
.mem i { width: 7px; height: 7px; border-radius: 50%; background: #555; }
.mem.on i { background: var(--ok); }
.mem span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cb-chat { max-height: 130px; overflow: auto; display: grid; gap: 3px; padding: 4px 0; border-top: 1px solid var(--line); }
.cb-chat .sys { color: var(--muted); }
.cb-chat em { font-style: normal; color: var(--accent); font-size: 11px; margin: 0 4px; }
#collab-box .row input { flex: 1; }

/* 报告（白纸，便于导出 PDF） */
.report { background: #fff; color: #1d2433; border-radius: 6px; padding: 36px 44px !important; margin-top: 18px !important; --text: #1d2433; --muted: #5b6576; --grid: #e3e7ef; --line: #e3e7ef; color-scheme: light; }
.report h1 { text-align: center; font-size: 26px; letter-spacing: 6px; }
.report h2 { text-align: center; font-size: 17px; color: #5b6576; font-weight: 500; }
.report h3 { margin-top: 26px; padding-bottom: 6px; border-bottom: 2px solid #4361ee; color: #1f3a93; }
.report h4 { color: #333; }
.report p { line-height: 1.8; }
.report .tbl th { color: #5b6576; background: #f4f6fb; }
.report .tbl td, .report .tbl th { border-bottom-color: #e3e7ef; }
.report .big { font-size: 22px; color: #4361ee; }
.report .snap { width: 100%; border-radius: 8px; margin: 6px 0; }
.report .bar { background: #e9edf5; width: 160px; }
.report .concl { padding: 12px 16px; background: #f6f8fc; border-radius: 8px; line-height: 1.9; }
.report .foot { color: #8b93a4; font-size: 12px; text-align: center; margin-top: 30px; }
.report .ok { color: #079a74; } .report .bad { color: #d62857; }
.report canvas.chart { height: 180px; }

@media (max-width: 1100px) {
  .login { grid-template-columns: 1fr; }
  .ws-left { width: 190px; }
  .ws-panel { width: 340px; }
  .ws-hud { display: none; }
}
@media (max-width: 720px) {
  .modules, .row2, .grid2, .about { grid-template-columns: 1fr; }
  .about li { grid-template-columns: 1fr; gap: 2px; }
  .ws-left { display: none; }
  .ws-panel { left: 10px; right: 10px; width: auto; top: auto; height: 45vh; }
  .ws-stages { display: none; }
  .intro { flex-direction: column; }
}
