:root {
  --bg: #ffffff;
  --bg-subtle: #f9f9f9;
  --bg-chip: #f2f2f2;
  --bg-hover: #f2f2f2;
  --border: #e5e5e5;
  --text: #0f0f0f;
  --text-2: #606060;
  --text-3: #909090;
  --brand: #c2410c;
  --brand-mark: #ff6600;
  --radius-sm: 8px;
  --radius: 12px;
  --pill: 999px;
  --header-h: 56px;
  --sidebar-w: 240px;
  --font: system-ui, -apple-system, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --ease: cubic-bezier(0.2, 0, 0, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

img {
  display: block;
  max-width: 100%;
}

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

button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

h1,
h2,
h3,
p {
  margin: 0;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transform: translateY(-160%);
}

.skip-link:focus-visible {
  transform: none;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  flex: none;
}

.icon-btn:hover {
  background: var(--bg-hover);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: var(--pill);
  background: var(--bg);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.btn:hover {
  background: var(--bg-hover);
}

.btn-primary {
  border-color: var(--text);
  background: var(--text);
  color: #fff;
}

.btn-primary:hover {
  background: #000;
}

.btn.is-on {
  border-color: var(--text);
  background: var(--text);
  color: #fff;
}

.chip {
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-chip);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.chip:hover {
  background: #e9e9e9;
}

.chip[aria-pressed="true"] {
  border-color: var(--text);
  background: var(--text);
  color: #fff;
}

.avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex: none;
  font-size: 14px;
  font-weight: 600;
  user-select: none;
}

.muted {
  color: var(--text-2);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 60;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--text);
  color: #fff;
  font-size: 13px;
  transform: translateX(-50%);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
