:root {
  --bg: #f3f7fb;
  --panel: #ffffff;
  --border: #d7e0ec;
  --text: #142033;
  --muted: #5b677a;
  --accent: #0f766e;
  --accent-soft: #e6f7f5;
  --warn: #b45309;
  --warn-soft: #fff7ed;
  --pending: #2563eb;
  --pending-soft: #dbeafe;
  --candidate: #0369a1;
  --candidate-soft: #e0f2fe;
  --tap-min: 48px;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 17px;
  line-height: 1.5;
  direction: rtl;
  text-align: right;
}

.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 16px 16px calc(80px + env(safe-area-inset-bottom));
}

.build-badge {
  position: fixed;
  left: 8px;
  bottom: calc(8px + env(safe-area-inset-bottom));
  z-index: 40;
  margin: 0;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.78);
  color: #e2e8f0;
  font-size: 11px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  line-height: 1.2;
  pointer-events: none;
  max-width: calc(100vw - 16px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header { margin-bottom: 20px; }

.header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.title { font-size: 26px; font-weight: 700; margin: 0 0 4px; }
.subtitle { color: var(--muted); font-size: 15px; margin: 0; }

.hub-link {
  width: auto;
  min-width: 120px;
  padding: 10px 14px;
  font-size: 15px;
  white-space: nowrap;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 14px;
}

.card h2 {
  margin: 0 0 10px;
  font-size: 18px;
}

.card p { margin: 0 0 8px; }
.card p:last-child { margin-bottom: 0; }

.muted { color: var(--muted); font-size: 15px; }

.btn {
  display: block;
  width: 100%;
  min-height: var(--tap-min);
  border: none;
  border-radius: 14px;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  padding: 12px 16px;
  text-align: center;
  text-decoration: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-secondary {
  background: var(--accent-soft);
  color: #0f5c56;
  border: 1px solid #99d5cf;
}

.btn-ghost {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn + .btn { margin-top: 10px; }

.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 600;
}

.badge-pending { background: var(--pending-soft); color: var(--pending); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-waiting { background: #f1f5f9; color: #475569; }
.badge-candidate { background: var(--candidate-soft); color: var(--candidate); }
.badge-done { background: #ecfdf5; color: #047857; }

.item-row {
  padding: 12px 0;
  border-bottom: 1px solid #edf2f7;
}

.item-row:last-child { border-bottom: none; padding-bottom: 0; }

.item-title { font-weight: 600; margin-bottom: 4px; }

.pending-summary {
  border-color: #fcd34d;
  background: linear-gradient(180deg, #fffbeb 0%, var(--panel) 100%);
}

.pending-card {
  border-color: #fcd34d;
}

.pending-row .item-title {
  font-size: 16px;
  line-height: 1.4;
}

.pending-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 12px;
  align-items: start;
}

.pending-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
  margin-top: 2px;
  position: relative;
}

.pending-check input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.pending-check-ui {
  width: 22px;
  height: 22px;
  border: 2px solid #0f766e;
  border-radius: 6px;
  background: #fff;
  display: inline-block;
  flex-shrink: 0;
  position: relative;
}

.pending-check input:checked + .pending-check-ui {
  background: #0f766e;
}

.pending-check input:checked + .pending-check-ui::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 6px;
  height: 11px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.pending-check-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.pending-row-main {
  min-width: 0;
}

.pending-row-treated {
  opacity: 0.78;
}

.pending-gap {
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 14px;
  line-height: 1.4;
}

.pending-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.closing-form {
  border-top: 1px solid #e5e7eb;
  padding: 10px 0;
}

.closing-form:first-of-type {
  border-top: 0;
}

.closing-form summary {
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  list-style: none;
}

.closing-form summary::-webkit-details-marker {
  display: none;
}

.closing-form-fields {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.closing-form-fields .field {
  display: grid;
  gap: 4px;
}

.closing-form-fields .field span {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

.closing-form-fields textarea,
.closing-form-fields input[type="text"],
.closing-form-fields input[type="number"] {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  background: #fff;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 100px;
  gap: 10px;
}

.field-check {
  margin: 0;
}

.menu-tile[data-section="costs"] {
  border-color: #86efac;
  background: linear-gradient(180deg, #f0fdf4 0%, var(--panel) 100%);
}

.costs-summary-card {
  border-color: #86efac;
}

.cost-row + .cost-row {
  margin-top: 8px;
}

.pending-more {
  margin-top: 8px;
  font-size: 14px;
}

.section-toggle {
  width: 100%;
  text-align: right;
  background: transparent;
  border: none;
  font-size: 18px;
  font-weight: 700;
  padding: 14px 0 8px;
  color: var(--text);
  cursor: pointer;
}

.section-body { display: none; padding-bottom: 8px; }
.section-body.open { display: block; }

.snippet {
  background: var(--accent-soft);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
}

.error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  border-radius: 12px;
  padding: 14px;
}

.bottom-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255,255,255,0.96);
  border-top: 1px solid var(--border);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  backdrop-filter: blur(8px);
}

.bottom-bar .wrap {
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.dates {
  font-size: 16px;
  font-weight: 600;
  color: var(--accent);
  margin-top: 6px;
}

.kv { margin-bottom: 8px; }
.kv strong { display: block; font-size: 14px; color: var(--muted); margin-bottom: 2px; }

.back-link {
  display: inline-block;
  text-decoration: none;
  font-size: 15px;
  margin-bottom: 8px;
  min-height: var(--tap-min);
  line-height: var(--tap-min);
}

.menu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.menu-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: right;
  min-height: 110px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--panel);
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
  transition: border-color 0.15s, background 0.15s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.menu-tile[data-section="pending"] {
  border-color: #fcd34d;
  background: linear-gradient(180deg, #fffbeb 0%, var(--panel) 100%);
}

.menu-tile:active,
.menu-tile:hover {
  border-color: #99d5cf;
  background: var(--accent-soft);
}

.menu-icon { font-size: 28px; margin-bottom: 6px; }
.menu-label { font-size: 17px; font-weight: 700; line-height: 1.3; }
.menu-sub { font-size: 13px; color: var(--muted); margin-top: 4px; line-height: 1.35; }

.section-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 8px;
}

.section-lead { margin-bottom: 16px; }

.subhead {
  font-size: 16px;
  font-weight: 700;
  color: var(--muted);
  margin: 20px 0 10px;
}

.back-section-btn { margin-bottom: 16px; }

.card h3 {
  margin: 0 0 10px;
  font-size: 17px;
}

.guide-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
}

.guide-card-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.guide-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

.guide-text { margin: 10px 0; }

.guide-img {
  width: 100%;
  border-radius: 12px;
  margin: 8px 0;
  max-height: 220px;
  object-fit: cover;
}

.day-option {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
}

.day-option.selected {
  border-color: #99d5cf;
  background: var(--accent-soft);
}

.seg-list {
  margin: 6px 0 10px;
  padding-right: 20px;
  color: var(--muted);
  font-size: 15px;
}

.archive-list {
  margin: 10px 0 0;
  padding-right: 20px;
  color: var(--muted);
  font-size: 15px;
}

.archive-list li {
  margin-bottom: 4px;
}

.portal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.portal-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: right;
  min-height: 120px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--panel);
  border-top: 3px solid var(--accent, var(--accent));
  text-decoration: none;
  color: var(--text);
  touch-action: manipulation;
  transition: border-color 0.15s, background 0.15s;
}

.portal-card-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.portal-local-btn {
  display: block;
  text-align: center;
  padding: 10px 12px;
  border-radius: 12px;
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  color: #047857;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  touch-action: manipulation;
}

.portal-local-btn:hover,
.portal-local-btn:active {
  background: #d1fae5;
  text-decoration: none;
}

.portal-card:active,
.portal-card:hover {
  border-color: #99d5cf;
  background: var(--accent-soft);
}

.portal-card-local {
  opacity: 0.75;
  cursor: default;
}

.portal-emoji { font-size: 30px; margin-bottom: 6px; }
.portal-title { font-size: 17px; font-weight: 700; line-height: 1.3; }
.portal-sub { font-size: 13px; color: var(--muted); margin-top: 4px; }
.portal-note { font-size: 12px; margin-top: 6px; margin-bottom: 0; }

.tip-box {
  background: var(--accent-soft);
  border-radius: 12px;
  padding: 12px;
  margin-top: 10px;
}

.deploy-log {
  margin-top: 12px;
  padding: 12px;
  max-height: 280px;
  overflow: auto;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
  direction: ltr;
  text-align: left;
}

body.large-buttons {
  --tap-min: 56px;
  font-size: 18px;
}

body.large-buttons .menu-tile {
  min-height: 130px;
  padding: 18px;
}

body.large-buttons .menu-label {
  font-size: 19px;
}

body.large-buttons .btn {
  font-size: 19px;
  padding: 16px 18px;
}

@media (max-width: 360px) {
  .menu-grid,
  .portal-grid {
    grid-template-columns: 1fr;
  }

  .header-row {
    flex-direction: column;
  }

  .hub-link {
    width: 100%;
  }
}

@media (min-width: 900px) {
  .wrap { max-width: 900px; padding-top: 28px; }
  .title { font-size: 30px; }
  .menu-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Hotel comparison grid */
.badge-ac {
  background: #e0f2fe;
  color: #0369a1;
}

.hotel-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hotel-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
}

.hotel-card.hotel-candidate {
  border-color: #99d5cf;
  background: linear-gradient(180deg, #f0fdfa 0%, var(--panel) 100%);
}

.hotel-card-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}

.hotel-name {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  flex: 1 1 60%;
}

.hotel-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.hotel-role {
  font-size: 14px;
  margin-bottom: 8px;
}

.hotel-price {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 10px;
}

.hotel-pros,
.hotel-cons {
  margin: 10px 0;
  font-size: 15px;
}

.hotel-pros ul,
.hotel-cons ul {
  margin: 6px 0 0;
  padding-right: 20px;
}

.hotel-pros strong { color: #047857; }
.hotel-cons strong { color: #b45309; }

.hotel-notes {
  margin-top: 10px;
  font-size: 14px;
}

/* Places & micro-audio GPS guide */
.place-card .place-text {
  margin: 10px 0;
  line-height: 1.6;
}

.poi-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 16px;
}

.poi-card {
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px;
  background: var(--panel);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.poi-card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.poi-icon {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
}

.poi-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
}

.poi-desc {
  margin: 0 0 8px;
  line-height: 1.6;
  color: var(--text);
}

.poi-profile-audio {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.poi-profile-audio-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
}

.profile-audio-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px;
  background: var(--panel);
}

.profile-audio-item .audio-play-btn,
.profile-audio-btn {
  width: 100%;
  min-height: 48px;
  text-align: right;
  white-space: normal;
}

.profile-audio-eran_data {
  border-inline-start: 4px solid #2563eb;
}

.profile-audio-arlee_shopping {
  border-inline-start: 4px solid #db2777;
}

.profile-audio-shared_history {
  border-inline-start: 4px solid #7c3aed;
}

.profile-audio-logistics {
  border-inline-start: 4px solid #0f766e;
}

.profile-audio-missing {
  opacity: 0.72;
}

.profile-audio-status {
  display: block;
  padding: 4px 8px 0;
  color: var(--muted);
  font-size: 12px;
}

.poi-profile-audio .audio-block {
  margin: 0;
}

.legacy-audio {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}

.legacy-audio summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
}

