/*
 * 资讯列表、详情和静态说明页共用这个结构容器。它只负责排版，不是卡片：
 * 让页面底色透出，避免正文周围形成一整块与页面不一致的白色背景。
 * 单条资讯、表单、弹窗等需要表面色的组件各自保留自己的背景规则。
 */
.guide-articles {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 20px;
}

.guide-article-item.is-highlighted h3,
.news-item.is-highlighted h3 {
  color: var(--sun);
}

.guide-status {
  margin: 12px 0;
  color: var(--muted);
  font-size: 14px;
}

.static-page-body {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  color: var(--text);
  line-height: 1.8;
  max-width: 760px;
}

.static-page .section-head {
  align-items: flex-start;
  flex-wrap: wrap;
}

.static-language-control {
  display: inline-grid;
  gap: 6px;
  min-width: 190px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.static-language-control select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  outline: none;
  padding: 0 34px 0 10px;
}

.static-language-control select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(23, 107, 91, 0.12);
}



.static-page-body > p {
  margin: 0;
}

.static-page-section + .static-page-section {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.static-page-section h3 {
  margin: 0 0 8px;
  font-size: 17px;
  letter-spacing: -0.01em;
}

.static-page-section p {
  margin: 0;
  color: var(--text);
}

.contact-page {
  display: grid;
  gap: 18px;
}

.contact-page > p,
.contact-email-note {
  margin: 0;
}

.contact-email-note a {
  color: var(--accent-strong);
  font-weight: 800;
}

.contact-form {
  display: grid;
  gap: 14px;
  width: min(100%, 640px);
}

.contact-form label {
  display: grid;
  gap: 7px;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfa;
  color: var(--text);
  outline: none;
  padding: 0 12px;
  font: inherit;
}

.contact-form input {
  min-height: 44px;
}

.contact-form textarea {
  min-height: 180px;
  padding-block: 12px;
  line-height: 1.7;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(23, 107, 91, 0.12);
}

.contact-form-message {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.contact-form-message.error {
  color: var(--red);
}

.contact-form-message.success {
  color: var(--accent-strong);
}

.contact-form .primary-button {
  width: fit-content;
  min-width: 148px;
}

.profile-page,
.message-compose-page {
  max-width: 720px;
  margin: 0 auto;
}

.profile-card,
.message-compose-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.profile-identity {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.profile-avatar {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
}

.profile-avatar img,
.profile-avatar .user-avatar {
  width: 72px;
  height: 72px;
}

.avatar-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 22, 20, 0.82);
  cursor: zoom-out;
}

.avatar-lightbox-image {
  display: block;
  width: min(420px, 86vw);
  height: min(420px, 86vw);
  max-width: 100%;
  max-height: min(86vh, 86vw);
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-soft);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  cursor: default;
}

.avatar-lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.avatar-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.16);
}

.avatar-lightbox-close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.profile-card h2 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -0.01em;
}

.profile-fields {
  display: grid;
  gap: 12px;
  margin: 0;
}

