  :root {
    --brand: #3a7bbf;
    --brand-dark: #2f6aa6;
    --text: #1a1a1a;
    --muted: #5f6368;
    --border: #e3e5e8;
    --dash: #c9ccd1;
    --surface: #ffffff;
    --soft: #f8f9fb;
    --ok: #1e8e3e;
    --warn: #b06000;
    --err: #c5221f;
  }
  * { box-sizing: border-box; }
  body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text);
    background: var(--surface);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
  }
  header, footer { background: var(--brand); color: #fff; }
  header .inner {
    max-width: 1400px; margin: 0 auto; padding: 18px 32px;
    display: flex; align-items: center; justify-content: space-between;
  }
  .brand { display: flex; align-items: center; gap: 14px; font-size: 26px; font-weight: 700; }
  .brand .logo {
    width: 40px; height: 40px; border-radius: 8px; background: #fff; color: var(--brand);
    display: grid; place-items: center; font-size: 20px;
  }
  .help { color: #fff; text-decoration: none; font-size: 15px; cursor: pointer; }
  main { flex: 1; padding: 40px 32px; }
  .card {
    max-width: 1400px; margin: 0 auto; border: 1px solid var(--border); border-radius: 10px;
    padding: 28px 24px;
  }
  h1 { margin: 0 0 6px; font-size: 28px; }
  .subtitle { margin: 0 0 32px; color: var(--muted); }
  .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
  h2 { font-size: 19px; font-weight: 500; margin: 0 0 18px; }
  .label { display: block; font-size: 15px; margin: 0 0 8px; }
  .drop {
    border: 2px dashed var(--dash); border-radius: 8px; background: var(--soft);
    padding: 26px 16px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s;
  }
  .drop:hover, .drop.drag { border-color: var(--brand); background: #f0f6fc; }
  .drop svg { color: var(--muted); }
  .drop .main { margin: 10px 0 6px; color: var(--muted); }
  .drop .main b { color: #4a4f55; }
  .drop .hint { font-size: 13px; color: var(--muted); }
  .drop .file { margin-top: 8px; font-weight: 600; color: var(--brand); word-break: break-all; }
  .stepper { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 0; margin: 0 0 28px; counter-reset: none; }
  .stepper li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--soft); color: var(--muted); font-size: 14px; cursor: not-allowed; }
  .stepper li .num { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #e3e5e8; color: var(--muted); font-weight: 600; flex-shrink: 0; }
  .stepper li.reachable { cursor: pointer; color: var(--text); background: #fff; }
  .stepper li.done .num { background: var(--ok); color: #fff; }
  .stepper li.active { border-color: var(--brand); background: #f0f6fc; color: var(--brand); font-weight: 600; }
  .stepper li.active .num { background: var(--brand); color: #fff; }
  .step-intro { margin: -8px 0 20px; color: var(--muted); font-size: 14px; }
  .step-panel h3 { font-size: 15px; font-weight: 600; margin: 22px 0 10px; }
  .step-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--border); }
  .step-reason { color: var(--muted); font-size: 13px; flex: 1; text-align: right; }
  .btn-next { padding: 11px 22px; border: none; border-radius: 6px; background: var(--brand); color: #fff; font-size: 15px; cursor: pointer; font-family: inherit; }
  .btn-next:hover:not(:disabled) { background: var(--brand-dark); }
  .btn-next:disabled { opacity: .45; cursor: not-allowed; }
  .btn-back { padding: 10px 16px; border: 1px solid var(--border); border-radius: 6px; background: #fff; color: var(--text); font-size: 14px; cursor: pointer; font-family: inherit; }
  .btn-back:disabled { opacity: .45; cursor: not-allowed; }
  .field input[readonly] { background: var(--soft); color: var(--muted); }
  .summary { border: 1px solid var(--border); border-radius: 8px; background: var(--soft); padding: 14px 18px; margin-bottom: 22px; font-size: 14px; line-height: 1.8; }
  .summary b { display: inline-block; min-width: 130px; color: var(--muted); font-weight: 500; }
  .advanced { margin-top: 6px; font-size: 14px; }
  .advanced summary { cursor: pointer; color: var(--muted); margin-bottom: 10px; }
  .hint-text { font-size: 13px; color: var(--brand); margin-top: 10px; }
  .builder { border: 1px solid var(--border); border-radius: 8px; padding: 20px; background: #fbfcfe; }
  .builder h3 { font-size: 15px; font-weight: 600; margin: 22px 0 10px; }
  .builder-intro { margin: -8px 0 0; color: var(--muted); font-size: 14px; }
  .pickers { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
  .picker { border: 1px solid var(--border); border-radius: 8px; background: #fff; padding: 12px; }
  .picker-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 8px; }
  .picker-head b { font-size: 14px; }
  .picker-head span { font-size: 12px; color: var(--muted); white-space: nowrap; }
  .picker input[type=search] { width: 100%; padding: 7px 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; font-family: inherit; }
  .pick-actions { font-size: 13px; color: var(--muted); margin: 6px 0; }
  .pick-actions .link-btn { margin: 0; font-size: 13px; }
  .pick-list { max-height: 220px; overflow: auto; border-top: 1px solid var(--border); padding-top: 6px; }
  .pick-list label, .role-list label { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 3px 2px; cursor: pointer; }
  .role-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 2px 16px; }
  .role-list small { color: var(--muted); }
  .free-text { font-size: 13px; color: var(--warn); }
  .builder-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 8px; font-size: 14px; }
  .builder-foot b { color: var(--brand); }
  .drop-sm { padding: 14px 12px; }
  .drop-sm .main { margin: 0; font-size: 14px; }
  .warn-text { display: block; color: var(--warn) !important; margin-top: 4px; }
  .link-btn {
    background: none; border: none; color: var(--brand); padding: 0; margin-top: 10px;
    font-size: 14px; cursor: pointer; text-decoration: underline;
  }
  .field { margin-bottom: 14px; }
  .field input {
    width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px;
    font-size: 14px; font-family: inherit;
  }
  .field input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px #3a7bbf22; }
  .field small { color: var(--muted); font-size: 12px; }
  .toggles { margin-top: 18px; display: grid; gap: 14px; }
  .toggle { display: flex; align-items: center; gap: 14px; cursor: pointer; user-select: none; }
  .toggle input { display: none; }
  .switch {
    width: 50px; height: 28px; border-radius: 14px; background: #e3e5e8; position: relative; flex-shrink: 0;
    transition: background .15s;
  }
  .switch::after {
    content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
    background: #fff; box-shadow: 0 1px 3px #0003; transition: transform .15s;
  }
  .toggle input:checked + .switch { background: var(--brand); }
  .toggle input:checked + .switch::after { transform: translateX(22px); }
  .toggle .desc { display: block; font-size: 12px; color: var(--muted); }
  .section { margin-top: 28px; }
  .chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
  .chip { background: var(--soft); border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px; font-size: 13px; }
  .chip.err { color: var(--err); border-color: #f3c3c2; background: #fdf1f0; }
  .chip.ok { color: var(--ok); border-color: #bfe3c8; background: #eef8f1; }
  .cols { font-size: 13px; color: var(--muted); margin-bottom: 10px; line-height: 1.6; }
  .cols code { background: var(--soft); border: 1px solid var(--border); border-radius: 4px; padding: 1px 6px; color: var(--text); }
  .table-wrap { max-height: 320px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; }
  table { border-collapse: collapse; font-size: 12px; width: 100%; }
  th, td { padding: 6px 10px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
  th { position: sticky; top: 0; background: var(--soft); font-weight: 600; }
  th.contact { color: var(--brand); }
  td.missing { background: #fdf1f0; }
  .issues { color: var(--err); font-size: 13px; margin: 8px 0 0; padding-left: 18px; }
  .primary {
    width: 100%; margin-top: 28px; padding: 15px; border: none; border-radius: 6px;
    background: var(--brand); color: #fff; font-size: 16px; cursor: pointer; font-family: inherit;
  }
  .primary:hover:not(:disabled) { background: var(--brand-dark); }
  .primary:disabled { opacity: .5; cursor: not-allowed; }
  .primary.stop { background: var(--err); }
  .progress { height: 10px; background: var(--soft); border: 1px solid var(--border); border-radius: 5px; overflow: hidden; }
  .progress div { height: 100%; width: 0; background: var(--brand); transition: width .2s; }
  .status-line { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 14px; margin: 10px 0; }
  .log {
    background: #1f2328; color: #e6e6e6; font: 12px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace;
    border-radius: 8px; padding: 12px 14px; max-height: 320px; overflow: auto; white-space: pre-wrap; word-break: break-word;
  }
  .log .ok { color: #7ee2a8; }
  .log .err { color: #ff8a80; }
  .log .warn { color: #ffd479; }
  .actions { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
  .secondary {
    padding: 8px 14px; border: 1px solid var(--brand); color: var(--brand); background: #fff;
    border-radius: 6px; cursor: pointer; font-size: 14px; font-family: inherit;
  }
  .hidden { display: none !important; }
  .banner { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: #eef8f1; border: 1px solid #bfe3c8; color: var(--ok); border-radius: 8px; padding: 12px 16px; margin-bottom: 20px; font-size: 15px; }
  .banner-close { background: none; border: none; color: inherit; font-size: 22px; line-height: 1; cursor: pointer; padding: 0 4px; }
  .guide { background: var(--soft); border: 1px solid var(--border); border-radius: 8px; padding: 16px 20px; font-size: 14px; line-height: 1.6; margin-bottom: 24px; }
  .guide code { background: #fff; border: 1px solid var(--border); border-radius: 4px; padding: 0 5px; }
  footer { text-align: center; padding: 18px; font-size: 15px; }
  @media (max-width: 820px) {
    header .inner { padding: 14px 16px; }
    .brand { font-size: 20px; }
    main { padding: 20px 16px; }
    .grid { grid-template-columns: 1fr; }
    .stepper { grid-template-columns: 1fr 1fr; }
    .stepper li .txt { font-size: 13px; }
  }
  .nav { display: flex; gap: 6px; }
  .nav a { color: #fff; text-decoration: none; font-size: 15px; padding: 7px 14px; border-radius: 6px; opacity: .85; }
  .nav a:hover { background: #ffffff22; opacity: 1; }
  .nav a.current { background: #ffffff2e; opacity: 1; font-weight: 600; }
  .header-right { display: flex; align-items: center; gap: 18px; }
  .list-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 4px 16px; margin: 6px 0 4px; }
  .list-picker label { display: flex; align-items: center; gap: 8px; font-size: 14px; padding: 4px 2px; cursor: pointer; }
  .list-picker small { color: var(--muted); }
  .load-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
  .loaded { font-size: 13px; color: var(--ok); }
  .cc-box { border: 1px solid var(--border); border-radius: 8px; padding: 14px 16px; margin-top: 18px; background: #fbfcfe; }
  .cc-box .desc { display: block; font-size: 12px; color: var(--muted); }
  @media (max-width: 820px) { .nav a { padding: 6px 8px; font-size: 13px; } .header-right { gap: 8px; } }
