/* =========================================================================
   WLI·LAB —— 设计系统
   ========================================================================= */
:root {
  --bg: #060b10;
  --bg2: #0a1219;
  --panel: #0d171f;
  --panel2: #101e28;
  --panel3: #14242f;
  --line: rgba(122, 170, 190, 0.14);
  --line2: rgba(122, 170, 190, 0.28);
  --txt: #dceaf0;
  --dim: #8aa3b0;
  --faint: #5f7885;
  --acc: #4fe0c8;
  --acc-dim: rgba(79, 224, 200, 0.12);
  --amber: #ffb454;
  --violet: #9d8cff;
  --red: #ff6b5e;
  --green: #5ee0a0;
  --mono: "JetBrains Mono", "Cascadia Mono", Consolas, "SFMono-Regular", monospace;
  --sans: "Inter", "HarmonyOS Sans SC", "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, sans-serif;
  --radius: 12px;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--txt);
  font: 14px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 500px at 12% -8%, rgba(79, 224, 200, 0.10), transparent 60%),
    radial-gradient(800px 600px at 92% 8%, rgba(157, 140, 255, 0.08), transparent 62%),
    radial-gradient(1000px 800px at 60% 110%, rgba(255, 180, 84, 0.05), transparent 60%),
    var(--bg);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(120, 170, 190, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 170, 190, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 50% 0%, black 0%, transparent 78%);
}
body.modal-open { overflow: hidden; }

::selection { background: rgba(79, 224, 200, 0.25); }
a { color: var(--acc); text-decoration: none; }
b, strong { font-weight: 600; }
.mono { font-family: var(--mono); }
.muted { color: var(--dim); }
.faint { color: var(--faint); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.acc { color: var(--acc); }
.amber { color: var(--amber); }
.violet { color: var(--violet); }
.red { color: var(--red); }
.green { color: var(--green); }
.nowrap { white-space: nowrap; }
.row { display: flex; align-items: center; gap: 10px; }
.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.mb8 { margin-bottom: 8px; } .mb16 { margin-bottom: 16px; }

/* ------------------------------------------------------------------ topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 28px;
  height: 66px;
  padding: 0 28px;
  background: rgba(6, 11, 16, 0.78);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(130%);
}
.brand { display: flex; align-items: center; gap: 11px; color: var(--txt); }
.brandmark { display: grid; place-items: center; filter: drop-shadow(0 0 12px rgba(79, 224, 200, 0.25)); }
.brandtext { display: flex; flex-direction: column; line-height: 1.15; }
.brandtext b { font: 700 17px/1 var(--mono); letter-spacing: 0.14em; }
.brandtext b span { color: var(--acc); }
.brandtext i { font-style: normal; font-size: 10.5px; color: var(--faint); letter-spacing: 0.14em; margin-top: 4px; }
.mainnav { display: flex; gap: 4px; margin-left: 10px; }
.mainnav a {
  position: relative;
  padding: 8px 15px;
  color: var(--dim);
  font-size: 13.5px;
  border-radius: 8px;
  transition: 0.18s;
}
.mainnav a:hover { color: var(--txt); background: rgba(255, 255, 255, 0.03); }
.mainnav a.active { color: var(--acc); }
.mainnav a.active::after {
  content: "";
  position: absolute;
  left: 15px; right: 15px; bottom: 3px;
  height: 2px;
  background: var(--acc);
  border-radius: 2px;
  box-shadow: 0 0 10px var(--acc);
}
.topright { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.ring {
  --p: 0%;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: conic-gradient(var(--acc) var(--p), rgba(255, 255, 255, 0.07) 0);
  display: grid; place-items: center;
  transition: background 0.4s;
}
.ring-inner {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: #0a1218;
  display: grid; place-items: center;
  border: 1px solid rgba(79, 224, 200, 0.1);
}
.ring-inner b { font: 600 11px var(--mono); color: var(--acc); }
.ring-inner span { display: none; }
.ring.mini { width: 42px; height: 42px; }
.ring.mini .ring-inner { width: 34px; height: 34px; }
.ring.mini .ring-inner b { font-size: 10px; }
.iconbtn {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line2);
  background: rgba(255, 255, 255, 0.02);
  color: var(--dim);
  font: 600 14px var(--mono);
  cursor: pointer;
  transition: 0.18s;
}
.iconbtn:hover { color: var(--acc); border-color: rgba(79, 224, 200, 0.5); }

/* ------------------------------------------------------------------ layout */
#view {
  max-width: 1460px;
  margin: 0 auto;
  padding: 34px 36px 70px;
  min-height: calc(100vh - 150px);
}
.view-enter { animation: viewIn 0.35s ease both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.sitefoot {
  border-top: 1px solid var(--line);
  padding: 18px 36px;
  color: var(--faint);
  font-size: 11.5px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.sitefoot b { color: var(--dim); font-family: var(--mono); letter-spacing: 0.1em; }

.page-head { margin-bottom: 26px; }
.kicker {
  font: 600 10.5px var(--mono);
  letter-spacing: 0.22em;
  color: var(--acc);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.page-head h1, .hero-title {
  font-size: 34px;
  line-height: 1.22;
  margin: 0 0 10px;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.page-head h1 em, .hero-title em {
  font-style: normal;
  color: var(--acc);
  text-shadow: 0 0 30px rgba(79, 224, 200, 0.25);
}
.lead { color: var(--dim); font-size: 14.5px; max-width: 820px; margin: 0; }
.lead b { color: var(--txt); font-weight: 500; }

/* ------------------------------------------------------------------ home */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 38px;
  align-items: center;
  padding: 22px 0 44px;
}
.hero-copy { max-width: 620px; }
.hero-title { font-size: 46px; letter-spacing: -0.02em; }
.hero-sub { color: var(--dim); font-size: 15px; line-height: 1.8; margin: 16px 0 26px; }
.hero-sub b { color: var(--text, #dceaf0); font-weight: 500; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stage {
  position: relative;
  height: 470px;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 30%, #0e1b24, #060b10 70%);
  box-shadow: var(--shadow);
}
.hero-stage canvas { width: 100%; height: 100%; display: block; }
.hero-stage .stage-badge {
  position: absolute; left: 16px; top: 14px;
  font: 600 10px var(--mono); letter-spacing: 0.16em;
  color: var(--acc); background: rgba(6, 14, 18, 0.65);
  border: 1px solid rgba(79, 224, 200, 0.25);
  padding: 5px 9px; border-radius: 5px;
  backdrop-filter: blur(6px);
}
.hero-stage .stage-hint {
  position: absolute; right: 14px; bottom: 12px;
  font-size: 10.5px; color: var(--faint); font-family: var(--mono);
}
.hero-stats { display: flex; gap: 34px; margin-top: 34px; flex-wrap: wrap; }
.hero-stats div b { display: block; font: 600 24px var(--mono); color: var(--txt); }
.hero-stats div span { font-size: 11px; color: var(--faint); letter-spacing: 0.08em; }
.hero-stats div b i { font-style: normal; font-size: 12px; color: var(--acc); }

.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 34px 0 16px; }
.section-head h2 { font-size: 20px; margin: 0; font-weight: 600; }
.section-head .kicker { margin-bottom: 4px; }
.section-head p { margin: 0; color: var(--faint); font-size: 12px; }

.track-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.track {
  position: relative;
  display: block;
  padding: 26px 26px 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(150deg, rgba(16, 30, 40, 0.85), rgba(9, 17, 23, 0.9));
  color: var(--txt);
  overflow: hidden;
  transition: 0.24s;
}
.track:hover { border-color: rgba(79, 224, 200, 0.35); transform: translateY(-2px); box-shadow: 0 16px 46px rgba(0, 0, 0, 0.4); }
.track::after {
  content: "";
  position: absolute; right: -60px; top: -60px;
  width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(79, 224, 200, 0.12), transparent 70%);
}
.track .tno { font: 600 11px var(--mono); color: var(--acc); letter-spacing: 0.2em; }
.track h3 { margin: 8px 0 6px; font-size: 21px; }
.track p { margin: 0; color: var(--dim); font-size: 13px; max-width: 92%; }
.track .tmeta { margin-top: 18px; display: flex; gap: 16px; font: 11px var(--mono); color: var(--faint); }
.track .tmeta span { color: var(--dim); }

.lab-cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.lab-card {
  display: block;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(13, 23, 31, 0.75);
  color: var(--txt);
  transition: 0.2s;
  min-height: 132px;
}
.lab-card:hover { border-color: rgba(79, 224, 200, 0.32); background: rgba(17, 32, 42, 0.9); }
.lab-card .lnum { font: 600 10px var(--mono); color: var(--faint); letter-spacing: 0.15em; }
.lab-card h4 { margin: 8px 0 5px; font-size: 14px; line-height: 1.35; }
.lab-card p { margin: 0; font-size: 11.5px; color: var(--faint); line-height: 1.5; }
.lab-card .ldone { margin-top: 10px; font: 10px var(--mono); color: var(--green); }

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 18px;
  border-radius: 8px;
  border: 1px solid var(--line2);
  background: rgba(255, 255, 255, 0.025);
  color: var(--txt);
  font-family: var(--sans);
  font-size: 13px;
  cursor: pointer;
  transition: 0.18s;
  white-space: nowrap;
}
.btn:hover { border-color: rgba(79, 224, 200, 0.5); color: var(--acc); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn.primary {
  background: linear-gradient(180deg, #55e8d1, #2fbfa9);
  border-color: transparent;
  color: #04211d;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(79, 224, 200, 0.18);
}
.btn.primary:hover { filter: brightness(1.06); color: #04211d; }
.btn.ghost { background: transparent; }
.btn.amber { border-color: rgba(255, 180, 84, 0.4); color: var(--amber); }
.btn.sm { height: 30px; padding: 0 12px; font-size: 12px; border-radius: 6px; }
.btn.link { border: 0; background: none; color: var(--acc); height: auto; padding: 0; }
.spinner {
  width: 13px; height: 13px;
  border: 2px solid rgba(0, 0, 0, 0.25);
  border-top-color: currentColor;
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------ cards */
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(16, 30, 40, 0.72), rgba(10, 18, 24, 0.86));
  overflow: hidden;
}
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.card-head h3 { margin: 0; font-size: 14px; font-weight: 600; }
.card-head .sub { font-size: 11px; color: var(--faint); font-family: var(--mono); }
.card-body { padding: 18px; }
.card.pad { padding: 20px; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 10px; }
.kpi {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(8, 15, 20, 0.55);
}
.kpi-label { font-size: 10.5px; color: var(--faint); letter-spacing: 0.04em; }
.kpi-value { font: 600 20px/1.35 var(--mono); color: var(--txt); margin-top: 3px; }
.kpi-value span { font-size: 10px; color: var(--faint); margin-left: 4px; font-weight: 400; }
.kpi-value.acc { color: var(--acc); }
.kpi-value.amber { color: var(--amber); }
.kpi-value.red { color: var(--red); }
.kpi-value.green { color: var(--green); }
.kpi-sub { font-size: 10px; color: var(--faint); margin-top: 3px; }

.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font: 500 10.5px var(--mono);
  letter-spacing: 0.06em;
  border: 1px solid rgba(79, 224, 200, 0.25);
  color: var(--acc);
  background: rgba(79, 224, 200, 0.06);
}
.tag.amber { color: var(--amber); border-color: rgba(255, 180, 84, 0.3); background: rgba(255, 180, 84, 0.07); }
.tag.violet { color: var(--violet); border-color: rgba(157, 140, 255, 0.3); background: rgba(157, 140, 255, 0.07); }
.tag.red { color: var(--red); border-color: rgba(255, 107, 94, 0.3); background: rgba(255, 107, 94, 0.07); }
.tag.green { color: var(--green); border-color: rgba(94, 224, 160, 0.3); background: rgba(94, 224, 160, 0.07); }
.tag.dim { color: var(--dim); border-color: var(--line2); background: rgba(255, 255, 255, 0.02); }

/* ------------------------------------------------------------------ learn */
.learn-shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); gap: 26px; align-items: start; }
.chapter-nav {
  position: sticky; top: 88px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(10, 18, 24, 0.75);
  overflow: hidden;
}
.chapter-nav .cn-head { padding: 14px 16px 10px; border-bottom: 1px solid var(--line); }
.chapter-nav .cn-head b { display: block; font-size: 13px; }
.chapter-nav .cn-head span { font: 10px var(--mono); color: var(--faint); letter-spacing: 0.12em; }
.chapter-link {
  display: flex; gap: 11px; align-items: flex-start;
  padding: 11px 15px;
  color: var(--dim);
  border-left: 2px solid transparent;
  transition: 0.16s;
}
.chapter-link:hover { background: rgba(255, 255, 255, 0.025); color: var(--txt); }
.chapter-link.active { color: var(--txt); background: linear-gradient(90deg, rgba(79, 224, 200, 0.10), transparent); border-left-color: var(--acc); }
.chapter-link .no { font: 600 10px var(--mono); color: var(--faint); margin-top: 3px; }
.chapter-link .tt { font-size: 12.5px; line-height: 1.4; }
.chapter-link .tt small { display: block; color: var(--faint); font-size: 10.5px; margin-top: 2px; }
.chapter-link.done .no { color: var(--green); }

.chapter-head { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 20px; }
.chapter-head .big-no {
  font: 700 40px/1 var(--mono);
  color: rgba(79, 224, 200, 0.16);
  letter-spacing: -0.04em;
}
.chapter-head h1 { font-size: 27px; margin: 0 0 6px; }
.chapter-head p { margin: 0; color: var(--dim); max-width: 780px; font-size: 13.5px; }