.profile-fields div {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.profile-fields dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.profile-fields dd {
  margin: 0;
  color: var(--text);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.profile-message-toggle[hidden],
.profile-block-toggle[hidden] {
  display: none;
}

.profile-block-toggle {
  border-color: color-mix(in srgb, var(--red) 45%, var(--line));
  color: var(--red);
}

.profile-block-toggle:hover,
.profile-block-toggle.profile-block-toggle-active {
  border-color: var(--red);
  background: color-mix(in srgb, var(--red) 9%, var(--surface));
}

.profile-action-status {
  min-height: 20px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.profile-action-status.error {
  color: var(--red);
}

.profile-action-status.success {
  color: var(--accent-strong);
}

.message-compose-card {
  display: grid;
  gap: 14px;
}

.message-chat-card {
  min-height: min(72vh, 720px);
  grid-template-rows: auto auto minmax(280px, 1fr) auto auto auto;
}

.message-compose-card h2 {
  margin: 0;
  font-size: 28px;
}

.profile-back,
.message-compose-back {
  width: fit-content;
}

.profile-back {
  margin-bottom: 8px;
}

.message-chat-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.message-chat-peer {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.message-chat-peer-avatar {
  flex: 0 0 auto;
  display: inline-grid;
  width: 48px;
  height: 48px;
}

.message-chat-peer-avatar .user-avatar,
.message-chat-peer-avatar img {
  width: 48px;
  height: 48px;
}

.message-chat-peer > div {
  min-width: 0;
}

.message-compose-recipient {
  margin: 2px 0 0;
  color: var(--muted);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.message-chat-thread {
  display: grid;
  align-content: end;
  gap: 12px;
  min-height: 280px;
  max-height: min(52vh, 520px);
  overflow-y: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  scroll-behavior: smooth;
}

.message-chat-empty {
  align-self: center;
  justify-self: center;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.message-chat-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.message-chat-row.is-mine {
  justify-content: flex-end;
  flex-direction: row-reverse;
}

.message-chat-row.is-mine .message-chat-bubble-wrap {
  justify-items: end;
  align-items: end;
}

.message-chat-avatar {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
}

.message-chat-bubble-wrap {
  display: grid;
  gap: 4px;
  justify-items: start;
  max-width: min(82%, 440px);
  min-width: 0;
}

.message-chat-bubble {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.message-chat-row.is-mine .message-chat-bubble {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.message-chat-bubble-wrap time {
  color: var(--muted);
  font-size: 12px;
}

.message-compose-card label {
  display: grid;
  gap: 6px;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.message-compose-card textarea {
  width: 100%;
  min-height: 84px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  color: var(--text);
  outline: none;
  padding: 10px 12px;
  font: inherit;
  resize: vertical;
}

.message-compose-card textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(23, 107, 91, 0.12);
}

.message-compose-card textarea:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.message-compose-status {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.message-compose-status.error {
  color: var(--red);
}

.message-compose-status.success {
  color: var(--accent-strong);
}

.message-compose-actions {
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 620px) {
  .message-chat-card {
    min-height: calc(100vh - 160px);
  }

  .message-chat-toolbar {
    align-items: flex-start;
  }

  .message-chat-thread {
    max-height: 48vh;
    padding: 12px;
  }

  .message-chat-bubble-wrap {
    max-width: 88%;
  }
}

.profile-status {
  margin: 16px 0 0;
  color: var(--muted);
}

.notfound-page {
  display: grid;
  place-items: center;
  min-height: min(68vh, 640px);
  padding: 40px 12px 72px;
}

.notfound-card {
  width: min(440px, 100%);
  padding: 40px 32px 36px;
  border: 1px solid color-mix(in srgb, var(--accent) 16%, var(--line));
  border-radius: 18px;
  background:
    radial-gradient(120% 90% at 10% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 55%),
    linear-gradient(180deg, color-mix(in srgb, var(--accent) 4%, var(--surface)), var(--surface));
  box-shadow: 0 22px 48px rgba(23, 107, 91, 0.1);
  text-align: center;
}

.notfound-code {
  margin: 0 0 8px;
  font-family: "Source Han Serif SC", "Noto Serif SC", "Songti SC", "STSong", Georgia, serif;
  font-size: clamp(64px, 12vw, 88px);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.06em;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--sun) 55%, var(--accent)));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.notfound-card h2 {
  margin: 0 0 10px;
  font-size: clamp(24px, 3.4vw, 30px);
  letter-spacing: -0.02em;
}

.notfound-card > p {
  margin: 0 0 26px;
  color: var(--muted);
  line-height: 1.7;
}

.notfound-home {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 148px;
  text-decoration: none;
}

.guide-article-list {
  display: block;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.guide-article-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
  align-content: start;
  padding: 16px 2px;
  background: transparent;
  color: inherit;
  text-decoration: none;
}

.guide-article-item.has-thumbnail {
  grid-template-columns: minmax(0, 1fr) clamp(108px, 18vw, 172px);
  align-items: center;
  gap: 14px;
}

.guide-article-item + .guide-article-item {
  border-top: 1px solid var(--line);
}

.guide-article-item[href] {
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.guide-article-item[href]:hover {
  background: var(--surface-soft);
}

.guide-article-item[href]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.guide-article-main {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.guide-article-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 8px;
  background: var(--surface-soft);
}

.guide-article-item h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.4;
}

.guide-article-meta {
  color: var(--muted);
  font-size: 12px;
}

.guide-article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.guide-article-tags span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
  padding: 5px 8px;
}

.guide-more {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

.guide-detail {
  animation: guide-detail-enter 0.45s ease both;
}

@keyframes guide-detail-enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .guide-detail {
    animation: none;
  }
}

.guide-detail-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 22px;
  padding: 6px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  transition: color 0.15s ease;
}

.guide-detail-back:hover {
  color: var(--accent-strong);
}

.guide-detail-header {
  max-width: 720px;
  margin: 0 auto 8px;
}

.guide-detail-title {
  margin: 0 0 14px;
  /* 与资讯列表一致，避免部分桌面端衬线中文字体将【…】组合渲染成白底字形。 */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: -0.02em;
  color: var(--text);
}

.guide-detail-meta {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.guide-detail-byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 14px;
}

.guide-detail-byline > * + *::before {
  content: "·";
  margin-right: 14px;
  color: var(--line);
}

.guide-detail-author {
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.guide-detail-author:hover,
.guide-comment-author:hover {
  color: var(--accent-strong);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.guide-detail-time {
  color: var(--muted);
}

.guide-detail-metric strong {
  color: var(--text);
  font-weight: 700;
}

.guide-detail-reviewed {
  color: var(--accent);
  font-weight: 700;
}

.guide-detail-source a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.guide-detail-source a:hover {
  text-decoration: underline;
}

.guide-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}

.guide-detail-tags button {
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line));
  border-radius: 999px;
  padding: 5px 11px;
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.guide-detail-tags button:hover {
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
  border-color: var(--accent);
}

.guide-detail-cover {
  max-width: 860px;
  margin: 22px auto 28px;
}

.guide-detail-cover img {
  display: block;
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  border-radius: 14px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--accent) 10%, var(--surface-soft)), var(--surface-soft));
  box-shadow: 0 18px 40px rgba(23, 107, 91, 0.12);
}

.guide-detail-footer {
  display: grid;
  gap: 16px;
  max-width: 720px;
  margin: 36px auto 0;
  padding: 22px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--accent) 5%, var(--surface)), var(--surface));
}

