:root {
  --bg: #f4efe6;
  --card: #ffffff;
  --ink: #141414;
  --muted: #6f6a62;
  --line: #e6e0d6;
  --gold: #a8854a;
  --gold-soft: #f3ead9;
  --yes: #1f8a4c;
  --yes-soft: #e4f4ea;
  --maybe: #b7791f;
  --maybe-soft: #fbf0dc;
  --no: #c0392b;
  --no-soft: #fbe5e2;
  --pending: #6b7280;
  --pending-soft: #eef0f2;
  --radius: 22px;
  --shadow: 0 10px 40px rgba(60, 45, 20, 0.12);
  --font: "Heebo", "Assistant", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

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

[hidden] { display: none !important; }

/* ---------- דף מוזמן ---------- */

.page {
  max-width: 560px;
  margin: 0 auto;
  padding: 16px 12px 40px;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.invite img {
  display: block;
  width: 100%;
  height: auto;
}

.invite-fallback {
  padding: 48px 24px;
  text-align: center;
  background: linear-gradient(160deg, #fbf6ec, #efe3cc);
  border-bottom: 1px solid var(--line);
}
.invite-fallback .small { color: var(--muted); margin: 0 0 8px; }
.invite-fallback h1 { margin: 0; font-size: 34px; font-weight: 800; }

.section {
  padding: 26px 22px;
  border-bottom: 1px solid var(--line);
}
.section:last-child { border-bottom: 0; }

.details { text-align: center; }
.details .date {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: 0.5px;
  direction: ltr;
  margin: 0;
}
.details .hdate { color: var(--muted); margin: 2px 0 0; }
.details .time { color: var(--muted); font-size: 19px; margin: 6px 0 14px; }
.details .place { margin: 0; }

.greeting {
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 18px;
}

/* בחירת סטטוס */
.segmented {
  display: flex;
  gap: 4px;
  padding: 5px;
  background: #f5f5f4;
  border: 1px solid var(--line);
  border-radius: 999px;
  margin-bottom: 22px;
}
.segmented button {
  flex: 1;
  border: 0;
  background: transparent;
  border-radius: 999px;
  padding: 13px 6px;
  font-weight: 700;
  font-size: 17px;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.segmented button[aria-checked="true"] {
  background: var(--ink);
  color: #fff;
}

.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}
.input, .textarea {
  width: 100%;
  border: 1.5px solid #cfc9bf;
  border-radius: 14px;
  padding: 13px 14px;
  background: #fff;
  font-size: 17px;
  outline: none;
  transition: border-color .15s;
}
.input:focus, .textarea:focus { border-color: var(--ink); }
.textarea { min-height: 96px; resize: vertical; border-radius: 22px; }
.input[type="tel"] { direction: ltr; text-align: right; }

/* בחירת כמות */
.count-label { text-align: center; font-weight: 600; margin-bottom: 10px; }
.stepper {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 26px;
  margin-bottom: 22px;
}
.stepper button {
  width: 64px;
  height: 64px;
  border: 1.5px solid var(--ink);
  border-radius: 16px;
  background: #fff;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  user-select: none;
}
.stepper button:active { background: #f1f1f1; }
.stepper button:disabled { opacity: .35; cursor: default; }
.stepper input {
  width: 76px;
  height: 64px;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  text-align: center;
  font-size: 26px;
  font-weight: 700;
  outline: none;
  -moz-appearance: textfield;
}
.stepper input:focus { border-color: var(--ink); }
.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.hint { text-align: center; color: var(--muted); margin: 12px 0 0; font-size: 15px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  font-size: 19px;
  padding: 16px 36px;
  cursor: pointer;
  text-decoration: none;
}
.btn:disabled { opacity: .55; cursor: default; }
.btn-block { display: flex; width: 100%; }
.center { text-align: center; }

.error {
  background: var(--no-soft);
  color: var(--no);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 14px;
  font-weight: 600;
  text-align: center;
}

.done { text-align: center; }
.done .icon { font-size: 46px; line-height: 1; margin-bottom: 8px; }
.done h2 { margin: 0 0 6px; font-size: 24px; }
.done p { margin: 0 0 20px; color: var(--muted); }

.actions {
  display: flex;
  justify-content: space-around;
  padding: 26px 12px 30px;
}
.action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  background: none;
  border: 0;
  cursor: pointer;
  font-size: 17px;
}
.action svg { width: 48px; height: 48px; }

.hp {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.page { position: relative; }

.loading {
  padding: 80px 20px;
  text-align: center;
  color: var(--muted);
}

.footer-note { text-align: center; color: var(--muted); font-size: 13px; margin-top: 18px; }
