/* ========== Base ========== */
:root {
  --brand: #571845;          /* Deep plum/purple */
  --brand-dark: #3b102f;     /* Darker plum */
  --brand-light: #7a2261;    /* Medium plum/violet */
  --brand-crimson: #c51a3f;  /* Deep crimson red */
  --brand-orange: #ef5740;   /* Bright orange/red (highlights and primary button) */
  --gold: #fec330;           /* Vibrant gold/yellow */
  --cream: #fcf8f5;          /* Soft cream */
  --cream-deep: #fdf5f0;     /* Deeper cream background */
  --cream-card: #ffffff;     /* White card bg */
  --text: #22121c;           /* Dark plum charcoal */
  --text-muted: #6e5564;     /* Muted gray-purple */
  --line: #e6d6df;           /* Soft lavender gray line */
  --danger: #c51a3f;         /* Red warnings */
  --success: #4A7C59;        /* Success green */
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(87, 24, 69, 0.06);
  --shadow-lg: 0 12px 40px rgba(87, 24, 69, 0.12);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: "Heebo", "Assistant", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--cream);
  color: var(--text);
  line-height: 1.6;
  text-align: start;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
/* Direction is set on <html dir> by i18n.js; these keep alignment logical. */

body.bg-decor {
  background:
    radial-gradient(ellipse at top right, rgba(254, 195, 48, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at bottom left, rgba(87, 24, 69, 0.08) 0%, transparent 50%),
    var(--cream);
  background-attachment: fixed;
}

/* ========== Pace modal ========== */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(40, 20, 25, 0.55);
  z-index: 9999;
  padding: 16px;
  align-items: center; justify-content: center;
  display: none;
  overflow-y: auto;
}
.modal-backdrop.open {
  display: flex;
  animation: fade-in .15s ease;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--cream-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-width: 760px; width: 100%;
  max-height: 90vh;
  max-height: 90dvh;
  display: flex; flex-direction: column;
  border: 1px solid var(--line);
}
.modal-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.modal-head h3 { margin: 0; color: var(--brand); font-size: 18px; }
.modal-sub { font-size: 12.5px; color: var(--text-muted); margin-top: 4px; line-height: 1.4; }
.modal-close {
  background: transparent; border: 0; cursor: pointer;
  font-size: 30px; color: var(--text-muted); line-height: 1;
  padding: 0 6px; margin-inline-start: 12px;
  -webkit-tap-highlight-color: transparent;
}
.modal-close:hover { color: var(--brand); }
.modal-body { padding: 12px 18px 18px; overflow-y: auto; flex: 1 1 auto; min-height: 0; }
.pace-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

table.pace-table { width: 100%; border-collapse: collapse; min-width: 540px; }
table.pace-table th, table.pace-table td {
  padding: 10px 8px; text-align: start; vertical-align: top;
  border-bottom: 1px solid var(--line);
}
table.pace-table th {
  color: var(--text-muted); font-weight: 600; font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.03em;
  white-space: nowrap;
}
table.pace-table tbody tr:last-child td { border-bottom: 0; }
table.pace-table .pace-week-label { font-weight: 600; color: var(--text); font-size: 14px; }
table.pace-table .pace-week-meta { font-size: 10.5px; color: var(--text-muted); display: block; margin-top: 2px; white-space: nowrap; }
table.pace-table tr.pace-current-row { background: rgba(200, 169, 106, 0.12); }
table.pace-table tr.pace-current-row .pace-week-label { color: var(--brand); }
table.pace-table .cell-num { font-size: 15px; font-weight: 700; color: var(--text); line-height: 1.15; }
table.pace-table tr.pace-current-row .cell-num { color: var(--brand); font-size: 16px; }
table.pace-table .cell-delta {
  font-size: 11px; font-weight: 600; margin-top: 3px; line-height: 1;
  display: inline-flex; align-items: center; gap: 3px;
}
.cell-delta.up   { color: var(--success); }
.cell-delta.down { color: var(--danger); }
.cell-delta.flat { color: var(--text-muted); font-weight: 500; }
.pace-note { font-size: 11.5px; color: var(--text-muted); margin: 14px 0 0; line-height: 1.5; }
.pace-empty { padding: 18px 0; text-align: center; color: var(--text-muted); font-size: 14px; }