.guide-detail-like-row {
  display: flex;
  justify-content: center;
  width: 100%;
}

.guide-like-feedback {
  margin: -6px 0 0;
  text-align: center;
  color: #c0392b;
  font-size: 13px;
}

.guide-like-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 11px 22px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(43, 54, 50, 0.06);
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.guide-like-button:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.guide-like-button.active {
  border-color: #e25555;
  background: #fff1f1;
  color: #d64545;
}

.guide-like-button:disabled {
  opacity: 0.6;
  cursor: wait;
}

.guide-like-icon {
  font-size: 16px;
  line-height: 1;
}

.guide-like-count {
  min-width: 1.5em;
  text-align: center;
}

.guide-detail-share {
  text-align: center;
}

.guide-detail-share-label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.guide-detail-share-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.share-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 12px;
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.share-chip:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
}

.guide-share-tip {
  margin: 10px 0 0;
  color: var(--accent-strong);
  font-size: 13px;
}

.guide-detail-section {
  max-width: 720px;
  margin: 36px auto 0;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.guide-detail-section-head {
  margin-bottom: 16px;
}

.guide-detail-section-head h2 {
  margin: 0 0 4px;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.guide-detail-section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.guide-detail-count {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.guide-related-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.guide-related-list li {
  min-width: 0;
}

.guide-related-link {
  color: var(--accent-strong);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.55;
  overflow-wrap: anywhere;
  text-decoration: none;
  text-underline-offset: 0.18em;
}

.guide-related-link:hover {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: currentColor;
}

.guide-related-link:visited {
  color: color-mix(in srgb, var(--accent-strong) 72%, var(--muted));
}

.guide-related-link:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 72%, transparent);
  outline-offset: 3px;
  border-radius: 3px;
  text-decoration: underline;
  text-decoration-color: currentColor;
}

.guide-comment-login,
.guide-comment-form {
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 4%, var(--surface)), var(--surface-soft));
}

.guide-comment-login p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
}

