/* 官网样式（国学、罗盘共用） */
@font-face {
  font-family: "SiteSerif";
  font-weight: 700;
  font-display: swap;
  src: url("fonts/site-serif-700.woff2") format("woff2");
}
@font-face {
  font-family: "SiteSerif";
  font-weight: 900;
  font-display: swap;
  src: url("fonts/site-serif-900.woff2") format("woff2");
}

:root {
  --ground: #F5EEDF;
  --paper: #FBF7EE;
  --sand: #EDE3CF;
  --line: #DDCFB6;
  --line-strong: #CDBB9C;
  --ink: #2A211C;
  --ink-2: #4A3E35;
  --ink-3: #5F5247;
  --red: #A93A34;
  --red-deep: #8E2F2A;
  --thread: #EADFC6;
  --cover: #23405A;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
section[id], footer[id] { scroll-margin-top: 76px; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  -webkit-text-size-adjust: 100%;
}
img { max-width: 100%; }
a { color: var(--red-deep); }
a:hover { color: #5E1D1A; }
h1, h2, h3, p, figure, ul { margin: 0; }
.serif { font-family: "SiteSerif", "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", serif; }
.muted { color: var(--ink-2); }

.wrap { max-width: 1160px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.section { padding-top: 80px; padding-bottom: 80px; display: flex; flex-direction: column; gap: 40px; }
.section-head { display: flex; flex-direction: column; gap: 12px; max-width: 760px; }
.section-head p { color: var(--ink-2); }
.eyebrow { font-size: 14px; letter-spacing: 3px; color: var(--red-deep); font-weight: 500; }
h2 { font-weight: 700; font-size: 34px; line-height: 1.4; }
.sub-title { font-weight: 700; font-size: 20px; margin-bottom: 16px; }
.band { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* 按钮 */
.btn { display: inline-block; text-align: center; text-decoration: none; font-weight: 500; border-radius: 4px; padding: 12px 20px; border: 1px solid transparent; }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-deep); color: #fff; }
.btn-outline { border-color: var(--red); color: var(--red-deep); }
.btn-outline:hover { background: #F0E2D3; }
.btn-disabled { background: var(--sand); border-color: var(--line-strong); color: var(--ink-3); cursor: default; }
.btn-sm { padding: 8px 22px; }
.btn-lg { padding: 13px 34px; font-size: 17px; }

/* 页头 */
.site-header { border-bottom: 1px solid var(--line); background: var(--ground); position: sticky; top: 0; z-index: 10; }
.header-inner { padding-top: 14px; padding-bottom: 14px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 32px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); min-height: 44px; }
.brand img { border-radius: 9px; display: block; }
.brand span { font-weight: 700; font-size: 20px; letter-spacing: 2px; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 28px; font-size: 15px; }
.nav a:not(.btn) { color: var(--ink); text-decoration: none; padding: 10px 0; }
.nav a:not(.btn):hover { color: var(--red-deep); }

/* 首屏 */
.hero { padding-top: 80px; padding-bottom: 96px; display: flex; flex-wrap: wrap; align-items: center; gap: 56px 72px; }
.hero-text { flex: 999 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.hero h1 { font-weight: 900; font-size: 52px; line-height: 1.3; letter-spacing: 1px; }
.lead { font-size: 18px; color: var(--ink-2); max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }
.hero-platforms { font-size: 14px; color: var(--ink-3); }

/* 典籍依据 */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.fact { background: var(--ground); border: 1px solid var(--line); padding: 22px 24px; }
.fact-k { font-size: 14px; color: var(--ink-3); }
.fact-v { font-weight: 700; font-size: 22px; }
.volumes { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); border-top: 1px solid var(--line-strong); border-left: 1px solid var(--line-strong); }
.volume { border-right: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); padding: 16px 18px; display: flex; justify-content: space-between; align-items: baseline; }
.volume span:first-child { font-weight: 700; font-size: 19px; }
.volume span:last-child { font-size: 14px; color: var(--ink-3); }

/* 卡片 */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.cards-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card { background: var(--paper); border: 1px solid var(--line); padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.card h3 { font-weight: 700; font-size: 22px; }
.card p { color: var(--ink-2); font-size: 15px; }
.card-src { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14px; color: var(--red-deep); }
.card-meta { font-size: 14px; color: var(--ink-3); }
.card .btn { margin-top: auto; }

/* 截图 */
.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.shots figure { display: flex; flex-direction: column; gap: 12px; }
.shots img { width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: cover; object-position: top; display: block; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--sand); }
.shots figcaption { font-size: 15px; color: var(--ink-2); text-align: center; }

/* 内容说明 */
.notice { background: var(--ink); color: var(--ground); }
.notice-inner { padding-top: 72px; padding-bottom: 72px; display: flex; flex-wrap: wrap; gap: 32px 72px; }
.notice-head { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.notice .eyebrow { color: #E9B9A6; }
.notice h2 { font-size: 30px; line-height: 1.45; }
.notice ul { flex: 999 1 520px; min-width: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 18px; }
.notice li { padding-bottom: 18px; border-bottom: 1px solid #5A4B40; }
.notice li:last-child { border-bottom: 0; padding-bottom: 0; }
.notice a { color: #F0C4B2; }
.notice a:hover { color: #fff; }

/* 下载 */
.download-head { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; }
.download-head img { border-radius: 20px; display: block; }

/* 页脚 */
.site-footer { background: var(--sand); border-top: 1px solid var(--line-strong); }
.footer-inner { padding-top: 56px; padding-bottom: 40px; display: flex; flex-direction: column; gap: 32px; }
.footer-cols { display: flex; flex-wrap: wrap; gap: 32px 72px; }
.footer-about { flex: 2 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-about p { font-size: 15px; color: var(--ink-2); }
.footer-title { font-weight: 700; font-size: 20px; }
.footer-col { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 8px; font-size: 15px; color: var(--ink-2); }
.footer-col a { padding: 4px 0; }
.footer-label { font-weight: 700; color: var(--ink); }
.footer-legal { border-top: 1px solid var(--line-strong); padding-top: 24px; display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: 14px; color: var(--ink-2); }

@media (max-width: 720px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .section { padding-top: 56px; padding-bottom: 56px; gap: 32px; }
  .site-header { position: static; }
  .nav { gap: 0 20px; font-size: 14px; }
  .nav .btn { display: none; }
  .hero { padding-top: 48px; padding-bottom: 64px; gap: 48px; }
  .hero h1 { font-size: 32px; }
  .lead { font-size: 16px; }
  h2 { font-size: 26px; }
  .notice h2 { font-size: 24px; }
  .notice-inner { padding-top: 56px; padding-bottom: 56px; }
  .cards { grid-template-columns: 1fr; }
  .shots { grid-template-columns: 1fr 1fr; gap: 14px; }
  .shots figcaption { font-size: 13px; }
  .volumes { grid-template-columns: 1fr 1fr; }
  .hero-actions .btn { flex: 1 1 auto; }
}

/* —— 国学、罗盘两站在择日样式基础上的补充 —— */
.hero-art { flex: 1 1 340px; min-width: 0; display: flex; justify-content: center; }
.card-icon { color: var(--red); }
.grid-note { margin-top: 16px; font-size: 15px; color: var(--ink-2); }
.volumes-4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.volumes-4 .volume { flex-direction: column; align-items: flex-start; gap: 4px; }
.volumes-6 { grid-template-columns: repeat(6, 1fr); }

/* 罗盘盘面 */
.dial { width: 400px; max-width: 100%; height: auto; display: block; }
.dial-plate { fill: var(--paper); }
.dial-ring { fill: none; stroke: var(--ink); stroke-width: 1.2; }
.dial-pool { fill: var(--ground); stroke: var(--ink); stroke-width: 1.2; }
.dial-tick { stroke: var(--ink); stroke-width: 0.8; }
.dial-sep { stroke: var(--ink); stroke-width: 0.8; }
.dial-cross { stroke: var(--red); stroke-width: 0.8; }
.dial-deg { font-size: 9px; text-anchor: middle; fill: var(--ink-3); }
.dial-mount { font-size: 22px; font-weight: 700; text-anchor: middle; fill: var(--ink); }
.dial-mount-red { fill: var(--red); }
.dial-dir { font-size: 13px; font-weight: 700; text-anchor: middle; fill: var(--ink-2); }
.dial-needle-n { fill: var(--red); }
.dial-needle-s { fill: var(--ink); }
.dial-pin { fill: var(--paper); stroke: var(--ink); stroke-width: 1; }

/* 四部线装书 */
.shelf { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; width: 380px; max-width: 100%; }
.shelf-book { position: relative; height: 380px; border: 1px solid rgba(0, 0, 0, .35);
  box-shadow: -3px 3px 0 #F1E8D3, -4px 4px 0 #BFAE8E, -7px 7px 0 #F1E8D3, -8px 8px 0 #A8977A; }
.shelf-jing { background: #2F5B48; }
.shelf-shi  { background: #8A2A26; }
.shelf-zi   { background: #23405A; }
.shelf-ji   { background: #4B4A47; }
.shelf-thread { position: absolute; top: 0; bottom: 0; right: 12px; width: 2px; background: var(--thread);
  box-shadow: 0 0 0 0 transparent; }
.shelf-thread::before, .shelf-thread::after { content: ""; position: absolute; left: 0; width: 14px; height: 2px; background: var(--thread); }
.shelf-thread::before { top: 24px; box-shadow: 0 110px 0 var(--thread), 0 220px 0 var(--thread); }
.shelf-thread::after { bottom: 24px; }
.shelf-slip { position: absolute; top: 22px; left: 12px; width: 38px; height: 150px; background: #F6EEDB; border: 1px solid #8C7A5B;
  display: flex; align-items: center; justify-content: center; }
.shelf-slip span { writing-mode: vertical-rl; font-weight: 900; font-size: 24px; letter-spacing: 8px; color: var(--ink); }
.shelf-caption { grid-column: 1 / -1; margin-top: 14px; text-align: center; font-weight: 700; font-size: 15px; letter-spacing: 6px; color: var(--ink-2); }

@media (max-width: 720px) {
  .volumes-6 { grid-template-columns: repeat(4, 1fr); }
  .volumes-6 .volume { flex-direction: column; align-items: center; padding: 10px 4px; }
  .shelf-book { height: 300px; }
  .shelf-slip { left: 8px; width: 32px; height: 124px; }
  .shelf-slip span { font-size: 20px; }
}
