
    /* WorkBuddy light tokens (approx) */
    :root {
      --wb-white: #ffffff;
      --wb-gray-50: #f7f7f7;
      --wb-gray-100: #f2f2f2;
      --wb-gray-200: #e6e7e8;
      --wb-gray-300: #d6d8db;
      --wb-gray-500: #717680;
      --wb-gray-600: #535862;
      --wb-gray-700: #414651;
      --wb-gray-900: #181d27;
      --wb-brand-50: #edf3ff;
      --wb-brand-100: #d1e0ff;
      --wb-brand-500: #2970ff;
      --wb-brand-600: #155eef;
      --wb-brand-700: #004eeb;
      --wb-success: #079455;
      --wb-success-bg: #ecfdf3;
      --wb-warning: #dc6803;
      --wb-warning-bg: #fffaeb;
      --wb-error: #d92d20;
      --wb-error-bg: #fef3f2;
      --radius: 10px;
      --radius-sm: 8px;
      --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06);
      --font: "Inter", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    }
    * { box-sizing: border-box; }
    body {
      margin: 0;
      font-family: var(--font);
      background: var(--wb-gray-50);
      color: var(--wb-gray-900);
      min-height: 100vh;
      font-size: 14px;
      line-height: 1.5;
    }
    a { color: var(--wb-brand-600); text-decoration: none; }
    a:hover { text-decoration: underline; }

    .topbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 12px 20px;
      background: var(--wb-white);
      border-bottom: 1px solid var(--wb-gray-200);
      position: sticky;
      top: 0;
      z-index: 20;
    }
    .brand { display: flex; align-items: center; gap: 12px; }
    .brand-mark {
      width: 32px; height: 32px; border-radius: 8px;
      background: var(--wb-brand-600); color: #fff;
      display: grid; place-items: center;
      font-weight: 700; font-size: 13px;
    }
    .brand h1 { margin: 0; font-size: 15px; font-weight: 600; color: var(--wb-gray-900); }
    .brand small { display: block; color: var(--wb-gray-500); font-size: 12px; margin-top: 1px; font-weight: 400; }
    .top-meta { color: var(--wb-gray-500); font-size: 13px; }

    .layout {
      display: grid;
      grid-template-columns: 220px 1fr;
      min-height: calc(100vh - 57px);
    }
    .side {
      background: var(--wb-white);
      border-right: 1px solid var(--wb-gray-200);
      padding: 16px 12px;
    }
    .nav-item {
      display: flex; align-items: center; gap: 10px;
      width: 100%; text-align: left;
      padding: 9px 12px; border-radius: var(--radius-sm);
      border: none; background: transparent;
      color: var(--wb-gray-600); font-size: 13.5px;
      cursor: pointer; font-family: inherit; margin-bottom: 2px;
    }
    .nav-item:hover { background: var(--wb-gray-50); color: var(--wb-gray-900); }
    .nav-item.active {
      background: var(--wb-brand-50);
      color: var(--wb-brand-700);
      font-weight: 600;
    }
    .nav-item .ico {
      width: 18px; height: 18px; opacity: .75;
      display: grid; place-items: center; font-size: 12px;
    }
    .side-note {
      margin-top: 20px; padding: 12px;
      background: var(--wb-gray-50);
      border: 1px solid var(--wb-gray-200);
      border-radius: var(--radius-sm);
      font-size: 12px; color: var(--wb-gray-500); line-height: 1.55;
    }

    .main { padding: 24px 28px 48px; overflow-x: auto; }
    .page { display: none; }
    .page.active { display: block; animation: fade .18s ease; }
    @keyframes fade { from { opacity: .4; } to { opacity: 1; } }

    .page-head {
      display: flex; flex-wrap: wrap;
      align-items: flex-start; justify-content: space-between;
      gap: 12px; margin-bottom: 18px;
    }
    .page-head h2 { margin: 0 0 4px; font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
    .page-head p { margin: 0; color: var(--wb-gray-500); font-size: 13px; }

    .stats {
      display: grid;
      grid-template-columns: repeat(4, minmax(120px, 1fr));
      gap: 12px; margin-bottom: 16px;
    }
    .stat {
      background: var(--wb-white);
      border: 1px solid var(--wb-gray-200);
      border-radius: var(--radius);
      padding: 14px 16px;
      box-shadow: var(--shadow);
    }
    .stat .label { color: var(--wb-gray-500); font-size: 12px; }
    .stat .value { font-size: 22px; font-weight: 650; margin-top: 4px; color: var(--wb-gray-900); letter-spacing: -.03em; }
    .stat .value.green { color: var(--wb-success); }
    .stat .value.blue { color: var(--wb-brand-600); }
    .stat .value.warn { color: var(--wb-warning); }

    .toolbar {
      display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
      margin-bottom: 12px; padding: 12px;
      background: var(--wb-white);
      border: 1px solid var(--wb-gray-200);
      border-radius: var(--radius);
      box-shadow: var(--shadow);
    }
    .toolbar input, .toolbar select,
    .field input, .field select, .field textarea {
      background: var(--wb-white);
      border: 1px solid var(--wb-gray-300);
      color: var(--wb-gray-900);
      border-radius: var(--radius-sm);
      padding: 8px 10px;
      font-size: 13px;
      font-family: inherit;
      outline: none;
    }
    .toolbar input:focus, .toolbar select:focus,
    .field input:focus, .field select:focus, .field textarea:focus {
      border-color: var(--wb-brand-500);
      box-shadow: 0 0 0 3px var(--wb-brand-50);
    }
    .toolbar input { min-width: 180px; }
    .spacer { flex: 1; }

    .btn {
      display: inline-flex; align-items: center; gap: 6px;
      border: 1px solid var(--wb-gray-300);
      border-radius: var(--radius-sm);
      padding: 7px 12px;
      font-size: 13px; cursor: pointer; font-family: inherit;
      background: var(--wb-white); color: var(--wb-gray-700);
      white-space: nowrap; font-weight: 500;
    }
    .btn:hover { background: var(--wb-gray-50); }
    .btn:disabled { opacity: .45; cursor: not-allowed; }
    .btn-primary {
      background: var(--wb-brand-600); color: #fff; border-color: var(--wb-brand-600);
    }
    .btn-primary:hover { background: var(--wb-brand-700); border-color: var(--wb-brand-700); }
    .btn-ok { background: var(--wb-success-bg); color: var(--wb-success); border-color: #abeFC6; }
    .btn-warn { background: var(--wb-warning-bg); color: var(--wb-warning); border-color: #fedf89; }
    .btn-danger { background: var(--wb-error-bg); color: var(--wb-error); border-color: #fecdca; }
    .btn-ghost { background: transparent; border-color: transparent; color: var(--wb-gray-500); }
    .btn-ghost:hover { background: var(--wb-gray-100); color: var(--wb-gray-700); }
    .btn-sm { padding: 4px 8px; font-size: 12px; }

    .card {
      background: var(--wb-white);
      border: 1px solid var(--wb-gray-200);
      border-radius: var(--radius);
      overflow: hidden;
      box-shadow: var(--shadow);
    }
    table { width: 100%; border-collapse: collapse; font-size: 13px; }
    th, td {
      padding: 11px 12px;
      border-bottom: 1px solid var(--wb-gray-200);
      text-align: left; vertical-align: middle;
    }
    th {
      background: var(--wb-gray-50);
      color: var(--wb-gray-500);
      font-weight: 550; white-space: nowrap; font-size: 12px;
    }
    tr:last-child td { border-bottom: none; }
    tr:hover td { background: var(--wb-gray-50); }
    .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
    a.url-link {
      display: inline-block;
      max-width: 360px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      vertical-align: bottom;
      word-break: break-all;
    }
    td.url-cell { max-width: 380px; }
    .qr-cell { width: 76px; text-align: center; vertical-align: middle; }
    .qr-thumb-btn {
      display: inline-flex; padding: 2px; border: 1px solid var(--wb-gray-200);
      border-radius: 6px; background: #fff; cursor: pointer; line-height: 0;
    }
    .qr-thumb-btn:hover { border-color: var(--wb-brand-500); }
    .qr-thumb { display: block; width: 64px; height: 64px; border-radius: 4px; }
    .muted { color: var(--wb-gray-500); }

    .tag {
      display: inline-block; padding: 2px 8px; border-radius: 999px;
      font-size: 11px; font-weight: 600; border: 1px solid transparent;
    }
    .tag-ok { background: var(--wb-success-bg); color: var(--wb-success); border-color: #abeFC6; }
    .tag-off { background: var(--wb-error-bg); color: var(--wb-error); border-color: #fecdca; }
    .tag-jump { background: var(--wb-brand-50); color: var(--wb-brand-700); border-color: var(--wb-brand-100); }
    .tag-iframe { background: #fffaeb; color: #b54708; border-color: #fedf89; }
    .tag-h5 { background: #f4f3ff; color: #5925dc; border-color: #d9d6fe; }
    .tag-refresh { background: var(--wb-success-bg); color: var(--wb-success); border-color: #abeFC6; }
    .tag-dup { background: var(--wb-warning-bg); color: var(--wb-warning); border-color: #fedf89; }
    .tag-skip { background: var(--wb-gray-100); color: var(--wb-gray-600); border-color: var(--wb-gray-300); }
    .tag-fail { background: var(--wb-error-bg); color: var(--wb-error); border-color: #fecdca; }
    .tag-pending { background: var(--wb-brand-50); color: var(--wb-brand-700); border-color: var(--wb-brand-100); }

    .ops { display: flex; flex-wrap: wrap; gap: 4px; }
    .ip-cell { line-height: 1.45; }
    .ip-cell b { color: var(--wb-gray-900); }
    .ip-cell span { color: var(--wb-gray-500); font-size: 11px; }

    .ratio { display: inline-flex; align-items: center; gap: 4px; }
    .ratio input {
      width: 52px; background: var(--wb-white);
      border: 1px solid var(--wb-gray-300); color: var(--wb-gray-900);
      border-radius: 6px; padding: 3px 6px; font-size: 12px; text-align: center;
    }

    /* collect */
    .collect-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
      margin-bottom: 12px;
    }
    .panel {
      background: var(--wb-white);
      border: 1px solid var(--wb-gray-200);
      border-radius: var(--radius);
      padding: 16px;
      box-shadow: var(--shadow);
    }
    .panel h3 {
      margin: 0 0 12px;
      font-size: 14px;
      font-weight: 600;
      color: var(--wb-gray-900);
    }
    .field { margin-bottom: 12px; }
    .field:last-child { margin-bottom: 0; }
    .field label {
      display: block;
      font-size: 12px;
      font-weight: 550;
      color: var(--wb-gray-600);
      margin-bottom: 6px;
    }
    .field textarea {
      width: 100%; min-height: 140px; resize: vertical;
      line-height: 1.5;
    }
    .field .hint { margin-top: 6px; font-size: 12px; color: var(--wb-gray-500); line-height: 1.5; }
    .field-row { display: flex; gap: 10px; flex-wrap: wrap; }
    .field-row .field { flex: 1; min-width: 140px; }
    .log-box {
      background: var(--wb-gray-50);
      border: 1px solid var(--wb-gray-200);
      border-radius: var(--radius-sm);
      padding: 10px 12px;
      font-family: ui-monospace, Menlo, Consolas, monospace;
      font-size: 11.5px;
      color: var(--wb-gray-700);
      max-height: 180px;
      overflow: auto;
      line-height: 1.55;
      white-space: pre-wrap;
    }
    .log-ok { color: var(--wb-success); }
    .log-warn { color: var(--wb-warning); }
    .log-err { color: var(--wb-error); }
    .log-info { color: var(--wb-brand-600); }

    /* modal */
    .mask {
      display: none; position: fixed; inset: 0;
      background: rgba(24, 29, 39, .45);
      z-index: 50; align-items: center; justify-content: center; padding: 20px;
    }
    .mask.show { display: flex; }
    .modal {
      width: min(640px, 100%);
      background: var(--wb-white);
      border: 1px solid var(--wb-gray-200);
      border-radius: 12px;
      max-height: 90vh; overflow: auto;
      box-shadow: 0 20px 40px rgba(16,24,40,.12);
    }
    .modal.wide { width: min(820px, 100%); }
    .modal-h {
      display: flex; justify-content: space-between; align-items: center;
      padding: 14px 18px; border-bottom: 1px solid var(--wb-gray-200);
    }
    .modal-h h3 { margin: 0; font-size: 16px; font-weight: 600; }
    .modal-b { padding: 16px 18px; }
    .modal-f {
      padding: 12px 18px; border-top: 1px solid var(--wb-gray-200);
      display: flex; justify-content: flex-end; gap: 8px;
      background: var(--wb-gray-50);
    }
    .form-row {
      display: grid; grid-template-columns: 110px 1fr;
      gap: 10px; align-items: start; margin-bottom: 12px;
    }
    .form-row label {
      color: var(--wb-gray-600); font-size: 13px; padding-top: 8px; font-weight: 500;
    }
    .form-row input[type="text"],
    .form-row input[type="number"],
    .form-row input[type="datetime-local"],
    .form-row textarea,
    .form-row select {
      width: 100%; background: var(--wb-white);
      border: 1px solid var(--wb-gray-300); color: var(--wb-gray-900);
      border-radius: var(--radius-sm); padding: 8px 10px;
      font-size: 13px; font-family: inherit;
    }
    .form-row textarea { min-height: 72px; resize: vertical; }
    .hint { font-size: 12px; color: var(--wb-gray-500); margin-top: 4px; line-height: 1.5; }
    .dns-banner {
      background: #f0f7ff; border: 1px solid #cfe2ff; border-radius: var(--radius-sm);
      padding: 12px 14px; margin-bottom: 14px; font-size: 13px; color: var(--wb-gray-700);
    }
    .dns-banner code, .dns-box code {
      background: #fff; border: 1px solid var(--wb-gray-300); border-radius: 4px;
      padding: 2px 8px; font-size: 13px; margin: 0 6px; color: var(--wb-brand-700, #155eef);
    }
    .dns-box {
      background: var(--wb-gray-50); border: 1px solid var(--wb-gray-200);
      border-radius: var(--radius-sm); padding: 12px; font-size: 13px; line-height: 1.55;
    }
    .dns-steps { margin: 8px 0 8px 18px; padding: 0; color: var(--wb-gray-600); }
    .dns-steps li { margin: 4px 0; }
    .dns-check.ok { color: #067647; }
    .dns-check.bad { color: #b42318; }
    .group-tabs {
      display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px;
    }
    .group-tab {
      border: 1px solid var(--wb-gray-300); background: #fff; color: var(--wb-gray-700);
      border-radius: 999px; padding: 6px 12px; font-size: 12px; cursor: pointer;
    }
    .group-tab:hover { border-color: var(--wb-brand-600); color: var(--wb-brand-600); }
    .group-tab.active {
      background: var(--wb-brand-600); border-color: var(--wb-brand-600); color: #fff;
    }
    .seg {
      display: inline-flex; background: var(--wb-gray-50);
      border: 1px solid var(--wb-gray-300); border-radius: var(--radius-sm); overflow: hidden;
    }
    .seg label { padding: 7px 14px; cursor: pointer; font-size: 13px; color: var(--wb-gray-600); margin: 0; }
    .seg input { display: none; }
    .seg input:checked + span {
      color: #fff; background: var(--wb-brand-600);
      display: inline-block; margin: -7px -14px; padding: 7px 14px;
    }
    .seg span { display: inline-block; }

    .toast {
      position: fixed; bottom: 24px; left: 50%;
      transform: translateX(-50%) translateY(12px);
      background: var(--wb-gray-900); color: #fff;
      padding: 10px 16px; border-radius: var(--radius-sm);
      font-size: 13px; opacity: 0; transition: .2s; z-index: 100;
      pointer-events: none; box-shadow: var(--shadow);
    }
    .toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

    /* 注入文件 / 代码编辑 */
    .inject-layout {
      display: grid;
      grid-template-columns: 240px 1fr;
      gap: 0;
      min-height: calc(100vh - 160px);
      background: var(--wb-white);
      border: 1px solid var(--wb-gray-200);
      border-radius: var(--radius);
      overflow: hidden;
      box-shadow: var(--shadow);
    }
    .inject-files {
      border-right: 1px solid var(--wb-gray-200);
      background: var(--wb-gray-50);
      display: flex;
      flex-direction: column;
      min-height: 520px;
    }
    .inject-files-h {
      padding: 12px 14px;
      border-bottom: 1px solid var(--wb-gray-200);
      display: flex; align-items: center; justify-content: space-between;
      background: var(--wb-white);
    }
    .inject-files-h strong { font-size: 13px; font-weight: 600; }
    .inject-tree { padding: 8px; overflow: auto; flex: 1; }
    .inject-folder {
      font-size: 12px; font-weight: 600; color: var(--wb-gray-500);
      padding: 8px 8px 4px; letter-spacing: .02em;
    }
    .inject-file {
      display: flex; align-items: center; gap: 8px;
      width: 100%; text-align: left;
      padding: 7px 10px; border-radius: 6px;
      border: none; background: transparent;
      font-family: inherit; font-size: 13px; color: var(--wb-gray-700);
      cursor: pointer; margin-bottom: 2px;
    }
    .inject-file:hover { background: var(--wb-white); }
    .inject-file.active {
      background: var(--wb-brand-50);
      color: var(--wb-brand-700);
      font-weight: 600;
    }
    .inject-file .ext {
      font-size: 10px; font-weight: 700; color: #e34c26;
      background: #fff0ed; border-radius: 4px; padding: 1px 5px;
    }
    .inject-file .meta { margin-left: auto; font-size: 11px; color: var(--wb-gray-500); font-weight: 400; }
    .inject-file .tag-default {
      font-size: 10px; font-weight: 700; color: var(--wb-brand-700);
      background: var(--wb-brand-50); border: 1px solid var(--wb-brand-100);
      border-radius: 999px; padding: 1px 6px; margin-left: 4px;
    }
    .inject-file .tag-protected {
      font-size: 10px; font-weight: 700; color: #b54708;
      background: #fffaeb; border: 1px solid #fedf89;
      border-radius: 999px; padding: 1px 6px; flex-shrink: 0;
    }
    .inject-file.is-protected {
      background: #fffcf5;
    }
    .inject-file.is-protected.active {
      background: #fffaeb;
    }
    .inject-editor-wrap { display: flex; flex-direction: column; min-width: 0; }
    .inject-editor-bar {
      display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
      padding: 10px 14px;
      border-bottom: 1px solid var(--wb-gray-200);
      background: var(--wb-white);
    }
    .inject-editor-bar .path {
      font-family: ui-monospace, Menlo, Consolas, monospace;
      font-size: 12.5px; color: var(--wb-gray-700); font-weight: 550;
    }
    .inject-editor-bar .dirty {
      display: none; font-size: 11px; font-weight: 600;
      color: var(--wb-warning); background: var(--wb-warning-bg);
      border: 1px solid #fedf89; border-radius: 999px; padding: 2px 8px;
    }
    .inject-editor-bar .dirty.show { display: inline-block; }
    .inject-editor-bar .pub {
      font-size: 12px; color: var(--wb-gray-500);
    }
    .inject-editor-bar .pub code {
      font-size: 11px; background: var(--wb-gray-100);
      padding: 2px 6px; border-radius: 4px; color: var(--wb-brand-700);
    }
    .CodeMirror {
      flex: 1; height: auto !important; min-height: 480px;
      font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important;
      font-size: 13px; line-height: 1.55;
      border: none;
    }
    .CodeMirror-gutters {
      background: var(--wb-gray-50) !important;
      border-right: 1px solid var(--wb-gray-200) !important;
    }
    .CodeMirror-linenumber { color: var(--wb-gray-500) !important; }
    .inject-empty {
      flex: 1; display: grid; place-items: center;
      color: var(--wb-gray-500); font-size: 13px; min-height: 480px;
    }

    .ql-toolbar.ql-snow {
      border: 1px solid var(--wb-gray-300) !important;
      border-radius: var(--radius-sm) var(--radius-sm) 0 0;
      background: var(--wb-gray-50);
    }
    .ql-container.ql-snow {
      border: 1px solid var(--wb-gray-300) !important;
      border-top: none !important;
      border-radius: 0 0 var(--radius-sm) var(--radius-sm);
      min-height: 200px;
      font-family: var(--font);
      font-size: 14px;
    }
    .ql-editor { min-height: 200px; }
    .mode-panel { display: none; }
    .mode-panel.show { display: block; }

    @media (max-width: 960px) {
      .layout { grid-template-columns: 1fr; }
      .side { display: flex; flex-wrap: wrap; gap: 4px; border-right: none; border-bottom: 1px solid var(--wb-gray-200); }
      .nav-item { width: auto; }
      .side-note { display: none; }
      .stats { grid-template-columns: repeat(2, 1fr); }
      .collect-grid { grid-template-columns: 1fr; }
      .form-row { grid-template-columns: 1fr; }
      .form-row label { padding-top: 0; }
      .inject-layout { grid-template-columns: 1fr; }
      .inject-files { min-height: auto; border-right: none; border-bottom: 1px solid var(--wb-gray-200); }
    }
  