html { overflow-y: scroll;}

  /* 保证 hidden 属性始终生效（否则会被 .modal-overlay 等 display 规则覆盖，导致登录弹窗一打开页面就显示） */
  [hidden] { display: none !important; }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
    background: #f6f8fa;
    color: #1f2328;
    line-height: 1.6;
  }
  .wrap { max-width: 820px; margin: 0 auto; padding: 24px 16px 60px; }
  .topbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
  .brand h1 { font-size: 24px; color: #1f2328; }
  .sub { color: #59636e; font-size: 13px; margin-top: 4px; }
  .auth-area { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
  .user-chip {
    font-size: 13px; color: #1f2328; background: #f6f8fa;
    border: 1px solid #d0d7de; border-radius: 999px; padding: 4px 12px; white-space: nowrap;
  }
  .user-box { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
  .user-box-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
  .role-hint { font-size: 11px; color: #6e7781; margin: 0; }
  .tabs { display: flex; gap: 4px; margin-bottom: 16px; border-bottom: 1px solid #d0d7de; }
  .tab {
    background: none; border: none; padding: 8px 14px; font-size: 14px;
    color: #59636e; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
  }
  .tab:hover { color: #1f2328; }
  .tab.active { color: #1f2328; font-weight: 600; border-bottom-color: #f78166; }
  .btn {
    border: 1px solid transparent; border-radius: 6px; padding: 8px 16px;
    font-size: 14px; font-weight: 500; cursor: pointer; line-height: 20px;
    transition: background .15s, border-color .15s;
  }
  .btn-primary { background: #1f883d; border-color: rgba(31,35,40,.15); color: #fff; }
  .btn-primary:hover { background: #1a7f37; }
  .btn-ghost { background: #f6f8fa; border-color: rgba(31,35,40,.15); color: #1f2328; }
  .btn-ghost:hover { background: #f3f4f6; border-color: rgba(31,35,40,.2); }
  .btn-sm { padding: 4px 10px; font-size: 12px; line-height: 18px; }
  .btn-ok { background: #1f883d; color: #fff; }
  .btn-ok:hover { background: #1a7f37; }
  .btn-danger { background: #f6f8fa; border-color: rgba(31,35,40,.15); color: #cf222e; }
  .btn-danger:hover { background: #ffebe9; }
  .btn-edit {
    font-size: 13px; padding: 4px 12px; border-radius: 6px;
    border: 1px solid rgba(31,35,40,.15); color: #0969da; background: #f6f8fa; cursor: pointer;
  }
  .btn-edit:hover { background: #eef1f4; border-color: rgba(31,35,40,.2); }
  .btn-tag {
    font-size: 13px; padding: 4px 10px; border-radius: 6px;
    border: 1px solid rgba(31,35,40,.15); color: #59636e; background: #f6f8fa; cursor: pointer;
  }
  .btn-tag:hover { background: #eef1f4; }
  .btn-del {
    font-size: 13px; padding: 4px 12px; border-radius: 6px;
    border: 1px solid rgba(31,35,40,.15); color: #cf222e; background: #f6f8fa; cursor: pointer;
  }
  .btn-del:hover { background: #ffebe9; }
  .link-btn { background: none; border: none; color: #0969da; cursor: pointer; font-size: 12px; padding: 0 4px; }
  .link-btn:hover { text-decoration: underline; }
  .link-btn.danger { color: #cf222e; }
  .edit-inline { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-left: 6px; }
  .edit-inline textarea {
    padding: 4px 8px; border: 1px solid #d0d7de; border-radius: 6px;
    font-size: 13px; font-family: inherit; color: #1f2328; background: #fff;
  }
  .edit-inline textarea { resize: none; overflow: hidden; min-height: 26px; line-height: 1.4; width: min(620px, 88vw); }
  .edit-inline textarea:focus {
    border-color: #0969da; outline: none; box-shadow: 0 0 0 3px rgba(9,105,218,.3);
  }
  .a-actions { margin-left: 8px; white-space: nowrap; }
  .q-id { color: #59636e; font-weight: 600; margin-right: 4px; }
  .tag {
    display: inline-block; font-size: 11px; color: #0969da; background: #ddf4ff;
    border: 1px solid rgba(9,105,218,.3); border-radius: 999px; padding: 0 8px; margin-left: 4px;
    line-height: 18px; vertical-align: middle; white-space: nowrap;
  }
  .tag-edit { margin-top: 8px; display: flex; gap: 6px; align-items: center; }
  .tag-edit input {
    flex: 1; padding: 5px 10px; border: 1px solid #d0d7de; border-radius: 6px;
    font-size: 13px; font-family: inherit; color: #1f2328;
  }
  .tag-edit input:focus { border-color: #0969da; outline: none; box-shadow: 0 0 0 3px rgba(9,105,218,.3); }
  .toolbar { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 8px; }
  .count-label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #59636e; }
  .count-label input {
    width: 70px; padding: 6px 10px; border: 1px solid #d0d7de; border-radius: 6px;
    font-size: 14px; color: #1f2328; background: #fff;
  }
  .count-label input:focus { border-color: #0969da; outline: none; box-shadow: 0 0 0 3px rgba(9,105,218,.3); }
  .search-row { display: flex; gap: 8px; margin-bottom: 12px; }
  .search-row input {
    flex: 1; padding: 7px 12px; border: 1px solid #d0d7de; border-radius: 6px;
    font-size: 14px; font-family: inherit; color: #1f2328; background: #fff;
  }
  .search-row input:focus { border-color: #0969da; outline: none; box-shadow: 0 0 0 3px rgba(9,105,218,.3); }
  .result-info { text-align: center; color: #6e7781; font-size: 13px; margin-bottom: 16px; min-height: 20px; }
  .q-list { list-style: none; }
  .q-item {
    background: #fff; border: 1px solid #d0d7de; border-radius: 6px;
    padding: 14px 16px; margin-bottom: 10px;
  }
  .q-head { display: flex; align-items: flex-start; gap: 10px; }
  .q-head-actions { display: grid; grid-template-columns: repeat(3, auto); gap: 6px; margin-left: auto; flex-shrink: 0; }
  .q-num {
    flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%;
    background: #ddf4ff; color: #0969da; font-size: 13px; font-weight: 600;
    display: flex; align-items: center; justify-content: center;
  }
  .q-text { flex: 1; font-size: 15px; color: #1f2328; }
  .q-meta { font-size: 12px; color: #6e7781; margin-top: 6px; }
  .q-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
  .btn-toggle {
    font-size: 13px; padding: 4px 12px; border-radius: 6px;
    border: 1px solid rgba(31,35,40,.15); color: #59636e; background: #f6f8fa; cursor: pointer;
  }
  .btn-toggle:hover { background: #eef1f4; border-color: rgba(31,35,40,.2); }
  .btn-append {
    font-size: 13px; padding: 4px 12px; border-radius: 6px;
    border: 1px solid rgba(31,35,40,.15); color: #1f883d; background: #f6f8fa; cursor: pointer;
  }
  .btn-append:hover { background: #dafbe1; }
  .answer-box {
    margin-top: 10px; background: #f6f8fa; border: 1px solid #d0d7de;
    border-radius: 6px; padding: 6px 12px; animation: fadeIn .25s ease;
  }
  .answer-item { padding: 8px 0; }
  .answer-item + .answer-item { border-top: 1px solid #eaeef2; }
  .q-orig { font-size: 12px; color: #59636e; padding: 2px 0 6px; border-bottom: 1px solid #eaeef2; margin-bottom: 6px; }
  .a-content { font-size: 14px; white-space: pre-wrap; overflow-wrap: break-word; word-break: break-word; }
  .pend-text, .nl-text { white-space: pre-wrap; overflow-wrap: break-word; }
  .a-meta { font-size: 12px; color: #59636e; margin-top: 4px; }
  .a-meta .who { color: #0969da; }
  .no-answer { color: #6e7781; font-size: 13px; padding: 6px 0; }
  .append-box { margin-top: 10px; }
  .append-input {
    width: 100%; padding: 7px 12px; border: 1px solid #d0d7de; border-radius: 6px;
    font-family: inherit; font-size: 14px; resize: none; overflow: hidden; min-height: 44px;
    color: #1f2328; background: #fff; line-height: 1.5;
  }
  .append-input:focus { border-color: #0969da; outline: none; box-shadow: 0 0 0 3px rgba(9,105,218,.3); }
  .append-box .btn { margin-top: 8px; }
  .card {
    background: #fff; border: 1px solid #d0d7de; border-radius: 6px;
    padding: 18px; margin-bottom: 20px;
  }
  .card h2 { font-size: 16px; margin-bottom: 12px; color: #1f2328; }
  .form-row { margin-bottom: 10px; }
  .form-row label { display: flex; align-items: flex-start; gap: 6px; margin-bottom: 4px; font-size: 13px; color: #1f2328; }
  .form-row input[type="radio"], .form-row input[type="checkbox"] { width: auto; flex-shrink: 0; margin-top: 3px; }
  .form-row input:not([type="radio"]):not([type="checkbox"]), .form-row textarea {
    width: 100%; padding: 7px 12px; border: 1px solid #d0d7de;
    border-radius: 6px; font-size: 14px; font-family: inherit;
    color: #1f2328; background: #fff;
  }
  .form-row input:not([type="radio"]):not([type="checkbox"]):focus, .form-row textarea:focus {
    border-color: #0969da; outline: none; box-shadow: 0 0 0 3px rgba(9,105,218,.3);
  }
  .form-row input::placeholder, .form-row textarea::placeholder { color: #6e7781; }
  .pw-row { display: flex; gap: 6px; align-items: center; }
  .pw-row input { flex: 1; }
  .pw-toggle {
    flex-shrink: 0; padding: 7px 10px; border: 1px solid #d0d7de; border-radius: 6px;
    background: #f6f8fa; color: #59636e; cursor: pointer; font-size: 13px; line-height: 1.4;
  }
  .pw-toggle:hover { background: #eef1f4; }
  .current-user { font-size: 14px; font-weight: 600; color: #1f2328; }
  .hint { font-size: 12px; color: #6e7781; margin-top: 8px; }
  .status { font-size: 11px; padding: 1px 8px; border-radius: 999px; border: 1px solid transparent; white-space: nowrap; }
  .status.pending { color: #9a6700; background: #fff8c5; border-color: rgba(212,167,44,.4); }
  .status.approved { color: #1a7f37; background: #dafbe1; border-color: rgba(26,127,55,.4); }
  .status.rejected { color: #cf222e; background: #ffebe9; border-color: rgba(207,34,46,.4); }
  .admin-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 0; border-top: 1px solid #eaeef2; }
  .admin-row:first-child { border-top: none; }
  .admin-row .grow { flex: 1; min-width: 200px; }
  .admin-row .content { font-size: 14px; }
  .admin-row .meta { font-size: 12px; color: #6e7781; }
  .admin-row select { padding: 4px 8px; border: 1px solid #d0d7de; border-radius: 6px; font-size: 13px; color: #1f2328; background: #fff; }
  .admin-row select:focus { border-color: #0969da; outline: none; box-shadow: 0 0 0 3px rgba(9,105,218,.3); }
  .mini-item { padding: 6px 0; border-top: 1px solid #eaeef2; font-size: 14px; }
  .mini-item:first-child { border-top: none; }
  .answers-wrap { margin-top: 10px; border-top: 1px solid #eaeef2; }
  .pager { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; margin-top: 12px; }
  .pager-jump { display: inline-flex; gap: 6px; align-items: center; }
  .pager-jump input { width: 70px; padding: 4px 8px; border: 1px solid #d0d7de; border-radius: 6px; font-size: 13px; color: #1f2328; background: #fff; }
  .pager-jump input:focus { border-color: #0969da; outline: none; box-shadow: 0 0 0 3px rgba(9,105,218,.3); }
  .section-title { font-size: 13px; font-weight: 600; color: #59636e; margin: 14px 0 6px; }
  .who { color: #0969da; }
  .cfg-field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
  .cfg-field label { font-size: 13px; color: #1f2328; }
  .cfg-field input, .cfg-field select, .cfg-field textarea {
    width: 100%; padding: 7px 12px; border: 1px solid #d0d7de; border-radius: 6px;
    font-size: 14px; font-family: inherit; color: #1f2328; background: #fff;
  }
  .cfg-field input:focus, .cfg-field select:focus, .cfg-field textarea:focus {
    border-color: #0969da; outline: none; box-shadow: 0 0 0 3px rgba(9,105,218,.3);
  }
  /* 关注 / 分享按钮：hover 不加下划线，改为加粗并变色（其余链接按钮维持下划线样式） */
.link-btn.btn-follow, .link-btn.btn-share { text-decoration: none; font-weight: 400; }
.link-btn.btn-follow:hover, .link-btn.btn-share:hover { text-decoration: none; font-weight: 700; }
.link-btn.btn-follow:hover { color: #d1242f; }   /* 关注：hover 呈红色 */
.link-btn.btn-share:hover { color: #1a7f37; }    /* 分享：hover 呈绿色 */

/* 问答审核页顶部醒目提醒 */
  .review-warn {
    background: #fff8c5; border: 1px solid #d4a72c; color: #7a4f01;
    border-radius: 8px; padding: 12px 16px; margin-bottom: 16px;
    font-size: 14px; line-height: 1.8;
  }
  .review-warn b { color: #cf222e; }
  /* 超级管理页：可折叠卡片（默认收起） */
  .super-card { background: #fff; border: 1px solid #d0d7de; border-radius: 8px; margin-bottom: 12px; overflow: hidden; }
  .super-card > summary {
    cursor: pointer; padding: 12px 16px; font-size: 15px; font-weight: 600;
    color: #1f2328; list-style: none; display: flex; align-items: center; gap: 8px;
    user-select: none;
  }
  .super-card > summary::-webkit-details-marker { display: none; }
  .super-card > summary:hover { background: #f6f8fa; }
  .super-card > summary .chev { font-size: 11px; color: #6e7781; transition: transform .15s; }
  .super-card[open] > summary { border-bottom: 1px solid #eaeef2; }
  .super-card[open] > summary .chev { transform: rotate(90deg); }
  .super-body { padding: 14px 16px 16px; }
  /* 留言相关 */
  .msg-history { max-height: 220px; overflow-y: auto; margin-bottom: 10px; border: 1px solid #eaeef2; border-radius: 6px; padding: 6px 10px; }
  .msg-reply { color: #0969da; font-size: 13px; margin-top: 4px; }
  .msg-reply-box { display: flex; gap: 6px; align-items: flex-start; margin-top: 6px; }
  .msg-reply-box textarea {
    flex: 1; padding: 6px 10px; border: 1px solid #d0d7de; border-radius: 6px;
    font-size: 13px; font-family: inherit; color: #1f2328; resize: none; min-height: 30px;
  }
  .msg-reply-box textarea:focus { border-color: #0969da; outline: none; box-shadow: 0 0 0 3px rgba(9,105,218,.3); }
  .form-row select {
    width: 100%; padding: 7px 12px; border: 1px solid #d0d7de; border-radius: 6px;
    font-size: 14px; font-family: inherit; color: #1f2328; background: #fff;
  }
  .form-row select:focus { border-color: #0969da; outline: none; box-shadow: 0 0 0 3px rgba(9,105,218,.3); }
  footer { text-align: center; color: #6e7781; font-size: 12px; margin-top: 32px; }
  .modal-overlay {
    position: fixed; inset: 0; background: rgba(31,35,40,.5);
    display: flex; align-items: center; justify-content: center; z-index: 100; padding: 16px;
  }
  .modal {
    background: #fff; border: 1px solid #d0d7de; border-radius: 10px;
    padding: 20px; width: min(92vw, 400px); box-shadow: 0 8px 24px rgba(140,149,159,.2);
  }
  .modal h3 { margin-bottom: 12px; }
  .modal-actions { display: flex; flex-wrap: wrap; gap: 8px; }
  .auth-msg { margin-top: 10px; font-size: 13px; min-height: 18px; }
  #toast {
    position: fixed; left: 50%; bottom: 24px; z-index: 99;
    transform: translateX(-50%) translateY(10px);
    background: #1f2328; color: #fff; padding: 9px 18px;
    border-radius: 999px; font-size: 14px; opacity: 0;
    pointer-events: none; transition: all .25s; max-width: 90vw;
  }
  #toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
  @keyframes fadeIn { from { opacity: 0; transform: translateY(-2px); } to { opacity: 1; transform: none; } }
  @media (max-width: 480px) {
    .brand h1 { font-size: 20px; }
    .toolbar .btn { flex: 1; min-width: 0; }
  }

/* 我的关注列表行 */
.follow-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.follow-row .grow { flex: 1; min-width: 200px; }
.follow-row .content { font-size: 14px; }
.follow-row .meta { font-size: 12px; color: #6e7781; }
.btn-follow { cursor: pointer; }

/* 顶部标签页提醒标识（关注/贡献 · 用户管理 · 问答审核） */
.tab { position: relative; }
.tab-badge {
  position: absolute; top: 2px; right: 2px; min-width: 15px; height: 15px;
  padding: 0 4px; border-radius: 8px; background: #e5484d; color: #fff;
  font-size: 10px; line-height: 15px; text-align: center; font-weight: 700;
  box-sizing: border-box; pointer-events: none;
}

/* 我的关注：新回答高亮 / 标识 / 查看答案区 */
.follow-row.new-ans { background: #fff4d6; border-radius: 8px; }
.chip-new {
  display: inline-block; margin-left: 6px; background: #e5484d; color: #fff;
  font-size: 11px; line-height: 16px; padding: 0 6px; border-radius: 8px;
  font-weight: 600; vertical-align: middle;
}
.follow-actions { display: flex; gap: 6px; align-items: flex-start; }
.follow-ans-box {
  width: 100%; background: #f6f8fa; border: 1px solid #eaeef2;
  border-radius: 8px; padding: 8px 12px; margin: 2px 0 8px;
}

/* 用户管理：层级筛选条 */
.user-filter-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 4px; }
.user-filter-bar label { font-size: 13px; color: #1f2328; }
.user-filter-bar select {
  padding: 5px 10px; border: 1px solid #d0d7de; border-radius: 6px;
  font-size: 13px; color: #1f2328; background: #fff; max-width: 240px;
}
.user-filter-bar select:focus { border-color: #0969da; outline: none; box-shadow: 0 0 0 3px rgba(9,105,218,.3); }
.user-filter-bar .hint { margin-top: 0; }
/* 用户层级筛选（checkbox 多选）行样式 */
.user-filter-bar .chk-line { font-size: 13px; }
.user-filter-bar .chk-line input[type="checkbox"] { margin-top: 3px; }

/* 顶栏右侧：认证区 + 标题链接 */
.top-actions { display: flex; align-items: center; gap: 12px; }
.brand h1 a { color: inherit; text-decoration: none; }
.brand h1 a:hover { text-decoration: none; }
/* 标题右侧的宣传片入口：小号灰字胶囊，刻意做得不显眼 */
.brand h1 a.brand-reel {
  font-size: 11px; font-weight: 400; color: #8b949e; white-space: nowrap;
  border: 1px solid #d8dee4; border-radius: 999px; padding: 1px 8px;
  margin-left: 8px; vertical-align: 3px;
}
.brand h1 a.brand-reel:hover { color: #57606a; border-color: #afb8c1; }

/* 全站顶部公告（notice bar）：最上方持续显示的窄条，柔和警示色 */
#noticeBar {
  position: sticky; top: 0; z-index: 60;
  background: #fff8e1; color: #6d4c00; border-bottom: 1px solid #f0dc9a;
  font-size: 12px; line-height: 1.6; text-align: center;
  padding: 5px 42px; white-space: pre-wrap; word-break: break-word;
  box-shadow: 0 1px 3px rgba(60, 40, 0, .08);
}

/* 问题分享弹层：链接 + 二维码 */
.share-link-row { display: flex; gap: 8px; margin: 10px 0 4px; }
.share-link-row input {
  flex: 1; min-width: 0; padding: 6px 10px; border: 1px solid #d0d7de; border-radius: 6px;
  font-size: 12px; color: #1f2328; background: #f6f8fa;
}
.share-link-row input:focus { border-color: #0969da; outline: none; box-shadow: 0 0 0 3px rgba(9,105,218,.3); }
.share-qr { text-align: center; margin: 12px 0 2px; }
.share-qr canvas {
  border: 1px solid #eaeef2; border-radius: 8px; background: #fff; max-width: 100%;
}

/* 手动发送邮件：收件人搜索建议下拉 */
#mailToField { position: relative; }
.user-suggest {
  position: absolute; top: calc(100% - 6px); left: 0; right: 0; z-index: 50;
  background: #fff; border: 1px solid #d0d7de; border-radius: 6px;
  box-shadow: 0 6px 16px rgba(140,149,159,.2); max-height: 240px; overflow-y: auto;
}
.user-suggest-row {
  display: flex; justify-content: space-between; gap: 10px; align-items: center;
  width: 100%; text-align: left; padding: 6px 10px; border: none; background: #fff;
  cursor: pointer; font-size: 13px; color: #1f2328;
}
.user-suggest-row:hover { background: #f6f8fa; }
.user-suggest-row + .user-suggest-row { border-top: 1px solid #eaeef2; }

/* 分享落地页（/q/<uuid>）：不提供“删除问题”操作；已登录用户的关注/追加回答/标签/编辑等与随机练习一致 */
#panel-share .btn-del, #panel-share .q-del { display: none; }

/* 勾选框行：复选框与其后的说明文字对齐、留白，鼠标手型，文字颜色与默认正文一致
   （所有 checkbox 统一使用 label.chk-line 包裹；同时兼容嵌套在 .cfg-field 中的写法） */
.chk-line,
.cfg-field label.chk-line {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 14px; line-height: 1.6; color: #1f2328; cursor: pointer;
}
.chk-line input[type="checkbox"],
.cfg-field label.chk-line input[type="checkbox"] {
  width: auto; flex-shrink: 0; margin-top: 4px; accent-color: #1f883d;
}

/* 随机练习问题卡：追加回答 / 编辑标签 / 编辑问题 / 删除 等操作按钮整体靠右对齐 */
#questionList .q-actions .btn-append { margin-left: auto; }
