
  /* 布局概念：顶部状态条 + 左侧固定导航 + 仪器化内容区 */
  :root {
    --bg: #f3f6fc;
    --surface: #ffffff;
    --surface-2: #edf3ff;
    --surface-3: #e1eafb;
    --ink: #152747;
    --ink-2: #415575;
    --muted: #64748b;
    --line: #dce5f3;
    --line-strong: #b7c9e6;
    --accent: #2563eb;
    --accent-2: #1d4ed8;
    --accent-soft: #eaf1ff;
    --accent-contrast: #ffffff;
    --ok: #1d6b43;
    --ok-soft: #e2f1e7;
    --warn: #8f5800;
    --warn-soft: #f7ecd8;
    --danger: #a23a35;
    --danger-soft: #f7e5e2;
    --info: #2c5f85;
    --info-soft: #e5eef5;
    --code-surface: #f0f4fb;
    --code-ink: #253855;
    --tok-c: #7c8d86;
    --tok-s: #8a5a12;
    --tok-k: #0b6b57;
    --tok-b: #2a5f86;
    --tok-n: #a4552f;
    --term-bg: #0b1529;
    --term-panel: #12213b;
    --term-fg: #d7e7e0;
    --term-muted: #7e968c;
    --term-line: #1f302a;
    --term-green: #6fd6b1;
    --term-amber: #e0b46c;
    --term-red: #e58982;
    --term-blue: #8bc6e8;
    --shadow: 0 1px 2px rgba(18, 32, 28, .05), 0 8px 24px rgba(18, 32, 28, .04);
    --shadow-sm: 0 1px 2px rgba(18, 32, 28, .06);
    --radius: 10px;
    --mono: "JetBrains Mono", "Cascadia Mono", Consolas, monospace;
    --sans: "Inter", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --bg: #0b1221;
      --surface: #111d33;
      --surface-2: #182740;
      --surface-3: #20324f;
      --ink: #e6eeff;
      --ink-2: #c1cee5;
      --muted: #97a9c5;
      --line: #2a3b56;
      --line-strong: #405677;
      --accent: #83adff;
      --accent-2: #adc9ff;
      --accent-soft: #19325a;
      --accent-contrast: #071329;
      --ok: #6bd39d;
      --ok-soft: #12291d;
      --warn: #e0a45e;
      --warn-soft: #332615;
      --danger: #e58a82;
      --danger-soft: #341c1a;
      --info: #8cc5e8;
      --info-soft: #142733;
      --code-surface: #101c30;
      --code-ink: #d8e6e0;
      --tok-c: #7f978e;
      --tok-s: #e0b46c;
      --tok-k: #6fd6b1;
      --tok-b: #8bc6e8;
      --tok-n: #e5a17a;
      --term-bg: #070f20;
      --term-panel: #101b30;
      --term-fg: #d7e7e0;
      --term-muted: #7e968c;
      --term-line: #233654;
      --term-green: #6fd6b1;
      --term-amber: #e0b46c;
      --term-red: #e58982;
      --term-blue: #8bc6e8;
      --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 24px rgba(0, 0, 0, .25);
      --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
      color-scheme: dark;
    }
  }
  :root[data-theme="dark"] {
    --bg: #0b1221;
    --surface: #111d33;
    --surface-2: #182740;
    --surface-3: #20324f;
    --ink: #e6eeff;
    --ink-2: #c1cee5;
    --muted: #97a9c5;
    --line: #2a3b56;
    --line-strong: #405677;
    --accent: #83adff;
    --accent-2: #adc9ff;
    --accent-soft: #19325a;
    --accent-contrast: #071329;
    --ok: #6bd39d;
    --ok-soft: #12291d;
    --warn: #e0a45e;
    --warn-soft: #332615;
    --danger: #e58a82;
    --danger-soft: #341c1a;
    --info: #8cc5e8;
    --info-soft: #142733;
    --code-surface: #101c30;
    --code-ink: #d8e6e0;
    --tok-c: #7f978e;
    --tok-s: #e0b46c;
    --tok-k: #6fd6b1;
    --tok-b: #8bc6e8;
    --tok-n: #e5a17a;
    --term-bg: #070f20;
    --term-panel: #101b30;
    --term-fg: #d7e7e0;
    --term-muted: #7e968c;
    --term-line: #233654;
    --term-green: #6fd6b1;
    --term-amber: #e0b46c;
    --term-red: #e58982;
    --term-blue: #8bc6e8;
    --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 24px rgba(0, 0, 0, .25);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    color-scheme: dark;
  }

  * { box-sizing: border-box; }
  [hidden] { display: none !important; }
  html { scroll-behavior: smooth; }
  body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 13.5px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    padding-left: max(0px, env(safe-area-inset-left, 0px));
    padding-right: max(0px, env(safe-area-inset-right, 0px));
  }
  body::before {
    content: "";
    position: fixed;
    inset: 0 0 auto;
    height: env(safe-area-inset-top, 0px);
    background: var(--surface);
    z-index: 40;
  }
  a { color: var(--accent); text-decoration: none; }
  a:hover { color: var(--accent-2); }
  button, input, select, textarea { font: inherit; }
  button { color: inherit; }
  ::selection { background: var(--accent-soft); color: var(--ink); }
  .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
  .muted { color: var(--muted); }
  .small { font-size: 11px; }
  .ic { flex: none; display: inline-block; vertical-align: -2px; }
  h1, h2, h3, h4 { margin: 0; text-wrap: balance; }
  p { margin: 0; }
  :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

  /* 顶栏 */
  .topbar {
    position: sticky;
    top: env(safe-area-inset-top, 0px);
    z-index: 30;
    height: 56px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding-left: max(18px, env(safe-area-inset-left, 0px));
    padding-right: max(18px, env(safe-area-inset-right, 0px));
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
  }
  .brand { display: flex; align-items: center; gap: 9px; color: var(--ink); min-width: 0; }
  .brand:hover { color: var(--ink); }
  .brand-mark {
    width: 30px; height: 30px; border-radius: 8px;
    background: var(--accent); color: var(--accent-contrast);
    display: grid; place-items: center;
    font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .04em;
    flex: none;
  }
  .brand-text { font-size: 13.5px; font-weight: 600; white-space: nowrap; }
  .proto-badge {
    font-family: var(--mono); font-size: 9px; letter-spacing: .04em;
    color: var(--accent); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent);
    border-radius: 999px; padding: 2px 7px; white-space: nowrap;
  }
  .topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; min-width: 0; }
  .resource-chip {
    display: flex; align-items: center; gap: 7px;
    height: 30px; padding: 0 10px;
    border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
    color: var(--ink-2); font-family: var(--mono); font-size: 10.5px;
    cursor: pointer; white-space: nowrap;
  }
  .resource-chip:hover { background: var(--surface-2); border-color: var(--line-strong); }
  .avatar {
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--surface-2); border: 1px solid var(--line);
    display: grid; place-items: center; font-size: 11px; color: var(--accent); flex: none;
  }
  .icon-btn {
    width: 32px; height: 32px; border-radius: 7px; border: 1px solid transparent;
    background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer;
  }
  .icon-btn:hover { background: var(--surface-2); color: var(--ink); border-color: var(--line); }

  /* 应用布局 */
  .app-body {
    display: grid;
    grid-template-columns: 232px minmax(0, 1fr);
    max-width: 1440px;
    margin: 0 auto;
    min-height: calc(100vh - 56px);
  }
  .sidenav {
    position: sticky;
    top: 56px;
    height: calc(100vh - 56px);
    overflow-y: auto;
    border-right: 1px solid var(--line);
    padding: 18px 12px 22px;
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
  .nav-section { display: grid; gap: 3px; }
  .nav-head {
    font-family: var(--mono); font-size: 9px; letter-spacing: .13em; text-transform: uppercase;
    color: var(--muted); padding: 0 9px; margin-bottom: 4px;
  }
  .nav-item {
    display: flex; align-items: center; gap: 8px;
    height: 36px; padding: 0 9px; border-radius: 7px;
    color: var(--ink-2); font-size: 12.5px; white-space: nowrap;
  }
  .nav-item:hover { background: var(--surface-2); color: var(--ink); }
  .nav-item.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
  .nav-item .badge {
    margin-left: auto; font-family: var(--mono); font-size: 9.5px;
    background: var(--surface-2); color: var(--muted); border-radius: 999px; padding: 1px 6px;
  }
  .nav-item .ext { margin-left: auto; color: var(--muted); }
  .server-card {
    margin-top: auto; border: 1px solid var(--line); border-radius: 9px;
    background: var(--surface-2); padding: 11px;
  }
  .server-head { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; }
  .server-spec { font-family: var(--mono); font-size: 10px; color: var(--muted); margin: 4px 0 6px; }
  .meter { height: 4px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
  .meter span { display: block; height: 100%; width: 58%; background: var(--accent); border-radius: 999px; }
  .server-foot { font-size: 9.5px; color: var(--muted); margin-top: 5px; }

  .main {
    min-width: 0;
    padding: 24px 28px 80px;
  }
  #view { min-width: 0; outline: none; }

  /* 通用组件 */
  .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    height: 34px; padding: 0 13px; border-radius: 7px;
    border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
    font-size: 12.5px; font-weight: 500; cursor: pointer; white-space: nowrap;
    transition: background .14s, border-color .14s, color .14s, transform .14s;
  }
  .btn:hover { background: var(--surface-2); border-color: var(--line-strong); color: var(--ink); }
  .btn:active { transform: translateY(1px); }
  .btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-contrast); }
  .btn.primary:hover { background: var(--accent-2); border-color: var(--accent-2); color: var(--accent-contrast); }
  .btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
  .btn.ghost:hover { background: var(--surface-2); color: var(--ink); }
  .btn.danger-ghost { background: transparent; border-color: transparent; color: var(--danger); }
  .btn.danger-ghost:hover { background: var(--danger-soft); color: var(--danger); }
  .btn.sm { height: 28px; padding: 0 9px; font-size: 11.5px; border-radius: 6px; }
  .btn.block { width: 100%; }
  .btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

  .tag {
    display: inline-flex; align-items: center; gap: 4px;
    height: 22px; padding: 0 8px; border-radius: 999px;
    border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2);
    font-family: var(--mono); font-size: 10px; white-space: nowrap; max-width: 100%;
  }
  .tag.ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 28%, transparent); color: var(--ok); }
  .tag.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 30%, transparent); color: var(--warn); }
  .tag.danger { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 30%, transparent); color: var(--danger); }
  .tag.info { background: var(--info-soft); border-color: color-mix(in srgb, var(--info) 28%, transparent); color: var(--info); }
  .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); flex: none; display: inline-block; }
  .dot.ok { background: var(--ok); }
  .dot.warn { background: var(--warn); }
  .dot.err { background: var(--danger); }
  .dot.info { background: var(--info); }
  .dot.muted { background: var(--line-strong); }
  .kind-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 6px; border-radius: 5px; font-family: var(--mono); font-size: 9.5px;
    border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2); white-space: nowrap;
  }
  .kind-badge.script { background: var(--info-soft); color: var(--info); border-color: color-mix(in srgb, var(--info) 22%, transparent); }
  .kind-badge.notebook { background: var(--accent-soft); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 22%, transparent); }
  .kind-badge.web { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 22%, transparent); }

  .callout {
    display: grid; grid-template-columns: 3px minmax(0, 1fr); gap: 12px;
    border: 1px solid var(--line); border-radius: 9px; background: var(--surface);
    padding: 12px 14px; margin: 14px 0; box-shadow: var(--shadow-sm);
  }
  .callout .bar { border-radius: 2px; background: var(--accent); }
  .callout.warn .bar { background: var(--warn); }
  .callout .ct { font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: 3px; }
  .callout.warn .ct { color: var(--warn); }
  .callout p { font-size: 12.5px; color: var(--ink-2); }
  .callout p strong { color: var(--ink); }

  .tbl-wrap {
    border: 1px solid var(--line); border-radius: 9px; background: var(--surface);
    overflow-x: auto;
  }
  table { width: 100%; border-collapse: collapse; font-size: 11.5px; line-height: 1.5; font-variant-numeric: tabular-nums; }
  th {
    text-align: left; font-family: var(--mono); font-size: 9.5px; letter-spacing: .07em;
    text-transform: uppercase; color: var(--muted); font-weight: 500;
    background: var(--surface-2); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap;
  }
  td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--ink-2); }
  tr:last-child td { border-bottom: 0; }
  tbody tr:hover td { background: color-mix(in srgb, var(--accent-soft) 40%, transparent); }
  td strong { color: var(--ink); font-weight: 600; }
  .compact table { font-size: 10.5px; }
  .compact th, .compact td { padding: 6px 8px; }

  .empty-state {
    grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 6px; padding: 44px 20px; text-align: center; color: var(--muted);
    border: 1px dashed var(--line-strong); border-radius: 9px; background: var(--surface);
  }
  .empty-state strong { color: var(--ink); font-size: 13px; }
  .empty-state p { font-size: 11.5px; }
  .empty-state.small { border: 0; padding: 20px; }

  /* 首页 */
  .page-head {
    display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
    padding: 4px 0 20px; border-bottom: 1px solid var(--line); margin-bottom: 18px;
  }
  .page-head.compact { padding-bottom: 16px; }
  .eyebrow {
    font-family: var(--mono); font-size: 9.5px; letter-spacing: .13em; text-transform: uppercase;
    color: var(--accent); margin-bottom: 6px;
  }
  .page-head h1 { font-size: clamp(22px, 3vw, 30px); line-height: 1.2; letter-spacing: -.02em; font-weight: 650; }
  .ph-sub { font-size: 13px; color: var(--muted); max-width: 620px; margin-top: 6px; }
  .ph-actions { display: flex; align-items: center; gap: 8px; flex: none; }
  .head-instrument {
    display: grid; grid-template-columns: repeat(4, minmax(64px, 1fr));
    border: 1px solid var(--line); border-radius: 9px; background: var(--surface); overflow: hidden; flex: none;
  }
  .hi-item { padding: 9px 13px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 1px; }
  .hi-item:last-child { border-right: 0; }
  .hi-k { font-family: var(--mono); font-size: 8.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
  .hi-v { font-family: var(--mono); font-size: 20px; font-weight: 600; line-height: 1.2; color: var(--ink); }

  .notice {
    display: flex; align-items: flex-start; gap: 12px;
    border: 1px solid color-mix(in srgb, var(--warn) 26%, var(--line));
    background: var(--warn-soft); border-radius: 9px; padding: 12px 14px; margin-bottom: 14px;
  }
  .notice-icon {
    width: 34px; height: 34px; border-radius: 8px; background: color-mix(in srgb, var(--warn) 14%, transparent);
    color: var(--warn); display: grid; place-items: center; flex: none;
  }
  .notice-main { min-width: 0; }
  .notice-main strong { font-size: 12.5px; color: var(--warn); display: block; margin-bottom: 2px; }
  .notice-main p { font-size: 11.5px; color: var(--ink-2); }
  .notice .btn { margin-left: auto; flex: none; }

  .quick-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 26px; }
  .quick-card {
    display: flex; align-items: center; gap: 12px; text-align: left;
    padding: 13px 14px; border: 1px solid var(--line); border-radius: 9px;
    background: var(--surface); cursor: pointer; box-shadow: var(--shadow-sm);
    transition: border-color .14s, transform .14s, box-shadow .14s;
  }
  .quick-card:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: var(--shadow); }
  .q-icon {
    width: 38px; height: 38px; border-radius: 8px; background: var(--accent-soft); color: var(--accent);
    display: grid; place-items: center; flex: none;
  }
  .q-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
  .q-body strong { font-size: 12.5px; color: var(--ink); }
  .q-body span { font-size: 10.5px; color: var(--muted); }
  .q-arrow { margin-left: auto; color: var(--muted); flex: none; }
  .quick-card:hover .q-arrow { color: var(--accent); }

  .catalog-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 12px; flex-wrap: wrap; }
  .catalog-title { display: flex; align-items: baseline; gap: 10px; }
  .catalog-title h2 { font-size: 17px; font-weight: 650; }
  .catalog-count { font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
  .catalog-tools { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
  .filters { display: inline-flex; gap: 2px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 3px; }
  .filter-pill {
    height: 27px; padding: 0 9px; border: 0; border-radius: 6px; background: transparent;
    color: var(--muted); font-size: 11.5px; cursor: pointer; white-space: nowrap;
  }
  .filter-pill span { font-family: var(--mono); font-size: 9.5px; opacity: .75; margin-left: 3px; }
  .filter-pill:hover { color: var(--ink); }
  .filter-pill.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); font-weight: 600; }
  .search-box {
    display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 9px;
    border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--muted);
  }
  .search-box input { border: 0; background: transparent; outline: none; color: var(--ink); font-size: 11.5px; width: 200px; min-width: 0; }
  .search-box input::placeholder { color: var(--muted); }
  .select {
    height: 34px; padding: 0 8px; border: 1px solid var(--line); border-radius: 7px;
    background: var(--surface); color: var(--ink-2); font-size: 11.5px; outline: none;
  }
  .project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 11px; }
  .project-card {
    display: flex; flex-direction: column; min-width: 0;
    padding: 14px; border: 1px solid var(--line); border-radius: 9px;
    background: var(--surface); cursor: pointer; box-shadow: var(--shadow-sm);
    transition: border-color .14s, transform .14s, box-shadow .14s;
  }
  .project-card:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: var(--shadow); }
  .pc-top { display: flex; align-items: center; gap: 7px; min-width: 0; }
  .pc-no { font-family: var(--mono); font-size: 10.5px; color: var(--muted); letter-spacing: .04em; }
  .pc-top .spacer { flex: 1; }
  .project-card h3 { font-size: 15px; font-weight: 650; letter-spacing: -.01em; margin: 9px 0 4px; }
  .pc-desc {
    font-size: 11.5px; color: var(--muted); line-height: 1.55;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    min-height: 36px;
  }
  .pc-meta { display: flex; flex-wrap: wrap; gap: 4px; margin: 10px 0; }
  .meta-chip {
    display: inline-flex; align-items: center; gap: 3px;
    font-family: var(--mono); font-size: 9.5px; color: var(--ink-2);
    background: var(--surface-2); border-radius: 4px; padding: 2px 5px; max-width: 100%;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .pc-foot { margin-top: auto; padding-top: 9px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
  .pc-entry { font-family: var(--mono); font-size: 9.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .pc-go { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; color: var(--accent); flex: none; }

  /* 项目详情 */
  .breadcrumb { display: flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 10px; color: var(--muted); margin-bottom: 12px; flex-wrap: wrap; }
  .breadcrumb a { color: var(--muted); }
  .breadcrumb a:hover { color: var(--accent); }
  .breadcrumb .sep { color: var(--line-strong); }
  .detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
  .dh-main { min-width: 0; }
  .detail-head h1 { font-size: clamp(22px, 2.6vw, 28px); font-weight: 650; letter-spacing: -.02em; margin: 2px 0 6px; }
  .dh-desc { font-size: 12.5px; color: var(--muted); max-width: 720px; }
  .dh-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
  .dh-actions { display: flex; gap: 7px; flex: none; padding-top: 4px; }
  .tabs { display: flex; gap: 1px; border-bottom: 1px solid var(--line); margin-top: 14px; overflow-x: auto; }
  .tab {
    height: 38px; padding: 0 13px; border: 0; border-bottom: 2px solid transparent;
    background: transparent; color: var(--muted); font-size: 12px; cursor: pointer; white-space: nowrap;
  }
  .tab:hover { color: var(--ink); }
  .tab.active { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }
  .tab-panel { padding-top: 16px; min-width: 0; }
  .ov-grid { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 22px; align-items: start; }
  .section-block { margin-bottom: 22px; }
  .section-block h2 { font-size: 15px; font-weight: 650; margin-bottom: 7px; }
  .section-block > p { font-size: 12.5px; color: var(--ink-2); }
  .tag-row { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
  .steps { display: grid; gap: 6px; }
  .step-row {
    display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 9px; align-items: start;
    padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface);
  }
  .step-no {
    width: 22px; height: 22px; border-radius: 50%; background: var(--accent-soft); color: var(--accent);
    display: grid; place-items: center; font-family: var(--mono); font-size: 10px; margin-top: 1px;
  }
  .step-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
  .step-main strong { font-size: 12px; color: var(--ink); }
  .step-main span { font-size: 10.5px; color: var(--muted); }
  .step-main code { font-family: var(--mono); font-size: 10px; color: var(--accent); background: var(--accent-soft); padding: 1px 5px; border-radius: 3px; align-self: flex-start; margin-top: 2px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .step-time { font-family: var(--mono); font-size: 9.5px; color: var(--muted); white-space: nowrap; }
  .step-row.skipped { border-style: dashed; border-color: color-mix(in srgb, var(--warn) 35%, var(--line)); }
  .step-row.skipped .step-no { background: var(--warn-soft); color: var(--warn); }
  .plain-list { margin: 0; padding-left: 1.2em; }
  .plain-list li { font-size: 11.5px; color: var(--muted); margin: 4px 0; }
  .plain-list li::marker { color: var(--accent); }
  .ov-aside { display: grid; gap: 10px; }
  .side-card { border: 1px solid var(--line); border-radius: 9px; background: var(--surface); padding: 12px 13px; box-shadow: var(--shadow-sm); }
  .side-card h3 { font-size: 11px; font-weight: 650; margin-bottom: 7px; color: var(--ink); }
  .kv-sm { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 0; margin: 0; }
  .kv-sm dt { font-family: var(--mono); font-size: 9.5px; color: var(--muted); padding: 4px 0; border-bottom: 1px dashed var(--line); }
  .kv-sm dd { margin: 0; font-size: 10.5px; color: var(--ink-2); padding: 4px 0; border-bottom: 1px dashed var(--line); word-break: break-word; }
  .kv-sm dt:last-of-type, .kv-sm dd:last-of-type { border-bottom: 0; }
  .side-file { display: flex; align-items: center; gap: 5px; padding: 4px 0; border-bottom: 1px dashed var(--line); font-size: 9.5px; color: var(--ink-2); min-width: 0; }
  .side-file:last-child { border-bottom: 0; }
  .side-file .mono { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .side-file .muted { margin-left: auto; white-space: nowrap; }

  /* Notebook */
  .nb-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    background: var(--surface); border: 1px solid var(--line); border-bottom: 0; border-radius: 9px 9px 0 0; padding: 11px 13px;
  }
  .nb-file { display: flex; align-items: center; gap: 7px; min-width: 0; font-size: 11.5px; }
  .nb-file strong { font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .nb-kpis { display: flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 9.5px; color: var(--muted); flex-wrap: wrap; }
  .dot-sep { color: var(--line-strong); }
  .nb-toolbar {
    display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap;
    background: var(--surface); border: 1px solid var(--line); padding: 7px 9px;
  }
  .tb-left, .tb-right { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
  .seg { display: inline-flex; gap: 2px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 2px; }
  .seg-btn { height: 22px; padding: 0 7px; border: 0; border-radius: 4px; background: transparent; color: var(--muted); font-size: 9.5px; white-space: nowrap; }
  .seg-btn.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); font-weight: 600; }
  .seg-btn:disabled { opacity: .55; }
  .kernel-pill {
    display: inline-flex; align-items: center; gap: 5px; height: 25px; padding: 0 8px;
    border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2);
    font-family: var(--mono); font-size: 9.5px; color: var(--ink-2); white-space: nowrap;
  }
  .nb-banner {
    display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
    padding: 7px 10px; border: 1px solid var(--line); border-top: 0;
    background: var(--surface-2); font-size: 10px; color: var(--muted);
  }
  .nb-banner strong { color: var(--ink-2); font-weight: 600; }
  .nb-banner .ic { color: var(--accent); }
  .nb-progress { height: 3px; background: var(--surface-2); overflow: hidden; }
  .nb-progress span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .25s ease; }
  .nb-layout {
    display: grid; grid-template-columns: 205px minmax(0, 1fr);
    border: 1px solid var(--line); border-top: 0; border-radius: 0 0 9px 9px; background: var(--bg);
  }
  .nb-outline { border-right: 1px solid var(--line); background: var(--surface); padding: 9px; min-width: 0; }
  .outline-head { display: flex; align-items: center; gap: 4px; font-family: var(--mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 0 5px 6px; }
  .outline-item {
    display: flex; align-items: flex-start; gap: 5px; width: 100%; text-align: left;
    border: 0; background: transparent; border-radius: 5px; padding: 5px 5px; cursor: pointer;
    font-size: 9.5px; color: var(--muted); line-height: 1.4;
  }
  .outline-item:hover { background: var(--surface-2); color: var(--ink-2); }
  .ol-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--line-strong); margin-top: 5px; flex: none; }
  .ol-dot.skip { background: var(--warn); }
  .ol-label { min-width: 0; }
  .nb-cells { padding: 10px; display: grid; gap: 9px; min-width: 0; }
  .nb-cell {
    display: grid; grid-template-columns: 40px minmax(0, 1fr);
    background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
    overflow: hidden; transition: border-color .14s, box-shadow .14s;
  }
  .nb-cell.selected { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 26%, transparent); }
  .nb-cell.running { border-color: var(--warn); }
  .nb-cell.skipped { border-style: dashed; border-color: color-mix(in srgb, var(--warn) 40%, var(--line)); }
  .cell-gutter { background: var(--surface-2); border-right: 1px solid var(--line); padding: 7px 3px; display: flex; flex-direction: column; align-items: center; gap: 5px; }
  .cell-run {
    width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface);
    color: var(--muted); display: grid; place-items: center; cursor: pointer;
  }
  .cell-run:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
  .cell-run:disabled { opacity: .4; cursor: not-allowed; }
  .exec { font-family: var(--mono); font-size: 9px; color: var(--muted); min-height: 12px; }
  .cell-main { padding: 8px 11px; min-width: 0; }
  .cell-top { display: flex; align-items: center; gap: 6px; margin-bottom: 5px; font-family: var(--mono); font-size: 9px; color: var(--muted); flex-wrap: wrap; }
  .cell-kind { background: var(--accent-soft); color: var(--accent); padding: 1px 4px; border-radius: 3px; font-size: 8.5px; }
  .code-wrap { position: relative; max-width: 100%; }
  .code-wrap.clipped { max-height: 300px; overflow: hidden; -webkit-mask-image: linear-gradient(180deg, #000 72%, transparent); mask-image: linear-gradient(180deg, #000 72%, transparent); }
  .code {
    margin: 0; padding: 7px 9px; background: var(--code-surface); color: var(--code-ink);
    border-radius: 5px; font-family: var(--mono); font-size: 10.5px; line-height: 1.55;
    overflow-x: auto; white-space: pre; tab-size: 2;
  }
  .code .tok-c { color: var(--tok-c); }
  .code .tok-s { color: var(--tok-s); }
  .code .tok-k { color: var(--tok-k); font-weight: 500; }
  .code .tok-b { color: var(--tok-b); }
  .code .tok-n { color: var(--tok-n); }
  .collapse-btn { border: 0; background: transparent; color: var(--accent); font-size: 9.5px; padding: 4px 0; cursor: pointer; display: inline-flex; align-items: center; gap: 3px; }
  .cell-output { margin-top: 7px; min-width: 0; }
  .out-head { display: flex; align-items: center; gap: 5px; margin-bottom: 4px; }
  .out-badge { font-family: var(--mono); font-size: 8.5px; padding: 1px 5px; border-radius: 3px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
  .out-badge.running { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 30%, var(--line)); display: inline-flex; align-items: center; gap: 4px; }
  .out-badge.err { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 30%, var(--line)); }
  .out-badge.hist { color: var(--info); }
  .out-time { margin-left: auto; font-family: var(--mono); font-size: 8.5px; color: var(--muted); }
  .term-out {
    background: var(--term-bg); color: var(--term-fg); border: 1px solid var(--term-line);
    border-radius: 5px; padding: 7px 9px; font-family: var(--mono); font-size: 10px; line-height: 1.6;
    overflow: auto; max-height: 280px;
  }
  .term-out.live::after { content: "▌"; color: var(--term-green); animation: blink 1s step-end infinite; }
  .log-line { white-space: pre-wrap; word-break: break-word; }
  .log-line.ok { color: var(--term-green); }
  .log-line.warn { color: var(--term-amber); }
  .log-line.err { color: var(--term-red); }
  .log-line.info { color: var(--term-blue); }
  .log-line.rule { color: var(--term-muted); }
  .log-line.muted { color: var(--term-muted); }
  .out-img { margin: 7px 0 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--surface-2); max-width: 100%; }
  .out-img img { display: block; max-width: 100%; max-height: 370px; margin: 0 auto; cursor: zoom-in; }
  .out-img figcaption { font-size: 9.5px; color: var(--muted); padding: 4px 7px; border-top: 1px solid var(--line); }
  .term-img img { max-height: 240px; }
  .text-out { margin: 6px 0 0; padding: 7px 9px; background: var(--code-surface); color: var(--code-ink); border-radius: 5px; font-family: var(--mono); font-size: 10px; overflow: auto; max-height: 220px; white-space: pre-wrap; }
  .err-out { margin: 6px 0 0; padding: 7px 9px; background: var(--danger-soft); color: var(--danger); border-radius: 5px; font-family: var(--mono); font-size: 10px; white-space: pre-wrap; }
  .skip-box {
    display: flex; align-items: flex-start; gap: 8px;
    padding: 8px 10px; border: 1px solid color-mix(in srgb, var(--warn) 35%, var(--line));
    background: var(--warn-soft); border-radius: 6px; color: var(--warn);
  }
  .skip-box > div { min-width: 0; flex: 1; }
  .skip-box strong { display: block; font-size: 11px; margin-bottom: 1px; }
  .skip-box p { font-size: 10px; color: var(--ink-2); }
  .skip-box .tag { margin-left: auto; flex: none; }
  .cell-note { display: flex; align-items: flex-start; gap: 5px; font-size: 9.5px; color: var(--muted); margin-top: 5px; line-height: 1.5; }
  .cell-note.hist { color: var(--info); }
  .input-panel {
    margin-top: 7px; padding: 8px 10px; border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line));
    background: var(--accent-soft); border-radius: 6px;
  }
  .ip-head { display: flex; align-items: center; gap: 4px; font-family: var(--mono); font-size: 9.5px; color: var(--accent); margin-bottom: 4px; }
  .ip-prompt { font-size: 10.5px; color: var(--ink); margin-bottom: 6px; }
  .ip-opts { display: flex; gap: 14px; flex-wrap: wrap; }
  .ip-opt { display: flex; align-items: center; gap: 4px; font-size: 10.5px; color: var(--ink-2); cursor: pointer; }
  .ip-opt input { accent-color: var(--accent); }
  .ip-opt.disabled { opacity: .55; cursor: not-allowed; }
  .ip-opt em { font-style: normal; font-size: 9px; color: var(--muted); }
  .ip-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
  .ip-note { display: flex; align-items: center; gap: 4px; font-size: 9.5px; color: var(--accent); }
  .empty-cell { opacity: .5; }
  .empty-label { font-family: var(--mono); font-size: 9px; color: var(--muted); }
  .md-body { font-size: 12.5px; color: var(--ink-2); }
  .spinner { width: 11px; height: 11px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }

  /* 受控终端 */
  .term-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    background: var(--surface); border: 1px solid var(--line); border-bottom: 0; border-radius: 9px 9px 0 0; padding: 11px 13px;
  }
  .th-main { display: flex; align-items: center; gap: 6px; min-width: 0; flex-wrap: wrap; }
  .th-title { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; }
  .th-path { font-size: 9.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 420px; }
  .th-meta { display: flex; gap: 5px; flex-wrap: wrap; }
  .term-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 9px 9px; overflow: hidden; }
  .script-rail { background: var(--surface); border-right: 1px solid var(--line); padding: 11px; display: flex; flex-direction: column; gap: 9px; min-width: 0; }
  .rail-head { display: flex; align-items: baseline; justify-content: space-between; font-size: 11px; font-weight: 600; }
  .rail-head span { font-family: var(--mono); font-size: 9.5px; color: var(--muted); font-weight: 400; }
  .script-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
  .script-item { margin: 0; }
  .script-fill {
    display: grid; grid-template-columns: 20px minmax(0, 1fr) 56px; gap: 7px; align-items: start;
    width: 100%; padding: 6px 7px; border: 1px solid var(--line); border-radius: 6px;
    background: var(--surface); text-align: left; cursor: pointer;
  }
  .script-fill:hover { border-color: var(--accent); background: var(--surface-2); }
  .si-no { width: 18px; height: 18px; border-radius: 50%; background: var(--surface-2); color: var(--muted); display: grid; place-items: center; font-family: var(--mono); font-size: 8.5px; }
  .si-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
  .si-main strong { font-size: 10.5px; color: var(--ink); }
  .si-main code { font-family: var(--mono); font-size: 8.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .si-main em { font-style: normal; font-size: 8.5px; color: var(--muted); }
  .si-status { font-family: var(--mono); font-size: 8.5px; color: var(--muted); text-align: right; display: flex; align-items: center; justify-content: flex-end; gap: 3px; }
  .rail-note { font-size: 9px; line-height: 1.5; color: var(--muted); margin: 0; }
  .term-panel { background: var(--term-bg); min-width: 0; display: flex; flex-direction: column; }
  .term-bar { display: flex; align-items: center; gap: 9px; padding: 7px 11px; border-bottom: 1px solid var(--term-line); font-family: var(--mono); font-size: 9.5px; color: var(--term-muted); flex-wrap: wrap; }
  .term-state { display: inline-flex; align-items: center; gap: 5px; color: var(--term-fg); }
  .term-title { color: var(--term-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .term-badge { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; }
  .term-body {
    padding: 11px 13px; color: var(--term-fg); font-family: var(--mono); font-size: 10.5px; line-height: 1.65;
    min-height: 430px; max-height: 620px; overflow: auto; background: var(--term-bg);
  }
  .term-welcome { color: var(--term-muted); border-bottom: 1px dashed var(--term-line); padding-bottom: 8px; margin-bottom: 8px; }
  .tw-line { white-space: pre-wrap; }
  .tw-strong { color: var(--term-fg); }
  .term-block { margin-top: 7px; min-width: 0; }
  .term-command { display: flex; gap: 5px; flex-wrap: wrap; }
  .tc-prompt { color: var(--term-green); }
  .tc-cmd { color: var(--term-fg); font-weight: 500; }
  .term-cmdwrap { position: relative; margin-top: 9px; border-top: 1px dashed var(--term-line); padding-top: 9px; }
  .term-cmd { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
  .term-prompt { color: var(--term-green); font-size: 9.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 52%; }
  .term-input {
    flex: 1; min-width: 120px; background: transparent; border: 0; outline: none;
    color: var(--term-fg); font-family: var(--mono); font-size: 10.5px; padding: 4px 0; caret-color: var(--term-green);
  }
  .term-input::placeholder { color: var(--term-muted); }
  .term-suggest {
    position: absolute; bottom: calc(100% - 1px); left: 0; right: 0; z-index: 5;
    background: var(--term-panel); border: 1px solid var(--term-line); border-radius: 6px;
    overflow: hidden; max-height: 190px; overflow-y: auto;
  }
  .sug-item {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    width: 100%; padding: 6px 8px; border: 0; background: transparent; color: var(--term-fg);
    font-family: var(--mono); font-size: 9.5px; text-align: left; cursor: pointer;
  }
  .sug-item:hover { background: var(--surface-2); color: var(--ink); }
  .term-hint { display: flex; align-items: center; gap: 4px; color: var(--term-muted); font-size: 9px; margin-top: 5px; }
  .term-artifacts { padding: 9px 11px; border-top: 1px solid var(--line); background: var(--surface); }
  .ta-head { display: flex; align-items: center; gap: 4px; font-family: var(--mono); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 5px; }
  .ta-list { display: flex; flex-wrap: wrap; gap: 4px; }

  /* Web 应用 */
  .svc-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    background: var(--surface); border: 1px solid var(--line); border-bottom: 0; border-radius: 9px 9px 0 0; padding: 11px 13px;
  }
  .svc-main { display: flex; align-items: center; gap: 9px; min-width: 0; }
  .svc-icon { width: 34px; height: 34px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
  .svc-main > div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
  .svc-main strong { font-size: 12px; }
  .svc-main .mono { font-size: 9.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .svc-actions { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
  .browser { border: 1px solid var(--line); border-top: 0; border-radius: 0 0 9px 9px; overflow: hidden; background: var(--surface); }
  .browser-chrome { height: 31px; background: var(--surface-2); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 5px; padding: 0 9px; }
  .b-dot { width: 7px; height: 7px; border-radius: 50%; }
  .b-dot.red { background: #d96a62; }
  .b-dot.amber { background: #d9a34f; }
  .b-dot.green { background: #59a97a; }
  .b-url { flex: 1; margin-left: 5px; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 2px 7px; font-size: 9px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .b-badge { font-family: var(--mono); font-size: 8.5px; color: var(--muted); }
  .web-note { display: flex; align-items: flex-start; gap: 5px; font-size: 10px; color: var(--muted); margin-top: 7px; line-height: 1.5; }
  .gradio { display: grid; grid-template-columns: 168px minmax(0, 1fr); min-height: 500px; }
  .g-nav { background: var(--surface-2); border-right: 1px solid var(--line); padding: 11px 9px; display: flex; flex-direction: column; gap: 3px; }
  .g-brand { display: flex; align-items: center; gap: 7px; padding: 2px 2px 9px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
  .g-mark { width: 28px; height: 28px; border-radius: 7px; background: var(--accent); color: var(--accent-contrast); display: grid; place-items: center; font-family: var(--mono); font-size: 11px; font-weight: 700; flex: none; }
  .g-brand div { display: flex; flex-direction: column; line-height: 1.3; }
  .g-brand strong { font-size: 10.5px; }
  .g-brand span { font-size: 8.5px; color: var(--muted); }
  .g-nav-item { text-align: left; padding: 6px 7px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); font-size: 10.5px; cursor: pointer; white-space: nowrap; }
  .g-nav-item:hover { color: var(--ink); background: var(--surface); }
  .g-nav-item.active { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--shadow-sm); }
  .g-nav-foot { margin-top: auto; padding-top: 9px; font-family: var(--mono); font-size: 8.5px; color: var(--muted); line-height: 1.6; }
  .g-main { padding: 13px 15px; min-width: 0; }
  .g-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
  .g-top h3 { font-size: 14px; font-weight: 650; }
  .g-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
  .g-form { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
  .g-label { font-family: var(--mono); font-size: 9px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
  .g-upload { border: 1px dashed var(--line-strong); border-radius: 7px; overflow: hidden; background: var(--surface-2); position: relative; }
  .g-upload img { display: block; width: 100%; height: 126px; object-fit: cover; }
  .g-upload span { display: flex; align-items: center; gap: 4px; padding: 4px 7px; border-top: 1px solid var(--line); font-size: 9px; color: var(--muted); background: var(--surface); }
  .g-upload.video .play-badge { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 38px; height: 38px; border-radius: 50%; background: rgba(0,0,0,.58); color: #fff; display: grid; place-items: center; }
  .g-range { display: grid; gap: 2px; }
  .g-range label { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 9.5px; color: var(--muted); }
  .g-range output { font-family: var(--mono); color: var(--accent); font-size: 9.5px; }
  .g-range input[type="range"] { width: 100%; accent-color: var(--accent); height: 14px; }
  .g-textarea { width: 100%; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); padding: 7px 8px; font-size: 10.5px; resize: vertical; outline: none; }
  .g-textarea:focus { border-color: var(--accent); }
  .g-hint { display: flex; align-items: flex-start; gap: 4px; font-size: 9px; color: var(--muted); line-height: 1.5; margin: 0; }
  .g-output { border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); padding: 9px; min-height: 300px; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
  .g-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; color: var(--muted); padding: 28px 14px; }
  .g-placeholder strong { font-size: 11.5px; color: var(--ink-2); }
  .g-placeholder p { font-size: 9.5px; }
  .g-progress { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; text-align: center; color: var(--ink-2); padding: 26px 12px; }
  .g-progress strong { font-size: 11px; }
  .g-progress p { font-size: 9.5px; color: var(--muted); }
  .g-progress .bar { width: 80%; height: 5px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
  .g-progress .bar span { display: block; height: 100%; width: 40%; background: var(--accent); border-radius: 999px; animation: pulseBar 1.25s ease-in-out infinite; }
  .g-progress.inline { align-items: stretch; text-align: left; padding: 6px 0; }
  .g-progress.inline .bar { width: 100%; }
  .g-result { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
  .g-result img { width: 100%; max-height: 280px; object-fit: contain; background: var(--surface-3); border-radius: 5px; border: 1px solid var(--line); cursor: zoom-in; }
  .g-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
  .g-metrics div { background: var(--surface); border: 1px solid var(--line); border-radius: 5px; padding: 5px; text-align: center; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
  .g-metrics span { font-size: 8.5px; color: var(--muted); }
  .g-metrics strong { font-family: var(--mono); font-size: 13px; color: var(--ink); }
  .g-json { margin: 0; background: var(--term-bg); color: var(--term-fg); padding: 6px 8px; border-radius: 5px; font-family: var(--mono); font-size: 8.5px; line-height: 1.5; overflow: auto; max-height: 110px; }
  .g-result-note { font-size: 9px; color: var(--muted); }
  .g-batch { display: grid; gap: 9px; }
  .g-batch-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .g-batch-head > div { display: flex; flex-direction: column; }
  .g-batch-head strong { font-size: 12px; }
  .g-batch-head span { font-size: 9.5px; color: var(--muted); }
  .g-batch-list { border: 1px solid var(--line); border-radius: 7px; overflow: hidden; background: var(--surface); }
  .g-batch-row { display: grid; grid-template-columns: 20px minmax(0, 1fr) 62px 72px; gap: 7px; align-items: center; padding: 6px 8px; border-bottom: 1px solid var(--line); font-size: 10px; }
  .g-batch-row:last-child { border-bottom: 0; }
  .g-batch-row .mono { color: var(--muted); font-size: 9px; }
  .vlm-result { display: flex; flex-direction: column; gap: 5px; }
  .vlm-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 2px; }
  .vlm-head .muted { font-size: 9px; }
  .vlm-result h4 { font-size: 11px; margin: 4px 0 0; color: var(--ink); }
  .vlm-result p { font-size: 10.5px; color: var(--ink-2); line-height: 1.6; }
  .vlm-checks { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
  .g-output .tbl-wrap { border: 0; }

  /* 文件 */
  .files-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 11px; align-items: start; }
  .file-list { border: 1px solid var(--line); border-radius: 9px; background: var(--surface); overflow: hidden; }
  .file-list-head { display: flex; align-items: center; gap: 5px; padding: 9px 11px; border-bottom: 1px solid var(--line); font-size: 10.5px; color: var(--muted); }
  .file-list-head .tag { margin-left: auto; }
  .file-row { display: grid; grid-template-columns: 17px minmax(0, 1fr) auto 13px; gap: 7px; align-items: center; width: 100%; padding: 7px 11px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; font-size: 10.5px; color: var(--ink-2); cursor: pointer; }
  .file-row:last-child { border-bottom: 0; }
  .file-row:hover { background: var(--surface-2); }
  .file-row.active { background: var(--accent-soft); color: var(--accent); }
  .fr-icon { color: var(--muted); display: grid; place-items: center; }
  .fr-path { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .fr-size { font-family: var(--mono); font-size: 8.5px; color: var(--muted); white-space: nowrap; }
  .lock-dot { color: var(--muted); }
  .file-preview { border: 1px solid var(--line); border-radius: 9px; background: var(--surface); min-height: 360px; overflow: hidden; }
  .fp-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 11px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
  .fp-head > div { display: flex; align-items: center; gap: 5px; min-width: 0; flex-wrap: wrap; }
  .fp-actions { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }
  .fp-path { font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .fp-img { padding: 11px; background: var(--surface-2); text-align: center; }
  .fp-img img { max-width: 100%; max-height: 430px; cursor: zoom-in; border-radius: 5px; }
  .fp-note { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 56px 20px; text-align: center; color: var(--muted); }
  .fp-note strong { font-size: 12px; color: var(--ink-2); }
  .fp-note p { font-size: 10.5px; max-width: 420px; }
  .code-view { margin: 0; padding: 11px 13px; background: var(--code-surface); color: var(--code-ink); font-family: var(--mono); font-size: 10px; line-height: 1.65; overflow: auto; max-height: 520px; white-space: pre; }

  /* 产物 */
  .artifact-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
  .artifact-head h2 { font-size: 15px; font-weight: 650; }
  .artifact-head p { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
  .artifact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 9px; }
  .artifact-card { border: 1px solid var(--line); border-radius: 9px; background: var(--surface); overflow: hidden; text-align: left; cursor: pointer; display: flex; flex-direction: column; padding: 0; }
  .artifact-card:hover { border-color: var(--accent); }
  .ac-thumb { position: relative; aspect-ratio: 16 / 10; background: var(--surface-2); overflow: hidden; }
  .ac-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
  .artifact-card:hover .ac-thumb img { transform: scale(1.02); }
  .ac-zoom { position: absolute; right: 7px; top: 7px; width: 25px; height: 25px; border-radius: 50%; background: rgba(0,0,0,.56); color: #fff; display: grid; place-items: center; opacity: 0; transition: opacity .15s; }
  .artifact-card:hover .ac-zoom { opacity: 1; }
  .ac-foot { padding: 8px 9px; display: flex; flex-direction: column; gap: 1px; }
  .ac-foot strong { font-size: 10.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ac-foot span { font-size: 9px; color: var(--muted); }
  .ac-file { height: 118px; display: grid; place-items: center; background: var(--surface-2); color: var(--accent); }
  .file-modal { min-width: 0; }
  .fm-head { display: flex; align-items: center; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
  .fm-head div { display: flex; flex-direction: column; }
  .fm-head strong { font-size: 12.5px; }
  .fm-head span { font-size: 9.5px; color: var(--muted); }
  .zoom-fig { margin: 0; }
  .zoom-fig img { display: block; max-width: 100%; max-height: 70vh; margin: 0 auto; border-radius: 6px; }
  .zoom-fig figcaption { text-align: center; font-size: 10px; color: var(--muted); margin-top: 7px; }

  /* 运行记录 */
  .stat-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; margin-bottom: 14px; }
  .stat-tile { border: 1px solid var(--line); border-radius: 9px; background: var(--surface); padding: 12px 13px; display: flex; flex-direction: column; gap: 1px; box-shadow: var(--shadow-sm); }
  .st-k { font-family: var(--mono); font-size: 8.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
  .st-v { font-family: var(--mono); font-size: 23px; font-weight: 600; color: var(--ink); line-height: 1.25; }
  .st-v em { font-style: normal; font-size: 11px; color: var(--accent); margin-left: 1px; }
  .st-s { font-size: 9.5px; color: var(--muted); }
  .runs-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; flex-wrap: wrap; }
  .run-table table { min-width: 760px; }
  .row-sub { display: block; font-size: 8.5px; color: var(--muted); }
  .chip-row { display: flex; flex-wrap: wrap; gap: 4px; }

  /* 管理 */
  .admin-grid { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 12px; }
  .admin-block { border: 1px solid var(--line); border-radius: 9px; background: var(--surface); padding: 13px; margin-bottom: 12px; box-shadow: var(--shadow-sm); min-width: 0; }
  .ab-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
  .ab-head h2 { font-size: 13.5px; font-weight: 650; }
  .env-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .env-card { border: 1px solid var(--line); border-radius: 7px; background: var(--surface-2); padding: 9px 10px; min-width: 0; }
  .env-card.warn { border-color: color-mix(in srgb, var(--warn) 40%, var(--line)); }
  .ec-head { display: flex; align-items: center; justify-content: space-between; gap: 7px; }
  .ec-head strong { font-size: 11.5px; }
  .ec-meta { display: flex; gap: 7px; flex-wrap: wrap; font-size: 9px; color: var(--muted); margin: 3px 0; }
  .env-card p { font-size: 9.5px; color: var(--ink-2); line-height: 1.5; }
  .ec-used { font-size: 9px; color: var(--muted); margin-top: 3px; }
  .policy { grid-template-columns: minmax(0, 1fr) auto; }
  .policy dd { text-align: right; }
  .check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .check-card { border: 1px solid var(--line); border-radius: 7px; background: var(--surface-2); padding: 8px 9px; min-width: 0; }
  .cc-head { display: flex; align-items: center; gap: 5px; }
  .cc-head strong { font-size: 10.5px; }
  .cc-head .tag { margin-left: auto; }
  .check-card p { font-size: 9.5px; color: var(--muted); line-height: 1.5; margin-top: 3px; }

  /* 模态与抽屉 */
  .modal-backdrop { position: fixed; inset: 0; background: rgba(3, 10, 8, .58); z-index: 50; }
  .modal {
    position: fixed; z-index: 51; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: min(880px, calc(100vw - 28px)); max-height: 86vh; overflow: auto;
    background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
    padding: 16px; box-shadow: 0 24px 80px rgba(0, 0, 0, .35);
  }
  .modal-close { position: absolute; top: 9px; right: 9px; width: 29px; height: 29px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--muted); display: grid; place-items: center; cursor: pointer; }
  .modal-close:hover { background: var(--surface-2); color: var(--ink); }
  .drawer-backdrop { position: fixed; inset: 0; background: rgba(3, 10, 8, .46); z-index: 50; }
  .drawer {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 51; width: min(560px, 100vw);
    background: var(--surface); border-left: 1px solid var(--line); padding: 17px;
    overflow: auto; animation: slideIn .2s ease;
  }
  .drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
  .drawer-head h2 { font-size: 17px; margin-top: 2px; }
  .drawer-sub { font-size: 11px; font-weight: 650; margin: 14px 0 5px; }
  .drawer-actions { display: flex; gap: 6px; margin-top: 14px; padding-top: 11px; border-top: 1px solid var(--line); }

  .toast-wrap { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; align-items: center; gap: 5px; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
  .toast {
    display: flex; align-items: center; gap: 6px; background: var(--ink); color: var(--bg);
    border-radius: 7px; padding: 7px 11px; font-size: 11px; box-shadow: 0 8px 26px rgba(0, 0, 0, .28);
    animation: toastIn .18s ease; max-width: 100%;
  }
  .toast.warn { background: var(--warn); color: #fff; }
  .toast.err { background: var(--danger); color: #fff; }
  .toast.out { opacity: 0; transform: translateY(5px); transition: opacity .2s, transform .2s; }

  /* 移动导航 */
  .mobile-nav { display: none; }
  .mnav-item { display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--muted); font-size: 9px; text-decoration: none; padding: 4px 0; }
  .mnav-item.active { color: var(--accent); font-weight: 600; }

  /* 登录与身份 */
  .login-view {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    background: var(--bg);
  }
  .login-left {
    position: relative;
    overflow: hidden;
    background-color: #0a2b24;
    background-image:
      linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
    background-size: 30px 30px;
    color: #eaf5f0;
    padding: clamp(24px, 4vw, 56px);
    display: flex;
    flex-direction: column;
    gap: 28px;
  }
  .login-left::after {
    content: "";
    position: absolute;
    width: 460px; height: 460px; right: -180px; bottom: -180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(95,208,180,.2), transparent 68%);
    pointer-events: none;
  }
  .login-brand { display: flex; align-items: center; gap: 10px; position: relative; z-index: 1; }
  .login-brand .brand-mark { background: #83adff; color: #06201a; }
  .login-brand div { display: flex; flex-direction: column; line-height: 1.3; }
  .login-brand strong { font-size: 12.5px; color: #eaf5f0; }
  .login-brand span { font-family: var(--mono); font-size: 8.5px; letter-spacing: .12em; text-transform: uppercase; color: rgba(234,245,240,.5); }
  .login-copy { position: relative; z-index: 1; margin-top: clamp(18px, 8vh, 86px); max-width: 520px; }
  .login-eyebrow { font-family: var(--mono); font-size: 9.5px; letter-spacing: .15em; text-transform: uppercase; color: #7fd7bd; margin-bottom: 8px; }
  .login-copy h1 { font-size: clamp(34px, 4.4vw, 56px); line-height: 1.12; letter-spacing: -.035em; font-weight: 650; color: #f1f8f5; margin: 0 0 16px; }
  .login-copy > p { font-size: 13px; line-height: 1.75; color: rgba(234,245,240,.7); max-width: 460px; }
  .login-points { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 12px; max-width: 470px; }
  .login-points li { display: grid; grid-template-columns: 23px minmax(0, 1fr); gap: 9px; align-items: start; }
  .lp-icon { width: 22px; height: 22px; border-radius: 50%; background: rgba(95,208,180,.13); color: #7fd7bd; display: grid; place-items: center; margin-top: 1px; }
  .login-points strong { display: block; font-size: 11.5px; color: #eaf5f0; }
  .login-points span { font-size: 10.5px; color: rgba(234,245,240,.58); line-height: 1.5; }
  .login-server {
    position: relative; z-index: 1; margin-top: auto; width: fit-content;
    display: flex; align-items: center; gap: 8px;
    border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.045);
    border-radius: 8px; padding: 9px 11px; backdrop-filter: blur(8px);
  }
  .login-server div { display: flex; flex-direction: column; line-height: 1.35; }
  .login-server strong { font-size: 10.5px; color: #eaf5f0; }
  .login-server span { font-size: 9.5px; color: rgba(234,245,240,.55); }
  .login-right { background: var(--surface); padding: clamp(20px, 3.5vw, 44px); display: flex; flex-direction: column; position: relative; }
  .login-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .login-form { width: 100%; max-width: 500px; margin: auto; padding: 22px 0; }
  .login-form h2 { font-size: clamp(24px, 3vw, 32px); line-height: 1.2; letter-spacing: -.025em; font-weight: 650; margin: 2px 0 6px; }
  .login-sub { font-size: 12px; color: var(--muted); line-height: 1.7; margin-bottom: 18px; }
  .login-card {
    display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 12px; align-items: center;
    width: 100%; text-align: left; padding: 13px 14px; margin-bottom: 9px;
    border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer;
    transition: border-color .14s, transform .14s, box-shadow .14s;
  }
  .login-card:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: var(--shadow); }
  .lc-icon { width: 40px; height: 40px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
  .lc-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
  .lc-body strong { font-size: 13.5px; color: var(--ink); }
  .lc-body > span { font-size: 10.5px; color: var(--muted); }
  .lc-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
  .lc-chips span { font-family: var(--mono); font-size: 8.5px; padding: 1px 6px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); color: var(--ink-2); }
  .lc-arrow { color: var(--muted); font-family: var(--mono); font-size: 15px; }
  .login-card:hover .lc-arrow { color: var(--accent); }
  .guest-link { display: inline-flex; align-items: center; gap: 5px; border: 0; background: transparent; padding: 6px 0; color: var(--muted); font-size: 11.5px; cursor: pointer; }
  .guest-link:hover { color: var(--accent); }
  .login-note { font-size: 10px; color: var(--muted); line-height: 1.65; margin-top: 18px; padding-top: 12px; border-top: 1px dashed var(--line); }
  .login-mode .topbar, .login-mode .app-body, .login-mode .mobile-nav { display: none !important; }
  .user-chip {
    display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 9px;
    border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
    color: var(--ink-2); font-size: 10.5px; white-space: nowrap;
  }
  .user-chip .dot { width: 6px; height: 6px; }
  .user-chip strong { font-weight: 600; color: var(--ink); }
  .user-chip em { font-style: normal; color: var(--muted); }

  /* 版本条 */
  .version-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap;
    margin-top: 10px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px;
    background: var(--surface-2);
  }
  .vb-left, .vb-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
  .vb-left { font-size: 10.5px; color: var(--ink-2); min-width: 0; }
  .vb-note { font-size: 9.5px; color: var(--muted); }

  /* 未登录 / 无权限 */
  .login-gate, .permission-gate {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 7px; text-align: center; padding: 54px 22px;
    border: 1px dashed var(--line-strong); border-radius: 10px; background: var(--surface);
  }
  .permission-gate { border-style: solid; border-color: color-mix(in srgb, var(--warn) 35%, var(--line)); }
  .lg-icon {
    width: 58px; height: 58px; border-radius: 50%; background: var(--accent-soft); color: var(--accent);
    display: grid; place-items: center; margin-bottom: 6px;
  }
  .permission-gate .lg-icon { background: var(--warn-soft); color: var(--warn); }
  .login-gate h2, .permission-gate h2 { font-size: 18px; font-weight: 650; }
  .login-gate p, .permission-gate p { font-size: 11.5px; color: var(--muted); max-width: 450px; line-height: 1.65; }
  .lg-actions { display: flex; gap: 7px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }

  /* 教师编辑 */
  .cell-top .cell-spacer { flex: 1; }
  .cell-edit {
    display: inline-flex; align-items: center; gap: 3px; border: 0; background: transparent;
    color: var(--accent); font-size: 9.5px; padding: 1px 2px; cursor: pointer;
  }
  .cell-edit:hover { text-decoration: underline; text-underline-offset: 2px; }
  .cell-lock { display: inline-flex; align-items: center; gap: 3px; font-size: 9px; color: var(--muted); }
  .cell-editor {
    width: 100%; min-height: 180px; resize: vertical; display: block;
    background: var(--code-surface); color: var(--code-ink);
    border: 1px solid var(--accent); border-radius: 5px; padding: 8px 9px;
    font-family: var(--mono); font-size: 10.5px; line-height: 1.55; outline: none;
  }
  .cell-editor-actions { display: flex; align-items: center; gap: 5px; margin-top: 5px; flex-wrap: wrap; }
  .edit-hint { font-size: 9.5px; color: var(--muted); }
  .file-editor {
    width: 100%; min-height: 360px; resize: vertical; display: block; border: 0;
    background: var(--code-surface); color: var(--code-ink); padding: 11px 13px;
    font-family: var(--mono); font-size: 10px; line-height: 1.65; outline: none;
  }
  .file-edit-actions { display: flex; gap: 6px; justify-content: flex-end; padding: 8px 10px; border-top: 1px solid var(--line); background: var(--surface-2); }
  .edit-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--warn); display: inline-block; flex: none; }
  .pub-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--ok); display: inline-block; flex: none; }

  @keyframes spin { to { transform: rotate(360deg); } }
  @keyframes blink { 50% { opacity: 0; } }
  @keyframes pulseBar { 0%, 100% { opacity: .55; transform: scaleX(.72); transform-origin: left; } 50% { opacity: 1; transform: scaleX(1); transform-origin: left; } }
  @keyframes toastIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
  @keyframes slideIn { from { transform: translateX(18px); opacity: .6; } to { transform: translateX(0); opacity: 1; } }

  @media (max-width: 1180px) {
    .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .head-instrument { grid-template-columns: repeat(4, minmax(56px, 1fr)); }
  }
  @media (max-width: 1024px) {
    .app-body { grid-template-columns: 1fr; }
    .sidenav { display: none; }
    .main { padding: 18px 16px 92px; }
    .mobile-nav {
      display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 35;
      background: var(--surface); border-top: 1px solid var(--line);
      padding: 5px max(14px, env(safe-area-inset-left, 0px)) calc(5px + env(safe-area-inset-bottom, 0px));
      justify-content: space-around;
    }
    .toast-wrap { bottom: calc(68px + env(safe-area-inset-bottom, 0px)); }
    .ov-grid { grid-template-columns: 1fr; }
    .ov-aside { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .nb-layout { grid-template-columns: 1fr; }
    .nb-outline { display: none; }
    .term-layout { grid-template-columns: 1fr; }
    .term-panel { order: 1; }
    .script-rail { order: 2; border-right: 0; border-top: 1px solid var(--line); }
    .files-layout { grid-template-columns: 1fr; }
    .admin-grid { grid-template-columns: 1fr; }
    .gradio { grid-template-columns: 1fr; min-height: 0; }
    .g-nav { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); align-items: center; padding: 7px 8px; }
    .g-brand, .g-nav-foot { display: none; }
    .g-nav-item { white-space: nowrap; }
  }
  @media (max-width: 900px) {
    .login-view { grid-template-columns: 1fr; grid-template-rows: auto 1fr; align-content: start; }
    .login-left { min-height: 230px; padding: 24px; gap: 16px; }
    .login-copy { margin-top: 6px; max-width: none; }
    .login-copy h1 { font-size: 31px; margin-bottom: 8px; }
    .login-copy > p { font-size: 11.5px; max-width: none; }
    .login-points, .login-server { display: none; }
    .login-right { padding: 20px; }
    .login-form { margin: 0 auto; padding: 8px 0; }
  }
  @media (max-width: 820px) {
    .page-head { flex-direction: column; align-items: flex-start; gap: 12px; }
    .head-instrument { width: 100%; }
    .quick-grid { grid-template-columns: 1fr; }
    .detail-head { flex-direction: column; gap: 12px; }
    .dh-actions { width: 100%; }
    .dh-actions .btn { flex: 1; }
    .g-grid { grid-template-columns: 1fr; }
    .env-grid { grid-template-columns: 1fr; }
    .check-grid { grid-template-columns: 1fr; }
    .stat-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }
  @media (max-width: 640px) {
    .topbar { gap: 8px; padding-left: max(12px, env(safe-area-inset-left, 0px)); padding-right: max(12px, env(safe-area-inset-right, 0px)); }
    .brand-text { font-size: 12px; }
    .proto-badge { display: none; }
    .resource-chip { display: none; }
    .user-chip em { display: none; }
    .login-left { min-height: 210px; padding: 20px; }
    .login-copy h1 { font-size: 27px; }
    .login-form h2 { font-size: 24px; }
    .login-card { grid-template-columns: 36px minmax(0, 1fr) auto; gap: 9px; padding: 11px; }
    .lc-icon { width: 36px; height: 36px; }
    .lc-chips span { font-size: 8px; padding: 1px 5px; }
    .login-note { font-size: 9.5px; }
    .main { padding: 14px 12px 90px; }
    .page-head h1 { font-size: 22px; }
    .ph-sub { font-size: 12px; }
    .notice { flex-wrap: wrap; }
    .notice .btn { margin-left: 46px; }
    .catalog-tools { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; width: 100%; }
    .catalog-tools .filters { grid-column: 1 / -1; overflow-x: auto; }
    .catalog-tools .search-box { width: 100%; min-width: 0; }
    .search-box input { width: 100%; }
    .select { flex: none; }
    .project-grid { grid-template-columns: 1fr; }
    .ov-aside { grid-template-columns: 1fr; }
    .detail-head h1 { font-size: 21px; }
    .tabs { gap: 0; }
    .tab { padding: 0 10px; font-size: 11px; }
    .nb-head, .term-head, .svc-bar { padding: 9px 10px; }
    .nb-toolbar { padding: 6px; }
    .tb-left .btn, .tb-right .seg { font-size: 10px; }
    .tb-right { width: 100%; justify-content: space-between; }
    .nb-cells { padding: 7px; }
    .nb-cell { grid-template-columns: 34px minmax(0, 1fr); }
    .cell-main { padding: 7px 8px; }
    .code { font-size: 9.5px; }
    .term-body { min-height: 340px; max-height: 520px; font-size: 9.5px; padding: 9px 10px; }
    .term-prompt { max-width: 100%; }
    .term-cmd { gap: 4px; }
    .term-input { min-width: 100%; }
    .th-path { max-width: 100%; }
    .svc-main strong { font-size: 11px; }
    .svc-actions { width: 100%; justify-content: flex-end; }
    .g-main { padding: 10px; }
    .g-top { align-items: flex-start; }
    .g-batch-row { grid-template-columns: 18px minmax(0, 1fr) 54px 62px; font-size: 9px; }
    .file-row { grid-template-columns: 17px minmax(0, 1fr) auto; }
    .lock-dot { display: none; }
    .artifact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ac-foot strong { font-size: 9.5px; }
    .stat-tiles { gap: 7px; }
    .st-v { font-size: 20px; }
    .drawer { width: 100vw; }
  }
  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  }

/* v2: consistent hierarchy, generous spacing and accessible controls */
:root {--radius:14px;--shadow:0 4px 24px rgba(18,32,28,.06)}
body{font-size:16px}button,input,select{font-family:inherit}
.page-head{padding:32px;border:1px solid var(--line);border-radius:20px;background:linear-gradient(120deg,var(--surface),var(--accent-soft));margin-bottom:24px}
.page-head h1{font-size:clamp(28px,3vw,40px);letter-spacing:-1px;line-height:1.25}
.project-card{border-radius:16px;transition:transform .18s,box-shadow .18s;border:1px solid var(--line)}
.project-card:hover{transform:translateY(-3px);box-shadow:0 10px 30px rgba(18,32,28,.12)}
.project-card h3{font-size:19px}.pc-desc{font-size:14px;line-height:1.8}.pc-foot{padding-top:16px}
.quick-card{border-radius:14px}.btn{min-height:40px}.search-box input{min-height:40px}
:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
.review-link{display:block;padding:12px 20px;background:var(--accent-soft);color:var(--ink);font-size:14px;text-align:center}
@media(max-width:640px){.page-head{padding:20px}.head-instrument{flex-wrap:wrap}.catalog-tools{flex-wrap:wrap}.search-box{width:100%}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* V3 · Vision Academy */
.topbar{height:68px;padding-inline:26px}.brand-text{font-size:17px;font-weight:700}.brand-mark{width:36px;height:36px;border-radius:11px;background:linear-gradient(135deg,#2563eb,#4a8fff);box-shadow:0 4px 12px #2563eb22;color:white}.sidenav{padding-top:26px}.nav-head{font-size:12px}.nav-item{height:44px;font-size:14px;padding:0 14px;border-radius:10px}.nav-item.active{box-shadow:inset 3px 0 var(--accent)}.main{padding:28px 32px 72px}.page-head:not(.compact){position:relative;overflow:hidden;min-height:248px;padding:36px;background:linear-gradient(115deg,#153575,#245fda 65%,#4388ee);color:white;border:0;border-radius:24px;box-shadow:0 12px 32px #1d4ed81a}.page-head:not(.compact)::after{content:'';position:absolute;width:300px;height:300px;border:1px solid #ffffff22;border-radius:50%;right:-80px;top:-100px;box-shadow:0 0 0 45px #ffffff07,0 0 0 90px #ffffff05;pointer-events:none}.page-head:not(.compact) .ph-main{max-width:650px;z-index:1}.page-head:not(.compact) h1{font-size:clamp(28px,3vw,40px);font-weight:700;letter-spacing:-.8px}.page-head:not(.compact) .eyebrow{color:#c8dcff;font-size:12px;letter-spacing:2px}.page-head:not(.compact) .ph-sub{color:#e0ebff;font-size:15px;line-height:1.9;max-width:550px}.head-instrument{position:relative;z-index:1;background:#ffffff12;border:1px solid #ffffff26;border-radius:16px;padding:20px;gap:18px}.hi-k{color:#d3e3ff!important;font-size:12px}.hi-v{color:white!important}.notice{border-radius:12px}.notice.warn{background:var(--surface);border-color:var(--line)}.notice-main p{font-size:14px}.quick-grid{gap:16px;margin-block:24px}.quick-card{padding:20px;background:var(--surface);border-color:var(--line)}.q-icon{background:var(--accent-soft);color:var(--accent);width:44px;height:44px;border-radius:12px}.q-body strong{font-size:15px}.q-body span{font-size:12px}.catalog-title h2{font-size:22px}.project-grid{gap:22px}.project-card{padding:0;overflow:hidden;border-radius:18px;box-shadow:0 3px 12px #1c3f7505}.pc-top,.project-card h3,.pc-desc,.pc-meta,.pc-foot{margin-left:22px;margin-right:22px}.pc-top{margin-top:20px}.project-card h3{margin-top:12px}.pc-foot{margin-bottom:20px}.course-cover{height:142px;display:flex;align-items:center;justify-content:space-between;padding:24px;color:#dce9ff;background:linear-gradient(125deg,#173f87,#397be5);position:relative;overflow:hidden}.course-cover.notebook{background:linear-gradient(125deg,#243b86,#647ee9)}.course-cover.web{background:linear-gradient(125deg,#0e4c8a,#2c9ac4)}.course-cover:after{content:'';position:absolute;inset:20px -20px -90px auto;width:180px;border:1px solid #ffffff40;transform:rotate(-25deg);border-radius:28px;pointer-events:none}.cover-kicker{font-size:11px;letter-spacing:2px;display:block;margin-bottom:8px}.cover-title{font-size:21px;font-weight:650;color:white}.cover-symbol{border:1px solid #ffffff50;background:#ffffff15;border-radius:18px;padding:18px;transform:rotate(-8deg)}.course-path{display:flex;gap:12px;align-items:center;margin:0 0 24px;flex-wrap:wrap;font-size:13px;color:var(--muted)}.course-path strong{color:var(--ink);margin-right:8px}.course-path span{padding:7px 14px;border:1px solid var(--line);background:var(--surface);border-radius:99px}.login-left{background:radial-gradient(ellipse at 80% 25%,#3174e2 0,transparent 55%),linear-gradient(145deg,#102752,#194caa);padding:clamp(28px,5vw,80px)}.login-left::after{border-color:#ffffff20}.login-copy h1{font-size:clamp(38px,4.6vw,66px);line-height:1.22;color:white}.login-copy>p{font-size:16px;color:#d5e4ff;line-height:1.9}.login-eyebrow{color:var(--accent);font-size:12px}.login-left .login-eyebrow{color:#a9ceff}.login-brand strong{font-size:18px;color:white}.login-brand span{font-size:11px}.login-points strong{font-size:15px;color:#fff}.login-points span{font-size:13px;color:#c5d9ff}.lp-icon{background:#ffffff15;color:#b8d7ff}.login-server{border-color:#ffffff25;background:#ffffff09}.login-server strong{font-size:14px}.login-server span{font-size:13px}.login-right{background:var(--bg);padding:48px}.login-form{max-width:440px}.login-form h2{font-size:30px}.login-sub{font-size:15px;margin:14px 0 28px}.login-card{padding:22px;margin-bottom:16px;background:var(--surface);border-radius:16px;box-shadow:0 8px 24px #1e408008}.lc-body strong{font-size:17px}.lc-body>span{font-size:13px}.lc-icon{width:44px;height:44px;border-radius:12px}.lc-chips span{font-size:12px}.login-note{font-size:12px}.review-link{font-size:12px;padding:10px}.login-mode .review-link{display:none}.pc-go .ic,.q-arrow,.lc-arrow{display:none}
@media(min-width:1600px){.main{max-width:1600px;margin:auto;width:100%}}
@media(max-width:1100px){.page-head:not(.compact){flex-direction:column;align-items:flex-start;gap:24px}.head-instrument{width:100%;justify-content:space-between}.login-left{padding:36px}.login-right{padding:28px}}
@media(max-width:767px){.main{padding:20px 16px 88px}.page-head:not(.compact){padding:26px}.project-grid{grid-template-columns:1fr}.topbar{padding-inline:14px}.brand-text{font-size:14px}.login-right{padding:24px}.login-copy h1{font-size:36px}.login-left{padding:28px}.course-cover{height:136px}.resource-chip{display:none}}
.sidenav{top:68px;height:calc(100vh - 68px)}.server-card .meter{display:none}.login-brand .brand-mark{color:#132e60}@media(max-width:767px){.topbar{height:56px}}

/* ---- 开发版：账号密码登录 ---- */
.login-account { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; font-size: 12.5px; }
.login-account summary { cursor: pointer; color: var(--muted); }
.login-account summary:hover { color: var(--accent); }
.login-account form { display: grid; gap: 8px; margin-top: 10px; }
.login-account label { display: grid; gap: 4px; color: var(--muted); font-size: 11.5px; }
.login-account input {
  padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 9px;
  background: var(--surface); color: var(--ink); font: inherit; font-size: 13.5px;
}
.login-account input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.login-account .login-note { margin: 0; color: var(--muted); font-size: 11.5px; line-height: 1.6; }
.login-account #loginError { color: var(--danger); }
/* 运行中按钮与状态 */
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.run-live-badge { display:inline-flex; align-items:center; gap:6px; font-family:var(--mono); font-size:11px; color:var(--accent); }
.run-live-badge .dot { width:6px;height:6px;border-radius:50%;background:var(--accent); animation:pulse 1.2s infinite; }
@keyframes pulse { 0%,100%{opacity:.35} 50%{opacity:1} }
.web-frame { width:100%; height: 620px; border:1px solid var(--line); border-radius:10px; background:var(--surface); }
.unavailable-box { display:flex; gap:14px; align-items:flex-start; padding:18px; border:1px solid var(--line); border-radius:12px; background:var(--surface); }
.unavailable-box .u-icon { color: var(--warn); }
.unavailable-box h3 { margin:0 0 4px; }
.unavailable-box p { margin:0; color:var(--muted); font-size:13px; line-height:1.7; }
