/* =========================================================
   值周工作简报系统 - 精简整理版 style.css
   风格：学校公文 / OA 系统 / 白底轻量化
   说明：
   1. 保留原有字体、颜色、字号和整体风格。
   2. 整理重复规则，减少互相覆盖。
   3. 修复简报目录页 PC / 手机 / 企业微信布局互相干扰的问题。
   ========================================================= */

/* =========================================================
   01. 全局基础设置
   ========================================================= */

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: #f5f5f5;
  color: #222;
  font-family: "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

/* =========================================================
   02. 顶部导航
   ========================================================= */

.topbar {
  height: 56px;
  padding: 0 24px;
  background: #fff;
  border-bottom: 1px solid #d9d9d9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand {
  color: #c40000;
  font-size: 22px;
  font-weight: 700;
  text-decoration: none;
}

.topbar nav,
nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.nav-link {
  padding: 6px 12px;
  border-radius: 2px;
  color: #333;
  font-size: 15px;
  border: 1px solid transparent;
  text-decoration: none;
}

.nav-link:hover {
  background: #f5f5f5;
}

.nav-primary {
  background: #c40000;
  color: #fff !important;
  border-color: #c40000;
}

.nav-primary:hover {
  background: #a80000;
}

/* =========================================================
   03. 通用布局、卡片、按钮
   ========================================================= */

.container {
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 15px;
}

.card {
  background: #fff;
  border: 1px solid #ddd;
}

.btn,
.primary,
.primary-button {
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid #c40000;
  background: #c40000;
  color: #fff;
  cursor: pointer;
  font-size: 15px;
}

.primary:hover,
.primary-button:hover {
  background: #a80000;
}

.ghost {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid #bbb;
  background: #fff;
  color: #333;
  cursor: pointer;
}

.ghost:hover {
  background: #f5f5f5;
}

.danger,
.delete-link {
  color: #c40000 !important;
}

.delete-link:hover {
  color: #f00 !important;
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 0 14px;
}

.section-title h2 {
  margin: 0;
  padding: 10px 0;
  font-size: 22px;
  color: #222;
}

/* =========================================================
   04. 首页：公文列表
   ========================================================= */

.news-list {
  background: #fff;
  border: 1px solid #ddd;
  border-top: 2px solid #c40000;
}

.news-item {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 12px 8px;
  border-bottom: 1px dashed #ddd;
}

.news-item:last-child {
  border-bottom: none;
}

.news-item:hover {
  background: #fafafa;
}

.news-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  padding-left: 8px;
}

.news-name a {
  color: #222;
  font-size: 18px;
  text-decoration: none;
}

.news-name a:hover {
  color: #c40000;
}

.news-date {
  width: 120px;
  text-align: center;
  color: #666;
  font-size: 14px;
}

.news-view {
  width: 90px;
  text-align: center;
  color: #666;
  font-size: 14px;
}

.news-op {
  width: 160px;
  text-align: right;
  white-space: nowrap;
}

.news-op a {
  margin-left: 10px;
  color: #2563eb;
  text-decoration: none;
}

.news-op a:hover {
  text-decoration: underline;
}

/* 兼容旧首页类名，防止旧代码失效 */
.article-list,
.article-card,
.hero {
  display: block;
}

/* =========================================================
   05. 发布 / 编辑页面
   ========================================================= */

.publish-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  gap: 22px;
  align-items: start;
}

.editor-header {
  padding: 22px 24px;
  background: #fff;
  border-bottom: 1px solid #ddd;
}

.editor-header h2 {
  margin: 0 0 18px;
  font-size: 22px;
}

.field {
  display: block;
  margin: 16px 0;
}

.field span {
  display: block;
  margin-bottom: 8px;
  color: #555;
  font-size: 14px;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid #ccc;
  padding: 0 12px;
  font-size: 15px;
  outline: none;
  background: #fff;
}

input,
select {
  height: 42px;
}

textarea {
  min-height: 78px;
  padding: 10px 12px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: #c40000;
}

.editor-shell {
  background: #fff;
}

