/* ===== 工具详情页 ===== */
.tool-page { padding-top: 18px; max-width: 900px; }
.back { display: inline-block; color: var(--text-2); font-size: 13px; margin: 6px 0 14px; }
.back:hover { color: var(--text); }
.tp-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.tp-avatar {
  width: 56px; height: 56px; border-radius: 14px; flex: none; display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 24px;
}
.tp-title { flex: 1; min-width: 200px; }
.tp-title h1 { margin: 0; font-size: 26px; display: flex; align-items: center; gap: 8px; }
.tp-sub { display: flex; align-items: center; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.tp-cat { font-size: 13px; color: var(--text-3); }
.badge.new { color: #fff; background: #d85a30; }
.tp-go {
  border: 1px solid var(--accent); background: var(--accent); color: #fff;
  padding: 10px 18px; border-radius: 10px; font-weight: 600; font-size: 14px; flex: none;
}
.tp-go:hover { filter: brightness(1.06); }
.tp-desc { font-size: 15px; color: var(--text); margin: 18px 0 12px; line-height: 1.8; }
.tp-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.tp-actions { display: flex; align-items: center; gap: 12px; margin: 8px 0; }
.vote-btn {
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  padding: 9px 16px; border-radius: 10px; cursor: pointer; font-size: 14px; font-weight: 600;
}
.vote-btn:hover { border-color: var(--accent); color: var(--accent); }
.vote-btn.done { background: var(--free-bg); color: var(--free); border-color: var(--free); }
.vote-count { font-size: 14px; color: var(--text-2); }
.tp-note { font-size: 12px; color: var(--text-3); margin: 4px 0 22px; }

.tp-related { margin: 26px 0; }
.tp-related h2, .tp-comments h2 { font-size: 17px; margin: 0 0 14px; }
.tp-rel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.tp-rel {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px;
}
.tp-rel:hover { border-color: var(--accent-2); }
.tp-rel-name { font-weight: 600; font-size: 14px; }

.tp-comments { margin: 26px 0 40px; }
.cmt-form { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px; }
.cmt-form textarea {
  width: 100%; min-height: 70px; border: 1px solid var(--border); border-radius: 9px;
  background: var(--surface-2); color: var(--text); padding: 10px; font-size: 14px; resize: vertical;
  font-family: inherit; outline: none;
}
.cmt-form textarea:focus { border-color: var(--accent-2); }
.cmt-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.cmt-hint { font-size: 12px; color: var(--text-3); }
#cmtSend {
  border: none; background: var(--accent); color: #fff; padding: 9px 18px; border-radius: 9px;
  font-size: 14px; font-weight: 600; cursor: pointer;
}
#cmtSend:hover { filter: brightness(1.06); }
.cmt-num { font-size: 13px; color: var(--text-3); font-weight: 400; }
.cmt-list { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.cmt-item { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.cmt-text { font-size: 14px; color: var(--text); line-height: 1.7; }
.cmt-meta { font-size: 12px; color: var(--text-3); margin-top: 6px; }
.cmt-empty { color: var(--text-3); font-size: 14px; }
.form-msg { min-height: 16px; font-size: 13px; margin: 8px 0 0; text-align: center; }

@media (max-width: 560px) {
  .tp-head { gap: 12px; }
  .tp-go { width: 100%; text-align: center; }
}