@media (max-width: 640px) {
  .modal-backdrop { padding: 10px; }
  .modal { max-height: 92vh; max-height: 92dvh; }
  .modal-head { padding: 14px 16px 10px; }
  .modal-head h3 { font-size: 16px; }
  .modal-body { padding: 10px 14px 16px; }
  table.pace-table th { font-size: 10px; padding: 8px 6px; }
  table.pace-table td { padding: 9px 6px; }
  table.pace-table .pace-week-label { font-size: 13px; }
  table.pace-table .cell-num { font-size: 14px; }
}

/* ========== Embed mode ========== */
body.embed .yechi-banner,
body.embed .site-header,
body.embed .rebbe-block,
body.embed .site-footer {
  display: none !important;
}
body.embed.bg-decor { background: transparent; }
body.embed .hero { padding-top: 12px; }
body.embed main.container { padding-top: 0; }
@media (max-width: 540px) {
  body.embed main.container { padding-inline: 8px; padding-bottom: 24px; }
  body.embed .card { padding: 22px 14px; }
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ========== Header ========== */
.site-header {
  border-bottom: 1px solid var(--line);
  padding: 18px 24px;
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(8px);
  background: rgba(255, 253, 249, 0.95);
}
.site-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 14px;
}
.site-logo img { height: 56px; width: auto; }
.site-logo .site-logo-secondary {
  height: 38px;
  margin-inline-start: -4px;
  opacity: 0.92;
}
.site-logo h1 {
  margin: 0;
  font-size: 22px;
  color: var(--brand);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.site-logo .subtitle { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

.header-actions { display: flex; align-items: center; gap: 10px; }
.lang-toggle {
  background: transparent;
  border: 1.5px solid var(--brand);
  color: var(--brand);
  border-radius: 100px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
}
.lang-toggle:hover { background: var(--brand); color: var(--cream); }

.donate-link {
  background: var(--brand);
  border: 1.5px solid var(--brand);
  color: #fff;
  border-radius: 100px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.donate-link:hover { background: var(--brand-dark); border-color: var(--brand-dark); }

/* ========== Yechi banner ========== */
.yechi-banner {
  background: linear-gradient(90deg, var(--brand-dark) 0%, var(--brand) 50%, var(--brand-dark) 100%);
  color: var(--gold-soft);
  text-align: center;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-bottom: 1px solid var(--gold);
}
.yechi-banner .yechi-text {
  background: linear-gradient(180deg, #F4E1B8 0%, #C8A96A 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
}

/* ========== Rebbe block ========== */
.rebbe-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 32px auto 0;
  padding: 0 24px;
}
.rebbe-frame {
  position: relative;
  width: 190px;
  height: 253px;
  border-radius: 14px;
  padding: 6px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--brand) 100%);
  box-shadow: 0 8px 28px rgba(95, 46, 56, 0.22);
}
.rebbe-frame img {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  object-fit: cover;
  object-position: center top;
  display: block;
  border: 3px solid var(--cream-card);
}
@media (max-width: 540px) {
  .rebbe-frame { width: 150px; height: 200px; }
}

/* ========== Hero ========== */
.hero {
  text-align: center;
  padding: 40px 24px 28px;
  max-width: 760px;
  margin: 0 auto;
}
@media (max-width: 600px) {
  .hero { padding: 24px 18px 18px; }
  .hero h2 { font-size: clamp(22px, 6vw, 34px); }
  .hero .dates { font-size: 15px; }
}
.hero .eyebrow {
  display: inline-block;
  background: var(--brand);
  color: var(--cream);
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 18px;
}
.hero h2 {
  font-size: clamp(28px, 5vw, 44px);
  margin: 0 0 14px;
  color: var(--brand);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.hero .dates { font-size: 18px; color: var(--text); font-weight: 500; margin: 0 0 6px; }
.hero .dates-en { font-size: 15px; color: var(--text-muted); margin-top: 0; }
.hero .lead { font-size: 16px; color: var(--text-muted); margin: 16px auto 0; max-width: 620px; }

/* ========== Card / Form ========== */
.container { max-width: 720px; margin: 0 auto; padding: 0 20px 80px; }
.card {
  background: var(--cream-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px 32px;
  box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 6px; font-size: 22px; color: var(--brand); font-weight: 700; }
.card .helper { font-size: 14px; color: var(--text-muted); margin: 0 0 24px; }

#form-wrap.card {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

/* ========== Form Steps Layout ========== */
.form-step-section {
  position: relative;
  background: var(--cream-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  transition: border-color 0.22s ease-in-out, box-shadow 0.22s ease-in-out;
  scroll-margin-top: 80px;
}
.form-step-section:focus-within {
  border-color: var(--brand-light);
  box-shadow: 0 8px 24px rgba(87, 24, 69, 0.05);
}
.step-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 1.5px solid var(--line);
  padding-bottom: 12px;
}
.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-orange) 0%, var(--brand-crimson) 100%);
  color: white;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(239, 87, 64, 0.2);
}
.step-title {
  font-size: 16.5px;
  font-weight: 700;
  color: var(--brand);
  margin: 0;
}

