:root {
  --ink: #172f2a;
  --muted: #536b62;
  --green: #1e5949;
  --green-dark: #143f35;
  --line: #dce5dc;
  --canvas: #f4f6f0;
  --paper: #fffef9;
  --serif: "Noto Serif SC", "Songti SC", "STSong", SimSun, Georgia, serif;
  --sans: "Instrument Sans", "PingFang SC", "Microsoft YaHei UI", "Noto Sans CJK SC", "Microsoft YaHei", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { min-width: 280px; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--canvas); color: var(--ink); font-family: var(--sans); font-size: 16px; -webkit-text-size-adjust: 100%; }
#app { flex: 1 0 auto; min-width: 0; }
button, input, textarea, select { font: inherit; }
input, textarea { min-width: 0; }
button { cursor: pointer; }
button[disabled] { cursor: not-allowed; }
a { color: var(--green); }
:focus-visible { outline: 2px solid #397b60; outline-offset: 3px; }
::selection { background: #cfe3d0; color: #153d32; }
.site-header { background: #fffef9; border-bottom: 1px solid #dbe4d9; }
.site-header-inner, .site-footer > div { width: min(100% - 48px, 1240px); margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.site-header-inner { min-height: 70px; }
.site-brand { display: inline-flex; align-items: center; gap: .7rem; color: #1a453a; font-size: 18px; font-weight: 750; text-decoration: none; white-space: nowrap; }
.site-brand small { color: #719178; margin: 0 2px; font-size: 14px; }
.site-mark { display: grid; grid-template-columns: repeat(2, 6px); place-content: center; gap: 2px; height: 32px; width: 32px; border-radius: 10px; background: #205747; }
.site-mark i { width: 6px; height: 6px; background: #e5f2d8; border-radius: 70% 70% 4% 70%; }
.site-mark i:nth-child(2) { rotate: 90deg; }
.site-mark i:nth-child(3) { rotate: -90deg; }
.site-mark i:nth-child(4) { rotate: 180deg; }
.site-label { color: #4c6d60; font-size: 14px; letter-spacing: .08em; white-space: nowrap; }
.site-footer { border-top: 1px solid #dbe4d9; background: #fafbf6; color: #536b62; font-size: 13px; }
.site-footer > div { padding-block: 22px; flex-wrap: wrap; }
.site-loading { width: min(100% - 48px, 980px); margin: 3rem auto; padding: 2rem; text-align: center; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); }

html:has(.reference-page) {
  background: #e9e3ee;
  scroll-padding-top: 64px;
}

.reference-page {
  --ink: #2c2a31;
  --muted: #6e6575;
  --line: #e8e0ee;
  --canvas: #faf8fc;
  --paper: #fff;
  width: min(100%, 430px);
  margin-inline: auto;
  box-shadow: 0 0 40px rgb(61 34 87 / .12);
}

.reference-page .site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  background: #3d2257;
  border: 0;
}

.reference-page .site-header-inner {
  width: auto;
  min-height: 58px;
  padding: 12px 18px;
  gap: 8px;
}

.reference-page .site-brand {
  gap: 10px;
  color: #fff;
}

.reference-page .site-mark {
  display: grid;
  place-items: center;
  grid-template-columns: 1fr;
  width: 32px;
  height: 32px;
  flex: none;
  border: 1px solid #d0ae58;
  border-radius: 50%;
  background: transparent;
  color: #d0ae58;
  font: 500 15px / 1 var(--serif);
}

.site-brand-text b, .site-brand-text small { display: block; }
.site-brand-text b {
  font: 500 13px / 1.45 var(--serif);
  letter-spacing: 1px;
}

.reference-page .site-brand-text small {
  margin: 2px 0 0;
  color: #dfcde9;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 1.5px;
}

.reference-page .site-label {
  color: #ebdff2;
  font-size: 11px;
}

.reference-page :focus-visible { outline-color: #9161b3; }
.reference-page .site-brand:focus-visible { outline-color: #e4ca7d; }
.reference-page ::selection { background: #eee0f5; color: #3d2257; }

@media (max-width: 520px) {
  .site-header-inner, .site-footer > div { width: min(100% - 32px, 1240px); }
  .site-header-inner { min-height: 59px; }
  .site-brand { font-size: 16px; }
  .site-label { font-size: 13px; }
  .site-footer > div { padding-block: 17px; }
}
@media (min-width: 600px) {
  .reference-page {
    margin-block: 18px;
    min-height: calc(100dvh - 36px);
    border-radius: 18px;
    box-shadow: 0 8px 40px rgb(61 34 87 / .18);
  }
  .reference-page .site-header { border-radius: 18px 18px 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
@media print {
  .site-header, .site-footer { display: none; }
  html:has(.reference-page), body { background: white; }
  .reference-page { width: auto; margin: 0; border-radius: 0; box-shadow: none; }
}
