:root {
  --bg-1: #f4f7ff;
  --bg-2: #fcf5eb;
  --ink: #0f0e17;
  --muted: #6b7280;
  --panel: #ffffff;
  --stroke: #e5e7eb;
  --accent: #7c3aed;
  --accent-2: #a855f7;
  --radius: 14px;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  color: var(--ink);
}

.hidden {
  display: none !important;
}

/* ── SHARED BUTTONS ── */
.primary-btn,
.ghost-btn,
.letter-btn {
  border: none;
  cursor: pointer;
  font: inherit;
  user-select: none;
  touch-action: manipulation;
}

.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius);
  letter-spacing: 0.01em;
  transition: opacity 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 4px 18px rgba(124, 58, 237, 0.38), 0 1px 3px rgba(0,0,0,0.1);
  width: 100%;
}

.primary-btn:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 8px 24px rgba(124, 58, 237, 0.45); }
.primary-btn:active { transform: translateY(0); opacity: 1; }

.ghost-btn {
  background: #fff;
  border: 1.5px solid var(--stroke);
  color: var(--ink);
  padding: 0.55rem 0.9rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.875rem;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.ghost-btn:hover {
  border-color: #9ca3af;
  background: #f9fafb;
  transform: translateY(-1px);
}

.ghost-btn:active { transform: translateY(0); }

/* ── TOAST SYSTEM ── */
.toast-wrap {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  background: #111827;
  color: #f9fafb;
  padding: 0.8rem 1.15rem;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
  box-shadow: 0 4px 20px rgba(0,0,0,0.22);
  pointer-events: auto;
  max-width: 300px;
  animation: toast-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.toast.toast-out {
  animation: toast-out 0.25s ease forwards;
}

.toast-success { border-left: 3px solid #10b981; }
.toast-error   { border-left: 3px solid #ef4444; }
.toast-info    { border-left: 3px solid #3b82f6; }

@keyframes toast-in {
  from { opacity: 0; transform: translateX(30px) scale(0.9); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes toast-out {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(20px); }
}
