/* ==========================================================================
   李公庙统一版式 · 宫观典重设计令牌
   只在 lgm-mode-new 时加载；legacy 页面完全不受影响。
   ========================================================================== */
:root {
  --lgm-red: #8C2E2B;
  --lgm-red-dark: #6E2321;
  --lgm-ink: #2B3A3A;
  --lgm-ink-deep: #1E2B2B;
  --lgm-gold: #B8935A;
  --lgm-paper: #F5F1E8;
  --lgm-paper-deep: #EDE6D8;
  --lgm-text: #2B2A28;
  --lgm-muted: #6B665C;
  --lgm-white: #FFFFFF;

  --lgm-font-serif: "Source Han Serif SC", "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --lgm-font-sans: "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;

  --lgm-fs-xxl: 2.5rem;
  --lgm-fs-xl: 2rem;
  --lgm-fs-lg: 1.5rem;
  --lgm-fs-md: 1.25rem;
  --lgm-fs-base: 1rem;
  --lgm-fs-sm: .875rem;

  --lgm-sp-1: 4px;
  --lgm-sp-2: 8px;
  --lgm-sp-3: 16px;
  --lgm-sp-4: 24px;
  --lgm-sp-5: 40px;
  --lgm-sp-6: 64px;

  --lgm-radius: 4px;
  --lgm-maxw: 1080px;
  --lgm-shadow: 0 4px 18px rgba(43, 58, 58, .10);
}

body.lgm-mode-new {
  margin: 0;
  background: var(--lgm-paper);
  color: var(--lgm-text);
  font-family: var(--lgm-font-sans);
  font-size: var(--lgm-fs-base);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}
body.lgm-mode-new a { color: var(--lgm-red); text-decoration: none; }
body.lgm-mode-new a:hover { color: var(--lgm-red-dark); text-decoration: underline; }
body.lgm-mode-new img { max-width: 100%; height: auto; }
body.lgm-mode-new h1,
body.lgm-mode-new h2,
body.lgm-mode-new h3,
body.lgm-mode-new h4 { font-family: var(--lgm-font-serif); font-weight: 600; line-height: 1.4; color: var(--lgm-ink); }
body.lgm-mode-new :focus-visible { outline: 3px solid var(--lgm-gold); outline-offset: 2px; }

.lgm-container { width: min(100% - 2 * var(--lgm-sp-3), var(--lgm-maxw)); margin-inline: auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------------- 页眉 ---------------- */
.lgm-header {
  background: var(--lgm-paper);
  border-bottom: 3px solid var(--lgm-red);
  box-shadow: 0 2px 10px rgba(43, 58, 58, .06);
}
.lgm-header-inner {
  display: flex; align-items: center; gap: var(--lgm-sp-4);
  min-height: 88px; flex-wrap: wrap; padding-block: var(--lgm-sp-2);
}
.lgm-brand { display: flex; align-items: center; gap: var(--lgm-sp-3); color: var(--lgm-ink); flex: 0 0 auto; }
.lgm-brand:hover { text-decoration: none; color: var(--lgm-ink); }
.lgm-brand img { width: 56px; height: 56px; object-fit: contain; }
/* 防御：任何残留的 custom-logo-link / custom-logo 在页眉内也不得超尺寸 */
.lgm-header .custom-logo-link { display: inline-flex; align-items: center; }
.lgm-header .custom-logo-link img,
.lgm-header img.custom-logo { width: 56px; height: 56px; object-fit: contain; }
.lgm-brand-text { display: flex; flex-direction: column; line-height: 1.35; }
.lgm-brand-text strong { font-family: var(--lgm-font-serif); font-size: var(--lgm-fs-lg); letter-spacing: .06em; }
.lgm-brand-text small { font-size: var(--lgm-fs-sm); color: var(--lgm-muted); letter-spacing: .04em; }

.lgm-nav { margin-left: auto; }
.lgm-menu { display: flex; gap: var(--lgm-sp-1); list-style: none; margin: 0; padding: 0; }
.lgm-menu > li > a {
  display: block; padding: var(--lgm-sp-2) var(--lgm-sp-3);
  font-size: var(--lgm-fs-md); font-family: var(--lgm-font-serif);
  color: var(--lgm-ink); border-radius: var(--lgm-radius);
}
.lgm-menu > li > a:hover,
.lgm-menu > li.current-menu-item > a { background: var(--lgm-red); color: var(--lgm-white); text-decoration: none; }
.lgm-menu .sub-menu { display: none; }

.lgm-search { display: flex; gap: var(--lgm-sp-1); }
.lgm-search input[type="search"] {
  border: 1px solid var(--lgm-paper-deep); background: var(--lgm-white);
  padding: 8px 12px; border-radius: var(--lgm-radius); font: inherit; width: 150px;
}
.lgm-search button,
.lgm-btn {
  background: var(--lgm-red); color: var(--lgm-white); border: 0;
  padding: 8px 18px; border-radius: var(--lgm-radius); font: inherit; cursor: pointer;
}
.lgm-search button:hover, .lgm-btn:hover { background: var(--lgm-red-dark); color: var(--lgm-white); text-decoration: none; }
.lgm-menu-toggle { display: none; background: none; border: 0; font-size: 1.5rem; color: var(--lgm-red); cursor: pointer; }

/* ---------------- 主体 ---------------- */
.lgm-main { padding-block: var(--lgm-sp-5) var(--lgm-sp-6); min-height: 45vh; }
.lgm-article-head { border-bottom: 1px solid var(--lgm-paper-deep); padding-bottom: var(--lgm-sp-3); margin-bottom: var(--lgm-sp-4); }
.lgm-article-title { font-size: var(--lgm-fs-xxl); margin: 0 0 var(--lgm-sp-2); }
.lgm-article-meta { color: var(--lgm-muted); font-size: var(--lgm-fs-sm); }
.lgm-meta-sep { margin-inline: var(--lgm-sp-2); }
.lgm-article-thumb { margin: 0 0 var(--lgm-sp-4); }
.lgm-article-thumb img { border-radius: var(--lgm-radius); }

.lgm-prose { font-size: var(--lgm-fs-base); }
.lgm-prose p { margin: 0 0 var(--lgm-sp-3); }
.lgm-prose h2 { font-size: var(--lgm-fs-xl); margin: var(--lgm-sp-5) 0 var(--lgm-sp-3); }
.lgm-prose h3 { font-size: var(--lgm-fs-lg); margin: var(--lgm-sp-4) 0 var(--lgm-sp-2); }
.lgm-prose ul, .lgm-prose ol { padding-left: 1.6em; margin-bottom: var(--lgm-sp-3); }
.lgm-prose blockquote {
  margin: var(--lgm-sp-4) 0; padding: var(--lgm-sp-3) var(--lgm-sp-4);
  border-left: 4px solid var(--lgm-gold); background: var(--lgm-paper-deep); color: var(--lgm-ink);
}
.lgm-prose table { width: 100%; border-collapse: collapse; margin-bottom: var(--lgm-sp-4); }
.lgm-prose th, .lgm-prose td { border: 1px solid var(--lgm-paper-deep); padding: 8px 12px; }
.lgm-prose th { background: var(--lgm-paper-deep); font-family: var(--lgm-font-serif); }

.lgm-post-nav { display: flex; justify-content: space-between; gap: var(--lgm-sp-3); margin-top: var(--lgm-sp-5); padding-top: var(--lgm-sp-3); border-top: 1px solid var(--lgm-paper-deep); font-size: var(--lgm-fs-sm); }

/* ---------------- 归档 / 搜索 ---------------- */
.lgm-archive-head { margin-bottom: var(--lgm-sp-5); border-bottom: 1px solid var(--lgm-paper-deep); padding-bottom: var(--lgm-sp-3); }
.lgm-archive-title { font-size: var(--lgm-fs-xl); margin: 0; }
.lgm-archive-desc { color: var(--lgm-muted); margin: var(--lgm-sp-2) 0 0; }
.lgm-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--lgm-sp-4); }
.lgm-card { background: var(--lgm-white); border: 1px solid var(--lgm-paper-deep); border-radius: var(--lgm-radius); overflow: hidden; box-shadow: var(--lgm-shadow); }
.lgm-card-link { display: block; padding: var(--lgm-sp-3); color: var(--lgm-text); }
.lgm-card-link:hover { text-decoration: none; color: var(--lgm-text); }
.lgm-card-thumb { margin: calc(-1 * var(--lgm-sp-3)) calc(-1 * var(--lgm-sp-3)) var(--lgm-sp-3); }
.lgm-card-thumb img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.lgm-card-title { font-size: var(--lgm-fs-md); margin: 0 0 var(--lgm-sp-1); }
.lgm-card-date { font-size: var(--lgm-fs-sm); color: var(--lgm-muted); }
.lgm-card-excerpt { font-size: var(--lgm-fs-sm); color: var(--lgm-muted); margin: var(--lgm-sp-2) 0 0; }
.lgm-pagination { margin-top: var(--lgm-sp-5); }
.lgm-pagination .page-numbers { display: inline-block; padding: 6px 12px; border: 1px solid var(--lgm-paper-deep); border-radius: var(--lgm-radius); margin-right: 6px; }
.lgm-pagination .current { background: var(--lgm-red); color: var(--lgm-white); border-color: var(--lgm-red); }
.lgm-empty { color: var(--lgm-muted); }