/* Week Selected Confirmation Label */
.week-selected-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 14px;
  background: rgba(87, 24, 69, 0.05);
  border: 1px solid rgba(87, 24, 69, 0.18);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--brand);
  animation: fade-in 0.2s ease;
}
.wsl-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--brand);
  color: white;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}

/* Guest names grid */
.guest-names-grid {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}
.guest-names-grid input {
  background: var(--cream-deep);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.guest-names-grid input:focus {
  outline: none;
  border-color: var(--brand-light);
  box-shadow: 0 0 0 3px rgba(87, 24, 69, 0.1);
  background: #fff;
}

.form-group { margin-bottom: 22px; }

/* ========== Week Selector Horizontal Swiper ========== */
.week-selector-container {
  position: relative;
  width: 100%;
  /* Extra top padding so the upcoming badge doesn't clip outside the card */
  padding-top: 16px;
}
.upcoming-badge {
  position: absolute;
  top: -10px;
  inset-inline-start: 12px;
  background: var(--brand-orange);
  color: white;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 100px;
  box-shadow: 0 2px 6px rgba(239, 87, 64, 0.2);
  letter-spacing: 0.02em;
  pointer-events: none;
}
.upcoming-card {
  border-color: rgba(239, 87, 64, 0.45) !important;
}
.upcoming-card.active {
  border-color: var(--brand) !important;
  box-shadow: 0 4px 15px rgba(239, 87, 64, 0.12) !important;
}
.week-cards-swiper {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 4px 12px;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
}
.week-cards-swiper::-webkit-scrollbar {
  height: 6px;
}
.week-cards-swiper::-webkit-scrollbar-track {
  background: transparent;
}
.week-cards-swiper::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 10px;
}
.week-card {
  flex: 0 0 calc(33.333% - 8px);
  min-width: 160px;
  scroll-snap-align: start;
  border: 1.5px solid var(--line);
  background: var(--cream-card);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  cursor: pointer;
  position: relative;
  transition: all 0.25s ease-in-out;
  box-shadow: 0 2px 6px rgba(87, 24, 69, 0.02);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 6px;
  /* No min-height — let content dictate height naturally */
  opacity: 0.55;
  transform: scale(0.96);
}
/* Mobile: show ~1.5 cards so it's obvious there are more to swipe */
@media (max-width: 600px) {
  .week-card {
    flex: 0 0 68%;
    min-width: 0;
  }
}
/* Very small screens: slightly more compact */
@media (max-width: 380px) {
  .week-card {
    flex: 0 0 80%;
  }
}
.week-card:hover {
  opacity: 0.85;
  transform: scale(0.98) translateY(-1px);
  box-shadow: 0 6px 16px rgba(87, 24, 69, 0.06);
  border-color: var(--brand-orange);
}
.week-card.active {
  border-color: var(--brand);
  background: rgba(87, 24, 69, 0.03);
  box-shadow: 0 4px 15px rgba(87, 24, 69, 0.08);
  opacity: 1;
  transform: scale(1);
}
.week-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  width: 100%;
}
.week-card-title {
  font-weight: 700;
  font-size: 14.5px;
  color: var(--text);
  transition: color 0.15s;
}
.week-card.active .week-card-title {
  color: var(--brand);
}
.week-card-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--brand-orange);
  color: white;
  font-size: 11px;
  font-weight: bold;
  opacity: 0;
  transform: scale(0.7);
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.week-card.active .week-card-check {
  opacity: 1;
  transform: scale(1);
}
.week-card-dates {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
}
.week-card-hebrew {
  font-size: 11.5px;
  color: var(--brand-crimson);
  margin-top: 4px;
  font-weight: 700;
}
.week-card-times {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  color: var(--text-muted);
  gap: 8px;
}
.wc-time-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
}
.wc-time-item b {
  color: var(--brand);
  font-weight: 700;
}
.wc-time-separator {
  opacity: 0.3;
  color: var(--text-muted);
}