.walking-nav-link {
  width: 100%;
  text-align: center;
  touch-action: manipulation;
}

.poi-dist {
  font-size: 13px;
  margin-top: 4px;
}

.poi-nearby {
  border-color: #7dd3c0;
  background: linear-gradient(180deg, #f0fdf9 0%, var(--panel) 100%);
}

.poi-near {
  border-color: #0d9488;
  background: linear-gradient(180deg, #ccfbf1 0%, var(--panel) 100%);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.poi-nearest.poi-near {
  animation: poi-pulse 2s ease-in-out infinite;
}

@keyframes poi-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15); }
  50% { box-shadow: 0 0 0 6px rgba(13, 148, 136, 0.28); }
}

.poi-near-banner,
.poi-nearby-banner {
  font-size: 14px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 10px;
  margin: -4px 0 10px;
}

.poi-near-banner {
  background: #0d9488;
  color: #fff;
}

.poi-nearby-banner {
  background: #d1fae5;
  color: #065f46;
}

.poi-prompt {
  margin: 12px 0 4px;
  padding: 14px 16px;
  border: 2px solid #0d9488;
  background: linear-gradient(180deg, #ecfdf5 0%, var(--panel) 100%);
}

.poi-prompt strong {
  display: block;
  margin-bottom: 6px;
  color: #0f766e;
}

.poi-footer {
  margin-top: 20px;
  font-size: 13px;
  line-height: 1.5;
}

.poi-footer code {
  font-size: 12px;
}

/* Half-day route grouping */
.route-section-title {
  margin: 20px 0 10px;
  font-size: 18px;
  font-weight: 700;
}

.route-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.route-chip {
  border: 2px solid var(--border);
  border-radius: 999px;
  padding: 8px 14px;
  background: var(--panel);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.route-chip.active {
  border-color: #0d9488;
  background: #ccfbf1;
  color: #0f766e;
}

.route-group {
  margin-top: 18px;
  padding-top: 6px;
  border-top: 1px solid var(--border);
}

.route-group-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.route-group-title {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
}

.route-group-desc {
  margin: 0 0 12px;
  line-height: 1.55;
}

.route-drive {
  font-size: 13px;
  color: #0f766e;
  font-weight: 600;
  white-space: nowrap;
}

.route-map-block {
  margin: 0 0 14px;
  padding: 12px;
  border: 2px solid #99f6e4;
  background: linear-gradient(180deg, #f0fdf9 0%, var(--panel) 100%);
}

.route-map-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.route-map-head strong {
  color: #0f766e;
}

.route-nav-btn {
  flex-shrink: 0;
  font-size: 13px;
}

.route-map-iframe {
  width: 100%;
  height: 220px;
  border: 0;
  border-radius: 12px;
  background: #e2e8f0;
}

.route-stop-list {
  margin: 12px 0 0;
  padding: 0 18px 0 0;
  line-height: 1.6;
  font-size: 14px;
}

.route-stop-list li {
  margin-bottom: 4px;
}

.route-stop-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-left: 6px;
  border-radius: 50%;
  background: #0d9488;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  vertical-align: middle;
}

.route-focus-btn {
  margin-bottom: 12px;
}

.route-group-general {
  margin-top: 24px;
}

.place-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* eSIM comparison */
.esim-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.esim-card .esim-plan {
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--accent);
}

@media (min-width: 600px) {
  .esim-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
}

/* Section sheet: dimmer and panel NEVER overlap in hit-test space (fixes dead buttons) */
.section-view {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  justify-content: stretch;
  background: transparent;
  /* Children opt into pointer events; parent does not steal taps */
  pointer-events: none;
}

/* Top flex-grow dimmer only — does NOT cover the panel below */
.section-overlay {
  flex: 1 1 auto;
  min-height: 48px;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  appearance: none;
  -webkit-appearance: none;
  background: rgba(15, 32, 51, 0.45);
  cursor: pointer;
  pointer-events: auto;
  position: relative;
  z-index: 1;
  -webkit-tap-highlight-color: transparent;
}

/* Bottom sheet — sole interactive surface for content controls */
.section-panel {
  flex: 0 1 auto;
  position: relative;
  z-index: 2;
  pointer-events: auto;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--bg);
  border-radius: 20px 20px 0 0;
  margin: 0;
  padding: 12px 16px calc(80px + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.12);
}

