#tool-body {
    --lt-primary: #4f46e5;
    --lt-primary-dark: #4338ca;
    --lt-soft: #eef2ff;
    --lt-card: #ffffff;
    --lt-border: #e4e8ef;
    --lt-text: #2b3445;
    --lt-muted: #8a94a6;
    --lt-warn: #c2410c;
    --lt-shadow: 0 6px 18px rgba(28, 39, 68, .05);
    color: var(--lt-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  }
  .theme-dark-mode #tool-body {
    --lt-soft: #232842;
    --lt-card: #22242c;
    --lt-border: #343846;
    --lt-text: #e6e8ee;
    --lt-muted: #9aa1b2;
    --lt-warn: #fdba74;
    --lt-shadow: none;
  }

  #tool-body .lt-wrap {
    max-width: 1080px;
    margin: 0 auto;
    padding: 8px 0 36px;
    box-sizing: border-box;
  }
  #tool-body .lt-wrap *,
  #tool-body .lt-wrap *::before,
  #tool-body .lt-wrap *::after { box-sizing: border-box; }
  #tool-body .lt-groups {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
  }
  #tool-body .lt-group {
    flex: 1 1 260px;
    min-width: 0;
    background: var(--lt-card);
    border: 1px solid var(--lt-border);
    border-radius: 12px;
    padding: 12px;
    box-shadow: var(--lt-shadow);
  }
  #tool-body .lt-group.is-off { display: none; }
  #tool-body .lt-head {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
  }
  #tool-body .lt-title {
    font-size: 14px;
    font-weight: 600;
  }
  #tool-body .lt-spacer { flex: 1; }
  #tool-body .lt-icon {
    width: 28px;
    height: 28px;
    padding: 0;
    border-radius: 8px;
    border: 1px solid transparent;
    background: var(--lt-soft);
    color: var(--lt-muted);
    cursor: pointer;
  }
  #tool-body .lt-icon:hover {
    border-color: var(--lt-primary);
    color: var(--lt-primary);
  }
  #tool-body .lt-icon:disabled {
    opacity: .35;
    cursor: not-allowed;
  }
  #tool-body .lt-icon:disabled:hover {
    border-color: var(--lt-border);
    color: var(--lt-muted);
  }
  #tool-body .lt-del:hover {
    border-color: #dc2626;
    color: #dc2626;
  }
  #tool-body .lt-opt {
    min-height: 30px;
    margin-bottom: 8px;
  }
  #tool-body .lt-opt .layui-form-checkbox { margin-top: 0; margin-bottom: 0; }
  #tool-body .lt-group .layui-input-wrap { width: 100%; }
  #tool-body .lt-area {
    min-height: 168px;
    height: 168px;
    resize: vertical;
    line-height: 1.55;
    background: var(--lt-card);
    color: var(--lt-text);
    border-color: var(--lt-border);
  }
  #tool-body .lt-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
    margin-top: 12px;
  }
  #tool-body .lt-field { min-width: 0; max-width: 100%; }
  #tool-body .lt-field-sep { flex: 0 1 180px; }
  #tool-body .lt-field-ex { flex: 1 1 240px; min-width: 0; }
  #tool-body .lt-field .layui-input-wrap { width: 100%; }
  #tool-body .lt-field .layui-input { max-width: 100%; }
  #tool-body .lt-field .layui-input-affix { line-height: 38px; }
  #tool-body .lt-label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    color: var(--lt-muted);
  }
  #tool-body .lt-field .layui-input {
    background: var(--lt-card);
    color: var(--lt-text);
    border-color: var(--lt-border);
  }
  #tool-body .lt-add,
  #tool-body .lt-btn,
  #tool-body .lt-gen {
    height: 38px;
    padding: 0 14px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    border: 1px solid var(--lt-border);
    background: var(--lt-card);
    color: var(--lt-text);
  }
  #tool-body .lt-add {
    border-style: dashed;
    color: var(--lt-primary);
    border-color: var(--lt-primary);
    background: var(--lt-soft);
  }
  #tool-body .lt-add i,
  #tool-body .lt-btn i { margin-right: 6px; }
  #tool-body .lt-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--lt-card);
    border: 1px solid var(--lt-border);
  }
  #tool-body .lt-count {
    font-size: 14px;
    font-weight: 600;
  }
  #tool-body .lt-sub {
    min-height: 18px;
    margin-top: 2px;
    font-size: 12px;
    font-weight: 400;
    color: var(--lt-muted);
  }
  #tool-body .lt-count.is-warn,
  #tool-body .lt-sub.is-warn { color: var(--lt-warn); }
  #tool-body .lt-gen {
    flex: 0 0 auto;
    border-color: var(--lt-primary);
    background: var(--lt-primary);
    color: #fff;
    padding: 0 22px;
  }
  #tool-body .lt-gen:hover { background: var(--lt-primary-dark); }
  #tool-body .lt-gen:disabled {
    opacity: .45;
    cursor: not-allowed;
  }
  #tool-body .lt-result {
    margin-top: 12px;
    padding: 12px;
    border-radius: 12px;
    background: var(--lt-card);
    border: 1px solid var(--lt-border);
  }
  #tool-body .lt-result.is-off { display: none; }
  #tool-body .lt-result-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
  }
  #tool-body .lt-result-n { font-size: 14px; font-weight: 600; }
  #tool-body #lt-output {
    height: 200px;
    min-height: 160px;
    max-height: 420px;
    line-height: 1.6;
    resize: vertical;
    background: var(--lt-card);
    color: var(--lt-text);
    border-color: var(--lt-border);
  }
  @media (max-width: 640px) {
    #tool-body .lt-area { height: 140px; min-height: 140px; }
    #tool-body .lt-tools { flex-direction: column; align-items: stretch; }
    #tool-body .lt-field-sep,
    #tool-body .lt-field-ex,
    #tool-body .lt-add { width: 100%; flex: 1 1 auto; }
    #tool-body .lt-action { align-items: stretch; flex-direction: column; }
    #tool-body .lt-gen { width: 100%; }
    #tool-body .lt-result-bar { flex-wrap: wrap; }
    #tool-body .lt-result-bar .lt-spacer { display: none; }
    #tool-body .lt-result-n { width: 100%; }
    #tool-body .lt-btn { flex: 1; }
  }