/* 基础排版与重置 */
*, *::before, *::after { box-sizing: border-box; }

/* 关键：确保 hidden 属性永远生效。
   浏览器默认的 [hidden]{display:none} 会被 .boot{display:grid}、.overlay{display:grid}
   这类作者样式覆盖，导致隐藏元素仍然盖在页面上（曾导致启动画面遮住整个应用）。 */
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;
}

h1, h2, h3, h4, h5 { margin: 0; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; }
h1 { font-size: 30px; letter-spacing: -0.03em; }
h2 { font-size: 22px; letter-spacing: -0.025em; }
h3 { font-size: 17px; }
h4 { font-size: 15px; }
p { margin: 0; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

button, input, textarea, select {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}
button { border: 0; background: none; cursor: pointer; padding: 0; }
button:disabled { cursor: not-allowed; opacity: 0.45; }

input, textarea, select { outline: none; }
textarea { resize: none; }

::selection { background: color-mix(in srgb, var(--accent) 24%, transparent); }

:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 60%, transparent);
  outline-offset: 2px;
  border-radius: 6px;
}

/* 滚动条：细、无箭头、hover 才明显 */
* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--text-4) 45%, transparent);
  border: 3px solid transparent;
  border-radius: 99px;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: color-mix(in srgb, var(--text-3) 70%, transparent); background-clip: content-box; }

.icon { width: 18px; height: 18px; flex: none; }
.icon-sm { width: 15px; height: 15px; }
.icon-lg { width: 22px; height: 22px; }
svg.icon { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
svg.icon.fill { fill: currentColor; stroke: none; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* 启动占位 */
.boot {
  position: fixed; inset: 0; display: grid; place-content: center; justify-items: center; gap: 16px;
  background: var(--bg); z-index: 900;
}
.boot-logo {
  width: 62px; height: 62px; border-radius: 18px; display: block;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}
.boot-mark { font-size: 12.5px; font-weight: 600; letter-spacing: 0.22em; color: var(--text-3); text-align: center; }
.boot-bar { width: 132px; height: 2px; border-radius: 2px; background: var(--line); overflow: hidden; }
.boot-bar i { display: block; height: 100%; width: 40%; border-radius: 2px; background: var(--text-3); animation: boot 1.1s var(--ease) infinite; }
@keyframes boot { 0% { transform: translateX(-110%); } 100% { transform: translateX(320%); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