.section-panel .back-section-btn {
  position: sticky;
  top: 0;
  z-index: 5;
  pointer-events: auto;
  width: 100%;
  margin-bottom: 16px;
  background: var(--bg);
}

.section-panel button,
.section-panel a,
.section-panel .route-chip,
.section-panel .route-focus-btn,
.section-panel .maps-filter-chip,
.section-panel .offline-audio-btn,
.section-panel audio {
  position: relative;
  z-index: 3;
  pointer-events: auto;
  touch-action: manipulation;
}

/* External booking / maps links — never blocked by overlays */
a.ext-link,
a.hotel-book-btn,
a.maps-link,
.hotel-actions a,
.place-actions a {
  pointer-events: auto !important;
  position: relative;
  z-index: 3;
  cursor: pointer;
  display: block;
  text-decoration: none;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}

.hotel-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
  position: relative;
  z-index: 3;
}

.hotel-book-btn {
  width: 100%;
}

.maps-link {
  width: 100%;
}

/* Document modal */
body.modal-open {
  overflow: hidden;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.modal[hidden] {
  display: none !important;
}

.modal[hidden] .modal-close-fab {
  display: none !important;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 32, 51, 0.55);
  -webkit-tap-highlight-color: transparent;
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 640px;
  max-height: 92vh;
  background: var(--panel);
  border-radius: 20px 20px 0 0;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  padding-inline-end: 64px; /* room for floating × on mobile */
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--panel);
}

