/* =========================================================
   格物实验室 · 视觉系统
   ========================================================= */
:root {
  --bg: #060912;
  --bg-soft: #0a1020;
  --panel: rgba(255, 255, 255, 0.035);
  --panel-2: rgba(255, 255, 255, 0.06);
  --line: rgba(151, 168, 214, 0.14);
  --line-2: rgba(151, 168, 214, 0.26);
  --text: #e9efff;
  --muted: #93a0bd;
  --muted-2: #6f7b96;
  --physics: #4cc9f0;
  --chemistry: #ffb454;
  --biology: #59d98b;
  --violet: #8b8cff;
  --danger: #ff7a8a;
  --wrap: 1180px;
  --radius: 20px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "HarmonyOS Sans SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; color: inherit; }
img, svg, canvas { display: block; }
::selection { background: rgba(124, 140, 255, 0.35); color: #fff; }

/* ---------- 背景 ---------- */
.page-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.page-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(148, 168, 220, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 168, 220, 0.055) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(ellipse 95% 60% at 50% 0%, #000 20%, transparent 78%);
  mask-image: radial-gradient(ellipse 95% 60% at 50% 0%, #000 20%, transparent 78%);
}
.page-glow { position: absolute; border-radius: 50%; filter: blur(110px); opacity: 0.5; }
.page-glow-a { width: 620px; height: 620px; top: -300px; left: 8%; background: rgba(76, 201, 240, 0.22); }
.page-glow-b { width: 560px; height: 560px; top: -240px; right: 2%; background: rgba(124, 140, 255, 0.2); }
.page-glow-c { width: 520px; height: 520px; top: 420px; left: 45%; background: rgba(255, 180, 84, 0.07); }

#app { position: relative; z-index: 1; }

/* ---------- 通用 ---------- */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.mono { font-family: var(--mono); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--muted);
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: linear-gradient(90deg, var(--physics), transparent); }
.grad-text {
  background: linear-gradient(100deg, #4cc9f0 0%, #8b8cff 34%, #ffb454 68%, #59d98b 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 22px; border-radius: 999px;
  font-size: 14px; font-weight: 600; letter-spacing: 0.01em;
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-sm { height: 38px; padding: 0 16px; font-size: 13px; }
.btn-primary {
  background: linear-gradient(135deg, #7c8cff, #4cc9f0);
  color: #050b18;
  box-shadow: 0 14px 32px -14px rgba(76, 201, 240, 0.75);
}
.btn-primary:hover { box-shadow: 0 18px 40px -14px rgba(76, 201, 240, 0.9); transform: translateY(-1px); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--line-2);
  color: var(--text);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.07); border-color: rgba(160, 180, 230, 0.45); }
.btn-solid { background: var(--sub, var(--violet)); color: #06101f; }
.btn-solid:hover { filter: brightness(1.08); }
.btn-danger { background: rgba(255, 122, 138, 0.12); border-color: rgba(255, 122, 138, 0.35); color: #ffb3bd; }
.btn-danger:hover { background: rgba(255, 122, 138, 0.2); }

/* ---------- 导航 ---------- */
.nav {
  position: sticky; top: 0; z-index: 60;
  background: rgba(6, 9, 18, 0.74);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--wrap); margin: 0 auto; height: 68px; padding: 0 24px;
  display: flex; align-items: center; gap: 30px;
}
.brand { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center;
  color: #9fd8ff; background: radial-gradient(circle at 30% 20%, rgba(76, 201, 240, 0.22), rgba(124, 140, 255, 0.08));
  border: 1px solid rgba(120, 180, 255, 0.28);
  box-shadow: inset 0 0 18px rgba(76, 201, 240, 0.15);
}
.brand-mark svg { width: 26px; height: 26px; }
.brand-mark.small { width: 32px; height: 32px; }
.brand-text { display: flex; flex-direction: column; font-weight: 700; font-size: 15.5px; letter-spacing: 0.02em; line-height: 1.15; }
.brand-en { font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.3em; color: var(--muted-2); font-weight: 500; }
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: 6px; }
.nav-links a {
  position: relative; padding: 8px 13px; border-radius: 999px;
  font-size: 13.5px; color: var(--muted); transition: color 0.18s, background 0.18s;
}
.nav-links a:hover { color: var(--text); background: rgba(255, 255, 255, 0.045); }
.nav-links a.active { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.nav-links a.active::after {
  content: ""; position: absolute; left: 50%; bottom: 1px; width: 14px; height: 2px;
  transform: translateX(-50%); border-radius: 2px;
  background: linear-gradient(90deg, var(--physics), var(--violet));
}
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.menu-btn {
  display: none; width: 40px; height: 40px; border-radius: 12px; cursor: pointer;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line);
  flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.menu-btn span { display: block; width: 16px; height: 1.6px; background: var(--text); border-radius: 2px; transition: 0.2s; }
.mobile-menu {
  display: none; flex-direction: column; padding: 8px 24px 18px; gap: 2px;
  border-top: 1px solid var(--line); background: rgba(6, 9, 18, 0.97);
}
.mobile-menu a { padding: 12px 4px; font-size: 14.5px; color: var(--muted); border-bottom: 1px solid rgba(151, 168, 214, 0.08); }
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu.open { display: flex; }

/* ---------- 首页 Hero ---------- */
.hero { position: relative; padding: 84px 0 40px; }
.hero-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: 1.06fr 0.94fr; gap: 48px; align-items: center;
}
.hero-copy { max-width: 600px; }
.hero h1 {
  margin-top: 20px;
  font-size: clamp(36px, 5.1vw, 62px);
  line-height: 1.1; letter-spacing: -0.025em; font-weight: 800;
}
.hero-sub { margin-top: 22px; font-size: 15.5px; line-height: 1.85; color: var(--muted); max-width: 540px; }
.hero-sub strong { color: #d6e2ff; font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-stats {
  display: flex; gap: 36px; margin-top: 38px; padding-top: 26px;
  border-top: 1px solid var(--line);
}
.hero-stats b { display: block; font-size: 25px; font-weight: 700; letter-spacing: -0.02em; }
.hero-stats span { font-size: 11.5px; color: var(--muted-2); font-family: var(--mono); letter-spacing: 0.08em; }

.hero-visual { position: relative; aspect-ratio: 1 / 1; max-height: 520px; }
.hero-visual canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.chip-float {
  position: absolute; z-index: 2;
  padding: 8px 12px; border-radius: 11px;
  background: rgba(10, 16, 32, 0.82);
  border: 1px solid var(--line-2);
  font-family: var(--mono); font-size: 11.5px; color: #c7dcff;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 12px 30px -18px #000;
  animation: floaty 7s ease-in-out infinite;
}
.chip-float i { font-style: normal; color: var(--physics); }
.chip-1 { top: 12%; left: 2%; animation-delay: 0s; }
.chip-2 { top: 34%; right: 0%; animation-delay: -2.2s; }
.chip-3 { bottom: 19%; left: 6%; animation-delay: -4.1s; }
.chip-4 { bottom: 6%; right: 10%; animation-delay: -1.2s; }
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ---------- 区块 ---------- */
.section { position: relative; max-width: var(--wrap); margin: 0 auto; padding: 62px 24px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.section-title { font-size: clamp(24px, 2.6vw, 32px); font-weight: 700; letter-spacing: -0.02em; margin-top: 10px; }
.section-sub { color: var(--muted); font-size: 14px; margin-top: 8px; max-width: 560px; }
.section-link { font-size: 13px; color: var(--muted); border: 1px solid var(--line-2); padding: 9px 16px; border-radius: 999px; transition: 0.2s; white-space: nowrap; }
.section-link:hover { color: var(--text); border-color: rgba(160, 180, 230, 0.5); background: rgba(255, 255, 255, 0.04); }

/* ---------- 学科卡片 ---------- */
.subject-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.subject-card {
  position: relative; display: flex; flex-direction: column;
  padding: 24px; border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.012) 60%);
  overflow: hidden; transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.subject-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(420px 200px at 108% -10%, color-mix(in srgb, var(--sub) 20%, transparent), transparent 70%);
  opacity: 0.85;
}
.subject-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--sub) 48%, transparent);
  box-shadow: 0 26px 56px -34px var(--sub);
}
.subject-top { display: flex; align-items: center; justify-content: space-between; }
.subject-orb {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  color: var(--sub);
  background: color-mix(in srgb, var(--sub) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--sub) 30%, transparent);
  box-shadow: inset 0 0 20px color-mix(in srgb, var(--sub) 14%, transparent);
}
.subject-orb svg { width: 24px; height: 24px; }
.subject-en { font-family: var(--mono); font-size: 10px; letter-spacing: 0.24em; color: var(--muted-2); }
.subject-card h3 { margin-top: 18px; font-size: 19px; font-weight: 700; }
.subject-card h3 span { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 8px; }
.subject-desc { font-size: 13px; color: var(--muted); line-height: 1.7; margin-top: 7px; }
.subject-samples { display: flex; flex-direction: column; gap: 6px; margin-top: 16px; }
.subject-samples span { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: #b7c4de; }
.subject-samples span::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--sub); opacity: 0.8; flex-shrink: 0; }
.subject-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 11.5px; color: var(--muted-2);
}
.subject-foot .arrow { font-family: var(--font); color: var(--sub); transition: transform 0.2s; }
.subject-card:hover .arrow { transform: translateX(4px); }

