:root {
  --tj-zhi: #f6f2f8;
  --tj-mo: #2b1d3a;
  --tj-mo-er: #57476a;
  --tj-zhe: #b5651d;
  --tj-zhe-shen: #8e4a10;
  --tj-lv: #3d6b5a;
  --tj-lv-shen: #2f5446;
  --tj-xian: #e0d6e6;
  --tj-ci: #fffdfb;
  --tj-di: #efe8f3;
  --tj-r-da: 17px;
  --tj-r-xiao: 9px;
  --tj-latin: Perpetua, "Baskerville Old Face", Georgia, serif;
  --tj-fang: "FangSong", "STFangsong", "FangSong_GB2312", serif;
  --tj-hei: "Microsoft YaHei", "PingFang SC", sans-serif;
  --tj-biaoti: Perpetua, "Baskerville Old Face", Georgia, "FangSong", "STFangsong", "FangSong_GB2312", serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--tj-zhi);
  color: var(--tj-mo);
  font-family: var(--tj-hei);
  font-size: 17px;
  line-height: 1.85;
}

p, li, figcaption { text-wrap: pretty; }
h1, h2, h3 { text-wrap: balance; }

a { color: var(--tj-lv-shen); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--tj-zhe-shen); }

:focus-visible { outline: 3px solid var(--tj-zhe); outline-offset: 2px; border-radius: 4px; }

img { max-width: 100%; height: auto; }

.tj-skip {
  position: absolute; left: 12px; top: -60px; z-index: 10;
  background: var(--tj-mo); color: #fff; padding: 10px 16px; border-radius: var(--tj-r-xiao);
  min-height: 44px; display: inline-flex; align-items: center;
}
.tj-skip:focus { top: 12px; color: #fff; }

.tj-yin {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* 页头 */
.tj-top { border-bottom: 1px solid var(--tj-xian); background: var(--tj-zhi); }
.tj-top-in {
  max-width: 1180px; margin: 0 auto; padding: 10px 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.tj-pai { display: inline-flex; align-items: center; min-height: 44px; color: var(--tj-mo); }
.tj-logo { display: block; height: 40px; width: auto; }
.tj-dao-ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.tj-dao-ul a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px;
  color: var(--tj-mo); text-decoration: none; border-radius: var(--tj-r-xiao); font-size: 16px;
}
.tj-dao-ul a:hover { background: var(--tj-di); color: var(--tj-mo); }
.tj-dao-ul a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--tj-zhe); }

.tj-main { display: block; }

/* 大标题 */
.tj-h1 {
  font-family: var(--tj-biaoti);
  font-weight: 400;
  font-size: 75px;
  line-height: 1.12;
  letter-spacing: 0.01em;
  line-break: strict;
  margin: 0 0 18px;
}
.tj-ph { display: inline-block; }
.tj-h1-zhong { font-size: 52px; }

/* 首页首屏：左标题右词条 */
.tj-shou {
  max-width: 1180px; margin: 0 auto; padding: 24px 28px 26px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  grid-template-areas: "biao ci" "tui ci" "tui ma";
  column-gap: 52px; row-gap: 16px;
  align-items: start;
}
.tj-shou-biao { grid-area: biao; padding-top: 6px; }
.tj-shou-ci { grid-area: ci; }
.tj-shou-ma { grid-area: ma; }
.tj-shou-tui { grid-area: tui; }

.tj-shou-dao { font-size: 18px; color: var(--tj-mo-er); max-width: 30em; margin: 0; }

.tj-shou-tui {
  border-top: 3px double var(--tj-mo);
  padding-top: 12px;
  max-width: 32em;
}
.tj-tui-biao { margin: 0; font-size: 14px; color: var(--tj-zhe-shen); font-weight: 700; }
.tj-tui-ti { margin: 2px 0 4px; font-family: var(--tj-biaoti); font-size: 25px; line-height: 1.4; }
.tj-tui-ti a { color: var(--tj-mo); text-decoration-color: var(--tj-zhe); text-decoration-thickness: 2px; }
.tj-tui-yu { margin: 0; font-size: 15px; color: var(--tj-mo-er); }