.modal-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.modal-close {
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  border: 2px solid var(--border);
  border-radius: 50%;
  background: #fff;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  color: #0f2033;
  flex-shrink: 0;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(15, 32, 51, 0.12);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  z-index: 5;
}

.modal-close:active,
.modal-close:focus-visible {
  background: #0f2033;
  color: #fff;
  outline: none;
}

/* Always-visible floating close for iOS PDF overlays */
.modal-close-fab {
  position: fixed;
  top: max(12px, env(safe-area-inset-top, 12px));
  inset-inline-end: max(12px, env(safe-area-inset-right, 12px));
  z-index: 10050;
  width: 56px;
  height: 56px;
  min-width: 56px;
  min-height: 56px;
  background: #0f2033;
  color: #fff;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 6px 22px rgba(15, 32, 51, 0.45);
  font-size: 34px;
  line-height: 1;
  pointer-events: auto;
}

.modal-body {
  flex: 1;
  overflow: auto;
  padding: 12px 16px;
  -webkit-overflow-scrolling: touch;
}

.modal-doc-img {
  width: 100%;
  height: auto;
  border-radius: 12px;
}

.modal-doc-scroll {
  min-height: min(72vh, 720px);
  height: min(72vh, 720px);
  border-radius: 12px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.modal-doc-frame {
  width: 100%;
  height: 100%;
  min-height: min(72vh, 720px);
  border: none;
  border-radius: 12px;
  background: #f8fafc;
}

.modal-doc-hint {
  margin: 8px 0 0;
  font-size: 13px;
}

.doc-link-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.doc-pdf-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.doc-pdf-actions .btn {
  flex: 1 1 160px;
  text-align: center;
  text-decoration: none;
}

.menu-tile[data-section="itineraries"] {
  border-color: #86efac;
  background: linear-gradient(180deg, #f0fdf4 0%, var(--panel) 100%);
}

.itinerary-option {
  margin: 10px 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(248, 250, 252, 0.8);
}

.itinerary-option.selected {
  border-color: #86efac;
  background: #f0fdf4;
}

.itinerary-option summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  list-style: none;
}

.itinerary-option summary::-webkit-details-marker {
  display: none;
}

.itinerary-guide-snippet {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.itinerary-route-card {
  margin-bottom: 12px;
}

.itinerary-trip-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 12px 0 20px;
}

.itinerary-trip-btn {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  text-align: right;
  width: 100%;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--panel);
  padding: 14px 16px;
  border-radius: 14px;
  -webkit-tap-highlight-color: transparent;
}