/* ---------- 沙盒卡片 ---------- */
.sandbox-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.sandbox-card {
  display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.012));
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.sandbox-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--sub) 45%, transparent);
  box-shadow: 0 28px 60px -38px var(--sub);
}
.sandbox-preview {
  position: relative; height: 168px; overflow: hidden;
  background:
    radial-gradient(320px 140px at 50% 110%, color-mix(in srgb, var(--sub) 18%, transparent), transparent 70%),
    linear-gradient(180deg, rgba(7, 12, 24, 0.2), rgba(7, 12, 24, 0.65));
  border-bottom: 1px solid var(--line);
}
.sandbox-preview svg { width: 100%; height: 100%; }
.sandbox-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.sandbox-body h3 { font-size: 18px; font-weight: 700; margin-top: 10px; }
.sandbox-body p { font-size: 13px; color: var(--muted); line-height: 1.7; margin-top: 7px; flex: 1; }
.sandbox-body .link { margin-top: 16px; font-size: 13px; color: var(--sub); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.sandbox-card:hover .link { gap: 10px; }
.badge {
  display: inline-flex; align-items: center; gap: 6px; width: fit-content;
  padding: 4px 10px; border-radius: 999px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em;
  color: var(--sub);
  background: color-mix(in srgb, var(--sub) 11%, transparent);
  border: 1px solid color-mix(in srgb, var(--sub) 26%, transparent);
}
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--sub); box-shadow: 0 0 8px var(--sub); }

/* ---------- 实验库 ---------- */
.page-head { padding: 52px 0 26px; }
.page-head h1 { font-size: clamp(30px, 4vw, 46px); font-weight: 800; letter-spacing: -0.025em; margin-top: 14px; }
.page-head p { color: var(--muted); font-size: 14.5px; margin-top: 12px; max-width: 620px; }
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted-2); }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb span.sep { opacity: 0.5; }

.filter-wrap {
  position: sticky; top: 68px; z-index: 40;
  background: rgba(6, 9, 18, 0.86);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.filter-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
.filter-group { display: flex; align-items: center; gap: 7px; }
.filter-label { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.16em; color: var(--muted-2); margin-right: 2px; }
.chip {
  padding: 7px 14px; border-radius: 999px; cursor: pointer;
  font-size: 12.5px; color: var(--muted);
  background: transparent; border: 1px solid var(--line);
  transition: 0.18s ease;
}
.chip:hover { color: var(--text); border-color: var(--line-2); }
.chip.active { color: #06101f; background: linear-gradient(135deg, #9fb6ff, #5fd2f2); border-color: transparent; font-weight: 600; }
.chip[data-subject="physics"].active { background: var(--physics); }
.chip[data-subject="chemistry"].active { background: var(--chemistry); }
.chip[data-subject="biology"].active { background: var(--biology); }
.search-box { margin-left: auto; position: relative; }
.search-box svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--muted-2); }
.search-box input {
  width: 240px; height: 40px; padding: 0 16px 0 40px;
  border-radius: 999px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035); color: var(--text);
  font-size: 13px; font-family: inherit; outline: none; transition: 0.2s;
}
.search-box input::placeholder { color: var(--muted-2); }
.search-box input:focus { border-color: rgba(124, 140, 255, 0.55); background: rgba(255, 255, 255, 0.055); }

