/* שבילו – "מדריך שטח": נייר, דיו וסימון שבילים.
   צבע מבטא אחד: סימון שביל ישראל (כתום / לבן / כחול). פינות חדות, קווים דקים במקום צלליות. */
:root {
  --paper: #f3eee3;
  --paper-2: #ebe4d4;
  --card: #fbf9f4;
  --ink: #1f1d19;
  --ink-2: #3d3a33;
  --muted: #736c5f;
  --rule: #d6cdb9;
  --rule-2: #e4ddcd;
  --trail: #d8641f;      /* כתום שביל ישראל */
  --trail-ink: #a8470f;
  --trail-blue: #2c5a85;
  --olive: #4a6b3a;
  --olive-soft: #e6ead9;
  --warn: #9a4a10;
  --warn-bg: #f7ead9;
  --r: 3px;
  --serif: 'Frank Ruhl Libre', 'David Libre', Georgia, serif;
  --sans: 'Assistant', 'Segoe UI', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); font-size: 16px; line-height: 1.5; color: var(--ink); background: var(--paper); }
button, input, select { font: inherit; color: inherit; }
a { color: var(--trail-blue); text-underline-offset: 3px; }
.hidden { display: none !important; }
svg.i { width: 1.15em; height: 1.15em; vertical-align: -0.2em; flex: none; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 24px; margin: 0 0 18px; }
h3 { font-size: 18px; margin: 0 0 10px; }
.hint { color: var(--muted); font-size: 13px; }
:focus-visible { outline: 2px solid var(--trail); outline-offset: 2px; }

