/* לבונה — shared design tokens: desert sand + lavender */
:root {
  --sand-50: #fbf8f3;
  --sand-100: #f6efe4;
  --sand-200: #ecdfcb;
  --sand-300: #dfc9a9;
  --sand-400: #cdac84;
  --clay: #b07f5c;
  --lav-50: #f6f3fa;
  --lav-100: #ece6f4;
  --lav-200: #dcd1ea;
  --lav-300: #c1b0da;
  --lav-400: #a28fc5;
  --lav-500: #8672ad;
  --plum-600: #5e4a7e;
  --plum-700: #4a3860;
  --plum-900: #2e2440;
  --ink: #3a3045;
  --muted: #7b6f84;
  --line: rgba(74, 56, 96, 0.12);
  --ok: #5f8a6e;
  --warn: #b2674f;

  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --shadow-sm: 0 2px 8px -4px rgba(74, 56, 96, 0.25);
  --shadow: 0 18px 40px -22px rgba(74, 56, 96, 0.4);
  --font-head: 'Frank Ruhl Libre', 'David Libre', serif;
  --font-body: 'Assistant', 'Rubik', system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--sand-50);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--plum-600); }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 500; color: var(--plum-900); line-height: 1.25; margin: 0 0 0.5em; }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--lav-500); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  padding: 0.72em 1.5em; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 1rem; text-decoration: none; cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s, transform 0.25s var(--ease), box-shadow 0.25s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--plum-700); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--plum-600); }
.btn-soft { background: var(--lav-100); color: var(--plum-700); }
.btn-soft:hover { background: var(--lav-200); }
.btn-ghost { background: transparent; color: var(--plum-700); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--lav-400); background: var(--lav-50); }
.btn-danger { background: #f6e6e0; color: var(--warn); }
.btn-danger:hover { background: #f0d6cc; }
.btn-sm { padding: 0.45em 1em; font-size: 0.92rem; }
.btn[disabled] { opacity: 0.5; pointer-events: none; }
.btn svg { width: 1.1em; height: 1.1em; flex: none; }

/* forms */
.field { display: grid; gap: 0.35rem; margin-bottom: 1rem; }
.field > span, .label { font-size: 0.92rem; font-weight: 600; color: var(--plum-700); }
.input, select.input, textarea.input {
  width: 100%; padding: 0.7em 0.95em; border-radius: var(--radius-sm);
  border: 1px solid var(--sand-300); background: #fff; transition: border-color 0.2s, box-shadow 0.2s;
}
.input:focus { outline: none; border-color: var(--lav-400); box-shadow: 0 0 0 4px var(--lav-100); }
textarea.input { min-height: 90px; resize: vertical; }
.hint { font-size: 0.86rem; color: var(--muted); }

.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); }

/* toast */
.toast {
  position: fixed; inset-inline: 0; bottom: 24px; margin: auto; width: max-content; max-width: calc(100% - 32px);
  background: var(--plum-900); color: #fff; padding: 0.75em 1.3em; border-radius: 999px; box-shadow: var(--shadow);
  z-index: 1000; font-weight: 500; animation: toast-in 0.35s var(--ease);
}
.toast.err { background: var(--warn); }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }

.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--lav-200); border-top-color: var(--lav-500); animation: spin 0.9s linear infinite; margin: 2rem auto; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
