/* ─── 祝由十三科 · 国学典籍展示（浅冰蓝玻璃主题，参考演禽/梅花页） ─── */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink: #2c3e5d;
  --ink-soft: rgba(44, 62, 93, .72);
  --ink-mute: rgba(44, 62, 93, .5);
  --panel: rgba(255, 255, 255, .72);
  --panel-deep: rgba(255, 255, 255, .62);
  --panel-line: rgba(255, 255, 255, .9);
  --line-soft: rgba(44, 62, 93, .12);
  --bright: #2f7ce8;
  --bright-deep: #1f5fd6;
  --gold: #b8862c;
  --ok: #2fa864;
  --warn: #e2574a;
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, sans-serif;
  color: var(--ink);
  min-height: 100vh;
  background: #eaf1f9;
  position: relative;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1100px 560px at 50% -8%, rgba(255, 255, 255, .95), transparent 62%),
    radial-gradient(900px 480px at 12% 88%, rgba(147, 197, 253, .22), transparent 58%),
    radial-gradient(900px 480px at 88% 92%, rgba(160, 150, 250, .16), transparent 58%),
    linear-gradient(180deg, #f2f7fd 0%, #e7eff9 46%, #dbe8f6 100%);
}

/* ── 顶栏 ── */
.top-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 16px 10px;
  z-index: 20;
}
.link-back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: rgba(44, 62, 93, .8);
  text-decoration: none;
  font-size: 15px;
  white-space: nowrap;
}
.link-back:hover { color: var(--bright-deep); }
.logo-title {
  flex: 1;
  text-align: center;
  font-size: 21px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 2px;
  text-shadow: 0 2px 10px rgba(47, 124, 232, .3);
  white-space: nowrap;
}
.intro-btn {
  appearance: none;
  border: 1.5px solid rgba(120, 150, 200, .45);
  background: rgba(255, 255, 255, .7);
  color: var(--bright-deep);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
}
.intro-btn:hover { border-color: var(--bright); background: #fff; }

/* ── 主区 ── */
.page { max-width: 720px; margin: 0 auto; padding: 6px 14px 32px; }

.seal-note {
  text-align: center;
  font-size: 13.5px;
  color: rgba(44, 62, 93, .75);
  margin: 6px 0 12px;
  letter-spacing: 1.5px;
  font-weight: 500;
}

/* ── 免责声明条 ── */
.disclaimer-bar {
  border: 1.5px solid rgba(226, 138, 22, .45);
  border-radius: 14px;
  background: rgba(253, 244, 224, .92);
  color: #a4530a;
  font-size: 13px;
  line-height: 1.75;
  padding: 10px 14px;
  margin-bottom: 14px;
  text-align: justify;
}
.disclaimer-bar b { color: #8a3d06; margin-right: 4px; }

/* ── 栏目选项卡 ── */
.kind-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  overflow-x: auto;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
}
.kind-tab {
  appearance: none;
  border: 1.5px solid rgba(120, 150, 200, .42);
  background: var(--panel-deep);
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  flex: 0 0 auto;
  transition: border-color .15s, background .15s, color .15s;
}
.kind-tab.active {
  border-color: var(--bright);
  background: linear-gradient(90deg, #3fb9f9 0%, #5c8cf8 55%, #8d7cf9 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(92, 140, 248, .32);
}

.tab-panel.hidden { display: none; }

/* ── 通用卡片 ── */
.sub-card {
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 13px 13px 14px;
  margin-bottom: 12px;
  background: var(--panel-deep);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.sub-card:last-child { margin-bottom: 0; }
.sub-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.sub-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 9px;
  border-radius: 999px;
  background: rgba(47, 124, 232, .1);
  color: var(--bright);
  vertical-align: 1px;
}
.sub-badge.gold { background: rgba(184, 134, 44, .14); color: var(--gold); }

.body-text { font-size: 14.5px; color: var(--ink-soft); line-height: 1.9; text-align: justify; }
.body-text.classic {
  font-size: 15px;
  color: var(--ink);
  font-weight: 500;
  letter-spacing: .5px;
}
.collate-note {
  margin-top: 9px;
  padding: 8px 11px;
  border: 1px dashed rgba(184, 134, 44, .35);
  border-radius: 10px;
  background: rgba(184, 134, 44, .06);
  font-size: 12.5px;
  line-height: 1.75;
  color: #7a5a1e;
}
.collate-note:empty { display: none; }

/* 十三科目录表 */
.kes-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.kes-table th, .kes-table td {
  border: 1px solid var(--line-soft);
  padding: 7px 8px;
  text-align: left;
  line-height: 1.55;
}
.kes-table th { background: rgba(47, 124, 232, .07); font-weight: 600; color: var(--ink); white-space: nowrap; text-align: center; }
.kes-table td:first-child, .kes-table td:nth-child(2), .kes-table td:nth-child(3) { text-align: center; white-space: nowrap; }
.kes-table td b { color: var(--bright-deep); }

/* 天医名录 */
.tianyi-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tianyi-item {
  font-size: 13.5px;
  color: var(--ink);
  padding: 5px 13px;
  border: 1px solid rgba(47, 124, 232, .22);
  border-radius: 999px;
  background: linear-gradient(170deg, rgba(255, 255, 255, .85), rgba(235, 244, 255, .8));
}

/* 符图略标注 */
.fulu-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 8px;
  border-radius: 6px;
  background: rgba(44, 62, 93, .08);
  color: var(--ink-mute);
  margin-left: 6px;
  vertical-align: 1px;
}

/* ── 诸咒卡 ── */
.zhou-card {
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 13px 13px 14px;
  margin-bottom: 12px;
  background: var(--panel-deep);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.zhou-card:last-child { margin-bottom: 0; }
.zhou-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.zhou-block { margin-bottom: 10px; }
.zhou-block:last-child { margin-bottom: 0; }
.zhou-label {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  padding: 1px 9px;
  border-radius: 999px;
  margin-bottom: 6px;
}
.zhou-label.s1 { background: rgba(184, 134, 44, .14); color: var(--gold); }
.zhou-label.s2 { background: rgba(47, 124, 232, .1); color: var(--bright); }
.zhou-block.empty { color: var(--ink-mute); font-size: 12.5px; }
.zhou-text {
  font-size: 14.5px;
  line-height: 1.9;
  color: var(--ink);
  text-align: justify;
  letter-spacing: .4px;
}
.zhou-text.s2-text { color: var(--ink-soft); font-size: 14px; }
.zhou-note {
  margin-top: 9px;
  padding: 8px 11px;
  border: 1px dashed rgba(184, 134, 44, .35);
  border-radius: 10px;
  background: rgba(184, 134, 44, .06);
  font-size: 12.5px;
  line-height: 1.75;
  color: #7a5a1e;
}
.zhou-note:empty { display: none; }

/* ── 符式查询 ── */
.fushi-toolbar { margin-bottom: 12px; }
.fushi-search {
  width: 100%;
  border: 1.5px solid rgba(120, 150, 200, .42);
  border-radius: 14px;
  padding: 11px 14px;
  font-size: 15px;
  background: var(--panel-deep);
  color: var(--ink);
  font-family: inherit;
  margin-bottom: 10px;
}
.fushi-search:focus { outline: none; border-color: var(--bright); box-shadow: 0 0 0 3px rgba(47, 124, 232, .16); }
.fushi-search::placeholder { color: rgba(80, 105, 150, .45); }
.fushi-groups { display: flex; flex-wrap: wrap; gap: 7px; }
.fushi-group {
  appearance: none;
  border: 1.5px solid rgba(120, 150, 200, .42);
  background: var(--panel-deep);
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.fushi-group.active {
  border-color: var(--bright);
  background: rgba(47, 124, 232, .1);
  color: var(--bright-deep);
}
.filter-tip {
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--panel-deep);
  font-size: 12.5px;
  color: var(--ink-mute);
  line-height: 1.7;
  padding: 9px 12px;
  margin-bottom: 12px;
}
.fushi-count { font-size: 12.5px; color: var(--ink-mute); margin-bottom: 10px; }

.fushi-item {
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 11px 13px 12px;
  margin-bottom: 10px;
  background: var(--panel-deep);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.fushi-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 7px;
}
.fushi-name { font-size: 15px; font-weight: 700; color: var(--ink); }
.fushi-src {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 999px;
}
.fushi-src.s1 { background: rgba(184, 134, 44, .14); color: var(--gold); }
.fushi-src.s2 { background: rgba(47, 124, 232, .1); color: var(--bright); }
.fushi-usage {
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--ink-soft);
  text-align: justify;
}
.fushi-usage b { color: var(--bright-deep); font-weight: 600; margin-right: 5px; white-space: nowrap; }
.fushi-note {
  margin-top: 7px;
  font-size: 12px;
  line-height: 1.7;
  color: #7a5a1e;
}
.fushi-note:empty { display: none; }
.fushi-empty {
  text-align: center;
  font-size: 14px;
  color: var(--ink-mute);
  padding: 26px 0;
}

/* ── 手机端错误上屏 ── */
.fatal-tip {
  max-width: 720px;
  margin: 0 auto 18px;
  text-align: center;
  font-size: 12.5px;
  color: var(--warn);
  word-break: break-all;
}

/* ── 页脚 ── */
.site-footer {
  text-align: center;
  font-size: 13px;
  color: rgba(44, 62, 93, .6);
  padding: 18px 0 26px;
  line-height: 1.8;
}

/* ── 弹窗（功能介绍） ── */
.interpret-modal { position: fixed; z-index: 140; inset: 0; display: grid; place-items: center; padding: 1rem; }
.interpret-modal.hidden { display: none; }
.interpret-backdrop { position: absolute; inset: 0; background: rgba(26, 35, 50, .32); backdrop-filter: blur(3px); }
.interpret-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(680px, 100%);
  max-height: min(88vh, 760px);
  overflow: hidden;
  border: 1px solid rgba(44, 62, 93, .16);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 22px 58px rgba(26, 35, 50, .18);
}
.interpret-header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .85rem 1rem;
  border-bottom: 1px solid rgba(44, 62, 93, .1);
  background: #f2f7fd;
}
.interpret-header-text { min-width: 0; display: flex; flex-direction: column; gap: .12rem; }
.interpret-header h2 { margin: 0; color: var(--ink); font-size: 1.15rem; line-height: 1.25; }
.interpret-disclaimer { margin: 0; color: var(--ink-mute); font-size: .68rem; line-height: 1.35; }
.interpret-close {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 1px solid rgba(44, 62, 93, .14);
  border-radius: 50%;
  color: var(--bright-deep);
  background: #fff;
  font-size: 1.3rem;
  cursor: pointer;
}
.interpret-body-shell { overflow-y: auto; }
.intro-body {
  padding: 1.05rem 1.15rem 1.3rem;
  display: grid;
  gap: .7rem;
  background: linear-gradient(180deg, #fdfeff, #f3f8fd);
}
.intro-body p { font-size: .9rem; line-height: 1.8; color: var(--ink-soft); }
.intro-body p b { color: var(--ink); }
.intro-body .intro-note { color: var(--warn); font-size: .8rem; }

@media (max-width: 520px) {
  .logo-title { font-size: 17px; }
  .sub-card, .zhou-card { padding: 11px 10px; }
  .kes-table { font-size: 12px; }
  .kes-table th, .kes-table td { padding: 5px 5px; }
  .kind-tab { padding: 7px 14px; font-size: 13px; }
}
