:root {
  --bg: #f3ece1;
  --bg-deep: #ebe3d6;
  --paper: #fffaf3;
  --paper-2: #f8f1e6;
  --ink: #2a2318;
  --body: #5a4c3c;
  --muted: #8a7b68;
  --line: #e4d8c6;
  --cinnabar: #b14332;
  --cinnabar-deep: #8e3326;
  --gold: #c4a574;
  --shadow: 0 10px 28px rgba(74, 52, 28, .08);
  --serif: "Noto Serif CJK SC", "Source Han Serif SC", "Songti SC", serif;
  --sans: "Noto Sans CJK SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --kai: "AR PL KaitiM GB", "STKaiti", "KaiTi", serif;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html, body { background: var(--bg); color: var(--ink); font-family: var(--sans); }
body { line-height: 1.7; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* hidden 不得被后面的 display:flex 盖掉，否则空详情遮罩会挡住整页（同文抄弹窗修复）。 */
.dialog-back[hidden],
.loading-bar[hidden],
.pager[hidden],
.missing-hint[hidden],
.dialog .notes[hidden],
.miss-tip[hidden],
.miss-pop[hidden],
.dlg-font-row[hidden],
.pdf-opts[hidden],
.dlg-print-row[hidden],
.dialog .acts[hidden],
#dlgNewsPanel[hidden],
#dlgArticlePanel[hidden] {
  display: none !important;
}
button, input, select { font: inherit; color: inherit; }
.page { min-height: 100vh; display: flex; flex-direction: column; }
.wrap { width: min(1160px, calc(100% - 48px)); margin: 0 auto; }

.top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(243, 236, 225, .92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.top-inner { display: flex; align-items: center; gap: 28px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-logo { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; display: block; }
.seal {
  width: 28px; height: 28px; border-radius: 4px;
  background: var(--cinnabar); color: #fffaf3;
  font-family: var(--kai); font-size: 18px; line-height: 28px; text-align: center;
  box-shadow: 1px 1px 0 #7a2c22;
}
.brand-name { font-family: var(--serif); font-size: 22px; font-weight: 700; letter-spacing: .18em; }
nav.menu { display: flex; align-items: center; gap: 2px; flex: 1; flex-wrap: wrap; }
nav.menu a {
  padding: 8px 12px; border-radius: 999px;
  font-size: 15px; color: var(--body);
}
nav.menu a:hover, nav.menu a.is-on { color: var(--cinnabar); background: rgba(177, 67, 50, .08); }
.menu-toggle {
  display: none; margin-left: auto;
  width: 42px; height: 42px; border: 1px solid var(--line);
  background: transparent; border-radius: 10px; cursor: pointer;
}
.menu-toggle span { display: block; width: 18px; height: 2px; margin: 4px auto; background: var(--ink); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 40px; padding: 0 18px; border-radius: 999px;
  font-size: 14px; font-weight: 600; border: 1px solid transparent; cursor: pointer;
  background: none;
}
.btn-ghost { border-color: var(--line); background: transparent; color: var(--body); }
.btn-solid { background: var(--cinnabar); color: #fffaf3; border-color: var(--cinnabar); }
.btn:disabled, .btn.is-off { opacity: .45; cursor: not-allowed; }
.btn-solid:hover { background: var(--cinnabar-deep); }

section.block { padding: 36px 0 8px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.sec-head h2 { font-family: var(--serif); font-size: 28px; font-weight: 700; letter-spacing: .08em; }
.sec-head h2 small { display: block; margin-top: 4px; font-family: var(--sans); font-size: 13px; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.sec-head .more { color: var(--muted); font-size: 13px; }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.news { display: grid; grid-template-columns: 1.2fr .8fr; gap: 16px; }
.news-card { padding: 22px 22px 18px; }
.news-card h3 { font-family: var(--serif); font-size: 22px; margin: 6px 0 10px; overflow-wrap: anywhere; }
.news-card .news-subtitle { font-family: var(--serif); font-size: 15px; font-weight: 400; line-height: 1.5; color: var(--muted, #6b5e52); margin: -4px 0 12px; overflow-wrap: anywhere; }
.news-side .side-copy { flex: 1; min-width: 0; }
.news-side .side-subtitle { font-size: 13px; margin: 4px 0 0; line-height: 1.45; color: var(--muted, #6b5e52); overflow-wrap: anywhere; }
.news-card p, .news-card li { color: var(--body); font-size: 15px; }
.news-card .tag { color: var(--cinnabar); font-size: 12px; letter-spacing: .16em; }
.news-side ul { list-style: none; }
.news-side li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.news-side li:first-child { border-top: 0; padding-top: 0; }
.news-side time { color: var(--muted); font-size: 13px; flex-shrink: 0; }
.news-card.is-link { cursor: pointer; }
.news-card.is-link:hover { border-color: #d8c4a8; }
.empty { padding: 28px 22px; color: var(--muted); text-align: center; }

.article-tools { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.font-bar { display: flex; flex-wrap: wrap; gap: 8px; }

.pdf-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; font-size: 13px; color: var(--muted, #6b5e52); }
.pdf-opt { display: inline-flex; align-items: center; gap: 6px; }
.pdf-opt input[type="checkbox"] { margin: 0; }
.fg-preset { font: inherit; padding: 2px 8px; border: 1px solid var(--line, #d9cfc3); background: #fff; border-radius: 4px; color: inherit; cursor: pointer; }
.fg-preset.on { border-color: var(--cinnabar, #b54434); color: var(--cinnabar, #b54434); }
.pdf-fg { width: 28px; height: 22px; padding: 0; border: 1px solid var(--line, #d9cfc3); background: #fff; cursor: pointer; }
.dialog .pdf-opts { margin-top: 12px; }

.carousel-note {
  margin: 0 0 14px;
  padding: 8px 12px;
  font-size: 13px;
  color: #6b5e52;
  background: #f6efe4;
  border: 1px solid #e6d8c4;
  border-radius: 8px;
}
.carousel-note[hidden] { display: none !important; }
.print-opts, .dlg-print-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  font-size: 12px;
  color: var(--muted, #6b5e52);
}
.print-opts label, .dlg-print-row label { display: flex; align-items: center; gap: 4px; }
.print-opts select, .dlg-print-row select {
  max-width: 110px;
  padding: 4px 6px;
  border: 1px solid #d9cbb6;
  border-radius: 6px;
  background: #fffdf8;
  font: inherit;
}
.card-print { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.dlg-print-row { margin-top: 10px; }


.chip {
  display: inline-flex; align-items: center; height: 34px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--paper);
  font-size: 13px; color: var(--body); cursor: pointer;
}
.chip.is-on { border-color: var(--cinnabar); color: var(--cinnabar); background: rgba(177, 67, 50, .08); }
.chip:disabled { opacity: .45; cursor: not-allowed; }

.agrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.acard { padding: 20px 20px 16px; display: flex; flex-direction: column; min-height: 260px; cursor: pointer; }
.acard:hover { border-color: #d8c4a8; }
.acard .title-fixed, .dialog .title-fixed {
  font-family: var(--serif); font-size: 18px; font-weight: 700; line-height: 1.4;
  color: var(--ink);
}
.acard .author { font-family: var(--serif); font-size: 13px; color: var(--muted); margin: 2px 0 0; }
.acard .author.has { color: var(--body); }
.acard .excerpt, .glyph-line { color: var(--ink); font-size: 16px; line-height: 1.7; }
.acard .excerpt {
  flex: 1 1 auto;
  font-size: 23px;
  line-height: 1.65;
  max-height: calc(23px * 1.65 * 5);
  min-height: calc(23px * 1.65 * 5);
  overflow: hidden;
  position: relative;
  white-space: pre-wrap;
}
.acard .excerpt.is-pending,
.dialog .body.is-pending {
  /* 占位保高度，不放打印体正文 */
  color: transparent;
}

.acard.is-enter {
  animation: acard-flyin .32s ease-out both;
}
@keyframes acard-flyin {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
.acard .excerpt.is-reveal {
  animation: excerpt-show .16s ease-out both;
}
@keyframes excerpt-show {
  from { opacity: 0; }
  to { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .acard.is-enter,
  .acard .excerpt.is-reveal {
    animation: none;
  }
}
.acard .excerpt.is-error,
.dialog .body.is-error { color: var(--muted); }
.glyph-line .paint-error {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.5;
  padding: 4px 0;
}
.acard .excerpt.is-overflow::after {
  content: "…";
  position: absolute;
  right: 0; bottom: 0;
  padding: 0 2px 0 18px;
  background: linear-gradient(to right, rgba(255,250,243,0), var(--paper) 40%);
  font-family: var(--serif);
  font-size: 23px;
  line-height: 1.65;
  color: var(--ink);
  pointer-events: none;
}
.glyph-line {
  display: flex; flex-wrap: wrap; align-items: flex-end;
  gap: 0 1px; letter-spacing: 0; min-width: 0;
}
/* 内联字形严格跟随上下文字号，不得用 PNG 固有像素撑开标题或改成竖排。 */
.glyph-line img, img.glyph, .glyph-line span.glyph, span.glyph {
  display: inline-block;
  width: 1em; height: 1em;
  max-width: 1em; max-height: 1em;
  flex-shrink: 0; vertical-align: -0.15em;
}
.glyph-line span.glyph, span.glyph {
  background-repeat: no-repeat;
  background-origin: border-box;
}
.glyph-line .sp { width: .45em; height: 1em; flex-shrink: 0; }
.glyph-line .nl { flex-basis: 100%; height: 0; }
.glyph-line img.miss, .glyph-line span.glyph.miss { opacity: .9; }
.glyph-line img.fallback, .glyph-line span.glyph.fallback { opacity: 1; }
.dialog .body, .dialog .body.glyph-line { font-size: 23px; line-height: 1.7; min-height: 4em; }
.dialog .title-fixed { margin-top: 0; font-size: 20px; }
.dialog .author { margin: 4px 0 0; font-family: var(--serif); }
.acard .meta { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.meta-top, .meta-bottom { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.meta-bottom { align-items: center; margin-top: 8px; flex-wrap: wrap; }
.identity { min-width: 0; flex: 1; }
.font-used { font-size: 12px; color: var(--muted); }
.card-font, .dlg-font-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 13px; color: var(--body); position: relative;
}
.card-font select, .dlg-font-row select {
  max-width: 42vw; height: 32px; padding: 0 8px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--paper);
}
.miss-tip {
  width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid var(--cinnabar); background: rgba(177,67,50,.08);
  color: var(--cinnabar-deep); font-weight: 700; cursor: pointer; line-height: 26px;
}
.miss-pop {
  position: absolute; right: 0; bottom: calc(100% + 6px);
  z-index: 5; min-width: 160px; max-width: 240px;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--paper); color: var(--cinnabar-deep); font-size: 13px;
  box-shadow: var(--shadow); white-space: normal;
}
.dlg-meta { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.pdf-btn {
  display: inline-flex; align-items: center; height: 32px; padding: 0 12px;
  border-radius: 999px; border: 1px solid var(--cinnabar); color: var(--cinnabar);
  font-size: 13px; font-weight: 600; background: transparent; cursor: pointer;
}
.pdf-btn:hover { background: rgba(177, 67, 50, .08); }
.views { display: flex; align-items: center; gap: 6px; margin-top: 8px; color: var(--muted); font-size: 13px; }
.views svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.views-num { color: var(--body); font-variant-numeric: tabular-nums; }

.pager { margin: 20px 0 8px; padding: 16px 18px; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; }
.pager-summary { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 12px; color: var(--body); font-size: 14px; }
.pager-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.pages { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.page-btn, .page-ellipsis {
  min-width: 36px; height: 36px; padding: 0 10px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 10px; background: var(--paper); cursor: pointer; font-size: 14px;
}
.page-btn.is-on { border-color: var(--cinnabar); color: var(--cinnabar); background: rgba(177, 67, 50, .08); }
.page-btn.is-off { opacity: .4; cursor: not-allowed; }
.page-ellipsis { border: 0; background: none; cursor: default; }
.mobile-status { display: none; }
.pager-tools { display: flex; align-items: center; gap: 12px; }
.jump { display: flex; align-items: center; gap: 8px; color: var(--body); font-size: 14px; }
.jump input {
  width: 64px; height: 36px; text-align: center;
  border: 1px solid var(--line); border-radius: 10px; background: var(--paper-2);
}
.missing-hint { margin-top: 8px; font-size: 13px; color: var(--cinnabar-deep); }

.fgallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.fcard { padding: 16px 16px 14px; }
.fcard .samples {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 6px; min-height: 108px; padding: 8px 4px 12px;
}
.fcard .samples img { display: inline-block; width: 42px; height: 42px; max-width: 42px; max-height: 42px; }
.fcard .name { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.fcard .name b { font-family: var(--serif); font-size: 16px; }
.fcard .name em { font-style: normal; font-size: 12px; color: var(--muted); }

.bands { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 28px 0 12px; }
.band { padding: 24px 24px 20px; }
.band h2 { font-family: var(--serif); font-size: 22px; margin-bottom: 8px; }
.band p { color: var(--body); margin-bottom: 8px; }
.band .url { font-family: var(--serif); color: var(--cinnabar); letter-spacing: .04em; }
.band .btn { margin-top: 10px; }

footer { margin-top: auto; padding: 28px 0 32px; text-align: center; color: var(--muted); font-size: 13px; }
footer .icp a { color: var(--body); text-decoration: underline; text-underline-offset: 3px; }

.dialog-back {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(42, 35, 24, .45);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 8vh 16px 24px; overflow: auto;
}
.dialog {
  width: min(720px, 100%);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 24px 24px 20px;
}
.dialog h3 { font-family: var(--serif); font-size: 26px; }
.dialog .author { margin: 4px 0 12px; color: var(--muted); }
.dialog .body { max-height: 48vh; overflow: auto; font-size: 18px; line-height: 1.85; }
.dialog .acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.dialog .notes { margin-top: 12px; white-space: pre-wrap; color: var(--cinnabar-deep); font-size: 13px; }
.close-x {
  float: right; width: 36px; height: 36px; border: 0; background: none;
  font-size: 22px; cursor: pointer; color: var(--muted);
}

.loading-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50; height: 3px;
  background: transparent; overflow: hidden; pointer-events: none;
}
.loading-bar.on::after {
  content: ""; display: block; height: 100%; width: 40%;
  background: var(--cinnabar);
  animation: loadrun 1.1s ease-in-out infinite;
}
@keyframes loadrun {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(350%); }
}

@media (max-width: 900px) {
  .wrap { width: calc(100% - 32px); }
  .news, .agrid, .fgallery, .bands { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .top-inner { flex-wrap: wrap; height: auto; padding: 8px 0; gap: 8px; }
  .menu-toggle { display: block; }
  nav.menu { display: none; width: 100%; flex-direction: column; align-items: stretch; padding-bottom: 8px; }
  nav.menu.open { display: flex; }
  .news, .agrid, .fgallery, .bands { grid-template-columns: 1fr; }
  .sec-head h2 { font-size: 24px; }
  .pager-row { flex-direction: column; align-items: stretch; }
  .pages .page-num { display: none; }
  .pages .page-num.is-on, .pages .prev, .pages .next { display: inline-flex; }
  .mobile-status { display: inline-flex; color: var(--body); font-size: 14px; margin: 0 6px; }
  .jump { width: 100%; flex-wrap: wrap; }
  .jump .btn { flex: 1; }
  .dialog { padding: 18px 16px; }
  .acard { min-height: 0; }
  .meta-top, .meta-bottom { flex-direction: column; align-items: stretch; }
  .card-font select, .dlg-font-row select, .print-opts select, .dlg-print-row select { max-width: 100%; width: 100%; }
  .card-print { align-items: stretch; }
  .pdf-btn { align-self: flex-start; }
}

/* t1160：新闻阅读弹窗与字体苑纯展示 */
.news-card .news-cover { margin: 8px 0 12px; border-radius: 8px; overflow: hidden; background: #fafafa; border: 1px solid var(--line); }
.news-card .news-cover img { display: block; width: 100%; max-height: 220px; object-fit: contain; }
/* t1218：主卡不显示日期行，把该行高度加给封面，避免卡片变矮而图片区仍 220px */
.news-card.news-main { --news-date-row: calc(12px * 1.7); }
.news-card.news-main .news-cover img { max-height: calc(220px + var(--news-date-row)); }
.dialog.is-news #dlgArticlePanel,
.dialog.is-news .pdf-opts,
.dialog.is-news .dlg-print-row,
.dialog.is-news .acts,
.dialog.is-news .dlg-font-row { display: none !important; }
.dialog.is-news #dlgNewsPanel { display: block !important; }
#dlgNewsPanel .news-title { font-family: var(--serif); font-size: 22px; line-height: 1.4; margin: 0 0 6px; overflow-wrap: anywhere; }
#dlgNewsPanel .news-subtitle { font-family: var(--serif); font-size: 15px; font-weight: 400; line-height: 1.5; color: var(--muted, #6b5e52); margin: 0 0 8px; overflow-wrap: anywhere; }
#dlgNewsPanel .news-subtitle[hidden] { display: none !important; margin: 0; }
#dlgNewsPanel .news-meta { color: var(--muted); font-size: 13px; margin: 0 0 14px; }
.dialog.is-news #dlgBody,
.dialog.is-news .news-read { white-space: normal; }
.dialog .news-read .news-body { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.dialog .news-read .news-body.has-media.s11,
.dialog .news-read .news-body.has-media.s12 { flex-direction: row; }
.dialog .news-read .news-content { flex: 1; min-width: 0; width: 100%; white-space: pre-wrap; line-height: 1.8; font-size: 15px; overflow-wrap: anywhere; }
.dialog .news-read .news-content.html { white-space: pre-wrap; }
.dialog .news-read .news-content.html p,
.dialog .news-read .news-content.html h3,
.dialog .news-read .news-content.html ul,
.dialog .news-read .news-content.html ol { margin: 0 0 .6em; }
.dialog .news-read .news-content.html h3 { font-size: 17px; font-weight: 700; margin-top: .4em; }
.dialog .news-read .news-content.html ul,
.dialog .news-read .news-content.html ol { padding-left: 1.6em; }
.dialog .news-read .news-content.html a { color: #8b2e2e; text-decoration: underline; }
.dialog .news-read .news-media { flex: none; margin: 0; max-width: 100%; box-sizing: border-box; border-radius: 10px; overflow: hidden; background: #fafafa; border: 1px solid var(--line); }
.dialog .news-read .news-media img { display: block; width: 100%; height: 100%; object-fit: contain; }
.dialog .news-read .news-body.s21 .news-media { aspect-ratio: 2/1; width: min(100%, 520px); }
.dialog .news-read .news-body.s11 .news-media { aspect-ratio: 1/1; width: min(45%, 280px); }
.dialog .news-read .news-body.s12 .news-media { aspect-ratio: 1/2; width: min(40%, 240px); }
.dialog .news-read .news-empty { color: var(--muted); }
@media (max-width: 600px) {
  .dialog .news-read .news-body.has-media.s11,
  .dialog .news-read .news-body.has-media.s12 { flex-direction: column; }
  .dialog .news-read .news-body.s11 .news-media,
  .dialog .news-read .news-body.s12 .news-media { width: min(100%, 280px); }
}
.fcard { cursor: default; }

/* t1181：展示页动态选区字体，加载前隐藏对应文字，失败后可见回退 */
.news-fonts-pending [data-font]{visibility:hidden}
.news-fonts-ready [data-font],.news-fonts-fallback [data-font]{visibility:visible}
.news-side .side-excerpt{font-size:13px;color:inherit;margin:4px 0 0;line-height:1.4}
.news-side .side-title{display:block}

/* t1276 / t1285 展示台动态附件：显示 | 下载 */
.news-attach,.news-attach-wrap{margin:14px 0 0;font-size:14px}
.news-attach-name{margin-right:.35em}
.news-attach-view,.news-attach-dl{color:var(--cinnabar,#b1351f);text-decoration:none;font-weight:600}
.news-attach-view:hover,.news-attach-dl:hover{text-decoration:underline}
.news-attach-sep{margin:0 .1em}
.news-card .news-attach{margin-top:10px}