.custom-toolbar {
  padding: 10px 14px;
  border-bottom: 1px solid #ddd;
  background: #fff;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.custom-toolbar button,
.editor-topbar button {
  height: 32px;
  padding: 0 12px;
  border: 1px solid #bbb;
  background: #fff;
  color: #333;
  cursor: pointer;
  font-size: 14px;
}

.custom-toolbar button:hover,
.editor-topbar button:hover {
  color: #c40000;
  border-color: #c40000;
}

.editor-toolbar {
  border: 1px solid #ddd;
  border-top: none;
}

.editor-box {
  height: 560px;
  border: 1px solid #ddd;
  border-top: none;
}

.editor-box .w-e-text-container {
  height: 100% !important;
}

.editor-save-bar {
  padding: 14px 16px;
  text-align: right;
  border-top: 1px solid #ddd;
  background: #fff;
}

.publish-btn {
  background: #c40000 !important;
  border: 1px solid #c40000 !important;
  color: #fff !important;
  padding: 8px 18px;
  cursor: pointer;
}

.publish-btn:hover {
  background: #a80000 !important;
}

.preview-panel {
  position: sticky;
  top: 76px;
  max-height: calc(100vh - 100px);
  overflow: auto;
  padding: 18px;
  background: #fff;
}

.preview-panel h3 {
  margin: 0 0 14px;
  font-size: 18px;
}

.article-content {
  line-height: 1.8;
  word-break: break-word;
  overflow-wrap: break-word;
}

.article-content img {
  max-width: 100% !important;
  width: 100% !important;
  height: auto !important;
  display: block;
  margin: 12px auto;
}

/* 兼容旧的粘贴编辑器 */
.paste-editor {
  min-height: 540px;
  padding: 38px 46px;
  background: #fff;
  outline: none;
  font-size: 16px;
  line-height: 1.9;
  color: #1e293b;
  word-break: break-word;
  overflow-wrap: break-word;
}

.paste-editor:empty::before {
  content: "请输入或粘贴简报正文内容...";
  color: #999;
}

.paste-editor img {
  max-width: 100%;
  height: auto;
  cursor: pointer;
}

.selected-img,
.paste-editor img.selected-img {
  outline: 3px solid #2563eb !important;
  outline-offset: 4px;
}

/* =========================================================
   06. 文章详情页：简报正文
   ========================================================= */

.brief-page {
  max-width: 900px;
  margin: 0 auto;
  background: #fff;
  font-family: "宋体", SimSun, serif;
}

.brief-red-head {
  position: static;
  text-align: center;
}

.brief-header-img {
  width: 80%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.brief-main-title {
  text-align: center;
  font-family: "FZXiaoBiaoSong", "STSong", "SimSun", serif;
  font-size: 34px;
  font-weight: 700;
  color: #111;
  margin-top: 28px;
  letter-spacing: 2px;
}

.brief-issue {
  text-align: center;
  font-size: 16px;
  color: #555;
  margin-top: 14px;
  margin-bottom: 24px;
}

.brief-content {
  padding: 5px 84px 20px;
  font-family: "SimSun", "宋体", "STSong", serif !important;
  font-size: 18px;
  line-height: 1.9 !important;
  color: #000;
}

.brief-content p {
  margin: 0 !important;
  padding: 0 !important;
  text-indent: 2em !important;
  line-height: 1.9 !important;
  font-family: "SimSun", "宋体", "STSong", serif !important;
  font-size: 18px !important;
  color: #000 !important;
}

.brief-content strong {
  font-weight: 700;
  font-family: "SimSun", "宋体", "STSong", serif !important;
  font-size: 18px !important;
}

.brief-content h3,
.brief-content h4 {
  margin: 18px 0 10px !important;
  text-indent: 2em !important;
  font-family: "SimHei", "黑体", "Microsoft YaHei", sans-serif !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  line-height: 1.9 !important;
  color: #000 !important;
}

.brief-content img,
.brief-content video {
  max-width: 100% !important;
  width: auto !important;
  height: auto !important;
  display: block !important;
  margin: 22px auto !important;
  border-radius: 4px;
}

.brief-content table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
}

.brief-content table td,
.brief-content table th {
  border: none !important;
  padding: 6px 8px;
}

.brief-content p:empty {
  display: none !important;
}

/* 值周领导、值周员、安全监督员模板 */
.duty-title,
.safe-title {
  margin: 0 !important;
  padding: 0 !important;
  text-indent: 2em !important;
  line-height: 1.9 !important;
  font-family: "SimSun", "宋体", "STSong", serif !important;
  font-size: 18px !important;
  color: #000 !important;
}

.brief-content ul {
  list-style-type: none !important;
  list-style: none !important;
  margin: 0 !important;
  padding-left: 2em !important;
  display: -webkit-box !important;
  display: -webkit-flex !important;
  display: flex !important;
  -webkit-flex-wrap: wrap !important;
  flex-wrap: wrap !important;
}

.brief-content ul li {
  list-style: none !important;
  width: 14.2857% !important;
  min-width: 4em;
  text-align: left;
  white-space: nowrap !important;
  line-height: 1.9 !important;
  font-family: "SimSun", "宋体", "STSong", serif !important;
  font-size: 18px !important;
  color: #000 !important;
}

.brief-content ul li::marker {
  content: "" !important;
}

.name-justify {
  display: inline-flex;
  width: 3em;
  justify-content: space-between;
  white-space: nowrap;
}

/* =========================================================
   07. 签章与页脚
   ========================================================= */

.brief-sign {
  position: relative;
  margin: 4em 42px 24px;
  min-height: 150px;
  font-family: "宋体", SimSun, serif;
}

.brief-sign-text {
  text-align: right;
  font-size: 18px;
  line-height: 2;
  padding-right: 2em;
}

.brief-sign-seal {
  position: absolute;
  right: 2em;
  top: -58px;
  width: 145px;
  opacity: 0.85;
  pointer-events: none;
}

.brief-footer {
  position: relative;
  margin: 40px 42px 0;
  padding: 0 0 70px;
  font-family: "宋体", SimSun, serif;
  font-size: 15px;
  color: #333;
}

.brief-footer-line {
  border-top: 1px solid #c40000;
  margin-bottom: 10px;
}

.brief-footer-row {
  display: flex;
  justify-content: space-between;
  line-height: 2;
}

.site-footer {
  text-align: center;
  padding: 22px 16px;
  color: #666;
  font-size: 12px;
  line-height: 1.8;
}

.site-footer p {
  margin: 4px 0;
}

/* =========================================================
   08. 弹窗
   ========================================================= */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.hidden {
  display: none;
}

.modal-box {
  width: min(900px, 92vw);
  height: 78vh;
  background: #fff;
  padding: 16px;
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#htmlOutput {
  flex: 1;
  width: 100%;
  resize: none;
  border: 1px solid #ccc;
  padding: 12px;
  font-family: Consolas, Monaco, monospace;
}

/* =========================================================
   09. 简报目录页：PC 默认样式
   说明：这是 list 页面默认样式，PC 下保持表格式横向布局。
   ========================================================= */

.directory-title {
  margin: 4px 0 6px;
  font-size: 26px;
  font-weight: 700;
  color: #1f2937;
}

.directory-desc {
  margin: 0 0 20px;
  font-size: 14px;
  color: #6b7280;
}

.brief-directory {
  overflow-x: auto;
}

.brief-row {
  display: grid;
  grid-template-columns: 280px 80px 90px 90px 110px 120px 80px 150px;
  align-items: center;
  min-width: 1000px;
}

.brief-head {
  padding: 0 18px;
  color: #6b7280;
  font-size: 13px;
  font-weight: 600;
  border-bottom: 1px solid #e5e7eb;
}

.brief-head > div {
  padding: 10px 6px;
}

.brief-row:not(.brief-head) {
  margin-top: 10px;
  padding: 0 18px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
  transition: all .18s ease;
}

.brief-row:not(.brief-head):hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(0,0,0,.07);
}

