* { box-sizing: border-box; }

* {
  scrollbar-width: thin;
  scrollbar-color: var(--fill-strong) transparent;
}
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--fill-strong);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover { background: var(--separator); }
::-webkit-scrollbar-corner { background: transparent; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui,
    "Segoe UI", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body, .panel, .topbar, #drawer, .modal, .menu, .search, .crow:hover {
  transition: background-color 0.25s ease, color 0.25s ease;
}

.muted { color: var(--muted); }
.mono { font-family: ui-monospace, "SF Mono", Consolas, monospace; }
.spacer { flex: 1; }

[hidden] { display: none !important; }

.icon-svg {
  display: block;
  flex: none;
  width: 16px;
  height: 16px;
}
.btn .icon-svg, .auth-btn .icon-svg { width: 15px; height: 15px; }
.menu button .icon-svg { width: 14px; height: 14px; }
.ghost-icon .icon-svg { width: 17px; height: 17px; }

@keyframes riseIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes dropIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-16px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(3px); }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