.form-label {
  display: block;
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 8px;
  color: var(--text);
}
.form-label .req { color: var(--danger); margin-inline-start: 2px; }

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-family: inherit;
  background: #fff;
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--brand-light);
  box-shadow: 0 0 0 3.5px rgba(87, 24, 69, 0.12);
}
.form-textarea { min-height: 80px; resize: vertical; }

.input-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 540px) { .input-row { grid-template-columns: 1fr; } }

/* ========== Meal cards ========== */
.meals-list { display: flex; flex-direction: column; gap: 12px; }
.meal-card {
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  background: #fff;
  transition: all 0.18s ease;
  cursor: pointer;
}
.meal-card:hover { border-color: var(--gold-soft); background: var(--cream-deep); }
.meal-card.selected {
  border-color: var(--brand);
  background: linear-gradient(135deg, #fff 0%, var(--cream-deep) 100%);
  box-shadow: 0 2px 8px rgba(95, 46, 56, 0.08);
}
.meal-head { display: flex; align-items: flex-start; gap: 12px; }
.meal-check {
  width: 22px; height: 22px; margin-top: 2px; flex-shrink: 0;
  accent-color: var(--brand); cursor: pointer;
}
.meal-info { flex: 1; min-width: 0; }
.meal-title { font-weight: 700; font-size: 17px; color: var(--brand); margin: 0 0 2px; }
.meal-date { font-size: 13px; color: var(--text-muted); }
.meal-prices {
  display: none;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  gap: 10px;
  flex-direction: column;
}
.meal-card.selected .meal-prices { display: flex; }

/* Inline warning for free tier + multiple diners */
.free-tier-warning {
  margin-top: 12px;
  padding: 10px 14px;
  background: #fff8e1;
  border: 1.5px solid #fec330;
  border-radius: var(--radius-sm);
  color: #7a5800;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.5;
  animation: fade-in 0.18s ease;
}

/* Group size notice — shown when max diners reached */
#group-notice {
  margin-top: 14px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #f0fdf4 0%, #e8f5e9 100%);
  border: 1.5px solid rgba(37, 211, 102, 0.4);
  border-radius: var(--radius-sm);
  color: #1b5e20;
  font-size: 13.5px;
  line-height: 1.6;
  animation: fade-in 0.2s ease;
}
#group-notice strong { display: block; margin-bottom: 4px; font-size: 14px; }
#group-notice a { color: #1b5e20; }
.price-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: #fff;
  transition: all 0.15s;
}
.price-option:hover { border-color: var(--gold); }
.price-option input[type="radio"] { accent-color: var(--brand); margin: 0; }
.price-option.checked { border-color: var(--brand); background: rgba(95, 46, 56, 0.04); }
.price-label { flex: 1; font-size: 14px; }
.price-amount { font-weight: 700; color: var(--brand); font-size: 15px; }

