@import url('https://fonts.googleapis.com/css2?family=Heebo:wght@400;500;600;700;800;900&display=swap');

/* ============================================================
   מתכנן הטיול — שכבת העיצוב
   ------------------------------------------------------------
   הפלטה היא של נדבוס ולא של התבנית שממנה הדף נולד: נייבי
   #14204A, כחול מותג #2C5FA8, וכתום #E6A05A ככתם יחיד.
   ⚠️ בייצוא המקורי המשתנה נקרא `--lime` והחזיק כחול — שארית
   של החלפת צבעים שלא הושלמה. שם שמשקר על התוכן שלו הוא איך
   שפלטה מתפרקת בעריכה הבאה.

   הכתום הוא מידע ולא קישוט: הוא מסמן "עכשיו" ו"הבא בתור",
   וכשהוא מופיע על יותר מזה הוא מפסיק לומר משהו.

   ⚠️ כל הצבעים הם טוקנים ב-:root, ומצב כהה דורס טוקנים בלבד
   ולא כותב כלל חדש — אחרת כל תיקון היה נדרש פעמיים וחצי
   מהמקומות היו נשכחים. מצב כהה כאן אינו גימיק: את המסלול
   קוראים בחדר הוסטל חשוך בשתיים בלילה.
   ============================================================ */

:root {
  --navy:        #14204A;
  --ink:         #1B2A52;
  --muted:       #68769A;
  --faint:       #93A0BE;
  --brand:       #2C5FA8;
  --brand-ink:   #1C4480;
  --brand-soft:  #E8EFFA;
  --accent:      #E6A05A;
  --accent-soft: #FDF2E6;
  --accent-ink:  #8A5620;
  --bg:          #F5F8FD;
  --surface:     #FFFFFF;
  --surface-2:   #FAFCFF;
  --line:        #E3E9F4;
  --line-strong: #CFDAEC;
  --on-navy:     #D7E2F5;
  --shadow:      0 1px 2px #14204a0a, 0 10px 30px #14204a0d;
  --shadow-lift: 0 2px 6px #14204a0f, 0 18px 44px #14204a1a;
  --radius:      14px;
  --radius-lg:   20px;
  --nav-w:       256px;
}

:root[data-theme="dark"] {
  --navy:        #0A1226;
  --ink:         #E7EDF9;
  --muted:       #94A3C4;
  --faint:       #6C7B9F;
  --brand:       #6E9EE4;
  --brand-ink:   #A8C6F2;
  --brand-soft:  #17233E;
  --accent:      #E6A05A;
  --accent-soft: #2A2016;
  --accent-ink:  #F0C08C;
  --bg:          #070C18;
  --surface:     #101829;
  --surface-2:   #0C1322;
  --line:        #1E2A42;
  --line-strong: #2A3A58;
  --on-navy:     #C3D2EC;
  --shadow:      0 1px 2px #0003, 0 10px 30px #0004;
  --shadow-lift: 0 2px 6px #0004, 0 18px 44px #0006;
}