.guide-comment-form textarea,
.guide-comment-reply-form textarea {
  width: 100%;
  height: 132px;
  resize: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  font: inherit;
  background: var(--surface);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.guide-comment-form textarea:focus,
.guide-comment-reply-form textarea:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}

.guide-comment-form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}

.guide-comment-submit-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.guide-comment-user {
  color: var(--muted);
  font-size: 12px;
}

.guide-comment-mention {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 8px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
}

.guide-comment-mention button {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: currentColor;
  cursor: pointer;
  font: inherit;
}

.guide-comment-mention button:hover {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
}

.guide-comment-mention-button {
  min-width: 42px;
  padding-inline: 12px;
  font-weight: 900;
}

.guide-comment-text {
  margin: 0;
}

.guide-comment-mentioned-user {
  color: var(--accent-strong);
  font-weight: 900;
  text-decoration: none;
}

.guide-comment-mentioned-user:hover {
  text-decoration: underline;
}

.guide-comment-message {
  margin: 10px 0 0;
  font-size: 13px;
}

.guide-comment-message.error {
  color: #c0392b;
}

.guide-comment-message.success {
  color: var(--accent-strong);
}

.guide-comment-list {
  display: grid;
  gap: 14px;
}

.guide-comment-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.guide-comment-replies-pagination {
  justify-content: flex-start;
  margin-top: 10px;
  padding-top: 10px;
}