.stage-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #070d12;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}
.stage-title {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(13, 23, 31, 0.8);
}
.stage-title b { font-size: 12px; font-weight: 500; color: var(--dim); letter-spacing: 0.02em; }
.stage-title .mono { font-size: 10.5px; color: var(--faint); }
.stage-body { position: relative; height: 400px; background: radial-gradient(ellipse at 50% 30%, #0c1820, #060b0f 75%); }
.stage-body.tall { height: 560px; }
.stage-body canvas { width: 100%; height: 100%; display: block; }
.stage-float {
  position: absolute; pointer-events: none;
  font: 10px var(--mono); color: rgba(180, 220, 230, 0.7);
  background: rgba(6, 12, 16, 0.55);
  border: 1px solid rgba(120, 180, 200, 0.14);
  padding: 3px 6px; border-radius: 4px;
  backdrop-filter: blur(4px);
}
.stage-controls {
  border-top: 1px solid var(--line);
  padding: 14px 16px;
  display: flex; gap: 22px; align-items: flex-end; flex-wrap: wrap;
  background: rgba(12, 21, 28, 0.85);
}
.stage-notes {
  display: flex; gap: 18px; flex-wrap: wrap;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  color: var(--faint); font-size: 11px;
  background: rgba(8, 14, 19, 0.6);
}
.stage-notes b { color: var(--dim); font-weight: 500; }

.controls { display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-end; }
.field { min-width: 130px; }
.field > label { display: flex; justify-content: space-between; gap: 10px; font-size: 11px; color: var(--faint); margin-bottom: 7px; }
.field > label b { color: var(--txt); font: 500 11px var(--mono); }
.field input[type=range] {
  -webkit-appearance: none;
  width: 100%;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(79, 224, 200, 0.7), rgba(79, 224, 200, 0.15));
  outline: none;
}
.field input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--acc);
  border: 2px solid #061014;
  box-shadow: 0 0 10px rgba(79, 224, 200, 0.5);
  cursor: pointer;
}
.field input[type=range]::-moz-range-thumb {
  width: 13px; height: 13px; border-radius: 50%; background: var(--acc); border: 2px solid #061014; cursor: pointer;
}
.field select {
  width: 100%; height: 32px;
  background: #0b161e; color: var(--txt);
  border: 1px solid var(--line2); border-radius: 6px;
  padding: 0 8px; font: 12px var(--sans);
  outline: none;
}
.field select:focus { border-color: rgba(79, 224, 200, 0.5); }

.seg { display: inline-flex; border: 1px solid var(--line2); border-radius: 7px; overflow: hidden; }
.seg button {
  height: 30px; padding: 0 12px;
  border: 0; background: transparent; color: var(--dim);
  font: 11.5px var(--sans); cursor: pointer;
}
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: rgba(79, 224, 200, 0.14); color: var(--acc); }

.readouts { display: flex; gap: 22px; flex-wrap: wrap; }
.readout { min-width: 96px; }
.readout span { display: block; font: 10px var(--mono); color: var(--faint); letter-spacing: 0.04em; }
.readout b { font: 600 17px var(--mono); color: var(--txt); }
.readout b i { font-style: normal; font-size: 10px; color: var(--faint); margin-left: 3px; }
.readout.acc b { color: var(--acc); }
.readout.amber b { color: var(--amber); }

.explain-grid { display: grid; grid-template-columns: 1.35fr 0.85fr; gap: 18px; margin-top: 20px; align-items: start; }
.prose { font-size: 13.5px; line-height: 1.85; color: #b9cdd6; }
.prose h3 { font-size: 15px; margin: 20px 0 8px; color: var(--txt); }
.prose h3:first-child { margin-top: 0; }
.prose p { margin: 0 0 12px; }
.prose b { color: var(--txt); font-weight: 600; }
.prose ul { margin: 0 0 12px; padding-left: 18px; }
.prose li { margin-bottom: 6px; }
.prose .hl { color: var(--acc); }
.prose .am { color: var(--amber); }
.prose code { font: 12px var(--mono); background: rgba(79, 224, 200, 0.07); padding: 1px 5px; border-radius: 4px; color: #b9f3e8; }
.prose table { width: 100%; border-collapse: collapse; font-size: 12px; margin: 10px 0; }
.prose th, .prose td { text-align: left; padding: 7px 9px; border-bottom: 1px solid var(--line); }
.prose th { color: var(--faint); font-weight: 500; }

.formula {
  border: 1px solid var(--line);
  border-left: 3px solid var(--acc);
  background: rgba(79, 224, 200, 0.035);
  padding: 12px 14px;
  border-radius: 0 8px 8px 0;
  font: 14px/1.9 var(--mono);
  color: #cdeee8;
  margin: 10px 0;
  overflow-x: auto;
}
.formula small { display: block; font: 11px var(--sans); color: var(--faint); margin-top: 4px; }
.var { color: var(--amber); font-style: italic; }

.callout {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.015);
  font-size: 12px;
  color: var(--dim);
  line-height: 1.7;
}
.callout b { color: var(--txt); }
.callout.amber { border-color: rgba(255, 180, 84, 0.22); background: rgba(255, 180, 84, 0.04); }
.callout.amber b { color: var(--amber); }
.callout.violet { border-color: rgba(157, 140, 255, 0.22); background: rgba(157, 140, 255, 0.04); }
.callout.violet b { color: var(--violet); }
.callout + .callout { margin-top: 10px; }

.spec-list { display: grid; gap: 0; }
.spec-row { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.spec-row:last-child { border: 0; }
.spec-row span { color: var(--faint); }
.spec-row b { font: 500 12px var(--mono); color: var(--txt); }

/* ------------------------------------------------------------------ quiz */
.quiz {
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(160deg, rgba(16, 29, 38, 0.7), rgba(9, 16, 21, 0.8));
  padding: 18px 20px;
}
.quiz-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 12px; }
.quiz-head h4 { margin: 2px 0 0; font-size: 15px; }
.quiz-score { font: 12px var(--mono); color: var(--dim); }
.quiz-score b { font-size: 18px; color: var(--acc); }
.quiz-item { padding: 14px 0; border-top: 1px solid var(--line); }
.quiz-q { font-size: 13.5px; display: flex; gap: 10px; align-items: baseline; }
.qno { font: 600 10px var(--mono); color: var(--faint); }
.quiz-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0 0 26px; }
.quiz-opt {
  display: flex; gap: 9px; align-items: flex-start;
  text-align: left;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.015);
  color: var(--dim);
  font: 12.5px/1.5 var(--sans);
  cursor: pointer;
  transition: 0.15s;
}
.quiz-opt:hover { border-color: var(--line2); color: var(--txt); }
.quiz-opt .opt-key { font: 600 10px var(--mono); color: var(--faint); margin-top: 2px; }
.quiz-opt.sel { border-color: rgba(79, 224, 200, 0.55); background: rgba(79, 224, 200, 0.08); color: var(--txt); }
.quiz-opt.correct { border-color: rgba(94, 224, 160, 0.55); background: rgba(94, 224, 160, 0.09); color: #d7f7e6; }
.quiz-opt.wrong { border-color: rgba(255, 107, 94, 0.5); background: rgba(255, 107, 94, 0.07); color: #ffd5d0; }
.quiz-opt.disabled { cursor: default; }
.quiz-explain { display: none; margin: 10px 0 0 26px; padding: 9px 12px; font-size: 12px; line-height: 1.7; color: var(--dim); border-left: 2px solid rgba(79, 224, 200, 0.35); background: rgba(79, 224, 200, 0.03); border-radius: 0 6px 6px 0; }
.quiz-explain.show { display: block; }
.quiz-explain b { color: var(--acc); margin-right: 4px; }
.quiz-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.quiz-hint { font-size: 11.5px; color: var(--faint); }

/* ------------------------------------------------------------------ labs */
.lab-head { display: flex; justify-content: space-between; gap: 24px; align-items: flex-end; margin-bottom: 18px; flex-wrap: wrap; }
.lab-head h1 { font-size: 28px; margin: 4px 0 6px; }
.lab-head p { margin: 0; color: var(--dim); max-width: 760px; font-size: 13px; }
.lab-meta { display: flex; gap: 8px; flex-wrap: wrap; }

.stepper {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 20px;
  background: rgba(9, 16, 21, 0.7);
}
.step { display: flex; gap: 10px; align-items: center; padding: 11px 16px; color: var(--faint); font-size: 12px; border-right: 1px solid var(--line); }
.step:last-child { border-right: 0; }
.step b { font: 600 10px var(--mono); color: var(--faint); border: 1px solid var(--line2); width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; }
.step.on { color: var(--txt); background: rgba(79, 224, 200, 0.06); }
.step.on b { color: #04211d; background: var(--acc); border-color: var(--acc); }
.step.done b { color: var(--green); border-color: rgba(94, 224, 160, 0.4); }

.lab-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 18px; align-items: start; }
.lab-stage { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #070d12; }
.lab-stage .stage-body { height: 390px; }
.lab-stage .stage-body.short { height: 300px; }
.lab-panel { border: 1px solid var(--line); border-radius: 12px; background: rgba(12, 21, 28, 0.8); }
.panel-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.panel-head h3 { margin: 0; font-size: 13px; }
.panel-body { padding: 16px; }
.panel-body + .panel-body { border-top: 1px solid var(--line); }

.task-box {
  border: 1px solid rgba(255, 180, 84, 0.22);
  background: rgba(255, 180, 84, 0.04);
  border-radius: 9px;
  padding: 12px 14px;
  font-size: 12px;
  color: var(--dim);
  line-height: 1.7;
}
.task-box b { color: var(--amber); }
.task-box .spec { font-family: var(--mono); color: var(--txt); }

.lab-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.progress-line { height: 3px; background: rgba(255, 255, 255, 0.07); border-radius: 2px; overflow: hidden; margin-top: 12px; }
.progress-line i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--acc), #7ef0dc); transition: width 0.2s; }

.chart-box { position: relative; height: 250px; }
.chart-box.tall { height: 320px; }
.chart-box.short { height: 180px; }
.chart-box canvas { width: 100%; height: 100%; display: block; }
.surface-box { height: 430px; border-radius: 9px; overflow: hidden; background: #060b0f; border: 1px solid var(--line); }
.surface-box canvas { width: 100%; height: 100%; display: block; }

.data-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.data-table th {
  text-align: left; font-weight: 500; font-size: 10.5px; letter-spacing: 0.05em;
  color: var(--faint); padding: 7px 8px; border-bottom: 1px solid var(--line2);
}
.data-table td { padding: 7px 8px; border-bottom: 1px solid var(--line); color: var(--txt); font-family: var(--mono); font-size: 11.5px; }
.data-table td.name { font-family: var(--sans); font-size: 12px; }
.data-table tr:hover td { background: rgba(255, 255, 255, 0.02); }
.data-table .ok { color: var(--green); }
.data-table .bad { color: var(--red); }

.result-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.verdict {
  display: flex; gap: 14px; align-items: center;
  padding: 13px 16px; border-radius: 9px;
  border: 1px solid rgba(94, 224, 160, 0.25);
  background: rgba(94, 224, 160, 0.05);
}
.verdict.fail { border-color: rgba(255, 107, 94, 0.3); background: rgba(255, 107, 94, 0.05); }
.verdict .vicon { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(94, 224, 160, 0.12); color: var(--green); font: 700 16px var(--mono); }
.verdict.fail .vicon { background: rgba(255, 107, 94, 0.12); color: var(--red); }
.verdict b { display: block; font-size: 13px; }
.verdict span { font-size: 11.5px; color: var(--dim); }

.method-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.method { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: rgba(8, 14, 19, 0.6); }
.method .mt { font-size: 10.5px; color: var(--faint); }
.method .mv { font: 600 18px var(--mono); margin-top: 3px; }
.method .md { font-size: 10.5px; color: var(--faint); margin-top: 2px; }
.method.hi { border-color: rgba(79, 224, 200, 0.3); }

.records-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start; }
.profile-card { padding: 20px; }
.profile-card .avatar {
  width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, rgba(79, 224, 200, 0.35), rgba(79, 224, 200, 0.08));
  border: 1px solid rgba(79, 224, 200, 0.3);
  font: 700 20px var(--mono); color: var(--acc);
}
.profile-card h3 { margin: 12px 0 2px; font-size: 16px; }
.profile-card .pmeta { font-size: 11px; color: var(--faint); }
.profile-card .pstat { display: flex; gap: 20px; margin-top: 16px; }
.profile-card .pstat div b { display: block; font: 600 19px var(--mono); }
.profile-card .pstat div span { font-size: 10px; color: var(--faint); }
.timeline { display: grid; gap: 8px; }
.tl-item { display: flex; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: rgba(9, 16, 21, 0.55); align-items: center; }
.tl-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 8px var(--acc); flex: none; }
.tl-item .tlt { font-size: 12.5px; }
.tl-item .tld { font: 10px var(--mono); color: var(--faint); margin-left: auto; white-space: nowrap; }

.empty { text-align: center; padding: 60px 20px; color: var(--faint); }
.empty h2 { color: var(--dim); font-size: 18px; }

