/* 只用本机字体。博客响应的 CSP 不允许加载外站字体。 */
:root {
  color-scheme: light dark;
  --bg: light-dark(#f7f5f2, #1c1917);
  --text: light-dark(#1c1917, #fafaf9);
  --muted: light-dark(#57534e, #a8a29e);
  --line: light-dark(#e7e5e4, #44403c);
  --link: light-dark(#9a3412, #fdba74);
  --code: light-dark(#f0eeeb, #292524);
}
/* 主站是深色还是浅色：后端写在 <html data-scheme> 上，伴读上的按钮也改它。 */
:root[data-scheme='dark'] { color-scheme: dark; }
:root[data-scheme='light'] { color-scheme: light; }
/* 访客在主站固定了深色或浅色：博客跟着走（后端把它写在导航岛上）。 */
:root:has(#myriad-nav[data-scheme='dark']) { color-scheme: dark; }
:root:has(#myriad-nav[data-scheme='light']) { color-scheme: light; }
* { box-sizing: border-box; }
html { font-size: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Iowan Old Style", Palatino, "Palatino Linotype", "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", "PMingLiU", serif;
  line-height: 1.75;
  word-break: break-word;
}
.site-header, main, .site-footer {
  max-width: 40rem;
  margin: 0 auto;
  padding: 1.25rem;
}
/* 左边有主站的导航岛（竖条）：窗口窄到正文会碰上它时，正文往右让；宽了照旧居中。 */
@media (width >= 1078px), (width >= 768px) and (not (pointer: coarse)) {
  .site-header, main, .site-footer {
    margin-left: max(6.5rem, calc((100% - 40rem) / 2));
    margin-right: auto;
  }
}
.site-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  border-bottom: 1px solid var(--line);
}
.site-title {
  color: inherit;
  font-weight: 600;
  text-decoration: none;
}
nav a { margin-left: 1rem; }
a { color: var(--link); }
img, video, svg { max-width: 100%; height: auto; }
pre, code {
  font-family: ui-monospace, "SFMono-Regular", "Source Han Mono SC", "Noto Sans Mono CJK SC", monospace;
}
pre {
  overflow: auto;
  padding: 0.85rem 1rem;
  background: var(--code);
  border-radius: 6px;
  line-height: 1.5;
}
blockquote {
  margin: 1em 0;
  padding-left: 1rem;
  border-left: 3px solid var(--line);
  color: var(--muted);
}
table { border-collapse: collapse; width: 100%; }
th, td {
  border-bottom: 1px solid var(--line);
  padding: 0.35rem 0.5rem;
  text-align: left;
  vertical-align: top;
}
.meta, .posts time { color: var(--muted); font-size: 0.92rem; }
.posts, .terms, .friend-links { list-style: none; padding: 0; }
.posts li, .terms li, .friend-links li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
}
.cover img, .friend-links img { border-radius: 8px; }
.friend-links img { width: 2.5rem; height: 2.5rem; object-fit: cover; }
.site-footer { color: var(--muted); font-size: 0.9rem; }