/* 词典页 */
.tj-shou-ci {
  background: var(--tj-ci);
  border: 1px solid var(--tj-xian);
  border-radius: var(--tj-r-da);
  padding: 14px 26px 6px;
}
.tj-yemei {
  display: flex; justify-content: space-between; gap: 12px;
  margin: 0 0 4px; padding-bottom: 6px;
  border-bottom: 3px double var(--tj-mo);
  font-family: var(--tj-latin); font-style: italic; font-size: 15px; color: var(--tj-mo-er);
}
.tj-ci { padding: 7px 0 8px; border-bottom: 1px dotted #cbbfd3; }
.tj-ci:last-child { border-bottom: 0; }
.tj-ci-tou { display: flex; align-items: baseline; flex-wrap: wrap; column-gap: 12px; margin: 0; line-height: 1.3; }
.tj-ci-ci { font-family: var(--tj-latin); font-weight: 700; font-size: 26px; color: var(--tj-zhe); }
.tj-ci-xing { font-size: 13px; color: var(--tj-lv); font-style: italic; }
.tj-ci-yi { margin: 3px 0 0; font-size: 15.5px; line-height: 1.7; }
.tj-ci-jian { margin: 2px 0 0; font-size: 13px; color: var(--tj-mo-er); line-height: 1.6; }

/* 码卡（首页与教程共用） */
.tj-ma {
  background: var(--tj-ci);
  border: 1.5px solid var(--tj-zhe);
  border-radius: var(--tj-r-da);
  padding: 12px 26px 16px;
}
.tj-ma .tj-ci-ci { font-size: 60px; font-style: italic; font-weight: 400; line-height: 1; }
.tj-ma-yi { margin: 6px 0 2px; font-size: 14px; color: var(--tj-mo-er); }
.tj-ma-hang { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; }
.tj-ma .tj-ma-zi {
  font-family: var(--tj-latin); font-variant-numeric: lining-nums; font-weight: 700;
  font-size: 32px; letter-spacing: 0.06em; color: var(--tj-mo);
  background: var(--tj-di); border-radius: var(--tj-r-xiao); padding: 2px 12px;
  user-select: all;
}
.tj-ma-fu {
  min-height: 44px; min-width: 76px; padding: 0 18px;
  font: inherit; font-size: 16px; color: #fff; background: var(--tj-mo);
  border: 0; border-radius: var(--tj-r-xiao); cursor: pointer;
}
.tj-ma-fu:hover { background: #3f2d55; }
.tj-ma-shuo { margin: 10px 0 0; font-size: 15px; line-height: 1.6; }
.tj-ma-qu-hang { margin: 12px 0 0; }
.tj-ma-qu {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 20px;
  background: var(--tj-lv); color: #fff; text-decoration: none; border-radius: var(--tj-r-xiao); font-size: 16px;
}
.tj-ma-qu:hover { background: var(--tj-lv-shen); color: #fff; }
.tj-ma-pi { margin: 8px 0 0; font-size: 14px; line-height: 1.65; color: var(--tj-mo-er); }
.tj-ma-pi a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 2px; }
.tj-ma .tj-ci-jian { margin-top: 8px; }

/* 首页下方 */
.tj-shou-xia {
  max-width: 1180px; margin: 0 auto; padding: 20px 28px 40px;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 52px;
}
.tj-shou-xia > h2, .tj-kuai > h2 {
  grid-column: span 1;
  font-family: var(--tj-biaoti); font-weight: 400; font-size: 30px; line-height: 1.3;
  margin: 26px 0 8px; padding-top: 14px; border-top: 1px solid var(--tj-xian);
}
.tj-shou-xia > p { margin: 0 0 12px; max-width: 34em; }
.tj-shou-xia > h2 { grid-column: 1 / -1; }
.tj-shou-xia > p { grid-column: 1 / -1; }
.tj-kuai { grid-column: 1 / -1; }
.tj-kuai-wei a { display: inline-flex; align-items: center; min-height: 44px; }

/* 通用容器 */
.tj-kuang { max-width: 1000px; margin: 0 auto; padding: 18px 28px 48px; }
.tj-kuang-zhai { max-width: 820px; }
.tj-ye-tou { margin: 8px 0 18px; }
.tj-ye-lei { margin: 0; font-size: 14px; color: var(--tj-zhe-shen); }
.tj-ye-tong, .tj-ye-geng { margin: 0; font-size: 14px; color: var(--tj-mo-er); }
.tj-ye-dao p { max-width: 38em; }
.tj-gong { font-size: 14px; color: var(--tj-mo-er); margin: 18px 0 6px; }

/* 面包屑：分隔符由后一项的 ::before 带出，和后一项不拆开 */
.tj-xie { margin: 6px 0 4px; font-size: 14px; }
.tj-xie-ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; }
.tj-xie-ol li { display: inline-flex; align-items: center; white-space: nowrap; color: var(--tj-mo-er); min-height: 44px; }
.tj-xie-ol li + li::before { content: "/"; flex: none; padding: 0 9px; color: #85739a; }
.tj-xie-ol li:last-child { white-space: normal; }
.tj-xie-ol a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; padding: 0 2px; }

/* 列表 */
.tj-list { list-style: none; margin: 0; padding: 0; }
.tj-list-x { padding: 16px 0 14px; border-bottom: 1px dotted #cbbfd3; }
.tj-list-t { margin: 0; font-family: var(--tj-biaoti); font-weight: 400; font-size: 26px; line-height: 1.4; }
.tj-list-t a { color: var(--tj-mo); }
.tj-list-z { margin: 6px 0 0; font-size: 15.5px; color: var(--tj-mo-er); max-width: 40em; }
.tj-list-r { margin: 4px 0 0; font-size: 13px; color: var(--tj-mo-er); }
.tj-fy { display: flex; gap: 12px; align-items: center; margin: 22px 0 0; }
.tj-fy a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border: 1px solid var(--tj-xian); border-radius: var(--tj-r-xiao); }
.tj-fy-shu { font-size: 14px; color: var(--tj-mo-er); }

/* 文章 */
.tj-wen { max-width: 820px; margin: 0 auto; padding: 14px 28px 40px; }
.tj-wen-tou { margin-bottom: 18px; }
.tj-wen-byline {
  display: flex; flex-wrap: wrap; align-items: center; column-gap: 20px; row-gap: 2px;
  margin: 0; font-size: 14px; color: var(--tj-mo-er);
}
.tj-wen-zuo { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; padding: 0 4px; }
.tj-wen-feng { margin: 0 0 22px; }
.tj-wen-feng img { display: block; width: 100%; border-radius: var(--tj-r-da); border: 1px solid var(--tj-xian); }
.tj-wen-feng figcaption, .tj-tu figcaption { font-size: 14px; color: var(--tj-mo-er); margin-top: 8px; line-height: 1.6; }

.tj-mu {
  background: var(--tj-ci); border: 1px solid var(--tj-xian); border-radius: var(--tj-r-da);
  padding: 14px 22px 10px; margin: 0 0 26px;
}
.tj-mu-t { margin: 0 0 4px; font-family: var(--tj-fang); font-size: 21px; border-bottom: 3px double var(--tj-mo); padding-bottom: 4px; }
.tj-mu-ol { list-style: none; margin: 0; padding: 0; counter-reset: tj-mu; }
.tj-mu-ol li { counter-increment: tj-mu; border-bottom: 1px dotted #d6cadd; }
.tj-mu-ol li:last-child { border-bottom: 0; }
.tj-mu-ol a {
  display: flex; gap: 10px; align-items: baseline; min-height: 44px; padding: 9px 0;
  color: var(--tj-mo); text-decoration: none; font-size: 15.5px; line-height: 1.55;
}
.tj-mu-ol a::before { content: "§" counter(tj-mu); font-family: var(--tj-latin); font-style: italic; color: var(--tj-zhe-shen); min-width: 2.2em; }
.tj-mu-ol a:hover { color: var(--tj-lv-shen); }

.tj-zheng { counter-reset: tj-jie; }
.tj-zheng p, .tj-zheng li { max-width: 38em; }
.tj-zheng h2 {
  counter-increment: tj-jie;
  font-family: var(--tj-biaoti); font-weight: 400; font-size: 34px; line-height: 1.35;
  margin: 44px 0 12px; padding-top: 16px; border-top: 1px solid var(--tj-xian);
  line-break: strict;
}
.tj-zheng h2::before {
  content: "§" counter(tj-jie); display: block;
  font-family: var(--tj-latin); font-style: italic; font-size: 20px; color: var(--tj-zhe-shen); margin-bottom: 2px;
}
.tj-zheng h3 { font-size: 19px; line-height: 1.5; margin: 28px 0 6px; }
.tj-zheng code {
  font-family: Consolas, "SFMono-Regular", monospace; font-size: 0.88em;
  background: var(--tj-di); padding: 1px 6px; border-radius: 5px; overflow-wrap: anywhere;
}
.tj-zheng strong { font-weight: 700; }

.tj-tu { margin: 26px 0; }
.tj-tu img { display: block; border-radius: var(--tj-r-xiao); border: 1px solid var(--tj-xian); }
.tj-tu-shu img { max-width: 300px; }
.tj-tu-bao { display: block; margin: 20px 0; }

.tj-zheng .tj-ma { margin: 18px 0 22px; max-width: 34em; }

/* 词条表 */
.tj-cibiao { overflow-x: auto; margin: 20px 0 22px; border: 1px solid var(--tj-xian); border-radius: var(--tj-r-xiao); background: var(--tj-ci); }
.tj-cibiao table { border-collapse: collapse; width: 100%; font-size: 15px; line-height: 1.6; }
.tj-cibiao th { text-align: left; font-weight: 700; background: var(--tj-di); padding: 10px 12px; border-bottom: 2px solid var(--tj-mo); white-space: nowrap; }
.tj-cibiao td { padding: 10px 12px; border-bottom: 1px solid var(--tj-xian); vertical-align: top; }
.tj-cibiao tr:last-child td { border-bottom: 0; }
.tj-cibiao-ci td:first-child { font-family: var(--tj-latin); font-style: italic; font-size: 18px; color: var(--tj-zhe-shen); white-space: nowrap; }

/* FAQ 与文末 */
.tj-faq { margin-top: 46px; padding-top: 16px; border-top: 3px double var(--tj-mo); }
.tj-faq > h2 { font-family: var(--tj-biaoti); font-weight: 400; font-size: 34px; margin: 0 0 6px; }
.tj-faq-x { padding: 12px 0; border-bottom: 1px dotted #cbbfd3; }
.tj-faq-q { margin: 0 0 4px; font-size: 18px; line-height: 1.55; }
.tj-faq-a { margin: 0; max-width: 38em; }
.tj-wen-wei { margin-top: 36px; padding-top: 14px; border-top: 1px solid var(--tj-xian); }
.tj-bq-ti, .tj-qu-ti { margin: 0 0 4px; font-size: 14px; color: var(--tj-mo-er); }
.tj-bq-ul { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tj-bq-ul li > * { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border: 1px solid var(--tj-xian); border-radius: 999px; font-size: 14px; background: var(--tj-ci); }
.tj-qu-ul { list-style: none; margin: 0; padding: 0; }
.tj-qu-ul a { display: inline-flex; align-items: center; min-height: 44px; }

/* 搜索 */
.tj-so label { display: block; font-size: 14px; color: var(--tj-mo-er); margin-bottom: 4px; }
.tj-so-hang { display: flex; gap: 8px; }
.tj-so input {
  flex: 1; min-width: 0; min-height: 48px; padding: 0 14px; font: inherit; font-size: 16px;
  border: 1.5px solid var(--tj-mo-er); border-radius: var(--tj-r-xiao); background: var(--tj-ci); color: var(--tj-mo);
}
.tj-so button {
  min-height: 48px; padding: 0 20px; font: inherit; font-size: 16px; color: #fff; background: var(--tj-mo);
  border: 0; border-radius: var(--tj-r-xiao); cursor: pointer;
}
.tj-so-zhuang { font-size: 14px; color: var(--tj-mo-er); }
.tj-so-jie { padding-left: 1.4em; }
.tj-so-jie li { margin: 0 0 14px; }
.tj-so-jie a { font-size: 18px; }
.tj-so-jie p { margin: 2px 0 0; font-size: 14.5px; color: var(--tj-mo-er); }

.tj-404 .tj-ci-tou { margin-top: 20px; }
.tj-404 .tj-ci-ci { font-size: 48px; }
.tj-404-qu a { display: inline-flex; align-items: center; min-height: 44px; }
.tj-kuai-wei a, .tj-qu-ul a, .tj-di-rss a { min-width: 44px; }

/* 页脚 */
.tj-di { background: var(--tj-di); border-top: 3px double var(--tj-mo); margin-top: 20px; }
.tj-di-in { max-width: 1180px; margin: 0 auto; padding: 22px 28px 26px; font-size: 14px; color: var(--tj-mo-er); }
.tj-di-tou { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.tj-di-sheng { margin: 0; max-width: 46em; line-height: 1.7; }
.tj-di-pi { margin: 12px 0 6px; line-height: 1.7; }
.tj-di-pi-a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 2px; }
.tj-di-lian { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; column-gap: 6px; }
.tj-di-lian a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; color: var(--tj-mo); }
.tj-di-rss { margin: 4px 0 0; }
.tj-di-rss a { display: inline-flex; align-items: center; min-height: 44px; }
.tj-di-nian { margin: 6px 0 0; font-family: var(--tj-latin); font-size: 15px; }

/* 平板与手机 */
@media (max-width: 900px) {
  .tj-shou { grid-template-columns: minmax(0, 1fr); grid-template-areas: "biao" "ma" "tui" "ci"; }
  .tj-shou-xia { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
  body { font-size: 16px; line-height: 1.8; }
  .tj-top-in { padding: 6px 16px 0; flex-wrap: wrap; row-gap: 0; }
  .tj-logo { height: 34px; }
  .tj-dao { width: 100%; }
  .tj-dao-ul { justify-content: space-between; }
  .tj-dao-ul a { padding: 0 10px; font-size: 15px; }
  .tj-h1 { font-size: 44px; line-height: 1.16; margin-bottom: 12px; }
  .tj-h1-zhong { font-size: 34px; }
  .tj-shou { padding: 16px 16px 18px; row-gap: 14px; }
  .tj-shou-dao { font-size: 15px; line-height: 1.7; }
  .tj-shou-ci { padding: 10px 16px 4px; }
  .tj-ma { padding: 10px 16px 14px; }
  .tj-ma .tj-ci-ci { font-size: 44px; }
  .tj-ma .tj-ma-zi { font-size: 26px; }
  .tj-tui-ti { font-size: 21px; }
  .tj-shou-xia { padding: 8px 16px 30px; }
  .tj-shou-xia > h2, .tj-kuai > h2 { font-size: 25px; }
  .tj-kuang, .tj-wen { padding-left: 16px; padding-right: 16px; }
  .tj-zheng h2, .tj-faq > h2 { font-size: 27px; }
  .tj-zheng h3 { font-size: 18px; }
  .tj-mu { padding: 10px 14px 6px; }
  .tj-list-t { font-size: 22px; }
  .tj-di-in { padding: 18px 16px 22px; }

  /* 表格卡片化 */
  .tj-cibiao { border: 0; background: transparent; overflow: visible; }
  .tj-cibiao thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); }
  .tj-cibiao table, .tj-cibiao tbody, .tj-cibiao tr, .tj-cibiao td { display: block; width: 100%; }
  .tj-cibiao tr { background: var(--tj-ci); border: 1px solid var(--tj-xian); border-radius: var(--tj-r-xiao); margin: 0 0 10px; padding: 6px 0; }
  .tj-cibiao td { border: 0; padding: 4px 14px; }
  .tj-cibiao td::before { content: attr(data-tj-lan); display: block; font-family: var(--tj-hei); font-style: normal; font-size: 13px; color: var(--tj-mo-er); }
  .tj-cibiao-ci td:first-child { white-space: normal; font-size: 21px; }

  /* 截图：横向较宽的几张在手机上改为可左右滑动，保证图里的字不被缩得太小 */
  .tj-tu-gun { overflow-x: auto; border-radius: var(--tj-r-xiao); }
  .tj-tu-hua img { width: 620px; max-width: none; }
  .tj-tu-kuan img { width: 900px; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

.tj-tui-ti a .tj-ph { text-decoration: underline; text-decoration-color: var(--tj-zhe); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.tj-tiao-ti { margin: 16px 0 4px; font-size: 13px; color: var(--tj-mo-er); }
.tj-tiao { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tj-tiao a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px;
  border: 1px solid var(--tj-xian); border-radius: 999px; background: var(--tj-ci);
  color: var(--tj-mo); text-decoration: none; font-size: 15px;
}
.tj-tiao a:hover { border-color: var(--tj-zhe); color: var(--tj-zhe-shen); }