/* ========== Summary ========== */
.summary {
  margin-top: 24px;
  padding: 18px 20px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: var(--cream);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.summary .label { font-size: 14px; opacity: 0.9; }
.summary .total { font-size: 26px; font-weight: 800; letter-spacing: -0.01em; }

/* ========== Buttons ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  border: none;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-decoration: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--brand-orange) 0%, var(--brand-crimson) 100%);
  color: white;
  width: 100%;
  padding: 16px 28px;
  font-size: 17px;
  margin-top: 8px;
  box-shadow: 0 4px 15px rgba(239, 87, 64, 0.2);
}
.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--brand-crimson) 0%, var(--brand-orange) 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(239, 87, 64, 0.3);
}
.btn-primary:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(239, 87, 64, 0.15);
}
.btn-primary:disabled { opacity: 0.55; cursor: not-allowed; box-shadow: none; }
.btn-secondary { background: transparent; color: var(--brand); border: 1.5px solid var(--brand); }
.btn-secondary:hover { background: var(--brand); color: white; }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { color: var(--brand); }

/* ========== Messages ========== */
.alert { padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 18px; font-size: 15px; }
.alert-error { background: #FDECEE; color: var(--danger); border: 1px solid #F5C9CE; }
.alert-success { background: #E8F3EB; color: var(--success); border: 1px solid #C9E2D2; }

/* ========== Success screen ========== */
.success-screen { text-align: center; padding: 48px 24px; }
.success-screen .check {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--success); color: white;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 38px; margin-bottom: 18px;
}
.success-screen h3 { font-size: 26px; color: var(--brand); margin: 0 0 8px; }
.success-screen p { color: var(--text-muted); margin: 0 0 24px; }

/* ========== Payment: method chooser ========== */
.pay-methods { margin: 22px 0 4px; display: flex; flex-direction: column; gap: 10px; }
.pay-methods-title { font-weight: 600; font-size: 15px; color: var(--text); margin: 0 0 4px; }
.pay-method-btn {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
  font-family: inherit; font-size: 16px; font-weight: 600; color: var(--text);
  text-align: start; width: 100%;
  transition: all 0.15s;
}
.pay-method-btn:hover { border-color: var(--gold); background: var(--cream-deep); }
.pay-method-btn.selected { border-color: var(--brand); background: rgba(95, 46, 56, 0.04); }
.pay-method-btn .pm-icon { font-size: 22px; }
.pay-method-btn .pm-sub { display: block; font-size: 12.5px; color: var(--text-muted); font-weight: 400; margin-top: 2px; }
/* Cash revealed via secret gesture on card-only centers */
.pay-method-btn.pm-cash-hidden { animation: fade-in .2s ease; }

/* ========== Donation: amount presets ========== */
.donate-presets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(84px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.donate-preset {
  padding: 16px 10px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
  font-family: inherit; font-size: 17px; font-weight: 700; color: var(--text);
  transition: all 0.15s;
}
.donate-preset:hover { border-color: var(--gold); background: var(--cream-deep); }
.donate-preset.selected {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
  box-shadow: var(--shadow);
}
.donate-custom-wrap { margin-top: 2px; }
.donate-custom { font-size: 17px; font-weight: 600; text-align: center; }

/* Donation add-on inside the signup form (checkbox reveal) */
.donate-addon { margin: 8px 0 4px; }
.addon-toggle {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--cream-deep);
  cursor: pointer;
  font-size: 15px; font-weight: 600; color: var(--text);
  -webkit-tap-highlight-color: transparent;
  transition: all 0.15s;
}
.addon-toggle:hover { border-color: var(--gold-soft); background: var(--cream-card); }
.addon-toggle:has(input:checked) { border-color: var(--brand-light); background: rgba(166, 67, 47, 0.05); }
.addon-toggle input[type="checkbox"] { accent-color: var(--brand); width: 18px; height: 18px; margin: 0; flex-shrink: 0; }
.addon-heart { color: var(--brand); font-size: 16px; }
.addon-body { margin-top: 12px; animation: fade-in .2s ease; }

/* Custom-amount input sitting inline with the preset chips */
.donate-custom-chip {
  grid-column: span 2;
  padding: 16px 12px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  font-family: inherit; font-size: 15px; font-weight: 600; color: var(--text);
  text-align: center; width: 100%; min-width: 0;
  transition: border-color 0.15s;
}
.donate-custom-chip:focus { border-color: var(--brand); outline: none; }
.donate-custom-chip::placeholder { color: var(--text-muted); font-weight: 500; }

.total-breakdown { margin: 6px 4px 0; font-size: 13px; color: var(--text-muted); text-align: end; }

/* ========== Payment: Kesher panel ========== */
.payment-panel { margin-top: 18px; }
.payment-panel .pp-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px;
}
.payment-panel .pp-back {
  background: transparent; border: 0; color: var(--brand); cursor: pointer;
  font-family: inherit; font-size: 14px; font-weight: 600; padding: 4px;
}
.payment-panel .pp-total { font-weight: 800; color: var(--brand); font-size: 18px; }
/* No box — the payment frame sits flush in the page (position:relative only so
   the loading overlay can anchor to it; no z-index so the iframe's blend mode
   below can reach through to the card background). overflow:hidden clips the
   iframe's deliberate 9px side overhangs (below). */
.kesher-frame-wrap { position: relative; overflow: hidden; }
/* Kesher's page wraps everything in a div.overflow-auto whose content height is
   FIXED per width (measured: ≤700px under 480px wide, peaks ~810px at
   500–560px, 741px at 600–700px) — any shortfall shows their navy styled
   scrollbar INSIDE the frame, which scrolling="no" can't suppress. So the
   height must exceed the worst case for the width range, and the frame is 18px
   wider than the wrap with 9px hidden per side: that absorbs their ~2px
   horizontal overflow at narrow widths and hides their 8px vertical scrollbar
   if it ever does appear (right edge in English, left in Hebrew/RTL).
   mix-blend-mode: multiply makes Kesher's white body invisible against our
   (light) card — white × backdrop = backdrop — so only the form itself shows
   and the unused space below it reads as plain page background. Assumes the
   card behind stays light; a dark theme would darken the frame content. */
.kesher-frame-wrap iframe {
  width: calc(100% + 18px); margin-inline: -9px;
  height: 840px; border: 0; display: block; mix-blend-mode: multiply;
}
@media (max-width: 540px) {
  .kesher-frame-wrap iframe { height: 720px; }
}
/* Loader overlays the (blank) iframe rather than adding to its height. Matches
   the card background so it never reads as a white box. */
.pp-loading {
  position: absolute; inset: 0; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  padding: 24px; text-align: center; background: var(--cream-card);
  color: var(--text-muted); font-size: 15px;
}
.pp-error {
  display: flex; align-items: center; justify-content: center;
  min-height: 160px; padding: 24px; text-align: center;
  color: var(--danger); flex-direction: column; gap: 12px;
}

/* ========== Payment notice + confirm (cash) ========== */
.payment-notice {
  margin: 24px 0 4px;
  padding: 18px 20px;
  border: 1.5px dashed var(--gold);
  background: linear-gradient(135deg, #FFF8EA 0%, var(--cream-deep) 100%);
  border-radius: var(--radius-sm);
  position: relative;
}
.payment-notice .pn-title {
  font-weight: 700; font-size: 16px; color: var(--brand);
  display: flex; align-items: center; gap: 8px; margin-bottom: 6px;
}
.payment-notice .pn-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--gold); color: var(--brand-dark); font-weight: 800; font-size: 15px;
}
.payment-notice p { margin: 4px 0 0; font-size: 15px; color: var(--text); line-height: 1.55; }