.exp-main { padding: 26px 0 90px; }
.result-line { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; font-size: 12.5px; color: var(--muted-2); font-family: var(--mono); }
.exp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(292px, 1fr)); gap: 15px; }
.exp-card {
  position: relative; display: flex; flex-direction: column;
  padding: 20px; border-radius: 17px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.01));
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.exp-card::before {
  content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 2px;
  border-radius: 2px; background: var(--sub); opacity: 0.55;
}
.exp-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--sub) 42%, transparent);
  background: linear-gradient(160deg, color-mix(in srgb, var(--sub) 7%, rgba(255, 255, 255, 0.045)), rgba(255, 255, 255, 0.015));
  box-shadow: 0 22px 46px -32px var(--sub);
}
.exp-top { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted-2); font-family: var(--mono); letter-spacing: 0.04em; }
.subject-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--sub); box-shadow: 0 0 8px var(--sub); }
.exp-level { margin-left: auto; letter-spacing: 0.18em; color: var(--sub); opacity: 0.75; }
.exp-card h3 { font-size: 16.5px; font-weight: 650; letter-spacing: -0.01em; line-height: 1.45; margin-top: 12px; }
.exp-card p {
  font-size: 12.8px; color: var(--muted); line-height: 1.7; margin-top: 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.exp-foot { display: flex; align-items: center; gap: 6px; margin-top: 16px; padding-top: 12px; border-top: 1px solid rgba(151, 168, 214, 0.1); }
.exp-tag {
  font-size: 10.5px; color: var(--muted); padding: 3px 8px;
  border-radius: 6px; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(151, 168, 214, 0.12);
}
.exp-foot .arrow { margin-left: auto; color: var(--sub); font-size: 14px; transition: transform 0.2s; }
.exp-card:hover .arrow { transform: translateX(4px); }
.empty-state { text-align: center; padding: 80px 20px; color: var(--muted); }
.empty-state strong { display: block; color: var(--text); font-size: 16px; margin-bottom: 8px; }

/* ---------- 实验详情 ---------- */
.detail-hero { padding: 34px 0 20px; }
.detail-hero h1 { font-size: clamp(28px, 3.7vw, 42px); font-weight: 800; letter-spacing: -0.025em; margin-top: 16px; line-height: 1.25; }
.detail-summary { color: #b9c6e0; font-size: 15px; margin-top: 12px; max-width: 720px; line-height: 1.8; }
.detail-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 20px; font-size: 12px; color: var(--muted); font-family: var(--mono); }
.detail-meta .sep { width: 1px; height: 12px; background: var(--line-2); }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 26px; padding: 22px 0 90px; align-items: start; }
.detail-card {
  border: 1px solid var(--line); border-radius: 18px; padding: 24px 26px;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012));
  margin-bottom: 14px;
}
.detail-card h2 {
  display: flex; align-items: center; gap: 10px;
  font-size: 15px; font-weight: 650; letter-spacing: 0.02em; margin-bottom: 14px;
}
.detail-card h2 .idx { font-family: var(--mono); font-size: 10px; color: var(--sub); letter-spacing: 0.1em; }
.detail-card p { font-size: 14px; line-height: 1.9; color: #c3cfe6; }
.detail-card p + p { margin-top: 8px; }
.formula {
  margin-top: 12px; padding: 12px 16px; border-radius: 10px;
  background: rgba(76, 201, 240, 0.05); border: 1px dashed color-mix(in srgb, var(--sub) 32%, transparent);
  font-family: var(--mono); font-size: 13.5px; color: #cfe8ff; letter-spacing: 0.02em;
}
.material-list { display: flex; flex-wrap: wrap; gap: 8px; }
.material-list span {
  padding: 6px 12px; border-radius: 8px; font-size: 12.5px; color: #c3cfe6;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line);
}
.steps { counter-reset: step; display: flex; flex-direction: column; gap: 13px; }
.steps li { list-style: none; counter-increment: step; position: relative; padding-left: 38px; font-size: 14px; line-height: 1.8; color: #c3cfe6; }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: 1px;
  width: 27px; height: 27px; border-radius: 8px;
  display: grid; place-items: center;
  font-family: var(--mono); font-size: 10.5px; color: var(--sub);
  background: color-mix(in srgb, var(--sub) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--sub) 24%, transparent);
}
.note-card { background: linear-gradient(165deg, rgba(255, 180, 84, 0.07), rgba(255, 180, 84, 0.015)); border-color: rgba(255, 180, 84, 0.2); }
.note-card h2 .idx { color: var(--chemistry); }
.note-card p { color: #e6d3b4; }

.detail-side { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 14px; }
.side-card {
  border: 1px solid var(--line); border-radius: 18px; padding: 20px;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
}
.side-card h3 { font-size: 13px; font-weight: 650; color: var(--muted); letter-spacing: 0.06em; margin-bottom: 12px; }
.side-card .btn { width: 100%; }
.side-exp { display: flex; flex-direction: column; gap: 10px; }
.side-exp a { display: flex; gap: 10px; align-items: flex-start; font-size: 12.8px; color: #c3cfe6; line-height: 1.6; padding: 8px 0; border-bottom: 1px solid rgba(151, 168, 214, 0.08); transition: color 0.18s; }
.side-exp a:last-child { border-bottom: none; padding-bottom: 0; }
.side-exp a:hover { color: #fff; }
.side-exp i { font-style: normal; color: var(--sub); font-family: var(--mono); font-size: 10px; padding-top: 2px; }

/* ---------- 沙盒通用 ---------- */
.sandbox-page { padding: 30px 0 80px; }
.sandbox-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; flex-wrap: wrap; }
.sandbox-head h1 { font-size: clamp(26px, 3.4vw, 38px); font-weight: 800; letter-spacing: -0.025em; margin-top: 10px; }
.sandbox-head p { font-size: 13.5px; color: var(--muted); margin-top: 8px; max-width: 640px; }
.sandbox-shell { display: grid; grid-template-columns: minmax(0, 1fr) 268px; gap: 14px; align-items: start; }
.sim-frame {
  position: relative; border: 1px solid var(--line); border-radius: 20px; overflow: hidden;
  background: linear-gradient(180deg, #0a1121, #070c18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.canvas-wrap { position: relative; height: clamp(340px, 56vh, 540px); }
.canvas-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
.sim-hint {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 11px 16px; border-top: 1px solid var(--line);
  font-size: 11.5px; color: var(--muted-2); background: rgba(255, 255, 255, 0.015);
}
.sim-hint kbd {
  font-family: var(--mono); font-size: 10px; padding: 2px 6px; border-radius: 5px;
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line-2); color: #b9c6e0;
}
.panel {
  border: 1px solid var(--line); border-radius: 18px; padding: 18px;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
  display: flex; flex-direction: column; gap: 16px;
}
.panel-title { font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em; color: var(--muted-2); text-transform: uppercase; }
.tool-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.tool-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 8px; border-radius: 10px; cursor: pointer;
  font-size: 12px; color: var(--muted);
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line);
  transition: 0.16s;
}
.tool-btn:hover { color: var(--text); border-color: var(--line-2); }
.tool-btn.active {
  color: #06101f; font-weight: 600; border-color: transparent;
  background: var(--sub, #9fb6ff);
}
.tool-btn svg { width: 14px; height: 14px; }
.range-row { display: flex; flex-direction: column; gap: 7px; }
.range-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 11.5px; color: var(--muted); }
.range-head b { font-family: var(--mono); font-size: 11px; color: var(--text); font-weight: 500; }
input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 4px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.12); outline: none; cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 15px; height: 15px; border-radius: 50%;
  background: var(--sub, #9fb6ff); border: 2px solid #0a1020;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--sub, #9fb6ff) 22%, transparent);
}
input[type="range"]::-moz-range-thumb {
  width: 13px; height: 13px; border-radius: 50%; border: 2px solid #0a1020;
  background: var(--sub, #9fb6ff);
}
.preset-list { display: flex; flex-wrap: wrap; gap: 6px; }
.preset-btn {
  padding: 6px 10px; border-radius: 8px; cursor: pointer;
  font-size: 11px; color: var(--muted);
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line);
  transition: 0.16s;
}
.preset-btn:hover { color: var(--text); border-color: var(--line-2); background: rgba(255, 255, 255, 0.06); }
.stat-row { display: flex; gap: 14px; font-family: var(--mono); font-size: 10.5px; color: var(--muted-2); flex-wrap: wrap; }
.stat-row b { display: block; font-size: 15px; color: var(--text); font-weight: 600; }

