/* 平台统一外壳：顶栏 + 登录态 + 登录弹窗
 * 目标：让「导航站」与「互助广场」看起来像同一个产品的两个频道，
 * 并在顶栏统一承载登录态（SSO）。
 */
.pf-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 46px;
  padding: 0 16px;
  background: #ffffff;
  border-bottom: 1px solid #ececf1;
  box-shadow: 0 1px 6px rgba(20, 20, 40, 0.04);
  font-size: 14px;
  position: relative;
  z-index: 50;
}
.pf-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: #1f2330;
  text-decoration: none;
  white-space: nowrap;
}
.pf-brand .pf-dot {
  width: 22px; height: 22px; border-radius: 7px;
  background: linear-gradient(135deg, #5b6cff, #8a5bff);
  color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800;
}
.pf-brand .pf-sub { color: #8a8fa3; font-weight: 600; font-size: 13px; }
.pf-links { display: flex; gap: 2px; margin-left: 14px; flex-wrap: wrap; }
.pf-links a {
  color: #4a4f63; text-decoration: none; padding: 6px 10px; border-radius: 8px;
}
.pf-links a:hover { background: #f2f3f8; color: #1f2330; }
.pf-links a.active { color: #5b6cff; background: #eef0ff; }
.pf-spacer { flex: 1; }
.pf-acct { display: flex; align-items: center; gap: 10px; }
.pf-acct .pf-name { color: #1f2330; font-weight: 600; }
.pf-acct .pf-pts {
  font-size: 12px; color: #8a8fa3; background: #f2f3f8;
  padding: 2px 8px; border-radius: 999px;
}
.pf-btn {
  border: 0; cursor: pointer; font-size: 14px; padding: 7px 14px; border-radius: 9px;
  background: #5b6cff; color: #fff; font-weight: 600;
}
.pf-btn:hover { background: #4a5bef; }
.pf-btn.ghost { background: #f2f3f8; color: #4a4f63; }
.pf-btn.ghost:hover { background: #e7e9f2; }

/* 工具详情页标题栏内嵌的互助入口（hz-panel.js 注入到 .detail-head） */
.hz-inline {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  flex-wrap: wrap;
}
.hz-inline .hz-count { color: var(--text-3); }
.hz-inline .hz-count b { color: var(--theme-color); }
.hz-inline .pf-btn { padding: 7px 14px; font-size: 13px; }
@media (max-width: 680px) {
  .detail-head { flex-wrap: wrap; }
  .hz-inline { flex-basis: 100%; margin-left: 0; order: 3; }
}

/* 导航站页头：当前栏目高亮 */
.header-nav a.active { color: var(--theme-color); font-weight: 600; }

/* 融入导航站页头的账户区（不另起顶栏时使用） */
.pf-acct-inline {
  margin-left: 12px;
  flex-shrink: 0;
}
.pf-acct-inline .pf-btn { padding: 7px 16px; }
@media (max-width: 760px) {
  .pf-acct-inline .pf-name { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .pf-acct-inline .pf-pts { display: none; }
}

/* 登录弹窗 */
.pf-mask {
  position: fixed; inset: 0; background: rgba(20, 22, 40, 0.45);
  display: none; align-items: center; justify-content: center; z-index: 999;
}
.pf-mask.open { display: flex; }
.pf-modal {
  width: 340px; max-width: 92vw; background: #fff; border-radius: 16px;
  padding: 22px 22px 18px; box-shadow: 0 20px 60px rgba(20, 22, 40, 0.25);
}
.pf-modal h3 { margin: 0 0 4px; font-size: 18px; color: #1f2330; }
.pf-modal p.pf-tip { margin: 0 0 14px; font-size: 13px; color: #8a8fa3; }
.pf-field { display: flex; gap: 8px; margin-bottom: 10px; }
.pf-field input {
  flex: 1; border: 1px solid #dfe2ec; border-radius: 10px; padding: 10px 12px;
  font-size: 14px; outline: none; min-width: 0;
}
.pf-field input:focus { border-color: #5b6cff; }
.pf-code-btn { white-space: nowrap; }
.pf-devcode {
  font-size: 12px; color: #d97706; background: #fff7ed; border: 1px dashed #f0b078;
  border-radius: 8px; padding: 6px 10px; margin-bottom: 12px; display: none;
}
.pf-devcode.show { display: block; }
.pf-agree { font-size: 12px; color: #8a8fa3; margin: 4px 0 14px; }
.pf-agree a { color: #5b6cff; text-decoration: none; }
.pf-msg { font-size: 13px; min-height: 18px; margin-bottom: 8px; }
.pf-msg.err { color: #e0413e; }
.pf-msg.ok { color: #18a058; }
.pf-modal .pf-btn { width: 100%; padding: 11px; }
.pf-close {
  position: absolute; top: 10px; right: 14px; border: 0; background: transparent;
  font-size: 20px; color: #aab; cursor: pointer; line-height: 1;
}

/* ================= 工具详情页评论区 ================= */
.cz-panel { margin-bottom: 0; }
.cz-panel > h3 { display: flex; align-items: center; gap: 8px; }
.cz-count { font-size: 12.5px; font-weight: 400; color: var(--text-3); margin-left: 2px; }

.cz-empty {
  color: var(--text-3); font-size: 13.5px; text-align: center;
  padding: 18px 0 6px;
}

.cz-list { margin: 4px 0 0; }
.cz-item { display: flex; gap: 10px; padding: 14px 0; border-top: 1px solid rgba(130, 130, 130, 0.1); }
.cz-item:first-child { border-top: 0; }
.cz-item-reply { padding: 10px 0 0 34px; border-top: 0; }
.cz-item-reply .cz-av { width: 26px; height: 26px; font-size: 12px; }

.cz-av {
  flex: 0 0 32px; width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #eef1f8, #e2e7f3);
  color: #5a6478; font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.cz-body { flex: 1; min-width: 0; }
.cz-meta { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 4px; }
.cz-meta b { color: #2b303b; font-weight: 600; }
.cz-time { color: var(--text-3); font-size: 12px; }
.cz-text { font-size: 14px; line-height: 1.7; color: #3d4149; white-space: pre-wrap; word-break: break-word; }
.cz-acts { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.cz-reply-btn {
  border: 0; background: transparent; padding: 0; cursor: pointer;
  font-size: 12.5px; color: var(--text-3);
}
.cz-reply-btn:hover { color: var(--theme-color); }
.cz-rc { font-size: 12px; color: var(--text-3); }
.cz-del {
  border: 0; background: transparent; padding: 0; cursor: pointer;
  font-size: 12px; color: #c0c4cc; margin-left: auto;
}
.cz-del:hover { color: #d93026; }

.cz-reply-box { margin-top: 10px; }
.cz-reply-box textarea {
  width: 100%; border: 1px solid var(--main-border-color); border-radius: 6px;
  padding: 9px 11px; font-size: 13.5px; line-height: 1.6; resize: vertical;
  font-family: inherit; color: #3d4149; background: #fafbfc; outline: none;
  box-sizing: border-box;
}
.cz-reply-box textarea:focus { border-color: var(--theme-color); background: #fff; }
.cz-reply-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }

.cz-editor { margin-top: 18px; padding-top: 16px; border-top: 1px dashed rgba(130, 130, 130, 0.18); }
.cz-editor-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13.5px; color: #2b303b; margin-bottom: 8px; font-weight: 600;
}
.cz-tip { font-size: 12px; color: var(--text-3); font-weight: 400; }
.cz-editor textarea {
  width: 100%; border: 1px solid var(--main-border-color); border-radius: 6px;
  padding: 11px 13px; font-size: 14px; line-height: 1.7; resize: vertical;
  font-family: inherit; color: #3d4149; background: #fafbfc; outline: none;
  box-sizing: border-box;
}
.cz-editor textarea:focus { border-color: var(--theme-color); background: #fff; }
.cz-editor-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.cz-len { font-size: 12px; color: var(--text-3); }
.cz-btn {
  border: 1px solid transparent; border-radius: 6px; cursor: pointer;
  font-size: 13.5px; padding: 8px 18px; font-family: inherit;
  background: #f2f3f8; color: #5a6069; transition: background .15s, opacity .15s;
}
.cz-btn.primary { background: var(--theme-color); color: #fff; }
.cz-btn.primary:hover:not(:disabled) { background: var(--theme-hover); }
.cz-btn:disabled { opacity: .5; cursor: not-allowed; }
.cz-btn.sm { padding: 6px 14px; font-size: 12.5px; }
.cz-msg { font-size: 12.5px; color: #18a058; margin-top: 8px; min-height: 16px; }
.cz-msg.err { color: #d93026; }
.cz-more { text-align: center; margin-top: 12px; }

@media (max-width: 640px) {
  .cz-item-reply { padding-left: 12px; }
  .cz-editor-head { flex-direction: column; align-items: flex-start; gap: 2px; }
}

/* ================= 社区讨论精选 ================= */
.cz-disc-t {
  font-size: 14px; font-weight: 600; color: #2b303b; margin: 0 0 8px;
  display: flex; align-items: center; gap: 7px;
}
.cz-disc-t::before {
  content: ''; width: 3px; height: 13px; background: var(--theme-color);
  border-radius: 2px; flex: 0 0 3px;
}
.cz-disc { padding: 4px 0 14px; }
.cz-disc.bordered { border-bottom: 1px dashed rgba(130, 130, 130, 0.16); margin-bottom: 14px; }
.cz-disc:last-child { padding-bottom: 0; }
.cz-disc-l { margin: 0 0 8px; padding-left: 2px; list-style: none; }
.cz-disc-l li {
  position: relative; padding-left: 15px; font-size: 13.5px;
  line-height: 1.78; color: #4a5058; margin-bottom: 5px;
}
.cz-disc-l li::before {
  content: ''; position: absolute; left: 3px; top: 10px;
  width: 4px; height: 4px; border-radius: 50%; background: #b9c0cc;
}
.cz-disc-src { font-size: 12px; color: var(--text-3); }
.cz-disc-src a { color: var(--theme-color); text-decoration: none; }
.cz-disc-src a:hover { text-decoration: underline; }
