/* 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;
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

/* 磨砂卡片共用 */
.dt-frost {
  background: rgba(255, 255, 255, .42);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, .55);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .08), inset 0 1px 0 rgba(255, 255, 255, .55);
}

/* 顶部计数条 */
.dt-sum {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px;
  margin: 4px 2px 14px; padding: 13px 15px;
  border-radius: 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; }

/* 分组 · 1×1 方形按钮网格（明细单独在网格下方，不插进格子中间） */
.dt-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin: 0 2px;
  align-items: start;
}

.dt-head {
  aspect-ratio: 1 / 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  padding: 10px 8px 8px;
  border: 0;
  border-radius: 14px;
  text-align: left;
  color: #493f47;
  cursor: pointer;
  position: relative;
  box-sizing: border-box;
}
.dt-head:active { transform: scale(.98); }
.dt-head.open {
  background: rgba(255, 255, 255, .55);
  border-color: rgba(255, 255, 255, .7);
}

.dt-head-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 6px;
}
.dt-head-text { min-width: 0; flex: 1; }
.dt-head b {
  display: block;
  font-size: 12.5px;
  font-weight: 560;
  line-height: 1.25;
  word-break: break-word;
}
.dt-head small {
  display: block;
  margin-top: 4px;
  color: #b28b9f;
  font: italic 9px/1.3 Cormorant Garamond, serif;
  letter-spacing: .06em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}
.dt-head-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 4px;
  margin-top: auto;
}
.dt-head i {
  font-size: 16px;
  font-style: normal;
  color: #b38b9f;
  transition: transform .18s ease;
  line-height: 1;
}
.dt-head.open i { transform: rotate(90deg); }

/* 活性点：绿=通，琥珀=配置了但打不通，灰=未配置 */
.dt-orb {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  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-detail {
  grid-column: 1 / -1;
  margin: 2px 0 4px;
  padding: 10px 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-radius: 16px;
}
.dt-detail[hidden] { display: none !important; }

.dt-tool {
  display: grid; grid-template-columns: auto 1fr; gap: 8px;
  width: 100%; padding: 10px 12px;
  border-radius: 14px; font-size: 13px;
  background: rgba(255, 255, 255, .35);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  backdrop-filter: blur(10px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, .5);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .05), inset 0 1px 0 rgba(255, 255, 255, .45);
  text-align: left; color: #493f47;
  position: relative;
  box-sizing: border-box;
}
.dt-tool > span:last-child { min-width: 0; padding-right: 36px; }
.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: 14px; margin-left: 2px; margin-right: 2px;
  padding: 13px 15px; border-radius: 18px;
}
.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: 3px;
  font-size: 11px; cursor: pointer; flex-shrink: 0;
}
.dt-toggle-cb{
  width: 26px; height: 15px; appearance: none; -webkit-appearance: none;
  background: rgba(200,200,200,.55); border-radius: 9px; position: relative;
  cursor: pointer; transition: background .2s; margin: 0;
}
.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:10px; opacity:.7; color:#6b5d6f}

/* Per-tool toggle */
.dt-tool-toggle{position:absolute;right:8px;top:8px;cursor:pointer}
.dt-tool-cb{
  width:28px; height:16px; appearance:none; -webkit-appearance:none;
  background:rgba(200,200,200,.55); border-radius:8px; position:relative;
  cursor:pointer; transition:background .2s; margin:0;
}
.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}
