/* 登录与注册 */
.auth-header { border-bottom: 1px solid var(--border); background: var(--card); }
.auth-header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 4.5rem; gap: 1rem; }
.auth-header-actions { display: flex; align-items: center; gap: 0.75rem; }
.auth-header-link { color: var(--muted); font-size: 0.75rem; }
.auth-header-link:hover { color: var(--fg-soft); }
.auth-main { display: flex; align-items: flex-start; justify-content: center; padding: 2.5rem 1.25rem 3rem; }
.auth-box { width: 100%; max-width: 26rem; }
.auth-card { padding: 1.75rem 1.5rem 1.5rem; border: 1px solid var(--border-2); border-radius: 14px; background: var(--card); text-align: center; }
.auth-card .auth-logo { display: flex; align-items: center; justify-content: center; width: 2.875rem; height: 2.875rem; margin: 0 auto 0.75rem; border-radius: 0.75rem; background: var(--primary); color: var(--primary-fg); font-family: var(--font-mono); font-weight: 700; }
.auth-card h1 { font-size: 1.375rem; font-weight: 700; letter-spacing: -0.025em; }
.auth-card .sub { margin-top: 0.3125rem; color: var(--muted); font-size: 0.75rem; }
.auth-form { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1.25rem; text-align: left; }
.auth-form .field { margin: 0; }
.auth-check { margin: 0.125rem 0; }
.auth-submit { min-height: 2.625rem; }
.auth-code-row { display: flex; gap: 0.5rem; }
.auth-code-row .input { flex: 1; min-width: 0; }
.auth-code-row .btn { flex-shrink: 0; }
.auth-note { margin-top: 1rem; padding-top: 0.875rem; border-top: 1px solid var(--border); color: var(--muted-2); font-size: 0.7188rem; }
.auth-note a { color: var(--blue-bright); }
.auth-form .alert { margin: 0; }