.itinerary-trip-btn:active {
  transform: scale(0.99);
}

.itinerary-trip-btn-main {
  display: flex;
  align-items: center;
  gap: 10px;
}

.itinerary-trip-btn .route-icon {
  font-size: 22px;
}

.itinerary-stop-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.itinerary-stop-card {
  margin: 0;
}

.itinerary-stop-summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.itinerary-stop-summary::-webkit-details-marker {
  display: none;
}

.itinerary-stop-hint {
  font-size: 13px;
}

.itinerary-back-to-list {
  margin-bottom: 10px;
}

.itinerary-route-summary {
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  list-style: none;
}

.itinerary-route-summary::-webkit-details-marker {
  display: none;
}

.itinerary-route-summary .route-icon {
  font-size: 22px;
  line-height: 1.2;
}

.itinerary-route-summary .muted {
  display: block;
  margin-top: 2px;
}

.itinerary-poi-list {
  margin-top: 12px;
}

.itinerary-poi {
  margin-bottom: 10px;
}

.ticket-row {
  padding-bottom: 12px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.ticket-row:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.menu-tile[data-section="tickets"] {
  border-color: #93c5fd;
  background: linear-gradient(180deg, #eff6ff 0%, var(--panel) 100%);
}

.modal-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
}

/* Audio player — NotebookLM */
.audio-block {
  margin: 12px 0;
}

.audio-play-btn {
  width: 100%;
  min-height: 48px;
  touch-action: manipulation;
}

.audio-block.is-loading .audio-play-btn {
  opacity: 0.7;
}

.audio-block.is-error .audio-error-hint {
  color: #b91c1c;
}

.audio-mount {
  margin-top: 8px;
}

.audio-player {
  width: 100%;
  min-height: 48px;
  border-radius: 12px;
}

.audio-hint,
.audio-missing {
  font-size: 14px;
  margin-top: 6px;
}

.offline-audio-bar {
  margin: 14px 0 18px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(180deg, #ecfdf5 0%, var(--panel) 100%);
}

.offline-audio-btn {
  width: 100%;
  white-space: normal;
  line-height: 1.35;
  min-height: 52px;
}

.offline-audio-btn.offline-audio-current,
.offline-audio-btn.offline-audio-current:disabled {
  background: #dcfce7;
  border-color: #86efac;
  color: #166534;
  opacity: 1;
  cursor: default;
}

.offline-audio-status {
  margin: 10px 0 0;
  font-size: 14px;
}

.offline-audio-status.offline-audio-error {
  color: #b91c1c;
}

.menu-tile[data-section="maps"] {
  border-color: #86efac;
  background: linear-gradient(180deg, #f0fdf4 0%, var(--panel) 100%);
}

.menu-tile[data-section="admin"] {
  border-color: #93c5fd;
  background: linear-gradient(180deg, #eff6ff 0%, var(--panel) 100%);
}

.admin-sub-grid {
  display: grid;
  gap: 10px;
}

.admin-sub-btn {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  text-align: right;
  cursor: pointer;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: var(--panel);
}

.admin-sub-btn:active {
  background: var(--accent-soft);
}

.admin-sub-icon {
  font-size: 26px;
  line-height: 1;
}

.admin-sub-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.admin-sub-main strong {
  font-size: 17px;
}

.admin-sub-crumb {
  margin: 0 0 10px;
  font-size: 14px;
}

.maps-app-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.maps-app-btn {
  min-height: 46px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.maps-app-btn.active {
  background: #0f766e;
  border-color: #0f766e;
  color: #fff;
}

.maps-place-list-alpha {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.maps-place-row {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "cat go"
    "name go"
    "sub go"
    "coords go";
  gap: 2px 10px;
  width: 100%;
  text-align: right;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #fff;
  cursor: pointer;
}

.maps-place-row:active {
  background: #ecfdf5;
  border-color: #86efac;
}

.maps-place-row .maps-place-cat { grid-area: cat; font-size: 12px; color: var(--muted); font-weight: 700; }
.maps-place-row .maps-place-name { grid-area: name; font-size: 16px; }
.maps-place-row .maps-place-sub { grid-area: sub; font-size: 13px; }
.maps-place-row .maps-place-coords { grid-area: coords; font-size: 12px; }
.maps-place-row .maps-place-go {
  grid-area: go;
  align-self: center;
  font-size: 13px;
  font-weight: 700;
  color: #0f766e;
  white-space: nowrap;
}

.maps-picker {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0 0 18px;
  padding: 14px;
  border-radius: 14px;
  background: linear-gradient(180deg, #f8fafc 0%, var(--panel) 100%);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.maps-picker-compact {
  margin-bottom: 14px;
}

.maps-label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
}

.maps-free-row,
.maps-select-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.maps-free-input,
.maps-place-select {
  flex: 1;
  min-height: 48px;
  font-size: 16px; /* prevents iOS zoom; readable on Samsung */
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.15);
  background: #fff;
}

.maps-hint {
  margin: 8px 0 0;
  font-size: 13px;
}

.maps-quick-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.maps-filter-chip {
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff;
  font-size: 14px;
  font-weight: 600;
}

.maps-filter-chip.active {
  background: #0f766e;
  border-color: #0f766e;
  color: #fff;
}

.maps-place-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: min(55vh, 520px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.maps-place-card {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #fff;
}

.maps-place-cat {
  display: inline-block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

.maps-place-name {
  display: block;
  font-size: 16px;
  line-height: 1.35;
}

.maps-place-sub {
  margin-top: 4px;
  font-size: 13px;
}

.maps-place-coords {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.maps-place-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.maps-place-actions .btn {
  min-height: 44px;
}

.maps-count {
  margin: 0;
  font-size: 13px;
}

.menu-tile[data-section="sync"] {
  border-color: #93c5fd;
  background: linear-gradient(180deg, #eff6ff 0%, var(--panel) 100%);
}

.sync-card .sync-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.sync-steps {
  margin: 8px 0 0;
  padding-inline-start: 1.2em;
  line-height: 1.55;
}

.sync-steps li {
  margin-bottom: 6px;
}

.hotel-recommended {
  border-color: #86efac;
  box-shadow: 0 0 0 1px rgba(22, 163, 74, 0.15);
}

.logistics-plan-card {
  border-color: #fbbf24;
  background: linear-gradient(180deg, #fffbeb 0%, var(--panel) 55%);
}

.logistics-choice {
  margin: 12px 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.logistics-choice-primary {
  border-color: #86efac;
  background: rgba(240, 253, 244, 0.9);
}

.logistics-steps {
  margin: 8px 0 0;
  padding-inline-start: 1.2em;
  line-height: 1.55;
}

.logistics-steps li {
  margin-bottom: 6px;
}

.hotel-booked {
  border-color: #86efac;
  background: linear-gradient(180deg, #f0fdf4 0%, var(--panel) 100%);
}

.travel-route-card h3 {
  margin: 0 0 10px;
  font-size: 17px;
}

.poi-brands {
  margin: 10px 0 12px;
}

.poi-brands-title {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
}

.poi-brands-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.poi-brand-chip {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(15, 23, 42, 0.08);
  font-size: 12px;
  line-height: 1.3;
}

.hotel-team {
  border-color: #99d5cf;
  background: linear-gradient(180deg, #ecfdf5 0%, var(--panel) 100%);
}

.car-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.car-card .hotel-actions {
  margin-top: 12px;
}

@media (min-width: 600px) {
  .modal {
    align-items: center;
    padding: 20px;
  }

  .modal-panel {
    border-radius: 20px;
    max-height: 88vh;
  }

  .modal-doc-frame {
    min-height: 60vh;
  }
}

/* Login screen — Hebrew RTL, mobile-first */
.login-page {
  min-height: 100dvh;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 120% 80% at 50% -20%, #99f6e4 0%, transparent 55%),
    linear-gradient(165deg, #ecfeff 0%, #f3f7fb 42%, #e0f2fe 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px calc(24px + env(safe-area-inset-bottom));
}

.login-shell {
  width: 100%;
  max-width: 400px;
}

.login-brand {
  text-align: center;
  margin-bottom: 28px;
}

.login-mark {
  font-size: 48px;
  line-height: 1;
  margin-bottom: 10px;
}

.login-title {
  margin: 0 0 6px;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f766e;
}

.login-sub {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.login-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 22px 18px 20px;
  box-shadow: 0 12px 40px rgba(15, 118, 110, 0.08);
}

.login-label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 15px;
}

.login-input {
  width: 100%;
  min-height: var(--tap-min);
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 20px;
  letter-spacing: 0.08em;
  background: #f8fafc;
  color: var(--text);
  direction: ltr;
  text-align: center;
  -webkit-appearance: none;
  appearance: none;
}

.login-input:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}

.login-toggle {
  display: block;
  width: 100%;
  margin: 10px 0 0;
  padding: 8px;
  border: none;
  background: transparent;
  color: var(--accent);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;
}

.login-error {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 15px;
  font-weight: 600;
}

.login-submit {
  margin-top: 18px;
}

.login-hint {
  margin: 14px 0 0;
  text-align: center;
  font-size: 14px;
  line-height: 1.45;
}
