:root {
  --btn-bg: #8b5e3c; /* slate-900 */
  --btn-fg: #ffffff;
  --btn-hover: #0b1220; /* darker slate */
  --btn-ring: 0 0 0 4px rgba(59, 130, 246, 0.35); /* sky ring */

  --primary: #2563eb; /* blue-600 */
  --primary-hover: #1e40af; /* blue-800 */

  --success: #16a34a; /* green-600 */
  --success-hover: #166534; /* green-800 */

  --danger: #dc2626; /* red-600 */
  --danger-hover: #991b1b; /* red-800 */

  --radius: 9999px; /* pill */
  --shadow: 0 10px 20px rgba(0, 0, 0, 0.06), 0 3px 6px rgba(0, 0, 0, 0.08);
  --shadow-pressed: 0 6px 12px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.12);
  --gap: 0.6rem;
  --pad-y: 0.7rem;
  --pad-x: 1.2rem;
  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Noto Sans,
    Ubuntu, Cantarell, Helvetica Neue, Arial, "Apple Color Emoji",
    "Segoe UI Emoji";
}

/* Base button */
.btn {
  --bg: var(--btn-bg);
  --fg: var(--btn-fg);
  --hover: var(--btn-hover);

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--gap);
  padding: var(--pad-y) var(--pad-x);
  border-radius: var(--radius);
  border: 1px solid transparent;
  background: var(--bg);
  color: var(--fg);
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.12s ease, box-shadow 0.12s ease,
    background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  line-height: 1.1;
}

.btn:hover {
  background: var(--hover);
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-pressed);
}

.btn:focus-visible {
  outline: none;
  box-shadow: var(--shadow), var(--btn-ring);
}

.btn[disabled],
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Variants */
.btn--primary {
  --bg: var(--primary);
  --hover: var(--primary-hover);
}

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

.btn--outline {
  --bg: transparent;
  --fg: #e5e7eb;
  --hover: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: none;
  backdrop-filter: blur(6px);
}

.btn--ghost {
  --bg: transparent;
  --fg: #e5e7eb;
  --hover: rgba(255, 255, 255, 0.04);
  box-shadow: none;
  border-color: transparent;
}

/* Sizes */
.btn--sm {
  --pad-y: 0.5rem;
  --pad-x: 0.9rem;
  font-size: 0.9rem;
}
.btn--lg {
  --pad-y: 0.9rem;
  --pad-x: 1.35rem;
  font-size: 1.05rem;
}

/* With icon */
.btn__icon {
  width: 18px;
  height: 18px;
  display: inline-block;
}

.btn-wrapper {
  display: flex;
  justify-content: center; /* horizontal center */
}

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
  .btn {
    transition: none;
  }
  .btn:hover,
  .btn:active {
    transform: none;
  }
}