.brief-row > div {
  padding: 16px 6px;
  font-size: 14px;
  color: #374151;
  white-space: nowrap;
}

.brief-row > div:first-child {
  font-weight: 600;
  color: #111827;
}

.brief-row > div:nth-child(2) {
  color: #c40000;
  font-weight: 600;
}

.duty-members {
  cursor: help;
}

.brief-actions a {
  display: inline-block;
  margin-right: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #374151;
  font-size: 13px;
}

.brief-actions a:hover {
  background: #e5e7eb;
  color: #111827;
  text-decoration: none;
}

.brief-actions a:first-child {
  background: #c40000;
  color: #fff;
}

.brief-actions a:first-child:hover {
  background: #a80000;
  color: #fff;
}

.brief-actions .delete-link {
  background: #fff1f2;
  color: #b91c1c !important;
}

.brief-actions .delete-link:hover {
  background: #ffe4e6;
  color: #991b1b !important;
}

/* PC 兜底：防止企业微信或异常 viewport 把 PC 错套成手机布局 */
@media (min-width: 601px) {
  .brief-directory {
    overflow-x: auto !important;
  }

  .brief-directory .brief-head {
    display: grid !important;
  }

  .brief-row {
    display: grid !important;
    grid-template-columns: 280px 80px 90px 90px 110px 120px 80px 150px !important;
    min-width: 1000px !important;
  }

  .brief-row > div {
    display: block !important;
    white-space: nowrap !important;
  }

  .brief-row > div::before {
    content: none !important;
    display: none !important;
  }
}