.confirm-row {
  margin: 18px 0 6px;
  padding: 14px 16px;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  display: flex; gap: 12px; align-items: flex-start;
  cursor: pointer;
  transition: border-color 0.15s;
}
.confirm-row:hover { border-color: var(--brand-light); }
.confirm-row input[type="checkbox"] {
  width: 22px; height: 22px; margin: 2px 0 0; flex-shrink: 0;
  accent-color: var(--brand); cursor: pointer;
}
.confirm-row.invalid { border-color: var(--danger); background: #FEF6F7; }
.confirm-row .ct { font-size: 14.5px; line-height: 1.5; }
.confirm-row .ct strong { color: var(--brand); }

/* ========== Footer ========== */
.site-footer {
  background: var(--brand-dark);
  color: var(--cream);
  padding: 36px 24px;
  margin-top: 60px;
}
.site-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  text-align: center;
}
.site-footer p { margin: 0; opacity: 0.9; font-size: 14px; }
.site-footer a { color: var(--gold-soft); }
.site-footer .contact-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

.footer-social-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none !important;
  border: 1.5px solid rgba(255,255,255,0.18);
  color: var(--cream) !important;
  background: rgba(255,255,255,0.08);
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.footer-social-btn:hover { background: rgba(255,255,255,0.16); border-color: rgba(255,255,255,0.35); text-decoration: none !important; }
.footer-wa   { border-color: rgba(37,211,102,0.5); }
.footer-wa:hover { background: rgba(37,211,102,0.15); border-color: rgba(37,211,102,0.8); }
.footer-ig   { border-color: rgba(225,105,148,0.5); }
.footer-ig:hover { background: rgba(225,105,148,0.15); border-color: rgba(225,105,148,0.8); }
.footer-fb   { border-color: rgba(66,103,178,0.5); }
.footer-fb:hover { background: rgba(66,103,178,0.15); border-color: rgba(66,103,178,0.8); }