/* ---------------- 404 ---------------- */
.lgm-404 { text-align: center; padding: var(--lgm-sp-6) 0; }
.lgm-404-code { font-family: var(--lgm-font-serif); font-size: 5rem; color: var(--lgm-red); margin: 0; line-height: 1; }
.lgm-404-title { font-size: var(--lgm-fs-xl); margin: var(--lgm-sp-3) 0; }
.lgm-404-desc { color: var(--lgm-muted); }
.lgm-404 .lgm-btn { display: inline-block; margin: var(--lgm-sp-3); }

/* ---------------- 页脚（备案区） ---------------- */
.lgm-footer { background: var(--lgm-ink-deep); color: #E8E2D5; padding: var(--lgm-sp-5) 0 var(--lgm-sp-4); margin-top: var(--lgm-sp-6); }
.lgm-footer-grid { display: grid; grid-template-columns: 1fr 1.4fr 1.3fr; gap: var(--lgm-sp-5); }
.lgm-footer-title { color: var(--lgm-gold); font-size: var(--lgm-fs-md); margin: 0 0 var(--lgm-sp-3); }
.lgm-footer-links, .lgm-footer-contact { list-style: none; margin: 0; padding: 0; font-size: var(--lgm-fs-sm); line-height: 2.1; }
.lgm-footer a { color: #E8E2D5; }
.lgm-footer a:hover { color: var(--lgm-gold); }
.lgm-footer-legal p { margin: 0 0 var(--lgm-sp-1); font-size: var(--lgm-fs-sm); }
.lgm-police img { height: 20px; width: auto; vertical-align: middle; margin-right: 5px; }
.lgm-copy { opacity: .85; }

/* 后台便捷入口：低调、悬停才显眼 */
.lgm-admin-entry { margin-top: 8px; }
.lgm-admin-entry a {
  color: var(--lgm-muted, #7A7365);
  font-size: 12px;
  opacity: .55;
  text-decoration: none;
  transition: opacity .15s ease;
}
.lgm-admin-entry a:hover { opacity: 1; color: var(--lgm-red, #8C2E2B); }

/* 权重修正（2026-11-12）：body.lgm-mode-new a / h4 的权重(0,2,1)/(0,1,2)
   会盖过 .lgm-footer a(0,1,1) 与 .lgm-footer-title(0,1,0)，导致页脚链接变砖红、
   标题发暗；同样会让 <a class="lgm-btn--primary"> 变成红底红字（文字不可见）。
   以下用同等或更高权重把颜色钉回去。 */
body.lgm-mode-new .lgm-footer a,
body.lgm-mode-new .lgm-footer a:visited { color: #E8E2D5; text-decoration: none; }
body.lgm-mode-new .lgm-footer a:hover { color: var(--lgm-gold); text-decoration: underline; }
body.lgm-mode-new .lgm-footer .lgm-footer-title { color: var(--lgm-gold); }
body.lgm-mode-new .lgm-admin-entry a,
body.lgm-mode-new .lgm-admin-entry a:visited { color: var(--lgm-muted); }
body.lgm-mode-new a.lgm-btn,
body.lgm-mode-new a.lgm-btn:hover { text-decoration: none; }
/* 兜底：裸 .lgm-btn 作链接时也必须是白字红底（404 页「返回主页」曾因此文字不可见） */
body.lgm-mode-new a.lgm-btn:not(.lgm-btn--ghost) { background: var(--lgm-red); color: var(--lgm-white); }
body.lgm-mode-new a.lgm-btn:not(.lgm-btn--ghost):hover { background: var(--lgm-red-dark); color: var(--lgm-white); }
body.lgm-mode-new a.lgm-btn--primary,
body.lgm-mode-new a.lgm-btn--primary:hover { background: var(--lgm-red); color: var(--lgm-white); }
body.lgm-mode-new a.lgm-btn--primary:hover { background: var(--lgm-red-dark); }
body.lgm-mode-new a.lgm-btn--ghost { background: transparent; color: var(--lgm-red); }
body.lgm-mode-new a.lgm-btn--ghost:hover { background: var(--lgm-paper); color: var(--lgm-red-dark); text-decoration: none; }
.lgm-to-top {
  position: fixed; right: 24px; bottom: 24px; z-index: 60;
  width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: var(--lgm-red); color: var(--lgm-white); font-size: 1.25rem;
  cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, .3); opacity: 0; pointer-events: none;
  transition: opacity .2s ease;
}
.lgm-to-top.is-visible { opacity: 1; pointer-events: auto; }

/* ---------------- 原生弹窗 ---------------- */
.lgm-dialog { border: 0; padding: 0; background: transparent; max-width: min(560px, calc(100vw - 32px)); width: 100%; }
.lgm-dialog::backdrop { background: rgba(30, 43, 43, .68); }
.lgm-dialog-panel { position: relative; background: var(--lgm-paper); border-radius: var(--lgm-radius); padding: var(--lgm-sp-4); box-shadow: 0 18px 60px rgba(0, 0, 0, .35); }
.lgm-dialog-close { position: absolute; top: 8px; right: 12px; background: none; border: 0; font-size: 1.6rem; line-height: 1; color: var(--lgm-muted); cursor: pointer; }
.lgm-dialog-title { font-size: var(--lgm-fs-lg); margin: 0 var(--lgm-sp-5) var(--lgm-sp-3) 0; }
.lgm-dialog-figure img { display: block; margin-inline: auto; }
.lgm-dialog-body form { display: grid; gap: var(--lgm-sp-2); }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1024px) {
  .lgm-footer-grid { grid-template-columns: 1fr 1fr; }
  .lgm-footer-legal { grid-column: 1 / -1; }
}
@media (max-width: 768px) {
  .lgm-header-inner { min-height: 0; padding-block: var(--lgm-sp-2); gap: var(--lgm-sp-2); }
  .lgm-brand img { width: 44px; height: 44px; }
  .lgm-brand-text strong { font-size: var(--lgm-fs-md); }
  .lgm-brand-text small { display: none; }
  .lgm-menu-toggle { display: block; margin-left: auto; }
  .lgm-nav { order: 3; width: 100%; margin: 0; display: none; }
  .lgm-nav.is-open { display: block; }
  .lgm-menu { flex-direction: column; }
  .lgm-menu > li > a { padding: 10px 12px; border-bottom: 1px solid var(--lgm-paper-deep); }
  .lgm-search { order: 2; width: 100%; }
  .lgm-search input[type="search"] { flex: 1; width: auto; }
  .lgm-footer-grid { grid-template-columns: 1fr; gap: var(--lgm-sp-4); }
  .lgm-footer-legal { grid-column: auto; }
  .lgm-article-title { font-size: var(--lgm-fs-xl); }
  .lgm-card-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .lgm-to-top { transition: none; }
}

/* ==========================================================================
   P2 · lgm-pages 八个自定义区块的前台样式
   与插件 assets/css/editor.css 的编辑器预览共用同一套设计令牌。
   ========================================================================== */

/* 版式容器 */
.lgm-blk-section { margin-bottom: var(--lgm-sp-5); }
.lgm-blk-section--tinted { background: var(--lgm-paper); padding: var(--lgm-sp-4); border-radius: var(--lgm-radius); }
.lgm-blk-section--bordered { border: 1px solid var(--lgm-gold); padding: var(--lgm-sp-4); border-radius: var(--lgm-radius); }
.lgm-blk-section--cols-2,
.lgm-blk-section--cols-3 { display: grid; gap: var(--lgm-sp-4); }
.lgm-blk-section--cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lgm-blk-section--cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.lgm-blk-section--gap-sm { gap: var(--lgm-sp-2); }
.lgm-blk-section--gap-lg { gap: var(--lgm-sp-5); }

/* 标题 */
.lgm-blk-heading { font-family: var(--lgm-font-serif); color: var(--lgm-ink); font-weight: 700; line-height: 1.45; margin: var(--lgm-sp-5) 0 var(--lgm-sp-3); border-left: 4px solid var(--lgm-red); padding-left: .55em; }
.lgm-blk-heading--h2 { font-size: var(--lgm-fs-xl); }
.lgm-blk-heading--h3 { font-size: var(--lgm-fs-lg); border-left-width: 3px; }
.lgm-blk-heading--h4 { font-size: var(--lgm-fs-md); border-left-color: var(--lgm-gold); }
.lgm-blk-heading--align-center { text-align: center; border-left: 0; border-bottom: 2px solid var(--lgm-gold); padding: 0 0 .4em; }
.lgm-blk-heading--align-right { text-align: right; border-left: 0; border-right: 4px solid var(--lgm-red); padding: 0 .55em 0 0; }

/* 正文 */
.lgm-blk-text { font-family: var(--lgm-font-sans); color: var(--lgm-text); line-height: 1.9; font-size: var(--lgm-fs-base); margin-bottom: var(--lgm-sp-4); }
.lgm-blk-text p { margin: 0 0 var(--lgm-sp-3); }
.lgm-blk-text--align-center { text-align: center; }
.lgm-blk-text--align-right { text-align: right; }
.lgm-blk-text--align-justify { text-align: justify; }
.lgm-blk-text--dropcap > p:first-of-type::first-letter { font-family: var(--lgm-font-serif); font-size: 3.2em; float: left; line-height: .9; padding: .05em .12em 0 0; color: var(--lgm-red); }

/* 单图 */
.lgm-blk-figure { margin: 0 0 var(--lgm-sp-4); }
.lgm-blk-figure img { max-width: 100%; height: auto; display: block; border-radius: var(--lgm-radius); }
.lgm-blk-figure--wide img { width: 100%; }
.lgm-blk-figure--medium img { width: 66%; margin-inline: auto; }
.lgm-blk-figure--small img { width: 40%; margin-inline: auto; }
.lgm-blk-figure-caption { font-size: var(--lgm-fs-sm); color: var(--lgm-muted); text-align: center; margin-top: var(--lgm-sp-2); }

/* 图集 */
.lgm-blk-gallery { display: grid; gap: var(--lgm-sp-3); margin-bottom: var(--lgm-sp-4); }
.lgm-blk-gallery--cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lgm-blk-gallery--cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.lgm-blk-gallery--cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.lgm-blk-gallery-item { margin: 0; }
.lgm-blk-gallery-item img { width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; border-radius: var(--lgm-radius); }
.lgm-blk-gallery-item figcaption { font-size: var(--lgm-fs-sm); color: var(--lgm-muted); margin-top: var(--lgm-sp-1); }

/* 按钮 */
.lgm-blk-button-wrap { margin: var(--lgm-sp-4) 0; }
.lgm-blk-button-wrap--align-center { text-align: center; }
.lgm-blk-button-wrap--align-right { text-align: right; }
.lgm-btn--primary { background: var(--lgm-red); color: var(--lgm-white); }
.lgm-btn--ghost { background: transparent; color: var(--lgm-red); border: 1px solid var(--lgm-gold); }
.lgm-btn--ghost:hover { background: var(--lgm-paper); color: var(--lgm-red-dark); }

/* 分隔 */
.lgm-blk-divider { border: 0; border-top: 1px solid var(--lgm-paper-deep); margin: var(--lgm-sp-4) 0; }
.lgm-blk-divider--ornament { border-top: 0; height: 18px; background: linear-gradient(90deg, transparent, var(--lgm-gold) 45%, var(--lgm-gold) 55%, transparent); position: relative; }
.lgm-blk-divider--ornament::after { content: "◇"; position: absolute; left: 50%; top: -12px; transform: translateX(-50%); color: var(--lgm-gold); font-size: 1.2rem; background: var(--lgm-white); padding: 0 8px; }
.lgm-blk-divider--space-sm { margin: var(--lgm-sp-2) 0; }
.lgm-blk-divider--space-lg { margin: var(--lgm-sp-6) 0; }

/* 业务短代码（五百灵官 / 祖师殿功德 / 财务公开等长表格） */
.lgm-blk-shortcode { overflow-x: auto; margin-bottom: var(--lgm-sp-4); }
.lgm-blk-shortcode table { width: 100%; border-collapse: collapse; }
.lgm-blk-shortcode th, .lgm-blk-shortcode td { border: 1px solid var(--lgm-paper-deep); padding: 8px 12px; font-size: var(--lgm-fs-sm); }
.lgm-blk-shortcode th { background: var(--lgm-paper-deep); font-family: var(--lgm-font-serif); }

@media (max-width: 768px) {
  .lgm-blk-section--cols-2, .lgm-blk-section--cols-3 { grid-template-columns: 1fr; }
  .lgm-blk-gallery--cols-3, .lgm-blk-gallery--cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lgm-blk-figure--medium img, .lgm-blk-figure--small img { width: 100%; }
}

/* 图集点击灯箱 */
a.lgm-lightbox { display: block; position: relative; }
a.lgm-lightbox::after {
  content: "⤢";
  position: absolute; right: 8px; bottom: 8px;
  width: 26px; height: 26px; line-height: 26px; text-align: center;
  border-radius: 50%;
  background: rgba(28, 28, 28, 0.62);
  color: var(--lgm-white, #fff);
  font-size: 14px;
  opacity: 0; transition: opacity 0.15s ease;
  pointer-events: none;
}
a.lgm-lightbox:hover::after, a.lgm-lightbox:focus-visible::after { opacity: 1; }
a.lgm-lightbox img { cursor: zoom-in; }

.lgm-lightbox-noscroll { overflow: hidden; }
.lgm-lightbox-overlay {
  display: none; position: fixed; inset: 0; z-index: 99990;
  background: rgba(15, 13, 11, 0.88);
  align-items: center; justify-content: center;
  padding: 24px;
  cursor: zoom-out;
}
.lgm-lightbox-overlay.is-open { display: flex; }
.lgm-lightbox-image {
  max-width: min(92vw, 1280px);
  max-height: 86vh;
  border-radius: 6px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
  cursor: default;
}
.lgm-lightbox-close {
  position: absolute; top: 16px; right: 16px;
  width: 40px; height: 40px; line-height: 1;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: #fff; font-size: 18px;
  cursor: pointer;
}
.lgm-lightbox-close:hover { background: var(--lgm-red, #8C2E2B); border-color: var(--lgm-red, #8C2E2B); }

/* ============================================================ P4 新区块 */

/* ---- 翻卡（lgm/cards）---- */
.lgm-blk-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--lgm-sp-3, 14px); margin: var(--lgm-sp-4, 20px) 0; }
.lgm-blk-cards--cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lgm-blk-cards--cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.lgm-card { perspective: 900px; cursor: pointer; }
.lgm-card-inner {
  position: relative; min-height: 150px;
  transform-style: preserve-3d;
  transition: transform 0.45s ease;
}
.lgm-card.is-flipped .lgm-card-inner,
.lgm-card:focus-visible .lgm-card-inner { transform: rotateY(180deg); }
@media (hover: hover) {
  .lgm-card:hover .lgm-card-inner { transform: rotateY(180deg); }
}
.lgm-card-face {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  gap: 8px; padding: 20px 16px;
  border-radius: 8px;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  text-align: center;
}
.lgm-card-face--front {
  background: var(--lgm-paper, #F5F1E8);
  border: 1px solid var(--lgm-paper-deep, #DED5C4);
}
.lgm-card-title {
  margin: 0;
  font-family: var(--lgm-font-serif, serif);
  font-size: 1.15rem; font-weight: 700;
  color: var(--lgm-ink, #2B3A3A);
}
.lgm-card-desc { margin: 0; font-size: var(--lgm-fs-sm, 14px); color: var(--lgm-muted, #7A7365); }
.lgm-card-hint { color: var(--lgm-gold, #B8935A); font-size: 1.2rem; }
.lgm-card-face--back {
  background: var(--lgm-red, #8C2E2B);
  color: var(--lgm-white, #fff);
  transform: rotateY(180deg);
}

/* ---- 轮播（lgm/carousel）---- */
.lgm-blk-carousel { position: relative; margin: var(--lgm-sp-4, 20px) 0; border-radius: 8px; overflow: hidden; }
.lgm-carousel-track { display: flex; transition: transform 0.45s ease; }
.lgm-carousel-slide { position: relative; flex: 0 0 100%; }
.lgm-carousel-slide img { display: block; width: 100%; object-fit: cover; }
.lgm-blk-carousel--h-sm .lgm-carousel-slide img { height: 260px; }
.lgm-blk-carousel--h-md .lgm-carousel-slide img { height: 380px; }
.lgm-blk-carousel--h-lg .lgm-carousel-slide img { height: 520px; }
.lgm-carousel-slide::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.05) 40%, rgba(20,15,10,0.35));
  pointer-events: none;
}
.lgm-slide-text {
  position: absolute; inset: auto 0 0 0;
  padding: 18px 22px 22px;
  color: var(--lgm-white, #fff);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.55);
}
.lgm-slide-heading {
  margin: 0 0 6px;
  font-family: var(--lgm-font-serif, serif);
  font-size: 1.35rem; font-weight: 700;
}
.lgm-slide-content {
  font-size: var(--lgm-fs-sm, 14px); line-height: 1.85;
  max-height: 30vh; overflow-y: auto;
  white-space: pre-line;
  margin-bottom: 8px;
}
.lgm-slide-content p { margin: 0 0 6px; }
.lgm-carousel-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px;
  border: 1px solid rgba(255,255,255,0.45); border-radius: 50%;
  background: rgba(20, 15, 10, 0.42);
  color: #fff; font-size: 22px; line-height: 1;
  cursor: pointer;
}
.lgm-carousel-arrow:hover { background: var(--lgm-red, #8C2E2B); border-color: var(--lgm-red, #8C2E2B); }
.lgm-carousel-arrow--prev { left: 12px; }
.lgm-carousel-arrow--next { right: 12px; }
.lgm-carousel-dots {
  position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 8px;
}
.lgm-carousel-dot {
  width: 9px; height: 9px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.75);
  background: transparent;
  padding: 0; cursor: pointer;
}
.lgm-carousel-dot.is-active { background: #fff; }

/* 幻灯型：文字在下方、图片作背景装饰（寳誥经文场景，文字优先） */
.lgm-blk-carousel--slides .lgm-carousel-slide::before {
  background: linear-gradient(180deg, rgba(245,241,232,0.94) 0%, rgba(245,241,232,0.88) 100%);
}
.lgm-blk-carousel--slides .lgm-slide-text {
  position: relative; z-index: 2;   /* 必须高于 ::before 遮罩，否则文字被盖淡 */
  padding: 22px 26px;
  color: var(--lgm-ink, #2B3A3A);
  text-shadow: none;
  background: transparent;
}
.lgm-blk-carousel--slides .lgm-slide-heading { color: var(--lgm-red, #8C2E2B); }
.lgm-blk-carousel--slides .lgm-slide-content { max-height: none; }
/* 幻灯型文字占满整块，箭头挪到底部右侧，避免压住经文 */
.lgm-blk-carousel--slides .lgm-carousel-arrow {
  top: auto; bottom: 10px; transform: none;
  width: 28px; height: 28px; font-size: 16px; line-height: 1;
  border-color: rgba(140, 46, 43, 0.35);
  background: rgba(245, 241, 232, 0.9);
  color: var(--lgm-red, #8C2E2B);
}
.lgm-blk-carousel--slides .lgm-carousel-arrow:hover { background: var(--lgm-red, #8C2E2B); color: #fff; }
.lgm-blk-carousel--slides .lgm-carousel-arrow--prev { left: auto; right: 52px; }
.lgm-blk-carousel--slides .lgm-carousel-arrow--next { right: 16px; }
.lgm-blk-carousel--slides .lgm-carousel-dots { bottom: 18px; }
.lgm-blk-carousel--slides .lgm-carousel-dot { border-color: rgba(140, 46, 43, 0.5); }
.lgm-blk-carousel--slides .lgm-carousel-dot.is-active { background: var(--lgm-red, #8C2E2B); }
.lgm-blk-carousel--slides .lgm-carousel-slide img {
  position: absolute; inset: 0; z-index: -1;
  opacity: 0.16; filter: saturate(0.6);
  height: 100%;
}

/* ---- 文章列表（lgm/posts）---- */
.lgm-blk-posts { margin: var(--lgm-sp-4, 20px) 0; }
.lgm-posts-list { list-style: none; margin: 0; padding: 0; }
.lgm-post-item {
  display: flex; gap: 14px; align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px dashed var(--lgm-paper-deep, #DED5C4);
}
.lgm-post-date {
  flex: 0 0 auto;
  font-family: var(--lgm-font-sans, sans-serif);
  font-size: var(--lgm-fs-sm, 14px);
  color: var(--lgm-muted, #7A7365);
  font-variant-numeric: tabular-nums;
}
.lgm-post-link {
  font-family: var(--lgm-font-serif, serif);
  font-size: 1.02rem;
  color: var(--lgm-ink, #2B3A3A);
  text-decoration: none;
  font-weight: 600;
}
.lgm-post-link:hover { color: var(--lgm-red, #8C2E2B); }
.lgm-post-excerpt { margin: 4px 0 0; font-size: var(--lgm-fs-sm, 14px); color: var(--lgm-muted, #7A7365); line-height: 1.7; flex: 1 1 100%; }
.lgm-post-item { flex-wrap: wrap; }
.lgm-posts-empty { color: var(--lgm-muted, #7A7365); }
.lgm-posts-more { margin-top: var(--lgm-sp-3, 14px); text-align: center; }

@media (max-width: 768px) {
  .lgm-blk-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lgm-blk-cards--cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lgm-blk-carousel--h-sm .lgm-carousel-slide img,
  .lgm-blk-carousel--h-md .lgm-carousel-slide img,
  .lgm-blk-carousel--h-lg .lgm-carousel-slide img { height: 200px; }
  .lgm-carousel-arrow { width: 30px; height: 30px; font-size: 18px; }
}

/* ---------------- 业务查询搜索区（lgm-business .search.bar6） ----------------
   原样式随 Elementor 停用而丢失：输入框与按钮换行、空按钮没有文字。
   此处自包含补齐，不依赖任何插件 CSS；组件类一律带 body.lgm-mode-new 前缀。 */
body.lgm-mode-new .lgm-prose .search.bar6 { margin: 0 0 var(--lgm-sp-4); }
body.lgm-mode-new .lgm-prose .search.bar6 form {
  display: flex;
  gap: var(--lgm-sp-2);
  align-items: stretch;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
}
body.lgm-mode-new .lgm-prose .search.bar6 input[type="text"] {
  flex: 1 1 auto;
  min-width: 0;
  box-sizing: border-box;
  padding: 9px 14px;
  border: 1px solid var(--lgm-paper-deep);
  border-radius: var(--lgm-radius);
  background: var(--lgm-white);
  color: var(--lgm-ink);
  font: inherit;
  line-height: 1.6;
}
body.lgm-mode-new .lgm-prose .search.bar6 input[type="text"]:focus {
  outline: 2px solid var(--lgm-gold);
  outline-offset: 1px;
}
body.lgm-mode-new .lgm-prose .search.bar6 .lgm-search-submit {
  flex: 0 0 auto;
  padding: 9px 28px;
  border: 0;
  border-radius: var(--lgm-radius);
  background: var(--lgm-red);
  color: var(--lgm-white);
  font: inherit;
  font-weight: 600;
  letter-spacing: .08em;
  cursor: pointer;
}
body.lgm-mode-new .lgm-prose .search.bar6 .lgm-search-submit:hover { background: var(--lgm-red-dark); }
@media (max-width: 600px) {
  body.lgm-mode-new .lgm-prose .search.bar6 .lgm-search-submit { padding: 9px 16px; }
}

/* ==========================================================================
   2026-11-13 · 控件统一修正（观察期用户反馈）
   ① 文字幻灯的 .lgm-slide-text 带 z-index:2 且铺满整块，箭头/圆点落在其下层，
      点击命中的是文字层而不是按钮 → 用独立 .lgm-carousel-controls 容器抬到 z-index:4。
   ② 父主题 button 的 padding:8px 16px 撑破 width/height，正圆变 34x28 椭圆
      → 显式 padding:0 + box-sizing:border-box + inline-flex 精确居中。
   ③ ‹ › ↑ 是文本字形，基线偏下、视觉永远对不准圆心 → 改内联 SVG（见 render.php/footer.php）。
   ④ 控件整体偏小 → 轮播箭头 38/28→46/38，圆点 9→11，返回顶部 44→54。
   组件类一律带 body.lgm-mode-new 前缀，权重高于全局 button 与旧组件规则。
   ========================================================================== */
body.lgm-mode-new button.lgm-to-top,
body.lgm-mode-new button.lgm-carousel-arrow,
body.lgm-mode-new button.lgm-carousel-dot {
  padding: 0;
  box-sizing: border-box;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

/* 返回顶部：朱红正圆 + 白色 SVG 箭头 */
body.lgm-mode-new button.lgm-to-top {
  right: 28px; bottom: 28px;
  width: 54px; height: 54px;
  border-radius: 50%;
  font-size: 24px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .28);
  transition: opacity .2s ease, background .2s ease, transform .2s ease;
}
body.lgm-mode-new button.lgm-to-top:hover { background: var(--lgm-red-dark); transform: translateY(-2px); }
body.lgm-mode-new button.lgm-to-top svg { display: block; width: 24px; height: 24px; }

/* 图片轮播：两侧箭头放大 */
body.lgm-mode-new .lgm-carousel-arrow {
  width: 46px; height: 46px;
  border: 1px solid rgba(255, 255, 255, .6);
  border-radius: 50%;
  background: rgba(20, 15, 10, .48);
  color: #fff;
  font-size: 24px;
  z-index: 3;
}
body.lgm-mode-new .lgm-carousel-arrow:hover { background: var(--lgm-red); border-color: var(--lgm-red); }
body.lgm-mode-new .lgm-carousel-arrow svg { display: block; width: 22px; height: 22px; }
body.lgm-mode-new .lgm-carousel-dots { gap: 10px; z-index: 3; }
body.lgm-mode-new .lgm-carousel-dot {
  width: 11px; height: 11px;
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 50%;
}

/* 文字幻灯：左右箭头 + 圆点合成一条居中控制条，层级高于文字层 */
body.lgm-mode-new .lgm-blk-carousel--slides .lgm-carousel-controls {
  position: absolute;
  left: 50%; bottom: 16px;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 16px;
  z-index: 4;
}
body.lgm-mode-new .lgm-blk-carousel--slides .lgm-carousel-controls .lgm-carousel-arrow,
body.lgm-mode-new .lgm-blk-carousel--slides .lgm-carousel-controls .lgm-carousel-dots {
  position: static;
  top: auto; right: auto; bottom: auto; left: auto;
  transform: none;
}
body.lgm-mode-new .lgm-blk-carousel--slides .lgm-carousel-controls .lgm-carousel-arrow {
  width: 38px; height: 38px;
  border: 1.5px solid var(--lgm-red);
  background: var(--lgm-paper);
  color: var(--lgm-red);
  box-shadow: 0 2px 8px rgba(140, 46, 43, .12);
}
body.lgm-mode-new .lgm-blk-carousel--slides .lgm-carousel-controls .lgm-carousel-arrow:hover {
  background: var(--lgm-red);
  color: var(--lgm-white);
}
body.lgm-mode-new .lgm-blk-carousel--slides .lgm-carousel-controls .lgm-carousel-arrow svg { width: 19px; height: 19px; }
body.lgm-mode-new .lgm-blk-carousel--slides .lgm-carousel-controls .lgm-carousel-dot { border-color: rgba(140, 46, 43, .55); }
body.lgm-mode-new .lgm-blk-carousel--slides .lgm-carousel-controls .lgm-carousel-dot.is-active {
  background: var(--lgm-red);
  border-color: var(--lgm-red);
}
/* 给底部控制条留出空间，避免压住经文末行 */
body.lgm-mode-new .lgm-blk-carousel--slides .lgm-slide-text { padding-bottom: 76px; }

@media (max-width: 768px) {
  body.lgm-mode-new .lgm-carousel-arrow { width: 40px; height: 40px; }
  body.lgm-mode-new .lgm-carousel-arrow svg { width: 20px; height: 20px; }
  body.lgm-mode-new button.lgm-to-top { width: 48px; height: 48px; right: 18px; bottom: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  body.lgm-mode-new button.lgm-to-top { transition: none; }
}

/* ==========================================================================
   2026-11-13 · 首页「最新动态」信息瀑布流（lgm/posts layout=masonry）
   纯 CSS 多列，无 JS 依赖；卡片因图片比例/摘要长短自然错落。
   组件类一律带 body.lgm-mode-new 前缀（尤其 h4 与 a，避免被全局规则压色）。
   ========================================================================== */
body.lgm-mode-new .lgm-blk-posts--masonry .lgm-posts-masonry {
  column-count: 3;
  column-gap: 18px;
}
body.lgm-mode-new .lgm-blk-posts--masonry .lgm-post-card {
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  display: inline-block;
  width: 100%;
  margin: 0 0 18px;
  background: var(--lgm-white, #fff);
  border: 1px solid var(--lgm-paper-deep, #DED5C4);
  border-radius: var(--lgm-radius, 6px);
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(43, 58, 58, .06);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
body.lgm-mode-new .lgm-blk-posts--masonry .lgm-post-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(43, 58, 58, .13);
  border-color: var(--lgm-gold, #B8935A);
}
body.lgm-mode-new .lgm-blk-posts--masonry a.lgm-post-card-link,
body.lgm-mode-new .lgm-blk-posts--masonry a.lgm-post-card-link:hover {
  display: block;
  color: var(--lgm-ink, #2B3A3A);
  text-decoration: none;
}
body.lgm-mode-new .lgm-blk-posts--masonry .lgm-post-card-figure {
  margin: 0;
  background: var(--lgm-paper, #F5F1E8);
}
body.lgm-mode-new .lgm-blk-posts--masonry .lgm-post-card-figure img {
  display: block; width: 100%; height: auto;
  transition: transform .35s ease;
}
body.lgm-mode-new .lgm-blk-posts--masonry .lgm-post-card:hover .lgm-post-card-figure img { transform: scale(1.035); }
body.lgm-mode-new .lgm-blk-posts--masonry .lgm-post-card-body { padding: 14px 16px 16px; }
body.lgm-mode-new .lgm-blk-posts--masonry .lgm-post-card-cat {
  display: inline-block;
  margin-bottom: 7px;
  padding: 2px 9px;
  border-radius: 12px;
  background: rgba(140, 46, 43, .08);
  color: var(--lgm-red, #8C2E2B);
  font-size: 12px;
  letter-spacing: .06em;
}
body.lgm-mode-new .lgm-blk-posts--masonry h4.lgm-post-card-title {
  margin: 0 0 8px;
  font-family: var(--lgm-font-serif, serif);
  font-size: 1.04rem;
  font-weight: 700;
  line-height: 1.55;
  color: var(--lgm-ink, #2B3A3A);
}
body.lgm-mode-new .lgm-blk-posts--masonry .lgm-post-card:hover h4.lgm-post-card-title { color: var(--lgm-red, #8C2E2B); }
body.lgm-mode-new .lgm-blk-posts--masonry .lgm-post-card-excerpt {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.75;
  color: var(--lgm-muted, #7A7365);
}
body.lgm-mode-new .lgm-blk-posts--masonry .lgm-post-card-date {
  display: block;
  font-size: 12px;
  color: var(--lgm-muted, #7A7365);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 1024px) {
  body.lgm-mode-new .lgm-blk-posts--masonry .lgm-posts-masonry { column-count: 2; }
}
@media (max-width: 640px) {
  body.lgm-mode-new .lgm-blk-posts--masonry .lgm-posts-masonry { column-count: 1; }
}

/* ---- 瀑布流「滚动到底自动加载」状态区 ---- */
body.lgm-mode-new .lgm-posts-loader { text-align: center; padding: 2px 0 6px; }
body.lgm-mode-new .lgm-posts-loader-sentinel { height: 1px; }
body.lgm-mode-new .lgm-posts-loader-status {
  min-height: 1.4em;
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--lgm-muted, #7A7365);
}
body.lgm-mode-new .lgm-posts-loader-more[hidden] { display: none; }
body.lgm-mode-new [data-lgm-loading="1"] .lgm-posts-loader-status::after {
  content: "";
  display: inline-block;
  width: 10px; height: 10px;
  margin-left: 8px;
  vertical-align: -1px;
  border: 2px solid var(--lgm-paper-deep, #DED5C4);
  border-top-color: var(--lgm-red, #8C2E2B);
  border-radius: 50%;
  animation: lgm-loader-spin .7s linear infinite;
}
@keyframes lgm-loader-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  body.lgm-mode-new [data-lgm-loading="1"] .lgm-posts-loader-status::after { animation: none; }
}

/* ==========================================================================
   2026-11-13 · 寳誥文字幻灯（slides 变体 + skin=plaque）：仿原版居中版式 + 底衬 + 大字
   原版（Elementor Slides）为 text_align:center / 水平垂直居中、金色字压在图上，
   可读性差；此处保留居中与淡金字，另加暖墨半透明「碑面」底衬与描金双线。
   图片改为绝对铺满整块背景，高度由经文长度决定，避免固定 380px 高裁掉末行。
   组件类一律带 body.lgm-mode-new 前缀。
   ========================================================================== */
body.lgm-mode-new .lgm-blk-carousel--plaque {
  background: #1B1712;
  border-radius: 6px;
}
/* 图片：铺满整块做背景，纵向略偏上取景 */
body.lgm-mode-new .lgm-blk-carousel--plaque .lgm-carousel-slide {
  min-height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
}
body.lgm-mode-new .lgm-blk-carousel--plaque .lgm-carousel-slide img {
  position: absolute;
  inset: 0;
  z-index: 0;              /* 旧规则为 -1（沉到区块背景之下）→ 抬到 0，遮罩 1、文字 2 */
  opacity: .42;            /* 旧规则为 .16（几乎看不见的水印），此处给到可辨识 */
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  filter: blur(2px) saturate(1.02);
  transform: scale(1.04);
}
/* 压暗背景，让底衬与经文浮起来（保留照片可辨识度） */
body.lgm-mode-new .lgm-blk-carousel--plaque .lgm-carousel-slide::before {
  z-index: 1;
  background:
    radial-gradient(120% 95% at 50% 38%, rgba(18,14,10,.06) 0%, rgba(14,11,8,.38) 100%),
    linear-gradient(180deg, rgba(14,11,8,.16), rgba(14,11,8,.26));
}
/* 文字层：铺满、水平垂直居中、底部留出控制条空间 */
body.lgm-mode-new .lgm-blk-carousel--plaque .lgm-slide-text {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 54px 22px 92px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #F6EBD2;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .5);
}
/* 底衬：暖墨碑面 + 描金外框 */
body.lgm-mode-new .lgm-blk-carousel--plaque .lgm-slide-panel {
  position: relative;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 34px 44px 32px;
  text-align: center;
  background: linear-gradient(180deg, rgba(26, 22, 17, .88) 0%, rgba(18, 15, 11, .92) 100%);
  border: 1px solid rgba(206, 172, 112, .78);
  border-radius: 3px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, .55), inset 0 0 70px rgba(0, 0, 0, .28);
  -webkit-backdrop-filter: blur(3px) saturate(1.05);
  backdrop-filter: blur(3px) saturate(1.05);
}
/* 内层细描金线 */
body.lgm-mode-new .lgm-blk-carousel--plaque .lgm-slide-panel::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(196, 162, 104, .30);
  border-radius: 2px;
  pointer-events: none;
}
/* 标题：淡金、字距拉开，下方一道渐隐金线 */
body.lgm-mode-new .lgm-blk-carousel--plaque .lgm-slide-heading {
  position: relative;
  margin: 0 0 20px;
  padding: 0 0 16px;
  font-family: var(--lgm-font-serif);
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: .22em;
  text-indent: .22em;
  color: #F3DFA6;
}
body.lgm-mode-new .lgm-blk-carousel--plaque .lgm-slide-heading::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 68px;
  height: 1px;
  margin-left: -34px;
  background: linear-gradient(90deg, rgba(184, 147, 90, 0), rgba(206, 172, 112, .95), rgba(184, 147, 90, 0));
}
/* 经文：居中、字号由 14px 提到 17px、行距加大 */
body.lgm-mode-new .lgm-blk-carousel--plaque .lgm-slide-content {
  margin: 0;
  font-family: var(--lgm-font-serif);
  font-size: 1.0625rem;
  line-height: 2.05;
  letter-spacing: .04em;
  text-align: center;
  color: #F7EDD5;
  white-space: pre-line;
  max-height: none;
  overflow: visible;
}
/* 控制条：深底上的金色描边版 */
body.lgm-mode-new .lgm-blk-carousel--plaque .lgm-carousel-controls { bottom: 18px; gap: 18px; z-index: 5; }
body.lgm-mode-new .lgm-blk-carousel--plaque .lgm-carousel-controls .lgm-carousel-arrow {
  border: 1px solid rgba(243, 223, 166, .7);
  background: rgba(23, 19, 14, .55);
  color: #F3DFA6;
  box-shadow: none;
}
body.lgm-mode-new .lgm-blk-carousel--plaque .lgm-carousel-controls .lgm-carousel-arrow:hover {
  background: var(--lgm-red);
  border-color: var(--lgm-red);
  color: var(--lgm-white);
}
body.lgm-mode-new .lgm-blk-carousel--plaque .lgm-carousel-controls .lgm-carousel-dot {
  border-color: rgba(243, 223, 166, .7);
}
body.lgm-mode-new .lgm-blk-carousel--plaque .lgm-carousel-controls .lgm-carousel-dot.is-active {
  background: #F3DFA6;
  border-color: #F3DFA6;
}

@media (max-width: 768px) {
  body.lgm-mode-new .lgm-blk-carousel--plaque .lgm-carousel-slide { min-height: 0; }
  body.lgm-mode-new .lgm-blk-carousel--plaque .lgm-slide-text { padding: 30px 14px 78px; }
  body.lgm-mode-new .lgm-blk-carousel--plaque .lgm-slide-panel { padding: 24px 20px 22px; }
  body.lgm-mode-new .lgm-blk-carousel--plaque .lgm-slide-heading {
    font-size: 1.3rem; margin-bottom: 14px; padding-bottom: 12px; letter-spacing: .16em; text-indent: .16em;
  }
  body.lgm-mode-new .lgm-blk-carousel--plaque .lgm-slide-content {
    font-size: 1rem; line-height: 1.95; letter-spacing: .02em;
  }
  body.lgm-mode-new .lgm-blk-carousel--plaque .lgm-carousel-controls { bottom: 14px; gap: 14px; }
}

/* ==========================================================================
   2026-11-13 · 首页关键词幻灯（slides 变体 + skin=paper）：浅色碑面 + 描金框
   与寳誥深色碑面同一套版式（水平垂直居中 / 大字 / 底衬 / 底衬下方的控制条），
   只把底衬换成宣纸浅底、文字换成深墨，适配首页纸色页面。
   首页「五进 / 五好 / 四正四清」为纯文字幻灯（无图），故高度由内容决定。
   组件类一律带 body.lgm-mode-new 前缀。
   ========================================================================== */
body.lgm-mode-new .lgm-blk-carousel--paper {
  background: transparent;
  border-radius: 6px;
}
body.lgm-mode-new .lgm-blk-carousel--paper .lgm-carousel-slide {
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* 纯文字幻灯不需要压暗遮罩，保留页面纸底 */
body.lgm-mode-new .lgm-blk-carousel--paper .lgm-carousel-slide::before {
  background: none;
}
/* 若日后给幻灯配图，仅作极淡底纹 */
body.lgm-mode-new .lgm-blk-carousel--paper .lgm-carousel-slide img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  opacity: .10;
  filter: saturate(.7);
}
/* 文字层：铺满、水平垂直居中、底部留出控制条空间 */
body.lgm-mode-new .lgm-blk-carousel--paper .lgm-slide-text {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 42px 22px 92px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--lgm-ink, #2E2A22);
  text-shadow: none;
}
/* 底衬：宣纸浅面 + 描金外框（比页面底色更亮一档，靠金线与投影浮起） */
body.lgm-mode-new .lgm-blk-carousel--paper .lgm-slide-panel {
  position: relative;
  width: 100%;
  max-width: 620px;   /* 首页关键词为短语，620 比 720 更贴合文字宽度，避免两侧过空 */
  margin: 0 auto;
  padding: 30px 44px 28px;
  text-align: center;
  background: linear-gradient(180deg, #FFFDF7 0%, #FAF3E4 100%);
  border: 1px solid rgba(196, 162, 104, .62);
  border-radius: 3px;
  box-shadow: 0 16px 40px rgba(122, 96, 58, .16), inset 0 0 46px rgba(196, 162, 104, .10);
}
/* 内层细描金线 */
body.lgm-mode-new .lgm-blk-carousel--paper .lgm-slide-panel::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(196, 162, 104, .34);
  border-radius: 2px;
  pointer-events: none;
}
/* 标题：朱红、字距拉开，下方一道渐隐金线 */
body.lgm-mode-new .lgm-blk-carousel--paper .lgm-slide-heading {
  position: relative;
  margin: 0 0 20px;
  padding: 0 0 16px;
  font-family: var(--lgm-font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: .22em;
  text-indent: .22em;
  color: var(--lgm-red, #8C2E2B);
}
body.lgm-mode-new .lgm-blk-carousel--paper .lgm-slide-heading::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 68px;
  height: 1px;
  margin-left: -34px;
  background: linear-gradient(90deg, rgba(184, 147, 90, 0), rgba(184, 147, 90, .9), rgba(184, 147, 90, 0));
}
/* 正文：居中、字号由 14px 提到 17px、行距加大 */
body.lgm-mode-new .lgm-blk-carousel--paper .lgm-slide-content {
  margin: 0;
  font-family: var(--lgm-font-serif);
  font-size: 1.0625rem;
  line-height: 2.02;
  letter-spacing: .06em;
  text-align: center;
  color: #332D24;
  white-space: pre-line;
  max-height: none;
  overflow: visible;
}
/* 控制条：纸底上的朱红描边版（沿用 slides 基础样式，仅补投影） */
body.lgm-mode-new .lgm-blk-carousel--paper .lgm-carousel-controls { bottom: 18px; gap: 18px; z-index: 5; }
body.lgm-mode-new .lgm-blk-carousel--paper .lgm-carousel-controls .lgm-carousel-arrow {
  background: #FFFDF7;
  box-shadow: 0 3px 10px rgba(122, 96, 58, .16);
}
body.lgm-mode-new .lgm-blk-carousel--paper .lgm-carousel-controls .lgm-carousel-arrow:hover {
  background: var(--lgm-red);
  border-color: var(--lgm-red);
  color: var(--lgm-white);
}

@media (max-width: 768px) {
  body.lgm-mode-new .lgm-blk-carousel--paper .lgm-slide-text { padding: 26px 14px 80px; }
  body.lgm-mode-new .lgm-blk-carousel--paper .lgm-slide-panel { padding: 22px 18px 20px; }
  body.lgm-mode-new .lgm-blk-carousel--paper .lgm-slide-heading {
    font-size: 1.25rem; margin-bottom: 14px; padding-bottom: 12px; letter-spacing: .16em; text-indent: .16em;
  }
  body.lgm-mode-new .lgm-blk-carousel--paper .lgm-slide-content {
    font-size: 1rem; line-height: 1.95; letter-spacing: .03em;
  }
  body.lgm-mode-new .lgm-blk-carousel--paper .lgm-carousel-controls { bottom: 14px; gap: 14px; }
}

/* ==========================================================================
   2026-11-14 · v1.1.0 通用入场动画 + 5 个新组件（手风琴/选项卡/横幅/引文/图片库）
   组件类一律带 body.lgm-mode-new 前缀。动画只在 JS 给 <html> 加 lgm-anim-ready
   类后才生效：无 JS、reduced-motion 用户看到的是完全静态的内容，不会白屏。
   ========================================================================== */

/* ---- 入场动画（所有带 data-lgm-anim 的区块根元素） ---- */
html.lgm-anim-ready body.lgm-mode-new [data-lgm-anim] {
  opacity: 0;
  transition: opacity .65s ease, transform .65s ease;
}
html.lgm-anim-ready body.lgm-mode-new [data-lgm-anim="fade-up"] { transform: translateY(26px); }
html.lgm-anim-ready body.lgm-mode-new [data-lgm-anim="zoom"] { transform: scale(.94); }
html.lgm-anim-ready body.lgm-mode-new [data-lgm-anim].is-lgm-anim-in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  html.lgm-anim-ready body.lgm-mode-new [data-lgm-anim] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ---- 折叠手风琴（lgm/accordion）：details/summary，纸底描金卡 ---- */
body.lgm-mode-new .lgm-blk-accordion {
  margin: var(--lgm-sp-4, 20px) 0;
  border: 1px solid var(--lgm-paper-deep, #DED5C4);
  border-radius: 6px;
  background: #FFFDF7;
  overflow: hidden;
}
body.lgm-mode-new .lgm-blk-accordion .lgm-accordion-item + .lgm-accordion-item {
  border-top: 1px solid var(--lgm-paper-deep, #DED5C4);
}
body.lgm-mode-new .lgm-blk-accordion .lgm-accordion-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 18px;
  cursor: pointer;
  font-family: var(--lgm-font-serif, serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--lgm-ink, #2B3A3A);
  list-style: none;
  user-select: none;
}
body.lgm-mode-new .lgm-blk-accordion .lgm-accordion-summary::-webkit-details-marker { display: none; }
body.lgm-mode-new .lgm-blk-accordion .lgm-accordion-summary:hover .lgm-accordion-title { color: var(--lgm-red, #8C2E2B); }
body.lgm-mode-new .lgm-blk-accordion .lgm-accordion-chevron {
  flex: 0 0 auto;
  color: var(--lgm-red, #8C2E2B);
  transition: transform .3s ease;
}
body.lgm-mode-new .lgm-blk-accordion .lgm-accordion-item[open] .lgm-accordion-chevron { transform: rotate(180deg); }
body.lgm-mode-new .lgm-blk-accordion .lgm-accordion-content {
  padding: 4px 18px 18px;
  font-size: var(--lgm-fs-base, 16px);
  line-height: 1.9;
  color: var(--lgm-ink, #2B3A3A);
}
body.lgm-mode-new .lgm-blk-accordion .lgm-accordion-content p { margin: 0 0 .6em; }
body.lgm-mode-new .lgm-blk-accordion .lgm-accordion-content p:last-child { margin-bottom: 0; }

/* ---- 选项卡（lgm/tabs）：纸底标签行 + 描金下划线 ---- */
body.lgm-mode-new .lgm-blk-tabs { margin: var(--lgm-sp-4, 20px) 0; }
body.lgm-mode-new .lgm-blk-tabs .lgm-tabs-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  border-bottom: 1px solid var(--lgm-paper-deep, #DED5C4);
  margin-bottom: var(--lgm-sp-3, 14px);
}
body.lgm-mode-new .lgm-blk-tabs .lgm-tab {
  padding: 10px 18px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  font-family: var(--lgm-font-serif, serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--lgm-ink, #2B3A3A);
  cursor: pointer;
}
body.lgm-mode-new .lgm-blk-tabs .lgm-tab:hover { color: var(--lgm-red, #8C2E2B); }
body.lgm-mode-new .lgm-blk-tabs .lgm-tab.is-active {
  color: var(--lgm-red, #8C2E2B);
  border-bottom-color: rgba(196, 162, 104, .85);
}
/* JS 就绪后才隐藏非激活面板：无 JS 时内容平铺，不丢内容 */
body.lgm-mode-new .lgm-blk-tabs[data-lgm-tabs-js="1"] .lgm-tab-panel:not(.is-active) { display: none; }
body.lgm-mode-new .lgm-blk-tabs .lgm-tab-panel {
  padding: 4px 2px 0;
  font-size: var(--lgm-fs-base, 16px);
  line-height: 1.9;
  color: var(--lgm-ink, #2B3A3A);
}
body.lgm-mode-new .lgm-blk-tabs .lgm-tab-panel p { margin: 0 0 .6em; }
body.lgm-mode-new .lgm-blk-tabs .lgm-tab-panel p:last-child { margin-bottom: 0; }

/* ---- 图文横幅（lgm/hero）：整幅照片 + 压暗遮罩 + 居中文字 ---- */
body.lgm-mode-new .lgm-blk-hero {
  position: relative;
  margin: var(--lgm-sp-4, 20px) 0;
  border-radius: 8px;
  overflow: hidden;
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1B1712;
}
body.lgm-mode-new .lgm-blk-hero--h-sm { min-height: 300px; }
body.lgm-mode-new .lgm-blk-hero--h-md { min-height: 420px; }
body.lgm-mode-new .lgm-blk-hero--h-lg { min-height: 560px; }
body.lgm-mode-new .lgm-blk-hero .lgm-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  z-index: 0;
}
body.lgm-mode-new .lgm-blk-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(120% 100% at 50% 40%, rgba(18,14,10,.18) 0%, rgba(14,11,8,.58) 100%),
    linear-gradient(180deg, rgba(14,11,8,.30), rgba(14,11,8,.44));
  pointer-events: none;
}
body.lgm-mode-new .lgm-blk-hero .lgm-hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 860px;
  padding: 44px 26px;
  text-align: center;
  color: #F6EBD2;
  text-shadow: 0 1px 10px rgba(0, 0, 0, .55);
}
body.lgm-mode-new .lgm-blk-hero .lgm-hero-heading {
  margin: 0 0 14px;
  font-family: var(--lgm-font-serif, serif);
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-indent: .14em;
  line-height: 1.5;
  color: #FFF8E3;
}
body.lgm-mode-new .lgm-blk-hero .lgm-hero-sub {
  margin: 0 0 22px;
  font-family: var(--lgm-font-serif, serif);
  font-size: 1.0625rem;
  line-height: 2;
  letter-spacing: .05em;
  white-space: pre-line;
  color: #F0E6CC;
}
body.lgm-mode-new .lgm-blk-hero .lgm-hero-btn { text-shadow: none; }
@media (max-width: 768px) {
  body.lgm-mode-new .lgm-blk-hero--h-sm { min-height: 240px; }
  body.lgm-mode-new .lgm-blk-hero--h-md { min-height: 340px; }
  body.lgm-mode-new .lgm-blk-hero--h-lg { min-height: 440px; }
  body.lgm-mode-new .lgm-blk-hero .lgm-hero-inner { padding: 28px 16px; }
  body.lgm-mode-new .lgm-blk-hero .lgm-hero-heading { font-size: 1.45rem; }
  body.lgm-mode-new .lgm-blk-hero .lgm-hero-sub { font-size: 1rem; }
}

/* ---- 引文警句（lgm/quote）：描金卡片 ---- */
body.lgm-mode-new .lgm-blk-quote {
  position: relative;
  margin: var(--lgm-sp-4, 20px) auto;
  padding: 30px 44px 26px;
  max-width: 760px;
  text-align: center;
  background: linear-gradient(180deg, #FFFDF7 0%, #FAF3E4 100%);
  border: 1px solid rgba(196, 162, 104, .55);
  border-radius: 3px;
  box-shadow: 0 12px 32px rgba(122, 96, 58, .12);
}
body.lgm-mode-new .lgm-blk-quote::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(196, 162, 104, .28);
  border-radius: 2px;
  pointer-events: none;
}
body.lgm-mode-new .lgm-blk-quote .lgm-quote-mark {
  display: block;
  font-size: 2rem;
  line-height: 1;
  color: rgba(196, 162, 104, .8);
  margin-bottom: 8px;
}
body.lgm-mode-new .lgm-blk-quote .lgm-quote-text {
  margin: 0;
  font-family: var(--lgm-font-serif, serif);
  font-size: 1.125rem;
  line-height: 2.05;
  letter-spacing: .05em;
  white-space: pre-line;
  color: #332D24;
}
body.lgm-mode-new .lgm-blk-quote .lgm-quote-by {
  margin-top: 14px;
  padding-top: 12px;
  font-family: var(--lgm-font-serif, serif);
  font-size: .95rem;
  letter-spacing: .08em;
  color: var(--lgm-red, #8C2E2B);
}
body.lgm-mode-new .lgm-blk-quote .lgm-quote-by::before {
  content: "";
  display: block;
  width: 68px;
  height: 1px;
  margin: 0 auto 12px;
  background: linear-gradient(90deg, rgba(184, 147, 90, 0), rgba(184, 147, 90, .85), rgba(184, 147, 90, 0));
}
@media (max-width: 768px) {
  body.lgm-mode-new .lgm-blk-quote { padding: 22px 20px 20px; }
  body.lgm-mode-new .lgm-blk-quote .lgm-quote-text { font-size: 1rem; line-height: 1.95; }
}

/* ---- 图片库·瀑布流（lgm/photowall）：纯 CSS 多列，点击灯箱 ---- */
body.lgm-mode-new .lgm-blk-photowall {
  margin: var(--lgm-sp-4, 20px) 0;
  column-count: 3;
  column-gap: 14px;
}
body.lgm-mode-new .lgm-blk-photowall--cols-2 { column-count: 2; }
body.lgm-mode-new .lgm-blk-photowall--cols-3 { column-count: 3; }
body.lgm-mode-new .lgm-blk-photowall--cols-4 { column-count: 4; }
body.lgm-mode-new .lgm-blk-photowall .lgm-photowall-item {
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  display: inline-block;
  width: 100%;
  margin: 0 0 14px;
  border: 1px solid var(--lgm-paper-deep, #DED5C4);
  border-radius: 6px;
  background: #FFFDF7;
  overflow: hidden;
  transition: box-shadow .25s ease, transform .25s ease;
}
body.lgm-mode-new .lgm-blk-photowall .lgm-photowall-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(122, 96, 58, .18);
}
body.lgm-mode-new .lgm-blk-photowall .lgm-photowall-item img {
  display: block;
  width: 100%;
  height: auto;
}
body.lgm-mode-new .lgm-blk-photowall .lgm-photowall-item figcaption {
  padding: 8px 12px;
  font-size: var(--lgm-fs-sm, 14px);
  color: var(--lgm-ink, #2B3A3A);
  border-top: 1px solid var(--lgm-paper-deep, #DED5C4);
}
@media (max-width: 1024px) {
  body.lgm-mode-new .lgm-blk-photowall,
  body.lgm-mode-new .lgm-blk-photowall--cols-4 { column-count: 2; }
}
@media (max-width: 640px) {
  body.lgm-mode-new .lgm-blk-photowall,
  body.lgm-mode-new .lgm-blk-photowall--cols-2,
  body.lgm-mode-new .lgm-blk-photowall--cols-4 { column-count: 1; }
}
