/* 本地字体（离线可用；中文走系统 PingFang/雅黑） */
@font-face { font-family: 'Chakra Petch'; font-style: normal; font-weight: 400; font-display: swap; src: url('assets/fonts/ChakraPetch-400.woff2') format('woff2'); }
@font-face { font-family: 'Chakra Petch'; font-style: normal; font-weight: 500; font-display: swap; src: url('assets/fonts/ChakraPetch-500.woff2') format('woff2'); }
@font-face { font-family: 'Chakra Petch'; font-style: normal; font-weight: 600; font-display: swap; src: url('assets/fonts/ChakraPetch-600.woff2') format('woff2'); }
@font-face { font-family: 'Chakra Petch'; font-style: normal; font-weight: 700; font-display: swap; src: url('assets/fonts/ChakraPetch-700.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('assets/fonts/IBMPlexMono-400.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('assets/fonts/IBMPlexMono-500.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 600; font-display: swap; src: url('assets/fonts/IBMPlexMono-600.woff2') format('woff2'); }
/* ═══════════════════════════════════════════════
   PLC 学院 · 工业控制面板风格样式
   ═══════════════════════════════════════════════ */
:root {
  --bg: #0a0d11;
  --bg2: #0e1218;
  --panel: #12171f;
  --panel2: #171d27;
  --panel3: #1d2430;
  --line: #273040;
  --line2: #323d50;
  --amber: #ffb300;
  --amber2: #ffc94d;
  --amber-dim: rgba(255,179,0,.12);
  --green: #2ee66b;
  --green-dim: rgba(46,230,107,.12);
  --red: #ff5252;
  --red-dim: rgba(255,82,82,.12);
  --blue: #4db5ff;
  --blue-dim: rgba(77,181,255,.12);
  --violet: #b18cff;
  --violet-dim: rgba(177,140,255,.12);
  --text: #e9e4d6;
  --text2: #b9bec7;
  --muted: #8b93a0;
  --mono: 'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;
  --disp: 'Chakra Petch', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --body: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  --r: 10px;
  /* 主题基础（亮色在 html[data-theme=light] 覆盖） */
  --hd: #ffffff;
  --deep: #0b0f15;
  --topbar: rgba(13,17,23,.92);
  --grid: rgba(255,255,255,.022);
  --wirec: #4a5568;
  --wire2: #3b4657;
  --svgline: #7a8494;
  --svgfill: #10151c;
  --lblfill: #98a2b3;
  --lblstrong: #cfd6df;
  --code-t: #cdd6e0;
  --dot-off: #333c49;
  --svg-grid: #232b38;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.65;
  min-height: 100vh;
  /* 蓝图网格 + 顶部琥珀氛围光 + 噪点 */
  background-image:
    radial-gradient(1200px 500px at 70% -10%, rgba(255,179,0,.07), transparent 60%),
    radial-gradient(900px 400px at 0% 0%, rgba(77,181,255,.05), transparent 55%),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: auto, auto, 44px 44px, 44px 44px;
}
body::before { /* 噪点纹理 */
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.6'/%3E%3C/svg%3E");
}
::selection { background: var(--amber); color: #111; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--amber2); }
b, strong { color: var(--hd); }
svg { width: 1em; height: 1em; vertical-align: -.12em; fill: currentColor; }

/* ══ 滚动条 ══ */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--line2); border-radius: 5px; border: 2px solid var(--bg2); }
::-webkit-scrollbar-thumb:hover { background: var(--amber); }

/* ══ 危险条纹 ══ */
.hazard {
  height: 8px;
  background: repeating-linear-gradient(-45deg, var(--amber) 0 14px, #14171c 14px 28px);
  opacity: .85;
}

/* ══ 顶栏 ══ */
.topbar { position: sticky; top: 0; z-index: 100; background: var(--topbar); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar-in { max-width: 1240px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 18px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); flex-shrink: 0; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(145deg, var(--panel3), var(--panel2)); border: 1px solid var(--line2);
  color: var(--amber); font-size: 20px; box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 0 18px rgba(255,179,0,.15);
}
.brand-txt { display: flex; flex-direction: column; line-height: 1.15; font-family: var(--disp); }
.brand-txt b { font-size: 17px; letter-spacing: 1px; color: var(--hd); }
.brand-txt i { font-style: normal; font-size: 10.5px; color: var(--muted); letter-spacing: 3px; }
.nav { display: flex; gap: 2px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  display: flex; align-items: center; gap: 6px; white-space: nowrap;
  color: var(--text2); padding: 8px 13px; border-radius: 8px; font-size: 13.5px;
  font-family: var(--disp); letter-spacing: .5px; border: 1px solid transparent; transition: all .18s;
}
.nav a:hover { color: var(--amber2); background: var(--amber-dim); }
.nav a.on { color: var(--amber); background: var(--amber-dim); border-color: rgba(255,179,0,.35); box-shadow: 0 0 14px rgba(255,179,0,.12) inset; }
.nav a svg { font-size: 14px; }

/* HUD 面板 */
.hud { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.hud-flame { display: flex; align-items: center; gap: 5px; color: var(--red); font-family: var(--disp); }
.hud-flame svg { filter: drop-shadow(0 0 6px rgba(255,82,82,.6)); }
.hud-flame b { color: var(--text); font-size: 15px; }
.hud-lv { display: flex; flex-direction: column; gap: 3px; min-width: 150px; }
.hud-lv-row { display: flex; align-items: center; gap: 7px; }
.lv-badge {
  font-family: var(--disp); font-weight: 700; font-size: 10.5px; letter-spacing: .5px;
  background: linear-gradient(135deg, var(--amber), #ff8a00); color: #1a1400;
  padding: 1px 7px; border-radius: 4px;
}
.hud-lv-row b { font-size: 12.5px; font-family: var(--disp); letter-spacing: 1px; }
.xp-bar { height: 6px; background: var(--panel3); border-radius: 3px; overflow: hidden; border: 1px solid var(--line); }
.xp-bar i { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, var(--amber), #ffd75e); border-radius: 3px; transition: width .5s cubic-bezier(.2,.8,.3,1); box-shadow: 0 0 8px rgba(255,179,0,.5); }
.xp-num { font-family: var(--mono); font-size: 10px; color: var(--muted); }

/* ══ 视图容器 ══ */
.view { display: none; max-width: 1240px; margin: 0 auto; padding: 34px 20px 80px; position: relative; z-index: 1; }
.view.on { display: block; animation: viewIn .35s ease; }
@keyframes viewIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; }

/* ══ 通用组件 ══ */
.panel {
  background: linear-gradient(160deg, var(--panel2), var(--panel));
  border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 12px 32px rgba(0,0,0,.35);
  position: relative;
}
.panel::before { /* 面板左上角"锁孔"铆钉装饰 */
  content: ''; position: absolute; top: 10px; left: 10px; width: 5px; height: 5px; border-radius: 50%;
  background: var(--line2); box-shadow: calc(100% + var(--r, 0px)) 0 0 var(--line2);
}
.btn {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  font-family: var(--disp); font-weight: 600; letter-spacing: 1px; font-size: 14px;
  background: linear-gradient(135deg, var(--amber), #ff8f00); color: #191300;
  border: none; border-radius: 8px; padding: 11px 22px; transition: all .18s;
  box-shadow: 0 4px 18px rgba(255,179,0,.25);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(255,179,0,.4); filter: brightness(1.08); }
.btn:active { transform: translateY(0); }
.btn.ghost { background: transparent; color: var(--text2); border: 1px solid var(--line2); box-shadow: none; }
.btn.ghost:hover { border-color: var(--red); color: var(--red); }
.btn.small { padding: 7px 14px; font-size: 12.5px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-family: var(--disp);
  letter-spacing: 1px; padding: 2px 10px; border-radius: 20px; border: 1px solid var(--line2); color: var(--text2);
}
.led { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.led.on { background: var(--green); box-shadow: 0 0 8px var(--green); animation: ledPulse 2s infinite; }
.led.off { background: var(--dot-off); }
.led.amber { background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.led.red { background: var(--red); box-shadow: 0 0 8px var(--red); animation: ledPulse 1s infinite; }
@keyframes ledPulse { 0%,100% { opacity: 1; } 50% { opacity: .45; } }

.sec-head { display: flex; align-items: baseline; gap: 14px; margin: 46px 0 20px; }
.sec-head h2 { font-family: var(--disp); font-size: 24px; letter-spacing: 1px; color: var(--hd); }
.sec-head h2 em { color: var(--amber); font-style: normal; }
.sec-head .sub { color: var(--muted); font-size: 13px; }
.sec-head::before { content: '//'; font-family: var(--mono); color: var(--amber); font-weight: 600; }

/* ══ HERO ══ */
.hero { display: grid; grid-template-columns: 1.35fr .9fr; gap: 26px; align-items: stretch; margin-top: 8px; }
.hero-main { padding: 40px 38px; overflow: hidden; }
.hero-kicker {
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--disp); font-size: 12px;
  letter-spacing: 3px; color: var(--amber); border: 1px solid rgba(255,179,0,.4); border-radius: 6px;
  padding: 5px 12px; background: var(--amber-dim); margin-bottom: 20px;
}
.hero h1 {
  font-family: var(--disp); font-size: clamp(34px, 4.6vw, 52px); line-height: 1.12; letter-spacing: 1px;
  color: var(--hd); margin-bottom: 16px; font-weight: 700;
}
.hero h1 .hl { color: var(--amber); text-shadow: 0 0 30px rgba(255,179,0,.45); }
.hero-sub { color: var(--text2); font-size: 15.5px; max-width: 560px; margin-bottom: 26px; }
.hero-sub b { color: var(--amber2); }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.hero-note { margin-top: 18px; font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 8px; }

/* HERO 右侧：操作面板 */
.hero-panel { padding: 26px; display: flex; flex-direction: column; gap: 14px; }
.hero-panel-title { font-family: var(--disp); font-size: 12px; letter-spacing: 3px; color: var(--text2); display: flex; align-items: center; gap: 8px; }
.ring-box { display: flex; align-items: center; gap: 20px; }
.ring { position: relative; width: 118px; height: 118px; flex-shrink: 0; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .bgc { fill: none; stroke: var(--panel3); stroke-width: 9; }
.ring .fgc { fill: none; stroke: var(--amber); stroke-width: 9; stroke-linecap: round; transition: stroke-dashoffset 1s cubic-bezier(.2,.8,.3,1); filter: drop-shadow(0 0 6px rgba(255,179,0,.5)); }
.ring-txt { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring-txt b { font-family: var(--disp); font-size: 25px; color: var(--hd); display: block; line-height: 1; }
.ring-txt span { font-size: 10px; color: var(--muted); letter-spacing: 2px; }
.ring-stats { flex: 1; display: grid; gap: 8px; }
.rs-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--text2); }
.rs-row b { font-family: var(--mono); font-size: 14px; font-weight: 600; color: var(--amber2); }
.rs-row .g { color: var(--green); }
.weekptr {
  border: 1px dashed var(--line2); border-radius: 8px; padding: 10px 14px; background: var(--bg2);
  font-size: 13px; color: var(--text2); display: flex; align-items: center; gap: 10px;
}
.weekptr b { color: var(--hd); font-family: var(--disp); }
.btn.mini { padding: 6px 13px; font-size: 12px; margin-left: auto; }

/* 传送带 */
.conveyor { margin-top: 30px; height: 64px; position: relative; overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg2); }
.conveyor::before { /* 滚筒纹路滚动 */
  content: ''; position: absolute; inset: 12px 0; opacity: .5;
  background: repeating-linear-gradient(90deg, transparent 0 34px, var(--line) 34px 36px);
  animation: belt 1.6s linear infinite;
}
@keyframes belt { to { background-position: -72px 0; } }
.cargo { position: absolute; top: 6px; width: 44px; height: 40px; border-radius: 6px; display: grid; place-items: center; font-size: 19px; background: linear-gradient(145deg, var(--panel3), var(--panel2)); border: 1px solid var(--line2); box-shadow: 0 6px 14px rgba(0,0,0,.5); animation: carry 12s linear infinite; }
.cargo.c2 { animation-delay: -4s; } .cargo.c3 { animation-delay: -8s; }
@keyframes carry { from { left: -60px; } to { left: calc(100% + 20px); } }

/* 数据带 */
.statline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 26px; }
.stat { padding: 16px 18px; display: flex; align-items: center; gap: 13px; }
.stat .ico { width: 40px; height: 40px; border-radius: 9px; display: grid; place-items: center; font-size: 19px; font-family: var(--disp); font-weight: 700; flex-shrink: 0; }
.stat .ico.a { background: var(--amber-dim); color: var(--amber); border: 1px solid rgba(255,179,0,.3); }
.stat .ico.g { background: var(--green-dim); color: var(--green); border: 1px solid rgba(46,230,107,.3); }
.stat .ico.b { background: var(--blue-dim); color: var(--blue); border: 1px solid rgba(77,181,255,.3); }
.stat .ico.v { background: var(--violet-dim); color: var(--violet); border: 1px solid rgba(177,140,255,.3); }
.stat b { font-family: var(--disp); font-size: 21px; color: var(--hd); display: block; line-height: 1.1; }
.stat span { font-size: 12px; color: var(--muted); }

/* ══ 阶段总览 ══ */
.phase-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.phase-card { padding: 22px 24px; cursor: pointer; transition: all .2s; overflow: hidden; }
.phase-card:hover { transform: translateY(-3px); border-color: var(--pc, var(--amber)); box-shadow: 0 14px 36px rgba(0,0,0,.5), 0 0 24px var(--pd, rgba(255,179,0,.1)); }
.phase-card .ph-top { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.phase-card .ph-num { font-family: var(--disp); font-weight: 700; font-size: 13px; color: var(--pc, var(--amber)); letter-spacing: 2px; }
.phase-card .ph-icon { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; font-size: 21px; background: var(--pd, var(--amber-dim)); border: 1px solid var(--pc, var(--amber)); color: var(--pc, var(--amber)); margin-left: auto; }
.phase-card h3 { font-family: var(--disp); font-size: 19px; color: var(--hd); letter-spacing: .5px; }
.phase-card .ph-goal { font-size: 13px; color: var(--pc, var(--amber)); margin-bottom: 8px; font-family: var(--disp); letter-spacing: .5px; }
.phase-card p { font-size: 13.5px; color: var(--text2); margin-bottom: 14px; }
.ph-bar { height: 7px; border-radius: 4px; background: var(--panel3); overflow: hidden; border: 1px solid var(--line); }
.ph-bar i { display: block; height: 100%; background: var(--pc, var(--amber)); transition: width .6s ease; box-shadow: 0 0 10px var(--pc, var(--amber)); }
.ph-bar-row { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); font-family: var(--mono); margin-top: 6px; }

/* ══ 节奏模板 ══ */
.rhythm { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.rhy-card { padding: 22px 24px; }
.rhy-card h3 { font-family: var(--disp); font-size: 17px; color: var(--hd); display: flex; align-items: center; gap: 9px; margin-bottom: 4px; }
.rhy-card .rhy-sub { font-size: 12.5px; color: var(--muted); margin-bottom: 16px; }
.rhy-row { display: flex; gap: 14px; padding: 12px 0; border-top: 1px dashed var(--line); align-items: flex-start; }
.rhy-time { font-family: var(--mono); font-weight: 600; color: var(--amber); font-size: 14px; min-width: 64px; flex-shrink: 0; padding-top: 2px; }
.rhy-row p { font-size: 13.5px; color: var(--text2); }

/* ══ 新手指南 ══ */
.guide { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.guide-card { padding: 22px; }
.guide-card .g-num { font-family: var(--disp); font-size: 30px; font-weight: 700; color: var(--amber); opacity: .9; line-height: 1; margin-bottom: 10px; }
.guide-card h3 { font-size: 15.5px; color: var(--hd); margin-bottom: 8px; }
.guide-card p { font-size: 13px; color: var(--text2); }

/* ══ 徽章墙 ══ */
.badges { display: flex; flex-wrap: wrap; gap: 12px; }
.badge { display: flex; align-items: center; gap: 10px; padding: 12px 18px 12px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg2); }
.badge .b-ico { width: 42px; height: 42px; border-radius: 9px; display: grid; place-items: center; font-size: 21px; background: var(--panel3); filter: grayscale(1); opacity: .35; }
.badge.got { border-color: rgba(255,179,0,.5); background: var(--amber-dim); box-shadow: 0 0 18px rgba(255,179,0,.12); }
.badge.got .b-ico { filter: none; opacity: 1; background: linear-gradient(145deg, #2a2410, #1c1a10); border: 1px solid rgba(255,179,0,.4); }
.badge b { display: block; font-size: 13.5px; color: var(--hd); font-family: var(--disp); letter-spacing: .5px; }
.badge span { font-size: 11.5px; color: var(--muted); }
.badge:not(.got) b { color: var(--muted); }

/* ══ 路线图 ══ */
.rm-intro { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 24px; padding: 16px 20px; font-size: 13.5px; color: var(--text2); }
.rm-intro .legend { display: flex; gap: 14px; margin-left: auto; flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.rm-phase { margin-bottom: 30px; }
.rm-phase-head { display: flex; align-items: center; gap: 14px; padding: 16px 22px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.rm-phase-head .p-ico { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; font-size: 22px; color: var(--pc); background: var(--pd); border: 1px solid var(--pc); flex-shrink: 0; }
.rm-phase-head h3 { font-family: var(--disp); font-size: 18px; color: var(--hd); letter-spacing: 1px; }
.rm-phase-head .p-weeks { font-family: var(--mono); font-size: 12px; color: var(--pc); letter-spacing: 1px; }
.rm-phase-head .p-goal { font-size: 12.5px; color: var(--muted); }
.rm-phase-head .p-bar { margin-left: auto; min-width: 170px; flex: none; }
.weeks { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 12px; padding: 18px; }
.wk {
  text-align: left; cursor: pointer; font-family: var(--body); color: var(--text);
  background: var(--bg2); border: 1px solid var(--line); border-radius: 9px; padding: 13px 15px;
  transition: all .18s; position: relative; display: flex; flex-direction: column; gap: 6px;
}
.wk:hover { transform: translateY(-2px); border-color: var(--pc); box-shadow: 0 10px 26px rgba(0,0,0,.45); }
.wk.done { border-color: rgba(46,230,107,.45); background: linear-gradient(160deg, rgba(46,230,107,.07), var(--bg2)); }
.wk.cur { border-color: var(--amber); box-shadow: 0 0 0 1px var(--amber), 0 0 22px rgba(255,179,0,.2); }
.wk-top { display: flex; align-items: center; gap: 8px; }
.wk-num { font-family: var(--disp); font-weight: 700; font-size: 12px; letter-spacing: 1px; color: var(--pc); }
.wk-title { font-size: 13.5px; font-weight: 600; color: var(--hd); line-height: 1.35; flex: 1; }
.wk-bar { height: 5px; border-radius: 3px; background: var(--panel3); overflow: hidden; }
.wk-bar i { display: block; height: 100%; background: var(--pc); transition: width .4s; }
.wk-pct { font-family: var(--mono); font-size: 10px; color: var(--muted); display: flex; justify-content: space-between; }
.wk-tag { position: absolute; top: 10px; right: 10px; }

/* ══ 弹窗 ══ */
.modal-mask { position: fixed; inset: 0; z-index: 200; background: rgba(5,7,10,.78); backdrop-filter: blur(6px); display: none; align-items: flex-start; justify-content: center; padding: 4vh 16px; overflow-y: auto; }
.modal-mask.on { display: flex; animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity: 0; } }
.modal { width: min(860px, 100%); background: linear-gradient(170deg, var(--panel2), var(--panel)); border: 1px solid var(--line2); border-radius: 14px; padding: 30px 32px; position: relative; animation: popIn .28s cubic-bezier(.2,.9,.3,1.2); margin-bottom: 6vh; }
@keyframes popIn { from { opacity: 0; transform: translateY(24px) scale(.97); } }
.modal-x { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg2); color: var(--muted); cursor: pointer; display: grid; place-items: center; font-size: 15px; transition: all .15s; }
.modal-x:hover { color: var(--red); border-color: var(--red); }
.mo-kicker { font-family: var(--disp); font-size: 12px; letter-spacing: 3px; color: var(--amber); margin-bottom: 6px; }
.mo-title { font-family: var(--disp); font-size: 26px; color: var(--hd); letter-spacing: 1px; margin-bottom: 6px; }
.mo-goal { font-size: 13.5px; color: var(--text2); margin-bottom: 18px; padding-left: 12px; border-left: 3px solid var(--amber); }
.mo-prog { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.day-blk { margin-bottom: 18px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--bg2); }
.day-head { display: flex; align-items: center; gap: 10px; padding: 9px 16px; background: var(--panel3); font-family: var(--disp); font-size: 13px; letter-spacing: 1px; color: var(--hd); }
.day-head .dd { color: var(--amber); font-weight: 700; }
.day-head .dow { font-size: 11px; color: var(--muted); }
.day-head .d-done { margin-left: auto; font-size: 11px; color: var(--green); font-family: var(--mono); }
.task { display: flex; gap: 13px; padding: 13px 16px; border-top: 1px solid rgba(39,48,64,.6); align-items: flex-start; transition: background .15s; }
.task:hover { background: rgba(255,255,255,.02); }
.task.done .tk-text { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(46,230,107,.5); }
.ck {
  width: 21px; height: 21px; border-radius: 6px; border: 1.6px solid var(--line2); background: var(--panel);
  cursor: pointer; flex-shrink: 0; margin-top: 2px; display: grid; place-items: center; color: transparent;
  transition: all .15s; font-size: 13px;
}
.ck:hover { border-color: var(--amber); box-shadow: 0 0 10px rgba(255,179,0,.25); }
.ck.on { background: var(--green); border-color: var(--green); color: #06210f; box-shadow: 0 0 12px rgba(46,230,107,.4); }
.tk-body { flex: 1; }
.tk-text { font-size: 14px; color: var(--text); line-height: 1.55; }
.tk-out { font-size: 12.5px; color: var(--muted); margin-top: 4px; display: flex; gap: 7px; align-items: baseline; }
.tk-out::before { content: '▸ 产出'; color: var(--green); font-size: 11px; font-family: var(--disp); letter-spacing: 1px; white-space: nowrap; }
.tk-xp { font-family: var(--mono); font-size: 10.5px; color: var(--amber); white-space: nowrap; margin-top: 3px; }
.tag { font-family: var(--disp); font-size: 10.5px; letter-spacing: 1.5px; padding: 2px 9px; border-radius: 4px; white-space: nowrap; flex-shrink: 0; margin-top: 2px; font-weight: 600; }
.tag.理论, .tag.理论\+实操, .tag.重点 { background: var(--blue-dim); color: var(--blue); border: 1px solid rgba(77,181,255,.35); }
.tag.实操 { background: var(--amber-dim); color: var(--amber); border: 1px solid rgba(255,179,0,.35); }
.tag.实战 { background: var(--green-dim); color: var(--green); border: 1px solid rgba(46,230,107,.35); }
.tag.复习 { background: var(--violet-dim); color: var(--violet); border: 1px solid rgba(177,140,255,.35); }
.tag.休息 { background: rgba(139,147,160,.12); color: var(--muted); border: 1px solid var(--line2); }
.tag.t_project { background: linear-gradient(135deg, rgba(255,179,0,.25), rgba(255,90,90,.2)); color: var(--amber2); border: 1px solid rgba(255,179,0,.5); }
.wk5-bullets { list-style: none; }
.wk5-bullets li { padding: 11px 6px; border-top: 1px dashed var(--line); display: flex; align-items: flex-start; gap: 12px; }
.wk5-bullets li:first-child { border-top: none; }
.proj-card { margin-top: 6px; border: 1px solid rgba(255,179,0,.4); background: linear-gradient(150deg, rgba(255,179,0,.08), rgba(255,120,0,.04)); border-radius: 10px; padding: 16px 18px; }
.proj-card .pj-label { font-family: var(--disp); font-size: 11px; letter-spacing: 3px; color: var(--amber); margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.proj-card .pj-txt { font-size: 15px; color: var(--hd); font-weight: 600; }
.proj-card .pj-out { font-size: 12.5px; color: var(--text2); margin-top: 4px; }

/* ══ 术语 ══ */
.term {
  color: var(--amber2); border-bottom: 1.5px dotted rgba(255,179,0,.55); cursor: help;
  text-decoration: none; position: relative; white-space: nowrap;
}
.term:hover { color: var(--amber); background: var(--amber-dim); border-radius: 3px; border-bottom-color: transparent; }
.tip {
  position: fixed; z-index: 400; max-width: 360px; pointer-events: none; opacity: 0; transform: translateY(6px);
  background: linear-gradient(165deg, var(--panel2), var(--panel)); border: 1px solid var(--line2); border-radius: 10px;
  box-shadow: 0 18px 46px rgba(0,0,0,.6), 0 0 0 1px rgba(255,179,0,.08); padding: 14px 16px; transition: opacity .16s, transform .16s;
}
.tip.on { opacity: 1; transform: translateY(0); }
.tip-head { display: flex; align-items: center; gap: 9px; margin-bottom: 7px; flex-wrap: wrap; }
.tip-term { font-family: var(--disp); font-size: 15px; color: var(--amber); letter-spacing: .5px; }
.tip-cat { font-size: 10px; font-family: var(--disp); letter-spacing: 1.5px; padding: 1px 8px; border-radius: 10px; background: var(--panel3); color: var(--muted); border: 1px solid var(--line2); }
.tip-body { font-size: 12.8px; color: var(--text2); line-height: 1.6; }
.tip-foot { margin-top: 9px; font-size: 10.5px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 7px; }

/* 词典页 */
.gl-tools { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; align-items: center; }
.gl-search { flex: 1; min-width: 220px; display: flex; align-items: center; gap: 10px; background: var(--bg2); border: 1px solid var(--line); border-radius: 9px; padding: 10px 15px; color: var(--muted); transition: border-color .15s; }
.gl-search:focus-within { border-color: var(--amber); box-shadow: 0 0 0 1px rgba(255,179,0,.3); }
.gl-search input { flex: 1; background: none; border: none; outline: none; color: var(--text); font-size: 14px; font-family: var(--body); }
.gl-cats { display: flex; gap: 7px; flex-wrap: wrap; }
.gl-cat { cursor: pointer; font-family: var(--disp); font-size: 12px; letter-spacing: 1px; padding: 7px 14px; border-radius: 20px; border: 1px solid var(--line2); color: var(--text2); background: var(--bg2); transition: all .15s; }
.gl-cat:hover { border-color: var(--amber); color: var(--amber2); }
.gl-cat.on { background: var(--amber); color: #191300; border-color: var(--amber); font-weight: 600; }
.gl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 13px; }
.gl-card { padding: 17px 19px; cursor: pointer; transition: all .16s; }
.gl-card:hover { transform: translateY(-2px); border-color: rgba(255,179,0,.45); }
.gl-card h4 { font-family: var(--disp); font-size: 15.5px; color: var(--hd); display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.gl-card h4 .cc { font-size: 9.5px; letter-spacing: 1.5px; padding: 1px 7px; border-radius: 8px; font-weight: 400; }
.gl-card .short { font-size: 13px; font-weight: 500; color: var(--amber2); margin-bottom: 7px; }
.gl-card .full { font-size: 12.5px; color: var(--text2); display: none; }
.gl-card.open .full { display: block; animation: viewIn .25s ease; }
.gl-card .hint { font-size: 10.5px; color: var(--muted); margin-top: 8px; }
.gl-card.open .hint { display: none; }
.gl-count { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-left: auto; }

/* 分类色 */
.cc-elec, .f-elec { --c: var(--amber); --cd: var(--amber-dim); }
.cc-sens, .f-sens { --c: var(--green); --cd: var(--green-dim); }
.cc-tool, .f-tool { --c: var(--blue); --cd: var(--blue-dim); }
.cc-prog, .f-prog { --c: var(--violet); --cd: var(--violet-dim); }
.cc-comm, .f-comm { --c: #ff9d5c; --cd: rgba(255,157,92,.12); }
.cc-mc, .f-mc { --c: #5cf0e6; --cd: rgba(92,240,230,.12); }
.cc-hmi, .f-hmi { --c: #ff7eb6; --cd: rgba(255,126,182,.12); }
.gl-card h4 .cc { color: var(--c); background: var(--cd); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); }
.gl-card { border-left: 3px solid var(--c); }

/* ══ 装备 ══ */
.hw-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.hw-card { padding: 24px 26px; }
.hw-top { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.hw-top .hw-phase { font-family: var(--mono); font-size: 12px; color: var(--amber); letter-spacing: 1px; }
.hw-top h3 { font-family: var(--disp); font-size: 19px; color: var(--hd); }
.hw-budget { margin-left: auto; font-family: var(--disp); font-weight: 700; font-size: 17px; color: var(--green); background: var(--green-dim); border: 1px solid rgba(46,230,107,.35); border-radius: 7px; padding: 3px 12px; }
.hw-note { font-size: 13px; color: var(--text2); margin: 8px 0 14px; }
.hw-items { list-style: none; display: grid; gap: 7px; }
.hw-items li { font-size: 13px; color: var(--text2); display: flex; gap: 9px; align-items: baseline; }
.hw-items li::before { content: '▸'; color: var(--amber); flex-shrink: 0; }
.callout { margin-top: 22px; padding: 18px 22px; border-radius: 10px; border: 1px dashed rgba(46,230,107,.5); background: var(--green-dim); display: flex; gap: 13px; align-items: flex-start; }
.callout .co-ico { font-size: 22px; }
.callout b { color: var(--green); }
.callout p { font-size: 13.5px; color: var(--text2); margin-top: 3px; }

/* ══ 规范·自测 ══ */
.st-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.st-card { padding: 24px 26px; }
.st-card h3 { font-family: var(--disp); font-size: 18px; color: var(--hd); display: flex; gap: 10px; align-items: center; margin-bottom: 6px; }
.st-card .st-sub { font-size: 12.5px; color: var(--muted); margin-bottom: 16px; }
.st-item { display: flex; gap: 13px; align-items: flex-start; padding: 12px 4px; border-top: 1px dashed var(--line); }
.st-item:first-of-type { border-top: none; }
.st-item p { font-size: 13.8px; color: var(--text); }
.st-item.done p { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(46,230,107,.5); }

/* ══ 资源 ══ */
.rs-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 13px; }
.rs-card { padding: 19px 22px; display: block; color: var(--text); transition: all .18s; }
.rs-card:hover { transform: translateY(-2px); border-color: rgba(77,181,255,.5); color: var(--text); }
.rs-cat { font-family: var(--disp); font-size: 10.5px; letter-spacing: 2px; color: var(--blue); background: var(--blue-dim); border: 1px solid rgba(77,181,255,.3); border-radius: 4px; padding: 2px 8px; display: inline-block; margin-bottom: 8px; }
.rs-card h4 { font-size: 15px; color: var(--hd); margin-bottom: 5px; display: flex; align-items: center; gap: 8px; }
.rs-card h4 svg { color: var(--blue); font-size: 13px; flex-shrink: 0; }
.rs-card p { font-size: 12.8px; color: var(--text2); }
.rs-card .host { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 8px; display: block; }

/* ══ Toast ══ */
.toasts { position: fixed; top: 74px; right: 20px; z-index: 500; display: flex; flex-direction: column; gap: 9px; }
.toast {
  display: flex; align-items: center; gap: 10px; background: linear-gradient(150deg, var(--panel2), var(--panel));
  border: 1px solid var(--line2); border-left: 3px solid var(--green); border-radius: 9px; padding: 11px 17px;
  font-size: 13.5px; color: var(--text); box-shadow: 0 14px 34px rgba(0,0,0,.5); animation: toastIn .3s cubic-bezier(.2,.9,.3,1.2);
}
.toast.gold { border-left-color: var(--amber); }
.toast.out { animation: toastOut .3s forwards; }
.toast .t-xp { font-family: var(--mono); color: var(--green); font-weight: 600; }
.toast.gold .t-xp { color: var(--amber); }
@keyframes toastIn { from { opacity: 0; transform: translateX(30px); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(30px); } }

/* ══ 页脚 ══ */
.foot { margin-top: 40px; position: relative; z-index: 1; }
.foot-in { max-width: 1240px; margin: 0 auto; padding: 26px 20px; display: flex; align-items: center; gap: 20px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.foot-sub { font-size: 11.5px; margin-top: 5px; opacity: .75; }

/* ══ 响应式 ══ */
@media (max-width: 1020px) {
  .hero { grid-template-columns: 1fr; }
  .phase-grid, .rhythm, .guide, .hw-grid, .st-grid, .rs-grid { grid-template-columns: 1fr; }
  .statline { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  .topbar-in { flex-wrap: wrap; gap: 8px; }
  .hud { width: 100%; justify-content: space-between; }
  .statline { grid-template-columns: 1fr; }
  .modal { padding: 22px 18px; }
  .rm-phase-head .p-bar { margin-left: 0; width: 100%; }
  .weeks { grid-template-columns: 1fr; }
  .hero-main { padding: 28px 22px; }
}

/* ═══════════════════════════════════════════════
   学习模式 · 微课 / 实验室 / 测验
   ═══════════════════════════════════════════════ */

/* ── 微课覆盖层 ── */
.lesson-mask { position: fixed; inset: 0; z-index: 300; background: rgba(6,8,12,.82); backdrop-filter: blur(8px); display: none; overflow-y: auto; }
.lesson-mask.on { display: block; animation: fadeIn .2s ease; }
.lesson { max-width: 860px; margin: 4vh auto 8vh; background: linear-gradient(170deg, var(--panel2), var(--panel)); border: 1px solid var(--line2); border-radius: 14px; overflow: hidden; animation: popIn .3s cubic-bezier(.2,.9,.3,1.1); }
.lesson-head { display: flex; align-items: center; gap: 14px; padding: 18px 26px; border-bottom: 1px solid var(--line); background: var(--bg2); position: sticky; top: 0; z-index: 5; }
.lesson-head .lh-k { font-family: var(--disp); font-size: 11px; letter-spacing: 3px; color: var(--amber); display: flex; align-items: center; gap: 8px; }
.lesson-head h3 { font-family: var(--disp); font-size: 20px; color: var(--hd); letter-spacing: .5px; }
.lesson-head .lh-meta { font-size: 12px; color: var(--muted); font-family: var(--mono); }
.lesson-head .lh-dots { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.lh-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--panel3); border: 1px solid var(--line2); transition: all .2s; cursor: pointer; }
.lh-dot.on { background: var(--amber); box-shadow: 0 0 8px rgba(255,179,0,.6); }
.lh-dot.done { background: var(--green); }
.lesson-x { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); cursor: pointer; display: grid; place-items: center; font-size: 15px; flex-shrink: 0; }
.lesson-x:hover { color: var(--red); border-color: var(--red); }
.lesson-body { padding: 28px 32px; min-height: 320px; }
.lesson-foot { display: flex; align-items: center; gap: 12px; padding: 16px 26px; border-top: 1px solid var(--line); background: var(--bg2); }
.lesson-foot .lf-step { font-family: var(--disp); font-size: 12px; letter-spacing: 2px; color: var(--muted); }
.lesson-foot .spacer { flex: 1; }
.ls-done-flag { display: inline-flex; align-items: center; gap: 6px; color: var(--green); font-size: 12.5px; }

/* ── 微课正文组件 ── */
.ls-p { font-size: 15px; color: var(--text); margin: 0 0 14px; line-height: 1.75; }
.ls-p b { color: var(--amber2); }
.code { font-family: var(--mono); font-size: 13px; background: var(--deep); border: 1px solid var(--line); border-left: 3px solid var(--amber); border-radius: 8px; padding: 14px 18px; margin: 14px 0; color: var(--code-t); white-space: pre-wrap; line-height: 1.6; }
.code b { color: var(--amber2); }
.ls-grid2, .ls-grid3 { display: grid; gap: 12px; margin: 14px 0; }
.ls-grid2 { grid-template-columns: repeat(2, 1fr); }
.ls-grid3 { grid-template-columns: repeat(3, 1fr); }
.ls-mini { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 13px 15px; display: flex; flex-direction: column; gap: 4px; }
.ls-mini b { color: var(--hd); font-size: 14px; }
.ls-mini span { font-size: 12.5px; color: var(--text2); }
.ls-mini i { font-style: normal; font-size: 11.5px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 6px; margin-top: 2px; }
.ls-table { margin: 14px 0; overflow-x: auto; }
.ls-table table { border-collapse: collapse; width: 100%; font-size: 13px; }
.ls-table th { background: var(--panel3); color: var(--amber); font-family: var(--disp); letter-spacing: 1px; font-weight: 600; }
.ls-table th, .ls-table td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; color: var(--text2); vertical-align: top; }
.ls-table td b { color: var(--hd); }
.flow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.flow span { background: var(--bg2); border: 1px solid var(--line2); border-radius: 8px; padding: 8px 13px; text-align: center; font-size: 12px; color: var(--text2); line-height: 1.45; }
.flow span b { color: var(--amber2); }
.flow span:nth-child(odd) { border-color: rgba(255,179,0,.35); }
.ls-sum { background: linear-gradient(150deg, rgba(255,179,0,.06), transparent); border: 1px dashed rgba(255,179,0,.4); border-radius: 10px; padding: 14px 18px; margin: 14px 0; }
.ls-sum b { display: block; color: var(--amber); font-family: var(--disp); letter-spacing: 1px; margin-bottom: 8px; }
.ls-sum ul { padding-left: 18px; }
.ls-sum li { font-size: 13.5px; color: var(--text2); margin: 5px 0; }
.ls-check { border: 1.5px dashed rgba(90,200,250,.45); border-radius: 10px; padding: 12px 16px; margin: 14px 0; background: rgba(90,200,250,.05); }
.ls-check b { display: block; color: #5ac8fa; font-family: var(--disp); letter-spacing: 1px; margin-bottom: 6px; }
.ls-check p, .ls-check li { font-size: 13.5px; color: var(--text2); margin: 4px 0; }
html[data-theme="light"] .ls-check { border-color: rgba(0,105,180,.4); background: rgba(0,120,215,.06); }
html[data-theme="light"] .ls-check b { color: #0069b8; }
.wslot { margin: 16px 0; border: 1px solid var(--line2); border-radius: 12px; padding: 16px; background: var(--bg2); box-shadow: 0 10px 26px rgba(0,0,0,.3); }

/* ── 实验室通用 ── */
.lab-card { padding: 22px 24px; cursor: pointer; transition: all .18s; }
.lab-card:hover { transform: translateY(-3px); border-color: rgba(255,179,0,.5); box-shadow: 0 14px 36px rgba(0,0,0,.5); }
.lab-card .lb-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.lab-card .lb-ico { font-size: 26px; }
.lab-card h4 { font-family: var(--disp); font-size: 16.5px; color: var(--hd); }
.lab-card .lb-tag { margin-left: auto; }
.lab-card p { font-size: 13px; color: var(--text2); }
.lab-card .lb-used { margin-top: 10px; font-size: 11.5px; color: var(--green); font-family: var(--mono); }
.lab-note { margin-bottom: 18px; padding: 14px 18px; font-size: 13.5px; color: var(--text2); display: flex; align-items: center; gap: 10px; }

/* 实验内部控件 */
.lg-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 10px 0; }
.lg-ctl { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--text2); min-width: 220px; }
.lg-ctl b { color: var(--amber); font-family: var(--mono); }
.lg-ctl input[type=range] { width: 100%; accent-color: var(--amber); }
.lg-out { display: grid; gap: 10px; margin: 12px 0; }
.lg-val { display: flex; justify-content: space-between; align-items: baseline; background: var(--panel3); border: 1px solid var(--line); border-radius: 8px; padding: 9px 14px; }
.lg-val span { font-size: 12.5px; color: var(--muted); }
.lg-val b { font-family: var(--mono); font-size: 16px; color: var(--amber2); }
.lg-bar { height: 14px; background: var(--panel3); border-radius: 7px; overflow: hidden; position: relative; border: 1px solid var(--line); }
.lg-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--green), var(--amber)); transition: width .15s; }
.lg-bar span { position: absolute; right: 8px; top: 0; font-size: 9.5px; line-height: 14px; color: var(--muted); }
.lg-tip { margin-top: 12px; font-size: 12.5px; color: var(--muted); background: var(--panel3); border-radius: 8px; padding: 10px 14px; border: 1px dashed var(--line2); }
.lg-tip b { color: var(--amber2); }
.lg-led { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text2); }
.lg-input, select { background: var(--bg2); border: 1px solid var(--line2); color: var(--text); border-radius: 7px; padding: 7px 11px; font-size: 13.5px; font-family: var(--body); outline: none; }
select:focus, .lg-input:focus { border-color: var(--amber); }
.lg-tabs { display: inline-flex; gap: 4px; background: var(--bg2); padding: 4px; border-radius: 9px; border: 1px solid var(--line); }
.lg-tab { border: none; background: transparent; color: var(--text2); font-family: var(--disp); font-size: 13px; padding: 6px 14px; border-radius: 6px; cursor: pointer; transition: all .15s; }
.lg-tab.on { background: var(--amber); color: #191300; font-weight: 600; }
.lg-tabs.sm .lg-tab { padding: 4px 10px; font-size: 12px; }

/* ── 电路图通用 ── */
.cir-wrap { background: var(--deep); border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.cir { width: 100%; height: auto; }
.cir .rail { stroke: var(--svgline); stroke-width: 3; }
.lbl { fill: var(--lblfill); font-size: 13px; font-family: var(--body); }
.lbl.t16 { font-size: 15px; fill: var(--lblstrong); }
.cir .seg { stroke: var(--wire2); stroke-width: 2.4; fill: none; transition: stroke .25s; }
.cir .seg.live { stroke: var(--amber); filter: drop-shadow(0 0 4px rgba(255,179,0,.8)); }
.cir .seg.live + .cir .dot { fill: var(--amber); }
.cir .dot { fill: var(--svgline); }
.cir .bridge { stroke: #9aa3ad; stroke-width: 3; stroke-linecap: round; transition: transform .12s ease; }
.cir .bridge.closed { transform: translateY(13px); }
.cir .fuse { fill: var(--svgfill); stroke: #9aa3ad; stroke-width: 2; }
.cir .fuse-bar { stroke: var(--amber); stroke-width: 2.5; }
.cir .coil { fill: var(--svgfill); stroke: #5a6577; stroke-width: 2.4; transition: all .2s; }
.cir .coil.on { stroke: var(--green); filter: drop-shadow(0 0 8px rgba(46,230,107,.7)); }
.cir .coil-t { fill: var(--lblstrong); font-size: 12px; text-anchor: middle; font-weight: 600; }
.cir .motor { fill: var(--svgfill); stroke: #5a6577; stroke-width: 2.4; transition: all .2s; }
.cir .motor.on { stroke: var(--green); filter: drop-shadow(0 0 10px rgba(46,230,107,.5)); }
.cir .motor-t { fill: var(--lblstrong); font-size: 16px; text-anchor: middle; font-weight: 700; }
#rotor { transition: opacity .2s; }
#rotor.spin { animation: rotorSpin .9s linear infinite; transform-box: fill-box; transform-origin: center; }
@keyframes rotorSpin { to { transform: rotate(360deg); } }
.cir .clickable { cursor: pointer; }
.cir .clickable:hover .btn-ring { filter: brightness(1.4); }
.cir .btn-ring { fill: rgba(255,255,255,.03); stroke: var(--line2); stroke-width: 1.5; }
.cir #sb1 .btn-ring { stroke: rgba(255,82,82,.5); }
.cir #sb2 .btn-ring { stroke: rgba(46,230,107,.5); }
.cir-panel { margin-top: 12px; }
.cir-cap { flex-basis: 100%; font-size: 13px; color: var(--amber2); background: var(--panel3); border-radius: 8px; padding: 9px 13px; border: 1px dashed var(--line2); }
.pressed .btn-ring { fill: rgba(255,255,255,.14); }

/* ── 星三角 ── */
.xsj { display: grid; gap: 14px; }
.xsj-kms { display: flex; gap: 10px; flex-wrap: wrap; }
.xsj-km { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 16px; display: flex; align-items: center; gap: 10px; min-width: 118px; }
.xsj-km b { font-family: var(--disp); color: var(--hd); font-size: 16px; }
.xsj-km span { font-size: 11px; color: var(--muted); }
.xsj-motor { display: flex; align-items: center; gap: 16px; }
.xsj-micon { font-size: 44px; width: 70px; text-align: center; }
.xsj-micon.spin1 { animation: wob 1s linear infinite; }
.xsj-micon.spin2 { animation: wob .45s linear infinite; }
@keyframes wob { 0% { transform: rotate(0);} 100% { transform: rotate(20deg);} }
.xsj-stage { font-family: var(--disp); font-size: 18px; color: var(--amber); letter-spacing: 1px; }
.xsj-meter { margin-top: 4px; }
.xsj-scale { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted); font-family: var(--mono); margin-bottom: 3px; }
.xsj-bar { position: relative; height: 22px; background: var(--panel3); border-radius: 6px; border: 1px solid var(--line); overflow: hidden; }
.xsj-bar i { display: block; height: 100%; width: 0; background: var(--green); transition: width .12s linear; }
.xsj-bar em { position: absolute; top: -3px; bottom: -3px; width: 3px; background: var(--red); border-radius: 2px; opacity: 0; transition: left .2s; box-shadow: 0 0 8px var(--red); }
.xsj-ilbl { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.xsj-kt { width: 90px; height: 8px; background: var(--panel3); border-radius: 4px; overflow: hidden; border: 1px solid var(--line); }
.xsj-kt i { display: block; height: 100%; width: 0; background: var(--violet); transition: width .12s linear; }
.xsj-cmp { font-size: 13px; color: var(--text2); display: inline-flex; gap: 7px; align-items: center; cursor: pointer; }
.xsj-cmp input { accent-color: var(--amber); }
.xsj-cap { font-size: 13px; color: var(--text2); background: var(--panel3); border-radius: 8px; padding: 10px 14px; border: 1px dashed var(--line2); min-height: 40px; }

/* ── NPN/PNP ── */
.npn-ctl label { font-size: 13.5px; color: var(--text2); display: inline-flex; gap: 8px; align-items: center; }
.npn-verdict { margin-top: 12px; padding: 13px 16px; border-radius: 10px; font-size: 13.5px; line-height: 1.6; }
.npn-verdict.ok { background: var(--green-dim); border: 1px solid rgba(46,230,107,.4); color: var(--text2); }
.npn-verdict.bad { background: var(--red-dim); border: 1px solid rgba(255,82,82,.4); color: var(--text2); }
.cir .box { fill: #10151d; stroke: var(--line2); stroke-width: 1.5; }
.cir .wire { stroke: var(--wirec); stroke-width: 2.6; stroke-linecap: round; }
.cir .wire.brown { stroke: #c98a4b; }
.cir .wire.blue { stroke: #5b8dd6; }
.cir .wire.black { stroke: #aeb6c2; }
.cir .curpath { stroke: var(--amber); stroke-width: 2.6; stroke-dasharray: 7 5; fill: none; opacity: 0; transition: opacity .3s; animation: dashMove 0.7s linear infinite; }
@keyframes dashMove { to { stroke-dashoffset: -24; } }
.cir .res { stroke: #7c8798; stroke-width: 2; fill: none; }
.cir .glow { fill: var(--green); filter: drop-shadow(0 0 9px var(--green)); }

/* ── 数制 ── */
.nc-err { color: var(--red); font-size: 12.5px; }
.nc-all { grid-template-columns: repeat(4, 1fr); }
.nc-bits { display: flex; gap: 5px; flex-wrap: wrap; margin: 12px 0; }
.nc-bit { width: 40px; height: 40px; border-radius: 8px; background: var(--panel3); border: 1px solid var(--line2); color: var(--muted); font-family: var(--mono); font-size: 16px; font-weight: 600; cursor: pointer; transition: all .12s; }
.nc-bit:hover { border-color: var(--amber); transform: translateY(-2px); }
.nc-bit.on { background: rgba(77,181,255,.22); border-color: var(--blue); color: var(--blue); box-shadow: 0 0 10px rgba(77,181,255,.25); }
.nd-q { font-size: 17px; margin: 14px 0; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; }
.nd-q .mono { font-family: var(--mono); color: var(--amber); font-size: 19px; }
.nd-score { font-size: 13px; color: var(--muted); margin-left: auto; }
.nd-score b { color: var(--amber); }
.nd-fb { min-height: 44px; margin-top: 10px; }
.nd-fb.ok { color: var(--green); }
.nd-fb.bad { color: var(--red); }
.nd-fb .mono { font-family: var(--mono); color: var(--amber2); }

/* ── 梯形图模拟器 ── */
.ld-scan { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-left: auto; }
.ld-phase, .sc-phases { display: flex; gap: 8px; margin: 10px 0; }
.ld-phase span, .sc-phases span { font-family: var(--disp); font-size: 12.5px; letter-spacing: 1px; color: var(--muted); background: var(--bg2); border: 1px solid var(--line); border-radius: 20px; padding: 5px 15px; transition: all .2s; }
.ld-phase span.on, .sc-phases span.on { color: #191300; background: var(--amber); border-color: var(--amber); font-weight: 600; box-shadow: 0 0 14px rgba(255,179,0,.4); }
.ld-io { display: flex; gap: 20px; flex-wrap: wrap; margin: 10px 0; }
.ld-inrow, .ld-outrow { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ld-io-lbl { font-size: 11px; color: var(--muted); }
.ld-sw { display: inline-flex; align-items: center; gap: 8px; background: var(--bg2); border: 1.5px solid var(--line2); border-radius: 8px; padding: 7px 13px; color: var(--text2); font-family: var(--mono); font-size: 13px; cursor: pointer; transition: all .15s; }
.ld-sw i { width: 10px; height: 10px; border-radius: 50%; background: var(--dot-off); transition: all .15s; }
.ld-sw.on { border-color: var(--amber); color: var(--amber); }
.ld-sw.on i { background: var(--amber); box-shadow: 0 0 9px var(--amber); }
.ld-lamp { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 13px; color: var(--muted); background: var(--bg2); border: 1.5px solid var(--line); border-radius: 8px; padding: 7px 13px; }
.ld-lamp i { width: 11px; height: 11px; border-radius: 50%; background: var(--dot-off); transition: all .15s; }
.ld-lamp.on { border-color: rgba(46,230,107,.5); color: var(--green); }
.ld-lamp.on i { background: var(--green); box-shadow: 0 0 10px var(--green); }
.lad-draw { background: var(--deep); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px 10px; overflow-x: auto; }
.lad-rung { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 8px 0; border-bottom: 1px dashed var(--line); position: relative; }
.lad-runge:last-child { border-bottom: none; }
.lad-rung::before { content: ''; position: absolute; left: -12px; top: 0; bottom: 0; width: 3px; background: #3b4657; border-radius: 2px; }
.lad-branches { display: flex; flex-direction: column; gap: 10px; position: relative; }
.lad-branch { display: flex; align-items: center; gap: 4px; padding: 2px 0; }
.lad-branch.rst { margin-top: 2px; padding-left: 24px; }
.rst-lbl { font-family: var(--disp); font-size: 10px; color: var(--red); letter-spacing: 1px; margin-left: 8px; }
.ct { display: inline-flex; flex-direction: column; align-items: center; width: 44px; }
.ct svg { width: 40px; height: 26px; }
.ct .wire { stroke: var(--wirec); stroke-width: 2.2; stroke-linecap: round; }
.ct .bar { stroke: var(--svgline); stroke-width: 2.4; stroke-linecap: round; transition: stroke .15s; }
.ct i { font-style: normal; font-family: var(--mono); font-size: 10.5px; color: var(--muted); margin-top: 1px; }
.ct.hot .wire, .ct.hot .bar { stroke: var(--green); filter: drop-shadow(0 0 4px rgba(46,230,107,.7)); }
.ct.hot i { color: var(--green); }
.ct.mini { width: 40px; }
.ct.mini svg { width: 34px; }
.lad-coil { display: inline-flex; flex-direction: column; align-items: center; width: 46px; margin-left: auto; }
.lad-coil svg { width: 34px; height: 26px; }
.lad-coil .wire { stroke: #4a5568; stroke-width: 2.2; }
.lad-coil circle { fill: var(--svgfill); stroke: #5a6577; stroke-width: 2.2; transition: all .15s; }
.lad-coil text { fill: #cfd6df; font-size: 11px; font-weight: 700; }
.lad-coil i { font-style: normal; font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.lad-coil.on circle { stroke: var(--green); fill: rgba(46,230,107,.15); filter: drop-shadow(0 0 8px rgba(46,230,107,.6)); }
.lad-coil.on i { color: var(--green); }
.lad-blk { background: var(--panel3); border: 1.5px solid var(--line2); border-radius: 9px; padding: 8px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 118px; }
.lad-blk b { font-family: var(--disp); color: var(--hd); letter-spacing: 1px; font-size: 13px; }
.lad-blk span { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.lad-blk em { font-family: var(--mono); font-size: 13px; color: var(--amber); font-style: normal; }
.lad-note { display: none; }

/* ── 扫描周期 ── */
.sc-prog { display: flex; align-items: center; gap: 8px; background: var(--deep); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; margin: 10px 0; font-size: 13px; color: var(--text2); flex-wrap: wrap; }
.sc-and { color: var(--muted); font-size: 12px; }
.sc-regs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 12px 0; }
.sc-reg { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; text-align: center; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.sc-reg span { font-size: 12px; color: var(--muted); }
.sc-reg em { font-size: 10px; color: var(--muted); font-style: normal; opacity: .7; }
.bit { font-family: var(--mono); font-weight: 700; font-size: 15px; min-width: 32px; padding: 3px 8px; border-radius: 6px; background: var(--panel3); color: var(--muted); border: 1px solid var(--line2); display: inline-block; transition: all .15s; }
.bit.on { background: rgba(46,230,107,.18); color: var(--green); border-color: rgba(46,230,107,.5); box-shadow: 0 0 10px rgba(46,230,107,.25); }
.sc-sw { margin-top: 4px; }
.sc-log { background: var(--deep); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; min-height: 120px; max-height: 160px; overflow-y: auto; font-size: 12.5px; }
.sc-log div { padding: 3px 0; border-bottom: 1px dashed var(--line); animation: viewIn .25s; }
.sc-log .in { color: var(--blue); }
.sc-log .run { color: var(--violet); }
.sc-log .out { color: var(--green); }

/* ── 定时器实验 ── */
.tm-svg { width: 100%; height: auto; background: var(--deep); border: 1px solid var(--line); border-radius: 10px; }
.tm-tr { fill: none; stroke-width: 2.4; stroke-linejoin: round; }
.tm-tr.in { stroke: var(--blue); }
.tm-tr.q { stroke: var(--amber); stroke-width: 3; filter: drop-shadow(0 0 4px rgba(255,179,0,.5)); }
.tm-tr.et { stroke: var(--green); stroke-dasharray: 3 3; stroke-width: 1.6; }
.tm-read { margin-top: 10px; }
.tm-read span { font-size: 13px; color: var(--text2); }
.tm-read b { font-family: var(--mono); color: var(--amber); }
.tm-exp { flex-basis: 100%; font-size: 12.5px; color: var(--muted); }
.btn.pressed { box-shadow: 0 0 0 2px var(--amber), 0 4px 18px rgba(255,179,0,.35); }

/* ── 测验 ── */
.qz-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.qz-head b { font-family: var(--disp); font-size: 17px; color: var(--hd); }
.qz-head span { font-size: 12px; color: var(--muted); font-family: var(--mono); margin-left: auto; }
.qz-bar { height: 6px; background: var(--panel3); border-radius: 3px; overflow: hidden; margin-bottom: 16px; }
.qz-bar i { display: block; height: 100%; background: var(--amber); transition: width .3s; }
.qz-q { font-size: 16px; color: var(--hd); margin-bottom: 14px; line-height: 1.6; }
.qz-opts { display: grid; gap: 9px; }
.qz-opt { display: flex; align-items: center; gap: 12px; text-align: left; background: var(--bg2); border: 1.5px solid var(--line2); border-radius: 10px; padding: 12px 16px; color: var(--text); font-size: 14.5px; font-family: var(--body); cursor: pointer; transition: all .15s; }
.qz-opt:hover:not(:disabled) { border-color: var(--amber); transform: translateX(3px); }
.qz-opt:disabled { cursor: default; opacity: .75; }
.qz-opt .qz-abc { width: 26px; height: 26px; border-radius: 6px; background: var(--panel3); display: grid; place-items: center; font-family: var(--disp); font-weight: 700; font-size: 13px; color: var(--muted); flex-shrink: 0; }
.qz-opt.right { border-color: var(--green); background: var(--green-dim); opacity: 1; }
.qz-opt.right .qz-abc { background: var(--green); color: #06210f; }
.qz-opt.wrong { border-color: var(--red); background: var(--red-dim); opacity: 1; }
.qz-opt.wrong .qz-abc { background: var(--red); color: var(--hd); }
.qz-fb { margin-top: 14px; }
.qz-fb > div { font-size: 15px; margin-bottom: 6px; }
.qz-fb .ok { color: var(--green); }
.qz-fb .bad { color: var(--red); }
.qz-fb p { font-size: 13.5px; color: var(--text2); margin-bottom: 12px; background: var(--panel3); border-radius: 8px; padding: 10px 14px; }
.qz-end { text-align: center; padding: 30px 0 10px; }
.qz-score { font-family: var(--disp); font-size: 64px; font-weight: 700; line-height: 1; margin-bottom: 8px; }
.qz-score span { font-size: 18px; margin-left: 4px; }
.qz-score.pass { color: var(--green); text-shadow: 0 0 24px rgba(46,230,107,.5); }
.qz-score.fail { color: var(--red); }
.qz-end b { font-size: 17px; color: var(--hd); display: block; margin-bottom: 6px; }
.qz-end p { font-size: 13.5px; color: var(--text2); }
.qz-end .dim { color: var(--muted); font-size: 12px; }
.qz-end .btn { margin-top: 14px; }

/* 任务行的学习按钮 */
.learn-btn { display: inline-flex; align-items: center; gap: 5px; font-family: var(--disp); font-size: 11.5px; letter-spacing: 1px; color: var(--amber); background: var(--amber-dim); border: 1px solid rgba(255,179,0,.4); border-radius: 6px; padding: 3px 10px; cursor: pointer; transition: all .15s; white-space: nowrap; }
.learn-btn:hover { background: var(--amber); color: #191300; }
.learn-btn.done { color: var(--green); background: var(--green-dim); border-color: rgba(46,230,107,.4); }
.mo-quiz-row { margin-top: 18px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.mo-quiz-btn { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-family: var(--disp); font-size: 13.5px; letter-spacing: 1px; background: linear-gradient(135deg, rgba(177,140,255,.2), rgba(77,181,255,.15)); color: var(--violet); border: 1px solid rgba(177,140,255,.5); border-radius: 9px; padding: 10px 18px; transition: all .18s; }
.mo-quiz-btn:hover { background: var(--violet); color: var(--hd); }
.mo-quiz-btn.passed { color: var(--green); border-color: rgba(46,230,107,.5); background: var(--green-dim); }

@media (max-width: 700px) {
  .sc-regs { grid-template-columns: repeat(2, 1fr); }
  .nc-all { grid-template-columns: repeat(2, 1fr); }
  .ls-grid2, .ls-grid3 { grid-template-columns: 1fr; }
  .lesson-body { padding: 20px 16px; }
}

/* 补充：微课/导学按钮 */
.ls-step-t { font-family: var(--disp); color: var(--amber); font-size: 13px; letter-spacing: 2px; margin-bottom: 16px; border-bottom: 1px dashed var(--line2); padding-bottom: 10px; }
.mo-lesson-btn { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-family: var(--disp); font-size: 13.5px; letter-spacing: 1px; background: var(--amber-dim); color: var(--amber); border: 1px solid rgba(255,179,0,.5); border-radius: 9px; padding: 10px 18px; transition: all .18s; }
.mo-lesson-btn:hover { background: var(--amber); color: #191300; }
.mo-lesson-btn.done { color: var(--green); border-color: rgba(46,230,107,.5); background: var(--green-dim); }
.lesson-foot .btn[style*="hidden"], .lesson-foot .btn:disabled { opacity: .35; pointer-events: none; }

/* 任务零软件替代方案 */
.tk-alt { font-size: 12.5px; color: #9fd8ae; background: rgba(46,230,107,.08); border: 1px dashed rgba(46,230,107,.35); border-radius: 7px; padding: 6px 11px; margin-top: 6px; line-height: 1.55; }
.tk-alt b { color: var(--green); font-family: var(--disp); font-size: 11px; letter-spacing: 1px; margin-right: 8px; }

/* 软件工具箱卡片 */
.sw-card .hw-top { align-items: center; }
.sw-ico { font-size: 24px; }
.sw-need { font-family: var(--disp); font-size: 12px; color: var(--amber); letter-spacing: .5px; margin: 2px 0 8px; }
.sw-spec { font-size: 12px; color: var(--muted); background: var(--panel3); border-radius: 7px; padding: 7px 11px; margin: 10px 0; line-height: 1.5; }
.sw-link { display: block; font-size: 13px; color: var(--blue); padding: 4px 0; word-break: break-all; }
.sw-link:hover { color: var(--amber2); }
.sw-alt { font-size: 12.5px; color: #9fd8ae; background: rgba(46,230,107,.08); border: 1px dashed rgba(46,230,107,.35); border-radius: 7px; padding: 8px 11px; margin-top: 10px; line-height: 1.55; }

/* ── 新实验：气缸 ── */
.pn-stage { display: flex; align-items: center; gap: 14px; background: #0b0f15; border: 1px solid var(--line); border-radius: 10px; padding: 22px 20px; margin: 12px 0; }
.pn-cyl { flex: 1; }
.pn-tube { position: relative; height: 46px; border: 3px solid var(--svgline); border-radius: 24px; background: var(--svgfill); overflow: hidden; }
.pn-tube::after { content: '双作用气缸'; position: absolute; inset: 0; display: grid; place-items: center; font-size: 11px; color: var(--muted); letter-spacing: 2px; }
.pn-tube i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: linear-gradient(90deg, rgba(77,181,255,.45), rgba(77,181,255,.2)); border-right: 4px solid var(--blue); transition: width .06s linear; }
.pn-sensor { display: flex; flex-direction: column; gap: 4px; align-items: center; font-size: 11px; color: var(--muted); min-width: 74px; text-align: center; line-height: 1.4; }
.pn-read { font-size: 14px; color: var(--text2); margin: 8px 0; }
.pn-read b { color: var(--blue); font-family: var(--mono); font-size: 16px; }

/* ── 模拟量缩放 ── */
.sc2-gauge { position: relative; height: 40px; margin: 14px 0 6px; }
.sc2-zone { position: absolute; inset: 8px 0; border-radius: 8px; background: linear-gradient(90deg, #4db5ff 0%, #2ee66b 30%, #ffb300 62%, #ff5252 75%, #ff5252 100%); opacity: .8; }
.sc2-gauge i#sc2-needle { position: absolute; top: 0; bottom: 14px; left: 0; width: 4px; background: var(--hd); border-radius: 2px; box-shadow: 0 0 10px var(--hd); transition: left .2s; }
.sc2-gauge em { position: absolute; top: 2px; bottom: 16px; width: 2px; background: var(--hd); opacity: .6; }
.sc2-scale { position: absolute; left: 0; right: 0; bottom: -6px; display: flex; justify-content: space-between; font-size: 10px; color: var(--muted); font-family: var(--mono); }

/* ── 伺服 ── */
.sv-track { position: relative; height: 64px; background: var(--deep); border: 1px solid var(--line); border-radius: 10px; margin: 12px 0; }
.sv-zone { position: absolute; left: 2%; right: 2%; top: 26px; height: 4px; background: var(--line2); border-radius: 2px; }
.sv-org { position: absolute; left: 2%; top: 18px; font-size: 10px; color: var(--muted); font-family: var(--mono); font-style: normal; }
.sv-track b#sv-car { position: absolute; top: 2px; left: 50%; font-size: 26px; transform: translateX(-50%); transition: left .08s linear; filter: drop-shadow(0 3px 6px rgba(0,0,0,.5)); }

/* ── 流水灯 ── */
.sh-lamps { display: flex; gap: 10px; justify-content: center; margin: 18px 0; }
.sh-lamp { display: flex; flex-direction: column; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.sh-lamp i { width: 38px; height: 38px; border-radius: 50%; background: var(--panel3); border: 2px solid var(--line2); transition: all .15s; }
.sh-lamp.on i { background: radial-gradient(circle at 35% 30%, #ffe9b0, #ffb300 60%, #b37500); border-color: var(--amber); box-shadow: 0 0 18px rgba(255,179,0,.7); }

/* ── 报警字 ── */
.al-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 12px 0; }
.al-bit { display: flex; flex-direction: column; align-items: center; gap: 4px; background: var(--bg2); border: 1.5px solid var(--line); border-radius: 10px; padding: 12px 8px; cursor: pointer; transition: all .15s; }
.al-bit b { font-size: 13px; color: var(--text2); font-weight: 500; }
.al-bit span { font-family: var(--mono); font-size: 10px; color: var(--muted); }
.al-bit:hover { border-color: var(--red); }
.al-bit.on { background: var(--red-dim); border-color: rgba(255,82,82,.5); }
.al-bit.on b { color: #ffb3b3; }
.al-read b { font-family: var(--mono); color: var(--amber); }
#al-ack:disabled { opacity: .35; pointer-events: none; }
.sc-log .bad { color: var(--red); }

/* 防拖选/防触摸误滚动（实验按钮与方块） */
.nc-bit, .sh-lamp, .al-bit, #tm-in, .cir .clickable, #sv-jogp, #sv-jogm, #pn-ya, #pn-yb { user-select: none; -webkit-user-select: none; touch-action: manipulation; }
@media (max-width: 700px) { .al-grid { grid-template-columns: repeat(2, 1fr); } }


/* ═══════════════════════════════════════════════
   亮色主题
   ═══════════════════════════════════════════════ */
html[data-theme="light"] {
  --bg: #e6eaf1; --bg2: #dde3ec; --panel: #ffffff; --panel2: #eff2f7; --panel3: #e0e6ef;
  --line: #c5cedd; --line2: #aab6c9;
  --amber: #b97a00; --amber2: #6e4c00; --amber-dim: rgba(185,122,0,.14);
  --green: #0c7d3f; --green-dim: rgba(12,125,63,.12);
  --red: #c72e2e; --red-dim: rgba(199,46,46,.1);
  --blue: #085db0; --blue-dim: rgba(8,93,176,.12);
  --violet: #6539bd; --violet-dim: rgba(101,57,189,.12);
  --text: #171c24; --text2: #2f3947; --muted: #525d6e;
  --hd: #10141b;
  --deep: #e2e7ef; --topbar: rgba(240,244,249,.94);
  --grid: rgba(18,28,48,.07);
  --wirec: #6f7a8c; --wire2: #7e899b; --svgline: #6f7a8c; --svgfill: #f2f5f9;
  --lblfill: #4b5563; --lblstrong: #232b36; --code-t: #2a313c; --dot-off: #a9b3c2; --svg-grid: #b8c1cf;
}
html[data-theme="light"] .panel, html[data-theme="light"] .modal, html[data-theme="light"] .lesson,
html[data-theme="light"] .tip, html[data-theme="light"] .toast {
  box-shadow: 0 8px 22px rgba(30,40,60,.09), 0 1px 0 rgba(255,255,255,.7) inset;
}
html[data-theme="light"] body { background-image:
    radial-gradient(1200px 500px at 70% -10%, rgba(217,144,0,.06), transparent 60%),
    radial-gradient(900px 400px at 0% 0%, rgba(11,122,217,.05), transparent 55%),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: auto, auto, 44px 44px, 44px 44px;
}
html[data-theme="light"] .btn { color: #3a2a00; }
/* 亮色可读性专项：进度环轨道、面板数值、术语描述 */
html[data-theme="light"] .ring .bgc { stroke: #ccd5e2; }
html[data-theme="light"] .rs-row b { color: #5f4200; }
html[data-theme="light"] .rs-row b.g { color: #0a6b38; }
html[data-theme="light"] .gl-card .short { color: #5f4200; }
html[data-theme="light"] .sec-head h2 em { color: #9a6a00; }
html[data-theme="light"] .sec-head .sub { color: #4b5666; }
html[data-theme="light"] .wkptr { color: var(--text2); }
html[data-theme="light"] .chip { color: var(--text2); }
html[data-theme="light"] .tk-out { color: #4b5666; }
html[data-theme="light"] .tk-alt { color: #0a6b38; }
html[data-theme="light"] .lg-tip { color: #4b5666; border-color: #b3bdcd; }
html[data-theme="light"] .gl-card .hint, html[data-theme="light"] .fc-card .fc-hint { color: #4b5666; }
html[data-theme="light"] .stat span, html[data-theme="light"] .rhy-card .rhy-sub { color: #4b5666; }
html[data-theme="light"] .xp-num, html[data-theme="light"] .wk-pct { color: #4b5666; }
html[data-theme="light"] .lv-badge { color: #3a2a00; }
svg .gridline { stroke: var(--svg-grid); }

/* ═══ 主题切换按钮 / 新组件 ═══ */
.theme-btn { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line2); background: var(--panel2); color: var(--amber); cursor: pointer; display: grid; place-items: center; font-size: 16px; transition: all .15s; flex-shrink: 0; }
.theme-btn:hover { border-color: var(--amber); box-shadow: 0 0 12px var(--amber-dim); }
body { transition: background-color .25s ease, color .25s ease; }

/* 彩纸庆祝 */
.cf { position: fixed; top: -14px; z-index: 600; border-radius: 2px; pointer-events: none; animation: cfFall linear forwards; }
@keyframes cfFall { to { transform: translateY(106vh) rotate(720deg); opacity: .5; } }

/* 错题本入口 */
.wkptr.clickable { cursor: pointer; border-style: solid; }
.wkptr.clickable:hover { border-color: var(--amber); }

/* 抽认卡 */
.gl-modebar { display: flex; gap: 6px; margin-bottom: 14px; }
.fc-stage { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 30px 10px; }
.fc-card { width: 100%; max-width: 560px; min-height: 220px; background: var(--bg2); border: 1.5px solid var(--line2); border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 26px; text-align: center; cursor: pointer; transition: all .2s; }
.fc-card:hover { border-color: var(--amber); }
.fc-card h4 { font-family: var(--disp); font-size: 24px; color: var(--hd); letter-spacing: 1px; }
.fc-card .cc { font-size: 10.5px; font-family: var(--disp); letter-spacing: 2px; padding: 2px 10px; border-radius: 10px; background: var(--panel3); color: var(--muted); border: 1px solid var(--line2); }
.fc-card .fc-back { font-size: 14px; color: var(--text2); line-height: 1.7; animation: viewIn .3s ease; }
.fc-card .fc-hint { font-size: 12px; color: var(--muted); }
.fc-ctrl { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.fc-prog { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.fc-sum { text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center; padding: 26px 0; }
.fc-sum b { font-size: 20px; color: var(--hd); }

/* 导出/导入 */
.exp-area { width: 100%; min-height: 160px; background: var(--deep); color: var(--code-t); border: 1px solid var(--line); border-radius: 8px; padding: 12px; font-family: var(--mono); font-size: 11.5px; resize: vertical; }
.exp-tip { font-size: 12.5px; color: var(--muted); margin: 10px 0; line-height: 1.6; }

/* 微课末尾的大号小测 CTA */
.mo-quiz-btn.big { font-size: 15.5px; padding: 14px 26px; box-shadow: 0 4px 18px rgba(177,140,255,.25); }
.mo-quiz-btn.big:hover { box-shadow: 0 6px 26px rgba(177,140,255,.45); }

/* 滤波实验台 */
.fl-alm { stroke: var(--red); stroke-width: 1.4; stroke-dasharray: 6 5; opacity: .7; }
.tm-tr.rawf { stroke: #8d9aad; stroke-width: 1.5; }

/* ── 图示库 ── */
.fig { margin: 16px 0; background: var(--deep); border: 1px solid var(--line); border-radius: 10px; padding: 14px 14px 10px; }
.fig svg { width: 100%; height: auto; display: block; }
.fig-cap { font-size: 13px; color: var(--muted); text-align: center; margin-top: 8px; line-height: 1.6; padding: 0 8px; }
.fg text { fill: var(--text2); font-size: 15.5px; font-family: var(--body); font-weight: 500; }
.fg .t.s { font-size: 14px; }
/* 关键修复：文字类名 s/am/gr/rd 会撞上线条类的 fill:none+stroke，导致文字被描边渲染成"鬼影"。
   必须连 fill 一起 !important 压过 .fg .s 的 fill:none */
.fg text { stroke: none !important; fill: var(--text2) !important; }
.fg text.b { fill: var(--lblstrong) !important; }
.fg text.am { fill: var(--amber2) !important; }
.fg text.gr { fill: var(--green) !important; }
.fg text.rd { fill: var(--red) !important; }
.fg .t.b { fill: var(--lblstrong); font-weight: 700; }
.fg .t.am { fill: var(--amber2); }
.fg .t.s.am { fill: var(--amber2); }
.fg .t.s.gr { fill: var(--green); }
.fg .t.s.rd { fill: var(--red); }
.fg .w { stroke: var(--wire2); stroke-width: 2.6; fill: none; stroke-linecap: round; }
.fg .s { stroke: var(--svgline); stroke-width: 2.4; fill: none; stroke-linecap: round; }
.fg .f { fill: var(--svgline); }
.fg .bx { fill: var(--svgfill); stroke: var(--svgline); stroke-width: 1.6; }
.fg .am { stroke: var(--amber); }
.fg .amsw { stroke: var(--amber); stroke-width: 2.4; }
.fg .w.am, .fg .s.am { stroke: var(--amber); }
.fg .s.am.f { fill: var(--amber); }
.fg .w.bl { stroke: var(--blue); }
.fg .gr { stroke: var(--green); }
.fg .w.gr { stroke: var(--green); }
.fg .rd { stroke: var(--red); }
.fg .thk { stroke-width: 3.2; }
.fg .dash { stroke-dasharray: 5 4; }

/* toast 可点击动作 */
.toast.clickable { cursor: default; }
.toast .t-act { margin-left: 4px; background: none; border: 1px solid var(--line2); color: var(--green); font-family: var(--disp); font-size: 12px; padding: 3px 10px; border-radius: 6px; cursor: pointer; white-space: nowrap; transition: all .15s; }
.toast.gold .t-act { color: var(--amber); }
.toast .t-act:hover { border-color: currentColor; transform: translateY(-1px); }

/* 回到顶部 */
.backtop { position: fixed; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line2); background: var(--panel2); color: var(--amber); cursor: pointer; display: grid; place-items: center; font-size: 17px; z-index: 260; box-shadow: 0 8px 20px rgba(0,0,0,.4); transition: all .15s; }
.backtop:hover { border-color: var(--amber); transform: translateY(-2px); }
.backtop svg { transform: rotate(-90deg); }

/* 测验待确认态 */
.qz-opt.picked { border-color: var(--amber); background: var(--amber-dim); box-shadow: 0 0 0 1px var(--amber); }
.qz-opt.picked .qz-abc { background: var(--amber); color: #191300; }

/* 词典空态推荐 */
.gl-empty { padding: 22px 6px; color: var(--muted); font-size: 13.5px; }
.gl-empty b { display: block; margin-bottom: 10px; color: var(--text2); }
.gl-sug { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.gl-sug button { background: var(--bg2); border: 1px solid var(--line2); color: var(--amber2); border-radius: 16px; padding: 5px 14px; cursor: pointer; font-size: 13px; font-family: var(--body); transition: all .15s; }
.gl-sug button:hover { border-color: var(--amber); transform: translateY(-1px); }


/* 滚动进度条 */
.scroll-prog { position: absolute; left: 0; right: 0; bottom: -1px; height: 2.5px; z-index: 101; }
.scroll-prog i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--amber), var(--green)); transition: width .1s linear; }

/* 移动端导航滚动提示按钮 */
.nav-hint { display: none; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line2); background: var(--panel2); color: var(--amber); cursor: pointer; place-items: center; font-size: 12px; flex-shrink: 0; padding: 0; }
.nav-hint.show { display: grid; }
.nav-hint svg { transform: rotate(90deg); }

/* ══ 3D 元件解剖 ══ */


/* 触屏：术语点按钉住体验优化 */
@media (hover: none) {
  .term { -webkit-tap-highlight-color: rgba(255,179,0,.25); touch-action: manipulation; }
  .tip { max-width: min(340px, 86vw); }
}

/* ── 故障侦探实验 ── */
.fl-wrap { font-size: 14px; }
.fl-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.fl-kicker { font-family: var(--disp); font-size: 11px; letter-spacing: 2px; color: var(--amber); }
.fl-score { font-size: 12.5px; color: var(--text2); background: var(--panel3); padding: 3px 10px; border-radius: 6px; }
.fl-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.fl-tab { width: 34px; height: 30px; border-radius: 7px; border: 1px solid var(--line2); background: var(--bg2); color: var(--text2); cursor: pointer; font-weight: 600; }
.fl-tab.on { border-color: var(--amber); color: var(--amber); box-shadow: 0 0 0 1px var(--amber) inset; }
.fl-tab.ok { border-color: var(--green); color: var(--green); background: var(--green-dim); }
.fl-head { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; font-size: 15.5px; color: var(--hd); }
.fl-cat { font-size: 11px; padding: 2px 8px; border-radius: 5px; background: var(--amber-dim); color: var(--amber2); white-space: nowrap; }
.fl-sym { background: var(--panel3); border: 1px solid var(--line); border-radius: 9px; padding: 12px 14px; margin-bottom: 12px; }
.fl-sym b { color: var(--muted); font-size: 12px; letter-spacing: 1px; display: block; margin-bottom: 5px; }
.fl-sym p { margin: 0; color: var(--text); line-height: 1.65; }
.fl-sus b { display: block; color: var(--muted); font-size: 12px; letter-spacing: 1px; margin-bottom: 8px; }
.fl-sus-btn { display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left; padding: 10px 13px; margin-bottom: 7px; border-radius: 9px; border: 1px solid var(--line2); background: var(--bg2); color: var(--text); cursor: pointer; font-size: 13.5px; line-height: 1.5; }
.fl-sus-btn i { font-style: normal; font-family: var(--disp); color: var(--muted); flex-shrink: 0; }
.fl-sus-btn:hover:not(:disabled) { border-color: var(--amber); }
.fl-sus-btn.right { border-color: var(--green); background: var(--green-dim); }
.fl-sus-btn.wrong { border-color: var(--red); opacity: .55; }
.fl-sus-btn:disabled { cursor: default; }
.fl-verdict { border-radius: 9px; padding: 11px 14px; margin-top: 10px; font-size: 13.5px; line-height: 1.6; }
.fl-verdict.ok { background: var(--green-dim); border: 1px solid var(--green); color: var(--text); }
.fl-verdict.ok b { color: var(--green); }
.fl-verdict.bad { background: var(--red-dim); border: 1px dashed var(--red); color: var(--text2); }
.fl-cap { margin-top: 12px; font-size: 12.5px; color: var(--muted); background: var(--panel3); border-radius: 8px; padding: 9px 13px; border: 1px dashed var(--line2); }
/* ── 每日热身卡 ── */
.warm-card { display: flex; align-items: center; gap: 14px; padding: 14px 18px; margin: 0 0 16px; border-radius: 12px; border: 1px solid var(--amber); background: linear-gradient(140deg, rgba(255,179,0,.12), rgba(255,179,0,.03)); animation: warmPulse 2.4s infinite; }
.warm-card.done { border-color: var(--green); background: var(--green-dim); animation: none; }
.warm-card .w-ico { font-size: 26px; }
.warm-card .w-txt b { display: block; color: var(--hd); font-size: 14.5px; margin-bottom: 2px; }
.warm-card .w-txt span { font-size: 12.5px; color: var(--text2); }
.warm-card .btn { margin-left: auto; white-space: nowrap; }
@keyframes warmPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(255,179,0,.28); } 50% { box-shadow: 0 0 0 7px rgba(255,179,0,0); } }
html[data-theme="light"] .warm-card .w-txt b { color: var(--hd); }

/* ══════════ 移动端优化（≤700px / 触屏） ══════════ */
@media (max-width: 700px) {
  /* 图形：保持文字可读——设最小宽，容器横向滑 */
  .fig { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .fig svg { min-width: 640px; }
  /* 表格：宽表横向滑而不是压扁 */
  .ls-table { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .ls-table table { min-width: 540px; }
  /* 流程图：换行 */
  .flow { flex-wrap: wrap; justify-content: center; }
  /* 大幅实验 SVG：横向滑 + 提示 */
  .cir-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .cir-wrap svg.cir { min-width: 660px; }
  .tm-svg { min-width: 600px; }
  /* 步骤圆点：可点的目标加大 */
  #lh-dots { gap: 12px; padding: 6px 0; }
  .lh-dot { width: 14px; height: 14px; }
  /* 微课底栏按钮：44px 触控高度 */
  #lf-prev, #lf-next { min-height: 46px; padding: 12px 18px; }
  /* 小测选项：舒适触控高度 */
  .qz-opt { min-height: 48px; padding: 12px 14px; }
  .fl-sus-btn { min-height: 48px; }
  /* 热身卡：允许换行 */
  .warm-card { flex-wrap: wrap; }
  .warm-card .btn { margin-left: 0; flex: 1; min-height: 44px; }
  /* 弹窗全屏化更易读 */
  .modal { max-height: 92vh; }
  /* 提示/toast 避开刘海 */
  .toasts { right: calc(12px + env(safe-area-inset-right, 0px)); }
  .tip { max-width: min(320px, 84vw); }
}
/* 触屏通用：禁双击缩放延迟、醒目触控反馈 */
@media (hover: none) {
  button, .nav a, .lh-dot, .term { touch-action: manipulation; }
  .lab-card:active, .qz-opt:active, .fl-sus-btn:active { transform: scale(.985); }
}

/* ══════════ 移动端紧凑化 + 卡片横滑（v2） ══════════ */
@media (max-width: 700px) {
  /* —— 卡片网格 → 横滑轮播（页面长度减半以上） —— */
  .phase-grid, .hw-grid, .st-grid, .rs-grid {
    display: flex !important; overflow-x: auto; gap: 11px;
    scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
    padding: 4px 16px 10px; margin: 0 -16px;
    scrollbar-width: none;
  }
  .phase-grid::-webkit-scrollbar, .hw-grid::-webkit-scrollbar, .st-grid::-webkit-scrollbar, .rs-grid::-webkit-scrollbar { display: none; }
  .phase-grid > *, .hw-grid > *, .st-grid > *, .rs-grid > * {
    flex: 0 0 min(74vw, 292px); scroll-snap-align: start; margin: 0;
  }
  /* 周卡片：横滑大卡 */
  .weeks {
    display: flex; overflow-x: auto; gap: 12px;
    scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
    padding: 12px 16px; margin: 0 -16px; scrollbar-width: none;
  }
  .weeks::-webkit-scrollbar { display: none; }
  .weeks > * { flex: 0 0 82vw; scroll-snap-align: start; }
  /* —— 紧凑化：留白与字号 —— */
  .hero-main { padding: 24px 20px; }
  .hero-main h1 { font-size: 27px; line-height: 1.28; }
  .hero-sub { font-size: 13px; margin-bottom: 16px; }
  .hero-panel { padding: 18px 16px; }
  .sec-head { margin: 26px 0 12px; }
  .sec-head h2 { font-size: 19px; }
  .lab-card { padding: 15px 16px; }
  .lab-card h4 { font-size: 15px; }
  .lab-note { padding: 11px 13px; font-size: 12.5px; margin-bottom: 12px; }
  .wk { padding: 13px 14px; }
  .wk-title { font-size: 14px; }
  .gl-card { padding: 12px 14px; }
  .phase-card { padding: 13px 15px; }
  /* 横滑提示：右缘渐隐 */
  .phase-grid, .hw-grid, .weeks, .st-grid, .rs-grid {
    -webkit-mask-image: linear-gradient(to right, #000 92%, transparent);
    mask-image: linear-gradient(to right, #000 92%, transparent);
  }
}