.guide-comment-replies-pagination .guide-comment-page {
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.guide-comment-page {
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.guide-comment-page:hover:not(:disabled):not(.active) {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.guide-comment-page.active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  color: var(--accent-strong);
}

.guide-comment-page:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.guide-comment-item {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.guide-comment-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-bottom: 6px;
}

.guide-comment-avatar {
  width: 28px;
  height: 28px;
}

.guide-comment-reply .guide-comment-avatar {
  width: 20px;
  height: 20px;
}

.guide-comment-head strong {
  font-size: 14px;
}

.guide-comment-author {
  color: var(--text);
  text-decoration: none;
}

.guide-comment-head time {
  color: var(--muted);
  font-size: 12px;
}

.guide-comment-reply-to {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.guide-comment-item p,
.guide-comment-reply p {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.75;
  white-space: pre-wrap;
}

.guide-comment-text-blocked {
  color: var(--muted);
}

.guide-comment-text-blocked em {
  font-style: italic;
}

/* 回复区：一条左侧细线 + 间距，不再套卡片边框 */
.guide-comment-replies {
  display: grid;
  gap: 0;
  margin-top: 12px;
  margin-left: 2px;
  padding-left: 14px;
  border-left: 2px solid color-mix(in srgb, var(--line) 70%, var(--accent) 30%);
}

/* 二层及更深回复：不再继续缩进，避免层层嵌套挤成窄条 */
.guide-comment-reply .guide-comment-replies {
  margin-top: 0;
  margin-left: 0;
  padding-left: 0;
  border-left: none;
}

.guide-comment-reply-list {
  display: grid;
  gap: 0;
}

.guide-comment-reply {
  padding: 12px 0;
  border: none;
  border-radius: 0;
  background: transparent;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 65%, transparent);
}

.guide-comment-reply:last-child {
  border-bottom: none;
  padding-bottom: 4px;
}

.guide-comment-reply:first-child {
  padding-top: 2px;
}

.guide-comment-reply-composer {
  margin-top: 10px;
  margin-bottom: 4px;
}

.guide-comment-reply-form {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}

.guide-comment-reply-form textarea {
  height: 118px;
}

.guide-comment-reply-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.guide-comment-replies-state {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.guide-detail-content {
  max-width: 720px;
  margin: 0 auto;
  color: var(--text);
  font-size: 17px;
  line-height: 1.9;
}

.guide-detail-content :is(div, p, h2, h3, h4, ul, ol, li, span, a, b, strong, em, i, u, s, del, font, caption) {
  background: transparent;
}

.guide-detail-content p {
  margin: 0 0 1.15em;
}

.guide-detail-content h2,
.guide-detail-content h3,
.guide-detail-content h4 {
  margin: 1.6em 0 0.55em;
  font-family: "Source Han Serif SC", "Noto Serif SC", "Songti SC", "STSong", Georgia, serif;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.guide-detail-content h2 {
  font-size: 1.35em;
  padding-bottom: 0.35em;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line));
}

.guide-detail-content h3 {
  font-size: 1.18em;
}

.guide-detail-content h4 {
  font-size: 1.05em;
}

.guide-detail-content ul,
.guide-detail-content ol {
  margin: 0 0 1.15em;
  padding: 0 0 0 1.35em;
}

.guide-detail-content li + li {
  margin-top: 0.35em;
}

.guide-detail-content blockquote {
  margin: 0 0 1.25em;
  padding: 14px 18px;
  border-left: 3px solid var(--accent);
  border-radius: 0 10px 10px 0;
  background: transparent;
  color: color-mix(in srgb, var(--text) 78%, var(--muted));
  font-size: 0.98em;
}

.guide-detail-content hr {
  margin: 2em 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.guide-detail-content code {
  padding: 0.12em 0.4em;
  border-radius: 5px;
  background: var(--surface-soft);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", "Noto Sans Mono CJK SC", monospace;
  font-size: 0.88em;
}

.guide-detail-content pre {
  margin: 0 0 1.25em;
  padding: 14px 16px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f3f6f4;
}

.guide-detail-content pre code {
  padding: 0;
  background: transparent;
}

.guide-detail-content table {
  width: 100%;
  margin: 0 0 1.25em;
  border-collapse: collapse;
  font-size: 0.94em;
}

.guide-detail-content th,
.guide-detail-content td {
  padding: 10px 12px;
  border: 1px solid var(--line);
  text-align: left;
}

.guide-detail-content th {
  background: var(--surface-soft);
  font-weight: 700;
}

.guide-detail-content figure {
  margin: 1.5em 0;
}

.guide-detail-content figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.guide-detail-content img,
.guide-detail-content video {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(43, 54, 50, 0.08);
}

.guide-detail-content a {
  color: var(--accent-strong);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent);
  text-underline-offset: 0.18em;
}

.guide-detail-content a:hover {
  text-decoration-color: var(--accent);
}

.guide-detail-content p:last-child {
  margin-bottom: 0;
}

.guide-detail-empty {
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 760px) {
  .guide-article-item.has-thumbnail {
    grid-template-columns: minmax(0, 1fr) clamp(96px, 28vw, 120px);
    gap: 12px;
  }

  .guide-article-thumb {
    max-height: none;
  }

  .guide-detail-title {
    font-size: 26px;
  }

  .guide-detail-content {
    font-size: 16px;
  }

  .guide-detail-cover {
    margin: 18px 0 22px;
  }

  .guide-detail-cover img {
    max-height: 280px;
    border-radius: 12px;
  }

  .guide-detail-footer,
  .guide-detail-section {
    margin-top: 28px;
  }

  .guide-detail-byline > * + *::before {
    margin-right: 10px;
  }
}

.search-results {
  display: grid;
  gap: 18px;
}

.search-results-form {
  margin-bottom: 0;
}

.search-status {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.search-sections {
  display: grid;
  gap: 28px;
}

.search-section-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
}

.search-section-head h3 {
  margin: 0;
  font-size: 18px;
}

.search-section-count {
  color: var(--muted);
  font-size: 13px;
}

.search-result-list {
  display: grid;
  gap: 12px;
}

.search-result-item {
  display: grid;
  gap: 8px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.search-result-kicker,
.search-result-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  color: var(--muted);
  font-size: 12px;
}

.search-result-type {
  color: var(--accent);
  font-weight: 700;
}

.search-result-title {
  width: fit-content;
  color: var(--ink);
  font-size: 18px;
  font-weight: 750;
  line-height: 1.45;
  text-decoration: none;
}

.search-result-title:hover {
  color: var(--accent);
}

.search-result-excerpt {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.7;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

/* 列表卡片互动数据 */
.guide-article-stats {
  display: flex;
  gap: 14px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}

/* 评论举报 */
.guide-comment-foot {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
}

.guide-comment-action,
.guide-comment-report,
.guide-comment-reply-count {
  border: none;
  background: none;
  padding: 2px 4px;
  font-size: 12px;
  color: var(--muted);
  cursor: default;
}

.guide-comment-reply-count {
  font-weight: 700;
}

button.guide-comment-reply-count,
.guide-comment-action,
.guide-comment-report {
  cursor: pointer;
}

.guide-comment-reply-count.disabled {
  cursor: default;
  font-weight: 600;
  opacity: 0.65;
}

.guide-comment-action:hover,
.guide-comment-report:hover,
button.guide-comment-reply-count:hover {
  color: var(--accent-strong);
}

.guide-comment-action:disabled,
.guide-comment-report:disabled {
  cursor: default;
  opacity: 0.7;
}

.guide-comment-report-status {
  color: var(--muted);
  font-size: 12px;
}

body.comment-report-dialog-open,
body.comment-mention-dialog-open,
body.app-dialog-open {
  overflow: hidden;
}

.comment-report-dialog,
.comment-mention-dialog,
.app-dialog {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 22, 20, 0.54);
  backdrop-filter: blur(4px);
}

.comment-report-panel,
.comment-mention-panel,
.app-dialog-panel {
  position: relative;
  width: min(460px, 100%);
  max-height: min(86vh, 640px);
  overflow: auto;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(15, 22, 20, 0.24);
}

.comment-report-panel h2,
.comment-mention-panel h2,
.app-dialog-panel h2 {
  margin: 0 38px 8px 0;
  font-size: 22px;
}

.comment-report-panel p,
.app-dialog-panel p {
  margin-bottom: 18px;
  white-space: pre-line;
}

.comment-report-close,
.comment-mention-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
}

.comment-report-close:hover,
.comment-mention-close:hover {
  color: var(--accent-strong);
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
}

.comment-report-form,
.comment-mention-form,
.app-dialog-form {
  display: grid;
  gap: 12px;
}

.comment-report-form label,
.comment-mention-form label,
.app-dialog-field {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.comment-report-form textarea,
.comment-mention-form input,
.app-dialog-field input,
.app-dialog-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  background: #fbfcfa;
  color: var(--text);
  font: inherit;
  line-height: 1.6;
  outline: none;
}

.comment-report-form textarea,
.app-dialog-field textarea {
  min-height: 132px;
  resize: vertical;
}

.comment-report-form textarea:focus,
.comment-mention-form input:focus,
.app-dialog-field input:focus,
.app-dialog-field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(23, 107, 91, 0.12);
}