/* =========================================================
   10. 预览面板内简报效果
   说明：发布 / 编辑页右侧预览使用，不影响正式文章详情页。
   ========================================================= */

.preview-panel .brief-sign-seal {
  width: 120px !important;
  right: 2em !important;
  top: -28px !important;
}

.preview-panel .brief-page {
  max-width: 390px;
  margin: 0 auto;
}

.preview-panel .brief-content {
  padding: 12px 18px 10px;
}

.preview-panel .brief-content p,
.preview-panel .brief-content strong,
.preview-panel .brief-content ul li,
.preview-panel .brief-content h3,
.preview-panel .brief-content h4 {
  font-size: 17px !important;
}

.preview-panel .brief-content ul li {
  width: 25% !important;
}

.preview-panel .brief-sign-text {
  text-align: center !important;
  width: 150px;
  margin-left: auto;
  margin-right: 18px;
  padding-right: 0 !important;
}

.preview-panel .brief-sign-text div {
  text-align: center !important;
}

/* =========================================================
   11. 平板及窄屏通用适配
   ========================================================= */

@media (max-width: 900px) {
  .publish-layout {
    grid-template-columns: 1fr;
  }

  .preview-panel {
    position: static;
    max-height: none;
  }

  .topbar {
    padding: 0 12px;
    height: auto;
    min-height: 54px;
    align-items: center;
    flex-wrap: wrap;
  }

  .topbar nav {
    gap: 4px;
  }

  .nav-link {
    padding: 5px 8px;
    font-size: 14px;
  }

  .brief-directory {
    padding-bottom: 8px;
  }
}

/* =========================================================
   12. 手机端整体适配
   说明：600px 以下为手机布局。
   ========================================================= */