/* ---------- 化学沙盒 ---------- */
.chem-layout { display: grid; grid-template-columns: 244px minmax(0, 1fr) 296px; gap: 14px; align-items: start; }
.shelf-group { display: flex; flex-direction: column; gap: 7px; }
.shelf-label { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.16em; color: var(--muted-2); margin-top: 4px; }
.reagent-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.reagent {
  display: flex; align-items: center; gap: 7px; padding: 8px 9px;
  border-radius: 9px; cursor: pointer; text-align: left;
  background: rgba(255, 255, 255, 0.025); border: 1px solid var(--line);
  transition: 0.15s;
}
.reagent:hover { background: rgba(255, 255, 255, 0.06); border-color: var(--line-2); transform: translateY(-1px); }
.reagent .dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; border: 1px solid rgba(255, 255, 255, 0.25); }
.reagent .txt { display: flex; flex-direction: column; min-width: 0; }
.reagent b { font-size: 11px; font-weight: 500; color: #d7e2f7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reagent small { font-family: var(--mono); font-size: 9px; color: var(--muted-2); }

.chem-stage {
  position: relative; min-height: 520px; border: 1px solid var(--line); border-radius: 20px;
  background:
    radial-gradient(400px 220px at 50% 0%, rgba(76, 201, 240, 0.06), transparent 70%),
    linear-gradient(180deg, #0a1121, #070c18);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 26px; overflow: hidden;
}
.stage-caption { position: absolute; top: 16px; left: 18px; font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.18em; color: var(--muted-2); }
.stage-readout { position: absolute; top: 14px; right: 16px; display: flex; gap: 8px; }
.readout {
  padding: 4px 9px; border-radius: 7px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035); font-family: var(--mono); font-size: 9.5px; color: var(--muted-2);
}
.readout b { color: var(--text); font-weight: 600; }
.beaker-wrap { position: relative; margin-top: 16px; }
.beaker {
  position: relative; width: 190px; height: 236px;
  border: 2px solid rgba(158, 206, 255, 0.32); border-top: none;
  border-radius: 4px 4px 24px 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.015), rgba(255, 255, 255, 0.055));
  overflow: hidden;
  box-shadow: inset 0 0 30px rgba(120, 190, 255, 0.08), 0 30px 60px -40px #000;
  backdrop-filter: blur(2px);
}
.beaker::before {
  content: ""; position: absolute; left: -2px; right: -2px; top: -7px; height: 10px;
  border-radius: 50%; border: 2px solid rgba(158, 206, 255, 0.32);
  background: rgba(120, 160, 220, 0.05);
}
.beaker::after {
  content: ""; position: absolute; left: 14px; top: 30px; width: 12px; height: 120px;
  border-radius: 999px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.28), transparent);
  filter: blur(2px); opacity: 0.45;
}
.liquid {
  position: absolute; left: 0; right: 0; bottom: 0; height: 0%;
  transition: height 0.7s cubic-bezier(0.22, 1, 0.36, 1), background 0.8s ease;
  background: linear-gradient(180deg, rgba(120, 200, 255, 0.5), rgba(60, 140, 220, 0.55));
}
.liquid::before {
  content: ""; position: absolute; left: -6%; right: -6%; top: -8px; height: 16px;
  border-radius: 50%; background: inherit; opacity: 0.9;
  animation: liquidWave 4s ease-in-out infinite;
}
@keyframes liquidWave {
  0%, 100% { transform: translateX(0) scaleY(1); }
  50% { transform: translateX(3%) scaleY(0.82); }
}
.sediment {
  position: absolute; left: 0; right: 0; bottom: 0; height: 0;
  transition: height 0.8s ease, background 0.8s ease;
  background: #cfd6e2;
  border-radius: 40% 40% 0 0 / 18px 18px 0 0;
  opacity: 0.9;
}
.bubble {
  position: absolute; bottom: 8%; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.85), rgba(200, 235, 255, 0.25));
  border: 1px solid rgba(255, 255, 255, 0.35);
  animation: bubbleUp linear forwards;
  pointer-events: none;
}
@keyframes bubbleUp {
  0% { transform: translateY(0) scale(0.6); opacity: 0; }
  15% { opacity: 0.9; }
  100% { transform: translateY(-190px) scale(1.15); opacity: 0; }
}
.gas-tag {
  position: absolute; top: 18%; left: 50%; transform: translateX(-50%);
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em;
  color: #9fe6ff; padding: 4px 10px; border-radius: 999px;
  background: rgba(76, 201, 240, 0.1); border: 1px solid rgba(76, 201, 240, 0.3);
  animation: gasFloat 2.4s ease-in-out infinite;
}
@keyframes gasFloat {
  0%, 100% { transform: translate(-50%, 0); opacity: 0.75; }
  50% { transform: translate(-50%, -10px); opacity: 1; }
}
.stage-empty { color: var(--muted-2); font-size: 12px; text-align: center; line-height: 1.9; }
.stage-empty b { display: block; color: var(--muted); font-size: 13px; margin-bottom: 4px; }
.stage-actions { display: flex; gap: 8px; margin-top: 22px; }

