:root {
  --bg: #0a0e17;
  --panel: #111827;
  --panel2: #0f1522;
  --line: #1f2a3d;
  --text: #e5eefc;
  --muted: #8296b4;
  --cyan: #22d3ee;
  --violet: #a78bfa;
  --amber: #fbbf24;
  --green: #34d399;
  --red: #f87171;
  --blue: #60a5fa;
  /* 展示/标题用衬线，UI 控件保持无衬线 */
  --font-sans: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", "STSong", "SimSun",
    "Hiragino Mincho ProN", Georgia, "Times New Roman", serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  overflow-x: hidden;
  max-width: 100vw;
}
#windCanvas {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
}
.wrap {
  position: relative; z-index: 1; max-width: 1320px; margin: 0 auto; padding: 0 28px;
  min-width: 0;
  box-sizing: border-box;
  width: 100%;
}
@media (max-width: 600px) {
  .wrap { padding: 0 14px; }
  .hero { min-height: auto; padding: 48px 0 24px; }
  .hero h1 { letter-spacing: 4px; }
  .hero .slogan {
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 10px;
    letter-spacing: 2px;
  }
  .hero .cta { width: 100%; max-width: 320px; padding: 14px 20px; }
  .secTitle { font-size: 22px; letter-spacing: 1px; }
  .secTitle em { display: block; margin: 6px 0 0; margin-left: 0; }
  .pipeline { flex-direction: column; }
  .pipe-step { min-width: 0; }
  .pipe-step::after { display: none; }
  .lab { padding: 16px 12px; }
  .stress-chip {
    min-height: 40px;
    padding: 8px 12px;
    font-size: 13px;
  }
  .runBtn { min-height: 48px; letter-spacing: 1px; font-size: 15px; }
  .btn-ai { min-height: 44px; }
  .crt-chassis { overflow: hidden; }
  .crt-bezel { padding: 8px; }
  .crt-glass { border-radius: 12px; }
  .crt-screen {
    transform: none; /* 移动端取消透视，避免横向溢出感 */
    border-radius: 10px;
  }
  .rule-meta { grid-template-columns: 1fr; }
  .rule-list { max-height: 160px; }
  .contrib-table { font-size: 11px; }
  .footer-link { min-height: 40px; padding: 8px 0; }
}

/* ============ HERO ============ */
.hero { min-height: 92vh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.hero .badge {
  border: 1px solid var(--cyan); color: var(--cyan); border-radius: 999px;
  padding: 6px 18px; font-size: 13px; letter-spacing: 4px;
  animation: pulseGlow 2.4s ease-in-out infinite;
}
@keyframes pulseGlow {
  0%,100% { box-shadow: 0 0 6px rgba(34,211,238,.25); }
  50% { box-shadow: 0 0 22px rgba(34,211,238,.55); }
}
.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(42px, 7vw, 84px); margin: 26px 0 10px; letter-spacing: 8px; font-weight: 700;
}
.hero h1 .accent { color: var(--cyan); }
.hero .sub {
  font-family: var(--font-serif);
  color: var(--muted); font-size: 17px; letter-spacing: 2.5px; font-weight: 500;
}
.hero .slogan {
  font-family: var(--font-serif);
  margin-top: 34px; font-size: clamp(20px, 3vw, 32px); font-weight: 600; letter-spacing: 4px;
  display: flex; gap: 14px;
}
.slogan span { opacity: 0; transform: translateY(24px); animation: riseIn .7s forwards; }
.slogan span:nth-child(1) { animation-delay: .3s; }
.slogan span:nth-child(2) { animation-delay: .9s; color: var(--cyan); }
.slogan span:nth-child(3) { animation-delay: 1.5s; color: var(--green); }
@keyframes riseIn { to { opacity: 1; transform: none; } }
.hero .cta {
  margin-top: 46px; background: var(--cyan); color: #04222a; border: none;
  font-size: 17px; font-weight: 700; padding: 14px 42px; border-radius: 10px; cursor: pointer;
  letter-spacing: 2px; transition: transform .15s, box-shadow .15s;
}
.hero .cta:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(34,211,238,.4); }

/* 组织风洞 · 更多仿真场景 */
.scenario-strip {
  margin-top: 48px;
  width: min(1080px, 100%);
  text-align: center;
}
.scenario-strip-label {
  font-family: var(--font-serif);
  font-size: 13px;
  letter-spacing: 4px;
  color: var(--muted);
  margin-bottom: 6px;
}
.scenario-strip-hint {
  font-family: var(--font-serif);
  font-size: 14px;
  color: var(--text);
  opacity: .85;
  letter-spacing: 1px;
  margin-bottom: 18px;
}
.scenario-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 720px) {
  .scenario-cards { grid-template-columns: 1fr; }
}
.scenario-card {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  text-decoration: none;
  color: inherit;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 14px 14px 12px;
  transition: border-color .2s, box-shadow .2s, transform .15s, background .2s;
  position: relative;
}
a.scenario-card:hover {
  border-color: var(--cyan);
  box-shadow: 0 8px 28px rgba(34,211,238,.16);
  transform: translateY(-2px);
  background: #121a2b;
}
a.scenario-card:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}
.scenario-card.current {
  border-color: rgba(34,211,238,.55);
  box-shadow: 0 0 0 1px rgba(34,211,238,.12), 0 10px 30px rgba(34,211,238,.1);
  background: linear-gradient(145deg, rgba(34,211,238,.08), transparent 60%), var(--panel);
  cursor: default;
}
.scenario-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #0b101c;
  border: 1px solid var(--line);
  color: var(--cyan);
}
.scenario-card.current .scenario-icon {
  border-color: rgba(34,211,238,.4);
  box-shadow: 0 0 16px rgba(34,211,238,.15);
}
.scenario-sales .scenario-icon { color: var(--amber); }
.scenario-hire .scenario-icon { color: var(--green); }
.scenario-icon svg { width: 28px; height: 28px; display: block; }
.scenario-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.scenario-name {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--text);
}
.scenario-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}
.scenario-tag {
  align-self: flex-start;
  margin-top: 4px;
  font-size: 10px;
  letter-spacing: 2px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--cyan);
  color: var(--cyan);
}
.scenario-tag.soon {
  border-color: var(--line);
  color: var(--muted);
}
.scenario-arrow {
  color: var(--muted);
  font-size: 18px;
  flex-shrink: 0;
  transition: color .15s, transform .15s;
}
a.scenario-card:hover .scenario-arrow {
  color: var(--cyan);
  transform: translateX(3px);
}