@media (max-width: 600px) {
  html {
    height: 100%;
    overflow: hidden;
    background: #fff;
  }

  body {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    background: #fff;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
  }

  .container {
    margin: 12px auto;
    padding: 0 10px;
  }

  .section-title h2 {
    font-size: 20px;
  }

  /* 首页列表手机显示 */
  .news-item {
    display: block;
    padding: 12px 10px;
  }

  .news-name {
    padding-left: 0;
    white-space: normal;
    line-height: 1.6;
  }

  .news-name a {
    font-size: 17px;
  }

  .news-date,
  .news-view,
  .news-op {
    display: inline-block;
    width: auto;
    margin-top: 6px;
    margin-right: 12px;
    text-align: left;
    font-size: 14px;
  }

  /* 顶部导航手机显示 */
  .topbar {
    justify-content: center !important;
    padding: 8px 18px !important;
  }

  .topbar nav {
    width: 100%;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
  }

  .nav-link {
    background: transparent !important;
    border: none !important;
    color: #666 !important;
    padding: 4px 0 !important;
    font-size: 14px !important;
  }

  .nav-primary {
    background: transparent !important;
    border: none !important;
    color: #666 !important;
    font-weight: 400 !important;
  }

  /* 文章详情页手机显示 */
  .brief-page {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    margin-bottom: 0 !important;
  }

  .brief-red-head {
    padding: 16px 14px 0;
  }

  .brief-header-img {
    width: 96%;
    max-width: 96%;
  }

  .brief-main-title {
    font-size: 24px;
    line-height: 1.4;
    margin-top: 16px;
    margin-bottom: 8px;
    letter-spacing: 1px;
  }

  .brief-issue {
    font-size: 14px;
    margin-top: 0;
    margin-bottom: 12px;
  }

  .brief-issue,
  .brief-issue * {
    text-decoration: none !important;
    border-bottom: none !important;
  }

  .brief-content {
    padding: 12px 18px 10px;
    font-size: 18px;
    line-height: 1.95;
    overflow-x: hidden;
  }

  .brief-content p,
  .brief-content ul li {
    font-size: 18px !important;
  }

  .brief-content strong {
    font-size: 18px !important;
    font-weight: 500 !important;
  }

  .brief-content h3,
  .brief-content h4 {
    font-size: 18px !important;
    font-weight: 700 !important;
    margin: 0.9em 0 0.45em !important;
  }

  .brief-content ul {
    padding-left: 2em !important;
  }

  .brief-content ul li {
    width: 25% !important;
    font-size: 18px !important;
  }

  .brief-content ul,
  .brief-content li {
    list-style-type: none !important;
  }

  .brief-sign {
    margin: 2em 18px 12px;
    min-height: 90px;
  }

  .brief-sign-text {
    font-size: 16px;
    line-height: 1.8;
    padding-right: 1.5em;
  }

  .brief-sign-seal {
    width: 110px;
    right: 1.8em;
    top: -40px;
  }

  .brief-footer {
    margin: 20px 18px 0;
    padding-bottom: 16px;
    font-size: 16px;
  }

  .site-footer {
    padding: 12px 16px !important;
    margin-bottom: 0 !important;
    font-size: 14px !important;
  }

  /* 简报目录页手机卡片显示 */
  .directory-title {
    font-size: 22px;
    margin: 8px 0 4px;
    color: #111827;
  }

  .directory-desc {
    font-size: 15px;
    margin: 0 0 14px;
    color: #6b7280;
  }

  .brief-directory {
    overflow: visible !important;
  }

  .brief-directory .brief-head {
    display: none !important;
  }

  .brief-row {
    display: block !important;
    min-width: 0 !important;
    margin: 0 0 12px !important;
    padding: 14px 16px !important;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,.05);
  }

  .brief-row:not(.brief-head):hover {
    transform: none;
    box-shadow: 0 2px 12px rgba(0,0,0,.05);
  }

  .brief-row > div {
    display: grid !important;
    grid-template-columns: 88px 1fr;
    column-gap: 12px;
    align-items: start;
    padding: 7px 0 !important;
    font-size: 16px;
    line-height: 1.65;
    color: #374151;
    white-space: normal !important;
    border: none !important;
    text-decoration: none !important;
  }

  .brief-row > div::before {
    display: block;
    width: 88px;
    text-align: right;
    color: #8a8f98;
    font-weight: 400;
  }

  .brief-row > div:nth-child(1)::before { content: "学期"; }
  .brief-row > div:nth-child(2)::before { content: "周次"; }
  .brief-row > div:nth-child(3)::before { content: "值周领导"; }
  .brief-row > div:nth-child(4)::before { content: "值周员"; }
  .brief-row > div:nth-child(5)::before { content: "安全监督员"; }
  .brief-row > div:nth-child(6)::before { content: "发布时间"; }
  .brief-row > div:nth-child(7)::before { content: "阅览次数"; }

  .brief-actions {
    display: grid !important;
    grid-template-columns: repeat(3, 95px) !important;
    gap: 8px !important;
    padding: 12px 0 0 100px !important;
    margin-top: 6px;
    border-top: 1px solid #f1f1f1 !important;
  }

  .brief-actions::before {
    content: none !important;
    display: none !important;
  }

  .brief-actions a,
  .brief-actions a:first-child,
  .brief-actions .delete-link {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 95px !important;
    height: 35px !important;
    min-width: 95px !important;
    max-width: 95px !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 999px !important;
    font-size: 16px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  .brief-directory,
  .brief-directory *,
  .brief-directory a {
    text-decoration: none !important;
    border-bottom: none !important;
  }
}

/* =========================================================
   13. 微信浏览器适配
   说明：只微调正文加粗和颜色，不改变布局。
   ========================================================= */

@media (max-width: 600px) {
  .wechat .brief-content p,
  .wechat .brief-content ul li {
    font-weight: 400 !important;
    color: #333 !important;
  }

  .wechat .brief-content strong {
    font-weight: 500 !important;
    color: #222 !important;
  }

  .wechat .brief-content h3,
  .wechat .brief-content h4 {
    font-size: 19px !important;
    font-weight: 800 !important;
    color: #000 !important;
  }
}

/* =========================================================
   14. 企业微信浏览器适配
   说明：企业微信里字号容易偏大，这里只缩小字号，不主动改变布局。
   需要页面 JS 给 html 或 body 添加 .wxwork 类。
   ========================================================= */

.wxwork .brief-content,
.wxwork .brief-content p,
.wxwork .brief-content strong,
.wxwork .brief-content ul li,
.wxwork .brief-content h3,
.wxwork .brief-content h4 {
  font-size: 14px !important;
}

.wxwork .brief-main-title {
  font-size: 21px !important;
}

.wxwork .brief-issue {
  font-size: 13px !important;
}

