/* ============================================================
   庭院 · 基底
   ============================================================ */

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

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overscroll-behavior: none;
}

body {
  background: var(--night-1000);
  color: var(--moon-200);
  font-family: var(--font-sans);
  font-size: var(--t-base);
  line-height: 1.72;
  letter-spacing: 0.012em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

a { color: inherit; text-decoration: none; }

button, input, textarea, select {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  margin: 0;
  padding: 0;
  border-radius: 0;
}

button { cursor: pointer; }

svg { display: block; }

/* ── 滚动条：细，几乎看不见 ── */
* { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.12) transparent; }
*::-webkit-scrollbar { width: 6px; height: 6px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.10);
  border-radius: 99px;
}
*::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.18); }

/* ── 焦点：一圈月光，不刺眼 ── */
:focus { outline: none; }
:focus-visible {
  outline: 1px solid rgba(226, 189, 124, 0.55);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}

/* ── 文字工具类 ── */
.serif { font-family: var(--font-serif); }
.num   { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

.label {
  font-size: var(--t-xs);
  letter-spacing: 0.20em;
  color: var(--moon-400);
  text-transform: none;
  font-weight: 400;
}

.dim    { color: var(--moon-300); }
.faint  { color: var(--moon-400); }
.bright { color: var(--moon-100); }

.hairline {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: 0;
}

/* ── 分隔：一条慢慢淡去的线，而不是硬边框 ── */
.fade-rule {
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, transparent, var(--line-2) 22%, var(--line-2) 78%, transparent);
}

.wash-line {
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}

/* 屏幕阅读器专用 */
.sr {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ── 舞台：整座庭院的坐标系 ── */
#stage {
  position: fixed;
  inset: 0;
  z-index: var(--z-scene);
  pointer-events: none;
  overflow: hidden;
}

/* ── 过渡工具 ── */
@keyframes riseIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