/* ---------- סמן שביל (שלושה פסים) ---------- */
.blaze { display: inline-grid; grid-template-rows: repeat(3, 1fr); width: 22px; height: 22px; border: 1.5px solid var(--ink); flex: none; }
.blaze i:nth-child(1) { background: var(--trail); }
.blaze i:nth-child(2) { background: #fff; }
.blaze i:nth-child(3) { background: var(--trail-blue); }

/* ---------- כותרת עליונה ---------- */
.topbar { position: sticky; top: 0; z-index: 1000; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 28px; background: var(--paper); border-bottom: 1.5px solid var(--ink); }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-weight: 900; font-size: 26px; line-height: 1; }
.brand small { font-family: var(--sans); font-weight: 400; font-size: 13px; color: var(--muted); border-inline-start: 1px solid var(--rule); padding-inline-start: 10px; }
.topbar nav { display: flex; align-items: center; gap: 4px; }
.nav-btn { border: 0; background: none; padding: 6px 12px; cursor: pointer; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; }
.nav-btn:hover { color: var(--ink); }
.nav-btn.active { color: var(--ink); border-bottom-color: var(--trail); }
.tier-pill { border: 1.5px solid var(--ink); background: var(--card); border-radius: var(--r); padding: 4px 12px; cursor: pointer; font-weight: 700; font-size: 14px; margin-inline-end: 10px; }
.tier-pill::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-inline-end: 7px; background: var(--muted); vertical-align: 1px; }
.tier-pill[data-tier="pro"]::before { background: var(--trail); }
.tier-pill[data-tier="platinum"]::before { background: var(--trail-blue); }
.tier-pill:hover { background: var(--ink); color: var(--paper); }
.banner { background: var(--warn-bg); color: var(--warn); padding: 10px 28px; border-bottom: 1px solid #e3c9a6; font-size: 15px; }

/* ---------- פריסה ---------- */
.layout { display: grid; grid-template-columns: 390px minmax(0, 1fr); gap: 28px; max-width: 1380px; margin: 0 auto; padding: 28px; align-items: start; }
.panel { background: var(--card); border: 1px solid var(--rule); border-radius: var(--r); padding: 24px; }
.form-panel { position: sticky; top: 82px; max-height: calc(100vh - 106px); overflow: auto; scrollbar-width: thin; counter-reset: step; }
.form-panel > h2 { display: flex; align-items: center; gap: 10px; border-bottom: 1.5px solid var(--ink); padding-bottom: 10px; }
/* אזור לא פעיל: שקוף, אפשר לגלול בו אבל לא ללחוץ (inert על הילדים – ראו lockArea ב-app.js) */
.form-panel.locked, #planArea.locked > :not(.back-bar) { opacity: .38; filter: grayscale(.6); user-select: none; transition: opacity .25s; }

/* ---------- אשף (מצב כניסה): שאלות במרכז, אחת אחרי השנייה ---------- */
body[data-mode="wizard"] .layout { grid-template-columns: minmax(0, 640px); justify-content: center; padding-top: 12px; }
body[data-mode="wizard"] #results { order: -1; }
body[data-mode="wizard"] .form-panel { position: static; max-height: none; overflow: visible; padding: 28px 32px; box-shadow: 6px 6px 0 rgba(31, 29, 25, .08); }
body[data-mode="wizard"] .welcome { min-height: 0; padding: 18px 0 4px; background: none; border: 0; text-align: center; }
body[data-mode="wizard"] .welcome::before, body[data-mode="wizard"] .welcome .stats, body[data-mode="wizard"] .welcome .contrib { display: none; }
body[data-mode="wizard"] .welcome .eyebrow, body[data-mode="wizard"] .inspire { justify-content: center; }
body[data-mode="wizard"] .welcome h1 { margin-inline: auto; font-size: clamp(32px, 4vw, 46px); }
body[data-mode="wizard"] .welcome p { margin: 0 auto 18px; font-size: 17px; }
.wiz-progress { margin-inline-start: auto; font-family: var(--sans); font-size: 13px; font-weight: 600; color: var(--muted); }
body:not([data-mode="wizard"]) .wiz-progress { display: none; }
.step { animation: step-in .35s ease-out; }
.step + .step { border-top: 1px solid var(--rule-2); padding-top: 18px; }
body[data-mode="wizard"] .step:not(.current) { opacity: .6; transition: opacity .2s; }
body[data-mode="wizard"] .step:not(.current):hover { opacity: 1; }
body[data-mode="wizard"] .step.current .field > label:first-child { font-size: 19px; font-family: var(--serif); }
.step-next { display: block; margin: -6px 0 18px auto; border: 1.5px solid var(--ink); background: var(--ink); color: var(--paper); border-radius: var(--r); padding: 8px 22px; font-weight: 700; cursor: pointer; }
.step-next::after { content: ' ←'; font-family: var(--serif); }
.step-next:hover { background: var(--trail-ink); border-color: var(--trail-ink); }
body[data-mode="wizard"] .step:not(.current) .step-next, body:not([data-mode="wizard"]) .step-next { display: none; }
.step-err { color: var(--warn); font-size: 14px; margin: -10px 0 10px; }
.step-err:empty { display: none; }
.step-intro { margin: 0 0 12px; color: var(--muted); }
body:not([data-mode="wizard"]) .step-intro { display: none; }
@keyframes step-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
/* מעבר למצב תכנון: הסרגל "זז" הצידה ואזור התכנון נכנס */
body[data-mode="plan"] .form-panel { animation: to-side .45s ease-out; }
body[data-mode="plan"] #planArea { animation: step-in .45s ease-out; }
@keyframes to-side { from { opacity: .3; transform: translateX(-40%); } to { opacity: 1; transform: none; } }

/* ---------- שדות ---------- */
.field { margin-bottom: 22px; }
.field > label:first-child { display: flex; align-items: baseline; gap: 8px; font-weight: 700; margin-bottom: 8px; font-size: 15px; }
.field > label:first-child::before { counter-increment: step; content: counter(step, decimal-leading-zero); font-family: var(--serif); font-weight: 700; font-size: 13px; color: var(--trail); min-width: 20px; }
.field > label.check:first-child::before { content: none; }
.field.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field.two > div > label { display: block; font-weight: 700; margin-bottom: 8px; font-size: 15px; }
label.sub { display: block; font-weight: 600; margin: 14px 0 6px; font-size: 14px; }
input:not([type=checkbox]):not([type=range]), select, .timepick {
  width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--rule); border-bottom: 1.5px solid var(--ink-2);
  border-radius: var(--r) var(--r) 0 0; background: #fff; transition: border-color .15s, background .15s;
}
input:focus, select:focus, .timepick:focus-within { outline: none; border-bottom-color: var(--trail); background: #fffdf8; }
input[type=date] { text-align: center; }
input[type=date]::-webkit-datetime-edit { display: inline-flex; justify-content: center; width: 100%; }
input.ok { border-bottom-color: var(--olive); background: #fafcf6; }
input[type=checkbox] { accent-color: var(--ink); width: 16px; height: 16px; }
.row { display: flex; gap: 8px; }
.icon-btn { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--rule); border-bottom: 1.5px solid var(--ink-2); background: #fff; border-radius: var(--r) var(--r) 0 0; cursor: pointer; font-size: 18px; color: var(--ink-2); }
.icon-btn:hover { color: var(--trail); }
.check { display: inline-flex !important; align-items: center; gap: 8px; font-weight: 400 !important; margin: 10px 0 2px; cursor: pointer; font-size: 15px; }
.timepick { display: flex; align-items: center; justify-content: center; gap: 2px; padding: 0 6px; }
.timepick select { width: auto; height: auto; border: 0; background: none; padding: 2px; font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; appearance: none; -webkit-appearance: none; cursor: pointer; text-align: center; text-align-last: center; }
.timepick select:focus { background: var(--paper-2); }
.timepick span { font-weight: 700; }
.return-field { margin-top: -10px; }
.return-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 15px; }
.return-row .timepick { width: 120px; }
.days-row { align-items: center; }
.days-row input { width: 76px !important; text-align: center; }
#baseWrap { margin-top: 10px; }
#endWrap { margin-top: 8px; }
input[type=range] { width: 100%; accent-color: var(--trail); }
#driveLbl { font-family: var(--serif); color: var(--trail-ink); margin-inline-start: auto; }

/* השלמה אוטומטית */
.ac { position: relative; flex: 1; }
.ac-list { position: absolute; inset-inline: 0; top: calc(100% + 2px); z-index: 1200; list-style: none; margin: 0; padding: 4px 0; background: #fff; border: 1px solid var(--ink-2); border-radius: 0 0 var(--r) var(--r); box-shadow: 0 10px 24px rgba(31, 29, 25, .12); max-height: 300px; overflow: auto; }
.ac-list li { display: flex; justify-content: space-between; gap: 8px; padding: 8px 12px; cursor: pointer; }
.ac-list li small { color: var(--muted); font-size: 12px; }
.ac-list li.on, .ac-list li:hover { background: var(--paper); }
.ac-list li mark { background: none; color: var(--trail-ink); font-weight: 700; }
.ac-list li.empty { color: var(--muted); cursor: default; font-size: 14px; }

/* בחירת סוגי תחנות */
.presets { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 10px; }
.presets button { border: 0; background: none; padding: 2px 0; cursor: pointer; font-size: 14px; color: var(--trail-blue); text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 4px; }
.presets button:hover { text-decoration-color: currentColor; }
.type-adders { display: flex; flex-wrap: wrap; gap: 6px; }
.type-adders button { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--rule); background: #fff; border-radius: var(--r); padding: 6px 10px; cursor: pointer; font-size: 14px; }
.type-adders button:hover { border-color: var(--ink); }
.type-adders button svg { color: var(--muted); }
.locked-btn { color: var(--muted); border-style: dashed !important; }
.locked-btn em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--trail-ink); margin-inline-start: 2px; }
.chosen { list-style: none; padding: 0; margin: 12px 0 0; counter-reset: c; border-top: 1px solid var(--rule-2); }
.chosen li { display: flex; align-items: center; gap: 10px; padding: 9px 2px; border-bottom: 1px solid var(--rule-2); counter-increment: c; }
.chosen li::before { content: counter(c); font-family: var(--serif); font-weight: 700; color: var(--trail); width: 14px; }
.chosen li span { flex: 1; display: inline-flex; align-items: center; gap: 8px; }
.chosen li button { border: 0; background: none; cursor: pointer; color: var(--muted); padding: 2px 6px; }
.chosen li button:hover { color: var(--ink); }
.chosen:empty::after { content: 'עוד לא נבחרו תחנות'; display: block; padding: 10px 0; color: var(--muted); font-size: 14px; }

