[hidden] { display: none !important; }
:root {
  --sand: #f7f1e6; --sand-2: #efe5d3; --paper: #fffdf8; --line: #e7dcc8;
  --ink: #14303a; --muted: #5d6e73;
  --sea: #0e8a8a; --sea-2: #0a6b6c; --deep: #0b3d4a; --deep-2: #082f39;
  --coral: #e8734a; --coral-fill: #b8532c; --coral-fill-2: #a9471f; --gold: #d9a441;
  --green: #2e7d32; --green-bg: #e6f2e6; --amber: #9a5b00; --amber-bg: #fcefd6; --red: #b42318; --red-bg: #fbe5e2;
  --radius: 20px;
  --shadow: 0 14px 34px -18px rgba(11, 61, 74, .38);
  --serif: "Frank Ruhl Libre", "Times New Roman", serif;
  --sans: "Heebo", system-ui, -apple-system, "Arial Hebrew", Arial, sans-serif;
  --gut: max(16px, calc((100% - 1280px) / 2));
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--sand); color: var(--ink); font: 16px/1.6 var(--sans); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; margin: 0; }
a { color: var(--sea-2); }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; border-radius: 6px; }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { text-align: start; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--sand-2); font-weight: 700; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px;
  padding: 12px 22px; font-weight: 700; cursor: pointer; text-decoration: none; transition: background .2s, transform .15s; }
.btn:active { transform: scale(.97); }
.btn-coral { background: var(--coral-fill); color: #fff; }
.btn-coral:hover { background: var(--coral-fill-2); }
.btn-glass { background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.35); padding: 8px 16px; font-size: .92rem; }
.btn-ghost { background: transparent; color: var(--sea-2); border: 1.5px solid var(--sea); padding: 7px 14px; font-size: .9rem; }
.btn-ghost[aria-pressed=true] { background: var(--sea); color: #fff; }
.btn-block { width: 100%; }

.hero { background: linear-gradient(135deg, var(--deep-2), var(--deep) 55%, var(--sea-2)); color: #fff; padding: 40px var(--gut) 46px; }
.hero h1 { font-size: clamp(2.6rem, 9vw, 5rem); font-weight: 900; margin-top: 14px; }
.hero .dates { margin-top: 8px; font-size: 1.15rem; opacity: .92; }
.facts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.fact { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); border-radius: 14px; padding: 8px 14px; }
.fact b { display: block; font-size: 1.25rem; }
.fact span { font-size: .85rem; opacity: .85; }

.wrap { display: grid; gap: 22px; padding: 24px var(--gut) 60px; }
@media (min-width: 1000px) { .wrap { grid-template-columns: 400px 1fr; align-items: start; } }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; min-width: 0; }
.card > h2 { font-size: 1.5rem; margin-bottom: 4px; }
.sub { color: var(--muted); margin: 0 0 14px; font-size: .95rem; }

