/* Reading face: STKaiti. Code stays JetBrains Mono.
   Same mobile lock as creator/academy: alias every system Kaiti family name
   to the bundled woff2 so iOS Safari / WeChat / Android cannot pick a local
   楷体 or fall through to Latin serif for CJK. */
@font-face {
  font-family: "STKaiti";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("./fonts/STKaiti.woff2") format("woff2");
}
@font-face {
  font-family: "华文楷体";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("./fonts/STKaiti.woff2") format("woff2");
}
@font-face {
  font-family: "Kaiti SC";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("./fonts/STKaiti.woff2") format("woff2");
}
@font-face {
  font-family: "KaiTi";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("./fonts/STKaiti.woff2") format("woff2");
}
@font-face {
  font-family: "楷体";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("./fonts/STKaiti.woff2") format("woff2");
}

:root {
  --font-kaiti: "STKaiti", "华文楷体", "Kaiti SC", "KaiTi", "楷体", "BiauKai", "DFKai-SB", "PingFang SC", "PingFang TC", -apple-system, BlinkMacSystemFont, "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font: var(--font-kaiti);
  --ui-font: var(--font-kaiti);
  --mono: "JetBrains Mono", "SF Mono", Menlo, ui-monospace, monospace;
}

.rdr,
.md {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.md h1, .md h2 {
  -webkit-text-stroke: 0.25px currentColor;
}

/* Tables: content-first column widths, then stretch to the page.
   Header + short cells: center/middle. Sentence columns (not last): justify/middle. */
.md table {
  width: auto;
  min-width: 100%;
  max-width: 100%;
  table-layout: auto;
}
.md thead th,
.md th {
  text-align: center !important;
  vertical-align: middle;
  text-transform: none;
  letter-spacing: 0;
}
.md tbody td,
.md td {
  text-align: center;
  vertical-align: middle;
  word-break: break-word;
}
.md td.td-prose {
  text-align: justify;
  text-justify: inter-ideograph;
  text-align-last: left;
  vertical-align: middle;
}