.scrollHint { margin-top: 40px; color: var(--muted); font-size: 12px; animation: bob 1.8s ease-in-out infinite; }
@keyframes bob { 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(8px);} }

/* ============ SECTIONS ============ */
section { padding: 90px 0; }
.secTitle {
  font-family: var(--font-serif);
  font-size: 30px; font-weight: 700; letter-spacing: 3px; margin-bottom: 8px;
}
.secTitle em {
  font-family: var(--font-sans);
  font-style: normal; color: var(--cyan); font-size: 15px; margin-left: 12px; letter-spacing: 1px; font-weight: 600;
}
.secDesc {
  font-family: var(--font-serif);
  color: var(--muted); margin-bottom: 36px; line-height: 1.9; max-width: 760px;
  font-size: 15px; letter-spacing: 0.3px;
}

/* pipeline */
.pipeline { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; }
.pipe-step {
  flex: 1; min-width: 150px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 18px 16px; position: relative; opacity: 0; transform: translateY(30px); transition: .6s;
}
.pipe-step.show { opacity: 1; transform: none; }
.pipe-step .num { color: var(--cyan); font-size: 12px; font-weight: 700; letter-spacing: 2px; }
.pipe-step h3 {
  font-family: var(--font-serif);
  font-size: 16px; margin: 8px 0 6px; font-weight: 600; letter-spacing: 1px;
}
.pipe-step p { color: var(--muted); font-size: 12.5px; line-height: 1.7; }
.pipe-step::after {
  content: "→"; position: absolute; right: -14px; top: 50%; transform: translateY(-50%);
  color: var(--cyan); font-size: 18px; z-index: 2;
}
.pipe-step:last-child::after { display: none; }

/* ============ LAB ============ */
.lab {
  background: var(--panel2); border: 1px solid var(--line); border-radius: 18px; padding: 28px;
}
.lab-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 900px) {
  .lab-grid { grid-template-columns: 1fr; }
}

/* 左侧：上滚下贴按钮，避免滚很久才看到操作 */
.ctrl {
  display: flex;
  flex-direction: column;
  max-height: min(calc(100vh - 100px), 880px);
  min-height: 0;
  position: sticky;
  top: 12px;
  min-width: 0; /* 防止子项撑破 grid */
  max-width: 100%;
}
@media (max-width: 900px) {
  /* 手机：取消 sticky 占满屏，控制栏随文档流，便于先操作再往下看 CRT */
  .ctrl {
    position: static;
    max-height: none;
  }
  .ctrl-scroll {
    overflow: visible;
    max-height: none;
  }
  .ctrl-actions {
    position: sticky;
    bottom: 0;
    z-index: 5;
    margin-left: -4px;
    margin-right: -4px;
    padding: 10px 4px 8px;
    background: linear-gradient(180deg, transparent, var(--panel2) 20%, var(--panel2));
    box-shadow: 0 -8px 20px rgba(0,0,0,.25);
  }
}
.ctrl-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  scrollbar-gutter: stable;
}
.ctrl-actions {
  flex-shrink: 0;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent 0%, var(--panel2) 18%, var(--panel2) 100%);
}
.ctrl-actions .runBtn { margin-top: 0; }
.ctrl-actions .runBtn.batch { margin-top: 8px; }
.ctrl-actions .btn-ai { margin-top: 8px; }
.ctrl-actions .batchbar { margin-top: 10px; }

.ctrl h4 { font-size: 14px; color: var(--muted); letter-spacing: 2px; margin: 18px 0 8px; }
.ctrl-scroll > h4:first-child { margin-top: 0; }

.policy-card {
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 6px; cursor: pointer;
  background: var(--panel); transition: .2s; position: relative;
}
.policy-card:hover { border-color: var(--muted); }
.policy-card.active {
  border-color: var(--cyan); box-shadow: 0 0 16px rgba(34,211,238,.25);
  padding-bottom: 12px;
}
.policy-card.active::before {
  content: "✓"; position: absolute; top: 10px; right: 12px; color: var(--cyan); font-weight: 700;
}
.policy-card .pname {
  font-family: var(--font-serif);
  font-weight: 600; font-size: 15px; letter-spacing: 0.5px;
  padding-right: 18px;
}
/* ③：仅当前方案展开描述，未选中只保留标题 */
.policy-card .pdesc {
  display: none;
  color: var(--muted); font-size: 12px; margin-top: 6px; line-height: 1.55;
}
.policy-card.active .pdesc { display: block; }

/* 可执行规则包 */
.rule-panel {
  margin: 14px 0 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0b101c;
  overflow: hidden;
}
.rule-panel-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
  padding: 10px 12px 6px; font-size: 12px; letter-spacing: 2px; color: var(--cyan);
}
.rule-panel-hint { font-size: 11px; color: var(--muted); letter-spacing: 0; }
.rule-list { padding: 4px 10px 12px; display: flex; flex-direction: column; gap: 8px; max-height: 280px; overflow-y: auto; }
.rule-item {
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 11px; background: var(--panel);
}
.rule-item-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-bottom: 4px; }
.rule-id {
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 11px; color: var(--cyan); letter-spacing: 0.5px;
}
.rule-name { font-family: var(--font-serif); font-size: 13.5px; font-weight: 600; color: var(--text); }
.rule-tag {
  font-size: 10px; letter-spacing: 1px; padding: 1px 7px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted);
}
.rule-tag.hard { border-color: var(--red); color: var(--red); }
.rule-tag.change { border-color: rgba(34,211,238,.4); color: var(--cyan); }
.rule-tag.upgrade { border-color: var(--amber); color: var(--amber); }
.rule-meta {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px 10px;
  font-size: 11px; color: var(--muted); line-height: 1.55; margin: 4px 0;
}
.rule-meta b { color: var(--text); font-weight: 500; }
.rule-text { font-size: 11.5px; color: var(--muted); line-height: 1.55; margin-top: 2px; }