* { box-sizing: border-box; }
html { color-scheme: light dark; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.6 Heebo, system-ui, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

button, input, textarea, select { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
img { max-width: 100%; }

/* מסגרת מיקוד אחת לכל הדף. כתום הוא הצבע היחיד כאן שנראה
   גם על רקע בהיר וגם על כהה בלי להתחלף. */
:is(button, a, input, textarea, select, [tabindex]):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: fixed; top: -100px; inset-inline-start: 10px; z-index: 100;
  background: var(--surface); padding: 12px 18px; border-radius: 0 0 12px 12px;
  box-shadow: var(--shadow-lift);
}
.skip:focus { top: 0; }

/* ============================================================
   שער הכניסה
   ------------------------------------------------------------
   עד שההתחברות הוכרעה, `body.gated` מחביא את האפליקציה כולה.
   ⚠️ display:none ולא שקיפות — אחרת ניווט במקלדת היה מגיע
   לקישורים שמאחורי השער, והשער לא היה שער.
   ============================================================ */
.gate {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center;
  padding: 24px max(24px, env(safe-area-inset-right)) 24px max(24px, env(safe-area-inset-left));
  background:
    radial-gradient(1100px 620px at 85% -15%, #2c5fa83d, transparent 60%),
    radial-gradient(760px 520px at 8% 108%, #e6a05a21, transparent 62%),
    var(--navy);
  overflow: auto;
}
body:not(.gated) .gate { display: none; }
body.gated :is(aside, .workspace) { display: none; }

.gate-card {
  width: 100%; max-width: 430px;
  background: var(--surface);
  border-radius: 24px;
  padding: 36px 32px 28px;
  box-shadow: 0 30px 80px #0006;
  text-align: center;
}
.gate-card.loading { padding: 54px 32px; color: var(--muted); }
.gate-logo { width: 74px; height: auto; margin: 0 auto 18px; display: block; }
.gate-card .eyebrow { justify-content: center; }
.gate-card h1 { font-size: clamp(26px, 7vw, 30px); letter-spacing: -1px; margin: 12px 0 14px; }
.gate-sub { color: var(--muted); font-size: 14px; line-height: 1.85; margin: 0 0 8px; }
.gate-sub.muted-note {
  font-size: 13px; background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 14px; margin: 16px 0;
}
.gate-form { margin-top: 22px; text-align: start; }
.gate-form .form-field { margin-bottom: 14px; }
.gate-form input { text-align: center; letter-spacing: 3px; font-size: 19px; font-weight: 600; }
#code { letter-spacing: 10px; }
.gate-note { display: block; color: var(--faint); font-size: 12px; margin-top: 12px; line-height: 1.75; }
.gate-support {
  display: block; margin-top: 22px; padding-top: 18px;
  border-top: 1px solid var(--line); font-size: 13px; color: var(--muted);
}
.gate-support b { color: var(--brand); font-weight: 600; }
.gate .text-button { display: block; margin: 12px auto 0; }

#gate-error {
  display: none; margin-top: 14px; padding: 12px 14px;
  background: var(--accent-soft); color: var(--accent-ink);
  border: 1px solid #e6a05a4d; border-radius: 12px;
  font-size: 13px; line-height: 1.7; text-align: start;
}
#gate-error.on { display: block; }
/* reCAPTCHA בלתי-נראה לא תופס מקום, אבל המכולה חייבת להתקיים. */
#recaptcha { display: flex; justify-content: center; margin-top: 10px; }

/* ============================================================
   מסגרת: סרגל צד + מרחב עבודה
   ============================================================ */
/* ⚠️ מאפיינים לוגיים ולא פיזיים, ובכיוון הנכון. בעברית
   inline-start הוא ה**ימין** — הסרגל יושב בימין, ולכן
   inset-inline-start:0, והקו המפריד הוא inline-end (שמאל).
   הערבוב בין השניים הוא איך שהסרגל ומרחב העבודה נחתו זה על
   זה בעמוד שלם בלי שום שגיאה בקונסולה. */
aside {
  position: fixed; inset-block: 0; inset-inline-start: 0; inset-inline-end: auto;
  width: var(--nav-w); z-index: 20;
  background: var(--surface); border-inline-end: 1px solid var(--line);
  padding: 26px 20px max(18px, env(safe-area-inset-bottom));
  display: flex; flex-direction: column;
}
.brand { display: block; }
.brand-logo { width: 58px; height: auto; display: block; }
:root[data-theme="dark"] :is(.brand-logo, .gate-logo) { filter: brightness(0) invert(1); opacity: .92; }
.sidebar-label {
  font-size: 10px; letter-spacing: 1.4px; color: var(--faint);
  margin: 30px 10px 10px;
}

nav { overflow: auto; flex: 1; margin-inline: -4px; padding-inline: 4px; }
nav a {
  display: flex; gap: 10px; align-items: center;
  padding: 9px 12px; border-radius: 10px;
  font-size: 13.5px; margin: 2px 0; color: var(--muted);
  transition: background .13s, color .13s;
}
nav a.active { background: var(--navy); color: #fff; font-weight: 600; }
:root[data-theme="dark"] nav a.active { background: var(--brand); color: #061020; }
nav a:hover:not(.active) { background: var(--brand-soft); color: var(--brand-ink); }
.nav-index { font: 10px/1 Arial; opacity: .6; width: 17px; flex: none; text-align: center; }
nav a.active .nav-index { opacity: .85; }
nav hr { border: 0; border-top: 1px solid var(--line); margin: 14px 6px; }

.support {
  border-top: 1px solid var(--line); margin-top: 8px;
  padding: 15px 8px 10px; font-size: 12.5px; color: var(--muted);
  display: flex; justify-content: space-between; gap: 8px;
}
.support b { font-weight: 600; color: var(--brand); }
.account {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 4px 8px;
}
.private {
  font-size: 11px; color: var(--faint);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
#signout {
  background: none; border: 0; padding: 4px 6px; flex: none;
  font-size: 11px; color: var(--faint);
  text-decoration: underline; text-underline-offset: 2px;
}
#signout:hover { color: var(--ink); }

.workspace { margin-inline-start: var(--nav-w); min-height: 100vh; display: flex; flex-direction: column; }

header {
  position: sticky; top: 0; z-index: 15;
  height: 72px; display: flex; align-items: center; justify-content: space-between;
  gap: 14px; padding: 0 clamp(18px, 4vw, 44px);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
}
.tagline {
  font: 10.5px/1 Arial; letter-spacing: 1.6px; color: var(--faint);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.top-actions { display: flex; gap: 8px; flex: none; }
.top-actions button {
  background: var(--surface); border: 1px solid var(--line);
  padding: 8px 13px; border-radius: 22px; font-size: 12px; color: var(--muted);
  display: inline-flex; align-items: center; gap: 6px;
  transition: border-color .13s, color .13s;
}
.top-actions button:hover { border-color: var(--line-strong); color: var(--ink); }
.top-actions b {
  background: var(--brand-soft); color: var(--brand-ink);
  padding: 1px 7px; border-radius: 10px; font-size: 11px; font-weight: 700;
}
#theme { font-size: 14px; padding: 8px 11px; }
#mobile-menu { display: none; }

/* מצב השמירה. ⚠️ שלושת המצבים חייבים להיראות שונים ממרחק:
   זה הדבר היחיד על המסך שאומר ללקוח אם העריכה שלו שרדה. */
#sync-status.sync-error {
  background: var(--accent-soft); border-color: #e6a05a66;
  color: var(--accent-ink); font-weight: 600;
}

main {
  flex: 1; width: 100%; max-width: 1180px; margin-inline: auto;
  padding: 30px clamp(18px, 4vw, 44px) 72px;
}
footer {
  padding: 22px clamp(18px, 4vw, 44px) max(22px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  font-size: 11.5px; color: var(--faint);
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}

/* ============================================================
   טיפוגרפיה ואבני בניין
   ============================================================ */
.eyebrow {
  font-size: 11px; letter-spacing: 1.1px; color: var(--muted);
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
}
.dot { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; flex: none; }

h1 { font-size: clamp(31px, 5vw, 45px); line-height: 1.15; letter-spacing: -1.5px; margin: 12px 0; font-weight: 800; }
h2 { font-size: clamp(19px, 2.6vw, 23px); letter-spacing: -.5px; margin: 0; font-weight: 700; }
h3 { font-size: 16px; margin: 0; font-weight: 700; }
.intro { font-size: 15px; color: var(--muted); line-height: 1.9; margin: 0 0 24px; max-width: 70ch; }

.primary {
  background: var(--brand); border: 0; border-radius: 11px;
  padding: 12px 20px; color: #fff; font-weight: 700; font-size: 14px;
  display: inline-block; text-align: center;
  transition: background .13s, translate .13s;
}
.primary:hover { background: var(--brand-ink); }
.primary:active { translate: 0 1px; }
.primary:disabled { opacity: .55; cursor: progress; }
.primary.block { display: block; width: 100%; padding: 14px 20px; }

.secondary {
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 11px;
  padding: 11px 18px; font-weight: 600; font-size: 13.5px; color: var(--ink);
  display: inline-block; text-align: center;
}
.secondary:hover { border-color: var(--brand); color: var(--brand); }

.text-button {
  background: none; border: 0; padding: 6px 8px;
  font-size: 12.5px; color: var(--muted);
  text-decoration: underline; text-underline-offset: 3px;
}
.text-button:hover { color: var(--ink); }
.text-button.danger { color: #b4453a; }
:root[data-theme="dark"] .text-button.danger { color: #ef8b7f; }
.text-button:disabled { opacity: .35; cursor: default; text-decoration: none; }

.note {
  background: var(--brand-soft); border-radius: var(--radius);
  padding: 15px 18px; font-size: 12.5px; line-height: 1.85;
  color: var(--brand-ink); margin: 20px 0;
}
.note.warning {
  background: var(--accent-soft); color: var(--accent-ink);
  border: 1px solid #e6a05a4d;
}
.empty {
  background: var(--surface); border: 1px dashed var(--line-strong);
  border-radius: var(--radius); padding: 30px 24px;
  text-align: center; color: var(--muted); font-size: 14px; line-height: 1.9;
}
.empty .primary { margin-top: 14px; }

.section-heading {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 14px; margin: 34px 0 16px; flex-wrap: wrap;
}
.section-heading small { font-size: 12px; color: var(--faint); }

/* ============================================================
   כרזת הפתיחה
   ============================================================ */
.hero {
  background:
    radial-gradient(760px 420px at 88% -25%, #2c5fa866, transparent 62%),
    radial-gradient(520px 340px at 4% 118%, #e6a05a26, transparent 60%),
    var(--navy);
  color: #fff; border-radius: var(--radius-lg);
  padding: clamp(26px, 4vw, 40px) clamp(22px, 4vw, 40px) 24px;
  display: grid; grid-template-columns: 1.25fr .85fr; gap: 20px;
  position: relative; overflow: hidden;
}
.hero .eyebrow { color: var(--accent); }
.hero h1 { font-size: clamp(32px, 5.4vw, 50px); margin: 18px 0; }
.hero p { color: var(--on-navy); line-height: 1.9; max-width: 36ch; margin: 0 0 22px; }
.hero .primary { background: var(--accent); color: #3a2208; }
.hero .primary:hover { background: #f0b273; }

.hero-art {
  position: relative; min-height: 210px;
  display: flex; align-items: center; justify-content: center; direction: ltr;
}
.orbit { position: absolute; border: 1px solid #ffffff1f; border-radius: 50%; width: 236px; height: 236px; }
.orbit:nth-child(2) { width: 176px; height: 176px; border-color: #ffffff2e; }
.orbit:nth-child(3) { width: 300px; height: 300px; }
.hero-logo { width: 104px; height: auto; z-index: 1; filter: brightness(0) invert(1); opacity: .95; }
.art-label { position: absolute; font: 9.5px/1 Arial; letter-spacing: 1.6px; color: #ffffff85; z-index: 2; }
.a1 { top: 20px; left: 2px; }
.a2 { bottom: 22px; right: 0; }

.hero-bottom {
  grid-column: 1 / -1; border-top: 1px solid #ffffff24;
  margin-top: 6px; padding-top: 18px;
  display: flex; gap: clamp(16px, 3vw, 34px); flex-wrap: wrap;
  font-size: 11.5px; color: var(--on-navy); align-items: center;
}
.hero-bottom b { font-size: 19px; color: #fff; margin-inline-end: 5px; font-weight: 800; }
.hero-bottom a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* ============================================================
   המסלול כקו, לא כרשת
   ------------------------------------------------------------
   ⚠️ זה השינוי העיצובי המשמעותי כאן. רשת של כרטיסים שווים
   אומרת "עשר אפשרויות"; טיול הוא **רצף** — ומה שחסר בה הוא
   בדיוק מה שהמטייל שואל: מה אחרי מה, וכמה זמן יש לי.
   הקו האנכי הוא עמוד השדרה, והמעבר בין תחנות מקבל שורה
   משלו במקום להיות מוסתר בתוך עמוד היעד.
   ============================================================ */
.route { list-style: none; margin: 0; padding: 0; position: relative; }
.route::before {
  content: ""; position: absolute; top: 18px; bottom: 46px;
  inset-inline-start: 19px; width: 2px;
  background: linear-gradient(var(--line-strong), var(--line));
}
.leg { position: relative; padding-inline-start: 52px; }

.leg-node {
  position: absolute; inset-inline-start: 6px; top: 16px;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--line-strong);
  display: grid; place-items: center;
  font: 700 11px/1 Arial; color: var(--muted); z-index: 1;
}
.leg.now .leg-node { background: var(--accent); border-color: var(--accent); color: #3a2208; }
.leg.next .leg-node { border-color: var(--accent); color: var(--accent-ink); }

.leg-card {
  display: flex; align-items: center; gap: 16px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 18px;
  box-shadow: var(--shadow);
  transition: translate .14s, box-shadow .14s, border-color .14s;
}
.leg-card:hover {
  translate: 0 -2px; box-shadow: var(--shadow-lift);
  border-color: var(--line-strong);
}
.leg.now .leg-card { border-color: #e6a05a7a; }
.leg-body { flex: 1; min-width: 0; }
.leg-top {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  font-size: 11.5px; color: var(--muted); margin-bottom: 6px;
}
.leg-flag { font-size: 17px; }
.leg-date { font-weight: 600; color: var(--ink); }
.leg-days, .leg-meta { color: var(--faint); }
.leg-card h3 { font-size: 17px; margin-bottom: 3px; }
.leg-card .en { font: 9px/1 Arial; letter-spacing: 1.4px; color: var(--faint); display: block; }
.leg-meta { font-size: 11.5px; margin: 7px 0 0; }
.leg-tag {
  font-size: 10px; font-weight: 700; letter-spacing: .4px;
  background: var(--accent); color: #3a2208; padding: 2px 8px; border-radius: 20px;
}
.leg-go { color: var(--brand); font-size: 17px; flex: none; }

.leg-move {
  display: flex; gap: 9px; align-items: flex-start;
  margin: 10px 0 14px; padding-inline-start: 2px;
  font-size: 12px; color: var(--muted); line-height: 1.75;
}
.leg-move i { flex: none; opacity: .65; font-style: normal; }

/* ============================================================
   עמוד יעד
   ============================================================ */
.destination-top {
  display: flex; justify-content: space-between; gap: 18px;
  align-items: flex-start; flex-wrap: wrap;
}
.destination-top h1 { font-size: clamp(28px, 4.4vw, 39px); }
.date-badge {
  background: var(--brand); color: #fff;
  padding: 11px 18px; border-radius: 13px; direction: ltr;
  font-weight: 700; white-space: nowrap; margin-top: 8px;
}
.date-badge small { font-weight: 500; opacity: .8; }

.group {
  display: inline-block; background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: 11px;
  padding: 11px 17px; font-size: 13.5px; font-weight: 600;
  color: var(--brand); margin-bottom: 22px;
}
.group:hover { border-color: var(--brand); background: var(--brand-soft); }

.editor-actions { display: flex; gap: 9px; flex-wrap: wrap; margin: 0 0 24px; }

.tools { display: flex; gap: 10px; flex-wrap: wrap; margin: 24px 0 14px; }
.search {
  background: var(--surface); border: 1px solid var(--line); border-radius: 11px;
  padding: 11px 15px; width: 100%; max-width: 350px;
}
.search::placeholder { color: var(--faint); }
.search:focus { border-color: var(--brand); }
.tools .primary { flex: none; }

.filters { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 22px; }
.filter {
  padding: 7px 14px; border-radius: 20px; background: transparent;
  border: 1px solid var(--line-strong); font-size: 12px; color: var(--muted);
  transition: background .12s, color .12s, border-color .12s;
}
.filter:hover { border-color: var(--brand); color: var(--brand); }
.filter.on { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 600; }
:root[data-theme="dark"] .filter.on { background: var(--brand); border-color: var(--brand); color: #061020; }

/* ===== כרטיס המלצה =====
   ⚠️ צבע לפי קטגוריה ולא עיטור: ברשימה של ארבעים פריטים ביעד
   אחד, "לינה" מול "קמביו" מול "מרפאה" הוא ההבדל בין סריקה
   בשנייה לקריאה של כולם. הצביעה נקבעת מ-data-kind שנגזר בקוד,
   כדי שקטגוריה חדשה תיפול לברירת מחדל נייטרלית ולא תשבור
   את הרשימה. */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.item {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 17px 18px;
  display: flex; flex-direction: column; min-height: 132px;
  box-shadow: var(--shadow);
  transition: box-shadow .14s, border-color .14s;
}
.item:hover { box-shadow: var(--shadow-lift); border-color: var(--line-strong); }
.item-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.category {
  font-size: 10.5px; font-weight: 700; letter-spacing: .3px;
  padding: 3px 9px; border-radius: 20px;
  background: var(--brand-soft); color: var(--brand-ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.item[data-kind="stay"]  .category { background: #e4effa; color: #1c4c7d; }
.item[data-kind="food"]  .category { background: #fdeee0; color: #8a5620; }
.item[data-kind="do"]    .category { background: #eae7fb; color: #4b3f93; }
.item[data-kind="money"] .category { background: #e3f3ea; color: #1f6442; }
.item[data-kind="move"]  .category { background: #e6eefb; color: #27467f; }
.item[data-kind="care"]  .category { background: #fbe6e6; color: #8d3434; }
.item[data-kind="mine"]  .category { background: #fdf0d8; color: #7d5410; }
:root[data-theme="dark"] .item[data-kind="stay"]  .category { background: #16304a; color: #97c3ea; }
:root[data-theme="dark"] .item[data-kind="food"]  .category { background: #3a2a18; color: #eeba84; }
:root[data-theme="dark"] .item[data-kind="do"]    .category { background: #272246; color: #b6aaf0; }
:root[data-theme="dark"] .item[data-kind="money"] .category { background: #14321f; color: #8fd3ab; }
:root[data-theme="dark"] .item[data-kind="move"]  .category { background: #1b2a48; color: #9fbcee; }
:root[data-theme="dark"] .item[data-kind="care"]  .category { background: #3a1e1e; color: #eda2a2; }
:root[data-theme="dark"] .item[data-kind="mine"]  .category { background: #352a12; color: #e8c484; }

.heart {
  background: none; border: 0; padding: 2px 4px; flex: none;
  font-size: 17px; line-height: 1; color: var(--faint);
  transition: color .13s, scale .13s;
}
.heart:hover { color: #d9607a; scale: 1.14; }
.heart.selected { color: #d9607a; }
.item h3 { line-height: 1.4; }
.item p { font-size: 13px; color: var(--muted); line-height: 1.8; margin: 7px 0 0; }
.item-link {
  margin-top: auto; padding-top: 13px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 12.5px; font-weight: 600; color: var(--brand);
}
.item-link:hover { color: var(--brand-ink); }

/* ============================================================
   מעבר ליעד הבא
   ============================================================ */
.transfer {
  background: var(--navy); color: #fff;
  border-radius: var(--radius-lg); padding: clamp(22px, 3vw, 32px);
  margin: 34px 0 0;
}
.transfer .eyebrow { color: var(--accent); }
.transfer h2 { color: #fff; margin: 10px 0 12px; }
.transfer p { color: var(--on-navy); line-height: 1.9; margin: 0 0 12px; }
.transfer .primary { background: var(--accent); color: #3a2208; margin-top: 8px; }
.transfer .primary:hover { background: #f0b273; }
.transfer-contact {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: #ffffff14; border: 1px solid #ffffff26; border-radius: 11px;
  padding: 12px 16px; margin-top: 9px; font-size: 13.5px;
}
.transfer-contact:hover { background: #ffffff21; }
.transfer-contact b { color: var(--accent); font-weight: 600; flex: none; }

.booking-box {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 22px; margin: 28px 0 0;
  box-shadow: var(--shadow);
}
.booking-box .section-heading { margin: 0 0 10px; }
.booking-box p { font-size: 13.5px; color: var(--muted); line-height: 1.9; margin: 0; }

.personal-edit-list { margin: 28px 0 0; }
.personal-edit-list h3 { margin-bottom: 10px; }
.personal-edit-list > div {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 11px; padding: 11px 15px; margin-bottom: 7px; font-size: 13.5px;
}
.personal-edit-list span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.bottom-nav {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line);
  font-size: 13.5px; font-weight: 600;
}
.bottom-nav a { color: var(--brand); }
.bottom-nav a:hover { color: var(--brand-ink); }

/* ============================================================
   צ'קליסט
   ============================================================ */
.progress {
  height: 8px; background: var(--line); border-radius: 20px;
  overflow: hidden; margin: 0 0 20px;
}
.progress span {
  display: block; height: 100%; border-radius: 20px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  transition: width .3s;
}
.task {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 11px; padding: 13px 16px; margin-bottom: 7px;
  font-size: 14px; line-height: 1.6; cursor: pointer;
  transition: border-color .12s;
}
.task:hover { border-color: var(--line-strong); }
.task input {
  width: 19px; height: 19px; margin: 1px 0 0; flex: none;
  accent-color: var(--brand); cursor: pointer;
}
.task input:checked + span {
  color: var(--faint); text-decoration: line-through;
  text-decoration-color: var(--line-strong);
}

/* ============================================================
   עריכה: שורות, טפסים, דיאלוג
   ============================================================ */
.edit-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 15px 18px; margin-bottom: 8px;
}
.edit-row small { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.edit-row h3 { margin: 3px 0; }
.edit-row > div > span { font-size: 12px; color: var(--faint); }
.row-actions { display: flex; align-items: center; gap: 6px; }

.date-select {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 11px; padding: 11px 16px; font-size: 13.5px;
  color: var(--muted); margin-bottom: 8px;
}
.date-select input { border: 0; background: none; font-weight: 600; color: var(--ink); }

.form-field { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 13px; }
.form-field :is(input, textarea) {
  display: block; width: 100%; margin-top: 6px;
  background: var(--surface-2); border: 1px solid var(--line-strong);
  border-radius: 10px; padding: 11px 13px; font-size: 14.5px; color: var(--ink);
}
.form-field :is(input, textarea):focus { border-color: var(--brand); background: var(--surface); }
.form-field textarea { resize: vertical; min-height: 76px; line-height: 1.7; }
/* ⚠️ שדות טכניים לטיניים בתוך דף עברי: בלי dir=ltr הם מוצגים
   הפוך. זה אותו באג bidi שחזר שלוש פעמים בדף הייעוץ. */
.form-field :is(input[type="date"], input[type="url"], input[type="tel"]) { direction: ltr; text-align: start; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.checkbox-label {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 12.5px; color: var(--muted); line-height: 1.7; margin-bottom: 14px;
}
.checkbox-label input { width: 18px; height: 18px; margin: 1px 0 0; flex: none; accent-color: var(--brand); }

.edit-dialog {
  border: 0; padding: 0; background: transparent;
  width: min(540px, calc(100vw - 32px)); max-height: 88vh;
}
.edit-dialog::backdrop { background: #0a122699; backdrop-filter: blur(3px); }
.edit-dialog form {
  background: var(--surface); border-radius: 18px;
  padding: 24px 26px; box-shadow: 0 24px 70px #0a12264d;
  max-height: 88vh; overflow: auto;
}
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.dialog-head h2 { font-size: 20px; }
.edit-dialog p { font-size: 14px; color: var(--muted); line-height: 1.9; margin: 0 0 18px; }
#form-error:not(:empty) {
  background: var(--accent-soft); color: var(--accent-ink);
  border: 1px solid #e6a05a4d; border-radius: 10px;
  padding: 11px 13px; font-size: 13px; line-height: 1.7; margin-bottom: 14px;
}
.edit-dialog .editor-actions { margin: 4px 0 0; }

/* ============================================================
   טוסט ומגירה
   ============================================================ */
#toast {
  position: fixed; z-index: 70;
  inset-block-end: max(22px, env(safe-area-inset-bottom));
  inset-inline-start: 50%; translate: 50% 0;
  background: var(--navy); color: #fff;
  padding: 12px 22px; border-radius: 24px; font-size: 13.5px; font-weight: 600;
  box-shadow: 0 14px 40px #0a12264d;
  opacity: 0; pointer-events: none; transition: opacity .2s, translate .2s;
}
#toast.show { opacity: 1; translate: 50% -6px; }
:root[data-theme="dark"] #toast { background: var(--surface); border: 1px solid var(--line-strong); }

#scrim {
  position: fixed; inset: 0; z-index: 18; background: #0a122673;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
body.menu-open #scrim { opacity: 1; pointer-events: auto; }

/* ============================================================
   מסכים צרים
   ------------------------------------------------------------
   ⚠️ זה המכשיר האמיתי של המשתמש. את המסלול פותחים בטלפון
   בשדה תעופה, לא במחשב בבית — ולכן המגירה, שטחי הנגיעה
   ו-safe-area הם לא ליטוש אלא התנהגות ברירת המחדל.
   ============================================================ */
@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; }
  .hero-art { display: none; }
  .hero p { max-width: none; }
}

@media (max-width: 860px) {
  aside {
    width: min(306px, 86vw);
    translate: 100% 0;
    transition: translate .24s cubic-bezier(.3, .8, .3, 1);
    box-shadow: -14px 0 50px #0a122633;
  }
  body.menu-open aside { translate: 0 0; }
  .workspace { margin-inline-start: 0; }
  #mobile-menu { display: inline-flex; font-size: 15px; }
  .tagline { display: none; }
  header { height: 64px; }
  main { padding-bottom: 54px; }
  .top-actions button { padding: 9px 14px; }   /* שטח נגיעה */
  #saved span { display: none; }
  .cards { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .leg { padding-inline-start: 44px; }
  .route::before { inset-inline-start: 15px; }
  .leg-node { inset-inline-start: 2px; }
  .leg-card { gap: 12px; padding: 14px 15px; }
  .date-badge { margin-top: 0; }
  .row-actions { width: 100%; justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .leg-card:hover { translate: none; }
}

@media print {
  aside, header, footer, #toast, .heart, .editor-actions, .bottom-nav, .filters, .tools { display: none !important; }
  .workspace { margin: 0; }
  body { background: #fff; }
  .item, .leg-card, .edit-row { break-inside: avoid; box-shadow: none; }
  .hero, .transfer { background: #f2f5fa !important; }
  .hero :is(h1, p, .eyebrow), .transfer :is(h2, p, .eyebrow) { color: #14204a !important; }
}

/* ============================================================
   מצבים שאינם מסלול
   ------------------------------------------------------------
   "המסלול בבנייה" ו"לא משויך אליכם" הם מצבים לגיטימיים ולא
   שגיאות. ⚠️ הם מקבלים את אותו טיפול כמו שער הכניסה בכוונה:
   לקוח ששילם 1,250 ₪ ונוחת על משהו שנראה כמו תקלה מרים טלפון
   בבהלה. מסך מעוצב שמסביר מה קורה לא מייצר את השיחה הזו.
   ============================================================ */
.state-card {
  max-width: 560px; margin: clamp(30px, 8vh, 80px) auto;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: clamp(28px, 5vw, 44px);
  box-shadow: var(--shadow); text-align: center;
}
.state-card .eyebrow { justify-content: center; }
.state-card h1 { font-size: clamp(27px, 4.4vw, 36px); }
.state-card .intro { margin: 0 auto 26px; max-width: 46ch; }

/* סרגל צד בלי ניווט — אין מסלול לנווט בו. */
aside.bare .sidebar-label, aside.bare nav { display: none; }

/* ===== מצב כתיבה =====
   כשנדב פותח מסלול של לקוח הוא חייב לדעת את זה ממבט אחד. בלי
   הסימון הזה קל לערוך את המסלול הלא נכון ולגלות מאוחר. */
body.authoring .workspace::before {
  content: "✎ מצב עריכה · המסלול של הלקוח";
  display: block; text-align: center;
  background: var(--accent); color: #3a2208;
  font-size: 12px; font-weight: 700; letter-spacing: .3px;
  padding: 6px 14px;
}
body.authoring header { top: 29px; }