/* ========== Admin specific ========== */
.admin-shell { max-width: 1200px; margin: 0 auto; padding: 24px; }
.login-box { max-width: 420px; margin: 80px auto; }
.toolbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 14px; margin-bottom: 22px;
}
.toolbar h2 { margin: 0; color: var(--brand); font-size: 26px; }
.toolbar-actions { display: flex; gap: 10px; align-items: center; }
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 26px;
}
.stat-card {
  background: var(--cream-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  box-shadow: var(--shadow);
}
.stat-card .stat-label { font-size: 13px; color: var(--text-muted); font-weight: 500; margin-bottom: 4px; }
.stat-card .stat-value { font-size: 28px; font-weight: 800; color: var(--brand); letter-spacing: -0.02em; }
.stat-card .stat-sub { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

.meal-breakdown {
  background: var(--cream-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 26px;
  box-shadow: var(--shadow);
}
.meal-breakdown h3 { margin: 0 0 16px; color: var(--brand); font-size: 18px; }
.breakdown-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.breakdown-row:last-child { border-bottom: none; }
.breakdown-name { font-weight: 600; }
.breakdown-name .sub { display: block; font-size: 12px; color: var(--text-muted); font-weight: 400; margin-top: 2px; }
.breakdown-stats { display: flex; gap: 18px; font-size: 14px; }
.breakdown-stats .b-count { font-weight: 700; color: var(--brand); }

/* Payment split (admin) */
.pay-split { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }
.pay-split .ps-card {
  flex: 1 1 160px;
  background: var(--cream-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  box-shadow: var(--shadow);
}
.pay-split .ps-label { font-size: 12px; color: var(--text-muted); letter-spacing: 0.03em; text-transform: uppercase; }
.pay-split .ps-value { font-size: 22px; font-weight: 800; color: var(--brand); margin-top: 3px; }
.pay-split .ps-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.pay-bar { display: flex; height: 10px; border-radius: 100px; overflow: hidden; margin-top: 10px; background: var(--line); }
.pay-bar .seg-card { background: var(--brand); }
.pay-bar .seg-cash { background: var(--gold); }
.pay-bar .seg-free { background: #4a90e2; }
.pay-bar .seg-unpaid { background: #D9CFC8; }

table.signups {
  width: 100%;
  border-collapse: collapse;
  background: var(--cream-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
table.signups thead { background: var(--brand); color: var(--cream); }
table.signups th,
table.signups td {
  padding: 12px 14px;
  text-align: start;
  font-size: 14px;
  border-bottom: 1px solid var(--line);
}
table.signups th { font-weight: 600; font-size: 13px; text-transform: none; letter-spacing: 0.02em; }
table.signups tbody tr:hover { background: var(--cream-deep); }
table.signups tbody tr:last-child td { border-bottom: none; }
.meals-cell { display: flex; flex-wrap: wrap; gap: 4px; }
.meal-chip {
  font-size: 12px; padding: 2px 8px; border-radius: 100px;
  background: rgba(95, 46, 56, 0.1); color: var(--brand); white-space: nowrap;
}
.meal-chip.full { background: rgba(200, 169, 106, 0.18); color: var(--brand-dark); }
.meal-chip.free { background: rgba(74, 124, 89, 0.18); color: var(--success); }

/* Payment status chips */
.pay-chip { font-size: 11.5px; padding: 3px 9px; border-radius: 100px; font-weight: 700; white-space: nowrap; }
.pay-chip.paid   { background: rgba(74, 124, 89, 0.16); color: var(--success); }
.pay-chip.cash   { background: rgba(200, 169, 106, 0.2); color: var(--brand-dark); }
.pay-chip.free   { background: rgba(74, 144, 226, 0.15); color: #4a90e2; }
.pay-chip.unpaid { background: rgba(178, 58, 72, 0.12); color: var(--danger); }

.btn-delete {
  background: transparent; color: var(--danger); border: 1px solid var(--danger);
  padding: 6px 12px; font-size: 13px; border-radius: 6px; cursor: pointer;
}
.btn-delete:hover { background: var(--danger); color: white; }

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

/* ========== Admin: week nav + aggregate banner ========== */
.week-nav { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 0 0 22px; }
.week-nav-card {
  background: var(--cream-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 22px;
  min-width: 280px;
  text-align: center;
  box-shadow: var(--shadow);
}
.week-nav-card .parsha { font-size: 22px; font-weight: 800; color: var(--brand); letter-spacing: -0.01em; }
.week-nav-card .meta { font-size: 13px; color: var(--text-muted); margin-top: 3px; }
.week-nav-card .closed-badge {
  display: inline-block; margin-top: 6px; padding: 2px 10px;
  font-size: 11px; font-weight: 700;
  background: rgba(178,58,72,0.12); color: var(--danger); border-radius: 100px;
}
.arrow-btn {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1.5px solid var(--brand);
  background: var(--cream-card); color: var(--brand);
  font-size: 20px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.arrow-btn:hover:not(:disabled) { background: var(--brand); color: var(--cream); transform: scale(1.05); }
.arrow-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.agg-banner {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: var(--cream);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 22px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 18px;
}
.agg-stat .l { font-size: 12px; opacity: 0.85; letter-spacing: 0.04em; text-transform: uppercase; }
.agg-stat .v { font-size: 26px; font-weight: 800; letter-spacing: -0.01em; margin-top: 2px; }
.agg-stat .s { font-size: 11px; opacity: 0.75; margin-top: 2px; }

/* Table wrapping */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 720px) {
  table.signups { font-size: 13px; }
  table.signups th, table.signups td { padding: 10px 8px; }
}

/* ========== Mobile responsiveness ========== */
@media (max-width: 720px) {
  .site-header { padding: 12px 14px; }
  .site-header-inner { gap: 10px; }
  .site-logo img { height: 42px; }
  .site-logo .site-logo-secondary { height: 28px; }
  .site-logo h1 { font-size: 17px; }
  .site-logo .subtitle { font-size: 11px; }
  .lang-toggle { padding: 5px 12px; font-size: 12px; }
  #user-bar { display: flex !important; align-items: center; gap: 6px; }
  #user-email { display: none; }
  #user-bar .btn { padding: 6px 12px !important; font-size: 13px; }

  .admin-shell { padding: 14px 10px; }
  .toolbar { gap: 10px; margin-bottom: 16px; }
  .toolbar h2 { font-size: 18px; flex: 1 1 100%; }
  .toolbar-actions { width: 100%; display: flex; gap: 6px; }
  .toolbar-actions .btn { flex: 1; padding: 9px 10px !important; font-size: 13px !important; }

  .agg-banner { padding: 14px 16px; gap: 10px; }
  .agg-stat .l { font-size: 10px; }
  .agg-stat .v { font-size: 20px; }
  .agg-stat .s { font-size: 10px; }

  .week-nav { gap: 6px; margin-bottom: 16px; }
  .week-nav-card { min-width: 0 !important; flex: 1; padding: 10px 12px !important; }
  .week-nav-card .parsha { font-size: 17px !important; }
  .week-nav-card .meta { font-size: 11px !important; }
  .arrow-btn { width: 38px !important; height: 38px !important; font-size: 18px !important; flex-shrink: 0; }

  .stats { grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 18px; }
  .stat-card { padding: 12px 14px; }
  .stat-card .stat-label { font-size: 11px; }
  .stat-card .stat-value { font-size: 21px; }
  .stat-card .stat-sub { font-size: 10px; }

  .meal-breakdown { padding: 16px 16px; margin-bottom: 18px; }
  .meal-breakdown h3 { font-size: 16px; margin-bottom: 12px; }
  .breakdown-row { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px 0; }
  .breakdown-stats { flex-wrap: wrap; gap: 10px 14px; font-size: 13px; }

  table.signups { font-size: 12.5px; }
  table.signups th, table.signups td { padding: 8px 8px; white-space: nowrap; }
  table.signups td.notes-cell { white-space: normal; min-width: 140px; max-width: 220px; }
  .btn-delete { padding: 4px 8px; font-size: 11px; }
  .meal-chip { font-size: 11px; padding: 2px 6px; }
}
@media (max-width: 420px) {
  .site-logo h1 { font-size: 15px; }
  .week-nav-card .parsha { font-size: 15px !important; }
  .toolbar h2 { font-size: 16px; }
  .agg-banner { grid-template-columns: repeat(2, 1fr); }
  .agg-stat .v { font-size: 18px; }
}