/* 制度贡献表 */
.contrib-panel {
  margin-top: 14px; border: 1px solid var(--line); border-radius: 12px;
  background: #0b101c; padding: 12px 14px 10px;
}
.contrib-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px;
  margin-bottom: 10px; font-size: 13px; letter-spacing: 1px; color: var(--text);
  font-family: var(--font-serif); font-weight: 600;
}
.contrib-hint { font-size: 11px; color: var(--muted); letter-spacing: 0; font-family: var(--font-sans); font-weight: 400; }
.contrib-table-wrap { overflow-x: auto; }
.contrib-table {
  width: 100%; border-collapse: collapse; font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.contrib-table th {
  text-align: left; color: var(--muted); font-weight: 500; padding: 6px 8px;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
.contrib-table td {
  padding: 7px 8px; border-bottom: 1px solid rgba(31,42,61,.7); color: var(--text);
}
.contrib-table tr:last-child td { border-bottom: none; }
.contrib-table .rid {
  font-family: "SF Mono", Menlo, Consolas, monospace; font-size: 11px; color: var(--cyan);
}
.contrib-table .rname { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.contrib-table .hi { color: var(--amber); font-weight: 700; }
.contrib-empty { color: var(--muted); text-align: center; padding: 14px !important; }
.logbox .rid-inline {
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 11px; color: var(--cyan); margin-right: 4px;
}
/* Phosphor UI icons：mask 用黑底 SVG 作遮罩，颜色由 currentColor 控制 */
.ui-icon {
  display: inline-block;
  width: 1.15em;
  height: 1.15em;
  vertical-align: -0.2em;
  flex-shrink: 0;
  background-color: currentColor;
  color: inherit;
  -webkit-mask-image: var(--ph);
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-image: var(--ph);
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
}
.ui-icon.sm { width: 1em; height: 1em; vertical-align: -0.12em; }
.ui-icon.lg { width: 1.25em; height: 1.25em; }
.ui-icon.wind { --ph: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20256%20256%22%20fill%3D%22%23fff%22%3E%3Cpath%20d%3D%22M184%2C184a32%2C32%2C0%2C0%2C1-32%2C32c-13.7%2C0-26.95-8.93-31.5-21.22a8%2C8%2C0%2C0%2C1%2C15-5.56C137.74%2C195.27%2C145%2C200%2C152%2C200a16%2C16%2C0%2C0%2C0%2C0-32H40a8%2C8%2C0%2C0%2C1%2C0-16H152A32%2C32%2C0%2C0%2C1%2C184%2C184Zm-64-80a32%2C32%2C0%2C0%2C0%2C0-64c-13.7%2C0-26.95%2C8.93-31.5%2C21.22a8%2C8%2C0%2C0%2C0%2C15%2C5.56C105.74%2C60.73%2C113%2C56%2C120%2C56a16%2C16%2C0%2C0%2C1%2C0%2C32H24a8%2C8%2C0%2C0%2C0%2C0%2C16Zm88-32c-13.7%2C0-26.95%2C8.93-31.5%2C21.22a8%2C8%2C0%2C0%2C0%2C15%2C5.56C193.74%2C92.73%2C201%2C88%2C208%2C88a16%2C16%2C0%2C0%2C1%2C0%2C32H32a8%2C8%2C0%2C0%2C0%2C0%2C16H208a32%2C32%2C0%2C0%2C0%2C0-64Z%22%2F%3E%3C%2Fsvg%3E"); }
.ui-icon.door { --ph: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20256%20256%22%20fill%3D%22%23fff%22%3E%3Cpath%20d%3D%22M232%2C216H208V40a16%2C16%2C0%2C0%2C0-16-16H64A16%2C16%2C0%2C0%2C0%2C48%2C40V216H24a8%2C8%2C0%2C0%2C0%2C0%2C16H232a8%2C8%2C0%2C0%2C0%2C0-16ZM64%2C40H192V216H64Zm104%2C92a12%2C12%2C0%2C1%2C1-12-12A12%2C12%2C0%2C0%2C1%2C168%2C132Z%22%2F%3E%3C%2Fsvg%3E"); }
.ui-icon.fire { --ph: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20256%20256%22%20fill%3D%22%23fff%22%3E%3Cpath%20d%3D%22M183.89%2C153.34a57.6%2C57.6%2C0%2C0%2C1-46.56%2C46.55A8.75%2C8.75%2C0%2C0%2C1%2C136%2C200a8%2C8%2C0%2C0%2C1-1.32-15.89c16.57-2.79%2C30.63-16.85%2C33.44-33.45a8%2C8%2C0%2C0%2C1%2C15.78%2C2.68ZM216%2C144a88%2C88%2C0%2C0%2C1-176%2C0c0-27.92%2C11-56.47%2C32.66-84.85a8%2C8%2C0%2C0%2C1%2C11.93-.89l24.12%2C23.41%2C22-60.41a8%2C8%2C0%2C0%2C1%2C12.63-3.41C165.21%2C36%2C216%2C84.55%2C216%2C144Zm-16%2C0c0-46.09-35.79-85.92-58.21-106.33L119.52%2C98.74a8%2C8%2C0%2C0%2C1-13.09%2C3L80.06%2C76.16C64.09%2C99.21%2C56%2C122%2C56%2C144a72%2C72%2C0%2C0%2C0%2C144%2C0Z%22%2F%3E%3C%2Fsvg%3E"); }
.ui-icon.chat-slash { --ph: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20256%20256%22%20fill%3D%22%23fff%22%3E%3Cpath%20d%3D%22M53.92%2C34.62A8%2C8%2C0%2C1%2C0%2C42.08%2C45.38l13.18%2C14.5A99.39%2C99.39%2C0%2C0%2C0%2C32%2C124v84a16%2C16%2C0%2C0%2C0%2C16%2C16h84a100.33%2C100.33%2C0%2C0%2C0%2C56.53-17.53l13.55%2C14.91a8%2C8%2C0%2C1%2C0%2C11.84-10.76ZM132%2C208H48V124A83.46%2C83.46%2C0%2C0%2C1%2C66.15%2C71.85L177.66%2C194.51A83%2C83%2C0%2C0%2C1%2C132%2C208Zm100-84a99.87%2C99.87%2C0%2C0%2C1-14.35%2C51.65%2C8%2C8%2C0%2C0%2C1-13.7-8.28A84%2C84%2C0%2C0%2C0%2C95.66%2C48.25a8%2C8%2C0%2C0%2C1-6.94-14.42A100%2C100%2C0%2C0%2C1%2C232%2C124Z%22%2F%3E%3C%2Fsvg%3E"); }
.ui-icon.play { --ph: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20256%20256%22%20fill%3D%22%23fff%22%3E%3Cpath%20d%3D%22M232.4%2C114.49%2C88.32%2C26.35a16%2C16%2C0%2C0%2C0-16.2-.3A15.86%2C15.86%2C0%2C0%2C0%2C64%2C39.87V216.13A15.94%2C15.94%2C0%2C0%2C0%2C80%2C232a16.07%2C16.07%2C0%2C0%2C0%2C8.36-2.35L232.4%2C141.51a15.81%2C15.81%2C0%2C0%2C0%2C0-27ZM80%2C215.94V40l143.83%2C88Z%22%2F%3E%3C%2Fsvg%3E"); }
.ui-icon.lightning { --ph: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20256%20256%22%20fill%3D%22%23fff%22%3E%3Cpath%20d%3D%22M215.79%2C118.17a8%2C8%2C0%2C0%2C0-5-5.66L153.18%2C90.9l14.66-73.33a8%2C8%2C0%2C0%2C0-13.69-7l-112%2C120a8%2C8%2C0%2C0%2C0%2C3%2C13l57.63%2C21.61L88.16%2C238.43a8%2C8%2C0%2C0%2C0%2C13.69%2C7l112-120A8%2C8%2C0%2C0%2C0%2C215.79%2C118.17ZM109.37%2C214l10.47-52.38a8%2C8%2C0%2C0%2C0-5-9.06L62%2C132.71l84.62-90.66L136.16%2C94.43a8%2C8%2C0%2C0%2C0%2C5%2C9.06l52.8%2C19.8Z%22%2F%3E%3C%2Fsvg%3E"); }
.ui-icon.robot { --ph: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20256%20256%22%20fill%3D%22%23fff%22%3E%3Cpath%20d%3D%22M200%2C48H136V16a8%2C8%2C0%2C0%2C0-16%2C0V48H56A32%2C32%2C0%2C0%2C0%2C24%2C80V192a32%2C32%2C0%2C0%2C0%2C32%2C32H200a32%2C32%2C0%2C0%2C0%2C32-32V80A32%2C32%2C0%2C0%2C0%2C200%2C48Zm16%2C144a16%2C16%2C0%2C0%2C1-16%2C16H56a16%2C16%2C0%2C0%2C1-16-16V80A16%2C16%2C0%2C0%2C1%2C56%2C64H200a16%2C16%2C0%2C0%2C1%2C16%2C16Zm-52-56H92a28%2C28%2C0%2C0%2C0%2C0%2C56h72a28%2C28%2C0%2C0%2C0%2C0-56Zm-24%2C16v24H116V152ZM80%2C164a12%2C12%2C0%2C0%2C1%2C12-12h8v24H92A12%2C12%2C0%2C0%2C1%2C80%2C164Zm84%2C12h-8V152h8a12%2C12%2C0%2C0%2C1%2C0%2C24ZM72%2C108a12%2C12%2C0%2C1%2C1%2C12%2C12A12%2C12%2C0%2C0%2C1%2C72%2C108Zm88%2C0a12%2C12%2C0%2C1%2C1%2C12%2C12A12%2C12%2C0%2C0%2C1%2C160%2C108Z%22%2F%3E%3C%2Fsvg%3E"); }
.ui-icon.sparkle { --ph: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20256%20256%22%20fill%3D%22%23fff%22%3E%3Cpath%20d%3D%22M197.58%2C129.06%2C146%2C110l-19-51.62a15.92%2C15.92%2C0%2C0%2C0-29.88%2C0L78%2C110l-51.62%2C19a15.92%2C15.92%2C0%2C0%2C0%2C0%2C29.88L78%2C178l19%2C51.62a15.92%2C15.92%2C0%2C0%2C0%2C29.88%2C0L146%2C178l51.62-19a15.92%2C15.92%2C0%2C0%2C0%2C0-29.88ZM137%2C164.22a8%2C8%2C0%2C0%2C0-4.74%2C4.74L112%2C223.85%2C91.78%2C169A8%2C8%2C0%2C0%2C0%2C87%2C164.22L32.15%2C144%2C87%2C123.78A8%2C8%2C0%2C0%2C0%2C91.78%2C119L112%2C64.15%2C132.22%2C119a8%2C8%2C0%2C0%2C0%2C4.74%2C4.74L191.85%2C144ZM144%2C40a8%2C8%2C0%2C0%2C1%2C8-8h16V16a8%2C8%2C0%2C0%2C1%2C16%2C0V32h16a8%2C8%2C0%2C0%2C1%2C0%2C16H184V64a8%2C8%2C0%2C0%2C1-16%2C0V48H152A8%2C8%2C0%2C0%2C1%2C144%2C40ZM248%2C88a8%2C8%2C0%2C0%2C1-8%2C8h-8v8a8%2C8%2C0%2C0%2C1-16%2C0V96h-8a8%2C8%2C0%2C0%2C1%2C0-16h8V72a8%2C8%2C0%2C0%2C1%2C16%2C0v8h8A8%2C8%2C0%2C0%2C1%2C248%2C88Z%22%2F%3E%3C%2Fsvg%3E"); }
.ui-icon.calendar { --ph: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20256%20256%22%20fill%3D%22%23fff%22%3E%3Cpath%20d%3D%22M208%2C32H184V24a8%2C8%2C0%2C0%2C0-16%2C0v8H88V24a8%2C8%2C0%2C0%2C0-16%2C0v8H48A16%2C16%2C0%2C0%2C0%2C32%2C48V208a16%2C16%2C0%2C0%2C0%2C16%2C16H208a16%2C16%2C0%2C0%2C0%2C16-16V48A16%2C16%2C0%2C0%2C0%2C208%2C32ZM72%2C48v8a8%2C8%2C0%2C0%2C0%2C16%2C0V48h80v8a8%2C8%2C0%2C0%2C0%2C16%2C0V48h24V80H48V48ZM208%2C208H48V96H208V208Z%22%2F%3E%3C%2Fsvg%3E"); }
.ui-icon.target { --ph: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20256%20256%22%20fill%3D%22%23fff%22%3E%3Cpath%20d%3D%22M221.87%2C83.16A104.1%2C104.1%2C0%2C1%2C1%2C195.67%2C49l22.67-22.68a8%2C8%2C0%2C0%2C1%2C11.32%2C11.32l-96%2C96a8%2C8%2C0%2C0%2C1-11.32-11.32l27.72-27.72a40%2C40%2C0%2C1%2C0%2C17.87%2C31.09%2C8%2C8%2C0%2C1%2C1%2C16-.9%2C56%2C56%2C0%2C1%2C1-22.38-41.65L184.3%2C60.39a87.88%2C87.88%2C0%2C1%2C0%2C23.13%2C29.67%2C8%2C8%2C0%2C0%2C1%2C14.44-6.9Z%22%2F%3E%3C%2Fsvg%3E"); }
.ui-icon.flask { --ph: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20256%20256%22%20fill%3D%22%23fff%22%3E%3Cpath%20d%3D%22M221.69%2C199.77%2C160%2C96.92V40h8a8%2C8%2C0%2C0%2C0%2C0-16H88a8%2C8%2C0%2C0%2C0%2C0%2C16h8V96.92L34.31%2C199.77A16%2C16%2C0%2C0%2C0%2C48%2C224H208a16%2C16%2C0%2C0%2C0%2C13.72-24.23ZM110.86%2C103.25A7.93%2C7.93%2C0%2C0%2C0%2C112%2C99.14V40h32V99.14a7.93%2C7.93%2C0%2C0%2C0%2C1.14%2C4.11L183.36%2C167c-12%2C2.37-29.07%2C1.37-51.75-10.11-15.91-8.05-31.05-12.32-45.22-12.81ZM48%2C208l28.54-47.58c14.25-1.74%2C30.31%2C1.85%2C47.82%2C10.72%2C19%2C9.61%2C35%2C12.88%2C48%2C12.88a69.89%2C69.89%2C0%2C0%2C0%2C19.55-2.7L208%2C208Z%22%2F%3E%3C%2Fsvg%3E"); }
.ui-icon.smiley { --ph: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20256%20256%22%20fill%3D%22%23fff%22%3E%3Cpath%20d%3D%22M128%2C24A104%2C104%2C0%2C1%2C0%2C232%2C128%2C104.11%2C104.11%2C0%2C0%2C0%2C128%2C24Zm0%2C192a88%2C88%2C0%2C1%2C1%2C88-88A88.1%2C88.1%2C0%2C0%2C1%2C128%2C216ZM80%2C108a12%2C12%2C0%2C1%2C1%2C12%2C12A12%2C12%2C0%2C0%2C1%2C80%2C108Zm96%2C0a12%2C12%2C0%2C1%2C1-12-12A12%2C12%2C0%2C0%2C1%2C176%2C108Zm-1.07%2C48c-10.29%2C17.79-27.4%2C28-46.93%2C28s-36.63-10.2-46.92-28a8%2C8%2C0%2C1%2C1%2C13.84-8c7.47%2C12.91%2C19.21%2C20%2C33.08%2C20s25.61-7.1%2C33.07-20a8%2C8%2C0%2C0%2C1%2C13.86%2C8Z%22%2F%3E%3C%2Fsvg%3E"); }
.ui-icon.coins { --ph: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20256%20256%22%20fill%3D%22%23fff%22%3E%3Cpath%20d%3D%22M184%2C89.57V84c0-25.08-37.83-44-88-44S8%2C58.92%2C8%2C84v40c0%2C20.89%2C26.25%2C37.49%2C64%2C42.46V172c0%2C25.08%2C37.83%2C44%2C88%2C44s88-18.92%2C88-44V132C248%2C111.3%2C222.58%2C94.68%2C184%2C89.57ZM232%2C132c0%2C13.22-30.79%2C28-72%2C28-3.73%2C0-7.43-.13-11.08-.37C170.49%2C151.77%2C184%2C139%2C184%2C124V105.74C213.87%2C110.19%2C232%2C122.27%2C232%2C132ZM72%2C150.25V126.46A183.74%2C183.74%2C0%2C0%2C0%2C96%2C128a183.74%2C183.74%2C0%2C0%2C0%2C24-1.54v23.79A163%2C163%2C0%2C0%2C1%2C96%2C152%2C163%2C163%2C0%2C0%2C1%2C72%2C150.25Zm96-40.32V124c0%2C8.39-12.41%2C17.4-32%2C22.87V123.5C148.91%2C120.37%2C159.84%2C115.71%2C168%2C109.93ZM96%2C56c41.21%2C0%2C72%2C14.78%2C72%2C28s-30.79%2C28-72%2C28S24%2C97.22%2C24%2C84%2C54.79%2C56%2C96%2C56ZM24%2C124V109.93c8.16%2C5.78%2C19.09%2C10.44%2C32%2C13.57v23.37C36.41%2C141.4%2C24%2C132.39%2C24%2C124Zm64%2C48v-4.17c2.63.1%2C5.29.17%2C8%2C.17%2C3.88%2C0%2C7.67-.13%2C11.39-.35A121.92%2C121.92%2C0%2C0%2C0%2C120%2C171.41v23.46C100.41%2C189.4%2C88%2C180.39%2C88%2C172Zm48%2C26.25V174.4a179.48%2C179.48%2C0%2C0%2C0%2C24%2C1.6%2C183.74%2C183.74%2C0%2C0%2C0%2C24-1.54v23.79a165.45%2C165.45%2C0%2C0%2C1-48%2C0Zm64-3.38V171.5c12.91-3.13%2C23.84-7.79%2C32-13.57V172C232%2C180.39%2C219.59%2C189.4%2C200%2C194.87Z%22%2F%3E%3C%2Fsvg%3E"); }
.ui-icon.book { --ph: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20256%20256%22%20fill%3D%22%23fff%22%3E%3Cpath%20d%3D%22M232%2C48H160a40%2C40%2C0%2C0%2C0-32%2C16A40%2C40%2C0%2C0%2C0%2C96%2C48H24a8%2C8%2C0%2C0%2C0-8%2C8V200a8%2C8%2C0%2C0%2C0%2C8%2C8H96a24%2C24%2C0%2C0%2C1%2C24%2C24%2C8%2C8%2C0%2C0%2C0%2C16%2C0%2C24%2C24%2C0%2C0%2C1%2C24-24h72a8%2C8%2C0%2C0%2C0%2C8-8V56A8%2C8%2C0%2C0%2C0%2C232%2C48ZM96%2C192H32V64H96a24%2C24%2C0%2C0%2C1%2C24%2C24V200A39.81%2C39.81%2C0%2C0%2C0%2C96%2C192Zm128%2C0H160a39.81%2C39.81%2C0%2C0%2C0-24%2C8V88a24%2C24%2C0%2C0%2C1%2C24-24h64ZM160%2C88h40a8%2C8%2C0%2C0%2C1%2C0%2C16H160a8%2C8%2C0%2C0%2C1%2C0-16Zm48%2C40a8%2C8%2C0%2C0%2C1-8%2C8H160a8%2C8%2C0%2C0%2C1%2C0-16h40A8%2C8%2C0%2C0%2C1%2C208%2C128Zm0%2C32a8%2C8%2C0%2C0%2C1-8%2C8H160a8%2C8%2C0%2C0%2C1%2C0-16h40A8%2C8%2C0%2C0%2C1%2C208%2C160Z%22%2F%3E%3C%2Fsvg%3E"); }
.ui-icon.magic { --ph: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20256%20256%22%20fill%3D%22%23fff%22%3E%3Cpath%20d%3D%22M48%2C64a8%2C8%2C0%2C0%2C1%2C8-8H72V40a8%2C8%2C0%2C0%2C1%2C16%2C0V56h16a8%2C8%2C0%2C0%2C1%2C0%2C16H88V88a8%2C8%2C0%2C0%2C1-16%2C0V72H56A8%2C8%2C0%2C0%2C1%2C48%2C64ZM184%2C192h-8v-8a8%2C8%2C0%2C0%2C0-16%2C0v8h-8a8%2C8%2C0%2C0%2C0%2C0%2C16h8v8a8%2C8%2C0%2C0%2C0%2C16%2C0v-8h8a8%2C8%2C0%2C0%2C0%2C0-16Zm56-48H224V128a8%2C8%2C0%2C0%2C0-16%2C0v16H192a8%2C8%2C0%2C0%2C0%2C0%2C16h16v16a8%2C8%2C0%2C0%2C0%2C16%2C0V160h16a8%2C8%2C0%2C0%2C0%2C0-16ZM219.31%2C80%2C80%2C219.31a16%2C16%2C0%2C0%2C1-22.62%2C0L36.68%2C198.63a16%2C16%2C0%2C0%2C1%2C0-22.63L176%2C36.69a16%2C16%2C0%2C0%2C1%2C22.63%2C0l20.68%2C20.68A16%2C16%2C0%2C0%2C1%2C219.31%2C80Zm-54.63%2C32L144%2C91.31l-96%2C96L68.68%2C208ZM208%2C68.69%2C187.31%2C48l-32%2C32L176%2C100.69Z%22%2F%3E%3C%2Fsvg%3E"); }
.ui-icon.chart { --ph: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20256%20256%22%20fill%3D%22%23fff%22%3E%3Cpath%20d%3D%22M224%2C200h-8V40a8%2C8%2C0%2C0%2C0-8-8H152a8%2C8%2C0%2C0%2C0-8%2C8V80H96a8%2C8%2C0%2C0%2C0-8%2C8v40H48a8%2C8%2C0%2C0%2C0-8%2C8v64H32a8%2C8%2C0%2C0%2C0%2C0%2C16H224a8%2C8%2C0%2C0%2C0%2C0-16ZM160%2C48h40V200H160ZM104%2C96h40V200H104ZM56%2C144H88v56H56Z%22%2F%3E%3C%2Fsvg%3E"); }

.stress-row { display: flex; flex-wrap: wrap; gap: 8px; }
.stress-chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 13px; font-size: 12.5px;
  color: var(--muted); cursor: pointer; background: var(--panel); transition: .2s;
}
.stress-chip.active { border-color: var(--amber); color: var(--amber); box-shadow: 0 0 10px rgba(251,191,36,.25); }
.runBtn {
  width: 100%; margin-top: 26px; padding: 14px; border-radius: 10px; border: none; cursor: pointer;
  background: var(--cyan); color: #04222a; font-size: 16px; font-weight: 800; letter-spacing: 3px;
  transition: .15s;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.runBtn:hover:not(:disabled) { box-shadow: 0 6px 24px rgba(34,211,238,.4); transform: translateY(-1px); }
.runBtn:disabled { opacity: .45; cursor: not-allowed; }
.runBtn.batch { background: var(--blue); color: #0a1628; margin-top: 10px; }
.runBtn.batch:hover:not(:disabled) { box-shadow: 0 6px 24px rgba(96,165,250,.4); }

.stage { position: relative; min-width: 0; max-width: 100%; overflow: hidden; }
.crt-tv { max-width: 100%; }
.crt-chassis { max-width: 100%; box-sizing: border-box; }
.lab, .lab-grid, .ctrl, .ctrl-scroll { min-width: 0; }

/* ========== CRT 老式电视外壳 ========== */
.crt-tv {
  position: relative;
  padding: 8px 4px 4px;
  filter: drop-shadow(0 22px 40px rgba(0,0,0,.55));
}
.crt-antenna {
  position: relative;
  height: 36px;
  margin: 0 auto;
  width: 42%;
  max-width: 220px;
  pointer-events: none;
}
.crt-ant {
  position: absolute;
  bottom: 6px;
  width: 2px;
  height: 34px;
  background: linear-gradient(180deg, #6b7c94, #2a3548);
  border-radius: 2px;
  transform-origin: bottom center;
}
.crt-ant.left { left: 38%; transform: rotate(-28deg); }
.crt-ant.right { right: 38%; transform: rotate(28deg); }
.crt-ant::after {
  content: "";
  position: absolute;
  top: -4px; left: 50%;
  width: 8px; height: 8px;
  margin-left: -4px;
  border-radius: 50%;
  background: #8b9bb3;
  box-shadow: 0 0 0 1px #1a2233;
}
.crt-ant-base {
  position: absolute;
  bottom: 0; left: 50%;
  width: 28px; height: 10px;
  margin-left: -14px;
  border-radius: 4px 4px 2px 2px;
  background: linear-gradient(180deg, #3a465c, #1c2436);
  border: 1px solid #0d121c;
}

.crt-chassis {
  background:
    linear-gradient(145deg, #2a3348 0%, #1a2233 40%, #121826 100%);
  border-radius: 22px 22px 18px 18px;
  border: 1px solid #3d4a63;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.08),
    inset 0 -2px 8px rgba(0,0,0,.45),
    0 0 0 1px rgba(0,0,0,.5);
  padding: 12px 14px 10px;
}

.crt-brand {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0 6px 8px;
  font-family: "SF Mono", Menlo, Consolas, monospace;
}
.crt-brand-name {
  font-size: 11px;
  letter-spacing: 3px;
  color: #8b9bb3;
  font-weight: 700;
}
.crt-model {
  font-size: 10px;
  letter-spacing: 1.5px;
  color: #5a6a82;
}

.crt-bezel {
  background: linear-gradient(180deg, #0c1018, #05070c);
  border-radius: 18px;
  padding: 14px 16px 16px;
  box-shadow:
    inset 0 0 0 1px #1e2838,
    inset 0 8px 20px rgba(0,0,0,.65),
    0 1px 0 rgba(255,255,255,.04);
}

.crt-glass {
  border-radius: 48% / 8%;
  /* 近似 CRT 弧面外框 */
  border-radius: 16px / 22px;
  padding: 3px;
  background: linear-gradient(160deg, #3a4a60, #0a0e14 45%, #1a2436);
  box-shadow: 0 0 24px rgba(34,211,238,.12);
}

.crt-screen {
  position: relative;
  border-radius: 14px / 18px;
  overflow: hidden;
  background: #02040a;
  isolation: isolate;
  /* 轻微屏面鼓起 */
  transform: perspective(900px) rotateX(1.2deg);
  transform-origin: center center;
  box-shadow:
    inset 0 0 40px rgba(0,0,0,.75),
    inset 0 0 80px rgba(34,211,238,.04);
}

#simCanvas {
  width: 100%;
  height: auto;
  display: block;
  background: #0a0e17;
  vertical-align: top;
  /* 避免对大 canvas 每帧做 CSS filter（极耗 GPU）；CRT 感靠扫描线/暗角叠加层 */
  image-rendering: auto;
}

/* 扫描线 */
.crt-scanlines {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 2;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0,0,0,.18) 0px,
    rgba(0,0,0,.18) 1px,
    transparent 1px,
    transparent 3px
  );
  opacity: .55;
  mix-blend-mode: multiply;
}
/* 细密网纹 */
.crt-scanlines::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    rgba(0,0,0,.04) 0px,
    transparent 1px,
    transparent 3px
  );
  opacity: .7;
}

/* 暗角 */
.crt-vignette {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 3;
  background: radial-gradient(
    ellipse 78% 72% at 50% 48%,
    transparent 40%,
    rgba(0,0,0,.35) 72%,
    rgba(0,0,0,.72) 100%
  );
}

/* 玻璃高光 */
.crt-reflect {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 4;
  background: linear-gradient(
    125deg,
    rgba(255,255,255,.1) 0%,
    rgba(255,255,255,.03) 22%,
    transparent 42%
  );
  mix-blend-mode: screen;
  opacity: .55;
}

/* 微闪烁 */
.crt-flicker {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 5;
  background: rgba(180, 220, 255, .03);
  animation: crtFlicker 4.5s steps(2, end) infinite;
  mix-blend-mode: soft-light;
}
@keyframes crtFlicker {
  0%, 92%, 100% { opacity: .15; }
  93% { opacity: .45; }
  94% { opacity: .1; }
  96% { opacity: .35; }
  97% { opacity: .12; }
}

/* 底部控制面板 */
.crt-panel {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  padding: 6px 8px 2px;
}
.crt-led-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.crt-led.power {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #1a2330;
  border: 1px solid #0a0e14;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.6);
}
.crt-led.power.on {
  background: #34d399;
  box-shadow:
    0 0 8px rgba(52,211,153,.85),
    0 0 16px rgba(52,211,153,.35);
}
.crt-led.live {
  display: none;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  letter-spacing: 2px;
  color: #f87171;
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-weight: 700;
}
.crt-led.live::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f87171;
  box-shadow: 0 0 8px rgba(248,113,113,.9);
  animation: blink 1s infinite;
}
.crt-led.live.on { display: flex; }
@keyframes blink { 50% { opacity: .25; } }

.crt-knobs {
  display: flex;
  gap: 8px;
  justify-self: end;
}
.crt-knob {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #6a7a92, #2a3548 55%, #151c2a);
  border: 1px solid #0d121c;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.12),
    0 2px 3px rgba(0,0,0,.4);
}
.crt-knob.small { width: 14px; height: 14px; align-self: center; }
.crt-knob::after {
  content: "";
  display: block;
  width: 2px;
  height: 6px;
  margin: 3px auto 0;
  background: #c5d0e0;
  border-radius: 1px;
  opacity: .7;
}

.crt-label {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 11px;
  letter-spacing: 2px;
  color: #5a6a82;
  font-family: "SF Mono", Menlo, Consolas, monospace;
  padding: 2px 0 4px;
}

.crt-speaker {
  display: none;
}

/* 运行中增强磷光感 */
.crt-tv.is-live .crt-screen {
  box-shadow:
    inset 0 0 40px rgba(0,0,0,.7),
    inset 0 0 60px rgba(34,211,238,.07),
    0 0 28px rgba(34,211,238,.14);
}
/* 运行时只增强外壳辉光，不再 filter 画布本身 */

@media (max-width: 640px) {
  .crt-antenna { height: 24px; }
  .crt-ant { height: 22px; }
  .crt-chassis { padding: 8px 8px 8px; border-radius: 16px; }
  .crt-bezel { padding: 10px; border-radius: 14px; }
  .crt-model { display: none; }
}
.hud { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 14px; }
@media (max-width: 600px) {
  .hud {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .hud .gauge:last-child { grid-column: 1 / -1; }
  .gauge { padding: 8px 10px; }
  .gauge .gval { font-size: 18px; }
}
.gauge {
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
}
.gauge .glabel {
  font-size: 11.5px; color: var(--muted); letter-spacing: 1px;
  display: flex; align-items: center; gap: 5px;
}
.gauge .glabel .ui-icon { opacity: .9; }
.gauge .gval { font-size: 22px; font-weight: 800; margin: 3px 0 6px; font-variant-numeric: tabular-nums; }
.gauge .gbar { height: 5px; background: #1a2334; border-radius: 3px; overflow: hidden; }
.gauge .gbar i { display: block; height: 100%; width: 0%; border-radius: 3px; transition: width .3s; }

.logbox {
  margin-top: 14px; background: #0b101c; border: 1px solid var(--line); border-radius: 12px;
  height: 168px; overflow-y: auto; padding: 12px 16px; font-size: 12.5px; line-height: 1.9;
  font-family: "SF Mono", Menlo, Consolas, monospace;
}
.logbox .day { color: var(--cyan); font-weight: 700; }
.logbox .evt { color: var(--amber); }
.logbox .bad { color: var(--red); }
.logbox .good { color: var(--green); }
.logbox .rule { color: var(--violet); }
.logbox p { opacity: 0; animation: logIn .35s forwards; }
@keyframes logIn { from { opacity: 0; transform: translateX(-8px);} to { opacity: 1; transform: none;} }

.verdict {
  font-family: var(--font-serif);
  margin-top: 14px; border-radius: 12px; padding: 16px 20px; font-size: 15px; font-weight: 600;
  display: none; letter-spacing: 1px; border: 1px solid;
}
.verdict.win { display: block; border-color: var(--green); color: var(--green); background: rgba(52,211,153,.08); animation: popIn .4s; }
.verdict.lose { display: block; border-color: var(--red); color: var(--red); background: rgba(248,113,113,.08); animation: shake .5s; }
@keyframes popIn { from { transform: scale(.9); opacity: 0;} to { transform: none; opacity: 1;} }
@keyframes shake { 0%,100%{transform:none} 25%{transform:translateX(-6px)} 75%{transform:translateX(6px)} }

/* batch progress */
.batchbar { margin-top: 14px; display: none; }
.batchbar.on { display: block; }
.batchbar .track { height: 10px; background: #1a2334; border-radius: 6px; overflow: hidden; }
.batchbar .track i { display: block; height: 100%; width: 0%; background: var(--violet); border-radius: 6px; transition: width .1s; }
.batchbar .btext { font-size: 12px; color: var(--muted); margin-top: 6px; font-variant-numeric: tabular-nums; }

/* ============ RESULTS ============ */
.results { display: none; }
.results.on { display: block; animation: riseIn .7s; }
.chartsGrid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 28px; }
@media (max-width: 900px) { .chartsGrid { grid-template-columns: 1fr; } }
.chartCard { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.chartCard h3 {
  font-family: var(--font-serif);
  font-size: 16px; margin-bottom: 4px; letter-spacing: 1.5px; font-weight: 600;
}
.chartCard .hint { font-size: 12px; color: var(--muted); margin-bottom: 14px; }
.chartCard canvas { max-height: 300px; }

.recoGrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 24px; }
@media (max-width: 900px) { .recoGrid { grid-template-columns: 1fr; } }
.recoCard {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 20px;
  position: relative; overflow: hidden;
}
.recoCard.best { border-color: var(--green); box-shadow: 0 0 24px rgba(52,211,153,.18); }
.recoCard .crown {
  position: absolute; top: 14px; right: 14px; font-size: 11px; color: var(--green);
  border: 1px solid var(--green); border-radius: 999px; padding: 3px 10px; letter-spacing: 2px;
}
.recoCard h3 {
  font-family: var(--font-serif);
  font-size: 18px; margin-bottom: 10px; font-weight: 600; letter-spacing: 0.5px;
}
.recoCard .score {
  font-family: var(--font-serif);
  font-size: 36px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.recoCard .score small { font-size: 13px; color: var(--muted); font-weight: 400; }
.recoCard ul { list-style: none; margin-top: 12px; }
.recoCard li { font-size: 12.5px; color: var(--muted); line-height: 2; display: flex; justify-content: space-between; }
.recoCard li b { color: var(--text); font-variant-numeric: tabular-nums; }
.pilotNote {
  font-family: var(--font-serif);
  margin-top: 24px; border: 1px dashed var(--amber); border-radius: 14px; padding: 18px 22px;
  color: var(--amber); font-size: 14.5px; line-height: 1.95; background: rgba(251,191,36,.05);
  letter-spacing: 0.2px;
}

/* ============ AI CONTROLS ============ */
.ai-block {
  margin-top: 18px; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
  background: var(--panel);
}
.ai-block h4 { font-size: 14px; color: var(--muted); letter-spacing: 2px; margin: 0 0 10px; }
.ai-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 8px; }
.ai-row label { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; cursor: pointer; }
.ai-row input[type="checkbox"] { accent-color: var(--cyan); }
.ai-status { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; flex: 1; min-width: 120px; }
.ai-badge {
  font-size: 11px; letter-spacing: 1px; border-radius: 999px; padding: 3px 10px; border: 1px solid var(--line);
}
.ai-badge.ok { border-color: var(--green); color: var(--green); }
.ai-badge.warn { border-color: var(--amber); color: var(--amber); }
.ai-settings-toggle {
  background: transparent; border: 1px solid var(--line); color: var(--muted); border-radius: 8px;
  padding: 6px 12px; font-size: 12px; cursor: pointer;
}
.ai-settings-toggle:hover { border-color: var(--cyan); color: var(--cyan); }
.ai-settings {
  display: none; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line);
}
.ai-settings.open { display: block; }
.ai-settings label {
  display: block; font-size: 11.5px; color: var(--muted); margin: 8px 0 4px; letter-spacing: 1px;
}
.ai-settings input {
  width: 100%; background: #0b101c; border: 1px solid var(--line); border-radius: 8px;
  color: var(--text); padding: 8px 10px; font-size: 12.5px; font-family: "SF Mono", Menlo, Consolas, monospace;
}
.ai-settings input:focus { outline: none; border-color: var(--cyan); }
.ai-settings .hint { font-size: 11px; color: var(--muted); margin-top: 8px; line-height: 1.6; }
.ai-save {
  margin-top: 10px; width: 100%; padding: 8px; border-radius: 8px; border: none; cursor: pointer;
  background: var(--violet); color: #1d1040; font-weight: 700; font-size: 13px;
}
.btn-ai {
  margin-top: 10px; width: 100%; padding: 10px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--violet); background: transparent; color: var(--violet);
  font-size: 13px; font-weight: 700; letter-spacing: 1px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-ai:hover:not(:disabled) { background: rgba(167,139,250,.12); }
.btn-ai:disabled { opacity: .4; cursor: not-allowed; }
.btn-ai.inline { width: auto; margin-top: 14px; padding: 8px 16px; }
.ai-tag {
  display: inline-block; font-size: 10px; color: var(--violet); border: 1px solid var(--violet);
  border-radius: 4px; padding: 0 5px; margin-left: 6px; vertical-align: middle; letter-spacing: 1px;
}
.ai-panel {
  display: none; margin-top: 14px; background: #0b101c; border: 1px solid var(--violet);
  border-radius: 12px; padding: 14px 16px; font-size: 13px; line-height: 1.75;
}
.ai-panel.on { display: block; animation: riseIn .4s; }
.ai-panel-head { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; margin-bottom: 10px; }
.ai-l0 {
  font-size: 11px; color: var(--amber); border: 1px solid var(--amber); border-radius: 999px;
  padding: 2px 10px; letter-spacing: 1px;
}
.ai-muted { color: var(--muted); font-size: 12.5px; }
.ai-summary { font-weight: 700; margin-bottom: 10px; }
.ai-panel h5 { color: var(--cyan); font-size: 12px; letter-spacing: 2px; margin: 12px 0 6px; }
.ai-list { list-style: none; }
.ai-list li { color: var(--muted); margin-bottom: 6px; padding-left: 0; }
.ai-cite { color: var(--violet); font-family: "SF Mono", Menlo, Consolas, monospace; font-size: 11px; }
.results-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }

footer {
  font-family: var(--font-serif);
  text-align: center; padding: 50px 0 70px; color: var(--muted); font-size: 13.5px; letter-spacing: 1.5px;
  line-height: 1.9;
}
footer b { color: var(--cyan); font-weight: 600; }
.footer-link {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 14px;
  color: var(--cyan); text-decoration: none; letter-spacing: 2px; font-size: 14px;
  border-bottom: 1px solid rgba(34,211,238,.35); padding-bottom: 2px;
  transition: color .15s, border-color .15s;
}
.footer-link:hover { color: #67e8f9; border-color: var(--cyan); }