@media (min-width: 45em) {
  .user-sidebar {
    width: clamp(184px, 15vw, 208px);
    flex: 0 0 clamp(184px, 15vw, 208px);
  }
  .user-content { flex: 1 1 auto; }
}
.user-profile-card { flex-wrap: nowrap; gap: 0.5625rem; }
.user-profile-card .avatar { width: 40px; height: 40px; font-size: 0.9375rem; }
.user-profile-card .info { flex: 1 1 0; min-width: 0; }
.user-profile-card .info > span { margin-top: 0.125rem; }
.avatar { position: relative; overflow: hidden; }
.avatar-letter { position: relative; z-index: 0; }
.avatar img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
.member-check-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); gap: 0.5rem 1.25rem; }
.field-full { grid-column: 1 / -1; }
@media (max-width: 44em) {
  .user-profile-card,
  .user-sidebar-links { display: none !important; }
  .user-sidebar { margin-bottom: 0.75rem; }
}
.msg-preview {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.6;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.msg-card.is-open .msg-preview { display: none; }
.msg-actions form { display: inline-flex; margin: 0; }
.msg-chevron { transition: transform 0.16s ease; }
.msg-card.is-open .msg-chevron { transform: rotate(180deg); }
.msg-body[hidden] { display: none; }
.article-chevron { transition: transform 0.16s ease; }
.sub-card.is-open .article-chevron { transform: rotate(180deg); }
.article-excerpt { max-height: 24rem; overflow: auto; white-space: pre-wrap; }
.article-actions { display: flex; justify-content: flex-end; padding-top: 0.75rem; }
.user-center-avatar { padding: 0; border: 0; background: transparent; }
/* Markdown 编辑器 */
.md-editor {
  overflow: hidden;
  border: 1px solid var(--border-2);
  border-radius: 9px;
  background: var(--card);
}
.md-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.125rem;
  padding: 0.375rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-soft);
}
.md-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.875rem;
  height: 1.875rem;
  padding: 0 0.4375rem;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  cursor: pointer;
}
.md-tool:hover { background: var(--card-2); color: var(--fg); }
.md-tool svg { display: block; width: 14px; height: 14px; }
.md-tool[hidden] { display: none !important; }
.md-tool.is-on { background: var(--blue-dim); color: var(--blue-bright); }
.md-tool-text { font-family: var(--font-sans); font-size: 0.6875rem; }
.md-tool-sep { width: 1px; height: 1rem; margin: 0 0.1875rem; background: var(--border-2); }
.md-panes { display: block; }
.md-input {
  display: block;
  width: 100%;
  min-height: 22rem;
  padding: 0.875rem 1rem;
  border: 0;
  border-radius: 0;
  background: var(--card);
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.8;
  resize: vertical;
}
.md-input:focus { outline: none; }
.md-preview {
  min-height: 22rem;
  max-height: 32rem;
  padding: 0.875rem 1rem;
  overflow: auto;
  color: var(--fg-soft);
  font-size: 0.8125rem;
  line-height: 1.85;
}
.md-preview h1, .md-preview h2, .md-preview h3 { margin: 1em 0 0.5em; color: var(--fg); }
.md-preview p { margin: 0.625rem 0; }
.md-preview code { padding: 0.125rem 0.3125rem; border-radius: 4px; background: var(--card-2); font-family: var(--font-mono); font-size: 0.75rem; }
.md-preview pre { overflow: auto; margin: 0.75rem 0; padding: 0.75rem; border-radius: 7px; background: var(--card-2); }
.md-preview pre code { padding: 0; background: transparent; }
.md-preview blockquote { margin: 0.75rem 0; padding-left: 0.75rem; border-left: 2px solid var(--border-2); color: var(--muted); }
.md-preview a { color: var(--blue-bright); }
.md-editor.is-preview .md-input { display: none; }
.md-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.3125rem 0.75rem;
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 0.5625rem;
}
.md-editor.is-fullscreen {
  position: fixed;
  z-index: 260;
  inset: 0;
  display: flex;
  flex-direction: column;
  border: 0;
  border-radius: 0;
}
.md-editor.is-fullscreen .md-panes { flex: 1; min-height: 0; overflow: auto; }
.md-editor.is-fullscreen .md-input,
.md-editor.is-fullscreen .md-preview { min-height: 100%; max-height: none; }
body.md-fullscreen-open { overflow: hidden; }
/* 站长认证 */
.claim-method-list { border-top: 0; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
.claim-method-card {
  display: block;
  width: 100%;
  padding: 1rem;
  border: 1px solid var(--border-2);
  border-radius: 9px;
  background: var(--card);
  color: var(--fg-soft);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.16s ease, background-color 0.16s ease;
}
.claim-method-card:hover { border-color: var(--blue); }
.claim-method-card.active { border-color: var(--blue); background: var(--blue-dim); }
.claim-method-card .verify-method-icon { color: var(--blue-bright); }
.claim-method-card strong { display: block; margin-top: 0.375rem; font-size: 0.8125rem; font-weight: 600; }
.claim-method-card p { margin-top: 0.25rem; color: var(--muted); font-size: 0.6875rem; line-height: 1.7; }
.user-row-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.user-center-avatar .avatar { width: 34px; height: 34px; font-size: 0.8125rem; }
.user-center-avatar:hover .avatar { box-shadow: 0 0 0 3px var(--blue-dim); }
.user-sidebar-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem 0.875rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}
.user-sidebar-links a { color: var(--muted-2); font-size: 0.6875rem; }
.user-sidebar-links a:hover { color: var(--fg-soft); }
.user-sidebar-links a:last-child:hover { color: var(--red); }

