:root {
  --ink: #1d2433;
  --muted: #5d6677;
  --line: #d9dee7;
  --bg: #f6f7f9;
  --card: #fff;
  --accent: #1f7a4a;
  --accent-ink: #fff;
  --on: #2e9e5b;
  --none: #eceff3;
  --error: #b42318;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Hebrew", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

* { box-sizing: border-box; }
body { margin: 0; padding: 16px; line-height: 1.45; }
main { max-width: 960px; margin: 0 auto; }
footer { max-width: 960px; margin: 32px auto 8px; color: var(--muted); font-size: 13px; text-align: center; }

h1 { font-size: 24px; margin: 4px 0 4px; overflow-wrap: anywhere; }
h2 { font-size: 18px; margin: 0 0 8px; }
.sub { color: var(--muted); margin: 0 0 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin: 0 0 16px; }
.hint { color: var(--muted); font-size: 14px; margin: 4px 0 10px; }
.error { color: var(--error); font-weight: 600; min-height: 1em; margin: 8px 0; }
.error:empty { display: none; }
.ok { color: var(--accent); font-weight: 600; }

label { display: block; font-weight: 600; margin: 12px 0 4px; }
label.inline { display: inline-flex; align-items: center; gap: 4px; font-weight: 400; margin: 4px 12px 4px 0; }
input[type=text], input[type=tel], input[type=date], select, textarea {
  font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
  width: 100%; max-width: 420px;
}
textarea { max-width: none; min-height: 140px; resize: vertical; }
.row { display: flex; flex-wrap: wrap; gap: 12px; }
.row > div { flex: 1 1 180px; }

button, .button {
  font: inherit; font-weight: 600; display: inline-block; text-decoration: none; cursor: pointer;
  padding: 9px 14px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink);
  margin: 8px 8px 0 0;
}
button.primary, .button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.button.whatsapp { background: #25d366; border-color: #25d366; color: #0b3d20; }
button:focus-visible, .button:focus-visible, td.slot:focus-visible { outline: 3px solid #7aa7ff; outline-offset: 2px; }

.tabs { display: flex; gap: 0; margin: 0 0 16px; border-bottom: 1px solid var(--line); }
.tabs button { margin: 0; border: none; border-bottom: 3px solid transparent; border-radius: 0; background: none; color: var(--muted); }
.tabs button[aria-selected=true] { color: var(--ink); border-bottom-color: var(--accent); }

.link-box { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.link-box input { flex: 1 1 300px; max-width: none; font-size: 13px; }

pre.message {
  white-space: pre-wrap; overflow-wrap: anywhere; background: var(--bg); border: 1px solid var(--line);
  border-radius: 8px; padding: 10px; font-size: 13px; margin: 8px 0 0;
}

/* ------------------------------------------------ grid */
.grid-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 8px 0; }
table.grid { border-collapse: separate; border-spacing: 0; user-select: none; -webkit-user-select: none; }
table.grid th { font-weight: 600; font-size: 12px; color: var(--muted); padding: 2px 6px; white-space: nowrap; }
table.grid thead th { text-align: center; vertical-align: bottom; padding-bottom: 6px; }
table.grid thead th span { display: block; }
table.grid thead th .wd { color: var(--ink); }
table.grid tbody th { text-align: right; position: sticky; left: 0; background: var(--card); z-index: 1; touch-action: pan-x pan-y; }
table.grid tbody th.half { color: #9aa2b1; font-weight: 400; }
table.grid td { width: 52px; min-width: 44px; height: 22px; border-right: 1px solid var(--line); border-bottom: 1px dashed var(--line); }
table.grid tr.hour td { border-top: 1px solid #b9c1ce; }
table.grid td:first-of-type { border-left: 1px solid var(--line); }
table.grid tbody tr:last-child td { border-bottom: 1px solid var(--line); }
table.grid td.none { background: var(--none); }
table.grid td.slot { background: #fff; cursor: pointer; touch-action: none; -webkit-tap-highlight-color: transparent; }
table.grid td.slot.on { background: var(--on); }
table.grid td.slot.picked { outline: 2px solid var(--ink); outline-offset: -2px; }

.legend { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.legend span.swatch { width: 18px; height: 14px; border: 1px solid var(--line); display: inline-block; }

.detail { min-height: 3em; }
ol.best { padding-left: 22px; margin: 0; }
ol.best li { margin: 4px 0; }
ol.best .who { color: var(--muted); font-size: 14px; }
ul.problems { color: var(--error); font-size: 14px; padding-left: 20px; }

/* the organizer's note: plain text, line breaks kept */
.card.note { white-space: pre-line; overflow-wrap: anywhere; font-size: 17px; border-inline-start: 4px solid var(--accent); }
textarea.note { min-height: 0; max-width: 420px; }