.comment-report-meta,
.comment-mention-status {
  display: flex;
  justify-content: flex-end;
  color: var(--muted);
  font-size: 12px;
}

.comment-mention-status.error {
  color: var(--red);
}

.comment-mention-results {
  display: grid;
  gap: 8px;
  min-height: 58px;
  max-height: 260px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.comment-mention-results p {
  margin: 0;
  padding: 8px;
  color: var(--muted);
  font-size: 13px;
}

.comment-mention-result {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  font-weight: 800;
}

.comment-mention-result:hover,
.comment-mention-result:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
  outline: none;
}

.comment-mention-avatar {
  width: 28px;
  height: 28px;
}

.comment-report-actions,
.comment-mention-actions,
.app-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 2px;
  flex-wrap: wrap;
}

.guide-comment-target {
  animation: comment-target-pulse 2.4s ease-out;
}

@keyframes comment-target-pulse {
  0%,
  100% {
    box-shadow: none;
  }

  12%,
  70% {
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
    border-color: color-mix(in srgb, var(--accent) 58%, var(--line));
    background: color-mix(in srgb, var(--accent) 7%, var(--surface));
  }
}

@media (max-width: 560px) {
  .my-notification-item {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .my-notification-item > button {
    width: 100%;
  }

  .comment-report-dialog,
  .comment-mention-dialog,
  .app-dialog {
    align-items: end;
    padding: 12px;
  }

  .comment-report-panel,
  .comment-mention-panel,
  .app-dialog-panel {
    width: 100%;
    max-height: calc(100vh - 24px);
    padding: 20px;
  }

  .comment-report-actions,
  .comment-mention-actions,
  .app-dialog-actions {
    grid-template-columns: 1fr 1fr;
    display: grid;
  }

  .app-dialog-actions-single {
    grid-template-columns: 1fr;
  }
}