.wxwork .brief-sign-text,
.wxwork .brief-sign-text p {
  font-size: 14px !important;
}

.wxwork .brief-footer {
  font-size: 13px !important;
}

.wxwork .site-footer {
  font-size: 12px !important;
}

.wxwork .news-name a {
  font-size: 14px !important;
}

/* 企业微信目录页字号缩小，不改 PC / 手机布局 */
.wxwork .brief-row > div {
  font-size: 13px !important;
}

.wxwork .brief-actions a {
  font-size: 12px !important;
}

@media (max-width: 600px) {
  .wxwork .brief-row > div {
    font-size: 14px !important;
  }

  .wxwork .brief-actions a,
  .wxwork .brief-actions a:first-child,
  .wxwork .brief-actions .delete-link {
    font-size: 14px !important;
  }
}

/* =========================================================
   15. 多学校签章：组合靠右，内部三者同轴（2026-10-19）
   使用 CSS Grid 让文字和公章占据同一个网格单元。
   无需 JS 测量校名长度；不修改其他版块和各校数据。
   ========================================================= */
.brief-page .brief-sign,
.preview-panel .brief-page .brief-sign {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  grid-template-rows: minmax(150px, auto);
  align-items: center;
  justify-items: center;
  justify-content: stretch;
  box-sizing: border-box;
  width: auto;
  min-height: 150px;
  margin: 4em 42px 24px;
  padding: 0 5em 0 0;
  text-align: center;
}
.brief-page .brief-sign-text,
.preview-panel .brief-page .brief-sign-text {
  grid-column: 2;
  grid-row: 1;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: max-content;
  max-width: 100%;
  margin: 0 !important;
  padding: 0 !important;
  text-align: center !important;
  font-size: 18px;
  line-height: 2;
  overflow-wrap: anywhere;
}
.brief-page .brief-sign-text > div {
  text-align: center !important;
}
.brief-page .brief-sign-seal,
.preview-panel .brief-page .brief-sign-seal,
.article-content .brief-page .brief-sign-seal {
  grid-column: 2;
  grid-row: 1;
  position: relative !important;
  inset: auto !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  transform: translateY(-20px) !important;
  place-self: center;
  z-index: 2;
  display: block;
  width: 145px !important;
  max-width: 145px !important;
  height: 145px !important;
  object-fit: contain;
  margin: 0 !important;
  opacity: .85;
  pointer-events: none;
}
/* 编辑器右侧小预览 */
.preview-panel .brief-page .brief-sign {
  grid-template-rows: minmax(130px, auto);
  min-height: 130px;
  margin: 2em 12px 16px;
  padding-right: 2em;
}
.preview-panel .brief-page .brief-sign-seal {
  width: 120px !important;
  max-width: 120px !important;
  height: 120px !important;
}
@media (max-width: 600px) {
  .brief-page .brief-sign {
    grid-template-rows: minmax(115px, auto);
    min-height: 115px;
    margin: 2em 18px 12px;
    padding-right: 2em;
  }
  .brief-page .brief-sign-text {
    font-size: 16px;
    line-height: 1.8;
  }
  .brief-page .brief-sign-seal,
  .article-content .brief-page .brief-sign-seal {
    width: 110px !important;
    max-width: 110px !important;
    height: 110px !important;
  }
}


/* =========================================================
   16. 手机目录页：版权沉底（不影响文章详情页）
   ========================================================= */
/* 目录页：电脑版和手机版统一实现版权沉底 */

html:has(body.directory-page) {
    height: auto !important;
    min-height: 100% !important;
}

body.directory-page {
    display: flex !important;
    flex-direction: column !important;

    height: auto !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
}

/* 中间目录内容占据所有剩余高度 */
body.directory-page > main {
    flex: 1 0 auto !important;
    width: 100%;
}

/* 版权始终位于内容后面 */
body.directory-page > footer.site-footer {
    margin-top: auto !important;
    flex-shrink: 0 !important;
}

/* 手机端修复原有滚动容器设置 */
@media (max-width: 600px) {
    html:has(body.directory-page) {
        height: auto !important;
        overflow: visible !important;
    }

    body.directory-page {
        overflow-x: hidden !important;
        overflow-y: visible !important;
    }
}


/* 去掉简报目录上方的红色横线 */
.brief-simple-tools,
.brief-directory {
    border-top: none !important;
}

.brief-simple-tools::after,
.brief-directory::before {
    display: none !important;
}