/* 漾程 · 新 UI 通用组件样式（AI 助手、评论、账号入口） */

/* ── 顶部账号入口 ── */
.yc-account {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: 6px;
  font-size: 0.8rem;
}
.yc-account a {
  color: inherit;
  text-decoration: none;
  opacity: 0.85;
}
.yc-account a:hover { opacity: 1; text-decoration: underline; }
.yc-account .yc-account-name { font-weight: 700; }

/* ── AI 助手 ── */
.yc-ai-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 9000;
  width: 58px;
  height: 58px;
  padding: 0;
  overflow: hidden;
  border-radius: 50%;
  border: 2px solid #fff;
  cursor: pointer;
  background: #fff;
  color: #fff;
  font-size: 22px;
  box-shadow: 0 12px 30px rgba(24, 32, 30, 0.28);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.yc-ai-fab img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.yc-ai-fab:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(24, 32, 30, 0.34); }

.yc-ai-panel {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 9001;
  width: min(380px, calc(100vw - 32px));
  height: min(560px, calc(100vh - 140px));
  display: none;
  flex-direction: column;
  overflow: hidden;
  border-radius: 16px;
  background: #fffdf8;
  border: 1px solid rgba(47, 111, 99, 0.25);
  box-shadow: 0 24px 60px rgba(24, 32, 30, 0.28);
  font-family: inherit;
}
.yc-ai-panel.open { display: flex; }
.yc-ai-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: #f1ece1;
  border-bottom: 1px solid rgba(47, 111, 99, 0.18);
}
.yc-ai-head strong { display: block; font-size: 0.95rem; }
.yc-ai-head small { color: #6b7a74; font-size: 0.72rem; }
.yc-ai-close {
  border: none;
  background: transparent;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: #3c4b46;
}
.yc-ai-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #faf7f0;
}
.yc-ai-msg { max-width: 86%; padding: 10px 13px; border-radius: 14px; font-size: 0.84rem; line-height: 1.65; word-break: break-word; }
.yc-ai-line { display: flex; align-items: flex-end; gap: 8px; }
.yc-ai-line.user { justify-content: flex-end; }
.yc-ai-avatar { flex: 0 0 30px; width: 30px; height: 30px; border-radius: 50%; object-fit: cover; background: #fff; border: 1px solid rgba(47, 111, 99, 0.25); }
.yc-ai-msg.user { align-self: flex-end; background: #2f6f63; color: #fff; border-bottom-right-radius: 4px; }
.yc-ai-msg.bot { align-self: flex-start; background: #fff; border: 1px solid rgba(47, 111, 99, 0.16); border-bottom-left-radius: 4px; }
.yc-ai-msg.bot a { color: #2f6f63; }
.yc-ai-msg p { margin: 0 0 8px; }
.yc-ai-msg p:last-child { margin-bottom: 0; }
.yc-ai-msg ul, .yc-ai-msg ol { margin: 0 0 8px; padding-left: 1.3rem; }
.yc-ai-msg code { background: rgba(47, 111, 99, 0.1); padding: 1px 4px; border-radius: 4px; font-family: monospace; font-size: 0.78rem; }
.yc-ai-thinking { color: #6b7a74; font-style: italic; }
.yc-ai-foot { display: flex; gap: 8px; padding: 12px; border-top: 1px solid rgba(47, 111, 99, 0.16); background: #fffdf8; }
.yc-ai-foot textarea {
  flex: 1;
  resize: none;
  min-height: 38px;
  max-height: 96px;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid rgba(47, 111, 99, 0.28);
  font: inherit;
  font-size: 0.84rem;
}
.yc-ai-foot button {
  border: none;
  border-radius: 10px;
  padding: 0 16px;
  background: #2f6f63;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.yc-ai-foot button:disabled { opacity: 0.5; cursor: default; }
.yc-ai-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.yc-ai-quick button {
  border: 1px solid rgba(47, 111, 99, 0.3);
  background: #fff;
  color: #2f6f63;
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 0.75rem;
  cursor: pointer;
}
.yc-ai-quick button:hover { background: rgba(47, 111, 99, 0.08); }

/* ── 评论区 ── */
.yc-comments { margin: 40px 0 10px; font-size: 0.9rem; }
.yc-comments h2 { font-size: 1.4rem; margin: 0 0 16px; }
.yc-comments .yc-comment-form { display: flex; flex-direction: column; gap: 9px; margin-bottom: 18px; }
.yc-comments textarea,
.yc-comments input {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 12px;
  border-radius: 9px;
  border: 1px solid rgba(47, 111, 99, 0.28);
  font: inherit;
  font-size: 0.85rem;
}
.yc-comments textarea { min-height: 76px; resize: vertical; }
.yc-comments .yc-auth-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 9px; }
.yc-comments button {
  align-self: flex-start;
  border: none;
  border-radius: 9px;
  padding: 8px 16px;
  background: #2f6f63;
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
}
.yc-comments button.ghost { background: transparent; color: #2f6f63; border: 1px solid rgba(47, 111, 99, 0.4); }
.yc-comments button:disabled { opacity: 0.55; cursor: default; }
.yc-comment { display: flex; gap: 12px; padding: 14px 0; border-top: 1px solid rgba(47, 111, 99, 0.12); }
.yc-comment .yc-avatar {
  flex: 0 0 36px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #2f6f63;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.yc-comment .yc-comment-main { flex: 1; min-width: 0; }
.yc-comment .yc-comment-meta { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.yc-comment .yc-comment-meta b { font-size: 0.88rem; }
.yc-comment .yc-comment-meta span { color: #6b7a74; font-size: 0.75rem; }
.yc-comment .yc-comment-content { margin-top: 4px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.yc-comment .yc-comment-actions { display: flex; gap: 14px; margin-top: 6px; }
.yc-comment .yc-comment-actions button { padding: 0; background: none; color: #6b7a74; font-weight: 500; }
.yc-comment .yc-comment-actions button:hover { color: #2f6f63; }
.yc-comment .yc-replies { margin-top: 8px; padding-left: 14px; border-left: 2px solid rgba(47, 111, 99, 0.14); }
.yc-comments .yc-error { color: #b3261e; font-size: 0.82rem; }
.yc-comments .yc-empty { color: #6b7a74; padding: 18px 0; }
.yc-comments .yc-posted-as { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.yc-comments .yc-auth-box { padding: 14px; border: 1px dashed rgba(47, 111, 99, 0.35); border-radius: 12px; margin-bottom: 16px; }
.yc-comments .yc-auth-box .yc-auth-actions { display: flex; gap: 9px; margin-top: 10px; }
.yc-comments .yc-auth-box .yc-auth-actions button { align-self: auto; }

/* ── 活动详情里的元信息 ── */
.yc-event-meta { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 20px 0 8px; color: #4a5a54; font-size: 0.9rem; }
.yc-event-meta b { color: #18201e; }
.yc-event-cover { width: 100%; max-height: 52vh; object-fit: cover; border-radius: 14px; margin-top: 26px; }
.yc-article-body { line-height: 1.85; color: #26332e; }
.yc-article-body img { max-width: 100%; height: auto; border-radius: 10px; }
.yc-article-body h1, .yc-article-body h2, .yc-article-body h3 { line-height: 1.3; }
.yc-town-cover { width: 100%; max-height: 46vh; object-fit: cover; border-radius: 14px; margin: 18px 0 6px; }
.town-card .yc-town-cover-img { margin: -28px -28px 16px; width: calc(100% + 56px); height: 150px; object-fit: cover; display: block; }
.yc-data-note { font-size: 0.78rem; color: #6b7a74; margin-top: 8px; }

@media (max-width: 700px) {
  .yc-ai-fab { right: 14px; bottom: 14px; }
  .yc-ai-panel { right: 8px; bottom: 80px; }
}