/* ------------------------------------------------------------------ modal / toast */
.modal-back {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(2, 6, 9, 0.72);
  backdrop-filter: blur(6px);
  display: grid; place-items: center;
  padding: 24px;
  animation: fadeIn 0.18s ease;
}
@keyframes fadeIn { from { opacity: 0; } }
.modal {
  width: 640px; max-width: 100%; max-height: 86vh;
  background: #0c161d;
  border: 1px solid var(--line2);
  border-radius: 14px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6);
  display: flex; flex-direction: column;
  animation: modalIn 0.22s cubic-bezier(0.2, 0.9, 0.3, 1);
}
.modal.wide { width: 860px; }
@keyframes modalIn { from { transform: translateY(12px) scale(0.99); opacity: 0; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-title { font-size: 15px; font-weight: 600; }
.modal-body { padding: 20px; overflow: auto; font-size: 13px; line-height: 1.8; color: #b9cdd6; }
.modal-body p { margin: 0 0 12px; }
.modal-body h4 { margin: 18px 0 8px; color: var(--txt); font-size: 13.5px; }
.modal-body h4:first-child { margin-top: 0; }
.modal-body ul { margin: 0 0 12px; padding-left: 18px; }
.modal-body li { margin-bottom: 5px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); }
.modal-text { color: var(--dim); }
.field-inline { display: flex; gap: 12px; }
.field-inline .field { flex: 1; }
.field-inline input[type=text] {
  width: 100%; height: 34px; background: #0a1319; border: 1px solid var(--line2);
  border-radius: 6px; color: var(--txt); padding: 0 10px; outline: none; font: 12.5px var(--sans);
}
.field-inline input[type=text]:focus { border-color: rgba(79, 224, 200, 0.5); }

.toastwrap { position: fixed; right: 22px; bottom: 22px; z-index: 200; display: grid; gap: 8px; }
.toast {
  padding: 10px 15px;
  border-radius: 8px;
  background: #10242c;
  border: 1px solid rgba(79, 224, 200, 0.3);
  color: #cdeee8;
  font-size: 12.5px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  opacity: 0; transform: translateY(6px);
  transition: 0.25s;
  max-width: 360px;
}
.toast.show { opacity: 1; transform: none; }
.toast.warn { border-color: rgba(255, 180, 84, 0.4); color: #ffe0b8; }
.toast.error { border-color: rgba(255, 107, 94, 0.4); color: #ffd3ce; }

/* ------------------------------------------------------------------ misc */
.hr { height: 1px; background: var(--line); margin: 16px 0; }
.pill-row { display: flex; gap: 6px; flex-wrap: wrap; }
.note { font-size: 11px; color: var(--faint); line-height: 1.6; }
.note b { color: var(--dim); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; background: var(--green); box-shadow: 0 0 8px var(--green); }
.status-dot.warn { background: var(--amber); box-shadow: 0 0 8px var(--amber); }

.learn-tip {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px;
  border: 1px dashed rgba(79, 224, 200, 0.22);
  border-radius: 9px;
  color: var(--dim); font-size: 12px;
  background: rgba(79, 224, 200, 0.025);
}
.learn-tip .k { font: 600 10px var(--mono); color: var(--acc); letter-spacing: 0.1em; }

.chapter-footer { display: flex; justify-content: space-between; gap: 16px; margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); }
.chapter-footer a { font-size: 12.5px; color: var(--dim); }
.chapter-footer a:hover { color: var(--acc); }

@media (max-width: 1240px) {
  .lab-cards { grid-template-columns: repeat(3, 1fr); }
  .hero-title { font-size: 38px; }
}
@media (max-width: 1080px) {
  #view { padding: 24px 20px 60px; }
  .hero { grid-template-columns: 1fr; }
  .hero-stage { height: 380px; }
  .learn-shell { grid-template-columns: 1fr; }
  .chapter-nav { position: static; display: grid; grid-template-columns: repeat(3, 1fr); }
  .chapter-nav .cn-head { grid-column: 1 / -1; }
  .chapter-link { border-left: 0; border-bottom: 2px solid transparent; }
  .chapter-link.active { border-left: 0; border-bottom-color: var(--acc); }
  .explain-grid { grid-template-columns: 1fr; }
  .lab-grid { grid-template-columns: 1fr; }
  .records-grid { grid-template-columns: 1fr; }
  .lab-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .topbar { padding: 0 14px; gap: 10px; }
  .brandtext i { display: none; }
  .mainnav a { padding: 8px 9px; font-size: 12px; }
  .hero-title { font-size: 30px; }
  .page-head h1 { font-size: 25px; }
  .track-grid { grid-template-columns: 1fr; }
  .quiz-opts { grid-template-columns: 1fr; }
  .stage-body { height: 300px; }
  .stage-body.tall { height: 420px; }
  .method-cards { grid-template-columns: 1fr; }
  .lab-cards { grid-template-columns: 1fr; }
  .chapter-nav { grid-template-columns: 1fr 1fr; }
  .stepper { grid-template-columns: 1fr 1fr; }
}


/* ---------------------------------------------------------------- 3D 热点标签 */
.hotspot-label {
  position: absolute;
  left: 0; top: 0;
  display: flex; align-items: center; gap: 6px;
  padding: 3px 8px 3px 4px;
  border-radius: 20px;
  background: rgba(6, 13, 17, 0.72);
  border: 1px solid rgba(120, 180, 195, 0.28);
  color: #b9d5dc;
  font: 10.5px/1.2 var(--sans);
  white-space: nowrap;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: border-color .15s, background .15s, color .15s;
  z-index: 4;
  pointer-events: auto;
  will-change: transform;
}
.hotspot-label i {
  width: 17px; height: 17px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(79, 224, 200, 0.12);
  color: var(--acc);
  font: 600 9px var(--mono);
  font-style: normal;
}
.hotspot-label:hover, .hotspot-label.hover, .hotspot-label.on {
  border-color: rgba(79, 224, 200, 0.65);
  background: rgba(10, 30, 36, 0.92);
  color: #e4fbf7;
}
.hotspot-label.on i { background: var(--acc); color: #04211d; }
.btn.on { border-color: rgba(79, 224, 200, .5); color: var(--acc); background: rgba(79,224,200,.08); }

textarea::placeholder { color: #4d6570; }
select:disabled, input:disabled { opacity: .8; }

.lab-wrap { max-width: 1460px; }
.lab-stage .stage-body canvas { cursor: grab; }
.surface-box > div { height: 100%; }
.surface-box canvas { cursor: grab; }

/* ---------------------------------------------------------------- mobile polish */
@media (max-width: 720px) {
  .topbar {
    flex-wrap: wrap;
    height: auto;
    padding: 9px 14px 0;
    gap: 8px;
    align-items: center;
  }
  .brand { gap: 8px; }
  .brandmark svg { width: 28px; height: 28px; }
  .brandtext b { font-size: 15px; letter-spacing: .10em; }
  .topright { gap: 8px; }
  .topright .iconbtn { width: 30px; height: 30px; }
  .ring.mini { width: 36px; height: 36px; }
  .ring.mini .ring-inner { width: 30px; height: 30px; }
  .mainnav {
    order: 3;
    width: 100%;
    margin: 0;
    padding: 3px 0 0;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    gap: 0;
  }
  .mainnav a {
    flex: 1;
    text-align: center;
    padding: 8px 2px 9px;
    font-size: 11.5px;
    white-space: nowrap;
  }
  .mainnav a.active::after { left: 22%; right: 22%; bottom: 4px; }

  #view { padding: 20px 14px 56px; }
  .page-head h1, .hero-title { font-size: 28px; line-height: 1.28; }
  .page-head h1 { font-size: 24px; }
  .lead { font-size: 13px; }
  .kicker { font-size: 9.5px; letter-spacing: .12em; overflow-wrap: anywhere; }
  .hero { padding: 6px 0 30px; gap: 22px; }
  .hero-copy { max-width: 100%; min-width: 0; }
  .hero-sub { font-size: 13px; line-height: 1.75; margin: 12px 0 20px; }
  .hero-actions { gap: 8px; }
  .hero-actions .btn { height: 35px; padding: 0 12px; font-size: 12px; }
  .hero-stats { gap: 14px 20px; margin-top: 24px; }
  .hero-stats div { flex: 1 1 38%; }
  .hero-stats div b { font-size: 21px; }
  .hero-stage { height: 300px; border-radius: 12px; }
  .stage-badge { font-size: 9px; left: 10px; top: 10px; }
  .hero-stage .stage-hint { display: none; }

  .section-head { margin: 26px 0 12px; }
  .section-head h2 { font-size: 17px; }
  .track-grid, .grid2 { grid-template-columns: 1fr !important; }
  .lab-cards { grid-template-columns: 1fr !important; }
  .track { padding: 18px; }
  .track h3 { font-size: 18px; }
  .track p { max-width: 100%; }

  .learn-shell { gap: 16px; }
  .chapter-nav { grid-template-columns: 1fr 1fr; border-radius: 10px; }
  .chapter-nav .cn-head { padding: 10px 12px 8px; }
  .chapter-link { padding: 9px 10px; gap: 8px; }
  .chapter-link .tt { font-size: 11.5px; }
  .chapter-link .tt small { font-size: 10px; }
  .chapter-head { gap: 10px; }
  .chapter-head .big-no { font-size: 30px; }
  .chapter-head h1 { font-size: 22px; }
  .stage-body, .lab-stage .stage-body { height: 290px; }
  .stage-body.tall { height: 430px; }
  .stage-controls { gap: 12px; padding: 12px; }
  .field { min-width: 118px; flex: 1 1 42%; }
  .stage-notes { gap: 10px; font-size: 10.5px; }
  .quiz { padding: 14px; }
  .quiz-opts { grid-template-columns: 1fr; margin-left: 0; }
  .quiz-q { font-size: 12.5px; }

  .lab-head { gap: 10px; }
  .lab-head h1 { font-size: 24px; }
  .lab-meta .tag { font-size: 9.5px; }
  .stepper { grid-template-columns: 1fr 1fr; }
  .step { padding: 8px 10px; font-size: 11px; }
  .panel-body { padding: 13px; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi-value { font-size: 17px; }
  .chart-box { height: 210px; }
  .chart-box.tall { height: 260px; }
  .surface-box { height: 300px; }
  .data-table { font-size: 10.5px; }
  .data-table th, .data-table td { padding: 6px 5px; }
  .chapter-footer { flex-direction: column; gap: 10px; }
  .sitefoot { padding: 14px; flex-direction: column; gap: 6px; }
}

/* 防止 canvas 固有尺寸把 Grid/Flex 容器撑破（移动端关键） */
html, body, #view { max-width: 100%; }
canvas, img, svg { max-width: 100%; }
.hero, .hero-copy, .hero-stage, .track-grid, .grid2, .lab-cards,
.learn-shell, .chapter-main, .stage-card, .lab-grid, .lab-stage, .lab-panel {
  min-width: 0;
}
.mainnav { min-width: 0; }


/* ---------------------------------------------------------------- v2 账号 / 登录 */
.userarea { display: flex; align-items: center; gap: 8px; }
.userchip {
  display: flex; align-items: center; gap: 7px;
  height: 36px; padding: 0 11px 0 5px;
  border: 1px solid var(--line2); border-radius: 20px;
  color: var(--txt); background: rgba(255,255,255,.02);
  font-size: 12px; transition: .18s; white-space: nowrap;
}
.userchip:hover { border-color: rgba(79,224,200,.45); color: var(--acc); }
.userchip.guest { padding: 0 14px; color: var(--dim); }
.userchip .ua {
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(79,224,200,.14); color: var(--acc);
  font: 600 11px var(--mono);
}
.userchip .un { max-width: 92px; overflow: hidden; text-overflow: ellipsis; }
.userchip .ur { font: 9px var(--mono); color: var(--faint); letter-spacing: .06em; }

.login-wrap {
  display: grid; grid-template-columns: 1.05fr .85fr; gap: 48px;
  align-items: center; padding: 30px 0 60px; min-height: calc(100vh - 230px);
}
.login-copy h1 { font-size: 48px; line-height: 1.18; margin: 10px 0 18px; letter-spacing: -.02em; }
.login-copy p { color: var(--dim); font-size: 14px; max-width: 480px; line-height: 1.8; }
.login-card { padding: 22px; max-width: 460px; width: 100%; justify-self: end; }
.auth-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.auth-tabs button {
  flex: 1; height: 38px; background: none; border: 0; border-bottom: 2px solid transparent;
  color: var(--faint); font: 13px var(--sans); cursor: pointer;
}
.auth-tabs button.on { color: var(--acc); border-bottom-color: var(--acc); }
.login-body input[type=text], .login-body input[type=password] {
  width: 100%; height: 36px; background: #0a1319; border: 1px solid var(--line2);
  border-radius: 7px; color: var(--txt); padding: 0 10px; outline: none; font: 13px var(--sans);
}
.login-body input:focus { border-color: rgba(79,224,200,.55); }
.login-body .field { margin-bottom: 12px; }

/* ---------------------------------------------------------------- v2 教师端 / 任务 */
.teacher-top { display: flex; gap: 14px; align-items: stretch; }
.mini-select {
  height: 32px; background: #0b161e; border: 1px solid var(--line2);
  border-radius: 6px; color: var(--txt); padding: 0 8px; font: 12px var(--sans);
}
.teacher-tabs { display: flex; gap: 4px; }
.teacher-tabs button {
  height: 30px; padding: 0 12px; border: 0; border-radius: 6px;
  background: transparent; color: var(--faint); font: 12px var(--sans); cursor: pointer;
}
.teacher-tabs button.on { background: rgba(79,224,200,.12); color: var(--acc); }
.teacher-tabs i { font-style: normal; font: 9px var(--mono); margin-left: 5px; color: var(--faint); }

.task-list { display: grid; gap: 10px; }
.task-card {
  display: flex; justify-content: space-between; gap: 18px; align-items: center;
  padding: 16px 18px; border: 1px solid var(--line); border-radius: 10px;
  background: rgba(12,21,28,.7);
}
.task-card .tc-title { font-size: 16px; margin: 2px 0 5px; }
.task-card .tc-side { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.task-card .tc-side .tag { align-self: flex-end; }

@media (max-width: 900px) {
  .login-wrap { grid-template-columns: 1fr; gap: 22px; padding-top: 10px; }
  .login-copy h1 { font-size: 34px; }
  .login-card { justify-self: stretch; max-width: none; }
}
@media (max-width: 720px) {
  .userchip .un, .userchip .ur { display: none; }
  .userchip { padding: 0 3px 0 3px; width: 34px; height: 34px; justify-content: center; }
  .userchip .ua { width: 28px; height: 28px; }
  .userchip.guest { width: auto; padding: 0 10px; }
  .task-card { flex-direction: column; align-items: flex-start; }
  .task-card .tc-side { flex-direction: row; align-items: center; width: 100%; justify-content: space-between; }
  .teacher-top .row { flex-wrap: wrap; }
}

.mini-bar { width: 92px; height: 5px; background: rgba(255,255,255,.08); border-radius: 3px; overflow: hidden; display: inline-block; vertical-align: middle; margin-right: 7px; }
.mini-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--acc), #7ef0dc); border-radius: 3px; }
.filter-row { display: flex; gap: 6px; margin-bottom: 10px; }
.filter-row button { height: 28px; padding: 0 10px; border: 1px solid var(--line); border-radius: 5px; background: transparent; color: var(--faint); font: 11.5px var(--sans); cursor: pointer; }
.filter-row button.on { color: var(--acc); border-color: rgba(79,224,200,.4); background: rgba(79,224,200,.08); }

.cam-views { position: absolute; right: 12px; bottom: 12px; z-index: 6; display: flex; align-items: center; gap: 4px;
  background: rgba(6,12,16,.72); border: 1px solid rgba(120,170,190,.25); border-radius: 6px; padding: 4px 6px; backdrop-filter: blur(6px); }
.cam-views span { font: 9px var(--mono); color: var(--faint); margin-right: 4px; letter-spacing: .08em; }
.cam-views button { height: 22px; padding: 0 8px; border: 0; border-radius: 4px; background: transparent; color: var(--dim); font: 10.5px var(--sans); cursor: pointer; }
.cam-views button.on { background: rgba(79,224,200,.14); color: var(--acc); }

/* ---------------------------------------------------------------- v2.1 量测工作台 */
body.wb-open { overflow: hidden; }
.wb-overlay {
  position: fixed; inset: 0; z-index: 500; display: flex; flex-direction: column;
  background: #061117; color: #cfe4ea;
  font: 12px/1.5 var(--sans);
}
.wb-top {
  height: 48px; flex: none; display: flex; align-items: center; gap: 18px;
  padding: 0 14px; background: #0a1a22; border-bottom: 1px solid #1b3a46;
}
.wb-brand { font: 700 13px var(--mono); letter-spacing: .16em; color: #6fe8d6; display: flex; align-items: center; gap: 8px; }
.wb-brand i { font-style: normal; font-size: 9px; color: #557783; letter-spacing: .1em; }
.wb-dot { width: 7px; height: 7px; border-radius: 50%; background: #4fe0c8; box-shadow: 0 0 10px #4fe0c8; }
.wb-title { font-size: 13px; color: #dcecf1; margin-left: 8px; }
.wb-title span { color: #5f7f8c; margin-left: 10px; font-size: 11px; }
.wb-status { margin-left: auto; font: 10px var(--mono); letter-spacing: .1em; color: #6f929e; }
.wb-status em { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #4fe0c8; margin-right: 6px; }
.wb-status em.amber { background: #ffb454; }
.wb-actions { display: flex; gap: 6px; }
.wb-btn {
  height: 28px; padding: 0 12px; border: 1px solid #24505c; border-radius: 4px;
  background: #0d2731; color: #9fd7e2; font: 11px var(--sans); cursor: pointer;
}
.wb-btn:hover { border-color: #4fe0c8; color: #4fe0c8; }
.wb-body { flex: 1; display: flex; min-height: 0; }
.wb-side {
  width: 196px; flex: none; padding: 10px; border-right: 1px solid #16333e;
  background: #081820; overflow-y: auto;
}
.wb-group { border-bottom: 1px solid #12303a; padding-bottom: 8px; margin-bottom: 8px; }
.wb-label { font: 9px var(--mono); color: #52727e; letter-spacing: .15em; margin: 4px 0 6px; }
.wb-menu {
  width: 100%; display: flex; justify-content: space-between; align-items: baseline;
  padding: 6px 7px; margin-bottom: 2px; border: 0; border-radius: 3px;
  background: transparent; color: #a8c6cf; cursor: pointer; text-align: left;
}
.wb-menu:hover { background: #0e2a34; }
.wb-menu b { font: 600 10px var(--mono); letter-spacing: .08em; color: #7fd7d0; }
.wb-menu span { font-size: 10px; color: #557783; }
.wb-check { display: flex; align-items: center; gap: 6px; font-size: 11px; color: #9cb8c1; padding: 4px 2px; cursor: pointer; }
.wb-kv { display: flex; justify-content: space-between; padding: 3px 4px; font-size: 10.5px; color: #6f929e; }
.wb-kv b { font: 500 10.5px var(--mono); color: #bfe0e6; }
.wb-main { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 8px; gap: 8px; position: relative; }
.wb-live {
  position: absolute; inset: 8px 8px auto 8px; z-index: 9; display: none;
  padding: 7px 12px; background: rgba(5,18,24,.92); border: 1px solid #24505c; border-radius: 4px;
}
.wb-live.on { display: block; }
.wb-live-bar { height: 3px; background: #13323c; border-radius: 2px; overflow: hidden; margin-bottom: 6px; }
.wb-live-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #4fe0c8, #7ef0dc); }
.wb-live span { font: 10px var(--mono); color: #9fd7e2; }
.wb-quad { flex: 1; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 8px; min-height: 0; }
.wb-panel { display: flex; flex-direction: column; min-height: 0; border: 1px solid #16333e; background: #07151c; border-radius: 3px; overflow: hidden; }
.wb-panel header {
  flex: none; height: 25px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 9px; background: #0b202a; border-bottom: 1px solid #16333e;
  font: 600 10px var(--mono); letter-spacing: .10em; color: #8fc4cf;
}
.wb-panel header i { font-style: normal; font-weight: 400; color: #4f7380; font-size: 9px; }
.wb-canvas { flex: 1; min-height: 0; position: relative; }
.wb-canvas canvas { width: 100%; height: 100%; display: block; }
.wb-stats { flex: none; display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.wb-stat { background: #081b23; border: 1px solid #16333e; border-radius: 3px; padding: 7px 9px; }
.wb-stat span { display: block; font: 9px var(--mono); color: #52727e; letter-spacing: .08em; }
.wb-stat b { font: 600 17px var(--mono); color: #dff8f4; }
.wb-stat i { font-style: normal; font-size: 9px; color: #5f8a96; margin-left: 4px; }
.wb-stat em { display: block; font-style: normal; font-size: 9px; color: #4f7380; margin-top: 1px; }
.wb-theory {
  width: 360px; flex: none; display: none; border-left: 1px solid #1d4653; background: #081820;
  overflow-y: auto;
}
.wb-theory.on { display: block; }
.wb-theory-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid #16333e; font: 600 12px var(--mono); color: #6fe8d6; }
.wb-x { background: none; border: 0; color: #6f929e; font-size: 18px; cursor: pointer; }
.wb-theory-body { padding: 12px 16px 30px; }
.wb-theory-body h4 { margin: 16px 0 6px; font-size: 12.5px; color: #dcecf1; }
.wb-theory-body p { margin: 0 0 8px; font-size: 11.5px; line-height: 1.75; color: #9cb8c1; }
.wb-formula { background: #06141a; border-left: 2px solid #4fe0c8; padding: 7px 10px; margin: 7px 0 10px; font: 11px/1.7 var(--mono); color: #b9f3e8; }
.wb-callout { margin-top: 14px; padding: 8px 10px; border: 1px solid #2b4a55; background: #0b2028; font-size: 10.5px; color: #7fa2ad; }
@media (max-width: 1180px) {
  .wb-side { width: 168px; }
  .wb-theory { width: 300px; }
  .wb-stats { grid-template-columns: repeat(3, 1fr); }
}

.wb-inline { display: flex; align-items: center; gap: 5px; padding: 2px 4px; }
.wb-inline input { width: 56px; height: 22px; background: #06141a; border: 1px solid #24505c; color: #cfe4ea; font: 10px var(--mono); padding: 0 4px; border-radius: 3px; }
.wb-inline span { font: 10px var(--mono); color: #6f929e; }

.wb-compare { flex: none; display: flex; align-items: center; gap: 16px; padding: 5px 9px; margin-top: -2px;
  border: 1px solid #16333e; background: #07151c; border-radius: 3px; font: 10px var(--mono); color: #6f929e; }
.wb-compare span b, .wb-compare i b { color: #dff8f4; font-style: normal; }
.wb-compare i { font-style: normal; color: #6f929e; }
.wb-compare em { margin-left: auto; font-style: normal; color: #ffb454; }

.lab-actions .wb-hint { display:block; margin-top:7px; font:10px var(--mono); color:var(--faint); letter-spacing:.03em; }

.hs-divider { height:1px; background:var(--line); margin:10px 0 9px; }
.hs-anim { margin-top:8px; padding:6px 8px; border-left:2px solid var(--acc); background:rgba(79,224,200,.06);
  font:10px var(--mono); color:var(--acc); letter-spacing:.03em; }

.part-hud { position:absolute; left:14px; bottom:14px; z-index:8; width:min(380px, 46%); display:none;
  padding:10px 12px; background:rgba(5,14,18,.90); border:1px solid rgba(79,224,200,.32);
  border-radius:6px; backdrop-filter:blur(8px); box-shadow:0 10px 30px rgba(0,0,0,.35); }
.part-hud.on { display:block; }
.ph-top { display:flex; align-items:center; gap:8px; }
.ph-top b { font-size:13px; color:#e6fbf7; }
.ph-top .tag { font-size:8px; }
.ph-x { margin-left:auto; background:none; border:0; color:#6f929e; font-size:16px; cursor:pointer; }
.part-hud p { margin:6px 0; font-size:11px; line-height:1.65; color:#a9c6ce; }
.part-hud .hs-anim { margin-top:4px; }
.ph-hint { margin-top:6px; font:9px var(--mono); color:#4f7380; }

/* ---------------------------------------------------------------- v2.4 运行监视器 */
#labStage { position: relative; }
.run-hud { position: absolute; left: 14px; bottom: 14px; z-index: 30; width: min(540px, calc(100% - 28px));
  background: rgba(4,13,18,.94); border: 1px solid rgba(79,224,200,.35); border-radius: 7px;
  padding: 9px 11px 8px; box-shadow: 0 18px 45px rgba(0,0,0,.5); backdrop-filter: blur(8px); }
.rh-top { display: flex; align-items: center; gap: 8px; font: 10px var(--mono); color: #8fc4cf; }
.rh-top b { color: #6fe8d6; letter-spacing: .12em; }
.rh-top i { font-style: normal; color: #5f7f8c; margin-left: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rh-top span { margin-left: auto; color: #ffb454; }
.rh-dot { width: 7px; height: 7px; border-radius: 50%; background: #ffb454; box-shadow: 0 0 10px #ffb454; animation: rhpulse 0.9s infinite; }
.rh-dot.done { background: #4fe0c8; box-shadow: 0 0 10px #4fe0c8; animation: none; }
@keyframes rhpulse { 50% { opacity: .3; } }
.rh-canvas { position: relative; margin: 7px 0 6px; border: 1px solid #16333e; background: #061117; }
.rh-canvas canvas { display: block; width: 100%; height: auto; }
.rh-tag { position: absolute; right: 5px; top: 4px; font: 8px var(--mono); color: #3f8794; letter-spacing: .08em; }
.rh-bar { height: 3px; background: #102a34; border-radius: 2px; overflow: hidden; margin-bottom: 7px; }
.rh-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg,#4fe0c8,#9ff7e8); transition: width .12s linear; }
.rh-steps { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 5px; }
.rh-steps span { font: 9px var(--mono); color: #4f7380; padding: 2px 5px; border: 1px solid #16333e; border-radius: 3px; }
.rh-steps span.on { color: #4fe0c8; border-color: rgba(79,224,200,.45); background: rgba(79,224,200,.07); }
.rh-steps span.done { color: #8fd9cf; border-color: #24505c; }
.rh-log { max-height: 46px; overflow: hidden; font: 9.5px/1.45 var(--mono); color: #7fa2ad; }
.rh-log em { font-style: normal; color: #ffb454; margin-right: 6px; }

.rh-motion { display:flex; align-items:center; gap:12px; margin:8px 0 7px; font:9px var(--mono); color:#5f7f8c; }
.rh-motion span { display:flex; gap:4px; align-items:baseline; }
.rh-motion b { font:600 13px var(--mono); color:#dff8f4; }
.rh-motion em { margin-left:auto; font-style:normal; color:#ffb454; letter-spacing:.08em; }

.run-hud { width: min(420px, calc(100% - 28px)) !important; }
.rh-path { display:flex; align-items:center; gap:4px; font:9px var(--mono); color:#4f7380; margin:5px 0 6px; }
.rh-path span { padding:2px 5px; border:1px solid #16333e; border-radius:3px; }
.rh-path span.on { color:#4fe0c8; border-color:rgba(79,224,200,.5); background:rgba(79,224,200,.10); }
.rh-path i { font-style:normal; color:#2b5b66; }

.run-hud { left: auto !important; right: 14px; width: min(400px, calc(100% - 28px)) !important; }

.run-hud { position: static !important; left: auto; right: auto; width: 100% !important; margin: 8px 0 0;
  border-radius: 6px; box-shadow: none; }
.rh-log { max-height: 30px; }

.rh-schematic { border:1px solid #16333e; background:#061117; margin:6px 0 3px; }
.rh-schematic canvas { display:block; width:100%; height:auto; }

.rh-main { display:grid; grid-template-columns: 1.15fr 1fr; gap:8px; align-items:center; }
.rh-side { min-width:0; }
.rh-schematic { margin:0; }
.rh-steps { margin-bottom:4px; }

/* ---------------------------------------------------------------- v2.7 AI 助教 */
.ai-fab { position: fixed; right: 22px; bottom: 22px; z-index: 440; height: 42px; padding: 0 16px;
  border: 1px solid rgba(79,224,200,.55); border-radius: 22px; background: #0b2730; color: #7ef0dc;
  font: 600 12px var(--sans); letter-spacing: .04em; cursor: pointer; box-shadow: 0 8px 30px rgba(0,0,0,.4); }
.ai-fab:hover { background: #10404a; }
.ai-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #4fe0c8; margin-right: 6px; box-shadow: 0 0 10px #4fe0c8; }
body.wb-open .ai-fab, body.wb-open .ai-panel { display: none; }
.ai-panel { position: fixed; right: 22px; bottom: 76px; z-index: 450; width: min(400px, calc(100vw - 44px)); max-height: 620px;
  display: none; flex-direction: column; background: #071319; border: 1px solid #1d4653; border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0,0,0,.55); overflow: hidden; }
.ai-panel.on { display: flex; }
.ai-head { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 10px 12px;
  background: #0b2029; border-bottom: 1px solid #16333e; }
.ai-head b { display: block; font: 600 12px var(--mono); color: #6fe8d6; letter-spacing: .08em; }
.ai-head span { display: block; font: 9px var(--mono); color: #5f7f8c; margin-top: 2px; }
.ai-head-actions { display: flex; gap: 4px; }
.ai-head-actions button { height: 24px; padding: 0 8px; border: 1px solid #24505c; border-radius: 4px; background: transparent; color: #9fd7e2; font: 10px var(--sans); cursor: pointer; }
.ai-head-actions button:hover { border-color: #4fe0c8; color: #4fe0c8; }
.ai-msgs { flex: 1; min-height: 120px; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 9px; }
.ai-msg { display: flex; flex-direction: column; max-width: 100%; }
.ai-msg.me { align-items: flex-end; }
.ai-bubble { max-width: 96%; padding: 8px 10px; border-radius: 8px; font: 11.5px/1.7 var(--sans); white-space: pre-wrap; word-break: break-word; }
.ai-msg.ai .ai-bubble { background: #0c222b; border: 1px solid #16333e; color: #cfe4ea; border-top-left-radius: 2px; }
.ai-msg.me .ai-bubble { background: rgba(79,224,200,.13); border: 1px solid rgba(79,224,200,.35); color: #dff8f4; border-top-right-radius: 2px; }
.ai-cites { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; align-items: center; }
.ai-cites span { font: 8px var(--mono); color: #4f7380; }
.ai-cites i { font-style: normal; font: 8px var(--mono); color: #7fa2ad; border: 1px solid #16333e; border-radius: 3px; padding: 1px 4px; }
.ai-suggest { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.ai-suggest button { border: 1px solid #24505c; border-radius: 4px; background: transparent; color: #9fd7e2; font: 9.5px var(--sans); padding: 3px 6px; cursor: pointer; }
.ai-suggest button:hover { border-color: #4fe0c8; }
.ai-chips { flex: none; display: flex; gap: 4px; flex-wrap: wrap; padding: 0 12px 7px; }
.ai-chips button { border: 1px solid #16333e; border-radius: 10px; background: transparent; color: #6f929e; font: 9px var(--sans); padding: 3px 7px; cursor: pointer; }
.ai-chips button:hover { color: #4fe0c8; border-color: rgba(79,224,200,.4); }
.ai-input { flex: none; display: flex; gap: 6px; padding: 8px 10px; border-top: 1px solid #16333e; background: #081820; }
.ai-input textarea { flex: 1; resize: none; background: #061117; border: 1px solid #24505c; border-radius: 5px; color: #dff8f4; font: 11px/1.5 var(--sans); padding: 6px 7px; outline: none; }
.ai-input textarea:focus { border-color: rgba(79,224,200,.55); }
.ai-input button { width: 52px; border: 1px solid rgba(79,224,200,.55); border-radius: 5px; background: #0d3a40; color: #7ef0dc; font: 11px var(--sans); cursor: pointer; }
.ai-foot { flex: none; padding: 5px 10px 8px; font: 8.5px var(--mono); color: #456872; }
.ai-review { background: #07151c !important; }
.ai-score { font: 700 26px var(--mono); color: #4fe0c8; display: flex; align-items: baseline; gap: 6px; margin-bottom: 7px; }
.ai-score span { font: 9px var(--mono); color: #5f7f8c; }
.ai-score em { margin-left: auto; font: 700 10px var(--sans); color: #ffb454; }
.ai-check { display: grid; grid-template-columns: 14px 1fr; gap: 3px 5px; margin: 4px 0; font-size: 10.5px; }
.ai-check b { color: #4fe0c8; }
.ai-check.no b { color: #ff7a6b; }
.ai-check span { color: #cfe4ea; }
.ai-check small { grid-column: 2; color: #6f929e; font-size: 9.5px; line-height: 1.5; }
.ai-check.no small { color: #ffb454; }
.ai-note { margin: 8px 0 0; padding-top: 6px; border-top: 1px solid #16333e; font: 9px/1.5 var(--mono); color: #5f7f8c; }

/* ---------------------------------------------------------------- 操作员第一人称 */
.op-hud { position:absolute; left:12px; top:12px; z-index:9; width:300px; padding:10px 11px;
  background:rgba(5,14,18,.91); border:1px solid rgba(79,224,200,.38); border-radius:7px;
  box-shadow:0 10px 35px rgba(0,0,0,.35); backdrop-filter:blur(8px); }
.op-head { display:flex; align-items:center; gap:7px; }
.op-head b { font:700 12px var(--mono); color:#6fe8d6; letter-spacing:.06em; }
.op-head span { font:8px var(--mono); color:#5f7f8c; }
.op-head button { margin-left:auto; border:1px solid #24505c; background:transparent; color:#9fd7e2; border-radius:4px; height:22px; padding:0 7px; font:9px var(--sans); cursor:pointer; }
.op-sub { margin:6px 0 7px; font:9px/1.6 var(--mono); color:#6f929e; }
.op-steps { display:flex; gap:3px; flex-wrap:wrap; margin-bottom:7px; }
.op-steps span { font:8px var(--mono); color:#4f7380; border:1px solid #16333e; border-radius:3px; padding:2px 4px; }
.op-steps span.on { color:#ffb454; border-color:rgba(255,180,84,.55); background:rgba(255,180,84,.08); }
.op-steps span.done { color:#4fe0c8; border-color:#24505c; }
.op-actions { display:flex; gap:4px; flex-wrap:wrap; }
.op-actions button { height:24px; padding:0 7px; border:1px solid #24505c; border-radius:4px; background:transparent; color:#9fd7e2; font:9px var(--sans); cursor:pointer; }
.op-actions button:hover { border-color:#4fe0c8; color:#4fe0c8; }
.op-actions button.primary { background:#0d3a40; border-color:rgba(79,224,200,.55); color:#7ef0dc; }
.op-tip { margin-top:7px; font:9.5px/1.55 var(--mono); color:#7fa2ad; }
.op-reticle { position:fixed; left:50%; top:48%; width:22px; height:22px; margin:-11px 0 0 -11px;
  border:1px solid rgba(79,224,200,.55); border-radius:50%; pointer-events:none; z-index:8; }
.op-reticle::before, .op-reticle::after { content:""; position:absolute; background:rgba(79,224,200,.55); }
.op-reticle::before { left:9px; top:-7px; width:1px; height:6px; }
.op-reticle::after { left:9px; bottom:-7px; width:1px; height:6px; }
#setupPanel.flash { animation: opflash 1.2s ease; }
@keyframes opflash { 0%,100% { box-shadow:none; } 40% { box-shadow:0 0 0 2px rgba(255,180,84,.6) inset; } }
@media (max-width: 720px) { .op-hud { width:250px; } .op-reticle { display:none; } }

.lab-stage.op-immersive { position:fixed; inset:8px; z-index:600; background:#050c10; display:flex; flex-direction:column; box-shadow:0 0 0 1px #1d4653, 0 20px 80px rgba(0,0,0,.65); }
.lab-stage.op-immersive .stage-title { flex:none; }
.lab-stage.op-immersive .stage-body { flex:1; height:auto; min-height:0; }
.lab-stage.op-immersive .stage-notes { flex:none; }
body:has(.lab-stage.op-immersive) .ai-fab, body:has(.lab-stage.op-immersive) .ai-panel { display:none; }

/* ---------------------------------------------------------------- 实操模式：三维区放大 + 参数面板悬浮 */
.lab-grid.practice { display:block; position:relative; }
.lab-grid.practice .lab-stage { height:min(78vh,760px); display:flex; flex-direction:column; }
.lab-grid.practice .lab-stage .stage-body { flex:1; height:auto; min-height:0; }
.lab-grid.practice .lab-panel { position:absolute; right:12px; top:12px; width:360px; max-height:calc(100% - 24px);
  overflow:auto; z-index:25; background:rgba(7,15,20,.94); backdrop-filter:blur(10px);
  box-shadow:0 16px 50px rgba(0,0,0,.45); }
.lab-grid.practice .lab-panel .panel-body { padding-top:8px; }
.lab-grid.practice .cam-views { right:384px; }
.lab-grid.practice .stage-notes span:last-child { color:#7fa2ad; }
@media (max-width:900px) {
  .lab-grid.practice .lab-stage { height:66vh; }
  .lab-grid.practice .lab-panel { position:static; width:auto; max-height:none; margin-top:10px; }
  .lab-grid.practice .cam-views { right:12px; }
}

/* ---------------------------------------------------------------- 手动对焦屏 */
.focus-hud { position:absolute; left:50%; bottom:18px; transform:translateX(-50%); z-index:14; width:min(460px,calc(100% - 24px));
  padding:10px 12px; background:rgba(4,13,18,.94); border:1px solid rgba(79,224,200,.5); border-radius:8px;
  box-shadow:0 12px 40px rgba(0,0,0,.5); backdrop-filter:blur(8px); }
.fh-head { display:flex; align-items:baseline; gap:8px; }
.fh-head b { font:700 12px var(--mono); color:#6fe8d6; letter-spacing:.05em; }
.fh-head span { font:9px var(--mono); color:#5f7f8c; }
.fh-sub { margin:5px 0 7px; font:9px/1.5 var(--mono); color:#7fa2ad; }
.focus-hud input[type=range] { width:100%; accent-color:#4fe0c8; cursor:ew-resize; }
.fh-row { display:flex; justify-content:space-between; align-items:baseline; margin-top:2px; }
.fh-row b { font:700 18px var(--mono); color:#dff8f4; }
.fh-row span { font:9px var(--mono); color:#ffb454; }
.fh-row span.ok { color:#4fe0c8; }
.fh-bar { height:4px; background:#123039; border-radius:2px; overflow:hidden; margin:3px 0 7px; }
.fh-bar i { display:block; height:100%; background:linear-gradient(90deg,#ffb454,#4fe0c8); }
.focus-hud button { width:100%; height:28px; }
.focus-hud button:disabled { opacity:.35; cursor:not-allowed; }
@media (max-width:720px) { .focus-hud { bottom:8px; width:calc(100% - 16px); } }

/* ---------------------------------------------------------------- WLI 控制台（对焦 + 扫描设置） */
.lab-grid.op-console .lab-panel { display:none; }
.wli-console { position:absolute; left:50%; bottom:12px; transform:translateX(-50%); z-index:16;
  width:min(860px,calc(100% - 24px)); max-height:calc(100% - 24px); overflow:auto;
  background:rgba(5,14,19,.96); border:1px solid rgba(79,224,200,.52); border-radius:9px;
  box-shadow:0 18px 60px rgba(0,0,0,.6); backdrop-filter:blur(10px); }
.wc-head { display:flex; align-items:center; justify-content:space-between; padding:8px 12px; border-bottom:1px solid #16333e; }
.wc-head b { font:700 12px var(--mono); color:#6fe8d6; letter-spacing:.1em; }
.wc-head span { margin-left:8px; font:8.5px var(--mono); color:#5f7f8c; }
.wc-head button { border:1px solid #24505c; background:transparent; color:#9fd7e2; width:24px; height:22px; border-radius:4px; cursor:pointer; }
.wc-tabs { display:flex; gap:4px; padding:6px 10px 0; }
.wc-tabs button { border:1px solid #16333e; border-bottom:0; border-radius:5px 5px 0 0; background:transparent; color:#6f929e; padding:5px 10px; font:9px var(--mono); cursor:pointer; }
.wc-tabs button.on { background:#0b2029; color:#4fe0c8; border-color:#24505c; }
.wc-body { padding:10px; }
.wc-pane { display:grid; grid-template-columns:1.3fr 1fr; gap:12px; align-items:start; }
.wc-pane[hidden] { display:none; }
.wc-preview { position:relative; background:#050d12; border:1px solid #16333e; border-radius:5px; overflow:hidden; }
.wc-preview canvas { width:100%; height:190px; display:block; }
.wc-live { position:absolute; top:7px; right:8px; font:8px var(--mono); color:#4fe0c8; border:1px solid #24505c; border-radius:3px; padding:1px 4px; }
.wc-controls { display:flex; flex-direction:column; gap:5px; }
.wc-metric { display:flex; justify-content:space-between; font:9px var(--mono); color:#7fa2ad; border-bottom:1px solid #102a33; padding-bottom:3px; }
.wc-metric b { color:#dff8f4; }
.wc-speed { display:flex; gap:4px; }
.wc-speed button { flex:1; height:22px; border:1px solid #24505c; border-radius:4px; background:transparent; color:#9fd7e2; font:8.5px var(--sans); cursor:pointer; }
.wc-speed button.on { border-color:#ffb454; color:#ffb454; background:rgba(255,180,84,.08); }
.wc-controls input[type=range] { width:100%; accent-color:#4fe0c8; }
.wc-z { display:flex; justify-content:space-between; align-items:baseline; }
.wc-z b { font:700 17px var(--mono); color:#dff8f4; }
.wc-z span { font:9px var(--mono); color:#ffb454; }
.wc-z span.ok { color:#4fe0c8; }
.wc-jog { display:flex; gap:4px; }
.wc-jog button { flex:1; height:24px; border:1px solid #24505c; border-radius:4px; background:transparent; color:#9fd7e2; font:10px var(--mono); cursor:pointer; }
.wc-jog button:hover { border-color:#4fe0c8; color:#4fe0c8; }
.wc-scan-head { display:flex; align-items:baseline; gap:8px; margin-bottom:6px; }
.wc-scan-head b { font:700 11px var(--mono); color:#6fe8d6; }
.wc-scan-head span { font:8.5px var(--mono); color:#5f7f8c; }
.wc-pane[data-pane="scan"]:not([hidden]) { display:block; }
#consoleSetup .panel-head { display:none; }
#consoleSetup .panel-body { padding:0; }
#consoleSetup .task-box { display:none; }
#consoleSetup .lab-actions { display:none; }
#consoleSetup .progress-line, #consoleSetup .note { display:none; }
#scanApply { margin-top:8px; width:100%; height:30px; }
@media (max-width:760px) { .wc-pane { grid-template-columns:1fr; } .wc-preview canvas { height:160px; } .wli-console { max-height:calc(100% - 12px); } }

/* ---------------------------------------------------------------- 测量原理显微动画 */
.cinema { position:fixed; inset:0; z-index:900; background:#02070b; overflow:hidden; }
.cinema canvas { position:absolute; inset:0; display:block; }
.cinema-top { position:absolute; left:4vw; right:4vw; top:28px; display:flex; justify-content:space-between;
  font:10px var(--mono); letter-spacing:.18em; color:rgba(120,220,210,.65); pointer-events:none; }
.cinema-top span:last-child { color:rgba(255,180,84,.8); }
.cinema-caption { position:absolute; left:5vw; right:5vw; bottom:74px; max-width:1050px;
  pointer-events:none; }
.cinema-caption b { display:block; font:700 11px var(--mono); color:#6fe8d6; letter-spacing:.12em; margin-bottom:8px; }
.cinema-caption span { display:block; font:400 clamp(16px,1.55vw,24px)/1.55 var(--sans); color:#eafffb;
  text-shadow:0 2px 20px rgba(0,0,0,.8); }
.cinema-progress { position:absolute; left:0; right:0; bottom:0; height:3px; background:rgba(255,255,255,.08); }
.cinema-progress i { display:block; height:100%; width:0; background:linear-gradient(90deg,#4fe0c8,#ffb454); box-shadow:0 0 18px rgba(79,224,200,.6); }
.cinema-skip { position:absolute; right:4vw; top:58px; z-index:2; height:32px; padding:0 14px;
  border:1px solid rgba(79,224,200,.45); border-radius:18px; background:rgba(6,20,24,.7);
  color:#9fd7e2; font:10px var(--mono); letter-spacing:.06em; cursor:pointer; backdrop-filter:blur(6px); }
.cinema-skip:hover { border-color:#4fe0c8; color:#4fe0c8; }
body.cinema-open { overflow:hidden; }
@media (max-width:720px) {
  .cinema-caption { bottom:58px; }
  .cinema-caption span { font-size:14px; }
  .cinema-skip { top:52px; right:16px; }
  .cinema-top { left:16px; right:16px; top:18px; }
}

.cinema-actions { position:absolute; right:4vw; top:54px; z-index:2; display:flex; gap:6px; }
.cinema-actions button { height:30px; padding:0 11px; border:1px solid rgba(79,224,200,.35); border-radius:16px;
  background:rgba(6,20,24,.72); color:#9fd7e2; font:10px var(--mono); cursor:pointer; backdrop-filter:blur(6px); }
.cinema-actions button:hover { border-color:#4fe0c8; color:#4fe0c8; }
.cinema-actions button.primary { border-color:rgba(255,180,84,.55); color:#ffcf8a; }
@media (max-width:720px) { .cinema-actions { top:48px; right:12px; gap:4px; } .cinema-actions button { padding:0 7px; font-size:9px; } }

/* 操作员模式：右侧实验设置由屏内控制台替代 */
.lab-grid.practice .lab-panel { display:none !important; }
.lab-grid.practice .lab-stage { height:min(82vh,800px); }
.lab-grid.practice .cam-views { right:12px; }

.op-actions button:disabled { opacity:.3; cursor:not-allowed; }

/* ---------------------------------------------------------------- 真实感对焦控制台 */
.wli-console { width:min(1040px,calc(100% - 20px)); }
.wc-pane[data-pane="focus"] { grid-template-columns:minmax(0,1.55fr) 330px; gap:9px; }
.wc-camera { position:relative; background:#020609; border:1px solid #1d4653; border-radius:5px; overflow:hidden; min-height:300px; }
.wc-camera canvas { display:block; width:100%; height:auto; aspect-ratio:900/560; }
.cam-top, .cam-bottom { position:absolute; left:10px; right:10px; display:flex; justify-content:space-between;
  font:8.5px var(--mono); color:rgba(190,240,235,.75); letter-spacing:.08em; pointer-events:none; }
.cam-top { top:8px; }
.cam-bottom { bottom:8px; color:rgba(160,210,215,.65); }
.cam-bottom b { color:#ffcf8a; }
.cam-live { position:absolute; right:10px; top:26px; font:8px var(--mono); color:#ff7a6b; letter-spacing:.12em; pointer-events:none; }
.cam-live i { display:inline-block; width:5px; height:5px; border-radius:50%; background:#ff5c4a; margin-right:4px; box-shadow:0 0 8px #ff5c4a; }
.cam-reticle { position:absolute; left:50%; top:50%; width:120px; height:120px; transform:translate(-50%,-50%); pointer-events:none; opacity:.6; }
.cam-reticle .rh { position:absolute; left:0; right:0; top:50%; height:1px; background:rgba(160,255,235,.55); }
.cam-reticle .rv { position:absolute; top:0; bottom:0; left:50%; width:1px; background:rgba(160,255,235,.55); }
.cam-reticle .rc { position:absolute; inset:28px; border:1px solid rgba(160,255,235,.4); border-radius:50%; }
.cam-reticle i[class^=rt] { position:absolute; width:1px; height:7px; background:rgba(160,255,235,.5); left:50%; }
.cam-reticle .rt1 { top:0; } .cam-reticle .rt2 { bottom:0; } .cam-reticle .rt3 { left:0; top:50%; width:7px; height:1px; } .cam-reticle .rt4 { right:0; top:50%; width:7px; height:1px; }
.wc-controls { display:flex; flex-direction:column; gap:5px; min-width:0; }
.wc-zblock { display:flex; align-items:baseline; gap:5px; padding:3px 4px 5px; border-bottom:1px solid #16333e; }
.wc-zblock span { font:8px var(--mono); color:#5f7f8c; letter-spacing:.1em; }
.wc-zblock b { margin-left:auto; font:700 25px var(--mono); color:#dff8f4; letter-spacing:-.02em; }
.wc-zblock em { font:9px var(--mono); color:#7fa2ad; font-style:normal; }
.wc-zblock i { width:7px; height:7px; border-radius:50%; background:#ff7a6b; box-shadow:0 0 8px #ff7a6b; }
.wc-zblock i.ok { background:#4fe0c8; box-shadow:0 0 10px #4fe0c8; }
.wc-zblock span#focusState { font-size:7.5px; color:#ff9a6b; }
.wc-zblock span#focusState.ok { color:#4fe0c8; }
.wc-knob-row { display:flex; align-items:center; gap:12px; padding:2px 0; }
.focus-knob { --angle:-135deg; width:104px; height:104px; border-radius:50%; flex:none; position:relative; cursor:ns-resize;
  background:repeating-conic-gradient(from -135deg, #1b3038 0 2deg, #0b171d 2deg 6deg);
  box-shadow:0 0 0 1px #24505c, inset 0 0 22px rgba(0,0,0,.85), 0 6px 18px rgba(0,0,0,.45); }
.knob-face { position:absolute; inset:10px; border-radius:50%; transform:rotate(var(--angle));
  background:radial-gradient(circle at 35% 30%, #40565c, #101e24 60%, #050c10);
  box-shadow:inset 0 2px 4px rgba(255,255,255,.15), inset 0 -8px 12px rgba(0,0,0,.8), 0 0 0 1px #2d4650; }
.knob-face i { position:absolute; left:50%; top:5px; width:2px; height:18px; margin-left:-1px; background:#4fe0c8; box-shadow:0 0 8px #4fe0c8; border-radius:1px; }
.knob-face span { position:absolute; left:0; right:0; top:43%; text-align:center; font:7px var(--mono); color:#6f929e; letter-spacing:.12em; transform:rotate(calc(-1 * var(--angle))); }
.knob-face em { position:absolute; left:0; right:0; top:56%; text-align:center; font:italic 10px var(--mono); color:#9fd7e2; transform:rotate(calc(-1 * var(--angle))); }
.focus-knob.drag { cursor:grabbing; }
.knob-meta { display:flex; flex-direction:column; gap:2px; }
.knob-meta b { font:8px var(--mono); color:#9fd7e2; letter-spacing:.08em; }
.knob-meta span, .knob-meta small { font:8.5px var(--mono); color:#6f929e; }
.knob-meta small { color:#4f7380; }
.wc-metrics { display:flex; flex-direction:column; gap:4px; }
.wc-meter { display:grid; grid-template-columns:1fr auto; gap:1px 5px; align-items:center; }
.wc-meter span { font:7.5px var(--mono); color:#5f7f8c; letter-spacing:.08em; }
.wc-meter b { font:10px var(--mono); color:#dff8f4; }
.wc-meter i { grid-column:1/-1; height:4px; background:#0d2027; border-radius:2px; overflow:hidden; }
.wc-meter em { display:block; height:100%; width:0; background:linear-gradient(90deg,#ffb454,#4fe0c8); transition:width .08s linear; }
.wc-jog { display:flex; gap:4px; }
.wc-jog button { flex:1; height:25px; border:1px solid #24505c; border-radius:4px; background:transparent; color:#9fd7e2; font:10px var(--mono); cursor:pointer; }
.wc-jog button:hover { border-color:#4fe0c8; color:#4fe0c8; }
.wc-controls .btn { height:27px; }
@media (max-width:900px) { .wc-pane[data-pane="focus"] { grid-template-columns:1fr; } .wc-camera { min-height:220px; } .focus-knob { width:84px; height:84px; } }

/* 扫描设置：仪器参数卡 */
#consoleSetup { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
#consoleSetup .field { background:#07161c; border:1px solid #16333e; border-radius:5px; padding:7px 8px; min-width:0; }
#consoleSetup .field label { display:block; font:8px var(--mono); color:#6f929e; letter-spacing:.08em; margin-bottom:4px; }
#consoleSetup .field select, #consoleSetup .field input { width:100%!important; height:27px!important; background:#0a1c23!important; border:1px solid #24505c!important; border-radius:4px!important; color:#dff8f4!important; font:10px var(--mono)!important; padding:0 7px!important; outline:none; }
#consoleSetup .callout { grid-column:1/-1; background:#08191f; border-left:2px solid #ffb454; padding:7px 9px; font:9px/1.65 var(--mono); color:#7fa2ad; }
#consoleSetup .callout b { color:#dff8f4; }
.wc-scan-head { border-bottom:1px solid #16333e; padding-bottom:5px; }
.wc-scan-head b { font-size:10px!important; }
.wc-scan-head span { font-size:8px!important; }

#consoleSetup > .panel-body { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
#consoleSetup > .panel-body .callout { grid-column:1/-1; }
@media (max-width:760px) { #consoleSetup > .panel-body { grid-template-columns:1fr; } }

/* ---------------------------------------------------------------- 课堂演示：3D 虚拟实验室 */
body.labroom-open { overflow:hidden; background:#050b0e; }
body.labroom-open .topbar, body.labroom-open .sitefoot, body.labroom-open .ai-fab, body.labroom-open .ai-panel { display:none!important; }
.lab-stage.labroom-stage { position:fixed!important; inset:0!important; z-index:650!important; height:100vh!important; border:0!important; border-radius:0!important; background:#050b0e!important; }
.lab-stage.labroom-stage .stage-title, .lab-stage.labroom-stage .stage-notes, .lab-stage.labroom-stage .cam-views { display:none!important; }
.lab-stage.labroom-stage .stage-body { height:100vh!important; }
.labroom-ui { position:fixed; inset:0; z-index:700; pointer-events:none; font-family:var(--sans); }
.lr-top { position:absolute; left:0; right:0; top:0; height:56px; display:flex; align-items:center; gap:18px; padding:0 22px;
  background:linear-gradient(180deg,rgba(4,12,16,.96),rgba(4,12,16,.55)); border-bottom:1px solid rgba(79,224,200,.18); pointer-events:auto; }
.lr-brand { display:flex; align-items:baseline; gap:10px; }
.lr-brand b { font:700 17px var(--mono); color:#6fe8d6; letter-spacing:.12em; }
.lr-brand span { font:9px var(--mono); color:#6f929e; letter-spacing:.08em; }
.lr-clock { margin-left:auto; display:flex; align-items:baseline; gap:8px; border:1px solid #24505c; border-radius:5px; padding:4px 10px; background:rgba(8,24,30,.8); }
.lr-clock span { font:8px var(--mono); color:#5f7f8c; }
.lr-clock b { font:700 15px var(--mono); color:#ffb454; letter-spacing:.08em; }
.lr-actions { display:flex; gap:6px; }
.lr-actions button { height:28px; padding:0 12px; border:1px solid #24505c; border-radius:4px; background:rgba(8,24,30,.8); color:#9fd7e2; font:9px var(--mono); cursor:pointer; }
.lr-actions button:hover { border-color:#4fe0c8; color:#4fe0c8; }
.lr-actions #lrEnter { border-color:rgba(79,224,200,.55); background:#0d3a40; color:#7ef0dc; }
.lr-left, .lr-right { position:absolute; top:76px; bottom:96px; width:270px; overflow:auto; pointer-events:auto;
  background:rgba(5,15,20,.93); border:1px solid #1d4653; border-radius:8px; box-shadow:0 12px 40px rgba(0,0,0,.45); backdrop-filter:blur(8px); }
.lr-left { left:18px; }
.lr-right { right:18px; width:320px; }
.lr-left h4, .lr-right h4 { margin:0; padding:11px 12px 8px; font:700 11px var(--mono); color:#dff8f4; letter-spacing:.08em; border-bottom:1px solid #16333e; }
.lr-left h4 span, .lr-right h4 span { display:block; margin-top:2px; font:7.5px var(--mono); color:#4f7380; letter-spacing:.15em; }
.lr-tools { padding:8px; display:flex; flex-direction:column; gap:5px; }
.lr-tools button { display:grid; grid-template-columns:24px 1fr; grid-template-rows:auto auto; gap:0 8px; text-align:left; padding:7px 8px;
  background:rgba(8,24,30,.7); border:1px solid #16333e; border-radius:5px; color:#9fd7e2; cursor:pointer; }
.lr-tools button:hover { border-color:#24505c; }
.lr-tools button.on { border-color:#4fe0c8; background:rgba(79,224,200,.08); }
.lr-tools i { grid-row:1/3; font:8px var(--mono); color:#4f7380; align-self:center; }
.lr-tools b { font:10px var(--sans); color:#dff8f4; }
.lr-tools small { font:8px var(--mono); color:#6f929e; }
.lr-left-note { padding:8px 12px 12px; font:8px/1.6 var(--mono); color:#5f7f8c; border-top:1px solid #102a33; }
.lr-steps { list-style:none; margin:0; padding:8px; display:flex; flex-direction:column; gap:5px; }
.lr-steps li { display:flex; gap:8px; padding:7px 8px; border:1px solid #16333e; border-radius:5px; background:rgba(8,24,30,.6); cursor:pointer; }
.lr-steps li.on { border-color:#ffb454; background:rgba(255,180,84,.07); }
.lr-steps li b { font:700 10px var(--mono); color:#4f7380; }
.lr-steps li.on b { color:#ffb454; }
.lr-steps strong { display:block; font:10px var(--sans); color:#dff8f4; }
.lr-steps small { display:block; margin-top:2px; font:8px/1.4 var(--mono); color:#6f929e; }
.lr-task { margin:0 8px 8px; padding:8px; border-left:2px solid #4fe0c8; background:#07191f; font:9px/1.65 var(--sans); color:#9fd7e2; }
.lr-task span { display:block; font:8px var(--mono); color:#4f7380; letter-spacing:.1em; margin-bottom:3px; }
.lr-table { display:grid; grid-template-columns:1fr 1fr 1fr; gap:4px; padding:0 8px 8px; }
.lr-table div { background:#07161c; border:1px solid #16333e; border-radius:4px; padding:6px; }
.lr-table span { display:block; font:7.5px var(--mono); color:#5f7f8c; }
.lr-table b { display:block; margin-top:2px; font:10px var(--mono); color:#dff8f4; }
.lr-note { position:absolute; left:306px; right:356px; bottom:18px; min-height:58px; pointer-events:auto;
  background:rgba(5,15,20,.93); border:1px solid #1d4653; border-radius:6px; padding:9px 12px; box-shadow:0 10px 30px rgba(0,0,0,.4); }
.lr-note b { font:8px var(--mono); color:#6fe8d6; letter-spacing:.1em; margin-right:8px; }
.lr-note span { font:10px/1.6 var(--sans); color:#9fd7e2; }
.lr-note em { display:block; margin-top:2px; font:8px var(--mono); color:#4f7380; font-style:normal; }
@media (max-width:1000px) {
  .lr-left { width:220px; } .lr-right { width:260px; } .lr-note { left:250px; right:290px; }
}
@media (max-width:760px) {
  .lr-left { display:none; } .lr-right { right:8px; width:240px; top:66px; bottom:80px; } .lr-note { left:8px; right:8px; bottom:8px; }
  .lr-brand span { display:none; }
}

.mic-parts { display:flex; flex-wrap:wrap; gap:4px; }
.mic-parts button { border:1px solid #24505c; background:transparent; color:#6f929e; padding:4px 6px; border-radius:4px; font:9px var(--sans); cursor:pointer; }
.mic-parts button.on { border-color:#4fe0c8; color:#7ef0dc; background:rgba(79,224,200,.08); }
.mic-jog { display:flex; gap:4px; flex-wrap:wrap; }
.mic-jog button { flex:1; min-width:70px; height:26px; border:1px solid #24505c; border-radius:4px; background:transparent; color:#9fd7e2; font:9px var(--mono); cursor:pointer; }
.mic-jog button:hover { border-color:#4fe0c8; color:#4fe0c8; }
.mic-readout { font:9px var(--mono); color:#7fa2ad; }
.mic-readout b { color:#dff8f4; }

.mic-cam { position:absolute; left:12px; bottom:12px; z-index:7; display:flex; align-items:center; gap:4px; background:rgba(5,14,18,.78); border:1px solid #1d4653; border-radius:5px; padding:3px 5px; }
.mic-cam span { font:8px var(--mono); color:#4f7380; margin-right:2px; letter-spacing:.08em; }
.mic-cam button { height:22px; border:0; border-radius:3px; background:transparent; color:#9fd7e2; font:9px var(--sans); cursor:pointer; padding:0 7px; }
.mic-cam button.on { background:rgba(79,224,200,.14); color:#4fe0c8; }
.mic-cam button:hover { color:#4fe0c8; }

.lab-grid.mic-lab { grid-template-columns:1.55fr .78fr; }
.lab-grid.mic-lab .lab-stage .stage-body { height:560px; }
@media (max-width:900px) { .lab-grid.mic-lab { grid-template-columns:1fr; } .lab-grid.mic-lab .lab-stage .stage-body { height:360px; } }

.op-hud .op-actions { display:none!important; }
.op-hud .op-hint { margin-top:5px; height:24px; border:1px solid #2c5b68; border-radius:4px; background:rgba(8,24,30,.7); color:#9fd7e2; font:9px var(--mono); cursor:pointer; padding:0 8px; }
.op-hud .op-hint:hover { border-color:#4fe0c8; color:#4fe0c8; }
.op-hud .op-head button#opVoice { border-color:rgba(79,224,200,.35); }

.op-hud .op-head b { white-space:nowrap; }
.op-hud .op-head { gap:5px; }
.op-hud .op-head button { padding:0 7px; }
.op-hud { width:340px; }
/* 3D Michelson principle */
.mic3d-canvas { position:absolute; inset:0; width:100%; height:100%; z-index:2; background:#02080b; }
.mic3d-bar { position:absolute; left:12px; top:12px; z-index:5; display:flex; gap:3px; padding:3px; border:1px solid #28434c; background:rgba(5,15,19,.82); border-radius:4px; }
.mic3d-bar button { height:24px; padding:0 8px; border:0; border-radius:3px; background:transparent; color:#8fb4bd; font:9px var(--mono); cursor:pointer; }
.mic3d-bar button.on { background:#103a3e; color:#7ef0dc; }
.mic3d-det { position:absolute; right:12px; top:12px; z-index:5; padding:4px; border:1px solid #2a505a; background:rgba(5,15,19,.88); border-radius:4px; }
.mic3d-det canvas { width:180px; height:135px; display:block; }
.mic3d-tools { display:grid; grid-template-columns:minmax(150px,1.2fr) repeat(3,minmax(110px,1fr)); gap:8px 12px; width:100%; }
.mic3d-source label, .mic3d-slider label { display:flex; justify-content:space-between; gap:8px; margin-bottom:5px; color:#8fb4bd; font:10px var(--sans); }
.mic3d-source select { width:100%; height:28px; background:#07161c; border:1px solid #2a444d; color:#dff8f4; border-radius:4px; padding:0 6px; font:10px var(--mono); }
.mic3d-slider b { color:#7ef0dc; font:9px var(--mono); font-weight:400; }
.mic3d-slider input { width:100%; }
@media (max-width: 900px) { .mic3d-tools { grid-template-columns:1fr 1fr; } .mic3d-det { display:none; } }

/* instrument optical/scan overlays */
.opt-legend { position:absolute; left:14px; top:12px; z-index:6; display:none; align-items:center; gap:10px; padding:6px 8px; border:1px solid #2a505a; background:rgba(5,15,19,.86); border-radius:4px; font:9px var(--mono); color:#9fb8c0; }
.opt-legend.on { display:flex; }
.opt-legend b { color:#7ef0dc; letter-spacing:.06em; margin-right:2px; }
.opt-legend span { display:flex; align-items:center; gap:4px; }
.opt-legend i { width:7px; height:7px; border-radius:50%; display:inline-block; }
.opt-legend i.amber { background:#ffb454; box-shadow:0 0 6px #ffb454; }
.opt-legend i.violet { background:#9d8cff; box-shadow:0 0 6px #9d8cff; }
.opt-legend i.cyan { background:#4fe0c8; box-shadow:0 0 6px #4fe0c8; }
.opt-legend i.green { background:#62e08f; box-shadow:0 0 6px #62e08f; }
.scan-hud { position:absolute; right:14px; bottom:14px; z-index:6; display:none; width:330px; padding:9px 11px; border:1px solid #2a505a; border-left:2px solid #ffb454; border-radius:5px; background:rgba(5,15,19,.92); box-shadow:0 12px 30px rgba(0,0,0,.45); }
.scan-hud.on { display:block; }
.sh-top { display:flex; justify-content:space-between; align-items:baseline; margin-bottom:4px; }
.sh-top b { font:9px var(--mono); color:#ffcf8a; letter-spacing:.08em; }
.sh-top span { font:8px var(--mono); color:#7fa2ad; }
.sh-step { min-height:22px; font:10px/1.55 var(--sans); color:#dff8f4; }
.sh-bar { height:4px; margin:6px 0 5px; background:#10272d; border-radius:2px; overflow:hidden; }
.sh-bar i { display:block; width:0; height:100%; background:linear-gradient(90deg,#4fe0c8,#ffb454); }
.sh-note { font:8px/1.5 var(--mono); color:#6f929e; }
@media (max-width:900px){ .opt-legend{max-width:calc(100% - 24px);flex-wrap:wrap;} .scan-hud{width:calc(100% - 28px);right:14px;} }

/* surface chapter play tools */
.defect-tools { display:flex; align-items:center; gap:5px; flex-wrap:wrap; padding:5px 7px; border:1px solid #28434c; border-radius:4px; background:#08161b; }
.defect-tools > span { font:8px var(--mono); color:#6f929e; letter-spacing:.08em; margin-right:3px; }
.defect-tools button { height:25px; padding:0 8px; border:1px solid #2a444d; border-radius:3px; background:#0d1d23; color:#9fb8c0; font:8px var(--mono); cursor:pointer; }
.defect-tools button.on { border-color:#4fe0c8; background:#103a3e; color:#7ef0dc; }
.defect-tools button.ghost { border-color:transparent; color:#6f929e; }
.defect-tools button.ghost:hover { color:#ff9a6b; }

.surface3d-modal { position:absolute; inset:0; z-index:20; background:rgba(2,10,14,.78); display:flex; align-items:center; justify-content:center; }
.surface3d-card { width:min(720px,88%); height:min(470px,82%); background:#071216; border:1px solid #2a505a; border-radius:7px; box-shadow:0 24px 70px rgba(0,0,0,.7); display:flex; flex-direction:column; overflow:hidden; }
.surface3d-head { display:flex; justify-content:space-between; align-items:center; padding:6px 9px; border-bottom:1px solid #22343c; }
.surface3d-head b { font:9px var(--mono); color:#7ef0dc; letter-spacing:.06em; }
.surface3d-head button { border:0; background:transparent; color:#9fb8c0; font-size:18px; cursor:pointer; }
.surface3d-canvas { flex:1; min-height:0; }

/* SGM-2 first-person loading sequence */
.wf-labels { position:absolute; inset:0; z-index:9; pointer-events:none; }
.wf-label { position:absolute; transform:translate(-50%,-50%); pointer-events:auto; display:flex; align-items:center; gap:6px; padding:4px 8px; border:1px solid #ffb454; border-radius:4px; background:rgba(5,15,19,.9); color:#ffcf8a; font:9px var(--mono); cursor:pointer; box-shadow:0 0 18px rgba(255,180,84,.25); animation:wfLabelPulse 1.5s ease-in-out infinite; }
.wf-label i { width:7px; height:7px; border-radius:50%; background:#ffb454; box-shadow:0 0 8px #ffb454; }
@keyframes wfLabelPulse { 0%,100% { opacity:.75; } 50% { opacity:1; box-shadow:0 0 25px rgba(255,180,84,.5); } }
.wf-seq { position:absolute; left:50%; top:12px; transform:translateX(-50%); z-index:9; display:flex; gap:5px; }
.wf-seq span { width:20px; height:20px; display:grid; place-items:center; border-radius:50%; border:1px solid #3b5962; color:#6f929e; font:8px var(--mono); background:rgba(5,15,19,.8); }
.wf-seq span.done { border-color:#4fe0c8; color:#4fe0c8; background:#103a3e; }
.wf-hand { position:absolute; right:14%; bottom:-8px; z-index:14; width:190px; height:180px; pointer-events:none; opacity:0; transform:translateY(30px); transition:.3s; }
.wf-hand.on { opacity:1; transform:translateY(0); }
.wf-tweezers { position:absolute; left:82px; bottom:24px; width:13px; height:150px; border-left:5px solid #d9e7ea; border-right:5px solid #d9e7ea; transform:rotate(-13deg); filter:drop-shadow(0 0 5px rgba(0,0,0,.7)); }
.wf-tweezers::before { content:''; position:absolute; left:-8px; top:-8px; width:21px; height:10px; border:2px solid #aebfc4; border-radius:3px; }
.wf-tweezers::after { content:''; position:absolute; left:-12px; bottom:-18px; width:27px; height:18px; border-left:5px solid #d9e7ea; border-right:5px solid #d9e7ea; transform:perspective(50px) rotateX(-20deg); }
.wf-hand-wafer { position:absolute; left:67px; bottom:8px; width:54px; height:54px; border-radius:50%; border:2px solid #9fcbd5; background:radial-gradient(circle at 35% 30%,#dff8f4,#6c9aa8); box-shadow:0 0 18px rgba(79,224,200,.35); opacity:0; transition:.2s; }
.wf-hand-wafer.on { opacity:1; }
.wf-panel { position:relative; }
.wf-lock { position:absolute; inset:0; z-index:12; display:none; flex-direction:column; justify-content:center; align-items:center; gap:8px; text-align:center; padding:20px; background:rgba(5,10,14,.86); border:1px solid #22343c; border-radius:6px; }
.wf-lock.on { display:flex; }
.wf-lock b { font:12px var(--mono); color:#ffb454; }
.wf-lock span { font:10px/1.7 var(--sans); color:#8fb4bd; max-width:260px; }

/* device panel layout: 3D left, integrated panel right */
.wf-grid { grid-template-columns: minmax(0, 1fr) 380px; align-items: stretch; }
.wf-stage { min-height: 620px; }
.wf-panel { background:#08141a; border:1px solid #22343c; border-radius:6px; padding:10px 12px; max-height:620px; overflow:auto; }
.wf-panel .wf-pattern { position:static; width:100%; margin:0 0 9px; padding:5px; background:#040c10; border:1px solid #22343c; }
.wf-panel .wf-pattern canvas { width:100%; height:auto; display:block; }
.wf-panel .wf-pat-head { font:8px var(--mono); color:#7ef0dc; letter-spacing:.06em; }
.wf-panel .field { margin-bottom:7px; }
.wf-panel .wf-actions { margin-top:8px; }
@media (max-width: 900px) {
  .wf-grid { grid-template-columns: 1fr; }
  .wf-stage { min-height: 420px; }
  .wf-panel { order: 0; max-height:none; }
}
@media (max-width: 1100px) {
  .wf-grid { grid-template-columns: minmax(0, 1fr) 380px !important; }
  .wf-panel { order: 0 !important; }
}
@media (max-width: 900px) {
  .wf-grid { grid-template-columns: 1fr !important; }
  .wf-panel { order: 0 !important; }
}
.wf-panel .wf-pattern { max-height: 205px; overflow: hidden; }
.wf-panel .wf-pattern canvas { height: 165px; width: 100%; object-fit: contain; }

/* whitefilm base canvas sizing (stable) */
.wf-stage { position:relative; background:#020708; border:1px solid var(--line2); border-radius:8px; overflow:hidden; }
.wf-stage canvas#wf3d { position:absolute; inset:0; width:100% !important; height:100% !important; display:block; }
.wf-anim { background:linear-gradient(180deg,transparent 55%,rgba(2,10,14,.72)); align-items:flex-end; justify-content:center; pointer-events:none; }
.wf-anim-cap { bottom:8%; }

/* scene overlay device panel */
.wf-grid { position:relative; display:block !important; }
.wf-stage { width:100%; min-height:620px; }
.wf-panel { position:absolute !important; right:12px; top:66px; width:360px !important; max-width:calc(100% - 24px) !important; max-height:calc(100% - 78px); display:none; z-index:24; background:rgba(8,20,26,.97) !important; box-shadow:0 18px 60px rgba(0,0,0,.7); }
.wf-panel.open { display:block; }
.wf-close-panel { margin-left:auto; border:0; background:transparent; color:#9fb8c0; font-size:17px; cursor:pointer; }
.wf-coach { left:auto !important; right:14px; top:14px; width:300px; }
@media (max-width:800px){ .wf-panel { width:calc(100% - 24px)!important; left:12px; right:12px; } }
.wf-rc-grid { display:grid; grid-template-columns:1fr 1fr 1fr; gap:4px 8px; margin:6px 0; font:8px var(--mono); color:#8fb4bd; }
.wf-rc-chart { margin:4px 0 6px; padding:3px; background:#040b0f; border:1px solid #22343c; }
.wf-rc-chart canvas { display:block; width:100%; height:auto; }
.wf-rc-chart span { display:block; margin-top:2px; font:7px var(--mono); color:#6f929e; }

.wf-result-card { position:fixed !important; left:50%; top:50%; transform:translate(-50%,-50%); z-index:200; max-height:90vh; overflow:auto; width:min(520px,90vw); }
.wf-result-card::before { content:''; position:fixed; inset:0; background:rgba(2,8,12,.55); z-index:-1; }

.wf-action-dock { position:absolute; left:50%; bottom:18px; transform:translateX(-50%); z-index:18; display:none; align-items:center; gap:10px; padding:7px 9px; background:rgba(5,15,19,.94); border:1px solid #ffb454; border-radius:7px; box-shadow:0 12px 36px rgba(0,0,0,.6); }
.wf-action-dock.on { display:flex; }
.wf-action-dock span { font:8px var(--mono); color:#ffcf8a; letter-spacing:.08em; }
.wf-action-dock button { height:48px; min-width:230px; padding:0 20px; border:1px solid #4fe0c8; border-radius:5px; background:#0e3a3f; color:#7ef0dc; font:600 13px var(--sans); cursor:pointer; }
.wf-label { min-height:34px; padding:7px 12px; font:11px var(--mono); }
.wf-panel .wf-actions button { min-height:38px; font:10px var(--sans); }
.wf-panel .wf-jog button { height:32px; font:9px var(--mono); }
.wf-actions #wfRun { grid-column: 1 / -1; min-height: 46px; font: 600 13px var(--sans); }
.wf-close-panel { width:28px; height:28px; border:1px solid #2a444d!important; border-radius:4px; }

/* result card must be opaque and above scene */
.wf-result-card { background:#08141a !important; border:1px solid #3b7a78 !important; padding:18px 20px !important; border-radius:8px; isolation:isolate; box-shadow:0 30px 90px rgba(0,0,0,.9) !important; }
.wf-result-card::before { background:rgba(2,8,12,.62); z-index:-1; }
/* visible console entry when wafer loaded */
.op-console-btn { display:none; width:100%; min-height:36px; margin:6px 0 2px; border:1px solid #4fe0c8; border-radius:4px; background:#0e3a3f; color:#7ef0dc; font:600 11px var(--sans); cursor:pointer; align-items:center; justify-content:center; }
.op-console-btn:hover { background:#125057; }
/* film device panel: large interferogram left, parameters right */
.wf-panel { width:min(900px, calc(100% - 24px)) !important; max-height:calc(100% - 72px) !important; padding:12px 14px 14px !important; }
.wf-panel-body { display:grid; grid-template-columns:minmax(0,1.35fr) 360px; gap:16px; align-items:start; }
.wf-panel-body > .wf-pattern { margin:0; max-height:none; overflow:visible; padding:7px; }
.wf-panel-body > .wf-pattern canvas { width:100%; height:auto; max-height:420px; object-fit:contain; }
.wf-pat-hint { margin-top:5px; font:8px/1.6 var(--mono); color:#6f929e; }
.wf-params { min-width:0; }
.wf-method { margin-top:8px; padding:8px 9px; background:#061217; border:1px solid #1d3944; border-radius:5px; display:grid; gap:2px; }
.wf-method b { font:9px var(--mono); color:#7ef0dc; letter-spacing:.05em; }
.wf-method span { font:8px/1.55 var(--mono); color:#8fb4bd; }
.wf-method code { margin-top:3px; font:9px var(--mono); color:#ffcf8a; }
@media (max-width: 860px) { .wf-panel-body { grid-template-columns:1fr; } .wf-panel { width:calc(100% - 16px)!important; } }
/* 8770 film: white-light setup inside WLI CONTROL scan pane */
#consoleSetup > #setupPanel { display:contents !important; }
#consoleSetup .film-wl-grid { grid-column:1 / -1; display:grid; grid-template-columns:minmax(0,1.28fr) 390px; gap:14px; align-items:start; }
#consoleSetup .film-wl-left, #consoleSetup .film-wl-right { min-width:0; }
#consoleSetup .film-wl-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:6px; }
#consoleSetup .film-wl-head b { font:9px var(--mono); color:#7ef0dc; letter-spacing:.06em; }
#consoleSetup .film-wl-head span { font:8px var(--mono); color:#ffcf8a; }
#consoleSetup .film-wl-canvas { background:#040b0f; border:1px solid #22343c; padding:5px; }
#consoleSetup .film-wl-canvas canvas { width:100%; height:auto; display:block; }
#consoleSetup .film-wl-caption { margin-top:5px; font:8px/1.55 var(--mono); color:#8fb4bd; }
#consoleSetup .film-wl-readout { display:flex; gap:12px; flex-wrap:wrap; margin-top:6px; font:8px var(--mono); color:#7fa2ad; }
#consoleSetup .film-wl-readout b { color:#dff8f4; }
#consoleSetup .film-wl-right .field { background:#07161c; border:1px solid #16333e; border-radius:5px; padding:7px 8px; margin-bottom:6px; }
#consoleSetup .film-wl-actions { display:grid; grid-template-columns:1fr 1fr; gap:5px; margin:7px 0; }
#consoleSetup .film-wl-actions button { min-height:31px; border:1px solid #2a444d; border-radius:4px; background:#0d1d23; color:#9fd7e2; font:9px var(--sans); cursor:pointer; }
#consoleSetup .film-wl-actions button.primary { grid-column:1 / -1; border-color:#4fe0c8; background:#0e3a3f; color:#7ef0dc; font-weight:600; }
#consoleSetup .film-wl-actions button:disabled { opacity:.35; cursor:not-allowed; }
#consoleSetup .film-wl-note { font:8px/1.6 var(--mono); color:#9fb8c0; margin-bottom:6px; }
#consoleSetup .film-wl-method { padding:7px 8px; background:#061217; border:1px solid #1d3944; border-radius:5px; display:grid; gap:2px; margin-bottom:7px; }
#consoleSetup .film-wl-method b { font:8px var(--mono); color:#7ef0dc; }
#consoleSetup .film-wl-method span { font:8px var(--mono); color:#8fb4bd; }
#consoleSetup .film-wl-method code { font:8px var(--mono); color:#ffcf8a; }
#consoleSetup .film-wl-jog { display:flex; gap:3px; margin:3px 0; }
#consoleSetup .film-wl-jog button { flex:1; height:25px; border:1px solid #2a444d; border-radius:3px; background:#0d1d23; color:#9fd7e2; font:8px var(--mono); cursor:pointer; }
#consoleSetup .film-wl-right .callout { font-size:8px; }
/* white-light result above 5-point */
.fw-result { border-color:#2a505a; background:rgba(8,20,26,.92); }
.fw-verdict { font:700 15px var(--mono); color:#4fe0c8; }
.fw-verdict.bad { color:#ff9a6b; }
.fw-kpis { display:grid; grid-template-columns:1.2fr 1.5fr .8fr; gap:10px; margin:8px 0; }
.fw-kpis > div { background:#07161c; border:1px solid #16333e; border-radius:5px; padding:7px 9px; }
.fw-kpis span { display:block; font:8px var(--mono); color:#6f929e; }
.fw-kpis b { display:block; margin:2px 0; font:16px var(--mono); color:#e7fbf7; }
.fw-kpis b em { font:8px var(--mono); color:#7fa2ad; font-style:normal; }
.fw-kpis small { font:8px var(--mono); color:#7fa2ad; }
.fw-curve { padding:3px; background:#040b0f; border:1px solid #22343c; }
.fw-curve canvas { width:100%; height:auto; display:block; }
.fw-curve span { display:block; margin-top:2px; font:7px var(--mono); color:#6f929e; }
@media (max-width:900px) {
  #consoleSetup .film-wl-grid { grid-template-columns:1fr; }
  .fw-kpis { grid-template-columns:1fr; }
}
.fw-result-nav { display:flex; gap:5px; margin:0 0 10px; }
.fw-result-nav button { min-height:30px; padding:0 13px; border:1px solid #2a444d; border-radius:4px; background:#0d1d23; color:#9fb8c0; font:9px var(--mono); cursor:pointer; }
.fw-result-nav button.on { border-color:#4fe0c8; background:#0e3a3f; color:#7ef0dc; }
