/* Den · 工具清架。配色与字体沿用 den-brain.css 的既有语汇：
   正文 #493f47，斜体小字 #b28b9f，标签 #9a89aa，强调 #795c96，衬线 Cormorant Garamond。 */

.den-tools { min-height: 100%; padding: max(22px, env(safe-area-inset-top)) 8px 130px; max-width: 360px; margin: 0 auto; overflow: auto; }

/* 顶部计数条 */
.dt-sum {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px;
  margin: 4px 2px 16px; padding: 13px 15px;
  border: 1px solid rgba(137, 104, 166, .16); border-radius: 22px;
  background: rgba(255, 255, 255, .72); box-shadow: 0 18px 44px rgba(77, 53, 98, .08);
  backdrop-filter: blur(18px);
}
.dt-sum b { display: block; font: 600 27px/1 Cormorant Garamond, serif; color: #493f47; }
.dt-sum small { display: block; margin-top: 4px; color: #9a89aa; font-size: 10px; letter-spacing: .18em; }
.dt-sum-note { max-width: 46%; color: #b28b9f; font: italic 10.5px/1.45 Cormorant Garamond, serif; text-align: right; }

/* 分组 */
.dt-group { margin-bottom: 4px; border-bottom: 1px solid rgba(137, 104, 166, .1); }
.dt-group:last-child { border-bottom: 0; }

.dt-head {
  display: grid; grid-template-columns: auto 1fr auto auto 18px; align-items: center; gap: 8px;
  width: 100%; padding: 8px 6px; border: 0; background: transparent; text-align: left; color: #493f47;
}
.dt-head b { display: block; font-size: 16px; font-weight: 520; }
.dt-head small { display: block; margin-top: 3px; color: #b28b9f; font: italic 10.5px Cormorant Garamond, serif; letter-spacing: .12em; }
.dt-head i { font-size: 18px; font-style: normal; color: #b38b9f; transition: transform .18s ease; }
.dt-group.open .dt-head i { transform: rotate(90deg); }

/* 活性点：绿=通，琥珀=配置了但打不通，灰=未配置 */
.dt-orb { width: 8px; height: 8px; border-radius: 50%; background: #c9bcd4; box-shadow: 0 0 0 3px rgba(201, 188, 212, .18); }
.dt-orb.live { background: #7fb08a; box-shadow: 0 0 0 3px rgba(127, 176, 138, .2); }
.dt-orb.dead { background: #d9a05b; box-shadow: 0 0 0 3px rgba(217, 160, 91, .22); }

.dt-count { color: #9a89aa; font: 11px ui-monospace, monospace; letter-spacing: .08em; }

/* 工具列表 */
.dt-list { padding: 0 4px 12px; }
.dt-group:not(.open) .dt-list { display: none; }

.dt-tool {
  display: grid; grid-template-columns: auto 1fr; gap: 10px;
  width: 100%; margin-top: 4px; padding: 7px 10px;
  border: 1px solid rgba(137, 104, 166, .12); border-radius: 12px; font-size: 13px;
  background: rgba(255, 255, 255, .55); text-align: left; color: #493f47;
}
/* 网格子项默认 min-width:auto，长内容能把格子顶宽 → 整张卡片溢出。压成 0 才让文字去换行。 */
.dt-tool > span:last-child { min-width: 0; }
.dt-tool .dt-num { color: #b38b9f; font: 9.5px ui-monospace, monospace; letter-spacing: .1em; padding-top: 3px; }
.dt-tool code { display: block; font: 12px ui-monospace, monospace; color: #795c96; word-break: break-all; }
.dt-tool p { margin: 5px 0 0; font-size: 11.5px; line-height: 1.5; color: #6b5d6f; overflow-wrap: anywhere; }

/* 参数 */
.dt-args { margin: 7px 0 0; padding: 0; list-style: none; }
.dt-args li { margin-top: 3px; font: 10.5px/1.45 ui-monospace, monospace; color: #8b7d92; overflow-wrap: anywhere; }
.dt-args .dt-req { color: #a8677f; }
.dt-args .dt-type { color: #b0a3b8; }
.dt-args em { color: #9a8fa2; font-style: normal; }

.dt-empty { margin: 8px 4px; color: #b28b9f; font: italic 11px Cormorant Garamond, serif; }

/* 说明 */
.dt-help { margin-top: 18px; padding: 13px 15px; border-radius: 18px; background: rgba(248, 245, 251, .8); }
.dt-help b { font-size: 12px; color: #55455f; }
.dt-help p { margin: 6px 0 0; font-size: 10.5px; line-height: 1.6; color: #8b7d92; }

/* MCP toggle switch */
.dt-toggle-wrap{display:inline-flex;align-items:center;gap:4px;margin-left:auto;margin-right:8px;font-size:12px;cursor:pointer}
.dt-toggle-cb{width:26px;height:15px;appearance:none;-webkit-appearance:none;background:#ccc;border-radius:9px;position:relative;cursor:pointer;transition:background .2s}
.dt-toggle-cb:checked{background:#7c6}
.dt-toggle-cb::after{content:'';position:absolute;top:2px;left:2px;width:11px;height:11px;background:#fff;border-radius:50%;transition:transform .2s}
.dt-toggle-cb:checked::after{transform:translateX(11px)}
.dt-toggle-label{font-size:11px;opacity:.7}

/* Per-tool toggle */
.dt-tool{position:relative}
.dt-tool-toggle{position:absolute;right:8px;top:8px;cursor:pointer}
.dt-tool-cb{width:28px;height:16px;appearance:none;-webkit-appearance:none;background:#ccc;border-radius:8px;position:relative;cursor:pointer;transition:background .2s}
.dt-tool-cb:checked{background:#7c6}
.dt-tool-cb::after{content:'';position:absolute;top:2px;left:2px;width:12px;height:12px;background:#fff;border-radius:50%;transition:transform .2s}
.dt-tool-cb:checked::after{transform:translateX(12px)}
.dt-tool-off{opacity:.45}