.log-list { display: flex; flex-direction: column; gap: 8px; max-height: 380px; overflow-y: auto; padding-right: 2px; }
.log-item {
  padding: 10px 12px; border-radius: 10px;
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line);
  animation: logIn 0.35s ease;
}
@keyframes logIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.log-item .eq { font-family: var(--mono); font-size: 11px; color: #d8e8ff; line-height: 1.6; word-break: break-word; }
.log-item .ph { font-size: 10.5px; color: var(--muted); margin-top: 4px; }
.log-empty { font-size: 11.5px; color: var(--muted-2); line-height: 1.8; }
.panel-sub { font-size: 11.5px; color: var(--muted); line-height: 1.7; }
.chem-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 10.5px; color: var(--muted-2); }
.chem-legend i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; }

/* ---------- 生物沙盒 ---------- */
.bio-shell { display: grid; grid-template-columns: minmax(0, 1fr) 268px; gap: 14px; align-items: start; }
.bio-main { display: flex; flex-direction: column; gap: 12px; }
.bio-chart-box { border: 1px solid var(--line); border-radius: 16px; background: rgba(255, 255, 255, 0.02); padding: 10px 12px 6px; }
.bio-chart-head { display: flex; align-items: center; justify-content: space-between; font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.14em; color: var(--muted-2); margin-bottom: 4px; }
.chart-legend { display: flex; gap: 12px; letter-spacing: 0; font-family: var(--font); font-size: 10px; }
.chart-legend i { display: inline-block; width: 8px; height: 2px; vertical-align: middle; margin-right: 4px; }
.bio-chart { width: 100%; height: 104px; display: block; }
.bio-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.bio-stat { padding: 9px 11px; border-radius: 11px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); }
.bio-stat span { display: block; font-size: 10px; color: var(--muted-2); }
.bio-stat b { font-family: var(--mono); font-size: 16px; font-weight: 600; }
.bio-stat.rabbit b { color: #e8eefc; }
.bio-stat.fox b { color: #ffab6b; }
.bio-stat.grass b { color: #6ee7a0; }
.event-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }

/* ---------- 关于 ---------- */
.about-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 16px; padding-bottom: 90px; }
.about-card {
  border: 1px solid var(--line); border-radius: 18px; padding: 26px;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
}
.about-card h2 { font-size: 17px; font-weight: 700; margin-bottom: 12px; }
.about-card p { font-size: 13.5px; color: var(--muted); line-height: 1.9; }
.about-card p + p { margin-top: 9px; }
.about-card ul { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.about-card li { list-style: none; font-size: 13px; color: #b9c6e0; padding-left: 16px; position: relative; line-height: 1.7; }
.about-card li::before { content: ""; position: absolute; left: 0; top: 10px; width: 5px; height: 5px; border-radius: 50%; background: var(--physics); }
.code-block {
  margin-top: 12px; padding: 14px 16px; border-radius: 10px;
  background: #0a1020; border: 1px solid var(--line);
  font-family: var(--mono); font-size: 11.5px; line-height: 1.9; color: #b7ddd0;
  overflow-x: auto; white-space: pre;
}
.code-block .c { color: var(--muted-2); }
.tag-inline { display: inline-block; font-family: var(--mono); font-size: 10.5px; color: var(--physics); padding: 1px 7px; border-radius: 6px; background: rgba(76, 201, 240, 0.08); border: 1px solid rgba(76, 201, 240, 0.18); }

/* ---------- 页脚 / Toast ---------- */
.footer { position: relative; z-index: 1; border-top: 1px solid var(--line); background: rgba(6, 9, 18, 0.6); }
.footer-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 34px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand strong { font-size: 14px; display: block; }
.footer-brand p { font-size: 11.5px; color: var(--muted-2); margin-top: 2px; }
.footer-meta { display: flex; gap: 20px; flex-wrap: wrap; font-family: var(--mono); font-size: 10px; letter-spacing: 0.06em; color: var(--muted-2); }
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px);
  padding: 11px 20px; border-radius: 12px;
  background: rgba(12, 18, 36, 0.95); border: 1px solid var(--line-2);
  font-size: 12.5px; color: var(--text); box-shadow: 0 20px 50px -20px #000;
  opacity: 0; pointer-events: none; transition: 0.3s; z-index: 100;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 动效 ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .subject-grid, .sandbox-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chem-layout { grid-template-columns: 220px minmax(0, 1fr); }
  .chem-layout > .panel:last-child { grid-column: 1 / -1; }
  .log-list { max-height: 240px; }
  .detail-layout { grid-template-columns: minmax(0, 1fr) 290px; }
}
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .menu-btn { display: flex; }
  .hero-inner { grid-template-columns: 1fr; gap: 28px; }
  .hero { padding-top: 54px; }
  .hero-visual { max-height: 380px; max-width: 440px; margin: 0 auto; width: 100%; }
  .sandbox-shell, .bio-shell { grid-template-columns: 1fr; }
  .detail-layout { grid-template-columns: 1fr; }
  .detail-side { position: static; flex-direction: row; flex-wrap: wrap; }
  .detail-side > * { flex: 1 1 260px; }
  .about-grid { grid-template-columns: 1fr; }
  .filter-wrap { top: 68px; }
  .chem-layout { grid-template-columns: 1fr; }
  .chem-layout > .panel:last-child { grid-column: auto; }
  .chem-stage { min-height: 440px; order: -1; }
  .shelf-group .reagent-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 680px) {
  .wrap, .hero-inner, .section, .nav-inner, .filter-inner, .footer-inner { padding-left: 18px; padding-right: 18px; }
  .subject-grid, .sandbox-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 22px; }
  .hero-stats b { font-size: 21px; }
  .section { padding-top: 46px; padding-bottom: 46px; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 14px; }
  .filter-inner { gap: 10px; padding-top: 12px; padding-bottom: 12px; }
  .filter-group { flex-wrap: wrap; }
  .filter-label { width: 100%; }
  .search-box { margin-left: 0; width: 100%; }
  .search-box input { width: 100%; }
  .exp-grid { grid-template-columns: 1fr; }
  .page-head { padding-top: 34px; }
  .detail-card { padding: 20px; }
  .shelf-group .reagent-grid { grid-template-columns: repeat(2, 1fr); }
  .bio-stats { grid-template-columns: repeat(2, 1fr); }
  .chip-float { font-size: 10px; padding: 6px 9px; }
  .hero-visual { max-height: 320px; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 18px; }
  .chem-stage { min-height: 400px; padding: 20px 12px; }
  .beaker { width: 150px; height: 196px; }
  .panel { padding: 14px; }
  .tool-grid { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* =========================================================
   实验库扩展 · 精编 / 变式 / 分页
   ========================================================= */
.exp-kind {
  font-size: 9.5px; letter-spacing: 0.08em; padding: 2px 6px; border-radius: 5px;
  color: var(--sub); border: 1px solid color-mix(in srgb, var(--sub) 34%, transparent);
  background: color-mix(in srgb, var(--sub) 10%, transparent);
}
.exp-card.is-variant .exp-kind { color: var(--muted); border-color: var(--line-2); background: rgba(255,255,255,.03); }
.load-more {
  grid-column: 1 / -1; height: 52px; border-radius: 14px; cursor: pointer;
  border: 1px dashed var(--line-2); background: rgba(255, 255, 255, 0.02);
  color: var(--muted); font-size: 13px; font-family: var(--mono); transition: 0.2s;
}
.load-more:hover { color: var(--text); border-color: rgba(160, 180, 230, 0.5); background: rgba(255, 255, 255, 0.045); }
.variant-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin-top: 16px; padding: 11px 15px; border-radius: 12px;
  border: 1px solid rgba(139, 140, 255, 0.32); background: rgba(139, 140, 255, 0.08);
  font-size: 12.5px; color: #c9caff;
}
.variant-bar .vb-tag {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em;
  padding: 2px 7px; border-radius: 5px; background: rgba(139, 140, 255, 0.22);
}
.variant-bar b { color: #fff; font-weight: 600; }
.variant-bar a { margin-left: auto; color: #b9c6ff; border-bottom: 1px dashed rgba(185, 198, 255, 0.5); }

/* =========================================================
   专业实验室 · 首页卡片
   ========================================================= */
.lab-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.lab-card {
  position: relative; display: flex; flex-direction: column; gap: 9px;
  padding: 24px; border-radius: 18px; border: 1px solid var(--line);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
  transition: transform 0.22s, border-color 0.22s, box-shadow 0.22s;
}
.lab-card:hover {
  transform: translateY(-3px); border-color: color-mix(in srgb, var(--sub) 42%, transparent);
  box-shadow: 0 24px 48px -34px var(--sub);
}
.lab-icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  color: var(--sub); background: color-mix(in srgb, var(--sub) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--sub) 26%, transparent);
  margin-bottom: 4px;
}
.lab-icon svg { width: 30px; height: 30px; }
.lab-card h3 { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.lab-card p { font-size: 13px; line-height: 1.75; color: var(--muted); }
.lab-card .link { margin-top: 10px; font-size: 12.5px; color: var(--sub); display: inline-flex; align-items: center; gap: 6px; }

/* =========================================================
   专业实验室 · 通用工作区
   ========================================================= */
.lab-page .sandbox-head { align-items: flex-start; }
.lab-switch { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 16px; }
.lab-hint {
  font-size: 12.5px; color: var(--muted); line-height: 1.7;
  border: 1px dashed var(--line-2); border-radius: 11px;
  padding: 10px 14px; margin-bottom: 14px;
}
.lab-shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 14px; align-items: start; }
.lab-shelf, .lab-inspector {
  border: 1px solid var(--line); border-radius: 17px; padding: 16px;
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
}
.lab-shelf h4, .lab-inspector h4 {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em;
  color: var(--muted-2); text-transform: uppercase; margin-bottom: 12px;
}
.lab-shelf h4:not(:first-child) { margin-top: 4px; }
.lab-stage {
  border: 1px solid var(--line); border-radius: 18px; padding: 12px;
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.035), rgba(6, 9, 18, 0.5));
  min-width: 0;
}
.lab-stage-bar {
  font-family: var(--mono); font-size: 11px; color: var(--muted-2);
  padding: 2px 6px 10px; letter-spacing: 0.03em;
}
.shelf-note { margin-top: 14px; font-size: 11.5px; line-height: 1.75; color: var(--muted-2); }
.shelf-actions, .preset-list { display: flex; flex-direction: column; gap: 7px; margin-top: 14px; }
.shelf-actions .btn, .preset-list .btn { width: 100%; }