.mc-card {
  margin: 0 0 1.25rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.mc-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.artcile-title h1,
.mc-card-head h1 {
  font-size: clamp(1.25rem, 1.8vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.025em;
}
.mc-card-desc { color: var(--muted); font-size: 0.7813rem; line-height: 1.8; }
.mc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  min-height: 2.25rem;
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--border-2);
  border-radius: 7px;
  background: var(--card);
  color: var(--fg-soft);
  font-size: 0.75rem;
  line-height: 1;
  white-space: nowrap;
}
.mc-btn:hover { border-color: var(--blue); color: var(--blue-bright); }
.mc-btn-primary { border-color: transparent; background: var(--primary); color: var(--primary-fg); }
.mc-btn-primary:hover { border-color: transparent; background: var(--blue); color: #fff; }
.mc-btn-ghost { background: transparent; }
.mc-form { display: flex; flex-direction: column; gap: 0.875rem; }
.mc-field { display: flex; flex-direction: column; gap: 0.375rem; }
.mc-field > label { color: var(--fg-soft); font-size: 0.7188rem; font-weight: 500; }
.mc-field input, .mc-field textarea, .mc-field select {
  width: 100%;
  min-height: 2.5rem;
  padding: 0.5rem 0.6875rem;
  border: 1px solid var(--border-2);
  border-radius: 7px;
  background: var(--bg-soft);
  color: var(--fg);
  font: inherit;
  font-size: 0.8125rem;
}
.mc-field textarea { min-height: 7rem; resize: vertical; }
.mc-field input:focus, .mc-field textarea:focus, .mc-field select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-dim); }
.mc-check { display: flex; align-items: center; gap: 0.375rem; color: var(--muted); font-size: 0.7188rem; }
.mc-check input { accent-color: var(--blue); }
.mc-group-title { margin-top: 0.25rem; color: var(--muted-2); font-family: var(--font-mono); font-size: 0.625rem; letter-spacing: 0.08em; text-transform: uppercase; }
.mc-list-soft { border-top: 1px solid var(--border); }
.mc-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; padding: 0.875rem 0; border-bottom: 1px solid var(--border); }
.mc-row-title { color: var(--fg-soft); font-size: 0.8125rem; font-weight: 500; line-height: 1.6; }
.mc-row-meta { color: var(--muted); font-size: 0.7188rem; line-height: 1.7; }
.mc-ops { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; flex-shrink: 0; }
.mc-ops a, .mc-ops button { color: var(--blue-bright); font-size: 0.6875rem; background: none; border: 0; padding: 0; cursor: pointer; }
.mc-ops a:hover, .mc-ops button:hover { text-decoration: underline; }
.mc-badge { display: inline-flex; align-items: center; height: 18px; margin-top: 0.3125rem; padding: 0 0.375rem; border-radius: 4px; background: var(--amber-dim); color: var(--amber); font-size: 0.5938rem; }
.mc-badge.is-ok { background: var(--green-dim); color: var(--green); }
.mc-empty { padding: 2rem 1rem; border: 1px dashed var(--border-2); border-radius: 10px; text-align: center; }
.mc-empty-title { color: var(--fg-soft); font-size: 0.875rem; }
.mc-empty-desc { margin-top: 0.375rem; color: var(--muted); font-size: 0.75rem; line-height: 1.7; }
.mc-empty .mc-btn { margin-top: 0.875rem; }
.mc-token { margin-top: 0.625rem; padding: 0.625rem 0.75rem; border: 1px solid var(--border); border-radius: 7px; background: var(--card-2); color: var(--fg-soft); font-family: var(--font-mono); font-size: 0.6875rem; overflow-wrap: anywhere; }
.mc-tips { margin-top: 0.75rem; padding: 0.625rem 0.75rem; border-radius: 7px; background: var(--blue-dim); color: var(--fg-soft); font-size: 0.75rem; line-height: 1.7; }
.mc-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.mc-meta { color: var(--muted); font-size: 0.7188rem; }
.mc-link { color: var(--blue-bright); }
.mc-avatar { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex-shrink: 0; border: 1px solid var(--border); border-radius: 50%; background: var(--card-2); color: var(--fg-soft); font-weight: 600; overflow: hidden; }
.mc-avatar img { width: 100%; height: 100%; object-fit: cover; }
.mc-avatar-edit { display: flex; align-items: center; gap: 0.75rem; }
.mc-avatar-edit input { flex: 1; }
.mc-balance { margin-top: 0.5rem; color: var(--fg); font-family: var(--font-mono); font-size: clamp(1.75rem, 3vw, 2.375rem); font-weight: 600; letter-spacing: -0.04em; }
.mc-auth-links { margin-top: 0.875rem; color: var(--muted); font-size: 0.75rem; }
.mc-auth-links a { color: var(--blue-bright); }