/* מסלול ספציפי */
.ghost-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 10px; border: 1px dashed var(--ink-2); background: none; border-radius: var(--r); cursor: pointer; font-weight: 600; }
.ghost-btn:hover { background: var(--paper); border-style: solid; }
.pinned-chip { display: flex; align-items: center; gap: 8px; padding: 10px 12px; margin-bottom: 8px; background: var(--olive-soft); border-inline-start: 3px solid var(--olive); }
.pinned-chip small { color: var(--muted); flex: 1; }
.pinned-chip button { border: 0; background: none; cursor: pointer; color: var(--muted); }

/* העדפות (נפתחות) */
details.prefs > summary { cursor: pointer; font-weight: 700; padding: 10px 0; border-top: 1px solid var(--rule); list-style: none; display: flex; align-items: center; gap: 8px; }
details.prefs > summary::-webkit-details-marker { display: none; }
details.prefs > summary::after { content: '+'; margin-inline-start: auto; font-family: var(--serif); font-size: 20px; line-height: 1; color: var(--muted); }
details.prefs[open] > summary::after { content: '–'; }
.seg { display: flex; border: 1px solid var(--ink-2); border-radius: var(--r); overflow: hidden; margin-bottom: 10px; }
.seg button { flex: 1; border: 0; background: #fff; padding: 8px; cursor: pointer; border-inline-start: 1px solid var(--rule); }
.seg button:first-child { border-inline-start: 0; }
.seg button.on { background: var(--ink); color: var(--paper); }
.toggles { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { border: 1px solid var(--rule); background: #fff; border-radius: var(--r); padding: 4px 10px; cursor: pointer; font-size: 14px; }
.chips button.on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chips.small button { font-size: 13px; padding: 3px 8px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.grid3 label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
#gAges { margin-top: 10px; }
.need-wrap { margin-bottom: 4px; }

/* פיצ'רים נעולים לפי מנוי */
[data-need] { position: relative; }
.lock-overlay { display: none; }
.tier-locked > :not(.lock-overlay) { opacity: .28; filter: grayscale(1); user-select: none; }
/* התווית בצד השמאלי (סוף השורה ב-RTL) – כדי לא להסתיר את הכיתוב שמאחוריה, שמתחיל מימין */
.tier-locked > .lock-overlay { display: flex; position: absolute; inset: -4px; z-index: 6; align-items: flex-start; justify-content: flex-end; padding: 8px 2px 0; border: 0; background: repeating-linear-gradient(-45deg, transparent 0 7px, rgba(31, 29, 25, .045) 7px 8px); cursor: pointer; }
.lock-overlay span { display: inline-flex; align-items: baseline; gap: 8px; background: var(--card); border: 1.5px solid var(--ink); padding: 4px 10px; font-weight: 700; font-size: 13px; box-shadow: 3px 3px 0 var(--trail); transition: transform .12s, box-shadow .12s; }
.lock-overlay[data-tier="platinum"] span { box-shadow: 3px 3px 0 var(--trail-blue); }
.lock-overlay span small { font-weight: 400; font-size: 12px; color: var(--muted); }
.lock-overlay span small::before { content: '·'; margin-inline-end: 6px; }
.lock-overlay:hover span { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--trail); }
.need-wrap.tier-locked { min-height: 46px; }

/* כפתורים */
button.primary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--ink); color: var(--paper); border: 1.5px solid var(--ink); border-radius: var(--r); padding: 10px 20px; font-weight: 700; cursor: pointer; transition: background .15s, transform .1s; }
button.primary:hover { background: var(--trail-ink); border-color: var(--trail-ink); }
button.primary:active { transform: translateY(1px); }
button.big { width: 100%; padding: 15px; font-size: 19px; font-family: var(--serif); }
button:disabled { opacity: .55; cursor: wait; }
.err { color: var(--warn); margin-top: 10px; font-size: 15px; }

/* ---------- פתיחה ---------- */
.welcome { position: relative; overflow: hidden; min-height: 420px; padding: 48px 44px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--r); }
.welcome::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .6;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='420' viewBox='0 0 600 420'%3E%3Cg fill='none' stroke='%23c4b89c' stroke-width='1'%3E%3Cpath d='M380 210c0-60 60-110 130-100s110 70 80 130-120 90-170 60-40-40-40-90z'/%3E%3Cpath d='M350 215c-5-85 75-145 165-135s145 95 105 170-155 120-215 80-50-50-55-115z'/%3E%3Cpath d='M320 220c-10-110 90-180 200-170s180 120 130 210-190 150-260 100-60-65-70-140z'/%3E%3Cpath d='M290 230c-15-135 105-215 235-205s215 145 155 250-225 180-305 120-70-80-85-165z'/%3E%3Cpath d='M260 240c-20-160 120-250 270-240s250 170 180 290'/%3E%3Cpath d='M230 255c-25-185 135-285 305-275'/%3E%3Cpath d='M-20 360c60-30 120-10 170 20s110 40 150 10'/%3E%3Cpath d='M-20 390c70-30 140-5 190 25s120 35 160 5'/%3E%3Cpath d='M-20 330c50-30 110-15 160 15s100 40 140 15'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: left bottom; background-size: cover; }
.welcome > * { position: relative; }
.welcome .eyebrow { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; letter-spacing: .04em; color: var(--trail-ink); margin-bottom: 18px; }
.welcome h1 { margin: 0 0 16px; font-size: clamp(34px, 4.2vw, 54px); line-height: 1.08; font-weight: 900; max-width: 17ch; text-wrap: balance; }
.welcome p { font-size: 18px; line-height: 1.65; max-width: 52ch; color: var(--ink-2); margin: 0 0 28px; }
.stats { display: flex; flex-wrap: wrap; margin: 0 0 30px; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); }
.stats div { display: flex; flex-direction: column; padding: 12px 18px 10px; border-inline-start: 1px solid var(--rule); font-size: 13px; color: var(--muted); min-width: 108px; }
.stats div:first-child { border-inline-start: 0; padding-inline-start: 0; }
.stats b { font-family: var(--serif); font-size: 28px; line-height: 1.1; color: var(--ink); font-variant-numeric: tabular-nums; }
.stats svg { display: none; }
.inspire { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.inspire span { font-weight: 700; margin-inline-end: 6px; }
.inspire button { border: 1px solid var(--ink-2); background: var(--card); border-radius: var(--r); padding: 7px 12px; cursor: pointer; font-size: 14px; }
.inspire button:hover { background: var(--ink); color: var(--paper); }

/* ---------- תוצאות ---------- */
.results { scroll-margin-top: 80px; min-width: 0; }
.back-bar { position: sticky; top: 63px; z-index: 900; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 10px 0; margin-bottom: 12px; background: var(--paper); border-bottom: 1px solid var(--rule); }
.back-btn { display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid var(--ink); background: var(--card); border-radius: var(--r); padding: 8px 16px; font-weight: 700; cursor: pointer; }
.back-btn::before { content: '→'; font-family: var(--serif); }
/* "חזרה לתוכנית" – החץ שמאלה, משמאל לטקסט */
.back-btn.to-plan::before { content: none; }
.back-btn.to-plan::after { content: '←'; font-family: var(--serif); }
.back-btn:hover { background: var(--ink); color: var(--paper); }

.options { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 22px; border: 1px solid var(--ink); }
.opt { position: relative; text-align: start; background: var(--card); border: 0; border-inline-start: 1px solid var(--rule); padding: 14px 16px; cursor: pointer; }
.opt:first-child { border-inline-start: 0; }
.opt:hover { background: #fff; }
.opt.on { background: #fff; box-shadow: inset 0 4px 0 var(--trail); }
.opt .k { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .03em; }
.opt .t { font-family: var(--serif); font-weight: 700; font-size: 17px; line-height: 1.25; margin: 3px 0 8px; }
.opt .icons { display: flex; gap: 8px; color: var(--ink-2); margin-bottom: 6px; }
.opt .m { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }

.summary { display: flex; flex-wrap: wrap; align-items: stretch; margin-bottom: 18px; border-top: 1.5px solid var(--ink); border-bottom: 1px solid var(--rule); }
.summary h2 { width: 100%; margin: 14px 0 10px; font-size: 28px; }
.summary .s { padding: 10px 18px 12px; border-inline-start: 1px solid var(--rule); }
.summary h2 + .s { border-inline-start: 0; padding-inline-start: 0; }
.summary .s small { display: block; color: var(--muted); font-size: 12px; }
.summary .s b { font-family: var(--serif); font-size: 21px; font-variant-numeric: tabular-nums; }
.map-wrap { border: 1px solid var(--ink); margin-bottom: 22px; }
#map { height: 380px; background: var(--paper-2); }
.pin { width: 28px; height: 28px; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 13px; font-family: var(--sans); border: 2px solid var(--ink); border-radius: var(--r); box-shadow: 2px 2px 0 rgba(31, 29, 25, .3); }
.leaflet-container { font-family: var(--sans); direction: ltr; } /* המפה תמיד LTR; הטקסט בחלוניות – RTL */
.leaflet-popup-content, .leaflet-tooltip { direction: rtl; text-align: right; }

/* הצעות המתכנן */
.suggestions { margin-bottom: 22px; }
.suggestions h3 { display: flex; align-items: center; gap: 12px; font-size: 19px; }
.suggestions h3::after { content: ''; flex: 1; height: 1px; background: var(--rule); }
.sg { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px dotted var(--rule); font-size: 15px; }
.sg .mark { flex: none; width: 9px; height: 9px; background: var(--olive); transform: rotate(45deg); margin-inline: 4px; }
.sg.warn .mark { background: var(--trail); }
.sg.tip .mark { background: var(--trail-blue); border-radius: 50%; transform: none; }
.sg .tx { flex: 1; line-height: 1.5; }
.sg.warn .tx { color: var(--warn); }
.sg button { white-space: nowrap; border: 1px solid var(--ink); background: var(--card); border-radius: var(--r); padding: 4px 12px; cursor: pointer; font-weight: 600; font-size: 14px; }
.sg button:hover { background: var(--ink); color: var(--paper); }
.sg button.x { border: 0; background: none; color: var(--muted); padding: 4px; font-weight: 400; }
.sg button.x:hover { background: none; color: var(--ink); }

/* ---------- ציר הזמן – כמו שביל מסומן ---------- */
.node { display: flex; align-items: center; gap: 10px; padding: 12px 0; font-weight: 700; font-size: 15px; }
.node::before { content: ''; width: 14px; height: 14px; border: 2px solid var(--ink); background: var(--card); margin-inline: 15px; flex: none; }
.node .when { margin-inline-start: auto; font-family: var(--serif); font-variant-numeric: tabular-nums; }
.leg { position: relative; margin-inline-start: 21px; padding: 10px 0; padding-inline-start: 34px; border-inline-start: 2px dashed var(--ink-2); color: var(--muted); font-size: 14px; }
.leg.short { padding-block: 5px; }
.traffic { color: var(--warn); margin-inline-start: 8px; font-size: 13px; }
.traffic::before { content: '● '; color: var(--trail); }

.stop { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr) 84px; gap: 14px; padding: 16px 18px 16px 14px; background: var(--card); border: 1px solid var(--rule); border-inline-start: 4px solid var(--c, var(--ink)); border-radius: var(--r); transition: border-color .15s, box-shadow .15s; }
.stop { transition: border-color .15s, box-shadow .2s, transform .2s, background .2s; }
.stop:hover, .stop:focus-within { z-index: 3; border-color: var(--ink-2); border-inline-start-color: var(--c, var(--ink)); background: #fff; transform: scale(1.015); box-shadow: 5px 5px 0 color-mix(in srgb, var(--c, var(--ink)) 35%, transparent); }
.stop.dragging, .stop.drop-before, .stop.drop-after { transform: none; }
/* פרטים נוספים – נפתחים במעבר עכבר */
.stop .more { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .25s ease, opacity .2s; }
.stop .more > div { overflow: hidden; min-height: 0; }
.stop:hover .more, .stop:focus-within .more { grid-template-rows: 1fr; opacity: 1; }
.more-photo { margin: 10px 0 4px; }
.more-photo:empty { display: none; }
.more-photo img { display: block; width: 100%; max-width: 420px; height: 200px; object-fit: cover; border: 1px solid var(--rule); background: var(--paper-2); }
.more-photo figcaption { margin-top: 3px; font-size: 11.5px; color: var(--muted); }
.more-photo figcaption a { color: inherit; }
.more-info { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.more-links { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 8px; font-size: 14px; font-weight: 600; }
.more-links a { text-decoration-color: var(--rule); }
.more-links a:hover { color: var(--trail-ink); text-decoration-color: currentColor; }
@media (hover: none) { .stop .more { grid-template-rows: 1fr; opacity: 1; } }
.num-col { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.num { width: 40px; height: 40px; display: grid; place-items: center; color: #fff; border-radius: var(--r); }
.num svg { width: 22px; height: 22px; }
.grip { color: var(--rule); font-size: 16px; letter-spacing: -3px; cursor: grab; user-select: none; line-height: 1; }
.stop:hover .grip { color: var(--ink-2); }
.stop.dragging { opacity: .4; }
.stop.drop-before { box-shadow: 0 -3px 0 var(--trail); }
.stop.drop-after { box-shadow: 0 3px 0 var(--trail); }
.stop.is-break { background: var(--paper); border-style: dashed; border-inline-start-style: solid; }
.body { min-width: 0; }
.stop .hd { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding-inline-end: 30px; }
.stop .name { font-family: var(--serif); font-weight: 700; font-size: 20px; line-height: 1.25; }
.stop .time { font-family: var(--serif); font-weight: 700; color: var(--trail-ink); font-variant-numeric: tabular-nums; }
.stop .reg { width: 100%; color: var(--muted); font-size: 13px; }
.stop p { margin: 8px 0; line-height: 1.6; color: var(--ink-2); }
.facts { display: flex; flex-wrap: wrap; margin: 8px 0; font-size: 14px; color: var(--ink-2); }
.facts span { padding-inline-end: 10px; margin-inline-end: 10px; margin-bottom: 4px; border-inline-end: 1px solid var(--rule); line-height: 1.3; }
.facts span:last-child { border: 0; }
.tipline { font-size: 14px; color: var(--ink-2); padding: 6px 12px; margin-top: 6px; border-inline-start: 2px solid var(--trail); background: rgba(216, 100, 31, .06); }
.warn-line { border-color: var(--warn); color: var(--warn); background: var(--warn-bg); }
.stop-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.stop-actions button { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--rule); background: none; border-radius: var(--r); padding: 6px 12px; cursor: pointer; font-size: 14px; }
.stop-actions button:hover { border-color: var(--ink); }
.stop-actions .alt-btn { border: 1.5px solid var(--ink); font-weight: 700; background: var(--card); }
.stop-actions .alt-btn:hover, .stop-actions .alt-btn.on { background: var(--ink); color: var(--paper); }
.rm-x { position: absolute; top: 10px; inset-inline-end: 10px; z-index: 2; width: 26px; height: 26px; border: 1px solid transparent; background: none; border-radius: var(--r); color: var(--muted); cursor: pointer; font-size: 14px; line-height: 1; }
.rm-x:hover { border-color: var(--warn); color: var(--warn); }

/* זמן שהייה */
.dur-box { position: relative; align-self: start; margin-top: 34px; margin-inline-end: 12px; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 8px 4px 7px; border: 1px solid var(--rule); background: #fff; border-radius: var(--r); text-align: center; }
.dur-box:not(.editing) { cursor: pointer; transition: border-color .15s; }
.dur-box:not(.editing):hover { border-color: var(--ink); }
.dur-box small { font-size: 10.5px; color: var(--muted); letter-spacing: .02em; }
.dur-box b { font-family: var(--serif); font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.dur-box .pencil { position: absolute; top: -10px; inset-inline-end: -9px; width: 22px; height: 22px; display: grid; place-items: center; padding: 0; border: 1px solid var(--ink-2); background: var(--card); border-radius: 50%; cursor: pointer; color: var(--ink-2); }
.dur-box .pencil svg { width: 12px; height: 12px; }
.dur-box .pencil:hover { background: var(--ink); color: var(--paper); }
.dur-box.editing { padding: 8px 4px; }
.dur-edit { display: flex; align-items: center; gap: 2px; }
.dur-edit input { width: 44px !important; height: 30px !important; padding: 0 2px !important; text-align: center; font-size: 15px; }
.dur-edit button { width: 20px; height: 28px; padding: 0; border: 1px solid var(--rule); background: #fff; cursor: pointer; }
.dur-ok { margin-top: 6px; border: 0; background: var(--ink); color: var(--paper); border-radius: var(--r); padding: 3px 8px; cursor: pointer; font-size: 12px; }
.edit-hint { position: absolute; bottom: calc(100% + 16px); inset-inline-end: -12px; width: 190px; z-index: 5; padding: 9px 26px 9px 12px; background: var(--ink); color: var(--paper); font-size: 13px; line-height: 1.4; text-align: start; border-radius: var(--r); animation: pop .3s ease-out; transition: opacity .6s; }
.edit-hint::after { content: ''; position: absolute; top: 100%; inset-inline-end: 18px; border: 7px solid transparent; border-top-color: var(--ink); }
.edit-hint button { position: absolute; top: 5px; inset-inline-start: 5px; border: 0; background: none; color: var(--paper); cursor: pointer; font-size: 11px; }
.edit-hint.fade { opacity: 0; }
@keyframes pop { from { transform: translateY(6px); opacity: 0; } to { transform: none; opacity: 1; } }
.drag-hint { text-align: center; margin: 14px 0 0; }

/* חלופות */
.alts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--rule); }
.alts .row { flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.alts .row button { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--rule); background: #fff; border-radius: var(--r); padding: 4px 8px; cursor: pointer; font-size: 13px; }
.alts .row button.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.kosher-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 2px 0 8px; padding: 8px 10px; background: var(--paper); border-inline-start: 2px solid var(--trail-blue); font-size: 14px; }
.seg.mini { display: inline-flex; margin: 0; }
.seg.mini button { flex: none; padding: 3px 12px; font-size: 13px; }
.alt { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid transparent; border-bottom-color: var(--rule-2); }
.alt .ai { color: var(--muted); }
.alt .an { flex: 1; min-width: 0; }
.alt small { color: var(--muted); }
.alt[data-pick] { cursor: pointer; transition: background .12s, border-color .12s; }
.alt[data-pick]:hover, .alt[data-pick]:focus-visible { background: #fff; border-color: var(--ink); outline: none; }
.alt[data-pick]:hover b, .alt[data-pick]:focus-visible b { color: var(--trail-ink); text-decoration: underline; text-underline-offset: 3px; }
.alt .pick-hint { font-size: 13px; font-weight: 700; color: var(--trail-ink); opacity: 0; transition: opacity .12s; white-space: nowrap; }
.alt[data-pick]:hover .pick-hint, .alt[data-pick]:focus-visible .pick-hint { opacity: 1; }
.alt.over { background: rgba(247, 234, 217, .5); }
.alt.off-season { background: rgba(44, 90, 133, .045); }
.over-tag { display: block; margin-top: 2px; font-size: 13px; color: var(--warn); font-weight: 600; }
.season-tag { display: block; margin-top: 2px; font-size: 13px; color: var(--trail-blue); font-weight: 600; }
.alt-sep { margin: 12px 0 4px; font-size: 14px; color: var(--warn); font-weight: 700; }
.alt-note { font-size: 14px; color: var(--muted); padding: 6px 0; }

/* הוספת תחנה + פעולות */
.add-stop { margin: 18px 0; padding: 16px 18px; border: 1px dashed var(--ink-2); border-radius: var(--r); }
.add-stop > b { font-family: var(--serif); font-size: 17px; }
.add-stop .row { flex-wrap: wrap; align-items: center; gap: 6px; }
.add-stop .row button { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--rule); background: var(--card); border-radius: var(--r); padding: 6px 10px; cursor: pointer; font-size: 14px; }
.add-stop .row button:hover { border-color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 48px; padding-top: 18px; border-top: 1.5px solid var(--ink); }
.actions button:not(.primary) { border: 1px solid var(--ink-2); background: var(--card); border-radius: var(--r); padding: 10px 16px; cursor: pointer; font-weight: 600; }
.actions button:not(.primary):hover { background: var(--ink); color: var(--paper); }

/* לינה */
.lodging-panel { margin-top: 20px; padding: 18px 20px; background: var(--card); border: 1px solid var(--rule); border-top: 3px solid var(--trail-blue); }
.lodge-list { display: grid; margin-top: 10px; border-top: 1px solid var(--rule); }
.lodge { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 12px 4px; border-bottom: 1px solid var(--rule-2); }
.lodge.on { background: #fff; box-shadow: inset -3px 0 0 var(--olive); padding-inline-start: 12px; }
.lodge small { color: var(--muted); }
.lodge .links { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; }
.lodge .mini-btn, .lodge .chosen-tag { position: absolute; top: 12px; inset-inline-end: 8px; }
.chosen-tag { color: var(--olive); font-weight: 700; }
.badge { font-size: 12px; border: 1px solid var(--rule); border-radius: var(--r); padding: 0 6px; font-weight: 400; margin-inline-start: 4px; }
.badge.warn { border-color: #e3c9a6; color: var(--warn); }
.badge.ok { border-color: #c3d1b2; color: var(--olive); }
.mini-btn { border: 1.5px solid var(--ink); background: var(--card); color: var(--ink); border-radius: var(--r); padding: 3px 10px; cursor: pointer; font-weight: 700; font-size: 13px; }
.mini-btn:hover { background: var(--ink); color: var(--paper); }

/* ---------- חלונות ---------- */
dialog { max-width: 640px; width: calc(100% - 32px); padding: 26px; border: 1.5px solid var(--ink); border-radius: var(--r); background: var(--card); color: var(--ink); box-shadow: 8px 8px 0 rgba(31, 29, 25, .18); }
dialog.wide { max-width: 1000px; }
dialog::backdrop { background: rgba(31, 29, 25, .45); }
dialog .close { margin-top: 18px; border: 1px solid var(--ink-2); background: none; border-radius: var(--r); padding: 8px 18px; cursor: pointer; font-weight: 600; }
.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); border: 1px solid var(--ink); }
.tier-card { display: flex; flex-direction: column; gap: 6px; padding: 22px; border-inline-start: 1px solid var(--rule); background: var(--card); }
.tier-card:first-child { border-inline-start: 0; }
.tier-card.on { background: #fff; box-shadow: inset 0 4px 0 var(--trail); }
.tier-card .ti { display: none; }
.tier-card h3 { font-size: 24px; margin: 0; }
.tier-card .price { font-family: var(--serif); font-weight: 700; color: var(--trail-ink); }
.tier-card ul { list-style: none; padding: 0; margin: 10px 0 16px; flex: 1; font-size: 15px; line-height: 1.9; }
.tier-card button { border: 1.5px solid var(--ink); background: var(--card); border-radius: var(--r); padding: 9px; cursor: pointer; font-weight: 700; }
.tier-card button.primary { background: var(--ink); color: var(--paper); }
.plan-btns { display: grid; gap: 6px; }
.plan-btns b { font-family: var(--serif); margin-inline-end: 6px; }.trail-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.trail-head h2 { margin: 0; display: flex; align-items: center; gap: 8px; }
.trail-head input { flex: 1; min-width: 220px; }
.trail-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; height: min(62vh, 560px); }
#trailMap { min-height: 300px; border: 1px solid var(--ink); }
.trail-list { list-style: none; margin: 0; padding: 0; overflow: auto; border-top: 1px solid var(--ink); }
.trail-list li { display: flex; align-items: center; gap: 8px; padding: 10px 4px; border-bottom: 1px solid var(--rule-2); cursor: pointer; font-size: 15px; }
.trail-list li:hover { background: #fff; }
.trail-list li span { flex: 1; }
.trail-list li.empty { cursor: default; color: var(--muted); }
.lgroup { margin: 14px 0; }
.lgroup h4 { margin: 0 0 6px; font-size: 13px; color: var(--muted); letter-spacing: .03em; }
.lgroup a { display: inline-block; margin: 0 0 6px 14px; font-size: 15px; }
.grev { padding: 8px 12px; margin: 6px 0; border-inline-start: 2px solid var(--trail); background: #fff; font-size: 15px; }
.note { font-size: 14px; color: var(--muted); padding: 10px 12px; border: 1px dashed var(--rule); margin-top: 10px; }
.stars { color: var(--trail); letter-spacing: 1px; }
.toast { position: fixed; bottom: 22px; left: 50%; z-index: 2000; transform: translateX(-50%) translateY(90px); background: var(--ink); color: var(--paper); padding: 10px 20px; border-radius: var(--r); box-shadow: 4px 4px 0 var(--trail); transition: transform .25s; }
.toast.show { transform: translateX(-50%) translateY(0); }

/* ---------- מקורות ---------- */
.sources-view { display: grid; gap: 24px; max-width: 1120px; margin: 28px auto; padding: 0 28px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th, .tbl td { text-align: start; padding: 9px 8px; border-bottom: 1px solid var(--rule-2); vertical-align: top; }
.tbl th { border-bottom: 1.5px solid var(--ink); font-weight: 700; }
.tbl .no { color: var(--warn); font-weight: 700; }
.tbl .mid { color: var(--trail-ink); font-weight: 700; }
.cat { font-size: 12px; border: 1px solid var(--rule); border-radius: var(--r); padding: 1px 6px; }

/* ---------- מסכים צרים ---------- */
@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; padding: 16px; gap: 18px; }
  .form-panel { position: static; max-height: none; }
  .topbar { padding: 10px 16px; }
  .brand small { display: none; }
  .back-bar { top: 55px; }
  .welcome { padding: 32px 22px; min-height: 0; }
}
@media (max-width: 640px) {
  .panel { padding: 18px 16px; }
  .stop { grid-template-columns: 36px minmax(0, 1fr); padding: 14px 12px; gap: 10px; }
  .num { width: 34px; height: 34px; }
  .dur-box { grid-column: 1 / -1; flex-direction: row; justify-content: center; align-items: baseline; gap: 8px; margin: 2px 0 0; }
  .edit-hint { inset-inline-end: 0; }
  .trail-body { grid-template-columns: 1fr; height: auto; }
  #trailMap { height: 300px; }
  .trail-list { max-height: 240px; }
  .summary .s { padding-inline: 10px; }
  .topbar nav .nav-btn { padding: 6px; }
  .tier-pill { margin-inline-end: 4px; }
  .sources-view { padding: 0 16px; }
}
.field.two > div:first-child > label { display: flex; align-items: baseline; gap: 8px; }
.field.two > div:first-child > label::before { counter-increment: step; content: counter(step, decimal-leading-zero); font-family: var(--serif); font-weight: 700; font-size: 13px; color: var(--trail); min-width: 20px; }
.field.two > div + div > label { padding-inline-start: 0; }
/* המפה (Leaflet) לא עולה מעל הסרגלים הדביקים */
.map-wrap { position: relative; z-index: 0; isolation: isolate; }
.back-bar { z-index: 1050; }
.topbar { z-index: 1100; }
.tier-pill, .nav-btn { white-space: nowrap; }
@media (max-width: 640px) {
  .topbar { padding: 8px 12px; gap: 6px; }
  .brand { font-size: 21px; gap: 7px; }
  .brand .blaze { width: 18px; height: 18px; }
  .nav-btn { font-size: 14px; padding: 6px 4px; }
  .tier-pill { font-size: 13px; padding: 3px 8px; }
  .back-bar { top: 49px; }
}

/* הצעת מקום חסר */
.link-btn { border: 0 !important; background: none !important; padding: 0 !important; color: var(--trail-blue) !important; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; font-weight: 600; }
.link-btn:hover { color: var(--trail-ink) !important; }
.contrib { position: relative; font-size: 15px !important; margin: 18px 0 0 !important; color: var(--muted) !important; }
textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--rule); border-bottom: 1.5px solid var(--ink-2); border-radius: var(--r) var(--r) 0 0; background: #fff; font: inherit; resize: vertical; }
textarea:focus { outline: none; border-bottom-color: var(--trail); }
#suggestDlg h2 { margin-bottom: 6px; }
#suggestDlg .seg { margin: 14px 0 4px; }

/* מקומות בעדיפות עליונה */
.top-badge { display: inline-flex; align-items: baseline; gap: 8px; margin: 4px 0 2px; font-size: 13px; font-weight: 700; color: var(--trail-ink); letter-spacing: .02em; }
.top-badge::before { content: ''; width: 8px; height: 8px; background: var(--trail); transform: rotate(45deg); align-self: center; }
.top-badge span { font-weight: 400; color: var(--muted); }
.top-badge span:empty { display: none; }
.sg.top .mark { background: var(--trail); width: 11px; height: 11px; }
.sg.top .tx { color: var(--ink); }
.stop .stop-desc { line-height: 1.55; }