/* ---------- 电路工作台 ---------- */
.circuit-shell { grid-template-columns: 220px minmax(0, 1fr) 248px; }
.shelf-list { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.shelf-item {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 9px 4px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03);
  font-size: 10.5px; color: var(--muted); transition: 0.18s;
}
.shelf-item:hover { color: var(--text); border-color: color-mix(in srgb, var(--physics) 42%, transparent); background: color-mix(in srgb, var(--physics) 8%, transparent); }
.shelf-glyph svg { width: 21px; height: 21px; color: var(--physics); }

.circuit-svg, .optics-svg {
  width: 100%; height: auto; display: block; border-radius: 12px;
  background: radial-gradient(circle at 50% 40%, rgba(76, 201, 240, 0.045), rgba(4, 8, 16, 0.9));
  touch-action: none; user-select: none;
}
.circuit-svg text, .optics-svg text { pointer-events: none; }
.circuit-svg .comp { cursor: grab; }
.circuit-svg .comp.selected { filter: drop-shadow(0 0 7px rgba(139, 140, 255, 0.85)); }
.circuit-svg .lead { stroke: #8fa4cc; stroke-width: 2.5; stroke-linecap: round; }
.circuit-svg .plate-short, .circuit-svg .plate-long { stroke: #4cc9f0; stroke-width: 3.4; stroke-linecap: round; }
.circuit-svg .node { fill: #9fb6d8; }
.circuit-svg .lever { stroke: #4cc9f0; stroke-width: 3; stroke-linecap: round; }
.circuit-svg .bulb-glow { filter: blur(14px); }
.circuit-svg .bulb-body { fill: rgba(255, 212, 121, 0.06); stroke: #ffd479; stroke-width: 2.2; }
.circuit-svg .filament { stroke: #ffd479; stroke-width: 2; }
.circuit-svg .res-body { fill: rgba(76, 201, 240, 0.12); stroke: #8fb6e8; stroke-width: 2.2; }
.circuit-svg .rheo-arrow { stroke: #ffb454; stroke-width: 2; stroke-linecap: round; }
.circuit-svg .meter-body { fill: #0b1424; stroke: #8fb6e8; stroke-width: 2.5; }
.circuit-svg .meter-letter { fill: #cfe6ff; font-size: 18px; font-weight: 700; text-anchor: middle; font-family: var(--mono); }
.circuit-svg .meter-val { fill: #9fe8ff; font-size: 11px; text-anchor: middle; font-family: var(--mono); }
.circuit-svg .comp-label { fill: #8fa4cc; font-size: 11px; text-anchor: middle; font-family: var(--mono); }
.circuit-svg .term { fill: #0b1424; stroke: #4cc9f0; stroke-width: 2.2; cursor: crosshair; }
.circuit-svg .term:hover { stroke: #ffd479; stroke-width: 3; }
.circuit-svg .wire-line { fill: none; stroke: #6f86b8; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.circuit-svg .wire-hit { fill: none; stroke: transparent; stroke-width: 16; cursor: pointer; }
.circuit-svg .wire:hover .wire-line { stroke: #ff7a8a; }
.circuit-svg .pending-dot { fill: #ffd479; filter: drop-shadow(0 0 8px #ffb454); }

.insp-title { font-size: 14px; font-weight: 650; margin-bottom: 12px; }
.insp-row { display: flex; align-items: center; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin: 12px 0 6px; }
.insp-row b { color: var(--text); font-family: var(--mono); font-weight: 600; }
.insp-empty { font-size: 11.8px; line-height: 1.75; color: var(--muted-2); }
.insp-reading {
  margin-top: 10px; padding: 8px 11px; border-radius: 8px;
  background: rgba(76, 201, 240, 0.08); border: 1px solid rgba(76, 201, 240, 0.16);
  font-family: var(--mono); font-size: 11.5px; color: #9fe8ff;
}
.insp-del { width: 100%; margin-top: 14px; }
.readout { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.readout h5 { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; color: var(--muted-2); margin-bottom: 10px; text-transform: uppercase; }
.ro-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11.8px; color: var(--muted); padding: 5px 0; border-bottom: 1px solid rgba(151, 168, 214, 0.07); }
.ro-row:last-child { border-bottom: none; }
.ro-row b { font-family: var(--mono); color: #9fe8ff; font-weight: 600; white-space: nowrap; }
.lab-shelf input[type="range"], .lab-inspector input[type="range"] { width: 100%; accent-color: var(--sub, var(--physics)); height: 22px; cursor: pointer; }

/* ---------- 光具座 ---------- */
.optics-shell { grid-template-columns: 250px minmax(0, 1fr); }
.optics-svg .main-axis { stroke: rgba(151, 168, 214, 0.5); stroke-width: 1.6; }
.optics-svg .ruler-tick { stroke: rgba(151, 168, 214, 0.35); }
.optics-svg .ruler-text { fill: #6f7b96; font-size: 9.5px; text-anchor: middle; font-family: var(--mono); }
.optics-svg .focal-dot { fill: #ffb454; }
.optics-svg .focal-text { fill: #ffb454; font-size: 10.5px; text-anchor: middle; font-family: var(--mono); }
.optics-svg .lens-body { fill: rgba(76, 201, 240, 0.1); stroke: #4cc9f0; stroke-width: 2.5; }
.optics-svg .lens-axis { stroke: rgba(76, 201, 240, 0.3); stroke-dasharray: 4 7; }
.optics-svg .candle { stroke: #e8d3a0; stroke-width: 2; }
.optics-svg .candle-body { fill: #f1e2c4; }
.optics-svg .flame { fill: #ffb454; filter: drop-shadow(0 0 8px rgba(255, 180, 84, 0.85)); }
.optics-svg .screen-plate { fill: rgba(230, 240, 255, 0.1); stroke: #8fa4cc; stroke-width: 2; }
.optics-svg .screen-stand { stroke: #8fa4cc; stroke-width: 3; stroke-linecap: round; }
.optics-svg .obj-label { fill: #93a0bd; font-size: 10.5px; text-anchor: middle; font-family: var(--mono); }
.optics-svg .opt-drag { cursor: grab; }
.optics-svg .img-arrow { stroke: #ffd479; stroke-width: 2.2; }
.optics-svg .img-arrow.virtual { stroke-dasharray: 5 5; opacity: 0.75; }
.optics-svg .img-head { stroke: #ffd479; stroke-width: 2; fill: none; }
.optics-svg .opt-ray { fill: none; stroke-width: 1.9; stroke-linecap: round; opacity: 0.95; }
.optics-svg .opt-ray.ray-a { stroke: #ffb454; }
.optics-svg .opt-ray.ray-b { stroke: #4cc9f0; }
.optics-svg .opt-ray.ray-c { stroke: #8b8cff; }
.optics-svg .opt-ray.dashed { stroke-dasharray: 5 7; opacity: 0.5; }
.opt-legend { margin-top: 18px; display: flex; flex-direction: column; gap: 7px; font-size: 10.5px; color: var(--muted-2); }
.opt-legend span { display: flex; align-items: center; gap: 7px; }
.opt-legend i { width: 14px; height: 2px; border-radius: 2px; display: inline-block; }
.opt-readout { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ro-chip {
  display: flex; align-items: center; gap: 8px; padding: 7px 11px;
  border-radius: 9px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03);
  font-size: 11.5px; color: var(--muted);
}
.ro-chip b { font-family: var(--mono); color: var(--text); font-weight: 600; }
.ro-chip.wide { flex: 1 1 100%; }
.ro-chip.warn { color: #ffcf85; border-color: rgba(255, 180, 84, 0.32); background: rgba(255, 180, 84, 0.07); }
.ro-chip.note { color: var(--muted); border-style: dashed; }

/* ---------- 显微镜 ---------- */
.micro-shell { grid-template-columns: 262px minmax(0, 1fr); }
.micro-slides { display: flex; flex-direction: column; gap: 6px; }
.micro-slide {
  text-align: left; padding: 9px 11px; border-radius: 9px; cursor: pointer;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03);
  font-size: 11.8px; color: var(--muted); transition: 0.18s;
}
.micro-slide:hover { color: var(--text); border-color: var(--line-2); }
.micro-slide.active { color: #06101f; background: var(--biology); border-color: transparent; font-weight: 600; }
.micro-objectives { display: flex; gap: 7px; }
.micro-obj {
  flex: 1; height: 40px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03);
  font-family: var(--mono); font-size: 12.5px; color: var(--muted); transition: 0.18s;
}
.micro-obj:hover { color: var(--text); border-color: var(--line-2); }
.micro-obj.active { color: #06101f; background: var(--biology); border-color: transparent; font-weight: 700; }
.micro-toggle { display: flex; align-items: center; gap: 8px; margin: 16px 0 12px; font-size: 12px; color: var(--muted); cursor: pointer; }
.micro-toggle input { accent-color: var(--biology); width: 15px; height: 15px; }
.micro-stage { display: flex; flex-direction: column; align-items: center; }
.micro-scope {
  position: relative; width: 100%; max-width: 560px; aspect-ratio: 1 / 1;
  border-radius: 50%; overflow: hidden; background: #000;
  border: 10px solid #0c1526;
  box-shadow: inset 0 0 70px rgba(0, 0, 0, 0.8), 0 34px 70px -38px #000;
}
.micro-scope canvas { width: 100%; height: 100%; display: block; }
.micro-vignette {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 50% 46%, transparent 42%, rgba(2, 5, 10, 0.55) 100%);
}
.micro-crosshair {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.28;
  background:
    linear-gradient(to right, transparent calc(50% - 0.5px), rgba(200, 235, 255, 0.8) 50%, transparent calc(50% + 0.5px)),
    linear-gradient(to bottom, transparent calc(50% - 0.5px), rgba(200, 235, 255, 0.8) 50%, transparent calc(50% + 0.5px));
  background-size: 100% 100%, 100% 100%;
}
.micro-labels { position: absolute; inset: 0; pointer-events: none; }
.micro-label {
  position: absolute; transform: translate(-50%, -50%); white-space: nowrap;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px; border-radius: 999px;
  font-size: 10.5px; color: #eaf4ff;
  background: rgba(6, 9, 18, 0.78); border: 1px solid rgba(140, 220, 180, 0.4);
  box-shadow: 0 4px 14px -6px #000;
}
.micro-label i { width: 5px; height: 5px; border-radius: 50%; background: var(--biology); box-shadow: 0 0 7px var(--biology); }
.micro-zoom {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%);
  padding: 4px 12px; border-radius: 999px;
  font-family: var(--mono); font-size: 10.5px; color: #cfe6ff;
  background: rgba(6, 9, 18, 0.7); border: 1px solid rgba(151, 168, 214, 0.3);
}
.micro-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; justify-content: center; }

/* ---------- 实验室响应式 ---------- */
@media (max-width: 1180px) {
  .circuit-shell { grid-template-columns: 220px minmax(0, 1fr); }
  .circuit-shell .lab-inspector { grid-column: 1 / -1; }
}
@media (max-width: 1080px) {
  .lab-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .optics-shell { grid-template-columns: 220px minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .lab-shell, .circuit-shell, .optics-shell, .micro-shell { grid-template-columns: 1fr; }
  .circuit-shell .lab-inspector { grid-column: auto; }
  .micro-scope { max-width: 440px; }
}
@media (max-width: 680px) {
  .lab-grid { grid-template-columns: 1fr; }
  .lab-switch { padding-top: 0; }
  .shelf-list { grid-template-columns: repeat(4, 1fr); }
  .micro-scope { border-width: 7px; }
  .ro-chip { font-size: 11px; }
}

/* =========================================================
   化学沙盒扩展：更多试剂 + 加热
   ========================================================= */
.chem-layout > .panel:first-child { max-height: 720px; overflow-y: auto; scrollbar-width: thin; }
.chem-layout > .panel:first-child::-webkit-scrollbar { width: 6px; }
.chem-layout > .panel:first-child::-webkit-scrollbar-thumb { background: rgba(151, 168, 214, 0.24); border-radius: 999px; }
#chemHeat.active {
  color: #ffcf85; border-color: rgba(255, 150, 90, 0.5);
  background: rgba(255, 120, 60, 0.14);
}
.beaker.heating {
  border-color: rgba(255, 150, 90, 0.55);
  box-shadow: inset 0 0 34px rgba(255, 140, 70, 0.16), 0 0 48px -10px rgba(255, 120, 60, 0.6);
  animation: heatPulse 1.8s ease-in-out infinite;
}
@keyframes heatPulse {
  0%, 100% { box-shadow: inset 0 0 34px rgba(255, 140, 70, 0.14), 0 0 40px -12px rgba(255, 120, 60, 0.45); }
  50% { box-shadow: inset 0 0 42px rgba(255, 140, 70, 0.24), 0 0 58px -8px rgba(255, 120, 60, 0.75); }
}

/* =========================================================
   分子模型实验室（3Dmol.js）
   ========================================================= */
.lab-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mol-shell { grid-template-columns: 262px minmax(0, 1fr); }
.mol-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.mol-item {
  display: flex; flex-direction: column; gap: 1px; text-align: left;
  padding: 8px 10px; border-radius: 9px; cursor: pointer;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03);
  color: var(--muted); transition: 0.18s;
}
.mol-item b { font-size: 12px; font-weight: 600; }
.mol-item small { font-family: var(--mono); font-size: 10px; color: var(--muted-2); }
.mol-item:hover { color: var(--text); border-color: var(--line-2); }
.mol-item.active { color: #1a1206; background: var(--chemistry); border-color: transparent; }
.mol-item.active small { color: rgba(26, 18, 6, 0.7); }
.mol-styles { display: flex; flex-direction: column; gap: 6px; }
.mol-style {
  height: 36px; border-radius: 9px; cursor: pointer;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03);
  font-size: 12px; color: var(--muted); transition: 0.18s;
}
.mol-style:hover { color: var(--text); border-color: var(--line-2); }
.mol-style.active { color: #1a1206; background: var(--chemistry); border-color: transparent; font-weight: 600; }
.mol-viewer {
  position: relative; width: 100%; height: 560px; border-radius: 12px; overflow: hidden;
  background: radial-gradient(circle at 50% 42%, rgba(255, 180, 84, 0.05), #070d18 68%);
  touch-action: none;
}
.mol-viewer canvas { display: block; }
.mol-loading {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px;
  color: var(--muted); font-size: 13px; text-align: center; padding: 20px;
}
.mol-loading b { color: var(--text); font-size: 14px; }
.mol-info { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.credit-list { list-style: none; display: flex; flex-direction: column; gap: 9px; margin-top: 14px; }
.credit-list li { position: relative; padding-left: 14px; font-size: 12.5px; color: #c3cfe6; line-height: 1.65; }
.credit-list li::before {
  content: ""; position: absolute; left: 0; top: 8px; width: 5px; height: 5px;
  border-radius: 50%; background: var(--chemistry); box-shadow: 0 0 8px var(--chemistry);
}
.credit-list b { display: block; font-weight: 600; color: #e9efff; }
.credit-list span { color: var(--muted-2); font-size: 11.5px; }
@media (max-width: 900px) {
  .mol-shell { grid-template-columns: 1fr; }
  .mol-viewer { height: 440px; }
}
@media (max-width: 680px) {
  .mol-viewer { height: 360px; }
}

/* =========================================================
   抛体运动实验室
   ========================================================= */
.lab-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.proj-shell { grid-template-columns: 260px minmax(0, 1fr); }
.proj-canvas {
  width: 100%; height: auto; display: block; border-radius: 12px;
  background: radial-gradient(circle at 50% 35%, rgba(76, 201, 240, 0.05), #060b14 70%);
}
.proj-grav { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.proj-grav .chip {
  display: flex; align-items: center; justify-content: space-between; gap: 4px;
  padding: 7px 10px;
}
.proj-grav .chip small { font-family: var(--mono); font-size: 9px; opacity: 0.72; }
.proj-grav .chip.active { color: #06101f; background: var(--physics); border-color: transparent; font-weight: 600; }
@media (max-width: 900px) {
  .proj-shell { grid-template-columns: 1fr; }
}
