:root {
  --radius-sm: 14px;
  --radius-md: 24px;
  --radius-lg: 32px;
  --radius-pill: 999px;
  --font-sans: "Quicksand", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --dur-fast: .3s;
  --dur-base: .5s;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  color: #2E2A3B;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 10px 16px;
  background: #2E2A3B;
  color: #fff;
  border-radius: 0 0 12px 0;
  text-decoration: none;
}

.skip-link:focus {
  left: 0;
}

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

button {
  cursor: pointer;
  border: none;
  background: none;
}

:focus-visible {
  outline: 2px solid #FF6B4A;
  outline-offset: 2px;
}

.toast-wrap {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  min-width: 220px;
  max-width: 380px;
  padding: 14px 18px;
  border-radius: 16px;
  font-size: 15px;
  line-height: 1.6;
  box-shadow: 0 12px 30px -12px rgba(46, 42, 59, .35);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  animation: toast-in .35s var(--ease-spring);
}

.toast .toast-icon {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 14px;
  color: #fff;
}

.toast.ok { background: #0E7A6D; color: #fff; }
.toast.ok .toast-icon { background: rgba(255, 255, 255, .22); }
.toast.err { background: #C2513A; color: #fff; }
.toast.err .toast-icon { background: rgba(255, 255, 255, .22); }
.toast.info { background: #3A3A44; color: #fff; }
.toast.info .toast-icon { background: rgba(255, 255, 255, .22); }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-10px) scale(.96); }
  to { opacity: 1; transform: none; }
}

.thinking-dots {
  display: inline-flex;
  gap: 5px;
  align-items: center;
}

.thinking-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  animation: dot-breathe 1.6s ease-in-out infinite;
}

.thinking-dots i:nth-child(2) { animation-delay: .5s; }
.thinking-dots i:nth-child(3) { animation-delay: 1s; }

@keyframes dot-breathe {
  0%, 100% { opacity: .25; transform: scale(.8); }
  50% { opacity: 1; transform: scale(1.1); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