fieldset { border: 0; border-top: 1px solid var(--line); margin: 0; padding: 16px 0 6px; min-width: 0; }
legend { font-weight: 700; padding: 0; margin-bottom: 8px; display: flex; gap: 8px; align-items: center; }
legend .n { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--sea); color: #fff; font-size: .8rem; }
.req { color: var(--coral-fill); }
label.f { display: block; font-size: .9rem; color: var(--muted); margin: 10px 0 4px; }
input[type=date], select { width: 100%; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; }
input:focus, select:focus { border-color: var(--sea); outline: none; box-shadow: 0 0 0 3px rgba(14,138,138,.18); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hint { font-size: .85rem; color: var(--muted); margin: 6px 0 0; }
/* task 36: the line about the flight lines: the text on the right, the "הבנתי" button on the left (physically, whatever the writing direction) */
#flNote { display: flex; flex-direction: row-reverse; direction: ltr; align-items: center; gap: 10px; }
#flNote[hidden] { display: none; }
#flNote .flnote-t { flex: 1; direction: rtl; }
#flNote .btn { padding: 2px 12px; font-size: .8rem; flex: none; }
.err { color: var(--red); background: var(--red-bg); border-radius: 10px; padding: 6px 10px; font-size: .88rem; margin-top: 8px; }
.note { color: var(--amber); background: var(--amber-bg); border-radius: 10px; padding: 6px 10px; font-size: .85rem; margin-top: 8px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; background: var(--sand-2); padding: 4px; border-radius: 14px; }
.seg button { flex: 1 1 auto; border: 0; background: transparent; padding: 9px 12px; border-radius: 10px; cursor: pointer; font-weight: 500; }
.seg button[aria-pressed=true] { background: var(--paper); color: var(--sea-2); font-weight: 700; box-shadow: 0 2px 8px -4px rgba(11,61,74,.4); }
.ages { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin-top: 6px; }
.types { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.type { position: relative; border: 1.5px solid var(--line); border-radius: 14px; padding: 10px 10px 22px; cursor: pointer; background: #fff; text-align: start; }
.type .ico { font-size: 1.4rem; display: block; }
.type b { display: block; font-size: .92rem; }
.type small { color: var(--muted); font-size: .78rem; }
.type[aria-pressed=true] { border-color: var(--sea); background: rgba(14,138,138,.07); }
.type[aria-pressed=true]::after { content: "✓"; position: absolute; top: 6px; left: 10px; color: var(--sea); font-weight: 700; }
.chk { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0; }
.chk input { margin-top: 5px; }
/* "מה לארוז" in 3 columns, "מה צריך להזמין" in 2; on a narrow screen (up to 600px) packing drops to 2 columns and booking to 1 */
.cols { display: grid; column-gap: 18px; }
.cols3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols .chk { margin: 6px 0; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 600px) { .cols3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cols2 { grid-template-columns: minmax(0, 1fr); } }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 14px; position: sticky; top: 0; z-index: 500; background: var(--paper); padding: 8px 0; }
.chip { padding: 5px 12px; border-radius: 999px; background: var(--sand-2); font-size: .86rem; border: 0; cursor: pointer; }
.chip.new { background: rgba(14,138,138,.14); color: var(--sea-2); font-weight: 700; }
.dsec { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px; margin-top: 14px; scroll-margin-top: 120px; }
.dsec > h3 { font-size: 1.3rem; margin-bottom: 8px; }
.dsec ul { margin: 6px 0; padding-inline-start: 20px; }
.dsec li { margin: 3px 0; }
.dsec li::marker { color: var(--sea); }
.newtag { font-family: var(--sans); font-size: .7rem; padding: 2px 8px; border-radius: 999px; background: rgba(14,138,138,.14); color: var(--sea-2); vertical-align: middle; }
.ph { color: var(--muted); font-size: .86rem; font-style: italic; }
.verify { color: var(--amber); font-size: .85em; }
.links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; }
.empty .big { font-size: 3rem; }
.empty ul { display: inline-block; text-align: start; }

.journey { display: flex; align-items: flex-start; overflow-x: auto; padding: 6px 0 12px; }
.jstop { flex: 0 0 auto; width: 110px; text-align: center; }
.jdot { width: 46px; height: 46px; margin: 0 auto; border-radius: 50%; background: var(--sand-2); display: grid; place-items: center; font-size: 1.3rem; border: 2px solid var(--sea); }
.jname { font-weight: 700; margin-top: 4px; font-size: .92rem; }
.jsub { font-size: .78rem; color: var(--muted); }
/* no dashed line (its dots were on both sides of the plane). The empty gap between the edge of a stop circle and the edge of the plane icon is 5.5px (it was 6.9px, 20% less). */
.jleg { flex: 0 0 40px; margin: 23px -27.4px 0; text-align: center; }
.jleg span { position: relative; top: -13px; background: #fff; padding: 0 4px; }

.maptabs { display: flex; gap: 6px; margin: 12px 0 8px; flex-wrap: wrap; }
#map, #gmap { height: 340px; border-radius: 14px; border: 1px solid var(--line); background: var(--sand-2); }
#map:empty::before { content: "המפה דורשת חיבור לאינטרנט."; display: grid; place-items: center; height: 100%; color: var(--muted); }
#gmap iframe { width: 100%; height: 100%; border: 0; border-radius: 14px; }

.day { border: 1px solid var(--line); border-radius: 14px; margin: 8px 0; background: var(--paper); }
.day summary { display: flex; gap: 12px; align-items: center; padding: 10px 12px; cursor: pointer; list-style: none; }
.day summary::-webkit-details-marker { display: none; }
.dnum { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%; background: var(--sea); color: #fff; display: grid; place-items: center; font-weight: 700; }
.ddate { font-size: .82rem; color: var(--muted); }
.dlead { font-weight: 700; }
.dtype { font-size: .75rem; padding: 1px 8px; border-radius: 999px; background: var(--sand-2); margin-inline-start: 6px; }
.dbody { padding: 0 16px 12px; }
.light { display: grid; gap: 6px; }
.light div { border-radius: 10px; padding: 8px 12px; }
.g { background: var(--green-bg); } .o { background: var(--amber-bg); } .r { background: var(--red-bg); }
.cnt { font-family: var(--sans); font-size: .9rem; font-weight: 700; color: var(--sea-2); }
.ins { padding: 6px 10px; border: 1.5px solid var(--line); border-radius: 10px; width: 160px; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(80px); background: var(--deep); color: #fff; padding: 10px 18px; border-radius: 999px; transition: transform .25s; z-index: 2000; }
.toast.show { transform: translateX(-50%) translateY(0); }
.multi { border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.multi > summary { padding: 10px 12px; cursor: pointer; font-weight: 500; }
.mpanel { max-height: 260px; overflow: auto; border-top: 1px solid var(--line); padding: 6px; }
.mpanel label { display: flex; gap: 8px; align-items: center; padding: 5px 6px; border-radius: 8px; cursor: pointer; }
.mpanel label:hover, .mpanel label.cur { background: var(--sand-2); }
.cityset { margin-top: 8px; }
#mapWrap { margin-top: 12px; }
.mpanel label:focus-within { background: var(--sand-2); }
.stepper { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 3px; }
.stepper button { width: 40px; height: 40px; border: 0; border-radius: 9px; background: var(--sand-2); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.stepper button:hover { background: var(--line); }
.stepper output { min-width: 44px; text-align: center; font-size: 1.15rem; font-weight: 700; }

/* booking details: panel inside the header, on the left of the title */
input[type=text] { width: 100%; padding: 9px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; color: #111; }
.hero { display: grid; grid-template-columns: 1fr; gap: 24px; align-items: start; }
@media (min-width: 900px) { .hero { grid-template-columns: minmax(0, 1fr) minmax(24rem, 34rem); } }
.hero-book { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.28); border-radius: 18px; padding: 16px 18px; }
.hero-book h2 { font-size: 1.15rem; }
.hero-book .bnote { font-size: .8rem; opacity: .85; margin: 4px 0 6px; }
.brow { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; border-top: 1px solid rgba(255,255,255,.22); padding: 10px 0 6px; }
.brow .bt { grid-column: 1 / -1; font-size: .95rem; }
.bf.wide { grid-column: 1 / -1; }
.bf label { display: block; font-size: .8rem; opacity: .9; margin: 6px 0 3px; }
.hero-book select { width: 100%; padding: 9px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; color: #111; }
@media (max-width: 420px) { .brow { grid-template-columns: 1fr; } }
.bnote.wide { grid-column: 1 / -1; }
.dgrp { padding: 6px 0; }
.dh { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.upl { background: #fff; color: #111; border-radius: 999px; padding: 5px 14px; font-size: .85rem; font-weight: 700; cursor: pointer; }
.upl:focus-within { outline: 2px solid #fff; outline-offset: 2px; }
.dlist { list-style: none; margin: 6px 0 0; padding: 0; }
.dlist li { display: flex; align-items: center; gap: 8px; font-size: .85rem; padding: 4px 0; border-top: 1px dashed rgba(255,255,255,.2); }
.dlist .fn { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: ltr; text-align: right; }
.dlist button { background: rgba(255,255,255,.2); color: #fff; border: 0; border-radius: 8px; padding: 3px 10px; cursor: pointer; font: inherit; font-size: .8rem; }
.dlist button.danger[data-sure] { background: #c0392b; }
.dlist .empty { opacity: .7; border-top: 0; }
.hero-book .err { background: #fff; padding: 6px 10px; border-radius: 10px; }
@media (min-width: 900px) { .hero { grid-template-columns: minmax(0, 1fr) minmax(26rem, 38rem); } }

/* layout: title and documents on the right, booking card on the left */
.hero { grid-template-areas: "main" "book" "docs"; }
.hero-main { grid-area: main; } .hero-book { grid-area: book; } .hero-docs { grid-area: docs; }
@media (min-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(26rem, 36rem); column-gap: 40px; grid-template-areas: "main book" "docs book"; }
}
.hero-docs { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.28); border-radius: 18px; padding: 16px 18px; }
.hero-docs h2 { font-size: 1.15rem; }
.hero-docs .bnote { font-size: .8rem; opacity: .85; margin: 4px 0 6px; }
.hero-docs .err { background: #fff; color: #a02020; padding: 6px 10px; border-radius: 10px; margin-top: 8px; }
.dgrp { border-top: 1px solid rgba(255,255,255,.22); padding: 10px 0 4px; }
.dlist li { padding: 7px 0; }
.dlist .sz { font-size: .75rem; opacity: .75; white-space: nowrap; }

/* narrow screens: grid tracks and items may shrink below their content width, so nothing pushes the header wider than the window */
.hero { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(26rem, 36rem); }
}
.hero-main, .hero-book, .hero-docs { min-width: 0; }
.brow { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 420px) { .brow { grid-template-columns: minmax(0, 1fr); } }
.bf { min-width: 0; }
.hero-book input[type=text], .hero-book select { min-width: 0; max-width: 100%; }
.hero-book .bnote, .hero-docs .bnote { overflow-wrap: anywhere; }
.dh > b { min-width: 0; }
.dh .upl { flex: none; }
.row2, .types { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.row2 > *, .types > * { min-width: 0; }
/* flight fields: two per row, one per row on a narrow screen */
.frow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 10px; }
.frow > * { min-width: 0; }
.frow input[type=text] { min-width: 0; max-width: 100%; }
.fact small { display: block; font-size: .7rem; opacity: .75; }
@media (max-width: 480px) { .frow { grid-template-columns: minmax(0, 1fr); } }
input[type=date] { min-width: 0; max-width: 100%; }
/* Danger Zone and its warning windows */
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #8f1a10; }
.dzone { margin-top: 22px; border: 2px solid var(--red); border-radius: 14px; background: var(--red-bg); padding: 14px 16px; }
.dzone h3 { color: var(--red); font-size: 1.05rem; }
.dzone p { font-size: .88rem; margin: 4px 0 10px; }
.dzbtns, .dzact { display: flex; flex-wrap: wrap; gap: 8px; }
.dzbtns .btn { flex: 1 1 140px; }
.dzmodal { position: fixed; inset: 0; z-index: 3000; background: rgba(0,0,0,.55); display: grid; place-items: center; padding: 16px; overflow-y: auto; }
.dzmodal[hidden] { display: none; }
.dzbox { background: #fff; color: #111; border: 3px solid var(--red); border-radius: 16px; padding: 20px; width: 100%; max-width: 440px; max-height: 100%; overflow-y: auto; }
.dzbox h3 { color: var(--red); margin-bottom: 8px; }
.dzbox p { margin-bottom: 12px; }
.dzbox .chk { margin: 0 0 12px; }
.dzbox .btn-block { margin-bottom: 12px; }
.dzact { justify-content: flex-end; }
.dzbox.aibox { max-width: 640px; }
/* task 33ב (ב): the AI prompt is a side panel, not a blocking window. No dark layer; the frame lets clicks through, only the box takes them.
   Narrow screen: at the bottom, up to 45% of the screen, and the page gets the same room at its end so the form scrolls above it.
   Wide screen (1000px and up, like .wrap): fixed on the left, over the dashboard column (in RTL the form column of 400px is on the right),
   from the top of the screen (task 39: the dark top bar was removed, and with it --barh). */
.aipanel { position: fixed; z-index: 1500; left: 0; right: 0; bottom: 0; height: 45vh; padding: 8px; pointer-events: none; }
.aipanel[hidden] { display: none; }
.aipanel .dzbox.aibox { pointer-events: auto; max-width: none; height: 100%; max-height: 100%; display: flex; flex-direction: column; gap: 6px; box-shadow: 0 10px 30px rgba(0,0,0,.25); padding: 14px 16px; }
.aipanel .aitext { flex: 1 1 auto; min-height: 90px; resize: none; }
body.aiopen { padding-bottom: 45vh; }
@media (min-width: 1000px) {
  .aipanel { top: 0; right: auto; height: auto; width: min(640px, calc(100vw - 400px - 2 * var(--gut) - 44px)); padding: 12px; }
  body.aiopen { padding-bottom: 0; }
}
/* the import window (task 26) */
.impfile { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; position: relative; }
.impfile input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.impfile:focus-within label { outline: 3px solid var(--sea); outline-offset: 2px; }
#impSum ul { margin: 0 0 10px; padding-inline-start: 20px; }
.impwarn { background: #fff4e5; color: #6b3d00; border-radius: 8px; padding: 8px 10px; }
#impMsgs ul { margin: 0 0 12px; padding-inline-start: 20px; max-height: 40vh; overflow-y: auto; }
#impMsgs .ierr { color: var(--red); }
#impMsgs .iwarn { color: #6b3d00; }
/* the imported details (task 26) */
.impline { margin: 0 0 8px; }
.improws { list-style: none; padding: 0; margin: 0; }
.improws li { padding: 6px 0; border-top: 1px solid var(--line); }
.improws li:first-child { border-top: 0; }
/* task 27: one dark colour for every field (was: the time there / travel time / notes in a <small> with the muted grey colour, smaller and
   lighter); the head differs only in weight. Each field is isolated (bidi), the space between fields is the gap, not a space in the text. */
.improws li { color: var(--ink); }
.improws .ihead, .improws .imeta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
.improws .ihead > *, .improws .imeta > *, .improws .idet { unicode-bidi: isolate; }
.improws .itime, .improws .isite { font-weight: 700; }
.improws .itime { font-variant-numeric: tabular-nums; }
.improws .ikind { border: 1px solid var(--line); border-radius: 8px; padding: 0 6px; }
.improws .idet { margin-top: 2px; text-align: right; }   /* dir="auto" would put an English line at the left edge of this right-to-left card */
.impbad { background: #fff4e5; color: #6b3d00; border-radius: 10px; padding: 8px 12px; }
.aisteps { margin: 0 0 10px; padding-inline-start: 22px; }
/* the prompt / import text boxes. Was 13px Consolas: Consolas has no Hebrew letters, so the Hebrew came out in a thin fallback font at 13px
   and looked small and gray (the computed colour was #111, nothing else made it gray). Now the page's own font at 1rem, full black. */
.aitext { width: 100%; font-family: inherit; font-size: 1rem; line-height: 1.5; border: 1px solid var(--line); border-radius: 8px; padding: 8px; margin-bottom: 12px; resize: vertical; direction: rtl; text-align: start; background: #fff; color: #000; -webkit-text-fill-color: #000; opacity: 1; }
.dlist li > * { flex: none; }
.dlist li > .fn { flex: 1 1 0; min-width: 0; }

.hero .hero-main h1 { margin-top: 0; }

/* ---- stage 2: chapter icons in a circle (as on the Thailand site), the plan table, place cards */
.dsec > h3[data-ico] { display: flex; align-items: center; gap: 12px; }
.dsec > h3[data-ico]::before { content: attr(data-ico); flex: none; display: grid; place-items: center; width: 1.7em; height: 1.7em; border-radius: 50%;
  background: var(--paper); box-shadow: 0 2px 8px -3px rgba(11, 61, 74, .45); font-size: .8em; font-family: var(--sans); }
.tscroll { overflow-x: auto; margin: 8px 0; }
table.plan small { display: block; color: var(--muted); font-size: .78rem; }
table.plan td, table.plan th { white-space: nowrap; }
table.plan td:nth-child(2) { white-space: normal; min-width: 7rem; }
table.plan tr.tot td { font-weight: 700; background: var(--sand); }
table.plan input[type=date] { width: auto; min-width: 9.5rem; padding: 6px 8px; }
.mv button { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; font-size: 1rem; }
.mv button:disabled { opacity: .35; cursor: default; }
.pstatus { margin: 4px 0; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--amber-bg); color: var(--amber); font-size: .85rem; font-weight: 700; }
.badge.ok { background: var(--green-bg); color: var(--green); }
#planMsg .btn { margin-top: 6px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.pcards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); margin-top: 8px; }   /* min(): on a window narrower than 260px + padding the card shrinks instead of sticking out */
.pcard { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--paper); box-shadow: var(--shadow); }
.pcard .pico { display: grid; place-items: center; aspect-ratio: 16 / 6; background: var(--sand-2); font-size: 2.6rem; }
.pcard .pbody { padding: 14px 16px; }
.pcard h4 { margin: 0 0 6px; font-family: var(--serif); font-size: 1.2rem; }
.pcard h4 small { font-family: var(--sans); font-size: .78rem; font-weight: 400; color: var(--muted); }
.pcard p { margin: 4px 0 8px; }
.pcard .pnote { font: inherit; font-size: .88rem; padding: 3px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); max-width: 100%; }
.pcard .pdesc { display: block; width: 100%; box-sizing: border-box; resize: vertical; margin: 4px 0 8px; }
.pcard .pfacts .pnote { width: 9em; }
input.fprice { font: inherit; font-size: .9rem; padding: 3px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); width: 9em; max-width: 100%; }
.pfacts { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; padding: 0; list-style: none; }
.dsec .pfacts li { margin: 0; padding: 4px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--sand); font-size: .88rem; }

/* task 34 (ד): the header buttons in a 2x2 grid next to the tiles (on a narrow screen: under them, the full width), in a dark frame.
   The export button opens a small menu (ב) under it. The export button is always the left column (RTL), so the menu starts at its left edge
   and opens to the right, inside the screen; nothing around it clips (no overflow: hidden). */
.hrow { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 14px; margin-top: 18px; }
.hrow .facts { margin-top: 0; }
.hact { flex: 1 1 19rem; max-width: 25rem; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.hbtns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; padding: 8px; border-radius: 14px; background: rgba(0, 0, 0, .2); border: 1px solid rgba(255, 255, 255, .08); }
.hbtns .btn, .hbtns .xmenu { width: 100%; min-width: 0; }
.hbtns .btn { padding: 8px 6px; font-size: .88rem; white-space: nowrap; }
.hbtns .btn[disabled] { opacity: .55; cursor: not-allowed; }
.xmenu { position: relative; }
.xpop { position: absolute; z-index: 900; top: calc(100% + 6px); left: 0; min-width: 100%; width: max-content; max-width: calc(100vw - 32px);
  display: flex; flex-direction: column; padding: 6px; border-radius: 12px; background: #fff; color: var(--ink); box-shadow: 0 10px 28px rgba(0, 0, 0, .3); }
.xpop button { border: 0; background: transparent; color: inherit; font: inherit; font-size: .92rem; text-align: start; padding: 9px 12px; border-radius: 8px; cursor: pointer; }
.xpop button:hover, .xpop button:focus-visible { background: var(--sand-2); }
.hact .exwhy { align-self: flex-start; }
.fact { min-width: 4.6rem; padding: 10px 12px; text-align: center; }
@media (max-width: 700px) { .hact { max-width: none; } }
.fact b { font-size: 1.55rem; line-height: 1.25; }
@media (max-width: 700px) { .hact { flex: 1 1 100%; } }

/* the planes in the route strip fly to the left, like the direction of the route (RTL) */
.jleg { position: relative; }
.jleg span { position: absolute; top: 0; left: 50%; display: block; line-height: 1; padding: 4px; transform: translate(-50%, -50%) rotate(-135deg); }

.flsw { display: inline-flex; gap: 6px; align-items: center; margin-inline-start: 12px; font-size: .9rem; }

/* travel warnings: severe-warning countries in the destination list, and their warning window */
.mpanel label.tw { color: var(--red); font-weight: 700; }
.tw-red { color: var(--red); font-weight: 700; }

/* big map */
#mapWrap.mapfull { position: fixed; inset: 0; z-index: 2000; background: var(--paper); padding: 12px 16px; overflow: auto; }
#mapWrap.mapfull #map, #mapWrap.mapfull #gmap { height: calc(100vh - 170px); min-height: 300px; }

/* list of stops */
.stopcard { margin-top: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.stoprow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.stoprow select { flex: 1 1 200px; width: auto; min-width: 0; max-width: 100%; }   /* min-width:0 - a long option text (a place added by hand) must not widen the page */
.nst { display: inline-flex; align-items: center; gap: 4px; }
.nst button { width: 28px; height: 28px; border: 0; border-radius: 8px; background: var(--sand-2); cursor: pointer; font-size: 1rem; line-height: 1; }
.nst output { min-width: 26px; text-align: center; font-weight: 700; }
table.plan td.nts small { margin-inline-start: 6px; color: var(--muted); }
/* task 32: the number of stays and the button "ה-AI יחליט" next to it */
.stayctl { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.stepper button:disabled { opacity: .4; cursor: not-allowed; }
/* task 32: "מבנה הטיול" (a dark card at the top of the preview card #preview; task 42: its title removed); the boxes wrap to more lines on a narrow screen (up to 30 boxes) */
.tshape { margin: 12px 0 16px; padding: 14px 16px; border-radius: 16px; background: var(--deep-2); color: #fff; text-align: center; }
.tshape h3 { color: #fff; font-size: 1.15rem; margin-bottom: 10px; }
.tsend { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 12px; border: 1px solid rgba(255,255,255,.35); border-radius: 12px; background: rgba(255,255,255,.08); }
.tsend small, .tsbox small { opacity: .85; font-size: .8rem; }
.tsname { font-weight: 700; color: var(--gold); overflow-wrap: anywhere; }
.tsarrow { font-size: 1.3rem; line-height: 1.4; opacity: .85; }
.tsrow { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.tsbox { flex: 1 1 110px; max-width: 170px; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px; border-radius: 10px;
  background: var(--green); color: #fff; border: 1px solid var(--green-bg); }
.tsbox .tsname { color: #fff; }
.tsbox hr { width: 100%; margin: 4px 0; border: 0; border-top: 1px solid rgba(255,255,255,.5); }
.tsbox.tsone { max-width: none; flex-basis: 100%; }
.addstop { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.addstop select { width: auto; flex: 1 1 200px; }
.maparrow span { display: block; width: 16px; height: 16px; line-height: 16px; font-size: 14px; text-align: center; text-shadow: 0 0 2px #fff, 0 0 2px #fff; }
.maparrow b { display: block; font-weight: inherit; }
/* the route moves in the direction of travel: the dashes march along each line, the arrows slide along it (CSS only, no clicks taken: the pane has pointer-events none) */
#map path.rt-march { animation: rtmarch16 1.2s linear infinite; }
#map path.rt-p10 { animation-name: rtmarch10; }
@keyframes rtmarch16 { to { stroke-dashoffset: -16; } }
@keyframes rtmarch10 { to { stroke-dashoffset: -10; } }
.maparrow b { animation: arrowslide 1.6s linear infinite; }
@keyframes arrowslide { 0% { transform: translateX(-9px); opacity: 0; } 25% { opacity: 1; } 75% { opacity: 1; } 100% { transform: translateX(9px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  #map path.rt-march, .maparrow b { animation: none; }
}

.kbhit { background: rgba(14,138,138,.2); border-radius: 6px; }
.exwhy { background: var(--amber-bg); color: var(--amber); border-radius: 10px; padding: 2px 10px; font-size: .8rem; }
#mapWarn { font-weight: 700; margin: 0 0 8px; }
/* Leaflet positions its labels with left:auto; in a right-to-left page that put every label about its own width to the left of its point. */
#map { direction: ltr; }
#map .leaflet-tooltip { text-align: center; opacity: .8; }   /* a little see-through, so a line drawn over a label does not hide the text */
#map .leaflet-route-pane { pointer-events: none; }            /* route lines and arrows never take clicks */
/* "אישור אימות" beside the "not verified" mark: small, may wrap onto its own line, never wider than the cell */
.vbtn { display: inline-block; max-width: 100%; padding: 2px 10px; font-size: .78rem; margin-top: 4px; white-space: normal; }
/* "אמת": a clear button (border and background), not a message */
.vbtn.vfy { border: 1.5px solid var(--sea-2); background: rgba(14,138,138,.14); color: var(--sea-2); font-weight: 700; cursor: pointer; border-radius: 10px; }
.vbtn.vfy:hover { background: rgba(14,138,138,.28); }
/* a place typed by hand in the open list: the name, then its buttons; wraps on a narrow screen, never wider than the list */
.mpanel .crow { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; min-width: 0; }
.mpanel .crow label { flex: 1 1 9rem; min-width: 0; }
.mpanel .cbtns { display: flex; flex-wrap: wrap; gap: 6px; max-width: 100%; }
.mpanel .cbtns .vbtn { margin-top: 0; }
.mpanel .rmask { flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 10px; background: var(--red-bg); color: var(--red); font-size: .85rem; }
.mpanel .rmask .vbtn { margin-top: 0; }
/* the two lines beside "פתח מסלול": one line each, the button "הבנתי" at the left */
.gnote { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.gnote[hidden] { display: none; }
.gnote-lines { flex: 1 1 14rem; min-width: 0; }
.gnote-lines p { margin: 2px 0; }
.gnote-ok { flex: none; margin-inline-start: auto; }
#map.picking, #map.picking .leaflet-interactive { cursor: crosshair; }   /* a place with no location is waiting for a click on the map */

/* budget card: the "בפועל" column (an amount typed by the owner) */
#p-budget td.act input { width: 7em; max-width: 100%; padding: 4px 6px; font: inherit; direction: ltr; text-align: left; }
