/* ═══════════════════════════════════════════════════════════════════
   Base — Reset, Typography, Scrollbar, Utilities
   ═══════════════════════════════════════════════════════════════════ */

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

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC",
               "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--surface-1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--brand);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}
a:hover { color: var(--brand-hover); }

input, select, textarea, button {
  font-family: inherit;
  font-size: inherit;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--text-tertiary); }

/* ── Selection ── */
::selection {
  background: rgba(75, 200, 192, 0.25);
  color: var(--text-primary);
}

/* ── Focus ── */
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

/* ── Utilities ── */
.muted {
  font-size: 0.82em;
  color: var(--text-tertiary);
}
.loading-placeholder {
  padding: 48px;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 0.9em;
}
