/* 前台公共样式:所有 sub 模板经 layouts/_meta 引入(位于模板自身 CSS 之前,模板差异写在各自 fix.css) */
:root {
  --site-color: #3a6ea5; /* 各模板 fix.css 覆盖为自己的主色,占位图/logo 文字/分页高亮共用 */
  --font-cn: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", "WenQuanYi Micro Hei", "Helvetica Neue", Arial, sans-serif;
}
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { overflow-wrap: break-word; }

/* 无缩略图时先隐藏默认 gif,front.js 换成占位 SVG 后显示 */
img[src$="noimages.gif"] { opacity: 0; }
img.is-placeholder { object-fit: cover; }
/* 懒加载的内容图在固定尺寸容器里统一裁切,不拉伸 */
img[loading="lazy"] { object-fit: cover; }

/* 分站 logo 缺失 / 加载失败时的文字 logo */
.site-logo-text {
  display: inline-flex; align-items: center; height: 100%; max-width: 100%;
  font: 700 26px/1.2 var(--font-cn); letter-spacing: .04em; color: var(--site-color);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.site-logo-text.on-dark { color: #fff; }
.img-alt-text { font-size: 13px; color: #666; }

/* 文章正文统一排版:模板在正文容器上加 class="fx-content" */
.fx-content { font-family: var(--font-cn); font-size: 16px; line-height: 1.75; color: #333; word-break: normal; overflow-wrap: anywhere; }
.fx-content p { margin: 0 0 1em; font-size: inherit; line-height: inherit; }
.fx-content img { display: block; max-width: 100% !important; height: auto !important; margin: 12px auto; object-fit: contain; }
.fx-content table { display: block; max-width: 100%; overflow-x: auto; }
.fx-content iframe, .fx-content video { max-width: 100%; }
.fx-content pre { white-space: pre-wrap; }

/* 分页(ThinkPHP Bootstrap 风格输出 ul.pagination),覆盖 common.css 的旧样式 */
ul.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; clear: both; margin: 24px 0; padding: 0; list-style: none; }
ul.pagination li { float: none; margin: 0; padding: 0; list-style: none; width: auto; height: auto; border: 0; background: none; }
ul.pagination li a, ul.pagination li span {
  float: none; display: block; box-sizing: border-box; min-width: 36px; width: auto; height: 36px; margin: 0; padding: 0 12px;
  line-height: 34px; text-align: center; font-size: 14px; border: 1px solid #e2e4e8; border-radius: 4px;
  background: #fff; color: #555; text-decoration: none;
}
ul.pagination li a:hover { border-color: var(--site-color); color: var(--site-color); }
ul.pagination li.active span { background: var(--site-color); border-color: var(--site-color); color: #fff; }
ul.pagination li.disabled span { color: #bbb; background: #fafafa; }
